"use strict";!function(e){ko.applyBindings(new function(){var i=this;i.root="../..",i.users=ko.observableArray(),i.query=ko.observable(""),i.edit=function(e){window.location=i.root+"/admin/users/edit?id="+e.id},i.accounts=ko.computed((function(){var e=i.query().toLowerCase();return e?ko.utils.arrayFilter(i.users(),(function(i){return i.fullname.toLowerCase().indexOf(e)>=0})):i.users()})),i.shouldShowWarning=function(e){return!!e.unsafepassword},i.displayWarning=function(i,r){r.stopPropagation(),e(r.currentTarget).tooltip("show")},i.hideWarning=function(i,r){r.stopPropagation(),e(r.currentTarget).tooltip("hide")},e.getJSON(i.root+"/admin/users/list",(function(r){e.map(r,(function(e,r){e.image=e.image?i.root+"/uploads/"+e.image:i.root+"/img/"+e.avatar,e.imuri=null,/Skype/i.test(e.imtype)&&(e.imuri="skype:"+e.imname+"?call"),/iMessage/i.test(e.imtype)&&(e.imuri="imessage:"+e.imname),/Slack/i.test(e.imtype)&&(e.imuri="slack://user?id="+e.imname),/FBMessenger/i.test(e.imtype)&&(e.imuri="fb-messenger://user/"+e.imname)})),i.users(r)})).fail(MMONIT.error.json)})}(jQuery);