<commit_before>{Table, ProgressBar, Grid, Input, Col, Alert, Button, OverlayTrigger, Popover} = ReactBootstrap

getCondStyle = (cond) ->
getCondStyle = (cond, show) ->
  if !show
    {}
  else if window.theme.indexOf('dark') != -1 or window.theme == 'slate' or window.theme == 'superhero'
    if cond > 52 # 53~100
      color: '#FFFF00',
      fontWeight: 'bold',
      textShadow: '0 0 7px #FFFF00'
    else if cond > 49 # 50~52
      color: '#FFFF80'
    else if cond is 49 # 49
      {}
    else if cond < 20 # 0~19
      color: '#DD514C'
    else if cond < 30 # 20~29
      color: '#F37B1D'
    else if cond < 40 # 30~39
      color: '#FFC880'
    else # 40~48
      color: '#FFE8CB'
      opacity: 0.8
  else
    if cond > 52
      textShadow: '0 0 3px #FFFF00'
    else if cond > 49
      textShadow: '0 0 3px #FFFF80'
    else if cond is 49
      {}
    else if cond < 20
      textShadow: '0 0 3px #DD514C'
    else if cond < 30
      textShadow: '0 0 3px #F37B1D'
    else if cond < 40
      textShadow: '0 0 3px #FFC880'
    else
      textShadow: '0 0 3px #FFE8CB'

module.exports = React.createClass
  render: ->
    if @props.lv == -1
      <td>　</td>
    else
      <td style={opacity: 1 - 0.6 * @props.isBack} className="prophet-info-content">
        {
          nameTxt = "#{@props.name}"
          lvTxt = " Lv.#{@props.lv}"
          condTxt = " ★#{@props.cond}"
          showCond = @props.condShow

          txt = nameTxt
          popoverTxt = nameTxt + lvTxt
          if showCond
            txt += condTxt
            popoverTxt += condTxt
          if !@props.compactMode
            txt += lvTxt

          <OverlayTrigger trigger='click' rootClose placement='bottom' overlay={<Popover>{popoverTxt}</Popover>}>
            <span style={getCondStyle(@props.cond, showCond)}>{txt}</span>
          </OverlayTrigger>
        }
      </td><commit_msg>Updated prophet according to changes made in the poi main app<commit_after>{Table, ProgressBar, Grid, Input, Col, Alert, Button, OverlayTrigger, Popover} = ReactBootstrap

getCondStyle = (cond, show) ->
  if show
    window.getCondStyle cond

module.exports = React.createClass
  render: ->
    if @props.lv == -1
      <td>　</td>
    else
      <td style={opacity: 1 - 0.6 * @props.isBack} className="prophet-info-content">
        {
          nameTxt = "#{@props.name}"
          lvTxt = " - Lv.#{@props.lv}"
          condTxt = " ★#{@props.cond}"
          showCond = @props.condShow

          txt = nameTxt
          popoverTxt = nameTxt + lvTxt
          if !@props.compactMode
            txt += lvTxt
          if showCond
            txt += condTxt
            popoverTxt += condTxt

          <OverlayTrigger trigger='click' rootClose placement='bottom' overlay={<Popover>{popoverTxt}</Popover>}>
            <span className={getCondStyle(@props.cond, showCond)}>{txt}</span>
          </OverlayTrigger>
        }
      </td>
{'fraction_non_alphanumeric': 0.13156990724836826, 'fraction_numerical': 0.03847475094469255, 'mean_word_length': 2.0684931506849313, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '202778', 'n_tokens_mistral': 1054, 'n_tokens_neox': 973, 'n_words': 258}