w-web-sso
Version:
A web service for SSO.
2 lines • 126 kB
JavaScript
(function(){var e={477:function(){},7061:function(e,t,i){"use strict";var n={};i.r(n),i.d(n,{UpdateData:function(){return Mt},UpdateHeightApp:function(){return Wt},UpdateHeightAppEff:function(){return Pt},UpdateHeightToolbar:function(){return zt},UpdateKpText:function(){return Bt},UpdateLang:function(){return Ht},UpdateLoading:function(){return Lt},UpdateMenu:function(){return Ft},UpdateSyncState:function(){return Dt},UpdateTableData:function(){return Yt},UpdateUserSelf:function(){return Kt},UpdateUserToken:function(){return Ot},UpdateViewState:function(){return Nt},UpdateWebInfor:function(){return Ut}});var r={};i.r(r);var o={};i.r(o);var a={};i.r(a),i.d(a,{checkUserAdmin:function(){return hn},checkUserBasic:function(){return fn},getIsActive:function(){return mn},getIsAdmin:function(){return gn},getIsBlocked:function(){return un},getIsEnded:function(){return pn},getIsExpired:function(){return ln},getIsVerified:function(){return dn},getNameNew:function(){return cn}});var s=i(5471),c=i(7500),d=i(1254),l=i(7738),u=i(7979),p=i(889),g=i(355),m=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],on:{domresize:e.resize}},[e.autoLogining?t("div",{staticStyle:{position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center"}},[t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"30px",height:"30px",viewBox:"0 0 24 24"}},[t("rect",{attrs:{width:"9",height:"9",x:"1.5",y:"1.5",fill:"currentColor",rx:"1"}},[t("animate",{attrs:{id:"svgSpinnersBlocksScale0",attributeName:"x",begin:"0;svgSpinnersBlocksScale1.end+0.15s",dur:"0.6s",keyTimes:"0;.2;1",values:"1.5;.5;1.5"}}),t("animate",{attrs:{attributeName:"y",begin:"0;svgSpinnersBlocksScale1.end+0.15s",dur:"0.6s",keyTimes:"0;.2;1",values:"1.5;.5;1.5"}}),t("animate",{attrs:{attributeName:"width",begin:"0;svgSpinnersBlocksScale1.end+0.15s",dur:"0.6s",keyTimes:"0;.2;1",values:"9;11;9"}}),t("animate",{attrs:{attributeName:"height",begin:"0;svgSpinnersBlocksScale1.end+0.15s",dur:"0.6s",keyTimes:"0;.2;1",values:"9;11;9"}})]),t("rect",{attrs:{width:"9",height:"9",x:"13.5",y:"1.5",fill:"currentColor",rx:"1"}},[t("animate",{attrs:{attributeName:"x",begin:"svgSpinnersBlocksScale0.begin+0.15s",dur:"0.6s",keyTimes:"0;.2;1",values:"13.5;12.5;13.5"}}),t("animate",{attrs:{attributeName:"y",begin:"svgSpinnersBlocksScale0.begin+0.15s",dur:"0.6s",keyTimes:"0;.2;1",values:"1.5;.5;1.5"}}),t("animate",{attrs:{attributeName:"width",begin:"svgSpinnersBlocksScale0.begin+0.15s",dur:"0.6s",keyTimes:"0;.2;1",values:"9;11;9"}}),t("animate",{attrs:{attributeName:"height",begin:"svgSpinnersBlocksScale0.begin+0.15s",dur:"0.6s",keyTimes:"0;.2;1",values:"9;11;9"}})]),t("rect",{attrs:{width:"9",height:"9",x:"13.5",y:"13.5",fill:"currentColor",rx:"1"}},[t("animate",{attrs:{attributeName:"x",begin:"svgSpinnersBlocksScale0.begin+0.3s",dur:"0.6s",keyTimes:"0;.2;1",values:"13.5;12.5;13.5"}}),t("animate",{attrs:{attributeName:"y",begin:"svgSpinnersBlocksScale0.begin+0.3s",dur:"0.6s",keyTimes:"0;.2;1",values:"13.5;12.5;13.5"}}),t("animate",{attrs:{attributeName:"width",begin:"svgSpinnersBlocksScale0.begin+0.3s",dur:"0.6s",keyTimes:"0;.2;1",values:"9;11;9"}}),t("animate",{attrs:{attributeName:"height",begin:"svgSpinnersBlocksScale0.begin+0.3s",dur:"0.6s",keyTimes:"0;.2;1",values:"9;11;9"}})]),t("rect",{attrs:{width:"9",height:"9",x:"1.5",y:"13.5",fill:"currentColor",rx:"1"}},[t("animate",{attrs:{id:"svgSpinnersBlocksScale1",attributeName:"x",begin:"svgSpinnersBlocksScale0.begin+0.45s",dur:"0.6s",keyTimes:"0;.2;1",values:"1.5;.5;1.5"}}),t("animate",{attrs:{attributeName:"y",begin:"svgSpinnersBlocksScale0.begin+0.45s",dur:"0.6s",keyTimes:"0;.2;1",values:"13.5;12.5;13.5"}}),t("animate",{attrs:{attributeName:"width",begin:"svgSpinnersBlocksScale0.begin+0.45s",dur:"0.6s",keyTimes:"0;.2;1",values:"9;11;9"}}),t("animate",{attrs:{attributeName:"height",begin:"svgSpinnersBlocksScale0.begin+0.45s",dur:"0.6s",keyTimes:"0;.2;1",values:"9;11;9"}})])])]):["login"===e.viewState?t("PageLogin"):e._e(),"backstage"===e.viewState?t("Layout"):e._e()],t("LoadingWinBar"),t("CheckYesNo"),t("CheckYes")],2)},f=[],h=function(){var e=this,t=e._self._c;return t("WDialog",{attrs:{show:e.loading,maxWidth:e.dialogWidth},on:{"update:show":function(t){e.loading=t},resize:e.resizeDialog},scopedSlots:e._u([{key:"panel",fn:function(){return[t("div",{style:"padding:".concat(e.barPadding-5,"px ").concat(e.barPadding,"px ").concat(e.barPadding,"px ").concat(e.barPadding,"px;")},[t("div",{staticStyle:{"padding-bottom":"3px","font-size":"0.9rem",color:"#666"}},[""!==e.msg?t("span",[e._v(e._s(e.msg))]):t("span",[e._v(e._s(e.$t("processing")))])]),t("WProgressBar",{style:"width:".concat(e.barWidth,"px;"),attrs:{height:3,enableContinuous:!0,progColor:"deep-purple lighten-1",progBackgroundColor:"deep-purple lighten-4"}})],1)]},proxy:!0}])})},v=[],y=i(5622),b=i(6630),x={components:{WDialog:y.A,WProgressBar:b.A},props:{},data:function(){return{dialogWidth:0,dialogWidthMax:600,barPadding:20,barWidth:0,msg:""}},mounted:function(){var e=this;s.Ay.prototype.$dg.setLoadingWinBarMessage=e.setMessage},computed:{loading:function(){var e=this,t=(0,c.A)(e,"$store.state.loading");return t}},methods:{setMessage:function(e){this.msg=e},resizeDialog:function(e){var t=this,i=window.innerWidth,n=i-2*t.barPadding;n=Math.max(n,0),n=Math.min(n,t.dialogWidthMax),t.dialogWidth=n;var r=n-2*t.barPadding;r=Math.max(r,0),t.barWidth=r}}},A=x,w=i(1656),k=(0,w.A)(A,h,v,!1,null,"9bcb4aee",null),I=k.exports,C=function(){var e=this,t=e._self._c;return t("WConfirm",{attrs:{show:e.bShow,title:e.$t("systemMessage"),content:e.content,_contentColor:"white",_contentIconColor:"white",_contentBackgroundColor:"orange lighten-5",_titleColor:"white",headerBackgroundColor:"grey lighten-3",noBtnText:e.$t("no"),yesBtnText:e.$t("yes")},on:{"update:show":function(t){e.bShow=t},"click-no":function(t){return e.clickBtn(!1)},"click-yes":function(t){return e.clickBtn(!0)}}})},S=[],$=i(2942),_=i(1844),T={components:{WConfirm:_.A},props:{},data:function(){return{bShow:!1,pm:null,content:""}},mounted:function(){var e=this;s.Ay.prototype.$dg.showCheckYesNo=e.show},computed:{},methods:{show:function(e){var t=this;return t.pm=(0,$.A)(),t.content=e,t.bShow=!0,t.pm},clickBtn:function(e){var t=this;e?t.pm.resolve():t.pm.reject("close"),t.bShow=!1}}},E=T,U=(0,w.A)(E,C,S,!1,null,"cfad0048",null),H=U.exports,B=function(){var e=this,t=e._self._c;return t("WConfirm",{attrs:{show:e.bShow,title:e.$t("systemMessage"),content:e.content,_contentColor:"white",_contentIconColor:"white",_contentBackgroundColor:"orange lighten-5",headerBackgroundColor:"grey lighten-3",hasNoBtn:!1,yesBtnText:e.$t("ok")},on:{"update:show":function(t){e.bShow=t},"click-yes":function(t){return e.clickUnit()}}})},D=[],L={components:{WConfirm:_.A},props:{},data:function(){return{bShow:!1,pm:null,content:""}},mounted:function(){var e=this;s.Ay.prototype.$dg.showCheckYes=e.show},computed:{},methods:{show:function(e){var t=this;return t.pm=(0,$.A)(),t.content=e,t.bShow=!0,t.pm},clickUnit:function(){var e=this;e.pm.resolve(),e.bShow=!1}}},N=L,Y=(0,w.A)(N,B,D,!1,null,"9943c370",null),M=Y.exports,W=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{position:"relative",width:"100vw",height:"100svh"}},[t("div",{style:"\n position:absolute; top:0px; left:0px; width:100%; height:100%; display:flex; align-items:center; justify-content:center;\n background-image: linear-gradient(-225deg, ".concat(e.c1," 0%, ").concat(e.c2," 50%, ").concat(e.c3," 100%);\n ")},[t("div",{},[t("div",{style:"padding-top:".concat(e.logoSize/2,"px;")}),t("div",{style:"\n position:relative;\n width:".concat(e.contentWidth,"px; padding:10px; border-radius:30px; background:").concat(e.c4,";\n box-shadow: rgb(0 0 0 / 2%) 2.76726px 2.76726px 2.21381px 0px, rgb(0 0 0 / 3%) 6.6501px 6.6501px 5.32008px 0px, rgb(0 0 0 / 4%) 12.5216px 12.5216px 10.0172px 0px, rgb(0 0 0 / 4%) 22.3363px 22.3363px 17.869px 0px, rgb(0 0 0 / 5%) 41.7776px 41.7776px 33.4221px 0px, rgb(0 0 0 / 7%) 100px 100px 80px 0px;\n ")},[t("div",{style:"position:absolute; top:0px; left:50%; transform:translateX(-50%) translateY(-50%); padding:15px 15px 10px 15px; border-radius:50%; background:".concat(e.c5,";")},[t("img",{attrs:{width:e.logoSize,height:e.logoSize,src:e.webLogo}})]),t("div",{style:"padding:".concat(e.logoSize/2+e.contentPadding,"px ").concat(e.contentPadding,"px ").concat(e.contentPadding,"px ").concat(e.contentPadding,"px;")},[t("div",{staticStyle:{"padding-bottom":"20px","text-align":"center","font-size":"1.3rem"}},[e._v(" "+e._s(e.webName)+" ")]),t("div",{staticStyle:{display:"flex","align-items":"stretch"}},[t("div",{staticStyle:{display:"flex","align-items":"center",padding:"0px 10px",background:"rgba(34, 44, 77, 0.9)"}},[t("WIcon",{attrs:{icon:"mdi-account",color:"#ddd",colorHover:"#eee",size:24}})],1),t("div",{staticStyle:{width:"100%",padding:"5px 10px",background:"rgba(34, 44, 77, 0.8)"}},[t("div",{style:"font-size:0.8rem; color:#eee;"},[e._v(" "+e._s(e.$t("account"))+" ")]),t("WText",{attrs:{textColor:"#fff",bottomLineBorderColor:"#b6b6b6",bottomLineBorderColorHover:"#ccc",bottomLineBorderColorFocus:"#ddd"},on:{enter:e.login},model:{value:e.account,callback:function(t){e.account=t},expression:"account"}})],1)]),t("div",{staticStyle:{"padding-top":"10px"}}),t("div",{staticStyle:{display:"flex","align-items":"stretch"}},[t("div",{staticStyle:{display:"flex","align-items":"center",padding:"0px 10px",background:"rgba(34, 44, 77, 0.9)"}},[t("WIcon",{attrs:{icon:"mdi-lock",color:"#ddd",colorHover:"#eee",size:24}})],1),t("div",{staticStyle:{width:"100%",padding:"5px 10px",background:"rgba(34, 44, 77, 0.8)"}},[t("div",{style:"font-size:0.8rem; color:#eee;"},[e._v(" "+e._s(e.$t("password"))+" ")]),t("WText",{attrs:{textColor:"#fff",bottomLineBorderColor:"#b6b6b6",bottomLineBorderColorHover:"#ccc",bottomLineBorderColorFocus:"#ddd",rightIcon:e.showPassword?"mdi-eye":"mdi-eye-off",rightIconColor:"#ddd",rightIconColorHover:"#eee",rightIconColorFocus:"#ddd",rightIconTooltip:e.showPassword?e.$t("toggleToHidePassword"):e.$t("toggleToShowPassword"),password:!e.showPassword},on:{"click-right":function(t){e.showPassword=!e.showPassword},enter:e.login},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}})],1)]),t("div",{staticStyle:{"padding-top":"30px"}}),t("div",{staticStyle:{padding:"5px 0px","text-align":"center"}},[t("WButtonChip",{style:"opacity:".concat(e.hasAcPw?1:.5,";"),attrs:{text:e.$t("login"),textFontSize:"1.0rem",paddingStyle:{v:8,h:130},backgroundColor:"rgba(255,255,255,0.5)",backgroundColorHover:"rgba(255,255,255,0.7)",_shadow:"false",editable:e.hasAcPw},on:{click:e.login}})],1)])])])]),t("div",{staticStyle:{position:"absolute",top:"10px",right:"10px"}},[e.showLangSelect?t("div",{staticStyle:{"white-space":"nowrap"}},[t("WTextSelect",{staticStyle:{width:"100px"},attrs:{items:e.keysLang,value:e.lang},on:{input:e.toggleLang},scopedSlots:e._u([{key:"select",fn:function(t){return[e._v(" "+e._s(e.getLangText(t.item))+" ")]}},{key:"item",fn:function(t){return[e._v(" "+e._s(e.getLangText(t.item))+" ")]}}],null,!1,2218956916)})],1):e._e()])])},P=[],z=i(5021),F=i(293),O=i(130),K=i(9461),V=i(1945),R={components:{WIcon:F.A,WText:O.A,WTextSelect:K.A,WButtonChip:V.A},props:{},data:function(){return{firstSetting:!0,showLangSelect:!1,keysLang:["eng","cht"],kpLangSelect:{eng:"English",cht:"中文"},logoSize:120,contentWidth:380,contentPadding:30,account:"",showPassword:!1,password:""}},mounted:function(){var e=this;if(e.firstSetting){var t=(0,c.A)(e,"webInfor.showLanguage","");e.showLangSelect="y"===t;var i=(0,c.A)(e,"webInfor.language","");e.$ui.setLang(i,"layout mounted"),e.firstSetting=!1}},computed:{webName:{get:function(){var e=this,t=e.$t("webName","");return(0,z.A)(t)||(t=e.$t("waitingData","")),document.title=t,t}},webInfor:function(){var e=(0,c.A)(this,"$store.state.webInfor");return e},webLogo:function(){var e=this;return(0,c.A)(e,"webInfor.webLogo","")},webBackgoundGradientColors:function(){var e=this;return(0,c.A)(e,"webInfor.webBackgoundGradientColors",[])},c1:function(){var e=this,t=(0,c.A)(e,"webBackgoundGradientColors.0","#fff");return t},c2:function(){var e=this,t=(0,c.A)(e,"webBackgoundGradientColors.1","#fff");return t},c3:function(){var e=this,t=(0,c.A)(e,"webBackgoundGradientColors.2","#fff");return t},c4:function(){var e=this,t=(0,c.A)(e,"webBackgoundGradientColors.3","#fff");return t},c5:function(){var e=this,t=(0,c.A)(e,"webBackgoundGradientColors.4","#fff");return t},webKey:function(){var e=this;return(0,c.A)(e,"$store.state.webInfor.webKey","")},lang:function(){var e=this;return(0,c.A)(e,"$store.state.lang","")},hasAcPw:function(){var e=this;return(0,z.A)(e.account)&&(0,z.A)(e.password)}},methods:{getLangText:function(e){var t=this,i=(0,c.A)(t,"kpLangSelect.".concat(e),"");return i},toggleLang:function(e){var t=this;t.$ui.setLang(e,"toggle")},login:function(){var e=this,t=e.$ui.getUrlView();e.$ui.login(e.account,e.password,{useRedir:"login"===t}).then((function(){e.$ui.updateViewState(t),console.log("login, goto view[".concat(t,"] page"))})).catch((function(t){e.$ui.updateViewState("login"),console.log("login err[".concat(t,"], goto view['login'] page"))}))}}},G=R,j=(0,w.A)(G,W,P,!1,null,"48e938f1",null),q=j.exports,Z=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{height:"100svh",background:"#f5f5f5"}},[t("div",{style:"height:".concat(e.heightToolbar,"px; overflow-y:hidden; padding:0px 10px; background:#fff; border-bottom:1px solid #ccc; display:flex; align-items:center;")},[t("div",{staticStyle:{"padding-left":"5px"}},[t("div",{staticStyle:{display:"flex","align-items":"center"}},[e.webLogo?t("div",{staticStyle:{"padding-right":"10px",display:"flex","align-items":"center"}},[t("img",{staticStyle:{width:"36px","min-width":"36px",height:"36px"},attrs:{src:e.webLogo}})]):e._e(),t("div",{staticStyle:{"white-space":"nowrap"}},[t("div",{staticStyle:{"font-size":"1.2rem",color:"#000"}},[e._v(e._s(e.webName))]),t("div",{staticStyle:{"font-size":"0.8rem",color:"#666"}},[e._v(e._s(e.$t("webDescription")))])])])]),t("div",{staticStyle:{width:"100%"}}),e.showLangSelect?t("div",{staticStyle:{"padding-right":"10px","white-space":"nowrap"}},[t("WTextSelect",{staticStyle:{width:"100px"},attrs:{items:e.keysLang,value:e.lang},on:{input:e.toggleLang},scopedSlots:e._u([{key:"select",fn:function(t){return[e._v(" "+e._s(e.getLangText(t.item))+" ")]}},{key:"item",fn:function(t){return[e._v(" "+e._s(e.getLangText(t.item))+" ")]}}],null,!1,2218956916)})],1):e._e(),t("div",{staticStyle:{"padding-right":"10px",display:"flex","align-items":"center"}},[t("WPopup",{attrs:{isolated:!0,_show:"",_hide:""},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("div",{staticStyle:{display:"flex","align-items":"center","white-space":"nowrap","user-select":"none",cursor:"pointer"}},[t("div",{staticStyle:{"padding-top":"2px"}},[t("WIcon",{attrs:{icon:e.mdiAccountCircleOutline,size:20}})],1),t("div",{staticStyle:{"padding-left":"5px","font-size":"0.85rem"}},[e._v(" "+e._s(e.userName)+" ")])])]},proxy:!0},{key:"content",fn:function(){return[t("div",{staticStyle:{padding:"10px"}},[t("div",{staticStyle:{display:"flex","align-items":"center","white-space":"nowrap","user-select":"none",cursor:"pointer"},on:{click:e.logout}},[t("div",{staticStyle:{"padding-top":"2px"}},[t("WIcon",{attrs:{icon:e.mdiLogoutVariant,size:18}})],1),t("div",{staticStyle:{"padding-left":"5px","font-size":"0.8rem"}},[e._v(" "+e._s(e.$t("logout"))+" ")])])])]},proxy:!0}])})],1)]),t("div",{style:"height:calc( 100% - ".concat(e.heightToolbar,"px );")},[t("LayoutContent")],1)])},Q=[],J=i(9165),X=i(1912),ee=i(7193),te=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{height:"100%",width:"100%"},on:{domresize:e.resize}},[e.syncState?[t("WDrawer",{style:"height:".concat(e.panelHeight,"px; width:100%;"),attrs:{drawerWidth:e.drawerWidth,drawerWidthMin:e.drawerWidthMin,drawerWidthMax:e.drawerWidthMax,mode:"from-left",dragDrawerWidth:!0,autoSwitchToHide:!0,autoSwitchToShow:!0,autoSwitchToFloat:!0,switchWidth:2.3*e.drawerWidth},on:{"update:drawerWidth":function(t){e.drawerWidth=t},"update:drawer-width":function(t){e.drawerWidth=t}},scopedSlots:e._u([{key:"drawer",fn:function(i){return[t("div",{style:"height:".concat(i.height,"px; background:#fff; position:relative;")},[t("WListVertical",{staticStyle:{height:"100%"},attrs:{items:e.menus,itemActive:e.menuActive,"item-text-color":"#222","item-text-color-hover":"#444","item-text-color-active":"#EF6C00","item-icon-color":"#222","item-icon-color-hover":"#444","item-icon-color-active":"#EF6C00","item-background-color":"#fff","item-background-color-hover":"#f2f2f2","item-background-color-active":"#FFF3E0",paddingStyle:{v:15,h:15}},on:{click:function(t){e.menuKey=t.key}}}),e.drawer?t("div",{style:"position:absolute; top:2px; right:4px;"},[t("WButtonCircle",{attrs:{paddingStyle:{h:2,v:2},icon:e.mdiArrowLeftBoldHexagonOutline,iconSize:20,backgroundColor:"rgba(255,255,255,0.1)",backgroundColorHover:"rgba(255,255,255,0.4)",backgroundColorFocus:"rgba(255,255,255,0.7)",borderColor:"transparent",borderColorHover:"transparent",borderColorFocus:"transparent",_tooltip:"$t('menuTreeHide')",shadow:!1},on:{click:function(t){e.drawer=!1}}})],1):e._e()],1)]}},{key:"content",fn:function(i){return[t("div",{style:"height:".concat(i.height,"px; width:").concat(i.width,"px; position:relative;")},[["mmStaInfor"===e.menuKey?t("LayoutContentStaInfor"):e._e(),"mmUserInfor"===e.menuKey?t("LayoutContentUserInfor"):e._e(),"mmUsersList"===e.menuKey?t("LayoutContentUsers"):e._e(),"mmTokensList"===e.menuKey?t("LayoutContentTokens"):e._e(),"mmIpsList"===e.menuKey?t("LayoutContentIps"):e._e()],e.drawer?e._e():t("div",{style:"position:absolute; top:3px; left:5px;"},[t("WButtonCircle",{attrs:{paddingStyle:{h:2,v:2},icon:e.mdiArrowRightBoldHexagonOutline,iconSize:20,backgroundColor:"rgba(255,255,255,0.1)",backgroundColorHover:"rgba(255,255,255,0.4)",backgroundColorFocus:"rgba(255,255,255,0.7)",borderColor:"transparent",borderColorHover:"transparent",borderColorFocus:"transparent",_tooltip:"$t('menuTreeShow')",shadow:!1},on:{click:function(t){e.drawer=!0}}})],1)],2)]}}],null,!1,474508006),model:{value:e.drawer,callback:function(t){e.drawer=t},expression:"drawer"}})]:t("div",{staticStyle:{padding:"20px","font-size":"0.9rem"}},[e._v(" "+e._s(e.$t("waitingData"))+" ")])],2)},ie=[],ne=i(6145),re=i(8818),oe=i(4491),ae=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{height:"100%"},attrs:{changeLang:e.changeLang},on:{domresize:e.resizePanel}},[e.isLoading?[e.isLoading?t("div",{staticStyle:{padding:"10px 15px","font-size":"0.8rem"}},[e._v(" "+e._s(e.$t("waitingData"))+" ")]):e._e(),e.errMsg?t("div",{staticStyle:{padding:"10px 15px","font-size":"0.8rem"}},[e._v(" "+e._s(e.errMsg)+" ")]):e._e()]:t("div",{staticStyle:{height:"100%",background:"#f9fafb","overflow-y":"auto"}},[t("div",{staticStyle:{padding:"20px 30px"}},[t("div",{staticClass:"mb-8"},[t("div",{staticStyle:{"font-size":"1.5rem","font-weight":"600"}},[e._v(e._s(e.$t("statisticsInformation")))]),t("div",{staticStyle:{"font-size":"0.9rem",color:"#6b7280"}},[e._v(e._s(e.$t("statisticsInformationDescription")))])]),t("div",{staticClass:"space-y-8"},[t("div",[t("div",{staticClass:"pb-1 text-gray-500 flex items-center"},[t("i",{staticClass:"text-2xl mdi mdi-shield-account-outline mr-2"}),t("span",{staticClass:"text-sm"},[e._v(e._s(e.$t("userGroupInfor")))])]),t("div",{staticClass:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-5"},[t("div",{staticClass:"bg-white p-5 rounded-lg shadow-sm border border-gray-200 flex items-center"},[e._m(0),t("div",{staticClass:"ml-4"},[t("div",{staticClass:"text-gray-500 text-sm"},[e._v(e._s(e.$t("totalUsers")))]),t("div",{staticClass:"text-2xl font-bold text-gray-900"},[e._v(e._s(e.userOverview.total||0))])])]),t("div",{staticClass:"bg-white p-5 rounded-lg shadow-sm border border-gray-200 flex items-center"},[e._m(1),t("div",{staticClass:"ml-4"},[t("div",{staticClass:"text-gray-500 text-sm"},[e._v(e._s(e.$t("activeUsers")))]),t("div",{staticClass:"text-2xl font-bold text-gray-900"},[e._v(e._s(e.userOverview.active||0))])])]),t("div",{staticClass:"bg-white p-5 rounded-lg shadow-sm border border-gray-200 flex items-center"},[e._m(2),t("div",{staticClass:"ml-4"},[t("div",{staticClass:"text-gray-500 text-sm"},[e._v(e._s(e.$t("blockedUsers")))]),t("div",{staticClass:"text-2xl font-bold text-gray-900"},[e._v(e._s(e.userOverview.locked||0))])])]),t("div",{staticClass:"bg-white p-5 rounded-lg shadow-sm border border-gray-200 flex items-center"},[e._m(3),t("div",{staticClass:"ml-4"},[t("div",{staticClass:"text-gray-500 text-sm"},[e._v(e._s(e.$t("expiredUsers")))]),t("div",{staticClass:"text-2xl font-bold text-gray-900"},[e._v(e._s(e.userOverview.expired||0))])])])])]),t("div",[t("div",{staticClass:"pb-1 text-gray-500 flex items-center"},[t("i",{staticClass:"text-2xl mdi mdi-chart-box-outline mr-2"}),t("span",{staticClass:"text-sm"},[e._v(e._s(e.$t("accessActivityMonitoring")))])]),t("div",{staticClass:"grid grid-cols-1 lg:grid-cols-1 gap-6"},[t("div",{staticClass:"bg-white p-5 rounded-lg shadow-sm border border-gray-200"},[t("div",{staticClass:"pb-2 flex items-center font-semibold text-gray-700"},[t("i",{staticClass:"text-4xl mdi mdi-login-variant mr-2 text-purple-600"}),t("span",{staticClass:"text-lg"},[e._v(e._s(e.$t("userLoginFrequency")))])]),t("div",{staticClass:"flex justify-between items-center"},[t("div",{staticClass:"text-xs text-gray-500 mb-4"},[e._v(e._s(e.$t("last7Days")))]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.timeGroupLogin,expression:"timeGroupLogin"}],staticClass:"border rounded px-2 py-1 text-sm",on:{change:[function(t){var i=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.timeGroupLogin=t.target.multiple?i:i[0]},e.updateChartsDebounce]}},e._l(e.timeGroupOptions,(function(i){return t("option",{key:i,domProps:{value:i}},[e._v(e._s(e.$t("selectItem".concat(i))))])})),0)]),e.optLogin?t("WEchartsVueDyn",{staticStyle:{width:"100%",height:"300px"},attrs:{options:e.optLogin}}):t("div",{staticStyle:{padding:"0px","font-size":"0.8rem",color:"#777"}},[e._v(" "+e._s(e.$t("waitingData"))+" ")])],1),t("div",{staticClass:"bg-white p-5 rounded-lg shadow-sm border border-gray-200"},[t("div",{staticClass:"pb-2 flex items-center font-semibold text-gray-700"},[t("i",{staticClass:"text-2xl mdi mdi-ticket-confirmation-outline mr-2 text-purple-600"}),t("span",{staticClass:"text-lg"},[e._v(e._s(e.$t("tokenUsageFrequency")))])]),t("div",{staticClass:"flex justify-between items-center"},[t("div",{staticClass:"text-xs text-gray-500 mb-4"},[e._v(e._s(e.$t("last7Days")))]),t("div",{staticClass:"flex items-center space-x-4"},[t("div",{staticClass:"flex items-center"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.showIndividuallyToken,expression:"showIndividuallyToken"}],staticClass:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500",attrs:{id:"showIndividuallyToken",type:"checkbox"},domProps:{checked:Array.isArray(e.showIndividuallyToken)?e._i(e.showIndividuallyToken,null)>-1:e.showIndividuallyToken},on:{change:[function(t){var i=e.showIndividuallyToken,n=t.target,r=!!n.checked;if(Array.isArray(i)){var o=null,a=e._i(i,o);n.checked?a<0&&(e.showIndividuallyToken=i.concat([o])):a>-1&&(e.showIndividuallyToken=i.slice(0,a).concat(i.slice(a+1)))}else e.showIndividuallyToken=r},e.updateChartsDebounce]}}),t("label",{staticClass:"ml-2 text-sm font-medium text-gray-900",attrs:{for:"showIndividuallyToken"}},[e._v(e._s(e.$t("showIndividually")))])]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.timeGroupToken,expression:"timeGroupToken"}],staticClass:"border rounded px-2 py-1 text-sm",on:{change:[function(t){var i=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.timeGroupToken=t.target.multiple?i:i[0]},e.updateChartsDebounce]}},e._l(e.timeGroupOptions,(function(i){return t("option",{key:i,domProps:{value:i}},[e._v(e._s(e.$t("selectItem".concat(i))))])})),0)])]),e.optToken?t("WEchartsVueDyn",{staticStyle:{width:"100%",height:"300px"},attrs:{options:e.optToken}}):t("div",{staticStyle:{padding:"0px","font-size":"0.8rem",color:"#777"}},[e._v(" "+e._s(e.$t("waitingData"))+" ")]),e.tokenUsageSummary.length>0?t("div",{staticClass:"mt-4"},[t("div",{staticClass:"overflow-x-auto relative shadow-md"},[t("div",{style:"".concat(e.showAllTokenUsers?"max-height:400px; overflow-y:auto;":"")},[t("table",{staticClass:"w-full text-sm text-left text-gray-500 border-collapse"},[t("thead",{staticClass:"text-xs text-gray-700 bg-gray-50 sticky top-0 z-10 shadow-sm"},[t("tr",[t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200 w-7",attrs:{scope:"col"}},[e._v(e._s(e.$t("numberOrder")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("username")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("total")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("last1Day")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("last8Hour")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("last4Hour")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("last1Hour")))])])]),t("tbody",e._l(e.displayTokenUsageSummary,(function(i,n){return t("tr",{key:n,staticClass:"hover:bg-gray-50 transition-colors"},[t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200 w-7"},[e._v(e._s(i.number))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(i.username))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.total)))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.last1d)))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.last8h)))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.last4h)))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.last1h)))])])})),0)])])]),t("div",{staticClass:"text-right mt-2"},[t("span",{staticClass:"text-blue-600 hover:underline text-sm cursor-pointer",on:{click:e.toggleShowAllTokenUsers}},[e._v(" "+e._s(e.showAllTokenUsers?e.$t("showMax5"):e.$t("showAll"))+" ")])])]):e._e()],1),t("div",{staticClass:"bg-white p-5 rounded-lg shadow-sm border border-gray-200"},[t("div",{staticClass:"pb-2 flex items-center font-semibold text-gray-700"},[t("i",{staticClass:"text-2xl mdi mdi-access-point-network mr-2 text-purple-600"}),t("span",{staticClass:"text-lg"},[e._v(e._s(e.$t("ipConnectionFrequency")))])]),t("div",{staticClass:"flex justify-between items-center"},[t("div",{staticClass:"text-xs text-gray-500 mb-4"},[e._v(e._s(e.$t("last7Days")))]),t("div",{staticClass:"flex items-center space-x-4"},[t("div",{staticClass:"flex items-center"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.showIndividuallyIp,expression:"showIndividuallyIp"}],staticClass:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500",attrs:{id:"showIndividuallyIp",type:"checkbox"},domProps:{checked:Array.isArray(e.showIndividuallyIp)?e._i(e.showIndividuallyIp,null)>-1:e.showIndividuallyIp},on:{change:[function(t){var i=e.showIndividuallyIp,n=t.target,r=!!n.checked;if(Array.isArray(i)){var o=null,a=e._i(i,o);n.checked?a<0&&(e.showIndividuallyIp=i.concat([o])):a>-1&&(e.showIndividuallyIp=i.slice(0,a).concat(i.slice(a+1)))}else e.showIndividuallyIp=r},e.updateChartsDebounce]}}),t("label",{staticClass:"ml-2 text-sm font-medium text-gray-900",attrs:{for:"showIndividuallyIp"}},[e._v(e._s(e.$t("showIndividually")))])]),t("select",{directives:[{name:"model",rawName:"v-model",value:e.timeGroupIp,expression:"timeGroupIp"}],staticClass:"border rounded px-2 py-1 text-sm",on:{change:[function(t){var i=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){var t="_value"in e?e._value:e.value;return t}));e.timeGroupIp=t.target.multiple?i:i[0]},e.updateChartsDebounce]}},e._l(e.timeGroupOptions,(function(i){return t("option",{key:i,domProps:{value:i}},[e._v(e._s(e.$t("selectItem".concat(i))))])})),0)])]),e.optIp?t("WEchartsVueDyn",{staticStyle:{width:"100%",height:"300px"},attrs:{options:e.optIp}}):t("div",{staticStyle:{padding:"0px","font-size":"0.8rem",color:"#777"}},[e._v(" "+e._s(e.$t("waitingData"))+" ")]),e.ipUsageSummary.length>0?t("div",{staticClass:"mt-4"},[t("div",{staticClass:"overflow-x-auto relative shadow-md"},[t("div",{style:"".concat(e.showAllIpUsers?"max-height:400px; overflow-y:auto;":"")},[t("table",{staticClass:"w-full text-sm text-left text-gray-500 border-collapse"},[t("thead",{staticClass:"text-xs text-gray-700 bg-gray-50 sticky top-0 z-10 shadow-sm"},[t("tr",[t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200 w-7",attrs:{scope:"col"}},[e._v(e._s(e.$t("numberOrder")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("ip")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("total")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("last1Day")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("last8Hour")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("last4Hour")))]),t("th",{staticClass:"py-3 px-6 border border-solid border-gray-200",attrs:{scope:"col"}},[e._v(e._s(e.$t("last1Hour")))])])]),t("tbody",e._l(e.displayIpUsageSummary,(function(i,n){return t("tr",{key:n,staticClass:"hover:bg-gray-50 transition-colors"},[t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200 w-7"},[e._v(e._s(i.number))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(i.ip))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.total)))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.last1d)))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.last8h)))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.last4h)))]),t("td",{staticClass:"py-4 px-6 border border-solid border-gray-200"},[e._v(e._s(e.formatNumber(i.last1h)))])])})),0)])])]),t("div",{staticClass:"text-right mt-2"},[t("span",{staticClass:"text-blue-600 hover:underline text-sm cursor-pointer",on:{click:e.toggleShowAllIpUsers}},[e._v(" "+e._s(e.showAllIpUsers?e.$t("showMax5"):e.$t("showAll"))+" ")])])]):e._e()],1)])]),t("div",[t("div",{staticClass:"pb-1 text-gray-500 flex items-center"},[t("i",{staticClass:"text-2xl mdi mdi-monitor-account mr-2"}),t("span",{staticClass:"text-sm"},[e._v(e._s(e.$t("controlStatus")))])]),t("div",{staticClass:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5"},[t("div",{staticClass:"bg-white p-5 rounded-lg shadow-sm border border-gray-200"},[t("div",{staticClass:"pb-3 flex items-center mb-2"},[t("i",{staticClass:"text-2xl mdi mdi-folder-key-network-outline text-indigo-600 mr-2"}),t("div",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.$t("tokenCharacteristic")))])]),t("div",{staticClass:"space-y-2 text-sm"},[t("div",{staticClass:"flex justify-between"},[t("span",[e._v(e._s(e.$t("activeTokens"))+":")]),e._v(" "),t("span",{staticClass:"font-bold"},[e._v(e._s(e.tokenStatus.active||0))])]),t("div",{staticClass:"flex justify-between"},[t("span",[e._v(e._s(e.$t("createdLast24h"))+":")]),e._v(" "),t("span",{staticClass:"font-bold"},[e._v(e._s(e.tokenStatus.created24h||0))])]),t("div",{staticClass:"flex justify-between"},[t("span",[e._v(e._s(e.$t("endingNext24h"))+":")]),e._v(" "),t("span",{staticClass:"font-bold"},[e._v(e._s(e.tokenStatus.ending24h||0))])]),t("div",{staticClass:"flex justify-between"},[t("span",[e._v(e._s(e.$t("endedTokens"))+":")]),e._v(" "),t("span",{staticClass:"font-bold"},[e._v(e._s(e.tokenStatus.ended||0))])])])]),t("div",{staticClass:"bg-white p-5 rounded-lg shadow-sm border border-gray-200"},[t("div",{staticClass:"pb-3 flex items-center mb-2"},[t("i",{staticClass:"text-2xl mdi mdi-ip-network-outline text-teal-600 mr-2"}),t("div",{staticClass:"font-semibold text-gray-700"},[e._v(e._s(e.$t("ipCharacteristic")))])]),t("div",{staticClass:"space-y-2 text-sm"},[t("div",{staticClass:"flex justify-between"},[t("span",[e._v(e._s(e.$t("conn24h"))+":")]),e._v(" "),t("span",{staticClass:"font-bold"},[e._v(e._s(e.ipCharacteristic.conn24h||0))])]),t("div",{staticClass:"flex justify-between"},[t("span",[e._v(e._s(e.$t("blockedIps"))+":")]),e._v(" "),t("span",{staticClass:"font-bold"},[e._v(e._s(e.ipCharacteristic.blocked||0))])])])])])])])])])],2)},se=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"bg-blue-100 p-3 rounded-full"},[t("i",{staticClass:"mdi mdi-account-group-outline mdi-24px text-blue-600"})])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"bg-green-100 p-3 rounded-full"},[t("i",{staticClass:"mdi mdi-account-check-outline mdi-24px text-green-600"})])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"bg-red-100 p-3 rounded-full"},[t("i",{staticClass:"mdi mdi-account-lock-outline mdi-24px text-red-600"})])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"bg-yellow-100 p-3 rounded-full"},[t("i",{staticClass:"mdi mdi-account-clock-outline mdi-24px text-yellow-600"})])}],ce=i(467),de=i(4756),le=i.n(de),ue=i(4353),pe=i.n(ue),ge=i(6036),me=i(4722),fe=i(6902),he=i(7422),ve=i(4739),ye=i(7206),be=i(8024),xe=i(5422),Ae=i(4523),we=i(1244),ke=i(694),Ie=i(1969),Ce=i(6262),Se=i(6702),$e=i(9526),_e=i(4985),Te={components:{WEchartsVueDyn:_e.A},props:{},data:function(){return{dbc:(0,$e.A)(300),panelWidth:100,panelHeight:100,isLoading:!0,errMsg:"",userOverview:{},freqLogin:[],freqToken:[],freqIp:[],tokenStatus:{},ipCharacteristic:{},timeGroupLogin:"1hr",timeGroupToken:"1hr",timeGroupIp:"1hr",timeGroupOptions:["1hr","4hr","8hr","1day"],optLogin:null,optToken:null,optIp:null,showIndividuallyToken:!1,showIndividuallyIp:!1,tokenUsageSummary:[],showAllTokenUsers:!1,ipUsageSummary:[],showAllIpUsers:!1}},mounted:function(){var e=this;e.getAndRelaData()},computed:{webInfor:function(){var e=(0,c.A)(this,"$store.state.webInfor");return e},userToken:function(){var e=this;return(0,c.A)(e,"$store.state.userToken")},lang:function(){var e=this;return(0,c.A)(e,"$store.state.lang","")},changeLang:function(){var e=this,t=e.lang;return e.updateChartsDebounce(t),""},displayTokenUsageSummary:function(){var e=this;return e.showAllTokenUsers?e.tokenUsageSummary:e.tokenUsageSummary.slice(0,5)},displayIpUsageSummary:function(){var e=this;return e.showAllIpUsers?e.ipUsageSummary:e.ipUsageSummary.slice(0,5)}},methods:{resizePanel:function(e){var t=this;t.panelWidth=e.snew.offsetWidth,t.panelHeight=e.snew.offsetHeight},genOpt:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1hr",r=this;if(0===(0,fe.A)(t))return null;(0,Ie.A)(i)||(i=[i]);var o=t;if("1hr"!==n){var a=4;"8hr"===n?a=8:"1day"===n&&(a=24);var s=(0,ve.A)(t,(function(e){var t=pe()(e.time),i=t.hour(),n=Math.floor(i/a),r=t.startOf("day").add(n*a,"hour");return r.format()}));o=(0,me.A)(s,(function(e,t){var n={time:t,data:{}};return(0,ge.A)(i,(function(t){n.data[t]=(0,ye.A)(e,"data.".concat(t))})),n}))}var d=["#3b82f6","#ef4444","#10b981","#f97316","#8b5cf6","#6366f1","#eab308","#ec4899","#14b8a6","#a855f7"];function l(e){return d[e%d.length]}var u={count:"count",attempt:"countAttempt",success:"countSuccess",error:"countError"},p=function(e){var t="";t=(0,Se.A)(u,e)?u[e]:e;var i=r.$t(t);return i},g=(0,fe.A)(i),m=Math.floor(100/(1.5*g))+"%",f=(0,me.A)(i,(function(e,t){var i=p(e),n=l(t);return{name:i,type:"bar",barWidth:m,data:(0,me.A)(o,(function(t){return(0,c.A)(t,"data.".concat(e),0)})),itemStyle:{color:n},emphasis:{focus:"series"}}})),h="MM/DD";"hr"===(0,Ce.A)(n,2)&&(h="MM/DD\nHH:mm");var v={title:{text:e,show:!1},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},legend:{show:!0},xAxis:[{type:"category",data:(0,me.A)(o,(function(e){return pe()(e.time).format(h)})),axisTick:{alignWithLabel:!0}}],yAxis:[{type:"value"}],series:f};return v},grStaUserSummary:function(){var e=(0,ce.A)(le().mark((function e(){var t,i;return le().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this,i=t.userToken,e.next=1,t.$fapi.getStaUserSummary(i).then((function(e){t.userOverview=e})).catch((function(e){console.log("getStaUserSummary catch",e)}));case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),grStaTokenSummary:function(){var e=(0,ce.A)(le().mark((function e(){var t,i;return le().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this,i=t.userToken,e.next=1,t.$fapi.getStaTokenSummary(i).then((function(e){t.tokenStatus=e})).catch((function(e){console.log("getStaTokenSummary catch",e)}));case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),grStaIpSummary:function(){var e=(0,ce.A)(le().mark((function e(){var t,i;return le().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this,i=t.userToken,e.next=1,t.$fapi.getStaIpSummary(i).then((function(e){t.ipCharacteristic=e})).catch((function(e){console.log("getStaIpSummary catch",e)}));case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),grStaUserAccountLogin:function(){var e=(0,ce.A)(le().mark((function e(){var t,i;return le().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this,i=t.userToken,e.next=1,t.$fapi.getStaUserAccountLogin(i).then((function(e){t.freqLogin=e,t.optLogin=t.genOpt(t.$t("userLoginFrequency"),t.freqLogin,["attempt","success","error"],t.timeGroupLogin)})).catch((function(e){console.log("getStaUserAccountLogin catch",e)}));case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),grStaToken:function(){var e=(0,ce.A)(le().mark((function e(){var t,i;return le().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=this,i=t.userToken,e.next=1,t.$fapi.getStaToken(i).then((function(e){t.freqToken=e,t.updateCharts(),t.calculateTokenUsageSummary(e)})).catch((function(e){console.log("getStaToken catch",e)}));case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),grStaIp:function(){var e=(0,ce.A)(le().mark((function e(t){var i,n;return le().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=this,n=i.userToken,e.next=1,i.$fapi.getStaIp(n).then((function(e){i.freqIp=e,i.updateCharts(),i.calculateIpUsageSummary(e)})).catch((function(e){console.log("getStaIp catch",e)}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),getAndRelaData:function(){var e=(0,ce.A)(le().mark((function e(){var t;return le().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=this,t.isLoading=!0,t.errMsg="",t.grStaUserSummary().catch((function(e){console.log(e),t.errMsg=t.$t("getDataError")})).finally((function(){t.isLoading=!1})),t.grStaTokenSummary().catch((function(){})),t.grStaIpSummary().catch((function(){})),t.grStaUserAccountLogin().catch((function(){})),t.grStaToken().catch((function(){})),t.grStaIp().catch((function(){}));case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),updateCharts:function(){var e=this;e.optLogin=e.genOpt(e.$t("userLoginFrequency"),e.freqLogin,["attempt","success","error"],e.timeGroupLogin);var t=(0,c.A)(e.freqToken,"0.data"),i=(0,he.A)(t);e.showIndividuallyToken||(i=["count"]),e.optToken=e.genOpt(e.$t("tokenUsageFrequency"),e.freqToken,i,e.timeGroupToken);var n=(0,c.A)(e.freqIp,"0.data"),r=(0,he.A)(n);e.showIndividuallyIp||(r=["count"]),e.optIp=e.genOpt(e.$t("ipConnectionFrequency"),e.freqIp,r,e.timeGroupIp)},updateChartsDebounce:function(){var e=this;e.dbc((function(){e.updateCharts()}))},calculateTokenUsageSummary:function(e){var t=this,i=(0,xe.A)(e,(function(e,t){var i=(0,be.A)((0,c.A)(t,"data",{}),"count");return(0,ge.A)((0,he.A)(i),(function(t){(0,Se.A)(e,t)||(e[t]={username:t,total:0,last1d:0,last8h:0,last4h:0,last1h:0})})),e}),{}),n=pe()();(0,ge.A)(e,(function(e){var t=pe()(e.time),r=n.diff(t,"hour")<=24,o=n.diff(t,"hour")<=8,a=n.diff(t,"hour")<=4,s=n.diff(t,"hour")<=1,d=(0,be.A)((0,c.A)(e,"data",{}),"count");(0,ge.A)(d,(function(e,t){(0,Se.A)(i,t)&&(i[t].total+=e,r&&(i[t].last1d+=e),o&&(i[t].last8h+=e),a&&(i[t].last4h+=e),s&&(i[t].last1h+=e))}))}));var r=(0,Ae.A)(i);r=(0,me.A)(r,(function(e){return e[1]})),r=(0,we.A)(r,"total"),r=(0,ke.A)(r),r=(0,me.A)(r,(function(e,t){return e.number=t+1,e})),t.tokenUsageSummary=r},toggleShowAllTokenUsers:function(){var e=this;e.showAllTokenUsers=!e.showAllTokenUsers},calculateIpUsageSummary:function(e){var t=this,i=(0,xe.A)(e,(function(e,t){var i=(0,be.A)((0,c.A)(t,"data",{}),"count");return(0,ge.A)((0,he.A)(i),(function(t){(0,Se.A)(e,t)||(e[t]={ip:t,total:0,last1d:0,last8h:0,last4h:0,last1h:0})})),e}),{}),n=pe()();(0,ge.A)(e,(function(e){var t=pe()(e.time),r=n.diff(t,"hour")<=24,o=n.diff(t,"hour")<=8,a=n.diff(t,"hour")<=4,s=n.diff(t,"hour")<=1,d=(0,be.A)((0,c.A)(e,"data",{}),"count");(0,ge.A)(d,(function(e,t){(0,Se.A)(i,t)&&(i[t].total+=e,r&&(i[t].last1d+=e),o&&(i[t].last8h+=e),a&&(i[t].last4h+=e),s&&(i[t].last1h+=e))}))}));var r=(0,Ae.A)(i);r=(0,me.A)(r,(function(e){return e[1]})),r=(0,we.A)(r,"total"),r=(0,ke.A)(r),r=(0,me.A)(r,(function(e,t){return e.number=t+1,e})),t.ipUsageSummary=r},toggleShowAllIpUsers:function(){var e=this;e.showAllIpUsers=!e.showAllIpUsers},formatNumber:function(e){return null===e||void 0===e?0:e.toLocaleString()}}},Ee=Te,Ue=(0,w.A)(Ee,ae,se,!1,null,"13cc779f",null),He=Ue.exports,Be=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{height:"100%"},on:{domresize:e.resizePanel}},[e.isLoading||e.errMsg?[e.isLoading?t("div",{staticStyle:{padding:"10px 15px","font-size":"0.8rem"}},[e._v(" "+e._s(e.$t("waitingData"))+" ")]):e._e(),e.errMsg?t("div",{staticStyle:{padding:"10px 15px","font-size":"0.8rem"}},[e._v(" "+e._s(e.errMsg)+" ")]):e._e()]:t("div",{staticStyle:{height:"100%",background:"#fff","overflow-y":"auto"}},[t("div",{staticStyle:{padding:"40px"}},[t("div",{staticStyle:{display:"flex","align-items":"center"}},[e._e(),e.userLogo?t("div",{staticStyle:{display:"inline-block",padding:"0px",_border:"1px solid #ddd","border-radius":"50%"}},[t("img",{staticStyle:{width:"120px",height:"120px"},attrs:{src:e.userLogo}})]):e._e(),t("div",{staticStyle:{"padding-left":"15px"}},[t("div",{staticStyle:{"font-size":"3.0rem"}},[e._v(" "+e._s(e.$ui.gv(e.user,"name"))+" ")]),t("div",{staticStyle:{"margin-top":"-5px","padding-left":"2px","font-size":"1.5rem"}},[e._v(" "+e._s(e.$ui.gv(e.user,"account"))+" ")])])]),t("div",{staticClass:"pt-6 space-y-8"},[t("div",[t("div",{staticClass:"mb-2 text-xs text-gray-500"},[e._v(e._s(e.$t("userStatus")))]),t("div",{staticClass:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"},[t("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[e._v(" "+e._s(e.$t("isBlocked"))+" ")]),t("div",{class:"status-".concat(e.isBlocked?"danger":"success"," flex items-center p-3 rounded-lg")},[t("i",{class:"mdi ".concat(e.isBlocked?"mdi-lock":"mdi-lock-open-variant"," mdi-24px mr-3 flex-shrink-0")}),t("div",[t("div",{staticClass:"font-semibold"},[e._v(" "+e._s(e.isBlocked?e.$t("isBlockedY"):e.$t("isBlockedN"))+" ")]),t("div",{class:"text-xs text-".concat(e.isBlocked?"red":"green","-800/80")},[e._v(" "+e._s(e.isBlocked?""===e.timeBlockedToDay?e.$t("unknow"):e.$t("to")+" "+e.timeBlockedToDay:e.$t("isBlockedNormalStatus"))+" ")])])]),t("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[e._v(" "+e._s(e.$t("isExpired"))+" "+e._s(e.$t("timeExpired"))+" ")]),t("div",{class:"status-".concat(e.isExpired?"danger":"success"," flex items-center p-3 rounded-lg")},[t("i",{class:"mdi ".concat(e.isExpired?"mdi-calendar-lock":"mdi-calendar-check"," mdi-24px mr-3 flex-shrink-0")}),t("div",[t("div",{staticClass:"font-semibold"},[e._v(" "+e._s(e.isExpired?e.$t("isExpiredY"):e.$t("isExpiredN"))+" ")]),t("div",{class:"text-xs text-".concat(e.isExpired?"red":"green","-800/80")},[e._v(" "+e._s(e.isExpired?e.$t("isExpiredDeny"):""===e.timeExpiredToDay?e.$t("isExpiredNever"):e.$t("to")+" "+e.timeExpiredToDay)+" ")])])]),t("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[e._v(" "+e._s(e.$t("isVerified"))+" "+e._s(e.$t("timeVerified"))+" ")]),t("div",{class:"status-".concat(e.isVerified?"success":"danger"," flex items-center p-3 rounded-lg")},[t("i",{class:"mdi ".concat(e.isVerified?"mdi-check-decagram":"mdi-alert-decagram-outline"," mdi-24px mr-3 flex-shrink-0")}),t("div",[t("div",{staticClass:"font-semibold"},[e._v(" "+e._s(e.isVerified?e.$t("isVerifiedY"):e.$t("isVerifiedN"))+" ")]),t("div",{class:"text-xs text-".concat(e.isVerified?"green":"red","-800/80")},[e._v(" "+e._s(e.isVerified?""===e.timeVerifiedToDay?e.$t("unknow"):e.$t("at")+" "+e.timeVerifiedToDay:e.$t("isVerifiedWaiting"))+" ")])])]),t("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}]},[e._v(" "+e._s(e.$t("isActive"))+" ")]),t("div",{class:"status-".concat("y"===e.$ui.gv(e.user,"isActive","")?"success":"danger"," flex items-center p-3 rounded-lg")},[t("i",{class:"mdi ".concat("y"===e.$ui.gv(e.user,"isActive","")?"mdi-toggle-switch":"mdi-toggle-switch-off-outline"," mdi-24px mr-3 flex-shrink-0")}),t("div",[t("div",{staticClass:"font-semibold"},[e._v(" "+e._s("y"===e.$ui.gv(e.user,"isActive","")?e.$t("isActiveY"):e.$t("isActiveN"))+" ")]),t("div",{class:"text-xs text-".concat("y"===e.$ui.gv(e.user,"isActive","")?"green":"red","-800/80")},[e._v(" "+e._s("y"===e.$ui.gv(e.user,"isActive","")?e.$t("isActiveMsgY"):e.$t("isActiveMsgN"))+" ")])])])])]),t("div",[t("div",{staticClass:"grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-6 pt-6 border-t border-gray-200"},[t("div",{staticClass:"flex items-start gap-3"},[t("i",{staticClass:"mdi mdi-account-circle text-gray-400 mdi-20px mt-1 flex-shrink-0"}),t("div",[t("div",{staticClass:"text-sm text-gray-500"},[e._v(e._s(e.$t("account")))]),t("div",{staticClass:"text-base font-medium text-gray-900"},[e._v(" "+e._s(e.$ui.gv(e.user,"account"))+" ")])])]),t("div",{staticClass:"flex items-start gap-3"},[t("i",{staticClass:"mdi mdi-comment-text-outline text-gray-400 mdi-20px mt-1 flex-shrink-0"}),t("div",[t("div",{staticClass:"text-sm text-gray-500"},[e._v(e._s(e.$t("description")))]),t("div",{staticClass:"text-base font-medium text-gray-900"},[e._v(" "+e._s(e.$ui.gv(e.user,"description"))+" ")])])]),t("div",{staticClass:"flex items-start gap-3"},[t("i",{staticClass:"mdi mdi-email-outline text-gray-400 mdi-20px mt-1 flex-shrink-0"}),t("div",[t("div",{staticClass:"text-sm text-gray-500"},[e._v(e._s(e.$t("email")))]),t("div",{staticClass:"inline-block text-base bg-gray-100 mt-1 px-2 py-1 rounded-md text-gray-700 break-all text-sm"},[e._v(" "+e._s(e.$ui.gv(e.user,"email"))+" ")])])]),t("div",{staticClass:"flex items-start gap-3"},[t("i",{staticClass:"mdi mdi-source-branch text-gray-400 mdi-20px mt-1 flex-shrink-0"}),t("div",[t("div",{staticClass:"text-sm text-gray-500"},[e._v(e._s(e.$t("from")))]),t("div",{staticClass:"inline-block text-base bg-gray-100 mt-1 px-2 py-1 rounded-md text-gray-700 break-all text-sm"},[e._v(" "+e._s(e.$ui.gv(e.user,"from"))+" ")])])]),t("div",{staticClass:"flex items-start gap-3"},[t("i",{staticClass:"mdi mdi-id-card text-gray-400 mdi-20px mt-1 flex-shrink-0"}),t("div",[t("div",{staticClass:"text-sm text-gray-500"},[e._v(e._s(e.$t("userRole")))]),t("div",{staticClass:"inline-block text-base bg-blue-100 mt-1 px-2 py-1 rounded-md text-blue-700 break-all text-sm"},[e._v(" "+e._s("y"===e.$ui.gv(e.user,"isAdmin","")?e.$t("userRoleAdmin"):e.$t("userRoleGeneral"))+" ")])])]),t("div",{staticClass:"flex items-start gap-3 md:col-span-2"},[t("i",{staticClass:"mdi mdi-link-variant text-gray-400 mdi-20px mt-1 flex-shrink-0"}),t("div",[t("div",{staticClass:"text-sm text-gray-500"},[e._v(e._s(e.$t("redir")))]),t("div",{staticClass:"inline-block text-base bg-gray-100 mt-1 px-2 py-1 rounded-md text-gray-700 break-all text-sm"},[e._v(" "+e._s(e.$ui.gv(e.user,"redir"))+" ")])])])])])]),e._e()])])],2)},De=[],Le=i(4535),Ne=i(7267),Ye={components:{WPanelLabelItem:Ne.A},props:{},data:function(){return{mdiAccountCircleOutline:J.gXw,panelWidth:100,panelHeight:100,headHeight:100,isLoading:!0,errMsg:"",isOperatable:!0,user:null}},mounted:function(){var e=this;e.isLoading=!0,e.errMsg="";var t=e.userToken;e.$fapi.getUserByToken(t).then((function(t){e.user=t})).catch((function(t){console.log(t),e.errMsg=e.$t("getDataError")})).finally((function(){e.isLoading=!1}))},computed:{userToken:function(){var e=this;return(0,c.A)(e,"$store.state.userToken")},userLogo:function(){var e=this;return(0,c.A)(e,"$store.state.webInfor.userLogo","")},isVerified:function(){var e=this,t=(0,c.A)(e,"user"),i=e.$s.getIsVerified(t);return i},timeVerifiedToDay:function(){var e=this,t=(0,c.A)(e,"user.timeVerified","");if(!(0,Le.A)(t))return"";var i=pe()(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"),n=i.format("YYYY-MM-DD");return n},isExpired:function(){var e=this,t=(0,c.A)(e,"user"),i=e.$s.getIsExpired(t);return i},timeExpiredToDay:function(){var e=this,t=(0,c.A)(e,"user.timeExpired","");if(!(0,Le.A)(t))return"";var i=pe()(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"),n=i.format("YYYY-MM-DD");return n},isBlocked:function(){var e=this,t=(0,c.A)(e,"user"),i=e.$s.getIsBlocked(t);return i},timeBlockedToDay:function(){var e=this,t=(0,c.A)(e,"user.timeBlocked","");if(!(0,Le.A)(t))return"";var i=pe()(t,"YYYY-MM-DDTHH:mm:ss.SSSZ"),n=i.format("YYYY-MM-DD");return n}},methods:{resizePanel:function(e){var t=this;t.panelWidth=e.snew.offsetWidth,t.panelHeight=e.snew.offsetHeight}}},Me=Ye,We=(0,w.A)(Me,Be,De,!1,null,"0620fb52",null),Pe=We.exports,ze=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{height:"100%"},attrs:{changeParams:e.changeParams},on:{domresize:e.resizePanel}},[t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{background:"#fff"},on:{domresize:e.resizeHead}},[t("div",{staticStyle:{padding:"10px 10px 10px 20px"}},[t("div",{style:"display:flex; align-items:center; padding:".concat(e.drawer?"5px":"5px 5px 5px 20px",";")},[t("WIcon",{attrs:{icon:e.mdiAccountGroupOutline,color:"#000",size:32}}),t("div",{staticStyle:{"padding-left":"12px"}},[t("div",{staticStyle:{"font-size":"1.4rem",color:"#000"}},[e._v(" "+e._s(e.$t("mmUsersList"))+" ")]),t("div",{staticStyle:{"padding-top":"2px","font-size":"0.8rem",color:"#666"}},[e._v(" "+e._s(e.$t("mmUsersListMsg"))+" ")])])],1)]),t("div",{staticStyle:{padding:"5px","border-top":"1px solid #ddd",display:"flex","align-items":"center"},attrs:{"_v-if":"showIsEditable || isEditable"}},[e.showIsEditable?[t("div",{staticStyle:{padding:"6px 0px 4px 4px"}},[t("WSwitch",{attrs:{text:e.$t("modeEdit")},model:{value:e.isEditable,callback:function(t){e.isEditable=t},expression:"isEditable"}})],1),t("div",{staticStyle:{"padding-left":"10px"}})]:e._e(),[t("WPopup",{attrs:{isolated:!0,_show:"",_hide:""},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("showTabCols"),icon:e.mdiTableHeadersEye,backgroundColor:"#fff",backgroundColorHover:"#f2f2f2",iconColor:"#444",iconColorHover:"#222",iconColorFocus:"#222",shadow:!1,_click:""}})]},proxy:!0},{key:"content",fn:function(){return[t("div",{staticStyle:{padding:"10px 0px 10px 0px"}},[t("div",{staticStyle:{padding:"7px 10px","font-size":"0.85rem",color:"#222",background:"#f2f2f2"}},[e._v(" "+e._s(e.$t("showTabCols"))+" ")]),t("div",{staticStyle:{padding:"7px 9px 0px 7px"}},[t("WInputCheckbox",{attrs:{items:e.tabKeysPick},on:{input:e.toggleTabKeys},scopedSlots:e._u([{key:"default",fn:function(i){return[t("div",{staticStyle:{"padding-left":"3px",display:"flex","align-items":"center","font-size":"0.85rem",height:"24px",cursor:"pointer"}},[e._v(" "+e._s(e.getHead(i.item.data))+" ")])]}}],null,!1,286315898),model:{value:e.tabKeysShow,callback:function(t){e.tabKeysShow=t},expression:"tabKeysShow"}})],1)])]},proxy:!0}],null,!1,2452858936)}),t("div",{staticStyle:{"padding-left":"4px"}})],e.isEditable?[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("userAdd"),icon:e.mdiPlus,backgroundColor:"#fff",backgroundColorHover:"#f2f2f2",iconColor:"#444",iconColorHover:"#222",iconColorFocus:"#222",shadow:!1},on:{click:e.addItem}}),t("div",{staticStyle:{"padding-left":"4px"}})]:e._e(),e.isEditable&&e.hasItemCheckOne?[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("userCopy"),icon:e.mdiContentCopy,backgroundColor:"#fff",backgroundColorHover:"#f2f2f2",iconColor:"#444",iconColorHover:"#222",iconColorFocus:"#222",shadow:!1},on:{click:e.copyItem}}),t("div",{staticStyle:{"padding-left":"4px"}})]:e._e(),e.isEditable&&e.hasItemsCheck?[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("userDeleteCheckUsers"),icon:e.mdiTrashCanOutline,backgroundColor:"#fff",backgroundColorHover:"#f2f2f2",iconColor:"#444",iconColorHover:"#222",iconColorFocus:"#222",shadow:!1},on:{click:e.deleteItemsCheck}}),t("div",{staticStyle:{"padding-left":"4px"}})]:e._e(),e.isEditable&&e.isModified?[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("saveChanges"),icon:e.mdiCloudUploadOutline,backgroundColor:"rgba(255,0,50,0.7)",backgroundColorHover:"rgba(255,0,50,0.8)",iconColor:"#eee",iconColorHover:"#fff",iconColorFocus:"#fff",shadow:!1},on:{click:e.saveUsers}}),t("div",{staticStyle:{"padding-left":"4px"}})]:e._e()],2)]),e.isLoading?t("div",{staticStyle:{padding:"10px 15px","font-size":"0.8rem"}},[e._v(" "+e._s(e.$t("waitingData"))+" ")]):[e.items?[t("WAggridVueDyn",{ref:"rftable",style:"width:100%;",attrs:{height:e.contentHeight,opt:e.opt}})]:e._e()]],2)},Fe=[],Oe=i(9106),Ke=i(8395),Ve=i(1662),Re=i(903),Ge=i(8135),je=i(4625),qe=i(6091),Ze=i(9045),Qe=i(1529),Je=i(4248),Xe=i(9911),et=i(7639),tt={components:{WIcon:F.A,WSwitch:Je.A,WButtonCircle:ee.A,WPopup:X.A,WInputCheckbox:Xe.A,WAggridVueDyn:et.A},props:{drawer:{type:Boolean,default:!1}},data:function(){return{mdiAccountGroupOutline:J.dgQ,mdiCloudUploadOutline:J.XHW,mdiTrashCanOutline:J.FhF,mdiTableHeadersEye:J.sw5,mdiPlus:J.biz,mdiContentCopy:J.$BT,panelWidth:100,panelHeight:100,headHeight:100,isLoading:!0,firstSetting:!0,showIsEditable:!1,isEditable:!1,isModified:!1,tabKeys:["id","order","account","password","name","email","description","from","redir","isAdmin","timeVerified","timeExpired","timeBlocked","userId","timeCreate","userIdUpdate","timeUpdate","isActive"],tabKeysPick:["account","password","name","email","description","from","redir","isAdmin","timeVerified","timeExpired","timeBlocked","userId","timeCreate","userIdUpdate","timeUpdate","isActive"],tabKeysShow:["account","password","name","email","description","from","redir","isAdmin","timeVerified","timeExpired","timeBlocked","userId","timeCreate","userIdUpdate","timeUpdate","isActive"],widthUsersName:null,widthUsersEmail:null,widthUsersDescription:null,users:[],items:[],itemsCheck:[],opt:null}},mounted:function(){var e=this;if(e.$dg.toggleItemIsAdminById=e.toggleItemIsAdminById,e.$dg.toggleItemIsActiveById=e.toggleItemIsActiveById,e.$dg.modifyItemPasswordById=e.modifyItemPasswordById,e.$dg.modifyItemTimeVerifiedById=e.modifyItemTimeVerifiedById,e.$dg.modifyItemTimeExpiredById=e.modifyItemTimeExpiredById,e.$dg.modifyItemTimeBlockedById=e.modifyItemTimeBlockedById,e.firstSetting){var t=(0,c.A)(e,"webInfor.showModeEditUsers","");e.showIsEditable="y"===t;var i=(0,c.A)(e,"webInfor.modeEditUsers","");e.isEditable="y"===i,e.widthUsersName=(0,c.A)(e,"webInfor.widthUsersName",""),e.widthUsersEmail=(0,c.A)(e,"webInfor.widthUsersEmail",""),e.widthUsersDescription=(0,c.A)(e,"webInfor.widthUsersDescription",""),e.firstSetting=!1}var n=e.userToken;e.$fapi.getUsersList(n).then((function(t){t=(0,we.A)(t,"order"),e.users=t})).catch((function(t){console.log(t),e.errMsg=e.$t("getDataError")})).finally((function(){e.isLoading=!1}))},computed:{webInfor:function(){var e=(0,c.A)(this,"$store.state.webInfor");return e},userToken:function(){var e=this;return(0,c.A)(e,"$store.state.userToken")},changeParams:function(){var e=this,t=e.isEditable,i=(0,Re.A)(e.users);return e.items=i,e.genOpt({isEditable:t}),e.isLoading=!1,""},contentHeight:function(){var e=this,t=e.panelHeight-e.headHeight;return t=Math.max(t,0),t},hasItemsCheck:function(){var e=this,t=(0,fe.A)(e.itemsCheck)>0;return t},hasItemCheckOne:function(){var e=this,t=1===(0,fe.A)(e.itemsCheck);return t},errItemsByAccount:function(){var e=this,t=(0,c.A)(e,"opt.rows",[]),i={},n={};return(0,ge.A)(t,(function(t,r){var o=(0,c.A)(t,"account","");return(0,z.A)(o)?(0,Se.A)(n,o)?(i[o]=e.$t("userAccountDuplicate"),!0):void(n[o]=!0):(i[o]=e.$t("userAccountEmpty"),!0)})),i},errItemsByEmail:function(){var e=this,t=(0,c.A)(e,"opt.rows",[]),i={},n={};return(0,ge.A)(t,(function(t,r){var o=(0,c.A)(t,"email","");return(0,z.A)(o)?(0,je.A)(o)?(0,Se.A)(n,o)?(i[o]=e.$t("userEmailDuplicate"),!0):void(n[o]=!0):(i[o]=e.$t("userEmailError"),!0):(i[o]=e.$t("userEmailEmpty"),!0)})),i},errItemsByRedir:function(){var e=this,t=(0,c.A)(e,"opt.rows",[]),i={};return(0,ge.A)(t,(function(t,n){var r=(0,c.A)(t,"redir","");if(!(0,z.A)(r))return i[r]=e.$t("userRedirEmpty"),!0})),i},isError:function(){var e=this,t="",i=!1;return i=(0,Ge.A)(e.errItemsByAccount),i?(t=e.$t("errInAccounts"),t):(i=(0,Ge.A)(e.errItemsByEmail),i?(t=e.$t("errInEmails"),t):(i=(0,Ge.A)(e.errItemsByRedir),i?(t=e.$t("errInRedir"),t):""))},kpHead:function(){var e=this,t={id:e.$t("id"),order:e.$t("order"),account:e.$t("account"),password:e.$t("password"),name:e.$t("name"),email:e.$t("email"),description:e.$t("description"),from:e.$t("from"),redir:e.$t("redir"),isAdmin:e.$t("isAdmin"),timeVerified:e.$t("userTimeVerified"),timeExpired:e.$t("userTimeExpired"),timeBlocked:e.$t("userTimeBlocked"),userId:e.$t("userId"),timeCreate:e.$t("timeCreate"),userIdUpdate:e.$t("userIdUpdate"),timeUpdate:e.$t("timeUpdate"),isActive:e.$t("isActive")};return t}},methods:{resizePanel:function(e){var t=this;t.panelWidth=e.snew.offsetWidth,t.panelHeight=e.snew.offsetHeight},resizeHead:function(e){var t=this;t.headHeight=e.snew.offsetHeight},getHead:function(e){var t=this,i=(0,c.A)(t,"kpHead.".concat(e),"");return i},genOpt:function(){var e=this;e.itemsCheck=[];var t=null;if((0,fe.A)(e.items)>0){var i=e.tabKeys,n=e.kpHead,r={},o={},a={};e.isEditable&&(r={account:!0,name:!0,email:!0,description:!0,from:!0,redir:!0},o={account:!0},a={account:!0});var s={id:!0,order:!0},d=(0,Ze.A)(e.tabKeysPick,e.tabKeysShow);(0,ge.A)(d,(function(e){s[e]=!0})),t={language:e.$t("aggridLanguage"),rows:e.items,keys:i,kpHead:n,defCellEditable:!1,defHeadFilter:!0,defCellAlignH:"left",kpHeadHide:s,kpHeadFixLeft:{account:!0},defHeadMinWidth:150,kpHeadWidth:{timeVerified:250,timeExpired:250,timeBlocked:250},kpHeadFilterType:{id:"text",order:"text",account:"text",password:"text",name:"text",email:"text",description:"text",from:"text",redir:"text",isAdmin:"text",timeVerified:"text",timeExpired:"text",timeBlocked:"text",userId:"text",timeCreate:"text",userIdUpdate:"text",timeUpdate:"text",isActive:"text"},kpCellEditable:r,kpRowDrag:o,kpHeadCheckBox:a,kpHeadFilter:{password:!1},kpHeadSort:{password:!1},kpHeadFocusHighlight:{password:!1,timeVerified:!1,timeExpired:!1,timeBlocked:!1},kpCellRender:{account:function(t){var i=(0,c.A)(e.errItemsByAccount,t,"");return(0,z.A)(i)&&(t='\n <span title="'.concat(i,'">\n <span style="color:#F57C00;">').concat((0,qe.A)(t),'</span>\n <img style="vertical-align:sub; width:16px; height:16px;" src="').concat(e.$ui.getIcon("warning"),'" />\n </span>\n ')),t},password:function(t,i,n){var r=(0,c.A)(n,"id",""),o='\n <div onclick="event.stopPropagation();event.preventDefault();" onmousedown="event.stopPropagation();event.preventDefault();">\n <button style="width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" onclick="$vo.$dg.modifyItemPasswordById(\''.concat(r,"')\" ").concat(e.isEditable?"":"disabled"," >").concat(e.$t("userResetPassword"),"</button>\n </div>\n ");return o},email:function(t){var i=(0,c.A)(e.errItemsByEmail,t,"");return(0,z.A)(i)&&(t='\n <span title="'.concat(i,'">\n <span style="color:#F57C00;">').concat((0,qe.A)(t),'</span>\n <img style="vertical-align:sub; width:16px; height:16px;" src="').concat(e.$ui.getIcon("warning"),'" />\n </span>\n ')),t},redir:function(t){var i=(0,c.A)(e.errItemsByRedir,t,"");return(0,z.A)(i)&&(t='\n <span title="'.concat(i,'">\n <span style="color:#F57C00;">').concat((0,qe.A)(t),'</span>\n <img style="vertical-align:sub; width:16px; height:16px;" src="').concat(e.$ui.getIcon("warning"),'" />\n </span>\n ')),t},isAdmin:function(t,i,n){var r=(0,c.A)(n,"id",""),o='\n <input type="checkbox" '.concat("y"===t?"checked":""," onclick=\"$vo.$dg.toggleItemIsAdminById('").concat(r,"')\" ").concat(e.isEditable?"":"disabled"," />\n ");return o},isActive:function(t,i,n){var r=(0,c.A)(n,"id",""),o='\n <input type="checkbox" '.concat("y"===t?"checked":""," onclick=\"$vo.$dg.toggleItemIsActiveById('").concat(r,"')\" ").concat(e.isEditable?"":"disabled"," />\n ");return o},timeVerified:function(t,i,n){var r=(0,c.A)(n,"id",""),o="",a=e.$t("userTimeEmpty");if((0,Le.A)(t)){var s=pe()(t);o=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ"),a=s.format("YYYY-MM-DD HH:mm")}var d=e.$s.getIsVerified(n),l=d?"green":"red",u=d?e.$t("isVerifiedY"):e.$t("isVerifiedN"),p='\n <div style="width:90px; display:inline-flex; align-items:center; vertical-align:middle; color:'.concat(l,'; ">\n <i class="mdi ').concat(d?"mdi-check-bold":"mdi-close-thick",'"></i>\n <span style="padding-left:2px;">').concat(u,"</span>\n </div>\n "),g='\n <div onclick="event.stopPropagation();event.preventDefault();" onmousedown="event.stopPropagation();event.preventDefault();" style="display:flex; align-items:center;">\n '.concat(p,'\n <button style="width:126px; min-width:126px;" onclick="$vo.$dg.modifyItemTimeVerifiedById(this,\'').concat(o,"','").concat(r,"')\" ").concat(e.isEditable?"":"disabled",">").concat(a,"</button>\n </div>\n ");return g},timeExpired:function(t,i,n){var r=(0,c.A)(n,"id",""),o="",a=e.$t("userTimeEmpty");if((0,Le.A)(t)){var s=pe()(t);o=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ"),a=s.format("YYYY-MM-DD HH:mm")}var d=e.$s.getIsExpired(n),l=d?"red":"green",u=d?e.$t("isExpiredY"):e.$t("isExpiredN"),p='\n <div style="width:90px; display:inline-flex; align-items:center; vertical-align:middle; color:'.concat(l,'; ">\n <i class="mdi ').concat(d?"mdi-close-thick":"mdi-check-bold",'"></i>\n <span style="padding-left:2px;">').concat(u,"</span>\n </div>\n "),g='\n <div onclick="event.stopPropagation();event.preventDefault();" onmousedown="event.stopPropagation();event.preventDefault();" style="display:flex; align-items:center;">\n '.concat(p,'\n <button style="width:126px; min-width:126px;" onclick="$vo.$dg.modifyItemTimeExpiredById(this,\'').concat(o,"','").concat(r,"')\" ").concat(e.isEditable?"":"disabled",">").concat(a,"</button>\n </div>\n ");return g},timeBlocked:function(t,i,n){var r=(0,c.A)(n,"id",""),o="",a=e.$t("userTimeEmpty");if((0,Le.A)(t)){var s=pe()(t);o=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ"),a=s.format("YYYY-MM-DD HH:mm")}var d=e.$s.getIsBlocked(n),l=d?"red":"green",u=d?e.$t("isBlockedY"):e.$t("isBlockedN"),p='\n <div style="width:90px; display:inline-flex; align-items:center; vertical-align:middle; color:'.concat(l,'; ">\n <i class="mdi ').concat(d?"mdi-close-thick":"mdi-check-bold",'"></i>\n <span style="padding-left:2px;">').concat(u,"</span>\n </div>\n "),g='\n <div onclick="event.stopPropagation();event.preventDefault();" onmousedown="event.stopPropagation();event.preventDefault();" style="display:flex; align-items:center;">\n '.concat(p,'\n <button style="width:126px; min-width:126px;" onclick="$vo.$dg.modifyItemTimeBlockedById(this,\'').concat(o,"','").concat(r,"')\" ").concat(e.isEditable?"":"disabled",">").concat(a,"</button>\n </div>\n ");return g}},rowsChange:function(t){e.isModified=!0},rowChecked:function(t){e.itemsCheck=(0,Re.A)(t)}}}e.opt=t},refresh:function(){var e=this,t=(0,c.A)(e,"$refs.rftable.$refs.$self");t.refresh()},toggleTabKeys:function(){var e=this,t=(0,c.A)(e,"$refs.rftable.$refs.$self");t.showKeys(e.tabKeysShow)},modifyItemPasswordById:function(e){var t=this;t.$alert("尚待開發",{type:"error"})},toggleItemByKeyAndId:function(e,t){var i=this;if((0,z.A)(t)){var n=(0,c.A)(i,"opt.rows",[]),r=null,o=null;if((0,ge.A)(n,(function(e,i){if((0,c.A)(e,"id","")===t)return r=e,o=i,!1})),(0,Ge.A)(r)){var a=(0,c.A)(r,e,"n"),s="y"===a?"n":"y";(0,Ke.A)(i,"opt.rows[".concat(o,"].").concat(e),s),i.refresh(),i.isModified=!0}else i.$alert("".concat(i.$t("userEditNoUserData")),{type:"error"})}else i.$alert("".concat(i.$t("userEditNoUserId")),{type:"error"})},toggleItemIsAdminById:function(e){var t=this;t.toggleItemByKeyAndId("isAdmin",e)},toggleItemIsActiveById:function(e){var t=this;t.toggleItemByKeyAndId("isActive",e)},modifyItemByKeyAndId:function(e,t,i,n){var r=this;if((0,z.A)(n)){var o="";(0,Le.A)(i)&&(o=pe()(i).format("YYYY-MM-DDTHH:mm:ss"));var a="datetime-local";(0,Qe.A)(o,{eleRef:t,type:a}).then((function(t){var i=(0,c.A)(r,"opt.rows",[]),o=null,a=null;if((0,ge.A)(i,(function(e,t){if((0,c.A)(e,"id","")===n)return o=e,a=t,!1})),(0,Ge.A)(o)){var s=pe()(t,"YYYY-MM-DDTHH:mm"),d=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ");(0,Ke.A)(r,"opt.rows[".concat(a,"].").concat(e),d),r.refresh(),r.isModified=!0}else r.$alert("".concat(r.$t("userEditNoUserData")),{type:"error"})}))}else r.$alert("".concat(r.$t("userEditNoUserId")),{type:"error"})},modifyItemTimeVerifiedById:function(e,t,i){var n=this;n.modifyItemByKeyAndId("timeVerified",e,t,i)},modifyItemTimeExpiredById:function(e,t,i){var n=this;n.modifyItemByKeyAndId("timeExpired",e,t,i)},modifyItemTimeBlockedById:function(e,t,i){var n=this;n.modifyItemByKeyAndId("timeBlocked",e,t,i)},addItem:function(){var e=this,t=(0,c.A)(e,"opt.rows",[]);t=(0,Re.A)(t);var i=e.$ds.users.funNew();i.name=e.$s.getNameNew(t,"name","",e.$t("userAddNameNew")),i.userId="{".concat(e.$t("userAddIdNew"),"}"),i.timeCreate="{".concat(e.$t("userAddIdNew"),"}"),i.userIdUpdate="{".concat(e.$t("userAddIdNew"),"}"),i.timeUpdate="{".concat(e.$t("userAddIdNew"),"}"),t=[i].concat((0,Oe.A)(t)),e.users=(0,Re.A)(t),e.isModified=!0},copyItem:function(){var e=this;if(1!==(0,fe.A)(e.itemsCheck))return console.log("size(vo.itemsCheck) !== 1",e.itemsCheck),void e.$alert("".concat(e.$t("anUnexpectedErrorOccurred")),{type:"error"});var t=(0,c.A)(e,"opt.rows",[]);t=(0,Re.A)(t);var i=e.itemsCheck[0],n=(0,c.A)(i,"data.id",""),r=null;if((0,ge.A)(t,(function(e){var t=(0,c.A)(e,"id","");if(t===n)return r=e,!1})),!(0,Ge.A)(r))return console.log("!iseobj(row)",r),void e.$alert("".concat(e.$t("anUnexpectedErrorOccurred")),{type:"error"});var o=(0,Re.A)(r),a=e.$ds.users.funNew();o.id=a.id,o.userId="{".concat(e.$t("userAddIdNew"),"}"),o.timeCreate="{".concat(e.$t("userAddIdNew"),"}"),o.userIdUpdate="{".concat(e.$t("userAddIdNew"),"}"),o.timeUpdate="{".concat(e.$t("userAddIdNew"),"}"),t=[o].concat((0,Oe.A)(t)),e.users=(0,Re.A)(t),e.isModified=!0},deleteItemsCheck:function(){var e=this;if(0===(0,fe.A)(e.itemsCheck))return console.log("size(vo.itemsCheck) === 0",e.itemsCheck),void e.$alert("".concat(e.$t("anUnexpectedErrorOccurred")),{type:"error"});var t=(0,c.A)(e,"opt.rows",[]);t=(0,Re.A)(t),(0,ge.A)(e.itemsCheck,(function(e){var i=(0,c.A)(e,"data.id","");if(!(0,z.A)(i))return console.log("invalid id"),!0;t=(0,Ve.A)(t,(function(e){return e.id!==i}))})),e.itemsCheck=[],e.users=(0,Re.A)(t),e.isModified=!0},saveUsers:function(){var e=this;function t(){return i.apply(this,arguments)}function i(){return i=(0,ce.A)(le().mark((function t(){var i,n,r;return le().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=null,e.$ui.updateLoading(!0),!(0,z.A)(e.isError)){t.next=1;break}return e.$alert("".concat(e.isError),{type:"error"}),t.abrupt("return");case 1:if(n=(0,c.A)(e,"opt.rows",[]),0!==(0,fe.A)(n)){t.next=2;break}return e.$alert("".concat(e.$t("userAddEmpty")),{type:"error"}),t.abrupt("return");case 2:return r=e.userToken,t.next=3,e.$fapi.updateUsersList(r,n).catch((function(e){i=e}));case 3:if(null===i){t.next=4;break}return e.$alert("".concat(e.$t("userSaveUsersFail"),": ").concat(i),{type:"error"}),t.abrupt("return");case 4:e.isModified=!1,e.$alert(e.$t("userSaveUsersSuccess"));case 5:case"end":return t.stop()}}),t)}))),i.apply(this,arguments)}t().catch((function(t){console.log("catch",t),e.$alert(e.$t("anUnexpectedErrorOccurred"),{type:"error"})})).finally((function(){e.$ui.updateLoading(!1)}))}}},it=tt,nt=(0,w.A)(it,ze,Fe,!1,null,"716473ce",null),rt=nt.exports,ot=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{height:"100%"},attrs:{changeParams:e.changeParams},on:{domresize:e.resizePanel}},[t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{background:"#fff"},on:{domresize:e.resizeHead}},[t("div",{staticStyle:{padding:"10px 10px 10px 20px"}},[t("div",{style:"display:flex; align-items:center; padding:".concat(e.drawer?"5px":"5px 5px 5px 20px",";")},[t("WIcon",{attrs:{icon:e.mdiShieldKeyOutline,color:"#000",size:32}}),t("div",{staticStyle:{"padding-left":"12px"}},[t("div",{staticStyle:{"font-size":"1.4rem",color:"#000"}},[e._v(" "+e._s(e.$t("mmTokensList"))+" ")]),t("div",{staticStyle:{"padding-top":"2px","font-size":"0.8rem",color:"#666"}},[e._v(" "+e._s(e.$t("mmTokensListMsg"))+" ")])])],1)]),t("div",{staticStyle:{padding:"5px","border-top":"1px solid #ddd",display:"flex","align-items":"center"},attrs:{"_v-if":"showIsEditable || isEditable"}},[e.showIsEditable?[t("div",{staticStyle:{padding:"6px 0px 4px 4px"}},[t("WSwitch",{attrs:{text:e.$t("modeEdit")},model:{value:e.isEditable,callback:function(t){e.isEditable=t},expression:"isEditable"}})],1),t("div",{staticStyle:{"padding-left":"10px"}})]:e._e(),[t("WPopup",{attrs:{isolated:!0,_show:"",_hide:""},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("showTabCols"),icon:e.mdiTableHeadersEye,backgroundColor:"#fff",backgroundColorHover:"#f2f2f2",iconColor:"#444",iconColorHover:"#222",iconColorFocus:"#222",shadow:!1,_click:""}})]},proxy:!0},{key:"content",fn:function(){return[t("div",{staticStyle:{padding:"10px 0px 10px 0px"}},[t("div",{staticStyle:{padding:"7px 10px","font-size":"0.85rem",color:"#222",background:"#f2f2f2"}},[e._v(" "+e._s(e.$t("showTabCols"))+" ")]),t("div",{staticStyle:{padding:"7px 9px 0px 7px"}},[t("WInputCheckbox",{attrs:{items:e.tabKeysPick},on:{input:e.toggleTabKeys},scopedSlots:e._u([{key:"default",fn:function(i){return[t("div",{staticStyle:{"padding-left":"3px",display:"flex","align-items":"center","font-size":"0.85rem",height:"24px",cursor:"pointer"}},[e._v(" "+e._s(e.getHead(i.item.data))+" ")])]}}],null,!1,286315898),model:{value:e.tabKeysShow,callback:function(t){e.tabKeysShow=t},expression:"tabKeysShow"}})],1)])]},proxy:!0}],null,!1,2452858936)}),t("div",{staticStyle:{"padding-left":"4px"}})],e.isEditable&&e.hasItemsCheck?[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("tokenDeleteCheckTokens"),icon:e.mdiTrashCanOutline,backgroundColor:"#fff",backgroundColorHover:"#f2f2f2",iconColor:"#444",iconColorHover:"#222",iconColorFocus:"#222",shadow:!1},on:{click:e.deleteItemsCheck}}),t("div",{staticStyle:{"padding-left":"4px"}})]:e._e(),e.isEditable&&e.isModified?[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("saveChanges"),icon:e.mdiCloudUploadOutline,backgroundColor:"rgba(255,0,50,0.6)",backgroundColorHover:"rgba(255,0,50,0.7)",backgroundColorFocus:"rgba(255,0,50,0.7)",iconColor:"#eee",iconColorHover:"#fff",iconColorFocus:"#fff",shadow:!1},on:{click:e.saveTokens}}),t("div",{staticStyle:{"padding-left":"4px"}})]:e._e()],2)]),e.isLoading?t("div",{staticStyle:{padding:"10px 15px","font-size":"0.8rem"}},[e._v(" "+e._s(e.$t("waitingData"))+" ")]):[e.items?[t("WAggridVueDyn",{ref:"rftable",style:"width:100%;",attrs:{height:e.contentHeight,opt:e.opt}})]:e._e()]],2)},at=[],st={components:{WIcon:F.A,WSwitch:Je.A,WButtonCircle:ee.A,WPopup:X.A,WInputCheckbox:Xe.A,WAggridVueDyn:et.A},props:{drawer:{type:Boolean,default:!1}},data:function(){return{mdiShieldKeyOutline:J.lEv,mdiCloudUploadOutline:J.XHW,mdiTrashCanOutline:J.FhF,mdiTableHeadersEye:J.sw5,panelWidth:100,panelHeight:100,headHeight:100,isLoading:!0,firstSetting:!0,showIsEditable:!1,isEditable:!1,isModified:!1,tabKeys:["id","token","userId","isApp","timeCreate","timeEnd","timeUpdate"],tabKeysPick:["token","userId","isApp","timeCreate","timeEnd","timeUpdate"],tabKeysShow:["token","userId","isApp","timeCreate","timeEnd","timeUpdate"],tokens:[],items:[],itemsCheck:[],opt:null}},mounted:function(){var e=this;if(e.$dg.toggleItemIsAppById=e.toggleItemIsAppById,e.$dg.modifyItemTimeCreateById=e.modifyItemTimeCreateById,e.$dg.modifyItemTimeEndById=e.modifyItemTimeEndById,e.$dg.modifyItemTimeUpdateById=e.modifyItemTimeUpdateById,e.firstSetting){var t=(0,c.A)(e,"webInfor.showModeEditTokens","");e.showIsEditable="y"===t;var i=(0,c.A)(e,"webInfor.modeEditTokens","");e.isEditable="y"===i,e.firstSetting=!1}var n=e.userToken;e.$fapi.getTokensList(n).then((function(t){t=(0,we.A)(t,"timeCreate").reverse(),e.tokens=t})).catch((function(t){console.log(t),e.errMsg=e.$t("getDataError")})).finally((function(){e.isLoading=!1}))},computed:{webInfor:function(){var e=(0,c.A)(this,"$store.state.webInfor");return e},userToken:function(){var e=this;return(0,c.A)(e,"$store.state.userToken")},changeParams:function(){var e=this,t=e.isEditable,i=(0,Re.A)(e.tokens);return e.items=i,e.genOpt({isEditable:t}),e.isLoading=!1,""},contentHeight:function(){var e=this,t=e.panelHeight-e.headHeight;return t=Math.max(t,0),t},hasItemsCheck:function(){var e=this,t=(0,fe.A)(e.itemsCheck)>0;return t},hasItemCheckOne:function(){var e=this,t=1===(0,fe.A)(e.itemsCheck);return t},isError:function(){return""},kpHead:function(){var e=this,t={id:e.$t("id"),token:e.$t("token"),userId:e.$t("userId"),isApp:e.$t("isApp"),timeCreate:e.$t("tokenTimeCreate"),timeEnd:e.$t("tokenTimeEnd"),timeUpdate:e.$t("tokenTimeUpdate")};return t}},methods:{resizePanel:function(e){var t=this;t.panelWidth=e.snew.offsetWidth,t.panelHeight=e.snew.offsetHeight},resizeHead:function(e){var t=this;t.headHeight=e.snew.offsetHeight},getHead:function(e){var t=this,i=(0,c.A)(t,"kpHead.".concat(e),"");return i},genOpt:function(){var e=this;e.itemsCheck=[];var t=null;if((0,fe.A)(e.items)>0){var i=e.tabKeys,n=e.kpHead,r={},o={},a={};e.isEditable&&(r={token:!0,userId:function(e){var t=(0,c.A)(e,"data",{}),i=(0,c.A)(t,"isApp",""),n="y"!==i;return n}},o={token:!0},a={token:!0});var s={id:!0},d=(0,Ze.A)(e.tabKeysPick,e.tabKeysShow);(0,ge.A)(d,(function(e){s[e]=!0})),t={language:e.$t("aggridLanguage"),rows:e.items,keys:i,kpHead:n,defCellEditable:!1,defHeadFilter:!0,defCellAlignH:"left",kpHeadHide:s,kpHeadFixLeft:{token:!0},defHeadMinWidth:150,kpHeadWidth:{token:300,userId:300,isApp:100,timeCreate:220,timeEnd:220,timeUpdate:220},kpHeadFilterType:{id:"text",token:"text",userId:"text",isApp:"text",timeCreate:"text",timeEnd:"text",timeUpdate:"text"},kpCellEditable:r,kpRowDrag:o,kpHeadCheckBox:a,kpHeadFilter:{},kpHeadSort:{},kpHeadFocusHighlight:{timeCreate:!1,timeEnd:!1,timeUpdate:!1},kpCellRender:{userId:function(e,t,i){var n=(0,c.A)(i,"isApp",""),r="";return"y"!==n&&(r=e),r},isApp:function(t,i,n){var r=(0,c.A)(n,"id",""),o='\n <input type="checkbox" '.concat("y"===t?"checked":""," onclick=\"$vo.$dg.toggleItemIsAppById('").concat(r,"')\" ").concat(e.isEditable?"":"disabled"," />\n ");return o},timeCreate:function(t,i,n){var r=(0,c.A)(n,"id",""),o="",a=e.$t("tokenTimeEmpty");if((0,Le.A)(t)){var s=pe()(t);o=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ"),a=s.format("YYYY-MM-DD HH:mm")}var d='\n <div onclick="event.stopPropagation();event.preventDefault();" onmousedown="event.stopPropagation();event.preventDefault();">\n <button style="width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" onclick="$vo.$dg.modifyItemTimeCreateById(this,\''.concat(o,"','").concat(r,"')\" ").concat(e.isEditable?"":"disabled",">").concat(a,"</button>\n </div>\n ");return d},timeEnd:function(t,i,n){var r=(0,c.A)(n,"id",""),o="",a=e.$t("tokenTimeEmpty");if((0,Le.A)(t)){var s=pe()(t);o=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ"),a=s.format("YYYY-MM-DD HH:mm")}var d='\n <div onclick="event.stopPropagation();event.preventDefault();" onmousedown="event.stopPropagation();event.preventDefault();">\n <button style="width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" onclick="$vo.$dg.modifyItemTimeEndById(this,\''.concat(o,"','").concat(r,"')\" ").concat(e.isEditable?"":"disabled",">").concat(a,"</button>\n </div>\n ");return d},timeUpdate:function(t,i,n){var r=(0,c.A)(n,"id",""),o="",a=e.$t("tokenTimeEmpty");if((0,Le.A)(t)){var s=pe()(t);o=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ"),a=s.format("YYYY-MM-DD HH:mm")}var d='\n <div onclick="event.stopPropagation();event.preventDefault();" onmousedown="event.stopPropagation();event.preventDefault();">\n <button style="width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" onclick="$vo.$dg.modifyItemTimeUpdateById(this,\''.concat(o,"','").concat(r,"')\" ").concat(e.isEditable?"":"disabled",">").concat(a,"</button>\n </div>\n ");return d}},rowsChange:function(t){e.isModified=!0},rowChecked:function(t){e.itemsCheck=(0,Re.A)(t)}}}e.opt=t},refresh:function(){var e=this,t=(0,c.A)(e,"$refs.rftable.$refs.$self");t.refresh()},toggleTabKeys:function(){var e=this,t=(0,c.A)(e,"$refs.rftable.$refs.$self");t.showKeys(e.tabKeysShow)},toggleItemByKeyAndId:function(e,t){var i=this;if((0,z.A)(t)){var n=(0,c.A)(i,"opt.rows",[]),r=null,o=null;if((0,ge.A)(n,(function(e,i){if((0,c.A)(e,"id","")===t)return r=e,o=i,!1})),(0,Ge.A)(r)){var a=(0,c.A)(r,e,"n"),s="y"===a?"n":"y";(0,Ke.A)(i,"opt.rows[".concat(o,"].").concat(e),s),i.refresh(),i.isModified=!0}else i.$alert("".concat(i.$t("userEditNoUserData")),{type:"error"})}else i.$alert("".concat(i.$t("userEditNoUserId")),{type:"error"})},toggleItemIsAppById:function(e){var t=this;t.toggleItemByKeyAndId("isApp",e)},modifyItemByKeyAndId:function(e,t,i,n){var r=this;if((0,z.A)(n)){var o="";(0,Le.A)(i)&&(o=pe()(i).format("YYYY-MM-DDTHH:mm:ss"));var a="datetime-local";(0,Qe.A)(o,{eleRef:t,type:a}).then((function(t){var i=(0,c.A)(r,"opt.rows",[]),o=null,a=null;if((0,ge.A)(i,(function(e,t){if((0,c.A)(e,"id","")===n)return o=e,a=t,!1})),(0,Ge.A)(o)){var s=pe()(t,"YYYY-MM-DDTHH:mm"),d=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ");(0,Ke.A)(r,"opt.rows[".concat(a,"].").concat(e),d),r.refresh(),r.isModified=!0}else r.$alert("".concat(r.$t("tokenEditNoTokenData")),{type:"error"})}))}else r.$alert("".concat(r.$t("tokenEditNoTokenId")),{type:"error"})},modifyItemTimeCreateById:function(e,t,i){var n=this;n.modifyItemByKeyAndId("timeCreate",e,t,i)},modifyItemTimeEndById:function(e,t,i){var n=this;n.modifyItemByKeyAndId("timeEnd",e,t,i)},modifyItemTimeUpdateById:function(e,t,i){var n=this;n.modifyItemByKeyAndId("timeUpdate",e,t,i)},deleteItemsCheck:function(){var e=this;if(0===(0,fe.A)(e.itemsCheck))return console.log("size(vo.itemsCheck) === 0",e.itemsCheck),void e.$alert("".concat(e.$t("anUnexpectedErrorOccurred")),{type:"error"});var t=(0,c.A)(e,"opt.rows",[]);t=(0,Re.A)(t),(0,ge.A)(e.itemsCheck,(function(e){var i=(0,c.A)(e,"data.id","");if(!(0,z.A)(i))return console.log("invalid id"),!0;t=(0,Ve.A)(t,(function(e){return e.id!==i}))})),e.itemsCheck=[],e.tokens=(0,Re.A)(t),e.isModified=!0},saveTokens:function(){var e=this;function t(){return i.apply(this,arguments)}function i(){return i=(0,ce.A)(le().mark((function t(){var i,n,r;return le().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=null,e.$ui.updateLoading(!0),!(0,z.A)(e.isError)){t.next=1;break}return e.$alert("".concat(e.isError),{type:"error"}),t.abrupt("return");case 1:return n=(0,c.A)(e,"opt.rows",[]),(0,fe.A)(n),r=e.userToken,t.next=2,e.$fapi.updateTokensList(r,n).catch((function(e){i=e}));case 2:if(null===i){t.next=3;break}return e.$alert("".concat(e.$t("tokenSaveTokensFail"),": ").concat(i),{type:"error"}),t.abrupt("return");case 3:e.isModified=!1,e.$alert(e.$t("tokenSaveTokensSuccess"));case 4:case"end":return t.stop()}}),t)}))),i.apply(this,arguments)}t().catch((function(t){console.log("catch",t),e.$alert(e.$t("anUnexpectedErrorOccurred"),{type:"error"})})).finally((function(){e.$ui.updateLoading(!1)}))}}},ct=st,dt=(0,w.A)(ct,ot,at,!1,null,"1e40008c",null),lt=dt.exports,ut=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{height:"100%"},attrs:{changeParams:e.changeParams},on:{domresize:e.resizePanel}},[t("div",{directives:[{name:"domresize",rawName:"v-domresize"}],staticStyle:{background:"#fff"},on:{domresize:e.resizeHead}},[t("div",{staticStyle:{padding:"10px 10px 10px 20px"}},[t("div",{style:"display:flex; align-items:center; padding:".concat(e.drawer?"5px":"5px 5px 5px 20px",";")},[t("WIcon",{attrs:{icon:e.mdiIpNetwork,color:"#000",size:32}}),t("div",{staticStyle:{"padding-left":"12px"}},[t("div",{staticStyle:{"font-size":"1.4rem",color:"#000"}},[e._v(" "+e._s(e.$t("mmIpsList"))+" ")]),t("div",{staticStyle:{"padding-top":"2px","font-size":"0.8rem",color:"#666"}},[e._v(" "+e._s(e.$t("mmIpsListMsg"))+" ")])])],1)]),t("div",{staticStyle:{padding:"5px","border-top":"1px solid #ddd",display:"flex","align-items":"center"},attrs:{"_v-if":"showIsEditable || isEditable"}},[e.showIsEditable?[t("div",{staticStyle:{padding:"6px 0px 4px 4px"}},[t("WSwitch",{attrs:{text:e.$t("modeEdit")},model:{value:e.isEditable,callback:function(t){e.isEditable=t},expression:"isEditable"}})],1),t("div",{staticStyle:{"padding-left":"10px"}})]:e._e(),[t("WPopup",{attrs:{isolated:!0,_show:"",_hide:""},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("showTabCols"),icon:e.mdiTableHeadersEye,backgroundColor:"#fff",backgroundColorHover:"#f2f2f2",iconColor:"#444",iconColorHover:"#222",iconColorFocus:"#222",shadow:!1,_click:""}})]},proxy:!0},{key:"content",fn:function(){return[t("div",{staticStyle:{padding:"10px 0px 10px 0px"}},[t("div",{staticStyle:{padding:"7px 10px","font-size":"0.85rem",color:"#222",background:"#f2f2f2"}},[e._v(" "+e._s(e.$t("showTabCols"))+" ")]),t("div",{staticStyle:{padding:"7px 9px 0px 7px"}},[t("WInputCheckbox",{attrs:{items:e.tabKeysPick},on:{input:e.toggleTabKeys},scopedSlots:e._u([{key:"default",fn:function(i){return[t("div",{staticStyle:{"padding-left":"3px",display:"flex","align-items":"center","font-size":"0.85rem",height:"24px",cursor:"pointer"}},[e._v(" "+e._s(e.getHead(i.item.data))+" ")])]}}],null,!1,286315898),model:{value:e.tabKeysShow,callback:function(t){e.tabKeysShow=t},expression:"tabKeysShow"}})],1)])]},proxy:!0}],null,!1,2452858936)}),t("div",{staticStyle:{"padding-left":"4px"}})],e.isEditable&&e.hasItemsCheck?[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("ipDeleteCheckIps"),icon:e.mdiTrashCanOutline,backgroundColor:"#fff",backgroundColorHover:"#f2f2f2",iconColor:"#444",iconColorHover:"#222",iconColorFocus:"#222",shadow:!1},on:{click:e.deleteItemsCheck}}),t("div",{staticStyle:{"padding-left":"4px"}})]:e._e(),e.isEditable&&e.isModified?[t("WButtonCircle",{attrs:{paddingStyle:{v:6,h:6},tooltip:e.$t("saveChanges"),icon:e.mdiCloudUploadOutline,backgroundColor:"rgba(255,0,50,0.6)",backgroundColorHover:"rgba(255,0,50,0.7)",backgroundColorFocus:"rgba(255,0,50,0.7)",iconColor:"#eee",iconColorHover:"#fff",iconColorFocus:"#fff",shadow:!1},on:{click:e.saveIps}}),t("div",{staticStyle:{"padding-left":"4px"}})]:e._e()],2)]),e.isLoading?t("div",{staticStyle:{padding:"10px 15px","font-size":"0.8rem"}},[e._v(" "+e._s(e.$t("waitingData"))+" ")]):[e.items?[t("WAggridVueDyn",{ref:"rftable",style:"width:100%;",attrs:{height:e.contentHeight,opt:e.opt}})]:e._e()]],2)},pt=[],gt={components:{WIcon:F.A,WSwitch:Je.A,WButtonCircle:ee.A,WPopup:X.A,WInputCheckbox:Xe.A,WAggridVueDyn:et.A},props:{drawer:{type:Boolean,default:!1}},data:function(){return{mdiIpNetwork:J.wDQ,mdiCloudUploadOutline:J.XHW,mdiTrashCanOutline:J.FhF,mdiTableHeadersEye:J.sw5,panelWidth:100,panelHeight:100,headHeight:100,isLoading:!0,firstSetting:!0,showIsEditable:!1,isEditable:!1,isModified:!1,tabKeys:["id","ip","timeBlocked"],tabKeysPick:["ip","timeBlocked"],tabKeysShow:["ip","timeBlocked"],ips:[],items:[],itemsCheck:[],opt:null}},mounted:function(){var e=this;if(e.$dg.modifyItemTimeBlockedById=e.modifyItemTimeBlockedById,e.firstSetting){var t=(0,c.A)(e,"webInfor.showModeEditIps","");e.showIsEditable="y"===t;var i=(0,c.A)(e,"webInfor.modeEditIps","");e.isEditable="y"===i,e.firstSetting=!1}var n=e.userToken;e.$fapi.getIpsList(n).then((function(t){t=(0,we.A)(t,"ip").reverse(),e.ips=t})).catch((function(t){console.log(t),e.errMsg=e.$t("getDataError")})).finally((function(){e.isLoading=!1}))},computed:{webInfor:function(){var e=(0,c.A)(this,"$store.state.webInfor");return e},userToken:function(){var e=this;return(0,c.A)(e,"$store.state.userToken")},changeParams:function(){var e=this,t=e.isEditable,i=(0,Re.A)(e.ips);return e.items=i,e.genOpt({isEditable:t}),e.isLoading=!1,""},contentHeight:function(){var e=this,t=e.panelHeight-e.headHeight;return t=Math.max(t,0),t},hasItemsCheck:function(){var e=this,t=(0,fe.A)(e.itemsCheck)>0;return t},hasItemCheckOne:function(){var e=this,t=1===(0,fe.A)(e.itemsCheck);return t},isError:function(){return""},kpHead:function(){var e=this,t={id:e.$t("id"),ip:e.$t("ip"),timeBlocked:e.$t("ipTimeBlocked")};return t}},methods:{resizePanel:function(e){var t=this;t.panelWidth=e.snew.offsetWidth,t.panelHeight=e.snew.offsetHeight},resizeHead:function(e){var t=this;t.headHeight=e.snew.offsetHeight},getHead:function(e){var t=this,i=(0,c.A)(t,"kpHead.".concat(e),"");return i},genOpt:function(){var e=this;e.itemsCheck=[];var t=null;if((0,fe.A)(e.items)>0){var i=e.tabKeys,n=e.kpHead,r={},o={},a={};e.isEditable&&(r={ip:!0},o={ip:!0},a={ip:!0});var s={id:!0},d=(0,Ze.A)(e.tabKeysPick,e.tabKeysShow);(0,ge.A)(d,(function(e){s[e]=!0})),t={language:e.$t("aggridLanguage"),rows:e.items,keys:i,kpHead:n,defCellEditable:!1,defHeadFilter:!0,defCellAlignH:"left",kpHeadHide:s,kpHeadFixLeft:{ip:!0},defHeadMinWidth:150,kpHeadWidth:{ip:300,timeBlocked:220},kpHeadFilterType:{id:"text",ip:"text",timeBlocked:"text"},kpCellEditable:r,kpRowDrag:o,kpHeadCheckBox:a,kpHeadFilter:{},kpHeadSort:{},kpHeadFocusHighlight:{timeBlocked:!1},kpCellRender:{timeBlocked:function(t,i,n){var r=(0,c.A)(n,"id",""),o="",a=e.$t("ipTimeEmpty");if((0,Le.A)(t)){var s=pe()(t);o=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ"),a=s.format("YYYY-MM-DD HH:mm")}var d='\n <div onclick="event.stopPropagation();event.preventDefault();" onmousedown="event.stopPropagation();event.preventDefault();">\n <button style="width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;" onclick="$vo.$dg.modifyItemTimeBlockedById(this,\''.concat(o,"','").concat(r,"')\" ").concat(e.isEditable?"":"disabled",">").concat(a,"</button>\n </div>\n ");return d}},rowsChange:function(t){e.isModified=!0},rowChecked:function(t){e.itemsCheck=(0,Re.A)(t)}}}e.opt=t},refresh:function(){var e=this,t=(0,c.A)(e,"$refs.rftable.$refs.$self");t.refresh()},toggleTabKeys:function(){var e=this,t=(0,c.A)(e,"$refs.rftable.$refs.$self");t.showKeys(e.tabKeysShow)},modifyItemByKeyAndId:function(e,t,i,n){var r=this;if((0,z.A)(n)){var o="";(0,Le.A)(i)&&(o=pe()(i).format("YYYY-MM-DDTHH:mm:ss"));var a="datetime-local";(0,Qe.A)(o,{eleRef:t,type:a}).then((function(t){var i=(0,c.A)(r,"opt.rows",[]),o=null,a=null;if((0,ge.A)(i,(function(e,t){if((0,c.A)(e,"id","")===n)return o=e,a=t,!1})),(0,Ge.A)(o)){var s=pe()(t,"YYYY-MM-DDTHH:mm"),d=s.format("YYYY-MM-DDTHH:mm:ss.SSSZ");(0,Ke.A)(r,"opt.rows[".concat(a,"].").concat(e),d),r.refresh(),r.isModified=!0}else r.$alert("".concat(r.$t("ipEditNoIpData")),{type:"error"})}))}else r.$alert("".concat(r.$t("ipEditNoIpId")),{type:"error"})},modifyItemTimeBlockedById:function(e,t,i){var n=this;n.modifyItemByKeyAndId("timeBlocked",e,t,i)},deleteItemsCheck:function(){var e=this;if(0===(0,fe.A)(e.itemsCheck))return console.log("size(vo.itemsCheck) === 0",e.itemsCheck),void e.$alert("".concat(e.$t("anUnexpectedErrorOccurred")),{type:"error"});var t=(0,c.A)(e,"opt.rows",[]);t=(0,Re.A)(t),(0,ge.A)(e.itemsCheck,(function(e){var i=(0,c.A)(e,"data.id","");if(!(0,z.A)(i))return console.log("invalid id"),!0;t=(0,Ve.A)(t,(function(e){return e.id!==i}))})),e.itemsCheck=[],e.ips=(0,Re.A)(t),e.isModified=!0},saveIps:function(){var e=this;function t(){return i.apply(this,arguments)}function i(){return i=(0,ce.A)(le().mark((function t(){var i,n,r;return le().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=null,e.$ui.updateLoading(!0),!(0,z.A)(e.isError)){t.next=1;break}return e.$alert("".concat(e.isError),{type:"error"}),t.abrupt("return");case 1:return n=(0,c.A)(e,"opt.rows",[]),(0,fe.A)(n),r=e.userToken,t.next=2,e.$fapi.updateIpsList(r,n).catch((function(e){i=e}));case 2:if(null===i){t.next=3;break}return e.$alert("".concat(e.$t("ipSaveIpsFail"),": ").concat(i),{type:"error"}),t.abrupt("return");case 3:e.isModified=!1,e.$alert(e.$t("ipSaveIpsSuccess"));case 4:case"end":return t.stop()}}),t)}))),i.apply(this,arguments)}t().catch((function(t){console.log("catch",t),e.$alert(e.$t("anUnexpectedErrorOccurred"),{type:"error"})})).finally((function(){e.$ui.updateLoading(!1)}))}}},mt=gt,ft=(0,w.A)(mt,ut,pt,!1,null,"536c7c04",null),ht=ft.exports,vt={components:{WDrawer:re.A,WButtonCircle:ee.A,WListVertical:oe.A,LayoutContentStaInfor:He,LayoutContentUserInfor:Pe,LayoutContentUsers:rt,LayoutContentTokens:lt,LayoutContentIps:ht},props:{},data:function(){return{mdiArrowLeftBoldHexagonOutline:J.y6z,mdiArrowRightBoldHexagonOutline:J.bmu,menuKey:"mmStaInfor",panelWidth:0,panelHeight:0,drawer:!0,drawerWidth:230,drawerWidthMin:150,drawerWidthMax:350}},computed:{syncState:function(){var e=this;return(0,c.A)(e,"$store.state.syncState")},menus:function(){var e=this,t=[{key:"mmStaInfor",text:e.$t("mmStaInfor"),icon:J.aFw},{key:"mmUserInfor",text:e.$t("mmUserInfor"),icon:J.QKH},{key:"mmUsersList",text:e.$t("mmUsersList"),icon:J.dgQ},{key:"mmTokensList",text:e.$t("mmTokensList"),icon:J.lEv},{key:"mmIpsList",text:e.$t("mmIpsList"),icon:J.wDQ}];return t},menuActive:function(){var e=this,t=(0,ne.A)(e.menus,{key:e.menuKey});return t}},methods:{resize:function(e){var t=this;t.panelWidth=e.snew.clientWidth,t.panelHeight=e.snew.clientHeight}}},yt=vt,bt=(0,w.A)(yt,te,ie,!1,null,"4b7f92f4",null),xt=bt.exports,At={components:{WIcon:F.A,WPopup:X.A,WButtonCircle:ee.A,WTextSelect:K.A,LayoutContent:xt},props:{},data:function(){return{mdiAccountCircleOutline:J.gXw,mdiLogoutVariant:J.m76,t:null,firstSetting:!0,showLangSelect:!1,keysLang:["eng","cht"],kpLangSelect:{eng:"English",cht:"中文"},drawer:!0}},mounted:function(){var e=this;if(e.firstSetting){var t=(0,c.A)(e,"webInfor.showLanguage","");e.showLangSelect="y"===t;var i=(0,c.A)(e,"webInfor.language","");e.$ui.setLang(i,"layout mounted"),e.firstSetting=!1}e.t=setInterval((function(){(0,z.A)(e.userToken)&&e.$fapi.checkToken(e.userToken).catch((function(t){console.log("checkToken catch",t),e.logout()}))}),1e3)},beforeDestroy:function(){var e=this;clearInterval(e.t)},computed:{viewState:function(){var e=this;return(0,c.A)(e,"$store.state.viewState","")},heightToolbar:function(){var e=this;return(0,c.A)(e,"$store.state.heightToolbar",0)},userToken:function(){var e=this;return(0,c.A)(e,"$store.state.userToken")},webInfor:function(){var e=(0,c.A)(this,"$store.state.webInfor");return e},webName:{get:function(){var e=this,t=e.$t("webName","");return(0,z.A)(t)||(t=e.$t("waitingData","")),document.title=t,t}},webLogo:function(){var e=this;return(0,c.A)(e,"$store.state.webInfor.webLogo","")},lang:function(){var e=this;return(0,c.A)(e,"$store.state.lang","")},userSelf:function(){var e=this;return(0,c.A)(e,"$store.state.userSelf","")},userName:function(){var e=this;return(0,c.A)(e,"userSelf.name","")}},methods:{getLangText:function(e){var t=this,i=(0,c.A)(t,"kpLangSelect.".concat(e),"");return i},toggleLang:function(e){var t=this;t.$ui.setLang(e,"toggle")},logout:function(){var e=this;e.$ui.logout().then((function(){e.$ui.updateViewState("login"),console.log("logout, goto view['login'] page")})).catch((function(e){console.log("logout err[".concat(e,"]"))}))}}},wt=At,kt=(0,w.A)(wt,Z,Q,!1,null,"5cef4991",null),It=kt.exports,Ct={components:{LoadingWinBar:I,CheckYesNo:H,CheckYes:M,PageLogin:q,Layout:It},data:function(){return{autoLogining:!0}},beforeMount:function(){var e=this;e.$ui.setVo(e);var t=(0,c.A)(window,"___pmwsso___.language","");e.$ui.setLang(t,"app init")},mounted:function(){var e=this;if(window.$vo=e,e.autoLogining){var t=e.$ui.getUrlView();e.$ui.autoLogin({useRedir:"login"===t}).then((function(){e.$ui.updateViewState(t),e.autoLogining=!1,console.log("autoLogin, goto view[".concat(t,"] page"))})).catch((function(t){e.$ui.updateViewState("login"),e.autoLogining=!1,console.log("autoLogin err[".concat(t,"], goto view['login'] page"))}))}},computed:{syncState:function(){var e=this;return(0,c.A)(e,"$store.state.syncState")},viewState:function(){var e=this;return(0,c.A)(e,"$store.state.viewState","")},webKey:function(){var e=this;return(0,c.A)(e,"$store.state.webInfor.webKey","")}},methods:{resize:function(e){var t=this;t.$ui.syncHeight()}}},St=Ct,$t=(0,w.A)(St,m,f,!1,null,null,null),_t=$t.exports,Tt=i(7734),Et=i(9842),Ut="UpdateWebInfor",Ht="UpdateLang",Bt="UpdateKpText",Dt="UpdateSyncState",Lt="UpdateLoading",Nt="UpdateViewState",Yt="UpdateTableData",Mt="UpdateData",Wt="UpdateHeightApp",Pt="UpdateHeightAppEff",zt="UpdateHeightToolbar",Ft="UpdateMenu",Ot="UpdateUserToken",Kt="UpdateUserSelf",Vt=i(97),Rt=i(9651),Gt=i(7106),jt=(i(7286),"ips"),qt="IP使用者",Zt="IPs",Qt={id:{pk:!0,name:"主鍵",type:"STRING"},ip:{name:"IP",type:"STRING"},timeBlocked:{name:"封鎖時間",type:"STRING"}},Jt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Rt.A)(e,(0,he.A)(Qt));return t.id="".concat((0,Vt.A)()),t},Xt=function(){var e=[];return e},ei={keyTable:jt,tableNameCht:qt,tableNameEng:Zt,settings:Qt,funNew:Jt,funTest:Xt},ti=ei,ii="tokens",ni="金鑰",ri="Tokens",oi={id:{pk:!0,name:"主鍵",type:"STRING"},token:{name:"金鑰",type:"STRING"},userId:{name:"使用者主鍵",type:"STRING"},isApp:{name:"是否為應用系統",type:"STRING"},timeCreate:{name:"創建時間",type:"STRING"},timeEnd:{name:"到期時間",type:"STRING"},timeUpdate:{name:"更新時間",type:"STRING"}},ai=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Rt.A)(e,(0,he.A)(oi));return t.id="".concat((0,Vt.A)()),t.token="".concat((0,Vt.A)()),t.timeCreate=(0,Gt.A)(),t.timeEnd=ue().add(30,"minute").format("YYYY-MM-DDTHH:mm:ss.SSSZ"),t.timeUpdate=t.timeCreate,t},si=function(){var e=[];return e},ci={keyTable:ii,tableNameCht:ni,tableNameEng:ri,settings:oi,funNew:ai,funTest:si},di=ci,li="users",ui="使用者",pi="Users",gi={id:{pk:!0,name:"主鍵",type:"STRING"},order:{name:"順序",type:"INTEGER"},account:{name:"帳號",type:"STRING"},password:{name:"密碼",type:"STRING"},name:{name:"姓名",type:"STRING"},email:{name:"電子郵件",type:"STRING"},description:{name:"描述",type:"TEXT"},from:{name:"來源",type:"STRING"},redir:{name:"登入後轉址",type:"STRING"},isAdmin:{name:"是否為系統管理員",type:"STRING"},timeVerified:{name:"驗證時間",type:"STRING"},timeExpired:{name:"過期時間",type:"STRING"},timeBlocked:{name:"封鎖時間",type:"STRING"},userId:{name:"創建使用者主鍵",type:"STRING"},timeCreate:{name:"創建時間",type:"STRING"},userIdUpdate:{name:"最新變更使用者主鍵",type:"STRING"},timeUpdate:{name:"更新時間",type:"STRING"},isActive:{name:"是否有效",type:"STRING"}},mi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Rt.A)(e,(0,he.A)(gi));return t.id="".concat((0,Vt.A)()),t.timeCreate=(0,Gt.A)(),t.userIdUpdate=t.userId,t.timeUpdate=t.timeCreate,t.isActive="y",t},fi=function(){var e=[];return e},hi={keyTable:li,tableNameCht:ui,tableNameEng:pi,settings:gi,funNew:mi,funTest:fi},vi=hi,yi=i(3422),bi={ips:ti,tokens:di,users:vi},xi={};for(var Ai in bi)xi[Ai]=(0,yi.A)(bi[Ai],{useCreateStorage:!1});var wi,ki=xi,Ii={hostname:"".concat(window.location.origin),webInfor:{},connState:"csIng",syncState:!1,viewState:"login",loading:!1,settings:{leftDrawerWidth:200},heightApp:0,heightAppEff:0,heightToolbar:60,menu:{},userToken:"",userSelf:{},lang:"cht",kpText:{}};(0,ge.A)(ki,(function(e,t){Ii[t]=null}));var Ci=(wi={},(0,Et.A)((0,Et.A)((0,Et.A)((0,Et.A)((0,Et.A)((0,Et.A)((0,Et.A)((0,Et.A)((0,Et.A)((0,Et.A)(wi,Ut,(function(e,t){e.webInfor=t})),Ht,(function(e,t){e.lang=t})),Bt,(function(e,t){e.kpText=t})),Dt,(function(e,t){e.syncState=t})),Lt,(function(e,t){e.loading=t})),Nt,(function(e,t){e.viewState=t})),Yt,(function(e,t){e[t.tableName]=t.data})),Mt,(function(e,t){(0,Ke.A)(e,t.path,t.data)})),Wt,(function(e,t){e.heightApp=t})),Pt,(function(e,t){e.heightAppEff=t})),(0,Et.A)((0,Et.A)((0,Et.A)((0,Et.A)(wi,zt,(function(e,t){e.heightToolbar=t})),Ft,(function(e,t){e.menu=t})),Ot,(function(e,t){e.userToken=t})),Kt,(function(e,t){e.userSelf=t})));s.Ay.use(Tt.Ay);var Si=new Tt.Ay.Store({state:Ii,mutations:Ci,getters:r,actions:o,strict:!0});Si.types=n,s.Ay.prototype.$store=Si;var $i=Si,_i=i(3360),Ti=i(106),Ei=(i(3959),i(6207),i(6035)),Ui=(i(7372),{csIng:{eng:"Connecting...",cht:"連線中..."},csLogin:{eng:"Logged in",cht:"已登入"},csLogout:{eng:"Logged out",cht:"已登出"},csErrConn:{eng:"Unable to connect",cht:"無法連線"},csErrLogin:{eng:"Login denied",cht:"拒絕登入"},aggridLanguage:{eng:"en",cht:"zh-tw"},id:{eng:"ID",cht:"主鍵"},systemMessage:{eng:"System message",cht:"系統確認訊息"},ok:{eng:"OK",cht:"確認"},no:{eng:"No",cht:"取消"},yes:{eng:"Yes",cht:"確定"},y:{eng:"Yes",cht:"是"},n:{eng:"No",cht:"否"},empty:{eng:"Empty",cht:"無"},to:{eng:"To",cht:"至"},at:{eng:"At",cht:"於"},unknow:{eng:"Unknow",cht:"未知"},waitingData:{eng:"Waiting data...",cht:"等待數據中..."},isEditabled:{eng:"Editable",cht:"是否編輯"},saveChanges:{eng:"Save changes",cht:"儲存變更"},from:{eng:"From",cht:"來源"},save:{eng:"Save",cht:"儲存"},close:{eng:"Close",cht:"關閉"},cancel:{eng:"Cancel",cht:"取消"},processing:{eng:"Processing...",cht:"處理中請稍後..."},anUnexpectedErrorOccurred:{eng:"An unexpected error occurred, please contact the administrator",cht:"發生非預期錯誤,請洽管理員"},getDataError:{eng:"Failed to get data, please try again later",cht:"取得數據失敗,請稍後再試"},userIdCreate:{eng:"ID of the created user",cht:"創建使用者主鍵"},timeCreate:{eng:"Created time",cht:"創建時間"},userIdUpdate:{eng:"ID of the updated user",cht:"最新變更使用者主鍵"},timeUpdate:{eng:"Updated time",cht:"最新變更時間"},userId:{eng:"ID of the user",cht:"使用者主鍵"},account:{eng:"Account",cht:"帳號"},password:{eng:"Password",cht:"密碼"},toggleToShowPassword:{eng:"To show password",cht:"變更為顯示密碼模式"},toggleToHidePassword:{eng:"To hide password",cht:"變更為隱藏密碼模式"},username:{eng:"Username",cht:"使用者姓名"},email:{eng:"Email",cht:"電子郵件"},name:{eng:"Name",cht:"名稱"},description:{eng:"Description",cht:"說明"},noDescription:{eng:"No description",cht:"無說明"},redir:{eng:"Redirect",cht:"登入後轉至網址"},login:{eng:"Log in",cht:"登入"},logout:{eng:"Log out",cht:"登出"},menuTreeShow:{eng:"Show menu",cht:"顯示選單"},menuTreeHide:{eng:"Hide menu",cht:"隱藏選單"},mmStaInfor:{eng:"Statistics information",cht:"統計資訊"},mmStaInforMsg:{eng:"Provides important statistical information such as the current system user login frequency, key usage frequency, IP connection frequency, etc.",cht:"提供目前系統使用者登入頻率、金鑰使用頻率、IP連線頻率等重要統計資訊。"},mmUserInfor:{eng:"User information",cht:"使用者資訊"},mmUsersList:{eng:"Users list",cht:"使用者清單"},mmUsersListMsg:{eng:"Provide a list of users, which can be added, edited, deleted, etc.",cht:"提供目前使用者資料清單,可進行新增、編輯、刪除等作業。"},mmTokensList:{eng:"Tokens list",cht:"金鑰清單"},mmTokensListMsg:{eng:"Provide a list of tokens, which can be deleted, etc.",cht:"提供目前金鑰資料清單,可進行強制登出等作業。"},mmIpsList:{eng:"Ips list",cht:"IP清單"},mmIpsListMsg:{eng:"Provide a list of tokens, which can be deleted, etc.",cht:"提供目前存取IP清單,可進行封鎖等作業。"},nowTokensList:{eng:"Tokens list",cht:"金鑰清單"},nowBlockList:{eng:"Block list",cht:"封鎖清單"},systemTokenList:{eng:"System token list",cht:"系統金鑰清單"},failedLoginForNoWebKey:{eng:"Can not get the web key",cht:"無有效站台唯一識別資訊"},failedLoginForNoToken:{eng:"Can not get the token",cht:"無有效金鑰"},failedLoginForNoRedir:{eng:"Can not get the url for redirection",cht:"無有效轉址"},failedLoginForCatch:{eng:"User account or password is incorrect",cht:"使用者帳密錯誤無法登入"},failedLogoutForNoWebKey:{eng:"Can not get the web key",cht:"無有效站台唯一識別資訊"},failedLogoutForCatch:{eng:"Can not logout",cht:"使用者登出失敗"},userStatus:{eng:"Status",cht:"帳號狀態"},isVerified:{eng:"Verified",cht:"帳號是否驗證"},isVerifiedY:{eng:"Verified",cht:"帳號已驗證"},isVerifiedN:{eng:"Not verified",cht:"帳號未驗證"},userTimeVerified:{eng:"Verified time",cht:"帳號驗證狀態與時間"},isVerifiedWaiting:{eng:"Waiting for verification",cht:"等待驗證中"},isExpired:{eng:"Expired",cht:"帳號是否過期"},isExpiredY:{eng:"Expired",cht:"帳號已過期"},isExpiredN:{eng:"Not expired",cht:"帳號未過期"},userTimeExpired:{eng:"Expired time",cht:"帳號過期狀態與時間"},isExpiredDeny:{eng:"Account login prohibited",cht:"禁止帳號登入"},isExpiredNever:{eng:"Never expires",cht:"永不過期"},isBlocked:{eng:"Blocked",cht:"帳號是否被封鎖"},isBlockedY:{eng:"Blocked",cht:"帳號已封鎖"},isBlockedN:{eng:"Not blocked",cht:"帳號未封鎖"},userTimeBlocked:{eng:"Blocked time",cht:"帳號封鎖狀態與時間"},isBlockedNormalStatus:{eng:"Normal status",cht:"狀態正常"},isAdmin:{eng:"Administrator",cht:"是否為系統管理者"},isAdminY:{eng:"System Administrator",cht:"系統管理者"},isAdminN:{eng:"Non-System Administrator",cht:"非系統管理者"},userRole:{eng:"Role",cht:"角色"},userRoleAdmin:{eng:"Administrator",cht:"系統管理者"},userRoleGeneral:{eng:"General",cht:"一般使用者"},isActive:{eng:"Active",cht:"帳號是否有效"},isActiveY:{eng:"Active",cht:"帳號有效"},isActiveMsgY:{eng:"Enabling",cht:"啟用中"},isActiveN:{eng:"Inactive",cht:"帳號無效"},isActiveMsgN:{eng:"Deactivated",cht:"已停用"},errInNames:{eng:"Name errors",cht:"名稱出現錯誤待修復"},errInAccounts:{eng:"Account errors",cht:"帳號出現錯誤待修復"},errInEmails:{eng:"Email errors",cht:"Email出現錯誤待修復"},errItemsByRedir:{eng:"Redirect errors",cht:"登入後轉址出現錯誤待修復"},modeEdit:{eng:"Edit mode",cht:"編輯模式"},showTabCols:{eng:"Show columns",cht:"顯示欄位"},userList:{eng:"User list",cht:"使用者清單"},userName:{eng:"Name of user",cht:"使用者名稱"},userNameEmpty:{eng:"Invalid name of user",cht:"尚未給予有效使用者名稱"},userNameDuplicate:{eng:"Duplicate name of user",cht:"使用者名稱出現重複"},userAccountEmpty:{eng:"Invalid account of user",cht:"尚未給予有效使用者帳號"},userAccountDuplicate:{eng:"Duplicate account of user",cht:"使用者帳號出現重複"},userEmailEmpty:{eng:"Empty email of user",cht:"尚未給予使用者Email"},userEmailError:{eng:"Invalid email of user",cht:"使用者Email格式錯誤"},userEmailDuplicate:{eng:"Duplicate email of user",cht:"使用者Email出現重複"},userRedirEmpty:{eng:"Invalid redirect of user",cht:"尚未給予有效登入後轉址"},userTimeEmpty:{eng:"Invalid time",cht:"無"},userAddEmpty:{eng:"No user",cht:"尚未新增使用者資料"},userAdd:{eng:"Add user",cht:"新增使用者"},userAddNameNew:{eng:"New user",cht:"新使用者"},userAddIdNew:{eng:"Waiting generation",cht:"待自動給予"},userCopy:{eng:"Copy user",cht:"複製使用者"},userCopyNameNew:{eng:"copy",cht:"複製"},userDeleteCheckUsers:{eng:"Delete user(s)",cht:"刪除勾選使用者"},userResetPassword:{eng:"Reset password",cht:"重設密碼"},userSaveUsersEmpty:{eng:"No user",cht:"未有變更使用者資料"},userSaveUsersFail:{eng:"Failed to save users",cht:"儲存使用者數據失敗"},userSaveUsersSuccess:{eng:"Save users successfully",cht:"儲存使用者數據成功"},userEditNoUserId:{eng:"Can not find the id of user",cht:"無法找到使用者Id"},userEditNoUserData:{eng:"Can not find the data of user",cht:"無法找到使用者數據"},token:{eng:"Token",cht:"金鑰"},isApp:{eng:"For app",cht:"是否為應用系統金鑰"},tokenTimeCreate:{eng:"Created time",cht:"金鑰創建時間"},tokenTimeEnd:{eng:"End time",cht:"金鑰到期時間"},tokenTimeUpdate:{eng:"End time",cht:"金鑰更新時間"},tokenDeleteCheckTokens:{eng:"Delete token(s)",cht:"刪除勾選金鑰"},tokenTimeEmpty:{eng:"Invalid time",cht:"無"},tokenEditNoTokenId:{eng:"Can not find the id of token",cht:"無法找到金鑰Id"},tokenEditNoTokenData:{eng:"Can not find the data of token",cht:"無法找到金鑰數據"},tokenSaveTokensFail:{eng:"Failed to save tokens",cht:"儲存金鑰數據失敗"},tokenSaveTokensSuccess:{eng:"Save tokens successfully",cht:"儲存金鑰數據成功"},ip:{eng:"IP",cht:"IP"},ipTimeBlocked:{eng:"Blocked time",cht:"IP封鎖時間"},ipDeleteCheckIps:{eng:"Delete checked IP(s)",cht:"刪除勾選IP"},ipTimeEmpty:{eng:"Invalid time",cht:"無"},ipEditNoIpId:{eng:"Can not find the id of IP",cht:"無法找到IP Id"},ipEditNoIpData:{eng:"Can not find the data of IP",cht:"無法找到IP數據"},ipSaveIpsFail:{eng:"Failed to save IPs",cht:"儲存IP數據失敗"},ipSaveIpsSuccess:{eng:"Save IPs successfully",cht:"儲存IP數據成功"},statisticsInformation:{eng:"Statistics Information",cht:"統計資訊"},statisticsInformationDescription:{eng:"Provides an overview of system usage and security metrics.",cht:"提供系統使用情況和安全指標的總覽。"},userGroupInfor:{eng:"User Information",cht:"使用者資訊區"},totalUsers:{eng:"Total Users",cht:"總使用者"},activeUsers:{eng:"Active Users",cht:"活躍使用者"},blockedUsers:{eng:"Blocked Users",cht:"已封鎖使用者"},expiredUsers:{eng:"Expired Users",cht:"已過期使用者"},accessActivityMonitoring:{eng:"Access Activity Monitoring",cht:"存取活動監測"},userLoginFrequency:{eng:"User Login Frequency",cht:"使用者登入頻率"},last7Days:{eng:"Last 7 days",cht:"最近7天"},tokenUsageFrequency:{eng:"Token Usage Frequency",cht:"金鑰使用頻率"},ipConnectionFrequency:{eng:"IP Connection Frequency",cht:"IP 連線頻率"},controlStatus:{eng:"Control Status",cht:"管控狀態"},tokenCharacteristic:{eng:"Token Characteristic",cht:"金鑰狀態"},activeTokens:{eng:"Active Tokens",cht:"有效金鑰數量"},createdLast24h:{eng:"Created in last 24h",cht:"最近24小時內創建"},endingNext24h:{eng:"Ending in next 24h",cht:"未來24小時內到期"},endedTokens:{eng:"Ended Tokens",cht:"已到期金鑰數量"},ipCharacteristic:{eng:"IP Characteristic",cht:"IP狀態"},conn24h:{eng:"Connections in last 24h",cht:"最近24小時內連線數量"},blockedIps:{eng:"Blocked IPs",cht:"當前已封鎖IP數量"},selectItem1hr:{eng:"1 hour",cht:"1小時"},selectItem4hr:{eng:"4 hour",cht:"4小時"},selectItem8hr:{eng:"8 hour",cht:"8小時"},selectItem1day:{eng:"1 day",cht:"1日"},countAttempt:{eng:"Attempt",cht:"嘗試登入"},countSuccess:{eng:"Success",cht:"登入成功"},countError:{eng:"Error",cht:"登入失敗"},count:{eng:"Count",cht:"總次數"},showIndividually:{eng:"Show individually",cht:"個別顯示"},numberOrder:{eng:"No.",cht:"排序"},total:{eng:"Total",cht:"總計"},last1Day:{eng:"Last 1 day",cht:"最近1天"},last8Hour:{eng:"Last 8 hour",cht:"最近8小時"},last4Hour:{eng:"Last 4 hour",cht:"最近4小時"},last1Hour:{eng:"Last 1 hour",cht:"最近1小時"},showMax5:{eng:"Show max 5 rows",cht:"顯示前5筆"},showAll:{eng:"Show all",cht:"顯示全部"},dayCreate:{eng:"Create day",cht:"創建日期"},newUser:{eng:"New user",cht:"新使用者"},failedToAddUser:{eng:"Failed to add the user",cht:"新增使用者失敗"},successfulToAddUser:{eng:"Add the user successfully",cht:"新增使用者成功"},confirmToDeleteUser:{eng:"Do you want to delete the user[{name}]?",cht:"確認是否刪除使用者"},failedToDeleteUser:{eng:"Failed to delete the user",cht:"刪除使用者失敗"},successfulToDeleteUser:{eng:"Delete the user successfully",cht:"刪除使用者成功"},cannotShowUserDetailsInViewMode:{eng:"Can not show the user details in the view mode",cht:"非編輯模式無法查閱使用者詳細資訊"},allDefaults:{eng:"All defaults",cht:"全部項目預設值"},show:{eng:"Show",cht:"顯示"},active:{eng:"Active",cht:"啟用"},showChildren:{eng:"Show children",cht:"所屬顯示"},hideChildren:{eng:"Hide children",cht:"所屬不顯示"},activateChildren:{eng:"Activate children",cht:"所屬啟用"},deactivateChildren:{eng:"Deactivate children",cht:"所屬不啟用"},isUsernameEmpty:{eng:"Username is empty",cht:"使用者名稱不得為空"},failedToSaveUser:{eng:"Failed to save the user",cht:"變更使用者失敗"},successfulToSaveUser:{eng:"Save the user successfully",cht:"變更使用者成功"}}),Hi=Ui;function Bi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Di(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Bi(Object(i),!0).forEach((function(t){(0,Et.A)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Bi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var Li=s.Ay.prototype;function Ni(e){Li=e}function Yi(e){Li.$store.commit(Li.$store.types.UpdateLoading,e)}function Mi(e){Li.$store.commit(Li.$store.types.UpdateViewState,e)}function Wi(e){Li.$store.commit(Li.$store.types.UpdateUserToken,e)}function Pi(e){Li.$store.commit(Li.$store.types.UpdateUserSelf,e)}function zi(){function e(t){(0,ge.A)(t,(function(t){t.$forceUpdate(),t.$children&&e(t.$children)}))}e(Li.$children)}function Fi(e){return"eng"!==e&&"cht"!==e&&(e="eng"),e}function Oi(){var e="";if(!(0,z.A)(e)){var t=(0,c.A)(window,"___pmwsso___.language","");(0,z.A)(t)&&(e=Fi(t))}if(!(0,z.A)(e)){var i=(0,c.A)(Li,"$store.state.lang","");(0,z.A)(i)&&(e=Fi(i))}return(0,z.A)(e)?e:"eng"}function Ki(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e=(0,z.A)(e)?Fi(e):Oi();var t=(0,c.A)(Li,"$store.state.lang","");e!==t&&Li.$store.commit(Li.$store.types.UpdateLang,e),Vi(e),zi()}function Vi(e){var t={};t=Di(Di({},t),Hi);var i=(0,c.A)(Li,"$store.state.webInfor.kpLangExt",{});(0,Ge.A)(i)&&(t=Di(Di({},t),i));var n=(0,c.A)(Li,"$store.state.webInfor.webName",{});(0,Ge.A)(n)&&(t=Di(Di({},t),{},{webName:Di({},n)}));var r=(0,c.A)(Li,"$store.state.webInfor.webDescription",{});(0,Ge.A)(r)&&(t=Di(Di({},t),{},{webDescription:Di({},r)}));var o={};(0,ge.A)(t,(function(t,i){o[i]=t[e]})),Li.$store.commit(Li.$store.types.UpdateKpText,o)}function Ri(e){var t=(0,c.A)(Li,"$store.state.kpText"),i=(0,c.A)(t,e,"");return(0,z.A)(i)||(i=e),i}function Gi(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=(0,c.A)(e,t,"");if(!(0,z.A)(n)){var r=Ri("empty");return r}return(0,Ti.A)(i)&&(n=i(n)),n}function ji(){var e=(0,c.A)(Li,"$store.state.heightToolbar"),t=window.innerHeight-e;return Li.$store.commit(Li.$store.types.UpdateHeightApp,window.innerHeight),Li.$store.commit(Li.$store.types.UpdateHeightAppEff,t),""}function qi(){var e={};try{var t=new URLSearchParams(window.location.search);t.forEach((function(t,i){e[i]=t}))}catch(i){console.log("err",i)}return e}function Zi(){var e=qi(),t=(0,c.A)(e,"view","");return""===t&&(t="login"),"login"!==t&&"backstage"!==t&&(console.log("invalid view[".concat(t,"]")),t="login"),t}function Qi(e,t){e=e.replaceAll("{token}",t),window.location.href=e}function Ji(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,c.A)(i,"useRedir",!1),r=(0,$.A)();function o(){return a.apply(this,arguments)}function a(){return a=(0,ce.A)(de.mark((function i(){var o,a,s,d,l;return de.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return Yi(!0),i.next=1,(0,_i.A)(1e3);case 1:if(o=(0,c.A)(Li,"$store.state.webInfor.webKey",""),(0,z.A)(o)){i.next=2;break}return Li.$alert(Li.$t("failedLoginForNoWebKey"),{type:"error"}),r.reject("invalid $keyLS"),i.abrupt("return");case 2:return i.next=3,Li.$fapi.loginByAccountAndPassword(e,t);case 3:return a=i.sent,s="".concat(o,":userToken"),i.next=4,localStorage.setItem(s,"");case 4:if((0,Ge.A)(a)){i.next=5;break}return r.reject("invalid user"),i.abrupt("return");case 5:if(d=(0,c.A)(a,"token",""),(0,z.A)(d)){i.next=6;break}return Li.$alert(Li.$t("failedLoginForNoToken"),{type:"error"}),r.reject("invalid token"),i.abrupt("return");case 6:return i.next=7,localStorage.setItem(s,d);case 7:if(Wi(d),Pi(a),!n){i.next=9;break}if(l=(0,c.A)(a,"redir",""),(0,z.A)(l)){i.next=8;break}return Li.$alert(Li.$t("failedLoginForNoRedir"),{type:"error"}),r.reject("invalid redir"),i.abrupt("return");case 8:return Qi(l,d),r.resolve("redir"),i.abrupt("return");case 9:Yi(!1),r.resolve("done");case 10:case"end":return i.stop()}}),i)}))),a.apply(this,arguments)}return o().catch((function(e){Li.$alert(Li.$t("failedLoginForCatch"),{type:"error"}),r.reject(e),Yi(!1)})),r}function Xi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,c.A)(e,"useRedir",!1),i=(0,$.A)();function n(){return r.apply(this,arguments)}function r(){return r=(0,ce.A)(de.mark((function e(){var n,r,o,a,s,d;return de.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=null,e.next=1,(0,Ei.A)((function(){return(0,c.A)(Li,"$store.state.syncState",!1)}));case 1:if(r=(0,c.A)(Li,"$store.state.webInfor.webKey",""),(0,z.A)(r)){e.next=2;break}return Li.$alert(Li.$t("failedLoginForNoWebKey"),{type:"error"}),i.reject("invalid $keyLS"),e.abrupt("return");case 2:return o="".concat(r,":userToken"),e.next=3,localStorage.getItem(o);case 3:if(a=e.sent,(0,z.A)(a)){e.next=4;break}return i.reject("invalid token"),e.abrupt("return");case 4:return e.next=5,Li.$fapi.checkToken(a).catch((function(e){n=e}));case 5:if(!n){e.next=7;break}return e.next=6,localStorage.setItem(o,"");case 6:return i.reject("token error"),e.abrupt("return");case 7:return e.next=8,Li.$fapi.getUserByToken(a);case 8:if(s=e.sent,(0,Ge.A)(s)){e.next=9;break}return i.reject("invalid user"),e.abrupt("return");case 9:if(Wi(a),Pi(s),!t){e.next=11;break}if(d=(0,c.A)(s,"redir",""),(0,z.A)(d)){e.next=10;break}return Li.$alert(Li.$t("failedLoginForNoRedir"),{type:"error"}),i.reject("invalid redir"),e.abrupt("return");case 10:return Qi(d,a),i.resolve("redir"),e.abrupt("return");case 11:i.resolve("done");case 12:case"end":return e.stop()}}),e)}))),r.apply(this,arguments)}return n().catch((function(e){Li.$alert(Li.$t("failedLoginForCatch"),{type:"error"}),i.reject(e)})),i}function en(){var e=(0,$.A)();function t(){return i.apply(this,arguments)}function i(){return i=(0,ce.A)(de.mark((function e(){var t,i,n;return de.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=(0,c.A)(Li,"$store.state.webInfor.webKey",""),(0,z.A)(t)){e.next=1;break}return Li.$alert(Li.$t("failedLogoutForNoWebKey"),{type:"error"}),e.abrupt("return",Promise.reject("invalid $keyLS"));case 1:return i="".concat(t,":userToken"),e.next=2,localStorage.getItem(i);case 2:return n=e.sent,e.next=3,Li.$fapi.logoutByToken(n).catch((function(){}));case 3:return e.next=4,localStorage.setItem(i,"");case 4:case"end":return e.stop()}}),e)}))),i.apply(this,arguments)}return t().then((function(){e.resolve("done")})).catch((function(t){Li.$alert(Li.$t("failedLogoutForCatch"),{type:"error"}),e.reject(t)})),e}var tn={warning:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAhCAYAAACxzQkrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOS8xOS8yNP52YhIAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAADMklEQVRYha2WTWgTQRiGn0k2SU2KNQjmoiL+gGAVD/5gEelAkSKOiILei+hBRAQv/tBDsQiK1CJFDz331tNePAjRm60eBL0pXsSDF+dimmzbZDzsRJNmm+xPXliyOzP7zrNfvpn5hDGGJNJSHQJmAQHcLpbdL0n8RBIgLdVhYBHYb5u+AZeLZfdzXM9UbBpfC8AB/OgIe7+QxDA2kJZqAhgO6Bq2fbEU6y/TUuWB70BpkyG/gL3FsrsS1TtuhO53gcH23Y9jHDlCWqqd+Mmb6zHUA/YVy+7PKP5xIvQkBAx2zNOo5pEipKU6Bnzo6Kg3/N904PcdL5bdj2HniBqh2bYnITDVGmQcyDj+vRDd3+kXkJbqEjDS2mYqK2THTjO0MMfQwhzZsdOYSsfCGrHv9g9IS+UAz9oajUFkHPITV0mVSqRKJfITVxAZBzrT4Jn16A8QcBvY0w4EZDL+/mw8/xIpv60zLfdYj+RAWqrtwGRgpzHQaJm90QiKTlOT1isZEPAI2BpiXC9ttV5d1RVIS3UQuN4HmKZuWM94QMBMiDFRJKznptp0Mi3VGDDeR5imxq13eCB95iz0+JKEmtFj58IDkc5dI7jWaZcQ7cdFOhW0UwdpmHr6WiggLVUBmO4NA6bmYSpVEIMgBjGVKqbm+ZnSW9N2ru5AwANgR28gf9bKzDxry+9ZW35PZWa+ra+Hdti52m1bT3st1S7gK+HKi/+Ha73uP6fTiC0D3TbHjfKAA8Wy+6PZsDFCT0PDAGAQ2Qys12G97t8HnBtd1FEz/YuQluoEsBTFjXoDnDQ5u4o9940PF1wXddPJYtldBmg9gZ9HdTG1GoMPb5G9cBEAZ+9u/ky/QBTyUa2eY0ubFICWSgGnotEYxEAO59gRoAJUcI4fQQzkouRQU6csAykt1TZgKqqDn9Aeq6/fAQWgwOrrt5iqF3aVbdSUlmpI/B49vwiErujaZAxmbZ3syaMArC598gu0eEAAi+L36PkakVZWANRKFQCR35IEBqCaAl4mcUAIRCHvJ3IyGIBXjhHcEYYGcJMkkUomD5gziLut+9Bj4DKQJeLulkACWAUWi2X3HsBfLU4ARuGaUEMAAAAASUVORK5CYII="};function nn(e){var t=(0,c.A)(tn,e,"");return(0,z.A)(t)||console.log("invalid icon[".concat(e,"]")),t}var rn={setVo:Ni,updateLoading:Yi,updateViewState:Mi,updateUserToken:Wi,updateUserSelf:Pi,forceUpdate:zi,setLang:Ki,getKpText:Ri,gv:Gi,syncHeight:ji,parseUrlParams:qi,getUrlView:Zi,goUrl:Qi,login:Ji,autoLogin:Xi,logout:en,getIcon:nn},on=rn;function an(e){function t(t,i,n){var r=(0,ne.A)(e,(0,Et.A)({},t,i));return r||(r=""),(0,z.A)(n)&&(r=(0,c.A)(r,n,"")),r}function i(e){return t("keyTable",e,"tableNameCht")}return{getTableInforBy:t,getTableChtByKey:i}}var sn=an;function cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"name",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=function(i){var n=!1;return(0,ge.A)(e,(function(e){var r=(0,c.A)(e,t,"");if(r===i)return n=!0,!1})),n},o="",a=!0,s=0;while(a){s++;var d="";(0,z.A)(i)&&(d="".concat(i," - ")),o="".concat(d).concat(n,"(").concat(s,")"),a=r(o)}return o}function dn(e){var t=(0,c.A)(e,"timeVerified","");return(0,Le.A)(t)}function ln(e){var t=(0,c.A)(e,"timeExpired","");if(!(0,Le.A)(t))return!1;var i=ue().format("YYYY-MM-DDTHH:mm:ss.SSSZ");return i>=t}function un(e){var t=(0,c.A)(e,"timeBlocked","");if(!(0,Le.A)(t))return!1;var i=ue().format("YYYY-MM-DDTHH:mm:ss.SSSZ");return i<=t}function pn(e){var t=(0,c.A)(e,"timeEnd","");if(!(0,Le.A)(t))return!1;var i=ue().format("YYYY-MM-DDTHH:mm:ss.SSSZ");return i>t}function gn(e){var t=(0,c.A)(e,"isAdmin","");return"y"===t}function mn(e){var t=(0,c.A)(e,"isActive","");return"y"===t}function fn(e){var t=dn(e),i=!ln(e),n=!un(e),r=mn(e),o=t&&i&&n&&r;return o}function hn(e){var t=dn(e),i=!ln(e),n=!un(e),r=gn(e),o=mn(e),a=t&&i&&n&&r&&o;return a}s.Ay.config.productionTip=!1,s.Ay.prototype.$alert=function(){var e=Array.prototype.slice.call(arguments),t=e[0],i=e[1];console.log(t,i),"close"!==t&&(0,l.A)(t,i)};var vn=sn(ki);s.Ay.prototype.$ui=on,s.Ay.prototype.$t=on.getKpText,s.Ay.prototype.$s=a,s.Ay.prototype.$dssm=vn,s.Ay.prototype.$ds=ki,s.Ay.prototype.$dg={},s.Ay.directive("domresize",(0,p.A)()),s.Ay.directive("dommutation",(0,u.A)()),s.Ay.directive("domdragdrop",(0,g.A)()),(0,d.A)({showLog:!1,url:window.location.origin+window.location.pathname,useWaitToken:!1,apiName:"api",tokenType:"Bearer",getToken:function(){var e=(0,c.A)(s.Ay.prototype,"$store.state.userToken","");return e},getServerMethods:function(e){s.Ay.prototype.$fapi=e,e.getWebInfor().then((function(e){s.Ay.prototype.$store.commit(s.Ay.prototype.$store.types.UpdateWebInfor,e),on.setLang(null,"get webInfor"),s.Ay.prototype.$store.commit(s.Ay.prototype.$store.types.UpdateSyncState,!0)})).catch((function(e){console.log(e)}))},recvData:function(e){s.Ay.prototype.$store.commit(s.Ay.prototype.$store.types.UpdateTableData,e)}}),new s.Ay({store:$i,render:function(e){return e(_t)}}).$mount("#app")},9297:function(e){function t(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=function(){return[]},t.resolve=t,t.id=9297,e.exports=t}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}i.m=e,function(){var e=[];i.O=function(t,n,r,o){if(!n){var a=1/0;for(l=0;l<e.length;l++){n=e[l][0],r=e[l][1],o=e[l][2];for(var s=!0,c=0;c<n.length;c++)(!1&o||a>=o)&&Object.keys(i.O).every((function(e){return i.O[e](n[c])}))?n.splice(c--,1):(s=!1,o<a&&(a=o));if(s){e.splice(l--,1);var d=r();void 0!==d&&(t=d)}}return t}o=o||0;for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[n,r,o]}}(),function(){i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,{a:t}),t}}(),function(){i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){var e={524:0};i.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,o,a=n[0],s=n[1],c=n[2],d=0;if(a.some((function(t){return 0!==e[t]}))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(c)var l=c(i)}for(t&&t(n);d<a.length;d++)o=a[d],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(l)},n=self["webpackChunkw_web_sso"]=self["webpackChunkw_web_sso"]||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var n=i.O(void 0,[504],(function(){return i(7061)}));n=i.O(n)})();
//# sourceMappingURL=app.1149d187.js.map