<commit_before>
<div
  class="topbar-container"
  ng-include="'views/includes/topbar.html'"
  ng-init="titleSection='Buy & Sell Bitcoin'; closeToHome = true">
</div>


<div class="content glidera" ng-controller="glideraController as glidera">

  <div class="onGoingProcess" ng-show="glidera.loading || index.glideraLoading">
    <div class="onGoingProcess-content" ng-style="{'background-color':index.backgroundColor}">
    <div class="spinner">
      <div class="rect1"></div>
      <div class="rect2"></div>
      <div class="rect3"></div>
      <div class="rect4"></div>
      <div class="rect5"></div>
    </div>
    <span ng-show="glidera.loading" translate>Connecting to Glidera...</span>
    <span ng-show="index.glideraLoading">{{index.glideraLoading|translate}}</span>
    </div>
  </div>

  <div class="row">
    <div class="m20b box-notification" ng-if="index.glideraError">
      <div class="text-warning">
        <span>{{index.glideraError}}</span>
      </div>
    </div>
    <div class="m10t text-center" ng-show="index.glideraError">
      <button
        class="dark-gray outline round tiny"
        ng-show="index.glideraError.indexOf('Forbidden') == 40"
        ng-click="index.glideraToken = null; index.glideraError = null">
        Request a new token
      </button>
      <div ng-show="index.glideraError.indexOf('Forbidden') != 40">
        <button
          class="dark-gray outline round tiny"
          ng-click="index.initGlidera(index.glideraToken)">
          Retry
        </button>
        <div class="m20t size-12">
          <a class="text-gray" ng-click="$root.go('preferencesGlidera')" translate>Preferences</a>
        </div>
      </div>
    </div>
  </div>

  <div ng-if="!index.glideraToken && !index.glideraLoading && !index.glideraError"
    class="row">
    <div class="box-notification text-center size-12 text-warning" ng-show="index.glideraTestnet">
      <i class="fi-info"></i>
      Testnet wallets only work with Glidera Sandbox Accounts
    </div>
    <div class="columns" ng-init="showOauthForm = false">
      <div class="text-center m20v">
        <img src="img/glidera-logo.png" ng-click="index.updateGlidera(index.glideraToken, index.glideraPermissions)" width="200">
      </div>
      <div class="text-center small-10 small-centered columns" ng-show="!showOauthForm">
        <p class="m10b" translate>You can buy and sell Bitcoin with a US bank account directly in Copay.</p>
        <p class="text-gray size-12" translate>Connect your Glidera account to get started</p>

        <a class="button m20t light-gray outline round small"
          ng-click="$root.openExternalLink(glidera.getAuthenticateUrl(), '_system'); showOauthForm = true" translate>
          Connect to Glidera
        </a>
        <div>
          <a href ng-click="showOauthForm = true" class="text-gray size-12">
            Do you already have the Oauth Code?
          </a>
        </div>
      </div>
      <div class="text-center" ng-show="showOauthForm">
        <div class="text-left box-notification size-12 text-warning" ng-show="glidera.error">
          {{glidera.error}}
        </div>
        <form name="oauthCodeForm" ng-submit="glidera.submitOauthCode(code)" novalidate>
          <label>OAuth Code</label>
          <input type="text" ng-model="code" ng-disabled="glidera.loading"
          ng-attr-placeholder="{{'Paste the authorization code here'|translate}}" required>
          <input
            class="button expand round"
            ng-style="{'background-color':index.backgroundColor}"
            type="submit" value="Get started" ng-disabled="oauthCodeForm.$invalid || glidera.loading">
        </form>
        <div>
          <a href class="size-12 text-gray"
            ng-click="showOauthForm = false; index.glideraError = null; glidera.error = null" translate>Go back</a>
        </div>
      </div>
    </div>
  </div>

  <div ng-if="index.glideraToken && index.glideraPermissions">
    <div class="m20v text-center">
      <img src="img/glidera-logo.png" ng-click="index.updateGlidera(index.glideraToken, index.glideraPermissions)" width="100">
    </div>
    <div class="sub-header"  ng-click="$root.go('preferencesGlidera')">
      <div class="left">
        <div ng-show="index.glideraPersonalInfo" class="size-12">
          <b>
          {{index.glideraPersonalInfo.firstName}} {{index.glideraPersonalInfo.lastName}}
          </b>
        </div>
        <div class="size-12" ng-show="index.glideraEmail">
          {{index.glideraEmail}}
        </div>
      </div>
      <div class="right">
        <div class="pointer m5t">
          <i class="fi-widget size-16 text-gray"></i>
          <span class="right text-gray">
            <i class="icon-arrow-right3 size-24 right"></i>
          </span>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="text-center columns small-8 small-centered m30v size-12"
        ng-show="index.glideraStatus && (!index.glideraStatus.userEmailIsSetup || !index.glideraStatus.userPhoneIsSetup
        || (!index.glideraStatus.userBankAccountIsSetup && index.glideraStatus.bankAccountState != 'VERIFIED'))">
        <h4 class="text-bold" translate> Complete Setup</h4>
        <span translate>Your Glidera account is not ready to transact. Please, verify it at</span>
        <a href
          ng-init="glideraUrl = index.glideraTestnet ? 'https://sandbox.glidera.io/login' :
          'https://glidera.io/login'"
          ng-click="$root.openExternalLink(glideraUrl)">Glidera.io</a>
        <div>
          <a class="button m20t light-gray outline round tiny"
            ng-init="glideraUrl = index.glideraTestnet ? 'https://sandbox.glidera.io/login' :
            'https://glidera.io/login'"
            ng-click="$root.openExternalLink(glideraUrl)"
            translate>
            Go to Glidera
          </a>
        </div>
      </div>
    </div>

    <div ng-show="index.glideraPermissions.transact &&
    (index.glideraStatus.userCanBuy || index.glideraStatus.userCanTransact)">
      <ul class="no-bullet m0 size-14">
        <li class="line-b line-t p20 pointer"
        ng-click="$root.go('buyGlidera')">
          <i class="icon-buy-btc size-24 m5r"></i>
          <span translate>Buy Bitcoin</span>
          <span class="right text-gray">
            <i class="icon-arrow-right3 size-24 right"></i>
          </span>
        </li>
        <li class="line-b p20 pointer"
        ng-show="index.glideraPermissions.transact &&
        (index.glideraStatus.userCanSell || index.glideraStatus.userCanTransact)"
        ng-click="$root.go('sellGlidera')">
        <i class="icon-sell-btc size-24 m5r"></i>
        <span translate>Sell Bitcoin</span>
        <span class="right text-gray"><commit_msg>remove link on the text<commit_after>
<div
  class="topbar-container"
  ng-include="'views/includes/topbar.html'"
  ng-init="titleSection='Buy & Sell Bitcoin'; closeToHome = true">
</div>


<div class="content glidera" ng-controller="glideraController as glidera">

  <div class="onGoingProcess" ng-show="glidera.loading || index.glideraLoading">
    <div class="onGoingProcess-content" ng-style="{'background-color':index.backgroundColor}">
    <div class="spinner">
      <div class="rect1"></div>
      <div class="rect2"></div>
      <div class="rect3"></div>
      <div class="rect4"></div>
      <div class="rect5"></div>
    </div>
    <span ng-show="glidera.loading" translate>Connecting to Glidera...</span>
    <span ng-show="index.glideraLoading">{{index.glideraLoading|translate}}</span>
    </div>
  </div>

  <div class="row">
    <div class="m20b box-notification" ng-if="index.glideraError">
      <div class="text-warning">
        <span>{{index.glideraError}}</span>
      </div>
    </div>
    <div class="m10t text-center" ng-show="index.glideraError">
      <button
        class="dark-gray outline round tiny"
        ng-show="index.glideraError.indexOf('Forbidden') == 40"
        ng-click="index.glideraToken = null; index.glideraError = null">
        Request a new token
      </button>
      <div ng-show="index.glideraError.indexOf('Forbidden') != 40">
        <button
          class="dark-gray outline round tiny"
          ng-click="index.initGlidera(index.glideraToken)">
          Retry
        </button>
        <div class="m20t size-12">
          <a class="text-gray" ng-click="$root.go('preferencesGlidera')" translate>Preferences</a>
        </div>
      </div>
    </div>
  </div>

  <div ng-if="!index.glideraToken && !index.glideraLoading && !index.glideraError"
    class="row">
    <div class="box-notification text-center size-12 text-warning" ng-show="index.glideraTestnet">
      <i class="fi-info"></i>
      Testnet wallets only work with Glidera Sandbox Accounts
    </div>
    <div class="columns" ng-init="showOauthForm = false">
      <div class="text-center m20v">
        <img src="img/glidera-logo.png" ng-click="index.updateGlidera(index.glideraToken, index.glideraPermissions)" width="200">
      </div>
      <div class="text-center small-10 small-centered columns" ng-show="!showOauthForm">
        <p class="m10b" translate>You can buy and sell Bitcoin with a US bank account directly in Copay.</p>
        <p class="text-gray size-12" translate>Connect your Glidera account to get started</p>

        <a class="button m20t light-gray outline round small"
          ng-click="$root.openExternalLink(glidera.getAuthenticateUrl(), '_system'); showOauthForm = true" translate>
          Connect to Glidera
        </a>
        <div>
          <a href ng-click="showOauthForm = true" class="text-gray size-12">
            Do you already have the Oauth Code?
          </a>
        </div>
      </div>
      <div class="text-center" ng-show="showOauthForm">
        <div class="text-left box-notification size-12 text-warning" ng-show="glidera.error">
          {{glidera.error}}
        </div>
        <form name="oauthCodeForm" ng-submit="glidera.submitOauthCode(code)" novalidate>
          <label>OAuth Code</label>
          <input type="text" ng-model="code" ng-disabled="glidera.loading"
          ng-attr-placeholder="{{'Paste the authorization code here'|translate}}" required>
          <input
            class="button expand round"
            ng-style="{'background-color':index.backgroundColor}"
            type="submit" value="Get started" ng-disabled="oauthCodeForm.$invalid || glidera.loading">
        </form>
        <div>
          <a href class="size-12 text-gray"
            ng-click="showOauthForm = false; index.glideraError = null; glidera.error = null" translate>Go back</a>
        </div>
      </div>
    </div>
  </div>

  <div ng-if="index.glideraToken && index.glideraPermissions">
    <div class="m20v text-center">
      <img src="img/glidera-logo.png" ng-click="index.updateGlidera(index.glideraToken, index.glideraPermissions)" width="100">
    </div>
    <div class="sub-header"  ng-click="$root.go('preferencesGlidera')">
      <div class="left">
        <div ng-show="index.glideraPersonalInfo" class="size-12">
          <b>
          {{index.glideraPersonalInfo.firstName}} {{index.glideraPersonalInfo.lastName}}
          </b>
        </div>
        <div class="size-12" ng-show="index.glideraEmail">
          {{index.glideraEmail}}
        </div>
      </div>
      <div class="right">
        <div class="pointer m5t">
          <i class="fi-widget size-16 text-gray"></i>
          <span class="right text-gray">
            <i class="icon-arrow-right3 size-24 right"></i>
          </span>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="text-center columns small-8 small-centered m30v size-12"
        ng-show="index.glideraStatus && (!index.glideraStatus.userEmailIsSetup || !index.glideraStatus.userPhoneIsSetup
        || (!index.glideraStatus.userBankAccountIsSetup && index.glideraStatus.bankAccountState != 'VERIFIED'))">
        <h4 class="text-bold" translate> Complete Setup</h4>
        <span translate>Your Glidera account is not ready to transact. Please, verify it at <b>Glidera.io</b> </span>
          <a class="button m20t light-gray outline round tiny"
            ng-init="glideraUrl = index.glideraTestnet ? 'https://sandbox.glidera.io/login' :
            'https://glidera.io/login'"
            ng-click="$root.openExternalLink(glideraUrl)"
            translate>
            Go to Glidera
          </a>
        </div>
      </div>
    </div>

    <div ng-show="index.glideraPermissions.transact &&
    (index.glideraStatus.userCanBuy || index.glideraStatus.userCanTransact)">
      <ul class="no-bullet m0 size-14">
        <li class="line-b line-t p20 pointer"
        ng-click="$root.go('buyGlidera')">
          <i class="icon-buy-btc size-24 m5r"></i>
          <span translate>Buy Bitcoin</span>
          <span class="right text-gray">
            <i class="icon-arrow-right3 size-24 right"></i>
          </span>
        </li>
        <li class="line-b p20 pointer"
        ng-show="index.glideraPermissions.transact &&
        (index.glideraStatus.userCanSell || index.glideraStatus.userCanTransact)"
        ng-click="$root.go('sellGlidera')">
        <i class="icon-sell-btc size-24 m5r"></i>
        <span translate>Sell Bitcoin</span>
        <span class="right text-gray">
{'fraction_non_alphanumeric': 0.1568612699368041, 'fraction_numerical': 0.011736382786638579, 'mean_word_length': 2.730844793713163, 'pattern_counts': {'":': 0, '<': 274, '<?xml version=': 0, '>': 274, 'https://': 6, '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': '5868525', 'n_tokens_mistral': 4395, 'n_tokens_neox': 4276, 'n_words': 823}