芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/cloud.pulsehost.co.uk/adminpanel/js/app.abe471e0.js
(()=>{var e={8810:(e,E,_)=>{"use strict";var A=_(1957),t=_(1947),a=_(499),o=_(9835);const T={id:"q-app"};function n(e,E,_,A,t,a){const n=(0,o.up)("router-view"),s=(0,o.up)("UnsavedChangesDialog");return(0,o.wg)(),(0,o.iD)("div",T,[(0,o.Wm)(n),(0,o.Wm)(s,{ref:"unsavedChangesDialog"},null,512)])}_(9665);var s=_(4409),r=_.n(s),i=_(4089),N=_(9986),R=_(7214);function O(e,E,_,A,t,a){const T=(0,o.up)("q-card-section"),n=(0,o.up)("q-btn"),s=(0,o.up)("q-card-actions"),r=(0,o.up)("q-card"),i=(0,o.up)("q-dialog"),N=(0,o.Q2)("t");return(0,o.wg)(),(0,o.j4)(i,{modelValue:t.confirm,"onUpdate:modelValue":E[0]||(E[0]=e=>t.confirm=e),persistent:""},{default:(0,o.w5)((()=>[(0,o.Wm)(r,{style:{"min-width":"300px"}},{default:(0,o.w5)((()=>[(0,o.Wm)(T,null,{default:(0,o.w5)((()=>[(0,o.wy)((0,o._)("span",null,null,512),[[N,"COREWEBCLIENT.CONFIRM_DISCARD_CHANGES"]])])),_:1}),(0,o.Wm)(s,{align:"right"},{default:(0,o.w5)((()=>[(0,o.Wm)(n,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",onClick:a.discard,label:e.$t("COREWEBCLIENT.ACTION_OK")},null,8,["onClick","label"]),(0,o.Wm)(n,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"secondary",onClick:a.cancel,label:e.$t("COREWEBCLIENT.ACTION_CANCEL")},null,8,["onClick","label"])])),_:1})])),_:1})])),_:1},8,["modelValue"])}const I={name:"UnsavedChangesDialog",data(){return{confirm:!1,next:null}},methods:{openConfirmDiscardChangesDialog:async function(e){this.next=e,this.confirm=!0},discard(){r().isFunction(this.next)&&this.next(),this.confirm=!1},cancel(){this.confirm=!1}}};var L=_(1639),S=_(7743),l=_(4458),C=_(3190),d=_(1821),c=_(8879),D=_(9984),u=_.n(D);const P=(0,L.Z)(I,[["render",O]]),h=P;u()(I,"components",{QDialog:S.Z,QCard:l.Z,QCardSection:C.Z,QCardActions:d.Z,QBtn:c.Z});const B={methods:{_getParentComponent:function(e){let E=null,_=this.$parent;while(_&&!E)_.$options.name===e&&(E=_),_=_.$parent;return E},doBeforeRouteLeave:function(e,E,_){const A=this._getParentComponent("App"),t=A?A.$refs.unsavedChangesDialog:null;r().isFunction(this.hasChanges)&&this.hasChanges()&&r().isFunction(t?.openConfirmDiscardChangesDialog)?t.openConfirmDiscardChangesDialog((()=>{this.revertChanges&&this.revertChanges(),_()})):_()}}},p=(0,o.aZ)({mixins:[B],name:"App",components:{UnsavedChangesDialog:h},meta(){return{title:this.siteName}},computed:{isUserSuperAdminOrTenantAdmin:function(){return this.$store.getters["user/isUserSuperAdminOrTenantAdmin"]},siteName:function(){return this.$store.getters["main/getSiteName"]}},watch:{isUserSuperAdminOrTenantAdmin:function(){const e=this.$router.currentRoute.value,E=e?.path,_=i.Z.pArray(e?.matched),A=R.Z.checkRouteExistsAndAllowed(_);_.length>0&&E!==A&&this.$router.push(A)}},methods:{handleMessageEvent(e){e&&e.origin===window.location.origin&&e.data&&"logout"===e.data.eventName&&N.Z.logout((()=>{window.parent.postMessage({eventName:"after-logout"},e.origin)}))}},mounted(){window.frameElement?window.addEventListener("message",this.handleMessageEvent):window.document.getElementsByTagName("body")[0].classList.add("body-background")},beforeUnmount(){window.removeEventListener("message",this.handleMessageEvent)}}),U=(0,L.Z)(p,[["render",n]]),m=U;var M=_(8936),G=_(3340),F=_(8339);const g=[{component:()=>Promise.all([_.e(4736),_.e(3064),_.e(2744)]).then(_.bind(_,476)),name:"app-not-loaded",path:"/app-not-loaded"}],y=g;var f=_(1088);const w=(0,G.BC)((function(){const e=F.r5,E=(0,F.p7)({scrollBehavior:()=>({left:0,top:0}),routes:y,history:e("")});let _=!1,A=!1,t=!0;return E.beforeEach((async(e,a,o)=>{if(A&&"/app-not-loaded"===e.path)o();else try{if(await N.Z.init(),!_)return R.Z.getRoutes().forEach((e=>{const{name:_,path:A,component:t,children:a}=e,o={name:_,path:A,component:t};a&&(o.children=a),E.addRoute(_,o)})),_=!0,void o(e.path);if(t&&M["default"].getters["user/isUserSuperAdminOrTenantAdmin"]){const{name:_,path:A,component:a,children:T}=R.Z.getUserRoutes(),n={name:_,path:A,component:a};if(T&&(n.children=T),E.addRoute(_,n),f.Z.getEnableMultiTenant()){const{name:e,path:_,component:A,children:t}=R.Z.getTenantRoutes(),a={name:e,path:_,component:A};t&&(a.children=t),E.addRoute(e,a)}return t=!1,void o(e.path)}const A=R.Z.checkRouteExistsAndAllowed(e.matched,e.path);if(e.path!==A)return void o(A);o()}catch(T){console.log("core.init reject",T),A=!0,o("/app-not-loaded")}})),E}));async function H(e,E){const A=e(m);A.use(t.Z,E);const o="function"===typeof M["default"]?await(0,M["default"])({}):M["default"],{storeKey:T}=await Promise.resolve().then(_.bind(_,8936)),n=(0,a.Xl)("function"===typeof w?await w({store:o}):w);return o.$router=n,{app:A,store:o,storeKey:T,router:n}}var b=_(4328),Y=_(9231);const v={config:{},plugins:{Notify:b.Z,Meta:Y.ZP}},k="";async function W({app:e,router:E,store:_,storeKey:A},t){let a=!1;const o=e=>{try{return E.resolve(e).href}catch(_){}return Object(e)===e?null:e},T=e=>{if(a=!0,"string"===typeof e&&/^https?:\/\//.test(e))return void(window.location.href=e);const E=o(e);null!==E&&(window.location.href=E,window.location.reload())},n=window.location.href.replace(window.location.origin,"");for(let r=0;!1===a&&r
{const[E,A]=void 0!==Promise.allSettled?["allSettled",e=>e.map((e=>{if("rejected"!==e.status)return e.value.default;console.error("[Quasar] boot error:",e.reason)}))]:["all",e=>e.map((e=>e.default))];return Promise[E]([Promise.resolve().then(_.bind(_,6316)),Promise.resolve().then(_.bind(_,1569))]).then((E=>{const _=A(E).filter((e=>"function"===typeof e));W(e,_)}))}))},1569:(e,E,_)=>{"use strict";_.r(E),_.d(E,{api:()=>a,default:()=>o});var A=_(3340),t=_(7524);const a=t.Z.create({baseURL:"https://api.example.com"}),o=(0,A.xr)((({app:e})=>{e.config.globalProperties.$axios=t.Z,e.config.globalProperties.$api=a}))},6316:(e,E,_)=>{"use strict";_.r(E),_.d(E,{default:()=>z,i18n:()=>W,loadLanguageAsync:()=>K});_(9665);var A=_(3340),t=_(7712),a=_(3643),o=_(9367),T=_(1326),n=_(2689),s=_(4485),r=_(9425),i=_(2254),N=_(9119),R=_(3468),O=_(6677),I=_(9538),L=_(657),S=_(7215),l=_(951),C=_(3388),d=_(5057),c=_(3439),D=_(1833),u=_(1063),P=_(292),h=_(5070),B=_(6411),p=_(812),U=_(4931),m=_(4609),M=_(8370),G=_(3262),F=_(2899),g=_(9407),y=_(4974),f=_(6906),w=_(7008),H=_(7840),b=_(7417),Y=_(1249);const v={ar:a,bg:o,zhCn:T,zhTw:n,cs:s,da:r,nl:i,en:N,et:R,fi:O,fr:I,de:L,el:S,he:l,hu:C,it:d,ja:c,ko:D,lv:u,lt:P,nb:h,fa:B,pl:p,ptBr:U,pt:m,ro:M,ru:G,sr:F,sl:g,es:y,sv:f,th:w,tr:H,uk:b,vi:Y},k=["en"],W=(0,t.o)({locale:"en",fallbackLocale:"en",lazy:!0,messages:v});function V(e){return W.global.locale=e,document.querySelector("html").setAttribute("lang",e),e}function K(e){return W.global.locale===e||k.includes(e)?Promise.resolve(V(e)):_(7468)("./"+e+"/index.json").then((E=>(W.global.setLocaleMessage(e,E.default),k.push(e),V(e))))}const z=(0,A.xr)((({app:e})=>{e.use(W)}))},9706:(e,E,_)=>{"use strict";_.d(E,{Z:()=>i});var A=_(4409),t=_.n(A),a=_(9336),o=_(1427),T=_(4089),n=_(2456),s=_(7064);let r=[];const i={getUsers(e,E={},_="",A=1,i=10){return new Promise(((N,R)=>{r=[];const O=t().extend({TenantId:e,Search:_,Offset:i*(A-1),Limit:i},E);n.Z.sendRequest({moduleName:"Core",methodName:"GetUsers",parameters:O}).then((a=>{if(t().isArray(a?.Items)){r=t().map(a.Items,(function(E){return new s.Z(e,E)}));const o=T.Z.pInt(a.Count);N({users:r,totalCount:o,tenantId:e,filtersGetParameters:E,search:_,page:A,limit:i})}else N({users:r,totalCount:0,tenantId:e,filtersGetParameters:E,search:_,page:A,limit:i})}),(t=>{o.Z.showError(a.Z.getTextFromResponse(t)),N({users:r,totalCount:0,tenantId:e,filtersGetParameters:E,search:_,page:A,limit:i})}))}))},getUser(e,E){return new Promise(((_,A)=>{let T=r.find((_=>_.tenantId===e&&_.id===E));T&&T.completeData?_({user:T,userId:E}):n.Z.sendRequest({moduleName:"Core",methodName:"GetUser",parameters:{Type:"User",TenantId:e,Id:E}}).then((A=>{t().isObject(A)?(T?T.setCompleteData(A):T=new s.Z(e,A,A),_({user:T,userId:E})):_({user:null,userId:E})}),(e=>{o.Z.showError(a.Z.getTextFromResponse(e)),_({user:null,userId:E})}))}))},addUsersToGroup(e,E){r.forEach((_=>{-1!==E.indexOf(_.id)&&_.addGroup(e)}))},removeUsersFromGroup(e,E){r.forEach((_=>{-1!==E.indexOf(_.id)&&_.removeGroup(e)}))}}},4406:(e,E,_)=>{"use strict";_.d(E,{Z:()=>a});var A=_(4089);class t{constructor(e={}){this.tenantId=A.Z.pInt(e.TenantId),this.id=A.Z.pInt(e.Id),this.name=A.Z.pString(e.Name),this.isTeam=A.Z.pBool(e.IsAll)}update(e){this.name=A.Z.pString(e)}copy(e){this.id=e.id,this.name=e.name}}const a=t},3907:(e,E,_)=>{"use strict";_.d(E,{Z:()=>T});var A=_(4089),t=_(4409),a=_.n(t);class o{constructor(e={},E=null){this.id=A.Z.pInt(e.Id),this.name=A.Z.pString(e.Name),this.siteName=A.Z.pString(e.SiteName),this.setCompleteData(E)}setCompleteData(e){a().isEmpty(this.completeData)&&(this.completeData={}),a().isObject(e)&&(this.completeData=a().extend(this.completeData,e))}update(e,E,_){this.name=A.Z.pString(e),this.siteName=A.Z.pString(E),this.setCompleteData(_)}getData(e){return this.completeData&&this.completeData[e]}copy(e){this.id=e.id,this.name=e.name,this.siteName=e.siteName,this.completeData=e.completeData}}const T=o},7064:(e,E,_)=>{"use strict";_.d(E,{Z:()=>s});var A=_(4409),t=_.n(A),a=_(4089),o=_(1385),T=_(4406);class n{constructor(e,E,_=null){const A=o.Z.getUserRoles();this.tenantId=e,this.id=a.Z.pInt(E?.Id),this.name=a.Z.pString(E?.Name),this.publicId=a.Z.pString(E?.PublicId),this.role=a.Z.pEnum(E?.Role,A,A.Anonymous),this.disabled=a.Z.pBool(E?.IsDisabled),this.uuid=a.Z.pString(E?.UUID),this.quotaBytes=a.Z.pInt(E?.QuotaBytes),this.note=a.Z.pString(E?.Note),this.groups=a.Z.pArray(E.Groups).map((e=>new T.Z(e))),this.setCompleteData(_)}setCompleteData(e){this.completeData=e,this.update(e)}update(e,E=null){const _=o.Z.getUserRoles();if(null!==e&&(this.role=a.Z.pEnum(e?.Role,_,_.Anonymous)),void 0!==e?.IsDisabled&&(this.disabled=a.Z.pBool(e.IsDisabled)),void 0!==e?.WriteSeparateLog&&(this.writeSeparateLog=a.Z.pBool(e?.WriteSeparateLog)),e?.PublicId&&(this.publicId=a.Z.pString(e.PublicId)),e?.QuotaBytes&&(this.quotaBytes=a.Z.pInt(e.QuotaBytes)),e?.Note&&(this.note=a.Z.pString(e.Note)),t().isArray(E)){const _=a.Z.pArray(e?.GroupIds);this.groups=_.map((e=>E.find((E=>E.id===e))))}}addGroup(e){this.groups.find((E=>E.id===e.id))||(this.groups=this.groups.concat([e]))}removeGroup(e){this.groups=this.groups.filter((E=>E.id!==e.id))}getData(e){return this.completeData&&this.completeData[e]}updateData(e){t().isEmpty(this.completeData)||e.forEach((e=>{this.completeData[e.field]=e.value}))}}const s=n},9986:(e,E,_)=>{"use strict";_.d(E,{Z:()=>S});var A=_(6316),t=_(7126),a=_.n(t),o=_(4409),T=_.n(o),n=_(8936),s=_(1385),r=_(9336),i=_(1427),N=_(4089),R=_(2456),O=_(7214),I=_(1088);const L={appData:null,setAuthTokenCookie(e){const E=I.Z.getCookieSettings(),_=E.authTokenCookieExpireTime>0?E.authTokenCookieExpireTime+"d":"";a().set("AuthToken",e,_)},setAuthToken(e){const E=I.Z.getCookieSettings();if(T().isEmpty(e)){const _=a().get("AuthToken");a().remove("AuthToken");const A=a().get("AuthToken");null===A?this.commitAuthToken(e):A===_?(a().remove("AuthToken",E.cookieBasePath),this.commitAuthToken(e)):R.Z.sendRequest({moduleName:"Core",methodName:"GetAppData",parameters:{}}).then((_=>{const t=s.Z.getUserRoles();_?.User?.Role===t.SuperAdmin?a().remove("AuthToken",E.cookieBasePath):_?.User?.Role===t.TenantAdmin&&(e=A),this.commitAuthToken(e)}),(E=>{this.commitAuthToken(e)}))}else this.setAuthTokenCookie(e),this.commitAuthToken(e)},commitAuthToken(e){n["default"].commit("user/setAuthToken",e),this.requestAppData()},parseTenantsFromAppData(){const e=N.Z.pObject(this.appData?.AdminPanelWebclient),E=N.Z.pArray(e?.Tenants?.Items);E.length>0?n["default"].dispatch("tenants/parseTenants",E):n["default"].dispatch("tenants/requestTenants")},setAppData(e){return new Promise(((E,_)=>{this.appData=e,s.Z.init(e),r.Z.init(e),O.Z.getModules(e).then((()=>{n["default"].dispatch("user/parseAppData",e).then((()=>{O.Z.initModules(e),E()}),_)}),_)}))},requestAppData(){return new Promise(((e,E)=>{R.Z.sendRequest({moduleName:"Core",methodName:"GetAppData",parameters:{}}).then((_=>{T().isObject(_)?this.setAppData(_).then((()=>{n["default"].getters["user/isUserSuperAdminOrTenantAdmin"]?(this.parseTenantsFromAppData(),this.setAuthTokenCookie(n["default"].getters["user/getAuthToken"])):null!==a().get("AuthToken")&&n["default"].getters["user/isUserAnonymous"]&&this.setAuthToken(""),e()}),E):(i.Z.showError(A.i18n.global.tc("COREWEBCLIENT.ERROR_UNKNOWN")),E(A.i18n.global.tc("COREWEBCLIENT.ERROR_UNKNOWN")))}),(e=>{i.Z.showError(r.Z.getTextFromResponse(e,A.i18n.global.tc("COREWEBCLIENT.ERROR_UNKNOWN"))),E(r.Z.getTextFromResponse(e,A.i18n.global.tc("COREWEBCLIENT.ERROR_UNKNOWN")))}))}))}},S={init(){return new Promise(((e,E)=>{null===L.appData?L.requestAppData().then(e,E):e()}))},logout(e=(()=>{})){R.Z.sendRequest({moduleName:"Core",methodName:"Logout",parameters:{}}).then((()=>{L.setAuthToken(""),e()}),(()=>{L.setAuthToken(""),e()}))},setAuthToken:L.setAuthToken.bind(L),getAppData(){return L.appData}}},1385:(e,E,_)=>{"use strict";_.d(E,{Z:()=>T});var A=_(4409),t=_.n(A),a=_(4089);const o={UserRoles:{},init(e){const E=a.Z.pObject(e.Core,{});t().isEmpty(E)||(this.UserRoles=a.Z.pObject(E.EUserRole))}},T={init:o.init.bind(o),getUserRoles(){return o.UserRoles}}},3203:(e,E,_)=>{"use strict";_.d(E,{Z:()=>a});var A=_(9704),t=_.n(A);const a={$on:(...e)=>t().on(...e),$once:(...e)=>t().once(...e),$off:(...e)=>t().off(...e),$emit:(...e)=>t().emit(...e)}},7214:(e,E,_)=>{"use strict";_.d(E,{Z:()=>d});_(9665);var A=_(4409),t=_.n(A),a=_(8936),o=_(4089);const T={async getModules(){return[await Promise.all([_.e(4736),_.e(597)]).then(_.bind(_,6722)),await Promise.all([_.e(4736),_.e(8364)]).then(_.bind(_,8364)),await Promise.all([_.e(4736),_.e(8101)]).then(_.bind(_,8101)),await _.e(2341).then(_.bind(_,2341)),await _.e(4288).then(_.bind(_,4288)),await Promise.all([_.e(4736),_.e(5703)]).then(_.bind(_,4410)),await _.e(727).then(_.bind(_,727)),await _.e(264).then(_.bind(_,264)),await Promise.all([_.e(4736),_.e(5236)]).then(_.bind(_,5236)),await _.e(3442).then(_.bind(_,3442)),await _.e(1875).then(_.bind(_,1875)),await Promise.all([_.e(4736),_.e(9313)]).then(_.bind(_,9313)),await _.e(82).then(_.bind(_,82)),await _.e(990).then(_.bind(_,990)),await _.e(7305).then(_.bind(_,7305)),await _.e(4247).then(_.bind(_,4247)),await Promise.all([_.e(4736),_.e(3064),_.e(7071)]).then(_.bind(_,7071)),await _.e(2868).then(_.bind(_,2868)),await Promise.all([_.e(4736),_.e(2787)]).then(_.bind(_,2787)),await Promise.all([_.e(4736),_.e(9441)]).then(_.bind(_,9441)),await _.e(6160).then(_.bind(_,6160)),await Promise.all([_.e(4736),_.e(7829)]).then(_.bind(_,7829))]}};var n=_(1088);let s=[],r=[],i=[],N=null,R=[],O=null,I=null,L=null,S=null,l=null;function C(e,E,_=1){if(_>4)return!0;const A=-1!==i.indexOf(e.moduleName),a=!t().isArray(e.requiredModules)||e.requiredModules.every((e=>{const A=E.find((E=>E.moduleName===e));return A?C(A,E,_+1):-1!==i.indexOf(e)}));return A&&a}const d={async getModules(e){if(null===N){s=o.Z.pArray(e?.Core?.AvailableClientModules),r=o.Z.pArray(e?.Core?.AvailableBackendModules),i=t().uniq(s.concat(r));let E=await T.getModules();if(t().isArray(E)?(E=E.map((e=>t().isObject(e.default)?e.default:null)),N=E.filter((e=>!!t().isObject(e)&&C(e,E))),R=N.map((e=>e.moduleName))):(N=[],R=[]),0===N.length)throw new Error("There are no available modules");if(-1===R.indexOf("AdminPanelWebclient"))throw new Error("AdminPanelWebclient module is not available")}},initModules(e){t().each(N,(E=>{t().isFunction(E.initSubscriptions)&&E.initSubscriptions(e)})),t().each(N,(E=>{t().isFunction(E.init)&&E.init(e)}))},isModuleAvailable(e){return-1!==R.indexOf(e)||-1!==r.indexOf(e)},getRoutes(){return null===O&&null!==N&&(O=[],N.forEach((e=>{const E=t().isFunction(e.getRoutes)&&e.getRoutes();t().isArray(E)&&(O=O.concat(E))}))),null===O?[]:O},getUserRoutes(){let e={};return N.forEach((E=>{t().isFunction(E.getUserRoutes)&&(e=E.getUserRoutes())})),O=O.concat(e),e},getTenantRoutes(){let e={};return N.forEach((E=>{t().isFunction(E.getTenantRoutes)&&(e=E.getTenantRoutes())})),O=O.concat(e),e},getRoutesForUserRole(e){if(null!==O){const E=n.Z.getTabsBarOrder(e),_=O.filter((E=>-1!==t().indexOf(E.pageUserRoles,e)));return t().sortBy(_,(e=>{const _=t().indexOf(E,e.name);return-1!==_?_:E.length}))}return[]},getDefaultRouteForUser(){const e=a["default"].getters["user/getUserRole"],E=this.getRoutesForUserRole(e);return E.length?E[0]:null},checkRouteExistsAndAllowed(e,E=null){const _=a["default"].getters["user/getUserRole"],A=this.getRoutesForUserRole(_);if(0===A.length)return E||"/";const o=t().isArray(e)&&e.length>0?e[0].name:null;let T=null;return null!==o&&(T=A.find((e=>e.name===o))||null),null===T&&(T=this.getDefaultRouteForUser()),null===T?"/":T.name===o&&E||T.path},async getTenantOtherDataComponents(){if(null===I)for(const e of N)if(t().isFunction(e.getTenantOtherDataComponents)){const E=await e.getTenantOtherDataComponents();E?.default&&(I=E.default)}return I},getAdminEntityTabs(e=null){let E=[];return null!==e&&null!==N&&N.forEach((_=>{const A=_[e],a=t().isFunction(A)&&A();t().isArray(a)&&(E=E.concat(a))})),null===E?[]:E},async getUserMainDataComponent(){if(null===L){for(const e of N)if(t().isFunction(e.getUserMainDataComponent)){const E=await e.getUserMainDataComponent();E?.default&&(L=E.default)}if(null===L){const e=await Promise.all([_.e(4736),_.e(3768)]).then(_.bind(_,3768));e?.default&&(L=e.default)}}return L},async getUserOtherDataComponents(){if(null===S){S=[];for(const e of N)if(t().isFunction(e.getUserOtherDataComponents)){const E=await e.getUserOtherDataComponents();E?.default&&S.push(E.default)}}return S},getFiltersForUsers(){if(null===l&&null!==N){l=[];for(const e of N){const E=t().isFunction(e.getFiltersForUsers)&&e.getFiltersForUsers();t().isArray(E)&&(l=l.concat(E))}}return null===l?[]:l}}},1088:(e,E,_)=>{"use strict";_.d(E,{Z:()=>S});_(6890);var A=_(1947),t=_(6316),a=_(7524),o=_(7126),T=_.n(o),n=_(8936),s=_(1385),r=_(4409),i=_.n(r),N=_(1427),R=_(4089),O=_(2396);class I{constructor(e,E){const _=R.Z.pObject(e.Core);this.enableMultiTenant=R.Z.pBool(_.EnableMultiTenant),this.authTokenCookieExpireTime=R.Z.pInt(_.AuthTokenCookieExpireTime,30),this.autodetectLanguage=R.Z.pBool(_.AutodetectLanguage),this.isSystemConfigured=R.Z.pBool(_.IsSystemConfigured),this.language=R.Z.pString(_.CommonLanguage,"English"),this.shortLanguage=this._getShortLanguage(_),this.setSiteName(_.SiteName),this.storeAuthTokenInDB=R.Z.pBool(_.StoreAuthTokenInDB),this.timeFormat=R.Z.pString(_.TimeFormat),this.cookiePath=R.Z.pString(_.CookiePath),""===this.cookiePath&&(this.cookiePath=O.Z.getAdminAppPath()),this.cookieSecure=R.Z.pBool(_.CookieSecure),this.version=R.Z.pString(_.Version),this.productName=R.Z.pString(_.ProductName),this.enableLogging=R.Z.pBool(_.EnableLogging),this.enableEventLogging=R.Z.pBool(_.EnableEventLogging),this.loggingLevel=R.Z.pInt(_.LoggingLevel,100),this.allowGroups=R.Z.pBool(_.AllowGroups),this.adminHasPassword=R.Z.pBool(_.AdminHasPassword),this.adminLanguage=R.Z.pString(_.AdminLanguage),this.adminLogin=R.Z.pString(_.AdminLogin),this.dbHost=R.Z.pString(_.DBHost),this.dbLogin=R.Z.pString(_.DBLogin),this.dbName=R.Z.pString(_.DBName),this.encryptionKeyNotEmpty=R.Z.pBool(_.EncryptionKeyNotEmpty);const A=R.Z.pObject(e.CoreWebclient);this.baseUrl=R.Z.pString(A.BaseUrl),this.languageList=R.Z.pArray(A.LanguageListWithNames,{name:"English",text:"English"}),this.theme=R.Z.pString(A.Theme,"Default"),this.themeList=R.Z.pArray(A.ThemeList,["Default"]);const t=R.Z.pObject(e.AdminPanelWebclient);this.entitiesOrder=R.Z.pArray(t.EntitiesOrder),this.entitiesPerPage=R.Z.pInt(t.EntitiesPerPage,10),this.tabsOrder=R.Z.pArray(t.TabsOrder);const a=R.Z.pObject(e.CoreMobileWebclient);this.mobileTheme=R.Z.pString(a.Theme,"Default"),this.mobileThemeList=R.Z.pArray(a.ThemeList,["Default"]);const o=R.Z.pObject(e.LogsViewerWebclient);this.viewLastLogSize=R.Z.pInt(o.ViewLastLogSize)}showErrorsIfSystemNotConfigured(){!1===this.isSystemConfigured&&N.Z.showError(t.i18n.global.tc("COREWEBCLIENT.ERROR_SYSTEM_NOT_CONFIGURED"),0),n["default"].getters["user/isUserSuperAdmin"]&&(this.showErrorIfConfigIsAccessible(),this.adminHasPassword||(this.dismissPasswordError=N.Z.showError(t.i18n.global.tc("ADMINPANELWEBCLIENT.ERROR_ADMIN_EMPTY_PASSWORD"),0)),this.encryptionKeyNotEmpty||N.Z.showError(t.i18n.global.tc("ADMINPANELWEBCLIENT.ERROR_ENCRYPTION_KEY_EMPTY"),0),""!==this.dbLogin&&""!==this.dbHost&&""!==this.dbName||(this.dismissDbError=N.Z.showError(t.i18n.global.tc("ADMINPANELWEBCLIENT.ERROR_DB_ACCESS"),0)))}getBaseUrl(){let e=this.baseUrl;return i().isEmpty(e)&&(e=O.Z.getAdminAppPath()),e}showErrorIfConfigIsAccessible(){(0,a.Z)({method:"get",url:this.getBaseUrl()+"data/settings/config.json"}).then((e=>{const E=!!e&&200===e.status&&!!e.data;E&&N.Z.showError(t.i18n.global.tc("ADMINPANELWEBCLIENT.ERROR_DATA_FOLDER_ACCESSIBLE_FROM_WEB"),0)})).catch((()=>{}))}saveAdminAccountData({login:e,hasPassword:E,language:_}){this.adminLogin=e,this.adminHasPassword=E,this.adminHasPassword&&i().isFunction(this.dismissPasswordError)&&(this.dismissPasswordError(),this.dismissPasswordError=null),this.adminLanguage!==_&&(this.adminLanguage=_,window.location.reload())}saveLoggingData({enableLogging:e,enableEventLogging:E,loggingLevel:_}){this.enableLogging=e,this.enableEventLogging=E,this.loggingLevel=_}saveCommonSettingData({siteName:e,theme:E,mobileTheme:_,language:A,timeFormat:t,autodetectLanguage:a}){this.setSiteName(e),this.theme=E,this.mobileTheme=_,this.language=A,this.timeFormat=t,this.autodetectLanguage=a}setSiteName(e){this.siteName=R.Z.pString(e),n["default"].commit("main/setSiteName",this.siteName)}saveDatabaseSetting({dbName:e,dbLogin:E,dbHost:_}){this.dbName=e,this.dbLogin=E,this.dbHost=_,i().isEmpty(this.dbLogin)||i().isEmpty(this.dbHost)||i().isEmpty(this.dbName)||!i().isFunction(this.dismissDbError)||(this.dismissDbError(),this.dismissDbError=null)}_getShortLanguage(e){let E=R.Z.pString(e.ShortLanguage,"en");return(i().isEmpty(E)||-1===t.i18n.global.availableLocales.indexOf(E))&&(-1!==t.i18n.global.availableLocales.indexOf("en")?E="en":i().isEmpty(t.i18n.availableLocales)||(E=t.i18n.availableLocales[0])),E}}let L=null;const S={async initQuasarLang(e){try{const E={en:"en-US"},t=E[e];t&&await _(1723)("./"+t).then((e=>{A.Z.lang.set(e.default)}))}catch(E){}},async init(e){L=new I(e),L.showErrorsIfSystemNotConfigured(),i().isEmpty(L.shortLanguage)||-1===t.i18n.global.availableLocales.indexOf(L.shortLanguage)||((0,t.loadLanguageAsync)(L.shortLanguage),this.initQuasarLang(L.shortLanguage)),T().config("",L.cookiePath,"",L.cookieSecure)},getEnableMultiTenant(){return L.enableMultiTenant},getAllowGroups(){return L.allowGroups},getTabsOrder(){return L?.tabsOrder||[]},getTabsBarOrder(e){const E=s.Z.getUserRoles();let _=[];return e===E.SuperAdmin?(_=L.entitiesOrder.map((e=>{switch(e){case"Tenant":return"tenants";case"User":return"users";case"Group":return"groups";case"Domain":return"domains";default:return e}})),_.unshift("system")):e===E.TenantAdmin&&(_=["tenants","users"]),_},getEntitiesPerPage(){return L.entitiesPerPage},getAboutSettings(){return{version:L?.version||"",productName:L?.productName||""}},getLanguageList(){return L?.languageList||[]},getThemeList(){return L?.themeList||[]},getMobileThemeList(){return L?.mobileThemeList||[]},getCookieSettings(){if(!L)return T().config("",window.location.pathname,"",!0),{authTokenCookieExpireTime:0,cookieSecure:!0,cookiePath:window.location.pathname,cookieBasePath:window.location.pathname.replace("/adminpanel","")};const e=L.cookiePath.split("/");let E=e[e.length-1];i().isEmpty(E)&&e.length>2&&(E=e[e.length-2]);const _=L.cookiePath.replace(E,"").replace("//","/");return{authTokenCookieExpireTime:L.authTokenCookieExpireTime,cookieSecure:L.cookieSecure,cookiePath:L.cookiePath,cookieBasePath:_}},getAdminAccountData(){return{adminLogin:L?.adminLogin||"",adminHasPassword:L?.adminHasPassword||!1,adminLanguage:L?.adminLanguage||""}},getCommonSettingData(){return{siteName:L.siteName,theme:L.theme,mobileTheme:L.mobileTheme,language:L.language,timeFormat:L.timeFormat,autodetectLanguage:L.autodetectLanguage}},getDatabaseSettingsData(){return{dbName:L.dbName,dbLogin:L.dbLogin,dbHost:L.dbHost}},getStoreAuthTokenInDB(){return L.storeAuthTokenInDB},getLoggingData(){return{enableEventLogging:L.enableEventLogging,enableLogging:L.enableLogging,loggingLevel:L.loggingLevel,viewLastLogSize:L.viewLastLogSize}},getBaseUrl(){return L.getBaseUrl()},saveAdminAccountData(e){L.saveAdminAccountData(e)},saveCommonSettingData(e){L.saveCommonSettingData(e)},saveDatabaseSetting(e){L.saveDatabaseSetting(e)},saveLoggingData(e){L.saveLoggingData(e)}}},8936:(e,E,_)=>{"use strict";_.r(E),_.d(E,{default:()=>G});var A={};_.r(A),_.d(A,{getServersByTenants:()=>B});var t={};_.r(t),_.d(t,{setTenantServers:()=>p});var a={};_.r(a),_.d(a,{requestTenantServers:()=>m});var o=_(3100),T=_(4409),n=_.n(T),s=_(7126),r=_.n(s),i=_(7064),N=_(1385);const R={namespaced:!0,state:{authToken:r().get("AuthToken")||"",userRole:null,userPublicId:null},mutations:{setAuthToken(e,E){e.authToken=E,E||(e.userRole=null,e.userPublicId=null)},setUserData(e,E){const _=new i.Z(null,E,E);n().isEmpty(_)||(e.userRole=_.role,e.userPublicId=_.publicId)}},actions:{parseAppData({commit:e},E){e("setUserData",E.User)}},getters:{getAuthToken(e){return e.authToken},isUserSuperAdmin(e){const E=N.Z.getUserRoles();return e.userRole===E.SuperAdmin},isUserAnonymous(e){const E=N.Z.getUserRoles();return e.userRole===E.Anonymous},isUserTenantAdmin(e){const E=N.Z.getUserRoles();return e.userRole===E.TenantAdmin},isUserSuperAdminOrTenantAdmin(e){const E=N.Z.getUserRoles();return e.userRole===E.SuperAdmin||e.userRole===E.TenantAdmin},getUserRole(e){return e.userRole},getUserPublicId(e){return e.userPublicId}}},O={namespaced:!0,state:{siteName:""},mutations:{setSiteName(e,E){e.siteName=E}},actions:{},getters:{getSiteName(e){return e.siteName}}};var I=_(9336),L=_(1427),S=_(4089),l=_(2456),C=_(3907);const d={namespaced:!0,state:{tenants:[],currentTenantId:null},mutations:{setTenants(e,{tenants:E}){e.tenants=E,0===E.length?e.currentTenantId=null:E.find((E=>E.id===e.currentTenantId))||(e.currentTenantId=E[0].id)},setCurrentTenantId(e,E){e.currentTenantId=E},setTenantCompleteData(e,{id:E,data:_}){const A=e.tenants.findIndex((e=>e.id===E));if(-1!==A){const E=new C.Z;E.copy(e.tenants[A]),E.setCompleteData(_),e.tenants[A]=E}},updateTenant(e,{id:E,data:_}){const A=e.tenants.findIndex((e=>e.id===E));if(-1!==A){const E=new C.Z;E.copy(e.tenants[A]),E.update(_.Name,_.SiteName,_),e.tenants[A]=E}}},actions:{parseTenants({commit:e},E){const _=n().map(E,(function(e){return new C.Z(e)}));e("setTenants",{tenants:_})},requestTenants({dispatch:e}){G.getters["user/isUserSuperAdmin"]&&l.Z.sendRequest({moduleName:"Core",methodName:"GetTenants",parameters:{}}).then((E=>{n().isArray(E?.Items)?e("parseTenants",E.Items):e("parseTenants",[])}),(E=>{e("parseTenants",[])}))},completeTenantData({state:e,commit:E},_){const A=e.tenants.find((e=>e.id===_));A&&void 0===A.completeData.Description&&l.Z.sendRequest({moduleName:"Core",methodName:"GetTenant",parameters:{Type:"Tenant",Id:_}}).then((e=>{n().isObject(e)&&A&&E("setTenantCompleteData",{id:_,data:e})}),(e=>{L.Z.showError(I.Z.getTextFromResponse(e))}))}},getters:{getTenants(e){return S.Z.pArray(e.tenants)},getCurrentTenantId(e){return e.currentTenantId},getTenant(e){return E=>e.tenants.find((e=>e.id===E))},getTenantName(e){return E=>{const _=e.tenants.find((e=>e.id===E));return S.Z.pString(_?.name)}}}};var c=_(6316),D=_(9706),u=_(4406);const P={namespaced:!0,state:{groups:{}},mutations:{setGroups(e,{tenantId:E,groups:_}){e.groups[E]=_},updateGroup(e,{tenantId:E,id:_,data:A}){const t=S.Z.pArray(e.groups[E]),a=t.findIndex((e=>e.id===_));if(-1!==a){const _=new u.Z;_.copy(t[a]),_.update(A.Name,A.SiteName,A),e.groups[E][a]=_}}},actions:{parseGroups({commit:e},{tenantId:E,groupsData:_}){const A=n().map(_,(function(e){return new u.Z(e)}));e("setGroups",{tenantId:E,groups:A})},requestGroups({dispatch:e},{tenantId:E}){G.getters["user/isUserSuperAdminOrTenantAdmin"]&&l.Z.sendRequest({moduleName:"Core",methodName:"GetGroups",parameters:{TenantId:E}}).then((_=>{n().isArray(_?.Items)?e("parseGroups",{tenantId:E,groupsData:_.Items}):e("parseGroups",{tenantId:E,groupsData:[]})}),(_=>{e("parseGroups",{tenantId:E,groupsData:[]}),L.Z.showError(I.Z.getTextFromResponse(_))}))},addUsersToGroup({state:e,dispatch:E},{tenantId:_,groupId:A,usersIds:t}){G.getters["user/isUserSuperAdminOrTenantAdmin"]&&l.Z.sendRequest({moduleName:"Core",methodName:"AddUsersToGroup",parameters:{GroupId:A,UserIds:t}}).then((E=>{if(E){const E=S.Z.pArray(e.groups[_]),a=E.find((e=>e.id===A));a&&D.Z.addUsersToGroup(a,t),L.Z.showReport(c.i18n.global.tc("ADMINPANELWEBCLIENT.REPORT_ADD_TO_GROUP_PLURAL",t.length))}else L.Z.showError(c.i18n.global.tc("ADMINPANELWEBCLIENT.ERROR_ADD_TO_GROUP_PLURAL",t.length))}),(e=>{L.Z.showError(I.Z.getTextFromResponse(e,c.i18n.global.tc("ADMINPANELWEBCLIENT.ERROR_ADD_TO_GROUP_PLURAL",t.length)))}))},removeUsersFromGroup({state:e,dispatch:E},{tenantId:_,groupId:A,usersIds:t,callback:a}){G.getters["user/isUserSuperAdminOrTenantAdmin"]&&l.Z.sendRequest({moduleName:"Core",methodName:"RemoveUsersFromGroup",parameters:{GroupId:A,UserIds:t}}).then((E=>{if(E){const E=S.Z.pArray(e.groups[_]),o=E.find((e=>e.id===A));o&&(D.Z.removeUsersFromGroup(o,t),a()),L.Z.showReport(c.i18n.global.tc("ADMINPANELWEBCLIENT.REPORT_REMOVE_FROM_GROUP_PLURAL",t.length))}else L.Z.showError(c.i18n.global.tc("ADMINPANELWEBCLIENT.ERROR_REMOVE_FROM_GROUP_PLURAL",t.length))}),(e=>{L.Z.showError(I.Z.getTextFromResponse(e,c.i18n.global.tc("ADMINPANELWEBCLIENT.ERROR_REMOVE_FROM_GROUP_PLURAL",t.length)))}))}},getters:{getGroups(e){return S.Z.pObject(e.groups)},getGroup(e){return(E,_)=>{const A=S.Z.pArray(e.groups[E]);return A.find((e=>e.id===_))}}}};function h(){return{serversByTenants:{}}}function B(e){return e.serversByTenants}function p(e,{tenantId:E,servers:_}){e.serversByTenants[E]=_}var U=_(7665);function m(e,E){l.Z.sendRequest({moduleName:"Mail",methodName:"GetServers",parameters:{TenantId:E}}).then((_=>{if(n().isArray(_?.Items)){const A=n().map(_.Items,(function(e){return new U.Z(e)}));e.commit("setTenantServers",{tenantId:E,servers:A})}}),(e=>{L.Z.showError(I.Z.getTextFromResponse(e))}))}const M={namespaced:!0,getters:A,mutations:t,actions:a,state:h},G=new o.ZP.Store({modules:{main:O,user:R,tenants:d,groups:P,mail:M},strict:!1})},9336:(e,E,_)=>{"use strict";_.d(E,{Z:()=>r});var A=_(6316),t=_(4409),a=_.n(t),o=_(6390),T=_(4089);const n={InvalidToken:101,AuthError:102,InvalidInputParameter:103,DataBaseError:104,LicenseProblem:105,DemoLimitations:106,Captcha:107,AccessDenied:108,UserAlreadyExists:111,SystemNotConfigured:112,ModuleNotFound:113,MethodNotFound:114,LicenseLimit:115,MethodAccessDenied:116,CanNotChangePassword:502,AccountOldPasswordNotCorrect:1020,AccountAlreadyExists:704,IncorrectFileExtension:811,CanNotUploadFileQuota:812,FileAlreadyExists:813,FileNotFound:814,CanNotUploadFileLimit:815,DataTransferFailed:1100,NotDisplayedError:1155},s={modulesErrors:null,setModulesErrors(e){this.modulesErrors=T.Z.pObject(e?.module_errors)},getTextFromResponse(e,E){let _="";if(a().isObject(e)){const A=e.ErrorCode;if(_=this._getModuleErrorByCode(e.Module,A),T.Z.isNonEmptyString(_)||(_=this._getCoreErrorByCode(A,E)),T.Z.isNonEmptyString(_)){const E=o.Z.encodeHtml(e.ErrorMessage||"");T.Z.isNonEmptyString(E)&&(_+=" ("+E+")"),_=this._addSubscriptionsErrors(e,_),_=this._insertValuesIntoPlaceholders(e,_)}}return _},_getModuleErrorByCode(e,E){const _=a().isString(e)&&a().isSafeInteger(E)&&null!==this.modulesErrors&&a().isObject(this.modulesErrors[e])&&a().isString(this.modulesErrors[e][E]);return!!_&&this.modulesErrors[e][E]},_getCoreErrorByCode(e,E){switch(e){case n.AuthError:return A.i18n.global.tc("COREWEBCLIENT.ERROR_PASS_INCORRECT");case n.DataBaseError:return A.i18n.global.tc("COREWEBCLIENT.ERROR_DATABASE");case n.LicenseProblem:return A.i18n.global.tc("COREWEBCLIENT.ERROR_INVALID_LICENSE");case n.LicenseLimit:return A.i18n.global.tc("COREWEBCLIENT.ERROR_LICENSE_USERS_LIMIT");case n.DemoLimitations:return A.i18n.global.tc("COREWEBCLIENT.INFO_DEMO_THIS_FEATURE_IS_DISABLED");case n.Captcha:return A.i18n.global.tc("COREWEBCLIENT.ERROR_CAPTCHA_IS_INCORRECT");case n.AccessDenied:return A.i18n.global.tc("COREWEBCLIENT.ERROR_ACCESS_DENIED");case n.UserAlreadyExists:return A.i18n.global.tc("COREWEBCLIENT.ERROR_USER_ALREADY_EXISTS");case n.CanNotChangePassword:return A.i18n.global.tc("COREWEBCLIENT.ERROR_UNABLE_CHANGE_PASSWORD");case n.AccountOldPasswordNotCorrect:return A.i18n.global.tc("COREWEBCLIENT.ERROR_CURRENT_PASSWORD_NOT_CORRECT");case n.AccountAlreadyExists:return A.i18n.global.tc("COREWEBCLIENT.ERROR_ACCOUNT_ALREADY_EXISTS");case n.DataTransferFailed:return A.i18n.global.tc("COREWEBCLIENT.ERROR_DATA_TRANSFER_FAILED");case n.NotDisplayedError:return"";case n.SystemNotConfigured:return A.i18n.global.tc("COREWEBCLIENT.ERROR_SYSTEM_NOT_CONFIGURED");default:return E||A.i18n.global.tc("COREWEBCLIENT.ERROR_UNKNOWN")}},_addSubscriptionsErrors(e,E){if(a().isArray(e.SubscriptionsResult))for(const _ in e.SubscriptionsResult){const A=e.SubscriptionsResult[_],t=this._getModuleErrorByCode(A?.Error?.ModuleName,A?.Code?.Error);t&&(A?.Error?.Override||!E?E=t:E+="
"+t)}return E},_insertValuesIntoPlaceholders(e,E){if(T.Z.isNonEmptyString(E)){const _=E.replace(/[^%]*%(\w+)%[^%]*/g,(function(E,_,A,t){return T.Z.isNonEmptyString(e[_])?E.replace("%"+_+"%",e[_]):E}));T.Z.isNonEmptyString(_)&&(E=_)}return E}},r={init(e){s.setModulesErrors(e)},getSilentErrorCode(){return n.NotDisplayedError},getTextFromResponse(e,E){return s.getTextFromResponse(e,E)},isAuthError(e){return e===n.AuthError},isSystemError(e){return e===n.ModuleNotFound||e===n.MethodNotFound}}},1427:(e,E,_)=>{"use strict";_.d(E,{Z:()=>T});var A=_(4328),t=_(4409),a=_.n(t);let o=null;const T={showError(e,E){if(e)return a().isInteger(E)||(E=1e4),A.Z.create({color:"negative",textColor:"white",icon:null,message:e,html:!0,position:"top-right",avatar:null,multiLine:!1,timeout:E,actions:[{icon:"close",color:"white"}]})},showReport(e){A.Z.create({color:"info",textColor:"white",icon:null,message:e,html:!0,position:"top-right",avatar:null,multiLine:!1,timeout:1e4,actions:[{icon:"close",color:"white"}]})},showLoading(e){this.hideLoading(),o=A.Z.create({color:"warning",textColor:"white",icon:null,message:e,html:!0,position:"top-right",avatar:null,multiLine:!1,timeout:0,actions:[]})},hideLoading(){a().isFunction(o)&&(o(),o=null)}}},6390:(e,E,_)=>{"use strict";_.d(E,{Z:()=>a});var A=_(6316),t=_(4089);const a={getFriendlySize:function(e){const E=1024,_=E*E,a=E*E*E;return e=t.Z.pInt(e),e>=a?t.Z.roundNumber(e/a,1)+A.i18n.global.tc("COREWEBCLIENT.LABEL_GIGABYTES"):e>=_?t.Z.roundNumber(e/_,1)+A.i18n.global.tc("COREWEBCLIENT.LABEL_MEGABYTES"):e>=E?t.Z.roundNumber(e/E,0)+A.i18n.global.tc("COREWEBCLIENT.LABEL_KILOBYTES"):e+A.i18n.global.tc("COREWEBCLIENT.LABEL_BYTES")},encodeHtml:function(e){return t.Z.isNonEmptyString(e)?e.toString().replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):""},htmlToPlain:function(e){return e.replace(/([^>]{1})
/gi,"$1\n").replace(/