(function(){"use strict";var e={3710:function(e,n,t){t(6992),t(8674),t(9601),t(7727),t(1539),t(4747),t(7941);var r=t(9963),o=t(2610),u=t(695),a=(t(4415),t(9337)),i=t(4239),c=t(6252);function s(e,n){var t=(0,c.up)("router-view");return(0,c.wg)(),(0,c.j4)(t)}var l=t(3744);const d={},f=(0,l.Z)(d,[["render",s]]);var m=f,p=t(1836),h=t(3577),g=["src"],v=["src"];function w(e,n,r,o,u,a){var i=(0,c.up)("el-tooltip");return"mysql"==r.databaseType.toLowerCase()?((0,c.wg)(),(0,c.j4)(i,{key:0,content:r.databaseType,placement:"left"},{default:(0,c.w5)((function(){return[(0,c._)("img",{src:t(2357),style:{"max-width":"33px","max-height":"33px"}},null,8,g)]})),_:1},8,["content"])):"postgresql"==r.databaseType.toLowerCase()?((0,c.wg)(),(0,c.j4)(i,{key:1,content:r.databaseType,placement:"left"},{default:(0,c.w5)((function(){return[(0,c._)("img",{src:t(3609),style:{"max-width":"33px","max-height":"33px"}},null,8,v)]})),_:1},8,["content"])):((0,c.wg)(),(0,c.iD)(c.HY,{key:2},[(0,c.Uk)((0,h.zw)(r.databaseType),1)],64))}var b={props:{databaseType:String}};const y=(0,l.Z)(b,[["render",w]]);var k=y,_=(0,r.ri)(m);Object.keys(u).forEach((function(e){_.component(e,u[e])})),_.component("database-icon",k),_.directive("require-roles",{mounted:function(e,n){var t=n.value;p.E.hasAnyRoles(t)||e.parentNode&&e.parentNode.removeChild(e)}}),_.directive("select-more",{updated:function(e,n){var t=e.querySelector(".select-trigger"),r=t.getAttribute("aria-describedby"),o=document.getElementById(r),u=o.querySelector(".el-scrollbar .el-select-dropdown__wrap");u.addEventListener("scroll",(function(){var e=this.scrollHeight-this.scrollTop-1<=this.clientHeight;e&&n.value()}))}}),_.use(i.Z),_.use(o.Z),_.use(a.Z),_.mount("#app")},9337:function(e,n,t){t.d(n,{Z:function(){return $}});t(1539),t(8783),t(3948);var r=t(2119),o=t(6252);function u(e,n,t,r,u,a){var i=(0,o.up)("AppNav"),c=(0,o.up)("el-aside"),s=(0,o.up)("Breadcrumb"),l=(0,o.up)("Avatar"),d=(0,o.up)("el-header"),f=(0,o.up)("router-view"),m=(0,o.up)("el-main"),p=(0,o.up)("el-container");return(0,o.wg)(),(0,o.j4)(p,{class:"databasir"},{default:(0,o.w5)((function(){return[(0,o.Wm)(c,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(i,{class:"databasir-nav"})]})),_:1}),(0,o.Wm)(d,{class:"databasir-main-header"},{default:(0,o.w5)((function(){return[(0,o.Wm)(s),(0,o.Wm)(l)]})),_:1}),(0,o.Wm)(m,{class:"databasir-main"},{default:(0,o.w5)((function(){return[(0,o.Wm)(p,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(m,{class:"databasir-main-content"},{default:(0,o.w5)((function(){return[(0,o.Wm)(f)]})),_:1})]})),_:1})]})),_:1})]})),_:1})}var a=t(3577),i=(0,o._)("span",null,"Databasir",-1);function c(e,n,t,r,u,c){var s=(0,o.up)("expand"),l=(0,o.up)("el-icon"),d=(0,o.up)("el-menu-item"),f=(0,o.up)("home-filled"),m=(0,o.up)("el-sub-menu"),p=(0,o.up)("el-menu");return(0,o.wg)(),(0,o.j4)(p,{router:"",collapse:r.isCollapse,mode:"vertical",class:"left-menu"},{default:(0,o.w5)((function(){return[r.isCollapse?((0,o.wg)(),(0,o.j4)(d,{key:0,onClick:r.expandMenu,index:"#"},{default:(0,o.w5)((function(){return[(0,o.Wm)(l,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(s)]})),_:1})]})),_:1},8,["onClick"])):(0,o.kq)("",!0),(0,o.Wm)(d,{index:"/"},{title:(0,o.w5)((function(){return[i]})),default:(0,o.w5)((function(){return[(0,o.Wm)(l,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(f)]})),_:1})]})),_:1}),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(r.routes,(function(e,n){return(0,o.wg)(),(0,o.iD)(o.HY,{key:n},[r.isShowMenu(e)&&e.children.length>0&&e.children.some((function(e){return!e.hidden}))?((0,o.wg)(),(0,o.j4)(m,{key:0,index:e.path},{title:(0,o.w5)((function(){return[(0,o.Wm)(l,null,{default:(0,o.w5)((function(){return[((0,o.wg)(),(0,o.j4)((0,o.LL)(e.icon)))]})),_:2},1024),(0,o._)("span",null,(0,a.zw)(e.meta.nav),1)]})),default:(0,o.w5)((function(){return[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.children,(function(t,r){return(0,o.wg)(),(0,o.iD)(o.HY,{key:n+"-"+r},[t.hidden?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(d,{key:0,index:e.path+"/"+t.path},{title:(0,o.w5)((function(){return[(0,o._)("span",null,(0,a.zw)(t.meta.nav),1)]})),default:(0,o.w5)((function(){return[t.icon?((0,o.wg)(),(0,o.j4)(l,{key:0},{default:(0,o.w5)((function(){return[((0,o.wg)(),(0,o.j4)((0,o.LL)(t.icon)))]})),_:2},1024)):(0,o.kq)("",!0)]})),_:2},1032,["index"]))],64)})),128))]})),_:2},1032,["index"])):r.isShowMenu(e)?((0,o.wg)(),(0,o.j4)(d,{key:1,index:e.path},{title:(0,o.w5)((function(){return[(0,o._)("span",null,(0,a.zw)(e.meta.nav),1)]})),default:(0,o.w5)((function(){return[(0,o.Wm)(l,null,{default:(0,o.w5)((function(){return[((0,o.wg)(),(0,o.j4)((0,o.LL)(e.icon)))]})),_:2},1024)]})),_:2},1032,["index"])):(0,o.kq)("",!0)],64)})),128))]})),_:1},8,["collapse"])}var s=t(2262),l=t(1836),d=t(4239),f={setup:function(){var e=(0,s.Fl)((function(){return d.Z.state.menu.isCollapse})),n=(0,r.tv)(),t=n.options.routes,o=function(e){if(e.hidden)return!1;if(e.meta.requireAnyRoles&&e.meta.requireAnyRoles.length>0){var n=l.E.hasAnyRoles(e.meta.requireAnyRoles);if(!n)return!1}return!0},u=function(){d.Z.commit("expandMenu")};return{isCollapse:e,isShowMenu:o,expandMenu:u,routes:t}}},m=t(3744);const p=(0,m.Z)(f,[["render",c]]);var h=p;t(8309);function g(e,n,t,r,u,i){var c=(0,o.up)("fold"),s=(0,o.up)("el-icon"),l=(0,o.up)("el-link"),d=(0,o.up)("el-breadcrumb-item"),f=(0,o.up)("el-breadcrumb");return(0,o.wg)(),(0,o.j4)(f,{separator:"/"},{default:(0,o.w5)((function(){return[i.menuIsCollapse?(0,o.kq)("",!0):((0,o.wg)(),(0,o.j4)(d,{key:0},{default:(0,o.w5)((function(){return[(0,o.Wm)(l,{onClick:n[0]||(n[0]=function(e){return i.onFoldMenu()}),underline:!1},{default:(0,o.w5)((function(){return[(0,o.Wm)(s,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(c)]})),_:1})]})),_:1})]})),_:1})),((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(i.breadcrumbs,(function(e,n){return(0,o.wg)(),(0,o.j4)(d,{key:n,to:e.to},{default:(0,o.w5)((function(){return[(0,o.Uk)((0,a.zw)(e.name),1)]})),_:2},1032,["to"])})),128))]})),_:1})}var v={data:function(){},computed:{breadcrumbs:function(){return"function"===typeof this.$route.meta.breadcrumb?this.$route.meta.breadcrumb(this.$route,this.$store.state):[]},menuIsCollapse:function(){return this.$store.state.menu.isCollapse}},methods:{onFoldMenu:function(){this.$store.commit("foldMenu")}}};const w=(0,m.Z)(v,[["render",g]]);var b=w,y=(0,o.Uk)("个人中心"),k=(0,o.Uk)("注销登陆");function _(e,n,t,r,u,i){var c=(0,o.up)("el-avatar"),s=(0,o.up)("el-dropdown-item"),l=(0,o.up)("el-dropdown-menu"),d=(0,o.up)("el-dropdown");return(0,o.wg)(),(0,o.j4)(d,null,{dropdown:(0,o.w5)((function(){return[(0,o.Wm)(l,null,{default:(0,o.w5)((function(){return[(0,o.Wm)(s,null,{default:(0,o.w5)((function(){return[(0,o.Uk)((0,a.zw)(i.userNickname),1)]})),_:1}),(0,o.Wm)(s,{icon:"user",divided:"",onClick:n[0]||(n[0]=function(e){return i.toProfilePage()})},{default:(0,o.w5)((function(){return[y]})),_:1}),(0,o.Wm)(s,{icon:"back",onClick:n[1]||(n[1]=function(e){return i.onLogout()})},{default:(0,o.w5)((function(){return[k]})),_:1})]})),_:1})]})),default:(0,o.w5)((function(){return[(0,o.Wm)(c,{size:36,src:i.avatarUrl,icon:"avatar"},null,8,["src"])]})),_:1})}var j={computed:{userNickname:function(){return this.$store.state.user.nickname},avatarUrl:function(){return this.$store.state.user.avatar}},methods:{onLogout:function(){l.E.removeUserLoginData(),this.$router.push({path:"/login"})},toProfilePage:function(){this.$router.push({path:"/profile"})}}};const S=(0,m.Z)(j,[["render",_]]);var A=S,L={components:{AppNav:h,Breadcrumb:b,Avatar:A}};const T=(0,m.Z)(L,[["render",u]]);var q=T;function x(){return{name:"首页",to:{path:"/"}}}function C(){return{name:"项目中心",to:{name:"groupListPage"}}}function N(e){var n="项目组";return e.query.groupName&&(n=e.query.groupName),{name:n,to:{path:"/groups/"+e.params.groupId}}}function E(e){var n="项目文档";e.query.projectName&&(n=e.query.projectName);var t=e.params.projectId,r=e.params.groupId;return{name:n,to:{path:"/groups/"+r+"/projects/"+t+"/documents",query:{projectName:n}}}}function P(){return{name:"用户列表",to:{path:"/users"}}}function I(){return{name:"个人中心",to:{path:"/profile"}}}function O(){return{name:"邮箱设置",to:{path:"/settings/sysEmail"}}}function W(){return{name:"操作日志",to:{path:"/settings/sysLog"}}}function D(){return{name:"登录设置",to:{path:"/settings/sysOauth2"}}}var M={index:function(){return[x()]},groupList:function(){return[x(),C()]},groupDashboard:function(e,n){return[x(),C(),N(e,n)]},groupProjectDocument:function(e,n){return[x(),C(),N(e,n),E(e)]},userProfile:function(){return[x(),I()]},userList:function(){return[x(),P()]},sysEmailEdit:function(){return[x(),O()]},sysLog:function(){return[x(),W()]},sysOauth2:function(){return[x(),D()]}},U=M,Z=[{path:"/login",component:function(){return Promise.all([t.e(269),t.e(139)]).then(t.bind(t,1139))},hidden:!0,meta:{requireAuth:!1}},{path:"/login/oauth2/:id",component:function(){return Promise.all([t.e(269),t.e(865)]).then(t.bind(t,8865))},hidden:!0,props:!0,meta:{requireAuth:!1}},{path:"/",hidden:!0,component:q,children:[{path:"",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(924),t.e(787)]).then(t.bind(t,3787))},meta:{breadcrumb:U.groupList}}]},{path:"/groups",icon:"Collection",component:q,meta:{nav:"项目中心"},children:[{path:"",name:"groupListPage",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(924),t.e(787)]).then(t.bind(t,3787))},meta:{breadcrumb:U.groupList}},{path:":groupId",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(924),t.e(713)]).then(t.bind(t,2713))},meta:{breadcrumb:U.groupDashboard}},{path:":groupId/projects/:projectId/documents",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(334)]).then(t.bind(t,8334))},meta:{breadcrumb:U.groupProjectDocument}}]},{path:"/users",icon:"List",component:q,meta:{nav:"用户中心",requireAnyRoles:["SYS_OWNER"]},children:[{path:"",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(719)]).then(t.bind(t,9719))},meta:{breadcrumb:U.userList}}]},{path:"/profile",icon:"User",component:q,meta:{nav:"个人中心",breadcrumb:U.userProfile},children:[{path:"",hidden:!0,component:function(){return Promise.all([t.e(269),t.e(469)]).then(t.bind(t,6469))}}]},{path:"/settings",icon:"Setting",component:q,meta:{nav:"系统中心",requireAnyRoles:["SYS_OWNER"]},children:[{path:"sysEmail",icon:"Notification",component:function(){return Promise.all([t.e(269),t.e(243)]).then(t.bind(t,6243))},meta:{nav:"邮箱设置",breadcrumb:U.sysEmailEdit}},{path:"sysLog",icon:"Document",component:function(){return Promise.all([t.e(269),t.e(700)]).then(t.bind(t,8700))},meta:{nav:"操作日志",breadcrumb:U.sysLog}},{path:"sysOauth2",icon:"Connection",component:function(){return Promise.all([t.e(269),t.e(754)]).then(t.bind(t,7754))},meta:{nav:"登陆设置",breadcrumb:U.sysOauth2}},{path:"sysKey",icon:"Key",hidden:"true",component:q,meta:{nav:"系统秘钥",breadcrumb:U.sysKeyEdit}}]}],R=(0,r.p7)({history:(0,r.PO)(),routes:Z});R.beforeEach((function(e,n,t){0==e.meta.requireAuth?"/login"==e.path&&l.r.hasAccessToken()?t(n):t():l.r.hasAccessToken()?t():t({path:"/login"})})),R.beforeEach((function(e,n,t){!e.query.groupName&&n.query.groupName&&(e.query.groupName=n.query.groupName),!e.query.projectName&&n.query.projectName&&(e.query.projectName=n.query.projectName),t()}));var $=R},4239:function(e,n,t){var r=t(8637),o=t(1836),u=(0,r.MT)({state:function(){var e={user:{nickname:null,usernmae:null,email:null,avatar:null},groupListActiveTab:null,menu:{isCollapse:!0}},n=o.E.loadUserLoginData();return n&&(e.user.nickname=n.nickname,e.user.usernmae=n.usernmae,e.user.email=n.email,e.user.avatar=n.avatar),e},mutations:{userUpdate:function(e,n){n.nickname&&(e.user.nickname=n.nickname),n.usernmae&&(e.user.usernmae=n.usernmae),n.email&&(e.user.email=n.email),n.avatar&&(e.user.avatar=n.avatar)},foldMenu:function(e){e.menu.isCollapse=!0},expandMenu:function(e){e.menu.isCollapse=!1},switchGroupListActiveTab:function(e,n){n&&(e.groupListActiveTab=n)}}});n["Z"]=u},1836:function(e,n,t){t.d(n,{r:function(){return a},E:function(){return i}});t(8862),t(1539),t(1249);var r="accessToken",o="accessTokenExpireAt",u="userLoginData",a={hasAccessToken:function(){var e=this.loadAccessToken();return e},hasValidAccessToken:function(){var e=this.loadAccessToken(),n=window.localStorage.getItem(o);return e&&n?n>(new Date).getTime():(console.log("warn: not found accessToken and expireAt key"),!1)},saveAccessToken:function(e,n){window.localStorage.setItem(r,e),window.localStorage.setItem(o,n)},loadAccessToken:function(){var e=window.localStorage.getItem(r);return e||null}},i={saveUserLoginData:function(e){window.localStorage.setItem(r,e.accessToken),window.localStorage.setItem(o,e.accessTokenExpireAt),window.localStorage.setItem(u,JSON.stringify(e))},removeUserLoginData:function(){window.localStorage.removeItem(u),window.localStorage.removeItem(r),window.localStorage.removeItem(o)},loadUserLoginData:function(){if(!window.localStorage.getItem(u))return null;var e=window.localStorage.getItem(u);return JSON.parse(e)},hasAnyRoles:function(e){var n=window.localStorage.getItem(u);if(null==n)return!1;var t=JSON.parse(n);return t.roles.map((function(e){return e.groupId?e.role+"?groupId="+e.groupId:e.role})).some((function(n){return e.some((function(e){return e==n}))}))},getRefreshToken:function(){var e=window.localStorage.getItem(u);if(null==e)return null;var n=JSON.parse(e);return n.refreshToken}}},2357:function(e,n,t){e.exports=t.p+"img/MySQL.c8f47618.svg"},3609:function(e,n,t){e.exports=t.p+"img/PostgreSQL.6e3d3a5e.svg"}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var u=n[r]={id:r,loaded:!1,exports:{}};return e[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}t.m=e,function(){var e=[];t.O=function(n,r,o,u){if(!r){var a=1/0;for(l=0;l=u)&&Object.keys(t.O).every((function(e){return t.O[e](r[c])}))?r.splice(c--,1):(i=!1,u0&&e[l-1][2]>u;l--)e[l]=e[l-1];e[l]=[r,o,u]}}(),function(){t.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(n,{a:n}),n}}(),function(){t.d=function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})}}(),function(){t.f={},t.e=function(e){return Promise.all(Object.keys(t.f).reduce((function(n,r){return t.f[r](e,n),n}),[]))}}(),function(){t.u=function(e){return"js/"+e+"-legacy."+{139:"a43600d3",243:"30b5fe0c",269:"8027e1e4",334:"237221fd",469:"3e02203b",700:"c1c436e7",713:"468a031c",719:"85eb5e28",754:"2b22ae65",787:"5f4f9e1f",865:"fc2fd7b3",924:"804cf0e0"}[e]+".js"}}(),function(){t.miniCssF=function(e){return"css/"+e+"."+{139:"a7dec339",334:"1dda4c12",713:"82a2f213",787:"356dcf0b",865:"7df1e56e"}[e]+".css"}}(),function(){t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}(),function(){var e={},n="databasir-frontend:";t.l=function(r,o,u,a){if(e[r])e[r].push(o);else{var i,c;if(void 0!==u)for(var s=document.getElementsByTagName("script"),l=0;l