@coolon/angular-ui-powerups 0.0.61 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/coolon-angular-ui-powerups.umd.js +414 -117
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +2 -2
- package/esm2015/index.js +2 -2
- package/esm2015/lib/interaction/activity.js +11 -1
- package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +49 -1
- package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js +7 -56
- package/esm2015/lib/interaction/guards/close-interaction.guard.js +62 -0
- package/esm2015/lib/interaction/index.js +3 -2
- package/esm2015/lib/interaction/interaction-context.js +24 -5
- package/esm2015/lib/interaction/services/dialog-interaction.service.js +77 -4
- package/esm2015/lib/place/guards/leave-place.guard.js +144 -20
- package/esm2015/public_api.js +2 -2
- package/esm5/coolon-angular-ui-powerups.js +2 -2
- package/esm5/index.js +2 -2
- package/esm5/lib/interaction/activity.js +11 -1
- package/esm5/lib/interaction/components/activity-container/activity-container.component.js +67 -1
- package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js +11 -78
- package/esm5/lib/interaction/guards/close-interaction.guard.js +66 -0
- package/esm5/lib/interaction/index.js +3 -2
- package/esm5/lib/interaction/interaction-context.js +25 -6
- package/esm5/lib/interaction/services/dialog-interaction.service.js +96 -4
- package/esm5/lib/place/guards/leave-place.guard.js +147 -20
- package/esm5/public_api.js +2 -2
- package/fesm2015/coolon-angular-ui-powerups.js +354 -82
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/fesm5/coolon-angular-ui-powerups.js +401 -105
- package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/interaction/activity.d.ts +2 -0
- package/lib/interaction/components/activity-container/activity-container.component.d.ts +10 -1
- package/lib/interaction/components/activity-outlet/activity-outlet.component.d.ts +2 -9
- package/lib/interaction/guards/close-interaction.guard.d.ts +12 -0
- package/lib/interaction/index.d.ts +1 -0
- package/lib/interaction/interaction-context.d.ts +17 -4
- package/lib/interaction/services/dialog-interaction.service.d.ts +15 -2
- package/lib/place/guards/leave-place.guard.d.ts +7 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@angular/router"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("lodash"),require("@angular/animations"),require("resize-observer-polyfill")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/material/tabs","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@angular/router","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","lodash","@angular/animations","resize-observer-polyfill"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.material.tabs,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.ng.router,t.src,t.fastMemoizeDecorator,null,t.___default,t.ng.animations,t.ResizeObserver)}(this,(function(t,e,n,o,r,i,a,u,s,l,c,p,f,d,m,y,h,g,v,b,I){"use strict";var C="default"in v?v.default:v;I=I&&I.hasOwnProperty("default")?I.default:I;var P=function(t,e){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function w(t,e){function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var M=function(){return(M=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function D(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function O(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function R(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{s(o.next(t))}catch(t){i(t)}}function u(t){try{s(o.throw(t))}catch(t){i(t)}}function s(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(a,u)}s((o=o.apply(t,e||[])).next())}))}function x(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(u.GarbageCollector),E=function(t){function e(){var e=t.call(this)||this;e.valueModel=new u.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var o=e;return e.errorStateMatcher={isErrorState:function(t,e){return o.hasErrors()}},e}return w(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},D([u.UseDelegate(),O("design:type",u.ValueModel),O("design:paramtypes",[u.ValueModel])],e.prototype,"userValueModel",null),e}(A);var T=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(E),j=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(E),_=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},D([u.UseDelegate(),O("design:type",u.ListModel)],e.prototype,"optionsModel",void 0),D([u.StoreInListModel("optionsModel"),O("design:type",Array)],e.prototype,"options",void 0),e}(E);var F=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(E),k=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandParameterProvided=!1,n}return w(e,t),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){u.assert.notNil(this.pectinCommand),this.pectinCommand instanceof u.UnaryCommand?this._commandParameterProvided||u.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&u.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,u.Dsl.disposeWith(this).chain)(this.pectinCommand.enabled).subscribe((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}))},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof u.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(u.GarbageCollector);var V=function(t){function o(e,n,o){var r=t.call(this)||this;return r.el=e,r.ngZone=n,r.document=o,r}return w(o,t),o.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},o.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},o.prototype.ngOnInit=function(){},o.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,u.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):u.Logger.get(this).warn("pectinFocusBinding was nil")},o.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},o.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},o.prototype.isFocused=function(t){return this.document.activeElement===t},o.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(u.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):u.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(o.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),o.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},o.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},o.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],o.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},o.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},o}(A);var L=new n.InjectionToken("InteractionContext"),N=function(){};var B,q,H=new n.InjectionToken("InteractionActivityData");t.ɵv=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{set:function(t){this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:N,useValue:this},{provide:H,useValue:t.activityData}],parent:this.injector}),o=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(o,0,e),this.activityComponentRef.instance.initialise(t)},t.prototype.alert=function(t){return this.interactionContext.alert(t)},t.prototype.confirm=function(t){return this.interactionContext.confirm(t)},t.prototype.confirmThen=function(t,e,n){return this.interactionContext.confirmThen(t,e,n)},t.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},t.prototype.notifyReady=function(){this.activityComponentRef.instance.onActivityReady&&this.activityComponentRef.instance.onActivityReady()},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-outlet",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},t.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},t}(),B=t.ɵv||(t.ɵv={}),q=function(){function t(t){this.context=t}return t.prototype.alert=function(t){return u.lang.notImplemented()},t.prototype.confirm=function(t){return u.lang.notImplemented()},t.prototype.confirmThen=function(t,e,n){return u.lang.notImplemented()},t.prototype.startActivity=function(t,e){return u.lang.notImplemented()},t}(),B.OutletInteractionContext=q;var U=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new u.DelegatingValueModel).withDefault(!1),e}return w(e,t),e.prototype.initialise=function(t){l.assert.isNil(this.activityContext),this.activityContext=t},e.prototype.done=function(t){return this.activityContext.onDone(t)},e.prototype.cancel=function(t){this.activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(A);var z=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-raised-button color="primary" (click)="done()">{{alert.ok()}}</button>\n</p>\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[H]}]}]},e}(U);t.ɵba=function(t){function e(e,n){var o=t.call(this)||this;return o.config=e,o.interactionContext=n,u.assert.notNil(e),o}return w(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[H]}]},{type:N}]},e}(U),function(t){function e(){}t.Data=e}(t.ɵba||(t.ɵba={}));var K=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,u.assert.notNil(e),n}return w(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[H]}]}]},e}(U);t.ɵu=function(e){function o(){var t=e.call(this)||this;return t.activityOutletTabs=new u.MutableListModel,t.obsoleteTabs=[],t.finished=!1,t}return w(o,e),o.prototype.ngOnInit=function(){},o.prototype.ngAfterViewInit=function(){var t=this;u.Dsl.disposeWith(this).observe.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},o.prototype.initialise=function(t){var e=this;this.initialActivityOutletContext={activityClass:t.activityClass,activityData:t.activityData,onDone:function(n){return e.finished=!0,t.onDone(n)},onCancel:function(n){return e.finished=!0,t.onCancel(n)},interactionContext:this}},o.prototype.startActivity=function(t,e){var n=this,o=this;return new Promise((function(r,i){var a={interactionContext:o,activityClass:t,activityData:e,onDone:function(t){o.obsoleteTabs.push(a),r(t),setTimeout((function(){return o.animateTabs()}))},onCancel:function(t){o.obsoleteTabs.push(a),i(t),setTimeout((function(){return o.animateTabs()}))}};o.activityOutletTabs.push(a),o.tabs.selectedIndex=n.activityOutletTabs.length}))},o.prototype.alert=function(t){return this.startActivity(z,t)},o.prototype.confirm=function(t){return this.startActivity(K,t)},o.prototype.confirmThen=function(e,n,o){return this.startActivity(t.ɵba,{confirm:e,activityType:n,data:o})},o.prototype.onAnimationFinished=function(){var t=this;this.activityOutletTabs.value=this.activityOutletTabs.value.filter((function(e){return!t.obsoleteTabs.includes(e)})),this.obsoleteTabs=[],this.outlets.toArray()[this.tabs.selectedIndex].notifyReady()},o.prototype.animateTabs=function(){this.finished||(this.tabs.selectedIndex=this.activityOutletTabs.length-this.obsoleteTabs.length)},o.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="true">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]="this"\n [activityContext]="initialActivityOutletContext"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n <mat-tab *ngFor="let tab of activityOutletTabs.value">\n <angular-ui-powerups-activity-outlet [interactionContext]="this"\n [activityContext]="tab"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:block}"]}]}],o.ctorParameters=function(){return[]},o.propDecorators={parentInteractionContext:[{type:n.Input}],initialActivityOutletContext:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[t.ɵv]}]},o}(A),function(t){function e(){}t.ActivityContext=e}(t.ɵu||(t.ɵu={}));var G=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),X=function(e){function o(t,n,o){var r=e.call(this)||this;return r.dialogService=t,r.dialogServiceDefaults=n,r.matDialogDefaultConfig=o,l.assert.notNil(t),r}return w(o,e),o.prototype.startActivity=function(t,e){return this._startActivity(t,e)},o.prototype._startActivity=function(e,n,o){var r=this;void 0===o&&(o=!0);var i=M({autoFocus:!1,hasBackdrop:!0},this.matDialogDefaultConfig,this.dialogServiceDefaults,{data:n,disableClose:o,panelClass:"dialog-interaction-service"}),a=this.dialogService.open(t.ɵu,i);return new Promise((function(t,o){var i=a.componentInstance;i.parentInteractionContext=r,i.initialise({activityClass:e,activityData:n,onDone:function(e){t(e),a.close(e)},onCancel:function(t){o(t),a.close(t)}}),a.updateSize()}))},o.prototype.alert=function(t){return this._startActivity(z,t,!1)},o.prototype.confirm=function(t){return this._startActivity(K,t,!0)},o.prototype.confirmThen=function(e,n,o){return this._startActivity(t.ɵba,{confirm:e,activityType:n,data:o},!0)},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:r.MatDialog},{type:c.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[G]}]},{type:c.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[c.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(c.MatDialog),n.ɵɵinject(G,8),n.ɵɵinject(c.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:o,providedIn:"root"}),o}(N);var W=function(){function o(){}return o.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,r.MatButtonModule,r.MatDialogModule,r.MatTabsModule,s.PortalModule],declarations:[t.ɵu,K,t.ɵba,z,t.ɵv],exports:[t.ɵu,t.ɵv],entryComponents:[t.ɵu,K,t.ɵba,z],providers:[X]}]}],o}(),Z=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},D([u.UseDelegate(),O("design:type",u.ValueModel)],t.prototype,"busyModel",void 0),D([u.StoreInValueModel("busyModel"),O("design:type",Boolean)],t.prototype,"busy",void 0),t}();var Y=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--angular-ui-powerups-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),$=function(){function t(t,e,n,o,r,i,a){this.component=t,this.path=e,this.authenticate=n,this.order=o,this.data=r,this.routeParameters=i,this.children=a}return t.prototype.getRouteParameters=function(){return this.routeParameters},t.prototype.getData=function(t,e){return this.data?C.isNil(this.data[t])?e:this.data[t]:e},t.prototype.searchData=function(t,e){var n=this;if(this.data){var o=t.find((function(t){return!C.isNil(n.data[t])}));return o?this.data[o]:e}return e},t}();var J,Q="PLACE_DEFINITION_OPTIONS",tt=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.initialiseBindings=function(t){var e=this;u.assert.isNil(this.resolvedParameters),this.resolvedParameters=t,this.placeDefinition.getRouteParameters().forEach((function(t){e.installBinding(t)}))},e.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new u.Binding(this.resolvedParameters,e,{toRight:function(e){return e.getValueOf(t)},toLeft:function(e,n){return n.replace(t,e)}}))},Object.defineProperty(e.prototype,"placeDefinition",{get:function(){return e.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),e.prototype.canDeactivate=function(){return!0},e.prototype.onPlaceReady=function(){},D([h.Memoize(),O("design:type",$),O("design:paramtypes",[])],e.prototype,"placeDefinition",null),e}(A),(J=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return u.lang.constructorChain(t).includes(J)},J.getRouteParameters=function(t){return l.Klass.get(t).getMetadataList(tt)},J.getDefinition=function(t){return Reflect.getMetadata(Q,t)},J.injectDefinition=function(t,e){Reflect.defineMetadata(Q,e,t)};var et=function(e){function o(){var n=e.call(this)||this,o=u.Dsl.disposeWith(n),r=o.chain;o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn;return n.placeDefinitions=r(n.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),n}return w(o,e),o.prototype.getNav=function(t){var e=t.getData("nav");return{title:function(){return e?e.title():t.searchData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getData("navIcon",null)}}},o.prototype.ngOnInit=function(){},o.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}]},D([u.StoreInListModel("placesModel"),O("design:type",Array)],o.prototype,"places",void 0),D([u.UseDelegate(),O("design:type",u.ListModel)],o.prototype,"placesModel",void 0),D([y.Memoize(),O("design:type",Function),O("design:paramtypes",[$]),O("design:returntype",Object)],o.prototype,"getNav",null),o}(A);var nt=function(t){function e(){var e=t.call(this)||this;return e.expanded=!0,e}return w(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let place of placeDefinitions.value"\n [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}]},e}(et);var ot=function(){function t(t){this.router=t,this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=C.last(e);n&&!t.hasChanged(n)||(e.unshift(t),this.setHistory(t.placeDefinition,e.slice(0,3)))},t.prototype.getHistory=function(t){var e=this._history.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._history.set(t,e)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:m.Router}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(m.Router))},token:t,providedIn:"root"}),t}();var rt=function(){function t(t){this.router=t}return t.prototype.pushParameterChangesToRoute=function(t,e,n){var o=e.hasRouteId()?"..":".";this.router.navigate([o].concat(this.createRouteParameters(n),this.getChildPath(t.snapshot)),{relativeTo:t})},t.prototype.getRedirectUrlTree=function(t,e){var n=t.url,o=e.hasRouteId()&&e.getFormattedRouteId()?[n[0].path,e.getFormattedRouteId(),e.getFormattedParameters()]:[n[0].path,e.getFormattedParameters()];return console.log("redirect path",o),this.router.createUrlTree(o)},t.prototype.getChildPath=function(t){return C.flatten(t.children.map((function(t){return t.url})))},t.prototype.createRouteParameters=function(t){var e=t.getFormattedRouteId();return e?[e,t.getFormattedParameters()]:[t.getFormattedParameters()]},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:m.Router}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(m.Router))},token:t,providedIn:"root"}),t}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.type=e;var o=l.Opts.get(n);this.name=o.getOptional("as",t),this.remember=o.getOptional("remember",!1),this.defaultValue=o.getOptional("defaultValue",null)}return t.prototype.getSanitiser=function(e){return this.remember||!C.isNil(this.defaultValue)?new t.DefaultParameterSanitiser(this.remember,this.defaultValue,e.get(ot)):null},t}(),function(t){function e(){}t.Options=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return w(e,t),e}(t);t.RouteId=n;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return w(e,t),e}(t);t.ValueParameter=o;var r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!0,e}return w(e,t),e}(t);t.ArrayParameter=r;var i=function(){function t(t,e,n){this.remember=t,this.defaultValue=e,this.placeHistory=n}return t.prototype.sanitise=function(t,e){var n=t.value;if(t.isMissing()){var o=C.first(this.placeHistory.getHistory(e.placeDefinition));return this.remember&&o&&(n=o.getValueOf(t.definition)),t.isEmptyValue(n)?this.defaultValue:n}return n},t}();t.DefaultParameterSanitiser=i}(t.ParameterDefinition||(t.ParameterDefinition={})),t.RouteParameterValue=function(){function t(t,e){this.definition=t,this.rawValue=e}return t.prototype.isRouteId=function(){return this.definition.isRouteId},t.prototype.hasChanged=function(t){return this.isEmpty()?!this.isEmptyValue(t):this.isEmptyValue(t)||!this.isSameValue(t)},t.prototype.isEmpty=function(){return this.isEmptyValue(this.value)},t.prototype.isMissing=function(){return C.isUndefined(this.rawValue)},t.prototype.sanitise=function(t,e){return R(this,void 0,void 0,(function(){var n;return x(this,(function(o){return(n=this.definition.getSanitiser(e))?[2,n.sanitise(this,t)]:[2,this.value]}))}))},t}(),function(t){t.create=function(e,n){if(e.isArray)return new t.Array(e,n.has(e.name)?n.getAll(e.name):void 0);var o=n.has(e.name)?n.get(e.name):void 0;return o=e.isRouteId&&C.isEmpty(o)?void 0:o,new t.Scalar(e,o)};var e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return w(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.definition.type.parse(this.rawValue)},enumerable:!0,configurable:!0}),n.prototype.isSameValue=function(t){return this.value===t},n.prototype.replace=function(e){return new t.Scalar(this.definition,this.isEmptyValue(e)?void 0:this.definition.type.format(e))},n.prototype.formattedValue=function(){return this.isEmpty()?void 0:this.definition.type.format(this.value)},n.prototype.isEmptyValue=function(t){return C.isNil(t)},D([y.Memoize(),O("design:type",Object),O("design:paramtypes",[])],n.prototype,"value",null),n}(t);t.Scalar=e;var n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return w(n,e),Object.defineProperty(n.prototype,"value",{get:function(){var t=this;return(this.rawValue||[]).filter((function(t){return!C.isEmpty(t)})).map((function(e){return t.definition.type.parse(e)}))},enumerable:!0,configurable:!0}),n.prototype.isSameValue=function(t){return C.isEqual(this.value,t)},n.prototype.replace=function(e){var n=this;return new t.Array(this.definition,this.isEmptyValue(e)?void 0:e.map((function(t){return n.definition.type.format(t)})))},n.prototype.formattedValue=function(){var t=this;return this.isEmpty()?[]:this.value.map((function(e){return t.definition.type.format(e)}))},n.prototype.isEmptyValue=function(t){return C.isNil(t)||t.length<1},D([y.Memoize(),O("design:type",n),O("design:paramtypes",[])],n.prototype,"value",null),n}(t);t.Array=n}(t.RouteParameterValue||(t.RouteParameterValue={})),t.ParameterSnapshot=function(){function e(t,e){this.placeDefinition=t,this.parameters=e}var n;return e.prototype.hasChanged=function(t,e){void 0===e&&(e=!1);var n=this.parameters.find((function(e){return e.hasChanged(t.getValueOf(e.definition))}));return n&&e&&console.log({name:n.definition.name,mine:n.value,theirs:t.getValueOf(n.definition)}),!!n},e.prototype.getParameter=function(t){return this.parameters.find((function(e){return e.definition===t}))},e.prototype.getValueOf=function(t){var e=this.getParameter(t);return e?e.value:null},e.prototype.getRouteIdValue=function(){return this.getRouteIdParameter()?this.getRouteIdParameter().value:null},e.prototype.getParameterValue=function(t){var e=this.parameters.find((function(e){return e.definition.name===t}));return e?e.value:null},e.prototype.getRouteIdParameter=function(){return this.parameters.find((function(t){return t.definition.isRouteId}))},e.prototype.getRouteParameters=function(){return this.parameters.filter((function(t){return!t.definition.isRouteId}))},e.prototype.hasRouteId=function(){return!!this.getRouteIdParameter()},e.prototype.getFormattedRouteId=function(){var t=this.getRouteIdParameter();return t?t.formattedValue():null},e.prototype.getNonEmptyParameters=function(){return this.parameters.filter((function(t){return!t.isEmpty()}))},e.prototype.getFormattedParameters=function(){var t={};this.getNonEmptyParameters().filter((function(t){return!t.definition.isRouteId})).forEach((function(e){return t[e.definition.name]=e.formattedValue()}));return t},e.prototype.getAllParameters=function(){var t={};this.parameters.forEach((function(e){t[e.definition.name]=e.value}));return t},e.prototype.replace=function(t,n){return new e(this.placeDefinition,this.parameters.map((function(e){return e.definition===t?e.replace(n):e})))},e.prototype.sanitise=function(t){return R(this,void 0,void 0,(function(){var e,n,o,r,i,a;return x(this,(function(u){switch(u.label){case 0:return this.hasRouteId()?[4,(e=this.getRouteIdParameter()).sanitise(this,t)]:[3,2];case 1:if(a=u.sent(),e.hasChanged(a))return[2,this.replace(e.definition,a)];u.label=2;case 2:n=this,o=this.getRouteParameters(),r=0,u.label=3;case 3:return r<o.length?[4,(i=o[r]).sanitise(this,t)]:[3,6];case 4:a=u.sent(),i.hasChanged(a)&&(n=n.replace(i.definition,a)),u.label=5;case 5:return r++,[3,3];case 6:return[2,n]}}))}))},D([y.Memoize(),O("design:type",Function),O("design:paramtypes",[t.ParameterDefinition]),O("design:returntype",t.RouteParameterValue)],e.prototype,"getParameter",null),D([y.Memoize(),O("design:type",Function),O("design:paramtypes",[t.ParameterDefinition]),O("design:returntype","function"==typeof(n="undefined"!=typeof S&&S)?n:Object)],e.prototype,"getValueOf",null),D([y.Memoize(),O("design:type",Function),O("design:paramtypes",[String]),O("design:returntype",Object)],e.prototype,"getParameterValue",null),D([y.Memoize(),O("design:type",Function),O("design:paramtypes",[]),O("design:returntype",t.RouteParameterValue.Scalar)],e.prototype,"getRouteIdParameter",null),D([y.Memoize(),O("design:type",Function),O("design:paramtypes",[]),O("design:returntype",Array)],e.prototype,"getRouteParameters",null),e}(),function(e){e.create=function(o,r,i){var a=new n(r,i),u=o.getRouteParameters().map((function(e){return t.RouteParameterValue.create(e,a)}));return new e(o,u)};var n=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new o(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),D([y.Memoize(),O("design:type",Array),O("design:paramtypes",[])],t.prototype,"keys",null),t}();var o=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}()}(t.ParameterSnapshot||(t.ParameterSnapshot={}));var it=b.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),at=[b.query(":enter, :leave",it,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(-100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(100%)"}))],{optional:!0})])],ut=[b.query(":enter, :leave",it,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(-100%)"}))],{optional:!0})])];function st(t){return b.trigger("routeAnimations",[b.transition(":increment",ut,{params:{duration:t}}),b.transition(":decrement",at,{params:{duration:t}})])}var lt=st("0.3s");var ct=function(e){function o(n,o){var r=e.call(this)||this;r.router=n,r.placeHistory=o,r.animate=!0,r._activePlace=new u.MutableValueModel,r._incomingRouteChange=new u.Guard,r._inOutletUpdate=new u.Guard,r._activatedRouteModel=new u.MutableValueModel,r._placeDefinition=new u.MutableValueModel,r._resolvedParameters=new u.MutableValueModel;var i=u.Dsl.disposeWith(r),a=i.chain,s=i.valueOf,l=(i.before,i.when),c=(i.after,i.observe,i.switchOn,a(r._activatedRouteModel).pullObservableValue((function(t){return t.paramMap}))),p=a(r._activatedRouteModel).pullObservableValue((function(t){return t.url}));return r.placeConfigured=s.all(a(r._inOutletUpdate).isFalsey(),r._placeDefinition,c,p).areTruthy(),l.anyOf(c,p).changes((function(){var e=t.ParameterSnapshot.create(r._placeDefinition.value,c.value,p.value);r._incomingRouteChange.whileTrue((function(){r._resolvedParameters.value=e,r.placeHistory.add(e)}))}),{postponeUntil:r.placeConfigured}),l.valueOf(r._resolvedParameters).changes((function(t,e){r.placeHistory.add(t),r.pushChangesToRoute(t,e)}),{unless:r.incomingRouteChange}),r}return w(o,e),o.prototype.ngOnInit=function(){},Object.defineProperty(o.prototype,"incomingRouteChange",{get:function(){return this._incomingRouteChange},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activePlace",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),o.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition,e.initialiseBindings(n._resolvedParameters)}catch(t){console.error(t)}})),this.animate||this.animationDone()},o.prototype.onOutletDeactivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){n._activePlace.value=null,n._activatedRouteModel.value=null,n._placeDefinition.value=null}))},o.prototype.getPlaceOrder=function(t){return this.animate&&t&&t.activatedRouteData&&t.activatedRouteData.placeOrder},o.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},o.prototype.pushChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.router.pushParameterChangesToRoute(n,e,t)},o.prototype.sanitise=function(t,e){return t},o.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="getPlaceOrder(routerOutlet)"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated(routerOutlet, $event)">\n </router-outlet>\n</div>\n\n',animations:[lt],styles:[":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],o.ctorParameters=function(){return[{type:rt},{type:ot}]},o.propDecorators={animate:[{type:n.Input}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},o}(A);var pt=function(t){function e(){return t.call(this)||this}return w(e,t),e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let place of placeDefinitions.value"\n [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [active]="rla.isActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(et),ft=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,r.MatProgressSpinnerModule,m.RouterModule,i.MatTabsModule,f.MatListModule,d.MatTooltipModule,p.MatIconModule],declarations:[Y,Z,ct,pt,nt],entryComponents:[Z],exports:[Z,ct,Y,pt,nt],providers:[]}]}],t}(),dt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[k,V,T,F,j,_],imports:[e.CommonModule,a.BrowserAnimationsModule,o.FormsModule,r.MatInputModule,r.MatFormFieldModule,r.MatSelectModule,i.MatTabsModule,ft,W],exports:[k,V,T,F,j,_,W,ft]}]}],t}(),mt=b.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var yt=function(t,e){this.width=t,this.height=e};var ht,gt=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,o,r){var i=t.call(this,o,r)||this;return i.top=e,i.left=n,i.width=o,i.height=r,i}return w(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new gt(t.clientX-this.left,t.clientY-this.top):new gt(t.x-this.left,t.y-this.top)},e}(yt),(ht=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new ht(e.top,e.left,e.width,e.height)};var vt=function(e){function n(n,o){var r=e.call(this)||this;return r.elementRef=n,r.ngZone=o,r._boundsModel=new u.ValueHolder(new t.Bounds(0,0,0,0)),r}return w(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new I((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(A);function bt(){}function It(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new $(n,e.path,!v.isNil(e.authenticate)&&e.authenticate,e.order,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):u.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}(function(t){function e(){}t.Callback=e})(bt||(bt={})),function(t){function e(){}t.Options=e}(It||(It={}));var Ct=function(){function t(t,e){this.router=t,this.injector=e}return t.prototype.canDeactivate=function(t,e,n,o){var r="/"+t.placeDefinition.path;return!!o.url.startsWith(r)||t.canDeactivate()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:m.Router},{type:n.Injector}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(m.Router),n.ɵɵinject(n.INJECTOR))},token:t,providedIn:"root"}),t}();var Pt,wt,Mt,Dt,Ot=function(){function e(t,e){this.placeRouter=t,this.injector=e}return e.prototype.canActivate=function(e,n){var o=this;if(t.PlaceComponent.isPlaceComponentConstructor(e.component)){var r=t.PlaceComponent.getDefinition(e.component),i=t.ParameterSnapshot.create(r,e.paramMap,e.url);return i.sanitise(this.injector).then((function(t){return u.Logger.get(o).info("ParameterSnapshot.sanitise ->",t.getAllParameters()),!t.hasChanged(i,!0)||o.placeRouter.getRedirectUrlTree(e,t)}))}return u.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:rt},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(rt),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),e}();Pt=t.ParameterType||(t.ParameterType={}),wt=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),Mt=function(){function t(){}return t.prototype.format=function(t){return""+t},t.prototype.parse=function(t){return C.isNil(t)||C.isEmpty(t)?null:+t},t}(),Dt=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),Pt.STRING=new wt,Pt.NUMBER=new Mt,Pt.BOOLEAN=new Dt,t.ACTIVITY_DATA=H,t.AbstractActivity=U,t.AbstractInputComponent=E,t.AbstractPlaceNavigationComponent=et,t.ActivityContainerComponent=t.ɵu,t.ActivityOutletComponent=t.ɵv,t.AlertDialogComponent=z,t.AngularUiPowerupsModule=dt,t.BusyOverlayComponent=Z,t.CommandDirective=k,t.ConfirmThenDialogComponent=t.ɵba,t.ConfirmationDialogComponent=K,t.DEFINITION_META_DATA_KEY=Q,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=G,t.DialogInteractionService=X,t.Dimension=yt,t.DisposableComponent=A,t.EmptyStateComponent=Y,t.FocusBindingDirective=V,t.INTERACTION_CONTEXT=L,t.InteractionContext=N,t.InteractionModule=W,t.LEFT_RIGHT_PLACE_ANIMATION=lt,t.LeavePlaceGuard=Ct,t.ListPlaceNavComponent=nt,t.NumberInputComponent=T,t.PasswordInputComponent=j,t.Place=It,t.PlaceDefinition=$,t.PlaceHistory=ot,t.PlaceModule=ft,t.PlaceOutletComponent=ct,t.PlaceRouteGuard=Ot,t.PlaceRouter=rt,t.Point=gt,t.ROUTE_PARAMETER_LIST_KEY=tt,t.ResizeAwareComponent=vt,t.RouteId=function(e,n){return function(o,r){var i=new t.ParameterDefinition.RouteId(r.toString(),e,n);l.Klass.get(o).addToOwnMetadataList(tt,i),u.UseDelegate()(o,r)}},t.RouteParameter=function(e,n){return function(o,r){var i=new t.ParameterDefinition.ValueParameter(r.toString(),e,n);l.Klass.get(o).addToOwnMetadataList(tt,i),u.UseDelegate()(o,r)}},t.RouteParameterList=function(e,n){return function(o,r){var i=new t.ParameterDefinition.ArrayParameter(r.toString(),e,n);l.Klass.get(o).addToOwnMetadataList(tt,i),u.UseDelegate()(o,r)}},t.SelectInputComponent=_,t.StringInputComponent=F,t.TabbedPlaceNavigationComponent=pt,t.leftRightPlaceAnimation=st,t.slideDownAndUpAnimation=function(t,e){u.OptionsHelper.get(e).getOptional("duration","100ms");var n=u.OptionsHelper.get(e).getOptional("hiddenStyleDef",mt);return b.trigger(t,[b.transition(":enter",[n,b.animate("100ms")]),b.transition(":leave",[b.animate("100ms",n)])])},t.ɵa=k,t.ɵb=V,t.ɵbb=N,t.ɵbc=z,t.ɵbe=G,t.ɵbf=X,t.ɵc=A,t.ɵd=T,t.ɵe=E,t.ɵf=F,t.ɵg=j,t.ɵh=_,t.ɵi=ft,t.ɵj=Y,t.ɵk=Z,t.ɵl=ct,t.ɵm=st,t.ɵn=lt,t.ɵo=rt,t.ɵp=ot,t.ɵq=pt,t.ɵr=et,t.ɵs=nt,t.ɵt=W,t.ɵw=K,t.ɵx=U,t.ɵy=H,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/router"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("lodash"),require("@angular/animations"),require("resize-observer-polyfill")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/material/tabs","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@coolon/typescript-utilities","@angular/material/dialog","@angular/router","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","lodash","@angular/animations","resize-observer-polyfill"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.material.tabs,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.typescriptUtilities,t.ng.material.dialog,t.ng.router,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.src,t.fastMemoizeDecorator,null,t.___default,t.ng.animations,t.ResizeObserver)}(this,(function(t,e,n,o,r,i,a,u,s,c,l,p,f,d,m,y,h,g,v,b,I){"use strict";var C="default"in v?v.default:v;I=I&&I.hasOwnProperty("default")?I.default:I;var P=function(t,e){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function w(t,e){function n(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var D=function(){return(D=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function M(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function O(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function A(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{s(o.next(t))}catch(t){i(t)}}function u(t){try{s(o.throw(t))}catch(t){i(t)}}function s(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(a,u)}s((o=o.apply(t,e||[])).next())}))}function R(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(u.GarbageCollector),E=function(t){function e(){var e=t.call(this)||this;e.valueModel=new u.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var o=e;return e.errorStateMatcher={isErrorState:function(t,e){return o.hasErrors()}},e}return w(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},M([u.UseDelegate(),O("design:type",u.ValueModel),O("design:paramtypes",[u.ValueModel])],e.prototype,"userValueModel",null),e}(x);var _=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(E),j=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(E),T=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},M([u.UseDelegate(),O("design:type",u.ListModel)],e.prototype,"optionsModel",void 0),M([u.StoreInListModel("optionsModel"),O("design:type",Array)],e.prototype,"options",void 0),e}(E);var F=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(E),L=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandParameterProvided=!1,n}return w(e,t),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){u.assert.notNil(this.pectinCommand),this.pectinCommand instanceof u.UnaryCommand?this._commandParameterProvided||u.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&u.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,u.Dsl.disposeWith(this).chain)(this.pectinCommand.enabled).subscribe((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}))},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof u.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(u.GarbageCollector);var k=function(t){function o(e,n,o){var r=t.call(this)||this;return r.el=e,r.ngZone=n,r.document=o,r}return w(o,t),o.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},o.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},o.prototype.ngOnInit=function(){},o.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,u.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):u.Logger.get(this).warn("pectinFocusBinding was nil")},o.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},o.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},o.prototype.isFocused=function(t){return this.document.activeElement===t},o.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(u.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):u.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(o.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),o.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},o.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},o.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],o.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},o.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},o}(x);var V=function(t){function e(){return t.call(this)||this}return w(e,t),e}(u.GarbageCollector);var N=new n.InjectionToken("InteractionActivityData");var B=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{set:function(t){this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:V,useValue:this},{provide:N,useValue:t.activityData}],parent:this.injector}),o=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(o,0,e),this.activityComponentRef.instance.initialise(t)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!0,configurable:!0}),t.prototype.alert=function(t){return this.interactionContext.alert(t)},t.prototype.confirm=function(t){return this.interactionContext.confirm(t)},t.prototype.confirmThen=function(t,e,n){return this.interactionContext.confirmThen(t,e,n)},t.prototype.startActivity=function(t,e){return this.interactionContext.startActivity(t,e)},t.prototype.notifyReady=function(){this.activityComponentRef.instance.onActivityReady&&this.activityComponentRef.instance.onActivityReady()},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-outlet",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},t.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},t}();var U=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new u.DelegatingValueModel).withDefault(!1),e}return w(e,t),e.prototype.initialise=function(t){c.assert.isNil(this.activityContext),this.activityContext=t},e.prototype.done=function(t){return this.activityContext.onDone(t)},e.prototype.cancel=function(t){this.activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(x);var q=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return w(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-raised-button color="primary" (click)="done()">{{alert.ok()}}</button>\n</p>\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[N]}]}]},e}(U);t.ɵba=function(t){function e(e,n){var o=t.call(this)||this;return o.config=e,o.interactionContext=n,u.assert.notNil(e),o}return w(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[N]}]},{type:V}]},e}(U),function(t){function e(){}t.Data=e}(t.ɵba||(t.ɵba={}));var H=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,u.assert.notNil(e),n}return w(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)="cancel()">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()">{{confirm.ok()}}</button>\n</p>\n\n',styles:[":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[N]}]}]},e}(U);t.ɵu=function(e){function o(){var t=e.call(this)||this;return t.activityOutletTabs=new u.MutableListModel,t.obsoleteTabs=[],t.finished=!1,t._activityList=new u.MutableListModel,t}return w(o,e),o.prototype.isActive=function(){return this.parentInteractionContext.isActive()},Object.defineProperty(o.prototype,"activityList",{get:function(){return this._activityList.readonly},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){},o.prototype.ngAfterViewInit=function(){var t=this,e=u.Dsl.disposeWith(this).observe;this._activityList.value=this.outlets.toArray().map((function(t){return t.component})),e.valuesFrom(this.outlets.changes).subscribe((function(e){t.safelyUpdateActivityList(e.map((function(t){return t.component})))})),e.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()}))},o.prototype.safelyUpdateActivityList=function(t){var e=this;setTimeout((function(){return e._activityList.value=t}))},o.prototype.initialise=function(t){var e=this;this.initialActivityOutletContext={activityClass:t.activityClass,activityData:t.activityData,onDone:function(n){return e.finished=!0,t.onDone(n)},onCancel:function(n){return e.finished=!0,t.onCancel(n)},interactionContext:this}},o.prototype.startActivity=function(t,e){var n=this,o=this;return new Promise((function(r,i){var a={interactionContext:o,activityClass:t,activityData:e,onDone:function(t){o.obsoleteTabs.push(a),r(t),setTimeout((function(){return o.animateTabs()}))},onCancel:function(t){o.obsoleteTabs.push(a),i(t),setTimeout((function(){return o.animateTabs()}))}};o.activityOutletTabs.push(a),o.tabs.selectedIndex=n.activityOutletTabs.length}))},o.prototype.alert=function(t){return this.startActivity(q,t)},o.prototype.confirm=function(t){return this.startActivity(H,t)},o.prototype.confirmThen=function(e,n,o){return this.startActivity(t.ɵba,{confirm:e,activityType:n,data:o})},o.prototype.onAnimationFinished=function(){var t=this;this.activityOutletTabs.value=this.activityOutletTabs.value.filter((function(e){return!t.obsoleteTabs.includes(e)})),this.obsoleteTabs=[],this.outlets.toArray()[this.tabs.selectedIndex].notifyReady()},o.prototype.animateTabs=function(){this.finished||(this.tabs.selectedIndex=this.activityOutletTabs.length-this.obsoleteTabs.length)},o.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="true">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]="this"\n [activityContext]="initialActivityOutletContext"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n <mat-tab *ngFor="let tab of activityOutletTabs.value">\n <angular-ui-powerups-activity-outlet [interactionContext]="this"\n [activityContext]="tab"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:block}"]}]}],o.ctorParameters=function(){return[]},o.propDecorators={parentInteractionContext:[{type:n.Input}],initialActivityOutletContext:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[B]}]},o}(x),function(t){function e(){}t.ActivityContext=e}(t.ɵu||(t.ɵu={}));var z=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),K=function(e){function o(t,n,o,r){var i=e.call(this)||this;i.dialogService=t,i.router=n,i.dialogServiceDefaults=o,i.matDialogDefaultConfig=r,i._activityList=new u.DelegatingListModel,i._active=!1,c.assert.notNil(t);var a=u.Dsl.disposeWith(i),s=a.chain;a.observe;return i.currentActivity=s(i.activityList).last(),i}return w(o,e),o.prototype.isActive=function(){return this._active},o.prototype.cancelActivity=function(){this.currentActivity.value.cancel(null)},Object.defineProperty(o.prototype,"activityList",{get:function(){return this._activityList.readonly},enumerable:!0,configurable:!0}),o.prototype.startActivity=function(t,e){return this._startActivity(t,e)},o.prototype._startActivity=function(e,n,o){var r=this;void 0===o&&(o=!0),this.isActive()&&u.lang.illegalState("Activity already in progress: "+this.activityList.value.map((function(t){return t.constructor.name})).join(", ")),this._active=!0;var i=this,a=D({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig,this.dialogServiceDefaults,{data:n,disableClose:o,panelClass:"dialog-interaction-service"}),s=this.dialogService.open(t.ɵu,a);return new Promise((function(t,o){var a=s.componentInstance;a.parentInteractionContext=r,i.safelyUpdateActivityListDelegate(a.activityList),a.initialise({activityClass:e,activityData:n,onDone:function(e){t(e),s.close(e)},onCancel:function(t){o(t),s.close(t)}}),s.updateSize()})).finally((function(){i.safelyUpdateActivityListDelegate(null),i._active=!1}))},o.prototype.safelyUpdateActivityListDelegate=function(t){var e=this;setTimeout((function(){return e._activityList.setDelegate(t)}))},o.prototype.alert=function(t){return this._startActivity(q,t,!1)},o.prototype.confirm=function(t){return this._startActivity(H,t,!0)},o.prototype.confirmThen=function(e,n,o){return this._startActivity(t.ɵba,{confirm:e,activityType:n,data:o},!0)},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:r.MatDialog},{type:p.Router},{type:l.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[z]}]},{type:l.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[l.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(l.MatDialog),n.ɵɵinject(p.Router),n.ɵɵinject(z,8),n.ɵɵinject(l.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:o,providedIn:"root"}),o}(V);var G=function(){function o(){}return o.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,r.MatButtonModule,r.MatDialogModule,r.MatTabsModule,s.PortalModule],declarations:[t.ɵu,H,t.ɵba,q,B],exports:[t.ɵu,B],entryComponents:[t.ɵu,H,t.ɵba,q],providers:[K]}]}],o}(),X=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},M([u.UseDelegate(),O("design:type",u.ValueModel)],t.prototype,"busyModel",void 0),M([u.StoreInValueModel("busyModel"),O("design:type",Boolean)],t.prototype,"busy",void 0),t}();var W=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--angular-ui-powerups-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),Z=function(){function t(t,e,n,o,r,i,a){this.component=t,this.path=e,this.authenticate=n,this.order=o,this.data=r,this.routeParameters=i,this.children=a}return t.prototype.getRouteParameters=function(){return this.routeParameters},t.prototype.getData=function(t,e){return this.data?C.isNil(this.data[t])?e:this.data[t]:e},t.prototype.searchData=function(t,e){var n=this;if(this.data){var o=t.find((function(t){return!C.isNil(n.data[t])}));return o?this.data[o]:e}return e},t}();var Y,J="PLACE_DEFINITION_OPTIONS",$=Symbol("place:route:parameters");t.PlaceComponent=function(t){function e(){return t.call(this)||this}return w(e,t),e.prototype.initialiseBindings=function(t){var e=this;u.assert.isNil(this.resolvedParameters),this.resolvedParameters=t,this.placeDefinition.getRouteParameters().forEach((function(t){e.installBinding(t)}))},e.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new u.Binding(this.resolvedParameters,e,{toRight:function(e){return e.getValueOf(t)},toLeft:function(e,n){return n.replace(t,e)}}))},Object.defineProperty(e.prototype,"placeDefinition",{get:function(){return e.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),e.prototype.canDeactivate=function(){return!0},e.prototype.onPlaceReady=function(){},M([h.Memoize(),O("design:type",Z),O("design:paramtypes",[])],e.prototype,"placeDefinition",null),e}(x),(Y=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return u.lang.constructorChain(t).includes(Y)},Y.getRouteParameters=function(t){return c.Klass.get(t).getMetadataList($)},Y.getDefinition=function(t){return Reflect.getMetadata(J,t)},Y.injectDefinition=function(t,e){Reflect.defineMetadata(J,e,t)};var Q=function(e){function o(){var n=e.call(this)||this,o=u.Dsl.disposeWith(n),r=o.chain;o.valueOf,o.before,o.when,o.after,o.observe,o.switchOn;return n.placeDefinitions=r(n.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),n}return w(o,e),o.prototype.getNav=function(t){var e=t.getData("nav");return{title:function(){return e?e.title():t.searchData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getData("navIcon",null)}}},o.prototype.ngOnInit=function(){},o.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}]},M([u.StoreInListModel("placesModel"),O("design:type",Array)],o.prototype,"places",void 0),M([u.UseDelegate(),O("design:type",u.ListModel)],o.prototype,"placesModel",void 0),M([y.Memoize(),O("design:type",Function),O("design:paramtypes",[Z]),O("design:returntype",Object)],o.prototype,"getNav",null),o}(x);var tt=function(t){function e(){var e=t.call(this)||this;return e.expanded=!0,e}return w(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let place of placeDefinitions.value"\n [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}]},e}(Q);var et=function(){function t(t){this.router=t,this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=C.last(e);n&&!t.hasChanged(n)||(e.unshift(t),this.setHistory(t.placeDefinition,e.slice(0,3)))},t.prototype.getHistory=function(t){var e=this._history.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._history.set(t,e)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:p.Router}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(p.Router))},token:t,providedIn:"root"}),t}();var nt=function(){function t(t){this.router=t}return t.prototype.pushParameterChangesToRoute=function(t,e,n){var o=e.hasRouteId()?"..":".";this.router.navigate([o].concat(this.createRouteParameters(n),this.getChildPath(t.snapshot)),{relativeTo:t})},t.prototype.getRedirectUrlTree=function(t,e){var n=t.url,o=e.hasRouteId()&&e.getFormattedRouteId()?[n[0].path,e.getFormattedRouteId(),e.getFormattedParameters()]:[n[0].path,e.getFormattedParameters()];return console.log("redirect path",o),this.router.createUrlTree(o)},t.prototype.getChildPath=function(t){return C.flatten(t.children.map((function(t){return t.url})))},t.prototype.createRouteParameters=function(t){var e=t.getFormattedRouteId();return e?[e,t.getFormattedParameters()]:[t.getFormattedParameters()]},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:p.Router}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(p.Router))},token:t,providedIn:"root"}),t}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.type=e;var o=c.Opts.get(n);this.name=o.getOptional("as",t),this.remember=o.getOptional("remember",!1),this.defaultValue=o.getOptional("defaultValue",null)}return t.prototype.getSanitiser=function(e){return this.remember||!C.isNil(this.defaultValue)?new t.DefaultParameterSanitiser(this.remember,this.defaultValue,e.get(et)):null},t}(),function(t){function e(){}t.Options=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return w(e,t),e}(t);t.RouteId=n;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return w(e,t),e}(t);t.ValueParameter=o;var r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!0,e}return w(e,t),e}(t);t.ArrayParameter=r;var i=function(){function t(t,e,n){this.remember=t,this.defaultValue=e,this.placeHistory=n}return t.prototype.sanitise=function(t,e){var n=t.value;if(t.isMissing()){var o=C.first(this.placeHistory.getHistory(e.placeDefinition));return this.remember&&o&&(n=o.getValueOf(t.definition)),t.isEmptyValue(n)?this.defaultValue:n}return n},t}();t.DefaultParameterSanitiser=i}(t.ParameterDefinition||(t.ParameterDefinition={})),t.RouteParameterValue=function(){function t(t,e){this.definition=t,this.rawValue=e}return t.prototype.isRouteId=function(){return this.definition.isRouteId},t.prototype.hasChanged=function(t){return this.isEmpty()?!this.isEmptyValue(t):this.isEmptyValue(t)||!this.isSameValue(t)},t.prototype.isEmpty=function(){return this.isEmptyValue(this.value)},t.prototype.isMissing=function(){return C.isUndefined(this.rawValue)},t.prototype.sanitise=function(t,e){return A(this,void 0,void 0,(function(){var n;return R(this,(function(o){return(n=this.definition.getSanitiser(e))?[2,n.sanitise(this,t)]:[2,this.value]}))}))},t}(),function(t){t.create=function(e,n){if(e.isArray)return new t.Array(e,n.has(e.name)?n.getAll(e.name):void 0);var o=n.has(e.name)?n.get(e.name):void 0;return o=e.isRouteId&&C.isEmpty(o)?void 0:o,new t.Scalar(e,o)};var e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return w(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.definition.type.parse(this.rawValue)},enumerable:!0,configurable:!0}),n.prototype.isSameValue=function(t){return this.value===t},n.prototype.replace=function(e){return new t.Scalar(this.definition,this.isEmptyValue(e)?void 0:this.definition.type.format(e))},n.prototype.formattedValue=function(){return this.isEmpty()?void 0:this.definition.type.format(this.value)},n.prototype.isEmptyValue=function(t){return C.isNil(t)},M([y.Memoize(),O("design:type",Object),O("design:paramtypes",[])],n.prototype,"value",null),n}(t);t.Scalar=e;var n=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return w(n,e),Object.defineProperty(n.prototype,"value",{get:function(){var t=this;return(this.rawValue||[]).filter((function(t){return!C.isEmpty(t)})).map((function(e){return t.definition.type.parse(e)}))},enumerable:!0,configurable:!0}),n.prototype.isSameValue=function(t){return C.isEqual(this.value,t)},n.prototype.replace=function(e){var n=this;return new t.Array(this.definition,this.isEmptyValue(e)?void 0:e.map((function(t){return n.definition.type.format(t)})))},n.prototype.formattedValue=function(){var t=this;return this.isEmpty()?[]:this.value.map((function(e){return t.definition.type.format(e)}))},n.prototype.isEmptyValue=function(t){return C.isNil(t)||t.length<1},M([y.Memoize(),O("design:type",n),O("design:paramtypes",[])],n.prototype,"value",null),n}(t);t.Array=n}(t.RouteParameterValue||(t.RouteParameterValue={})),t.ParameterSnapshot=function(){function e(t,e){this.placeDefinition=t,this.parameters=e}var n;return e.prototype.hasChanged=function(t,e){void 0===e&&(e=!1);var n=this.parameters.find((function(e){return e.hasChanged(t.getValueOf(e.definition))}));return n&&e&&console.log({name:n.definition.name,mine:n.value,theirs:t.getValueOf(n.definition)}),!!n},e.prototype.getParameter=function(t){return this.parameters.find((function(e){return e.definition===t}))},e.prototype.getValueOf=function(t){var e=this.getParameter(t);return e?e.value:null},e.prototype.getRouteIdValue=function(){return this.getRouteIdParameter()?this.getRouteIdParameter().value:null},e.prototype.getParameterValue=function(t){var e=this.parameters.find((function(e){return e.definition.name===t}));return e?e.value:null},e.prototype.getRouteIdParameter=function(){return this.parameters.find((function(t){return t.definition.isRouteId}))},e.prototype.getRouteParameters=function(){return this.parameters.filter((function(t){return!t.definition.isRouteId}))},e.prototype.hasRouteId=function(){return!!this.getRouteIdParameter()},e.prototype.getFormattedRouteId=function(){var t=this.getRouteIdParameter();return t?t.formattedValue():null},e.prototype.getNonEmptyParameters=function(){return this.parameters.filter((function(t){return!t.isEmpty()}))},e.prototype.getFormattedParameters=function(){var t={};this.getNonEmptyParameters().filter((function(t){return!t.definition.isRouteId})).forEach((function(e){return t[e.definition.name]=e.formattedValue()}));return t},e.prototype.getAllParameters=function(){var t={};this.parameters.forEach((function(e){t[e.definition.name]=e.value}));return t},e.prototype.replace=function(t,n){return new e(this.placeDefinition,this.parameters.map((function(e){return e.definition===t?e.replace(n):e})))},e.prototype.sanitise=function(t){return A(this,void 0,void 0,(function(){var e,n,o,r,i,a;return R(this,(function(u){switch(u.label){case 0:return this.hasRouteId()?[4,(e=this.getRouteIdParameter()).sanitise(this,t)]:[3,2];case 1:if(a=u.sent(),e.hasChanged(a))return[2,this.replace(e.definition,a)];u.label=2;case 2:n=this,o=this.getRouteParameters(),r=0,u.label=3;case 3:return r<o.length?[4,(i=o[r]).sanitise(this,t)]:[3,6];case 4:a=u.sent(),i.hasChanged(a)&&(n=n.replace(i.definition,a)),u.label=5;case 5:return r++,[3,3];case 6:return[2,n]}}))}))},M([y.Memoize(),O("design:type",Function),O("design:paramtypes",[t.ParameterDefinition]),O("design:returntype",t.RouteParameterValue)],e.prototype,"getParameter",null),M([y.Memoize(),O("design:type",Function),O("design:paramtypes",[t.ParameterDefinition]),O("design:returntype","function"==typeof(n="undefined"!=typeof S&&S)?n:Object)],e.prototype,"getValueOf",null),M([y.Memoize(),O("design:type",Function),O("design:paramtypes",[String]),O("design:returntype",Object)],e.prototype,"getParameterValue",null),M([y.Memoize(),O("design:type",Function),O("design:paramtypes",[]),O("design:returntype",t.RouteParameterValue.Scalar)],e.prototype,"getRouteIdParameter",null),M([y.Memoize(),O("design:type",Function),O("design:paramtypes",[]),O("design:returntype",Array)],e.prototype,"getRouteParameters",null),e}(),function(e){e.create=function(o,r,i){var a=new n(r,i),u=o.getRouteParameters().map((function(e){return t.RouteParameterValue.create(e,a)}));return new e(o,u)};var n=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new o(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),M([y.Memoize(),O("design:type",Array),O("design:paramtypes",[])],t.prototype,"keys",null),t}();var o=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}()}(t.ParameterSnapshot||(t.ParameterSnapshot={}));var ot=b.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),rt=[b.query(":enter, :leave",ot,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(-100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(100%)"}))],{optional:!0})])],it=[b.query(":enter, :leave",ot,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(-100%)"}))],{optional:!0})])];function at(t){return b.trigger("routeAnimations",[b.transition(":increment",it,{params:{duration:t}}),b.transition(":decrement",rt,{params:{duration:t}})])}var ut=at("0.3s");var st=function(e){function o(n,o){var r=e.call(this)||this;r.router=n,r.placeHistory=o,r.animate=!0,r._activePlace=new u.MutableValueModel,r._incomingRouteChange=new u.Guard,r._inOutletUpdate=new u.Guard,r._activatedRouteModel=new u.MutableValueModel,r._placeDefinition=new u.MutableValueModel,r._resolvedParameters=new u.MutableValueModel;var i=u.Dsl.disposeWith(r),a=i.chain,s=i.valueOf,c=(i.before,i.when),l=(i.after,i.observe,i.switchOn,a(r._activatedRouteModel).pullObservableValue((function(t){return t.paramMap}))),p=a(r._activatedRouteModel).pullObservableValue((function(t){return t.url}));return r.placeConfigured=s.all(a(r._inOutletUpdate).isFalsey(),r._placeDefinition,l,p).areTruthy(),c.anyOf(l,p).changes((function(){var e=t.ParameterSnapshot.create(r._placeDefinition.value,l.value,p.value);r._incomingRouteChange.whileTrue((function(){r._resolvedParameters.value=e,r.placeHistory.add(e)}))}),{postponeUntil:r.placeConfigured}),c.valueOf(r._resolvedParameters).changes((function(t,e){r.placeHistory.add(t),r.pushChangesToRoute(t,e)}),{unless:r.incomingRouteChange}),r}return w(o,e),o.prototype.ngOnInit=function(){},Object.defineProperty(o.prototype,"incomingRouteChange",{get:function(){return this._incomingRouteChange},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activePlace",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),o.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition,e.initialiseBindings(n._resolvedParameters)}catch(t){console.error(t)}})),this.animate||this.animationDone()},o.prototype.onOutletDeactivated=function(t,e){var n=this;this._inOutletUpdate.whileTrue((function(){n._activePlace.value=null,n._activatedRouteModel.value=null,n._placeDefinition.value=null}))},o.prototype.getPlaceOrder=function(t){return this.animate&&t&&t.activatedRouteData&&t.activatedRouteData.placeOrder},o.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},o.prototype.pushChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.router.pushParameterChangesToRoute(n,e,t)},o.prototype.sanitise=function(t,e){return t},o.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="getPlaceOrder(routerOutlet)"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated(routerOutlet, $event)">\n </router-outlet>\n</div>\n\n',animations:[ut],styles:[":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],o.ctorParameters=function(){return[{type:nt},{type:et}]},o.propDecorators={animate:[{type:n.Input}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},o}(x);var ct=function(t){function e(){return t.call(this)||this}return w(e,t),e.decorators=[{type:n.Component,args:[{selector:"angular-ui-powerups-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let place of placeDefinitions.value"\n [routerLink]=\'place.path\'\n routerLinkActive #rla="routerLinkActive"\n [active]="rla.isActive"\n [matTooltip]="getNav(place).tooltip()">\n <mat-icon *ngIf="getNav(place).icon()">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(Q),lt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,r.MatProgressSpinnerModule,p.RouterModule,i.MatTabsModule,d.MatListModule,m.MatTooltipModule,f.MatIconModule],declarations:[W,X,st,ct,tt],entryComponents:[X],exports:[X,st,W,ct,tt],providers:[]}]}],t}(),pt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[L,k,_,F,j,T],imports:[e.CommonModule,a.BrowserAnimationsModule,o.FormsModule,r.MatInputModule,r.MatFormFieldModule,r.MatSelectModule,i.MatTabsModule,lt,G],exports:[L,k,_,F,j,T,G,lt]}]}],t}(),ft=b.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var dt=function(t,e){this.width=t,this.height=e};var mt,yt=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,o,r){var i=t.call(this,o,r)||this;return i.top=e,i.left=n,i.width=o,i.height=r,i}return w(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new yt(t.clientX-this.left,t.clientY-this.top):new yt(t.x-this.left,t.y-this.top)},e}(dt),(mt=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new mt(e.top,e.left,e.width,e.height)};var ht=function(e){function n(n,o){var r=e.call(this)||this;return r.elementRef=n,r.ngZone=o,r._boundsModel=new u.ValueHolder(new t.Bounds(0,0,0,0)),r}return w(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new I((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(x);function gt(){}(function(t){function e(){}t.Callback=e})(gt||(gt={}));var vt=function(){function t(t,e,n){this.router=t,this.injector=e,this.interactionContext=n}return t.prototype.canDeactivate=function(t,e,n,o){return!this.interactionContext.isActive()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:p.Router},{type:n.Injector},{type:V}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(p.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(V))},token:t,providedIn:"root"}),t}();function bt(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new Z(n,e.path,!v.isNil(e.authenticate)&&e.authenticate,e.order,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):u.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}(function(t){function e(){}t.Options=e})(bt||(bt={}));var It=function(){function o(t,e,n,o){this.router=t,this.injector=e,this.interactionContext=n,this.location=o,this._alreadyAccepted=[],console.log("***** Created new guard ******");var r=this;this.router.events.subscribe((function(t){t instanceof p.NavigationEnd&&(console.log("navigation ended"),r._alreadyAccepted=[]),t instanceof p.NavigationError&&(console.log("navigation errored"),r._alreadyAccepted=[])}))}return o.prototype.canDeactivate=function(t,e,n,o){var r=this,i="/"+t.placeDefinition.path;if(console.log("canDeactivate",{staticPath:i,currentStateUrl:n.url,nextStateUrl:o.url,alreadyDeclined:this._alreadyAccepted}),this.alreadyAccepted(t))return!0;if(!o.url.startsWith(i)){var a=this;return Promise.resolve(t.canDeactivate()).then((function(t){return t?!r.interactionContext.isActive()||(r.interactionContext.currentActivity.value.cancel(null),!1):(r.location.go(n.url),!1)})).then((function(e){return e&&a._alreadyAccepted.push(t),e}))}return!0},o.prototype.alreadyAccepted=function(t){return this._alreadyAccepted.includes(t)},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:p.Router},{type:n.Injector},{type:V},{type:e.Location}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(p.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(V),n.ɵɵinject(e.Location))},token:o,providedIn:"root"}),M([u.Trace(),O("design:type",Function),O("design:paramtypes",[t.PlaceComponent]),O("design:returntype",Boolean)],o.prototype,"alreadyAccepted",null),o}();var Ct,Pt,wt,Dt,Mt=function(){function e(t,e){this.placeRouter=t,this.injector=e}return e.prototype.canActivate=function(e,n){var o=this;if(t.PlaceComponent.isPlaceComponentConstructor(e.component)){var r=t.PlaceComponent.getDefinition(e.component),i=t.ParameterSnapshot.create(r,e.paramMap,e.url);return i.sanitise(this.injector).then((function(t){return u.Logger.get(o).info("ParameterSnapshot.sanitise ->",t.getAllParameters()),!t.hasChanged(i,!0)||o.placeRouter.getRedirectUrlTree(e,t)}))}return u.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:nt},{type:n.Injector}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(nt),n.ɵɵinject(n.INJECTOR))},token:e,providedIn:"root"}),e}();Ct=t.ParameterType||(t.ParameterType={}),Pt=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),wt=function(){function t(){}return t.prototype.format=function(t){return""+t},t.prototype.parse=function(t){return C.isNil(t)||C.isEmpty(t)?null:+t},t}(),Dt=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),Ct.STRING=new Pt,Ct.NUMBER=new wt,Ct.BOOLEAN=new Dt,t.ACTIVITY_DATA=N,t.AbstractActivity=U,t.AbstractInputComponent=E,t.AbstractPlaceNavigationComponent=Q,t.ActivityContainerComponent=t.ɵu,t.ActivityOutletComponent=B,t.AlertDialogComponent=q,t.AngularUiPowerupsModule=pt,t.BusyOverlayComponent=X,t.CloseInteractionGuard=vt,t.CommandDirective=L,t.ConfirmThenDialogComponent=t.ɵba,t.ConfirmationDialogComponent=H,t.DEFINITION_META_DATA_KEY=J,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=z,t.DialogInteractionService=K,t.Dimension=dt,t.DisposableComponent=x,t.EmptyStateComponent=W,t.FocusBindingDirective=k,t.InteractionContext=V,t.InteractionModule=G,t.LEFT_RIGHT_PLACE_ANIMATION=ut,t.LeavePlaceGuard=It,t.ListPlaceNavComponent=tt,t.NumberInputComponent=_,t.PasswordInputComponent=j,t.Place=bt,t.PlaceDefinition=Z,t.PlaceHistory=et,t.PlaceModule=lt,t.PlaceOutletComponent=st,t.PlaceRouteGuard=Mt,t.PlaceRouter=nt,t.Point=yt,t.ROUTE_PARAMETER_LIST_KEY=$,t.ResizeAwareComponent=ht,t.RouteId=function(e,n){return function(o,r){var i=new t.ParameterDefinition.RouteId(r.toString(),e,n);c.Klass.get(o).addToOwnMetadataList($,i),u.UseDelegate()(o,r)}},t.RouteParameter=function(e,n){return function(o,r){var i=new t.ParameterDefinition.ValueParameter(r.toString(),e,n);c.Klass.get(o).addToOwnMetadataList($,i),u.UseDelegate()(o,r)}},t.RouteParameterList=function(e,n){return function(o,r){var i=new t.ParameterDefinition.ArrayParameter(r.toString(),e,n);c.Klass.get(o).addToOwnMetadataList($,i),u.UseDelegate()(o,r)}},t.SelectInputComponent=T,t.StringInputComponent=F,t.TabbedPlaceNavigationComponent=ct,t.leftRightPlaceAnimation=at,t.slideDownAndUpAnimation=function(t,e){u.OptionsHelper.get(e).getOptional("duration","100ms");var n=u.OptionsHelper.get(e).getOptional("hiddenStyleDef",ft);return b.trigger(t,[b.transition(":enter",[n,b.animate("100ms")]),b.transition(":leave",[b.animate("100ms",n)])])},t.ɵa=L,t.ɵb=k,t.ɵbb=V,t.ɵbc=q,t.ɵbe=z,t.ɵbf=K,t.ɵc=x,t.ɵd=_,t.ɵe=E,t.ɵf=F,t.ɵg=j,t.ɵh=T,t.ɵi=lt,t.ɵj=W,t.ɵk=X,t.ɵl=st,t.ɵm=at,t.ɵn=ut,t.ɵo=nt,t.ɵp=et,t.ɵq=ct,t.ɵr=Q,t.ɵs=tt,t.ɵt=G,t.ɵv=B,t.ɵw=H,t.ɵx=U,t.ɵy=N,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map
|