<commit_before>do ($=jQuery, uiModel = edsc.models.searchModel.ui, urlUtil = edsc.util.url) ->

  updateLandingPageState = ->
    uiModel.isLandingPage(History.getState().hash == '/')

  updateLandingPage = (isLandingPage) ->
    $content = $('.landing-toolbar-content')
    $('.landing-hidden').toggle(!isLandingPage)
    $('.landing-visible').toggle(isLandingPage)
    if (isLandingPage)
      $('.landing-dialog-toolbar').append($content)
    else
      $('.landing-toolbar-container').append($content)
    $content.css(top: 0, left: 0, position: 'relative')


  updateLandingPageAnimated = (isLandingPage) ->
    $content = $('.landing-toolbar-content')
    startOffset = $content.offset()
    $content.css(position: 'absolute', zIndex: 10001, left: startOffset.left, top: startOffset.top)
    $('.landing-toolbar-container').append($content)

    if isLandingPage
      $('.landing-hidden').fadeOut()
      $('.landing-visible').fadeIn
        complete: ->
          endOffset = $('.landing-dialog-toolbar').offset()
          $content.animate(endOffset, duration: 200, complete: -> updateLandingPage(isLandingPage))
    else
      endOffset = $('.landing-toolbar-container').offset()
      $content.animate(endOffset,
        complete: -><commit_msg>EDSC-5: Focus keywords field on landing page<commit_after>do ($=jQuery, uiModel = edsc.models.searchModel.ui, urlUtil = edsc.util.url) ->

  updateLandingPageState = ->
    uiModel.isLandingPage(History.getState().hash == '/')

  updateLandingPage = (isLandingPage) ->
    $content = $('.landing-toolbar-content')
    $('.landing-hidden').toggle(!isLandingPage)
    $('.landing-visible').toggle(isLandingPage)
    if (isLandingPage)
      $('.landing-dialog-toolbar').append($content)
      $('#keywords').focus()
    else
      $('.landing-toolbar-container').append($content)
    $content.css(top: 0, left: 0, position: 'relative')


  updateLandingPageAnimated = (isLandingPage) ->
    $content = $('.landing-toolbar-content')
    startOffset = $content.offset()
    $content.css(position: 'absolute', zIndex: 10001, left: startOffset.left, top: startOffset.top)
    $('.landing-toolbar-container').append($content)

    if isLandingPage
      $('.landing-hidden').fadeOut()
      $('.landing-visible').fadeIn
        complete: ->
          endOffset = $('.landing-dialog-toolbar').offset()
          $content.animate(endOffset, duration: 200, complete: -> updateLandingPage(isLandingPage))
    else
      endOffset = $('.landing-toolbar-container').offset()
      $content.animate(endOffset,
        complete: ->
{'fraction_non_alphanumeric': 0.17301710730948677, 'fraction_numerical': 0.008164852255054433, 'mean_word_length': 3.611111111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '1684083', 'n_tokens_mistral': 827, 'n_tokens_neox': 782, 'n_words': 121}