1 (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-31b9"],{"9/5/":function(t,e,s){(function(e){var s="Expected a function",n=NaN,r="[object Symbol]",a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof e&&e&&e.Object===Object&&e,j="object"==typeof self&&self&&self.Object===Object&&self,d=l||j||Function("return this")(),p=Object.prototype.toString,h=Math.max,m=Math.min,g=function(){return d.Date.now()};function f(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&p.call(t)==r}(t))return n;if(f(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=f(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var s=i.test(t);return s||c.test(t)?u(t.slice(2),s?2:8):o.test(t)?n:+t}t.exports=function(t,e,n){var r,a,o,i,c,u,l=0,j=!1,d=!1,p=!0;if("function"!=typeof t)throw new TypeError(s);function b(e){var s=r,n=a;return r=a=void 0,l=e,i=t.apply(n,s)}function y(t){var s=t-u;return void 0===u||s>=e||s<0||d&&t-l>=o}function k(){var t=g();if(y(t))return x(t);c=setTimeout(k,function(t){var s=e-(t-u);return d?m(s,o-(t-l)):s}(t))}function x(t){return c=void 0,p&&r?b(t):(r=a=void 0,i)}function z(){var t=g(),s=y(t);if(r=arguments,a=this,u=t,s){if(void 0===c)return function(t){return l=t,c=setTimeout(k,e),j?b(t):i}(u);if(d)return c=setTimeout(k,e),b(u)}return void 0===c&&(c=setTimeout(k,e)),i}return e=v(e)||0,f(n)&&(j=!!n.leading,o=(d="maxWait"in n)?h(v(n.maxWait)||0,e):o,p="trailing"in n?!!n.trailing:p),z.cancel=function(){void 0!==c&&clearTimeout(c),l=0,r=u=a=c=void 0},z.flush=function(){return void 0===c?i:x(g())},z}}).call(this,s("yLpj"))},RnhZ:function(t,e,s){var n={"./af":"K/tc","./af.js":"K/tc","./ar":"jnO4","./ar-dz":"o1bE","./ar-dz.js":"o1bE","./ar-kw":"Qj4J","./ar-kw.js":"Qj4J","./ar-ly":"HP3h","./ar-ly.js":"HP3h","./ar-ma":"CoRJ","./ar-ma.js":"CoRJ","./ar-sa":"gjCT","./ar-sa.js":"gjCT","./ar-tn":"bYM6","./ar-tn.js":"bYM6","./ar.js":"jnO4","./az":"SFxW","./az.js":"SFxW","./be":"H8ED","./be.js":"H8ED","./bg":"hKrs","./bg.js":"hKrs","./bm":"p/rL","./bm.js":"p/rL","./bn":"kEOa","./bn-bd":"loYQ","./bn-bd.js":"loYQ","./bn.js":"kEOa","./bo":"0mo+","./bo.js":"0mo+","./br":"aIdf","./br.js":"aIdf","./bs":"JVSJ","./bs.js":"JVSJ","./ca":"1xZ4","./ca.js":"1xZ4","./cs":"PA2r","./cs.js":"PA2r","./cv":"A+xa","./cv.js":"A+xa","./cy":"l5ep","./cy.js":"l5ep","./da":"DxQv","./da.js":"DxQv","./de":"tGlX","./de-at":"s+uk","./de-at.js":"s+uk","./de-ch":"u3GI","./de-ch.js":"u3GI","./de.js":"tGlX","./dv":"WYrj","./dv.js":"WYrj","./el":"jUeY","./el.js":"jUeY","./en-au":"Dmvi","./en-au.js":"Dmvi","./en-ca":"OIYi","./en-ca.js":"OIYi","./en-gb":"Oaa7","./en-gb.js":"Oaa7","./en-ie":"4dOw","./en-ie.js":"4dOw","./en-il":"czMo","./en-il.js":"czMo","./en-in":"7C5Q","./en-in.js":"7C5Q","./en-nz":"b1Dy","./en-nz.js":"b1Dy","./en-sg":"t+mt","./en-sg.js":"t+mt","./eo":"Zduo","./eo.js":"Zduo","./es":"iYuL","./es-do":"CjzT","./es-do.js":"CjzT","./es-mx":"tbfe","./es-mx.js":"tbfe","./es-us":"Vclq","./es-us.js":"Vclq","./es.js":"iYuL","./et":"7BjC","./et.js":"7BjC","./eu":"D/JM","./eu.js":"D/JM","./fa":"jfSC","./fa.js":"jfSC","./fi":"gekB","./fi.js":"gekB","./fil":"1ppg","./fil.js":"1ppg","./fo":"ByF4","./fo.js":"ByF4","./fr":"nyYc","./fr-ca":"2fjn","./fr-ca.js":"2fjn","./fr-ch":"Dkky","./fr-ch.js":"Dkky","./fr.js":"nyYc","./fy":"cRix","./fy.js":"cRix","./ga":"USCx","./ga.js":"USCx","./gd":"9rRi","./gd.js":"9rRi","./gl":"iEDd","./gl.js":"iEDd","./gom-deva":"qvJo","./gom-deva.js":"qvJo","./gom-latn":"DKr+","./gom-latn.js":"DKr+","./gu":"4MV3","./gu.js":"4MV3","./he":"x6pH","./he.js":"x6pH","./hi":"3E1r","./hi.js":"3E1r","./hr":"S6ln","./hr.js":"S6ln","./hu":"WxRl","./hu.js":"WxRl","./hy-am":"1rYy","./hy-am.js":"1rYy","./id":"UDhR","./id.js":"UDhR","./is":"BVg3","./is.js":"BVg3","./it":"bpih","./it-ch":"bxKX","./it-ch.js":"bxKX","./it.js":"bpih","./ja":"B55N","./ja.js":"B55N","./jv":"tUCv","./jv.js":"tUCv","./ka":"IBtZ","./ka.js":"IBtZ","./kk":"bXm7","./kk.js":"bXm7","./km":"6B0Y","./km.js":"6B0Y","./kn":"PpIw","./kn.js":"PpIw","./ko":"Ivi+","./ko.js":"Ivi+","./ku":"JCF/","./ku.js":"JCF/","./ky":"lgnt","./ky.js":"lgnt","./lb":"RAwQ","./lb.js":"RAwQ","./lo":"sp3z","./lo.js":"sp3z","./lt":"JvlW","./lt.js":"JvlW","./lv":"uXwI","./lv.js":"uXwI","./me":"KTz0","./me.js":"KTz0","./mi":"aIsn","./mi.js":"aIsn","./mk":"aQkU","./mk.js":"aQkU","./ml":"AvvY","./ml.js":"AvvY","./mn":"lYtQ","./mn.js":"lYtQ","./mr":"Ob0Z","./mr.js":"Ob0Z","./ms":"6+QB","./ms-my":"ZAMP","./ms-my.js":"ZAMP","./ms.js":"6+QB","./mt":"G0Uy","./mt.js":"G0Uy","./my":"honF","./my.js":"honF","./nb":"bOMt","./nb.js":"bOMt","./ne":"OjkT","./ne.js":"OjkT","./nl":"+s0g","./nl-be":"2ykv","./nl-be.js":"2ykv","./nl.js":"+s0g","./nn":"uEye","./nn.js":"uEye","./oc-lnc":"Fnuy","./oc-lnc.js":"Fnuy","./pa-in":"8/+R","./pa-in.js":"8/+R","./pl":"jVdC","./pl.js":"jVdC","./pt":"8mBD","./pt-br":"0tRk","./pt-br.js":"0tRk","./pt.js":"8mBD","./ro":"lyxo","./ro.js":"lyxo","./ru":"lXzo","./ru.js":"lXzo","./sd":"Z4QM","./sd.js":"Z4QM","./se":"//9w","./se.js":"//9w","./si":"7aV9","./si.js":"7aV9","./sk":"e+ae","./sk.js":"e+ae","./sl":"gVVK","./sl.js":"gVVK","./sq":"yPMs","./sq.js":"yPMs","./sr":"zx6S","./sr-cyrl":"E+lV","./sr-cyrl.js":"E+lV","./sr.js":"zx6S","./ss":"Ur1D","./ss.js":"Ur1D","./sv":"X709","./sv.js":"X709","./sw":"dNwA","./sw.js":"dNwA","./ta":"PeUW","./ta.js":"PeUW","./te":"XLvN","./te.js":"XLvN","./tet":"V2x9","./tet.js":"V2x9","./tg":"Oxv6","./tg.js":"Oxv6","./th":"EOgW","./th.js":"EOgW","./tk":"Wv91","./tk.js":"Wv91","./tl-ph":"Dzi0","./tl-ph.js":"Dzi0","./tlh":"z3Vd","./tlh.js":"z3Vd","./tr":"DoHr","./tr.js":"DoHr","./tzl":"z1FC","./tzl.js":"z1FC","./tzm":"wQk9","./tzm-latn":"tT3J","./tzm-latn.js":"tT3J","./tzm.js":"wQk9","./ug-cn":"YRex","./ug-cn.js":"YRex","./uk":"raLr","./uk.js":"raLr","./ur":"UpQW","./ur.js":"UpQW","./uz":"Loxo","./uz-latn":"AQ68","./uz-latn.js":"AQ68","./uz.js":"Loxo","./vi":"KSF8","./vi.js":"KSF8","./x-pseudo":"/X5v","./x-pseudo.js":"/X5v","./yo":"fzPg","./yo.js":"fzPg","./zh-cn":"XDpg","./zh-cn.js":"XDpg","./zh-hk":"SatO","./zh-hk.js":"SatO","./zh-mo":"OmwH","./zh-mo.js":"OmwH","./zh-tw":"kOpN","./zh-tw.js":"kOpN"};function r(t){var e=a(t);return s(e)}function a(t){if(!s.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}r.keys=function(){return Object.keys(n)},r.resolve=a,t.exports=r,r.id="RnhZ"},SjYU:function(t,e,s){},UQK7:function(t,e,s){"use strict";s.r(e);var n=s("wd/R"),r=s.n(n),a=s("LvDl"),o=s.n(a),i=s("9/5/"),c=s.n(i),u=s("rIUS"),l={name:"LogEntryMessage",props:{actor:{type:Object,required:!0},message:{type:String,required:!0},subject:{type:[Object,Array],required:!1,default:function(){return{}}}},computed:{logEntryMessage:function(){return this.actor.nickname?this.message.split(this.actor.nickname)[1]:this.message},logEntryMessageWithoutId:function(){return this.logEntryMessage.split("#".concat(this.subject.id))}},methods:{propertyExists:function(t,e){return t[e]}}},j=(s("oBYv"),s("KHd+")),d=Object(j.a)(l,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",[t.propertyExists(t.actor,"id")?s("router-link",{staticClass:"router-link",attrs:{to:{name:"UsersShow",params:{id:t.actor.id}}}},[t.propertyExists(t.actor,"nickname")?s("span",{staticStyle:{"font-weight":"600"}},[t._v("\n @"+t._s(t.actor.nickname)+"\n ")]):t._e()]):t._e(),t._v(" "),"report"===t.subject.type&&t.propertyExists(t.subject,"id")?s("span",[t._v("\n "+t._s(t.logEntryMessageWithoutId[0])+"\n "),s("router-link",{staticClass:"router-link",attrs:{to:{name:"ReportsShow",params:{id:t.subject.id}}}},[s("span",{staticStyle:{"font-weight":"600"}},[t._v("#"+t._s(t.subject.id))])]),t._v("\n "+t._s(t.logEntryMessageWithoutId[1])+"\n ")],1):s("span",[t._v(t._s(t.logEntryMessage))])],1)},[],!1,null,null,null);d.options.__file="LogEntryMessage.vue";var p=d.exports,h={components:{RebootButton:u.a,LogEntryMessage:p},data:function(){return{dateRange:"",search:"",user:"",currentPage:1}},computed:{isMobile:function(){return"mobile"===this.$store.state.app.device},loading:function(){return this.$store.state.moderationLog.logLoading&&this.$store.state.moderationLog.adminsLoading},log:function(){return this.$store.state.moderationLog.fetchedLog},total:function(){return this.$store.state.moderationLog.logItemsCount},users:function(){return[{label:"Admins",options:this.$store.state.moderationLog.admins.users},{label:"Moderators",options:this.$store.state.moderationLog.moderators.users}]}},created:function(){var t=this;this.handleDebounceSearchInput=c()(function(e){t.fetchLogWithFilters()},500)},mounted:function(){this.$store.dispatch("GetNodeInfo"),this.$store.dispatch("NeedReboot"),this.$store.dispatch("FetchModerationLog"),this.$store.dispatch("FetchAdmins")},methods:{fetchLogWithFilters:function(){var t=o.a.omitBy({start_date:this.dateRange?this.dateRange[0].toISOString():null,end_date:this.dateRange?this.dateRange[1].toISOString():null,user_id:this.user,search:this.search,page:this.currentPage},function(t){return""===t||null===t});this.$store.dispatch("FetchModerationLog",t)},normalizeTimestamp:function(t){return r()(1e3*t).format("YYYY-MM-DD HH:mm")},propertyExists:function(t,e){return t[e]}}},m=(s("cwyd"),Object(j.a)(h,function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.loading?t._e():s("div",{staticClass:"moderation-log-container"},[s("div",{staticClass:"moderation-log-header-container"},[s("h1",[t._v(t._s(t.$t("moderationLog.moderationLog")))]),t._v(" "),s("reboot-button")],1),t._v(" "),s("div",{staticClass:"moderation-log-nav-container"},[s("el-select",{staticClass:"moderation-log-user-select",attrs:{clearable:"",placeholder:"Filter by admin/moderator"},on:{change:t.fetchLogWithFilters},model:{value:t.user,callback:function(e){t.user=e},expression:"user"}},t._l(t.users,function(e){return s("el-option-group",{key:e.label,attrs:{label:e.label}},t._l(e.options,function(t){return s("el-option",{key:t.id,attrs:{label:t.nickname,value:t.id}})}),1)}),1),t._v(" "),s("el-input",{staticClass:"moderation-log-search",attrs:{placeholder:"Search logs",clearable:""},on:{input:t.handleDebounceSearchInput},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1),t._v(" "),s("el-date-picker",{staticClass:"moderation-log-date-panel",attrs:{"default-time":["00:00:00","23:59:59"],type:"daterange","start-placeholder":"Start date","end-placeholder":"End date","unlink-panels":""},on:{change:t.fetchLogWithFilters},model:{value:t.dateRange,callback:function(e){t.dateRange=e},expression:"dateRange"}}),t._v(" "),s("el-timeline",t._l(t.log,function(e,n){return s("el-timeline-item",{key:n,attrs:{timestamp:t.normalizeTimestamp(e.time)}},[t.propertyExists(e.data.actor,"nickname")?s("log-entry-message",{attrs:{actor:e.data.actor,message:e.message,subject:e.data.subject}}):s("span",[t._v(t._s(e.message))])],1)}),1),t._v(" "),s("div",{staticClass:"pagination"},[s("el-pagination",{attrs:{"current-page":t.currentPage,"hide-on-single-page":!0,"page-size":50,total:t.total,small:t.isMobile,layout:"prev, pager, next"},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"current-change":t.fetchLogWithFilters}})],1)],1)},[],!1,null,"a9880f26",null));m.options.__file="index.vue";e.default=m.exports},cwyd:function(t,e,s){"use strict";var n=s("v8zG");s.n(n).a},oBYv:function(t,e,s){"use strict";var n=s("SjYU");s.n(n).a},rIUS:function(t,e,s){"use strict";var n=s("yXPU"),r=s.n(n),a=s("o0o1"),o=s.n(a),i=s("mSNy"),c={name:"RebootButton",computed:{needReboot:function(){return this.$store.state.app.needReboot}},methods:{restartApp:function(){var t=this;return r()(o.a.mark(function e(){return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$store.dispatch("RestartApplication");case 3:e.next=8;break;case 5:return e.prev=5,e.t0=e.catch(0),e.abrupt("return");case 8:t.$message({type:"success",message:i.a.t("settings.restartSuccess")});case 9:case"end":return e.stop()}},e,null,[[0,5]])}))()}}},u=s("KHd+"),l=Object(u.a)(c,function(){var t=this.$createElement,e=this._self._c||t;return this.needReboot?e("el-tooltip",{attrs:{content:this.$t("settings.restartApp"),placement:"bottom-end"}},[e("el-button",{staticClass:"reboot-button",attrs:{type:"warning"},on:{click:this.restartApp}},[e("span",[e("i",{staticClass:"el-icon-refresh"}),this._v("\n "+this._s(this.$t("settings.instanceReboot"))+"\n ")])])],1):this._e()},[],!1,null,null,null);l.options.__file="index.vue";e.a=l.exports},v8zG:function(t,e,s){}}]);