<commit_before><!-- Be sure to use the path starting from the parent path.
     It seems it is mandatory that all custom elements sources the same
     polymer.html in terms of the path representation. -->
<link rel="import" href="../packages/polymer/polymer.html">
<link rel="import" href="../predicate/equipment_predicate.html">
<link rel="import" href="../predicate/ship_predicate.html">
<meta charset="utf-8">
<polymer-element name="kcaa-equipment-deployment-dialog">
  <template>
    <!-- TODO: Reduce the number of columns. -->
    <link rel="stylesheet" href="packages/bootjack/css/bootstrap.min.css">
    <link rel="stylesheet" href="../kcaa.css">
    <link rel="stylesheet" href="dialog.css">
    <div class="modal-header">
      <button class="close" on-click="{{close}}">&times;</button>
      <h3 class="modal-title">
        装備構成 -
        <template if="{{editingDeploymentName}}">
          <input type="text" value="{{newDeploymentName}}">
          <button on-click="{{renameDeployment}}" class="action">&#10004;</button>
          <button on-click="{{cancelRenaming}}" class="action">&#10008;</button>
        </template>
        <template if="{{!editingDeploymentName}}">
          <template if="{{generalDeployment != null}}">
            {{generalDeployment.name}}
          </template>
          <button on-click="{{editDeploymentName}}"
                  class="action">&#9998;</button>
        </template>
        </h3>
    </div>
    <div class="modal-body">
      <h4>構成予測</h4>
      <div>TODO</div>
      <h4>構成設定</h4>
      <template if="{{generalDeployment != null}}">
        <template repeat="{{deployment in generalDeployment.deployments |
                            enumerate}}">
          <fieldset>
            <legend>
              構成 {{deployment.index + 1}}
              <button class="action"
                      on-click="{{deleteDeployment}}"
                      data-deployment-index="{{deployment.index}}">
                &times;
              </button>
            </legend>
            <div>艦船フィルタ</div>
            <kcaa-ship-predicate predicate="{{deployment.value.shipPredicate}}"
                                 on-predicatechange="{{updateExpectation}}">
            </kcaa-ship-predicate>
            <div class="table">
              <div class="trow thead">
                <div>決定順</div>
                <div class="description">条件</div>
              </div>
              <template repeat="{{req in deployment.value.requirements |
                                  enumerate}}">
                <div class="trow">
                  <div class="numberColumn">
                    {{req.index + 1}}
                    <button class="action"
                            on-click="{{deleteRequirement}}"
                            data-deployment-index="{{deployment.index}}"
                            data-requirement-index="{{req.index}}">
                      &times;
                    </button>
                  </div>
                  <div class="description">
                    <kcaa-equipment-predicate
                        predicate="{{req.value.predicate}}">
                    </kcaa-equipment-predicate>
                  </div>
                </div>
              </template>
              <div class="trow">
                <div class="numberColumn">
                  {{deployment.value.requirements.length + 1}}
                </div>
                <div class="description">
                  <button class="action"
                          on-click="{{addNewRequirement}}"
                          data-deployment-index="{{deployment.index}}">
                    +
                  </button>
                </div>
              </div>
            </div>
          </fieldset>
        </template>
        <button class="action" on-click="{{addNewDeployment}}">+</button>
      </template>
      <div>
        <button on-click="{{update}}">更新</button>
      </div>
      <h4>装備構成操作</h4>
      <div>
        <button on-click="{{duplicate}}">複製</button>
      </div>
      <div>
        <input type="text" value="{{deploymentNameToDelete}}"
               id="deploymentNameToDelete">を本当に
        <button on-click="{{delete}}">削除</button>
      </div>
      <div class="errorMessage">{{errorMessage}}</div>
    </div>
    <div class="modal-footer">
      <button class="cancel" on-click="{{close}}">Cancel</button>
    </div>
  </template>
  <script type="application/dart" src="equipment_deployment_dialog.dart"></script>
</polymer-element><commit_msg>Adjust the size of buttons in the equipment organization dialog.<commit_after><!-- Be sure to use the path starting from the parent path.
     It seems it is mandatory that all custom elements sources the same
     polymer.html in terms of the path representation. -->
<link rel="import" href="../packages/polymer/polymer.html">
<link rel="import" href="../predicate/equipment_predicate.html">
<link rel="import" href="../predicate/ship_predicate.html">
<meta charset="utf-8">
<polymer-element name="kcaa-equipment-deployment-dialog">
  <template>
    <!-- TODO: Reduce the number of columns. -->
    <link rel="stylesheet" href="packages/bootjack/css/bootstrap.min.css">
    <link rel="stylesheet" href="../kcaa.css">
    <link rel="stylesheet" href="dialog.css">
    <div class="modal-header">
      <button class="close" on-click="{{close}}">&times;</button>
      <h3 class="modal-title">
        装備構成 -
        <template if="{{editingDeploymentName}}">
          <input type="text" value="{{newDeploymentName}}">
          <button on-click="{{renameDeployment}}" class="action">&#10004;</button>
          <button on-click="{{cancelRenaming}}" class="action">&#10008;</button>
        </template>
        <template if="{{!editingDeploymentName}}">
          <template if="{{generalDeployment != null}}">
            {{generalDeployment.name}}
          </template>
          <button on-click="{{editDeploymentName}}"
                  class="action">&#9998;</button>
        </template>
        </h3>
    </div>
    <div class="modal-body">
      <h4>構成予測</h4>
      <div>TODO</div>
      <h4>構成設定</h4>
      <template if="{{generalDeployment != null}}">
        <template repeat="{{deployment in generalDeployment.deployments |
                            enumerate}}">
          <fieldset>
            <legend>
              構成 {{deployment.index + 1}}
              <button class="action"
                      on-click="{{deleteDeployment}}"
                      data-deployment-index="{{deployment.index}}">
                &times;
              </button>
            </legend>
            <div>艦船フィルタ</div>
            <kcaa-ship-predicate predicate="{{deployment.value.shipPredicate}}"
                                 on-predicatechange="{{updateExpectation}}">
            </kcaa-ship-predicate>
            <div class="table">
              <div class="trow thead">
                <div>決定順</div>
                <div class="description">条件</div>
              </div>
              <template repeat="{{req in deployment.value.requirements |
                                  enumerate}}">
                <div class="trow">
                  <div class="numberColumn">
                    <div>
                      {{req.index + 1}}
                      <button class="action"
                              on-click="{{deleteRequirement}}"
                              data-deployment-index="{{deployment.index}}"
                              data-requirement-index="{{req.index}}">
                        &times;
                      </button>
                    </div>
                  </div>
                  <div class="description">
                    <kcaa-equipment-predicate
                        predicate="{{req.value.predicate}}">
                    </kcaa-equipment-predicate>
                  </div>
                </div>
              </template>
              <div class="trow">
                <div class="numberColumn">
                  {{deployment.value.requirements.length + 1}}
                </div>
                <div class="description">
                  <div>
                    <button class="action"
                            on-click="{{addNewRequirement}}"
                            data-deployment-index="{{deployment.index}}">
                      +
                    </button>
                  </div>
                </div>
              </div>
            </div>
          </fieldset>
        </template>
        <button class="action" on-click="{{addNewDeployment}}">+</button>
      </template>
      <div>
        <button on-click="{{update}}">更新</button>
      </div>
      <h4>装備構成操作</h4>
      <div>
        <button on-click="{{duplicate}}">複製</button>
      </div>
      <div>
        <input type="text" value="{{deploymentNameToDelete}}"
               id="deploymentNameToDelete">を本当に
        <button on-click="{{delete}}">削除</button>
      </div>
      <div class="errorMessage">{{errorMessage}}</div>
    </div>
    <div class="modal-footer">
      <button class="cancel" on-click="{{close}}">Cancel</button>
    </div>
  </template>
  <script type="application/dart" src="equipment_deployment_dialog.dart"></script>
</polymer-element>
{'fraction_non_alphanumeric': 0.15801963110775535, 'fraction_numerical': 0.005608887930104628, 'mean_word_length': 1.68054350968488, 'pattern_counts': {'":': 0, '<': 221, '<?xml version=': 0, '>': 221, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6074415', 'n_tokens_mistral': 2583, 'n_tokens_neox': 2494, 'n_words': 438}