<commit_before><ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:compass="http://dfki.asr.de/compass/components">
<!--
 This file is part of COMPASS. It is subject to the license terms in
 the LICENSE file found in the top-level directory of this distribution.
 (Also avialable at http://www.apache.org/licenses/LICENSE-2.0.txt)
 You may not use this file except in compliance with the License.
-->
	<p:droppable onDrop="COMPASS.EventHandler.onObjectDroppedOntoPrefabsPanel.bind(COMPASS.EventHandler)" tolerance="pointer"/>

	<p:dialog appendTo="@(body)" closable="false" closeOnEscape="false"
			  header="Select asset"
			  resizable="false"
			  widgetVar="atlasAssetImportDialog"
			  style="max-width:480px; max-height: 780px;"
			  position="center top"
			  onShow="COMPASS.Importer.resetAtlasURLInputField();">
	<h:form id="assetImportForm">
		<div class="form-group">
			<label for="atlas-url-input">ATLAS URL</label>
			<input type="url" class="form-control" id="atlas-url-input" placeholder="/atlas/" value="/atlas/"
				   onfocus="COMPASS.EventHandler.disableCameraControlsOnFocus(event)"
				   onblur="COMPASS.EventHandler.enableCameraControlsOnBlur(event)">
			</input>
			<div class="verticalSpacerDiv10Pixels" />
			<label for="importAssetHierachyBooleanButton">Import complete Asset Hierarchy:</label>
			<p:selectBooleanButton id="importAssetHierachyBooleanButton" style="margin-left: 20px;"
								   value="#{prefabBean.importCompleteAssetHierarchy}"
								   onLabel="Yes" offLabel="No"
								   onIcon="ui-icon-check" offIcon="ui-icon-close">
				<p:ajax />
			</p:selectBooleanButton>
		</div>
		<p>Available Assets</p>
		<div style="overflow-y: scroll; overflow-x: hidden; max-height: 411px;">
			<ul class="list-group clickable-list-container" id="asset-list">
				<!-- Filled automatically -->
			</ul>
		</div>
		<p:separator style="cursor: default; border: none; border-top: 1px solid #eee;"/>
		<div>
			<label for="prefabImportNewAssetButton">Add a new Asset to ATLAS</label>
			<p:commandButton id="prefabImportNewAssetButton"
					onclick="atlasAssetImportDialog.hide(); COMPASS.Importer.showNewAssetDialog.bind(COMPASS.Importer)();"
					style="margin-left: 16px"
					update=""
					value="New Asset">
			</p:commandButton>
		</div>
		<!-- between the dialog and the footer a seperator gets rendered anyway -->
		<div class="ui-dialog-footer ui-widget-content" style="margin-top:20px; margin-bottom:-15px;">
			<span>
				<div style="text-align:right; margin-top: 5px;">
					<p:commandButton onclick="COMPASS.Importer.importAssetAsPrefab.bind(COMPASS.Importer)()"
							 id="asset-import-button"
							value="Import"
							update=""
							styleClass="float-right ui-priority-primary">
					</p:commandButton>
					<p:commandButton onclick="atlasAssetImportDialog.hide();" value="Cancel" update=""/>
				</div>
			</span>
		</div>
	</h:form>
	</p:dialog>

	<p:dialog appendTo="@(body)" closable="false" closeOnEscape="false"
			  header="Upload new asset"
			  resizable="false"
			  widgetVar="atlasNewAssetDialog"
			  style="max-width:480px; max-height: 780px;"
			  position="center top">
		<h:form id="assetUploadForm">
		<label for="atlas-new-asset-url-input">ATLAS URL</label>
		<input type="url" class="form-control" id="atlas-new-asset-url-input" placeholder="/atlas/" value="/atlas/"
			   onfocus="COMPASS.EventHandler.disableCameraControlsOnFocus(event)"
			   onblur="COMPASS.EventHandler.enableCameraControlsOnBlur(event)"></input>
		<div class="verticalSpacerDiv10Pixels" />
		<div style="text-align: center; margin-bottom: 20px;">
			Note: Only .zip files in Collada format are currently supported. <br/>
			See the ATLAS help page for more information.
		</div>
		<p:separator/>
		<div>
			<label for="atlas-new-asset-name">Asset name</label><br/>
			<input id="atlas-new-asset-name" class="form-control"
				   onfocus="COMPASS.EventHandler.disableCameraControlsOnFocus(event)"
				   onblur="COMPASS.EventHandler.enableCameraControlsOnBlur(event)"></input>
			<span id="atlas-new-asset-name-fail" class="hidden fail-warning">Invalid name</span>
		</div>
		<div style="margin-top: 10px;">
			<input id="atlas-new-asset-file-upload-form" type="file" accept="application/zip" style="display:inline;"></input>
		</div>
		<div id="atlas-new-asset-file-fail" class="hidden fail-warning">
			Invalid file type. Only .zip files are allowed.
		</div>
		<div id="atlas-new-asset-upload-fail" class="hidden fail-warning">

		</div>
		<div class="verticalSpacerDiv10Pixels" />
		<div class="ui-dialog-footer ui-widget-content" style="margin-top:20px; margin-bottom:-15px;">
			<span>
				<div style="text-align:right; margin-top: 5px;">
					<p:commandButton id="atlas-new-asset-upload-button"
							onclick="COMPASS.Importer.onUploadClicked.bind(COMPASS.Importer)();"
							icon="ui-icon-arrowthickstop-1-n"
							update=""
							value="Upload"
							styleClass="float-right">
					</p:commandButton>
					<p:commandButton onclick="atlasNewAssetDialog.hide();" value="Cancel" update=""/>
				</div>
			</span>
		</div>
		</h:form>
	</p:dialog>

	<h:form id="prefabSelectionGridForm">
		<p:remoteCommand name="remoteReplacePrefabWithSceneNode" action="#{prefabBean.replacePrefabWithSceneNode}"
						 update="prefabSelectionGrid" >
		</p:remoteCommand>
		<p:remoteCommand name="remoteImportAssetAsPrefab" action="#{prefabBean.importAssetAsPrefab}"
						 update=":prefabSelectionGridForm:prefabSelectionGrid">
		</p:remoteCommand>
		<p:contextMenu for="prefabSelectionGridForm"
					   style="width: 8em; min-width: 8em;">
			<p:menuitem value="Delete"
						update=":deletePrefabConfirmDialogView"
						oncomplete="deletePrefabConfirmDialog.show();"
						icon="ui-icon-trash" />
		</p:contextMenu>

		<p:outputPanel id="prefab-buttons" styleClass="prefabs-button-panel">
			<p:commandButton icon="ui-icon-arrowthickstop-1-s"
							 title="Import"
							 styleClass="compass-button"
							 update=":prefabSelectionGridForm:prefabSelectionGrid"
							 onclick="COMPASS.Importer.startPrefabImport();"/>
		</p:outputPanel>

		<!-- templates -->
		<script id="prefab-asset-list-entry-template" type="text/x-handlebars-template">
			<li class="list-group-item truncate-text" 
				onclick="COMPASS.Importer.selectAssetToImport.bind(COMPASS.Importer)('{{assetname}}')"
				id="list-item-{{assetname}}"><commit_msg>Add plugin slot "prefabButtons" for buttons inside the prefab_view<commit_after><ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:compass="http://dfki.asr.de/compass/components">
<!--
 This file is part of COMPASS. It is subject to the license terms in
 the LICENSE file found in the top-level directory of this distribution.
 (Also avialable at http://www.apache.org/licenses/LICENSE-2.0.txt)
 You may not use this file except in compliance with the License.
-->
	<p:droppable onDrop="COMPASS.EventHandler.onObjectDroppedOntoPrefabsPanel.bind(COMPASS.EventHandler)" tolerance="pointer"/>

	<p:dialog appendTo="@(body)" closable="false" closeOnEscape="false"
			  header="Select asset"
			  resizable="false"
			  widgetVar="atlasAssetImportDialog"
			  style="max-width:480px; max-height: 780px;"
			  position="center top"
			  onShow="COMPASS.Importer.resetAtlasURLInputField();">
	<h:form id="assetImportForm">
		<div class="form-group">
			<label for="atlas-url-input">ATLAS URL</label>
			<input type="url" class="form-control" id="atlas-url-input" placeholder="/atlas/" value="/atlas/"
				   onfocus="COMPASS.EventHandler.disableCameraControlsOnFocus(event)"
				   onblur="COMPASS.EventHandler.enableCameraControlsOnBlur(event)">
			</input>
			<div class="verticalSpacerDiv10Pixels" />
			<label for="importAssetHierachyBooleanButton">Import complete Asset Hierarchy:</label>
			<p:selectBooleanButton id="importAssetHierachyBooleanButton" style="margin-left: 20px;"
								   value="#{prefabBean.importCompleteAssetHierarchy}"
								   onLabel="Yes" offLabel="No"
								   onIcon="ui-icon-check" offIcon="ui-icon-close">
				<p:ajax />
			</p:selectBooleanButton>
		</div>
		<p>Available Assets</p>
		<div style="overflow-y: scroll; overflow-x: hidden; max-height: 411px;">
			<ul class="list-group clickable-list-container" id="asset-list">
				<!-- Filled automatically -->
			</ul>
		</div>
		<p:separator style="cursor: default; border: none; border-top: 1px solid #eee;"/>
		<div>
			<label for="prefabImportNewAssetButton">Add a new Asset to ATLAS</label>
			<p:commandButton id="prefabImportNewAssetButton"
					onclick="atlasAssetImportDialog.hide(); COMPASS.Importer.showNewAssetDialog.bind(COMPASS.Importer)();"
					style="margin-left: 16px"
					update=""
					value="New Asset">
			</p:commandButton>
		</div>
		<!-- between the dialog and the footer a seperator gets rendered anyway -->
		<div class="ui-dialog-footer ui-widget-content" style="margin-top:20px; margin-bottom:-15px;">
			<span>
				<div style="text-align:right; margin-top: 5px;">
					<p:commandButton onclick="COMPASS.Importer.importAssetAsPrefab.bind(COMPASS.Importer)()"
							 id="asset-import-button"
							value="Import"
							update=""
							styleClass="float-right ui-priority-primary">
					</p:commandButton>
					<p:commandButton onclick="atlasAssetImportDialog.hide();" value="Cancel" update=""/>
				</div>
			</span>
		</div>
	</h:form>
	</p:dialog>

	<p:dialog appendTo="@(body)" closable="false" closeOnEscape="false"
			  header="Upload new asset"
			  resizable="false"
			  widgetVar="atlasNewAssetDialog"
			  style="max-width:480px; max-height: 780px;"
			  position="center top">
		<h:form id="assetUploadForm">
		<label for="atlas-new-asset-url-input">ATLAS URL</label>
		<input type="url" class="form-control" id="atlas-new-asset-url-input" placeholder="/atlas/" value="/atlas/"
			   onfocus="COMPASS.EventHandler.disableCameraControlsOnFocus(event)"
			   onblur="COMPASS.EventHandler.enableCameraControlsOnBlur(event)"></input>
		<div class="verticalSpacerDiv10Pixels" />
		<div style="text-align: center; margin-bottom: 20px;">
			Note: Only .zip files in Collada format are currently supported. <br/>
			See the ATLAS help page for more information.
		</div>
		<p:separator/>
		<div>
			<label for="atlas-new-asset-name">Asset name</label><br/>
			<input id="atlas-new-asset-name" class="form-control"
				   onfocus="COMPASS.EventHandler.disableCameraControlsOnFocus(event)"
				   onblur="COMPASS.EventHandler.enableCameraControlsOnBlur(event)"></input>
			<span id="atlas-new-asset-name-fail" class="hidden fail-warning">Invalid name</span>
		</div>
		<div style="margin-top: 10px;">
			<input id="atlas-new-asset-file-upload-form" type="file" accept="application/zip" style="display:inline;"></input>
		</div>
		<div id="atlas-new-asset-file-fail" class="hidden fail-warning">
			Invalid file type. Only .zip files are allowed.
		</div>
		<div id="atlas-new-asset-upload-fail" class="hidden fail-warning">

		</div>
		<div class="verticalSpacerDiv10Pixels" />
		<div class="ui-dialog-footer ui-widget-content" style="margin-top:20px; margin-bottom:-15px;">
			<span>
				<div style="text-align:right; margin-top: 5px;">
					<p:commandButton id="atlas-new-asset-upload-button"
							onclick="COMPASS.Importer.onUploadClicked.bind(COMPASS.Importer)();"
							icon="ui-icon-arrowthickstop-1-n"
							update=""
							value="Upload"
							styleClass="float-right">
					</p:commandButton>
					<p:commandButton onclick="atlasNewAssetDialog.hide();" value="Cancel" update=""/>
				</div>
			</span>
		</div>
		</h:form>
	</p:dialog>

	<h:form id="prefabSelectionGridForm">
		<p:remoteCommand name="remoteReplacePrefabWithSceneNode" action="#{prefabBean.replacePrefabWithSceneNode}"
						 update="prefabSelectionGrid" >
		</p:remoteCommand>
		<p:remoteCommand name="remoteImportAssetAsPrefab" action="#{prefabBean.importAssetAsPrefab}"
						 update=":prefabSelectionGridForm:prefabSelectionGrid">
		</p:remoteCommand>
		<p:contextMenu for="prefabSelectionGridForm"
					   style="width: 8em; min-width: 8em;">
			<p:menuitem value="Delete"
						update=":deletePrefabConfirmDialogView"
						oncomplete="deletePrefabConfirmDialog.show();"
						icon="ui-icon-trash" />
		</p:contextMenu>

		<p:outputPanel id="prefab-buttons" styleClass="prefabs-button-panel">
			<p:commandButton icon="ui-icon-arrowthickstop-1-s"
							 title="Import"
							 styleClass="compass-button"
							 update=":prefabSelectionGridForm:prefabSelectionGrid"
							 onclick="COMPASS.Importer.startPrefabImport();"/>
			<compass:plugin slot="prefabButtons" />
		</p:outputPanel>

		<!-- templates -->
		<script id="prefab-asset-list-entry-template" type="text/x-handlebars-template">
			<li class="list-group-item truncate-text" 
				onclick="COMPASS.Importer.selectAssetToImport.bind(COMPASS.Importer)('{{assetname}}')"
				id="list-item-{{assetname}}">
{'fraction_non_alphanumeric': 0.16076807228915663, 'fraction_numerical': 0.007680722891566265, 'mean_word_length': 4.346618357487923, 'pattern_counts': {'":': 6, '<': 198, '<?xml version=': 0, '>': 198, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 12}, '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': '4623308', 'n_tokens_mistral': 5128, 'n_tokens_neox': 4259, 'n_words': 713}