(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{531:function(t,e,a){"use strict";function r(t,e,a,r,n,o,s,i){var d,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=a,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),s?(d=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(s)},l._ssrRegister=d):n&&(d=i?function(){n.call(this,this.$root.$options.shadowRoot)}:n),d)if(l.functional){l._injectStyles=d;var c=l.render;l.render=function(t,e){return d.call(e),c(t,e)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,d):[d]}return{exports:t,options:l}}a.d(e,"a",(function(){return r}))},571:function(t,e,a){},693:function(t,e,a){"use strict";var r=a(571);a.n(r).a},753:function(t,e,a){"use strict";a.r(e);var r=a(221),n=a(220),o=a(32),s=a(0),i=a(3).a.extend({name:"UserList",components:{dashboardPane:r.h,dashboardTableFooter:r.i,dashboardGrid:r.b,dashboardGridControls:r.d,dashboardGridFilter:r.e,factorLink:n.u,factorAvatar:n.a},props:{title:{type:String,default:""},list:{type:Array,default:()=>[]},meta:{type:Object,default:()=>{}},loading:{type:Boolean,default:!1}},computed:{tabs(){return["all","admin","moderator","member"].map(t=>{const e="all"==t?this.meta.total:Object(o.c)({meta:this.meta,field:"role",key:t,nullKey:"member"});return{name:Object(s.F)(t),value:"all"==t?"":t,count:e}})},getCounts(){const{categories:{accessLevel:t={}}={}}=this.index||{},e={admin:0,moderator:0,member:0};return Object.keys(t).forEach(a=>{const r=t[a],n=parseInt(a);n>300?e.admin+=r:n>100?e.moderator+=r:e.member+=r}),e}},methods:{toLabel:s.F,standardDate:s.A,postlink:(t,e,a=!0)=>Object(s.j)({postType:t,permalink:e,root:a}),tableStructure:()=>[{_id:"name",width:"minmax(150px, 1fr)"},{_id:"photo",width:"70px"},{_id:"role",width:"minmax(100px, 200px)"},{_id:"signed-up",width:"minmax(100px, 125px)"},{_id:"last-seen",width:"minmax(100px, 125px)"}]}}),d=(a(693),a(531)),l=Object(d.a)(i,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("dashboard-pane",{attrs:{title:t.title}},[t._t("title",null,{slot:"title"}),t._v(" "),t._t("nav",null,{slot:"nav"}),t._v(" "),a("dashboard-grid-controls",[a("div"),t._v(" "),a("dashboard-grid-filter",{attrs:{"filter-id":"role","filter-tabs":t.tabs}})],1),t._v(" "),a("dashboard-grid",{attrs:{structure:t.tableStructure(),rows:t.list,"zero-state":7},scopedSlots:t._u([{key:"name",fn:function(e){var r=e.row;return[a("div",{staticClass:"post-title"},[a("factor-link",{attrs:{path:t.$route.path+"/edit",query:{_id:r._id}}},[t._v(t._s(r.displayName))]),t._v(" "),r.email?a("factor-link",{staticClass:"permalink",attrs:{path:t.postlink(r.postType,r.permalink)}},[t._v(t._s(r.email))]):t._e()],1)]}},{key:"photo",fn:function(t){var e=t.row;return[a("factor-avatar",{attrs:{"post-id":e.avatar}})]}},{key:"role",fn:function(e){var a=e.row;return[t._v(t._s(t.toLabel(a.role)))]}},{key:"signed-up",fn:function(e){var a=e.row;return[t._v(t._s(t.standardDate(a.createdAt)))]}},{key:"last-seen",fn:function(e){var a=e.row;return[t._v(t._s(t.standardDate(a.signedInAt)))]}}])}),t._v(" "),a("dashboard-table-footer",t._b({attrs:{meta:t.meta}},"dashboard-table-footer",t.$attrs,!1))],2)}),[],!1,null,null,null);e.default=l.exports}}]);