diff --git a/web/dist/assets/index-7d4b529a.js b/web/dist/assets/index-822a6f28.js similarity index 99% rename from web/dist/assets/index-7d4b529a.js rename to web/dist/assets/index-822a6f28.js index 797764a1..dc4a5fff 100644 --- a/web/dist/assets/index-7d4b529a.js +++ b/web/dist/assets/index-822a6f28.js @@ -158,7 +158,7 @@ Error: `+e.error,4,!1);this.isLoading=!1},async remountExtension(n){await this.u `+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(n){n.target.src=Vo},extensionImgPlacehodler(n){n.target.src=Bet},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){this.filterModels()}},async mounted(){console.log("Getting voices"),this.getVoices(),console.log("Constructing"),this.load_everything(),this.getSeviceVoices()},activated(){},computed:{rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(n=>n.isInstalled===!0):this.modelsFiltered.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)):(console.log("this.models_zoo"),console.log(this.models_zoo),console.log(this.models_zoo_initialLoadCount),this.show_only_installed_models?this.models_zoo.filter(n=>n.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return Ti;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Ti}}},imgModel:{get(){try{if(idx=this.$store.state.modelsZoo.findIndex(n=>n.name==this.$store.state.selectedModel),idx>=0)return this.$store.state.modelsZoo[idx].avatar}catch{}if(!this.isMounted)return Ti;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Ti}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(n){this.$store.state.config.audio_out_voice=n}},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},userName:{get(){return this.$store.state.config.user_name},set(n){this.$store.state.config.user_name=n}},user_avatar:{get(){return"/user_infos/"+this.$store.state.config.user_avatar},set(n){this.$store.state.config.user_avatar=n}},enable_gpu:{get(){return this.$store.state.config.enable_gpu},set(n){this.$store.state.config.enable_gpu=n}},auto_update:{get(){return this.$store.state.config.auto_update},set(n){this.$store.state.config.auto_update=n}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(n){this.$store.state.config.auto_speak=n}},auto_read:{get(){return this.$store.state.config.auto_read},set(n){this.$store.state.config.auto_read=n}},enable_voice_service:{get(){return this.$store.state.config.enable_voice_service},set(n){this.$store.state.config.enable_voice_service=n}},current_language:{get(){return this.$store.state.config.current_language},set(n){console.log("Current voice set to ",n),this.$store.state.config.current_language=n}},current_voice:{get(){return this.$store.state.config.current_voice===null||this.$store.state.config.current_voice===void 0?(console.log("current voice",this.$store.state.config.current_voice),"main_voice"):this.$store.state.config.current_voice},set(n){n=="main_voice"||n===void 0?(console.log("Current voice set to None"),this.$store.state.config.current_voice=null):(console.log("Current voice set to ",n),this.$store.state.config.current_voice=n)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(n){this.$store.state.config.audio_pitch=n}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(n){this.$store.state.config.audio_in_language=n}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(n){this.$store.state.config.use_user_name_in_discussions=n}},db_path:{get(){return this.$store.state.config.db_path},set(n){this.$store.state.config.db_path=n}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}},mountedExtensions:{get(){return console.log("this.$store.state.mountedExtensions:",this.$store.state.mountedExtensions),this.$store.state.mountedExtensions},set(n){this.$store.commit("setActiveExtensions",n)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(n){this.$store.commit("setbindingsZoo",n)}},modelsArr:{get(){return this.$store.state.modelsArr},set(n){this.$store.commit("setModelsArr",n)}},models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},installed_models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},diskUsage:{get(){return this.$store.state.diskUsage},set(n){this.$store.commit("setDiskUsage",n)}},ramUsage:{get(){return this.$store.state.ramUsage},set(n){this.$store.commit("setRamUsage",n)}},vramUsage:{get(){return this.$store.state.vramUsage},set(n){this.$store.commit("setVramUsage",n)}},disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return console.log(`this.diskUsage : ${this.diskUsage}`),this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return;const n=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);if(n>-1)return this.bindingsZoo[n].name},active_pesonality(){if(!this.isMounted)return;const n=this.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);if(n>-1)return this.personalities[n].name},speed_computed(){return Oi(this.addModel.speed)},total_size_computed(){return Oi(this.addModel.total_size)},downloaded_size_computed(){return Oi(this.addModel.downloaded_size)}},watch:{enable_voice_service(n){n||(this.configFile.auto_read=!1)},bec_collapsed(){Ue(()=>{Fe.replace()})},pc_collapsed(){Ue(()=>{Fe.replace()})},mc_collapsed(){Ue(()=>{Fe.replace()})},sc_collapsed(){Ue(()=>{Fe.replace()})},showConfirmation(){Ue(()=>{Fe.replace()})},mzl_collapsed(){Ue(()=>{Fe.replace()})},pzl_collapsed(){Ue(()=>{Fe.replace()})},ezl_collapsed(){Ue(()=>{Fe.replace()})},bzl_collapsed(){Ue(()=>{Fe.replace()})},all_collapsed(n){this.collapseAll(n),Ue(()=>{Fe.replace()})},settingsChanged(n){this.$store.state.settingsChanged=n,Ue(()=>{Fe.replace()})},isLoading(){Ue(()=>{Fe.replace()})},searchPersonality(n){n==""&&this.filterPersonalities()},mzdc_collapsed(){Ue(()=>{Fe.replace()})}},async beforeRouteLeave(n){if(await this.$router.isReady(),this.settingsChanged)return await this.$store.state.yesNoDialog.askQuestion(`Did You forget to apply changes? You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},Ce=n=>(Gs("data-v-7689f05a"),n=n(),zs(),n),nnt={class:"container overflow-y-scroll flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},int={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},rnt={key:0,class:"flex gap-3 flex-1 items-center duration-75"},snt=Ce(()=>_("i",{"data-feather":"x"},null,-1)),ont=[snt],ant=Ce(()=>_("i",{"data-feather":"check"},null,-1)),lnt=[ant],cnt={key:1,class:"flex gap-3 flex-1 items-center"},dnt=Ce(()=>_("i",{"data-feather":"save"},null,-1)),unt=[dnt],_nt=Ce(()=>_("i",{"data-feather":"refresh-ccw"},null,-1)),pnt=[_nt],hnt=Ce(()=>_("i",{"data-feather":"list"},null,-1)),fnt=[hnt],mnt={class:"flex gap-3 flex-1 items-center justify-end"},gnt=Ce(()=>_("i",{"data-feather":"trash-2"},null,-1)),Ent=[gnt],bnt=Ce(()=>_("i",{"data-feather":"refresh-ccw"},null,-1)),Snt=[bnt],ynt=Ce(()=>_("i",{"data-feather":"arrow-up-circle"},null,-1)),vnt={key:0},Tnt=Ce(()=>_("i",{"data-feather":"alert-circle"},null,-1)),xnt=[Tnt],Cnt={class:"flex gap-3 items-center"},Rnt={key:0,class:"flex gap-3 items-center"},Ant=Ce(()=>_("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),wnt=Ce(()=>_("i",{"data-feather":"check"},null,-1)),Ont=[wnt],Nnt={key:1,role:"status"},Mnt=Ce(()=>_("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),_("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),Int=Ce(()=>_("span",{class:"sr-only"},"Loading...",-1)),Dnt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Lnt={class:"flex flex-row p-3"},knt=Ce(()=>_("i",{"data-feather":"chevron-right"},null,-1)),Pnt=[knt],Unt=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),Fnt=[Unt],Bnt=Ce(()=>_("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),Gnt=Ce(()=>_("div",{class:"mr-2"},"|",-1)),znt={class:"text-base font-semibold cursor-pointer select-none items-center"},Vnt={class:"flex gap-2 items-center"},Hnt={key:0},qnt={class:"flex gap-2 items-center"},Ynt=["src"],$nt={class:"font-bold font-large text-lg"},Wnt={key:1},Knt={class:"flex gap-2 items-center"},jnt=["src"],Qnt={class:"font-bold font-large text-lg"},Xnt=Ce(()=>_("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),Znt={class:"font-bold font-large text-lg"},Jnt=Ce(()=>_("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),eit={class:"font-bold font-large text-lg"},tit={class:"mb-2"},nit=Ce(()=>_("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[_("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),$e(" CPU Ram usage: ")],-1)),iit={class:"flex flex-col mx-2"},rit=Ce(()=>_("b",null,"Avaliable ram: ",-1)),sit=Ce(()=>_("b",null,"Ram usage: ",-1)),oit={class:"p-2"},ait={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},lit={class:"mb-2"},cit=Ce(()=>_("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[_("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),$e(" Disk usage: ")],-1)),dit={class:"flex flex-col mx-2"},uit=Ce(()=>_("b",null,"Avaliable disk space: ",-1)),_it=Ce(()=>_("b",null,"Disk usage: ",-1)),pit={class:"p-2"},hit={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},fit={class:"mb-2"},mit={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},git=["src"],Eit={class:"flex flex-col mx-2"},bit=Ce(()=>_("b",null,"Model: ",-1)),Sit=Ce(()=>_("b",null,"Avaliable vram: ",-1)),yit=Ce(()=>_("b",null,"GPU usage: ",-1)),vit={class:"p-2"},Tit={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},xit={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Cit={class:"flex flex-row p-3"},Rit=Ce(()=>_("i",{"data-feather":"chevron-right"},null,-1)),Ait=[Rit],wit=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),Oit=[wit],Nit=Ce(()=>_("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),Mit={class:"flex flex-col mb-2 px-3 pb-2"},Iit={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Dit=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Lit={style:{width:"100%"}},kit=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),Pit={style:{width:"100%"}},Uit=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"db_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),Fit={style:{width:"100%"}},Bit=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),Git={class:"flex flex-row"},zit=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),Vit={class:"flex flex-row"},Hit=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"enable_gpu",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable GPU:")],-1)),qit={class:"text-center items-center"},Yit={class:"flex flex-row"},$it=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),Wit={class:"flex flex-row"},Kit=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),jit={class:"flex flex-row"},Qit=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),Xit={class:"flex flex-row"},Zit={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Jit=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),ert={style:{width:"100%"}},trt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),nrt={style:{width:"100%"}},irt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),rrt={style:{width:"100%"}},srt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),ort={style:{width:"100%"}},art={for:"avatar-upload"},lrt=["src"],crt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),drt={class:"flex flex-row"},urt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"min_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),_rt={style:{width:"100%"}},prt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"use_files",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate files support:")],-1)),frt={class:"flex flex-row"},mrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"use_discussions_history",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate discussion vectorization:")],-1)),grt={class:"flex flex-row"},Ert=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"summerize_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Continuous Learning from discussions:")],-1)),brt={class:"flex flex-row"},Srt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),yrt={class:"flex flex-row"},vrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"data_vectorization_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate data Vectorization:")],-1)),Trt={class:"flex flex-row"},xrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Build keywords when querying the vectorized database:")],-1)),Crt={class:"flex flex-row"},Rrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),Art=Ce(()=>_("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),wrt=Ce(()=>_("option",{value:"model_embedding"},"Model Embedding",-1)),Ort=[Art,wrt],Nrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),Mrt=Ce(()=>_("option",{value:"PCA"},"PCA",-1)),Irt=Ce(()=>_("option",{value:"TSNE"},"TSNE",-1)),Drt=[Mrt,Irt],Lrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),krt={class:"flex flex-row"},Prt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),Urt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),Frt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),Brt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Grt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"enable_voice_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable voice service:")],-1)),zrt={class:"flex flex-row"},Vrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"xtts_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts base url:")],-1)),Hrt={class:"flex flex-row"},qrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),Yrt={class:"flex flex-row"},$rt=["disabled"],Wrt=["value"],Krt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),jrt={class:"flex flex-row"},Qrt=["disabled"],Xrt=["value"],Zrt=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),Jrt={class:"flex flex-row"},est=["disabled"],tst={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},nst=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),ist={class:"flex flex-row"},rst=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),sst={class:"flex flex-row"},ost=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),ast=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),lst=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),cst=["value"],dst=Ce(()=>_("td",{style:{"min-width":"200px"}},[_("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),ust=["value"],_st={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},pst={class:"flex flex-row p-3"},hst=Ce(()=>_("i",{"data-feather":"chevron-right"},null,-1)),fst=[hst],mst=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),gst=[mst],Est=Ce(()=>_("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),bst={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Sst=Ce(()=>_("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),yst={key:1,class:"mr-2"},vst={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},Tst={class:"flex gap-1 items-center"},xst=["src"],Cst={class:"font-bold font-large text-lg line-clamp-1"},Rst={key:0,class:"mb-2"},Ast={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},wst=Ce(()=>_("i",{"data-feather":"chevron-up"},null,-1)),Ost=[wst],Nst=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),Mst=[Nst],Ist={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Dst={class:"flex flex-row p-3"},Lst=Ce(()=>_("i",{"data-feather":"chevron-right"},null,-1)),kst=[Lst],Pst=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),Ust=[Pst],Fst=Ce(()=>_("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),Bst={class:"flex flex-row items-center"},Gst={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},zst=Ce(()=>_("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Vst={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Hst=Ce(()=>_("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),qst={key:2,class:"mr-2"},Yst={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},$st={class:"flex gap-1 items-center"},Wst=["src"],Kst={class:"font-bold font-large text-lg line-clamp-1"},jst={class:"mx-2 mb-4"},Qst={class:"relative"},Xst={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Zst={key:0},Jst=Ce(()=>_("div",{role:"status"},[_("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),_("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),_("span",{class:"sr-only"},"Loading...")],-1)),eot=[Jst],tot={key:1},not=Ce(()=>_("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),iot=[not],rot=Ce(()=>_("label",{for:"only_installed"},"Show only installed models",-1)),sot=Ce(()=>_("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),oot={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},aot=Ce(()=>_("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),_("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),lot=Ce(()=>_("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),cot=[aot,lot],dot={key:1,class:"mb-2"},uot={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},_ot=Ce(()=>_("i",{"data-feather":"chevron-up"},null,-1)),pot=[_ot],hot=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),fot=[hot],mot={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},got={class:"flex flex-row p-3"},Eot=Ce(()=>_("i",{"data-feather":"chevron-right"},null,-1)),bot=[Eot],Sot=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),yot=[Sot],vot=Ce(()=>_("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Add models for binding",-1)),Tot={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},xot=Ce(()=>_("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Cot={key:1,class:"mr-2"},Rot={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},Aot={class:"flex gap-1 items-center"},wot=["src"],Oot={class:"font-bold font-large text-lg line-clamp-1"},Not={class:"mb-2"},Mot={class:"p-2"},Iot={class:"mb-3"},Dot=Ce(()=>_("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),Lot={key:0},kot={class:"mb-3"},Pot=Ce(()=>_("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),Uot={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},Fot=Ce(()=>_("div",{role:"status",class:"justify-center"},null,-1)),Bot={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Got={class:"w-full p-2"},zot={class:"flex justify-between mb-1"},Vot=Og('<span class="flex flex-row items-center gap-2 text-base font-medium text-blue-700 dark:text-white" data-v-7689f05a> Downloading <svg aria-hidden="true" class="w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-secondary" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-7689f05a><path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor" data-v-7689f05a></path><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill" data-v-7689f05a></path></svg><span class="sr-only" data-v-7689f05a>Loading...</span></span>',1),Hot={class:"text-sm font-medium text-blue-700 dark:text-white"},qot=["title"],Yot={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},$ot={class:"flex justify-between mb-1"},Wot={class:"text-base font-medium text-blue-700 dark:text-white"},Kot={class:"text-sm font-medium text-blue-700 dark:text-white"},jot={class:"flex flex-grow"},Qot={class:"flex flex-row flex-grow gap-3"},Xot={class:"p-2 text-center grow"},Zot={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Jot={class:"flex flex-row p-3 items-center"},eat=Ce(()=>_("i",{"data-feather":"chevron-right"},null,-1)),tat=[eat],nat=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),iat=[nat],rat=Ce(()=>_("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),sat={key:0,class:"mr-2"},oat={class:"mr-2 font-bold font-large text-lg line-clamp-1"},aat={key:1,class:"mr-2"},lat={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},cat={key:0,class:"flex -space-x-4 items-center"},dat={class:"group items-center flex flex-row"},uat=["onClick"],_at=["src","title"],pat=["onClick"],hat=Ce(()=>_("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[_("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[_("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),fat=[hat],mat={class:"mx-2 mb-4"},gat=Ce(()=>_("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Eat={class:"relative"},bat={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Sat={key:0},yat=Ce(()=>_("div",{role:"status"},[_("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),_("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),_("span",{class:"sr-only"},"Loading...")],-1)),vat=[yat],Tat={key:1},xat=Ce(()=>_("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),Cat=[xat],Rat={key:0,class:"mx-2 mb-4"},Aat={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},wat=["selected"],Oat={key:0,class:"mb-2"},Nat={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Mat=Ce(()=>_("i",{"data-feather":"chevron-up"},null,-1)),Iat=[Mat],Dat=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),Lat=[Dat],kat={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Pat={class:"flex flex-row p-3 items-center"},Uat=Ce(()=>_("i",{"data-feather":"chevron-right"},null,-1)),Fat=[Uat],Bat=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),Gat=[Bat],zat=Ce(()=>_("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Extensions zoo",-1)),Vat={key:0,class:"mr-2"},Hat={key:1,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},qat={key:0,class:"flex -space-x-4 items-center"},Yat={class:"group items-center flex flex-row"},$at=["src","title"],Wat=["onClick"],Kat=Ce(()=>_("span",{class:"hidden group-hover:block top-0 left-7 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[_("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[_("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)),jat=[Kat],Qat={class:"mx-2 mb-4"},Xat=Ce(()=>_("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Zat={class:"relative"},Jat={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},elt={key:0},tlt=Ce(()=>_("div",{role:"status"},[_("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),_("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),_("span",{class:"sr-only"},"Loading...")],-1)),nlt=[tlt],ilt={key:1},rlt=Ce(()=>_("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),slt=[rlt],olt={key:0,class:"mx-2 mb-4"},alt={for:"extCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},llt=["selected"],clt={key:0,class:"mb-2"},dlt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},ult=Ce(()=>_("i",{"data-feather":"chevron-up"},null,-1)),_lt=[ult],plt=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),hlt=[plt],flt={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},mlt={class:"flex flex-row p-3 items-center"},glt=Ce(()=>_("i",{"data-feather":"chevron-right"},null,-1)),Elt=[glt],blt=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),Slt=[blt],ylt=Ce(()=>_("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Mounted Extensions Priority",-1)),vlt={class:"flex flex-col mb-2 p-3 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Tlt={class:"flex flex-row"},xlt=Ce(()=>_("i",{"data-feather":"chevron-right"},null,-1)),Clt=[xlt],Rlt=Ce(()=>_("i",{"data-feather":"chevron-down"},null,-1)),Alt=[Rlt],wlt=Ce(()=>_("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),Olt={class:"m-2"},Nlt={class:"flex flex-row gap-2 items-center"},Mlt=Ce(()=>_("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),Ilt={class:"m-2"},Dlt=Ce(()=>_("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),Llt={class:"m-2"},klt={class:"flex flex-col align-bottom"},Plt={class:"relative"},Ult=Ce(()=>_("p",{class:"absolute left-0 mt-6"},[_("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),Flt={class:"absolute right-0"},Blt={class:"m-2"},Glt={class:"flex flex-col align-bottom"},zlt={class:"relative"},Vlt=Ce(()=>_("p",{class:"absolute left-0 mt-6"},[_("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),Hlt={class:"absolute right-0"},qlt={class:"m-2"},Ylt={class:"flex flex-col align-bottom"},$lt={class:"relative"},Wlt=Ce(()=>_("p",{class:"absolute left-0 mt-6"},[_("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),Klt={class:"absolute right-0"},jlt={class:"m-2"},Qlt={class:"flex flex-col align-bottom"},Xlt={class:"relative"},Zlt=Ce(()=>_("p",{class:"absolute left-0 mt-6"},[_("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),Jlt={class:"absolute right-0"},ect={class:"m-2"},tct={class:"flex flex-col align-bottom"},nct={class:"relative"},ict=Ce(()=>_("p",{class:"absolute left-0 mt-6"},[_("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),rct={class:"absolute right-0"},sct={class:"m-2"},oct={class:"flex flex-col align-bottom"},act={class:"relative"},lct=Ce(()=>_("p",{class:"absolute left-0 mt-6"},[_("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),cct={class:"absolute right-0"};function dct(n,e,t,i,r,s){const o=St("Card"),a=St("BindingEntry"),l=St("RadioOptions"),c=St("model-entry"),d=St("personality-entry"),u=St("ExtensionEntry"),p=St("AddModelDialog"),f=St("ChoiceDialog");return M(),D(Xe,null,[_("div",nnt,[_("div",int,[r.showConfirmation?(M(),D("div",rnt,[_("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=Oe(h=>r.showConfirmation=!1,["stop"]))},ont),_("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=Oe(h=>s.save_configuration(),["stop"]))},lnt)])):X("",!0),r.showConfirmation?X("",!0):(M(),D("div",cnt,[_("button",{title:"Save configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=h=>r.showConfirmation=!0)},unt),_("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[3]||(e[3]=h=>s.reset_configuration())},pnt),_("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[4]||(e[4]=Oe(h=>r.all_collapsed=!r.all_collapsed,["stop"]))},fnt)])),_("div",mnt,[_("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=h=>s.api_get_req("clear_uploads").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},Ent),_("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=h=>s.api_get_req("restart_program").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},Snt),_("button",{title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[7]||(e[7]=h=>s.api_get_req("update_software").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},[ynt,r.has_updates?(M(),D("div",vnt,xnt)):X("",!0)]),_("div",Cnt,[r.settingsChanged?(M(),D("div",Rnt,[Ant,r.isLoading?X("",!0):(M(),D("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[8]||(e[8]=Oe(h=>s.applyConfiguration(),["stop"]))},Ont))])):X("",!0),r.isLoading?(M(),D("div",Nnt,[_("p",null,me(r.loading_text),1),Mnt,Int])):X("",!0)])])]),_("div",{class:Ke(r.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[_("div",Dnt,[_("div",Lnt,[_("button",{onClick:e[9]||(e[9]=Oe(h=>r.sc_collapsed=!r.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[Re(_("div",null,Pnt,512),[[At,r.sc_collapsed]]),Re(_("div",null,Fnt,512),[[At,!r.sc_collapsed]]),Bnt,Gnt,_("div",znt,[_("div",Vnt,[_("div",null,[s.vramUsage&&s.vramUsage.gpus&&s.vramUsage.gpus.length==1?(M(),D("div",Hnt,[(M(!0),D(Xe,null,gt(s.vramUsage.gpus,h=>(M(),D("div",qnt,[_("img",{src:r.SVGGPU,width:"25",height:"25"},null,8,Ynt),_("h3",$nt,[_("div",null,me(s.computedFileSize(h.used_vram))+" / "+me(s.computedFileSize(h.total_vram))+" ("+me(h.percentage)+"%) ",1)])]))),256))])):X("",!0),s.vramUsage&&s.vramUsage.gpus&&s.vramUsage.gpus.length>1?(M(),D("div",Wnt,[_("div",Knt,[_("img",{src:r.SVGGPU,width:"25",height:"25"},null,8,jnt),_("h3",Qnt,[_("div",null,me(s.vramUsage.gpus.length)+"x ",1)])])])):X("",!0)]),Xnt,_("h3",Znt,[_("div",null,me(s.ram_usage)+" / "+me(s.ram_total_space)+" ("+me(s.ram_percent_usage)+"%)",1)]),Jnt,_("h3",eit,[_("div",null,me(s.disk_binding_models_usage)+" / "+me(s.disk_total_space)+" ("+me(s.disk_percent_usage)+"%)",1)])])])])]),_("div",{class:Ke([{hidden:r.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_("div",tit,[nit,_("div",iit,[_("div",null,[rit,$e(me(s.ram_available_space),1)]),_("div",null,[sit,$e(" "+me(s.ram_usage)+" / "+me(s.ram_total_space)+" ("+me(s.ram_percent_usage)+")% ",1)])]),_("div",oit,[_("div",ait,[_("div",{class:"bg-blue-600 h-2.5 rounded-full",style:un("width: "+s.ram_percent_usage+"%;")},null,4)])])]),_("div",lit,[cit,_("div",dit,[_("div",null,[uit,$e(me(s.disk_available_space),1)]),_("div",null,[_it,$e(" "+me(s.disk_binding_models_usage)+" / "+me(s.disk_total_space)+" ("+me(s.disk_percent_usage)+"%)",1)])]),_("div",pit,[_("div",hit,[_("div",{class:"bg-blue-600 h-2.5 rounded-full",style:un("width: "+s.disk_percent_usage+"%;")},null,4)])])]),(M(!0),D(Xe,null,gt(s.vramUsage.gpus,h=>(M(),D("div",fit,[_("label",mit,[_("img",{src:r.SVGGPU,width:"25",height:"25"},null,8,git),$e(" GPU usage: ")]),_("div",Eit,[_("div",null,[bit,$e(me(h.gpu_model),1)]),_("div",null,[Sit,$e(me(this.computedFileSize(h.available_space)),1)]),_("div",null,[yit,$e(" "+me(this.computedFileSize(h.used_vram))+" / "+me(this.computedFileSize(h.total_vram))+" ("+me(h.percentage)+"%)",1)])]),_("div",vit,[_("div",Tit,[_("div",{class:"bg-blue-600 h-2.5 rounded-full",style:un("width: "+h.percentage+"%;")},null,4)])])]))),256))],2)]),_("div",xit,[_("div",Cit,[_("button",{onClick:e[10]||(e[10]=Oe(h=>r.minconf_collapsed=!r.minconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[Re(_("div",null,Ait,512),[[At,r.minconf_collapsed]]),Re(_("div",null,Oit,512),[[At,!r.minconf_collapsed]]),Nit])]),_("div",{class:Ke([{hidden:r.minconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_("div",Mit,[Le(o,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:dt(()=>[_("table",Iit,[_("tr",null,[Dit,_("td",Lit,[Re(_("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[11]||(e[11]=h=>s.configFile.host=h),onChange:e[12]||(e[12]=h=>r.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Ze,s.configFile.host]])])]),_("tr",null,[kit,_("td",Pit,[Re(_("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[13]||(e[13]=h=>s.configFile.port=h),onChange:e[14]||(e[14]=h=>r.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Ze,s.configFile.port]])])]),_("tr",null,[Uit,_("td",Fit,[Re(_("input",{type:"text",id:"db_path",required:"","onUpdate:modelValue":e[15]||(e[15]=h=>s.configFile.db_path=h),onChange:e[16]||(e[16]=h=>r.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[Ze,s.configFile.db_path]])])]),_("tr",null,[Bit,_("td",null,[_("div",Git,[Re(_("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[17]||(e[17]=h=>s.configFile.auto_show_browser=h),onChange:e[18]||(e[18]=h=>r.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.auto_show_browser]])])])]),_("tr",null,[zit,_("td",null,[_("div",Vit,[Re(_("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[19]||(e[19]=h=>s.configFile.debug=h),onChange:e[20]||(e[20]=h=>r.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.debug]])])])]),_("tr",null,[Hit,_("td",qit,[_("div",Yit,[Re(_("input",{type:"checkbox",id:"enable_gpu",required:"","onUpdate:modelValue":e[21]||(e[21]=h=>s.configFile.enable_gpu=h),onChange:e[22]||(e[22]=h=>r.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.enable_gpu]]),s.configFile.enable_gpu?X("",!0):(M(),D("button",{key:0,onClick:e[23]||(e[23]=Oe((...h)=>s.upgrade2GPU&&s.upgrade2GPU(...h),["prevent"])),class:"w-100 text-center rounded m-2 bg-blue-300 hover:bg-blue-200 text-l hover:text-primary p-2 m-2 text-left flex flex-row"}," Upgrade from CPU to GPU "))])])]),_("tr",null,[$it,_("td",null,[_("div",Wit,[Re(_("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[24]||(e[24]=h=>s.configFile.auto_save=h),onChange:e[25]||(e[25]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.auto_save]])])])]),_("tr",null,[Kit,_("td",null,[_("div",jit,[Re(_("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[26]||(e[26]=h=>s.configFile.auto_update=h),onChange:e[27]||(e[27]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.auto_update]])])])]),_("tr",null,[Qit,_("td",null,[_("div",Xit,[Re(_("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[28]||(e[28]=h=>s.configFile.auto_title=h),onChange:e[29]||(e[29]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.auto_title]])])])])])]),_:1}),Le(o,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:dt(()=>[_("table",Zit,[_("tr",null,[Jit,_("td",ert,[Re(_("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[30]||(e[30]=h=>s.configFile.user_name=h),onChange:e[31]||(e[31]=h=>r.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ze,s.configFile.user_name]])])]),_("tr",null,[trt,_("td",nrt,[Re(_("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[32]||(e[32]=h=>s.configFile.user_description=h),onChange:e[33]||(e[33]=h=>r.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ze,s.configFile.user_description]])])]),_("tr",null,[irt,_("td",rrt,[Re(_("input",{type:"checkbox",id:"override_personality_model_parameters",required:"","onUpdate:modelValue":e[34]||(e[34]=h=>s.configFile.override_personality_model_parameters=h),onChange:e[35]||(e[35]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.override_personality_model_parameters]])])]),_("tr",null,[srt,_("td",ort,[_("label",art,[_("img",{src:"/user_infos/"+s.configFile.user_avatar,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,lrt)]),_("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[36]||(e[36]=(...h)=>s.uploadAvatar&&s.uploadAvatar(...h))},null,32)])]),_("tr",null,[crt,_("td",null,[_("div",drt,[Re(_("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[37]||(e[37]=h=>s.configFile.use_user_name_in_discussions=h),onChange:e[38]||(e[38]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.use_user_name_in_discussions]])])])]),_("tr",null,[urt,_("td",_rt,[Re(_("input",{type:"number",id:"min_n_predict",required:"","onUpdate:modelValue":e[39]||(e[39]=h=>s.configFile.min_n_predict=h),onChange:e[40]||(e[40]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ze,s.configFile.min_n_predict]])])])])]),_:1}),Le(o,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:dt(()=>[_("table",prt,[_("tr",null,[hrt,_("td",null,[_("div",frt,[Re(_("input",{type:"checkbox",id:"use_files",required:"","onUpdate:modelValue":e[41]||(e[41]=h=>s.configFile.use_files=h),onChange:e[42]||(e[42]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.use_files]])])])]),_("tr",null,[mrt,_("td",null,[_("div",grt,[Re(_("input",{type:"checkbox",id:"use_discussions_history",required:"","onUpdate:modelValue":e[43]||(e[43]=h=>s.configFile.use_discussions_history=h),onChange:e[44]||(e[44]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.use_discussions_history]])])])]),_("tr",null,[Ert,_("td",null,[_("div",brt,[Re(_("input",{type:"checkbox",id:"summerize_discussion",required:"","onUpdate:modelValue":e[45]||(e[45]=h=>s.configFile.summerize_discussion=h),onChange:e[46]||(e[46]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.summerize_discussion]])])])]),_("tr",null,[Srt,_("td",null,[_("div",yrt,[Re(_("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[47]||(e[47]=h=>s.configFile.data_vectorization_visualize_on_vectorization=h),onChange:e[48]||(e[48]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.data_vectorization_visualize_on_vectorization]])])])]),_("tr",null,[vrt,_("td",null,[_("div",Trt,[Re(_("input",{type:"checkbox",id:"data_vectorization_activate",required:"","onUpdate:modelValue":e[49]||(e[49]=h=>s.configFile.data_vectorization_activate=h),onChange:e[50]||(e[50]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.data_vectorization_activate]])])])]),_("tr",null,[xrt,_("td",null,[_("div",Crt,[Re(_("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[51]||(e[51]=h=>s.configFile.data_vectorization_build_keys_words=h),onChange:e[52]||(e[52]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.data_vectorization_build_keys_words]])])])]),_("tr",null,[Rrt,_("td",null,[Re(_("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[53]||(e[53]=h=>s.configFile.data_vectorization_method=h),onChange:e[54]||(e[54]=h=>r.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Ort,544),[[$n,s.configFile.data_vectorization_method]])])]),_("tr",null,[Nrt,_("td",null,[Re(_("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[55]||(e[55]=h=>s.configFile.data_visualization_method=h),onChange:e[56]||(e[56]=h=>r.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Drt,544),[[$n,s.configFile.data_visualization_method]])])]),_("tr",null,[Lrt,_("td",null,[_("div",krt,[Re(_("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[57]||(e[57]=h=>s.configFile.data_vectorization_save_db=h),onChange:e[58]||(e[58]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.data_vectorization_save_db]])])])]),_("tr",null,[Prt,_("td",null,[Re(_("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[59]||(e[59]=h=>s.configFile.data_vectorization_chunk_size=h),onChange:e[60]||(e[60]=h=>r.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.data_vectorization_chunk_size]]),Re(_("input",{"onUpdate:modelValue":e[61]||(e[61]=h=>s.configFile.data_vectorization_chunk_size=h),type:"number",onChange:e[62]||(e[62]=h=>r.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ze,s.configFile.data_vectorization_chunk_size]])])]),_("tr",null,[Urt,_("td",null,[Re(_("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[63]||(e[63]=h=>s.configFile.data_vectorization_overlap_size=h),onChange:e[64]||(e[64]=h=>r.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.data_vectorization_overlap_size]]),Re(_("input",{"onUpdate:modelValue":e[65]||(e[65]=h=>s.configFile.data_vectorization_overlap_size=h),type:"number",onChange:e[66]||(e[66]=h=>r.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ze,s.configFile.data_vectorization_overlap_size]])])]),_("tr",null,[Frt,_("td",null,[Re(_("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[67]||(e[67]=h=>s.configFile.data_vectorization_nb_chunks=h),onChange:e[68]||(e[68]=h=>r.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.data_vectorization_nb_chunks]]),Re(_("input",{"onUpdate:modelValue":e[69]||(e[69]=h=>s.configFile.data_vectorization_nb_chunks=h),type:"number",onChange:e[70]||(e[70]=h=>r.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ze,s.configFile.data_vectorization_nb_chunks]])])])])]),_:1}),Le(o,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:dt(()=>[_("table",Brt,[_("tr",null,[Grt,_("td",null,[_("div",zrt,[Re(_("input",{type:"checkbox",id:"enable_voice_service",required:"","onUpdate:modelValue":e[71]||(e[71]=h=>s.configFile.enable_voice_service=h),onChange:e[72]||(e[72]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.enable_voice_service]])])])]),_("tr",null,[Vrt,_("td",null,[_("div",Hrt,[Re(_("input",{type:"text",id:"xtts_base_url",required:"","onUpdate:modelValue":e[73]||(e[73]=h=>s.configFile.xtts_base_url=h),onChange:e[74]||(e[74]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ze,s.configFile.xtts_base_url]])])])]),_("tr",null,[qrt,_("td",null,[_("div",Yrt,[Re(_("select",{"onUpdate:modelValue":e[75]||(e[75]=h=>s.current_language=h),onChange:e[76]||(e[76]=h=>r.settingsChanged=!0),disabled:!s.enable_voice_service},[(M(!0),D(Xe,null,gt(r.voice_languages,h=>(M(),D("option",{key:h,value:h},me(h),9,Wrt))),128))],40,$rt),[[$n,s.current_language]])])])]),_("tr",null,[Krt,_("td",null,[_("div",jrt,[Re(_("select",{"onUpdate:modelValue":e[77]||(e[77]=h=>s.current_voice=h),onChange:e[78]||(e[78]=h=>r.settingsChanged=!0),disabled:!s.enable_voice_service},[(M(!0),D(Xe,null,gt(r.voices,h=>(M(),D("option",{key:h,value:h},me(h),9,Xrt))),128))],40,Qrt),[[$n,s.current_voice]])])])]),_("tr",null,[Zrt,_("td",null,[_("div",Jrt,[Re(_("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[79]||(e[79]=h=>s.configFile.auto_read=h),onChange:e[80]||(e[80]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!s.enable_voice_service},null,40,est),[[Mt,s.configFile.auto_read]])])])])])]),_:1}),Le(o,{title:"Browser Audio",is_subcard:!0,class:"pb-2 m-2"},{default:dt(()=>[_("table",tst,[_("tr",null,[nst,_("td",null,[_("div",ist,[Re(_("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[81]||(e[81]=h=>s.configFile.audio_auto_send_input=h),onChange:e[82]||(e[82]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.audio_auto_send_input]])])])]),_("tr",null,[rst,_("td",null,[_("div",sst,[Re(_("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[83]||(e[83]=h=>s.configFile.auto_speak=h),onChange:e[84]||(e[84]=h=>r.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Mt,s.configFile.auto_speak]])])])]),_("tr",null,[ost,_("td",null,[Re(_("input",{id:"audio_pitch","onUpdate:modelValue":e[85]||(e[85]=h=>s.configFile.audio_pitch=h),onChange:e[86]||(e[86]=h=>r.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.audio_pitch]]),Re(_("input",{"onUpdate:modelValue":e[87]||(e[87]=h=>s.configFile.audio_pitch=h),onChange:e[88]||(e[88]=h=>r.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ze,s.configFile.audio_pitch]])])]),_("tr",null,[ast,_("td",null,[Re(_("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[89]||(e[89]=h=>s.configFile.audio_silenceTimer=h),onChange:e[90]||(e[90]=h=>r.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.audio_silenceTimer]]),Re(_("input",{"onUpdate:modelValue":e[91]||(e[91]=h=>s.configFile.audio_silenceTimer=h),onChange:e[92]||(e[92]=h=>r.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ze,s.configFile.audio_silenceTimer]])])]),_("tr",null,[lst,_("td",null,[Re(_("select",{id:"audio_in_language","onUpdate:modelValue":e[93]||(e[93]=h=>s.configFile.audio_in_language=h),onChange:e[94]||(e[94]=h=>r.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(M(!0),D(Xe,null,gt(s.audioLanguages,h=>(M(),D("option",{key:h.code,value:h.code},me(h.name),9,cst))),128))],544),[[$n,s.configFile.audio_in_language]])])]),_("tr",null,[dst,_("td",null,[Re(_("select",{id:"audio_out_voice","onUpdate:modelValue":e[95]||(e[95]=h=>s.configFile.audio_out_voice=h),onChange:e[96]||(e[96]=h=>r.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(M(!0),D(Xe,null,gt(r.audioVoices,h=>(M(),D("option",{key:h.name,value:h.name},me(h.name),9,ust))),128))],544),[[$n,s.configFile.audio_out_voice]])])])])]),_:1})])],2)]),_("div",_st,[_("div",pst,[_("button",{onClick:e[97]||(e[97]=Oe(h=>r.bzc_collapsed=!r.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[Re(_("div",null,fst,512),[[At,r.bzc_collapsed]]),Re(_("div",null,gst,512),[[At,!r.bzc_collapsed]]),Est,s.configFile.binding_name?X("",!0):(M(),D("div",bst,[Sst,$e(" No binding selected! ")])),s.configFile.binding_name?(M(),D("div",yst,"|")):X("",!0),s.configFile.binding_name?(M(),D("div",vst,[_("div",Tst,[_("img",{src:s.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,xst),_("h3",Cst,me(s.binding_name),1)])])):X("",!0)])]),_("div",{class:Ke([{hidden:r.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[s.bindingsZoo&&s.bindingsZoo.length>0?(M(),D("div",Rst,[_("label",Ast," Bindings: ("+me(s.bindingsZoo.length)+") ",1),_("div",{class:Ke(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",r.bzl_collapsed?"":"max-h-96"])},[Le(Vr,{name:"list"},{default:dt(()=>[(M(!0),D(Xe,null,gt(s.bindingsZoo,(h,E)=>(M(),Qt(a,{ref_for:!0,ref:"bindingZoo",key:"index-"+E+"-"+h.folder,binding:h,"on-selected":s.onBindingSelected,"on-reinstall":s.onReinstallBinding,"on-unInstall":s.onUnInstallBinding,"on-install":s.onInstallBinding,"on-settings":s.onSettingsBinding,"on-reload-binding":s.onReloadBinding,selected:h.folder===s.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):X("",!0),r.bzl_collapsed?(M(),D("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[98]||(e[98]=h=>r.bzl_collapsed=!r.bzl_collapsed)},Ost)):(M(),D("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[99]||(e[99]=h=>r.bzl_collapsed=!r.bzl_collapsed)},Mst))],2)]),_("div",Ist,[_("div",Dst,[_("button",{onClick:e[100]||(e[100]=Oe(h=>s.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[Re(_("div",null,kst,512),[[At,r.mzc_collapsed]]),Re(_("div",null,Ust,512),[[At,!r.mzc_collapsed]]),Fst,_("div",Bst,[s.configFile.binding_name?X("",!0):(M(),D("div",Gst,[zst,$e(" Select binding first! ")])),!r.isModelSelected&&s.configFile.binding_name?(M(),D("div",Vst,[Hst,$e(" No model selected! ")])):X("",!0),s.configFile.model_name?(M(),D("div",qst,"|")):X("",!0),s.configFile.model_name?(M(),D("div",Yst,[_("div",$st,[_("img",{src:s.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,Wst),_("h3",Kst,me(s.configFile.model_name),1)])])):X("",!0)])])]),_("div",{class:Ke([{hidden:r.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_("div",jst,[_("div",Qst,[_("div",Xst,[r.searchModelInProgress?(M(),D("div",Zst,eot)):X("",!0),r.searchModelInProgress?X("",!0):(M(),D("div",tot,iot))]),Re(_("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search models...",required:"","onUpdate:modelValue":e[101]||(e[101]=h=>r.searchModel=h),onKeyup:e[102]||(e[102]=Fo((...h)=>s.searchModel_func&&s.searchModel_func(...h),["enter"]))},null,544),[[Ze,r.searchModel]]),r.searchModel?(M(),D("button",{key:0,onClick:e[103]||(e[103]=Oe(h=>r.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):X("",!0)])]),_("div",null,[Re(_("input",{"onUpdate:modelValue":e[104]||(e[104]=h=>r.show_only_installed_models=h),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[Mt,r.show_only_installed_models]]),rot]),_("div",null,[Le(l,{radioOptions:r.sortOptions,onRadioSelected:s.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),sot,r.is_loading_zoo?(M(),D("div",oot,cot)):X("",!0),r.models_zoo&&r.models_zoo.length>0?(M(),D("div",dot,[_("label",uot," Models: ("+me(r.models_zoo.length)+") ",1),_("div",{class:Ke(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",r.mzl_collapsed?"":"max-h-96"])},[Le(Vr,{name:"list"},{default:dt(()=>[(M(!0),D(Xe,null,gt(s.rendered_models_zoo,(h,E)=>(M(),Qt(c,{ref_for:!0,ref:"modelZoo",key:"index-"+E+"-"+h.name,model:h,"is-installed":h.isInstalled,"on-install":s.onInstall,"on-uninstall":s.onUninstall,"on-selected":s.onModelSelected,selected:h.name===s.configFile.model_name,model_type:h.model_type,"on-copy":s.onCopy,"on-copy-link":s.onCopyLink,"on-cancel-install":s.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),_("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[105]||(e[105]=(...h)=>s.load_more_models&&s.load_more_models(...h))},"Load more models",512)]),_:1})],2)])):X("",!0),r.mzl_collapsed?(M(),D("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[106]||(e[106]=(...h)=>s.open_mzl&&s.open_mzl(...h))},pot)):(M(),D("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[107]||(e[107]=(...h)=>s.open_mzl&&s.open_mzl(...h))},fot))],2)]),_("div",mot,[_("div",got,[_("button",{onClick:e[108]||(e[108]=Oe(h=>r.mzdc_collapsed=!r.mzdc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[Re(_("div",null,bot,512),[[At,r.mzdc_collapsed]]),Re(_("div",null,yot,512),[[At,!r.mzdc_collapsed]]),vot,s.binding_name?X("",!0):(M(),D("div",Tot,[xot,$e(" No binding selected! ")])),s.configFile.binding_name?(M(),D("div",Cot,"|")):X("",!0),s.configFile.binding_name?(M(),D("div",Rot,[_("div",Aot,[_("img",{src:s.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,wot),_("h3",Oot,me(s.binding_name),1)])])):X("",!0)])]),_("div",{class:Ke([{hidden:r.mzdc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_("div",Not,[_("div",Mot,[_("div",null,[_("div",Iot,[Dot,Re(_("input",{type:"text","onUpdate:modelValue":e[109]||(e[109]=h=>r.reference_path=h),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[Ze,r.reference_path]])]),_("button",{type:"button",onClick:e[110]||(e[110]=Oe(h=>s.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),r.modelDownlaodInProgress?X("",!0):(M(),D("div",Lot,[_("div",kot,[Pot,Re(_("input",{type:"text","onUpdate:modelValue":e[111]||(e[111]=h=>r.addModel.url=h),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[Ze,r.addModel.url]])]),_("button",{type:"button",onClick:e[112]||(e[112]=Oe(h=>s.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),r.modelDownlaodInProgress?(M(),D("div",Uot,[Fot,_("div",Bot,[_("div",Got,[_("div",zot,[Vot,_("span",Hot,me(Math.floor(r.addModel.progress))+"%",1)]),_("div",{class:"mx-1 opacity-80 line-clamp-1",title:r.addModel.url},me(r.addModel.url),9,qot),_("div",Yot,[_("div",{class:"bg-blue-600 h-2.5 rounded-full",style:un({width:r.addModel.progress+"%"})},null,4)]),_("div",$ot,[_("span",Wot,"Download speed: "+me(s.speed_computed)+"/s",1),_("span",Kot,me(s.downloaded_size_computed)+"/"+me(s.total_size_computed),1)])])]),_("div",jot,[_("div",Qot,[_("div",Xot,[_("button",{onClick:e[113]||(e[113]=Oe((...h)=>s.onCancelInstall&&s.onCancelInstall(...h),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):X("",!0)])])],2)]),_("div",Zot,[_("div",Jot,[_("button",{onClick:e[115]||(e[115]=Oe(h=>r.pzc_collapsed=!r.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[Re(_("div",null,tat,512),[[At,r.pzc_collapsed]]),Re(_("div",null,iat,512),[[At,!r.pzc_collapsed]]),rat,s.configFile.personalities?(M(),D("div",sat,"|")):X("",!0),_("div",oat,me(s.active_pesonality),1),s.configFile.personalities?(M(),D("div",aat,"|")):X("",!0),s.configFile.personalities?(M(),D("div",lat,[s.mountedPersArr.length>0?(M(),D("div",cat,[(M(!0),D(Xe,null,gt(s.mountedPersArr,(h,E)=>(M(),D("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+h.name,ref_for:!0,ref:"mountedPersonalities"},[_("div",dat,[_("button",{onClick:Oe(g=>s.onPersonalitySelected(h),["stop"])},[_("img",{src:r.bUrl+h.avatar,onError:e[114]||(e[114]=(...g)=>s.personalityImgPlacehodler&&s.personalityImgPlacehodler(...g)),class:Ke(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",s.configFile.active_personality_id==s.configFile.personalities.indexOf(h.full_path)?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,_at)],8,uat),_("button",{onClick:Oe(g=>s.unmountPersonality(h),["stop"])},fat,8,pat)])]))),128))])):X("",!0)])):X("",!0)])]),_("div",{class:Ke([{hidden:r.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_("div",mat,[gat,_("div",Eat,[_("div",bat,[r.searchPersonalityInProgress?(M(),D("div",Sat,vat)):X("",!0),r.searchPersonalityInProgress?X("",!0):(M(),D("div",Tat,Cat))]),Re(_("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[116]||(e[116]=h=>r.searchPersonality=h),onKeyup:e[117]||(e[117]=Oe((...h)=>s.searchPersonality_func&&s.searchPersonality_func(...h),["stop"]))},null,544),[[Ze,r.searchPersonality]]),r.searchPersonality?(M(),D("button",{key:0,onClick:e[118]||(e[118]=Oe(h=>r.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):X("",!0)])]),r.searchPersonality?X("",!0):(M(),D("div",Rat,[_("label",Aat," Personalities Category: ("+me(r.persCatgArr.length)+") ",1),_("select",{id:"persCat",onChange:e[119]||(e[119]=h=>s.update_personality_category(h.target.value,s.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(M(!0),D(Xe,null,gt(r.persCatgArr,(h,E)=>(M(),D("option",{key:E,selected:h==this.configFile.personality_category},me(h),9,wat))),128))],32)])),_("div",null,[r.personalitiesFiltered.length>0?(M(),D("div",Oat,[_("label",Nat,me(r.searchPersonality?"Search results":"Personalities")+": ("+me(r.personalitiesFiltered.length)+") ",1),_("div",{class:Ke(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",r.pzl_collapsed?"":"max-h-96"])},[Le(Vr,{name:"bounce"},{default:dt(()=>[(M(!0),D(Xe,null,gt(r.personalitiesFiltered,(h,E)=>(M(),Qt(d,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+E+"-"+h.name,personality:h,select_language:!0,full_path:h.full_path,selected:s.configFile.active_personality_id==s.configFile.personalities.findIndex(g=>g===h.full_path||g===h.full_path+":"+h.language),"on-selected":s.onPersonalitySelected,"on-mount":s.mountPersonality,"on-un-mount":s.unmountPersonality,"on-remount":s.remountPersonality,"on-reinstall":s.onPersonalityReinstall,"on-settings":s.onSettingsPersonality,"on-copy-personality-name":s.onCopyPersonalityName},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-reinstall","on-settings","on-copy-personality-name"]))),128))]),_:1})],2)])):X("",!0)]),r.pzl_collapsed?(M(),D("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[120]||(e[120]=h=>r.pzl_collapsed=!r.pzl_collapsed)},Iat)):(M(),D("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[121]||(e[121]=h=>r.pzl_collapsed=!r.pzl_collapsed)},Lat))],2)]),_("div",kat,[_("div",Pat,[_("button",{onClick:e[123]||(e[123]=Oe(h=>r.ezc_collapsed=!r.ezc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[Re(_("div",null,Fat,512),[[At,r.ezc_collapsed]]),Re(_("div",null,Gat,512),[[At,!r.ezc_collapsed]]),zat,s.configFile.extensions?(M(),D("div",Vat,"|")):X("",!0),s.configFile.extensions?(M(),D("div",Hat,[s.mountedExtensions.length>0?(M(),D("div",qat,[(M(!0),D(Xe,null,gt(s.mountedExtensions,(h,E)=>(M(),D("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+h.name,ref_for:!0,ref:"mountedExtensions"},[_("div",Yat,[_("button",null,[_("img",{src:r.bUrl+h.avatar,onError:e[122]||(e[122]=(...g)=>s.extensionImgPlacehodler&&s.extensionImgPlacehodler(...g)),class:Ke(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary","border-transparent z-0"]),title:h.name},null,40,$at)]),_("button",{onClick:Oe(g=>s.unmountExtension(h),["stop"])},jat,8,Wat)])]))),128))])):X("",!0)])):X("",!0)])]),_("div",{class:Ke([{hidden:r.ezc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_("div",Qat,[Xat,_("div",Zat,[_("div",Jat,[r.searchExtensionInProgress?(M(),D("div",elt,nlt)):X("",!0),r.searchExtensionInProgress?X("",!0):(M(),D("div",ilt,slt))]),Re(_("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search extension...",required:"","onUpdate:modelValue":e[124]||(e[124]=h=>r.searchExtension=h),onKeyup:e[125]||(e[125]=Oe((...h)=>n.searchExtension_func&&n.searchExtension_func(...h),["stop"]))},null,544),[[Ze,r.searchExtension]]),r.searchExtension?(M(),D("button",{key:0,onClick:e[126]||(e[126]=Oe(h=>r.searchExtension="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):X("",!0)])]),r.searchExtension?X("",!0):(M(),D("div",olt,[_("label",alt," Extensions Category: ("+me(r.extCatgArr.length)+") ",1),_("select",{id:"extCat",onChange:e[127]||(e[127]=h=>s.update_extension_category(h.target.value,s.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(M(!0),D(Xe,null,gt(r.extCatgArr,(h,E)=>(M(),D("option",{key:E,selected:h==this.extension_category},me(h),9,llt))),128))],32)])),_("div",null,[r.extensionsFiltererd.length>0?(M(),D("div",clt,[_("label",dlt,me(r.searchExtension?"Search results":"Personalities")+": ("+me(r.extensionsFiltererd.length)+") ",1),_("div",{class:Ke(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",r.ezl_collapsed?"":"max-h-96"])},[(M(!0),D(Xe,null,gt(r.extensionsFiltererd,(h,E)=>(M(),Qt(u,{ref_for:!0,ref:"extensionsZoo",key:"index-"+E+"-"+h.name,extension:h,select_language:!0,full_path:h.full_path,"on-mount":s.mountExtension,"on-un-mount":s.unmountExtension,"on-remount":s.remountExtension,"on-reinstall":s.onExtensionReinstall,"on-settings":s.onSettingsExtension},null,8,["extension","full_path","on-mount","on-un-mount","on-remount","on-reinstall","on-settings"]))),128))],2)])):X("",!0)]),r.ezc_collapsed?(M(),D("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[128]||(e[128]=h=>r.ezl_collapsed=!r.ezl_collapsed)},_lt)):(M(),D("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[129]||(e[129]=h=>r.ezl_collapsed=!r.ezl_collapsed)},hlt))],2)]),_("div",flt,[_("div",mlt,[_("button",{onClick:e[130]||(e[130]=Oe(h=>r.mep_collapsed=!r.mep_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[Re(_("div",null,Elt,512),[[At,r.mep_collapsed]]),Re(_("div",null,Slt,512),[[At,!r.mep_collapsed]]),ylt])]),_("div",{class:Ke([{hidden:r.mep_collapsed},"flex flex-col mb-2 px-3 pb-0"])},null,2)]),_("div",vlt,[_("div",Tlt,[_("button",{onClick:e[131]||(e[131]=Oe(h=>r.mc_collapsed=!r.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[Re(_("div",null,Clt,512),[[At,r.mc_collapsed]]),Re(_("div",null,Alt,512),[[At,!r.mc_collapsed]]),wlt])]),_("div",{class:Ke([{hidden:r.mc_collapsed},"flex flex-col mb-2 p-2"])},[_("div",Olt,[_("div",Nlt,[Re(_("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[132]||(e[132]=Oe(()=>{},["stop"])),"onUpdate:modelValue":e[133]||(e[133]=h=>s.configFile.override_personality_model_parameters=h),onChange:e[134]||(e[134]=h=>s.update_setting("override_personality_model_parameters",s.configFile.override_personality_model_parameters))},null,544),[[Mt,s.configFile.override_personality_model_parameters]]),Mlt])]),_("div",{class:Ke(s.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[_("div",Ilt,[Dlt,Re(_("input",{type:"text",id:"seed","onUpdate:modelValue":e[135]||(e[135]=h=>s.configFile.seed=h),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Ze,s.configFile.seed]])]),_("div",Llt,[_("div",klt,[_("div",Plt,[Ult,_("p",Flt,[Re(_("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[136]||(e[136]=h=>s.configFile.temperature=h),onChange:e[137]||(e[137]=h=>r.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.temperature]])])]),Re(_("input",{id:"temperature",onChange:e[138]||(e[138]=h=>r.settingsChanged=!0),type:"range","onUpdate:modelValue":e[139]||(e[139]=h=>s.configFile.temperature=h),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.temperature]])])]),_("div",Blt,[_("div",Glt,[_("div",zlt,[Vlt,_("p",Hlt,[Re(_("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[140]||(e[140]=h=>s.configFile.n_predict=h),onChange:e[141]||(e[141]=h=>r.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.n_predict]])])]),Re(_("input",{id:"predict",type:"range",onChange:e[142]||(e[142]=h=>r.settingsChanged=!0),"onUpdate:modelValue":e[143]||(e[143]=h=>s.configFile.n_predict=h),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.n_predict]])])]),_("div",qlt,[_("div",Ylt,[_("div",$lt,[Wlt,_("p",Klt,[Re(_("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[144]||(e[144]=h=>s.configFile.top_k=h),onChange:e[145]||(e[145]=h=>r.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.top_k]])])]),Re(_("input",{id:"top_k",type:"range",onChange:e[146]||(e[146]=h=>r.settingsChanged=!0),"onUpdate:modelValue":e[147]||(e[147]=h=>s.configFile.top_k=h),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.top_k]])])]),_("div",jlt,[_("div",Qlt,[_("div",Xlt,[Zlt,_("p",Jlt,[Re(_("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[148]||(e[148]=h=>s.configFile.top_p=h),onChange:e[149]||(e[149]=h=>r.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.top_p]])])]),Re(_("input",{id:"top_p",type:"range","onUpdate:modelValue":e[150]||(e[150]=h=>s.configFile.top_p=h),min:"0",max:"1",step:"0.01",onChange:e[151]||(e[151]=h=>r.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.top_p]])])]),_("div",ect,[_("div",tct,[_("div",nct,[ict,_("p",rct,[Re(_("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[152]||(e[152]=h=>s.configFile.repeat_penalty=h),onChange:e[153]||(e[153]=h=>r.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.repeat_penalty]])])]),Re(_("input",{id:"repeat_penalty",onChange:e[154]||(e[154]=h=>r.settingsChanged=!0),type:"range","onUpdate:modelValue":e[155]||(e[155]=h=>s.configFile.repeat_penalty=h),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.repeat_penalty]])])]),_("div",sct,[_("div",oct,[_("div",act,[lct,_("p",cct,[Re(_("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[156]||(e[156]=h=>s.configFile.repeat_last_n=h),onChange:e[157]||(e[157]=h=>r.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.repeat_last_n]])])]),Re(_("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[158]||(e[158]=h=>s.configFile.repeat_last_n=h),min:"0",max:"100",step:"1",onChange:e[159]||(e[159]=h=>r.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Ze,s.configFile.repeat_last_n]])])])],2)],2)])],2)]),Le(p,{ref:"addmodeldialog"},null,512),Le(f,{class:"z-20",show:r.variantSelectionDialogVisible,choices:r.variant_choices,onChoiceSelected:s.onVariantChoiceSelected,onCloseDialog:s.oncloseVariantChoiceDialog,onChoiceValidated:s.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const uct=ft(tnt,[["render",dct],["__scopeId","data-v-7689f05a"]]),_ct={components:{ClipBoardTextInput:_E,Card:Ll},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const n={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};Pe.post("/start_training",n).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(n){const e=n.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(n){console.log("watching model_name",n),this.$refs.clipboardInput.inputValue=n}}},pct={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},hct={class:"mb-4"},fct=_("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),mct=["value"],gct={class:"mb-4"},Ect=_("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),bct={class:"mb-4"},Sct=_("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),yct={class:"mb-4"},vct=_("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),Tct={class:"mb-4"},xct=_("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),Cct={class:"mb-4"},Rct=_("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),Act={class:"mb-4"},wct=_("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),Oct=_("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),Nct={key:1};function Mct(n,e,t,i,r,s){const o=St("Card"),a=St("ClipBoardTextInput");return s.selectedModel!==null&&s.selectedModel.toLowerCase().includes("gptq")?(M(),D("div",pct,[_("form",{onSubmit:e[2]||(e[2]=Oe((...l)=>s.submitForm&&s.submitForm(...l),["prevent"])),class:""},[Le(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:dt(()=>[Le(o,{title:"Model",class:"",isHorizontal:!1},{default:dt(()=>[_("div",hct,[fct,Re(_("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>s.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>n.setModel&&n.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(M(!0),D(Xe,null,gt(s.models,l=>(M(),D("option",{key:l,value:l},me(l),9,mct))),128))],544),[[$n,s.selectedModel]])])]),_:1}),Le(o,{title:"Data",isHorizontal:!1},{default:dt(()=>[_("div",gct,[Ect,Le(a,{id:"model_path",inputType:"file",value:r.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),Le(o,{title:"Training",isHorizontal:!1},{default:dt(()=>[_("div",bct,[Sct,Le(a,{id:"model_path",inputType:"integer",value:r.lr},null,8,["value"])]),_("div",yct,[vct,Le(a,{id:"model_path",inputType:"integer",value:r.num_epochs},null,8,["value"])]),_("div",Tct,[xct,Le(a,{id:"model_path",inputType:"integer",value:r.max_length},null,8,["value"])]),_("div",Cct,[Rct,Le(a,{id:"model_path",inputType:"integer",value:r.batch_size},null,8,["value"])])]),_:1}),Le(o,{title:"Output",isHorizontal:!1},{default:dt(()=>[_("div",Act,[wct,Le(a,{id:"model_path",inputType:"text",value:n.output_dir},null,8,["value"])])]),_:1})]),_:1}),Le(o,{disableHoverAnimation:!0,disableFocus:!0},{default:dt(()=>[Oct]),_:1})],32)])):(M(),D("div",Nct,[Le(o,{title:"Info",class:"",isHorizontal:!1},{default:dt(()=>[$e(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const Ict=ft(_ct,[["render",Mct]]),Dct={components:{ClipBoardTextInput:_E,Card:Ll},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(n){const e=n.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},Lct={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},kct={class:"mb-4"},Pct=_("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),Uct={class:"mb-4"},Fct=_("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),Bct=_("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function Gct(n,e,t,i,r,s){const o=St("ClipBoardTextInput"),a=St("Card");return M(),D("div",Lct,[_("form",{onSubmit:e[0]||(e[0]=Oe((...l)=>s.submitForm&&s.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[Le(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:dt(()=>[Le(a,{title:"Model",class:"",isHorizontal:!1},{default:dt(()=>[_("div",kct,[Pct,Le(o,{id:"model_path",inputType:"text",value:r.model_name},null,8,["value"])]),_("div",Uct,[Fct,Le(o,{id:"model_path",inputType:"text",value:r.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),Le(a,{disableHoverAnimation:!0,disableFocus:!0},{default:dt(()=>[Bct]),_:1})],32)])}const zct=ft(Dct,[["render",Gct]]),Vct={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(n){this.prompt=n}}},Hct={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},qct={class:"bg-white p-8 rounded"},Yct={class:"text-xl font-bold mb-4"};function $ct(n,e,t,i,r,s){return M(),D("div",null,[r.show?(M(),D("div",Hct,[_("div",qct,[_("h2",Yct,me(t.promptText),1),Re(_("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>r.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[Ze,r.inputText]]),_("button",{onClick:e[1]||(e[1]=(...o)=>s.ok&&s.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),_("button",{onClick:e[2]||(e[2]=(...o)=>s.cancel&&s.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):X("",!0)])}const Ew=ft(Vct,[["render",$ct]]),Wct={props:{htmlContent:{type:String,required:!0}}},Kct=["innerHTML"];function jct(n,e,t,i,r,s){return M(),D("div",null,[_("div",{innerHTML:t.htmlContent},null,8,Kct)])}const Qct=ft(Wct,[["render",jct]]);const Xct={props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Form"}},data(){return{collapsed:!0}},computed:{formattedJson(){return typeof this.jsonData=="string"?JSON.stringify(JSON.parse(this.jsonData),null," ").replace(/\n/g,"<br>"):JSON.stringify(this.jsonData,null," ").replace(/\n/g,"<br>")},isObject(){return typeof this.jsonData=="object"&&this.jsonData!==null},isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")}},methods:{toggleCollapsed(){this.collapsed=!this.collapsed},toggleCollapsible(){this.collapsed=!this.collapsed}}},Zct={key:0},Jct={class:"toggle-icon mr-1"},edt={key:0,class:"fas fa-plus-circle text-gray-600"},tdt={key:1,class:"fas fa-minus-circle text-gray-600"},ndt={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},idt={key:0,class:"fas fa-plus-circle text-gray-600"},rdt={key:1,class:"fas fa-minus-circle text-gray-600"},sdt=["innerHTML"];function odt(n,e,t,i,r,s){return s.isContentPresent?(M(),D("div",Zct,[_("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...o)=>s.toggleCollapsible&&s.toggleCollapsible(...o))},[_("span",Jct,[r.collapsed?(M(),D("i",edt)):(M(),D("i",tdt))]),$e(" "+me(t.jsonFormText),1)]),Re(_("div",null,[_("div",ndt,[s.isObject?(M(),D("span",{key:0,onClick:e[1]||(e[1]=(...o)=>s.toggleCollapsed&&s.toggleCollapsed(...o)),class:"toggle-icon cursor-pointer mr-1"},[r.collapsed?(M(),D("i",idt)):(M(),D("i",rdt))])):X("",!0),_("pre",{innerHTML:s.formattedJson},null,8,sdt)])],512),[[At,!r.collapsed]])])):X("",!0)}const adt=ft(Xct,[["render",odt]]),ldt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0}}},cdt={class:"step flex items-center mb-4"},ddt={class:"flex items-center justify-center w-6 h-6 mr-2"},udt={key:0},_dt=_("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),pdt=[_dt],hdt={key:1},fdt=_("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),mdt=[fdt],gdt={key:2},Edt=_("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),bdt=[Edt],Sdt={key:0,role:"status"},ydt=_("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),_("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),vdt=[ydt];function Tdt(n,e,t,i,r,s){return M(),D("div",cdt,[_("div",ddt,[t.done?X("",!0):(M(),D("div",udt,pdt)),t.done&&t.status?(M(),D("div",hdt,mdt)):X("",!0),t.done&&!t.status?(M(),D("div",gdt,bdt)):X("",!0)]),t.done?X("",!0):(M(),D("div",Sdt,vdt)),_("div",{class:Ke(["content flex-1 px-2",{"text-green-500":t.done,"text-yellow-500":!t.done}])},me(t.message),3)])}const xdt=ft(ldt,[["render",Tdt]]),Cdt="/assets/python_block-4008a934.png",Rdt="/assets/javascript_block-5e59df30.svg",Adt="/assets/cpp_block-109b2fbe.png",wdt="/assets/html5_block-205d2852.png",Odt="/assets/bash_block-7ca80e4e.png";const ax="/",Ndt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:hw,Step:xdt,RenderHTMLJS:Qct,JsonViewer:adt,DynamicUIRenderer:gw},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:""},data(){return{isSynthesizingVoice:!1,cpp_block:Adt,html5_block:wdt,javascript_block:Rdt,python_block:Cdt,bash_block:Odt,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){"speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0&&this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged)):console.error("Speech synthesis is not supported in this browser."),Ue(()=>{Fe.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight})},methods:{insertTab(n){const e=n.target,t=e.selectionStart,i=e.selectionEnd,r=e.value.substring(0,t),s=e.value.substring(i),o=r+" "+s;this.message.content=o,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+4}),n.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){this.isSynthesizingVoice?(this.$refs.audio_player.pause(),this.isSynthesizingVoice=!1):(this.isSynthesizingVoice=!0,Pe.post("./read",{text:this.message.content}).then(n=>{let e=n.data.url;console.log(e),this.audio_url=e}).catch(n=>{this.$store.state.toast.showToast(`Error: ${n}`,4,!1),this.isSynthesizingVoice=!1}))},speak(){if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let n=0;console.log("voice on"),this.isSpeaking=!0;const e=200;this.message.content,this.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(r=>r.name===this.$store.state.config.audio_out_voice)[0]);const t=r=>{let s=this.message.content.substring(r,r+e);const o=[".","!","?",` `];let a=-1;return o.forEach(l=>{const c=s.lastIndexOf(l);c>a&&(a=c)}),a==-1&&(a=s.length),console.log(a),a+r+1},i=()=>{if(this.message.content.includes(".")){const r=t(n),s=this.message.content.substring(n,r);this.msg.text=s,n=r+1,this.msg.onend=o=>{n<this.message.content.length-2?setTimeout(()=>{i()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",r))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{i()},1)};i()},toggleModel(){this.expanded=!this.expanded},addBlock(n){let e=this.$refs.mdTextarea.selectionStart;e==0||this.message.content[e-1]==` -`?(this.message.content=this.message.content.slice(0,e)+"```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+4+n.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+3+n.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=e},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content),this.editMsgMode=!1},resendMessage(n){this.$emit("resendMessage",this.message.id,this.message.content,n)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?(console.log("Avatar:",ax+this.avatar),ax+this.avatar):(console.log("No avatar found"),Vo)},defaultImg(n){n.target.src=Vo},parseDate(n){let e=new Date(Date.parse(n)),i=Math.floor((new Date-e)/1e3);return i<=1?"just now":i<20?i+" seconds ago":i<40?"half a minute ago":i<60?"less than a minute ago":i<=90?"one minute ago":i<=3540?Math.round(i/60)+" minutes ago":i<=5400?"1 hour ago":i<=86400?Math.round(i/3600)+" hours ago":i<=129600?"1 day ago":i<604800?Math.round(i/86400)+" days ago":i<=777600?"1 week ago":n},prettyDate(n){let e=new Date((n||"").replace(/-/g,"/").replace(/[TZ]/g," ")),t=(new Date().getTime()-e.getTime())/1e3,i=Math.floor(t/86400);if(!(isNaN(i)||i<0||i>=31))return i==0&&(t<60&&"just now"||t<120&&"1 minute ago"||t<3600&&Math.floor(t/60)+" minutes ago"||t<7200&&"1 hour ago"||t<86400&&Math.floor(t/3600)+" hours ago")||i==1&&"Yesterday"||i<7&&i+" days ago"||i<31&&Math.ceil(i/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(n){n&&(this.$refs.audio_player.src=n)},"message.content":function(n){this.$store.state.config.auto_speak&&(this.isSpeaking||this.checkForFullSentence())},"message.ui":function(n){console.log("ui changed"),console.log(this.message.ui)},showConfirmation(){Ue(()=>{Fe.replace()})},deleteMsgMode(){Ue(()=>{Fe.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(n){this.message.open=n,this.editMsgMode_=n,Ue(()=>{Fe.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const n=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===n.getTime()||!e.getTime())return;let i=e.getTime()-n.getTime();const r=Math.floor(i/(1e3*60*60));i-=r*(1e3*60*60);const s=Math.floor(i/(1e3*60));i-=s*(1e3*60);const o=Math.floor(i/1e3);i-=o*1e3;function a(c){return c<10&&(c="0"+c),c}return a(r)+"h:"+a(s)+"m:"+a(o)+"s"}}},Mdt={class:"relative w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},Idt={class:"flex flex-row gap-2"},Ddt={class:"flex-shrink-0"},Ldt={class:"group/avatar"},kdt=["src","data-popover-target"],Pdt={class:"flex flex-col w-full flex-grow-0"},Udt={class:"flex flex-row flex-grow items-start"},Fdt={class:"flex flex-col mb-2"},Bdt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Gdt=["title"],zdt=_("div",{class:"flex-grow"},null,-1),Vdt={class:"flex-row justify-end mx-2"},Hdt={class:"invisible group-hover:visible flex flex-row"},qdt={key:0,class:"flex items-center duration-75"},Ydt=_("i",{"data-feather":"x"},null,-1),$dt=[Ydt],Wdt=_("i",{"data-feather":"check"},null,-1),Kdt=[Wdt],jdt=_("i",{"data-feather":"edit"},null,-1),Qdt=[jdt],Xdt=["src"],Zdt=["src"],Jdt=["src"],eut=["src"],tut=_("i",{"data-feather":"copy"},null,-1),nut=[tut],iut=_("i",{"data-feather":"send"},null,-1),rut=[iut],sut=_("i",{"data-feather":"send"},null,-1),out=[sut],aut=_("i",{"data-feather":"fast-forward"},null,-1),lut=[aut],cut={key:9,class:"flex items-center duration-75"},dut=_("i",{"data-feather":"x"},null,-1),uut=[dut],_ut=_("i",{"data-feather":"check"},null,-1),put=[_ut],hut=_("i",{"data-feather":"trash"},null,-1),fut=[hut],mut=_("i",{"data-feather":"thumbs-up"},null,-1),gut=[mut],Eut={class:"flex flex-row items-center"},but=_("i",{"data-feather":"thumbs-down"},null,-1),Sut=[but],yut={class:"flex flex-row items-center"},vut=_("i",{"data-feather":"volume-2"},null,-1),Tut=[vut],xut={key:11,class:"flex flex-row items-center"},Cut=_("i",{"data-feather":"voicemail"},null,-1),Rut=[Cut],Aut={key:1,"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wut=_("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),Out=_("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1),Nut=[wut,Out],Mut={class:"overflow-x-auto w-full"},Iut={class:"flex flex-col items-start w-full"},Dut={class:"flex flex-col items-start w-full"},Lut={key:1},kut=["src"],Put={class:"text-sm text-gray-400 mt-2"},Uut={class:"flex flex-row items-center gap-2"},Fut={key:0},But={class:"font-thin"},Gut={key:1},zut={class:"font-thin"},Vut={key:2},Hut={class:"font-thin"},qut={key:3},Yut=["title"];function $ut(n,e,t,i,r,s){const o=St("Step"),a=St("RenderHTMLJS"),l=St("MarkdownRenderer"),c=St("JsonViewer"),d=St("DynamicUIRenderer");return M(),D("div",Mdt,[_("div",Idt,[_("div",Ddt,[_("div",Ldt,[_("img",{src:s.getImgUrl(),onError:e[0]||(e[0]=u=>s.defaultImg(u)),"data-popover-target":"avatar"+t.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,kdt)])]),_("div",Pdt,[_("div",Udt,[_("div",Fdt,[_("div",Bdt,me(t.message.sender)+" ",1),t.message.created_at?(M(),D("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+s.created_at_parsed},me(s.created_at),9,Gdt)):X("",!0)]),zdt,_("div",Vdt,[_("div",Hdt,[s.editMsgMode?(M(),D("div",qdt,[_("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[1]||(e[1]=Oe(u=>s.editMsgMode=!1,["stop"]))},$dt),_("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[2]||(e[2]=Oe((...u)=>s.updateMessage&&s.updateMessage(...u),["stop"]))},Kdt)])):X("",!0),s.editMsgMode?X("",!0):(M(),D("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Edit message",onClick:e[3]||(e[3]=Oe(u=>s.editMsgMode=!0,["stop"]))},Qdt)),s.editMsgMode?(M(),D("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Add python block",onClick:e[4]||(e[4]=Oe(u=>s.addBlock("python"),["stop"]))},[_("img",{src:r.python_block,width:"25",height:"25"},null,8,Xdt)])):X("",!0),s.editMsgMode?(M(),D("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Add javascript block",onClick:e[5]||(e[5]=Oe(u=>s.addBlock("javascript"),["stop"]))},[_("img",{src:r.javascript_block,width:"25",height:"25"},null,8,Zdt)])):X("",!0),s.editMsgMode?(M(),D("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Add c++ block",onClick:e[6]||(e[6]=Oe(u=>s.addBlock("c++"),["stop"]))},[_("img",{src:r.cpp_block,width:"25",height:"25"},null,8,Jdt)])):X("",!0),s.editMsgMode?(M(),D("div",{key:5,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Add bash block",onClick:e[7]||(e[7]=Oe(u=>s.addBlock("bash"),["stop"]))},[_("img",{src:r.bash_block,width:"25",height:"25"},null,8,eut)])):X("",!0),_("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Copy message to clipboard",onClick:e[8]||(e[8]=Oe(u=>s.copyContentToClipboard(),["stop"]))},nut),!s.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(M(),D("div",{key:6,class:Ke(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2",{"text-5xl":s.editMsgMode}]),title:"Resend message with full context",onClick:e[9]||(e[9]=Oe(u=>s.resendMessage("full_context"),["stop"]))},rut,2)):X("",!0),!s.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(M(),D("div",{key:7,class:Ke(["text-lg hover:text-secondary duration-75 active:scale-90 p-2",{"text-5xl":s.editMsgMode}]),title:"Resend message without the full context",onClick:e[10]||(e[10]=Oe(u=>s.resendMessage("simple_question"),["stop"]))},out,2)):X("",!0),!s.editMsgMode&&t.message.sender==this.$store.state.mountedPers.name?(M(),D("div",{key:8,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Resend message",onClick:e[11]||(e[11]=Oe(u=>s.continueMessage(),["stop"]))},lut)):X("",!0),r.deleteMsgMode?(M(),D("div",cut,[_("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel removal",type:"button",onClick:e[12]||(e[12]=Oe(u=>r.deleteMsgMode=!1,["stop"]))},uut),_("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Confirm removal",type:"button",onClick:e[13]||(e[13]=Oe(u=>s.deleteMsg(),["stop"]))},put)])):X("",!0),!s.editMsgMode&&!r.deleteMsgMode?(M(),D("div",{key:10,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Remove message",onClick:e[14]||(e[14]=u=>r.deleteMsgMode=!0)},fut)):X("",!0),_("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Upvote",onClick:e[15]||(e[15]=Oe(u=>s.rankUp(),["stop"]))},gut),_("div",Eut,[_("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Downvote",onClick:e[16]||(e[16]=Oe(u=>s.rankDown(),["stop"]))},Sut),t.message.rank!=0?(M(),D("div",{key:0,class:Ke(["rounded-full px-2 text-sm flex items-center justify-center font-bold",t.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},me(t.message.rank),3)):X("",!0)]),_("div",yut,[_("div",{class:Ke(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2",{"text-red-500":s.isTalking}]),title:"speak",onClick:e[17]||(e[17]=Oe(u=>s.speak(),["stop"]))},Tut,2)]),this.$store.state.config.enable_voice_service?(M(),D("div",xut,[r.isSynthesizingVoice?(M(),D("div",{key:0,class:Ke(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2",{"text-red-500":s.isTalking}]),title:"read",onClick:e[18]||(e[18]=Oe(u=>s.read(),["stop"]))},Rut,2)):(M(),D("svg",Aut,Nut))])):X("",!0)])])]),_("div",Mut,[_("div",Iut,[(M(!0),D(Xe,null,gt(t.message.steps,(u,p)=>(M(),D("div",{key:"step-"+t.message.id+"-"+p,class:"step font-bold",style:un({backgroundColor:u.done?"transparent":"inherit"})},[Le(o,{done:u.done,message:u.message,status:u.status},null,8,["done","message","status"])],4))),128))]),_("div",Dut,[(M(!0),D(Xe,null,gt(t.message.html_js_s,(u,p)=>(M(),D("div",{key:"htmljs-"+t.message.id+"-"+p,class:"htmljs font-bold",style:un({backgroundColor:n.step.done?"transparent":"inherit"})},[Le(a,{htmlContent:u},null,8,["htmlContent"])],4))),128))]),s.editMsgMode?X("",!0):(M(),Qt(l,{key:0,ref:"mdRender",host:t.host,"markdown-text":t.message.content,message_id:t.message.id,discussion_id:t.message.discussion_id},null,8,["host","markdown-text","message_id","discussion_id"])),_("div",null,[t.message.open?Re((M(),D("textarea",{key:0,ref:"mdTextarea",onKeydown:e[19]||(e[19]=Fo(Oe((...u)=>s.insertTab&&s.insertTab(...u),["prevent"]),["tab"])),class:"block min-h-[900px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,style:un({minHeight:r.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[20]||(e[20]=u=>t.message.content=u)},`\r +`?(this.message.content=this.message.content.slice(0,e)+"```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+4+n.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+3+n.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=e},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content),this.editMsgMode=!1},resendMessage(n){this.$emit("resendMessage",this.message.id,this.message.content,n)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?(console.log("Avatar:",ax+this.avatar),ax+this.avatar):(console.log("No avatar found"),Vo)},defaultImg(n){n.target.src=Vo},parseDate(n){let e=new Date(Date.parse(n)),i=Math.floor((new Date-e)/1e3);return i<=1?"just now":i<20?i+" seconds ago":i<40?"half a minute ago":i<60?"less than a minute ago":i<=90?"one minute ago":i<=3540?Math.round(i/60)+" minutes ago":i<=5400?"1 hour ago":i<=86400?Math.round(i/3600)+" hours ago":i<=129600?"1 day ago":i<604800?Math.round(i/86400)+" days ago":i<=777600?"1 week ago":n},prettyDate(n){let e=new Date((n||"").replace(/-/g,"/").replace(/[TZ]/g," ")),t=(new Date().getTime()-e.getTime())/1e3,i=Math.floor(t/86400);if(!(isNaN(i)||i<0||i>=31))return i==0&&(t<60&&"just now"||t<120&&"1 minute ago"||t<3600&&Math.floor(t/60)+" minutes ago"||t<7200&&"1 hour ago"||t<86400&&Math.floor(t/3600)+" hours ago")||i==1&&"Yesterday"||i<7&&i+" days ago"||i<31&&Math.ceil(i/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(n){n&&(this.$refs.audio_player.src=n)},"message.content":function(n){this.$store.state.config.auto_speak&&(this.isSpeaking||this.checkForFullSentence())},"message.ui":function(n){console.log("ui changed"),console.log(this.message.ui)},showConfirmation(){Ue(()=>{Fe.replace()})},deleteMsgMode(){Ue(()=>{Fe.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(n){this.message.open=n,this.editMsgMode_=n,Ue(()=>{Fe.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const n=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===n.getTime()||!e.getTime())return;let i=e.getTime()-n.getTime();const r=Math.floor(i/(1e3*60*60));i-=r*(1e3*60*60);const s=Math.floor(i/(1e3*60));i-=s*(1e3*60);const o=Math.floor(i/1e3);i-=o*1e3;function a(c){return c<10&&(c="0"+c),c}return a(r)+"h:"+a(s)+"m:"+a(o)+"s"}}},Mdt={class:"relative w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},Idt={class:"flex flex-row gap-2"},Ddt={class:"flex-shrink-0"},Ldt={class:"group/avatar"},kdt=["src","data-popover-target"],Pdt={class:"flex flex-col w-full flex-grow-0"},Udt={class:"flex flex-row flex-grow items-start"},Fdt={class:"flex flex-col mb-2"},Bdt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Gdt=["title"],zdt=_("div",{class:"flex-grow"},null,-1),Vdt={class:"flex-row justify-end mx-2"},Hdt={class:"invisible group-hover:visible flex flex-row"},qdt={key:0,class:"flex items-center duration-75"},Ydt=_("i",{"data-feather":"x"},null,-1),$dt=[Ydt],Wdt=_("i",{"data-feather":"check"},null,-1),Kdt=[Wdt],jdt=_("i",{"data-feather":"edit"},null,-1),Qdt=[jdt],Xdt=["src"],Zdt=["src"],Jdt=["src"],eut=["src"],tut=_("i",{"data-feather":"copy"},null,-1),nut=[tut],iut=_("i",{"data-feather":"send"},null,-1),rut=[iut],sut=_("i",{"data-feather":"send"},null,-1),out=[sut],aut=_("i",{"data-feather":"fast-forward"},null,-1),lut=[aut],cut={key:9,class:"flex items-center duration-75"},dut=_("i",{"data-feather":"x"},null,-1),uut=[dut],_ut=_("i",{"data-feather":"check"},null,-1),put=[_ut],hut=_("i",{"data-feather":"trash"},null,-1),fut=[hut],mut=_("i",{"data-feather":"thumbs-up"},null,-1),gut=[mut],Eut={class:"flex flex-row items-center"},but=_("i",{"data-feather":"thumbs-down"},null,-1),Sut=[but],yut={class:"flex flex-row items-center"},vut=_("i",{"data-feather":"volume-2"},null,-1),Tut=[vut],xut={key:11,class:"flex flex-row items-center"},Cut=_("i",{"data-feather":"voicemail"},null,-1),Rut=[Cut],Aut={key:1,"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wut=_("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),Out=_("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1),Nut=[wut,Out],Mut={class:"overflow-x-auto w-full"},Iut={class:"flex flex-col items-start w-full"},Dut={class:"flex flex-col items-start w-full"},Lut={key:1},kut=["src"],Put={class:"text-sm text-gray-400 mt-2"},Uut={class:"flex flex-row items-center gap-2"},Fut={key:0},But={class:"font-thin"},Gut={key:1},zut={class:"font-thin"},Vut={key:2},Hut={class:"font-thin"},qut={key:3},Yut=["title"];function $ut(n,e,t,i,r,s){const o=St("Step"),a=St("RenderHTMLJS"),l=St("MarkdownRenderer"),c=St("JsonViewer"),d=St("DynamicUIRenderer");return M(),D("div",Mdt,[_("div",Idt,[_("div",Ddt,[_("div",Ldt,[_("img",{src:s.getImgUrl(),onError:e[0]||(e[0]=u=>s.defaultImg(u)),"data-popover-target":"avatar"+t.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,kdt)])]),_("div",Pdt,[_("div",Udt,[_("div",Fdt,[_("div",Bdt,me(t.message.sender)+" ",1),t.message.created_at?(M(),D("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+s.created_at_parsed},me(s.created_at),9,Gdt)):X("",!0)]),zdt,_("div",Vdt,[_("div",Hdt,[s.editMsgMode?(M(),D("div",qdt,[_("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[1]||(e[1]=Oe(u=>s.editMsgMode=!1,["stop"]))},$dt),_("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[2]||(e[2]=Oe((...u)=>s.updateMessage&&s.updateMessage(...u),["stop"]))},Kdt)])):X("",!0),s.editMsgMode?X("",!0):(M(),D("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Edit message",onClick:e[3]||(e[3]=Oe(u=>s.editMsgMode=!0,["stop"]))},Qdt)),s.editMsgMode?(M(),D("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Add python block",onClick:e[4]||(e[4]=Oe(u=>s.addBlock("python"),["stop"]))},[_("img",{src:r.python_block,width:"25",height:"25"},null,8,Xdt)])):X("",!0),s.editMsgMode?(M(),D("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Add javascript block",onClick:e[5]||(e[5]=Oe(u=>s.addBlock("javascript"),["stop"]))},[_("img",{src:r.javascript_block,width:"25",height:"25"},null,8,Zdt)])):X("",!0),s.editMsgMode?(M(),D("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Add c++ block",onClick:e[6]||(e[6]=Oe(u=>s.addBlock("c++"),["stop"]))},[_("img",{src:r.cpp_block,width:"25",height:"25"},null,8,Jdt)])):X("",!0),s.editMsgMode?(M(),D("div",{key:5,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Add bash block",onClick:e[7]||(e[7]=Oe(u=>s.addBlock("bash"),["stop"]))},[_("img",{src:r.bash_block,width:"25",height:"25"},null,8,eut)])):X("",!0),_("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Copy message to clipboard",onClick:e[8]||(e[8]=Oe(u=>s.copyContentToClipboard(),["stop"]))},nut),!s.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(M(),D("div",{key:6,class:Ke(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2",{"text-5xl":s.editMsgMode}]),title:"Resend message with full context",onClick:e[9]||(e[9]=Oe(u=>s.resendMessage("full_context"),["stop"]))},rut,2)):X("",!0),!s.editMsgMode&&t.message.sender!=this.$store.state.mountedPers.name?(M(),D("div",{key:7,class:Ke(["text-lg hover:text-secondary duration-75 active:scale-90 p-2",{"text-5xl":s.editMsgMode}]),title:"Resend message without the full context",onClick:e[10]||(e[10]=Oe(u=>s.resendMessage("simple_question"),["stop"]))},out,2)):X("",!0),!s.editMsgMode&&t.message.sender==this.$store.state.mountedPers.name?(M(),D("div",{key:8,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Resend message",onClick:e[11]||(e[11]=Oe(u=>s.continueMessage(),["stop"]))},lut)):X("",!0),r.deleteMsgMode?(M(),D("div",cut,[_("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel removal",type:"button",onClick:e[12]||(e[12]=Oe(u=>r.deleteMsgMode=!1,["stop"]))},uut),_("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Confirm removal",type:"button",onClick:e[13]||(e[13]=Oe(u=>s.deleteMsg(),["stop"]))},put)])):X("",!0),!s.editMsgMode&&!r.deleteMsgMode?(M(),D("div",{key:10,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Remove message",onClick:e[14]||(e[14]=u=>r.deleteMsgMode=!0)},fut)):X("",!0),_("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2",title:"Upvote",onClick:e[15]||(e[15]=Oe(u=>s.rankUp(),["stop"]))},gut),_("div",Eut,[_("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Downvote",onClick:e[16]||(e[16]=Oe(u=>s.rankDown(),["stop"]))},Sut),t.message.rank!=0?(M(),D("div",{key:0,class:Ke(["rounded-full px-2 text-sm flex items-center justify-center font-bold",t.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},me(t.message.rank),3)):X("",!0)]),_("div",yut,[_("div",{class:Ke(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2",{"text-red-500":s.isTalking}]),title:"speak",onClick:e[17]||(e[17]=Oe(u=>s.speak(),["stop"]))},Tut,2)]),this.$store.state.config.enable_voice_service?(M(),D("div",xut,[r.isSynthesizingVoice?(M(),D("svg",Aut,Nut)):(M(),D("div",{key:0,class:Ke(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2",{"text-red-500":s.isTalking}]),title:"read",onClick:e[18]||(e[18]=Oe(u=>s.read(),["stop"]))},Rut,2))])):X("",!0)])])]),_("div",Mut,[_("div",Iut,[(M(!0),D(Xe,null,gt(t.message.steps,(u,p)=>(M(),D("div",{key:"step-"+t.message.id+"-"+p,class:"step font-bold",style:un({backgroundColor:u.done?"transparent":"inherit"})},[Le(o,{done:u.done,message:u.message,status:u.status},null,8,["done","message","status"])],4))),128))]),_("div",Dut,[(M(!0),D(Xe,null,gt(t.message.html_js_s,(u,p)=>(M(),D("div",{key:"htmljs-"+t.message.id+"-"+p,class:"htmljs font-bold",style:un({backgroundColor:n.step.done?"transparent":"inherit"})},[Le(a,{htmlContent:u},null,8,["htmlContent"])],4))),128))]),s.editMsgMode?X("",!0):(M(),Qt(l,{key:0,ref:"mdRender",host:t.host,"markdown-text":t.message.content,message_id:t.message.id,discussion_id:t.message.discussion_id},null,8,["host","markdown-text","message_id","discussion_id"])),_("div",null,[t.message.open?Re((M(),D("textarea",{key:0,ref:"mdTextarea",onKeydown:e[19]||(e[19]=Fo(Oe((...u)=>s.insertTab&&s.insertTab(...u),["prevent"]),["tab"])),class:"block min-h-[900px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,style:un({minHeight:r.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[20]||(e[20]=u=>t.message.content=u)},`\r `,36)),[[Ze,t.message.content]]):X("",!0)]),t.message.metadata!==null?(M(),D("div",Lut,[(M(!0),D(Xe,null,gt(t.message.metadata,(u,p)=>(M(),D("div",{key:"json-"+t.message.id+"-"+p,class:"json font-bold"},[Le(c,{jsonFormText:u.title,jsonData:u.content},null,8,["jsonFormText","jsonData"])]))),128))])):X("",!0),t.message.ui!==null&&t.message.ui!==void 0&&t.message.ui!==""?(M(),Qt(d,{key:2,class:"w-full h-full",code:t.message.ui},null,8,["code"])):X("",!0),r.audio_url!=null?(M(),D("audio",{controls:"",autoplay:"",key:r.audio_url},[_("source",{src:r.audio_url,type:"audio/wav",ref:"audio_player"},null,8,kut),$e(" Your browser does not support the audio element. ")])):X("",!0)]),_("div",Put,[_("div",Uut,[t.message.binding?(M(),D("p",Fut,[$e("Binding: "),_("span",But,me(t.message.binding),1)])):X("",!0),t.message.model?(M(),D("p",Gut,[$e("Model: "),_("span",zut,me(t.message.model),1)])):X("",!0),t.message.seed?(M(),D("p",Vut,[$e("Seed: "),_("span",Hut,me(t.message.seed),1)])):X("",!0),s.time_spent?(M(),D("p",qut,[$e("Time spent: "),_("span",{class:"font-thin",title:"Finished generating: "+s.finished_generating_at_parsed},me(s.time_spent),9,Yut)])):X("",!0)])])])])])}const bw=ft(Ndt,[["render",$ut]]),Wut="/";Pe.defaults.baseURL="/";const Kut={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:Ol,UniversalForm:Nl},data(){return{bUrl:Wut,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},mountedPers:{get(){return this.$store.state.mountedPers},set(n){this.$store.commit("setMountedPers",n)}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}}},methods:{onSettingsPersonality(n){try{Pe.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+n.name,"Save changes","Cancel").then(t=>{try{Pe.post("/set_active_personality_settings",t).then(i=>{i&&i.data?(console.log("personality set with new settings",i.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. `+i,4,!1)})}catch(i){this.$refs.toast.showToast(`Did not get Personality settings responses. Endpoint error: `+i.message,4,!1)}}):this.$refs.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},toggleShowPersList(){this.onShowPersList()},async constructor(){for(Ue(()=>{Fe.replace()});this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100));this.onReady()},async api_get_req(n){try{const e=await Pe.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=Pl}}},jut={class:"w-fit select-none"},Qut={key:0,class:"flex -space-x-4"},Xut=["src","title"],Zut={key:1,class:"flex -space-x-4"},Jut=["src","title"],e_t={key:2,title:"Loading personalities"},t_t=_("div",{role:"status"},[_("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),_("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),_("span",{class:"sr-only"},"Loading...")],-1),n_t=[t_t];function i_t(n,e,t,i,r,s){const o=St("UniversalForm");return M(),D(Xe,null,[_("div",jut,[s.mountedPersArr.length>1?(M(),D("div",Qut,[_("img",{src:r.bUrl+s.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>s.personalityImgPlacehodler&&s.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+s.mountedPers.name,onClick:e[1]||(e[1]=a=>s.onSettingsPersonality(s.mountedPers))},null,40,Xut),_("div",{class:"flex items-center justify-center w-8 h-8 cursor-pointer text-xs font-medium bg-bg-light dark:bg-bg-dark border-2 hover:border-secondary rounded-full hover:bg-bg-light-tone dark:hover:bg-bg-dark-tone dark:border-gray-800 hover:z-20 hover:-translate-y-2 duration-150 active:scale-90",onClick:e[2]||(e[2]=Oe((...a)=>s.toggleShowPersList&&s.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+me(s.mountedPersArr.length-1),1)])):X("",!0),s.mountedPersArr.length==1?(M(),D("div",Zut,[_("img",{src:r.bUrl+this.$store.state.mountedPers.avatar,onError:e[3]||(e[3]=(...a)=>s.personalityImgPlacehodler&&s.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 cursor-pointer border-secondary",title:"Active personality: "+this.$store.state.mountedPers.name,onClick:e[4]||(e[4]=Oe((...a)=>s.toggleShowPersList&&s.toggleShowPersList(...a),["stop"]))},null,40,Jut)])):X("",!0),s.mountedPersArr.length==0?(M(),D("div",e_t,n_t)):X("",!0)]),Le(o,{ref:"universalForm",class:"z-20"},null,512)],64)}const r_t=ft(Kut,[["render",i_t]]);const s_t="/";Pe.defaults.baseURL="/";const o_t={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:mw,Toast:Ol,UniversalForm:Nl},name:"MountedPersonalitiesList",data(){return{bUrl:s_t,isMounted:!1,isLoading:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}}},methods:{toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(n){try{const e=await Pe.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=Pl},onPersonalityReinstall(n){console.log("on reinstall ",n),this.isLoading=!0,Pe.post("/reinstall_personality",{name:n.personality.full_path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$refs.toast.showToast("Personality reinstalled successfully!",4,!0):this.$refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$refs.toast.showToast(`Could not reinstall personality diff --git a/web/dist/index.html b/web/dist/index.html index 8dcd2ca3..3f58edee 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -6,7 +6,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>LoLLMS WebUI - Welcome</title> - <script type="module" crossorigin src="/assets/index-7d4b529a.js"></script> + <script type="module" crossorigin src="/assets/index-822a6f28.js"></script> <link rel="stylesheet" href="/assets/index-7d925527.css"> </head> <body> diff --git a/web/src/components/Message.vue b/web/src/components/Message.vue index fef32be9..74c7b6de 100644 --- a/web/src/components/Message.vue +++ b/web/src/components/Message.vue @@ -151,7 +151,7 @@ </div> </div> <div v-if="this.$store.state.config.enable_voice_service" class="flex flex-row items-center"> - <div v-if="isSynthesizingVoice" class="text-lg hover:text-red-600 duration-75 active:scale-90 p-2" + <div v-if="!isSynthesizingVoice" class="text-lg hover:text-red-600 duration-75 active:scale-90 p-2" title="read" @click.stop="read()" :class="{ 'text-red-500': isTalking }">