@gipisistemas/ng-core 1.1.9 → 1.1.10
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/gipisistemas-ng-core.umd.js +11 -7
- package/bundles/gipisistemas-ng-core.umd.js.map +1 -1
- package/bundles/gipisistemas-ng-core.umd.min.js +1 -1
- package/bundles/gipisistemas-ng-core.umd.min.js.map +1 -1
- package/core/services/authentication.service.d.ts +3 -1
- package/esm2015/core/gipi-components/components/abstract-find.component.js +4 -4
- package/esm2015/core/services/authentication.service.js +11 -5
- package/esm5/core/gipi-components/components/abstract-find.component.js +4 -4
- package/esm5/core/services/authentication.service.js +11 -5
- package/fesm2015/gipisistemas-ng-core.js +11 -7
- package/fesm2015/gipisistemas-ng-core.js.map +1 -1
- package/fesm5/gipisistemas-ng-core.js +11 -7
- package/fesm5/gipisistemas-ng-core.js.map +1 -1
- package/gipisistemas-ng-core.metadata.json +1 -1
- package/package.json +1 -1
@@ -63,5 +63,5 @@ var So=function(){function e(e,n,i,o){if(this._changeDetectorRef=e,this._dateFor
|
|
63
63
|
*
|
64
64
|
* Use of this source code is governed by an MIT-style license that can be
|
65
65
|
* found in the LICENSE file at https://angular.io/license
|
66
|
-
*/var Ro=new t.InjectionToken("MAT_DATE_RANGE_INPUT_PARENT"),Ao=function(e){function n(t,n,i,o,r,a,s,l){var p=e.call(this,n,s,l)||this;return p._rangeInput=t,p._defaultErrorStateMatcher=i,p._injector=o,p._parentForm=r,p._parentFormGroup=a,p._outsideValueChanged=function(){p._validatorOnChange()},p}return be(n,e),n.prototype.ngOnInit=function(){var e=this._injector.get(r.NgControl,null,t.InjectFlags.Self);this._injector.get(r.NgControl,null),e&&(this.ngControl=e)},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},n.prototype.isEmpty=function(){return 0===this._elementRef.nativeElement.value.length},n.prototype._getPlaceholder=function(){return this._elementRef.nativeElement.placeholder},n.prototype.focus=function(){this._elementRef.nativeElement.focus()},n.prototype._onInput=function(t){e.prototype._onInput.call(this,t),this._rangeInput._handleChildValueChange()},n.prototype._openPopup=function(){this._rangeInput._openDatepicker()},n.prototype._getMinDate=function(){return this._rangeInput.min},n.prototype._getMaxDate=function(){return this._rangeInput.max},n.prototype._getDateFilter=function(){return this._rangeInput.dateFilter},n.prototype._parentDisabled=function(){return this._rangeInput._groupDisabled},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Ro]}]},{type:t.ElementRef},{type:D.ErrorStateMatcher},{type:t.Injector},{type:r.NgForm,decorators:[{type:t.Optional}]},{type:r.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Ji,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[D.MAT_DATE_FORMATS]}]}]},n=_e([t.Directive({}),we(0,t.Inject(Ro)),we(4,t.Optional()),we(5,t.Optional()),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(D.MAT_DATE_FORMATS)),Ce("design:paramtypes",[Object,t.ElementRef,D.ErrorStateMatcher,t.Injector,r.NgForm,r.FormGroupDirective,Ji,Object])],n)}(Do),To=D.mixinErrorState(Ao),Mo=function(e){function n(t,n,i,o,a,s,l,p){var d=e.call(this,t,n,i,o,a,s,l,p)||this;return d._startValidator=function(e){var t=d._dateAdapter.getValidDateOrNull(d._dateAdapter.deserialize(e.value)),n=d._model?d._model.selection.end:null;return!t||!n||d._dateAdapter.compareDate(t,n)<=0?null:{matStartDateInvalid:{end:n,actual:t}}},d._validator=r.Validators.compose(ke(e.prototype._getValidators.call(d),[d._startValidator])),d._canEmitChangeEvent=function(e){return e.source!==d._rangeInput._endInput},d}var i;return be(n,e),i=n,n.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},n.prototype.ngDoCheck=function(){e.prototype.ngDoCheck.call(this)},n.prototype._getValueFromModel=function(e){return e.start},n.prototype._assignValueToModel=function(e){if(this._model){var t=new Qi(e,this._model.selection.end);this._model.updateSelection(t,this),this._cvaOnChange(e)}},n.prototype._formatValue=function(t){e.prototype._formatValue.call(this,t),this._rangeInput._handleChildValueChange()},n.prototype.getMirrorValue=function(){var e=this._elementRef.nativeElement,t=e.value;return t.length>0?t:e.placeholder},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Ro]}]},{type:t.ElementRef},{type:D.ErrorStateMatcher},{type:t.Injector},{type:r.NgForm,decorators:[{type:t.Optional}]},{type:r.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Ji,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[D.MAT_DATE_FORMATS]}]}]},n=i=_e([t.Directive({selector:"input[gipiMatStartDate]",host:{class:"mat-start-date mat-date-range-input-inner","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(keydown)":"_onKeydown($event)","[attr.id]":"_rangeInput.id","[attr.aria-haspopup]":'_rangeInput.rangePicker ? "dialog" : null',"[attr.aria-owns]":"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null","[attr.min]":"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null","[attr.max]":"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null","(blur)":"_onBlur()",type:"text"},providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:i,multi:!0},{provide:r.NG_VALIDATORS,useExisting:i,multi:!0}]}),we(0,t.Inject(Ro)),we(4,t.Optional()),we(5,t.Optional()),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(D.MAT_DATE_FORMATS)),Ce("design:paramtypes",[Object,t.ElementRef,D.ErrorStateMatcher,t.Injector,r.NgForm,r.FormGroupDirective,Ji,Object])],n)}(To),Fo=function(e){function n(t,n,i,o,a,s,l,p){var d=e.call(this,t,n,i,o,a,s,l,p)||this;return d._endValidator=function(e){var t=d._dateAdapter.getValidDateOrNull(d._dateAdapter.deserialize(e.value)),n=d._model?d._model.selection.start:null;return!t||!n||d._dateAdapter.compareDate(t,n)>=0?null:{matEndDateInvalid:{start:n,actual:t}}},d._validator=r.Validators.compose(ke(e.prototype._getValidators.call(d),[d._endValidator])),d._canEmitChangeEvent=function(e){return e.source!==d._rangeInput._startInput},d}var i;return be(n,e),i=n,n.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},n.prototype.ngDoCheck=function(){e.prototype.ngDoCheck.call(this)},n.prototype._getValueFromModel=function(e){return e.end},n.prototype._assignValueToModel=function(e){if(this._model){var t=new Qi(this._model.selection.start,e);this._model.updateSelection(t,this),this._cvaOnChange(e)}},n.prototype._onKeydown=function(t){t.keyCode!==se.BACKSPACE||this._elementRef.nativeElement.value||this._rangeInput._startInput.focus(),e.prototype._onKeydown.call(this,t)},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Ro]}]},{type:t.ElementRef},{type:D.ErrorStateMatcher},{type:t.Injector},{type:r.NgForm,decorators:[{type:t.Optional}]},{type:r.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Ji,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[D.MAT_DATE_FORMATS]}]}]},n=i=_e([t.Directive({selector:"input[gipiMatEndDate]",host:{class:"mat-end-date mat-date-range-input-inner","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(keydown)":"_onKeydown($event)","[attr.aria-haspopup]":'_rangeInput.rangePicker ? "dialog" : null',"[attr.aria-owns]":"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null","[attr.min]":"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null","[attr.max]":"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null","(blur)":"_onBlur()",type:"text"},providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:i,multi:!0},{provide:r.NG_VALIDATORS,useExisting:i,multi:!0}]}),we(0,t.Inject(Ro)),we(4,t.Optional()),we(5,t.Optional()),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(D.MAT_DATE_FORMATS)),Ce("design:paramtypes",[Object,t.ElementRef,D.ErrorStateMatcher,t.Injector,r.NgForm,r.FormGroupDirective,Ji,Object])],n)}(To),No={transformPanel:ae.trigger("transformPanel",[ae.state("void",ae.style({opacity:0,transform:"scale(1, 0.8)"})),ae.transition("void => enter",ae.animate("120ms cubic-bezier(0, 0, 0.2, 1)",ae.style({opacity:1,transform:"scale(1, 1)"}))),ae.transition("* => void",ae.animate("100ms linear",ae.style({opacity:0})))]),fadeInCalendar:ae.trigger("fadeInCalendar",[ae.state("void",ae.style({opacity:0})),ae.state("enter",ae.style({opacity:1})),ae.transition("void => *",ae.animate("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},Lo=0,Vo=new t.InjectionToken("mat-datepicker-scroll-strategy");function jo(e){return function(){return e.scrollStrategies.reposition()}}var Bo,zo={provide:Vo,deps:[ue.Overlay],useFactory:jo},Yo=function(e){this._elementRef=e},Ho=function(e){function n(t,n,i,o,r){var a=e.call(this,t)||this;return a._changeDetectorRef=n,a._model=i,a._dateAdapter=o,a._rangeSelectionStrategy=r,a._subscriptions=new ie.Subscription,a._animationState="enter",a._animationDone=new ie.Subject,a}return be(n,e),n.prototype.ngAfterViewInit=function(){var e=this;this._changeDetectorRef&&this._subscriptions.add(this.datepicker._stateChanges.subscribe((function(){e._changeDetectorRef.markForCheck()}))),this._calendar.focusActiveCell()},n.prototype.ngOnDestroy=function(){this._subscriptions.unsubscribe(),this._animationDone.complete()},n.prototype._handleUserSelection=function(e){if(this._model&&this._dateAdapter){var t=this._model.selection,n=e.value,i=t instanceof Qi;if(i&&this._rangeSelectionStrategy){var o=this._rangeSelectionStrategy.selectionFinished(n,t,e.event);this._model.updateSelection(o,this)}else!n||!i&&this._dateAdapter.sameDate(n,t)||this._model.add(n)}this._model&&!this._model.isComplete()||this.datepicker.close()},n.prototype._startExitAnimation=function(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()},n.prototype._getSelected=function(){return this._model?this._model.selection:null},n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:eo},{type:Ji},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[fo]}]}]},_e([t.ViewChild(Eo,{static:!0}),Ce("design:type",Eo)],n.prototype,"_calendar",void 0),n=_e([t.Component({selector:"gipi-mat-datepicker-content",template:'<gipi-mat-calendar cdkTrapFocus\n [id]="datepicker.id"\n [ngClass]="datepicker.panelClass"\n [startAt]="datepicker.startAt"\n [startView]="datepicker.startView"\n [minDate]="datepicker._getMinDate()"\n [maxDate]="datepicker._getMaxDate()"\n [dateFilter]="datepicker._getDateFilter()"\n [templatePresetRange]="datepicker.templatePresetRange"\n [selected]="_getSelected()"\n [dateClass]="datepicker.dateClass"\n [comparisonStart]="comparisonStart"\n [comparisonEnd]="comparisonEnd"\n [@fadeInCalendar]="\'enter\'"\n (yearSelected)="datepicker._selectYear($event)"\n (monthSelected)="datepicker._selectMonth($event)"\n (_userSelection)="_handleUserSelection($event)">\n</gipi-mat-calendar>',host:{class:"mat-datepicker-content","[@transformPanel]":"_animationState","(@transformPanel.done)":"_animationDone.next()","[class.mat-datepicker-content-touch]":"datepicker.touchUi"},animations:[No.transformPanel,No.fadeInCalendar],exportAs:"gipiMatDatepickerContent",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,inputs:["color"],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{min-width:296px;height:365px}.mat-datepicker-content .gipi-mat-calendar-wrapper .gipi-mat-calendar-content{min-width:296px;min-height:365px;border-left:1px solid rgba(0,0,0,.12)}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation:landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation:portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}"]}),we(4,t.Optional()),we(4,t.Inject(fo)),Ce("design:paramtypes",[t.ElementRef,t.ChangeDetectorRef,eo,Ji,Object])],n)}(D.mixinColor(Yo)),Uo=function(){function e(e,n,i,o,r,a,s,l,p){if(this._dialog=e,this._overlay=n,this._ngZone=i,this._viewContainerRef=o,this._dateAdapter=a,this._dir=s,this._document=l,this._model=p,this._inputStateChanges=ie.Subscription.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new t.EventEmitter,this.monthSelected=new t.EventEmitter,this.openedStream=new t.EventEmitter,this.closedStream=new t.EventEmitter,this._opened=!1,this.id="mat-datepicker-"+Lo++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=this.id+"-backdrop",this._stateChanges=new ie.Subject,!this._dateAdapter)throw so("DateAdapter");this._scrollStrategy=r}return Object.defineProperty(e.prototype,"startAt",{get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)},set:function(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!1,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:!1,configurable:!0}),Object.defineProperty(e.prototype,"touchUi",{get:function(){return this._touchUi},set:function(e){this._touchUi=le.coerceBooleanProperty(e)},enumerable:!1,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=le.coerceBooleanProperty(e);t!==this._disabled&&(this._disabled=t,this._stateChanges.next(void 0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){le.coerceBooleanProperty(e)?this.open():this.close()},enumerable:!1,configurable:!0}),e.prototype._getMinDate=function(){return this._datepickerInput&&this._datepickerInput.min},e.prototype._getMaxDate=function(){return this._datepickerInput&&this._datepickerInput.max},e.prototype._getDateFilter=function(){return this._datepickerInput&&this._datepickerInput.dateFilter},e.prototype.ngOnChanges=function(e){var t=e.xPosition||e.yPosition;t&&!t.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)},e.prototype.ngOnDestroy=function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()},e.prototype.select=function(e){this._model.add(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 MatDatepicker can only be associated with a single input.");return this._inputStateChanges.unsubscribe(),this._datepickerInput=e,this._inputStateChanges=e.stateChanges.subscribe((function(){return t._stateChanges.next(void 0)})),this._model},e.prototype.open=function(){if(!this._opened&&!this.disabled){if(!this._datepickerInput)throw Error("Attempted to open an MatDatepicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit()}},e.prototype.close=function(){var e=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var t=this._popupComponentRef.instance;t._startExitAnimation(),t._animationDone.pipe(oe.take(1)).subscribe((function(){return e._destroyPopup()}))}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var n=function(){e._opened&&(e._opened=!1,e.closedStream.emit(),e._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}},e.prototype._openAsDialog=function(){var e=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(Ho,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:"cdk-overlay-dark-backdrop, "+this._backdropHarnessClass,width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!0,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe((function(){return e.close()})),this._forwardContentValues(this._dialogRef.componentInstance)},e.prototype._openAsPopup=function(){var e=this,t=new y.ComponentPortal(Ho,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(t),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(oe.take(1)).subscribe((function(){e._popupRef.updatePosition()}))},e.prototype._forwardContentValues=function(e){e.datepicker=this,e.color=this.color},e.prototype._createPopup=function(){var e=this,t=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new ue.OverlayConfig({positionStrategy:this._setConnectedPositions(t),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),ie.merge(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(oe.filter((function(t){return t.keyCode===se.ESCAPE||e._datepickerInput&&t.altKey&&t.keyCode===se.UP_ARROW})))).subscribe((function(t){t&&t.preventDefault(),e.close()}))},e.prototype._destroyPopup=function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)},e.prototype._setConnectedPositions=function(e){var t="end"===this.xPosition?"end":"start",n="start"===t?"end":"start",i="above"===this.yPosition?"bottom":"top",o="top"===i?"bottom":"top";return e.withPositions([{originX:t,originY:o,overlayX:t,overlayY:i},{originX:t,originY:i,overlayX:t,overlayY:o},{originX:n,originY:o,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:o}])},_e([t.Input(),Ce("design:type",t.TemplateRef)],e.prototype,"templatePresetRange",void 0),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],e.prototype,"startAt",null),_e([t.Input(),Ce("design:type",String)],e.prototype,"startView",void 0),_e([t.Input(),Ce("design:type",String),Ce("design:paramtypes",[String])],e.prototype,"color",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"touchUi",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",String)],e.prototype,"xPosition",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"yPosition",void 0),_e([t.Output(),Ce("design:type",t.EventEmitter)],e.prototype,"yearSelected",void 0),_e([t.Output(),Ce("design:type",t.EventEmitter)],e.prototype,"monthSelected",void 0),_e([t.Input(),Ce("design:type",Object)],e.prototype,"panelClass",void 0),_e([t.Input(),Ce("design:type",Function)],e.prototype,"dateClass",void 0),_e([t.Output("opened"),Ce("design:type",t.EventEmitter)],e.prototype,"openedStream",void 0),_e([t.Output("closed"),Ce("design:type",t.EventEmitter)],e.prototype,"closedStream",void 0),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"opened",null),e=_e([we(4,t.Inject(Vo)),we(5,t.Optional()),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(i.DOCUMENT)),Ce("design:paramtypes",[P.MatDialog,ue.Overlay,t.NgZone,t.ViewContainerRef,Object,Ji,ce.Directionality,Object,eo])],e)}(),Go=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return be(n,e),n.prototype._forwardContentValues=function(t){e.prototype._forwardContentValues.call(this,t);var n=this._datepickerInput;n&&(t.comparisonStart=n.comparisonStart,t.comparisonEnd=n.comparisonEnd)},n=_e([t.Component({selector:"gipi-mat-date-range-picker",template:"",exportAs:"gipiMatDateRangePicker",changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[ao,bo]})],n)}(Uo),qo=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return be(n,e),n=_e([t.Component({selector:"gipi-mat-datepicker",template:"",exportAs:"gipiMatDatepicker",changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[oo]})],n)}(Uo),$o={provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return Xo})),multi:!0},Wo={provide:r.NG_VALIDATORS,useExisting:t.forwardRef((function(){return Xo})),multi:!0},Ko=new t.InjectionToken("MatFormField"),Xo=function(e){function n(t,n,i,o){var a=e.call(this,t,n,i)||this;return a._formField=o,a._validator=r.Validators.compose(e.prototype._getValidators.call(a)),a}var i;return be(n,e),i=n,Object.defineProperty(n.prototype,"gipiMatDatepicker",{set:function(e){e&&(this._datepicker=e,this._registerModel(e._registerInput(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"min",{get:function(){return this._min},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._min)||(this._min=t,this._validatorOnChange())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"max",{get:function(){return this._max},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._max)||(this._max=t,this._validatorOnChange())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(e){this._dateFilter=e,this._validatorOnChange()},enumerable:!1,configurable:!0}),n.prototype.getConnectedOverlayOrigin=function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef},n.prototype.getThemePalette=function(){return this._formField?this._formField.color:void 0},n.prototype.getStartValue=function(){return this.value},n.prototype.getPopupConnectionElementRef=function(){return this.getConnectedOverlayOrigin()},n.prototype._openPopup=function(){this._datepicker&&this._datepicker.open()},n.prototype._getValueFromModel=function(e){return e},n.prototype._assignValueToModel=function(e){this._model&&this._model.updateSelection(e,this)},n.prototype._getMinDate=function(){return this._min},n.prototype._getMaxDate=function(){return this._max},n.prototype._getDateFilter=function(){return this._dateFilter},n.prototype._canEmitChangeEvent=function(){return!0},n.ctorParameters=function(){return[{type:t.ElementRef},{type:Ji,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[D.MAT_DATE_FORMATS]}]},{type:T.MatFormField,decorators:[{type:t.Optional},{type:t.Inject,args:[Ko]}]}]},_e([t.Input(),Ce("design:type",qo),Ce("design:paramtypes",[qo])],n.prototype,"gipiMatDatepicker",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],n.prototype,"min",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],n.prototype,"max",null),_e([t.Input("gipiMatDatepickerFilter"),Ce("design:type",Function),Ce("design:paramtypes",[Function])],n.prototype,"dateFilter",null),n=i=_e([t.Directive({selector:"input[gipiMatDatepicker]",providers:[$o,Wo,{provide:N.MAT_INPUT_VALUE_ACCESSOR,useExisting:i}],host:{class:"mat-datepicker-input","[attr.aria-haspopup]":'_datepicker ? "dialog" : null',"[attr.aria-owns]":"(_datepicker?.opened && _datepicker.id) || null","[attr.min]":"min ? _dateAdapter.toIso8601(min) : null","[attr.max]":"max ? _dateAdapter.toIso8601(max) : null","[attr.data-mat-calendar]":"_datepicker ? _datepicker.id : null","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(blur)":"_onBlur()","(keydown)":"_onKeydown($event)"},exportAs:"gipiMatDatepickerInput"}),we(1,t.Optional()),we(2,t.Optional()),we(2,t.Inject(D.MAT_DATE_FORMATS)),we(3,t.Optional()),we(3,t.Inject(Ko)),Ce("design:paramtypes",[t.ElementRef,Ji,Object,T.MatFormField])],n)}(Do),Zo=0,Jo=function(){function e(e,t,n,i,o){if(this._changeDetectorRef=e,this._elementRef=t,this._dateAdapter=i,this._formField=o,this.id="mat-date-range-input-"+Zo++,this.focused=!1,this.controlType="gipi-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="–",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new ie.Subject,!i)throw so("DateAdapter");this.ngControl=n}var n;return n=e,Object.defineProperty(e.prototype,"value",{get:function(){return this._model?this._model.selection:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){var e=this._startInput?this._startInput._getPlaceholder():"",t=this._endInput?this._endInput._getPlaceholder():"";return e||t?e+" "+this.separator+" "+t:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rangePicker",{get:function(){return this._rangePicker},set:function(e){e&&(this._model=e._registerInput(this),this._rangePicker=e,this._registerModel(this._model))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return!!this._required},set:function(e){this._required=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(e){this._dateFilter=e,this._revalidate()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._min)||(this._min=t,this._revalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._max)||(this._max=t,this._revalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled},set:function(e){var t=le.coerceBooleanProperty(e);t!==this._groupDisabled&&(this._groupDisabled=t,this.stateChanges.next(void 0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){var e=!!this._startInput&&this._startInput.isEmpty(),t=!!this._endInput&&this._endInput.isEmpty();return e&&t},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this._ariaDescribedBy=e.length?e.join(" "):null},e.prototype.onContainerClick=function(){this.focused||this.disabled||(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())},e.prototype.ngAfterContentInit=function(){var e=this;if(!this._startInput)throw Error("mat-date-range-input must contain a matStartDate input");if(!this._endInput)throw Error("mat-date-range-input must contain a matEndDate input");this._model&&this._registerModel(this._model),ie.merge(this._startInput.stateChanges,this._endInput.stateChanges).subscribe((function(){e.stateChanges.next(void 0)}))},e.prototype.ngOnChanges=function(e){Po(e,this._dateAdapter)&&this.stateChanges.next(void 0)},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.getStartValue=function(){return this.value?this.value.start:null},e.prototype.getThemePalette=function(){return this._formField?this._formField.color:void 0},e.prototype.getConnectedOverlayOrigin=function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef},e.prototype._getInputMirrorValue=function(){return this._startInput?this._startInput.getMirrorValue():""},e.prototype._shouldHidePlaceholders=function(){return!!this._startInput&&!this._startInput.isEmpty()},e.prototype._handleChildValueChange=function(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()},e.prototype._openDatepicker=function(){this._rangePicker&&this._rangePicker.open()},e.prototype._shouldHideSeparator=function(){return(!this._formField||this._formField._hideControlPlaceholder())&&this.empty},e.prototype._getAriaLabelledby=function(){var e=this._formField;return e&&e._hasFloatingLabel()?e._labelId:null},e.prototype._revalidate=function(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()},e.prototype._registerModel=function(e){this._startInput&&this._startInput._registerModel(e),this._endInput&&this._endInput._registerModel(e)},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:t.ElementRef},{type:r.ControlContainer,decorators:[{type:t.Optional},{type:t.Self}]},{type:Ji,decorators:[{type:t.Optional}]},{type:T.MatFormField,decorators:[{type:t.Optional},{type:t.Inject,args:[Ko]}]}]},_e([t.Input(),Ce("design:type",Go),Ce("design:paramtypes",[Go])],e.prototype,"rangePicker",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"required",null),_e([t.Input(),Ce("design:type",Function),Ce("design:paramtypes",[Function])],e.prototype,"dateFilter",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],e.prototype,"min",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],e.prototype,"max",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",Object)],e.prototype,"separator",void 0),_e([t.Input(),Ce("design:type",Object)],e.prototype,"comparisonStart",void 0),_e([t.Input(),Ce("design:type",Object)],e.prototype,"comparisonEnd",void 0),_e([t.ContentChild(Mo,{static:!0}),Ce("design:type",Mo)],e.prototype,"_startInput",void 0),_e([t.ContentChild(Fo,{static:!0}),Ce("design:type",Fo)],e.prototype,"_endInput",void 0),e=n=_e([t.Component({selector:"gipi-mat-date-range-input",template:'<div class="mat-date-range-input-container"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)="focused = $event !== null">\n <div class="mat-date-range-input-start-wrapper">\n\n <ng-content select="input[gipiMatStartDate]"> </ng-content>\n\n <span class="mat-date-range-input-mirror"\n aria-hidden="true">\n {{_getInputMirrorValue()}}\n </span>\n </div>\n\n <span class="mat-date-range-input-separator"\n [class.mat-date-range-input-separator-hidden]="_shouldHideSeparator()">\n {{separator}}\n </span>\n\n <div class="mat-date-range-input-end-wrapper">\n <ng-content select="input[gipiMatEndDate]"> </ng-content>\n </div>\n</div>',exportAs:"gipiMatDateRangeInput",host:{class:"mat-date-range-input","[class.mat-date-range-input-hide-placeholders]":"_shouldHidePlaceholders()","[class.mat-date-range-input-required]":"required","[attr.id]":"null",role:"group","[attr.aria-labelledby]":"_getAriaLabelledby()","[attr.aria-describedby]":"_ariaDescribedBy","[attr.data-mat-calendar]":"rangePicker ? rangePicker.id : null"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[{provide:T.MatFormFieldControl,useExisting:n},{provide:Ro,useExisting:n}],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center;padding-bottom:3px}.mat-date-range-input-separator{transition:opacity .4s cubic-bezier(.25,.8,.25,1) .133s;margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::-ms-input-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner::placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner::-moz-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner:-ms-input-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-ms-input-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}"]}),we(2,t.Optional()),we(2,t.Self()),we(3,t.Optional()),we(4,t.Optional()),we(4,t.Inject(Ko)),Ce("design:paramtypes",[t.ChangeDetectorRef,t.ElementRef,r.ControlContainer,Ji,T.MatFormField])],e)}(),Qo=function(){function e(){}return e=_e([t.Directive({selector:"[gipiDatepickerToggleIcon]"})],e)}(),er=function(){function e(e,t,n){this._intl=e,this._changeDetectorRef=t,this._stateChanges=ie.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?this.datepicker.disabled:!!this._disabled},set:function(e){this._disabled=le.coerceBooleanProperty(e)},enumerable:!1,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._stateChanges:ie.of(),n=this.datepicker&&this.datepicker._datepickerInput?this.datepicker._datepickerInput.stateChanges:ie.of(),i=this.datepicker?ie.merge(this.datepicker.openedStream,this.datepicker.closedStream):ie.of();this._stateChanges.unsubscribe(),this._stateChanges=ie.merge(this._intl.changes,t,n,i).subscribe((function(){return e._changeDetectorRef.markForCheck()}))},e.ctorParameters=function(){return[{type:lo},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},_e([t.Input("for"),Ce("design:type",Uo)],e.prototype,"datepicker",void 0),_e([t.Input(),Ce("design:type",Number)],e.prototype,"tabIndex",void 0),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",Boolean)],e.prototype,"disableRipple",void 0),_e([t.ContentChild(Qo,{static:!0}),Ce("design:type",Qo)],e.prototype,"_customIcon",void 0),_e([t.ViewChild("button",{static:!0}),Ce("design:type",I.MatButton)],e.prototype,"_button",void 0),e=_e([t.Component({selector:"gipi-mat-datepicker-toggle",template:'<button #button\n mat-icon-button\n type="button"\n [attr.aria-haspopup]="datepicker ? \'dialog\' : null"\n [attr.aria-label]="_intl.openCalendarLabel"\n [attr.tabindex]="disabled ? -1 : tabIndex"\n [disabled]="disabled"\n [disableRipple]="disableRipple"\n (click)="_open($event)">\n\n <svg *ngIf="!_customIcon"\n class="mat-datepicker-toggle-default-icon"\n viewBox="0 0 24 24"\n width="24px"\n height="24px"\n fill="currentColor"\n focusable="false">\n <path\n d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z" />\n </svg>\n\n <ng-content select="[gipiMatDatepickerToggleIcon]"> </ng-content>\n</button>',host:{class:"mat-datepicker-toggle","[attr.tabindex]":"disabled ? null : -1","[class.mat-datepicker-toggle-active]":"datepicker && datepicker.opened","[class.mat-accent]":'datepicker && datepicker.color === "accent"',"[class.mat-warn]":'datepicker && datepicker.color === "warn"',"[attr.data-mat-calendar]":"datepicker ? datepicker.id : null","(focus)":"_button.focus()"},exportAs:"gipiMatDatepickerToggle",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}"]}),we(2,t.Attribute("tabindex")),Ce("design:paramtypes",[lo,t.ChangeDetectorRef,String])],e)}();try{Bo="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(e){Bo=!1}var tr,nr=function(){function e(e){this._platformId=e,this.isBrowser=this._platformId?i.isPlatformBrowser(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Bo)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return e=_e([we(0,t.Inject(t.PLATFORM_ID)),Ce("design:paramtypes",[Object])],e)}();try{tr="undefined"!=typeof Intl}catch(e){tr=!1}var ir={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},or=sr(31,(function(e){return String(e+1)})),rr={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},ar=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function sr(e,t){for(var n=Array(e),i=0;i<e;i++)n[i]=t(i);return n}var lr=function(e){function n(t,n){var i=e.call(this)||this;i._platformId=n,i.useUtcForDisplay=!0,e.prototype.setLocale.call(i,t);var o=new nr(i._platformId);return o?(i.useUtcForDisplay=!o.TRIDENT,i._clampDate=o.TRIDENT||o.EDGE):(i.useUtcForDisplay=!0,i._clampDate=!1),i}return be(n,e),n.prototype.getYear=function(e){return e.getFullYear()},n.prototype.getMonth=function(e){return e.getMonth()},n.prototype.getDate=function(e){return e.getDate()},n.prototype.getDayOfWeek=function(e){return e.getDay()},n.prototype.getMonthNames=function(e){var t=this;if(tr){var n=new Intl.DateTimeFormat(this.locale,{month:e,timeZone:"utc"});return sr(12,(function(e){return t._stripDirectionalityCharacters(t._format(n,new Date(2017,e,1)))}))}return ir[e]},n.prototype.getDateNames=function(){var e=this;if(tr){var t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return sr(31,(function(n){return e._stripDirectionalityCharacters(e._format(t,new Date(2017,0,n+1)))}))}return or},n.prototype.getDayOfWeekNames=function(e){var t=this;if(tr){var n=new Intl.DateTimeFormat(this.locale,{weekday:e,timeZone:"utc"});return sr(7,(function(e){return t._stripDirectionalityCharacters(t._format(n,new Date(2017,0,e+1)))}))}return rr[e]},n.prototype.getYearName=function(e){if(tr){var t=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(t,e))}return String(this.getYear(e))},n.prototype.getFirstDayOfWeek=function(){return 0},n.prototype.getNumDaysInMonth=function(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+1,0))},n.prototype.clone=function(e){return new Date(e.getTime())},n.prototype.createDate=function(e,t,n){if(t<0||t>11)throw Error('Invalid month index "'+t+'". Month index has to be between 0 and 11.');if(n<1)throw Error('Invalid date "'+n+'". Date has to be greater than 0.');var i=this._createDateWithOverflow(e,t,n);if(i.getMonth()!=t)throw Error('Invalid date "'+n+'" for month with index "'+t+'".');return i},n.prototype.today=function(){return new Date},n.prototype.parse=function(e){return"number"==typeof e?new Date(e):e?new Date(Date.parse(e)):null},n.prototype.format=function(e,t){if(!this.isValid(e))throw Error("NativeDateAdapter: Cannot format invalid date.");if(tr){this._clampDate&&(e.getFullYear()<1||e.getFullYear()>9999)&&(e=this.clone(e)).setFullYear(Math.max(1,Math.min(9999,e.getFullYear()))),t=xe(xe({},t),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,t);return this._stripDirectionalityCharacters(this._format(n,e))}return this._stripDirectionalityCharacters(e.toDateString())},n.prototype.addCalendarYears=function(e,t){return this.addCalendarMonths(e,12*t)},n.prototype.addCalendarMonths=function(e,t){var n=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+t,this.getDate(e));return this.getMonth(n)!=((this.getMonth(e)+t)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n},n.prototype.addCalendarDays=function(e,t){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+t)},n.prototype.toIso8601=function(e){return[e.getUTCFullYear(),this._2digit(e.getUTCMonth()+1),this._2digit(e.getUTCDate())].join("-")},n.prototype.deserialize=function(t){if("string"==typeof t){if(!t)return null;if(ar.test(t)){var n=new Date(t);if(this.isValid(n))return n}}return e.prototype.deserialize.call(this,t)},n.prototype.isDateInstance=function(e){return e instanceof Date},n.prototype.isValid=function(e){return!isNaN(e.getTime())},n.prototype.invalid=function(){return new Date(NaN)},n.prototype._createDateWithOverflow=function(e,t,n){var i=new Date;return i.setFullYear(e,t,n),i.setHours(0,0,0,0),i},n.prototype._2digit=function(e){return("00"+e).slice(-2)},n.prototype._stripDirectionalityCharacters=function(e){return e.replace(/[\u200e\u200f]/g,"")},n.prototype._format=function(e,t){var n=new Date;return n.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setUTCHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e.format(n)},n.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[Ki]}]},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]},n=_e([t.Injectable(),we(0,t.Optional()),we(0,t.Inject(Ki)),we(1,t.Inject(t.PLATFORM_ID)),Ce("design:paramtypes",[String,Object])],n)}(Ji),pr=function(){function e(){}return e.getBrowser=function(){for(var e=["MSIE","Firefox","Safari","Chrome","Opera"],t=navigator.userAgent,n=e.length-1;n>-1&&-1===t.indexOf(e[n]);n--);return e[n]},e}(),dr=he;e.nextUniqueId=0;var cr=function(){function n(t,n){this.elementRef=t,this._changeDetectorRef=n,this._name="gipi-date-range-"+e.nextUniqueId++,this.idStartDate=this._name+"-start",this.idEndDate=this._name+"-end",this.nameStartDate=this._name+"-start",this.nameEndDate=this._name+"-end",this.label="",this.placeholderStartDate="Inicial",this.placeholderEndDate="Final",this.help="",this.separator="-",this._customRangeLabel="Personalizado",this._maxRange=368,this._minDate=new Date("01/01/2000"),this._required=!1,this._readonly=!1,this._disabled=!1,this._dateFilter=null,this.onChange=function(){},this.onTouched=function(){}}var i;return i=n,Object.defineProperty(n.prototype,"startDate",{get:function(){return this._startDate},set:function(e){this._startDate=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"endDate",{get:function(){return this._endDate},set:function(e){this._endDate=e,this.value=new Qi(this.startDate,e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"customRangeLabel",{get:function(){return this._customRangeLabel},set:function(e){this._customRangeLabel=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ranges",{get:function(){return this._ranges},set:function(e){this._ranges=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxRange",{get:function(){return this._maxRange},set:function(e){this._maxRange=le.coerceNumberProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=e,this._minDate.setHours(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=e,this._maxDate.setHours(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"readonly",{get:function(){return this._readonly},set:function(e){this._readonly=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(e){this._dateFilter=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){var t=null,n=null;e&&e.start&&(t=dr(e.start).startOf("day").toDate()),e&&e.end&&(n=dr(e.end).endOf("day").toDate()),t&&n&&(this._value=new Qi(t,n),this.onChange(this._value),this.onTouched(this._value))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"formattedValue",{get:function(){return""},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.ngOnDestroy=function(){},n.prototype.writeValue=function(e){e&&e.start?this.startDate=dr(e.start).startOf("day").toDate():this.startDate=null,e&&e.end?this.endDate=dr(e.end).endOf("day").toDate():this.endDate=null,this._changeDetectorRef.detectChanges()},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.onInputContentClick=function(e){this.readonly&&this.matDatepickerToggleRef&&this.matDatepickerToggleRef._open(e)},n.prototype.generatedStartDate=function(e,t){if(t||"Firefox"!==pr.getBrowser()){var n=!1;!e.includes("/")||t&&10!==e.length?e.includes("/")||t&&8!==e.length||(this.startDate=dr(e,"DDMMYYYY").toDate(),n=!0):(this.startDate=dr(e,"DD/MM/YYYY").toDate(),n=!0),"Firefox"!==pr.getBrowser()?n&&!$i.isValid(this.startDate)&&(this.startDate=void 0):n&&!this.startDate&&(this.startDate=void 0)}},n.prototype.generatedEndDate=function(e,t){if(t||"Firefox"!==pr.getBrowser()){var n=!1;!e.includes("/")||t&&10!==e.length?e.includes("/")||t&&8!==e.length||(this.endDate=dr(e,"DDMMYYYY").toDate(),n=!0):(this.endDate=dr(e,"DD/MM/YYYY").toDate(),n=!0),"Firefox"!==pr.getBrowser()?n&&!$i.isValid(this.endDate)&&(this.endDate=void 0):n&&!this.endDate&&(this.endDate=void 0)}},n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef}]},_e([t.ViewChild(er,{static:!0}),Ce("design:type",er)],n.prototype,"matDatepickerToggleRef",void 0),_e([t.Input("idStart"),Ce("design:type",String)],n.prototype,"idStartDate",void 0),_e([t.Input("idEnd"),Ce("design:type",String)],n.prototype,"idEndDate",void 0),_e([t.Input("nameStart"),Ce("design:type",String)],n.prototype,"nameStartDate",void 0),_e([t.Input("nameEnd"),Ce("design:type",String)],n.prototype,"nameEndDate",void 0),_e([t.Input(),Ce("design:type",String)],n.prototype,"label",void 0),_e([t.Input("placeholderStart"),Ce("design:type",String)],n.prototype,"placeholderStartDate",void 0),_e([t.Input("placeholderEnd"),Ce("design:type",String)],n.prototype,"placeholderEndDate",void 0),_e([t.Input(),Ce("design:type",String)],n.prototype,"help",void 0),_e([t.Input(),Ce("design:type",String)],n.prototype,"separator",void 0),_e([t.Input(),Ce("design:type",String),Ce("design:paramtypes",[String])],n.prototype,"customRangeLabel",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],n.prototype,"ranges",null),_e([t.Input(),Ce("design:type",Number),Ce("design:paramtypes",[Number])],n.prototype,"maxRange",null),_e([t.Input("min"),Ce("design:type",Date),Ce("design:paramtypes",[Date])],n.prototype,"minDate",null),_e([t.Input("max"),Ce("design:type",Date),Ce("design:paramtypes",[Date])],n.prototype,"maxDate",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],n.prototype,"required",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],n.prototype,"readonly",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],n.prototype,"disabled",null),_e([t.Input(),Ce("design:type",Function),Ce("design:paramtypes",[Function])],n.prototype,"dateFilter",null),_e([t.Input(),Ce("design:type",Qi),Ce("design:paramtypes",[Qi])],n.prototype,"value",null),n=i=_e([t.Component({selector:"gipi-date-range-picker",exportAs:"gipiDateRangePicker",template:'<div class="input-wrapper">\n\n <label *ngIf="label"\n class="input-label"\n [attr.for]="\'dateRangeInput\'">\n {{ label }}\n <span *ngIf="required"> * </span>\n </label>\n\n <div class="input-content"\n (click)="onInputContentClick($event)">\n <gipi-mat-date-range-input #matDateRangeInput\n id="dateRangeInput"\n [min]="minDate"\n [max]="maxDate"\n [disabled]="disabled"\n [required]="required"\n [separator]="separator"\n [rangePicker]="rangepicker">\n <input gipiMatStartDate\n class="input-element"\n [attr.id]="idStartDate"\n [attr.name]="nameStartDate"\n [placeholder]="placeholderStartDate"\n [disabled]="disabled"\n [required]="required"\n [readOnly]="readonly"\n [autocomplete]="\'off\'"\n [autofocus]="false"\n [maxlength]="10"\n [(ngModel)]="startDate"\n (keyup)="generatedStartDate($event.target.value, true)"\n (change)="generatedStartDate($event.target.value, false)" />\n\n <input gipiMatEndDate\n class="input-element"\n [attr.id]="idEndDate"\n [attr.name]="nameEndDate"\n [placeholder]="placeholderEndDate"\n [disabled]="disabled"\n [required]="required"\n [readOnly]="readonly"\n [autocomplete]="\'off\'"\n [autofocus]="false"\n [maxlength]="10"\n [(ngModel)]="endDate"\n (keyup)="generatedEndDate($event.target.value, true)"\n (change)="generatedEndDate($event.target.value, false)" />\n </gipi-mat-date-range-input>\n\n <div class="suffix">\n <gipi-mat-datepicker-toggle matSuffix\n [for]="rangepicker">\n </gipi-mat-datepicker-toggle>\n </div>\n </div>\n\n <small *ngIf="help"\n class="input-help">\n {{ help }}\n </small>\n</div>\n\n<gipi-mat-date-range-picker #rangepicker\n [maxRange]="maxRange"\n [templatePresetRange]="templatePresetRange">\n</gipi-mat-date-range-picker>\n\n<ng-template #templatePresetRange\n let-component>\n <gipi-preset-range [matDateRangeInput]="matDateRangeInput"\n [matCalendar]="component"\n [matDateRangePicker]="rangepicker"\n [customRangeLabel]="\'Personalizado\'"\n [maxRange]="maxRange"\n [ranges]="ranges">\n </gipi-preset-range>\n</ng-template>\n',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return i})),multi:!0}],host:{class:"gipi-date-range-picker"},styles:[":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::ng-deep .mat-date-range-input{height:4rem!important;padding-left:.8rem!important}::ng-deep .mat-date-range-input-container,::ng-deep .mat-date-range-input-end-wrapper,::ng-deep .mat-date-range-input-inner,::ng-deep .mat-date-range-input-start-wrapper{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:100%;min-height:100%;height:100%;padding-bottom:3px}::ng-deep .mat-date-range-input-end-wrapper{padding-bottom:0!important}::ng-deep .mat-date-range-input-inner{padding:0!important}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]}),Ce("design:paramtypes",[t.ElementRef,t.ChangeDetectorRef])],n)}(),ur=function(){function e(e){this._dateAdapter=e}return e.prototype.selectionFinished=function(e,t){var n=t.start,i=t.end;if(null==n)n=e;else if(null==i&&e&&this._dateAdapter.compareDate(e,n)>=0){var o=this._dateAdapter.addCalendarDays(n,this.delta-1);i=e>o?o:e}else n=e,i=null;return new Qi(n,i)},e.prototype.createPreview=function(e,t){if(t.start&&!t.end){var n=this._dateAdapter.addCalendarDays(t.start,this.delta-1),i=e?e>n?n:e:null;return new Qi(t.start,i)}return new Qi(null,null)},e.ctorParameters=function(){return[{type:Ji}]},e=_e([t.Injectable(),Ce("design:paramtypes",[Ji])],e)}(),hr=function(){function e(e){this.maxRangeStrategy=e}return Object.defineProperty(e.prototype,"maxRange",{set:function(e){this.maxRangeStrategy.delta=+e||365},enumerable:!1,configurable:!0}),e.ctorParameters=function(){return[{type:ur,decorators:[{type:t.Inject,args:[fo]}]}]},_e([t.Input(),Ce("design:type",Number),Ce("design:paramtypes",[Number])],e.prototype,"maxRange",null),e=_e([t.Directive({selector:"[maxRange]",providers:[{provide:fo,useClass:ur}]}),we(0,t.Inject(fo)),Ce("design:paramtypes",[ur])],e)}(),gr=he,mr=function(){function e(e){this._changeDetectorRef=e,this._destroy$=new ie.Subject,this.rangesArray=[],this.selectedRange="",this.matDateRangeInput=null,this.matCalendar=null,this.matDateRangePicker=null,this._customRangeLabel="Personalizado"}var n;return n=e,Object.defineProperty(e.prototype,"customRangeLabel",{get:function(){return this._customRangeLabel},set:function(e){this._customRangeLabel=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ranges",{get:function(){return this._ranges},set:function(e){this._ranges=e,this._renderRanges()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxRange",{get:function(){return this._maxRange},set:function(e){this._maxRange=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_startDate",{get:function(){return this.matCalendar.selected.start},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_endDate",{get:function(){return this.matCalendar.selected.end},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_minDate",{get:function(){return this.matCalendar.minDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_maxDate",{get:function(){return this.matCalendar.maxDate},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.matCalendar.stateChanges.pipe(oe.takeUntil(this._destroy$)).subscribe((function(){e._loadSelectedRange(),e._changeDetectorRef.markForCheck()})),this._loadSelectedRange()},e.prototype.ngOnDestroy=function(){this._destroy$.next()},e.prototype._renderRanges=function(){var e,t;if("object"==typeof this.ranges){for(var n in this.ranges)if(this.ranges[n]){e=(this.ranges[n][0],gr(this.ranges[n][0])),t=(this.ranges[n][1],gr(this.ranges[n][1]));var i=gr(this._minDate).clone(),o=gr(this._maxDate).clone();if(i.isValid()&&e.isBefore(i)&&(e=i.clone()),o.isValid()&&e.clone().add(this.maxRange-1,"days").isAfter(o)&&(o=e),o.isValid()&&t.isAfter(o)&&(t=o.clone()),i&&t.isBefore(i,"day")||o&&e.isAfter(o,"day"))continue;this.ranges[n]=[e,t]}for(var n in this.ranges)this.ranges[n]&&this.rangesArray.push(n)}this._loadSelectedRange()},e.prototype._loadSelectedRange=function(){var e=!0,t=0;if(this.rangesArray.length>0){var n=gr(this._startDate).startOf("day"),i=gr(this._endDate).startOf("day");for(var o in this.ranges)if(this.ranges[o]){var r=this.ranges[o][0].startOf("day"),a=this.ranges[o][1].startOf("day");if(n.isSame(r)&&i.isSame(a)){e=!1,this.selectedRange=this.rangesArray[t];break}t++}e&&(this.selectedRange=this.customRangeLabel)}else this.selectedRange=this.customRangeLabel},e.prototype._calculateDateRange=function(e){var t=this._minDate?gr(this._minDate):null,n=this._maxDate?gr(this._maxDate):null,i=Oe([this.ranges[e][0],this.ranges[e][1]],2),o=i[0],r=i[1],a=null,s=null;if(a=t&&o.isBefore(t)?t.clone():o.clone(),s=n&&r.isAfter(n)?n.clone():r.clone(),e===this.customRangeLabel){var l=this.matCalendar.selected;a=l.start,s=l.end}return[this._getValidDateOrNull(a.toDate()),this._getValidDateOrNull(s.toDate())]},e.prototype._getValidDateOrNull=function(e){return this._isDateInstance(e)&&this._isValid(e)?e:null},e.prototype._isDateInstance=function(e){return e instanceof Date},e.prototype._isValid=function(e){return!isNaN(e.getTime())},e.prototype.clickRange=function(e,t){if(t!==this.customRangeLabel){var n=Oe(this._calculateDateRange(t),2),i=n[0],o=n[1];this.matDateRangePicker.select(i),this.matDateRangePicker.select(o),this.matDateRangePicker.close()}},e.prototype.isDisableRange=function(e){var t=this;if(e===this._customRangeLabel)return!1;var n=this._ranges[e],i=n.every((function(e){var n=gr(t.matCalendar.minDate);return!!n&&gr(e).isBefore(n)})),o=n.every((function(e){var n=gr(t.matCalendar.maxDate);return!!n&&gr(e).isAfter(n)}));return i||o},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},_e([t.Input(),Ce("design:type",Jo)],e.prototype,"matDateRangeInput",void 0),_e([t.Input(),Ce("design:type",Eo)],e.prototype,"matCalendar",void 0),_e([t.Input(),Ce("design:type",Go)],e.prototype,"matDateRangePicker",void 0),_e([t.Input(),Ce("design:type",String),Ce("design:paramtypes",[String])],e.prototype,"customRangeLabel",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],e.prototype,"ranges",null),_e([t.Input(),Ce("design:type",Number),Ce("design:paramtypes",[Number])],e.prototype,"maxRange",null),e=n=_e([t.Component({selector:"gipi-preset-range",template:'<div class="preset-range-wrapper">\n <button *ngFor="let range of rangesArray"\n class="preset-range-btn"\n [class.selected]="range === selectedRange"\n [disabled]="isDisableRange(range)"\n (click)="clickRange($event, range)">\n {{ range }}\n </button>\n <button class="preset-range-btn"\n [disabled]="isDisableRange(customRangeLabel)"\n [class.selected]="selectedRange === customRangeLabel">\n {{ customRangeLabel }}\n </button>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}],host:{class:"gipi-preset-range"},styles:[".preset-range-wrapper{display:flex;flex-direction:column;padding:.9rem;height:100%;background:#f0f0f0;border-top-left-radius:.6rem;border-bottom-left-radius:.6rem}.preset-range-btn{display:flex;align-items:center;justify-content:flex-start;padding:.8rem;height:3.6rem;border-radius:.6rem;background-color:transparent;outline:0;cursor:pointer;color:#595959;border:none;transition:.2s}.preset-range-btn.selected{background-color:#e0313e;color:#fff}.preset-range-btn.selected:hover{background-color:#9f232c}.preset-range-btn:hover{background-color:#e0313e;color:#fff}"]}),Ce("design:paramtypes",[t.ChangeDetectorRef])],e)}(),fr=he,yr=0,vr=function(){function e(e,t){this.elementRef=e,this._changeDetectorRef=t,this._name="gipi-date-range-"+yr++,this.id=this._name+"-date",this.name=this._name+"-date",this.label="",this.placeholder="__/__/____",this.help="",this._minDate=new Date("01/01/2000"),this._required=!1,this._readonly=!1,this._disabled=!1,this._dateFilter=null,this.onChange=function(){},this.onTouched=function(){}}var n;return n=e,Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=e,ze.isNull(e)||this._minDate.setHours(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=e,ze.isNull(e)||this._maxDate.setHours(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this._required},set:function(e){this._required=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readonly",{get:function(){return this._readonly},set:function(e){this._readonly=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(e){this._dateFilter=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,this.onChange(this._value),this.onTouched(this._value)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"formattedValue",{get:function(){return""},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){},e.prototype.writeValue=function(e){this.value=e,this._changeDetectorRef.detectChanges()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck()},e.prototype.onInputContentClick=function(e){this.readonly&&this.matDatepickerToggleRef},e.prototype.generatedDate=function(e,t){if(t||"Firefox"!==pr.getBrowser()){var n=!1;!e.includes("/")||t&&10!==e.length?e.includes("/")||t&&8!==e.length||(this.value=fr(e,"DDMMYYYY").toDate(),n=!0):(this.value=fr(e,"DD/MM/YYYY").toDate(),n=!0),"Firefox"!==pr.getBrowser()?n&&!$i.isValid(this.value)&&(this.value=void 0):n&&!this.value&&(this.value=void 0)}},e.prototype.validateMinAndMaxDate=function(e){var t=fr(e,"DD/MM/YYYY").toDate();$i.isLessThan(t,this.minDate)?this.value=void 0:this.maxDate&&(this.value=$i.isGreaterThan(t,this.maxDate)?void 0:t)},e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef}]},_e([t.ViewChild(er,{static:!0}),Ce("design:type",er)],e.prototype,"matDatepickerToggleRef",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"id",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"name",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"label",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"placeholder",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"help",void 0),_e([t.Input("min"),Ce("design:type",Date),Ce("design:paramtypes",[Date])],e.prototype,"minDate",null),_e([t.Input("max"),Ce("design:type",Date),Ce("design:paramtypes",[Date])],e.prototype,"maxDate",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"required",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"readonly",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",Function),Ce("design:paramtypes",[Function])],e.prototype,"dateFilter",null),_e([t.Input(),Ce("design:type",Date),Ce("design:paramtypes",[Date])],e.prototype,"value",null),e=n=_e([t.Component({selector:"gipi-datepicker",exportAs:"gipiDatePicker",template:'<div class="input-wrapper">\n\n <label *ngIf="label"\n class="input-label"\n [attr.for]="id">\n {{ label }}\n <span *ngIf="required"> * </span>\n </label>\n\n <div class="input-content"\n (click)="onInputContentClick($event)">\n <input matInput\n class="input-element"\n type="text"\n [attr.id]="id"\n [attr.name]="name"\n [gipiMatDatepicker]="picker"\n [min]="minDate"\n [max]="maxDate"\n [maxlength]="10"\n [placeholder]="placeholder"\n [disabled]="disabled"\n [required]="required"\n [readOnly]="readonly"\n [autocomplete]="\'off\'"\n [autofocus]="false"\n [(ngModel)]="value"\n (keyup)="generatedDate($event.target.value, true)"\n (change)="generatedDate($event.target.value, false)"\n (blur)="validateMinAndMaxDate($event.target.value)" />\n\n <div class="suffix">\n <gipi-mat-datepicker-toggle [for]="picker"> </gipi-mat-datepicker-toggle>\n </div>\n </div>\n\n <small *ngIf="help"\n class="input-help">\n {{ help }}\n </small>\n</div>\n\n<gipi-mat-datepicker #picker> </gipi-mat-datepicker>',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}],host:{class:"gipi-datepicker"},styles:[":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]}),Ce("design:paramtypes",[t.ElementRef,t.ChangeDetectorRef])],e)}(),br={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},xr=function(){function e(){}return e=_e([t.NgModule({imports:[i.CommonModule,I.MatButtonModule,P.MatDialogModule,ue.OverlayModule,m.A11yModule,y.PortalModule,r.FormsModule,r.ReactiveFormsModule,de.PlatformModule,a.MatNativeDateModule],exports:[v.ScrollingModule,r.FormsModule,r.ReactiveFormsModule,de.PlatformModule,Eo,co,qo,Ho,Xo,er,Qo,xo,So,_o,Oo,Jo,Mo,Fo,Go,hr,mr,cr,vr],declarations:[Eo,co,qo,Ho,Xo,er,Qo,xo,So,_o,Oo,Jo,Mo,Fo,Go,hr,mr,cr,vr],providers:[lo,zo,{provide:Ji,useClass:lr,deps:[Ki]},{provide:Ki,useValue:"pt-BR"},{provide:Re,useValue:br}],entryComponents:[Ho]})],e)}(),_r=he,wr=function(){function e(e){this._changeDetectorRef=e,this._subscriptions=new ie.Subscription,this._animationState="enter",this._animationDone=new ie.Subject,this.years=[],this.months=[],this._calendarView="both"}var n;return n=e,e.prototype.ngOnInit=function(){this._locale?_r.locale(this._locale):_r.locale("pt-br"),this.months=ke(this.monthYearPicker.model.months),this._calendarView=this.monthYearPicker.calendarView,"year"===this._calendarView&&this.toggleShowYears(),this.monthYearPicker.onValueChange(this.monthYearPicker.model.selectedMonthIndex,this.monthYearPicker.model.selectedMonthYear)},e.prototype.ngAfterViewInit=function(){var e=this;this._changeDetectorRef&&this._subscriptions.add(this.monthYearPicker._stateChanges.subscribe((function(){e._changeDetectorRef.markForCheck()})))},e.prototype.ngOnDestroy=function(){this._subscriptions.unsubscribe(),this._animationDone.complete()},e.prototype._startExitAnimation=function(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()},e.prototype.decrement=function(){this.monthYearPicker.model.decrementYear(),this.isShowYears&&this._renderYears()},e.prototype.increment=function(){this.monthYearPicker.model.incrementYear(),this.isShowYears&&this._renderYears()},e.prototype.selectMonth=function(e){this.monthYearPicker.model.selectMonth(e),this.monthYearPicker.onValueChange(this.monthYearPicker.model.selectedMonthIndex,this.monthYearPicker.model.selectedMonthYear),this.monthYearPicker.close()},e.prototype.isSelectedMonth=function(e){return this.monthYearPicker.model.selectedMonthIndex==e&&this.monthYearPicker.model.selectedMonthYear==this.monthYearPicker.model.selectedYearMoment.year()},e.prototype.isCurrentMonth=function(e){var t=_r().month(),n=_r().year();return e===t&&this.monthYearPicker.model.selectedYearMoment.year()===n},e.prototype.isDisabledMonth=function(e){var t=!1;if(!ze.isNull(this.monthYearPicker)){var n=ze.isNull(this.monthYearPicker.min)?null:this.monthYearPicker.min.month,i=ze.isNull(this.monthYearPicker.max)?null:this.monthYearPicker.max.month;ze.isNull(n)||ze.isNull(i)?ze.isNull(n)?ze.isNull(i)||(t=e>i):t=e<n:t=e<n||e>i}return t},e.prototype.toggleShowYears=function(){this.isShowYears=!this.isShowYears,this._renderYears()},e.prototype._renderYears=function(){this.years=[];for(var e=11;e>0;e--)this.years.push(this.monthYearPicker.model.selectedYearMoment.year()-e);for(e=0;e<=12;e++)this.years.push(this.monthYearPicker.model.selectedYearMoment.year()+e)},Object.defineProperty(e.prototype,"periodButtonLabel",{get:function(){var e,t;return this.isShowYears?(e=this.years[0],t=this.years[this.years.length-1],e+" – "+t):this.monthYearPicker.model.selectedYearText},enumerable:!1,configurable:!0}),e.prototype.selectYear=function(e){"both"===this._calendarView&&(this.isShowYears=!1),this.monthYearPicker.model.selectedYearMoment=_r().year(e),this.monthYearPicker.model.updateYearText(),"year"===this._calendarView&&(this.monthYearPicker.onValueChange(this.monthYearPicker.model.selectedMonthIndex,e),this.monthYearPicker.close())},e.prototype.isSelectedYear=function(e){return this.monthYearPicker.model.selectedYearMoment.year()===e},e.prototype.isCurrentYear=function(e){return _r().year()===e},e.prototype.isDisabledYear=function(e){var t=!1;if(!ze.isNull(this.monthYearPicker)){var n=ze.isNull(this.monthYearPicker.min)?null:this.monthYearPicker.min.year,i=ze.isNull(this.monthYearPicker.max)?null:this.monthYearPicker.max.year;ze.isNull(n)||ze.isNull(i)?ze.isNull(n)?ze.isNull(i)||(t=e>i):t=e<n:t=e<n||e>i}return t},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e=n=_e([t.Component({selector:"gipi-calendar-month-year",exportAs:"gipiMonthYearPicker",template:'<div class="month-picker">\n <div class="card-header">\n <button class="month-btn btn-control"\n [class.fixed]="(_calendarView === \'year\')"\n (click)="(_calendarView === \'both\') ? toggleShowYears() : null">\n {{ periodButtonLabel }}\n\n <div *ngIf="(_calendarView === \'both\')"\n class="btn-icon-arrow"\n [class.icon-arrow-invert]="isShowYears">\n </div>\n </button>\n\n <div class="card-prev-next">\n <button class="month-btn btn-decrement"\n (click)="decrement()">\n <mat-icon> chevron_left </mat-icon>\n </button>\n\n <button class="month-btn btn-increment"\n (click)="increment()">\n <mat-icon> chevron_right </mat-icon>\n </button>\n </div>\n </div>\n\n <div class="card-body">\n <ng-container *ngIf="!isShowYears && (_calendarView === \'both\')">\n <div *ngFor="let month of months; let i = index">\n <button class="month-btn btn-block"\n [class.selected]="isSelectedMonth(i)"\n [class.current]="isCurrentMonth(i)"\n [disabled]="isDisabledMonth(i)"\n (click)="selectMonth(i)">\n {{ month }}\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf="isShowYears && ((_calendarView === \'both\') || (_calendarView === \'year\'))">\n <div *ngFor="let year of years; let i = index">\n <button class="month-btn btn-block"\n [class.selected]="isSelectedYear(year)"\n [class.current]="isCurrentYear(year)"\n [disabled]="isDisabledYear(year)"\n (click)="selectYear(year)">\n {{ year }}\n </button>\n </div>\n </ng-container>\n </div>\n</div>',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}],animations:[ge.matDatepickerAnimations.transformPanel,ge.matDatepickerAnimations.fadeInCalendar],host:{class:"gipi-calendar-month-year","[@transformPanel]":"_animationState","(@transformPanel.done)":"_animationDone.next()"},styles:[".month-picker{display:flex;flex-direction:column;border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);background-color:#fff;color:rgba(0,0,0,.87);padding:1rem;width:30rem;height:36.5rem}.month-picker .card-header{display:flex;justify-content:space-between;gap:1rem;padding-bottom:2rem;border-bottom:1px solid #595959}.month-picker .card-header .card-prev-next{display:flex;gap:1rem;align-items:center}.month-picker .card-body{display:-ms-grid;display:grid;-ms-grid-rows:(1fr)[6];grid-template-rows:repeat(6,1fr);-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr);grid-auto-flow:row dense;gap:.6rem;padding-top:1.6rem}.month-btn{display:flex;align-items:center;justify-content:center;gap:.4rem;border-radius:4px;outline:0;border:1px solid transparent;padding:1rem;cursor:pointer;background-color:transparent;transition:.2s;text-transform:uppercase;color:#595959}.month-btn>mat-icon{font-size:2rem;width:2rem;height:2rem;line-height:2rem}.month-btn:not(:disabled).btn-control{height:3.6rem;font-weight:700}.month-btn:not(:disabled).btn-control.fixed{cursor:default}.month-btn:not(:disabled).btn-control:not(.fixed):hover{background-color:#f0f0f0}.month-btn:not(:disabled).btn-decrement,.month-btn:not(:disabled).btn-increment{width:3.6rem;height:3.6rem;background-color:#e0313e;color:#fff}.month-btn:not(:disabled).btn-decrement:hover,.month-btn:not(:disabled).btn-increment:hover{background-color:#cc2d38}.month-btn:not(:disabled).btn-block{width:96%;height:96%;background-color:#f0f0f0;color:#595959;border-radius:.6rem;max-height:3.5rem}.month-btn:not(:disabled).btn-block:hover,.month-btn:not(:disabled).selected{background-color:#e0313e;color:#fff}.month-btn:not(:disabled).selected.current{box-shadow:inset 0 0 0 1px #fff!important}.month-btn:not(:disabled).current{box-shadow:inset 0 0 0 1px #e0313e!important}.month-btn:disabled{cursor:not-allowed;opacity:.6;color:#9a9da2}.btn-icon-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:solid transparent;border-top-width:5PX;border-top-style:solid;margin:0 0 0 5PX;vertical-align:middle}.btn-icon-arrow.icon-arrow-invert{transform:rotate(180deg)}"]}),Ce("design:paramtypes",[t.ChangeDetectorRef])],e)}(),Cr=he,Ir=new t.InjectionToken("gipi-month-year-scroll-strategy");function Sr(e){return function(){return e.scrollStrategies.reposition()}}var Er,Or={provide:Ir,deps:[ue.Overlay],useFactory:Sr},kr=function(){function e(e,t){this._month=e,this._year=t}return Object.defineProperty(e.prototype,"date",{get:function(){return Cr().day(1).month(this.month).year(this.year).startOf("day").toDate()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"month",{get:function(){return this._month},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"year",{get:function(){return this._year},enumerable:!1,configurable:!0}),e}(),Dr=function(){function e(){this.months=[],this.selectedYearMoment=Cr(),this.updateYearText(),this.selectedMonthMoment=Cr(),this.months=["Jan.","Fev.","Mar.","Abr.","Mai.","Jun.","Jul.","Ago.","Set.","Out.","Nov.","Dez."],this.selectedMonthIndex=this.selectedMonthMoment.month(),this.selectedMonthYear=this.selectedYearMoment.year()}return e.prototype.updateYearText=function(){this.selectedYearText=ze.isNull(Cr)?"":Cr(this.selectedYearMoment).format("YYYY")},e.prototype.selectMonth=function(e){this.selectedMonthMoment=Cr().month(e),this.selectedMonthIndex=this.selectedMonthMoment.month(),this.selectedMonthYear=this.selectedYearMoment.year()},e.prototype.incrementYear=function(){this.selectedYearMoment=this.selectedYearMoment.add(1,"year"),this.updateYearText()},e.prototype.decrementYear=function(){this.selectedYearMoment=this.selectedYearMoment.subtract(1,"year"),this.updateYearText()},e}(),Pr=0,Rr=function(){function e(e,n,i,o,r,a,s,l){this.elementRef=e,this._changeDetectorRef=n,this._overlay=i,this._ngZone=o,this._viewContainerRef=r,this._dir=s,this._document=l,this._name="gipi-date-range-"+Pr++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=this._name+"-backdrop",this._stateChanges=new ie.Subject,this.valueLabel="",this.id=this._name+"-date",this.name=this._name+"-date",this.label="",this.placeholder="",this.help="",this.xPosition="start",this.yPosition="below",this.calendarView="both",this._opened=!1,this._required=!1,this._disabled=!1,this._min=null,this._max=null,this.openedStream=new t.EventEmitter,this.closedStream=new t.EventEmitter,this.onChange=function(){},this.onTouched=function(){},this._scrollStrategy=a}var n;return n=e,Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){le.coerceBooleanProperty(e)?this.open():this.close()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this._required},set:function(e){this._required=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){this._min=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._max=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){var t=e;if(e||(t=null),t)switch(this.calendarView){case"both":this.valueLabel=Cr(t.date).format("MM/YYYY");break;case"year":this.valueLabel=Cr(t.date).format("YYYY");break;default:this.valueLabel=Cr(t.date).format("MM/YYYY")}this._value=t,this.onChange(this._value),this.onTouched(this._value)},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.model=new Dr,this.year&&(this.model.selectedYearMoment=Cr().year(this.year)),this.month&&(this.model.selectedMonthIndex=this.month,this.model.selectedMonthMoment=Cr().month(this.month),this.year&&(this.model.selectedMonthYear=this.year)),this.model.updateYearText(),ze.isNull(this.month)&&ze.isNull(this.year)?(this.value=null,this._changeDetectorRef.detectChanges()):this.onValueChange(this.model.selectedMonthIndex,this.model.selectedMonthYear)},e.prototype.ngOnChanges=function(e){var t=e.xPosition||e.yPosition;t&&!t.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)},e.prototype.ngOnDestroy=function(){this._destroyPopup(),this.close(),this._stateChanges.complete()},e.prototype.writeValue=function(e){this.value=e,this._changeDetectorRef.detectChanges()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck()},e.prototype.onValueChange=function(e,t){var n=new kr(e,t);this.value=n,this._changeDetectorRef.detectChanges()},e.prototype.open=function(){if(!this._opened&&!this.disabled){if(!this.inputMonthYearContentRef)throw Error("Attempted to open an MonthYearPicker 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){if(this._popupComponentRef&&this._popupRef){var t=this._popupComponentRef.instance;t._startExitAnimation(),t._animationDone.pipe(oe.take(1)).subscribe((function(){return e._destroyPopup()}))}var n=function(){e._opened&&(e._opened=!1,e.closedStream.emit(),e._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}},e.prototype._openAsPopup=function(){var e=this,t=new y.ComponentPortal(wr,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(t),this._popupComponentRef.instance.monthYearPicker=this,this._ngZone.onStable.pipe(oe.take(1)).subscribe((function(){e._popupRef.updatePosition()}))},e.prototype._getConnectedOverlayOrigin=function(){return this.inputMonthYearContentRef?this.inputMonthYearContentRef:this.elementRef},e.prototype._createPopup=function(){var e=this,t=this._overlay.position().flexibleConnectedTo(this._getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new ue.OverlayConfig({positionStrategy:this._setConnectedPositions(t),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir||"ltr",scrollStrategy:this._scrollStrategy(),panelClass:"mat-month-year-picker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),ie.merge(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(oe.filter((function(t){return t.keyCode===se.ESCAPE||e.inputMonthYearContentRef&&t.altKey&&t.keyCode===se.UP_ARROW})))).subscribe((function(t){t&&t.preventDefault(),e.close()}))},e.prototype._destroyPopup=function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)},e.prototype._setConnectedPositions=function(e){var t="end"===this.xPosition?"end":"start",n="start"===t?"end":"start",i="above"===this.yPosition?"bottom":"top",o="top"===i?"bottom":"top";return e.withPositions([{originX:t,originY:o,overlayX:t,overlayY:i},{originX:t,originY:i,overlayX:t,overlayY:o},{originX:n,originY:o,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:o}])},e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:ue.Overlay},{type:t.NgZone},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[Ir]}]},{type:ce.Directionality,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[i.DOCUMENT]}]}]},_e([t.ViewChild("inputMonthYearContent",{static:!1}),Ce("design:type",t.ElementRef)],e.prototype,"inputMonthYearContentRef",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"id",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"name",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"label",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"placeholder",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"help",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"locale",void 0),_e([t.Input(),Ce("design:type",Number)],e.prototype,"year",void 0),_e([t.Input(),Ce("design:type",Number)],e.prototype,"month",void 0),_e([t.Input(),Ce("design:type",Boolean)],e.prototype,"multiple",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"xPosition",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"yPosition",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"calendarView",void 0),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"opened",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"required",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",kr),Ce("design:paramtypes",[kr])],e.prototype,"min",null),_e([t.Input(),Ce("design:type",kr),Ce("design:paramtypes",[kr])],e.prototype,"max",null),_e([t.Input(),Ce("design:type",kr),Ce("design:paramtypes",[kr])],e.prototype,"value",null),_e([t.Output("opened"),Ce("design:type",t.EventEmitter)],e.prototype,"openedStream",void 0),_e([t.Output("closed"),Ce("design:type",t.EventEmitter)],e.prototype,"closedStream",void 0),e=n=_e([t.Component({selector:"gipi-month-year-picker",template:'<div class="input-wrapper">\n\n <label *ngIf="label"\n class="input-label"\n [attr.for]="id">\n {{ label }}\n <span *ngIf="required"> * </span>\n </label>\n\n <div class="input-content"\n #inputMonthYearContent\n (click)="open()">\n <input matInput\n class="input-element"\n type="text"\n [attr.id]="id"\n [attr.name]="name"\n [placeholder]="placeholder"\n [disabled]="disabled"\n [required]="required"\n [readOnly]="true"\n [autocomplete]="\'off\'"\n [autofocus]="false"\n [ngModel]="valueLabel"\n (click)="open()" />\n\n <div class="suffix">\n <button #button\n mat-icon-button\n type="button"\n class="btn-month-year-toggle"\n [attr.aria-label]="\'Abrir calendário mensal\'"\n [disabled]="disabled"\n (click)="open()">\n <svg class="month-year-toggle-default-icon"\n viewBox="0 0 24 24"\n width="24px"\n height="24px"\n fill="currentColor"\n focusable="false">\n <path\n d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z" />\n </svg>\n </button>\n </div>\n </div>\n\n <small *ngIf="help"\n class="input-help">\n {{ help }}\n </small>\n</div>',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}],host:{class:"gipi-month-year-picker"},changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.month-year-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-icon-button .month-year-toggle-default-icon{margin:auto}.btn-month-year-toggle{width:2rem!important;height:2rem!important;line-height:2rem!important}"]}),we(5,t.Inject(Ir)),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(i.DOCUMENT)),Ce("design:paramtypes",[t.ElementRef,t.ChangeDetectorRef,ue.Overlay,t.NgZone,t.ViewContainerRef,Object,ce.Directionality,Object])],e)}(),Ar=function(){function e(){}return e=_e([t.NgModule({imports:[i.CommonModule,I.MatButtonModule,P.MatDialogModule,ue.OverlayModule,m.A11yModule,y.PortalModule,F.MatIconModule,r.FormsModule,r.ReactiveFormsModule],exports:[v.ScrollingModule,wr,Rr],declarations:[wr,Rr],providers:[Or],entryComponents:[wr]})],e)}(),Tr=[Gi,On,gn,wi,Ci,Gn,Ui,fi,Wi,yi,ti,ni,si,hn,li,pn,dn,ki,En,xn,Ln,di,ei,Kn,$n,Dn,Tn,vn,Fn,Xn,Jn,zn,wn,In,ri,Rn,cn,mi,hi,Si,Cn,fn,Hi,Oi,en,jn,zi,ji,Ai,Di,Pi,Ti,Fi,Ni],Mr=[an,Qt,Jt,qt,$t,on,rn,tn],Fr=[ln],Nr=[lt,Zt,Kt,nn],Lr={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Vr=function(){function g(t){this._injector=t,e.INJECTOR=this._injector}return g.ctorParameters=function(){return[{type:t.Injector}]},g=_e([t.NgModule({declarations:[Tr,Mr,Fr,tt,et,Me,Qe,Ot,kt,Nt,Fe,Ne,gt,ft,Pt,Le,Rt,Lt,Ve,Xe,ht,zt,Ht,Bt,Yt,ct,Vt,Dt,jt,Mt,It,yt,xt,_t,vt,bt],imports:[i.CommonModule,s.RouterModule,r.FormsModule,r.ReactiveFormsModule,Te,o.FlexLayoutModule.withConfig({disableDefaultBps:!0},Ut),u.NgxMaskModule.forChild(),d.NgxCurrencyModule,h.NgxMaterialTimepickerModule,l.MdePopoverModule,c.InfiniteScrollModule,p.MentionModule,xr,Ar],exports:[Tr,Mr,Fr,i.CommonModule,s.RouterModule,r.FormsModule,r.ReactiveFormsModule,o.FlexLayoutModule,n.CdkStepperModule,a.MatRippleModule,a.MatDialogModule,c.InfiniteScrollModule,tt,et,Me,Qe,Ot,kt,Nt,Fe,Ne,gt,ft,Pt,Le,Rt,Lt,Ve,Xe,ht,p.MentionModule,ct,Vt,Dt,jt,Mt,It,yt,xt,_t,vt,bt,xr,Ar],entryComponents:[xn,zi,ji,ht],providers:[Nr,Gt,{provide:Ji,useClass:lr,deps:[Ki]},{provide:Ki,useValue:"pt-BR"},{provide:Re,useValue:Lr}]}),Ce("design:paramtypes",[t.Injector])],g)}(),jr=function(e){function t(){var t=e.call(this)||this;return t.content=[],t.number=0,t}return be(t,e),t}(Ge),Br=function(e){function t(t,n){var i=e.call(this)||this;return i.field=t,i.direction=n,i}return be(t,e),t}(Ge);(Er=e.SortDirectionEnum||(e.SortDirectionEnum={})).ASC="ASC",Er.DESC="DESC";var zr,Yr=function(t){function n(e,n,i,o,r){var a=t.call(this,n,o,r)||this;return a.service=e,a.messageService=n,a.confirmationService=i,a.router=o,a.activatedRoute=r,a}return be(n,t),n.prototype.ngOnInit=function(){t.prototype.ngOnInit.call(this),this.service.returnPath=this.getPath(),this.page=this.newPage(),this.filter=this.newFilterDTO(),this.getFilterDTOSessionStorage(),this.columns=this.createTableColumns()},n.prototype.new=function(){var e=this;this.router.navigateByUrl(this.getPath(),{skipLocationChange:!0}).then((function(){return e.router.navigate([e.getPath(),"new"])}))},n.prototype.edit=function(e){var t=this;this.router.navigateByUrl(this.getPath(),{skipLocationChange:!0}).then((function(){return t.router.navigate([t.getPath(),"edit",e.id])}))},n.prototype.view=function(e){var t=this;this.router.navigateByUrl(this.getPath(),{skipLocationChange:!0}).then((function(){return t.router.navigate([t.getPath(),"view",e.id])}))},n.prototype.delete=function(t,n){var i=this;this.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).DELETE_CONFIRMATION,accept:function(){try{i.loading=!0,i.loadingChange.emit(i.loading),i.page=i.newPage(),i.preDelete(),i.service.delete(t.id).subscribe((function(){n?i.find():(i.new(),i.loading=!1,i.loadingChange.emit(i.loading)),i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){i.isFinding()&&i.clear(),i.handleError(e)}))}catch(e){i.handleError(e)}}})},n.prototype.deleteAll=function(t,n){var i=this;this.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).DELETE_ALL_CONFIRMATION,accept:function(){try{i.loading=!0,i.loadingChange.emit(i.loading),i.page=i.newPage(),i.preDelete(),i.service.deleteAll(t).subscribe((function(){n?i.find():(i.new(),i.loading=!1,i.loadingChange.emit(i.loading)),i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){i.isFinding()&&i.clear(),i.handleError(e)}))}catch(e){i.handleError(e)}}})},n.prototype.updateStatus=function(t,n){var i=this;this.confirmationService.confirm({title:"Confirmação",message:"Deseja realmente "+(n?"ativar":"inativar")+" este registro?",accept:function(){try{i.loading=!0,i.loadingChange.emit(i.loading),i.service.save(t).subscribe((function(){i.clear(),i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){i.clear(),i.handleError(e)}))}catch(e){i.handleError(e)}},cancel:function(){return i.clear()}})},n.prototype.preDelete=function(){},n.prototype.clear=function(){this.page=this.newPage(),this.filter=this.newFilterDTO(),this.find()},n.prototype.getPath=function(){return this.activatedRoute.snapshot.parent.parent.url[0].path+"/"+this.activatedRoute.snapshot.parent.url[0].path},n.prototype.newPage=function(){return new jr},n.prototype.newFilterDTO=function(){return null},n.prototype.getFilterDTOSessionStorage=function(){return Promise.resolve()},n.prototype.createTableColumns=function(){return[]},n.prototype.createSorts=function(){return[]},n.prototype.find=function(t){var n=this;this.loading=!0,this.loadingChange.emit(this.loading),this.page=this.newPage(),ze.isNull(this.filter)&&(this.filter=this.newFilterDTO()),ze.isNull(t)&&!ze.isNull(this.tablePageEventDTO)&&(t=this.tablePageEventDTO),t?(this.tablePageEventDTO=t,this.filter.pageNumber=t.pageIndex,this.filter.pageSize=t.pageSize,this.filter.offset=t.pageIndex*t.pageSize,t.sort&&(this.filter.sorts=[new Br(t.sort.active,je.isEmpty(t.sort.direction)?e.SortDirectionEnum.DESC:t.sort.direction.toUpperCase())])):(this.filter.pageNumber=0,this.filter.offset=0,this.filter.pageSize=10),this.service.find(this.filter).subscribe((function(e){n.page=e,n.loading=!1,n.loadingChange.emit(n.loading)}),(function(e){return n.handleError(e)}))},n.prototype.isFinding=function(){return 0===this.router.url.split("/").filter((function(e){return"new"===e||"edit"===e})).length},n.prototype.isViewing=function(){return this.router.url.split("/").filter((function(e){return"view"===e})).length>0},n.prototype.isCreating=function(){return this.router.url.split("/").filter((function(e){return"new"===e})).length>0},n}(He),Hr=function(n){function i(e,i,o,r,a){var s=n.call(this,e,i,o,r,a)||this;return s.service=e,s.messageService=i,s.confirmationService=o,s.router=r,s.activatedRoute=a,s.entityChange=new t.EventEmitter(!0),s}return be(i,n),Object.defineProperty(i.prototype,"entity",{get:function(){return this.entityValue},set:function(e){this.entityValue=e,this.entityChange.emit(this.entityValue)},enumerable:!1,configurable:!0}),i.prototype.ngOnInit=function(){n.prototype.ngOnInit.call(this),this.entity=this.newEntity(),this.initializeForm()},i.prototype.save=function(t,n){var i=this;try{this.loading=!0,this.loadingChange.emit(this.loading),n&&(this.page=this.newPage()),this.preSave(),this.service.save(this.entity).subscribe((function(o){i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS),t?i.edit(o):n?i.find():i.router.navigateByUrl(i.getPath(),{skipLocationChange:!0}).then((function(){return i.router.navigate([i.getPath()])}))}),(function(e){return i.handleError(e)}))}catch(e){this.handleError(e)}},i.prototype.preSave=function(){},i.prototype.return=function(){var t=this;this.isViewing()?this.router.navigateByUrl(this.service.returnPath,{skipLocationChange:!0}).then((function(){return t.router.navigate([t.service.returnPath])})):this.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).RETURN_CONFIRMATION,accept:function(){return t.router.navigateByUrl(t.service.returnPath,{skipLocationChange:!0}).then((function(){return t.router.navigate([t.service.returnPath])}))}})},i.prototype.initializeForm=function(){var e=this;this.loading=!0,this.loadingChange.emit(this.loading);var t=this.activatedRoute.snapshot.params.id;t?this.service.getOne(t).subscribe((function(t){e.entity=t,e.afterInitializeForm(),e.loading=!1,e.loadingChange.emit(e.loading)}),(function(t){return e.handleError(t)})):(this.entity=this.newEntity(),this.loading=!1,this.loadingChange.emit(this.loading))},i.prototype.afterInitializeForm=function(){},_e([t.Output(),Ce("design:type",t.EventEmitter)],i.prototype,"entityChange",void 0),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],i.prototype,"entity",null),i}(Yr),Ur=he,Gr=function(e){function n(t,n){var i=e.call(this)||this;return i.router=t,i.http=n,i._tokenSubject$=new ie.BehaviorSubject(JSON.parse(localStorage.getItem("token"))),i.token$=i._tokenSubject$.asObservable(),i}return be(n,e),n.prototype.login=function(e,t){var n=this,i=(new ne.HttpParams).set("grant_type","password").set("username",e).set("password",t);return this.http.post("api/authenticator/oauth/token",i,this.options(this.buildParams(),this.buildHeaders().append("skip",String(!0)))).pipe(oe.map((function(e){return n.isValidToken(e)&&n.setSession(e),e})),oe.takeUntil(this.onDestroy),oe.catchError(this.handleError))},n.prototype.logout=function(){var e=this;this.revokeToken().subscribe((function(t){e.removeSession(),e.router.navigate(["/oauth/login"],{queryParams:{returnUrl:e.router.routerState.snapshot.url}})}),(function(e){throw new Error(e)}))},n.prototype.refreshToken=function(e){var t=this,n=(new ne.HttpParams).set("grant_type","refresh_token").set("refresh_token",this.token.refreshToken);return ze.isNull(e)||e.forEach((function(e,t){return n=n.append(t,e)})),this.http.post("api/authenticator/oauth/token",n,this.options(this.buildParams(),this.buildHeaders().append("skip","true"))).pipe(oe.map((function(e){return t.setSession(e)})),oe.takeUntil(this.onDestroy),oe.catchError(this.handleError))},n.prototype.revokeToken=function(e){var t=null;return ze.isNull(e)||(t=(new ne.HttpHeaders).append("Authorization",e.accessToken).append("skip","true")),this.http.post("api/authenticator/oauth/token/revoke",{},this.options(null,t)).pipe(oe.takeUntil(this.onDestroy),oe.catchError(this.handleError))},n.prototype.setSession=function(e){return this.isValidToken(e)&&(localStorage.setItem("token",JSON.stringify(e)),this._tokenSubject$.next(e)),e},n.prototype.removeSession=function(){localStorage.removeItem("token"),sessionStorage.clear()},n.prototype.isValidToken=function(e){if(!ze.isNull(e)&&!ze.isNull(e.expiration)){var t=Ur(e.expiration);return Ur().isBefore(t)}return!1},Object.defineProperty(n.prototype,"token",{get:function(){var e=localStorage.getItem("token");return je.isEmpty(e)?null:JSON.parse(e)},enumerable:!1,configurable:!0}),n.prototype.buildHeaders=function(){return(new ne.HttpHeaders).append("Authorization","Basic "+btoa("CONVENANT_MANAGEMENT:123")).append("Content-Type","application/x-www-form-urlencoded").append("accessType","WEB").append("timeZone",Ur(new Date).format("ZZ"))},n.ctorParameters=function(){return[{type:s.Router},{type:ne.HttpClient}]},n.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new n(t.ɵɵinject(s.Router),t.ɵɵinject(ne.HttpClient))},token:n,providedIn:"root"}),n=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[s.Router,ne.HttpClient])],n)}(We),qr=function(){function e(e){this._authenticationService=e}return e.prototype.intercept=function(e,t){var n=this._authenticationService.token;return ze.isNull(n)||je.isEmpty(n.accessToken)||e.headers.get("skip")||(e=e.clone({setHeaders:{Authorization:"Bearer "+n.accessToken}})),t.handle(e)},e.ctorParameters=function(){return[{type:Gr}]},e=_e([t.Injectable(),Ce("design:paramtypes",[Gr])],e)}(),$r=function(){function e(e){this._injector=e}return e.prototype.intercept=function(e,t){var n=this;return t.handle(e).pipe(oe.catchError((function(e){return Ie(n,void 0,void 0,(function(){var t;return Se(this,(function(n){switch(n.label){case 0:return this._router=this._injector.get(s.Router),t=null,e instanceof ne.HttpErrorResponse&&e.error instanceof Blob&&"application/json"===e.error.type?[4,this.blobToJson(e).then((function(e){!ze.isNull(e)&&e instanceof ne.HttpErrorResponse&&(t=e)}))]:[3,2];case 1:return n.sent(),[3,3];case 2:e instanceof ne.HttpErrorResponse&&(t=e),n.label=3;case 3:return[4,this.validateErrors(t)];case 4:return[4,n.sent().toPromise().then((function(e){return e}))];case 5:return[2,n.sent()]}}))}))})))},e.prototype.validateErrors=function(e){return Ie(this,void 0,void 0,(function(){var n=this;return Se(this,(function(i){return[2,new Promise((function(i,o){var r=e.error.message||e.statusText,a=e.error.apierror;if(ze.isNull(a))if(navigator.onLine){if(504===e.status)return void n._injector.get(t.NgZone).run((function(){return n._router.navigate(["/errors/504"])}))}else r="Sem internet";else if("INTERNAL_SERVER_ERROR"===a.status&&a.debugMessage&&a.debugMessage.toUpperCase().includes("QUERY DID NOT RETURN A UNIQUE RESULT"))r="A consulta não retornou resultado único";else if("INTERNAL_SERVER_ERROR"===a.status&&a.message&&a.message.toUpperCase().includes("NENHUM REGISTRO FOI ENCONTRADO"))r="Nenhum registro foi encontrado";else if("INTERNAL_SERVER_ERROR"===a.status&&a.message&&a.message.toUpperCase().includes("OCORREU UM PROBLEMA INESPERADO"))r="Ocorreu um problema inesperado";else{if("FORBIDDEN"===a.status)return void n._injector.get(t.NgZone).run((function(){return n._router.navigate(["/errors/403"])}));"UNAUTHORIZED"===a.status?(r="Sua sessão expirou",n._injector.get(Gr).logout()):r=Et.isEmpty(a.subErrorList)?a.message:a.subErrorList[0].rejectedMessage}return i(ie.throwError(r))}))]}))}))},e.prototype.blobToJson=function(e){return Ie(this,void 0,void 0,(function(){return Se(this,(function(t){return[2,new Promise((function(t,n){try{var i=null,o=new FileReader;o.onload=function(n){var o=JSON.parse(n.target.result);i=new ne.HttpErrorResponse({error:o,headers:e.headers,status:e.status,statusText:e.statusText,url:e.url}),t(i)},o.readAsText(e.error)}catch(e){n(null),ie.throwError(e)}}))]}))}))},e.ctorParameters=function(){return[{type:t.Injector}]},e=_e([t.Injectable(),Ce("design:paramtypes",[t.Injector])],e)}(),Wr=function(e){function n(t,n){var i=e.call(this)||this;return i._breakpointObserver=t,i.dialog=n,i}return be(n,e),n.prototype.open=function(e){var t={panelClass:e.panelClass,disableClose:e.disableClose,width:e.width,height:e.height,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,position:e.position,data:e.data,autoFocus:e.autoFocus||!1,restoreFocus:e.restoreFocus||!1,closeOnNavigation:e.closeOnNavigation||!0};return this.dialog.open(e.componentOrTemplateRef,t)},n.prototype._calcHeightByBody=function(){return(document&&document.body?document.body.getBoundingClientRect():null).height-80+"px"},n.prototype._coerceNumber=function(e){if(je.isEmpty(e))return null;var t=e.match(/\d+/);return t?parseInt(t[0],10):null},n.ctorParameters=function(){return[{type:pe.BreakpointObserver},{type:a.MatDialog}]},n.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new n(t.ɵɵinject(pe.BreakpointObserver),t.ɵɵinject(P.MatDialog))},token:n,providedIn:"root"}),n=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[pe.BreakpointObserver,a.MatDialog])],n)}(We),Kr=function(){function e(e,t){this._matIconRegistry=e,this._domSanitizer=t}return e.prototype.registerListSvgIcons=function(e,t){var n,i,o=Object.values(e);try{for(var r=Ee(o),a=r.next();!a.done;a=r.next()){var s=a.value;this.registerSvgIcon(s,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},e.prototype.registerSvgIcon=function(e,t){try{var n=this._domSanitizer.bypassSecurityTrustResourceUrl(t+"/"+e+".svg");this._matIconRegistry.addSvgIcon(e,n)}catch(e){throw new Error(e)}},e.prototype.registerSvgIconLiteral=function(e,t){try{this._matIconRegistry.addSvgIconLiteral(e,t)}catch(e){throw new Error(e)}},e.ctorParameters=function(){return[{type:a.MatIconRegistry},{type:fe.DomSanitizer}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(F.MatIconRegistry),t.ɵɵinject(fe.DomSanitizer))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[a.MatIconRegistry,fe.DomSanitizer])],e)}(),Xr=function(){function e(){}return e.format=function(e,t,n){if(void 0===n&&(n=!1),!ze.isNull(e)){var i=null;i=e instanceof Date?{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds()}:e;var o=this.TIME_FORMAT;return"FULL"===t.trim().toUpperCase()?o="HH:mm:ss"+(n?" AA":""):"SHORT"===t.trim().toUpperCase()?o="HH:mm"+(n?" AA":""):je.isEmpty(t.trim())||(o=t.trim()),this._formatDate(i,o)}return je.EMPTY},e._formatDate=function(e,t){var n=e.hour,i=n>12?n-12:0===n?12:n;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+this._padToAnyDigits(n))).replace(/(^|[^\\])H/g,"$1"+n)).replace(/(^|[^\\])hh+/g,"$1"+this._padToAnyDigits(i))).replace(/(^|[^\\])h/g,"$1"+i);var o=e.minute;t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+this._padToAnyDigits(o))).replace(/(^|[^\\])m/g,"$1"+o);var r=e.second,a=n<12?"AM":"PM";t=(t=(t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+this._padToAnyDigits(r))).replace(/(^|[^\\])s/g,"$1"+r)).replace(/(^|[^\\])AA+/g,"$1"+a)).replace(/(^|[^\\])A/g,"$1"+a.charAt(0));var s=a.toLowerCase();return t=(t=(t=t.replace(/(^|[^\\])aa+/g,"$1"+s)).replace(/(^|[^\\])a/g,"$1"+s.charAt(0))).replace(/\\(.)/g,"$1")},e._padToAnyDigits=function(e,t){return void 0===t&&(t=2),e.toString().padStart(t,"0")},e.TIME_FORMAT="HH:mm:ss",e}(),Zr=function(){function e(){}var n;return n=e,e.prototype.transform=function(e,i,o){void 0===o&&(o=!1);try{return Xr.format(e,i,o)}catch(e){throw new Error("InvalidPipeArgument: '"+n+"' for pipe '"+t.ɵstringify(e.message)+"'")}},e=n=_e([t.Pipe({name:"localtime"})],e)}(),Jr=function(){function e(e,t){this.path=e,this.version=t,this.handleDestroy=new ie.Subject}return e.prototype.ngOnDestroy=function(){this.handleDestroy.next(),this.handleDestroy.complete()},e.prototype.url=function(e,t){var n="";je.isEmpty(t)?je.isEmpty(t)&&!je.isEmpty(this.version)&&(n="/"+this.version.toLowerCase()):n="/"+t.toLowerCase();var i="";return je.isEmpty(e)||(i="/"+e),"api/"+this.path+n+i},e.prototype.options=function(e,t){return{headers:t||this.buildHeaders(),params:e||this.buildParams()}},e.prototype.buildHeaders=function(){return new ne.HttpHeaders},e.prototype.buildParams=function(){return new ne.HttpParams},e.prototype.handleMapper=function(e){return e},e.prototype.handleError=function(e){return ie.throwError(e)},e}(),Qr=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.path=t,o.version=n,o.baseService=i,o}return be(t,e),t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this)},t.prototype.save=function(e,t){return this.validate(e),this.baseService.httpClient.post(this.url("",t),e,this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.saveAll=function(e,t){for(var n=0;n<e.length;n++)this.validate(e[n]);return this.baseService.httpClient.post(this.url("save-all",t),e,this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.delete=function(e,t){return this.baseService.httpClient.delete(this.url(""+e,t)).pipe(oe.map((function(){return null})),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.deleteAll=function(e,t){for(var n=0;n<e.length;n++)if(!Ye.isValid(e[n]))return ie.of(!1);return this.baseService.httpClient.post(this.url("delete-all",t),e,this.options()).pipe(oe.map((function(){return!0})),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.getOne=function(e,t){return this.baseService.httpClient.get(this.url(""+e,t),this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.find=function(e){return this.baseService.httpClient.get(this.url("",e),this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.findAll=function(e,t){return this.baseService.httpClient.post(this.url("find-all",t),e,this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.findAllEnabled=function(e,t,n){var i=Math.max(e,0),o=Math.max(t,10),r=new URLSearchParams;r.set("page",i.toString()),r.set("size",o.toString());var a=je.isEmpty(r.toString())?"":"?"+r.toString();return this.baseService.httpClient.get(this.url("find-all-enabled"+a,n),this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.findByValue=function(e,t,n,i,o){var r=je.isEmpty(e)?"":e.trim(),a=Math.max(t,0),s=Math.max(n,10),l=new URLSearchParams;l.set("value",r),l.set("page",a.toString()),l.set("size",s.toString()),ze.isNull(i)||je.isEmpty(i.field)||l.set("sort",i.field+","+i.direction);var p=je.isEmpty(l.toString())?"":"?"+l.toString();return this.baseService.httpClient.get(this.url("find-by-value"+p,o),this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.enableOrDisable=function(e,t,n){return Ye.isValid(e)?this.baseService.httpClient.patch(this.url("/enable-or-disable/"+e+"/"+t,n),{},this.options()).pipe(oe.map((function(){return!0})),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError)):ie.of(!1)},t.prototype.enableOrDisableAll=function(e,t,n){for(var i=0;i<e.length;i++)if(!Ye.isValid(e[i]))return ie.of(!1);return this.baseService.httpClient.patch(this.url("/enable-or-disable-all/"+t,n),e,this.options()).pipe(oe.map((function(){return!0})),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.validate=function(e){return""},t}(Jr),ea=function(){function e(){}return e.prototype.download=function(e,t,n){var i=new Blob([e],{type:n}),o=document.createElement("a");if(void 0!==o.download){var r=URL.createObjectURL(i);o.setAttribute("href",r),o.setAttribute("download",t),o.style.visibility="hidden",document.body.appendChild(o),o.click(),document.body.removeChild(o)}},e.prototype.downloadContent=function(e){this.download(e.body,e.headers.get("content-disposition").split(";")[1].split("filename")[1].split("=")[1].trim(),e.headers.get("content-type"))},e.prototype.printArchive=function(e,t){var n=new Blob([e],{type:t}),i=URL.createObjectURL(n),o=document.createElement("iframe");document.body.appendChild(o),o.style.display="none",o.style.position="fixed",o.style.right="0",o.style.bottom="0",o.style.width="0",o.style.height="0",o.style.border="0",o.src=i,o.onload=function(){setTimeout((function(){o.focus(),o.contentWindow.print()}),1)}},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[])],e)}(),ta=function(){function e(){this._storage=window.sessionStorage}return e.prototype.set=function(e,t){return!!this._storage&&(this._storage.setItem(e,JSON.stringify(t)),!0)},e.prototype.get=function(e){if(this._storage){var t=JSON.parse(this._storage.getItem(e));return ze.isNull(t)?null:t}return null},e.prototype.remove=function(e){return!!this._storage&&(this._storage.removeItem(e),!0)},e.prototype.clear=function(){return!!this._storage&&(this._storage.clear(),!0)},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[])],e)}(),na=function(){function e(e,t){this._injector=e,this._router=t,this._sessionStorageService=null,this._confirmationService=null,this._messageService=null,this._dialogService=null,this._fileService=null,this._matDialog=null,this._httpClient=null,this._changeDetectorRef=null,this._matSnackBar=null}return e.prototype.ngOnDestroy=function(){},Object.defineProperty(e.prototype,"sessionStorageService",{get:function(){return ze.isNull(this._sessionStorageService)&&(this._sessionStorageService=this._injector.get(ta)),this._sessionStorageService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"confirmationService",{get:function(){return ze.isNull(this._confirmationService)&&(this._confirmationService=this._injector.get(Sn)),this._confirmationService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"messageService",{get:function(){return ze.isNull(this._messageService)&&(this._messageService=this._injector.get(Ke)),this._messageService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dialogService",{get:function(){return ze.isNull(this._dialogService)&&(this._dialogService=this._injector.get(Wr)),this._dialogService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fileService",{get:function(){return ze.isNull(this._fileService)&&(this._fileService=this._injector.get(ea)),this._fileService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matDialog",{get:function(){return ze.isNull(this._matDialog)&&(this._matDialog=this._injector.get(P.MatDialog)),this._matDialog},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpClient",{get:function(){return ze.isNull(this._httpClient)&&(this._httpClient=this._injector.get(ne.HttpClient)),this._httpClient},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"router",{get:function(){return ze.isNull(this._router)&&(this._router=this._injector.get(s.Router)),this._router},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return ze.isNull(this._changeDetectorRef)&&(this._changeDetectorRef=this._injector.get(t.ChangeDetectorRef)),this._changeDetectorRef},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matSnackBar",{get:function(){return ze.isNull(this._matSnackBar)&&(this._matSnackBar=this._injector.get($.MatSnackBar)),this._matSnackBar},enumerable:!1,configurable:!0}),e.ctorParameters=function(){return[{type:t.Injector},{type:s.Router}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(t.INJECTOR),t.ɵɵinject(s.Router))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[t.Injector,s.Router])],e)}(),ia=function(){function e(e,t){this.baseService=e,this.activatedRoute=t,this._loading=!1,this._basePermissionList=null}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"basePermissionList",{get:function(){return this._basePermissionList},set:function(e){this._basePermissionList=e},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.onInitForm()},e.prototype.ngAfterViewInit=function(){this.onAfterInitForm()},e.prototype.ngOnDestroy=function(){this.onDestroy()},e.prototype.isCreating=function(){return this.baseService.router.url.split("/").filter((function(e){return"new"===e})).length>0},e.prototype.isEditing=function(){return this.baseService.router.url.split("/").filter((function(e){return"edit"===e})).length>0},e.prototype.isViewing=function(){return this.baseService.router.url.split("/").filter((function(e){return"view"===e})).length>0},e.prototype.isListing=function(){return 0===this.baseService.router.url.split("/").filter((function(e){return"new"===e||"edit"===e||"view"===e})).length},e.prototype.hasPermission=function(e){return!je.isEmpty(e)&&!!JSON.parse(localStorage.getItem("token")).user.authorities.find((function(t){return t.authority.match(e)}))},e.prototype.UUIDIsValid=function(e){return Ye.isValid(e)},e.prototype.onInitForm=function(){},e.prototype.onAfterInitForm=function(){},e.prototype.onDestroy=function(){},e.prototype.getPath=function(){return this.activatedRoute.snapshot.parent.parent.url[0].path+"/"+this.activatedRoute.snapshot.parent.url[0].path},e.prototype.navigateByUrl=function(e,t,n){var i=this;void 0===n&&(n=!0),this.baseService.router.navigateByUrl(e,{skipLocationChange:n}).then((function(){return i.baseService.router.navigate(t)}))},e.prototype.addMessage=function(e){this.baseService.matSnackBar.openFromComponent($e,{verticalPosition:"top",horizontalPosition:"center",duration:5e3,data:e})},e.prototype.addSuccessMessage=function(e){this.baseService.messageService.add({icon:"check_circle",title:"Sucesso",message:e,type:"success"})},e.prototype.addErrorMessage=function(e){this.baseService.messageService.add({icon:"cancel",title:"Erro",message:e,type:"error"})},e.prototype.addWarningMessage=function(e){this.baseService.messageService.add({icon:"error",title:"Atenção",message:e,type:"warning"})},e.prototype.addInfoMessage=function(e){this.baseService.messageService.add({icon:"info",title:"Informação",message:e,type:"info"})},e.prototype.handleError=function(e){throw this.loading=!1,String(e).includes("Unknown")&&(e=new Error("Ocorreu um erro ao realizar essa operação, tente novamente")),e instanceof Error&&(e=e.message),this.addErrorMessage(e),e},e.prototype.getExistInRouterPath=function(e,t){void 0===t&&(t=!1);var n=this.baseService.router.url,i=n.slice(1,n.indexOf("?")+1).split("/"),o=n.slice(n.indexOf("?")+1,n.length).split("=");return t?o.filter((function(t){return t.toUpperCase()===e.toUpperCase()})).length>0:i.filter((function(t){return t.toUpperCase()===e.toUpperCase()})).length>0},e.ctorParameters=function(){return[{type:na},{type:s.ActivatedRoute}]},e=_e([t.Component({template:""}),Ce("design:paramtypes",[na,s.ActivatedRoute])],e)}(),oa=function(n){function i(e,t,i){var o=n.call(this,t,i)||this;return o.abstractCrudService=e,o.baseService=t,o.activatedRoute=i,o._entity=o.newEntity(),o}return be(i,n),Object.defineProperty(i.prototype,"entity",{get:function(){return this._entity},set:function(e){this._entity=e},enumerable:!1,configurable:!0}),i.prototype.ngOnInit=function(){if(n.prototype.ngOnInit.call(this),ze.isNull(this.basePermissionList))throw new Error("basePermissionList is required")},i.prototype.ngAfterViewInit=function(){n.prototype.ngAfterViewInit.call(this)},i.prototype.ngOnDestroy=function(){n.prototype.ngOnDestroy.call(this)},i.prototype.onInitForm=function(){var e=this;try{this.loading=!0;var t=this.activatedRoute.snapshot.params.id;this.UUIDIsValid(t)?this.abstractCrudService.getOne(t).toPromise().then((function(t){e.entity=t,e.onAfterGetOne(),e.loading=!1}),(function(e){throw new Error(e)})):(this.entity=this.newEntity(),this.onAfterGetOne(),this.loading=!1)}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.onAfterGetOne=function(){},i.prototype.preSave=function(e){},i.prototype.save=function(t,n){var i=this;void 0===n&&(n=!0);try{this.loading=!0,ze.isNull(t)&&(t=this.entity),this.isValid(t)&&(this.preSave(t),this.abstractCrudService.save(t).toPromise().then((function(t){i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS),n&&i.navigateByUrl(i.getPath(),[i.getPath()],!0)}),(function(e){throw new Error(e)})))}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.goBack=function(t){var n=this;void 0===t&&(t=!0),!this.isViewing()||t?this.baseService.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).RETURN_CONFIRMATION,accept:function(){return n.navigateByUrl(n.getPath(),[n.getPath()],!0)}}):this.navigateByUrl(this.getPath(),[this.getPath()],!0)},i.ctorParameters=function(){return[{type:Qr},{type:na},{type:s.ActivatedRoute}]},i=_e([t.Component({template:""}),Ce("design:paramtypes",[Qr,na,s.ActivatedRoute])],i)}(ia),ra=function(){this.content=[],this.number=0},aa=function(e,t){this.field=e,this.direction=t},sa=function(n){function i(e,t,i){var o=n.call(this,t,i)||this;return o.abstractCrudService=e,o.baseService=t,o.activatedRoute=i,o._filter=null,o._page=null,o._columns=[],o._appliedFilters=[],o}return be(i,n),Object.defineProperty(i.prototype,"filter",{get:function(){return this._filter},set:function(e){this._filter=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"page",{get:function(){return this._page},set:function(e){this._page=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tablePageEventDTO",{get:function(){return this._tablePageEventDTO},set:function(e){this._tablePageEventDTO=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"appliedFilters",{get:function(){return this._appliedFilters},set:function(e){this._appliedFilters=e},enumerable:!1,configurable:!0}),i.prototype.ngOnInit=function(){if(n.prototype.ngOnInit.call(this),ze.isNull(this.basePermissionList))throw new Error("basePermissionList is required");this._onInitFilter(),this.columns=this.createTableColumns()},i.prototype.ngAfterViewInit=function(){n.prototype.ngAfterViewInit.call(this)},i.prototype.ngOnDestroy=function(){n.prototype.ngOnDestroy.call(this)},i.prototype.newPage=function(){return new ra},i.prototype.createTableSorts=function(){return[]},i.prototype.preDelete=function(e){},i.prototype.existInAppliedFilters=function(e){return!Et.isEmpty(this.appliedFilters)&&this.appliedFilters.findIndex((function(t){return t.key===e}))>=0},i.prototype._onInitFilter=function(){this.page=this.newPage(),this.filter=this.newFilter(),ze.isNull(this.filter)||this.setAppliedFilters();var e=this.baseService.sessionStorageService.get("filter");ze.isNull(e)||this.handleFilterSessionStorage()},i.prototype.findAll=function(e){var t=this;try{this.loading=!0,this.page=this.newPage(),ze.isNull(this.filter)&&(this.filter=this.newFilter()),e?(this.tablePageEventDTO=e,this.filter.pageNumber=e.pageIndex,this.filter.pageSize=e.pageSize,this.filter.offset=e.pageIndex*e.pageSize,e.sort&&(this.filter.sorts=[new aa(e.sort.active,je.isEmpty(e.sort.direction)?"DESC":e.sort.direction.toUpperCase())])):(this.filter.pageNumber=0,this.filter.offset=0,this.filter.pageSize=10),this.abstractCrudService.findAll(this.filter).toPromise().then((function(e){t.page=e,t.setAppliedFilters(),t.loading=!1}),(function(e){throw t.loading=!1,new Error(e)}))}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.newRegister=function(t){if(je.isEmpty(t)&&ze.isNull(this.basePermissionList))this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"new"],!0);else{if(je.isEmpty(t)&&!ze.isNull(this.basePermissionList)&&(t=this.basePermissionList.MAKE),!this.hasPermission(t))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"new"],!0)}},i.prototype.editRegister=function(t,n){if(t=this.handleEntityId(t),!ze.isNull(t))if(je.isEmpty(n)&&ze.isNull(this.basePermissionList))this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"edit"],!0);else{if(je.isEmpty(n)&&!ze.isNull(this.basePermissionList)&&(n=this.basePermissionList.UPDATE),!this.hasPermission(n))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"edit",t],!0)}},i.prototype.deleteRegister=function(t,n,i){void 0===i&&(i=!0);try{if(t=this.handleEntityId(t),ze.isNull(t))return;if(je.isEmpty(n)&&ze.isNull(this.basePermissionList))this._deleteRegister(t,i);else{if(je.isEmpty(n)&&!ze.isNull(this.basePermissionList)&&(n=this.basePermissionList.DELETE),!this.hasPermission(n))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this._deleteRegister(t,i)}}catch(e){throw this.loading=!1,this.isListing()&&this.clear(),new Error(e)}},i.prototype._deleteRegister=function(t,n){var i=this;void 0===n&&(n=!0);try{this.baseService.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).DELETE_CONFIRMATION,accept:function(){i.setFilterSessionStorage(),i.loading=!0,i.page=i.newPage(),i.preDelete(t),i.abstractCrudService.delete(t).toPromise().then((function(){n&&i.findAll(),i.loading=!1,i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){throw new Error(e)}))}})}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.deleteAllRegister=function(t,n,i){void 0===i&&(i=!0);try{if(t=this.handleEntityIdList(t),ze.isNull(t)||Et.isEmpty(t))return;if(je.isEmpty(n)&&ze.isNull(this.basePermissionList))this._deleteAllRegister(t,i);else{if(je.isEmpty(n)&&!ze.isNull(this.basePermissionList)&&(n=this.basePermissionList.DELETE),!this.hasPermission(n))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this._deleteAllRegister(t,i)}}catch(e){throw this.loading=!1,this.isListing()&&this.clear(),new Error(e)}},i.prototype._deleteAllRegister=function(t,n){var i=this;void 0===n&&(n=!0);try{this.baseService.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).DELETE_CONFIRMATION,accept:function(){i.setFilterSessionStorage(),i.loading=!0,i.page=i.newPage(),i.preDelete(),i.abstractCrudService.deleteAll(t).toPromise().then((function(){n&&i.findAll(),i.loading=!1,i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){throw new Error(e)}))}})}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.viewRegister=function(t,n){if(t=this.handleEntityId(t),!ze.isNull(t))if(je.isEmpty(n)&&ze.isNull(this.basePermissionList))this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"view",t],!0);else{if(je.isEmpty(n)&&!ze.isNull(this.basePermissionList)&&(n=this.basePermissionList.READ),!this.hasPermission(n))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"view",t],!0)}},i.prototype.editOrViewRegister=function(e,t){this.hasPermission(t)?this.editRegister(e,t):this.viewRegister(e,t)},i.prototype.enableOrDisableRegister=function(t,n,i,o){void 0===o&&(o=!0);try{if(n=this.handleEntityId(n),ze.isNull(n))return;if(je.isEmpty(i)&&ze.isNull(this.basePermissionList))this._enableOrDisableRegister(t,n,o);else{if(je.isEmpty(i)&&!ze.isNull(this.basePermissionList)&&(i=this.basePermissionList.UPDATE),!this.hasPermission(i))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this._enableOrDisableRegister(t,n,o)}}catch(e){throw this.loading=!1,this.isListing()&&this.clear(),new Error(e)}},i.prototype._enableOrDisableRegister=function(t,n,i){var o=this;void 0===i&&(i=!0);try{this.baseService.confirmationService.confirm({title:"Confirmação",message:"Deseja realmente "+("DISABLE"===t?"inativar":"ativar")+" este registro?",accept:function(){o.setFilterSessionStorage(),o.loading=!0,o.page=o.newPage(),o.abstractCrudService.enableOrDisable(n,t).toPromise().then((function(){i&&o.findAll(),o.loading=!1,o.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){throw new Error(e)}))}})}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.enableAndDisableAllRegister=function(t,n,i,o){void 0===o&&(o=!0);try{if(n=this.handleEntityIdList(n),ze.isNull(n)||Et.isEmpty(n))return;if(je.isEmpty(i)&&ze.isNull(this.basePermissionList))this._enableAndDisableAllRegister(t,n,o);else{if(je.isEmpty(i)&&!ze.isNull(this.basePermissionList)&&(i=this.basePermissionList.UPDATE),!this.hasPermission(i))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this._enableAndDisableAllRegister(t,n,o)}}catch(e){throw this.loading=!1,this.isListing()&&this.clear(),new Error(e)}},i.prototype._enableAndDisableAllRegister=function(t,n,i){var o=this;void 0===i&&(i=!0);try{this.baseService.confirmationService.confirm({title:"Confirmação",message:"Deseja realmente "+("DISABLE"===t?"inativar":"ativar")+" os registros selecionados?",accept:function(){o.setFilterSessionStorage(),o.loading=!0,o.page=o.newPage(),o.abstractCrudService.enableOrDisableAll(n,t).toPromise().then((function(){i&&o.findAll(),o.loading=!1,o.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){throw new Error(e)}))}})}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.clear=function(){this.baseService.sessionStorageService.remove("filter"),this.page=this.newPage(),this.filter=this.newFilter(),this.clearAppliedFilters(),this.findAll()},i.prototype.handleEntityId=function(e){if(!this.UUIDIsValid(e))throw new Error("O identificador do registro não é válido");if(ze.isNull(e)&&!ze.isNull(this.page)&&!Et.isEmpty(this.page.content)){var t=this.page.content.filter((function(e){return e.selected}))[0];return ze.isNull(t)?null:t.id}return e},i.prototype.handleEntityIdList=function(e){if(!Et.isEmpty(e))for(var t=0;t<e.length;t++)if(!this.UUIDIsValid(e[t]))throw new Error("O identificador do registro não é válido");if(Et.isEmpty(e)&&!ze.isNull(this.page)&&!Et.isEmpty(this.page.content)){var n=this.page.content.filter((function(e){return e.selected})).map((function(e){return e.id}));return Et.isEmpty(n)?null:n}return e},i.ctorParameters=function(){return[{type:Qr},{type:na},{type:s.ActivatedRoute}]},i=_e([t.Component({template:""}),Ce("design:paramtypes",[Qr,na,s.ActivatedRoute])],i)}(ia),la=[oa,sa,ia],pa={align:"",allowNegative:!0,allowZero:!0,decimal:",",precision:2,prefix:"R$ ",suffix:"",thousands:".",nullable:!0,max:999999999.99},da=function(){function e(){}var n;return n=e,e.setMessages=function(e){return{ngModule:n,providers:[{provide:De,useValue:ze.isNull(e)?Pe:e}]}},e=n=_e([t.NgModule({declarations:[$e,Zr,la],entryComponents:[$e],imports:[me.BrowserAnimationsModule,ue.OverlayModule,ne.HttpClientModule,s.RouterModule,o.FlexLayoutModule.withConfig({disableDefaultBps:!0},Ut),F.MatIconModule,J.MatToolbarModule,U.MatSidenavModule,L.MatListModule,I.MatButtonModule,V.MatMenuModule,u.NgxMaskModule.forRoot(),d.NgxCurrencyModule.forRoot(pa),Vr],exports:[Zr,la],providers:[_i,Kr,Ke,Sn,Wr,Gt,{provide:ne.HTTP_INTERCEPTORS,useClass:qr,multi:!0},{provide:ne.HTTP_INTERCEPTORS,useClass:$r,multi:!0}]})],e)}();(zr=e.LocalTimeEnum||(e.LocalTimeEnum={})).FULL="FULL",zr.SHORT="SHORT";var ca,ua,ha,ga,ma=function(){function e(e,t,n){this._router=e,this._matDialog=t,this._authenticationService=n}return e.prototype.canActivate=function(e,t){var n=this._authenticationService.token;return this._authenticationService.isValidToken(n)?ie.of(!0):(this._authenticationService.removeSession(),this._matDialog.closeAll(),this._router.navigate(["oauth/login"]),ie.of(!1))},e.prototype.canActivateChild=function(e,t){return this.canActivate(e,t)},e.ctorParameters=function(){return[{type:s.Router},{type:P.MatDialog},{type:Gr}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(s.Router),t.ɵɵinject(P.MatDialog),t.ɵɵinject(Gr))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[s.Router,P.MatDialog,Gr])],e)}(),fa=function(){function e(e,t,n){this._router=e,this._matDialog=t,this._authenticationService=n}return e.prototype._hasAuthority=function(e,t){return!ze.isNull(e)&&!je.isEmpty(t)&&!!e.authorities.find((function(e){return e.authority.match(t)}))},e.prototype._hasPermission=function(e,t){var n,i;try{for(var o=Ee(e),r=o.next();!r.done;r=o.next()){var a=r.value;if(t.split("/").pop()===a.route)return!0;if(!Et.isEmpty(a.menuList))return this._hasPermission(a.menuList,t)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.canActivate=function(e,t){var n=this._authenticationService.token;return this._authenticationService.isValidToken(n)?this._hasPermission(n.user.menuList,t.url)&&this._hasAuthority(n.user,e.data.authority)?ie.of(!0):(this._router.navigate(["errors/403"]),ie.of(!1)):(this._authenticationService.removeSession(),this._matDialog.closeAll(),this._router.navigate(["oauth/login"]),ie.of(!1))},e.prototype.canActivateChild=function(e,t){return this.canActivate(e,t)},e.ctorParameters=function(){return[{type:s.Router},{type:P.MatDialog},{type:Gr}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(s.Router),t.ɵɵinject(P.MatDialog),t.ɵɵinject(Gr))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[s.Router,P.MatDialog,Gr])],e)}(),ya=function(){},va=function(e){function t(){var t=e.call(this)||this;return t.menuList=[],t}return be(t,e),t}(ya),ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Ge),xa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Ge),_a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Ge),wa=function(e,t){void 0===e&&(e="ALL"),void 0===t&&(t=[]),this.radiobuttonSelected=e,this.entitiesSelected=t},Ca=function(e){function t(){var t=e.call(this)||this;return t.menuList=[],t.id="",t.expanded=!1,t}return be(t,e),t}(Ge),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!1,t.closeable=!1,t.disabled=!1,t}return be(t,e),t}(Ge),Sa=function(e){function t(t,n,i,o,r,a,s,l,p,d,c,u,h,g){var m=e.call(this)||this;return m.sortable=!1,m.hiddenSm=!1,m.visible=!0,m.name=t,m.property=n,m.value=i,m.sortable=o,m.hiddenSm=r,m.visible=a,m.width=s,m.marginLeft=l,m.marginRight=p,m.align=d,m.template=c,m.templateHeader=u,m.sliceLength=h,m.action=g,m}return be(t,e),t}(Ge),Ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Ge);(ca=e.CriteriaOperationEnum||(e.CriteriaOperationEnum={})).EQUALITY="EQUALITY",ca.NEGATION="NEGATION",ca.GREATER_THAN="GREATER_THAN",ca.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",ca.LESS_THAN="LESS_THAN",ca.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",ca.LIKE="LIKE",ca.STARTS_WITH="STARTS_WITH",ca.ENDS_WITH="ENDS_WITH",ca.CONTAINS="CONTAINS",ca.IN="IN",(ua=e.CriteriaSortDirectionEnum||(e.CriteriaSortDirectionEnum={})).ASC="ASC",ua.DESC="DESC",(ha=e.MenuTypeEnum||(e.MenuTypeEnum={})).GROUP="GROUP",ha.COLLAPSABLE="COLLAPSABLE",ha.ITEM="ITEM",(ga=e.RadioButtonEnum||(e.RadioButtonEnum={})).START_AND_END="Inicial/Final",ga.BY_SELECTION="Por seleção",ga.TO_OMIT="Omitir",ga.ALL="Todos";var Oa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(ya),ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.make=!0,t.update=!0,t.read=!0,t.delete=!0,t}return be(t,e),t}(ya),Da=function(e){function t(){var t=e.call(this)||this;return t.permissionList=[],t}return be(t,e),t}(ya),Pa=function(e){function t(t,n){var i=e.call(this)||this;return i.path=t,i.http=n,i}return be(t,e),t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this)},t.prototype.url=function(e){var t="api/"+this.path;return e?t.concat("/"+e):t},t.prototype.getOne=function(e){return this.http.get(this.url(""+e),this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.find=function(e){return this.http.post(this.url("find-all"),e,this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.findAll=function(){return this.http.get(this.url(),this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.findAllEnabled=function(e,t){return(!e||e&&e<0)&&(e=0),(!t||t&&t<=0)&&(t=10),this.http.get(this.url("find-all-enabled?page="+e+"&size="+t),this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.findByValue=function(e,t,n,i){void 0===n&&(n=10);var o=e;o=e?je.removeAccents(e).trim():"",(!t||t&&t<0)&&(t=0),(!n||n&&n<=0)&&(n=10);var r="";return ze.isNull(i)||je.isEmpty(i.property)||(r="&sort="+i.property+","+i.direction),this.http.get(this.url("find-by-value?page="+t+"&size="+n+r+"&value="+o),this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t}(We),Ra=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.path=t,i}return be(t,e),t.prototype.save=function(e){return this.validate(e),this.http.post(this.url(),e,this.options()).pipe(oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.saveAll=function(e){var t=this;return e.forEach((function(e){return t.validate(e)})),this.http.post(this.url("save-all"),e,this.options()).pipe(oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.delete=function(e){return this.http.delete(this.url(""+e)).pipe(oe.map((function(){return null})),oe.catchError(this.handleError))},t.prototype.deleteAll=function(e){return this.http.post(this.url("delete-all"),e,this.options()).pipe(oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.validate=function(e){},t}(Pa);String.prototype.numberFullName=function(e){for(var t,n,i,o,r=[["zero","um","dois","três","quatro","cinco","seis","sete","oito","nove","dez","onze","doze","treze","quatorze","quinze","dezesseis","dezessete","dezoito","dezenove"],["dez","vinte","trinta","quarenta","cinquenta","sessenta","setenta","oitenta","noventa"],["cem","cento","duzentos","trezentos","quatrocentos","quinhentos","seiscentos","setecentos","oitocentos","novecentos"],["mil","milhão","bilhão","trilhão","quadrilhão","quintilhão","sextilhão","setilhão","octilhão","nonilhão","decilhão","undecilhão","dodecilhão","tredecilhão","quatrodecilhão","quindecilhão","sedecilhão","septendecilhão","octencilhão","nonencilhão"]],a=this.replace(e?/[^,\d]/g:/\D/g,"").split(","),s=" e ",l="real",p="centavo",d=a.length-1,c=-1,u=[],h=[],g="";++c<=d;h=[])if(c&&(a[c]=(1*Number("."+a[c])).toFixed(2).slice(2)),(t=(n=a[c]).slice((o=n.length)%3).match(/\d{3}/g),n=o%3?[n.slice(0,o%3)]:[],n=t?n.concat(t):n).length){for(t=-1,o=n.length;++t<o;g="")(i=1*n[t])&&(i%100<20&&(g+=r[0][i%100])||i%100+1&&(g+=r[1][(i%100/10>>0)-1]+(i%10?s+r[0][i%10]:"")),h.push((i<100?g:i%100?r[2][i/100>>0]+s+g:r[2][100==i?0:i/100>>0])+(Number(g=String(o-t-2))>-1?" "+(i>1&&Number(g)>0?r[3][g].replace("ão","ões"):r[3][g]):"")));(t=h.length>1?(t=h.pop(),h.join(" ")+s+t):h.join("")||(!c&&1*Number(a[c+1])>0||u.length?"":r[0][0]))&&u.push(t+(e?" "+(1*n.join("")>1?c?p+"s":(/0{6,}$/.test(a[0])?"de ":"")+l.replace("l","is"):c?p:l):""))}return u.join(s)};var Aa,Ta=function(){function e(){}return e.transform=function(e,t,n){return ze.isNull(e)?je.EMPTY:n?i.formatPercent(e,"pt",t):i.formatCurrency(e,"pt","R$",t)},e.transformNumberFullName=function(e,t){return void 0===t&&(t=!0),this.transform(e,"1.2-2").substring(2).trim().numberFullName(t)},e}(),Ma=function(){function e(){}return e.clearFormat=function(e){return je.isEmpty(e)?"":e.replace(/\D/g,"")},e.isValidCpf=function(e){if(je.isEmpty(e))return!1;if(11!==(e=je.removeAccents(e)).length||"00000000000"===e||"11111111111"===e||"22222222222"===e||"33333333333"===e||"44444444444"===e||"55555555555"===e||"66666666666"===e||"77777777777"===e||"88888888888"===e||"99999999999"===e)return!1;for(var t=0,n=0;n<9;n++)t+=+e.charAt(n)*(10-n);var i=11-t%11;if(10!==i&&11!==i||(i=0),i!==+e.charAt(9))return!1;t=0;for(n=0;n<10;n++)t+=+e.charAt(n)*(11-n);return 10!==(i=11-t%11)&&11!==i||(i=0),i===+e.charAt(10)},e.isValidCnpj=function(e){if(je.isEmpty(e))return!1;if(e=je.removeAccents(e),je.isEmpty(e)||14!==e.length||"00000000000000"===e||"11111111111111"===e||"22222222222222"===e||"33333333333333"===e||"44444444444444"===e||"55555555555555"===e||"66666666666666"===e||"77777777777777"===e||"88888888888888"===e||"99999999999999"===e)return!1;for(var t=e.length-2,n=e.substring(0,t),i=e.substring(t),o=0,r=t-7,a=t;a>=1;a--)o+=+n.charAt(t-a)*r--,r<2&&(r=9);var s=o%11<2?0:11-o%11;if(s!==+i.charAt(0))return!1;t+=1,n=e.substring(0,t),o=0,r=t-7;for(a=t;a>=1;a--)o+=+n.charAt(t-a)*r--,r<2&&(r=9);return(s=o%11<2?0:11-o%11)===+i.charAt(1)},e.isValidStateRegistration=function(e,t){if(je.isEmpty(e)||je.isEmpty(t))return!1;if("ISENTO"===t.toUpperCase())return!0;if("GO"===e){var n=ye.onlyNumbers(t);return this.calcDigit(n)}return ye.isValidIE(e,t)},e.isValidCep=function(e){return!je.isEmpty(e)&&ye.isValidCEP(e)},e.calcDigit=function(e){var t=e.length,n=t-1,i=t,o=e.substring(0,n),r=0;o.split("").forEach((function(e){r+=parseInt(e,10)*i,i--}));var a=11-r%11,s=0;return Number(e)>=101031050&&Number(e)<=101199979&&(s=1),10===a?a=s:11===a&&(a=0),a===parseInt(e.charAt(n),10)},e}(),Fa=function(){function e(){}return e.isValid=function(e){return/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e)&&(e.includes("org")||e.includes(".com")||e.includes(".br")||e.includes(".net")||e.includes(".pt")||e.includes(".io")||e.includes(".ru")||e.includes(".uk")||e.includes(".de")||e.includes(".tk")||e.includes(".info")||e.includes(".nl")||e.includes(".eu")||e.includes(".it")||e.includes(".au")||e.includes(".fr")||e.includes(".site"))},e}(),Na=function(){function e(e){this.sortable$=!1,this.hiddenSm$=!1,this.visible$=!0,this.align$="start center",this.breakpointObserverService$=e}return e.instance=function(t){return new e(t)},e.prototype.name=function(e){return this.name$=e,this},e.prototype.property=function(e){return this.property$=e,this},e.prototype.value=function(e){return this.value$=e,this},e.prototype.sortable=function(e){return this.sortable$=e,this},e.prototype.hiddenSm=function(e){return this.hiddenSm$=e,this},e.prototype.visible=function(e){return this.visible$=e,this},e.prototype.width=function(e){return this.width$=ie.of(e),this},e.prototype.marginLeft=function(e){return this.marginLeft$=ie.of(e),this},e.prototype.marginRight=function(e){return this.marginRight$=ie.of(e),this},e.prototype.align=function(e){return this.align$=e,this},e.prototype.breakpointWidth=function(e){return this.width$=this.breakpointObserverService$.size$.pipe(oe.map((function(t){return e.has(t)?e.get(t):"auto"}))),this},e.prototype.template=function(e){return this.template$=e,this},e.prototype.templateHeader=function(e){return this.templateHeader$=e,this},e.prototype.sliceLength=function(e){return this.sliceLength$=e,this},e.prototype.action=function(e){return this.action$=e,this},e.prototype.build=function(){return new Sa(this.name$,this.property$,this.value$,this.sortable$,this.hiddenSm$,this.visible$,this.width$,this.marginLeft$,this.marginRight$,this.align$,this.template$,this.templateHeader$,this.sliceLength$,this.action$)},e}(),La=function(){function e(){}return e.get=function(e){return this._queryParams.get(e)},e.has=function(e){return this._queryParams.has(e)},e._queryParams=new URLSearchParams(window.location.href),e}();function Va(e,t){if(!Reflect.getMetadata)throw new Error("You forgot add \"import 'reflect-metadata';\" to polyfills.ts");return Reflect.getMetadata("design:type",e,t)}(Aa=e.GIPISortDirectionEnum||(e.GIPISortDirectionEnum={})).ASC="ASC",Aa.DESC="DESC";var ja=function(){},Ba=function(){},za=function(){function e(e,t){this.description=e,this.key=t}return Object.defineProperty(e.prototype,"description",{get:function(){return this._description},set:function(e){this._description=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this._key},set:function(e){this._key=e},enumerable:!1,configurable:!0}),e}(),Ya=function(){},Ha=function(){function e(e,t,n){e&&e>=0&&(this.pageIndex=e),t&&t>=0&&(this.pageSize=t),n&&n>=0&&(this.length=n)}return Object.defineProperty(e.prototype,"pageIndex",{get:function(){return this._pageIndex},set:function(e){this._pageIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageSize",{get:function(){return this._pageSize},set:function(e){this._pageSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(e){this._length=e},enumerable:!1,configurable:!0}),e}(),Ua=function(){function e(e,t){this.overlay=e,this.injector=t}return e.prototype.open=function(e){var t=e.origin,n=e.content,i=e.data,o=e.width,r=e.height,a=e.event,s=this.overlay.create(this.getOverlayConfig({origin:t,width:o,height:r,event:a})),l=new ut(s,n,i),p=this.createInjector(l,this.injector);return s.attach(new y.ComponentPortal(ht,null,p)),l},e.prototype.getOverlayConfig=function(e){var t=e.origin,n=e.width,i=e.height,o=e.event;return new ue.OverlayConfig({hasBackdrop:!0,width:n,height:i,backdropClass:"popover-backdrop",positionStrategy:this.getOverlayPosition(t,o),scrollStrategy:this.overlay.scrollStrategies.reposition()})},e.prototype.getOverlayPosition=function(e,t){var n=t.target.offsetTop-document.querySelector(".mat-sidenav-content").scrollTop;return t?this.overlay.position().global().top(n+50+"px").left(t.clientX-30+"px"):this.overlay.position().flexibleConnectedTo(e).withPositions(this.getPositions()).withFlexibleDimensions(!1).withPush(!1)},e.prototype.updatePosition=function(e,t){e.overlay.updatePositionStrategy(this.overlay.position().global().top(t.clientY+"px").left(t.clientX+"px"))},e.prototype.createInjector=function(e,t){var n=new WeakMap([[ut,e]]);return new y.PortalInjector(t,n)},e.prototype.getPositions=function(){return[{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}]},e.ctorParameters=function(){return[{type:ue.Overlay},{type:t.Injector}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(ue.Overlay),t.ɵɵinject(t.INJECTOR))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[ue.Overlay,t.Injector])],e)}(),Ga=function(){function e(e,t,n,i,o,r,a,s,l,p,d,c,u,h,g,m,f,y,v,b,x,_){this._sortable=!1,this._visible=!0,this._checkboxable=!1,this._name=e,this._property=t,this._value=n,this._sortable=i,this._visible=o,this._checkboxable=r,this._columnSpan=a,this._columnSpanXs=s,this._columnSpanSm=l,this._columnSpanMd=p,this._columnSpanLg=d,this._columnSpanXl=c,this._minWidth=u,this._maxWidth=h,this._paddingInline=g,this._align=m,this._templateCell=f,this._templateHeader=y,this._sliceLength=v,this._comparator=b,this._pipe=x,this._action=_}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"property",{get:function(){return this._property},set:function(e){this._property=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sortable",{get:function(){return this._sortable},set:function(e){this._sortable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"checkboxable",{get:function(){return this._checkboxable},set:function(e){this._checkboxable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpan",{get:function(){return this._columnSpan},set:function(e){this._columnSpan=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanXs",{get:function(){return this._columnSpanXs},set:function(e){this._columnSpanXs=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanSm",{get:function(){return this._columnSpanSm},set:function(e){this._columnSpanSm=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanMd",{get:function(){return this._columnSpanMd},set:function(e){this._columnSpanMd=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanLg",{get:function(){return this._columnSpanLg},set:function(e){this._columnSpanLg=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanXl",{get:function(){return this._columnSpanXl},set:function(e){this._columnSpanXl=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minWidth",{get:function(){return this._minWidth},set:function(e){this._minWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(e){this._maxWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddingInline",{get:function(){return this._paddingInline},set:function(e){this._paddingInline=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"templateCell",{get:function(){return this._templateCell},set:function(e){this._templateCell=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"templateHeader",{get:function(){return this._templateHeader},set:function(e){this._templateHeader=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceLength",{get:function(){return this._sliceLength},set:function(e){this._sliceLength=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"comparator",{get:function(){return this._comparator},set:function(e){this._comparator=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pipe",{get:function(){return this._pipe},set:function(e){this._pipe=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"action",{get:function(){return this._action},set:function(e){this._action=e},enumerable:!1,configurable:!0}),e}(),qa=function(){function e(){this._sortable$=!1,this._visible$=!0,this._checkboxable$=!1,this._align$="left"}return e.instance=function(){return new e},e.prototype.name=function(e){return this._name$=e,this},e.prototype.property=function(e){return this._property$=e,this},e.prototype.value=function(e){return this._value$=e,this},e.prototype.sortable=function(e){return this._sortable$=e,this},e.prototype.visible=function(e){return this._visible$=e,this},e.prototype.checkboxable=function(e){return this._checkboxable$=e,this},e.prototype.columnSpan=function(e){return this._columnSpan$=e,this},e.prototype.columnSpanXs=function(e){return this._columnSpanXs$=e,this},e.prototype.columnSpanSm=function(e){return this._columnSpanSm$=e,this},e.prototype.columnSpanMd=function(e){return this._columnSpanMd$=e,this},e.prototype.columnSpanLg=function(e){return this._columnSpanLg$=e,this},e.prototype.columnSpanXl=function(e){return this._columnSpanXl$=e,this},e.prototype.minWidth=function(e){return this._minWidth$=e,this},e.prototype.maxWidth=function(e){return this._maxWidth$=e,this},e.prototype.paddingInline=function(e){return this._paddingInline$=e,this},e.prototype.align=function(e){return this._align$=e,this},e.prototype.templateCell=function(e){return this._templateCell$=e,this},e.prototype.templateHeader=function(e){return this._templateHeader$=e,this},e.prototype.sliceLength=function(e){return this._sliceLength$=e,this},e.prototype.comparator=function(e){return this._comparator$=e,this},e.prototype.pipe=function(e){return this._pipe$=e,this},e.prototype.action=function(e){return this._action$=e,this},e.prototype.build=function(){return new Ga(this._name$,this._property$,this._value$,this._sortable$,this._visible$,this._checkboxable$,this._columnSpan$,this._columnSpanXs$,this._columnSpanSm$,this._columnSpanMd$,this._columnSpanLg$,this._columnSpanXl$,this._minWidth$,this._maxWidth$,this._paddingInline$,this._align$,this._templateCell$,this._templateHeader$,this._sliceLength$,this._comparator$,this._pipe$,this._action$)},e}();e.APP_MESSAGES=De,e.AbstractComponent=He,e.AbstractCrudComponent=Hr,e.AbstractCrudService=Ra,e.AbstractDTO=Ge,e.AbstractFindComponent=Yr,e.AbstractFindService=Pa,e.AbstractModel=ya,e.AbstractService=We,e.AlertComponent=$e,e.Archive=Ue,e.ArrayUtil=Et,e.AuthGuard=ma,e.AuthInterceptor=qr,e.AuthenticationService=Gr,e.BaseUser=va,e.BreakpointObserverService=xi,e.BrowserUtil=pr,e.ButtonComponent=Me,e.CalendarMonthYearComponent=wr,e.CardComponent=Fe,e.ChartDTO=ba,e.CheckboxComponent=Ne,e.ConfirmationDTO=bn,e.ConfirmationService=Sn,e.CoreModule=da,e.CurrencyUtil=Ta,e.DEFAULT_MESSAGES=Pe,e.DateAdapter=Ji,e.DateRange=Qi,e.DateRangePickerComponent=cr,e.DateUtil=$i,e.DatepickerModule=xr,e.DefaultMatCalendarRangeStrategy=yo,e.DialogDTO=xa,e.DialogService=Wr,e.DocumentUtil=Ma,e.EmailUtil=Fa,e.ErrorInterceptor=$r,e.FilterDTO=_a,e.GIPIAbstractComponent=ia,e.GIPIAbstractCrudComponent=oa,e.GIPIAbstractCrudService=Qr,e.GIPIAbstractDTO=Ya,e.GIPIAbstractFilterModel=ja,e.GIPIAbstractFindComponent=sa,e.GIPIAbstractFormComponent=dn,e.GIPIAbstractModel=Ba,e.GIPIAbstractService=Jr,e.GIPIActionRowComponent=pn,e.GIPIAppliedFilter=za,e.GIPIAutowired=function(){return function(e,n){var i=!e.constructor["ɵcmp"],o=Va(e,n),r=function(){var i=e.constructor["ɵcmp"],r=null;r=ze.isNull(i)?e.constructor["ɵfac"]:i.factory,i.factory=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var a=r.apply(void 0,ke(e));return a[n]=t.ɵɵdirectiveInject(o),a}};i?Promise.resolve().then(r).catch((function(){throw new Error("An error occurred while injecting the class: "+o)})):r()}},e.GIPIBadgeComponent=cn,e.GIPIBaseService=na,e.GIPIBreakpointService=Zt,e.GIPIButtonComponent=gn,e.GIPICardComponent=fn,e.GIPIColDirective=Qt,e.GIPIConfirmationDialogComponent=xn,e.GIPIConnectedOverlayScrollHandler=Yn,e.GIPIDomHandler=un,e.GIPIDropdownMenuComponent=wn,e.GIPIDynamicTabDirective=rn,e.GIPIEmptyStateComponent=Cn,e.GIPIExpansionPanelComponent=In,e.GIPIFileDragAndDropComponent=En,e.GIPIFileService=ea,e.GIPIFooterComponent=On,e.GIPIFormFieldComponent=Dn,e.GIPIHelpfulTipComponent=Rn,e.GIPIInfiniteScrollDirective=$t,e.GIPIInputCheckboxComponent=Tn,e.GIPIInputCurrencyComponent=Fn,e.GIPIInputMonthPickerComponent=Ln,e.GIPIInputPhoneComponent=jn,e.GIPIInputSearchComponent=Xn,e.GIPIInputSelectComponent=$n,e.GIPIInputSelectEnumComponent=zn,e.GIPIInputSelectListboxComponent=Kn,e.GIPIInputSelectPagedComponent=Jn,e.GIPIInputSelectRadioComponent=ei,e.GIPINotificationComponent=ti,e.GIPINoveltiesComponent=ni,e.GIPIOverlayComponent=Gn,e.GIPIOverlayService=lt,e.GIPIPageEvent=Ha,e.GIPIPageModel=ra,e.GIPIPaginatePipe=ln,e.GIPIPaginationControlsDirective=on,e.GIPIPaginationService=nn,e.GIPIPasswordRequerimentsComponent=ri,e.GIPIPopoverComponent=si,e.GIPIPopoverTarget=li,e.GIPIPopoverTrigger=hn,e.GIPIRadioGroupComponent=di,e.GIPIRangePageComponent=hi,e.GIPIRangeSliderComponent=mi,e.GIPIResizeService=Kt,e.GIPIRowDirective=Jt,e.GIPISelectButtonComponent=fi,e.GIPISelectComponent=yi,e.GIPISessionStorageService=ta,e.GIPISidenavComponent=Ci,e.GIPISidenavContainerComponent=wi,e.GIPISkeletonComponent=en,e.GIPISkeletonDirective=tn,e.GIPISlideToggleComponent=Si,e.GIPISortModel=aa,e.GIPISplitButtonComponent=Oi,e.GIPIStepperComponent=ki,e.GIPITabComponent=ji,e.GIPITabGroupComponent=zi,e.GIPITableBodyComponent=Di,e.GIPITableComponent=Ni,e.GIPITableFooterComponent=Pi,e.GIPITableHeaderComponent=Ai,e.GIPITablePaginationComponent=Ti,e.GIPITableProgressBarComponent=Fi,e.GIPITemplateDirective=an,e.GIPITextareaComponent=Hi,e.GIPIToolbarComponent=Ui,e.GIPITopNavComponent=Gi,e.GIPIUserProfileComponent=Wi,e.GIPI_BREAKPOINTS=Ut,e.GIPI_CUSTOM_BREAKPOINTS_PROVIDER=Gt,e.GIPI_MONTH_YEAR_SCROLL_STRATEGY=Ir,e.GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY=Sr,e.GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY_PROVIDER=Or,e.IconComponent=Le,e.InputComponent=Qe,e.InputCurrencyComponent=Ve,e.InputFileComponent=Xe,e.InputListboxDTO=wa,e.ItssTemplate=Vt,e.LoadingComponent=tt,e.LoadingOverlayComponent=et,e.LocalTimePipe=Zr,e.MAT_DATEPICKER_SCROLL_STRATEGY=Vo,e.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY=jo,e.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER=zo,e.MAT_DATEPICKER_VALIDATORS=Wo,e.MAT_DATEPICKER_VALUE_ACCESSOR=$o,e.MAT_DATE_FORMATS=Re,e.MAT_DATE_LOCALE=Ki,e.MAT_DATE_LOCALE_FACTORY=Xi,e.MAT_DATE_LOCALE_PROVIDER=Zi,e.MAT_DATE_RANGE_SELECTION_STRATEGY=fo,e.MAT_NATIVE_DATE_FORMATS={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},e.MAT_RANGE_DATE_SELECTION_MODEL_FACTORY=ro,e.MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER=ao,e.MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY=io,e.MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER=oo,e.MatCalendar=Eo,e.MatCalendarBody=co,e.MatCalendarCell=po,e.MatCalendarHeader=Oo,e.MatDateRangeInput=Jo,e.MatDateRangePicker=Go,e.MatDateSelectionModel=eo,e.MatDatepicker=qo,e.MatDatepickerContent=Ho,e.MatDatepickerInput=Xo,e.MatDatepickerInputEvent=ko,e.MatDatepickerIntl=lo,e.MatDatepickerToggle=er,e.MatDatepickerToggleIcon=Qo,e.MatEndDate=Fo,e.MatMonthView=xo,e.MatMultiYearView=_o,e.MatRangeDateSelectionModel=no,e.MatSingleDateSelectionModel=to,e.MatStartDate=Mo,e.MatYearView=So,e.MaxRangeDirective=hr,e.MaxRangeSelectionStrategy=ur,e.MenuDTO=Ca,e.MessageDTO=qe,e.MessageService=Ke,e.MonthPickerModel=Dr,e.MonthYear=kr,e.MonthYearPickerComponent=Rr,e.MonthYearPickerModule=Ar,e.MultitenantModel=Oa,e.NativeDateAdapter=lr,e.NavService=_i,e.NumberUtil=Ze,e.ObjectUtil=ze,e.OverlayPanelComponent=ct,e.POINTS_NAME=vi,e.PageDTO=jr,e.PasswordUtil=ii,e.Permission=ka,e.PermissionGuard=fa,e.PhoneMaskDirective=zt,e.PhoneUtil=Je,e.Platform=nr,e.PopoverComponent=ht,e.PopoverRef=ut,e.PopoverService=Ua,e.PresetRangeComponent=mr,e.RadioGroupEntityComponent=gt,e.RadioGroupEnumComponent=ft,e.RangePage=ui,e.Role=Da,e.SelectButtonAddComponent=vt,e.SelectButtonNextBatchComponent=bt,e.SelectEntityComponent=Ot,e.SelectEntityPagedComponent=yt,e.SelectEnumComponent=kt,e.SelectMonthPeriodComponent=Dt,e.SelectNoEntriesFoundDirective=xt,e.SelectSearchClearDirective=_t,e.SelectSearchComponent=It,e.SharedModule=Vr,e.SlideToggleComponent=Pt,e.SortDTO=Br,e.SortModel=Ri,e.StepperComponent=Rt,e.StringUtil=je,e.SvgRegisterService=Kr,e.TabDTO=Ia,e.TabModel=Li,e.TableColumnBuilder=Na,e.TableColumnBuilderModel=qa,e.TableColumnDTO=Sa,e.TableColumnModel=Ga,e.TableComponent=Nt,e.TableScrolledComponent=Mt,e.TimeUtil=Xr,e.TokenDTO=Ea,e.URLParamsUtil=La,e.UUIDUtil=Ye,e.customCurrencyMaskConfig=pa,e.getReflectType=Va,e.gridResponsiveMap=Xt,e.matDatepickerAnimations=No,e.siderResponsiveMap={xs:"(max-width: 420px)",sm:"(max-width: 600px)",md:"(max-width: 768px)",lg:"(max-width: 1366px)",xl:"(max-width: 1920px)"},e.transformPopover=ai,e.yearsPerPage=24,e.yearsPerRow=4,e.ƟCMP="ɵcmp",e.ƟFAC="ɵfac",e.ƟPROV="ɵprov",e.ɵ0=Lr,e.ɵa=Ro,e.ɵb=vo,e.ɵc=bo,e.ɵd=Uo,e.ɵe=Ko,e.ɵf=Do,e.ɵg=st,e.ɵh=vn,e.ɵi=qt,e.ɵj=Lt,e.ɵk=Ht,e.ɵl=Bt,e.ɵm=Yt,e.ɵn=jt,e.ɵo=Ct,e.ɵq=Te,e.ɵr=vr,Object.defineProperty(e,"__esModule",{value:!0})}));
|
66
|
+
*/var Ro=new t.InjectionToken("MAT_DATE_RANGE_INPUT_PARENT"),Ao=function(e){function n(t,n,i,o,r,a,s,l){var p=e.call(this,n,s,l)||this;return p._rangeInput=t,p._defaultErrorStateMatcher=i,p._injector=o,p._parentForm=r,p._parentFormGroup=a,p._outsideValueChanged=function(){p._validatorOnChange()},p}return be(n,e),n.prototype.ngOnInit=function(){var e=this._injector.get(r.NgControl,null,t.InjectFlags.Self);this._injector.get(r.NgControl,null),e&&(this.ngControl=e)},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},n.prototype.isEmpty=function(){return 0===this._elementRef.nativeElement.value.length},n.prototype._getPlaceholder=function(){return this._elementRef.nativeElement.placeholder},n.prototype.focus=function(){this._elementRef.nativeElement.focus()},n.prototype._onInput=function(t){e.prototype._onInput.call(this,t),this._rangeInput._handleChildValueChange()},n.prototype._openPopup=function(){this._rangeInput._openDatepicker()},n.prototype._getMinDate=function(){return this._rangeInput.min},n.prototype._getMaxDate=function(){return this._rangeInput.max},n.prototype._getDateFilter=function(){return this._rangeInput.dateFilter},n.prototype._parentDisabled=function(){return this._rangeInput._groupDisabled},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Ro]}]},{type:t.ElementRef},{type:D.ErrorStateMatcher},{type:t.Injector},{type:r.NgForm,decorators:[{type:t.Optional}]},{type:r.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Ji,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[D.MAT_DATE_FORMATS]}]}]},n=_e([t.Directive({}),we(0,t.Inject(Ro)),we(4,t.Optional()),we(5,t.Optional()),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(D.MAT_DATE_FORMATS)),Ce("design:paramtypes",[Object,t.ElementRef,D.ErrorStateMatcher,t.Injector,r.NgForm,r.FormGroupDirective,Ji,Object])],n)}(Do),To=D.mixinErrorState(Ao),Mo=function(e){function n(t,n,i,o,a,s,l,p){var d=e.call(this,t,n,i,o,a,s,l,p)||this;return d._startValidator=function(e){var t=d._dateAdapter.getValidDateOrNull(d._dateAdapter.deserialize(e.value)),n=d._model?d._model.selection.end:null;return!t||!n||d._dateAdapter.compareDate(t,n)<=0?null:{matStartDateInvalid:{end:n,actual:t}}},d._validator=r.Validators.compose(ke(e.prototype._getValidators.call(d),[d._startValidator])),d._canEmitChangeEvent=function(e){return e.source!==d._rangeInput._endInput},d}var i;return be(n,e),i=n,n.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},n.prototype.ngDoCheck=function(){e.prototype.ngDoCheck.call(this)},n.prototype._getValueFromModel=function(e){return e.start},n.prototype._assignValueToModel=function(e){if(this._model){var t=new Qi(e,this._model.selection.end);this._model.updateSelection(t,this),this._cvaOnChange(e)}},n.prototype._formatValue=function(t){e.prototype._formatValue.call(this,t),this._rangeInput._handleChildValueChange()},n.prototype.getMirrorValue=function(){var e=this._elementRef.nativeElement,t=e.value;return t.length>0?t:e.placeholder},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Ro]}]},{type:t.ElementRef},{type:D.ErrorStateMatcher},{type:t.Injector},{type:r.NgForm,decorators:[{type:t.Optional}]},{type:r.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Ji,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[D.MAT_DATE_FORMATS]}]}]},n=i=_e([t.Directive({selector:"input[gipiMatStartDate]",host:{class:"mat-start-date mat-date-range-input-inner","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(keydown)":"_onKeydown($event)","[attr.id]":"_rangeInput.id","[attr.aria-haspopup]":'_rangeInput.rangePicker ? "dialog" : null',"[attr.aria-owns]":"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null","[attr.min]":"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null","[attr.max]":"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null","(blur)":"_onBlur()",type:"text"},providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:i,multi:!0},{provide:r.NG_VALIDATORS,useExisting:i,multi:!0}]}),we(0,t.Inject(Ro)),we(4,t.Optional()),we(5,t.Optional()),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(D.MAT_DATE_FORMATS)),Ce("design:paramtypes",[Object,t.ElementRef,D.ErrorStateMatcher,t.Injector,r.NgForm,r.FormGroupDirective,Ji,Object])],n)}(To),Fo=function(e){function n(t,n,i,o,a,s,l,p){var d=e.call(this,t,n,i,o,a,s,l,p)||this;return d._endValidator=function(e){var t=d._dateAdapter.getValidDateOrNull(d._dateAdapter.deserialize(e.value)),n=d._model?d._model.selection.start:null;return!t||!n||d._dateAdapter.compareDate(t,n)>=0?null:{matEndDateInvalid:{start:n,actual:t}}},d._validator=r.Validators.compose(ke(e.prototype._getValidators.call(d),[d._endValidator])),d._canEmitChangeEvent=function(e){return e.source!==d._rangeInput._startInput},d}var i;return be(n,e),i=n,n.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this)},n.prototype.ngDoCheck=function(){e.prototype.ngDoCheck.call(this)},n.prototype._getValueFromModel=function(e){return e.end},n.prototype._assignValueToModel=function(e){if(this._model){var t=new Qi(this._model.selection.start,e);this._model.updateSelection(t,this),this._cvaOnChange(e)}},n.prototype._onKeydown=function(t){t.keyCode!==se.BACKSPACE||this._elementRef.nativeElement.value||this._rangeInput._startInput.focus(),e.prototype._onKeydown.call(this,t)},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[Ro]}]},{type:t.ElementRef},{type:D.ErrorStateMatcher},{type:t.Injector},{type:r.NgForm,decorators:[{type:t.Optional}]},{type:r.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Ji,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[D.MAT_DATE_FORMATS]}]}]},n=i=_e([t.Directive({selector:"input[gipiMatEndDate]",host:{class:"mat-end-date mat-date-range-input-inner","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(keydown)":"_onKeydown($event)","[attr.aria-haspopup]":'_rangeInput.rangePicker ? "dialog" : null',"[attr.aria-owns]":"(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null","[attr.min]":"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null","[attr.max]":"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null","(blur)":"_onBlur()",type:"text"},providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:i,multi:!0},{provide:r.NG_VALIDATORS,useExisting:i,multi:!0}]}),we(0,t.Inject(Ro)),we(4,t.Optional()),we(5,t.Optional()),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(D.MAT_DATE_FORMATS)),Ce("design:paramtypes",[Object,t.ElementRef,D.ErrorStateMatcher,t.Injector,r.NgForm,r.FormGroupDirective,Ji,Object])],n)}(To),No={transformPanel:ae.trigger("transformPanel",[ae.state("void",ae.style({opacity:0,transform:"scale(1, 0.8)"})),ae.transition("void => enter",ae.animate("120ms cubic-bezier(0, 0, 0.2, 1)",ae.style({opacity:1,transform:"scale(1, 1)"}))),ae.transition("* => void",ae.animate("100ms linear",ae.style({opacity:0})))]),fadeInCalendar:ae.trigger("fadeInCalendar",[ae.state("void",ae.style({opacity:0})),ae.state("enter",ae.style({opacity:1})),ae.transition("void => *",ae.animate("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},Lo=0,Vo=new t.InjectionToken("mat-datepicker-scroll-strategy");function jo(e){return function(){return e.scrollStrategies.reposition()}}var Bo,zo={provide:Vo,deps:[ue.Overlay],useFactory:jo},Yo=function(e){this._elementRef=e},Ho=function(e){function n(t,n,i,o,r){var a=e.call(this,t)||this;return a._changeDetectorRef=n,a._model=i,a._dateAdapter=o,a._rangeSelectionStrategy=r,a._subscriptions=new ie.Subscription,a._animationState="enter",a._animationDone=new ie.Subject,a}return be(n,e),n.prototype.ngAfterViewInit=function(){var e=this;this._changeDetectorRef&&this._subscriptions.add(this.datepicker._stateChanges.subscribe((function(){e._changeDetectorRef.markForCheck()}))),this._calendar.focusActiveCell()},n.prototype.ngOnDestroy=function(){this._subscriptions.unsubscribe(),this._animationDone.complete()},n.prototype._handleUserSelection=function(e){if(this._model&&this._dateAdapter){var t=this._model.selection,n=e.value,i=t instanceof Qi;if(i&&this._rangeSelectionStrategy){var o=this._rangeSelectionStrategy.selectionFinished(n,t,e.event);this._model.updateSelection(o,this)}else!n||!i&&this._dateAdapter.sameDate(n,t)||this._model.add(n)}this._model&&!this._model.isComplete()||this.datepicker.close()},n.prototype._startExitAnimation=function(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()},n.prototype._getSelected=function(){return this._model?this._model.selection:null},n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:eo},{type:Ji},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[fo]}]}]},_e([t.ViewChild(Eo,{static:!0}),Ce("design:type",Eo)],n.prototype,"_calendar",void 0),n=_e([t.Component({selector:"gipi-mat-datepicker-content",template:'<gipi-mat-calendar cdkTrapFocus\n [id]="datepicker.id"\n [ngClass]="datepicker.panelClass"\n [startAt]="datepicker.startAt"\n [startView]="datepicker.startView"\n [minDate]="datepicker._getMinDate()"\n [maxDate]="datepicker._getMaxDate()"\n [dateFilter]="datepicker._getDateFilter()"\n [templatePresetRange]="datepicker.templatePresetRange"\n [selected]="_getSelected()"\n [dateClass]="datepicker.dateClass"\n [comparisonStart]="comparisonStart"\n [comparisonEnd]="comparisonEnd"\n [@fadeInCalendar]="\'enter\'"\n (yearSelected)="datepicker._selectYear($event)"\n (monthSelected)="datepicker._selectMonth($event)"\n (_userSelection)="_handleUserSelection($event)">\n</gipi-mat-calendar>',host:{class:"mat-datepicker-content","[@transformPanel]":"_animationState","(@transformPanel.done)":"_animationDone.next()","[class.mat-datepicker-content-touch]":"datepicker.touchUi"},animations:[No.transformPanel,No.fadeInCalendar],exportAs:"gipiMatDatepickerContent",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,inputs:["color"],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{min-width:296px;height:365px}.mat-datepicker-content .gipi-mat-calendar-wrapper .gipi-mat-calendar-content{min-width:296px;min-height:365px;border-left:1px solid rgba(0,0,0,.12)}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation:landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation:portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}"]}),we(4,t.Optional()),we(4,t.Inject(fo)),Ce("design:paramtypes",[t.ElementRef,t.ChangeDetectorRef,eo,Ji,Object])],n)}(D.mixinColor(Yo)),Uo=function(){function e(e,n,i,o,r,a,s,l,p){if(this._dialog=e,this._overlay=n,this._ngZone=i,this._viewContainerRef=o,this._dateAdapter=a,this._dir=s,this._document=l,this._model=p,this._inputStateChanges=ie.Subscription.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new t.EventEmitter,this.monthSelected=new t.EventEmitter,this.openedStream=new t.EventEmitter,this.closedStream=new t.EventEmitter,this._opened=!1,this.id="mat-datepicker-"+Lo++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=this.id+"-backdrop",this._stateChanges=new ie.Subject,!this._dateAdapter)throw so("DateAdapter");this._scrollStrategy=r}return Object.defineProperty(e.prototype,"startAt",{get:function(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)},set:function(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))},enumerable:!1,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:!1,configurable:!0}),Object.defineProperty(e.prototype,"touchUi",{get:function(){return this._touchUi},set:function(e){this._touchUi=le.coerceBooleanProperty(e)},enumerable:!1,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=le.coerceBooleanProperty(e);t!==this._disabled&&(this._disabled=t,this._stateChanges.next(void 0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){le.coerceBooleanProperty(e)?this.open():this.close()},enumerable:!1,configurable:!0}),e.prototype._getMinDate=function(){return this._datepickerInput&&this._datepickerInput.min},e.prototype._getMaxDate=function(){return this._datepickerInput&&this._datepickerInput.max},e.prototype._getDateFilter=function(){return this._datepickerInput&&this._datepickerInput.dateFilter},e.prototype.ngOnChanges=function(e){var t=e.xPosition||e.yPosition;t&&!t.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)},e.prototype.ngOnDestroy=function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()},e.prototype.select=function(e){this._model.add(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 MatDatepicker can only be associated with a single input.");return this._inputStateChanges.unsubscribe(),this._datepickerInput=e,this._inputStateChanges=e.stateChanges.subscribe((function(){return t._stateChanges.next(void 0)})),this._model},e.prototype.open=function(){if(!this._opened&&!this.disabled){if(!this._datepickerInput)throw Error("Attempted to open an MatDatepicker with no associated input.");this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit()}},e.prototype.close=function(){var e=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var t=this._popupComponentRef.instance;t._startExitAnimation(),t._animationDone.pipe(oe.take(1)).subscribe((function(){return e._destroyPopup()}))}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var n=function(){e._opened&&(e._opened=!1,e.closedStream.emit(),e._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}},e.prototype._openAsDialog=function(){var e=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(Ho,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:"cdk-overlay-dark-backdrop, "+this._backdropHarnessClass,width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!0,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe((function(){return e.close()})),this._forwardContentValues(this._dialogRef.componentInstance)},e.prototype._openAsPopup=function(){var e=this,t=new y.ComponentPortal(Ho,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(t),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(oe.take(1)).subscribe((function(){e._popupRef.updatePosition()}))},e.prototype._forwardContentValues=function(e){e.datepicker=this,e.color=this.color},e.prototype._createPopup=function(){var e=this,t=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new ue.OverlayConfig({positionStrategy:this._setConnectedPositions(t),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),ie.merge(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(oe.filter((function(t){return t.keyCode===se.ESCAPE||e._datepickerInput&&t.altKey&&t.keyCode===se.UP_ARROW})))).subscribe((function(t){t&&t.preventDefault(),e.close()}))},e.prototype._destroyPopup=function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)},e.prototype._setConnectedPositions=function(e){var t="end"===this.xPosition?"end":"start",n="start"===t?"end":"start",i="above"===this.yPosition?"bottom":"top",o="top"===i?"bottom":"top";return e.withPositions([{originX:t,originY:o,overlayX:t,overlayY:i},{originX:t,originY:i,overlayX:t,overlayY:o},{originX:n,originY:o,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:o}])},_e([t.Input(),Ce("design:type",t.TemplateRef)],e.prototype,"templatePresetRange",void 0),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],e.prototype,"startAt",null),_e([t.Input(),Ce("design:type",String)],e.prototype,"startView",void 0),_e([t.Input(),Ce("design:type",String),Ce("design:paramtypes",[String])],e.prototype,"color",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"touchUi",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",String)],e.prototype,"xPosition",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"yPosition",void 0),_e([t.Output(),Ce("design:type",t.EventEmitter)],e.prototype,"yearSelected",void 0),_e([t.Output(),Ce("design:type",t.EventEmitter)],e.prototype,"monthSelected",void 0),_e([t.Input(),Ce("design:type",Object)],e.prototype,"panelClass",void 0),_e([t.Input(),Ce("design:type",Function)],e.prototype,"dateClass",void 0),_e([t.Output("opened"),Ce("design:type",t.EventEmitter)],e.prototype,"openedStream",void 0),_e([t.Output("closed"),Ce("design:type",t.EventEmitter)],e.prototype,"closedStream",void 0),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"opened",null),e=_e([we(4,t.Inject(Vo)),we(5,t.Optional()),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(i.DOCUMENT)),Ce("design:paramtypes",[P.MatDialog,ue.Overlay,t.NgZone,t.ViewContainerRef,Object,Ji,ce.Directionality,Object,eo])],e)}(),Go=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return be(n,e),n.prototype._forwardContentValues=function(t){e.prototype._forwardContentValues.call(this,t);var n=this._datepickerInput;n&&(t.comparisonStart=n.comparisonStart,t.comparisonEnd=n.comparisonEnd)},n=_e([t.Component({selector:"gipi-mat-date-range-picker",template:"",exportAs:"gipiMatDateRangePicker",changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[ao,bo]})],n)}(Uo),qo=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return be(n,e),n=_e([t.Component({selector:"gipi-mat-datepicker",template:"",exportAs:"gipiMatDatepicker",changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[oo]})],n)}(Uo),$o={provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return Xo})),multi:!0},Wo={provide:r.NG_VALIDATORS,useExisting:t.forwardRef((function(){return Xo})),multi:!0},Ko=new t.InjectionToken("MatFormField"),Xo=function(e){function n(t,n,i,o){var a=e.call(this,t,n,i)||this;return a._formField=o,a._validator=r.Validators.compose(e.prototype._getValidators.call(a)),a}var i;return be(n,e),i=n,Object.defineProperty(n.prototype,"gipiMatDatepicker",{set:function(e){e&&(this._datepicker=e,this._registerModel(e._registerInput(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"min",{get:function(){return this._min},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._min)||(this._min=t,this._validatorOnChange())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"max",{get:function(){return this._max},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._max)||(this._max=t,this._validatorOnChange())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(e){this._dateFilter=e,this._validatorOnChange()},enumerable:!1,configurable:!0}),n.prototype.getConnectedOverlayOrigin=function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef},n.prototype.getThemePalette=function(){return this._formField?this._formField.color:void 0},n.prototype.getStartValue=function(){return this.value},n.prototype.getPopupConnectionElementRef=function(){return this.getConnectedOverlayOrigin()},n.prototype._openPopup=function(){this._datepicker&&this._datepicker.open()},n.prototype._getValueFromModel=function(e){return e},n.prototype._assignValueToModel=function(e){this._model&&this._model.updateSelection(e,this)},n.prototype._getMinDate=function(){return this._min},n.prototype._getMaxDate=function(){return this._max},n.prototype._getDateFilter=function(){return this._dateFilter},n.prototype._canEmitChangeEvent=function(){return!0},n.ctorParameters=function(){return[{type:t.ElementRef},{type:Ji,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[D.MAT_DATE_FORMATS]}]},{type:T.MatFormField,decorators:[{type:t.Optional},{type:t.Inject,args:[Ko]}]}]},_e([t.Input(),Ce("design:type",qo),Ce("design:paramtypes",[qo])],n.prototype,"gipiMatDatepicker",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],n.prototype,"min",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],n.prototype,"max",null),_e([t.Input("gipiMatDatepickerFilter"),Ce("design:type",Function),Ce("design:paramtypes",[Function])],n.prototype,"dateFilter",null),n=i=_e([t.Directive({selector:"input[gipiMatDatepicker]",providers:[$o,Wo,{provide:N.MAT_INPUT_VALUE_ACCESSOR,useExisting:i}],host:{class:"mat-datepicker-input","[attr.aria-haspopup]":'_datepicker ? "dialog" : null',"[attr.aria-owns]":"(_datepicker?.opened && _datepicker.id) || null","[attr.min]":"min ? _dateAdapter.toIso8601(min) : null","[attr.max]":"max ? _dateAdapter.toIso8601(max) : null","[attr.data-mat-calendar]":"_datepicker ? _datepicker.id : null","[disabled]":"disabled","(input)":"_onInput($event.target.value)","(change)":"_onChange()","(blur)":"_onBlur()","(keydown)":"_onKeydown($event)"},exportAs:"gipiMatDatepickerInput"}),we(1,t.Optional()),we(2,t.Optional()),we(2,t.Inject(D.MAT_DATE_FORMATS)),we(3,t.Optional()),we(3,t.Inject(Ko)),Ce("design:paramtypes",[t.ElementRef,Ji,Object,T.MatFormField])],n)}(Do),Zo=0,Jo=function(){function e(e,t,n,i,o){if(this._changeDetectorRef=e,this._elementRef=t,this._dateAdapter=i,this._formField=o,this.id="mat-date-range-input-"+Zo++,this.focused=!1,this.controlType="gipi-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="–",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new ie.Subject,!i)throw so("DateAdapter");this.ngControl=n}var n;return n=e,Object.defineProperty(e.prototype,"value",{get:function(){return this._model?this._model.selection:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){var e=this._startInput?this._startInput._getPlaceholder():"",t=this._endInput?this._endInput._getPlaceholder():"";return e||t?e+" "+this.separator+" "+t:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rangePicker",{get:function(){return this._rangePicker},set:function(e){e&&(this._model=e._registerInput(this),this._rangePicker=e,this._registerModel(this._model))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return!!this._required},set:function(e){this._required=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(e){this._dateFilter=e,this._revalidate()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._min)||(this._min=t,this._revalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){var t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._max)||(this._max=t,this._revalidate())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled},set:function(e){var t=le.coerceBooleanProperty(e);t!==this._groupDisabled&&(this._groupDisabled=t,this.stateChanges.next(void 0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){var e=!!this._startInput&&this._startInput.isEmpty(),t=!!this._endInput&&this._endInput.isEmpty();return e&&t},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this._ariaDescribedBy=e.length?e.join(" "):null},e.prototype.onContainerClick=function(){this.focused||this.disabled||(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())},e.prototype.ngAfterContentInit=function(){var e=this;if(!this._startInput)throw Error("mat-date-range-input must contain a matStartDate input");if(!this._endInput)throw Error("mat-date-range-input must contain a matEndDate input");this._model&&this._registerModel(this._model),ie.merge(this._startInput.stateChanges,this._endInput.stateChanges).subscribe((function(){e.stateChanges.next(void 0)}))},e.prototype.ngOnChanges=function(e){Po(e,this._dateAdapter)&&this.stateChanges.next(void 0)},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.getStartValue=function(){return this.value?this.value.start:null},e.prototype.getThemePalette=function(){return this._formField?this._formField.color:void 0},e.prototype.getConnectedOverlayOrigin=function(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef},e.prototype._getInputMirrorValue=function(){return this._startInput?this._startInput.getMirrorValue():""},e.prototype._shouldHidePlaceholders=function(){return!!this._startInput&&!this._startInput.isEmpty()},e.prototype._handleChildValueChange=function(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()},e.prototype._openDatepicker=function(){this._rangePicker&&this._rangePicker.open()},e.prototype._shouldHideSeparator=function(){return(!this._formField||this._formField._hideControlPlaceholder())&&this.empty},e.prototype._getAriaLabelledby=function(){var e=this._formField;return e&&e._hasFloatingLabel()?e._labelId:null},e.prototype._revalidate=function(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()},e.prototype._registerModel=function(e){this._startInput&&this._startInput._registerModel(e),this._endInput&&this._endInput._registerModel(e)},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:t.ElementRef},{type:r.ControlContainer,decorators:[{type:t.Optional},{type:t.Self}]},{type:Ji,decorators:[{type:t.Optional}]},{type:T.MatFormField,decorators:[{type:t.Optional},{type:t.Inject,args:[Ko]}]}]},_e([t.Input(),Ce("design:type",Go),Ce("design:paramtypes",[Go])],e.prototype,"rangePicker",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"required",null),_e([t.Input(),Ce("design:type",Function),Ce("design:paramtypes",[Function])],e.prototype,"dateFilter",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],e.prototype,"min",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],e.prototype,"max",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",Object)],e.prototype,"separator",void 0),_e([t.Input(),Ce("design:type",Object)],e.prototype,"comparisonStart",void 0),_e([t.Input(),Ce("design:type",Object)],e.prototype,"comparisonEnd",void 0),_e([t.ContentChild(Mo,{static:!0}),Ce("design:type",Mo)],e.prototype,"_startInput",void 0),_e([t.ContentChild(Fo,{static:!0}),Ce("design:type",Fo)],e.prototype,"_endInput",void 0),e=n=_e([t.Component({selector:"gipi-mat-date-range-input",template:'<div class="mat-date-range-input-container"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)="focused = $event !== null">\n <div class="mat-date-range-input-start-wrapper">\n\n <ng-content select="input[gipiMatStartDate]"> </ng-content>\n\n <span class="mat-date-range-input-mirror"\n aria-hidden="true">\n {{_getInputMirrorValue()}}\n </span>\n </div>\n\n <span class="mat-date-range-input-separator"\n [class.mat-date-range-input-separator-hidden]="_shouldHideSeparator()">\n {{separator}}\n </span>\n\n <div class="mat-date-range-input-end-wrapper">\n <ng-content select="input[gipiMatEndDate]"> </ng-content>\n </div>\n</div>',exportAs:"gipiMatDateRangeInput",host:{class:"mat-date-range-input","[class.mat-date-range-input-hide-placeholders]":"_shouldHidePlaceholders()","[class.mat-date-range-input-required]":"required","[attr.id]":"null",role:"group","[attr.aria-labelledby]":"_getAriaLabelledby()","[attr.aria-describedby]":"_ariaDescribedBy","[attr.data-mat-calendar]":"rangePicker ? rangePicker.id : null"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[{provide:T.MatFormFieldControl,useExisting:n},{provide:Ro,useExisting:n}],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center;padding-bottom:3px}.mat-date-range-input-separator{transition:opacity .4s cubic-bezier(.25,.8,.25,1) .133s;margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::-ms-input-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner::placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner::-moz-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner:-ms-input-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-ms-input-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}"]}),we(2,t.Optional()),we(2,t.Self()),we(3,t.Optional()),we(4,t.Optional()),we(4,t.Inject(Ko)),Ce("design:paramtypes",[t.ChangeDetectorRef,t.ElementRef,r.ControlContainer,Ji,T.MatFormField])],e)}(),Qo=function(){function e(){}return e=_e([t.Directive({selector:"[gipiDatepickerToggleIcon]"})],e)}(),er=function(){function e(e,t,n){this._intl=e,this._changeDetectorRef=t,this._stateChanges=ie.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?this.datepicker.disabled:!!this._disabled},set:function(e){this._disabled=le.coerceBooleanProperty(e)},enumerable:!1,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._stateChanges:ie.of(),n=this.datepicker&&this.datepicker._datepickerInput?this.datepicker._datepickerInput.stateChanges:ie.of(),i=this.datepicker?ie.merge(this.datepicker.openedStream,this.datepicker.closedStream):ie.of();this._stateChanges.unsubscribe(),this._stateChanges=ie.merge(this._intl.changes,t,n,i).subscribe((function(){return e._changeDetectorRef.markForCheck()}))},e.ctorParameters=function(){return[{type:lo},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},_e([t.Input("for"),Ce("design:type",Uo)],e.prototype,"datepicker",void 0),_e([t.Input(),Ce("design:type",Number)],e.prototype,"tabIndex",void 0),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",Boolean)],e.prototype,"disableRipple",void 0),_e([t.ContentChild(Qo,{static:!0}),Ce("design:type",Qo)],e.prototype,"_customIcon",void 0),_e([t.ViewChild("button",{static:!0}),Ce("design:type",I.MatButton)],e.prototype,"_button",void 0),e=_e([t.Component({selector:"gipi-mat-datepicker-toggle",template:'<button #button\n mat-icon-button\n type="button"\n [attr.aria-haspopup]="datepicker ? \'dialog\' : null"\n [attr.aria-label]="_intl.openCalendarLabel"\n [attr.tabindex]="disabled ? -1 : tabIndex"\n [disabled]="disabled"\n [disableRipple]="disableRipple"\n (click)="_open($event)">\n\n <svg *ngIf="!_customIcon"\n class="mat-datepicker-toggle-default-icon"\n viewBox="0 0 24 24"\n width="24px"\n height="24px"\n fill="currentColor"\n focusable="false">\n <path\n d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z" />\n </svg>\n\n <ng-content select="[gipiMatDatepickerToggleIcon]"> </ng-content>\n</button>',host:{class:"mat-datepicker-toggle","[attr.tabindex]":"disabled ? null : -1","[class.mat-datepicker-toggle-active]":"datepicker && datepicker.opened","[class.mat-accent]":'datepicker && datepicker.color === "accent"',"[class.mat-warn]":'datepicker && datepicker.color === "warn"',"[attr.data-mat-calendar]":"datepicker ? datepicker.id : null","(focus)":"_button.focus()"},exportAs:"gipiMatDatepickerToggle",encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}"]}),we(2,t.Attribute("tabindex")),Ce("design:paramtypes",[lo,t.ChangeDetectorRef,String])],e)}();try{Bo="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(e){Bo=!1}var tr,nr=function(){function e(e){this._platformId=e,this.isBrowser=this._platformId?i.isPlatformBrowser(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Bo)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}return e=_e([we(0,t.Inject(t.PLATFORM_ID)),Ce("design:paramtypes",[Object])],e)}();try{tr="undefined"!=typeof Intl}catch(e){tr=!1}var ir={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},or=sr(31,(function(e){return String(e+1)})),rr={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},ar=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function sr(e,t){for(var n=Array(e),i=0;i<e;i++)n[i]=t(i);return n}var lr=function(e){function n(t,n){var i=e.call(this)||this;i._platformId=n,i.useUtcForDisplay=!0,e.prototype.setLocale.call(i,t);var o=new nr(i._platformId);return o?(i.useUtcForDisplay=!o.TRIDENT,i._clampDate=o.TRIDENT||o.EDGE):(i.useUtcForDisplay=!0,i._clampDate=!1),i}return be(n,e),n.prototype.getYear=function(e){return e.getFullYear()},n.prototype.getMonth=function(e){return e.getMonth()},n.prototype.getDate=function(e){return e.getDate()},n.prototype.getDayOfWeek=function(e){return e.getDay()},n.prototype.getMonthNames=function(e){var t=this;if(tr){var n=new Intl.DateTimeFormat(this.locale,{month:e,timeZone:"utc"});return sr(12,(function(e){return t._stripDirectionalityCharacters(t._format(n,new Date(2017,e,1)))}))}return ir[e]},n.prototype.getDateNames=function(){var e=this;if(tr){var t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return sr(31,(function(n){return e._stripDirectionalityCharacters(e._format(t,new Date(2017,0,n+1)))}))}return or},n.prototype.getDayOfWeekNames=function(e){var t=this;if(tr){var n=new Intl.DateTimeFormat(this.locale,{weekday:e,timeZone:"utc"});return sr(7,(function(e){return t._stripDirectionalityCharacters(t._format(n,new Date(2017,0,e+1)))}))}return rr[e]},n.prototype.getYearName=function(e){if(tr){var t=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(t,e))}return String(this.getYear(e))},n.prototype.getFirstDayOfWeek=function(){return 0},n.prototype.getNumDaysInMonth=function(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+1,0))},n.prototype.clone=function(e){return new Date(e.getTime())},n.prototype.createDate=function(e,t,n){if(t<0||t>11)throw Error('Invalid month index "'+t+'". Month index has to be between 0 and 11.');if(n<1)throw Error('Invalid date "'+n+'". Date has to be greater than 0.');var i=this._createDateWithOverflow(e,t,n);if(i.getMonth()!=t)throw Error('Invalid date "'+n+'" for month with index "'+t+'".');return i},n.prototype.today=function(){return new Date},n.prototype.parse=function(e){return"number"==typeof e?new Date(e):e?new Date(Date.parse(e)):null},n.prototype.format=function(e,t){if(!this.isValid(e))throw Error("NativeDateAdapter: Cannot format invalid date.");if(tr){this._clampDate&&(e.getFullYear()<1||e.getFullYear()>9999)&&(e=this.clone(e)).setFullYear(Math.max(1,Math.min(9999,e.getFullYear()))),t=xe(xe({},t),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,t);return this._stripDirectionalityCharacters(this._format(n,e))}return this._stripDirectionalityCharacters(e.toDateString())},n.prototype.addCalendarYears=function(e,t){return this.addCalendarMonths(e,12*t)},n.prototype.addCalendarMonths=function(e,t){var n=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+t,this.getDate(e));return this.getMonth(n)!=((this.getMonth(e)+t)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n},n.prototype.addCalendarDays=function(e,t){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+t)},n.prototype.toIso8601=function(e){return[e.getUTCFullYear(),this._2digit(e.getUTCMonth()+1),this._2digit(e.getUTCDate())].join("-")},n.prototype.deserialize=function(t){if("string"==typeof t){if(!t)return null;if(ar.test(t)){var n=new Date(t);if(this.isValid(n))return n}}return e.prototype.deserialize.call(this,t)},n.prototype.isDateInstance=function(e){return e instanceof Date},n.prototype.isValid=function(e){return!isNaN(e.getTime())},n.prototype.invalid=function(){return new Date(NaN)},n.prototype._createDateWithOverflow=function(e,t,n){var i=new Date;return i.setFullYear(e,t,n),i.setHours(0,0,0,0),i},n.prototype._2digit=function(e){return("00"+e).slice(-2)},n.prototype._stripDirectionalityCharacters=function(e){return e.replace(/[\u200e\u200f]/g,"")},n.prototype._format=function(e,t){var n=new Date;return n.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setUTCHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e.format(n)},n.ctorParameters=function(){return[{type:String,decorators:[{type:t.Optional},{type:t.Inject,args:[Ki]}]},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]},n=_e([t.Injectable(),we(0,t.Optional()),we(0,t.Inject(Ki)),we(1,t.Inject(t.PLATFORM_ID)),Ce("design:paramtypes",[String,Object])],n)}(Ji),pr=function(){function e(){}return e.getBrowser=function(){for(var e=["MSIE","Firefox","Safari","Chrome","Opera"],t=navigator.userAgent,n=e.length-1;n>-1&&-1===t.indexOf(e[n]);n--);return e[n]},e}(),dr=he;e.nextUniqueId=0;var cr=function(){function n(t,n){this.elementRef=t,this._changeDetectorRef=n,this._name="gipi-date-range-"+e.nextUniqueId++,this.idStartDate=this._name+"-start",this.idEndDate=this._name+"-end",this.nameStartDate=this._name+"-start",this.nameEndDate=this._name+"-end",this.label="",this.placeholderStartDate="Inicial",this.placeholderEndDate="Final",this.help="",this.separator="-",this._customRangeLabel="Personalizado",this._maxRange=368,this._minDate=new Date("01/01/2000"),this._required=!1,this._readonly=!1,this._disabled=!1,this._dateFilter=null,this.onChange=function(){},this.onTouched=function(){}}var i;return i=n,Object.defineProperty(n.prototype,"startDate",{get:function(){return this._startDate},set:function(e){this._startDate=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"endDate",{get:function(){return this._endDate},set:function(e){this._endDate=e,this.value=new Qi(this.startDate,e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"customRangeLabel",{get:function(){return this._customRangeLabel},set:function(e){this._customRangeLabel=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ranges",{get:function(){return this._ranges},set:function(e){this._ranges=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxRange",{get:function(){return this._maxRange},set:function(e){this._maxRange=le.coerceNumberProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=e,this._minDate.setHours(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=e,this._maxDate.setHours(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"readonly",{get:function(){return this._readonly},set:function(e){this._readonly=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(e){this._dateFilter=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){var t=null,n=null;e&&e.start&&(t=dr(e.start).startOf("day").toDate()),e&&e.end&&(n=dr(e.end).endOf("day").toDate()),t&&n&&(this._value=new Qi(t,n),this.onChange(this._value),this.onTouched(this._value))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"formattedValue",{get:function(){return""},enumerable:!1,configurable:!0}),n.prototype.ngOnInit=function(){},n.prototype.ngOnDestroy=function(){},n.prototype.writeValue=function(e){e&&e.start?this.startDate=dr(e.start).startOf("day").toDate():this.startDate=null,e&&e.end?this.endDate=dr(e.end).endOf("day").toDate():this.endDate=null,this._changeDetectorRef.detectChanges()},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.onInputContentClick=function(e){this.readonly&&this.matDatepickerToggleRef&&this.matDatepickerToggleRef._open(e)},n.prototype.generatedStartDate=function(e,t){if(t||"Firefox"!==pr.getBrowser()){var n=!1;!e.includes("/")||t&&10!==e.length?e.includes("/")||t&&8!==e.length||(this.startDate=dr(e,"DDMMYYYY").toDate(),n=!0):(this.startDate=dr(e,"DD/MM/YYYY").toDate(),n=!0),"Firefox"!==pr.getBrowser()?n&&!$i.isValid(this.startDate)&&(this.startDate=void 0):n&&!this.startDate&&(this.startDate=void 0)}},n.prototype.generatedEndDate=function(e,t){if(t||"Firefox"!==pr.getBrowser()){var n=!1;!e.includes("/")||t&&10!==e.length?e.includes("/")||t&&8!==e.length||(this.endDate=dr(e,"DDMMYYYY").toDate(),n=!0):(this.endDate=dr(e,"DD/MM/YYYY").toDate(),n=!0),"Firefox"!==pr.getBrowser()?n&&!$i.isValid(this.endDate)&&(this.endDate=void 0):n&&!this.endDate&&(this.endDate=void 0)}},n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef}]},_e([t.ViewChild(er,{static:!0}),Ce("design:type",er)],n.prototype,"matDatepickerToggleRef",void 0),_e([t.Input("idStart"),Ce("design:type",String)],n.prototype,"idStartDate",void 0),_e([t.Input("idEnd"),Ce("design:type",String)],n.prototype,"idEndDate",void 0),_e([t.Input("nameStart"),Ce("design:type",String)],n.prototype,"nameStartDate",void 0),_e([t.Input("nameEnd"),Ce("design:type",String)],n.prototype,"nameEndDate",void 0),_e([t.Input(),Ce("design:type",String)],n.prototype,"label",void 0),_e([t.Input("placeholderStart"),Ce("design:type",String)],n.prototype,"placeholderStartDate",void 0),_e([t.Input("placeholderEnd"),Ce("design:type",String)],n.prototype,"placeholderEndDate",void 0),_e([t.Input(),Ce("design:type",String)],n.prototype,"help",void 0),_e([t.Input(),Ce("design:type",String)],n.prototype,"separator",void 0),_e([t.Input(),Ce("design:type",String),Ce("design:paramtypes",[String])],n.prototype,"customRangeLabel",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],n.prototype,"ranges",null),_e([t.Input(),Ce("design:type",Number),Ce("design:paramtypes",[Number])],n.prototype,"maxRange",null),_e([t.Input("min"),Ce("design:type",Date),Ce("design:paramtypes",[Date])],n.prototype,"minDate",null),_e([t.Input("max"),Ce("design:type",Date),Ce("design:paramtypes",[Date])],n.prototype,"maxDate",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],n.prototype,"required",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],n.prototype,"readonly",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],n.prototype,"disabled",null),_e([t.Input(),Ce("design:type",Function),Ce("design:paramtypes",[Function])],n.prototype,"dateFilter",null),_e([t.Input(),Ce("design:type",Qi),Ce("design:paramtypes",[Qi])],n.prototype,"value",null),n=i=_e([t.Component({selector:"gipi-date-range-picker",exportAs:"gipiDateRangePicker",template:'<div class="input-wrapper">\n\n <label *ngIf="label"\n class="input-label"\n [attr.for]="\'dateRangeInput\'">\n {{ label }}\n <span *ngIf="required"> * </span>\n </label>\n\n <div class="input-content"\n (click)="onInputContentClick($event)">\n <gipi-mat-date-range-input #matDateRangeInput\n id="dateRangeInput"\n [min]="minDate"\n [max]="maxDate"\n [disabled]="disabled"\n [required]="required"\n [separator]="separator"\n [rangePicker]="rangepicker">\n <input gipiMatStartDate\n class="input-element"\n [attr.id]="idStartDate"\n [attr.name]="nameStartDate"\n [placeholder]="placeholderStartDate"\n [disabled]="disabled"\n [required]="required"\n [readOnly]="readonly"\n [autocomplete]="\'off\'"\n [autofocus]="false"\n [maxlength]="10"\n [(ngModel)]="startDate"\n (keyup)="generatedStartDate($event.target.value, true)"\n (change)="generatedStartDate($event.target.value, false)" />\n\n <input gipiMatEndDate\n class="input-element"\n [attr.id]="idEndDate"\n [attr.name]="nameEndDate"\n [placeholder]="placeholderEndDate"\n [disabled]="disabled"\n [required]="required"\n [readOnly]="readonly"\n [autocomplete]="\'off\'"\n [autofocus]="false"\n [maxlength]="10"\n [(ngModel)]="endDate"\n (keyup)="generatedEndDate($event.target.value, true)"\n (change)="generatedEndDate($event.target.value, false)" />\n </gipi-mat-date-range-input>\n\n <div class="suffix">\n <gipi-mat-datepicker-toggle matSuffix\n [for]="rangepicker">\n </gipi-mat-datepicker-toggle>\n </div>\n </div>\n\n <small *ngIf="help"\n class="input-help">\n {{ help }}\n </small>\n</div>\n\n<gipi-mat-date-range-picker #rangepicker\n [maxRange]="maxRange"\n [templatePresetRange]="templatePresetRange">\n</gipi-mat-date-range-picker>\n\n<ng-template #templatePresetRange\n let-component>\n <gipi-preset-range [matDateRangeInput]="matDateRangeInput"\n [matCalendar]="component"\n [matDateRangePicker]="rangepicker"\n [customRangeLabel]="\'Personalizado\'"\n [maxRange]="maxRange"\n [ranges]="ranges">\n </gipi-preset-range>\n</ng-template>\n',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return i})),multi:!0}],host:{class:"gipi-date-range-picker"},styles:[":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::ng-deep .mat-date-range-input{height:4rem!important;padding-left:.8rem!important}::ng-deep .mat-date-range-input-container,::ng-deep .mat-date-range-input-end-wrapper,::ng-deep .mat-date-range-input-inner,::ng-deep .mat-date-range-input-start-wrapper{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:100%;min-height:100%;height:100%;padding-bottom:3px}::ng-deep .mat-date-range-input-end-wrapper{padding-bottom:0!important}::ng-deep .mat-date-range-input-inner{padding:0!important}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]}),Ce("design:paramtypes",[t.ElementRef,t.ChangeDetectorRef])],n)}(),ur=function(){function e(e){this._dateAdapter=e}return e.prototype.selectionFinished=function(e,t){var n=t.start,i=t.end;if(null==n)n=e;else if(null==i&&e&&this._dateAdapter.compareDate(e,n)>=0){var o=this._dateAdapter.addCalendarDays(n,this.delta-1);i=e>o?o:e}else n=e,i=null;return new Qi(n,i)},e.prototype.createPreview=function(e,t){if(t.start&&!t.end){var n=this._dateAdapter.addCalendarDays(t.start,this.delta-1),i=e?e>n?n:e:null;return new Qi(t.start,i)}return new Qi(null,null)},e.ctorParameters=function(){return[{type:Ji}]},e=_e([t.Injectable(),Ce("design:paramtypes",[Ji])],e)}(),hr=function(){function e(e){this.maxRangeStrategy=e}return Object.defineProperty(e.prototype,"maxRange",{set:function(e){this.maxRangeStrategy.delta=+e||365},enumerable:!1,configurable:!0}),e.ctorParameters=function(){return[{type:ur,decorators:[{type:t.Inject,args:[fo]}]}]},_e([t.Input(),Ce("design:type",Number),Ce("design:paramtypes",[Number])],e.prototype,"maxRange",null),e=_e([t.Directive({selector:"[maxRange]",providers:[{provide:fo,useClass:ur}]}),we(0,t.Inject(fo)),Ce("design:paramtypes",[ur])],e)}(),gr=he,mr=function(){function e(e){this._changeDetectorRef=e,this._destroy$=new ie.Subject,this.rangesArray=[],this.selectedRange="",this.matDateRangeInput=null,this.matCalendar=null,this.matDateRangePicker=null,this._customRangeLabel="Personalizado"}var n;return n=e,Object.defineProperty(e.prototype,"customRangeLabel",{get:function(){return this._customRangeLabel},set:function(e){this._customRangeLabel=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ranges",{get:function(){return this._ranges},set:function(e){this._ranges=e,this._renderRanges()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxRange",{get:function(){return this._maxRange},set:function(e){this._maxRange=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_startDate",{get:function(){return this.matCalendar.selected.start},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_endDate",{get:function(){return this.matCalendar.selected.end},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_minDate",{get:function(){return this.matCalendar.minDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_maxDate",{get:function(){return this.matCalendar.maxDate},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.matCalendar.stateChanges.pipe(oe.takeUntil(this._destroy$)).subscribe((function(){e._loadSelectedRange(),e._changeDetectorRef.markForCheck()})),this._loadSelectedRange()},e.prototype.ngOnDestroy=function(){this._destroy$.next()},e.prototype._renderRanges=function(){var e,t;if("object"==typeof this.ranges){for(var n in this.ranges)if(this.ranges[n]){e=(this.ranges[n][0],gr(this.ranges[n][0])),t=(this.ranges[n][1],gr(this.ranges[n][1]));var i=gr(this._minDate).clone(),o=gr(this._maxDate).clone();if(i.isValid()&&e.isBefore(i)&&(e=i.clone()),o.isValid()&&e.clone().add(this.maxRange-1,"days").isAfter(o)&&(o=e),o.isValid()&&t.isAfter(o)&&(t=o.clone()),i&&t.isBefore(i,"day")||o&&e.isAfter(o,"day"))continue;this.ranges[n]=[e,t]}for(var n in this.ranges)this.ranges[n]&&this.rangesArray.push(n)}this._loadSelectedRange()},e.prototype._loadSelectedRange=function(){var e=!0,t=0;if(this.rangesArray.length>0){var n=gr(this._startDate).startOf("day"),i=gr(this._endDate).startOf("day");for(var o in this.ranges)if(this.ranges[o]){var r=this.ranges[o][0].startOf("day"),a=this.ranges[o][1].startOf("day");if(n.isSame(r)&&i.isSame(a)){e=!1,this.selectedRange=this.rangesArray[t];break}t++}e&&(this.selectedRange=this.customRangeLabel)}else this.selectedRange=this.customRangeLabel},e.prototype._calculateDateRange=function(e){var t=this._minDate?gr(this._minDate):null,n=this._maxDate?gr(this._maxDate):null,i=Oe([this.ranges[e][0],this.ranges[e][1]],2),o=i[0],r=i[1],a=null,s=null;if(a=t&&o.isBefore(t)?t.clone():o.clone(),s=n&&r.isAfter(n)?n.clone():r.clone(),e===this.customRangeLabel){var l=this.matCalendar.selected;a=l.start,s=l.end}return[this._getValidDateOrNull(a.toDate()),this._getValidDateOrNull(s.toDate())]},e.prototype._getValidDateOrNull=function(e){return this._isDateInstance(e)&&this._isValid(e)?e:null},e.prototype._isDateInstance=function(e){return e instanceof Date},e.prototype._isValid=function(e){return!isNaN(e.getTime())},e.prototype.clickRange=function(e,t){if(t!==this.customRangeLabel){var n=Oe(this._calculateDateRange(t),2),i=n[0],o=n[1];this.matDateRangePicker.select(i),this.matDateRangePicker.select(o),this.matDateRangePicker.close()}},e.prototype.isDisableRange=function(e){var t=this;if(e===this._customRangeLabel)return!1;var n=this._ranges[e],i=n.every((function(e){var n=gr(t.matCalendar.minDate);return!!n&&gr(e).isBefore(n)})),o=n.every((function(e){var n=gr(t.matCalendar.maxDate);return!!n&&gr(e).isAfter(n)}));return i||o},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},_e([t.Input(),Ce("design:type",Jo)],e.prototype,"matDateRangeInput",void 0),_e([t.Input(),Ce("design:type",Eo)],e.prototype,"matCalendar",void 0),_e([t.Input(),Ce("design:type",Go)],e.prototype,"matDateRangePicker",void 0),_e([t.Input(),Ce("design:type",String),Ce("design:paramtypes",[String])],e.prototype,"customRangeLabel",null),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],e.prototype,"ranges",null),_e([t.Input(),Ce("design:type",Number),Ce("design:paramtypes",[Number])],e.prototype,"maxRange",null),e=n=_e([t.Component({selector:"gipi-preset-range",template:'<div class="preset-range-wrapper">\n <button *ngFor="let range of rangesArray"\n class="preset-range-btn"\n [class.selected]="range === selectedRange"\n [disabled]="isDisableRange(range)"\n (click)="clickRange($event, range)">\n {{ range }}\n </button>\n <button class="preset-range-btn"\n [disabled]="isDisableRange(customRangeLabel)"\n [class.selected]="selectedRange === customRangeLabel">\n {{ customRangeLabel }}\n </button>\n</div>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}],host:{class:"gipi-preset-range"},styles:[".preset-range-wrapper{display:flex;flex-direction:column;padding:.9rem;height:100%;background:#f0f0f0;border-top-left-radius:.6rem;border-bottom-left-radius:.6rem}.preset-range-btn{display:flex;align-items:center;justify-content:flex-start;padding:.8rem;height:3.6rem;border-radius:.6rem;background-color:transparent;outline:0;cursor:pointer;color:#595959;border:none;transition:.2s}.preset-range-btn.selected{background-color:#e0313e;color:#fff}.preset-range-btn.selected:hover{background-color:#9f232c}.preset-range-btn:hover{background-color:#e0313e;color:#fff}"]}),Ce("design:paramtypes",[t.ChangeDetectorRef])],e)}(),fr=he,yr=0,vr=function(){function e(e,t){this.elementRef=e,this._changeDetectorRef=t,this._name="gipi-date-range-"+yr++,this.id=this._name+"-date",this.name=this._name+"-date",this.label="",this.placeholder="__/__/____",this.help="",this._minDate=new Date("01/01/2000"),this._required=!1,this._readonly=!1,this._disabled=!1,this._dateFilter=null,this.onChange=function(){},this.onTouched=function(){}}var n;return n=e,Object.defineProperty(e.prototype,"minDate",{get:function(){return this._minDate},set:function(e){this._minDate=e,ze.isNull(e)||this._minDate.setHours(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{get:function(){return this._maxDate},set:function(e){this._maxDate=e,ze.isNull(e)||this._maxDate.setHours(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this._required},set:function(e){this._required=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readonly",{get:function(){return this._readonly},set:function(e){this._readonly=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dateFilter",{get:function(){return this._dateFilter},set:function(e){this._dateFilter=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,this.onChange(this._value),this.onTouched(this._value)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"formattedValue",{get:function(){return""},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){},e.prototype.writeValue=function(e){this.value=e,this._changeDetectorRef.detectChanges()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck()},e.prototype.onInputContentClick=function(e){this.readonly&&this.matDatepickerToggleRef},e.prototype.generatedDate=function(e,t){if(t||"Firefox"!==pr.getBrowser()){var n=!1;!e.includes("/")||t&&10!==e.length?e.includes("/")||t&&8!==e.length||(this.value=fr(e,"DDMMYYYY").toDate(),n=!0):(this.value=fr(e,"DD/MM/YYYY").toDate(),n=!0),"Firefox"!==pr.getBrowser()?n&&!$i.isValid(this.value)&&(this.value=void 0):n&&!this.value&&(this.value=void 0)}},e.prototype.validateMinAndMaxDate=function(e){var t=fr(e,"DD/MM/YYYY").toDate();$i.isLessThan(t,this.minDate)?this.value=void 0:this.maxDate&&(this.value=$i.isGreaterThan(t,this.maxDate)?void 0:t)},e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef}]},_e([t.ViewChild(er,{static:!0}),Ce("design:type",er)],e.prototype,"matDatepickerToggleRef",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"id",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"name",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"label",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"placeholder",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"help",void 0),_e([t.Input("min"),Ce("design:type",Date),Ce("design:paramtypes",[Date])],e.prototype,"minDate",null),_e([t.Input("max"),Ce("design:type",Date),Ce("design:paramtypes",[Date])],e.prototype,"maxDate",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"required",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"readonly",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",Function),Ce("design:paramtypes",[Function])],e.prototype,"dateFilter",null),_e([t.Input(),Ce("design:type",Date),Ce("design:paramtypes",[Date])],e.prototype,"value",null),e=n=_e([t.Component({selector:"gipi-datepicker",exportAs:"gipiDatePicker",template:'<div class="input-wrapper">\n\n <label *ngIf="label"\n class="input-label"\n [attr.for]="id">\n {{ label }}\n <span *ngIf="required"> * </span>\n </label>\n\n <div class="input-content"\n (click)="onInputContentClick($event)">\n <input matInput\n class="input-element"\n type="text"\n [attr.id]="id"\n [attr.name]="name"\n [gipiMatDatepicker]="picker"\n [min]="minDate"\n [max]="maxDate"\n [maxlength]="10"\n [placeholder]="placeholder"\n [disabled]="disabled"\n [required]="required"\n [readOnly]="readonly"\n [autocomplete]="\'off\'"\n [autofocus]="false"\n [(ngModel)]="value"\n (keyup)="generatedDate($event.target.value, true)"\n (change)="generatedDate($event.target.value, false)"\n (blur)="validateMinAndMaxDate($event.target.value)" />\n\n <div class="suffix">\n <gipi-mat-datepicker-toggle [for]="picker"> </gipi-mat-datepicker-toggle>\n </div>\n </div>\n\n <small *ngIf="help"\n class="input-help">\n {{ help }}\n </small>\n</div>\n\n<gipi-mat-datepicker #picker> </gipi-mat-datepicker>',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}],host:{class:"gipi-datepicker"},styles:[":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]}),Ce("design:paramtypes",[t.ElementRef,t.ChangeDetectorRef])],e)}(),br={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},xr=function(){function e(){}return e=_e([t.NgModule({imports:[i.CommonModule,I.MatButtonModule,P.MatDialogModule,ue.OverlayModule,m.A11yModule,y.PortalModule,r.FormsModule,r.ReactiveFormsModule,de.PlatformModule,a.MatNativeDateModule],exports:[v.ScrollingModule,r.FormsModule,r.ReactiveFormsModule,de.PlatformModule,Eo,co,qo,Ho,Xo,er,Qo,xo,So,_o,Oo,Jo,Mo,Fo,Go,hr,mr,cr,vr],declarations:[Eo,co,qo,Ho,Xo,er,Qo,xo,So,_o,Oo,Jo,Mo,Fo,Go,hr,mr,cr,vr],providers:[lo,zo,{provide:Ji,useClass:lr,deps:[Ki]},{provide:Ki,useValue:"pt-BR"},{provide:Re,useValue:br}],entryComponents:[Ho]})],e)}(),_r=he,wr=function(){function e(e){this._changeDetectorRef=e,this._subscriptions=new ie.Subscription,this._animationState="enter",this._animationDone=new ie.Subject,this.years=[],this.months=[],this._calendarView="both"}var n;return n=e,e.prototype.ngOnInit=function(){this._locale?_r.locale(this._locale):_r.locale("pt-br"),this.months=ke(this.monthYearPicker.model.months),this._calendarView=this.monthYearPicker.calendarView,"year"===this._calendarView&&this.toggleShowYears(),this.monthYearPicker.onValueChange(this.monthYearPicker.model.selectedMonthIndex,this.monthYearPicker.model.selectedMonthYear)},e.prototype.ngAfterViewInit=function(){var e=this;this._changeDetectorRef&&this._subscriptions.add(this.monthYearPicker._stateChanges.subscribe((function(){e._changeDetectorRef.markForCheck()})))},e.prototype.ngOnDestroy=function(){this._subscriptions.unsubscribe(),this._animationDone.complete()},e.prototype._startExitAnimation=function(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()},e.prototype.decrement=function(){this.monthYearPicker.model.decrementYear(),this.isShowYears&&this._renderYears()},e.prototype.increment=function(){this.monthYearPicker.model.incrementYear(),this.isShowYears&&this._renderYears()},e.prototype.selectMonth=function(e){this.monthYearPicker.model.selectMonth(e),this.monthYearPicker.onValueChange(this.monthYearPicker.model.selectedMonthIndex,this.monthYearPicker.model.selectedMonthYear),this.monthYearPicker.close()},e.prototype.isSelectedMonth=function(e){return this.monthYearPicker.model.selectedMonthIndex==e&&this.monthYearPicker.model.selectedMonthYear==this.monthYearPicker.model.selectedYearMoment.year()},e.prototype.isCurrentMonth=function(e){var t=_r().month(),n=_r().year();return e===t&&this.monthYearPicker.model.selectedYearMoment.year()===n},e.prototype.isDisabledMonth=function(e){var t=!1;if(!ze.isNull(this.monthYearPicker)){var n=ze.isNull(this.monthYearPicker.min)?null:this.monthYearPicker.min.month,i=ze.isNull(this.monthYearPicker.max)?null:this.monthYearPicker.max.month;ze.isNull(n)||ze.isNull(i)?ze.isNull(n)?ze.isNull(i)||(t=e>i):t=e<n:t=e<n||e>i}return t},e.prototype.toggleShowYears=function(){this.isShowYears=!this.isShowYears,this._renderYears()},e.prototype._renderYears=function(){this.years=[];for(var e=11;e>0;e--)this.years.push(this.monthYearPicker.model.selectedYearMoment.year()-e);for(e=0;e<=12;e++)this.years.push(this.monthYearPicker.model.selectedYearMoment.year()+e)},Object.defineProperty(e.prototype,"periodButtonLabel",{get:function(){var e,t;return this.isShowYears?(e=this.years[0],t=this.years[this.years.length-1],e+" – "+t):this.monthYearPicker.model.selectedYearText},enumerable:!1,configurable:!0}),e.prototype.selectYear=function(e){"both"===this._calendarView&&(this.isShowYears=!1),this.monthYearPicker.model.selectedYearMoment=_r().year(e),this.monthYearPicker.model.updateYearText(),"year"===this._calendarView&&(this.monthYearPicker.onValueChange(this.monthYearPicker.model.selectedMonthIndex,e),this.monthYearPicker.close())},e.prototype.isSelectedYear=function(e){return this.monthYearPicker.model.selectedYearMoment.year()===e},e.prototype.isCurrentYear=function(e){return _r().year()===e},e.prototype.isDisabledYear=function(e){var t=!1;if(!ze.isNull(this.monthYearPicker)){var n=ze.isNull(this.monthYearPicker.min)?null:this.monthYearPicker.min.year,i=ze.isNull(this.monthYearPicker.max)?null:this.monthYearPicker.max.year;ze.isNull(n)||ze.isNull(i)?ze.isNull(n)?ze.isNull(i)||(t=e>i):t=e<n:t=e<n||e>i}return t},e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e=n=_e([t.Component({selector:"gipi-calendar-month-year",exportAs:"gipiMonthYearPicker",template:'<div class="month-picker">\n <div class="card-header">\n <button class="month-btn btn-control"\n [class.fixed]="(_calendarView === \'year\')"\n (click)="(_calendarView === \'both\') ? toggleShowYears() : null">\n {{ periodButtonLabel }}\n\n <div *ngIf="(_calendarView === \'both\')"\n class="btn-icon-arrow"\n [class.icon-arrow-invert]="isShowYears">\n </div>\n </button>\n\n <div class="card-prev-next">\n <button class="month-btn btn-decrement"\n (click)="decrement()">\n <mat-icon> chevron_left </mat-icon>\n </button>\n\n <button class="month-btn btn-increment"\n (click)="increment()">\n <mat-icon> chevron_right </mat-icon>\n </button>\n </div>\n </div>\n\n <div class="card-body">\n <ng-container *ngIf="!isShowYears && (_calendarView === \'both\')">\n <div *ngFor="let month of months; let i = index">\n <button class="month-btn btn-block"\n [class.selected]="isSelectedMonth(i)"\n [class.current]="isCurrentMonth(i)"\n [disabled]="isDisabledMonth(i)"\n (click)="selectMonth(i)">\n {{ month }}\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf="isShowYears && ((_calendarView === \'both\') || (_calendarView === \'year\'))">\n <div *ngFor="let year of years; let i = index">\n <button class="month-btn btn-block"\n [class.selected]="isSelectedYear(year)"\n [class.current]="isCurrentYear(year)"\n [disabled]="isDisabledYear(year)"\n (click)="selectYear(year)">\n {{ year }}\n </button>\n </div>\n </ng-container>\n </div>\n</div>',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}],animations:[ge.matDatepickerAnimations.transformPanel,ge.matDatepickerAnimations.fadeInCalendar],host:{class:"gipi-calendar-month-year","[@transformPanel]":"_animationState","(@transformPanel.done)":"_animationDone.next()"},styles:[".month-picker{display:flex;flex-direction:column;border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);background-color:#fff;color:rgba(0,0,0,.87);padding:1rem;width:30rem;height:36.5rem}.month-picker .card-header{display:flex;justify-content:space-between;gap:1rem;padding-bottom:2rem;border-bottom:1px solid #595959}.month-picker .card-header .card-prev-next{display:flex;gap:1rem;align-items:center}.month-picker .card-body{display:-ms-grid;display:grid;-ms-grid-rows:(1fr)[6];grid-template-rows:repeat(6,1fr);-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr);grid-auto-flow:row dense;gap:.6rem;padding-top:1.6rem}.month-btn{display:flex;align-items:center;justify-content:center;gap:.4rem;border-radius:4px;outline:0;border:1px solid transparent;padding:1rem;cursor:pointer;background-color:transparent;transition:.2s;text-transform:uppercase;color:#595959}.month-btn>mat-icon{font-size:2rem;width:2rem;height:2rem;line-height:2rem}.month-btn:not(:disabled).btn-control{height:3.6rem;font-weight:700}.month-btn:not(:disabled).btn-control.fixed{cursor:default}.month-btn:not(:disabled).btn-control:not(.fixed):hover{background-color:#f0f0f0}.month-btn:not(:disabled).btn-decrement,.month-btn:not(:disabled).btn-increment{width:3.6rem;height:3.6rem;background-color:#e0313e;color:#fff}.month-btn:not(:disabled).btn-decrement:hover,.month-btn:not(:disabled).btn-increment:hover{background-color:#cc2d38}.month-btn:not(:disabled).btn-block{width:96%;height:96%;background-color:#f0f0f0;color:#595959;border-radius:.6rem;max-height:3.5rem}.month-btn:not(:disabled).btn-block:hover,.month-btn:not(:disabled).selected{background-color:#e0313e;color:#fff}.month-btn:not(:disabled).selected.current{box-shadow:inset 0 0 0 1px #fff!important}.month-btn:not(:disabled).current{box-shadow:inset 0 0 0 1px #e0313e!important}.month-btn:disabled{cursor:not-allowed;opacity:.6;color:#9a9da2}.btn-icon-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:solid transparent;border-top-width:5PX;border-top-style:solid;margin:0 0 0 5PX;vertical-align:middle}.btn-icon-arrow.icon-arrow-invert{transform:rotate(180deg)}"]}),Ce("design:paramtypes",[t.ChangeDetectorRef])],e)}(),Cr=he,Ir=new t.InjectionToken("gipi-month-year-scroll-strategy");function Sr(e){return function(){return e.scrollStrategies.reposition()}}var Er,Or={provide:Ir,deps:[ue.Overlay],useFactory:Sr},kr=function(){function e(e,t){this._month=e,this._year=t}return Object.defineProperty(e.prototype,"date",{get:function(){return Cr().day(1).month(this.month).year(this.year).startOf("day").toDate()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"month",{get:function(){return this._month},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"year",{get:function(){return this._year},enumerable:!1,configurable:!0}),e}(),Dr=function(){function e(){this.months=[],this.selectedYearMoment=Cr(),this.updateYearText(),this.selectedMonthMoment=Cr(),this.months=["Jan.","Fev.","Mar.","Abr.","Mai.","Jun.","Jul.","Ago.","Set.","Out.","Nov.","Dez."],this.selectedMonthIndex=this.selectedMonthMoment.month(),this.selectedMonthYear=this.selectedYearMoment.year()}return e.prototype.updateYearText=function(){this.selectedYearText=ze.isNull(Cr)?"":Cr(this.selectedYearMoment).format("YYYY")},e.prototype.selectMonth=function(e){this.selectedMonthMoment=Cr().month(e),this.selectedMonthIndex=this.selectedMonthMoment.month(),this.selectedMonthYear=this.selectedYearMoment.year()},e.prototype.incrementYear=function(){this.selectedYearMoment=this.selectedYearMoment.add(1,"year"),this.updateYearText()},e.prototype.decrementYear=function(){this.selectedYearMoment=this.selectedYearMoment.subtract(1,"year"),this.updateYearText()},e}(),Pr=0,Rr=function(){function e(e,n,i,o,r,a,s,l){this.elementRef=e,this._changeDetectorRef=n,this._overlay=i,this._ngZone=o,this._viewContainerRef=r,this._dir=s,this._document=l,this._name="gipi-date-range-"+Pr++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=this._name+"-backdrop",this._stateChanges=new ie.Subject,this.valueLabel="",this.id=this._name+"-date",this.name=this._name+"-date",this.label="",this.placeholder="",this.help="",this.xPosition="start",this.yPosition="below",this.calendarView="both",this._opened=!1,this._required=!1,this._disabled=!1,this._min=null,this._max=null,this.openedStream=new t.EventEmitter,this.closedStream=new t.EventEmitter,this.onChange=function(){},this.onTouched=function(){},this._scrollStrategy=a}var n;return n=e,Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){le.coerceBooleanProperty(e)?this.open():this.close()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this._required},set:function(e){this._required=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=le.coerceBooleanProperty(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){this._min=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._max=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){var t=e;if(e||(t=null),t)switch(this.calendarView){case"both":this.valueLabel=Cr(t.date).format("MM/YYYY");break;case"year":this.valueLabel=Cr(t.date).format("YYYY");break;default:this.valueLabel=Cr(t.date).format("MM/YYYY")}this._value=t,this.onChange(this._value),this.onTouched(this._value)},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.model=new Dr,this.year&&(this.model.selectedYearMoment=Cr().year(this.year)),this.month&&(this.model.selectedMonthIndex=this.month,this.model.selectedMonthMoment=Cr().month(this.month),this.year&&(this.model.selectedMonthYear=this.year)),this.model.updateYearText(),ze.isNull(this.month)&&ze.isNull(this.year)?(this.value=null,this._changeDetectorRef.detectChanges()):this.onValueChange(this.model.selectedMonthIndex,this.model.selectedMonthYear)},e.prototype.ngOnChanges=function(e){var t=e.xPosition||e.yPosition;t&&!t.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)},e.prototype.ngOnDestroy=function(){this._destroyPopup(),this.close(),this._stateChanges.complete()},e.prototype.writeValue=function(e){this.value=e,this._changeDetectorRef.detectChanges()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck()},e.prototype.onValueChange=function(e,t){var n=new kr(e,t);this.value=n,this._changeDetectorRef.detectChanges()},e.prototype.open=function(){if(!this._opened&&!this.disabled){if(!this.inputMonthYearContentRef)throw Error("Attempted to open an MonthYearPicker 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){if(this._popupComponentRef&&this._popupRef){var t=this._popupComponentRef.instance;t._startExitAnimation(),t._animationDone.pipe(oe.take(1)).subscribe((function(){return e._destroyPopup()}))}var n=function(){e._opened&&(e._opened=!1,e.closedStream.emit(),e._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}},e.prototype._openAsPopup=function(){var e=this,t=new y.ComponentPortal(wr,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(t),this._popupComponentRef.instance.monthYearPicker=this,this._ngZone.onStable.pipe(oe.take(1)).subscribe((function(){e._popupRef.updatePosition()}))},e.prototype._getConnectedOverlayOrigin=function(){return this.inputMonthYearContentRef?this.inputMonthYearContentRef:this.elementRef},e.prototype._createPopup=function(){var e=this,t=this._overlay.position().flexibleConnectedTo(this._getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new ue.OverlayConfig({positionStrategy:this._setConnectedPositions(t),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir||"ltr",scrollStrategy:this._scrollStrategy(),panelClass:"mat-month-year-picker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),ie.merge(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(oe.filter((function(t){return t.keyCode===se.ESCAPE||e.inputMonthYearContentRef&&t.altKey&&t.keyCode===se.UP_ARROW})))).subscribe((function(t){t&&t.preventDefault(),e.close()}))},e.prototype._destroyPopup=function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)},e.prototype._setConnectedPositions=function(e){var t="end"===this.xPosition?"end":"start",n="start"===t?"end":"start",i="above"===this.yPosition?"bottom":"top",o="top"===i?"bottom":"top";return e.withPositions([{originX:t,originY:o,overlayX:t,overlayY:i},{originX:t,originY:i,overlayX:t,overlayY:o},{originX:n,originY:o,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:o}])},e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:ue.Overlay},{type:t.NgZone},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[Ir]}]},{type:ce.Directionality,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[i.DOCUMENT]}]}]},_e([t.ViewChild("inputMonthYearContent",{static:!1}),Ce("design:type",t.ElementRef)],e.prototype,"inputMonthYearContentRef",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"id",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"name",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"label",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"placeholder",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"help",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"locale",void 0),_e([t.Input(),Ce("design:type",Number)],e.prototype,"year",void 0),_e([t.Input(),Ce("design:type",Number)],e.prototype,"month",void 0),_e([t.Input(),Ce("design:type",Boolean)],e.prototype,"multiple",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"xPosition",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"yPosition",void 0),_e([t.Input(),Ce("design:type",String)],e.prototype,"calendarView",void 0),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"opened",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"required",null),_e([t.Input(),Ce("design:type",Boolean),Ce("design:paramtypes",[Boolean])],e.prototype,"disabled",null),_e([t.Input(),Ce("design:type",kr),Ce("design:paramtypes",[kr])],e.prototype,"min",null),_e([t.Input(),Ce("design:type",kr),Ce("design:paramtypes",[kr])],e.prototype,"max",null),_e([t.Input(),Ce("design:type",kr),Ce("design:paramtypes",[kr])],e.prototype,"value",null),_e([t.Output("opened"),Ce("design:type",t.EventEmitter)],e.prototype,"openedStream",void 0),_e([t.Output("closed"),Ce("design:type",t.EventEmitter)],e.prototype,"closedStream",void 0),e=n=_e([t.Component({selector:"gipi-month-year-picker",template:'<div class="input-wrapper">\n\n <label *ngIf="label"\n class="input-label"\n [attr.for]="id">\n {{ label }}\n <span *ngIf="required"> * </span>\n </label>\n\n <div class="input-content"\n #inputMonthYearContent\n (click)="open()">\n <input matInput\n class="input-element"\n type="text"\n [attr.id]="id"\n [attr.name]="name"\n [placeholder]="placeholder"\n [disabled]="disabled"\n [required]="required"\n [readOnly]="true"\n [autocomplete]="\'off\'"\n [autofocus]="false"\n [ngModel]="valueLabel"\n (click)="open()" />\n\n <div class="suffix">\n <button #button\n mat-icon-button\n type="button"\n class="btn-month-year-toggle"\n [attr.aria-label]="\'Abrir calendário mensal\'"\n [disabled]="disabled"\n (click)="open()">\n <svg class="month-year-toggle-default-icon"\n viewBox="0 0 24 24"\n width="24px"\n height="24px"\n fill="currentColor"\n focusable="false">\n <path\n d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z" />\n </svg>\n </button>\n </div>\n </div>\n\n <small *ngIf="help"\n class="input-help">\n {{ help }}\n </small>\n</div>',providers:[{provide:r.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return n})),multi:!0}],host:{class:"gipi-month-year-picker"},changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid rgba(0,0,0,.12);transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.month-year-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-icon-button .month-year-toggle-default-icon{margin:auto}.btn-month-year-toggle{width:2rem!important;height:2rem!important;line-height:2rem!important}"]}),we(5,t.Inject(Ir)),we(6,t.Optional()),we(7,t.Optional()),we(7,t.Inject(i.DOCUMENT)),Ce("design:paramtypes",[t.ElementRef,t.ChangeDetectorRef,ue.Overlay,t.NgZone,t.ViewContainerRef,Object,ce.Directionality,Object])],e)}(),Ar=function(){function e(){}return e=_e([t.NgModule({imports:[i.CommonModule,I.MatButtonModule,P.MatDialogModule,ue.OverlayModule,m.A11yModule,y.PortalModule,F.MatIconModule,r.FormsModule,r.ReactiveFormsModule],exports:[v.ScrollingModule,wr,Rr],declarations:[wr,Rr],providers:[Or],entryComponents:[wr]})],e)}(),Tr=[Gi,On,gn,wi,Ci,Gn,Ui,fi,Wi,yi,ti,ni,si,hn,li,pn,dn,ki,En,xn,Ln,di,ei,Kn,$n,Dn,Tn,vn,Fn,Xn,Jn,zn,wn,In,ri,Rn,cn,mi,hi,Si,Cn,fn,Hi,Oi,en,jn,zi,ji,Ai,Di,Pi,Ti,Fi,Ni],Mr=[an,Qt,Jt,qt,$t,on,rn,tn],Fr=[ln],Nr=[lt,Zt,Kt,nn],Lr={parse:{dateInput:"DD/MM/YYYY"},display:{dateInput:"DD/MM/YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},Vr=function(){function g(t){this._injector=t,e.INJECTOR=this._injector}return g.ctorParameters=function(){return[{type:t.Injector}]},g=_e([t.NgModule({declarations:[Tr,Mr,Fr,tt,et,Me,Qe,Ot,kt,Nt,Fe,Ne,gt,ft,Pt,Le,Rt,Lt,Ve,Xe,ht,zt,Ht,Bt,Yt,ct,Vt,Dt,jt,Mt,It,yt,xt,_t,vt,bt],imports:[i.CommonModule,s.RouterModule,r.FormsModule,r.ReactiveFormsModule,Te,o.FlexLayoutModule.withConfig({disableDefaultBps:!0},Ut),u.NgxMaskModule.forChild(),d.NgxCurrencyModule,h.NgxMaterialTimepickerModule,l.MdePopoverModule,c.InfiniteScrollModule,p.MentionModule,xr,Ar],exports:[Tr,Mr,Fr,i.CommonModule,s.RouterModule,r.FormsModule,r.ReactiveFormsModule,o.FlexLayoutModule,n.CdkStepperModule,a.MatRippleModule,a.MatDialogModule,c.InfiniteScrollModule,tt,et,Me,Qe,Ot,kt,Nt,Fe,Ne,gt,ft,Pt,Le,Rt,Lt,Ve,Xe,ht,p.MentionModule,ct,Vt,Dt,jt,Mt,It,yt,xt,_t,vt,bt,xr,Ar],entryComponents:[xn,zi,ji,ht],providers:[Nr,Gt,{provide:Ji,useClass:lr,deps:[Ki]},{provide:Ki,useValue:"pt-BR"},{provide:Re,useValue:Lr}]}),Ce("design:paramtypes",[t.Injector])],g)}(),jr=function(e){function t(){var t=e.call(this)||this;return t.content=[],t.number=0,t}return be(t,e),t}(Ge),Br=function(e){function t(t,n){var i=e.call(this)||this;return i.field=t,i.direction=n,i}return be(t,e),t}(Ge);(Er=e.SortDirectionEnum||(e.SortDirectionEnum={})).ASC="ASC",Er.DESC="DESC";var zr,Yr=function(t){function n(e,n,i,o,r){var a=t.call(this,n,o,r)||this;return a.service=e,a.messageService=n,a.confirmationService=i,a.router=o,a.activatedRoute=r,a}return be(n,t),n.prototype.ngOnInit=function(){t.prototype.ngOnInit.call(this),this.service.returnPath=this.getPath(),this.page=this.newPage(),this.filter=this.newFilterDTO(),this.getFilterDTOSessionStorage(),this.columns=this.createTableColumns()},n.prototype.new=function(){var e=this;this.router.navigateByUrl(this.getPath(),{skipLocationChange:!0}).then((function(){return e.router.navigate([e.getPath(),"new"])}))},n.prototype.edit=function(e){var t=this;this.router.navigateByUrl(this.getPath(),{skipLocationChange:!0}).then((function(){return t.router.navigate([t.getPath(),"edit",e.id])}))},n.prototype.view=function(e){var t=this;this.router.navigateByUrl(this.getPath(),{skipLocationChange:!0}).then((function(){return t.router.navigate([t.getPath(),"view",e.id])}))},n.prototype.delete=function(t,n){var i=this;this.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).DELETE_CONFIRMATION,accept:function(){try{i.loading=!0,i.loadingChange.emit(i.loading),i.page=i.newPage(),i.preDelete(),i.service.delete(t.id).subscribe((function(){n?i.find():(i.new(),i.loading=!1,i.loadingChange.emit(i.loading)),i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){i.isFinding()&&i.clear(),i.handleError(e)}))}catch(e){i.handleError(e)}}})},n.prototype.deleteAll=function(t,n){var i=this;this.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).DELETE_ALL_CONFIRMATION,accept:function(){try{i.loading=!0,i.loadingChange.emit(i.loading),i.page=i.newPage(),i.preDelete(),i.service.deleteAll(t).subscribe((function(){n?i.find():(i.new(),i.loading=!1,i.loadingChange.emit(i.loading)),i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){i.isFinding()&&i.clear(),i.handleError(e)}))}catch(e){i.handleError(e)}}})},n.prototype.updateStatus=function(t,n){var i=this;this.confirmationService.confirm({title:"Confirmação",message:"Deseja realmente "+(n?"ativar":"inativar")+" este registro?",accept:function(){try{i.loading=!0,i.loadingChange.emit(i.loading),i.service.save(t).subscribe((function(){i.clear(),i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){i.clear(),i.handleError(e)}))}catch(e){i.handleError(e)}},cancel:function(){return i.clear()}})},n.prototype.preDelete=function(){},n.prototype.clear=function(){this.page=this.newPage(),this.filter=this.newFilterDTO(),this.find()},n.prototype.getPath=function(){return this.activatedRoute.snapshot.parent.parent.url[0].path+"/"+this.activatedRoute.snapshot.parent.url[0].path},n.prototype.newPage=function(){return new jr},n.prototype.newFilterDTO=function(){return null},n.prototype.getFilterDTOSessionStorage=function(){return Promise.resolve()},n.prototype.createTableColumns=function(){return[]},n.prototype.createSorts=function(){return[]},n.prototype.find=function(t){var n=this;this.loading=!0,this.loadingChange.emit(this.loading),this.page=this.newPage(),ze.isNull(this.filter)&&(this.filter=this.newFilterDTO()),ze.isNull(t)&&!ze.isNull(this.tablePageEventDTO)&&(t=this.tablePageEventDTO),t?(this.tablePageEventDTO=t,this.filter.pageNumber=t.pageIndex,this.filter.pageSize=t.pageSize,this.filter.offset=t.pageIndex*t.pageSize,t.sort&&(this.filter.sorts=[new Br(t.sort.active,je.isEmpty(t.sort.direction)?e.SortDirectionEnum.DESC:t.sort.direction.toUpperCase())])):(this.filter.pageNumber=0,this.filter.offset=0,this.filter.pageSize=10),this.service.find(this.filter).subscribe((function(e){n.page=e,n.loading=!1,n.loadingChange.emit(n.loading)}),(function(e){return n.handleError(e)}))},n.prototype.isFinding=function(){return 0===this.router.url.split("/").filter((function(e){return"new"===e||"edit"===e})).length},n.prototype.isViewing=function(){return this.router.url.split("/").filter((function(e){return"view"===e})).length>0},n.prototype.isCreating=function(){return this.router.url.split("/").filter((function(e){return"new"===e})).length>0},n}(He),Hr=function(n){function i(e,i,o,r,a){var s=n.call(this,e,i,o,r,a)||this;return s.service=e,s.messageService=i,s.confirmationService=o,s.router=r,s.activatedRoute=a,s.entityChange=new t.EventEmitter(!0),s}return be(i,n),Object.defineProperty(i.prototype,"entity",{get:function(){return this.entityValue},set:function(e){this.entityValue=e,this.entityChange.emit(this.entityValue)},enumerable:!1,configurable:!0}),i.prototype.ngOnInit=function(){n.prototype.ngOnInit.call(this),this.entity=this.newEntity(),this.initializeForm()},i.prototype.save=function(t,n){var i=this;try{this.loading=!0,this.loadingChange.emit(this.loading),n&&(this.page=this.newPage()),this.preSave(),this.service.save(this.entity).subscribe((function(o){i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS),t?i.edit(o):n?i.find():i.router.navigateByUrl(i.getPath(),{skipLocationChange:!0}).then((function(){return i.router.navigate([i.getPath()])}))}),(function(e){return i.handleError(e)}))}catch(e){this.handleError(e)}},i.prototype.preSave=function(){},i.prototype.return=function(){var t=this;this.isViewing()?this.router.navigateByUrl(this.service.returnPath,{skipLocationChange:!0}).then((function(){return t.router.navigate([t.service.returnPath])})):this.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).RETURN_CONFIRMATION,accept:function(){return t.router.navigateByUrl(t.service.returnPath,{skipLocationChange:!0}).then((function(){return t.router.navigate([t.service.returnPath])}))}})},i.prototype.initializeForm=function(){var e=this;this.loading=!0,this.loadingChange.emit(this.loading);var t=this.activatedRoute.snapshot.params.id;t?this.service.getOne(t).subscribe((function(t){e.entity=t,e.afterInitializeForm(),e.loading=!1,e.loadingChange.emit(e.loading)}),(function(t){return e.handleError(t)})):(this.entity=this.newEntity(),this.loading=!1,this.loadingChange.emit(this.loading))},i.prototype.afterInitializeForm=function(){},_e([t.Output(),Ce("design:type",t.EventEmitter)],i.prototype,"entityChange",void 0),_e([t.Input(),Ce("design:type",Object),Ce("design:paramtypes",[Object])],i.prototype,"entity",null),i}(Yr),Ur=he,Gr=function(e){function n(t,n,i){var o=e.call(this)||this;return o.router=t,o.http=n,o._matDialog=i,o._tokenSubject$=new ie.BehaviorSubject(JSON.parse(localStorage.getItem("token"))),o.token$=o._tokenSubject$.asObservable(),o}return be(n,e),n.prototype.login=function(e,t){var n=this,i=(new ne.HttpParams).set("grant_type","password").set("username",e).set("password",t);return this.http.post("api/authenticator/oauth/token",i,this.options(this.buildParams(),this.buildHeaders().append("skip",String(!0)))).pipe(oe.map((function(e){return n.isValidToken(e)&&n.setSession(e),e})),oe.takeUntil(this.onDestroy),oe.catchError(this.handleError))},n.prototype.logout=function(){var e=this;this.revokeToken().subscribe((function(t){e.removeSession(),e._matDialog.closeAll(),e.router.navigate(["/oauth/login"],{queryParams:{returnUrl:e.router.routerState.snapshot.url}})}),(function(e){throw new Error(e)}))},n.prototype.refreshToken=function(e){var t=this,n=(new ne.HttpParams).set("grant_type","refresh_token").set("refresh_token",this.token.refreshToken);return ze.isNull(e)||e.forEach((function(e,t){return n=n.append(t,e)})),this.http.post("api/authenticator/oauth/token",n,this.options(this.buildParams(),this.buildHeaders().append("skip","true"))).pipe(oe.map((function(e){return t.setSession(e)})),oe.takeUntil(this.onDestroy),oe.catchError(this.handleError))},n.prototype.revokeToken=function(e){var t=null;return ze.isNull(e)||(t=(new ne.HttpHeaders).append("Authorization",e.accessToken).append("skip","true")),this.http.post("api/authenticator/oauth/token/revoke",{},this.options(null,t)).pipe(oe.takeUntil(this.onDestroy),oe.catchError(this.handleError))},n.prototype.setSession=function(e){return this.isValidToken(e)&&(localStorage.setItem("token",JSON.stringify(e)),this._tokenSubject$.next(e)),e},n.prototype.removeSession=function(){localStorage.removeItem("token"),sessionStorage.clear()},n.prototype.isValidToken=function(e){if(!ze.isNull(e)&&!ze.isNull(e.expiration)){var t=Ur(e.expiration);return Ur().isBefore(t)}return!1},Object.defineProperty(n.prototype,"token",{get:function(){var e=localStorage.getItem("token");return je.isEmpty(e)?null:JSON.parse(e)},enumerable:!1,configurable:!0}),n.prototype.buildHeaders=function(){return(new ne.HttpHeaders).append("Authorization","Basic "+btoa("CONVENANT_MANAGEMENT:123")).append("Content-Type","application/x-www-form-urlencoded").append("accessType","WEB").append("timeZone",Ur(new Date).format("ZZ"))},n.ctorParameters=function(){return[{type:s.Router},{type:ne.HttpClient},{type:a.MatDialog}]},n.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new n(t.ɵɵinject(s.Router),t.ɵɵinject(ne.HttpClient),t.ɵɵinject(P.MatDialog))},token:n,providedIn:"root"}),n=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[s.Router,ne.HttpClient,a.MatDialog])],n)}(We),qr=function(){function e(e){this._authenticationService=e}return e.prototype.intercept=function(e,t){var n=this._authenticationService.token;return ze.isNull(n)||je.isEmpty(n.accessToken)||e.headers.get("skip")||(e=e.clone({setHeaders:{Authorization:"Bearer "+n.accessToken}})),t.handle(e)},e.ctorParameters=function(){return[{type:Gr}]},e=_e([t.Injectable(),Ce("design:paramtypes",[Gr])],e)}(),$r=function(){function e(e){this._injector=e}return e.prototype.intercept=function(e,t){var n=this;return t.handle(e).pipe(oe.catchError((function(e){return Ie(n,void 0,void 0,(function(){var t;return Se(this,(function(n){switch(n.label){case 0:return this._router=this._injector.get(s.Router),t=null,e instanceof ne.HttpErrorResponse&&e.error instanceof Blob&&"application/json"===e.error.type?[4,this.blobToJson(e).then((function(e){!ze.isNull(e)&&e instanceof ne.HttpErrorResponse&&(t=e)}))]:[3,2];case 1:return n.sent(),[3,3];case 2:e instanceof ne.HttpErrorResponse&&(t=e),n.label=3;case 3:return[4,this.validateErrors(t)];case 4:return[4,n.sent().toPromise().then((function(e){return e}))];case 5:return[2,n.sent()]}}))}))})))},e.prototype.validateErrors=function(e){return Ie(this,void 0,void 0,(function(){var n=this;return Se(this,(function(i){return[2,new Promise((function(i,o){var r=e.error.message||e.statusText,a=e.error.apierror;if(ze.isNull(a))if(navigator.onLine){if(504===e.status)return void n._injector.get(t.NgZone).run((function(){return n._router.navigate(["/errors/504"])}))}else r="Sem internet";else if("INTERNAL_SERVER_ERROR"===a.status&&a.debugMessage&&a.debugMessage.toUpperCase().includes("QUERY DID NOT RETURN A UNIQUE RESULT"))r="A consulta não retornou resultado único";else if("INTERNAL_SERVER_ERROR"===a.status&&a.message&&a.message.toUpperCase().includes("NENHUM REGISTRO FOI ENCONTRADO"))r="Nenhum registro foi encontrado";else if("INTERNAL_SERVER_ERROR"===a.status&&a.message&&a.message.toUpperCase().includes("OCORREU UM PROBLEMA INESPERADO"))r="Ocorreu um problema inesperado";else{if("FORBIDDEN"===a.status)return void n._injector.get(t.NgZone).run((function(){return n._router.navigate(["/errors/403"])}));"UNAUTHORIZED"===a.status?(r="Sua sessão expirou",n._injector.get(Gr).logout()):r=Et.isEmpty(a.subErrorList)?a.message:a.subErrorList[0].rejectedMessage}return i(ie.throwError(r))}))]}))}))},e.prototype.blobToJson=function(e){return Ie(this,void 0,void 0,(function(){return Se(this,(function(t){return[2,new Promise((function(t,n){try{var i=null,o=new FileReader;o.onload=function(n){var o=JSON.parse(n.target.result);i=new ne.HttpErrorResponse({error:o,headers:e.headers,status:e.status,statusText:e.statusText,url:e.url}),t(i)},o.readAsText(e.error)}catch(e){n(null),ie.throwError(e)}}))]}))}))},e.ctorParameters=function(){return[{type:t.Injector}]},e=_e([t.Injectable(),Ce("design:paramtypes",[t.Injector])],e)}(),Wr=function(e){function n(t,n){var i=e.call(this)||this;return i._breakpointObserver=t,i.dialog=n,i}return be(n,e),n.prototype.open=function(e){var t={panelClass:e.panelClass,disableClose:e.disableClose,width:e.width,height:e.height,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,position:e.position,data:e.data,autoFocus:e.autoFocus||!1,restoreFocus:e.restoreFocus||!1,closeOnNavigation:e.closeOnNavigation||!0};return this.dialog.open(e.componentOrTemplateRef,t)},n.prototype._calcHeightByBody=function(){return(document&&document.body?document.body.getBoundingClientRect():null).height-80+"px"},n.prototype._coerceNumber=function(e){if(je.isEmpty(e))return null;var t=e.match(/\d+/);return t?parseInt(t[0],10):null},n.ctorParameters=function(){return[{type:pe.BreakpointObserver},{type:a.MatDialog}]},n.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new n(t.ɵɵinject(pe.BreakpointObserver),t.ɵɵinject(P.MatDialog))},token:n,providedIn:"root"}),n=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[pe.BreakpointObserver,a.MatDialog])],n)}(We),Kr=function(){function e(e,t){this._matIconRegistry=e,this._domSanitizer=t}return e.prototype.registerListSvgIcons=function(e,t){var n,i,o=Object.values(e);try{for(var r=Ee(o),a=r.next();!a.done;a=r.next()){var s=a.value;this.registerSvgIcon(s,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},e.prototype.registerSvgIcon=function(e,t){try{var n=this._domSanitizer.bypassSecurityTrustResourceUrl(t+"/"+e+".svg");this._matIconRegistry.addSvgIcon(e,n)}catch(e){throw new Error(e)}},e.prototype.registerSvgIconLiteral=function(e,t){try{this._matIconRegistry.addSvgIconLiteral(e,t)}catch(e){throw new Error(e)}},e.ctorParameters=function(){return[{type:a.MatIconRegistry},{type:fe.DomSanitizer}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(F.MatIconRegistry),t.ɵɵinject(fe.DomSanitizer))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[a.MatIconRegistry,fe.DomSanitizer])],e)}(),Xr=function(){function e(){}return e.format=function(e,t,n){if(void 0===n&&(n=!1),!ze.isNull(e)){var i=null;i=e instanceof Date?{hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds()}:e;var o=this.TIME_FORMAT;return"FULL"===t.trim().toUpperCase()?o="HH:mm:ss"+(n?" AA":""):"SHORT"===t.trim().toUpperCase()?o="HH:mm"+(n?" AA":""):je.isEmpty(t.trim())||(o=t.trim()),this._formatDate(i,o)}return je.EMPTY},e._formatDate=function(e,t){var n=e.hour,i=n>12?n-12:0===n?12:n;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+this._padToAnyDigits(n))).replace(/(^|[^\\])H/g,"$1"+n)).replace(/(^|[^\\])hh+/g,"$1"+this._padToAnyDigits(i))).replace(/(^|[^\\])h/g,"$1"+i);var o=e.minute;t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+this._padToAnyDigits(o))).replace(/(^|[^\\])m/g,"$1"+o);var r=e.second,a=n<12?"AM":"PM";t=(t=(t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+this._padToAnyDigits(r))).replace(/(^|[^\\])s/g,"$1"+r)).replace(/(^|[^\\])AA+/g,"$1"+a)).replace(/(^|[^\\])A/g,"$1"+a.charAt(0));var s=a.toLowerCase();return t=(t=(t=t.replace(/(^|[^\\])aa+/g,"$1"+s)).replace(/(^|[^\\])a/g,"$1"+s.charAt(0))).replace(/\\(.)/g,"$1")},e._padToAnyDigits=function(e,t){return void 0===t&&(t=2),e.toString().padStart(t,"0")},e.TIME_FORMAT="HH:mm:ss",e}(),Zr=function(){function e(){}var n;return n=e,e.prototype.transform=function(e,i,o){void 0===o&&(o=!1);try{return Xr.format(e,i,o)}catch(e){throw new Error("InvalidPipeArgument: '"+n+"' for pipe '"+t.ɵstringify(e.message)+"'")}},e=n=_e([t.Pipe({name:"localtime"})],e)}(),Jr=function(){function e(e,t){this.path=e,this.version=t,this.handleDestroy=new ie.Subject}return e.prototype.ngOnDestroy=function(){this.handleDestroy.next(),this.handleDestroy.complete()},e.prototype.url=function(e,t){var n="";je.isEmpty(t)?je.isEmpty(t)&&!je.isEmpty(this.version)&&(n="/"+this.version.toLowerCase()):n="/"+t.toLowerCase();var i="";return je.isEmpty(e)||(i="/"+e),"api/"+this.path+n+i},e.prototype.options=function(e,t){return{headers:t||this.buildHeaders(),params:e||this.buildParams()}},e.prototype.buildHeaders=function(){return new ne.HttpHeaders},e.prototype.buildParams=function(){return new ne.HttpParams},e.prototype.handleMapper=function(e){return e},e.prototype.handleError=function(e){return ie.throwError(e)},e}(),Qr=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.path=t,o.version=n,o.baseService=i,o}return be(t,e),t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this)},t.prototype.save=function(e,t){return this.validate(e),this.baseService.httpClient.post(this.url("",t),e,this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.saveAll=function(e,t){for(var n=0;n<e.length;n++)this.validate(e[n]);return this.baseService.httpClient.post(this.url("save-all",t),e,this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.delete=function(e,t){return this.baseService.httpClient.delete(this.url(""+e,t)).pipe(oe.map((function(){return null})),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.deleteAll=function(e,t){for(var n=0;n<e.length;n++)if(!Ye.isValid(e[n]))return ie.of(!1);return this.baseService.httpClient.post(this.url("delete-all",t),e,this.options()).pipe(oe.map((function(){return!0})),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.getOne=function(e,t){return this.baseService.httpClient.get(this.url(""+e,t),this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.find=function(e){return this.baseService.httpClient.get(this.url("",e),this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.findAll=function(e,t){return this.baseService.httpClient.post(this.url("find-all",t),e,this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.findAllEnabled=function(e,t,n){var i=Math.max(e,0),o=Math.max(t,10),r=new URLSearchParams;r.set("page",i.toString()),r.set("size",o.toString());var a=je.isEmpty(r.toString())?"":"?"+r.toString();return this.baseService.httpClient.get(this.url("find-all-enabled"+a,n),this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.findByValue=function(e,t,n,i,o){var r=je.isEmpty(e)?"":e.trim(),a=Math.max(t,0),s=Math.max(n,10),l=new URLSearchParams;l.set("value",r),l.set("page",a.toString()),l.set("size",s.toString()),ze.isNull(i)||je.isEmpty(i.field)||l.set("sort",i.field+","+i.direction);var p=je.isEmpty(l.toString())?"":"?"+l.toString();return this.baseService.httpClient.get(this.url("find-by-value"+p,o),this.options()).pipe(oe.map(this.handleMapper),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.enableOrDisable=function(e,t,n){return Ye.isValid(e)?this.baseService.httpClient.patch(this.url("/enable-or-disable/"+e+"/"+t,n),{},this.options()).pipe(oe.map((function(){return!0})),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError)):ie.of(!1)},t.prototype.enableOrDisableAll=function(e,t,n){for(var i=0;i<e.length;i++)if(!Ye.isValid(e[i]))return ie.of(!1);return this.baseService.httpClient.patch(this.url("/enable-or-disable-all/"+t,n),e,this.options()).pipe(oe.map((function(){return!0})),oe.takeUntil(this.handleDestroy),oe.catchError(this.handleError))},t.prototype.validate=function(e){return""},t}(Jr),ea=function(){function e(){}return e.prototype.download=function(e,t,n){var i=new Blob([e],{type:n}),o=document.createElement("a");if(void 0!==o.download){var r=URL.createObjectURL(i);o.setAttribute("href",r),o.setAttribute("download",t),o.style.visibility="hidden",document.body.appendChild(o),o.click(),document.body.removeChild(o)}},e.prototype.downloadContent=function(e){this.download(e.body,e.headers.get("content-disposition").split(";")[1].split("filename")[1].split("=")[1].trim(),e.headers.get("content-type"))},e.prototype.printArchive=function(e,t){var n=new Blob([e],{type:t}),i=URL.createObjectURL(n),o=document.createElement("iframe");document.body.appendChild(o),o.style.display="none",o.style.position="fixed",o.style.right="0",o.style.bottom="0",o.style.width="0",o.style.height="0",o.style.border="0",o.src=i,o.onload=function(){setTimeout((function(){o.focus(),o.contentWindow.print()}),1)}},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[])],e)}(),ta=function(){function e(){this._storage=window.sessionStorage}return e.prototype.set=function(e,t){return!!this._storage&&(this._storage.setItem(e,JSON.stringify(t)),!0)},e.prototype.get=function(e){if(this._storage){var t=JSON.parse(this._storage.getItem(e));return ze.isNull(t)?null:t}return null},e.prototype.remove=function(e){return!!this._storage&&(this._storage.removeItem(e),!0)},e.prototype.clear=function(){return!!this._storage&&(this._storage.clear(),!0)},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[])],e)}(),na=function(){function e(e,t){this._injector=e,this._router=t,this._sessionStorageService=null,this._confirmationService=null,this._messageService=null,this._dialogService=null,this._fileService=null,this._matDialog=null,this._httpClient=null,this._changeDetectorRef=null,this._matSnackBar=null}return e.prototype.ngOnDestroy=function(){},Object.defineProperty(e.prototype,"sessionStorageService",{get:function(){return ze.isNull(this._sessionStorageService)&&(this._sessionStorageService=this._injector.get(ta)),this._sessionStorageService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"confirmationService",{get:function(){return ze.isNull(this._confirmationService)&&(this._confirmationService=this._injector.get(Sn)),this._confirmationService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"messageService",{get:function(){return ze.isNull(this._messageService)&&(this._messageService=this._injector.get(Ke)),this._messageService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dialogService",{get:function(){return ze.isNull(this._dialogService)&&(this._dialogService=this._injector.get(Wr)),this._dialogService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fileService",{get:function(){return ze.isNull(this._fileService)&&(this._fileService=this._injector.get(ea)),this._fileService},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matDialog",{get:function(){return ze.isNull(this._matDialog)&&(this._matDialog=this._injector.get(P.MatDialog)),this._matDialog},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpClient",{get:function(){return ze.isNull(this._httpClient)&&(this._httpClient=this._injector.get(ne.HttpClient)),this._httpClient},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"router",{get:function(){return ze.isNull(this._router)&&(this._router=this._injector.get(s.Router)),this._router},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return ze.isNull(this._changeDetectorRef)&&(this._changeDetectorRef=this._injector.get(t.ChangeDetectorRef)),this._changeDetectorRef},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"matSnackBar",{get:function(){return ze.isNull(this._matSnackBar)&&(this._matSnackBar=this._injector.get($.MatSnackBar)),this._matSnackBar},enumerable:!1,configurable:!0}),e.ctorParameters=function(){return[{type:t.Injector},{type:s.Router}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(t.INJECTOR),t.ɵɵinject(s.Router))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[t.Injector,s.Router])],e)}(),ia=function(){function e(e,t){this.baseService=e,this.activatedRoute=t,this._loading=!1,this._basePermissionList=null}return Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"basePermissionList",{get:function(){return this._basePermissionList},set:function(e){this._basePermissionList=e},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.onInitForm()},e.prototype.ngAfterViewInit=function(){this.onAfterInitForm()},e.prototype.ngOnDestroy=function(){this.onDestroy()},e.prototype.isCreating=function(){return this.baseService.router.url.split("/").filter((function(e){return"new"===e})).length>0},e.prototype.isEditing=function(){return this.baseService.router.url.split("/").filter((function(e){return"edit"===e})).length>0},e.prototype.isViewing=function(){return this.baseService.router.url.split("/").filter((function(e){return"view"===e})).length>0},e.prototype.isListing=function(){return 0===this.baseService.router.url.split("/").filter((function(e){return"new"===e||"edit"===e||"view"===e})).length},e.prototype.hasPermission=function(e){return!je.isEmpty(e)&&!!JSON.parse(localStorage.getItem("token")).user.authorities.find((function(t){return t.authority.match(e)}))},e.prototype.UUIDIsValid=function(e){return Ye.isValid(e)},e.prototype.onInitForm=function(){},e.prototype.onAfterInitForm=function(){},e.prototype.onDestroy=function(){},e.prototype.getPath=function(){return this.activatedRoute.snapshot.parent.parent.url[0].path+"/"+this.activatedRoute.snapshot.parent.url[0].path},e.prototype.navigateByUrl=function(e,t,n){var i=this;void 0===n&&(n=!0),this.baseService.router.navigateByUrl(e,{skipLocationChange:n}).then((function(){return i.baseService.router.navigate(t)}))},e.prototype.addMessage=function(e){this.baseService.matSnackBar.openFromComponent($e,{verticalPosition:"top",horizontalPosition:"center",duration:5e3,data:e})},e.prototype.addSuccessMessage=function(e){this.baseService.messageService.add({icon:"check_circle",title:"Sucesso",message:e,type:"success"})},e.prototype.addErrorMessage=function(e){this.baseService.messageService.add({icon:"cancel",title:"Erro",message:e,type:"error"})},e.prototype.addWarningMessage=function(e){this.baseService.messageService.add({icon:"error",title:"Atenção",message:e,type:"warning"})},e.prototype.addInfoMessage=function(e){this.baseService.messageService.add({icon:"info",title:"Informação",message:e,type:"info"})},e.prototype.handleError=function(e){throw this.loading=!1,String(e).includes("Unknown")&&(e=new Error("Ocorreu um erro ao realizar essa operação, tente novamente")),e instanceof Error&&(e=e.message),this.addErrorMessage(e),e},e.prototype.getExistInRouterPath=function(e,t){void 0===t&&(t=!1);var n=this.baseService.router.url,i=n.slice(1,n.indexOf("?")+1).split("/"),o=n.slice(n.indexOf("?")+1,n.length).split("=");return t?o.filter((function(t){return t.toUpperCase()===e.toUpperCase()})).length>0:i.filter((function(t){return t.toUpperCase()===e.toUpperCase()})).length>0},e.ctorParameters=function(){return[{type:na},{type:s.ActivatedRoute}]},e=_e([t.Component({template:""}),Ce("design:paramtypes",[na,s.ActivatedRoute])],e)}(),oa=function(n){function i(e,t,i){var o=n.call(this,t,i)||this;return o.abstractCrudService=e,o.baseService=t,o.activatedRoute=i,o._entity=o.newEntity(),o}return be(i,n),Object.defineProperty(i.prototype,"entity",{get:function(){return this._entity},set:function(e){this._entity=e},enumerable:!1,configurable:!0}),i.prototype.ngOnInit=function(){if(n.prototype.ngOnInit.call(this),ze.isNull(this.basePermissionList))throw new Error("basePermissionList is required")},i.prototype.ngAfterViewInit=function(){n.prototype.ngAfterViewInit.call(this)},i.prototype.ngOnDestroy=function(){n.prototype.ngOnDestroy.call(this)},i.prototype.onInitForm=function(){var e=this;try{this.loading=!0;var t=this.activatedRoute.snapshot.params.id;this.UUIDIsValid(t)?this.abstractCrudService.getOne(t).toPromise().then((function(t){e.entity=t,e.onAfterGetOne(),e.loading=!1}),(function(e){throw new Error(e)})):(this.entity=this.newEntity(),this.onAfterGetOne(),this.loading=!1)}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.onAfterGetOne=function(){},i.prototype.preSave=function(e){},i.prototype.save=function(t,n){var i=this;void 0===n&&(n=!0);try{this.loading=!0,ze.isNull(t)&&(t=this.entity),this.isValid(t)&&(this.preSave(t),this.abstractCrudService.save(t).toPromise().then((function(t){i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS),n&&i.navigateByUrl(i.getPath(),[i.getPath()],!0)}),(function(e){throw new Error(e)})))}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.goBack=function(t){var n=this;void 0===t&&(t=!0),!this.isViewing()||t?this.baseService.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).RETURN_CONFIRMATION,accept:function(){return n.navigateByUrl(n.getPath(),[n.getPath()],!0)}}):this.navigateByUrl(this.getPath(),[this.getPath()],!0)},i.ctorParameters=function(){return[{type:Qr},{type:na},{type:s.ActivatedRoute}]},i=_e([t.Component({template:""}),Ce("design:paramtypes",[Qr,na,s.ActivatedRoute])],i)}(ia),ra=function(){this.content=[],this.number=0},aa=function(e,t){this.field=e,this.direction=t},sa=function(n){function i(e,t,i){var o=n.call(this,t,i)||this;return o.abstractCrudService=e,o.baseService=t,o.activatedRoute=i,o._filter=null,o._page=null,o._columns=[],o._appliedFilters=[],o}return be(i,n),Object.defineProperty(i.prototype,"filter",{get:function(){return this._filter},set:function(e){this._filter=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"page",{get:function(){return this._page},set:function(e){this._page=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tablePageEventDTO",{get:function(){return this._tablePageEventDTO},set:function(e){this._tablePageEventDTO=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"columns",{get:function(){return this._columns},set:function(e){this._columns=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"appliedFilters",{get:function(){return this._appliedFilters},set:function(e){this._appliedFilters=e},enumerable:!1,configurable:!0}),i.prototype.ngOnInit=function(){if(n.prototype.ngOnInit.call(this),ze.isNull(this.basePermissionList))throw new Error("basePermissionList is required");this._onInitFilter(),this.columns=this.createTableColumns()},i.prototype.ngAfterViewInit=function(){n.prototype.ngAfterViewInit.call(this)},i.prototype.ngOnDestroy=function(){n.prototype.ngOnDestroy.call(this)},i.prototype.newPage=function(){return new ra},i.prototype.createTableSorts=function(){return[]},i.prototype.preDelete=function(e){},i.prototype.existInAppliedFilters=function(e){return!Et.isEmpty(this.appliedFilters)&&this.appliedFilters.findIndex((function(t){return t.key===e}))>=0},i.prototype._onInitFilter=function(){this.page=this.newPage(),this.filter=this.newFilter(),ze.isNull(this.filter)||this.setAppliedFilters();var e=this.baseService.sessionStorageService.get("filter");ze.isNull(e)||this.handleFilterSessionStorage()},i.prototype.findAll=function(e){var t=this;try{this.loading=!0,this.page=this.newPage(),ze.isNull(this.filter)&&(this.filter=this.newFilter()),ze.isNull(e)&&!ze.isNull(this.tablePageEventDTO)&&(e=this.tablePageEventDTO),e?(this.tablePageEventDTO=e,this.filter.pageNumber=e.pageIndex,this.filter.pageSize=e.pageSize,this.filter.offset=e.pageIndex*e.pageSize,e.sort&&(this.filter.sorts=[new aa(e.sort.active,je.isEmpty(e.sort.direction)?"DESC":e.sort.direction.toUpperCase())])):(this.filter.pageNumber=0,this.filter.offset=0,this.filter.pageSize=10),this.abstractCrudService.findAll(this.filter).toPromise().then((function(e){t.page=e,t.setAppliedFilters(),t.loading=!1}),(function(e){throw t.loading=!1,new Error(e)}))}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.newRegister=function(t){if(je.isEmpty(t)&&ze.isNull(this.basePermissionList))this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"new"],!0);else{if(je.isEmpty(t)&&!ze.isNull(this.basePermissionList)&&(t=this.basePermissionList.MAKE),!this.hasPermission(t))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"new"],!0)}},i.prototype.editRegister=function(t,n){if(t=this.handleEntityId(t),!ze.isNull(t))if(je.isEmpty(n)&&ze.isNull(this.basePermissionList))this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"edit"],!0);else{if(je.isEmpty(n)&&!ze.isNull(this.basePermissionList)&&(n=this.basePermissionList.UPDATE),!this.hasPermission(n))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"edit",t],!0)}},i.prototype.deleteRegister=function(t,n,i){void 0===i&&(i=!0);try{if(t=this.handleEntityId(t),ze.isNull(t))return;if(je.isEmpty(n)&&ze.isNull(this.basePermissionList))this._deleteRegister(t,i);else{if(je.isEmpty(n)&&!ze.isNull(this.basePermissionList)&&(n=this.basePermissionList.DELETE),!this.hasPermission(n))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this._deleteRegister(t,i)}}catch(e){throw this.loading=!1,this.isListing()&&this.clear(),new Error(e)}},i.prototype._deleteRegister=function(t,n){var i=this;void 0===n&&(n=!0);try{this.baseService.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).DELETE_CONFIRMATION,accept:function(){i.setFilterSessionStorage(),i.loading=!0,i.page=i.newPage(),i.preDelete(t),i.abstractCrudService.delete(t).toPromise().then((function(){n&&i.findAll(),i.loading=!1,i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){throw new Error(e)}))}})}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.deleteAllRegister=function(t,n,i){void 0===i&&(i=!0);try{if(t=this.handleEntityIdList(t),ze.isNull(t)||Et.isEmpty(t))return;if(je.isEmpty(n)&&ze.isNull(this.basePermissionList))this._deleteAllRegister(t,i);else{if(je.isEmpty(n)&&!ze.isNull(this.basePermissionList)&&(n=this.basePermissionList.DELETE),!this.hasPermission(n))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this._deleteAllRegister(t,i)}}catch(e){throw this.loading=!1,this.isListing()&&this.clear(),new Error(e)}},i.prototype._deleteAllRegister=function(t,n){var i=this;void 0===n&&(n=!0);try{this.baseService.confirmationService.confirm({title:"Confirmação",message:e.INJECTOR.get(De).DELETE_CONFIRMATION,accept:function(){i.setFilterSessionStorage(),i.loading=!0,i.page=i.newPage(),i.preDelete(),i.abstractCrudService.deleteAll(t).toPromise().then((function(){n&&i.findAll(),i.loading=!1,i.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){throw new Error(e)}))}})}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.viewRegister=function(t,n){if(t=this.handleEntityId(t),!ze.isNull(t))if(je.isEmpty(n)&&ze.isNull(this.basePermissionList))this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"view",t],!0);else{if(je.isEmpty(n)&&!ze.isNull(this.basePermissionList)&&(n=this.basePermissionList.READ),!this.hasPermission(n))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this.setFilterSessionStorage(),this.navigateByUrl(this.getPath(),[this.getPath(),"view",t],!0)}},i.prototype.editOrViewRegister=function(e,t){this.hasPermission(t)?this.editRegister(e,t):this.viewRegister(e,t)},i.prototype.enableOrDisableRegister=function(t,n,i,o){void 0===o&&(o=!0);try{if(n=this.handleEntityId(n),ze.isNull(n))return;if(je.isEmpty(i)&&ze.isNull(this.basePermissionList))this._enableOrDisableRegister(t,n,o);else{if(je.isEmpty(i)&&!ze.isNull(this.basePermissionList)&&(i=this.basePermissionList.UPDATE),!this.hasPermission(i))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this._enableOrDisableRegister(t,n,o)}}catch(e){throw this.loading=!1,this.isListing()&&this.clear(),new Error(e)}},i.prototype._enableOrDisableRegister=function(t,n,i){var o=this;void 0===i&&(i=!0);try{this.baseService.confirmationService.confirm({title:"Confirmação",message:"Deseja realmente "+("DISABLE"===t?"inativar":"ativar")+" este registro?",accept:function(){o.setFilterSessionStorage(),o.loading=!0,o.page=o.newPage(),o.abstractCrudService.enableOrDisable(n,t).toPromise().then((function(){i&&o.findAll(),o.loading=!1,o.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){throw new Error(e)}))}})}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.enableAndDisableAllRegister=function(t,n,i,o){void 0===o&&(o=!0);try{if(n=this.handleEntityIdList(n),ze.isNull(n)||Et.isEmpty(n))return;if(je.isEmpty(i)&&ze.isNull(this.basePermissionList))this._enableAndDisableAllRegister(t,n,o);else{if(je.isEmpty(i)&&!ze.isNull(this.basePermissionList)&&(i=this.basePermissionList.UPDATE),!this.hasPermission(i))return void this.addWarningMessage(e.INJECTOR.get(De).NOT_PERMISSION);this._enableAndDisableAllRegister(t,n,o)}}catch(e){throw this.loading=!1,this.isListing()&&this.clear(),new Error(e)}},i.prototype._enableAndDisableAllRegister=function(t,n,i){var o=this;void 0===i&&(i=!0);try{this.baseService.confirmationService.confirm({title:"Confirmação",message:"Deseja realmente "+("DISABLE"===t?"inativar":"ativar")+" os registros selecionados?",accept:function(){o.setFilterSessionStorage(),o.loading=!0,o.page=o.newPage(),o.abstractCrudService.enableOrDisableAll(n,t).toPromise().then((function(){i&&o.findAll(),o.loading=!1,o.addSuccessMessage(e.INJECTOR.get(De).SUCCESS)}),(function(e){throw new Error(e)}))}})}catch(e){throw this.loading=!1,new Error(e)}},i.prototype.clear=function(){this.baseService.sessionStorageService.remove("filter"),this.page=this.newPage(),this.filter=this.newFilter(),this.clearAppliedFilters(),this.findAll()},i.prototype.handleEntityId=function(e){if(!this.UUIDIsValid(e))throw new Error("O identificador do registro não é válido");if(ze.isNull(e)&&!ze.isNull(this.page)&&!Et.isEmpty(this.page.content)){var t=this.page.content.filter((function(e){return e.selected}))[0];return ze.isNull(t)?null:t.id}return e},i.prototype.handleEntityIdList=function(e){if(!Et.isEmpty(e))for(var t=0;t<e.length;t++)if(!this.UUIDIsValid(e[t]))throw new Error("O identificador do registro não é válido");if(Et.isEmpty(e)&&!ze.isNull(this.page)&&!Et.isEmpty(this.page.content)){var n=this.page.content.filter((function(e){return e.selected})).map((function(e){return e.id}));return Et.isEmpty(n)?null:n}return e},i.ctorParameters=function(){return[{type:Qr},{type:na},{type:s.ActivatedRoute}]},i=_e([t.Component({template:""}),Ce("design:paramtypes",[Qr,na,s.ActivatedRoute])],i)}(ia),la=[oa,sa,ia],pa={align:"",allowNegative:!0,allowZero:!0,decimal:",",precision:2,prefix:"R$ ",suffix:"",thousands:".",nullable:!0,max:999999999.99},da=function(){function e(){}var n;return n=e,e.setMessages=function(e){return{ngModule:n,providers:[{provide:De,useValue:ze.isNull(e)?Pe:e}]}},e=n=_e([t.NgModule({declarations:[$e,Zr,la],entryComponents:[$e],imports:[me.BrowserAnimationsModule,ue.OverlayModule,ne.HttpClientModule,s.RouterModule,o.FlexLayoutModule.withConfig({disableDefaultBps:!0},Ut),F.MatIconModule,J.MatToolbarModule,U.MatSidenavModule,L.MatListModule,I.MatButtonModule,V.MatMenuModule,u.NgxMaskModule.forRoot(),d.NgxCurrencyModule.forRoot(pa),Vr],exports:[Zr,la],providers:[_i,Kr,Ke,Sn,Wr,Gt,{provide:ne.HTTP_INTERCEPTORS,useClass:qr,multi:!0},{provide:ne.HTTP_INTERCEPTORS,useClass:$r,multi:!0}]})],e)}();(zr=e.LocalTimeEnum||(e.LocalTimeEnum={})).FULL="FULL",zr.SHORT="SHORT";var ca,ua,ha,ga,ma=function(){function e(e,t,n){this._router=e,this._matDialog=t,this._authenticationService=n}return e.prototype.canActivate=function(e,t){var n=this._authenticationService.token;return this._authenticationService.isValidToken(n)?ie.of(!0):(this._authenticationService.removeSession(),this._matDialog.closeAll(),this._router.navigate(["oauth/login"]),ie.of(!1))},e.prototype.canActivateChild=function(e,t){return this.canActivate(e,t)},e.ctorParameters=function(){return[{type:s.Router},{type:P.MatDialog},{type:Gr}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(s.Router),t.ɵɵinject(P.MatDialog),t.ɵɵinject(Gr))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[s.Router,P.MatDialog,Gr])],e)}(),fa=function(){function e(e,t,n){this._router=e,this._matDialog=t,this._authenticationService=n}return e.prototype._hasAuthority=function(e,t){return!ze.isNull(e)&&!je.isEmpty(t)&&!!e.authorities.find((function(e){return e.authority.match(t)}))},e.prototype._hasPermission=function(e,t){var n,i;try{for(var o=Ee(e),r=o.next();!r.done;r=o.next()){var a=r.value;if(t.split("/").pop()===a.route)return!0;if(!Et.isEmpty(a.menuList))return this._hasPermission(a.menuList,t)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.canActivate=function(e,t){var n=this._authenticationService.token;return this._authenticationService.isValidToken(n)?this._hasPermission(n.user.menuList,t.url)&&this._hasAuthority(n.user,e.data.authority)?ie.of(!0):(this._router.navigate(["errors/403"]),ie.of(!1)):(this._authenticationService.removeSession(),this._matDialog.closeAll(),this._router.navigate(["oauth/login"]),ie.of(!1))},e.prototype.canActivateChild=function(e,t){return this.canActivate(e,t)},e.ctorParameters=function(){return[{type:s.Router},{type:P.MatDialog},{type:Gr}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(s.Router),t.ɵɵinject(P.MatDialog),t.ɵɵinject(Gr))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[s.Router,P.MatDialog,Gr])],e)}(),ya=function(){},va=function(e){function t(){var t=e.call(this)||this;return t.menuList=[],t}return be(t,e),t}(ya),ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Ge),xa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Ge),_a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Ge),wa=function(e,t){void 0===e&&(e="ALL"),void 0===t&&(t=[]),this.radiobuttonSelected=e,this.entitiesSelected=t},Ca=function(e){function t(){var t=e.call(this)||this;return t.menuList=[],t.id="",t.expanded=!1,t}return be(t,e),t}(Ge),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!1,t.closeable=!1,t.disabled=!1,t}return be(t,e),t}(Ge),Sa=function(e){function t(t,n,i,o,r,a,s,l,p,d,c,u,h,g){var m=e.call(this)||this;return m.sortable=!1,m.hiddenSm=!1,m.visible=!0,m.name=t,m.property=n,m.value=i,m.sortable=o,m.hiddenSm=r,m.visible=a,m.width=s,m.marginLeft=l,m.marginRight=p,m.align=d,m.template=c,m.templateHeader=u,m.sliceLength=h,m.action=g,m}return be(t,e),t}(Ge),Ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Ge);(ca=e.CriteriaOperationEnum||(e.CriteriaOperationEnum={})).EQUALITY="EQUALITY",ca.NEGATION="NEGATION",ca.GREATER_THAN="GREATER_THAN",ca.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",ca.LESS_THAN="LESS_THAN",ca.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",ca.LIKE="LIKE",ca.STARTS_WITH="STARTS_WITH",ca.ENDS_WITH="ENDS_WITH",ca.CONTAINS="CONTAINS",ca.IN="IN",(ua=e.CriteriaSortDirectionEnum||(e.CriteriaSortDirectionEnum={})).ASC="ASC",ua.DESC="DESC",(ha=e.MenuTypeEnum||(e.MenuTypeEnum={})).GROUP="GROUP",ha.COLLAPSABLE="COLLAPSABLE",ha.ITEM="ITEM",(ga=e.RadioButtonEnum||(e.RadioButtonEnum={})).START_AND_END="Inicial/Final",ga.BY_SELECTION="Por seleção",ga.TO_OMIT="Omitir",ga.ALL="Todos";var Oa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(ya),ka=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.make=!0,t.update=!0,t.read=!0,t.delete=!0,t}return be(t,e),t}(ya),Da=function(e){function t(){var t=e.call(this)||this;return t.permissionList=[],t}return be(t,e),t}(ya),Pa=function(e){function t(t,n){var i=e.call(this)||this;return i.path=t,i.http=n,i}return be(t,e),t.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this)},t.prototype.url=function(e){var t="api/"+this.path;return e?t.concat("/"+e):t},t.prototype.getOne=function(e){return this.http.get(this.url(""+e),this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.find=function(e){return this.http.post(this.url("find-all"),e,this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.findAll=function(){return this.http.get(this.url(),this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.findAllEnabled=function(e,t){return(!e||e&&e<0)&&(e=0),(!t||t&&t<=0)&&(t=10),this.http.get(this.url("find-all-enabled?page="+e+"&size="+t),this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.findByValue=function(e,t,n,i){void 0===n&&(n=10);var o=e;o=e?je.removeAccents(e).trim():"",(!t||t&&t<0)&&(t=0),(!n||n&&n<=0)&&(n=10);var r="";return ze.isNull(i)||je.isEmpty(i.property)||(r="&sort="+i.property+","+i.direction),this.http.get(this.url("find-by-value?page="+t+"&size="+n+r+"&value="+o),this.options()).pipe(oe.takeUntil(this.onDestroy),oe.map(this.mapper),oe.catchError(this.handleError))},t}(We),Ra=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.path=t,i}return be(t,e),t.prototype.save=function(e){return this.validate(e),this.http.post(this.url(),e,this.options()).pipe(oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.saveAll=function(e){var t=this;return e.forEach((function(e){return t.validate(e)})),this.http.post(this.url("save-all"),e,this.options()).pipe(oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.delete=function(e){return this.http.delete(this.url(""+e)).pipe(oe.map((function(){return null})),oe.catchError(this.handleError))},t.prototype.deleteAll=function(e){return this.http.post(this.url("delete-all"),e,this.options()).pipe(oe.map(this.mapper),oe.catchError(this.handleError))},t.prototype.validate=function(e){},t}(Pa);String.prototype.numberFullName=function(e){for(var t,n,i,o,r=[["zero","um","dois","três","quatro","cinco","seis","sete","oito","nove","dez","onze","doze","treze","quatorze","quinze","dezesseis","dezessete","dezoito","dezenove"],["dez","vinte","trinta","quarenta","cinquenta","sessenta","setenta","oitenta","noventa"],["cem","cento","duzentos","trezentos","quatrocentos","quinhentos","seiscentos","setecentos","oitocentos","novecentos"],["mil","milhão","bilhão","trilhão","quadrilhão","quintilhão","sextilhão","setilhão","octilhão","nonilhão","decilhão","undecilhão","dodecilhão","tredecilhão","quatrodecilhão","quindecilhão","sedecilhão","septendecilhão","octencilhão","nonencilhão"]],a=this.replace(e?/[^,\d]/g:/\D/g,"").split(","),s=" e ",l="real",p="centavo",d=a.length-1,c=-1,u=[],h=[],g="";++c<=d;h=[])if(c&&(a[c]=(1*Number("."+a[c])).toFixed(2).slice(2)),(t=(n=a[c]).slice((o=n.length)%3).match(/\d{3}/g),n=o%3?[n.slice(0,o%3)]:[],n=t?n.concat(t):n).length){for(t=-1,o=n.length;++t<o;g="")(i=1*n[t])&&(i%100<20&&(g+=r[0][i%100])||i%100+1&&(g+=r[1][(i%100/10>>0)-1]+(i%10?s+r[0][i%10]:"")),h.push((i<100?g:i%100?r[2][i/100>>0]+s+g:r[2][100==i?0:i/100>>0])+(Number(g=String(o-t-2))>-1?" "+(i>1&&Number(g)>0?r[3][g].replace("ão","ões"):r[3][g]):"")));(t=h.length>1?(t=h.pop(),h.join(" ")+s+t):h.join("")||(!c&&1*Number(a[c+1])>0||u.length?"":r[0][0]))&&u.push(t+(e?" "+(1*n.join("")>1?c?p+"s":(/0{6,}$/.test(a[0])?"de ":"")+l.replace("l","is"):c?p:l):""))}return u.join(s)};var Aa,Ta=function(){function e(){}return e.transform=function(e,t,n){return ze.isNull(e)?je.EMPTY:n?i.formatPercent(e,"pt",t):i.formatCurrency(e,"pt","R$",t)},e.transformNumberFullName=function(e,t){return void 0===t&&(t=!0),this.transform(e,"1.2-2").substring(2).trim().numberFullName(t)},e}(),Ma=function(){function e(){}return e.clearFormat=function(e){return je.isEmpty(e)?"":e.replace(/\D/g,"")},e.isValidCpf=function(e){if(je.isEmpty(e))return!1;if(11!==(e=je.removeAccents(e)).length||"00000000000"===e||"11111111111"===e||"22222222222"===e||"33333333333"===e||"44444444444"===e||"55555555555"===e||"66666666666"===e||"77777777777"===e||"88888888888"===e||"99999999999"===e)return!1;for(var t=0,n=0;n<9;n++)t+=+e.charAt(n)*(10-n);var i=11-t%11;if(10!==i&&11!==i||(i=0),i!==+e.charAt(9))return!1;t=0;for(n=0;n<10;n++)t+=+e.charAt(n)*(11-n);return 10!==(i=11-t%11)&&11!==i||(i=0),i===+e.charAt(10)},e.isValidCnpj=function(e){if(je.isEmpty(e))return!1;if(e=je.removeAccents(e),je.isEmpty(e)||14!==e.length||"00000000000000"===e||"11111111111111"===e||"22222222222222"===e||"33333333333333"===e||"44444444444444"===e||"55555555555555"===e||"66666666666666"===e||"77777777777777"===e||"88888888888888"===e||"99999999999999"===e)return!1;for(var t=e.length-2,n=e.substring(0,t),i=e.substring(t),o=0,r=t-7,a=t;a>=1;a--)o+=+n.charAt(t-a)*r--,r<2&&(r=9);var s=o%11<2?0:11-o%11;if(s!==+i.charAt(0))return!1;t+=1,n=e.substring(0,t),o=0,r=t-7;for(a=t;a>=1;a--)o+=+n.charAt(t-a)*r--,r<2&&(r=9);return(s=o%11<2?0:11-o%11)===+i.charAt(1)},e.isValidStateRegistration=function(e,t){if(je.isEmpty(e)||je.isEmpty(t))return!1;if("ISENTO"===t.toUpperCase())return!0;if("GO"===e){var n=ye.onlyNumbers(t);return this.calcDigit(n)}return ye.isValidIE(e,t)},e.isValidCep=function(e){return!je.isEmpty(e)&&ye.isValidCEP(e)},e.calcDigit=function(e){var t=e.length,n=t-1,i=t,o=e.substring(0,n),r=0;o.split("").forEach((function(e){r+=parseInt(e,10)*i,i--}));var a=11-r%11,s=0;return Number(e)>=101031050&&Number(e)<=101199979&&(s=1),10===a?a=s:11===a&&(a=0),a===parseInt(e.charAt(n),10)},e}(),Fa=function(){function e(){}return e.isValid=function(e){return/^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e)&&(e.includes("org")||e.includes(".com")||e.includes(".br")||e.includes(".net")||e.includes(".pt")||e.includes(".io")||e.includes(".ru")||e.includes(".uk")||e.includes(".de")||e.includes(".tk")||e.includes(".info")||e.includes(".nl")||e.includes(".eu")||e.includes(".it")||e.includes(".au")||e.includes(".fr")||e.includes(".site"))},e}(),Na=function(){function e(e){this.sortable$=!1,this.hiddenSm$=!1,this.visible$=!0,this.align$="start center",this.breakpointObserverService$=e}return e.instance=function(t){return new e(t)},e.prototype.name=function(e){return this.name$=e,this},e.prototype.property=function(e){return this.property$=e,this},e.prototype.value=function(e){return this.value$=e,this},e.prototype.sortable=function(e){return this.sortable$=e,this},e.prototype.hiddenSm=function(e){return this.hiddenSm$=e,this},e.prototype.visible=function(e){return this.visible$=e,this},e.prototype.width=function(e){return this.width$=ie.of(e),this},e.prototype.marginLeft=function(e){return this.marginLeft$=ie.of(e),this},e.prototype.marginRight=function(e){return this.marginRight$=ie.of(e),this},e.prototype.align=function(e){return this.align$=e,this},e.prototype.breakpointWidth=function(e){return this.width$=this.breakpointObserverService$.size$.pipe(oe.map((function(t){return e.has(t)?e.get(t):"auto"}))),this},e.prototype.template=function(e){return this.template$=e,this},e.prototype.templateHeader=function(e){return this.templateHeader$=e,this},e.prototype.sliceLength=function(e){return this.sliceLength$=e,this},e.prototype.action=function(e){return this.action$=e,this},e.prototype.build=function(){return new Sa(this.name$,this.property$,this.value$,this.sortable$,this.hiddenSm$,this.visible$,this.width$,this.marginLeft$,this.marginRight$,this.align$,this.template$,this.templateHeader$,this.sliceLength$,this.action$)},e}(),La=function(){function e(){}return e.get=function(e){return this._queryParams.get(e)},e.has=function(e){return this._queryParams.has(e)},e._queryParams=new URLSearchParams(window.location.href),e}();function Va(e,t){if(!Reflect.getMetadata)throw new Error("You forgot add \"import 'reflect-metadata';\" to polyfills.ts");return Reflect.getMetadata("design:type",e,t)}(Aa=e.GIPISortDirectionEnum||(e.GIPISortDirectionEnum={})).ASC="ASC",Aa.DESC="DESC";var ja=function(){},Ba=function(){},za=function(){function e(e,t){this.description=e,this.key=t}return Object.defineProperty(e.prototype,"description",{get:function(){return this._description},set:function(e){this._description=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this._key},set:function(e){this._key=e},enumerable:!1,configurable:!0}),e}(),Ya=function(){},Ha=function(){function e(e,t,n){e&&e>=0&&(this.pageIndex=e),t&&t>=0&&(this.pageSize=t),n&&n>=0&&(this.length=n)}return Object.defineProperty(e.prototype,"pageIndex",{get:function(){return this._pageIndex},set:function(e){this._pageIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageSize",{get:function(){return this._pageSize},set:function(e){this._pageSize=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(e){this._length=e},enumerable:!1,configurable:!0}),e}(),Ua=function(){function e(e,t){this.overlay=e,this.injector=t}return e.prototype.open=function(e){var t=e.origin,n=e.content,i=e.data,o=e.width,r=e.height,a=e.event,s=this.overlay.create(this.getOverlayConfig({origin:t,width:o,height:r,event:a})),l=new ut(s,n,i),p=this.createInjector(l,this.injector);return s.attach(new y.ComponentPortal(ht,null,p)),l},e.prototype.getOverlayConfig=function(e){var t=e.origin,n=e.width,i=e.height,o=e.event;return new ue.OverlayConfig({hasBackdrop:!0,width:n,height:i,backdropClass:"popover-backdrop",positionStrategy:this.getOverlayPosition(t,o),scrollStrategy:this.overlay.scrollStrategies.reposition()})},e.prototype.getOverlayPosition=function(e,t){var n=t.target.offsetTop-document.querySelector(".mat-sidenav-content").scrollTop;return t?this.overlay.position().global().top(n+50+"px").left(t.clientX-30+"px"):this.overlay.position().flexibleConnectedTo(e).withPositions(this.getPositions()).withFlexibleDimensions(!1).withPush(!1)},e.prototype.updatePosition=function(e,t){e.overlay.updatePositionStrategy(this.overlay.position().global().top(t.clientY+"px").left(t.clientX+"px"))},e.prototype.createInjector=function(e,t){var n=new WeakMap([[ut,e]]);return new y.PortalInjector(t,n)},e.prototype.getPositions=function(){return[{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}]},e.ctorParameters=function(){return[{type:ue.Overlay},{type:t.Injector}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(ue.Overlay),t.ɵɵinject(t.INJECTOR))},token:e,providedIn:"root"}),e=_e([t.Injectable({providedIn:"root"}),Ce("design:paramtypes",[ue.Overlay,t.Injector])],e)}(),Ga=function(){function e(e,t,n,i,o,r,a,s,l,p,d,c,u,h,g,m,f,y,v,b,x,_){this._sortable=!1,this._visible=!0,this._checkboxable=!1,this._name=e,this._property=t,this._value=n,this._sortable=i,this._visible=o,this._checkboxable=r,this._columnSpan=a,this._columnSpanXs=s,this._columnSpanSm=l,this._columnSpanMd=p,this._columnSpanLg=d,this._columnSpanXl=c,this._minWidth=u,this._maxWidth=h,this._paddingInline=g,this._align=m,this._templateCell=f,this._templateHeader=y,this._sliceLength=v,this._comparator=b,this._pipe=x,this._action=_}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"property",{get:function(){return this._property},set:function(e){this._property=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sortable",{get:function(){return this._sortable},set:function(e){this._sortable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"checkboxable",{get:function(){return this._checkboxable},set:function(e){this._checkboxable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpan",{get:function(){return this._columnSpan},set:function(e){this._columnSpan=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanXs",{get:function(){return this._columnSpanXs},set:function(e){this._columnSpanXs=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanSm",{get:function(){return this._columnSpanSm},set:function(e){this._columnSpanSm=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanMd",{get:function(){return this._columnSpanMd},set:function(e){this._columnSpanMd=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanLg",{get:function(){return this._columnSpanLg},set:function(e){this._columnSpanLg=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnSpanXl",{get:function(){return this._columnSpanXl},set:function(e){this._columnSpanXl=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minWidth",{get:function(){return this._minWidth},set:function(e){this._minWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(e){this._maxWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddingInline",{get:function(){return this._paddingInline},set:function(e){this._paddingInline=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"templateCell",{get:function(){return this._templateCell},set:function(e){this._templateCell=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"templateHeader",{get:function(){return this._templateHeader},set:function(e){this._templateHeader=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceLength",{get:function(){return this._sliceLength},set:function(e){this._sliceLength=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"comparator",{get:function(){return this._comparator},set:function(e){this._comparator=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pipe",{get:function(){return this._pipe},set:function(e){this._pipe=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"action",{get:function(){return this._action},set:function(e){this._action=e},enumerable:!1,configurable:!0}),e}(),qa=function(){function e(){this._sortable$=!1,this._visible$=!0,this._checkboxable$=!1,this._align$="left"}return e.instance=function(){return new e},e.prototype.name=function(e){return this._name$=e,this},e.prototype.property=function(e){return this._property$=e,this},e.prototype.value=function(e){return this._value$=e,this},e.prototype.sortable=function(e){return this._sortable$=e,this},e.prototype.visible=function(e){return this._visible$=e,this},e.prototype.checkboxable=function(e){return this._checkboxable$=e,this},e.prototype.columnSpan=function(e){return this._columnSpan$=e,this},e.prototype.columnSpanXs=function(e){return this._columnSpanXs$=e,this},e.prototype.columnSpanSm=function(e){return this._columnSpanSm$=e,this},e.prototype.columnSpanMd=function(e){return this._columnSpanMd$=e,this},e.prototype.columnSpanLg=function(e){return this._columnSpanLg$=e,this},e.prototype.columnSpanXl=function(e){return this._columnSpanXl$=e,this},e.prototype.minWidth=function(e){return this._minWidth$=e,this},e.prototype.maxWidth=function(e){return this._maxWidth$=e,this},e.prototype.paddingInline=function(e){return this._paddingInline$=e,this},e.prototype.align=function(e){return this._align$=e,this},e.prototype.templateCell=function(e){return this._templateCell$=e,this},e.prototype.templateHeader=function(e){return this._templateHeader$=e,this},e.prototype.sliceLength=function(e){return this._sliceLength$=e,this},e.prototype.comparator=function(e){return this._comparator$=e,this},e.prototype.pipe=function(e){return this._pipe$=e,this},e.prototype.action=function(e){return this._action$=e,this},e.prototype.build=function(){return new Ga(this._name$,this._property$,this._value$,this._sortable$,this._visible$,this._checkboxable$,this._columnSpan$,this._columnSpanXs$,this._columnSpanSm$,this._columnSpanMd$,this._columnSpanLg$,this._columnSpanXl$,this._minWidth$,this._maxWidth$,this._paddingInline$,this._align$,this._templateCell$,this._templateHeader$,this._sliceLength$,this._comparator$,this._pipe$,this._action$)},e}();e.APP_MESSAGES=De,e.AbstractComponent=He,e.AbstractCrudComponent=Hr,e.AbstractCrudService=Ra,e.AbstractDTO=Ge,e.AbstractFindComponent=Yr,e.AbstractFindService=Pa,e.AbstractModel=ya,e.AbstractService=We,e.AlertComponent=$e,e.Archive=Ue,e.ArrayUtil=Et,e.AuthGuard=ma,e.AuthInterceptor=qr,e.AuthenticationService=Gr,e.BaseUser=va,e.BreakpointObserverService=xi,e.BrowserUtil=pr,e.ButtonComponent=Me,e.CalendarMonthYearComponent=wr,e.CardComponent=Fe,e.ChartDTO=ba,e.CheckboxComponent=Ne,e.ConfirmationDTO=bn,e.ConfirmationService=Sn,e.CoreModule=da,e.CurrencyUtil=Ta,e.DEFAULT_MESSAGES=Pe,e.DateAdapter=Ji,e.DateRange=Qi,e.DateRangePickerComponent=cr,e.DateUtil=$i,e.DatepickerModule=xr,e.DefaultMatCalendarRangeStrategy=yo,e.DialogDTO=xa,e.DialogService=Wr,e.DocumentUtil=Ma,e.EmailUtil=Fa,e.ErrorInterceptor=$r,e.FilterDTO=_a,e.GIPIAbstractComponent=ia,e.GIPIAbstractCrudComponent=oa,e.GIPIAbstractCrudService=Qr,e.GIPIAbstractDTO=Ya,e.GIPIAbstractFilterModel=ja,e.GIPIAbstractFindComponent=sa,e.GIPIAbstractFormComponent=dn,e.GIPIAbstractModel=Ba,e.GIPIAbstractService=Jr,e.GIPIActionRowComponent=pn,e.GIPIAppliedFilter=za,e.GIPIAutowired=function(){return function(e,n){var i=!e.constructor["ɵcmp"],o=Va(e,n),r=function(){var i=e.constructor["ɵcmp"],r=null;r=ze.isNull(i)?e.constructor["ɵfac"]:i.factory,i.factory=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var a=r.apply(void 0,ke(e));return a[n]=t.ɵɵdirectiveInject(o),a}};i?Promise.resolve().then(r).catch((function(){throw new Error("An error occurred while injecting the class: "+o)})):r()}},e.GIPIBadgeComponent=cn,e.GIPIBaseService=na,e.GIPIBreakpointService=Zt,e.GIPIButtonComponent=gn,e.GIPICardComponent=fn,e.GIPIColDirective=Qt,e.GIPIConfirmationDialogComponent=xn,e.GIPIConnectedOverlayScrollHandler=Yn,e.GIPIDomHandler=un,e.GIPIDropdownMenuComponent=wn,e.GIPIDynamicTabDirective=rn,e.GIPIEmptyStateComponent=Cn,e.GIPIExpansionPanelComponent=In,e.GIPIFileDragAndDropComponent=En,e.GIPIFileService=ea,e.GIPIFooterComponent=On,e.GIPIFormFieldComponent=Dn,e.GIPIHelpfulTipComponent=Rn,e.GIPIInfiniteScrollDirective=$t,e.GIPIInputCheckboxComponent=Tn,e.GIPIInputCurrencyComponent=Fn,e.GIPIInputMonthPickerComponent=Ln,e.GIPIInputPhoneComponent=jn,e.GIPIInputSearchComponent=Xn,e.GIPIInputSelectComponent=$n,e.GIPIInputSelectEnumComponent=zn,e.GIPIInputSelectListboxComponent=Kn,e.GIPIInputSelectPagedComponent=Jn,e.GIPIInputSelectRadioComponent=ei,e.GIPINotificationComponent=ti,e.GIPINoveltiesComponent=ni,e.GIPIOverlayComponent=Gn,e.GIPIOverlayService=lt,e.GIPIPageEvent=Ha,e.GIPIPageModel=ra,e.GIPIPaginatePipe=ln,e.GIPIPaginationControlsDirective=on,e.GIPIPaginationService=nn,e.GIPIPasswordRequerimentsComponent=ri,e.GIPIPopoverComponent=si,e.GIPIPopoverTarget=li,e.GIPIPopoverTrigger=hn,e.GIPIRadioGroupComponent=di,e.GIPIRangePageComponent=hi,e.GIPIRangeSliderComponent=mi,e.GIPIResizeService=Kt,e.GIPIRowDirective=Jt,e.GIPISelectButtonComponent=fi,e.GIPISelectComponent=yi,e.GIPISessionStorageService=ta,e.GIPISidenavComponent=Ci,e.GIPISidenavContainerComponent=wi,e.GIPISkeletonComponent=en,e.GIPISkeletonDirective=tn,e.GIPISlideToggleComponent=Si,e.GIPISortModel=aa,e.GIPISplitButtonComponent=Oi,e.GIPIStepperComponent=ki,e.GIPITabComponent=ji,e.GIPITabGroupComponent=zi,e.GIPITableBodyComponent=Di,e.GIPITableComponent=Ni,e.GIPITableFooterComponent=Pi,e.GIPITableHeaderComponent=Ai,e.GIPITablePaginationComponent=Ti,e.GIPITableProgressBarComponent=Fi,e.GIPITemplateDirective=an,e.GIPITextareaComponent=Hi,e.GIPIToolbarComponent=Ui,e.GIPITopNavComponent=Gi,e.GIPIUserProfileComponent=Wi,e.GIPI_BREAKPOINTS=Ut,e.GIPI_CUSTOM_BREAKPOINTS_PROVIDER=Gt,e.GIPI_MONTH_YEAR_SCROLL_STRATEGY=Ir,e.GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY=Sr,e.GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY_PROVIDER=Or,e.IconComponent=Le,e.InputComponent=Qe,e.InputCurrencyComponent=Ve,e.InputFileComponent=Xe,e.InputListboxDTO=wa,e.ItssTemplate=Vt,e.LoadingComponent=tt,e.LoadingOverlayComponent=et,e.LocalTimePipe=Zr,e.MAT_DATEPICKER_SCROLL_STRATEGY=Vo,e.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY=jo,e.MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER=zo,e.MAT_DATEPICKER_VALIDATORS=Wo,e.MAT_DATEPICKER_VALUE_ACCESSOR=$o,e.MAT_DATE_FORMATS=Re,e.MAT_DATE_LOCALE=Ki,e.MAT_DATE_LOCALE_FACTORY=Xi,e.MAT_DATE_LOCALE_PROVIDER=Zi,e.MAT_DATE_RANGE_SELECTION_STRATEGY=fo,e.MAT_NATIVE_DATE_FORMATS={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},e.MAT_RANGE_DATE_SELECTION_MODEL_FACTORY=ro,e.MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER=ao,e.MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY=io,e.MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER=oo,e.MatCalendar=Eo,e.MatCalendarBody=co,e.MatCalendarCell=po,e.MatCalendarHeader=Oo,e.MatDateRangeInput=Jo,e.MatDateRangePicker=Go,e.MatDateSelectionModel=eo,e.MatDatepicker=qo,e.MatDatepickerContent=Ho,e.MatDatepickerInput=Xo,e.MatDatepickerInputEvent=ko,e.MatDatepickerIntl=lo,e.MatDatepickerToggle=er,e.MatDatepickerToggleIcon=Qo,e.MatEndDate=Fo,e.MatMonthView=xo,e.MatMultiYearView=_o,e.MatRangeDateSelectionModel=no,e.MatSingleDateSelectionModel=to,e.MatStartDate=Mo,e.MatYearView=So,e.MaxRangeDirective=hr,e.MaxRangeSelectionStrategy=ur,e.MenuDTO=Ca,e.MessageDTO=qe,e.MessageService=Ke,e.MonthPickerModel=Dr,e.MonthYear=kr,e.MonthYearPickerComponent=Rr,e.MonthYearPickerModule=Ar,e.MultitenantModel=Oa,e.NativeDateAdapter=lr,e.NavService=_i,e.NumberUtil=Ze,e.ObjectUtil=ze,e.OverlayPanelComponent=ct,e.POINTS_NAME=vi,e.PageDTO=jr,e.PasswordUtil=ii,e.Permission=ka,e.PermissionGuard=fa,e.PhoneMaskDirective=zt,e.PhoneUtil=Je,e.Platform=nr,e.PopoverComponent=ht,e.PopoverRef=ut,e.PopoverService=Ua,e.PresetRangeComponent=mr,e.RadioGroupEntityComponent=gt,e.RadioGroupEnumComponent=ft,e.RangePage=ui,e.Role=Da,e.SelectButtonAddComponent=vt,e.SelectButtonNextBatchComponent=bt,e.SelectEntityComponent=Ot,e.SelectEntityPagedComponent=yt,e.SelectEnumComponent=kt,e.SelectMonthPeriodComponent=Dt,e.SelectNoEntriesFoundDirective=xt,e.SelectSearchClearDirective=_t,e.SelectSearchComponent=It,e.SharedModule=Vr,e.SlideToggleComponent=Pt,e.SortDTO=Br,e.SortModel=Ri,e.StepperComponent=Rt,e.StringUtil=je,e.SvgRegisterService=Kr,e.TabDTO=Ia,e.TabModel=Li,e.TableColumnBuilder=Na,e.TableColumnBuilderModel=qa,e.TableColumnDTO=Sa,e.TableColumnModel=Ga,e.TableComponent=Nt,e.TableScrolledComponent=Mt,e.TimeUtil=Xr,e.TokenDTO=Ea,e.URLParamsUtil=La,e.UUIDUtil=Ye,e.customCurrencyMaskConfig=pa,e.getReflectType=Va,e.gridResponsiveMap=Xt,e.matDatepickerAnimations=No,e.siderResponsiveMap={xs:"(max-width: 420px)",sm:"(max-width: 600px)",md:"(max-width: 768px)",lg:"(max-width: 1366px)",xl:"(max-width: 1920px)"},e.transformPopover=ai,e.yearsPerPage=24,e.yearsPerRow=4,e.ƟCMP="ɵcmp",e.ƟFAC="ɵfac",e.ƟPROV="ɵprov",e.ɵ0=Lr,e.ɵa=Ro,e.ɵb=vo,e.ɵc=bo,e.ɵd=Uo,e.ɵe=Ko,e.ɵf=Do,e.ɵg=st,e.ɵh=vn,e.ɵi=qt,e.ɵj=Lt,e.ɵk=Ht,e.ɵl=Bt,e.ɵm=Yt,e.ɵn=jt,e.ɵo=Ct,e.ɵq=Te,e.ɵr=vr,Object.defineProperty(e,"__esModule",{value:!0})}));
|
67
67
|
//# sourceMappingURL=gipisistemas-ng-core.umd.min.js.map
|