From 85f5ae9264c6cf8dcdcd061f0e5d8008f745a596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Fri, 6 Apr 2018 21:36:22 +0200 Subject: [PATCH] Redirect if disabled list is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- settings/js/main.js | 591 +++++++++++++++++++++++++-- settings/src/components/userList.vue | 15 +- settings/src/store/index.js | 9 +- settings/src/views/Users.vue | 2 +- 4 files changed, 579 insertions(+), 38 deletions(-) diff --git a/settings/js/main.js b/settings/js/main.js index e1f820824a..ae3d2390a2 100644 --- a/settings/js/main.js +++ b/settings/js/main.js @@ -1,23 +1,568 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=23)}([function(t,e,n){"use strict";function r(t){return"[object Array]"===k.call(t)}function i(t){return"[object ArrayBuffer]"===k.call(t)}function o(t){return"undefined"!=typeof FormData&&t instanceof FormData}function a(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function s(t){return"string"==typeof t}function u(t){return"number"==typeof t}function c(t){return void 0===t}function l(t){return null!==t&&"object"==typeof t}function f(t){return"[object Date]"===k.call(t)}function p(t){return"[object File]"===k.call(t)}function d(t){return"[object Blob]"===k.call(t)}function h(t){return"[object Function]"===k.call(t)}function v(t){return l(t)&&h(t.pipe)}function m(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function g(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function y(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var n=0,i=t.length;n=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}function m(t,e){return lo.call(t,e)}function g(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function y(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function b(t,e){return t.bind(e)}function _(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function w(t,e){for(var n in e)t[n]=e[n];return t}function x(t){for(var e={},n=0;n-1)if(o&&!m(i,"default"))a=!1;else if(""===a||a===mo(t)){var u=nt(String,i.type);(u<0||s0&&(a=bt(a,(e||"")+"_"+n),yt(a[0])&&yt(c)&&(l[u]=U(c.text+a[0].text),a.shift()),l.push.apply(l,a)):s(a)?yt(c)?l[u]=U(c.text+a):""!==a&&l.push(U(a)):yt(a)&&yt(c)?l[u]=U(c.text+a.text):(o(t._isVList)&&i(a.tag)&&r(a.key)&&i(e)&&(a.key="__vlist"+e+"_"+n+"__"),l.push(a)));return l}function _t(t,e){return(t.__esModule||Bo&&"Module"===t[Symbol.toStringTag])&&(t=t.default),u(t)?e.extend(t):t}function wt(t,e,n,r,i){var o=Jo();return o.asyncFactory=t,o.asyncMeta={data:e,context:n,children:r,tag:i},o}function xt(t,e,n){if(o(t.error)&&i(t.errorComp))return t.errorComp;if(i(t.resolved))return t.resolved;if(o(t.loading)&&i(t.loadingComp))return t.loadingComp;if(!i(t.contexts)){var a=t.contexts=[n],s=!0,c=function(){for(var t=0,e=a.length;tba&&ha[n].id>t.id;)n--;ha.splice(n+1,0,t)}else ha.push(t);ga||(ga=!0,ut(Ft))}}function Ht(t,e,n){xa.get=function(){return this[e][n]},xa.set=function(t){this[e][n]=t},Object.defineProperty(t,n,xa)}function zt(t){t._watchers=[];var e=t.$options;e.props&&Kt(t,e.props),e.methods&&Zt(t,e.methods),e.data?Jt(t):M(t._data={},!0),e.computed&&Yt(t,e.computed),e.watch&&e.watch!==jo&&te(t,e.watch)}function Kt(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[];!t.$parent||N(!1);for(var o in e)!function(o){i.push(o);var a=X(o,e,n,t);D(r,o,a),o in t||Ht(t,"_props",o)}(o);N(!0)}function Jt(t){var e=t.$options.data;e=t._data="function"==typeof e?Wt(e,t):e||{},c(e)||(e={});for(var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);i--;){var o=n[i];r&&m(r,o)||$(o)||Ht(t,"_data",o)}M(e,!0)}function Wt(t,e){T();try{return t.call(e,e)}catch(t){return rt(t,e,"data()"),{}}finally{P()}}function Yt(t,e){var n=t._computedWatchers=Object.create(null),r=Do();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;r||(n[i]=new wa(t,a||C,C,Ca)),i in t||Qt(t,i,o)}}function Qt(t,e,n){var r=!Do();"function"==typeof n?(xa.get=r?Xt(e):n,xa.set=C):(xa.get=n.get?r&&!1!==n.cache?Xt(e):n.get:C,xa.set=n.set?n.set:C),Object.defineProperty(t,e,xa)}function Xt(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Go.target&&e.depend(),e.value}}function Zt(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?C:go(e[n],t)}function te(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(t[i])<0)&&r.push(t[i]);return r}return t}function je(t){this._init(t)}function Ne(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=_(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}function Re(t){t.mixin=function(t){return this.options=Y(this.options,t),this}}function Ie(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Y(n.options,t),a.super=n,a.options.props&&Me(a),a.options.computed&&De(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,wo.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=w({},a.options),i[r]=a,a}}function Me(t){var e=t.options.props;for(var n in e)Ht(t.prototype,"_props",n)}function De(t){var e=t.options.computed;for(var n in e)Qt(t.prototype,n,e[n])}function Fe(t){wo.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function Be(t){return t&&(t.Ctor.options.name||t.tag)}function qe(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function Ve(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=Be(a.componentOptions);s&&!e(s)&&Ge(n,o,r,i)}}}function Ge(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,v(n,e)}function He(t){for(var e=t.data,n=t,r=t;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=ze(r.data,e));for(;i(n=n.parent);)n&&n.data&&(e=ze(e,n.data));return Ke(e.staticClass,e.class)}function ze(t,e){return{staticClass:Je(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function Ke(t,e){return i(t)||i(e)?Je(t,We(e)):""}function Je(t,e){return t?e?t+" "+e:t:e||""}function We(t){return Array.isArray(t)?Ye(t):u(t)?Qe(t):"string"==typeof t?t:""}function Ye(t){for(var e,n="",r=0,o=t.length;r-1?es[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:es[t]=/HTMLUnknownElement/.test(e.toString())}function tn(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function en(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function nn(t,e){return document.createElementNS(Ya[t],e)}function rn(t){return document.createTextNode(t)}function on(t){return document.createComment(t)}function an(t,e,n){t.insertBefore(e,n)}function sn(t,e){t.removeChild(e)}function un(t,e){t.appendChild(e)}function cn(t){return t.parentNode}function ln(t){return t.nextSibling}function fn(t){return t.tagName}function pn(t,e){t.textContent=e}function dn(t,e){t.setAttribute(e,"")}function hn(t,e){var n=t.data.ref;if(i(n)){var r=t.context,o=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?v(a[n],o):a[n]===o&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(o)<0&&a[n].push(o):a[n]=[o]:a[n]=o}}function vn(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&i(t.data)===i(e.data)&&mn(t,e)||o(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function mn(t,e){if("input"!==t.tag)return!0;var n,r=i(n=t.data)&&i(n=n.attrs)&&n.type,o=i(n=e.data)&&i(n=n.attrs)&&n.type;return r===o||ns(r)&&ns(o)}function gn(t,e,n){var r,o,a={};for(r=e;r<=n;++r)o=t[r].key,i(o)&&(a[o]=r);return a}function yn(t,e){(t.data.directives||e.data.directives)&&bn(t,e)}function bn(t,e){var n,r,i,o=t===os,a=e===os,s=_n(t.data.directives,t.context),u=_n(e.data.directives,e.context),c=[],l=[];for(n in u)r=s[n],i=u[n],r?(i.oldValue=r.value,xn(i,"update",e,t),i.def&&i.def.componentUpdated&&l.push(i)):(xn(i,"bind",e,t),i.def&&i.def.inserted&&c.push(i));if(c.length){var f=function(){for(var n=0;n-1?On(t,e,n):Ha(e)?Wa(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Ga(e)?t.setAttribute(e,Wa(n)||"false"===n?"false":"true"):Ka(e)?Wa(n)?t.removeAttributeNS(za,Ja(e)):t.setAttributeNS(za,e,n):On(t,e,n)}function On(t,e,n){if(Wa(n))t.removeAttribute(e);else{if(Eo&&!To&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}function Sn(t,e){var n=e.elm,o=e.data,a=t.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=He(e),u=n._transitionClasses;i(u)&&(s=Je(s,We(u))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}function $n(t){function e(){(a||(a=[])).push(t.slice(h,i).trim()),h=i+1}var n,r,i,o,a,s=!1,u=!1,c=!1,l=!1,f=0,p=0,d=0,h=0;for(i=0;i=0&&" "===(m=t.charAt(v));v--);m&&ps.test(m)||(l=!0)}}else void 0===o?(h=i+1,o=t.slice(0,i).trim()):e();if(void 0===o?o=t.slice(0,i).trim():0!==h&&e(),a)for(i=0;i-1?{exp:t.slice(0,Na),key:'"'+t.slice(Na+1)+'"'}:{exp:t,key:null};for(Ua=t,Na=Ra=Ia=0;!qn();)ja=Bn(),Vn(ja)?Hn(ja):91===ja&&Gn(ja);return{exp:t.slice(0,Ra),key:t.slice(Ra+1,Ia)}}function Bn(){return Ua.charCodeAt(++Na)}function qn(){return Na>=Pa}function Vn(t){return 34===t||39===t}function Gn(t){var e=1;for(Ra=Na;!qn();)if(t=Bn(),Vn(t))Hn(t);else if(91===t&&e++,93===t&&e--,0===e){Ia=Na;break}}function Hn(t){for(var e=t;!qn()&&(t=Bn())!==e;);}function zn(t,e,n){Ma=n;var r=e.value,i=e.modifiers,o=t.tag,a=t.attrsMap.type;if(t.component)return Mn(t,r,i),!1;if("select"===o)Wn(t,r,i);else if("input"===o&&"checkbox"===a)Kn(t,r,i);else if("input"===o&&"radio"===a)Jn(t,r,i);else if("input"===o||"textarea"===o)Yn(t,r,i);else if(!Co.isReservedTag(o))return Mn(t,r,i),!1;return!0}function Kn(t,e,n){var r=n&&n.number,i=Rn(t,"value")||"null",o=Rn(t,"true-value")||"true",a=Rn(t,"false-value")||"false";Tn(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),Nn(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Dn(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Dn(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Dn(e,"$$c")+"}",null,!0)}function Jn(t,e,n){var r=n&&n.number,i=Rn(t,"value")||"null";i=r?"_n("+i+")":i,Tn(t,"checked","_q("+e+","+i+")"),Nn(t,"change",Dn(e,i),null,!0)}function Wn(t,e,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+Dn(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Nn(t,"change",o,null,!0)}function Yn(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,u=!o&&"range"!==r,c=o?"change":"range"===r?ds:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=Dn(e,l);u&&(f="if($event.target.composing)return;"+f),Tn(t,"value","("+e+")"),Nn(t,c,f,null,!0),(s||a)&&Nn(t,"blur","$forceUpdate()")}function Qn(t){if(i(t[ds])){var e=Eo?"change":"input";t[e]=[].concat(t[ds],t[e]||[]),delete t[ds]}i(t[hs])&&(t.change=[].concat(t[hs],t.change||[]),delete t[hs])}function Xn(t,e,n){var r=Da;return function i(){null!==t.apply(null,arguments)&&tr(e,i,n,r)}}function Zn(t,e,n,r,i){e=st(e),n&&(e=Xn(e,t,r)),Da.addEventListener(t,e,No?{capture:r,passive:i}:r)}function tr(t,e,n,r){(r||Da).removeEventListener(t,e._withTask||e,n)}function er(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},i=t.data.on||{};Da=e.elm,Qn(n),pt(n,i,Zn,tr,e.context),Da=void 0}}function nr(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,o,a=e.elm,s=t.data.domProps||{},u=e.data.domProps||{};i(u.__ob__)&&(u=e.data.domProps=w({},u));for(n in s)r(u[n])&&(a[n]="");for(n in u){if(o=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=o;var c=r(o)?"":String(o);rr(a,c)&&(a.value=c)}else a[n]=o}}}function rr(t,e){return!t.composing&&("OPTION"===t.tagName||ir(t,e)||or(t,e))}function ir(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}function or(t,e){var n=t.value,r=t._vModifiers;if(i(r)){if(r.lazy)return!1;if(r.number)return d(n)!==d(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}function ar(t){var e=sr(t.style);return t.staticStyle?w(t.staticStyle,e):e}function sr(t){return Array.isArray(t)?x(t):"string"==typeof t?gs(t):t}function ur(t,e){var n,r={};if(e)for(var i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=ar(i.data))&&w(r,n);(n=ar(t.data))&&w(r,n);for(var o=t;o=o.parent;)o.data&&(n=ar(o.data))&&w(r,n);return r}function cr(t,e){var n=e.data,o=t.data;if(!(r(n.staticStyle)&&r(n.style)&&r(o.staticStyle)&&r(o.style))){var a,s,u=e.elm,c=o.staticStyle,l=o.normalizedStyle||o.style||{},f=c||l,p=sr(e.data.style)||{};e.data.normalizedStyle=i(p.__ob__)?w({},p):p;var d=ur(e,!0);for(s in f)r(d[s])&&_s(u,s,"");for(s in d)(a=d[s])!==f[s]&&_s(u,s,null==a?"":a)}}function lr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function fr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function pr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&w(e,ks(t.name||"v")),w(e,t),e}return"string"==typeof t?ks(t):void 0}}function dr(t){Ps(function(){Ps(t)})}function hr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),lr(t,e))}function vr(t,e){t._transitionClasses&&v(t._transitionClasses,e),fr(t,e)}function mr(t,e,n){var r=gr(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ss?Ls:Ts,u=0,c=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++u>=a&&c()};setTimeout(function(){u0&&(n=Ss,l=a,f=o.length):e===$s?c>0&&(n=$s,l=c,f=u.length):(l=Math.max(a,c),n=l>0?a>c?Ss:$s:null,f=n?n===Ss?o.length:u.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===Ss&&Us.test(r[As+"Property"])}}function yr(t,e){for(;t.length1}function kr(t,e){!0!==e.data.show&&_r(e)}function Or(t,e,n){Sr(t,e,n),(Eo||Po)&&setTimeout(function(){Sr(t,e,n)},0)}function Sr(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,u=t.options.length;s-1,a.selected!==o&&(a.selected=o);else if(k(Ar(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function $r(t,e){return e.every(function(e){return!k(e,t)})}function Ar(t){return"_value"in t?t._value:t.value}function Lr(t){t.target.composing=!0}function Er(t){t.target.composing&&(t.target.composing=!1,Tr(t.target,"input"))}function Tr(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Pr(t){return!t.componentInstance||t.data&&t.data.transition?t:Pr(t.componentInstance._vnode)}function Ur(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Ur(kt(e.children)):t}function jr(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[po(o)]=i[o];return e}function Nr(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Rr(t){for(;t=t.parent;)if(t.data.transition)return!0}function Ir(t,e){return e.key===t.key&&e.tag===t.tag}function Mr(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Dr(t){t.data.newPos=t.elm.getBoundingClientRect()}function Fr(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function Br(t,e){var n=e?Ws(e):Ks;if(n.test(t)){for(var r,i,o,a=[],s=[],u=n.lastIndex=0;r=n.exec(t);){i=r.index,i>u&&(s.push(o=t.slice(u,i)),a.push(JSON.stringify(o)));var c=$n(r[1].trim());a.push("_s("+c+")"),s.push({"@binding":c}),u=i+r[0].length}return u=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var u=a.length-1;u>=i;u--)e.end&&e.end(a[u].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,r):"p"===s&&(e.start&&e.start(t,[],!1,n,r),e.end&&e.end(t,n,r))}for(var i,o,a=[],s=e.expectHTML,u=e.isUnaryTag||yo,c=e.canBeLeftOpenTag||yo,l=0;t;){if(i=t,o&&Cu(o)){var f=0,p=o.toLowerCase(),d=ku[p]||(ku[p]=new RegExp("([\\s\\S]*?)(]*>)","i")),h=t.replace(d,function(t,n,r){return f=r.length,Cu(p)||"noscript"===p||(n=n.replace(//g,"$1").replace(//g,"$1")),Lu(p,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});l+=t.length-h.length,t=h,r(p,l-f,l)}else{var v=t.indexOf("<");if(0===v){if(cu.test(t)){var m=t.indexOf("--\x3e");if(m>=0){e.shouldKeepComment&&e.comment(t.substring(4,m)),n(m+3);continue}}if(lu.test(t)){var g=t.indexOf("]>");if(g>=0){n(g+2);continue}}var y=t.match(uu);if(y){n(y[0].length);continue}var b=t.match(su);if(b){var _=l;n(b[0].length),r(b[1],_,l);continue}var w=function(){var e=t.match(ou);if(e){var r={tagName:e[1],attrs:[],start:l};n(e[0].length);for(var i,o;!(i=t.match(au))&&(o=t.match(nu));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if(w){!function(t){var n=t.tagName,i=t.unarySlash;s&&("p"===o&&eu(n)&&r(o),c(n)&&o===n&&r(n));for(var l=u(n)||!!i,f=t.attrs.length,p=new Array(f),d=0;d=0){for(C=t.slice(v);!(su.test(C)||ou.test(C)||cu.test(C)||lu.test(C)||(k=C.indexOf("<",1))<0);)v+=k,C=t.slice(v);x=t.substring(0,v),n(v)}v<0&&(x=t,t=""),e.chars&&x&&e.chars(x)}if(t===i){e.chars&&e.chars(t);break}}r()}function Jr(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:di(e),parent:n,children:[]}}function Wr(t,e){function n(t){t.pre&&(s=!1),gu(t.tag)&&(u=!1);for(var n=0;n':'
',xu.innerHTML.indexOf(" ")>0}function oo(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}/*! - * Vue.js v2.5.16 - * (c) 2014-2018 Evan You - * Released under the MIT License. - */ -var ao=Object.freeze({}),so=Object.prototype.toString,uo=h("slot,component",!0),co=h("key,ref,slot,slot-scope,is"),lo=Object.prototype.hasOwnProperty,fo=/-(\w)/g,po=g(function(t){return t.replace(fo,function(t,e){return e?e.toUpperCase():""})}),ho=g(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),vo=/\B([A-Z])/g,mo=g(function(t){return t.replace(vo,"-$1").toLowerCase()}),go=Function.prototype.bind?b:y,yo=function(t,e,n){return!1},bo=function(t){return t},_o="data-server-rendered",wo=["component","directive","filter"],xo=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],Co={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:yo,isReservedAttr:yo,isUnknownElement:yo,getTagNamespace:C,parsePlatformTagName:bo,mustUseProp:yo,_lifecycleHooks:xo},ko=/[^\w.$]/,Oo="__proto__"in{},So="undefined"!=typeof window,$o="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Ao=$o&&WXEnvironment.platform.toLowerCase(),Lo=So&&window.navigator.userAgent.toLowerCase(),Eo=Lo&&/msie|trident/.test(Lo),To=Lo&&Lo.indexOf("msie 9.0")>0,Po=Lo&&Lo.indexOf("edge/")>0,Uo=(Lo&&Lo.indexOf("android"),Lo&&/iphone|ipad|ipod|ios/.test(Lo)||"ios"===Ao),jo=(Lo&&/chrome\/\d+/.test(Lo),{}.watch),No=!1;if(So)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){No=!0}}),window.addEventListener("test-passive",null,Ro)}catch(t){}var Io,Mo,Do=function(){return void 0===Io&&(Io=!So&&!$o&&void 0!==t&&"server"===t.process.env.VUE_ENV),Io},Fo=So&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Bo="undefined"!=typeof Symbol&&E(Symbol)&&"undefined"!=typeof Reflect&&E(Reflect.ownKeys);Mo="undefined"!=typeof Set&&E(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var qo=C,Vo=0,Go=function(){this.id=Vo++,this.subs=[]};Go.prototype.addSub=function(t){this.subs.push(t)},Go.prototype.removeSub=function(t){v(this.subs,t)},Go.prototype.depend=function(){Go.target&&Go.target.addDep(this)},Go.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e1?_(n):n;for(var r=_(arguments,1),i=0,o=n.length;iparseInt(this.max)&&Ge(u,c[0],c,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Ta={KeepAlive:Ea};!function(t){var e={};e.get=function(){return Co},Object.defineProperty(t,"config",e),t.util={warn:qo,extend:w,mergeOptions:Y,defineReactive:D},t.set=F,t.delete=B,t.nextTick=ut,t.options=Object.create(null),wo.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,w(t.options.components,Ta),Ne(t),Re(t),Ie(t),Fe(t)}(je),Object.defineProperty(je.prototype,"$isServer",{get:Do}),Object.defineProperty(je.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(je,"FunctionalRenderContext",{value:ge}),je.version="2.5.16";var Pa,Ua,ja,Na,Ra,Ia,Ma,Da,Fa,Ba=h("style,class"),qa=h("input,textarea,option,select,progress"),Va=function(t,e,n){return"value"===n&&qa(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Ga=h("contenteditable,draggable,spellcheck"),Ha=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),za="http://www.w3.org/1999/xlink",Ka=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Ja=function(t){return Ka(t)?t.slice(6,t.length):""},Wa=function(t){return null==t||!1===t},Ya={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Qa=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Xa=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Za=function(t){return"pre"===t},ts=function(t){return Qa(t)||Xa(t)},es=Object.create(null),ns=h("text,number,password,search,email,tel,url"),rs=Object.freeze({createElement:en,createElementNS:nn,createTextNode:rn,createComment:on,insertBefore:an,removeChild:sn,appendChild:un,parentNode:cn,nextSibling:ln,tagName:fn,setTextContent:pn,setStyleScope:dn}),is={create:function(t,e){hn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(hn(t,!0),hn(e))},destroy:function(t){hn(t,!0)}},os=new zo("",{},[]),as=["create","activate","update","remove","destroy"],ss={create:yn,update:yn,destroy:function(t){yn(t,os)}},us=Object.create(null),cs=[is,ss],ls={create:Cn,update:Cn},fs={create:Sn,update:Sn},ps=/[\w).+\-_$\]]/,ds="__r",hs="__c",vs={create:er,update:er},ms={create:nr,update:nr},gs=g(function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}),ys=/^--/,bs=/\s*!important$/,_s=function(t,e,n){if(ys.test(e))t.style.setProperty(e,n);else if(bs.test(n))t.style.setProperty(e,n.replace(bs,""),"important");else{var r=xs(e);if(Array.isArray(n))for(var i=0,o=n.length;ih?(f=r(n[g+1])?null:n[g+1].elm,y(t,f,n,d,g,o)):d>g&&_(t,e,p,h)}function C(t,e,n,r){for(var o=n;o\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ru="[a-zA-Z_][\\w\\-\\.]*",iu="((?:"+ru+"\\:)?"+ru+")",ou=new RegExp("^<"+iu),au=/^\s*(\/?)>/,su=new RegExp("^<\\/"+iu+"[^>]*>"),uu=/^]+>/i,cu=/^",""":'"',"&":"&"," ":"\n"," ":"\t"},Su=/&(?:lt|gt|quot|amp);/g,$u=/&(?:lt|gt|quot|amp|#10|#9);/g,Au=h("pre,textarea",!0),Lu=function(t,e){return t&&Au(t)&&"\n"===e[0]},Eu=/^@|^v-on:/,Tu=/^v-|^@|^:/,Pu=/([^]*?)\s+(?:in|of)\s+([^]*)/,Uu=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ju=/^\(|\)$/g,Nu=/:(.*)$/,Ru=/^:|^v-bind:/,Iu=/\.[^.]+/g,Mu=g(Xs.decode),Du=/^xmlns:NS\d+/,Fu=/^NS\d+:/,Bu={preTransformNode:gi},qu=[Ys,Qs,Bu],Vu={model:zn,text:bi,html:_i},Gu={expectHTML:!0,modules:qu,directives:Vu,isPreTag:Za,isUnaryTag:Zs,mustUseProp:Va,canBeLeftOpenTag:tu,isReservedTag:ts,getTagNamespace:Xe,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(qu)},Hu=g(xi),zu=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Ku=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ju={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Wu={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete"]},Yu=function(t){return"if("+t+")return null;"},Qu={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Yu("$event.target !== $event.currentTarget"),ctrl:Yu("!$event.ctrlKey"),shift:Yu("!$event.shiftKey"),alt:Yu("!$event.altKey"),meta:Yu("!$event.metaKey"),left:Yu("'button' in $event && $event.button !== 0"),middle:Yu("'button' in $event && $event.button !== 1"),right:Yu("'button' in $event && $event.button !== 2")},Xu={on:Ti,bind:Pi,cloak:C},Zu=function(t){this.options=t,this.warn=t.warn||Ln,this.transforms=En(t.modules,"transformCode"),this.dataGenFns=En(t.modules,"genData"),this.directives=w(w({},Xu),t.directives);var e=t.isReservedTag||yo;this.maybeComponent=function(t){return!e(t.tag)},this.onceId=0,this.staticRenderFns=[]},tc=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),function(t){return function(e){function n(n,r){var i=Object.create(e),o=[],a=[];if(i.warn=function(t,e){(e?a:o).push(t)},r){r.modules&&(i.modules=(e.modules||[]).concat(r.modules)),r.directives&&(i.directives=w(Object.create(e.directives||null),r.directives));for(var s in r)"modules"!==s&&"directives"!==s&&(i[s]=r[s])}var u=t(n,i);return u.errors=o,u.tips=a,u}return{compile:n,compileToFunctions:ro(n)}}}(function(t,e){var n=Wr(t.trim(),e);!1!==e.optimize&&wi(n,e);var r=Ui(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}})),ec=tc(Gu),nc=ec.compileToFunctions,rc=!!So&&io(!1),ic=!!So&&io(!0),oc=g(function(t){var e=tn(t);return e&&e.innerHTML}),ac=je.prototype.$mount;je.prototype.$mount=function(t,e){if((t=t&&tn(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=oc(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=oo(t));if(r){var i=nc(r,{shouldDecodeNewlines:rc,shouldDecodeNewlinesForHref:ic,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return ac.call(this,t,e)},je.compile=nc,e.a=je}).call(e,n(3),n(24).setImmediate)},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){v&&d&&(v=!1,d.length?h=d.concat(h):m=-1,h.length&&s())}function s(){if(!v){var t=i(a);v=!0;for(var e=h.length;e;){for(d=h,h=[];++m1)for(var n=1;n=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(t){s.headers[t]={}}),i.forEach(["post","put","patch"],function(t){s.headers[t]=i.merge(a)}),t.exports=s}).call(e,n(4))},function(t,e,n){"use strict";e.a={name:"App",beforeMount:function(){null!==document.getElementById("serverData")&&this.$store.commit("setServerData",JSON.parse(document.getElementById("serverData").dataset.server))}}},function(e,n,r){"use strict";var i=r(37),o=r(44),a=r(2),s=r(49),u=r.n(s);a.a.use(u.a),n.a={name:"Users",components:{appNavigation:i.a,userList:o.a},beforeMount:function(){this.$store.commit("initGroups",{groups:this.$store.getters.getServerData.groups,orderBy:this.$store.getters.getServerData.sortGroups,userCount:this.$store.getters.getServerData.userCount}),this.$store.dispatch("getPasswordPolicyMinLength")},data:function(){return{showConfig:{showStoragePath:!1,showUserBackend:!1,showLastLogin:!1,showNewUserForm:!1}}},methods:{getLocalstorage:function(t){return this.showConfig[t]="true"===this.$localStorage.get(t),this.showConfig[t]},setLocalStorage:function(t,e){return this.showConfig[t]=e,this.$localStorage.set(t,e),e}},computed:{route:function(){return this.$store.getters.getRoute},users:function(){return this.$store.getters.getUsers},loading:function(){return 0===Object.keys(this.users).length},usersOffset:function(){return this.$store.getters.getUsersOffset},usersLimit:function(){return this.$store.getters.getUsersLimit},showLastLogin:{get:function(){return this.getLocalstorage("showLastLogin")},set:function(t){this.setLocalStorage("showLastLogin",t)}},showUserBackend:{get:function(){return this.getLocalstorage("showUserBackend")},set:function(t){this.setLocalStorage("showUserBackend",t)}},showStoragePath:{get:function(){return this.getLocalstorage("showStoragePath")},set:function(t){this.setLocalStorage("showStoragePath",t)}},userCount:function(){return this.$store.getters.getUserCount},menu:function(){var e=this,n=this,r=this.$store.getters.getGroups;r=Array.isArray(r)?r:[],r=r.map(function(t){var e={};return e.id=t.id.replace(" ","_"),e.classes=[],e.href="#group"+t.id.replace(" ","_"),e.text=t.name,e.utils={counter:t.usercount},e});var i=r.find(function(t){return"admin"==t.id}),o=r.find(function(t){return"_disabled"==t.id});i.text&&(i.text=t("settings","Admins")),o.text&&(o.text=t("settings","Disabled users"),0===o.utils.counter&&r.splice(r.findIndex(function(t){return"_disabled"==t.id}),1)),r.unshift({id:"_everyone",classes:[],href:"#group_everyone",text:t("settings","Everyone"),utils:{counter:this.userCount}});var a=r.findIndex(function(t){return t.href===e.route.hash});return a>=0?r[a].classes.push("active"):r[0].classes.push("active"),{id:"usergrouplist",new:{id:"new-user-button",text:t("settings","New user"),icon:"icon-add",action:function(){n.showConfig.showNewUserForm=!n.showConfig.showNewUserForm}},items:r}}}}},function(t,e,n){"use strict";var r=n(38);e.a={name:"appNavigation",props:["menu"],components:{navigationItem:r.a}}},function(t,e,n){"use strict";var r=n(10),i=n(13),o=n.n(i),a=n(2);e.a={name:"navigationItem",props:["item"],components:{popoverMenu:r.a},directives:{ClickOutside:o.a},data:function(){return{openedMenu:!1}},methods:{showMenu:function(){this.openedMenu=!0},hideMenu:function(){this.openedMenu=!1},toggleCollapse:function(){a.a.set(this.item,"opened",!this.item.opened||!this.item.opened)},cancelEdit:function(){Array.isArray(this.item.classes)&&(this.item.classes=this.item.classes.filter(function(t){return"editing"!==t}))}},mounted:function(){this.popupItem=this.$el}}},function(t,e,n){"use strict";var r=n(11),i=n(41),o=n(1),a=o(r.a,i.a,!1,null,null,null);e.a=a.exports},function(t,e,n){"use strict";var r=n(39);e.a={name:"popoverMenu",props:["menu"],components:{popoverItem:r.a}}},function(t,e,n){"use strict";e.a={props:["item"]}},function(t,e){function n(t){return"function"==typeof t.value||(console.warn("[Vue-click-outside:] provided expression",t.expression,"is not a function."),!1)}function r(t,e){if(!t||!e)return!1;for(var n=0,r=e.length;n0&&n.unshift(e.target),t.contains(e.target)||r(o.context.popupItem,n)||t.__vueClickOutside__.callback(e)}}n(e)&&(t.__vueClickOutside__={handler:a,callback:e.value},!i(o)&&document.addEventListener("click",a))},update:function(t,e){n(e)&&(t.__vueClickOutside__.callback=e.value)},unbind:function(t,e,n){!i(n)&&document.removeEventListener("click",t.__vueClickOutside__.handler),delete t.__vueClickOutside__}}},function(e,n,r){"use strict";var i=r(45),o=r(16),a=r.n(o),s=r(47),u=r.n(s);n.a={name:"userList",props:["users","showConfig"],components:{userRow:i.a,Multiselect:a.a,InfiniteLoading:u.a},data:function(){var e={id:"none",label:t("settings","Unlimited")},n={id:"default",label:t("settings","Default quota")};return{unlimitedQuota:e,defaultQuota:n,loading:!1,scrolled:!1,newUser:{id:"",displayName:"",password:"",mailAddress:"",groups:[],subAdminsGroups:[],quota:n}}},mounted:function(){this.settings.canChangePassword||OC.Notification.showTemporary(t("settings","Password change is disabled because the master key is disabled"))},computed:{settings:function(){return this.$store.getters.getServerData},filteredUsers:function(){return"#group_disabled"===this.route.hash?this.users.filter(function(t){return!0!==t.enabled}):this.users.filter(function(t){return!0===t.enabled})},groups:function(){return this.$store.getters.getGroups.filter(function(t){return"_disabled"!==t.id})},subAdminsGroups:function(){return this.$store.getters.getServerData.subadmingroups},quotaOptions:function(){var t=this.settings.quotaPreset.reduce(function(t,e){return t.concat({id:e,label:e})},[]);return t.unshift(this.unlimitedQuota),t.unshift(this.defaultQuota),t},minPasswordLength:function(){return this.$store.getters.getPasswordPolicyMinLength},usersOffset:function(){return this.$store.getters.getUsersOffset},usersLimit:function(){return this.$store.getters.getUsersLimit},route:function(){return this.$store.getters.getRoute},selectedGroup:function(){var t=this.route.hash;if("string"==typeof t&&t.length>0){var e=t.split("group");if(2===e.length&&"_"!==e[1].charAt(0))return t.split("group")[1]}return""}},watch:{selectedGroup:function(t,e){this.$store.commit("resetUsers"),this.$refs.infiniteLoading.$emit("$InfiniteLoading:reset")}},methods:{onScroll:function(t){this.scrolled=t.target.scrollTop>0},validateQuota:function(t){var e=OC.Util.computerFileSize(t);return null!==e&&e>0?(t=OC.Util.humanFileSize(OC.Util.computerFileSize(t)),this.newUser.quota={id:t,label:t}):this.newUser.quota=this.quotaOptions[0]},infiniteHandler:function(t){this.$store.dispatch("getUsers",{offset:this.usersOffset,limit:this.usersLimit,group:this.selectedGroup}).then(function(e){e?t.loaded():t.complete()})},resetForm:function(){Object.assign(this.newUser,this.$options.data.call(this).newUser),this.loading=!1},createUser:function(){var t=this;this.loading=!0,this.$store.dispatch("addUser",{userid:this.newUser.id,password:this.newUser.password,email:this.newUser.mailAddress,groups:this.newUser.groups.map(function(t){return t.id}),subadmin:this.newUser.subAdminsGroups.map(function(t){return t.id}),quota:this.newUser.quota.id}).then(function(){return t.resetForm()})}}}},function(e,n,r){"use strict";var i=r(10),o=r(13),a=r.n(o),s=r(16),u=r.n(s);n.a={name:"userRow",props:["user","settings","groups","subAdminsGroups","quotaOptions","showConfig"],components:{popoverMenu:i.a,Multiselect:u.a},directives:{ClickOutside:a.a},mounted:function(){this.popupItem=this.$el},data:function(){return{rand:parseInt(1e3*Math.random()),openedMenu:!1,loading:{all:!1,displayName:!1,password:!1,mailAddress:!1,groups:!1,subadmins:!1,quota:!1,delete:!1,disable:!1}}},computed:{userActions:function(){return[{icon:"icon-delete",text:t("settings","Delete user"),action:this.deleteUser},{icon:this.user.enabled?"icon-close":"icon-add",text:this.user.enabled?t("settings","Disable user"):t("settings","Enable user"),action:this.enableDisableUser}]},userGroups:function(){var t=this;return this.groups.filter(function(e){return t.user.groups.includes(e.id)})},userSubAdminsGroups:function(){var t=this;return this.subAdminsGroups.filter(function(e){return t.user.subadmin.includes(e.id)})},usedQuota:function(){var t=this.user.quota.quota;if(t>0)t=Math.min(100,Math.round(this.user.quota.used/t*100));else{t=95*(1-1/(this.user.quota.used/(10*Math.pow(2,30))+1))}return isNaN(t)?0:t},userQuota:function(){if(this.user.quota.quota>0){var t=OC.Util.humanFileSize(this.user.quota.quota),e=this.quotaOptions.find(function(e){return e.id===t});return e||{id:t,label:t}}return 0===this.user.quota.quota||"default"===this.user.quota.quota?this.quotaOptions[0]:this.quotaOptions[1]},minPasswordLength:function(){return this.$store.getters.getPasswordPolicyMinLength}},methods:{showMenu:function(){this.openedMenu=!0},hideMenu:function(){this.openedMenu=!1},generateAvatar:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32;return OC.generateUrl("/avatar/{user}/{size}?v={version}",{user:t,size:e,version:oc_userconfig.avatar.version})},limitGroups:function(t){return"+"+t},deleteUser:function(){var t=this;this.loading.delete=!0,this.loading.all=!0;var e=this.user.id;return this.$store.dispatch("deleteUser",{userid:e}).then(function(){t.loading.delete=!1,t.loading.all=!1})},enableDisableUser:function(){var t=this;this.loading.delete=!0,this.loading.all=!0;var e=this.user.id,n=!this.user.enabled;return this.$store.dispatch("enableDisableUser",{userid:e,enabled:n}).then(function(){t.loading.delete=!1,t.loading.all=!1})},updateDisplayName:function(){var t=this,e=this.$refs.displayName.value;this.loading.displayName=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"displayname",value:e}).then(function(){t.loading.displayName=!1,t.$refs.displayName.value=e})},updatePassword:function(){var t=this,e=this.$refs.password.value;this.loading.password=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"password",value:e}).then(function(){t.loading.password=!1,t.$refs.password.value=""})},updateEmail:function(){var t=this,e=this.$refs.mailAddress.value;this.loading.mailAddress=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"email",value:e}).then(function(){t.loading.mailAddress=!1,t.$refs.mailAddress.value=e})},createGroup:function(t){var e=this;return this.loading={groups:!0,subadmins:!0},this.$store.dispatch("addGroup",t).then(function(){e.loading={groups:!1,subadmins:!1};var n=e.user.id;e.$store.dispatch("addUserGroup",{userid:n,gid:t})}),this.$store.getters.getGroups[this.groups.length]},addUserGroup:function(t){var e=this;this.loading.groups=!0;var n=this.user.id,r=t.id;return this.$store.dispatch("addUserGroup",{userid:n,gid:r}).then(function(){return e.loading.groups=!1})},removeUserGroup:function(t){var e=this;this.loading.groups=!0;var n=this.user.id,r=t.id;return this.$store.dispatch("removeUserGroup",{userid:n,gid:r}).then(function(){return e.loading.groups=!1})},addUserSubAdmin:function(t){var e=this;this.loading.subadmins=!0;var n=this.user.id,r=t.id;return this.$store.dispatch("addUserSubAdmin",{userid:n,gid:r}).then(function(){return e.loading.subadmins=!1})},removeUserSubAdmin:function(t){var e=this;this.loading.subadmins=!0;var n=this.user.id,r=t.id;return this.$store.dispatch("removeUserSubAdmin",{userid:n,gid:r}).then(function(){return e.loading.subadmins=!1})},setUserQuota:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none";return this.loading.quota=!0,e=e.id?e.id:e,this.$store.dispatch("setUserData",{userid:this.user.id,key:"quota",value:e}).then(function(){return t.loading.quota=!1}),e},validateQuota:function(t){var e=OC.Util.computerFileSize(t);return 0===e?this.setUserQuota("none"):null!==e&&this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(t)))}}}},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=66)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(10),i=n(43),o=n(31),a=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(77),i=n(21);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(9),i=n(52),o=n(18),a=n(55),s=n(53),u=function(t,e,n){var c,l,f,p,d=t&u.F,h=t&u.G,v=t&u.S,m=t&u.P,g=t&u.B,y=h?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,b=h?i:i[e]||(i[e]={}),_=b.prototype||(b.prototype={});h&&(n=e);for(c in n)l=!d&&y&&void 0!==y[c],f=(l?y:n)[c],p=g&&l?s(f,r):m&&"function"==typeof f?s(Function.call,f):f,y&&a(y,c,f,t&u.U),b[c]!=f&&o(b,c,p),m&&_[c]!=f&&(_[c]=f)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(3),i=n(15);t.exports=n(1)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(29)("wks"),i=n(16),o=n(0).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(48),i=n(22);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(109),i=n(110);t.exports=n(35)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(8);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(0),i=n(11),o=n(74),a=n(6),s=function(t,e,n){var u,c,l,f=t&s.F,p=t&s.G,d=t&s.S,h=t&s.P,v=t&s.B,m=t&s.W,g=p?i:i[e]||(i[e]={}),y=g.prototype,b=p?r:d?r[e]:(r[e]||{}).prototype;p&&(n=e);for(u in n)(c=!f&&b&&void 0!==b[u])&&u in g||(l=c?b[u]:n[u],g[u]=p&&"function"!=typeof b[u]?n[u]:v&&c?o(l,r):m&&b[u]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):h&&"function"==typeof l?o(Function.call,l):l,h&&((g.virtual||(g.virtual={}))[u]=l,t&s.R&&y&&!y[u]&&a(y,u,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e){t.exports={}},function(t,e){t.exports=!0},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(3).f,i=n(2),o=n(7)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(29)("keys"),i=n(16);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(0),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(0),i=n(11),o=n(25),a=n(33),s=n(3).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){e.f=n(7)},function(t,e,n){var r=n(53),i=n(36),o=n(57),a=n(37),s=n(104);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f,d=e||s;return function(e,s,h){for(var v,m,g=o(e),y=i(g),b=r(s,h,3),_=a(y.length),w=0,x=n?d(e,_):u?d(e,0):void 0;_>w;w++)if((p||w in y)&&(v=y[w],m=b(v,w,g),t))if(n)x[w]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:x.push(v)}else if(l)return!1;return f?-1:c||l?l:x}}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(51);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(56),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(111)("wks"),i=n(58),o=n(9).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){"use strict";function r(t){return!(0===t||(!Array.isArray(t)||0!==t.length)&&t)}function i(t){return function(){return!t.apply(void 0,arguments)}}function o(t,e){return void 0===t&&(t="undefined"),null===t&&(t="null"),!1===t&&(t="false"),-1!==t.toString().toLowerCase().indexOf(e.trim())}function a(t,e,n,r){return t.filter(function(t){return o(r(t,n),e)})}function s(t){return t.filter(function(t){return!t.$isLabel})}function u(t,e){return function(n){return n.reduce(function(n,r){return r[t]&&r[t].length?(n.push({$groupLabel:r[e],$isLabel:!0}),n.concat(r[t])):n},[])}}function c(t,e,n,r,i){return function(o){return o.map(function(o){var s;if(!o[n])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];var u=a(o[n],t,e,i);return u.length?(s={},v()(s,r,o[r]),v()(s,n,u),s):[]})}}var l=n(65),f=n.n(l),p=n(59),d=(n.n(p),n(122)),h=(n.n(d),n(64)),v=n.n(h),m=n(120),g=(n.n(m),n(121)),y=(n.n(g),n(117)),b=(n.n(y),n(123)),_=(n.n(b),n(118)),w=(n.n(_),n(119)),x=(n.n(w),function(){for(var t=arguments.length,e=new Array(t),n=0;n-1},isSelected:function(t){var e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},getOptionLabel:function(t){if(r(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;var e=this.customLabel(t,this.label);return r(e)?"":e},select:function(t,e){if(t.$isLabel&&this.groupSelect)return void this.selectGroup(t);if(!(-1!==this.blockKeys.indexOf(e)||this.disabled||t.$isDisabled||t.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==e||this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t))return void("Tab"!==e&&this.removeElement(t));this.$emit("select",t,this.id),this.multiple?this.$emit("input",this.internalValue.concat([t]),this.id):this.$emit("input",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup:function(t){var e=this,n=this.options.find(function(n){return n[e.groupLabel]===t.$groupLabel});if(n)if(this.wholeGroupSelected(n)){this.$emit("remove",n[this.groupValues],this.id);var r=this.internalValue.filter(function(t){return-1===n[e.groupValues].indexOf(t)});this.$emit("input",r,this.id)}else{var o=n[this.groupValues].filter(i(this.isSelected));this.$emit("select",o,this.id),this.$emit("input",this.internalValue.concat(o),this.id)}},wholeGroupSelected:function(t){return t[this.groupValues].every(this.isSelected)},removeElement:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.disabled){if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();var n="object"===f()(t)?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.$emit("remove",t,this.id),this.multiple){var r=this.internalValue.slice(0,n).concat(this.internalValue.slice(n+1));this.$emit("input",r,this.id)}else this.$emit("input",null,this.id);this.closeOnSelect&&e&&this.deactivate()}},removeLastElement:function(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate:function(){var t=this;this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.$nextTick(function(){return t.$refs.search.focus()})):this.$el.focus(),this.$emit("open",this.id))},deactivate:function(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle:function(){this.isOpen?this.deactivate():this.activate()},adjustPosition:function(){if("undefined"!=typeof window){var t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||"below"===this.openDirection||"bottom"===this.openDirection?(this.prefferedOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.prefferedOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))}}}}},function(t,e,n){"use strict";var r=n(59);n.n(r),e.a={data:function(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition:function(){return this.pointer*this.optionHeight},visibleElements:function(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions:function(){this.pointerAdjust()},isOpen:function(){this.pointerDirty=!1}},methods:{optionHighlight:function(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight:function(t,e){var n=this;if(!this.groupSelect)return["multiselect__option--disabled"];var r=this.options.find(function(t){return t[n.groupLabel]===e.$groupLabel});return[this.groupSelect?"multiselect__option--group":"multiselect__option--disabled",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(r)}]},addPointerElement:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Enter",e=t.key;this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward:function(){this.pointer0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset:function(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust:function(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet:function(t){this.pointer=t,this.pointerDirty=!0}}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(13),i=n(0).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){t.exports=!n(1)&&!n(12)(function(){return 7!=Object.defineProperty(n(42)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(25),i=n(23),o=n(49),a=n(6),s=n(2),u=n(24),c=n(79),l=n(27),f=n(86),p=n(7)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,v,m,g,y){c(n,e,v);var b,_,w,x=function(t){if(!d&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},C=e+" Iterator",k="values"==m,O=!1,S=t.prototype,$=S[p]||S["@@iterator"]||m&&S[m],A=$||x(m),L=m?k?x("entries"):A:void 0,E="Array"==e?S.entries||$:$;if(E&&(w=f(E.call(new t)))!==Object.prototype&&(l(w,C,!0),r||s(w,p)||a(w,p,h)),k&&$&&"values"!==$.name&&(O=!0,A=function(){return $.call(this)}),r&&!y||!d&&!O&&S[p]||a(S,p,A),u[e]=A,u[C]=h,m)if(b={values:k?A:x("values"),keys:g?A:x("keys"),entries:L},y)for(_ in b)_ in S||o(S,_,b[_]);else i(i.P+i.F*(d||O),e,b);return b}},function(t,e,n){var r=n(10),i=n(83),o=n(22),a=n(28)("IE_PROTO"),s=function(){},u=function(){var t,e=n(42)("iframe"),r=o.length;for(e.style.display="none",n(76).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("