(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{513:function(t,e,n){"use strict";n.r(e);var s=n(220),a=n(71),i=n(0),c=n(3).a.extend({name:"AccountMenu",components:{factorAvatar:s.a,factorLink:s.u},props:{showName:{type:Boolean,default:!1}},data:()=>({toggle:!1,accountMenu:[]}),computed:{currentUser:()=>Object(a.b)(),role:()=>a.b.role||{}},created(){const t=Object(i.e)("account-menu",[{items:[{path:"/dashboard/account",name:"Account Settings"},{key:"logout",click:()=>Object(a.d)(),name:"Logout"}]}]);this.$set(this,"accountMenu",t)},mounted(){Object(i.r)("reset-ui",()=>{this.clickHandler()})},methods:{isLoggedIn:a.c,toLabel:i.F,itemClick(t){"function"==typeof t.click&&t.click(),this.clickHandler()},clickHandler(){this.toggle&&(this.toggle=!1,document.removeEventListener("click",this.clickHandler,!1))},setToggle(){if(!Object(a.c)())return Object(i.h)("sign-in-modal"),"";this.toggle?(this.toggle=!1,document.removeEventListener("click",this.clickHandler,!1)):(this.toggle=!0,document.addEventListener("click",this.clickHandler,!1))}}}),o=(n(675),n(531)),r=Object(o.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"account-menu"},[n("span",{staticClass:"account-menu-toggle",class:t.toggle?"active":"inactive",attrs:{"data-test":"account-menu-toggle"},on:{click:function(e){return e.stopPropagation(),t.setToggle(e)}}},[t.showName?n("div",{staticClass:"display-name"},[t._v(t._s(t.currentUser.displayName))]):t._e(),t._v(" "),n("factor-avatar",{attrs:{width:"2rem","post-id":t.currentUser.avatar}})],1),t._v(" "),n("transition",{attrs:{name:"leftfade"}},[t.toggle?n("div",{staticClass:"account-menu-nav",on:{click:function(t){t.stopPropagation()}}},[n("div",{staticClass:"nav-pad"},[n("div",{staticClass:"user-basics"},[t.isLoggedIn()?n("factor-avatar",{attrs:{"post-id":t.currentUser.avatar,width:"2.5em"}}):t._e(),t._v(" "),n("div",{staticClass:"content",attrs:{"data-uid":t.currentUser._id}},[n("div",{staticClass:"name"},[t._v(t._s(t.currentUser.displayName||t.currentUser.email))]),t._v(" "),t.role.title?n("div",{staticClass:"privs"},[n("span",{staticClass:"status"},[t._v(t._s(t.toLabel(t.role.title)))])]):t._e()])],1),t._v(" "),n("div",{staticClass:"account-nav-items"},t._l(t.accountMenu,(function(e,s){return n("div",{key:s,staticClass:"list-group"},[e.title?n("div",{staticClass:"list-group-title"},[t._v(t._s(e.title))]):t._e(),t._v(" "),t._l(e.items,(function(e,s){return n("factor-link",{key:s,attrs:{path:e.path,query:e.query,"data-test":"account-nav-"+e.key},on:{click:function(n){return t.itemClick(e)}}},[t._v(t._s(e.name))])}))],2)})),0)])]):t._e()])],1)}),[],!1,null,null,null);e.default=r.exports},531:function(t,e,n){"use strict";function s(t,e,n,s,a,i,c,o){var r,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),s&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),c?(r=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__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},l._ssrRegister=r):a&&(r=o?function(){a.call(this,this.$root.$options.shadowRoot)}:a),r)if(l.functional){l._injectStyles=r;var u=l.render;l.render=function(t,e){return r.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,r):[r]}return{exports:t,options:l}}n.d(e,"a",(function(){return s}))},553:function(t,e,n){},675:function(t,e,n){"use strict";var s=n(553);n.n(s).a}}]);