<commit_before>section.col-xs-12.content(ng-controller="RegisterCtrl")
  .row.auth-form-container.col-sm-offset-2.col-sm-8.col-md-offset-3.col-md-6(ng-show='mode=="form"')
    .auth-form-wrapper
      form(name='registerForm', ng-submit='submitForm()')
        h2(ng-hide="oldUserBlob", l10n) Sign Up
        h2(ng-show="oldUserBlob", l10n) Migrate
        .sign-up-steps-list
          li.active(l10n) Step
            span  1
          li(l10n) Step
            span  2
          li(l10n) Step
            span  3
        .form-group
          label(for='register_username', ng-hide="oldUserBlob", l10n) Create Ripple name
          .auth-attention(ng-show="oldUserBlob", l10n) If your username is available, you can use it. Otherwise, pick a unique name.
          .input-group
            span.input-group-addon.ripple-addon ~
            input.form-control#register_username(
            name='register_username', type='text', ng-model="username"
            required, rp-focus, autocomplete="off", maxlength="20", rpDest
            rp-available-name
            rp-available-name-invalid-reason="usernameInvalidReason"
            rp-available-name-reserved-for="usernameReservedFor"
            rp-loading="usernameLoading")
          .errorGroup(rp-errors='register_username', ng-hide="usernameLoading")
            .success(rp-error-valid)
              | Available
            .error(rp-error-on='rpAvailableName', l10n)
              span(ng-switch on="usernameInvalidReason")
                span(ng-switch-when="exists", l10n) Already taken!
                span(ng-switch-when="reserved", l10n) Reserved for {{usernameReservedFor}}
                  span &#32;
                  i.fa.fa-question-circle(
                  rp-popover
                  rp-popover-placement="bottom"
                  rp-popover-title='Reserved domain'
                  rp-popover-trigger="click"
                  ng-switch-when="reserved"
                  data-content='This name belongs to a high-traffic website and has been reserved to prevent phishing.')
                span(ng-switch-when="tooshort", l10n) Must be at least 2 characters
                span(ng-switch-when="toolong", l10n) Must be at most 20 characters
                span(ng-switch-when="charset", l10n) Only a-z, 0-9 and hyphen (-)
                span(ng-switch-when="starthyphen", l10n) Cannot start with hyphen (-)
                span(ng-switch-when="endhyphen", l10n) Cannot end with hyphen (-)
                span(ng-switch-when="multhyphen", l10n) Cannot bundle hyphens (--)
          span(ng-show="usernameLoading", l10n) Checking...
        .form-group(ng-class="{'field-error': 'weak' === strength}")
          label(for='register_password', l10n) Password
          input.form-control#register_password(
            name='register_password1', type='password', autocomplete="off"
            ng-model="<PASSWORD>"
            rp-strong-password, required, rp-same-in-set="<PASSWORD>")
          p(ng-show="strength=='weak'")
            span(l10n) Your password is weak. It does not contain numbers and symbols or it is too short.
        .form-group(ng-class="{'field-error': registerForm.register_password1.$error.rpSameInSet && registerForm.register_password2.$dirty}")
          label(for='register_password2', l10n) Confirm password
          input.form-control#register_password2(
            name='register_password2', autocomplete="off"
            type='password'
            ng-model="password2"
            required, rp-same-in-set="<PASSWORD>")
          p(ng-show="registerForm.register_password1.$error.rpSameInSet && registerForm.register_password2.$dirty")
            span(l10n) Passwords do not match
        div(ng-show="")
          .form-group
            div(class="strength {{strength}}") {{strength}}
        .form-group(ng-class="{'field-error': registerForm.register_email.$error.email && registerForm.register_email.$dirty}")
          label(for='register_email') Email
          input.form-control(type="email", name="register_email", id="register_email"
            placeholder="", ng-model="email", required)
          p(ng-show="registerForm.register_email.$error.email && registerForm.register_email.$dirty")
            span(l10n) Email address is invalid
        .form-group(ng-show="showMasterKeyInput"
          ng-class="{'field-error': registerForm.register_masterkey.$error.rpMasterKey && registerForm.register_masterkey.$dirty}")
          label(for='register_masterkey', l10n) Secret Account Key&#32;
          a(href="", ng-click="showMasterKeyInput=false", l10n)  hide
          input.form-control#register_masterkey(name='register_masterkey'
            type='text', autocomplete='off', ng-model="masterkey", rp-master-key, rp-focus)
          .errorBox(ng-show="registerForm.register_masterkey.$error.rpMasterKey")
            p.text-error(l10n) Secret Account Key is invalid
        div(ng-hide="showMasterKeyInput || oldUserBlob", l10n)
          | Need to use your Secret Key?&#32;
          a(href="", ng-click="showMasterKeyInput=true", l10n) Use Key
        .form-group
          .checkbox
            label(for='terms', l10n) I agree to the {{productName}}&#32;
              a(href="#eula", target="_blank", l10n-inc) end-user license agreement
            input#terms(type="checkbox", name="terms", ng-model="terms", required)
        .see-privacy-text(l10n)
          | Please see our&#32;
          a(href="https://ripple.com/privacy-policy/", target="_blank") privacy policy
          |  to see how we collect, use and share
          |  information about you
        .submit-btn-container
          button.btn.btn-block.btn-success(type='submit'
            ng-disabled='registerForm.$invalid || submitLoading'
            rp-spinner='{{submitLoading ? 4 : null}}')
            span(ng-hide="oldUserBlob", l10n) Sign Up
            span(ng-show="oldUserBlob", l10n) Migrate Account
    .switch-mode-link-container Have an account?&#32;
      a(href='#login', l10n) Log In

  .row.mode-masterkeyerror(ng-show='mode=="failed"')
    .col-xs-12.col-md-10.col-md-offset-1
      p.literal(l10n) An error occurred during registration. Please try again later.
      p.literal(l10n) The reported error was:
        | &#32;
        span(ng-bind="error_detail")
      p
        button.btn.btn-primary(ng-click='mode="form"', l10n) Back

  .row.mode-masterkeyerror(ng-show='mode=="alreadyexists"')
    .col-xs-12.col-md-10.col-md-offset-1
      p.literal(l10n) There is already a wallet using this username, please choose a different username and try again.
      p
        button.btn.btn-primary(ng-click='mode="form"', l10n) Back

  .row.auth-form-container.col-sm-offset-2.col-sm-8.col-md-offset-3.col-md-6(ng-show='mode=="secret"')
    .auth-form-wrapper
      h2(ng-hide="oldUserBlob", l10n) Sign Up
      h2(ng-show="oldUserBlob", l10n) Migrate
      .sign-up-steps-list
        li Step<commit_msg>[CHORE] Migration: Add migration option to register page (RT-1881)<commit_after>section.col-xs-12.content(ng-controller="RegisterCtrl")
  .row.auth-form-container.col-sm-offset-2.col-sm-8.col-md-offset-3.col-md-6(ng-show='mode=="form"')
    .auth-form-wrapper
      form(name='registerForm', ng-submit='submitForm()')
        h2(ng-hide="oldUserBlob", l10n) Sign Up
        h2(ng-show="oldUserBlob", l10n) Migrate
        .sign-up-steps-list
          li.active(l10n) Step
            span  1
          li(l10n) Step
            span  2
          li(l10n) Step
            span  3
        .form-group
          label(for='register_username', ng-hide="oldUserBlob", l10n) Create Ripple name
          .auth-attention(ng-show="oldUserBlob", l10n) If your username is available, you can use it. Otherwise, pick a unique name.
          .input-group
            span.input-group-addon.ripple-addon ~
            input.form-control#register_username(
            name='register_username', type='text', ng-model="username"
            required, rp-focus, autocomplete="off", maxlength="20", rpDest
            rp-available-name
            rp-available-name-invalid-reason="usernameInvalidReason"
            rp-available-name-reserved-for="usernameReservedFor"
            rp-loading="usernameLoading")
          .errorGroup(rp-errors='register_username', ng-hide="usernameLoading")
            .success(rp-error-valid)
              | Available
            .error(rp-error-on='rpAvailableName', l10n)
              span(ng-switch on="usernameInvalidReason")
                span(ng-switch-when="exists", l10n) Already taken!
                span(ng-switch-when="reserved", l10n) Reserved for {{usernameReservedFor}}
                  span &#32;
                  i.fa.fa-question-circle(
                  rp-popover
                  rp-popover-placement="bottom"
                  rp-popover-title='Reserved domain'
                  rp-popover-trigger="click"
                  ng-switch-when="reserved"
                  data-content='This name belongs to a high-traffic website and has been reserved to prevent phishing.')
                span(ng-switch-when="tooshort", l10n) Must be at least 2 characters
                span(ng-switch-when="toolong", l10n) Must be at most 20 characters
                span(ng-switch-when="charset", l10n) Only a-z, 0-9 and hyphen (-)
                span(ng-switch-when="starthyphen", l10n) Cannot start with hyphen (-)
                span(ng-switch-when="endhyphen", l10n) Cannot end with hyphen (-)
                span(ng-switch-when="multhyphen", l10n) Cannot bundle hyphens (--)
          span(ng-show="usernameLoading", l10n) Checking...
        .form-group(ng-class="{'field-error': 'weak' === strength}")
          label(for='register_password', l10n) Password
          input.form-control#register_password(
            name='register_password1', type='password', autocomplete="off"
            ng-model="<PASSWORD>"
            rp-strong-password, required, rp-same-in-set="<PASSWORD>")
          p(ng-show="strength=='weak'")
            span(l10n) Your password is weak. It does not contain numbers and symbols or it is too short.
        .form-group(ng-class="{'field-error': registerForm.register_password1.$error.rpSameInSet && registerForm.register_password2.$dirty}")
          label(for='register_password2', l10n) Confirm password
          input.form-control#register_password2(
            name='register_password2', autocomplete="off"
            type='password'
            ng-model="<PASSWORD>"
            required, rp-same-in-set="<PASSWORD>")
          p(ng-show="registerForm.register_password1.$error.rpSameInSet && registerForm.register_password2.$dirty")
            span(l10n) Passwords do not match
        div(ng-show="")
          .form-group
            div(class="strength {{strength}}") {{strength}}
        .form-group(ng-class="{'field-error': registerForm.register_email.$error.email && registerForm.register_email.$dirty}")
          label(for='register_email') Email
          input.form-control(type="email", name="register_email", id="register_email"
            placeholder="", ng-model="email", required)
          p(ng-show="registerForm.register_email.$error.email && registerForm.register_email.$dirty")
            span(l10n) Email address is invalid
        .form-group(ng-show="showMasterKeyInput"
          ng-class="{'field-error': registerForm.register_masterkey.$error.rpMasterKey && registerForm.register_masterkey.$dirty}")
          label(for='register_masterkey', l10n) Secret Account Key&#32;
          a(href="", ng-click="showMasterKeyInput=false", l10n)  hide
          input.form-control#register_masterkey(name='register_masterkey'
            type='text', autocomplete='off', ng-model="masterkey", rp-master-key, rp-focus)
          .errorBox(ng-show="registerForm.register_masterkey.$error.rpMasterKey")
            p.text-error(l10n) Secret Account Key is invalid
        div(ng-hide="showMasterKeyInput || oldUserBlob", l10n)
          | Need to use your Secret Key?&#32;
          a(href="", ng-click="showMasterKeyInput=true", l10n) Use Key
        .form-group
          .checkbox
            label(for='terms', l10n) I agree to the {{productName}}&#32;
              a(href="#eula", target="_blank", l10n-inc) end-user license agreement
            input#terms(type="checkbox", name="terms", ng-model="terms", required)
        .see-privacy-text(l10n)
          | Please see our&#32;
          a(href="https://ripple.com/privacy-policy/", target="_blank") privacy policy
          |  to see how we collect, use and share
          |  information about you
        .submit-btn-container
          button.btn.btn-block.btn-success(type='submit'
            ng-disabled='registerForm.$invalid || submitLoading'
            rp-spinner='{{submitLoading ? 4 : null}}')
            span(ng-hide="oldUserBlob", l10n) Sign Up
            span(ng-show="oldUserBlob", l10n) Migrate Account

    .switch-mode-link-container(ng-hide="$routeParams.action === 'migrate'", l10n) Already have a ripple.com/client account?&#32;
      a(ng-hide="$routeParams.action === 'migrate'", href='#/login/migrate', l10n-inc) Migrate
    .switch-mode-link-container Have an account?&#32;
      a(href='#login', l10n) Log In

  .row.mode-masterkeyerror(ng-show='mode=="failed"')
    .col-xs-12.col-md-10.col-md-offset-1
      p.literal(l10n) An error occurred during registration. Please try again later.
      p.literal(l10n) The reported error was:
        | &#32;
        span(ng-bind="error_detail")
      p
        button.btn.btn-primary(ng-click='mode="form"', l10n) Back

  .row.mode-masterkeyerror(ng-show='mode=="alreadyexists"')
    .col-xs-12.col-md-10.col-md-offset-1
      p.literal(l10n) There is already a wallet using this username, please choose a different username and try again.
      p
        button.btn.btn-primary(ng-click='mode="form"', l10n) Back

  .row.auth-form-container.col-sm-offset-2.col-sm-8.col-md-offset-3.col-md-6(ng-show='mode=="secret"')
    .auth-form-wrapper
      h2(ng-hide="oldUserBlob", l10n) Sign Up
      h2(ng-show="oldUserBlob", l10n) Migrate
      .sign-up-steps-list
        li Step
{'fraction_non_alphanumeric': 0.13890066412321606, 'fraction_numerical': 0.02013565069944892, 'mean_word_length': 2.555639286611404, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 2, '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': '331479', 'n_tokens_mistral': 4472, 'n_tokens_neox': 4241, 'n_words': 788}