UNPKG

dbweb-common

Version:

用`yarn add dbweb-common`安装,不要忘记修改`angular.json`里的 `architect\build\options\assets`,加上

1 lines 590 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("dbweb-core"),require("@angular/material"),require("@angular/cdk/drag-drop"),require("@angular/forms"),require("@angular/material/badge"),require("@angular/material/button"),require("@angular/material/core"),require("@angular/material/dialog"),require("@angular/material/divider"),require("@angular/material/icon"),require("@angular/material/menu"),require("@angular/material/sidenav"),require("@angular/material/tabs"),require("@angular/material/toolbar"),require("@angular/material/tree"),require("@angular/platform-browser"),require("@angular/platform-browser/animations"),require("@angular/router"),require("ngx-clipboard"),require("@angular/animations"),require("rxjs/operators"),require("rxjs"),require("@angular/cdk/tree"),require("@angular/material/input"),require("@angular/material/form-field"),require("@angular/common/locales/zh-Hans"),require("pinyin"),require("ng2-ace-editor"),require("uuid"),require("ace-builds"),require("@angular/common/http"),require("@angular/cdk/overlay"),require("ng5-slider"),require("@angular/material/checkbox"),require("@angular/material/expansion"),require("@angular/material/progress-bar"),require("@angular/material/select"),require("@angular/material/stepper"),require("@angular/material/table"),require("angular-calendar"),require("angular-calendar/date-adapters/date-fns"),require("@angular/material/card"),require("@angular/material/chips"),require("@angular/material/grid-list"),require("@angular/material/tooltip"),require("@angular/cdk/collections"),require("@angular/material/sort"),require("@angular/material/radio"),require("@angular/material/snack-bar"),require("ts-md5")):"function"==typeof define&&define.amd?define("dbweb-common",["exports","@angular/common","@angular/core","dbweb-core","@angular/material","@angular/cdk/drag-drop","@angular/forms","@angular/material/badge","@angular/material/button","@angular/material/core","@angular/material/dialog","@angular/material/divider","@angular/material/icon","@angular/material/menu","@angular/material/sidenav","@angular/material/tabs","@angular/material/toolbar","@angular/material/tree","@angular/platform-browser","@angular/platform-browser/animations","@angular/router","ngx-clipboard","@angular/animations","rxjs/operators","rxjs","@angular/cdk/tree","@angular/material/input","@angular/material/form-field","@angular/common/locales/zh-Hans","pinyin","ng2-ace-editor","uuid","ace-builds","@angular/common/http","@angular/cdk/overlay","ng5-slider","@angular/material/checkbox","@angular/material/expansion","@angular/material/progress-bar","@angular/material/select","@angular/material/stepper","@angular/material/table","angular-calendar","angular-calendar/date-adapters/date-fns","@angular/material/card","@angular/material/chips","@angular/material/grid-list","@angular/material/tooltip","@angular/cdk/collections","@angular/material/sort","@angular/material/radio","@angular/material/snack-bar","ts-md5"],e):e((t=t||self)["dbweb-common"]={},t.ng.common,t.ng.core,t["dbweb-core"],t.ng.material,t.ng.cdk["drag-drop"],t.ng.forms,t.ng.material.badge,t.ng.material.button,t.ng.material.core,t.ng.material.dialog,t.ng.material.divider,t.ng.material.icon,t.ng.material.menu,t.ng.material.sidenav,t.ng.material.tabs,t.ng.material.toolbar,t.ng.material.tree,t.ng.platformBrowser,t.ng.platformBrowser.animations,t.ng.router,t.ngxClipboard,t.ng.animations,t.rxjs.operators,t.rxjs,t.ng.cdk.tree,t.ng.material.input,t.ng.material["form-field"],t.ng.common.locales["zh-Hans"],t.pinyin_,t.ng2AceEditor,t.uuid,t.ace,t.ng.common.http,t.ng.cdk.overlay,t.ng5Slider,t.ng.material.checkbox,t.ng.material.expansion,t.ng.material["progress-bar"],t.ng.material.select,t.ng.material.stepper,t.ng.material.table,t.angularCalendar,t.dateFns,t.ng.material.card,t.ng.material.chips,t.ng.material["grid-list"],t.ng.material.tooltip,t.ng.cdk.collections,t.ng.material.sort,t.ng.material.radio,t.ng.material["snack-bar"],t["ts-md5"])}(this,function(t,e,n,i,r,o,a,l,s,d,c,p,m,u,g,h,v,f,b,x,y,w,_,C,k,I,D,S,M,N,T,E,L,P,R,z,F,O,B,A,V,j,H,U,q,G,Y,$,Q,X,W,K,Z){"use strict";M=M&&M.hasOwnProperty("default")?M.default:M;var J="default"in N?N.default:N;L=L&&L.hasOwnProperty("default")?L.default:L;var tt=function(t,e){return(tt=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 et(t,e){function n(){this.constructor=t}tt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var nt=function(){return(nt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function it(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function rt(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function ot(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(rt(arguments[e]));return t}var at=function(){function t(t,e){this.dialogRef=t,this.data=e,this.hostClass=!0}return t.prototype.onNoClick=function(){this.dialogRef.close()},t.prototype.ngOnInit=function(){this.removeView.nativeElement.parentElement.parentElement.style="padding:0px"},t.decorators=[{type:n.Component,args:[{selector:"common-confirm-dialog",template:'<div #removeView class="删除">\r\n\t<div class="tit">\r\n\t\t\t<b >{{ data }}</b>\r\n\t</div>\r\n\t<div class="功能按钮">\r\n\t\t<button class="false-icon" mat-button [mat-dialog-close]="false">取消</button>\r\n\t\t<button class="true-icon" color="primary" mat-button [mat-dialog-close]="true">确定</button>\r\n\t</div>\r\n</div>\r\n',styles:['@charset "UTF-8";.删除{position:relative;display:flex;justify-content:space-between;flex-direction:column;width:100%;height:100%;box-sizing:border-box;padding:24px 24px 16px}.删除 b{font-size:20px}.tit{display:flex;align-items:center;box-sizing:border-box;width:100%;height:104px}.功能按钮{width:100%;box-sizing:border-box;text-align:right}.功能按钮 .mat-button{width:64px;height:32px}.功能按钮 .true-icon{margin-left:8px}']}]}],t.ctorParameters=function(){return[{type:r.MatDialogRef},{type:String,decorators:[{type:n.Inject,args:[r.MAT_DIALOG_DATA]}]}]},t.propDecorators={hostClass:[{type:n.HostBinding,args:["class.confirm-dialog-theme"]}],removeView:[{type:n.ViewChild,args:["removeView",{static:!0}]}]},t}();var lt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[at],imports:[e.CommonModule,r.MatDialogModule,r.MatButtonModule],exports:[at],entryComponents:[at]}]}],t}(),st="login",dt="element",ct="task",pt="role",mt="user",ut="notice",gt="/front/assets/userinfo/portrait_default.png";var ht=function(){function t(t){this.eles=t}return Object.defineProperty(t.prototype,"category",{get:function(){return this.eles.currentElementListen.pipe(C.map(function(t){return t?i.clearCategory(t.element.Category).replace("/",">")+">"+((e=t.element).Label?i.clearText(e.Label):i.clearText(e.Name)):null;var e}))},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:i.RouteElementService}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(i.RouteElementService))},token:t,providedIn:"root"}),t}();var vt=function(){function t(t){var e,n;try{for(var i=it(Object.keys(t)),r=i.next();!r.done;r=i.next()){var o=r.value;this[o]=t[o]}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}this.titleObservable=new k.BehaviorSubject(t.title)}return t.prototype.data=function(){return{url:this.url,key:this.key,title:this.title}},t}();var ft=function(){function t(t,e){this.router=t,this.eles=e,this.tabs=[]}return t.prototype.activeTab=function(t){var e=this.tabs.findIndex(function(e){return e.key===t.key});-1===e?(this.tabs.push(new vt(t)),this._activeIndex=this.tabs.length-1):(this._activeIndex=e,this.tabs[this._activeIndex].url=t.url,this.tabs[this._activeIndex].title=t.title)},t.prototype.removeTab=function(t){if(1===this.tabs.length)return!1;var e=this.tabs[t].url.toString();if(t===this._activeIndex)var n=this.router.events.subscribe(function(t){t instanceof y.NavigationEnd&&(i.SimpleReuseStrategy.deleteRouteSnapshot(e),n.unsubscribe())});else i.SimpleReuseStrategy.deleteRouteSnapshot(e);return this.tabs.splice(t,1),this._activeIndex===t?(this._activeIndex=Math.min(this.tabs.length-1,t),!0):(this._activeIndex>t&&this._activeIndex--,!1)},t.prototype.clear=function(){this.tabs.splice(0),this._activeIndex=void 0,i.SimpleReuseStrategy.clearRouteSnapshot()},t.prototype.close=function(){var t=this;if(this.activeIndex>=0){var e=this.activeIndex;1===this.tabs.length&&this.router.navigateByUrl(this.eles.frontElementURL(this.eles.indexElementName)).then(function(){t.removeTab(e)}),this.removeTab(e)&&this.router.navigateByUrl(this.active.url,{state:this.active.data()})}},Object.defineProperty(t.prototype,"active",{get:function(){if(this._activeIndex>=0)return this.tabs[this._activeIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeIndex",{get:function(){return this._activeIndex},set:function(t){this._activeIndex=t},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:y.Router},{type:i.ElementsService}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(y.Router),n.ɵɵinject(i.ElementsService))},token:t,providedIn:"root"}),t}();var bt=function(){function t(t,e,n,i){var r=this;this.routerEle=t,this.eles=e,this.tabFun=n,this.tabs=i,this.hostClass=!0,this.subs=[],this.copystate=!1,this.subs.push(this.routerEle.currentElementListen.pipe(C.filter(function(t){return t&&t.element&&t.element.Controller!==st})).subscribe(function(t){var e=t.state;if(!e){var n=t.url,i=n.split("/");if(!t.element.Bill&&i.length>5){n=i.slice(0,5).join("/");var o=i[i.length-1].split("?");o.length>1&&(n+="?"+o[1])}e={url:t.urlObj,key:n,title:t.element.title()}}r.tabs.activeTab(e)})),this.category=this.tabFun.category}return t.prototype.ngOnInit=function(){},t.prototype.ngOnDestroy=function(){this.subs.forEach(function(t){return t.unsubscribe()})},t.decorators=[{type:n.Component,args:[{selector:"common-home",template:'<div class="home-container-nav">\r\n\t<common-home-nav></common-home-nav>\r\n</div>\r\n<div class="home-container-content">\r\n\t<div class="tab-all">\r\n\t\t<app-router-tab #tabNav class="tabNav">\r\n\t\t\t<app-router-tab-item\r\n\t\t\t\t*ngFor="let tab of tabs.tabs; let index = index"\r\n\t\t\t\t[routerLink]="tab.url" class="tabA"\r\n\t\t\t\tlabel="{{ tab.titleObservable | async }}">\r\n\t\t\t</app-router-tab-item>\r\n\t\t</app-router-tab>\r\n\t\t<div class="tab-nav-right">\r\n\t\t\t<button mat-icon-button ngxClipboard [cbContent]="category | async"\r\n\t\t\t\t(mousemove)="copystate = true" (mouseout)="copystate = false">\r\n\t\t\t\t<mat-icon class="复制图标" [class.复制悬浮]="copystate"\r\n\t\t\t\t\taria-label="复制类别" svgIcon="content_copy"></mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<button mat-stroked-button class="语言">Eng</button>\r\n\t\t</div>\r\n\t\t<div class="复制路径" [class.复制悬浮状态]="!copystate">\r\n\t\t\t<span class="类别">{{ category | async }}</span>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class="content-home" [@routerTransition]="tabs.activeIndex">\r\n\t\t<core-router-outlet #outlet="coreRouterOutlet"></core-router-outlet>\r\n\t</div>\r\n</div>',animations:[_.trigger("routerTransition",[_.transition(":enter, * => -1",[]),_.transition(":increment",[_.style({position:"relative",overflow:"hidden"}),_.query(":enter, :leave",_.style({position:"absolute",width:"100%",height:"100%"}),{optional:!0}),_.group([_.query(":enter",[_.style({transform:"translateX(-100%)"}),_.animate("0.5s ease-in-out",_.style({transform:"translateX(0%)"}))],{optional:!0}),_.query(":leave",[_.style({transform:"translateX(0%)"}),_.animate("0.5s ease-in-out",_.style({transform:"translateX(100%)"}))],{optional:!0})])]),_.transition(":decrement",[_.style({position:"relative",overflow:"hidden"}),_.query(":enter, :leave",_.style({position:"absolute",width:"100%",height:"100%"}),{optional:!0}),_.group([_.query(":enter",[_.style({transform:"translateX(100%)"}),_.animate("0.5s ease-in-out",_.style({transform:"translateX(0%)"}))],{optional:!0}),_.query(":leave",[_.style({transform:"translateX(0%)"}),_.animate("0.5s ease-in-out",_.style({transform:"translateX(-100%)"}))],{optional:!0})])])])],styles:['@charset "UTF-8";:host{width:100%;height:100%;padding:0;margin:0;display:flex;align-items:stretch}.home-container-nav{flex-shrink:0;z-index:10}.home-container-content{height:100%;display:flex;flex-direction:column;width:10%;flex-grow:1;flex-shrink:1}.home-container-content .tab-all{display:flex;height:30px}.home-container-content .tab-all .tabNav{width:10%;flex-grow:1;flex-shrink:1}.home-container-content .tab-all .tab-nav-right{height:30px;line-height:30px;font-size:12px;position:relative;display:block}.home-container-content .tab-all .tab-nav-right button{width:24px;height:24px;line-height:24px}.home-container-content .tab-all .tab-nav-right button .复制图标{width:16px;height:16px;margin-bottom:6px}.home-container-content .tab-all .tab-nav-right .语言{font-size:12px;height:24px;width:64px;margin:0 8px;padding:0;line-height:20px;text-align:center}.home-container-content .复制路径{height:32px;position:absolute;right:0;top:30px;font-size:12px;color:#fff;line-height:32px;border-radius:4px;padding:0 8px;z-index:9;text-align:center;background-color:rgba(0,0,0,.6);box-shadow:0 4px 8px 0 rgba(0,0,0,.14)}.home-container-content .复制悬浮状态{display:none}.home-container-content .content-home{width:100%;height:10%;box-sizing:border-box;flex-grow:1;flex-shrink:1}']}]}],t.ctorParameters=function(){return[{type:i.RouteElementService},{type:i.RouteElementService},{type:ht},{type:ft}]},t.propDecorators={hostClass:[{type:n.HostBinding,args:["class.c-home"]}],tabNavs:[{type:n.ViewChild,args:["tabNav",{static:!0}]}]},t}();var xt=function(){function t(){this._navMin=new k.BehaviorSubject("true"===localStorage.getItem("main-nav-min")),this.navMin=this._navMin.pipe(C.tap(function(t){localStorage.setItem("main-nav-min",t?"true":"false")}))}return t.prototype.setNavMin=function(t){this._navMin.next(t)},t.prototype.getCurrent=function(){return this._navMin.getValue()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();var yt=function(){function t(t,e){this.eles=t,this.project=e,this.root={children:[]},this.icons=["security","dns","gamepad"],this.init();for(var n=0;n<Math.min(this.root.children.length,this.icons.length);n++)this.root.children[n].iconName=this.icons[n]}return t.prototype.init=function(){var t=this;this.project.categoryIcons&&this.project.categoryIcons.length>0&&(this.icons=this.project.categoryIcons),this.root.children.length>0||this.eles.getElesAsArray().forEach(function(e){e.NotMenu||t.addElement(e,t.root,e.Category.split("/"),0,null,e.Icon)})},t.prototype.clearText=function(t){return t.search(/[0-9]{2}\./)>-1?t.substr(3):t},t.prototype.addElement=function(t,e,n,i,r,o){if(0!==n.length){var a,l=e.children.findIndex(function(t){return n[0].localeCompare(t.name)<=0});-1!==l&&e.children[l].name===n[0]?a=e.children[l]:(a={name:n[0],fullTitle:n[0],title:this.clearText(n[0]),level:i,parent:r,iconName:o,children:[]},-1===l?e.children.push(a):e.children.splice(l,0,a)),this.addElement(t,a,n.slice(1),i+1,a,o)}else{var s=e.children.findIndex(function(e){return(t.Label||t.Name).localeCompare(e.fullTitle||e.name)<=0}),d={name:t.Name,fullTitle:t.Label,title:this.clearText(t.Label||t.Name),url:this.eles.frontElementURL(t.Name,decodeURI(t.URL)),level:i,parent:r,iconName:o};-1===s?e.children.push(d):e.children.splice(s,0,d)}},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:i.ElementsService},{type:i.ProjectService}]},t}();var wt=function(){function t(t,e,n){this.current=t,this.database=e,this.prj=n,this.chatMessages=[],this.unread=null,this.openNodeCurrent=[],this.activeNode=[],this.subs=[]}return t.prototype.recursionFun=function(t){if(t.level<=0)return this.openNodeCurrent.push(t);t.level>=1&&(this.openNodeCurrent.push(t),this.recursionFun(t.parent))},t.prototype.recursionFuns=function(t){if(t.level<=0)return this.activeNode.push(t);t.level>=1&&(this.activeNode.push(t),this.recursionFuns(t.parent))},t.prototype.gradually=function(t){0!==this.activeNode.length&&this.activeNode.splice(0,this.activeNode.length),this.recursionFuns(t)},t.prototype.openNode=function(t){var e=this.openNodeCurrent.includes(t);0!==this.openNodeCurrent.length&&this.openNodeCurrent.splice(0,this.openNodeCurrent.length),e?(t.level>=1&&this.recursionFun(t.parent),0===t.level&&this.recursionFun(this.database.root)):this.recursionFun(t)},t.prototype.messages=function(){var t=this,e=JSON.parse(this.prj.loadData("chatdata"));null==e&&this.prj.saveData("chatdata",JSON.stringify(this.chatMessages)),this.subs.push(this.current.wsChat.observable.subscribe(function(e){t.chatMessages.push(e),t.prj.saveData("chatdata",JSON.stringify(t.chatMessages)),null!=e&&(t.unread=t.unread+1)},function(t){return console.log(t)},function(){return console.log("component")})),this.chatMessages=e},t.prototype.fromChildFunc=function(t){0!==this.activeNode.length&&this.activeNode.splice(0,this.activeNode.length),this.recursionFuns(t),0!==this.openNodeCurrent.length&&this.openNodeCurrent.splice(0,this.openNodeCurrent.length),this.recursionFun(t)},t.decorators=[{type:n.Injectable}],t.ctorParameters=function(){return[{type:i.CurrentService},{type:yt},{type:i.ProjectService}]},t}();var _t=function(){function t(t,e,n,i,r,o,a,l,s,d){var c=this;this.nav=t,this.current=e,this.eles=n,this.database=i,this.auth=r,this.routeEle=o,this.prj=a,this.navMain=l,this.router=s,this.tabs=d,this.isMinNav=!0,this.isOpenDialog=!1,this.navItems=[],this._getChildren=function(t){return t.children},this.isMinNav=this.navMain.getCurrent(),this.navMain.navMin.subscribe(function(t){c.switchNavToMin(t)}),this.current.change$.subscribe(function(t){t&&t.HeadPortrait?c.nav.portraitURL=t.portraitURL:c.nav.portraitURL=gt})}return t.prototype.switchNavToMin=function(t){var e=this;t!==this.isMinNav&&(setTimeout(function(){e.isMinNav=t},300),t?(this.maxNavContainer.nativeElement.style.width="80px",this.maxNavContainer.nativeElement.style.transition="all 0.3s"):(this.minNavContainer.nativeElement.style.width="240px",this.minNavContainer.nativeElement.style.transition="all 0.3s"))},t.prototype.ngOnInit=function(){var t=this;this.nestedTreeControl=new I.NestedTreeControl(this._getChildren),this.nestedDataSource=new f.MatTreeNestedDataSource,this.nestedDataSource.data=this.database.root.children,this.navItems=this.nestedDataSource.data,this.nav.subs.push(this.routeEle.currentElementListen.subscribe(function(e){e&&e.element&&(t.currentNode=null,t.obtainNode(e.element.Name,t.navItems),0!==t.nav.activeNode.length&&null!==t.currentNode&&t.nav.activeNode.splice(0,t.nav.activeNode.length),0!==t.nav.openNodeCurrent.length&&null!==t.currentNode&&t.nav.openNodeCurrent.splice(0,t.nav.openNodeCurrent.length),null!==t.currentNode&&(t.nav.recursionFuns(t.currentNode),t.nav.recursionFun(t.currentNode)))})),this.nav.messages()},t.prototype.ngOnDestroy=function(){this.nav.subs.forEach(function(t){return t.unsubscribe()})},t.prototype.logout=function(){var t=this;this.router.navigateByUrl("/login/"+this.prj.apiNav()[0]+"/"+this.prj.apiNav()[1]+"/login").then(function(){t.tabs.clear(),t.auth.logoutDefault().subscribe()})},t.prototype.hasNestedChild=function(t,e){return!!e.children&&e.children.length>0},t.prototype.openDialog=function(){var t=this;this.isOpenDialog=!0,setTimeout(function(){t.dialogScrolls()},0)},t.prototype.closeDialog=function(){this.isOpenDialog=!1},t.prototype.obtainNode=function(t,e){for(var n=0;n<=e.length-1;n++)e[n].name===t&&(this.currentNode=e[n]),void 0!==e[n].children&&null==this.currentNode&&this.obtainNode(t,e[n].children)},t.prototype.sendMessage=function(){var t=this;this.nav.messageBody&&(this.current.wsChat.next({Creator:this.prj.Creator(),Project:this.prj.Name(),From:this.current.data.UserName,Addr:"",Time:null,Data:this.nav.messageBody}),this.nav.messageBody=""),setTimeout(function(){t.dialogScrolls()},0)},t.prototype.keyDown=function(t){13===(window.event||t).keyCode&&this.sendMessage()},t.prototype.dialogScrolls=function(){null!=this.dialogScroll&&(this.nav.unread=null,this.dialogScroll.nativeElement.scrollTop=this.dialogScroll.nativeElement.scrollHeight)},t.prototype.isNews=function(){this.dialogScroll.nativeElement.scrollHeight-this.dialogScroll.nativeElement.clientHeight<=this.dialogScroll.nativeElement.scrollTop+1&&(this.nav.unread=null)},t.decorators=[{type:n.Component,args:[{selector:"common-home-nav",template:'<div *ngIf="!isMinNav" #maxNavContainer class="max-nav-container nav-container">\r\n\t<div class="nav-top">\r\n\t\t<div class="nav-title">\r\n\t\t\t<div class="nav-title-logo"><img [src]="prj.logoImageURL()" /></div>\r\n\t\t\t<div class="nav-title-name">\r\n\t\t\t\t<p\r\n\t\t\t\t\t[ngClass]="{\'projectLabelMin\': prj.projectLabelForShort.length>6}">\r\n\t\t\t\t\t{{ prj.projectLabelForShort }}</p>\r\n\t\t\t\t<common-nav-selection-dept [isMinNav]="isMinNav">\r\n\t\t\t\t</common-nav-selection-dept>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div (click)="switchNavToMin(!isMinNav)" class="nav-switch">\r\n\t\t\t<mat-icon svgIcon="chevron_left"></mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n\t<mat-divider class="nav-divider"></mat-divider>\r\n\t<div class="导航树">\r\n\t\t<div class="slider slider-color"></div>\r\n\t\t<mat-tree [dataSource]="nestedDataSource" [treeControl]="nestedTreeControl" class="example-tree">\r\n\t\t\t<mat-tree-node *matTreeNodeDef="let node; index as i" matTreeNodeToggle>\r\n\t\t\t\t<li (click)="nav.gradually(node)" class="mat-tree-node">\r\n\t\t\t\t\t<button [class.collapsed]="nav.activeNode.includes(node)" [routerLink]="[node.url]" mat-button\r\n\t\t\t\t\t\tclass="导航按钮悬浮色">\r\n\t\t\t\t\t\t<mat-icon *ngIf="node.iconName" class="menu-icon" [svgIcon]="node.iconName"></mat-icon>\r\n\t\t\t\t\t\t{{ node.title }}\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</li>\r\n\t\t\t</mat-tree-node>\r\n\t\t\t<mat-nested-tree-node *matTreeNodeDef="let node; when: hasNestedChild; let i = index" matTreeNodePadding>\r\n\t\t\t\t<div class="max-menu" [class.分支背景]="nav.openNodeCurrent.includes(node)">\r\n\t\t\t\t\t<div *ngIf="node.level == 0" [ngClass]="{\r\n\t\t\t\t\t\t\t\'slider-color\': nav.activeNode.includes(node),\r\n\t\t\t\t\t\t\t\'max-left-slider\': nav.activeNode.includes(node)\r\n\t\t\t\t\t\t}"></div>\r\n\t\t\t\t\t<div class="mat-tree-node">\r\n\t\t\t\t\t\t<button [class.collapsed]="nav.activeNode.includes(node)" mat-button matTreeNodeToggle\r\n\t\t\t\t\t\t\t[attr.aria-label]="\'toggle \' + node.title" (click)="nav.openNode(node)" class="导航按钮悬浮色">\r\n\t\t\t\t\t\t\t<mat-icon *ngIf="node.level == 0" svgIcon="{{ node.iconName }}">\r\n\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t{{ node.title }}\r\n\t\t\t\t\t\t\t<mat-icon *ngIf="node.level != 0" class="mat-icon-rtl-mirror" svgIcon="{{\r\n\t\t\t\t\t\t\t\t\tnav.openNodeCurrent.includes(node)\r\n\t\t\t\t\t\t\t\t\t\t? \'expand_more\'\r\n\t\t\t\t\t\t\t\t\t\t: \'chevron_right\'\r\n\t\t\t\t\t\t\t\t}}">\r\n\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<ul [class.example-tree-invisible]="\r\n\t\t\t\t\t\t\t!nav.openNodeCurrent.includes(node)\r\n\t\t\t\t\t\t">\r\n\t\t\t\t\t\t<ng-container matTreeNodeOutlet></ng-container>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</div>\r\n\t\t\t</mat-nested-tree-node>\r\n\t\t</mat-tree>\r\n\t</div>\r\n\t<div class="nav-bottom">\r\n\t\t<mat-divider class="nav-divider"></mat-divider>\r\n\t\t<a class="nav-bottom-photo" [routerLink]="eles.frontElementURL(\'userinfo\')">\r\n\t\t\t<div><img [src]="nav.portraitURL" /></div>\r\n\t\t\t<p class="昵称">{{ current.data.NickName || current.data.UserName}}</p>\r\n\t\t</a>\r\n\t\t<div class="nav-bottom-icon">\r\n\t\t\t<div (click)="openDialog()">\r\n\t\t\t\t<mat-icon matBadge="{{ nav.unread }}" matBadgeColor="warn" matBadgeSize="medium" svgIcon="mail">\r\n\t\t\t\t</mat-icon>\r\n\t\t\t\t<p>消息</p>\r\n\t\t\t</div>\r\n\t\t\t<div (click)="logout()">\r\n\t\t\t\t<mat-icon svgIcon="forward"></mat-icon>\r\n\t\t\t\t<p>退出</p>\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<mat-icon svgIcon="help"></mat-icon>\r\n\t\t\t\t<p>帮助</p>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div *ngIf="isOpenDialog" class="对话框">\r\n\t\t<div class="对话框上部">\r\n\t\t\t<mat-icon (click)="closeDialog()" svgIcon="expand_more"></mat-icon>\r\n\t\t</div>\r\n\t\t<div #dialogScroll class="对话框内容">\r\n\t\t\t<p class="显示对话" *ngFor="let message of nav.chatMessages">\r\n\t\t\t\t[<span class="名字">{{ message.From }}</span>]\r\n\t\t\t\t<span class="时间">{{\r\n\t\t\t\t\tmessage.Time | date: "yyyy-MM-dd HH:mm:ss"\r\n\t\t\t\t}}</span>\r\n\t\t\t\t<span class="内容">{{ message.Data }}</span>\r\n\t\t\t</p>\r\n\t\t</div>\r\n\t\t<div class="对话框底部">\r\n\t\t\t<input mat-input class="输入框" [(ngModel)]="nav.messageBody" (keydown)="keyDown($event)"\r\n\t\t\t\tplaceholder="输入内容,回车发送" />\r\n\t\t\t<mat-icon (click)="sendMessage()" svgIcon="send"></mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n<div *ngIf="isMinNav" #minNavContainer class="min-nav-container nav-container">\r\n\t<div class="min-logo"><img [src]="prj.logoImageURL()" /></div>\r\n\t<div>\r\n\t\t<common-nav-selection-dept [isMinNav]="isMinNav">\r\n\t\t</common-nav-selection-dept>\r\n\t\t<mat-divider class="nav-divider"></mat-divider>\r\n\t</div>\r\n\t<div class="导航树小">\r\n\t\t<div class="min-slider slider-color"></div>\r\n\t\t<div class="菜单项" *ngFor="let item of navItems; index as i" [class.当前菜单项]="nav.activeNode.includes(item)">\r\n\t\t\t<div [ngClass]="{\r\n\t\t\t\t\t\'slider-color\': nav.activeNode.includes(item),\r\n\t\t\t\t\t\'left-slider\': nav.activeNode.includes(item)\r\n\t\t\t\t}"></div>\r\n\t\t\t\x3c!-- Handle branch node buttons here --\x3e\r\n\t\t\t<div *ngIf="item.children && item.children.length > 0">\r\n\t\t\t\t<button mat-button class="导航按钮悬浮色" [class.collapsed]="nav.activeNode.includes(item)"\r\n\t\t\t\t\t[matMenuTriggerFor]="menu.childMenu">\r\n\t\t\t\t\t<mat-icon svgIcon="{{ item.iconName }}"></mat-icon>\r\n\t\t\t\t\t{{ item.title }}\r\n\t\t\t\t</button>\r\n\t\t\t\t<common-menu [class.treebranch]="true" #menu [items]="item.children" [activeNode]="nav.activeNode"\r\n\t\t\t\t\t(fromChild)="nav.fromChildFunc($event)"></common-menu>\r\n\t\t\t</div>\r\n\t\t\t\x3c!-- Leaf node buttons here --\x3e\r\n\t\t\t<div *ngIf="!item.children || item.children.length === 0">\r\n\t\t\t\t<button mat-button class="导航按钮悬浮色">\r\n\t\t\t\t\t<mat-icon svgIcon="{{ item.iconName }}"></mat-icon>\r\n\t\t\t\t\t{{ item.title }}\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class="导航底部小">\r\n\t\t<mat-divider class="nav-divider"></mat-divider>\r\n\t\t<button (click)="switchNavToMin(!isMinNav)" mat-button>\r\n\t\t\t<mat-icon svgIcon="chevron_right"></mat-icon>展开\r\n\t\t</button>\r\n\t\t<a class="nav-bottom-photo" [routerLink]="eles.frontElementURL(\'userinfo\')">\r\n\t\t\t<div class="nav-bottom-photo-img"><img [src]="nav.portraitURL" /></div>\r\n\t\t\t<p class="昵称">{{ current.data.NickName||current.data.UserName }}</p>\r\n\t\t</a>\r\n\t</div>\r\n</div>',providers:[yt,wt],styles:['@charset "UTF-8";.max-nav-container{width:240px;height:100%;margin:0;padding:0;display:flex;flex-direction:column}.nav-top{width:100%;height:72px;display:flex;align-items:center;position:relative}.nav-top .nav-title{width:216px;height:48px;padding:0 8px 0 16px;display:flex}.nav-top .nav-title-logo{width:48px;height:48px}.nav-top .nav-title-logo img{width:100%;height:100%}.nav-top .nav-title-name{flex-grow:1;vertical-align:top;margin-left:8px;letter-spacing:1px}.nav-top .nav-title-name p{font-size:18px;width:100%;font-weight:700;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-top .nav-title-name .projectLabelMin{font-size:14px}.nav-top .nav-switch{width:32px;height:32px;border-radius:16px 0 0 16px;background-color:rgba(255,255,255,.2);position:absolute;right:0;bottom:4px}.nav-top .nav-switch .mat-icon{margin:4px;cursor:pointer}.nav-divider{z-index:2}.nav-menu-item{font-size:14px;height:32px;line-height:32px}.nav-bottom{margin:0;width:100%;height:98px}.nav-bottom .nav-bottom-photo{margin:16px 8px 0 12px}.nav-bottom .nav-bottom-icon{float:right;width:116px;height:46px;margin:28px 19px 0 0;display:flex;flex-direction:row;justify-content:space-between}.nav-bottom .nav-bottom-icon div{height:100%;cursor:pointer}.nav-bottom .nav-bottom-icon div p{margin:0;font-size:12px;line-height:18px;opacity:.6}.nav-bottom-photo{width:80px;display:inline-block;text-align:center}.nav-bottom-photo div{width:40px;height:40px;border-radius:50%;margin:0 auto;background:url(/front/assets/home/portrait_default.png);overflow:hidden}.nav-bottom-photo div img{width:100%;height:100%}.nav-bottom-photo p{font-size:12px;margin-top:5px;text-align:center;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.example-tree-invisible{display:none}.导航树{flex-grow:1;overflow:auto;font-size:20px}.导航树 .slider{width:2px;height:48px;display:none}.导航树::-webkit-scrollbar-track{background-color:rgba(255,255,255,.06)}.导航树::-webkit-scrollbar-track:hover{background-color:rgba(255,255,255,.12)}.导航树::-webkit-scrollbar-thumb{background-color:#5e5e5e}.导航树::-webkit-scrollbar-thumb:hover{background-color:silver}.导航树 .example-tree li,.导航树 .example-tree ul{margin-top:0;margin-bottom:0;list-style-type:none}.导航树 .example-tree ul{padding-left:20px}.导航树 .max-left-slider{width:2px;height:48px;float:left}.导航树 .mat-tree-node button{font-size:16px}.导航树 .第三级滑块{width:2px;height:48px;background-color:rgba(255,255,255,.6);float:left}.导航树 .mat-icon-rtl-mirror{float:right;margin:8px}.对话框{width:240px;height:328px;background-color:#121212;position:absolute;left:0;bottom:2px;z-index:2;display:flex;flex-direction:column}.对话框 .mat-icon{float:right;cursor:pointer}.对话框底部 .输入框{width:184px;height:32px;box-sizing:border-box;border-radius:16px;padding:0 15px;margin:0 8px;line-height:30px;background-color:rgba(255,255,255,.36);border:0;outline:0;color:rgba(0,0,0,.87)}.对话框底部 .输入框::-webkit-input-placeholder{color:rgba(0,0,0,.38)}.对话框底部 .mat-icon{margin:4px 8px 4px 0;color:#ff9f1c}.对话框内容{flex-grow:1;overflow-y:auto}.对话框内容::-webkit-scrollbar{width:4px;height:4px;border-radius:2px}.对话框内容::-webkit-scrollbar-track{border-radius:2px;background-color:rgba(255,255,255,.12)}.对话框内容::-webkit-scrollbar-thumb{border-radius:2px;box-shadow:inset 0 2px 6px rgba(0,0,0,.3);background-color:#919191}.对话框内容 .显示对话{width:90%;padding:0 5%;font-size:12px;color:#7ed321}.对话框内容 .显示对话 .时间{font-size:12px;color:rgba(255,255,255,.38);float:right;vertical-align:bottom}.对话框内容 .显示对话 .名字{display:inline-block;max-width:108px;font-size:12px;color:#7ed321;vertical-align:bottom;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.对话框内容 .显示对话 .内容{display:block;font-size:12px;color:#fff;flex-grow:1;letter-spacing:.75px}.min-nav-container{width:80px;height:100%;margin:0;padding:12px 0 0;box-sizing:border-box;display:flex;flex-direction:column}.min-logo{width:40px;height:40px;margin:0 auto}.min-logo img{width:100%;height:100%}.导航树小{flex-grow:1;overflow-y:auto;overflow-x:hidden}.导航树小 .min-slider{width:2px;height:80px;display:none}.导航树小 .left-slider{width:2px;height:80px;position:absolute;left:0;top:0;z-index:99}.导航树小 .mat-button{width:78px;text-align:center;padding:10px 0 10px 2px;margin:0}.导航树小 .mat-icon{margin:0 auto;text-align:center;display:block}.导航树小 .菜单项{margin:4px 0;padding:0;height:80px;position:relative}.导航树小 .当前菜单项{background-color:#252525}.导航底部小{width:80px;flex-shrink:0;text-align:center;font-size:12px}.导航底部小 p{margin:8px 0}.导航底部小 .mat-icon{display:block;text-align:center;margin:0 auto;color:#fff}.导航底部小 button{width:80px;margin:8px 0 24px;font-size:12px;color:rgba(255,255,255,.6)}.导航底部小 .nav-bottom-photo-img{width:24px;height:24px}.treebranch{width:0}.导航按钮悬浮色::ng-deep .mat-button-focus-overlay{background-color:#fff}']}]}],t.ctorParameters=function(){return[{type:wt},{type:i.CurrentService},{type:i.ElementsService},{type:yt},{type:i.AuthloginService},{type:i.RouteElementService},{type:i.ProjectService},{type:xt},{type:y.Router},{type:ft}]},t.propDecorators={dialogScroll:[{type:n.ViewChild,args:["dialogScroll",{static:!1}]}],maxNavContainer:[{type:n.ViewChild,args:["maxNavContainer",{static:!1}]}],minNavContainer:[{type:n.ViewChild,args:["minNavContainer",{static:!1}]}]},t}();var Ct=function(){function t(){this.fromChild=new n.EventEmitter}return t.prototype.ngOnInit=function(){},t.prototype.subscripts=function(t,e){this.fromChild.emit(e)},t.prototype.fromChildFunc=function(t){this.fromChild.emit(t)},t.decorators=[{type:n.Component,args:[{selector:"common-menu",template:'<mat-menu #childMenu="matMenu" [overlapTrigger]="false">\r\n\t<span *ngFor="let child of items; let i = index">\r\n\t\t\x3c!-- Handle branch node menu items --\x3e\r\n\t\t<span *ngIf="child.children && child.children.length > 0">\r\n\t\t\t<button mat-menu-item [matMenuTriggerFor]="menu.childMenu"\r\n\t\t\t\t[class.collapsed]="activeNode.includes(child)">\r\n\t\t\t\t<span>{{ child.title }}</span>\r\n\t\t\t</button>\r\n\t\t\t<common-menu #menu [items]="child.children"\r\n\t\t\t\t[activeNode]="activeNode" (fromChild)="fromChildFunc($event)">\r\n\t\t\t</common-menu>\r\n\t\t</span>\r\n\t\t\x3c!-- Handle leaf node menu items --\x3e\r\n\t\t<span *ngIf="!child.children || child.children.length === 0"\r\n\t\t\t(click)="subscripts(i, child)">\r\n\t\t\t<button mat-menu-item routerLink="{{ child.url }}"\r\n\t\t\t\t[class.collapsed]="activeNode.includes(child)">\r\n\t\t\t\t<mat-icon *ngIf="child.iconName" [svgIcon]="child.iconName">\r\n\t\t\t\t</mat-icon> <span>{{ child.title }}</span>\r\n\t\t\t</button>\r\n\t\t</span>\r\n\t</span>\r\n</mat-menu>',styles:[""]}]}],t.ctorParameters=function(){return[]},t.propDecorators={items:[{type:n.Input}],activeNode:[{type:n.Input}],fromChild:[{type:n.Output}],childMenu:[{type:n.ViewChild,args:["childMenu",{static:!0}]}]},t}();var kt=function(){function t(t,e){this.api=t,this.eles=e}return t.prototype.codeExists=function(t){return this.api.get(this.eles.get("setdept").URL,"code-exists",this.eles.get("setdept").SignStr,t)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:i.ApiService},{type:i.ElementsService}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(i.ApiService),n.ɵɵinject(i.ElementsService))},token:t,providedIn:"root"}),t}();var It=function(){function t(t,e,n,i){this.dialogRef=t,this.current=e,this.eles=n,this.setDeptService=i;var r=this;this.newCode=new a.FormControl(this.current.data.Dept.Code,[a.Validators.required,function(t){return t.value.startsWith(r.current.data.UserDept.Code)?null:{owner:!0}}],function(t){return i.codeExists(t.value).pipe(C.map(function(t){return t?null:{exists:!0}}))}),this.newCode.markAsTouched()}return t.prototype.getErrorMessage=function(){return this.newCode.hasError("required")?"你必须录入一个代码":this.newCode.hasError("owner")?"必须以 "+this.current.data.UserDept.Code+" 开头":this.newCode.hasError("exists")?"代码 "+this.newCode.value+" 不存在":""},t.prototype.ngOnInit=function(){},t.prototype.clickOk=function(){var t=this;this.current.switchDept(this.newCode.value,this.eles.get(i.eleSwitchDept).SignStr).subscribe(function(){return t.dialogRef.close()})},t.prototype.codeEnter=function(){this.newCode.invalid||this.clickOk()},t.decorators=[{type:n.Component,args:[{selector:"common-set-dept",template:'<h1 mat-dialog-title>设置部门代码</h1>\n<div mat-dialog-content>\n <mat-form-field>\n <input matInput placeholder="请录入新的部门代码" [formControl]="newCode" required (keyup.enter)="codeEnter()" />\n <mat-error *ngIf="newCode.invalid">{{ getErrorMessage() }}</mat-error>\n </mat-form-field>\n</div>\n<mat-dialog-actions align="end">\n <button mat-button mat-stroked-button (click)="clickOk()" [disabled]="newCode.invalid">确定</button>\n</mat-dialog-actions>\n',styles:[""]}]}],t.ctorParameters=function(){return[{type:c.MatDialogRef},{type:i.CurrentService},{type:i.ElementsService},{type:kt}]},t}();var Dt=function(){function t(t,e,n){this.dialog=t,this.eles=e,this.current=n}return t.prototype.ngOnInit=function(){},t.prototype.customDept=function(){this.dialog.open(It,{width:"250px"}).afterClosed().subscribe(function(){console.log("The dialog was closed")})},t.prototype.switchDept=function(t){this.current.switchDept(t,this.eles.get(i.eleSwitchDept).SignStr).subscribe()},t.decorators=[{type:n.Component,args:[{selector:"common-nav-selection-dept",template:'<button\r\n\tmat-button\r\n\tclass="max-top-menu 导航按钮悬浮色"\r\n\t[ngClass]="{\r\n\t\t\'max-top-menu\': !isMinNav,\r\n\t\t\'min-top-menu\': isMinNav\r\n\t}"\r\n\t[matMenuTriggerFor]="menu"\r\n>\r\n\t<span>{{\r\n\t\t(current.change$ | async)?.UserName +\r\n\t\t\t\' \' +\r\n\t\t\t(current.change$ | async)?.Dept.Code +\r\n\t\t\t\'.\' +\r\n\t\t\t(current.change$ | async)?.Dept.Name\r\n\t}}</span>\r\n\t<mat-icon svgIcon="arrow_drop_down"></mat-icon>\r\n</button>\r\n<mat-menu class="nav-menu" #menu="matMenu">\r\n\t<button mat-menu-item class="nav-menu-item" (click)="customDept()"><span>指定处理地</span></button>\r\n\t<mat-divider *ngIf="(current.change$ | async)?.ToRootDept.length > 0"> </mat-divider>\r\n\t<button\r\n\t\tmat-menu-item\r\n\t\tclass="nav-menu-item"\r\n\t\t*ngFor="let oneDept of (current.change$ | async)?.ToRootDept"\r\n\t\t(click)="switchDept(oneDept.Code)"\r\n\t>\r\n\t\t<span>{{ oneDept.Code }}.{{ oneDept.Name }}</span>\r\n\t</button>\r\n\t<mat-divider *ngIf="(current.change$ | async)?.NextLevelDept.length > 0"> </mat-divider>\r\n\t<button\r\n\t\tmat-menu-item\r\n\t\tclass="nav-menu-item"\r\n\t\t*ngFor="let oneDept of (current.change$ | async)?.NextLevelDept"\r\n\t\t(click)="switchDept(oneDept.Code)"\r\n\t>\r\n\t\t<span>{{ oneDept.Code }}.{{ oneDept.Name }}</span>\r\n\t</button>\r\n</mat-menu>\r\n',styles:[".nav-menu-item{font-size:14px;height:32px;line-height:32px}.max-top-menu{margin:0;height:24px;line-height:24px;padding-left:0}.max-top-menu span{width:104px;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.min-top-menu{width:80px;padding:0;text-align:center;overflow:hidden}.min-top-menu span{display:inline-block;width:60px;padding:0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]}]}],t.ctorParameters=function(){return[{type:r.MatDialog},{type:i.ElementsService},{type:i.CurrentService}]},t.propDecorators={isMinNav:[{type:n.Input}]},t}();var St=function(){function t(t,e){this.tab=t,this.routerLink=e}return t.decorators=[{type:n.Directive,args:[{selector:"mat-tab[routerLink]"}]}],t.ctorParameters=function(){return[{type:h.MatTab},{type:y.RouterLink}]},t.propDecorators={routerLinkActiveOptions:[{type:n.Input}]},t}();var Mt=function(){function t(){}return t.decorators=[{type:n.Directive,args:[{selector:"app-router-tab-item"}]}],t.propDecorators={routerLink:[{type:n.Input}],routerLinkActiveOptions:[{type:n.Input}],actives:[{type:n.Input}],disabled:[{type:n.Input,args:["disabled"]}],label:[{type:n.Input}]},t}();var Nt=function(){function t(t,e){this.router=t,this.tabs=e,this.subscription=new k.Subscription}return t.prototype.dragStart=function(t,e){this.tabBool=e,this.oldTab=this.tabs.active},t.prototype.dragEnded=function(t){this.tabBool=null},t.prototype.drop=function(t){var e=this,n=parseInt(t.previousContainer.id.replace("list-","")),i=parseInt(t.container.id.replace("list-",""));NaN!==n&&NaN!==i&&void 0!==n&&void 0!==i&&n!==i&&o.moveItemInArray(this.tabs.tabs,n,i),this.tabs.activeIndex=this.tabs.tabs.findIndex(function(t){return t===e.oldTab})},t.prototype.getAllListConnections=function(t){for(var e=[],n=0;n<this.tabs.tabs.length;n++)n!==t&&e.push("list-"+n);return e},t.prototype.ngAfterViewInit=function(){this.matTabGroup._handleClick=function(){},this.setIndex()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.getURLPath=function(t){return ot(["/"],t.root.children.primary.segments.map(function(t){return t.path}))},t.prototype.onTabsClick=function(t,e){this.tabs.activeIndex!==e&&this.router.navigateByUrl(this.tabs.tabs[e].url,{state:this.tabs.tabs[e].data()})},t.prototype.removeClick=function(t,e){return this.tabs.removeTab(e)&&this.router.navigateByUrl(this.tabs.active.url,{state:this.tabs.active.data()}),t&&t.stopPropagation?t.stopPropagation():window.event.cancelBubble=!0,!1},t.prototype.setIndex=function(){var t=this;this.routerTabs.find(function(e,n){return!!t.router.isActive(e.routerLink.urlTree,!!e.routerLinkActiveOptions&&e.routerLinkActiveOptions.exact)&&(t.tabs.activeIndex=n,!0)})},t.decorators=[{type:n.Component,args:[{selector:"app-router-tab",template:'<mat-tab-group #matTabGroup class="hide-tab-wrapper" [selectedIndex]="tabs.activeIndex">\r\n\t<mat-tab\r\n\t\t*ngFor="let tab of tabs.tabs; let index = index"\r\n\t\t[routerLink]="getURLPath(tab.url)"\r\n\t\t[queryParams]="tab.url.queryParams"\r\n\t>\r\n\t\t<ng-template mat-tab-label>\r\n\t\t\t<div\r\n\t\t\t\t[id]="\'list-\' + index"\r\n\t\t\t\tclass="example-list router-tab-link"\r\n\t\t\t\tcdkDropList\r\n\t\t\t\t(cdkDropListDropped)="drop($event)"\r\n\t\t\t\t[cdkDropListConnectedTo]="getAllListConnections(index)"\r\n\t\t\t>\r\n\t\t\t\t<a\r\n\t\t\t\t\tclass="example-box"\r\n\t\t\t\t\t(click)="onTabsClick($event, index)"\r\n\t\t\t\t\t(cdkDragStarted)="dragStart($event, index)"\r\n\t\t\t\t\t(cdkDragEnded)="dragEnded($event)"\r\n\t\t\t\t\tcdkDrag\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class="example-custom-placeholder" *cdkDragPlaceholder></span>\r\n\t\t\t\t\t<span [class.hide-tab]="index === matTabGroup.selectedIndex" class="tabspan">{{\r\n\t\t\t\t\t\ttab.titleObservable | async\r\n\t\t\t\t\t}}</span>\r\n\t\t\t\t\t<button (click)="removeClick($event, index)" mat-icon-button class="tabButton">\r\n\t\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t\tsvgIcon="close"\r\n\t\t\t\t\t\t\t[class.hide-tab]="index === matTabGroup.selectedIndex"\r\n\t\t\t\t\t\t\tclass="example-tab-icon"\r\n\t\t\t\t\t\t></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</a>\r\n\t\t\t\t<a *ngIf="tabBool === index" class="example-box drag-source" cdkDrag>\r\n\t\t\t\t\t<span class="example-custom-placeholder" *cdkDragPlaceholder></span>\r\n\t\t\t\t\t<span [class.hide-tab]="index === matTabGroup.selectedIndex" class="tabspan">{{ tab.titleObservable | async }}</span>\r\n\t\t\t\t\t<button mat-icon-button class="tabButton">\r\n\t\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t\tsvgIcon="close"\r\n\t\t\t\t\t\t\t(click)="removeClick($event, index)"\r\n\t\t\t\t\t\t\tclass="example-tab-icon"\r\n\t\t\t\t\t\t></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</a>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</mat-tab>\r\n</mat-tab-group>\r\n',encapsulation:n.ViewEncapsulation.None,styles:[".hide-tab-wrapper .mat-tab-body-wrapper{display:none!important}.mat-tab-label{height:30px!important;min-width:160px!important;line-height:30px;text-align:left;font-size:12px;display:block;opacity:1!important;padding:0!important;position:relative}.mat-tab-label .tabButton{position:absolute;right:0;top:-3px;height:30px;width:30px;line-height:30px}.mat-tab-label .tabButton .example-tab-icon{width:16px;height:16px}.router-tab-link{height:30px;min-width:160px}.example-list{background:#fff;border-radius:4px;overflow:hidden;display:block}.example-box{min-width:160px;height:30px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:content-box}.drag-source{opacity:.5}.cdk-drag-preview{width:100%;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);opacity:.5;font-size:12px}.cdk-drag-preview .mat-button-wrapper{width:16px!important;height:16px!important}.cdk-drag-preview .mat-button-wrapper .example-tab-icon{width:16px;height:16px}.cdk-drag-placeholder{opacity:0}.tabspan{padding:0 30px 0 6px}.cdk-drag-animating{transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging a{-webkit-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!important}.example-custom-placeholder{width:100%;height:100%;-webkit-transform:translateX(-100%);transform:translateX(-100%);transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1)}"]}]}],t.ctorParameters=function(){return[{type:y.Router},{type:ft}]},t.propDecorators={matTabGroup:[{type:n.ViewChild,args:["matTabGroup",{static:!0}]}],routerTabItems:[{type:n.ContentChildren,args:[Mt]}],routerTabs:[{type:n.ViewChildren,args:[St]}],active:[{type:n.Input}]},t}();var Tt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.FormsModule,a.ReactiveFormsModule,c.MatDialogModule,D.MatInputModule,S.MatFormFieldModule,s.MatButtonModule],declarations:[It],entryComponents:[It]}]}],t}(),Et=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,b.BrowserModule,w.ClipboardModule,y.RouterModule,m.MatIconModule,v.MatToolbarModule,g.MatSidenavModule,s.MatButtonModule,u.MatMenuModule,p.MatDividerModule,f.MatTreeModule,l.MatBadgeModule,a.FormsModule,h.MatTabsModule,i.CoreModule,d.MatRippleModule,x.BrowserAnimationsModule,o.DragDropModule,c.MatDialogModule,Tt],declarations:[bt,_t,Ct,Nt,Mt,St,Dt],exports:[bt,Nt,Mt,St],entryComponents:[_t]}]}],t}(),Lt=function(){function t(t){this.rele=t}return t.prototype.ngOnInit=function(){var t=this;this.rele.currentElement.subscribe(function(e){return t.element=e.element})},t.decorators=[{type:n.Component,args:[{selector:"common-page-not-found",template:"<p>{{ element?.Controller }} not found.</p>\r\n",styles:[""]}]}],t.ctorParameters=function(){return[{type:i.RouteElementService}]},t}();var Pt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[Lt],imports:[e.CommonModule],exports:[Lt]}]}],t}();var Rt=function(){function t(t,e){this.dialogRef=t,this.data=e,this.hostClass=!0}return t.prototype.onNoClick=function(){this.dialogRef.close()},t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"common-prompt-dialog",template:'{{data.title}}\n<mat-dialog-content>\n\t{{data.prompt}}\n\n\t<mat-form-field>\n\t\t<input matInput cdkFocusInitial [(ngModel)]="data.value">\n\t</mat-form-field>\n</mat-dialog-content>\n<mat-dialog-actions>\n\t<button mat-button (click)="onNoClick()">No Thanks</button>\n\t<button mat-button [mat-dialog-close]="data.value"\n\t\tcdkFocusInitial>Ok</button>\n</mat-dialog-actions>',styles:[""]}]}],t.ctorParameters=function(){return[{type:r.MatDialogRef},{type:void 0,decorators:[{type:n.Inject,args:[r.MAT_DIALOG_DATA]}]}]},t.propDecorators={hostClass:[{type:n.HostBinding,args:["class.c-prompt-dialog"]}]},t}();var zt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[Rt],imports:[e.CommonModule,r.MatDialogModule,r.MatButtonModule,r.MatFormFieldModule,r.MatInputModule,a.FormsModule],entryComponents:[Rt]}]}],t}();e.registerLocaleData(M);var Ft=function(){function t(t){[dt,ct,pt,mt,ut].forEach(function(e){t.register(e)})}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,i.CoreModule,Et,Pt,lt,zt],providers:[{provide:n.LOCALE_ID,useValue:"zh-Hans"}]}]}],t.ctorParameters=function(){return[{type:i.BillControllerService}]},t}(),Ot=[{nameSpace:"",list:["filled/action/3d_rotation.svg","filled/action/accessibility.svg","filled/action/accessible.svg","filled/action/account_balance.svg","filled/action/account_balance_wallet.svg","filled/action/account_box.svg","filled/action/account_circle.svg","filled/action/add_shopping_cart.svg","filled/action/alarm.svg","filled/action/alarm_add.svg","filled/action/alarm_off.svg","filled/action/alarm_on.svg","filled/action/all_out.svg","filled/action/android.svg","filled/action/announcement.svg","filled/action/aspect_ratio.svg","filled/action/assessment.svg","filled/action/assignment.svg","filled/action/assignment_ind.svg","filled/action/assignment_late.svg","filled/action/assignment_return.svg","filled/action/assignment_returned.svg","filled/action/assignment_turned_in.svg","filled/action/autorenew.svg","filled/action/backup.svg","filled/action/book.svg","filled/action/bookmark.svg","filled/action/bookmark_border.svg","filled/action/bug_report.svg","filled/action/build.svg","filled/action/cached.svg","filled/action/camera_enhance.svg","filled/action/card_giftcard.svg","filled/action/card_membership.svg","filled/action/card_travel.svg","filled/action/change_history.svg","filled/action/check_circle.svg","filled/action/chrome_reader_mode.svg","filled/action/class.svg","filled/action/code.svg","filled/action/compare_arrows.svg","filled/action/copyright.svg","filled/action/credit_card.svg","filled/action/dashboard.svg","filled/action/date_range.svg","filled/action/delete.svg","filled/action/delete_forever.svg","filled/action/delete_outline.svg","filled/action/description.svg","filled/action/dns.svg","filled/action/done.svg","filled/action/done_all.svg","filled/action/donut_large.svg","filled/action/donut_small.svg","filled/action/eject.svg","filled/action/euro_symbol.svg","filled/action/event.svg","filled/action/event_seat.svg","filled/action/exit_to_app.svg","filled/action/explore.svg","filled/action/extension.svg","filled/action/face.svg","filled/action/favorite.svg","filled/action/