<commit_before>async function(args) {
/*
created_timestamp(-1)
base_component_id("app_editor_3")
is_app(true)
control_type("SYSTEM")
display_name("Editor App V3")
description("This will return the editor app V3")
logo_url("https://2.bp.blogspot.com/-6Hdixw3dFxk/WfSQOnB9lDI/AAAAAAAAFFc/84DRGgcwOpYBOgknkHQ-qmgxvFv1D-iHACLcBGAs/s1600/BracketsDarks.PNG")
load_once_from_file(true)
*/
    //
    // Hack city!!! Turn off the component cache so that we can enable hot reloading of components
    //
    isStaticHtmlPageApp = false
    //
    //
    //


    await loadV2("appEmbed")

    Vue.component("app_editor_3",
    {
      props: ['app_id'],
      template:
`<div style="width:100%;padding:0; margin:0; border: 3px solid lightgray;">
    <div style='box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);background-image: linear-gradient(to right,  #000099, lightblue); color: white;padding: 7px; padding-left: 15px;'>
        <img
            src='/driver_icons/project.png'
            style='width: 20px; margin-right: 10px;'
            class='img-fluid'>
       </img>
        <h5  class='caption' style='display: inline-block;' v-on:click='if (!read_only) {edit_name=true;show_name=false;}' v-if='show_name'>
            {{app_component_name?"" + app_component_name.substring(0,30):""}}{{(app_component_name && ((app_component_name.length > 50))?"...":"")}} - AppShare (Design Mode)
        </h5>

        <input  class='caption' style='display: inline-block;' v-if='edit_name' v-model='new_name'></input>

        <button type=button class='btn btn-primary' style='margin-left: 10px' v-if='edit_name' v-on:click='(async function(){await rename(new_name)})()'>
            Save new name
        </button>

        <span style='float: right; margin-right: 2%;' >
            <div class='btn-group' role=group >
                <button  v-if='(mode != "profiler")' type=button class=' btn btn-secondary btn-sm'   v-on:click='copyAppMethod(base_component_id,null)' >Copy app</button>
                <button  v-if='(mode != "profiler")' type=button class=' btn btn-info btn-sm'        v-on:click='embedApp(base_component_id)' >Embed app</button>
                <button  v-if='(editor_component != "editor_component") && (!read_only) && (mode != "profiler")' type=button class=' btn btn-secondary btn-sm'   v-on:click='editAsText()' >Edit as text</button>
                <button  v-if='(!read_only) && (visibility == "PUBLIC") && (mode != "profiler")' type=button class=' btn btn-success btn-sm'   v-on:click='setVisibility("PRIVATE")' >Public: Switch to private</button>
                <button  v-if='(!read_only) && (visibility == "PRIVATE") && (mode != "profiler")' type=button class=' btn btn-secondary btn-sm'   v-on:click='setVisibility("PUBLIC")' >Private: Switch to public</button>
            </div>


            <div class='btn-group' style='' role=group >
                <button  type=button
                         v-bind:class='"btn btn-sm " + ((mode == "edit" && sub_mode == "app")?"btn-secondary":"btn-light")'
                         v-on:click='chooseApp()'  >App</button>

                <button  type=button
                         v-bind:class='"btn btn-sm " + ((mode == "edit" && sub_mode == "code")?"btn-secondary":"btn-light")'
                         v-on:click='chooseCode()' >Code</button>

                <button  type=button
                         v-bind:class='"btn btn-sm " + ((mode == "edit" && sub_mode == "both")?"btn-secondary":"btn-light")'
                         v-on:click='chooseBoth()' >Both</button>

                <button  type=button
                         v-bind:class='"btn btn-sm " + (mode == "profiler"?"btn-secondary":"btn-light")'
                         v-on:click='chooseProfiler()' >Profiler</button>
                         <button  type=button class=' btn btn-danger btn-sm'   v-on:click='closeApp()' >Close</button>
            </div>

        </span>
    </div>


    <div v-if='mode == "embed"'>
        <appEmbed v-bind:base_component_id_arg='base_component_id'></appEmbed>
    </div>

    <div v-if='mode == "edit"'>
        <div id=editor_id v-bind:style="'height: 100%; width: ' + code_width + '; left: 0px; display: ' + (code_shown?'inline-block':'none') + ';'">

        <component  v-bind:is="editor_component" v-if="editor_loaded" ref="editor_component_ref">
<commit_msg>Moved the Close Editor button to it's own button group<commit_after>async function(args) {
/*
created_timestamp(-1)
base_component_id("app_editor_3")
is_app(true)
control_type("SYSTEM")
display_name("Editor App V3")
description("This will return the editor app V3")
logo_url("https://2.bp.blogspot.com/-6Hdixw3dFxk/WfSQOnB9lDI/AAAAAAAAFFc/84DRGgcwOpYBOgknkHQ-qmgxvFv1D-iHACLcBGAs/s1600/BracketsDarks.PNG")
load_once_from_file(true)
*/
    //
    // Hack city!!! Turn off the component cache so that we can enable hot reloading of components
    //
    isStaticHtmlPageApp = false
    //
    //
    //


    await loadV2("appEmbed")

    Vue.component("app_editor_3",
    {
      props: ['app_id'],
      template:
`<div style="width:100%;padding:0; margin:0; border: 3px solid lightgray;">
    <div style='box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);background-image: linear-gradient(to right,  #000099, lightblue); color: white;padding: 7px; padding-left: 15px;'>
        <img
            src='/driver_icons/project.png'
            style='width: 20px; margin-right: 10px;'
            class='img-fluid'>
       </img>
        <h5  class='caption' style='display: inline-block;' v-on:click='if (!read_only) {edit_name=true;show_name=false;}' v-if='show_name'>
            {{app_component_name?"" + app_component_name.substring(0,30):""}}{{(app_component_name && ((app_component_name.length > 50))?"...":"")}} - AppShare (Design Mode)
        </h5>

        <input  class='caption' style='display: inline-block;' v-if='edit_name' v-model='new_name'></input>

        <button type=button class='btn btn-primary' style='margin-left: 10px' v-if='edit_name' v-on:click='(async function(){await rename(new_name)})()'>
            Save new name
        </button>

        <span style='float: right; margin-right: 2%;' >
            <div class='btn-group' role=group >
                <button  v-if='(mode != "profiler")' type=button class=' btn btn-secondary btn-sm'   v-on:click='copyAppMethod(base_component_id,null)' >Copy app</button>
                <button  v-if='(mode != "profiler")' type=button class=' btn btn-info btn-sm'        v-on:click='embedApp(base_component_id)' >Embed app</button>
                <button  v-if='(editor_component != "editor_component") && (!read_only) && (mode != "profiler")' type=button class=' btn btn-secondary btn-sm'   v-on:click='editAsText()' >Edit as text</button>
                <button  v-if='(!read_only) && (visibility == "PUBLIC") && (mode != "profiler")' type=button class=' btn btn-success btn-sm'   v-on:click='setVisibility("PRIVATE")' >Public: Switch to private</button>
                <button  v-if='(!read_only) && (visibility == "PRIVATE") && (mode != "profiler")' type=button class=' btn btn-secondary btn-sm'   v-on:click='setVisibility("PUBLIC")' >Private: Switch to public</button>
            </div>


            <div class='btn-group' style='' role=group >
                <button  type=button
                         v-bind:class='"btn btn-sm " + ((mode == "edit" && sub_mode == "app")?"btn-secondary":"btn-light")'
                         v-on:click='chooseApp()'  >App</button>

                <button  type=button
                         v-bind:class='"btn btn-sm " + ((mode == "edit" && sub_mode == "code")?"btn-secondary":"btn-light")'
                         v-on:click='chooseCode()' >Code</button>

                <button  type=button
                         v-bind:class='"btn btn-sm " + ((mode == "edit" && sub_mode == "both")?"btn-secondary":"btn-light")'
                         v-on:click='chooseBoth()' >Both</button>

                <button  type=button
                         v-bind:class='"btn btn-sm " + (mode == "profiler"?"btn-secondary":"btn-light")'
                         v-on:click='chooseProfiler()' >Profiler</button>
             </div>
             <div class='btn-group' style='' role=group >
                <button  type=button class=' btn btn-danger btn-sm'   v-on:click='closeApp()' >Close</button>
             </div>

        </span>
    </div>


    <div v-if='mode == "embed"'>
        <appEmbed v-bind:base_component_id_arg='base_component_id'></appEmbed>
    </div>

    <div v-if='mode == "edit"'>
        <div id=editor_id v-bind:style="'height: 100%; width: ' + code_width + '; left: 0px; display: ' + (code_shown?'inline-block':'none') + ';'">

        <component  v-bind:is="editor_component" v-if="editor_loaded" ref="editor_component_ref">

{'fraction_non_alphanumeric': 0.17839846829597927, 'fraction_numerical': 0.01576754138979615, 'mean_word_length': 2.7787234042553193, 'pattern_counts': {'":': 10, '<': 93, '<?xml version=': 0, '>': 95, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '3096080', 'n_tokens_mistral': 3105, 'n_tokens_neox': 2895, 'n_words': 562}