nextcloud-server/dist/user_status-menu.js

2 lines
26 KiB
JavaScript

(()=>{var e,s,a,n={15340:()=>{},33114:(t,e,s)=>{"use strict";s.d(e,{A:()=>i});var a=s(85168),n=s(53334),r=s(95353),o=s(45369);const i={computed:{...(0,r.aH)({statusType:t=>t.userStatus.status,statusIsUserDefined:t=>t.userStatus.statusIsUserDefined,customIcon:t=>t.userStatus.icon,customMessage:t=>t.userStatus.message}),visibleMessage(){if(this.customIcon&&this.customMessage)return`${this.customIcon} ${this.customMessage}`;if(this.customMessage)return this.customMessage;if(this.statusIsUserDefined)switch(this.statusType){case"online":return(0,n.t)("user_status","Online");case"away":case"busy":return(0,n.t)("user_status","Away");case"dnd":return(0,n.t)("user_status","Do not disturb");case"invisible":return(0,n.t)("user_status","Invisible");case"offline":return(0,n.t)("user_status","Offline")}return(0,n.t)("user_status","Set status")}},methods:{async changeStatus(t){try{await this.$store.dispatch("setStatus",{statusType:t})}catch(t){(0,a.Qg)((0,n.t)("user_status","There was an error saving the new status")),o.v.debug(t)}}}}},45369:(t,e,s)=>{"use strict";s.d(e,{v:()=>a});const a=(0,s(35947).YK)().detectLogLevel().setApp("user_status").build()},47790:()=>{},51069:()=>{},53611:(t,e,s)=>{"use strict";s.d(e,{A:()=>a.N});var a=s(49313)},61913:(t,e,s)=>{"use strict";function a(){return new Date}s.d(e,{R:()=>a})},63779:()=>{},64688:()=>{},66089:()=>{},67789:(t,e,s)=>{"use strict";s.d(e,{A:()=>i});var a=s(71354),n=s.n(a),r=s(76314),o=s.n(r)()(n());o.push([t.id,".user-status-icon[data-v-3ecfc87b]{width:20px;height:20px;margin:calc((var(--default-clickable-area) - 20px)/2);opacity:1 !important;background-size:20px;vertical-align:middle !important}","",{version:3,sources:["webpack://./apps/user_status/src/UserStatus.vue"],names:[],mappings:"AACA,mCACC,UAAA,CACA,WAAA,CACA,qDAAA,CACA,oBAAA,CACA,oBAAA,CACA,gCAAA",sourcesContent:["\n.user-status-icon {\n\twidth: 20px;\n\theight: 20px;\n\tmargin: calc((var(--default-clickable-area) - 20px) / 2); // 20px icon size\n\topacity: 1 !important;\n\tbackground-size: 20px;\n\tvertical-align: middle !important;\n}\n"],sourceRoot:""}]);const i=o},73776:()=>{},77199:()=>{},77965:()=>{},78982:()=>{},79368:()=>{},79838:()=>{},82495:(e,s,a)=>{"use strict";var n=a(21777),r=a(61338),o=a(85471),i=a(17334),u=a.n(i),c=a(54914),l=a(74095),d=a(1522),f=a(53611),p=a(45369),m=a(33114),h=a(19051),g=a(63814);const v={name:"UserStatus",components:{Fragment:c.F,NcButton:l.A,NcListItem:d.A,NcUserStatusIcon:f.A,SetStatusModal:()=>Promise.all([a.e(4208),a.e(5133)]).then(a.bind(a,25750))},mixins:[m.A],props:{inline:{type:Boolean,default:!1}},data:()=>({heartbeatInterval:null,isAway:!1,isModalOpen:!1,mouseMoveListener:null,setAwayTimeout:null}),mounted(){this.$store.dispatch("loadStatusFromInitialState"),OC.config.session_keepalive&&(this.heartbeatInterval=setInterval(this._backgroundHeartbeat.bind(this),3e5),this.setAwayTimeout=()=>{this.isAway=!0},this.mouseMoveListener=u()(()=>{const t=this.isAway;this.isAway=!1,clearTimeout(this.setAwayTimeout),setTimeout(this.setAwayTimeout,12e4),t&&this._backgroundHeartbeat()},2e3,!0),window.addEventListener("mousemove",this.mouseMoveListener,{capture:!0,passive:!0}),this._backgroundHeartbeat()),(0,r.B1)("user_status:status.updated",this.handleUserStatusUpdated)},beforeDestroy(){window.removeEventListener("mouseMove",this.mouseMoveListener),clearInterval(this.heartbeatInterval),(0,r.al)("user_status:status.updated",this.handleUserStatusUpdated)},methods:{openModal(){this.isModalOpen=!0},closeModal(){this.isModalOpen=!1},async _backgroundHeartbeat(){try{const t=await async function(t){const e=(0,g.KT)("apps/user_status/api/v1/heartbeat?format=json");return(await h.Ay.put(e,{status:t?"away":"online"})).data.ocs.data}(this.isAway);t?.userId?this.$store.dispatch("setStatusFromHeartbeat",t):await this.$store.dispatch("reFetchStatusFromServer")}catch(t){p.v.debug("Failed sending heartbeat, got: "+t.response?.status)}},handleUserStatusUpdated(t){(0,n.HW)()?.uid===t.userId&&this.$store.dispatch("setStatusFromObject",{status:t.status,icon:t.icon,message:t.message})}}};var y=a(85072),b=a.n(y),_=a(97825),A=a.n(_),w=a(77659),S=a.n(w),I=a(55056),M=a.n(I),C=a(10540),O=a.n(C),k=a(41113),T=a.n(k),j=a(67789),E={};E.styleTagTransform=T(),E.setAttributes=M(),E.insert=S().bind(null,"head"),E.domAPI=A(),E.insertStyleElement=O(),b()(j.A,E),j.A&&j.A.locals&&j.A.locals;const $=(0,a(14486).A)(v,function(){var t=this,e=t._self._c;return e("Fragment",[t.inline?e("div",[e("NcButton",{on:{click:function(e){return e.stopPropagation(),t.openModal.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcUserStatusIcon",{staticClass:"user-status-icon",attrs:{status:t.statusType,"aria-hidden":"true"}})]},proxy:!0}])},[t._v("\n\t\t\t"+t._s(t.visibleMessage)+"\n\t\t")])],1):e("NcListItem",{staticClass:"user-status-menu-item",attrs:{compact:"",name:t.visibleMessage},on:{click:function(e){return e.stopPropagation(),t.openModal.apply(null,arguments)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcUserStatusIcon",{staticClass:"user-status-icon",attrs:{status:t.statusType,"aria-hidden":"true"}})]},proxy:!0}],null,!1,2300440294)}),t._v(" "),t.isModalOpen?e("SetStatusModal",{attrs:{inline:t.inline},on:{close:t.closeModal}}):t._e()],1)},[],!1,null,"3ecfc87b",null).exports;var x=a(95353);const P={state:{predefinedStatuses:[]},mutations:{addPredefinedStatus(t,e){t.predefinedStatuses=[...t.predefinedStatuses,e]}},getters:{statusesHaveLoaded:t=>t.predefinedStatuses.length>0},actions:{async loadAllPredefinedStatuses({state:t,commit:e}){if(t.predefinedStatuses.length>0)return;const s=await async function(){const t=(0,g.KT)("apps/user_status/api/v1/predefined_statuses?format=json");return(await h.Ay.get(t)).data.ocs.data}();for(const t of s)e("addPredefinedStatus",t)}}},F={state:{status:null,statusIsUserDefined:null,message:null,icon:null,clearAt:null,messageIsPredefined:null,messageId:null},mutations:{loadBackupStatusFromServer(t,{status:e,statusIsUserDefined:s,message:a,icon:n,clearAt:r,messageIsPredefined:o,messageId:i}){t.status=e,t.message=a,t.icon=n,void 0!==s&&(t.statusIsUserDefined=s),void 0!==r&&(t.clearAt=r),void 0!==o&&(t.messageIsPredefined=o),void 0!==i&&(t.messageId=i)}},getters:{},actions:{async fetchBackupFromServer({commit:t}){try{t("loadBackupStatusFromServer",await async function(t){const e=(0,g.KT)("apps/user_status/api/v1/statuses/{userId}",{userId:"_"+t});return(await h.Ay.get(e)).data.ocs.data}((0,n.HW)()?.uid))}catch{}},async revertBackupFromServer({commit:t},{messageId:e}){const s=await async function(t){const e=(0,g.KT)("apps/user_status/api/v1/user_status/revert/{messageId}",{messageId:t});return(await h.Ay.delete(e)).data.ocs.data}(e);s&&(t("loadBackupStatusFromServer",{}),t("loadStatusFromServer",s),(0,r.Ic)("user_status:status.updated",{status:s.status,message:s.message,icon:s.icon,clearAt:s.clearAt,userId:(0,n.HW)()?.uid}))}}};var U=a(81222),L=a(51651),N=a(61913);function H(t){if(null===t)return null;const e=(0,N.R)();if("period"===t.type)return e.setSeconds(e.getSeconds()+t.time),Math.floor(e.getTime()/1e3);if("end-of"===t.type)switch(t.time){case"day":case"week":return Number((0,L.A)(e).endOf(t.time).format("X"))}return"_time"===t.type?t.time:null}const D={state:{status:null,statusIsUserDefined:null,message:null,icon:null,clearAt:null,messageIsPredefined:null,messageId:null},mutations:{setStatus(t,{statusType:e}){t.status=e,t.statusIsUserDefined=!0},setPredefinedMessage(t,{messageId:e,clearAt:s,message:a,icon:n}){t.messageId=e,t.messageIsPredefined=!0,t.message=a,t.icon=n,t.clearAt=s},setCustomMessage(t,{message:e,icon:s,clearAt:a}){t.messageId=null,t.messageIsPredefined=!1,t.message=e,t.icon=s,t.clearAt=a},clearMessage(t){t.messageId=null,t.messageIsPredefined=!1,t.message=null,t.icon=null,t.clearAt=null},loadStatusFromServer(t,{status:e,statusIsUserDefined:s,message:a,icon:n,clearAt:r,messageIsPredefined:o,messageId:i}){t.status=e,t.message=a,t.icon=n,void 0!==s&&(t.statusIsUserDefined=s),void 0!==r&&(t.clearAt=r),void 0!==o&&(t.messageIsPredefined=o),void 0!==i&&(t.messageId=i)}},getters:{},actions:{async setStatus({commit:t,state:e},{statusType:s}){await async function(t){const e=(0,g.KT)("apps/user_status/api/v1/user_status/status");await h.Ay.put(e,{statusType:t})}(s),t("setStatus",{statusType:s}),(0,r.Ic)("user_status:status.updated",{status:e.status,message:e.message,icon:e.icon,clearAt:e.clearAt,userId:(0,n.HW)()?.uid})},async setStatusFromObject({commit:t},e){t("loadStatusFromServer",e)},async setPredefinedMessage({commit:t,rootState:e,state:s},{messageId:a,clearAt:o}){const i=H(o);await async function(t,e=null){const s=(0,g.KT)("apps/user_status/api/v1/user_status/message/predefined?format=json");await h.Ay.put(s,{messageId:t,clearAt:e})}(a,i);const u=e.predefinedStatuses.predefinedStatuses.find(t=>t.id===a),{message:c,icon:l}=u;t("setPredefinedMessage",{messageId:a,clearAt:i,message:c,icon:l}),(0,r.Ic)("user_status:status.updated",{status:s.status,message:s.message,icon:s.icon,clearAt:s.clearAt,userId:(0,n.HW)()?.uid})},async setCustomMessage({commit:t,state:e},{message:s,icon:a,clearAt:o}){const i=H(o);await async function(t,e=null,s=null){const a=(0,g.KT)("apps/user_status/api/v1/user_status/message/custom?format=json");await h.Ay.put(a,{message:t,statusIcon:e,clearAt:s})}(s,a,i),t("setCustomMessage",{message:s,icon:a,clearAt:i}),(0,r.Ic)("user_status:status.updated",{status:e.status,message:e.message,icon:e.icon,clearAt:e.clearAt,userId:(0,n.HW)()?.uid})},async clearMessage({commit:t,state:e}){await async function(){const t=(0,g.KT)("apps/user_status/api/v1/user_status/message?format=json");await h.Ay.delete(t)}(),t("clearMessage"),(0,r.Ic)("user_status:status.updated",{status:e.status,message:e.message,icon:e.icon,clearAt:e.clearAt,userId:(0,n.HW)()?.uid})},async reFetchStatusFromServer({commit:t}){t("loadStatusFromServer",await async function(){const t=(0,g.KT)("apps/user_status/api/v1/user_status");return(await h.Ay.get(t)).data.ocs.data}())},async setStatusFromHeartbeat({commit:t},e){t("loadStatusFromServer",e)},loadStatusFromInitialState({commit:t}){t("loadStatusFromServer",(0,U.C)("user_status","status"))}}};o.Ay.use(x.Ay);const B=new x.il({modules:{predefinedStatuses:P,userStatus:D,userBackupStatus:F},strict:!0});function G(){const t=document.getElementById("user_status-menu-entry");new o.Ay({el:t,render:t=>t($),store:B})}a.nc=(0,n.aV)(),o.Ay.prototype.t=t,o.Ay.prototype.$t=t,document.getElementById("user_status-menu-entry")?G():(0,r.B1)("core:user-menu:mounted",G),document.addEventListener("DOMContentLoaded",function(){OCA.Dashboard&&OCA.Dashboard.registerStatus("status",t=>new(o.Ay.extend($))({propsData:{inline:!0},store:B}).$mount(t))})},95353:(t,e,s)=>{"use strict";s.d(e,{Ay:()=>$,L8:()=>S,aH:()=>A,il:()=>f});var a=("undefined"!=typeof window?window:void 0!==s.g?s.g:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function n(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var s,a=(s=function(e){return e.original===t},e.filter(s)[0]);if(a)return a.copy;var r=Array.isArray(t)?[]:{};return e.push({original:t,copy:r}),Object.keys(t).forEach(function(s){r[s]=n(t[s],e)}),r}function r(t,e){Object.keys(t).forEach(function(s){return e(t[s],s)})}function o(t){return null!==t&&"object"==typeof t}var i=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var s=t.state;this.state=("function"==typeof s?s():s)||{}},u={namespaced:{configurable:!0}};u.namespaced.get=function(){return!!this._rawModule.namespaced},i.prototype.addChild=function(t,e){this._children[t]=e},i.prototype.removeChild=function(t){delete this._children[t]},i.prototype.getChild=function(t){return this._children[t]},i.prototype.hasChild=function(t){return t in this._children},i.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},i.prototype.forEachChild=function(t){r(this._children,t)},i.prototype.forEachGetter=function(t){this._rawModule.getters&&r(this._rawModule.getters,t)},i.prototype.forEachAction=function(t){this._rawModule.actions&&r(this._rawModule.actions,t)},i.prototype.forEachMutation=function(t){this._rawModule.mutations&&r(this._rawModule.mutations,t)},Object.defineProperties(i.prototype,u);var c,l=function(t){this.register([],t,!1)};function d(t,e,s){if(e.update(s),s.modules)for(var a in s.modules){if(!e.getChild(a))return;d(t.concat(a),e.getChild(a),s.modules[a])}}l.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},l.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,s){return t+((e=e.getChild(s)).namespaced?s+"/":"")},"")},l.prototype.update=function(t){d([],this.root,t)},l.prototype.register=function(t,e,s){var a=this;void 0===s&&(s=!0);var n=new i(e,s);0===t.length?this.root=n:this.get(t.slice(0,-1)).addChild(t[t.length-1],n),e.modules&&r(e.modules,function(e,n){a.register(t.concat(n),e,s)})},l.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),s=t[t.length-1],a=e.getChild(s);a&&a.runtime&&e.removeChild(s)},l.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),s=t[t.length-1];return!!e&&e.hasChild(s)};var f=function(t){var e=this;void 0===t&&(t={}),!c&&"undefined"!=typeof window&&window.Vue&&_(window.Vue);var s=t.plugins;void 0===s&&(s=[]);var n=t.strict;void 0===n&&(n=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new l(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new c,this._makeLocalGettersCache=Object.create(null);var r=this,o=this.dispatch,i=this.commit;this.dispatch=function(t,e){return o.call(r,t,e)},this.commit=function(t,e,s){return i.call(r,t,e,s)},this.strict=n;var u=this._modules.root.state;v(this,u,[],this._modules.root),g(this,u),s.forEach(function(t){return t(e)}),(void 0!==t.devtools?t.devtools:c.config.devtools)&&function(t){a&&(t._devtoolHook=a,a.emit("vuex:init",t),a.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(t,e){a.emit("vuex:mutation",t,e)},{prepend:!0}),t.subscribeAction(function(t,e){a.emit("vuex:action",t,e)},{prepend:!0}))}(this)},p={state:{configurable:!0}};function m(t,e,s){return e.indexOf(t)<0&&(s&&s.prepend?e.unshift(t):e.push(t)),function(){var s=e.indexOf(t);s>-1&&e.splice(s,1)}}function h(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var s=t.state;v(t,s,[],t._modules.root,!0),g(t,s,e)}function g(t,e,s){var a=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var n=t._wrappedGetters,o={};r(n,function(e,s){o[s]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,s,{get:function(){return t._vm[s]},enumerable:!0})});var i=c.config.silent;c.config.silent=!0,t._vm=new c({data:{$$state:e},computed:o}),c.config.silent=i,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}(t),a&&(s&&t._withCommit(function(){a._data.$$state=null}),c.nextTick(function(){return a.$destroy()}))}function v(t,e,s,a,n){var r=!s.length,o=t._modules.getNamespace(s);if(a.namespaced&&(t._modulesNamespaceMap[o],t._modulesNamespaceMap[o]=a),!r&&!n){var i=y(e,s.slice(0,-1)),u=s[s.length-1];t._withCommit(function(){c.set(i,u,a.state)})}var l=a.context=function(t,e,s){var a=""===e,n={dispatch:a?t.dispatch:function(s,a,n){var r=b(s,a,n),o=r.payload,i=r.options,u=r.type;return i&&i.root||(u=e+u),t.dispatch(u,o)},commit:a?t.commit:function(s,a,n){var r=b(s,a,n),o=r.payload,i=r.options,u=r.type;i&&i.root||(u=e+u),t.commit(u,o,i)}};return Object.defineProperties(n,{getters:{get:a?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var s={},a=e.length;Object.keys(t.getters).forEach(function(n){if(n.slice(0,a)===e){var r=n.slice(a);Object.defineProperty(s,r,{get:function(){return t.getters[n]},enumerable:!0})}}),t._makeLocalGettersCache[e]=s}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return y(t.state,s)}}}),n}(t,o,s);a.forEachMutation(function(e,s){!function(t,e,s,a){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){s.call(t,a.state,e)})}(t,o+s,e,l)}),a.forEachAction(function(e,s){var a=e.root?s:o+s,n=e.handler||e;!function(t,e,s,a){(t._actions[e]||(t._actions[e]=[])).push(function(e){var n,r=s.call(t,{dispatch:a.dispatch,commit:a.commit,getters:a.getters,state:a.state,rootGetters:t.getters,rootState:t.state},e);return(n=r)&&"function"==typeof n.then||(r=Promise.resolve(r)),t._devtoolHook?r.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):r})}(t,a,n,l)}),a.forEachGetter(function(e,s){!function(t,e,s,a){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return s(a.state,a.getters,t.state,t.getters)})}(t,o+s,e,l)}),a.forEachChild(function(a,r){v(t,e,s.concat(r),a,n)})}function y(t,e){return e.reduce(function(t,e){return t[e]},t)}function b(t,e,s){return o(t)&&t.type&&(s=e,e=t,t=t.type),{type:t,payload:e,options:s}}function _(t){c&&t===c||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:s});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[s].concat(t.init):s,e.call(this,t)}}function s(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(c=t)}p.state.get=function(){return this._vm._data.$$state},p.state.set=function(t){},f.prototype.commit=function(t,e,s){var a=this,n=b(t,e,s),r=n.type,o=n.payload,i=(n.options,{type:r,payload:o}),u=this._mutations[r];u&&(this._withCommit(function(){u.forEach(function(t){t(o)})}),this._subscribers.slice().forEach(function(t){return t(i,a.state)}))},f.prototype.dispatch=function(t,e){var s=this,a=b(t,e),n=a.type,r=a.payload,o={type:n,payload:r},i=this._actions[n];if(i){try{this._actionSubscribers.slice().filter(function(t){return t.before}).forEach(function(t){return t.before(o,s.state)})}catch(t){}var u=i.length>1?Promise.all(i.map(function(t){return t(r)})):i[0](r);return new Promise(function(t,e){u.then(function(e){try{s._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(o,s.state)})}catch(t){}t(e)},function(t){try{s._actionSubscribers.filter(function(t){return t.error}).forEach(function(e){return e.error(o,s.state,t)})}catch(t){}e(t)})})}},f.prototype.subscribe=function(t,e){return m(t,this._subscribers,e)},f.prototype.subscribeAction=function(t,e){return m("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},f.prototype.watch=function(t,e,s){var a=this;return this._watcherVM.$watch(function(){return t(a.state,a.getters)},e,s)},f.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},f.prototype.registerModule=function(t,e,s){void 0===s&&(s={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),v(this,this.state,t,this._modules.get(t),s.preserveState),g(this,this.state)},f.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var s=y(e.state,t.slice(0,-1));c.delete(s,t[t.length-1])}),h(this)},f.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},f.prototype.hotUpdate=function(t){this._modules.update(t),h(this,!0)},f.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(f.prototype,p);var A=C(function(t,e){var s={};return M(e).forEach(function(e){var a=e.key,n=e.val;s[a]=function(){var e=this.$store.state,s=this.$store.getters;if(t){var a=O(this.$store,0,t);if(!a)return;e=a.context.state,s=a.context.getters}return"function"==typeof n?n.call(this,e,s):e[n]},s[a].vuex=!0}),s}),w=C(function(t,e){var s={};return M(e).forEach(function(e){var a=e.key,n=e.val;s[a]=function(){for(var e=[],s=arguments.length;s--;)e[s]=arguments[s];var a=this.$store.commit;if(t){var r=O(this.$store,0,t);if(!r)return;a=r.context.commit}return"function"==typeof n?n.apply(this,[a].concat(e)):a.apply(this.$store,[n].concat(e))}}),s}),S=C(function(t,e){var s={};return M(e).forEach(function(e){var a=e.key,n=e.val;n=t+n,s[a]=function(){if(!t||O(this.$store,0,t))return this.$store.getters[n]},s[a].vuex=!0}),s}),I=C(function(t,e){var s={};return M(e).forEach(function(e){var a=e.key,n=e.val;s[a]=function(){for(var e=[],s=arguments.length;s--;)e[s]=arguments[s];var a=this.$store.dispatch;if(t){var r=O(this.$store,0,t);if(!r)return;a=r.context.dispatch}return"function"==typeof n?n.apply(this,[a].concat(e)):a.apply(this.$store,[n].concat(e))}}),s});function M(t){return function(t){return Array.isArray(t)||o(t)}(t)?Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}}):[]}function C(t){return function(e,s){return"string"!=typeof e?(s=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,s)}}function O(t,e,s){return t._modulesNamespaceMap[s]}function k(t,e,s){var a=s?t.groupCollapsed:t.group;try{a.call(t,e)}catch(s){t.log(e)}}function T(t){try{t.groupEnd()}catch(e){t.log("—— log end ——")}}function j(){var t=new Date;return" @ "+E(t.getHours(),2)+":"+E(t.getMinutes(),2)+":"+E(t.getSeconds(),2)+"."+E(t.getMilliseconds(),3)}function E(t,e){return s=e-t.toString().length,new Array(s+1).join("0")+t;var s}const $={Store:f,install:_,version:"3.6.2",mapState:A,mapMutations:w,mapGetters:S,mapActions:I,createNamespacedHelpers:function(t){return{mapState:A.bind(null,t),mapGetters:S.bind(null,t),mapMutations:w.bind(null,t),mapActions:I.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var s=t.filter;void 0===s&&(s=function(t,e,s){return!0});var a=t.transformer;void 0===a&&(a=function(t){return t});var r=t.mutationTransformer;void 0===r&&(r=function(t){return t});var o=t.actionFilter;void 0===o&&(o=function(t,e){return!0});var i=t.actionTransformer;void 0===i&&(i=function(t){return t});var u=t.logMutations;void 0===u&&(u=!0);var c=t.logActions;void 0===c&&(c=!0);var l=t.logger;return void 0===l&&(l=console),function(t){var d=n(t.state);void 0!==l&&(u&&t.subscribe(function(t,o){var i=n(o);if(s(t,d,i)){var u=j(),c=r(t),f="mutation "+t.type+u;k(l,f,e),l.log("%c prev state","color: #9E9E9E; font-weight: bold",a(d)),l.log("%c mutation","color: #03A9F4; font-weight: bold",c),l.log("%c next state","color: #4CAF50; font-weight: bold",a(i)),T(l)}d=i}),c&&t.subscribeAction(function(t,s){if(o(t,s)){var a=j(),n=i(t),r="action "+t.type+a;k(l,r,e),l.log("%c action","color: #03A9F4; font-weight: bold",n),T(l)}}))}}}}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var s=r[t]={id:t,loaded:!1,exports:{}};return n[t].call(s.exports,s,s.exports,o),s.loaded=!0,s.exports}o.m=n,e=[],o.O=(t,s,a,n)=>{if(!s){var r=1/0;for(l=0;l<e.length;l++){for(var[s,a,n]=e[l],i=!0,u=0;u<s.length;u++)(!1&n||r>=n)&&Object.keys(o.O).every(t=>o.O[t](s[u]))?s.splice(u--,1):(i=!1,n<r&&(r=n));if(i){e.splice(l--,1);var c=a();void 0!==c&&(t=c)}}return t}n=n||0;for(var l=e.length;l>0&&e[l-1][2]>n;l--)e[l]=e[l-1];e[l]=[s,a,n]},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var s in e)o.o(e,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce((e,s)=>(o.f[s](t,e),e),[])),o.u=t=>(5133===t?"user-status-modal":t)+"-"+t+".js?v="+{594:"2c86902dfae9a5006399",620:"8f7783b39d802f10e22b",2391:"908fc68e4bc9b878c937",2880:"fdf99dc4a6f328ebe498",4325:"67df7ab13a8e8d214551",5133:"0f6eb3dc3532eb544cc6",5862:"d020c05f13d21afee82a",7145:"7889fe0b0ebc57e3d5f1",8339:"6cdca71a6b3b2d7bef33"}[t],o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s={},a="nextcloud-ui-legacy:",o.l=(t,e,n,r)=>{if(s[t])s[t].push(e);else{var i,u;if(void 0!==n)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var d=c[l];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==a+n){i=d;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",a+n),i.src=t),s[t]=[e];var f=(e,a)=>{i.onerror=i.onload=null,clearTimeout(p);var n=s[t];if(delete s[t],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(t=>t(a)),e)return e(a)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),u&&document.head.appendChild(i)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),o.j=9953,(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var s=e.getElementsByTagName("script");if(s.length)for(var a=s.length-1;a>-1&&(!t||!/^http(s?):/.test(t));)t=s[a--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{o.b="undefined"!=typeof document&&document.baseURI||self.location.href;var t={9953:0};o.f.j=(e,s)=>{var a=o.o(t,e)?t[e]:void 0;if(0!==a)if(a)s.push(a[2]);else{var n=new Promise((s,n)=>a=t[e]=[s,n]);s.push(a[2]=n);var r=o.p+o.u(e),i=new Error;o.l(r,s=>{if(o.o(t,e)&&(0!==(a=t[e])&&(t[e]=void 0),a)){var n=s&&("load"===s.type?"missing":s.type),r=s&&s.target&&s.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+r+")",i.name="ChunkLoadError",i.type=n,i.request=r,a[1](i)}},"chunk-"+e,e)}},o.O.j=e=>0===t[e];var e=(e,s)=>{var a,n,[r,i,u]=s,c=0;if(r.some(e=>0!==t[e])){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);if(u)var l=u(o)}for(e&&e(s);c<r.length;c++)n=r[c],o.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return o.O(l)},s=globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[];s.forEach(e.bind(null,0)),s.push=e.bind(null,s.push.bind(s))})(),o.nc=void 0;var i=o.O(void 0,[4208],()=>o(82495));i=o.O(i)})();
//# sourceMappingURL=user_status-menu.js.map?v=69d3e911ca385fd6c6e3