<commit_before><template name="accountSettings">{{#with addContext}}
  {{> _changeEmail}}
 
  {{#if email}}
    {{#unless verified}}
      {{> _verifyEmail}}
    {{/unless}}

    {{> _changePassword}}

    {{> _resetPassword}}
  {{/if}}
{{/with}}</template>

<template name="_errorMsg">
  <span class="error">
    <i class="fa fa-warning"></i>
    {{#if errorText}}{{errorText}}{{else}}Unknown Error{{/if}}
  </span>
</template>

<template name="_successMsg">
  <span class="success">
    <i class="fa fa-check"></i>
    {{#if successText}}{{successText}}{{else}}Saved{{/if}}
  </span>
</template>

<template name="_changeEmail">{{#with addContext}}
   <form class="change-email setting">
   <div class="main">
      <span class="title">{{#if email}}Change{{else}}Set{{/if}} Email</span>
      <label for="email">Email</label>
      <input type="text" name="email" id="email" value="{{email}}"
             class="{{#if error}}error{{/if}}" />
    </div>

    <div class="actions">
      {{#if error}}<span class="error">
        <i class="fa fa-warning"></i> 
        {{#if _eq error "invalid"}}Invalid address{{/if}}
        {{#if _eq error "duplicate"}}Used by another account{{/if}}
        {{#if _eq error "blank"}}Cannot be blank{{/if}}
        {{#if _eq error "unknown"}}Unknown Error{{/if}}
      </span>{{/if}}

      {{#if saved}}{{> _successMsg}}{{/if}}
      
      {{> saveButton}}
    </div>
  </form>
{{/with}}</template>


<template name="_verifyEmail">{{#with addContext}}
  <form class="setting js-verify-email">
    <div class="main">
      <span class="title">Verify E-mail Address</span>
      <p>We've sent an e-mail to {{email}} to verify this address. Please
      click this button to verify your address. If you did not previously
      have an e-mail address set, you will also be prompted to set your
      password.</p>
    </div>

    <div class="actions">
      {{#if error}}{{> _errorMsg}}{{/if}}
      {{#if saved}}{{> _successMsg successText="Sent"}}{{/if}}
      {{> saveButton buttonText="Resend?"}}
    </div>
  </form>
{{/with}}</template>


<template name="_changePassword">{{#with addContext}}
  <form class="setting change-password">
    <div class="main">
      <span class="title">Change Password</span>
      <div class="{{#if _in error 'wrong-password' 'old-blank'}}error{{/if}}">
        <label for="password">Old</label>
        <input type="password" id="password" name="password"
          class="{{#if _in error 'wrong-password' 'old-blank'}}error{{/if}}" />
      </div>

      <div class="{{#if _in error 'new-blank'}}error{{/if}}">
        <label for="newPassword">New</label>
        <input type="password" id="newPassword" name="newPassword" 
               class="{{#if _in error 'new-blank'}}error{{/if}}" />
      </div>
    </div>

    <div class="actions">
      {{#if _in error 'wrong-password' 'old-blank'}}
        <span class="error pw-error">
          <i class="fa fa-warning"></i> 
          {{#if _eq error "wrong-password"}}Wrong password{{/if}}
          {{#if _eq error "old-blank"}}Cannot be blank{{/if}}
        </span>
      {{/if}}

      {{#if _eq error "new-blank"}}
        <span class="error new-pw-error">
          <i class="fa fa-warning"></i>
          Cannot be blank
        </span>
      {{/if}}

      {{#if _eq error "unknown"}}
        {{> _errorMsg}}
      {{/if}}

      {{#if saved}}{{> _successMsg}}{{/if}}
      {{> saveButton}}
    </div>
  </form>
{{/with}}</template>


<template name="_resetPassword">{{#with addContext}}
  <form class="setting reset-password">
    <div class="main">
      <span class="title">Forgot Password?</span>
      <p>We can e-mail you a link to reset your password.</p>
    </div>
    <div class="actions">
      {{#if error}}{{> _errorMsg}}{{/if}}
      {{#if saved}}{{> _successMsg successText="Sent"}}{{/if}}
      {{> saveButton}}
    </div>
  </form>
{{/with}}</template><commit_msg>Tabs for login, more style changes<commit_after><template name="accountSettings">{{#with addContext}}
  {{> _changeEmail}}
 
  {{#if email}}
    {{#unless verified}}
      {{> _verifyEmail}}
    {{/unless}}

    {{> _changePassword}}

    {{> _resetPassword}}
  {{/if}}
{{/with}}</template>

<template name="_errorMsg">
  <span class="error">
    <i class="fa fa-warning"></i>
    {{#if errorText}}{{errorText}}{{else}}Unknown Error{{/if}}
  </span>
</template>

<template name="_successMsg">
  <span class="success">
    <i class="fa fa-check"></i>
    {{#if successText}}{{successText}}{{else}}Saved{{/if}}
  </span>
</template>

<template name="_changeEmail">{{#with addContext}}
   <form class="change-email setting">
   <div class="main">
      <span class="title">{{#if email}}Change{{else}}Set{{/if}} Email</span>
      <div class="input-field">
        <label class="{{#if email}}active{{/if}}" for="email">Email</label>
        <input type="text" name="email" id="email" value="{{email}}"
               class="{{#if error}}error{{/if}}" />
      </div>
    </div>

    <div class="actions">
      {{#if error}}<span class="error">
        <i class="fa fa-warning"></i> 
        {{#if _eq error "invalid"}}Invalid address{{/if}}
        {{#if _eq error "duplicate"}}Used by another account{{/if}}
        {{#if _eq error "blank"}}Cannot be blank{{/if}}
        {{#if _eq error "unknown"}}Unknown Error{{/if}}
      </span>{{/if}}

      {{#if saved}}{{> _successMsg}}{{/if}}
      
      {{> saveButton}}
    </div>
  </form>
{{/with}}</template>


<template name="_verifyEmail">{{#with addContext}}
  <form class="setting js-verify-email">
    <div class="main">
      <span class="title">Verify E-mail Address</span>
      <p>We've sent an e-mail to {{email}} to verify this address. Please
      click this button to verify your address. If you did not previously
      have an e-mail address set, you will also be prompted to set your
      password.</p>
    </div>

    <div class="actions">
      {{#if error}}{{> _errorMsg}}{{/if}}
      {{#if saved}}{{> _successMsg successText="Sent"}}{{/if}}
      {{> saveButton buttonText="Resend?"}}
    </div>
  </form>
{{/with}}</template>


<template name="_changePassword">{{#with addContext}}
  <form class="setting change-password">
    <div class="main">
      <span class="title">Change Password</span>
      <div class="input-field
                  {{#if _in error 'wrong-password' 'old-blank'}}error{{/if}}">
        <label for="password">Old Password</label>
        <input type="password" id="password" name="password"
          class="{{#if _in error 'wrong-password' 'old-blank'}}error{{/if}}" />
      </div>

      <div class="input-field {{#if _in error 'new-blank'}}error{{/if}}">
        <label for="newPassword">New Password</label>
        <input type="password" id="newPassword" name="newPassword" 
               class="{{#if _in error 'new-blank'}}error{{/if}}" />
      </div>
    </div>

    <div class="actions">
      {{#if _in error 'wrong-password' 'old-blank'}}
        <span class="error pw-error">
          <i class="fa fa-warning"></i> 
          {{#if _eq error "wrong-password"}}Wrong password{{/if}}
          {{#if _eq error "old-blank"}}Cannot be blank{{/if}}
        </span>
      {{/if}}

      {{#if _eq error "new-blank"}}
        <span class="error new-pw-error">
          <i class="fa fa-warning"></i>
          Cannot be blank
        </span>
      {{/if}}

      {{#if _eq error "unknown"}}
        {{> _errorMsg}}
      {{/if}}

      {{#if saved}}{{> _successMsg}}{{/if}}
      {{> saveButton}}
    </div>
  </form>
{{/with}}</template>


<template name="_resetPassword">{{#with addContext}}
  <form class="setting reset-password">
    <div class="main">
      <span class="title">Forgot Password?</span>
      <p>We can e-mail you a link to reset your password.</p>
    </div>
    <div class="actions">
      {{#if error}}{{> _errorMsg}}{{/if}}
      {{#if saved}}{{> _successMsg successText="Sent"}}{{/if}}
      {{> saveButton}}
    </div>
  </form>
{{/with}}</template>
{'fraction_non_alphanumeric': 0.21706493181533842, 'fraction_numerical': 0.0, 'mean_word_length': 2.9850448654037884, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 0, '>': 201, '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': '4783956', 'n_tokens_mistral': 2657, 'n_tokens_neox': 2583, 'n_words': 609}