<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2167384480353654" crossorigin="anonymous"></script>
<div class="container" id="pageContainer">
    <div class="row">
        <div class="col-xs-12 col-sm-6 col-md-6">
            <h2 class="text-center">
                <% if (player.verified) { %>
                    <div id="verified-check" title="Verified"></div>
                <% } %>
                <%= player.username %> Player Summary
            </h2>
            <div id="profile-badges">
                <h4 class="text-center">Badges</h4>
                <% for (let badge of player.badges) { %>
                    <img class="takepoint-badge" src="/img/badges/<%= badge.name %>.png" info="<%= badge.info %>" timestamp="<%= badge.timestamp || '' %>">
                <% } %>
            </div>
            <h2 class="text-center key-stat">
                <%= player.pointsTaken.toLocaleString() %> Points Taken
            </h2>
            <h2 class="text-center key-stat">
                <%= player.pointsNeutralized.toLocaleString() %> Points Neutralized
            </h2>
            <table class="table table-condensed">
                <thead>
                    <tr>
                        <th colspan="2" class="blue-border-2px text-center"></th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Total Score</td>
                        <td>
                            <%= player.score.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Time Played</td>
                        <td>
                            <%= formatTime(player.timePlayed) %>
                        </td>
                    </tr>
                    <tr>
                        <td>Overall K/D Ratio</td>
                        <td>
                            <%= player.kdr.toLocaleString(undefined, {minimumFractionDigits: 2}) %>
                        </td>
                    </tr>
                    <tr>
                        <td>Score Per Minute</td>
                        <td>
                            <%= player.spm.toLocaleString(undefined, {minimumFractionDigits: 2}) %>
                        </td>
                    </tr>
                    <tr>
                        <td>Longest Killstreak</td>
                        <td>
                            <%= player.killstreak.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Total Kills</td>
                        <td>
                            <%= player.kills.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Total Deaths</td>
                        <td>
                            <%= player.deaths.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Accuracy</td>
                        <td>
                            <%= player.accuracy.toLocaleString(undefined, {minimumFractionDigits: 2}) + "%" %>
                        </td>
                    </tr>
                    <tr>
                        <td>Total Distance Covered</td>
                        <td>
                            <%= player.distanceCovered %>
                        </td>
                    </tr>
                    <tr>
                        <td>Double Kills</td>
                        <td>
                            <%= player.doubleKills.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Triple Kills</td>
                        <td>
                            <%= player.tripleKills.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Multi Kills</td>
                        <td>
                            <%= player.multiKills.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Started Playing</td>
                        <td>
                            <%= player.joinedAt %>
                        </td>
                    </tr>
                    <tr>
                        <td>Last Active</td>
                        <td>
                            <%= player.activeAt %>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="col-xs-12 col-sm-6 col-md-6">
            <div class="table-responsive">
                <table class="table loadout-table">
                    <thead>
                        <tr class="blue-border-2px">
                            <th colspan="2">
                                <h2 class="text-center">Favorite Loadouts</h2>
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>
                                <h3>
                                    <%= player.mostUsedWeapon[0].selected ? player.mostUsedWeapon[1] : "None" %>
                                </h3>
                                <p>Selected <%= player.mostUsedWeapon[0].selected.toLocaleString() %> times</p>
                            </td>
                            <td>
                                <% if (player.mostUsedWeapon[0].selected) { %>
                                    <img id="classImage" src="/img/<%= player.mostUsedWeapon[1] %>.jpg">
                            </td>
                            <% } %>
                        </tr>
                        <tr>
                            <td>
                                <h3>Upgrades Selected</h3>
                                <p>Speed Increase: <%= player.upgrades.speed.toLocaleString() %>
                                </p>
                                <p>Faster Reload: <%= player.upgrades.reload.toLocaleString() %>
                                </p>
                                <p>Larger Mags: <%= player.upgrades.mags.toLocaleString() %>
                                </p>
                                <p>Extend View: <%= player.upgrades.view.toLocaleString() %>
                                </p>
                                <p>Heal Faster: <%= player.upgrades.heal.toLocaleString() %>
                                </p>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <h3>
                                    <%= player.mostUsedPerk[1] ? player.mostUsedPerk[0] : "None" %>
                                </h3>
                                <p>Used <%= player.mostUsedPerk[1].toLocaleString() %> times</p>
                            </td>
                            <td>
                                <% if (player.mostUsedPerk[1]) { %>
                                    <img id="classImage" src="/img/<%= player.mostUsedPerk[0] %>.jpg">
                            </td>
                            <% } %>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <hr>
    <div class="row">
        <div class="col-xs-6 col-sm-3">
            <h2 class="text-center">Pistol</h2>
            <table class="table table-condensed">
                <thead>
                    <tr>
                        <th colspan="2" class="red-border-2px text-center"></th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Kills</td>
                        <td>
                            <%= player.weapons.pistol.kills.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Time Played</td>
                        <td>
                            <%= formatTime(player.weapons.pistol.timePlayed) %>
                        </td>
                    </tr>
                    <tr>
                        <td>Shots Fired</td>
                        <td>
                            <%= player.weapons.pistol.shotsFired.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Shots Hit</td>
                        <td>
                            <%= player.weapons.pistol.shotsHit.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Accuracy</td>
                        <td>
                            <%= ((100 * player.weapons.pistol.shotsHit / player.weapons.pistol.shotsFired) || 0).toFixed(2)
                                + "%" %>
                        </td>
                    </tr>
                    <tr>
                        <td>Damage Dealt</td>
                        <td>
                            <%= player.weapons.pistol.damageDealt.toLocaleString() %>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="col-xs-6 col-sm-3">
            <h2 class="text-center">Shotgun</h2>
            <table class="table table-condensed">
                <thead>
                    <tr>
                        <th colspan="2" class="green-border-2px text-center"></th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Times Selected</td>
                        <td>
                            <%= player.weapons.shotgun.selected.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Kills</td>
                        <td>
                            <%= player.weapons.shotgun.kills.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Time Played</td>
                        <td>
                            <%= formatTime(player.weapons.shotgun.timePlayed) %>
                        </td>
                    </tr>
                    <tr>
                        <td>Shots Fired</td>
                        <td>
                            <%= player.weapons.shotgun.shotsFired.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Shots Hit</td>
                        <td>
                            <%= player.weapons.shotgun.shotsHit.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Accuracy</td>
                        <td>
                            <%= ((100 * player.weapons.shotgun.shotsHit / player.weapons.shotgun.shotsFired) ||
                                0).toFixed(2) + "%" %>
                        </td>
                    </tr>
                    <tr>
                        <td>Damage Dealt</td>
                        <td>
                            <%= player.weapons.shotgun.damageDealt.toLocaleString() %>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="col-xs-6 col-sm-3">
            <h2 class="text-center">Assault</h2>
            <table class="table table-condensed">
                <thead>
                    <tr>
                        <th colspan="2" class="aqua-border-2px text-center"></th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Times Selected</td>
                        <td>
                            <%= player.weapons.assault.selected.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Kills</td>
                        <td>
                            <%= player.weapons.assault.kills.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Time Played</td>
                        <td>
                            <%= formatTime(player.weapons.assault.timePlayed) %>
                        </td>
                    </tr>
                    <tr>
                        <td>Shots Fired</td>
                        <td>
                            <%= player.weapons.assault.shotsFired.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Shots Hit</td>
                        <td>
                            <%= player.weapons.assault.shotsHit.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Accuracy</td>
                        <td>
                            <%= ((100 * player.weapons.assault.shotsHit / player.weapons.assault.shotsFired) ||
                                0).toFixed(2) + "%" %>
                        </td>
                    </tr>
                    <tr>
                        <td>Damage Dealt</td>
                        <td>
                            <%= player.weapons.assault.damageDealt.toLocaleString() %>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="col-xs-6 col-sm-3">
            <h2 class="text-center">Sniper</h2>
            <table class="table table-condensed">
                <thead>
                    <tr>
                        <th colspan="2" class="blue-border-2px text-center"></th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Times Selected</td>
                        <td>
                            <%= player.weapons.sniper.selected.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Kills</td>
                        <td>
                            <%= player.weapons.sniper.kills.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Time Played</td>
                        <td>
                            <%= formatTime(player.weapons.sniper.timePlayed) %>
                        </td>
                    </tr>
                    <tr>
                        <td>Shots Fired</td>
                        <td>
                            <%= player.weapons.sniper.shotsFired.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Shots Hit</td>
                        <td>
                            <%= player.weapons.sniper.shotsHit.toLocaleString() %>
                        </td>
                    </tr>
                    <tr>
                        <td>Accuracy</td>
                        <td>
                            <%= ((100 * player.weapons.sniper.shotsHit / player.weapons.sniper.shotsFired) || 0).toFixed(2)
                                + "%" %>
                        </td>
                    </tr>
                    <tr>
                        <td>Damage Dealt</td>
                        <td>
                            <%= player.weapons.sniper.damageDealt.toLocaleString() %>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="margin-bottom-50px"></div>
</div>
<script src="/js/user.js"></script>