server/settings/js/vue-6.js
John Molakvoæ (skjnldsv) 738ab1a0a0
Bump settings
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-05-22 11:48:06 +02:00

8 lines
No EOL
60 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{69:function(t,e){function s(t){return"function"==typeof t.value||(console.warn("[Vue-click-outside:] provided expression",t.expression,"is not a function."),!1)}function i(t){return void 0!==t.componentInstance&&t.componentInstance.$isServer}t.exports={bind:function(t,e,n){function a(e){if(n.context){var s=e.path||e.composedPath&&e.composedPath();s&&s.length>0&&s.unshift(e.target),t.contains(e.target)||function(t,e){if(!t||!e)return!1;for(var s=0,i=e.length;s<i;s++)try{if(t.contains(e[s]))return!0;if(e[s].contains(t))return!1}catch(t){return!1}return!1}(n.context.popupItem,s)||t.__vueClickOutside__.callback(e)}}s(e)&&(t.__vueClickOutside__={handler:a,callback:e.value},!i(n)&&document.addEventListener("click",a))},update:function(t,e){s(e)&&(t.__vueClickOutside__.callback=e.value)},unbind:function(t,e,s){!i(s)&&document.removeEventListener("click",t.__vueClickOutside__.handler),delete t.__vueClickOutside__}}},70:function(t,e,s){
/*!
* vue-infinite-loading v2.4.4
* (c) 2016-2019 PeachScript
* MIT License
*/
t.exports=function(t){var e={};function s(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,s),n.l=!0,n.exports}return s.m=t,s.c=e,s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(i,n,function(e){return t[e]}.bind(null,n));return i},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=9)}([function(t,e,s){var i=s(6);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals),(0,s(3).default)("09280948",i,!0,{})},function(t,e,s){var i=s(8);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals),(0,s(3).default)("51e4c3f9",i,!0,{})},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var s=function(t,e){var s,i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var a=(s=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),o=n.sources.map(function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"});return[i].concat(o).concat([a]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s}).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},n=0;n<this.length;n++){var a=this[n][0];"number"==typeof a&&(i[a]=!0)}for(n=0;n<t.length;n++){var o=t[n];"number"==typeof o[0]&&i[o[0]]||(s&&!o[2]?o[2]=s:s&&(o[2]="("+o[2]+") and ("+s+")"),e.push(o))}},e}},function(t,e,s){"use strict";function i(t,e){for(var s=[],i={},n=0;n<e.length;n++){var a=e[n],o=a[0],r={id:t+":"+n,css:a[1],media:a[2],sourceMap:a[3]};i[o]?i[o].parts.push(r):s.push(i[o]={id:o,parts:[r]})}return s}s.r(e),s.d(e,"default",function(){return h});var n="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!n)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},o=n&&(document.head||document.getElementsByTagName("head")[0]),r=null,l=0,u=!1,d=function(){},c=null,p="data-vue-ssr-id",g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,s,n){u=s,c=n||{};var o=i(t,e);return f(o),function(e){for(var s=[],n=0;n<o.length;n++){var r=o[n];(l=a[r.id]).refs--,s.push(l)}for(e?f(o=i(t,e)):o=[],n=0;n<s.length;n++){var l;if(0===(l=s[n]).refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete a[l.id]}}}}function f(t){for(var e=0;e<t.length;e++){var s=t[e],i=a[s.id];if(i){i.refs++;for(var n=0;n<i.parts.length;n++)i.parts[n](s.parts[n]);for(;n<s.parts.length;n++)i.parts.push(v(s.parts[n]));i.parts.length>s.parts.length&&(i.parts.length=s.parts.length)}else{var o=[];for(n=0;n<s.parts.length;n++)o.push(v(s.parts[n]));a[s.id]={id:s.id,refs:1,parts:o}}}}function m(){var t=document.createElement("style");return t.type="text/css",o.appendChild(t),t}function v(t){var e,s,i=document.querySelector("style["+p+'~="'+t.id+'"]');if(i){if(u)return d;i.parentNode.removeChild(i)}if(g){var n=l++;i=r||(r=m()),e=y.bind(null,i,n,!1),s=y.bind(null,i,n,!0)}else i=m(),e=function(t,e){var s=e.css,i=e.media,n=e.sourceMap;if(i&&t.setAttribute("media",i),c.ssrId&&t.setAttribute(p,e.id),n&&(s+="\n/*# sourceURL="+n.sources[0]+" */",s+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}.bind(null,i),s=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else s()}}var b,w=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function y(t,e,s,i){var n=s?"":i.css;if(t.styleSheet)t.styleSheet.cssText=w(e,n);else{var a=document.createTextNode(n),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}},function(t,e){function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(e){return"function"==typeof Symbol&&"symbol"===s(Symbol.iterator)?t.exports=i=function(t){return s(t)}:t.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":s(t)},i(e)}t.exports=i},function(t,e,s){"use strict";s.r(e);var i=s(0),n=s.n(i);for(var a in i)"default"!==a&&function(t){s.d(e,t,function(){return i[t]})}(a);e.default=n.a},function(t,e,s){(t.exports=s(2)(!1)).push([t.i,'.loading-wave-dots[data-v-46b20d22]{position:relative}.loading-wave-dots[data-v-46b20d22] .wave-item{position:absolute;top:50%;left:50%;display:inline-block;margin-top:-4px;width:8px;height:8px;border-radius:50%;-webkit-animation:loading-wave-dots-data-v-46b20d22 linear 2.8s infinite;animation:loading-wave-dots-data-v-46b20d22 linear 2.8s infinite}.loading-wave-dots[data-v-46b20d22] .wave-item:first-child{margin-left:-36px}.loading-wave-dots[data-v-46b20d22] .wave-item:nth-child(2){margin-left:-20px;-webkit-animation-delay:.14s;animation-delay:.14s}.loading-wave-dots[data-v-46b20d22] .wave-item:nth-child(3){margin-left:-4px;-webkit-animation-delay:.28s;animation-delay:.28s}.loading-wave-dots[data-v-46b20d22] .wave-item:nth-child(4){margin-left:12px;-webkit-animation-delay:.42s;animation-delay:.42s}.loading-wave-dots[data-v-46b20d22] .wave-item:last-child{margin-left:28px;-webkit-animation-delay:.56s;animation-delay:.56s}@-webkit-keyframes loading-wave-dots-data-v-46b20d22{0%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}10%{-webkit-transform:translateY(-6px);transform:translateY(-6px);background:#999}20%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}to{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}}@keyframes loading-wave-dots-data-v-46b20d22{0%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}10%{-webkit-transform:translateY(-6px);transform:translateY(-6px);background:#999}20%{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}to{-webkit-transform:translateY(0);transform:translateY(0);background:#bbb}}.loading-circles[data-v-46b20d22] .circle-item{width:5px;height:5px;-webkit-animation:loading-circles-data-v-46b20d22 linear .75s infinite;animation:loading-circles-data-v-46b20d22 linear .75s infinite}.loading-circles[data-v-46b20d22] .circle-item:first-child{margin-top:-14.5px;margin-left:-2.5px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(2){margin-top:-11.26px;margin-left:6.26px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(3){margin-top:-2.5px;margin-left:9.5px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(4){margin-top:6.26px;margin-left:6.26px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(5){margin-top:9.5px;margin-left:-2.5px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(6){margin-top:6.26px;margin-left:-11.26px}.loading-circles[data-v-46b20d22] .circle-item:nth-child(7){margin-top:-2.5px;margin-left:-14.5px}.loading-circles[data-v-46b20d22] .circle-item:last-child{margin-top:-11.26px;margin-left:-11.26px}@-webkit-keyframes loading-circles-data-v-46b20d22{0%{background:#dfdfdf}90%{background:#505050}to{background:#dfdfdf}}@keyframes loading-circles-data-v-46b20d22{0%{background:#dfdfdf}90%{background:#505050}to{background:#dfdfdf}}.loading-bubbles[data-v-46b20d22] .bubble-item{background:#666;-webkit-animation:loading-bubbles-data-v-46b20d22 linear .75s infinite;animation:loading-bubbles-data-v-46b20d22 linear .75s infinite}.loading-bubbles[data-v-46b20d22] .bubble-item:first-child{margin-top:-12.5px;margin-left:-.5px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(2){margin-top:-9.26px;margin-left:8.26px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(3){margin-top:-.5px;margin-left:11.5px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(4){margin-top:8.26px;margin-left:8.26px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(5){margin-top:11.5px;margin-left:-.5px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(6){margin-top:8.26px;margin-left:-9.26px}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(7){margin-top:-.5px;margin-left:-12.5px}.loading-bubbles[data-v-46b20d22] .bubble-item:last-child{margin-top:-9.26px;margin-left:-9.26px}@-webkit-keyframes loading-bubbles-data-v-46b20d22{0%{width:1px;height:1px;box-shadow:0 0 0 3px #666}90%{width:1px;height:1px;box-shadow:0 0 0 0 #666}to{width:1px;height:1px;box-shadow:0 0 0 3px #666}}@keyframes loading-bubbles-data-v-46b20d22{0%{width:1px;height:1px;box-shadow:0 0 0 3px #666}90%{width:1px;height:1px;box-shadow:0 0 0 0 #666}to{width:1px;height:1px;box-shadow:0 0 0 3px #666}}.loading-default[data-v-46b20d22]{position:relative;border:1px solid #999;-webkit-animation:loading-rotating-data-v-46b20d22 ease 1.5s infinite;animation:loading-rotating-data-v-46b20d22 ease 1.5s infinite}.loading-default[data-v-46b20d22]:before{content:"";position:absolute;display:block;top:0;left:50%;margin-top:-3px;margin-left:-3px;width:6px;height:6px;background-color:#999;border-radius:50%}.loading-spiral[data-v-46b20d22]{border:2px solid #777;border-right-color:transparent;-webkit-animation:loading-rotating-data-v-46b20d22 linear .85s infinite;animation:loading-rotating-data-v-46b20d22 linear .85s infinite}@-webkit-keyframes loading-rotating-data-v-46b20d22{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loading-rotating-data-v-46b20d22{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loading-bubbles[data-v-46b20d22],.loading-circles[data-v-46b20d22]{position:relative}.loading-bubbles[data-v-46b20d22] .bubble-item,.loading-circles[data-v-46b20d22] .circle-item{position:absolute;top:50%;left:50%;display:inline-block;border-radius:50%}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(2),.loading-circles[data-v-46b20d22] .circle-item:nth-child(2){-webkit-animation-delay:93ms;animation-delay:93ms}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(3),.loading-circles[data-v-46b20d22] .circle-item:nth-child(3){-webkit-animation-delay:.186s;animation-delay:.186s}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(4),.loading-circles[data-v-46b20d22] .circle-item:nth-child(4){-webkit-animation-delay:.279s;animation-delay:.279s}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(5),.loading-circles[data-v-46b20d22] .circle-item:nth-child(5){-webkit-animation-delay:.372s;animation-delay:.372s}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(6),.loading-circles[data-v-46b20d22] .circle-item:nth-child(6){-webkit-animation-delay:.465s;animation-delay:.465s}.loading-bubbles[data-v-46b20d22] .bubble-item:nth-child(7),.loading-circles[data-v-46b20d22] .circle-item:nth-child(7){-webkit-animation-delay:.558s;animation-delay:.558s}.loading-bubbles[data-v-46b20d22] .bubble-item:last-child,.loading-circles[data-v-46b20d22] .circle-item:last-child{-webkit-animation-delay:.651s;animation-delay:.651s}',""])},function(t,e,s){"use strict";s.r(e);var i=s(1),n=s.n(i);for(var a in i)"default"!==a&&function(t){s.d(e,t,function(){return i[t]})}(a);e.default=n.a},function(t,e,s){(t.exports=s(2)(!1)).push([t.i,".infinite-loading-container[data-v-46b21138]{clear:both;text-align:center}.infinite-loading-container[data-v-46b21138] [class^=loading-]{display:inline-block;margin:5px 0;width:28px;height:28px;font-size:28px;line-height:28px;border-radius:50%}.btn-try-infinite[data-v-46b21138]{margin-top:5px;padding:5px 10px;color:#999;font-size:14px;line-height:1;background:transparent;border:1px solid #ccc;border-radius:3px;outline:none;cursor:pointer}.btn-try-infinite[data-v-46b21138]:not(:active):hover{opacity:.8}",""])},function(t,e,s){"use strict";s.r(e);var i={throttleLimit:50,loopCheckTimeout:1e3,loopCheckMaxCalls:10},n=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){return t={passive:!0},!0}});window.addEventListener("testpassive",e,e),window.remove("testpassive",e,e)}catch(t){}return t}(),a={STATE_CHANGER:["emit `loaded` and `complete` event through component instance of `$refs` may cause error, so it will be deprecated soon, please use the `$state` argument instead (`$state` just the special `$event` variable):","\ntemplate:",'<infinite-loading @infinite="infiniteHandler"></infinite-loading>',"\nscript:\n...\ninfiniteHandler($state) {\n ajax('https://www.example.com/api/news')\n .then((res) => {\n if (res.data.length) {\n $state.loaded();\n } else {\n $state.complete();\n }\n });\n}\n...","","more details: https://github.com/PeachScript/vue-infinite-loading/issues/57#issuecomment-324370549"].join("\n"),INFINITE_EVENT:"`:on-infinite` property will be deprecated soon, please use `@infinite` event instead.",IDENTIFIER:"the `reset` event will be deprecated soon, please reset this component by change the `identifier` property."},o={INFINITE_LOOP:["executed the callback function more than ".concat(i.loopCheckMaxCalls," times for a short time, it looks like searched a wrong scroll wrapper that doest not has fixed height or maximum height, please check it. If you want to force to set a element as scroll wrapper ranther than automatic searching, you can do this:"),'\n\x3c!-- add a special attribute for the real scroll wrapper --\x3e\n<div infinite-wrapper>\n ...\n \x3c!-- set force-use-infinite-wrapper --\x3e\n <infinite-loading force-use-infinite-wrapper></infinite-loading>\n</div>\nor\n<div class="infinite-wrapper">\n ...\n \x3c!-- set force-use-infinite-wrapper as css selector of the real scroll wrapper --\x3e\n <infinite-loading force-use-infinite-wrapper=".infinite-wrapper"></infinite-loading>\n</div>\n ',"more details: https://github.com/PeachScript/vue-infinite-loading/issues/55#issuecomment-316934169"].join("\n")},r={READY:0,LOADING:1,COMPLETE:2,ERROR:3},l={color:"#666",fontSize:"14px",padding:"10px 0"},u={mode:"development",props:{spinner:"default",distance:100,forceUseInfiniteWrapper:!1},system:i,slots:{noResults:"No results :(",noMore:"No more data :)",error:"Opps, something went wrong :(",errorBtnText:"Retry",spinner:""},WARNINGS:a,ERRORS:o,STATUS:r},d=s(4),c=s.n(d),p={BUBBLES:{render:function(t){return t("span",{attrs:{class:"loading-bubbles"}},Array.apply(Array,Array(8)).map(function(){return t("span",{attrs:{class:"bubble-item"}})}))}},CIRCLES:{render:function(t){return t("span",{attrs:{class:"loading-circles"}},Array.apply(Array,Array(8)).map(function(){return t("span",{attrs:{class:"circle-item"}})}))}},DEFAULT:{render:function(t){return t("i",{attrs:{class:"loading-default"}})}},SPIRAL:{render:function(t){return t("i",{attrs:{class:"loading-spiral"}})}},WAVEDOTS:{render:function(t){return t("span",{attrs:{class:"loading-wave-dots"}},Array.apply(Array,Array(5)).map(function(){return t("span",{attrs:{class:"wave-item"}})}))}}};function g(t,e,s,i,n,a,o,r){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=s,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=l):n&&(l=r?function(){n.call(this,this.$root.$options.shadowRoot)}:n),l)if(u.functional){u._injectStyles=l;var d=u.render;u.render=function(t,e){return l.call(e),d(t,e)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,l):[l]}return{exports:t,options:u}}var h=g({name:"Spinner",computed:{spinnerView:function(){return p[(this.$attrs.spinner||"").toUpperCase()]||this.spinnerInConfig},spinnerInConfig:function(){return u.slots.spinner&&"string"==typeof u.slots.spinner?{render:function(){return this._v(u.slots.spinner)}}:"object"===c()(u.slots.spinner)?u.slots.spinner:p[u.props.spinner.toUpperCase()]||p.DEFAULT}}},function(){var t=this.$createElement;return(this._self._c||t)(this.spinnerView,{tag:"component"})},[],!1,function(t){var e=s(5);e.__inject__&&e.__inject__(t)},"46b20d22",null);h.options.__file="Spinner.vue";var f=h.exports;function m(t){"production"!==u.mode&&console.warn("[Vue-infinite-loading warn]: ".concat(t))}var v={timers:[],caches:[],throttle:function(t){var e=this;-1===this.caches.indexOf(t)&&(this.caches.push(t),this.timers.push(setTimeout(function(){t(),e.caches.splice(e.caches.indexOf(t),1),e.timers.shift()},u.system.throttleLimit)))},reset:function(){this.timers.forEach(function(t){clearTimeout(t)}),this.timers.length=0,this.caches=[]}},b={isChecked:!1,timer:null,times:0,track:function(){var t=this;this.times+=1,clearTimeout(this.timer),this.timer=setTimeout(function(){t.isChecked=!0},u.system.loopCheckTimeout),this.times>u.system.loopCheckMaxCalls&&(function(t){console.error("[Vue-infinite-loading error]: ".concat(t))}(o.INFINITE_LOOP),this.isChecked=!0)}},w={key:"_infiniteScrollHeight",getScrollElm:function(t){return t===window?document.documentElement:t},save:function(t){var e=this.getScrollElm(t);e[this.key]=e.scrollHeight},restore:function(t){var e=this.getScrollElm(t);"number"==typeof e[this.key]&&(e.scrollTop=e.scrollHeight-e[this.key]+e.scrollTop),this.remove(e)},remove:function(t){void 0!==t[this.key]&&delete t[this.key]}};function y(t){return t.offsetWidth+t.offsetHeight>0}var _=g({name:"InfiniteLoading",data:function(){return{scrollParent:null,scrollHandler:null,isFirstLoad:!0,status:r.READY,slots:u.slots}},components:{Spinner:f},computed:{isShowSpinner:function(){return this.status===r.LOADING},isShowError:function(){return this.status===r.ERROR},isShowNoResults:function(){return this.status===r.COMPLETE&&this.isFirstLoad},isShowNoMore:function(){return this.status===r.COMPLETE&&!this.isFirstLoad},slotStyles:function(){var t=this,e={};return Object.keys(u.slots).forEach(function(s){var i=function(t){return t.replace(/[A-Z]/g,function(t){return"-".concat(t.toLowerCase())})}(s);(!t.$slots[i]&&!u.slots[s].render||t.$slots[i]&&!t.$slots[i][0].tag)&&(e[s]=l)}),e}},props:{distance:{type:Number,default:u.props.distance},spinner:String,direction:{type:String,default:"bottom"},forceUseInfiniteWrapper:{type:[Boolean,String],default:u.props.forceUseInfiniteWrapper},identifier:{default:+new Date},onInfinite:Function},watch:{identifier:function(){this.stateChanger.reset()}},mounted:function(){var t=this;this.$watch("forceUseInfiniteWrapper",function(){t.scrollParent=t.getScrollParent()},{immediate:!0}),this.scrollHandler=function(e){t.status===r.READY&&(e&&e.constructor===Event&&y(t.$el)?v.throttle(t.attemptLoad):t.attemptLoad())},setTimeout(function(){t.scrollHandler(),t.scrollParent.addEventListener("scroll",t.scrollHandler,n)},1),this.$on("$InfiniteLoading:loaded",function(e){t.isFirstLoad=!1,"top"===t.direction&&t.$nextTick(function(){w.restore(t.scrollParent)}),t.status===r.LOADING&&t.$nextTick(t.attemptLoad.bind(null,!0)),e&&e.target===t||m(a.STATE_CHANGER)}),this.$on("$InfiniteLoading:complete",function(e){t.status=r.COMPLETE,t.$nextTick(function(){t.$forceUpdate()}),t.scrollParent.removeEventListener("scroll",t.scrollHandler,n),e&&e.target===t||m(a.STATE_CHANGER)}),this.$on("$InfiniteLoading:reset",function(e){t.status=r.READY,t.isFirstLoad=!0,w.remove(t.scrollParent),t.scrollParent.addEventListener("scroll",t.scrollHandler,n),setTimeout(function(){v.reset(),t.scrollHandler()},1),e&&e.target===t||m(a.IDENTIFIER)}),this.stateChanger={loaded:function(){t.$emit("$InfiniteLoading:loaded",{target:t})},complete:function(){t.$emit("$InfiniteLoading:complete",{target:t})},reset:function(){t.$emit("$InfiniteLoading:reset",{target:t})},error:function(){t.status=r.ERROR,v.reset()}},this.onInfinite&&m(a.INFINITE_EVENT)},deactivated:function(){this.status===r.LOADING&&(this.status=r.READY),this.scrollParent.removeEventListener("scroll",this.scrollHandler,n)},activated:function(){this.scrollParent.addEventListener("scroll",this.scrollHandler,n)},methods:{attemptLoad:function(t){var e=this;this.status!==r.COMPLETE&&y(this.$el)&&this.getCurrentDistance()<=this.distance?(this.status=r.LOADING,"top"===this.direction&&this.$nextTick(function(){w.save(e.scrollParent)}),"function"==typeof this.onInfinite?this.onInfinite.call(null,this.stateChanger):this.$emit("infinite",this.stateChanger),!t||this.forceUseInfiniteWrapper||b.isChecked||b.track()):this.status===r.LOADING&&(this.status=r.READY)},getCurrentDistance:function(){return"top"===this.direction?"number"==typeof this.scrollParent.scrollTop?this.scrollParent.scrollTop:this.scrollParent.pageYOffset:this.$el.getBoundingClientRect().top-(this.scrollParent===window?window.innerHeight:this.scrollParent.getBoundingClientRect().bottom)},getScrollParent:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$el;return"string"==typeof this.forceUseInfiniteWrapper&&(t=e.querySelector(this.forceUseInfiniteWrapper)),t||("BODY"===e.tagName?t=window:!this.forceUseInfiniteWrapper&&["scroll","auto"].indexOf(getComputedStyle(e).overflowY)>-1?t=e:(e.hasAttribute("infinite-wrapper")||e.hasAttribute("data-infinite-wrapper"))&&(t=e)),t||this.getScrollParent(e.parentNode)}},destroyed:function(){!this.status!==r.COMPLETE&&(v.reset(),w.remove(this.scrollParent),this.scrollParent.removeEventListener("scroll",this.scrollHandler,n))}},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"infinite-loading-container"},[s("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowSpinner,expression:"isShowSpinner"}],staticClass:"infinite-status-prompt",style:t.slotStyles.spinner},[t._t("spinner",[s("spinner",{attrs:{spinner:t.spinner}})])],2),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowNoResults,expression:"isShowNoResults"}],staticClass:"infinite-status-prompt",style:t.slotStyles.noResults},[t._t("no-results",[t.slots.noResults.render?s(t.slots.noResults,{tag:"component"}):[t._v(t._s(t.slots.noResults))]])],2),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowNoMore,expression:"isShowNoMore"}],staticClass:"infinite-status-prompt",style:t.slotStyles.noMore},[t._t("no-more",[t.slots.noMore.render?s(t.slots.noMore,{tag:"component"}):[t._v(t._s(t.slots.noMore))]])],2),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowError,expression:"isShowError"}],staticClass:"infinite-status-prompt",style:t.slotStyles.error},[t._t("error",[t.slots.error.render?s(t.slots.error,{tag:"component",attrs:{trigger:t.attemptLoad}}):[t._v("\n "+t._s(t.slots.error)+"\n "),s("br"),t._v(" "),s("button",{staticClass:"btn-try-infinite",domProps:{textContent:t._s(t.slots.errorBtnText)},on:{click:t.attemptLoad}})]],{trigger:t.attemptLoad})],2)])},[],!1,function(t){var e=s(7);e.__inject__&&e.__inject__(t)},"46b21138",null);_.options.__file="InfiniteLoading.vue";var C=_.exports;function x(t){u.mode=t.config.productionTip?"development":"production"}Object.defineProperty(C,"install",{configurable:!1,enumerable:!1,value:function(t,e){Object.assign(u.props,e&&e.props),Object.assign(u.slots,e&&e.slots),Object.assign(u.system,e&&e.system),t.component("infinite-loading",C),x(t)}}),"undefined"!=typeof window&&window.Vue&&(window.Vue.component("infinite-loading",C),x(window.Vue)),e.default=C}])},78:function(e,s,i){"use strict";i.r(s);var n=i(2),a=i(68),o=i.n(a),r=i(14),l=i(69),u=i.n(l),d=i(41);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.default.use(d.a);var p={name:"userRow",props:["user","settings","groups","subAdminsGroups","quotaOptions","showConfig","languages","externalActions"],components:{PopoverMenu:r.PopoverMenu,Multiselect:r.Multiselect},directives:{ClickOutside:u.a},mounted:function(){},data:function(){return{rand:parseInt(1e3*Math.random()),openedMenu:!1,feedbackMessage:"",loading:{all:!1,displayName:!1,password:!1,mailAddress:!1,groups:!1,subadmins:!1,quota:!1,delete:!1,disable:!1,languages:!1}}},computed:{userActions:function(){var e=[{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}];return null!==this.user.email&&""!==this.user.email&&e.push({icon:"icon-mail",text:t("settings","Resend welcome email"),action:this.sendWelcomeMail}),e.concat(this.externalActions)},userGroups:function(){var t=this,e=this.groups.filter(function(e){return t.user.groups.includes(e.id)});return e},userSubAdminsGroups:function(){var t=this,e=this.subAdminsGroups.filter(function(e){return t.user.subadmin.includes(e.id)});return e},availableGroups:function(){var t=this;return this.groups.map(function(e){var s=Object.assign({},e);return s.$isDisabled=!1===e.canAdd&&!t.user.groups.includes(e.id)||!1===e.canRemove&&t.user.groups.includes(e.id),s})},usedSpace:function(){return this.user.quota.used?t("settings","{size} used",{size:OC.Util.humanFileSize(this.user.quota.used)}):t("settings","{size} used",{size:OC.Util.humanFileSize(0)})},usedQuota:function(){var t=this.user.quota.quota;t>0?t=Math.min(100,Math.round(this.user.quota.used/t*100)):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"default"===this.user.quota.quota?this.quotaOptions[0]:this.quotaOptions[1]},minPasswordLength:function(){return this.$store.getters.getPasswordPolicyMinLength},userLanguage:function(){var t=this,e=this.languages[0].languages.concat(this.languages[1].languages).find(function(e){return e.code===t.user.language});return"object"!==c(e)&&""!==this.user.language?{code:this.user.language,name:this.user.language}:""!==this.user.language&&e}},methods:{toggleMenu:function(){this.openedMenu=!this.openedMenu},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})},formatGroupsTitle:function(t){return t.map(function(t){return t.name}).slice(2).join(", ")},deleteUser:function(){var t=this;this.loading.delete=!0,this.loading.all=!0;var e=this.user.id;return this.$store.dispatch("deleteUser",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,s=!this.user.enabled;return this.$store.dispatch("enableDisableUser",{userid:e,enabled:s}).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 s=e.user.id;e.$store.dispatch("addUserGroup",{userid:s,gid:t})}).catch(function(){e.loading={groups:!1,subadmins:!1}}),this.$store.getters.getGroups[this.groups.length]},addUserGroup:function(t){var e=this;if(!1===t.canAdd)return!1;this.loading.groups=!0;var s=this.user.id,i=t.id;return this.$store.dispatch("addUserGroup",{userid:s,gid:i}).then(function(){return e.loading.groups=!1})},removeUserGroup:function(t){var e=this;if(!1===t.canRemove)return!1;this.loading.groups=!0;var s=this.user.id,i=t.id;return this.$store.dispatch("removeUserGroup",{userid:s,gid:i}).then(function(){e.loading.groups=!1,e.$route.params.selectedGroup===i&&e.$store.commit("deleteUser",s)}).catch(function(){e.loading.groups=!1})},addUserSubAdmin:function(t){var e=this;this.loading.subadmins=!0;var s=this.user.id,i=t.id;return this.$store.dispatch("addUserSubAdmin",{userid:s,gid:i}).then(function(){return e.loading.subadmins=!1})},removeUserSubAdmin:function(t){var e=this;this.loading.subadmins=!0;var s=this.user.id,i=t.id;return this.$store.dispatch("removeUserSubAdmin",{userid:s,gid:i}).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 null!==e&&e>=0&&this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(t)))},setUserLanguage:function(t){var e=this;return this.loading.languages=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"language",value:t.code}).then(function(){return e.loading.languages=!1}),t},sendWelcomeMail:function(){var e=this;this.loading.all=!0,this.$store.dispatch("sendWelcomeMail",this.user.id).then(function(s){s&&(e.feedbackMessage=t("setting","Welcome mail sent!"),setTimeout(function(){e.feedbackMessage=""},2e3)),e.loading.all=!1})}}},g=i(5),h=Object(g.a)(p,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1===Object.keys(t.user).length?s("div",{staticClass:"row",attrs:{"data-id":t.user.id}},[s("div",{staticClass:"avatar",class:{"icon-loading-small":t.loading.delete||t.loading.disable}},[t.loading.delete||t.loading.disable?t._e():s("img",{attrs:{alt:"",width:"32",height:"32",src:t.generateAvatar(t.user.id,32),srcset:t.generateAvatar(t.user.id,64)+" 2x, "+t.generateAvatar(t.user.id,128)+" 4x"}})]),t._v(" "),s("div",{staticClass:"name"},[t._v(t._s(t.user.id))]),t._v(" "),s("div",{staticClass:"obfuscated"},[t._v(t._s(t.t("settings","You do not have permissions to see the details of this user")))])]):s("div",{staticClass:"row",class:{disabled:t.loading.delete||t.loading.disable},attrs:{"data-id":t.user.id}},[s("div",{staticClass:"avatar",class:{"icon-loading-small":t.loading.delete||t.loading.disable}},[t.loading.delete||t.loading.disable?t._e():s("img",{attrs:{alt:"",width:"32",height:"32",src:t.generateAvatar(t.user.id,32),srcset:t.generateAvatar(t.user.id,64)+" 2x, "+t.generateAvatar(t.user.id,128)+" 4x"}})]),t._v(" "),s("div",{staticClass:"name"},[t._v(t._s(t.user.id))]),t._v(" "),s("form",{staticClass:"displayName",class:{"icon-loading-small":t.loading.displayName},on:{submit:function(e){return e.preventDefault(),t.updateDisplayName(e)}}},[t.user.backendCapabilities.setDisplayName?[t.user.backendCapabilities.setDisplayName?s("input",{ref:"displayName",attrs:{id:"displayName"+t.user.id+t.rand,type:"text",disabled:t.loading.displayName||t.loading.all,autocomplete:"new-password",autocorrect:"off",autocapitalize:"off",spellcheck:"false"},domProps:{value:t.user.displayname}}):t._e(),t._v(" "),t.user.backendCapabilities.setDisplayName?s("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}}):t._e()]:s("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.t("settings","The backend does not support changing the display name"),expression:"t('settings', 'The backend does not support changing the display name')",modifiers:{auto:!0}}],staticClass:"name"},[t._v(t._s(t.user.displayname))])],2),t._v(" "),t.settings.canChangePassword&&t.user.backendCapabilities.setPassword?s("form",{staticClass:"password",class:{"icon-loading-small":t.loading.password},on:{submit:function(e){return e.preventDefault(),t.updatePassword(e)}}},[s("input",{ref:"password",attrs:{id:"password"+t.user.id+t.rand,type:"password",required:"",disabled:t.loading.password||t.loading.all,minlength:t.minPasswordLength,value:"",placeholder:t.t("settings","New password"),autocomplete:"new-password",autocorrect:"off",autocapitalize:"off",spellcheck:"false"}}),t._v(" "),s("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})]):s("div"),t._v(" "),s("form",{staticClass:"mailAddress",class:{"icon-loading-small":t.loading.mailAddress},on:{submit:function(e){return e.preventDefault(),t.updateEmail(e)}}},[s("input",{ref:"mailAddress",attrs:{id:"mailAddress"+t.user.id+t.rand,type:"email",disabled:t.loading.mailAddress||t.loading.all,autocomplete:"new-password",autocorrect:"off",autocapitalize:"off",spellcheck:"false"},domProps:{value:t.user.email}}),t._v(" "),s("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})]),t._v(" "),s("div",{staticClass:"groups",class:{"icon-loading-small":t.loading.groups}},[s("multiselect",{staticClass:"multiselect-vue",attrs:{value:t.userGroups,options:t.availableGroups,disabled:t.loading.groups||t.loading.all,"tag-placeholder":"create",placeholder:t.t("settings","Add user in group"),label:"name","track-by":"id",limit:2,multiple:!0,taggable:t.settings.isAdmin,closeOnSelect:!1,"tag-width":60},on:{tag:t.createGroup,select:t.addUserGroup,remove:t.removeUserGroup}},[s("span",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.formatGroupsTitle(t.userGroups),expression:"formatGroupsTitle(userGroups)",modifiers:{auto:!0}}],staticClass:"multiselect__limit",attrs:{slot:"limit"},slot:"limit"},[t._v("+"+t._s(t.userGroups.length-2))]),t._v(" "),s("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])])],1),t._v(" "),t.subAdminsGroups.length>0&&t.settings.isAdmin?s("div",{staticClass:"subadmins",class:{"icon-loading-small":t.loading.subadmins}},[s("multiselect",{staticClass:"multiselect-vue",attrs:{value:t.userSubAdminsGroups,options:t.subAdminsGroups,disabled:t.loading.subadmins||t.loading.all,placeholder:t.t("settings","Set user as admin for"),label:"name","track-by":"id",limit:2,multiple:!0,closeOnSelect:!1,"tag-width":60},on:{select:t.addUserSubAdmin,remove:t.removeUserSubAdmin}},[s("span",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.formatGroupsTitle(t.userSubAdminsGroups),expression:"formatGroupsTitle(userSubAdminsGroups)",modifiers:{auto:!0}}],staticClass:"multiselect__limit",attrs:{slot:"limit"},slot:"limit"},[t._v("+"+t._s(t.userSubAdminsGroups.length-2))]),t._v(" "),s("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])])],1):t._e(),t._v(" "),s("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.usedSpace,expression:"usedSpace",modifiers:{auto:!0}}],staticClass:"quota",class:{"icon-loading-small":t.loading.quota}},[s("multiselect",{staticClass:"multiselect-vue",attrs:{value:t.userQuota,options:t.quotaOptions,disabled:t.loading.quota||t.loading.all,"tag-placeholder":"create",placeholder:t.t("settings","Select user quota"),label:"label","track-by":"id",allowEmpty:!1,taggable:!0},on:{tag:t.validateQuota,input:t.setUserQuota}}),t._v(" "),s("progress",{staticClass:"quota-user-progress",class:{warn:t.usedQuota>80},attrs:{max:"100"},domProps:{value:t.usedQuota}})],1),t._v(" "),t.showConfig.showLanguages?s("div",{staticClass:"languages",class:{"icon-loading-small":t.loading.languages}},[s("multiselect",{staticClass:"multiselect-vue",attrs:{value:t.userLanguage,options:t.languages,disabled:t.loading.languages||t.loading.all,placeholder:t.t("settings","No language set"),label:"name","track-by":"code",allowEmpty:!1,"group-values":"languages","group-label":"label"},on:{input:t.setUserLanguage}})],1):t._e(),t._v(" "),t.showConfig.showStoragePath?s("div",{staticClass:"storageLocation"},[t._v(t._s(t.user.storageLocation))]):t._e(),t._v(" "),t.showConfig.showUserBackend?s("div",{staticClass:"userBackend"},[t._v(t._s(t.user.backend))]):t._e(),t._v(" "),t.showConfig.showLastLogin?s("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.user.lastLogin>0?t.OC.Util.formatDate(t.user.lastLogin):"",expression:"user.lastLogin>0 ? OC.Util.formatDate(user.lastLogin) : ''",modifiers:{auto:!0}}],staticClass:"lastLogin"},[t._v("\n\t\t"+t._s(t.user.lastLogin>0?t.OC.Util.relativeModifiedDate(t.user.lastLogin):t.t("settings","Never"))+"\n\t")]):t._e(),t._v(" "),s("div",{staticClass:"userActions"},[t.OC.currentUser===t.user.id||"admin"===t.user.id||t.loading.all?t._e():s("div",{staticClass:"toggleUserActions"},[s("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.hideMenu,expression:"hideMenu"}],staticClass:"icon-more",on:{click:t.toggleMenu}}),t._v(" "),s("div",{staticClass:"popovermenu",class:{open:t.openedMenu}},[s("popover-menu",{attrs:{menu:t.userActions}})],1)]),t._v(" "),s("div",{staticClass:"feedback",style:{opacity:""!==t.feedbackMessage?1:0}},[s("div",{staticClass:"icon-checkmark"}),t._v("\n\t\t\t"+t._s(t.feedbackMessage)+"\n\t\t")])])])},[],!1,null,null,null).exports,f=i(70),m=i.n(f),v={name:"userList",props:["users","showConfig","selectedGroup","externalActions"],components:{userRow:h,Multiselect:r.Multiselect,InfiniteLoading:m.a},data:function(){var e={id:"none",label:t("settings","Unlimited")},s={id:"default",label:t("settings","Default quota")};return{unlimitedQuota:e,defaultQuota:s,loading:{all:!1,groups:!1},scrolled:!1,searchQuery:"",newUser:{id:"",displayName:"",password:"",mailAddress:"",groups:[],subAdminsGroups:[],quota:s,language:{code:"en",name:t("settings","Default language")}}}},mounted:function(){this.settings.canChangePassword||OC.Notification.showTemporary(t("settings","Password change is disabled because the master key is disabled")),n.default.set(this.newUser.language,"code",this.settings.defaultLanguage),this.setNewUserDefaultGroup(this.selectedGroup),this.userSearch=new OCA.Search(this.search,this.resetSearch)},computed:{settings:function(){return this.$store.getters.getServerData},filteredUsers:function(){if("disabled"===this.selectedGroup){var t=this.users.filter(function(t){return!1===t.enabled});return 0===t.length&&this.$refs.infiniteLoading&&this.$refs.infiniteLoading.isComplete&&(this.$router.push({name:"users"}),this.$refs.infiniteLoading.stateChanger.reset()),t}return this.settings.isAdmin?this.users.filter(function(t){return!1!==t.enabled}):this.users.filter(function(t){return!1!==t.enabled&&t.id!==OC.getCurrentUser().uid})},groups:function(){return this.$store.getters.getGroups.filter(function(t){return"disabled"!==t.id}).sort(function(t,e){return t.name.localeCompare(e.name)})},canAddGroups:function(){return this.groups.map(function(t){return(t=Object.assign({},t)).$isDisabled=!1===t.canAdd,t})},subAdminsGroups:function(){return this.$store.getters.getSubadminGroups},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},usersCount:function(){return this.users.length},languages:function(){return Array({label:t("settings","Common languages"),languages:this.settings.languages.commonlanguages},{label:t("settings","All languages"),languages:this.settings.languages.languages})}},watch:{selectedGroup:function(t,e){this.$store.commit("resetUsers"),this.$refs.infiniteLoading.stateChanger.reset(),this.setNewUserDefaultGroup(t)},usersCount:function(t,e){0===t&&1===e?this.$refs.infiniteLoading.stateChanger.reset():1===t&&0===e&&this.$refs.infiniteLoading.stateChanger.loaded()}},methods:{onScroll:function(t){this.scrolled=t.target.scrollTo>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:"disabled"!==this.selectedGroup?this.selectedGroup:"",search:this.searchQuery}).then(function(e){e?t.loaded():t.complete()})},search:function(t){this.searchQuery=t,this.$store.commit("resetUsers"),this.$refs.infiniteLoading.stateChanger.reset()},resetSearch:function(){this.search("")},resetForm:function(){Object.assign(this.newUser,this.$options.data.call(this).newUser),this.setNewUserDefaultGroup(this.selectedGroup),this.loading.all=!1},createUser:function(){var t=this;this.loading.all=!0,this.$store.dispatch("addUser",{userid:this.newUser.id,password:this.newUser.password,displayName:this.newUser.displayName,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,language:this.newUser.language.code}).then(function(){t.resetForm(),t.$refs.newusername.focus()}).catch(function(e){if(t.loading.all=!1,e.response&&e.response.data&&e.response.data.ocs&&e.response.data.ocs.meta){var s=e.response.data.ocs.meta.statuscode;102===s?t.$refs.newusername.focus():107===s&&t.$refs.newuserpassword.focus()}})},setNewUserDefaultGroup:function(t){if(t&&t.length>0){var e=this.groups.find(function(e){return e.id===t});if(e)return void(this.newUser.groups=[e])}this.newUser.groups=[]},createGroup:function(t){var e=this;return this.loading.groups=!0,this.$store.dispatch("addGroup",t).then(function(s){e.newUser.groups.push(e.groups.find(function(e){return e.id===t})),e.loading.groups=!1}).catch(function(){e.loading.groups=!1}),this.$store.getters.getGroups[this.groups.length]}}},b=Object(g.a)(v,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"user-list-grid",attrs:{id:"app-content"},on:{"&scroll":function(e){return t.onScroll(e)}}},[s("div",{staticClass:"row",class:{sticky:t.scrolled&&!t.showConfig.showNewUserForm},attrs:{id:"grid-header"}},[s("div",{staticClass:"avatar",attrs:{id:"headerAvatar"}}),t._v(" "),s("div",{staticClass:"name",attrs:{id:"headerName"}},[t._v(t._s(t.t("settings","Username")))]),t._v(" "),s("div",{staticClass:"displayName",attrs:{id:"headerDisplayName"}},[t._v(t._s(t.t("settings","Display name")))]),t._v(" "),s("div",{staticClass:"password",attrs:{id:"headerPassword"}},[t._v(t._s(t.t("settings","Password")))]),t._v(" "),s("div",{staticClass:"mailAddress",attrs:{id:"headerAddress"}},[t._v(t._s(t.t("settings","Email")))]),t._v(" "),s("div",{staticClass:"groups",attrs:{id:"headerGroups"}},[t._v(t._s(t.t("settings","Groups")))]),t._v(" "),t.subAdminsGroups.length>0&&t.settings.isAdmin?s("div",{staticClass:"subadmins",attrs:{id:"headerSubAdmins"}},[t._v(t._s(t.t("settings","Group admin for")))]):t._e(),t._v(" "),s("div",{staticClass:"quota",attrs:{id:"headerQuota"}},[t._v(t._s(t.t("settings","Quota")))]),t._v(" "),t.showConfig.showLanguages?s("div",{staticClass:"languages",attrs:{id:"headerLanguages"}},[t._v(t._s(t.t("settings","Language")))]):t._e(),t._v(" "),t.showConfig.showStoragePath?s("div",{staticClass:"headerStorageLocation storageLocation"},[t._v(t._s(t.t("settings","Storage location")))]):t._e(),t._v(" "),t.showConfig.showUserBackend?s("div",{staticClass:"headerUserBackend userBackend"},[t._v(t._s(t.t("settings","User backend")))]):t._e(),t._v(" "),t.showConfig.showLastLogin?s("div",{staticClass:"headerLastLogin lastLogin"},[t._v(t._s(t.t("settings","Last login")))]):t._e(),t._v(" "),s("div",{staticClass:"userActions"})]),t._v(" "),s("form",{directives:[{name:"show",rawName:"v-show",value:t.showConfig.showNewUserForm,expression:"showConfig.showNewUserForm"}],staticClass:"row",class:{sticky:t.scrolled&&t.showConfig.showNewUserForm},attrs:{id:"new-user",disabled:t.loading.all},on:{submit:function(e){return e.preventDefault(),t.createUser(e)}}},[s("div",{class:t.loading.all?"icon-loading-small":"icon-add"}),t._v(" "),s("div",{staticClass:"name"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.newUser.id,expression:"newUser.id"}],ref:"newusername",attrs:{id:"newusername",type:"text",required:"",placeholder:t.t("settings","Username"),name:"username",autocomplete:"off",autocapitalize:"none",autocorrect:"off",pattern:"[a-zA-Z0-9 _\\.@\\-']+"},domProps:{value:t.newUser.id},on:{input:function(e){e.target.composing||t.$set(t.newUser,"id",e.target.value)}}})]),t._v(" "),s("div",{staticClass:"displayName"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.newUser.displayName,expression:"newUser.displayName"}],attrs:{id:"newdisplayname",type:"text",placeholder:t.t("settings","Display name"),name:"displayname",autocomplete:"off",autocapitalize:"none",autocorrect:"off"},domProps:{value:t.newUser.displayName},on:{input:function(e){e.target.composing||t.$set(t.newUser,"displayName",e.target.value)}}})]),t._v(" "),s("div",{staticClass:"password"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.newUser.password,expression:"newUser.password"}],ref:"newuserpassword",attrs:{id:"newuserpassword",type:"password",required:""===t.newUser.mailAddress,placeholder:t.t("settings","Password"),name:"password",autocomplete:"new-password",autocapitalize:"none",autocorrect:"off",minlength:t.minPasswordLength},domProps:{value:t.newUser.password},on:{input:function(e){e.target.composing||t.$set(t.newUser,"password",e.target.value)}}})]),t._v(" "),s("div",{staticClass:"mailAddress"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.newUser.mailAddress,expression:"newUser.mailAddress"}],attrs:{id:"newemail",type:"email",required:""===t.newUser.password,placeholder:t.t("settings","Email"),name:"email",autocomplete:"off",autocapitalize:"none",autocorrect:"off"},domProps:{value:t.newUser.mailAddress},on:{input:function(e){e.target.composing||t.$set(t.newUser,"mailAddress",e.target.value)}}})]),t._v(" "),s("div",{staticClass:"groups"},[t.settings.isAdmin?t._e():s("input",{class:{"icon-loading-small":t.loading.groups},attrs:{type:"text",tabindex:"-1",id:"newgroups",required:!t.settings.isAdmin},domProps:{value:t.newUser.groups}}),t._v(" "),s("multiselect",{staticClass:"multiselect-vue",attrs:{options:t.canAddGroups,disabled:t.loading.groups||t.loading.all,"tag-placeholder":"create",placeholder:t.t("settings","Add user in group"),label:"name","track-by":"id",multiple:!0,taggable:!0,"close-on-select":!1,"tag-width":60},on:{tag:t.createGroup},model:{value:t.newUser.groups,callback:function(e){t.$set(t.newUser,"groups",e)},expression:"newUser.groups"}},[s("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])])],1),t._v(" "),t.subAdminsGroups.length>0&&t.settings.isAdmin?s("div",{staticClass:"subadmins"},[s("multiselect",{staticClass:"multiselect-vue",attrs:{options:t.subAdminsGroups,placeholder:t.t("settings","Set user as admin for"),label:"name","track-by":"id",multiple:!0,"close-on-select":!1,"tag-width":60},model:{value:t.newUser.subAdminsGroups,callback:function(e){t.$set(t.newUser,"subAdminsGroups",e)},expression:"newUser.subAdminsGroups"}},[s("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])])],1):t._e(),t._v(" "),s("div",{staticClass:"quota"},[s("multiselect",{staticClass:"multiselect-vue",attrs:{options:t.quotaOptions,placeholder:t.t("settings","Select user quota"),label:"label","track-by":"id",allowEmpty:!1,taggable:!0},on:{tag:t.validateQuota},model:{value:t.newUser.quota,callback:function(e){t.$set(t.newUser,"quota",e)},expression:"newUser.quota"}})],1),t._v(" "),t.showConfig.showLanguages?s("div",{staticClass:"languages"},[s("multiselect",{staticClass:"multiselect-vue",attrs:{options:t.languages,placeholder:t.t("settings","Default language"),label:"name","track-by":"code",allowEmpty:!1,"group-values":"languages","group-label":"label"},model:{value:t.newUser.language,callback:function(e){t.$set(t.newUser,"language",e)},expression:"newUser.language"}})],1):t._e(),t._v(" "),t.showConfig.showStoragePath?s("div",{staticClass:"storageLocation"}):t._e(),t._v(" "),t.showConfig.showUserBackend?s("div",{staticClass:"userBackend"}):t._e(),t._v(" "),t.showConfig.showLastLogin?s("div",{staticClass:"lastLogin"}):t._e(),t._v(" "),s("div",{staticClass:"userActions"},[s("input",{staticClass:"button primary icon-checkmark-white has-tooltip",attrs:{type:"submit",id:"newsubmit",value:"",title:t.t("settings","Add a new user")}})])]),t._v(" "),t._l(t.filteredUsers,function(e,i){return s("user-row",{key:i,attrs:{user:e,settings:t.settings,showConfig:t.showConfig,groups:t.groups,subAdminsGroups:t.subAdminsGroups,quotaOptions:t.quotaOptions,languages:t.languages,externalActions:t.externalActions}})}),t._v(" "),s("infinite-loading",{ref:"infiniteLoading",on:{infinite:t.infiniteHandler}},[s("div",{attrs:{slot:"spinner"},slot:"spinner"},[s("div",{staticClass:"users-icon-loading icon-loading"})]),t._v(" "),s("div",{attrs:{slot:"no-more"},slot:"no-more"},[s("div",{staticClass:"users-list-end"})]),t._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"},[s("div",{attrs:{id:"emptycontent"}},[s("div",{staticClass:"icon-contacts-dark"}),t._v(" "),s("h2",[t._v(t._s(t.t("settings","No users in here")))])])])])],2)},[],!1,null,null,null).exports;i(0);function w(t){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.default.use(o.a);var y={name:"Users",props:["selectedGroup"],components:{AppContent:r.AppContent,AppNavigation:r.AppNavigation,AppNavigationItem:r.AppNavigationItem,AppNavigationNew:r.AppNavigationNew,AppNavigationSettings:r.AppNavigationSettings,AppSidebar:r.AppSidebar,Content:r.Content,UserList:b,Multiselect:r.Multiselect},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")},created:function(){Object.assign(OCA,{Settings:{UserList:{registerAction:this.registerAction}}})},data:function(){return{unlimitedQuota:{id:"none",label:t("settings","Unlimited")},selectedQuota:!1,externalActions:[],showAddGroupEntry:!1,loadingAddGroup:!1,showConfig:{showStoragePath:!1,showUserBackend:!1,showLastLogin:!1,showNewUserForm:!1,showLanguages:!1}}},methods:{toggleNewUserMenu:function(){this.showConfig.showNewUserForm=!this.showConfig.showNewUserForm,this.showConfig.showNewUserForm&&n.default.nextTick(function(){window.newusername.focus()})},getLocalstorage:function(t){var e=this.$localStorage.get(t);return this.showConfig[t]=null!==e?"true"===e:this.showConfig[t],this.showConfig[t]},setLocalStorage:function(t,e){return this.showConfig[t]=e,this.$localStorage.set(t,e),e},removeGroup:function(e){var s=this;OC.dialogs.confirm(t("settings","You are about to remove the group {group}. The users will NOT be deleted.",{group:e}),t("settings","Please confirm the group removal "),function(t){t&&s.$store.dispatch("removeGroup",e)})},setDefaultQuota:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none";this.$store.dispatch("setAppConfig",{app:"files",key:"default_quota",value:e.id?e.id:e}).then(function(){"object"!==w(e)&&(e={id:e,label:e}),t.defaultQuota=e})},validateQuota:function(t){return null===OC.Util.computerFileSize(t)?this.setDefaultQuota("none"):this.setDefaultQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(t)))},registerAction:function(t,e,s){return this.externalActions.push({icon:t,text:e,action:s}),this.externalActions},createGroup:function(t){var e=this,s=t.target[0].value;this.loadingAddGroup=!0,this.$store.dispatch("addGroup",s).then(function(){e.showAddGroupEntry=!1,e.loadingAddGroup=!1,e.$router.push({name:"group",params:{selectedGroup:s}})}).catch(function(){e.loadingAddGroup=!1})}},computed:{users:function(){return this.$store.getters.getUsers},usersOffset:function(){return this.$store.getters.getUsersOffset},usersLimit:function(){return this.$store.getters.getUsersLimit},showLanguages:{get:function(){return this.getLocalstorage("showLanguages")},set:function(t){this.setLocalStorage("showLanguages",t)}},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},settings:function(){return this.$store.getters.getServerData},quotaOptions:function(){var t=this.settings.quotaPreset.reduce(function(t,e){return t.concat({id:e,label:e})},[]);return t.unshift(this.unlimitedQuota),t},defaultQuota:{get:function(){return!1!==this.selectedQuota?this.selectedQuota:this.settings.defaultQuota!==this.unlimitedQuota.id&&OC.Util.computerFileSize(this.settings.defaultQuota)>=0?{id:this.settings.defaultQuota,label:this.settings.defaultQuota}:this.unlimitedQuota},set:function(t){this.selectedQuota=t}},menu:function(){var e=this,s=this,i=this.$store.getters.getGroups,a=(i=(i=Array.isArray(i)?i:[]).map(function(i){var n={};return n.id=i.id.replace(" ","_"),n.key=n.id,n.utils={},n.router={name:"group",params:{selectedGroup:i.id}},n.text=i.name,n.title=i.name,(i.usercount-i.disabled>0||-1===i.usercount)&&(n.utils.counter=i.usercount-i.disabled),"admin"!==n.id&&"disabled"!==n.id&&e.settings.isAdmin&&(n.utils.actions=[{icon:"icon-delete",text:t("settings","Remove group"),action:function(){s.removeGroup(i.id)}}]),n})).find(function(t){return"disabled"!==t.id&&"admin"!==t.id});if(a=void 0===a?[]:a,(a=Array.isArray(a)?a:[a]).length>0){var o={caption:!0,text:t("settings","Groups")};i.unshift(o)}var r=i.find(function(t){return"admin"==t.id}),l=i.find(function(t){return"disabled"==t.id});i=i.filter(function(t){return-1===["admin","disabled"].indexOf(t.id)}),r&&r.text&&(r.text=t("settings","Admins"),r.icon="icon-user-admin",i.unshift(r)),l&&l.text&&(l.text=t("settings","Disabled users"),l.icon="icon-disabled-users",l.utils&&(l.utils.counter>0||-1===l.utils.counter)&&i.unshift(l));var u={id:"everyone",key:"everyone",icon:"icon-contacts-dark",router:{name:"users"},text:t("settings","Everyone")};this.userCount>0&&n.default.set(u,"utils",{counter:this.userCount}),i.unshift(u);var d={id:"addgroup",key:"addgroup",icon:"icon-add",text:t("settings","Add group"),classes:this.loadingAddGroup?"icon-loading-small":""};return this.showAddGroupEntry?(n.default.set(d,"edit",{text:t("settings","Add group"),action:this.createGroup,reset:function(){s.showAddGroupEntry=!1}}),d.classes="editing"):n.default.set(d,"action",function(){s.showAddGroupEntry=!0,n.default.nextTick(function(){window.addgroup.querySelector('form > input[type="text"]').focus()})}),i.unshift(d),i}}},_=Object(g.a)(y,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("Content",{attrs:{"app-name":"settings","navigation-class":{"icon-loading":t.loadingAddGroup}}},[s("AppNavigation",[s("AppNavigationNew",{attrs:{"button-id":"new-user-button",text:t.t("settings","New user"),"button-class":"icon-add"},on:{click:t.toggleNewUserMenu}}),t._v(" "),s("ul",{attrs:{id:"usergrouplist"}},t._l(t.menu,function(t){return s("AppNavigationItem",{key:t.key,attrs:{item:t}})}),1),t._v(" "),s("AppNavigationSettings",[s("div",[s("p",[t._v(t._s(t.t("settings","Default quota:")))]),t._v(" "),s("Multiselect",{attrs:{value:t.defaultQuota,options:t.quotaOptions,"tag-placeholder":"create",placeholder:t.t("settings","Select default quota"),label:"label","track-by":"id",allowEmpty:!1,taggable:!0},on:{tag:t.validateQuota,input:t.setDefaultQuota}})],1),t._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.showLanguages,expression:"showLanguages"}],staticClass:"checkbox",attrs:{type:"checkbox",id:"showLanguages"},domProps:{checked:Array.isArray(t.showLanguages)?t._i(t.showLanguages,null)>-1:t.showLanguages},on:{change:function(e){var s=t.showLanguages,i=e.target,n=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.showLanguages=s.concat([null])):a>-1&&(t.showLanguages=s.slice(0,a).concat(s.slice(a+1)))}else t.showLanguages=n}}}),t._v(" "),s("label",{attrs:{for:"showLanguages"}},[t._v(t._s(t.t("settings","Show Languages")))])]),t._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.showLastLogin,expression:"showLastLogin"}],staticClass:"checkbox",attrs:{type:"checkbox",id:"showLastLogin"},domProps:{checked:Array.isArray(t.showLastLogin)?t._i(t.showLastLogin,null)>-1:t.showLastLogin},on:{change:function(e){var s=t.showLastLogin,i=e.target,n=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.showLastLogin=s.concat([null])):a>-1&&(t.showLastLogin=s.slice(0,a).concat(s.slice(a+1)))}else t.showLastLogin=n}}}),t._v(" "),s("label",{attrs:{for:"showLastLogin"}},[t._v(t._s(t.t("settings","Show last login")))])]),t._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.showUserBackend,expression:"showUserBackend"}],staticClass:"checkbox",attrs:{type:"checkbox",id:"showUserBackend"},domProps:{checked:Array.isArray(t.showUserBackend)?t._i(t.showUserBackend,null)>-1:t.showUserBackend},on:{change:function(e){var s=t.showUserBackend,i=e.target,n=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.showUserBackend=s.concat([null])):a>-1&&(t.showUserBackend=s.slice(0,a).concat(s.slice(a+1)))}else t.showUserBackend=n}}}),t._v(" "),s("label",{attrs:{for:"showUserBackend"}},[t._v(t._s(t.t("settings","Show user backend")))])]),t._v(" "),s("div",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.showStoragePath,expression:"showStoragePath"}],staticClass:"checkbox",attrs:{type:"checkbox",id:"showStoragePath"},domProps:{checked:Array.isArray(t.showStoragePath)?t._i(t.showStoragePath,null)>-1:t.showStoragePath},on:{change:function(e){var s=t.showStoragePath,i=e.target,n=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.showStoragePath=s.concat([null])):a>-1&&(t.showStoragePath=s.slice(0,a).concat(s.slice(a+1)))}else t.showStoragePath=n}}}),t._v(" "),s("label",{attrs:{for:"showStoragePath"}},[t._v(t._s(t.t("settings","Show storage path")))])])])],1),t._v(" "),s("AppContent",[s("UserList",{attrs:{users:t.users,showConfig:t.showConfig,selectedGroup:t.selectedGroup,externalActions:t.externalActions},scopedSlots:t._u([{key:"content",fn:function(){},proxy:!0}])})],1)],1)},[],!1,null,null,null);s.default=_.exports}}]);
//# sourceMappingURL=vue-6.js.map