<commit_before><label class="text-bigger"> 1. Choose existing OSF project </label>
<div class="m-b-md">
    {{#power-select options=userNodes searchField='title' selected=selectedNode onchange=(action "nodeSelected") as |node|}}
        <strong>{{node.title}}</strong>
    {{/power-select}}
</div>
{{#liquid-if selectedNode use='crossFade'}}
    {{#if isAdmin}}
        <label> 2. </label>

        {{#if fileSelect}}
            <div class="row">
                <div class="row text-center text-bigger">
                    <div class="radio-option col-xs-6 col-sm-5 col-sm-offset-1 col-md-4 col-md-offset-2 p-md">
                        <label><input onchange={{action 'changeExistingState' _existingState.NEWFILE}} type="radio" checked={{eq existingState _existingState.NEWFILE}}> Upload preprint to this OSF project </label>
                    </div>
                    <div class="radio-option col-xs-6 col-sm-5 col-md-4 p-md">
                        <label><input onchange={{action 'changeExistingState' _existingState.EXISTINGFILE}} type="radio" checked={{eq existingState _existingState.EXISTINGFILE}}> Identify existing file as the preprint</label>
                    </div>
                </div>
            </div>
        {{/if}}
        {{#if (eq existingState _existingState.EXISTINGFILE)}}
            <div>
                {{#if osfProviderLoaded}}
                    {{file-browser rootItem=osfStorageProvider openFile=(action 'selectFile')}}

                    {{#liquid-if (and selectedNode (or hasFile selectedFile)) use='crossFade'}}
                        <div class="m-t-lg">
                            {{convert-or-copy-project nodeTitle=nodeTitle node=node titleValid=titleValid convertOrCopy=convertOrCopy}}
                        </div>
                    {{/liquid-if}}

                    {{#liquid-if (and selectedFile (and convertOrCopy)) use='crossFade'}}
                        <label> 4. Add or edit preprint title</label>
                        {{preprint-title-editor nodeTitle=nodeTitle titleValid=titleValid}}
                    {{/liquid-if}}

                    <div class="p-t-xs pull-right">
                        <button class="btn btn-default" {{action changeState startState}}>Back</button>
                        <button class="btn btn-primary" disabled={{not (and selectedFile titleValid)}} {{action (if (eq convertOrCopy 'convert') existingNodeExistingFile createComponentCopyFile) name}}>Next</button>
                    </div>
                {{/if}}
            </div>
            {{#if selectedFile}}
                <span id='selectedFileExisting'> Selected file: {{selectedFile.name}} </span>
            {{/if}}
        {{else if (eq existingState _existingState.NEWFILE)}}
            {{file-uploader
                changeState=changeState
                startState=startState
                selectFile=selectFile
                finishUpload=finishUpload
                contributors=contributors
                currentUser=currentUser
                hasFile=hasFile
                file=file
                node=node
                osfFile=osfFile
                selectedNode=selectedNode
                nodeTitle=nodeTitle
                userNodes=userNodes
                osfFile=selectedFile
                _names=_names
                projectsCreatedForPreprint=projectsCreatedForPreprint
                filesUploadedForPreprint=filesUploadedForPreprint
            }}
        {{/if}}
    {{else}}
        <p class="alert alert-danger" role="alert">
            You must be the admin of this component to share it.

            Please ask the admin of this project to make you an admin
            so you may share this component.
        </p>
    {{/if}}<commit_msg>Move selected file below file-browser.<commit_after><label class="text-bigger"> 1. Choose existing OSF project </label>
<div class="m-b-md">
    {{#power-select options=userNodes searchField='title' selected=selectedNode onchange=(action "nodeSelected") as |node|}}
        <strong>{{node.title}}</strong>
    {{/power-select}}
</div>
{{#liquid-if selectedNode use='crossFade'}}
    {{#if isAdmin}}
        <label> 2. </label>

        {{#if fileSelect}}
            <div class="row">
                <div class="row text-center text-bigger">
                    <div class="radio-option col-xs-6 col-sm-5 col-sm-offset-1 col-md-4 col-md-offset-2 p-md">
                        <label><input onchange={{action 'changeExistingState' _existingState.NEWFILE}} type="radio" checked={{eq existingState _existingState.NEWFILE}}> Upload preprint to this OSF project </label>
                    </div>
                    <div class="radio-option col-xs-6 col-sm-5 col-md-4 p-md">
                        <label><input onchange={{action 'changeExistingState' _existingState.EXISTINGFILE}} type="radio" checked={{eq existingState _existingState.EXISTINGFILE}}> Identify existing file as the preprint</label>
                    </div>
                </div>
            </div>
        {{/if}}
        {{#if (eq existingState _existingState.EXISTINGFILE)}}
            <div>
                {{#if osfProviderLoaded}}
                    {{file-browser rootItem=osfStorageProvider openFile=(action 'selectFile')}}
                    {{#if selectedFile}}
                        <span id='selectedFileExisting'> Selected file: {{selectedFile.name}} </span>
                    {{/if}}

                    {{#liquid-if (and selectedNode (or hasFile selectedFile)) use='crossFade'}}
                        <div class="m-t-lg">
                            {{convert-or-copy-project nodeTitle=nodeTitle node=node titleValid=titleValid convertOrCopy=convertOrCopy}}
                        </div>
                    {{/liquid-if}}

                    {{#liquid-if (and selectedFile (and convertOrCopy)) use='crossFade'}}
                        <label> 4. Add or edit preprint title</label>
                        {{preprint-title-editor nodeTitle=nodeTitle titleValid=titleValid}}
                    {{/liquid-if}}

                    <div class="p-t-xs pull-right">
                        <button class="btn btn-default" {{action changeState startState}}>Back</button>
                        <button class="btn btn-primary" disabled={{not (and selectedFile titleValid)}} {{action (if (eq convertOrCopy 'convert') existingNodeExistingFile createComponentCopyFile) name}}>Next</button>
                    </div>
                {{/if}}
            </div>
        {{else if (eq existingState _existingState.NEWFILE)}}
            {{file-uploader
                changeState=changeState
                startState=startState
                selectFile=selectFile
                finishUpload=finishUpload
                contributors=contributors
                currentUser=currentUser
                hasFile=hasFile
                file=file
                node=node
                osfFile=osfFile
                selectedNode=selectedNode
                nodeTitle=nodeTitle
                userNodes=userNodes
                osfFile=selectedFile
                _names=_names
                projectsCreatedForPreprint=projectsCreatedForPreprint
                filesUploadedForPreprint=filesUploadedForPreprint
            }}
        {{/if}}
    {{else}}
        <p class="alert alert-danger" role="alert">
            You must be the admin of this component to share it.

            Please ask the admin of this project to make you an admin
            so you may share this component.
        </p>
    {{/if}}
{'fraction_non_alphanumeric': 0.1134714342261512, 'fraction_numerical': 0.002902757619738752, 'mean_word_length': 1.80844757317525, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, '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': '7657062', 'n_tokens_mistral': 2009, 'n_tokens_neox': 1892, 'n_words': 453}