<commit_before>/**
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { PolymerElement } from '@polymer/polymer/polymer-element.js';

import '@polymer/polymer/lib/elements/dom-if.js';
import '@polymer/polymer/lib/elements/dom-repeat.js';
import './boardgame-player-roster.js';
import './shared-styles.js';
import './boardgame-render-game.js';
import './boardgame-admin-controls.js';
import './boardgame-game-state-manager.js';
import { html } from '@polymer/polymer/lib/utils/html-tag.js';

class BoardgameGameView extends PolymerElement {
  static get template() {
    return html`
    <style include="shared-styles iron-flex">
      :host {
        display: block;
        --animation-length: 0.5s;
      }

      [hidden] {
        display:none !important;
      }

      #moves > details {
        margin-left:1em;
      }

      .admin > div:first-child {
        margin-left: 0;
      }

      .admin > div {
        margin-left:1em;
      }

      .card {
        position:relative;
      }
    </style>

    <div class="card">
      <boardgame-player-roster id="player" logged-in="[[loggedIn]]" game-route="[[gameRoute]]" viewing-as-player="[[viewingAsPlayer]]" has-empty-slots="[[hasEmptySlots]]" game-open="[[gameOpen]]" game-visible="[[gameVisible]]" current-player-index="[[game.CurrentPlayerIndex]]" players-info="[[playersInfo]]" state="[[currentState]]" finished="[[game.Finished]]" winners="[[game.Winners]]" admin="[[admin]]" is-owner="[[isOwner]]" active="[[selected]]"></boardgame-player-roster>
    </div>
    <div class="card">
      <boardgame-render-game id="render" state="[[currentState]]" diagram="[[game.Diagram]]" renderer="[[activeRenderer]]" game-name="[[gameRoute.name]]" viewing-as-player="[[viewingAsPlayer]]" current-player-index="[[game.CurrentPlayerIndex]]" socket-active="[[socketActive]]" active="[[selected]]" chest="[[chest]]"></boardgame-render-game>
    </div>
    <boardgame-admin-controls id="admin" active="{{admin}}" game="[[game]]" viewing-as-player="[[viewingAsPlayer]]" move-forms="[[moveForms]]" game-route="[[gameRoute]]" chest="[[chest]]" game-state="[[gameState]]" requested-player="{{requestedPlayer}}" auto-current-player="{{autoCurrentPlayer}}"></boardgame-admin-controls>
    <boardgame-game-state-manager id="manager" active-renderer="[[activeRenderer]]" game-route="[[gameRoute]]" requested-player="[[requestedPlayer]]" active="[[selected]]" admin="[[admin]]" game-finished="[[game.Finished]]" game-version="[[game.Version]]" logged-in="[[loggedIn]]" auto-current-player="[[autoCurrentPlayer]]" viewing-as-player="[[viewingAsPlayer]]" socket-active="{{socketActive}}"></boardgame-game-state-manager>
`;
  }

  static get is() {
    return "boardgame-game-view"
  }

  static get properties() {
    return {<commit_msg>Fixed a bug introdueced in abac22bff101c4c16c8c2e99bbc5c53f29c18002 where activeRenderer wasn't two-way bound, do games with strings of animations wouldn't animate. Part of #614.<commit_after>/**
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
import { PolymerElement } from '@polymer/polymer/polymer-element.js';

import '@polymer/polymer/lib/elements/dom-if.js';
import '@polymer/polymer/lib/elements/dom-repeat.js';
import './boardgame-player-roster.js';
import './shared-styles.js';
import './boardgame-render-game.js';
import './boardgame-admin-controls.js';
import './boardgame-game-state-manager.js';
import { html } from '@polymer/polymer/lib/utils/html-tag.js';

class BoardgameGameView extends PolymerElement {
  static get template() {
    return html`
    <style include="shared-styles iron-flex">
      :host {
        display: block;
        --animation-length: 0.5s;
      }

      [hidden] {
        display:none !important;
      }

      #moves > details {
        margin-left:1em;
      }

      .admin > div:first-child {
        margin-left: 0;
      }

      .admin > div {
        margin-left:1em;
      }

      .card {
        position:relative;
      }
    </style>

    <div class="card">
      <boardgame-player-roster id="player" logged-in="[[loggedIn]]" game-route="[[gameRoute]]" viewing-as-player="[[viewingAsPlayer]]" has-empty-slots="[[hasEmptySlots]]" game-open="[[gameOpen]]" game-visible="[[gameVisible]]" current-player-index="[[game.CurrentPlayerIndex]]" players-info="[[playersInfo]]" state="[[currentState]]" finished="[[game.Finished]]" winners="[[game.Winners]]" admin="[[admin]]" is-owner="[[isOwner]]" active="[[selected]]"></boardgame-player-roster>
    </div>
    <div class="card">
      <boardgame-render-game id="render" state="[[currentState]]" diagram="[[game.Diagram]]" renderer="{{activeRenderer}}" game-name="[[gameRoute.name]]" viewing-as-player="[[viewingAsPlayer]]" current-player-index="[[game.CurrentPlayerIndex]]" socket-active="[[socketActive]]" active="[[selected]]" chest="[[chest]]"></boardgame-render-game>
    </div>
    <boardgame-admin-controls id="admin" active="{{admin}}" game="[[game]]" viewing-as-player="[[viewingAsPlayer]]" move-forms="[[moveForms]]" game-route="[[gameRoute]]" chest="[[chest]]" game-state="[[gameState]]" requested-player="{{requestedPlayer}}" auto-current-player="{{autoCurrentPlayer}}"></boardgame-admin-controls>
    <boardgame-game-state-manager id="manager" active-renderer="[[activeRenderer]]" game-route="[[gameRoute]]" requested-player="[[requestedPlayer]]" active="[[selected]]" admin="[[admin]]" game-finished="[[game.Finished]]" game-version="[[game.Version]]" logged-in="[[loggedIn]]" auto-current-player="[[autoCurrentPlayer]]" viewing-as-player="[[viewingAsPlayer]]" socket-active="{{socketActive}}"></boardgame-game-state-manager>
`;
  }

  static get is() {
    return "boardgame-game-view"
  }

  static get properties() {
    return {
{'fraction_non_alphanumeric': 0.18495109104589919, 'fraction_numerical': 0.006471030850263356, 'mean_word_length': 4.608438818565401, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 37, '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': '2007893', 'n_tokens_mistral': 2095, 'n_tokens_neox': 2012, 'n_words': 399}