text: // Generated by LiveScript 1.6.0
  (function(){
    var react, get, ref$, map, keys, head, filter, sortBy, reverse, moment, switchAccount, icons, epoch, getPrimaryInfo, navigate, burger, hiddenFields, last_status_at, rpc_allowed, p2p_allowed, name, cells, buildCellDefault, buildCell, buildHeaderCell, buildRow, buildHeader, header;
    react = require('react');
    get = require('../../web3t/providers/superagent.js').get;
    ref$ = require('prelude-ls'), map = ref$.map, keys = ref$.keys, head = ref$.head, filter = ref$.filter, sortBy = ref$.sortBy, reverse = ref$.reverse;
    moment = require('moment');
    switchAccount = require('./switch-account.js');
    icons = require('../icons.js');
    epoch = require('./epoch.js');
    getPrimaryInfo = require('../get-primary-info.js');
    navigate = require('../navigate.js');
    burger = require('../components/burger.js');
    hiddenFields = ['expected_rpc_address', 'local_address', 'remote_address', 'key'];
    last_status_at = function(store, web3t, peer, cell){
      var time;
      time = moment.utc(peer[cell]).fromNow();
      return react.createElement('td', {}, ' ' + time + '  ');
    };
    rpc_allowed = function(store, web3t, peer, cell){
      var children;
      if (peer[cell] === true) {
        return react.createElement('td', {}, children = react.createElement('label', {
          className: 'yes'
        }, ' YES'));
      } else {
        return react.createElement('td', {}, children = [
          react.createElement('label', {
            className: 'no'
          }, ' NO'), react.createElement('br', {}), " expected " + peer.expected_rpc_address
        ]);
      }
    };
    p2p_allowed = function(store, web3t, peer, cell){
      var children;
      if (peer[cell] === true) {
        return react.createElement('td', {}, children = react.createElement('label', {
          className: 'yes'
        }, ' YES'));
      } else {
        return react.createElement('td', {}, children = [
          react.createElement('label', {
            className: 'no'
          }, ' NO'), react.createElement('br', {}), " expected " + peer.remote_address
        ]);
      }
    };
    name = function(store, web3t, peer, cell){
      return react.createElement('td', {
        title: peer.key + ""
      }, ' ' + peer[cell] + ' ');
    };
    cells = {
      rpc_allowed: rpc_allowed,
      p2p_allowed: p2p_allowed,
      last_status_at: last_status_at,
      name: name
    };
    buildCellDefault = function(store, web3t, peer, cell){
      return react.createElement('td', {}, ' ' + peer[cell]);
    };
    buildCell = function(store, web3t, peer){
      return function(cell){
        var template, ref$;
        template = (ref$ = cells[cell]) != null ? ref$ : buildCellDefault;
        return template(store, web3t, peer, cell);
      };
    };
    buildHeaderCell = function(store, web3t, peer){
      return function(cell){
        return react.createElement('td', {}, ' ' + cell);
      };
    };
    buildRow = function(store, web3t, headers){
      return function(peer){
        var children;
        return react.createElement('tr', {}, children = map(buildCell(store, web3t, peer))(
        filter(function(it){
          return !in$(it, hiddenFields);
        })(
        headers)));
      };
    };
    buildHeader = function(store, web3t){
      return function(peer){
        var style, stats, children;
        style = getPrimaryInfo(store);
        stats = {
          background: style.app.stats
        };
        return react.createElement('tr', {
          style: stats
        }, children = map(buildHeaderCell(store, web3t, peer))(
        filter(function(it){
          return !in$(it, hiddenFields);
        })(
        keys(
        peer))));
      };
    };
    header = function(store, web3t){
      var info, borderStyle, goBack, showClass, children;
      info = getPrimaryInfo(store);
      borderStyle = {
        color: info.app.text,
        borderBottom: "1px solid " + info.app.border,
        background: info.app.background,
        backgroundColor: info.app.bgspare
      };
      goBack = function(){
        return navigate(store, web3t, 'wallets');
      };
      showClass = store.current.openMenu ? 'hide' : "";
      return react.createElement('div', {
        style: borderStyle,
        className: 'title'
      }, children = [
        react.createElement('div', {
          className: showClass + " header"
        }, ' Monitoring'), react.createElement('div', {
          onClick: goBack,
          className: 'close'
        }, children = react.createElement('img', {
          src: icons.arrowLeft + "",
          className: 'icon-svg'
        })), burger(store, web3t), epoch(store, web3t), switchAccount(store, web3t)
      ]);
    };
    module.exports = function(arg$){
      var store, web3t, headers, children;
      store = arg$.store, web3t = arg$.web3t;
      headers = keys(
      head(
      store.peerinfo.peers));
      return react.createElement('div', {
        className: 'monitor monitor1137829075'
      }, children = [
        header(store, web3t), react.createElement('div', {
          className: 'table-scroll'
        }, children = react.createElement('table', {}, children = [
          buildHeader(store, web3t)(
          head(
          store.peerinfo.peers)), map(buildRow(store, web3t, headers))(
          reverse(
          sortBy(function(it){
            return it.highest_block;
          })(
          store.peerinfo.peers)))
        ]))
      ]);
    };
    module.exports.init = function(arg$, cb){
      var store, web3t;
      store = arg$.store, web3t = arg$.web3t;
      return get("https://monitor.velas.com/peer/all/stats").end(function(err, data){
        if (err != null) {
          return cb(err);
        }
        store.peerinfo.peers = data.body.peers;
        return cb(null);
      });
    };
    function in$(x, xs){
      var i = -1, l = xs.length >>> 0;
      while (++i < l) if (x === xs[i]) return true;
      return false;
    }
  }).call(this);
  