From 7401c201b02ac4a2558a2bd24f00de5570d961a3 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 6 Aug 2024 12:19:34 +0200 Subject: [PATCH] upgraded ui --- configs/config.yaml | 3 +- lollms_core | 2 +- .../{index-24edfee9.js => index-484e4067.js} | 340 +++++++++--------- ...{index-dc10c3a5.css => index-b52b9629.css} | 2 +- web/dist/index.html | 4 +- web/src/components/StringListManager.vue | 229 ++++++------ web/src/views/SettingsView.vue | 16 + 7 files changed, 318 insertions(+), 278 deletions(-) rename web/dist/assets/{index-24edfee9.js => index-484e4067.js} (90%) rename web/dist/assets/{index-dc10c3a5.css => index-b52b9629.css} (99%) diff --git a/configs/config.yaml b/configs/config.yaml index 59947231..0e075a3b 100644 --- a/configs/config.yaml +++ b/configs/config.yaml @@ -1,5 +1,5 @@ # =================== Lord Of Large Language Multimodal Systems Configuration file =========================== -version: 131 +version: 132 binding_name: null model_name: null model_variant: null @@ -233,6 +233,7 @@ activate_mistralai_emulator: true use_smart_routing: false smart_routing_router_model : "" smart_routing_models_by_power : [] +restore_model_after_smart_routing : false # elastic search service diff --git a/lollms_core b/lollms_core index 53edc1e8..3ddec989 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit 53edc1e8ceb20b565267feefb6f626bd6748ade7 +Subproject commit 3ddec9895d34cd66e25b09cdb15cd03e651c6a22 diff --git a/web/dist/assets/index-24edfee9.js b/web/dist/assets/index-484e4067.js similarity index 90% rename from web/dist/assets/index-24edfee9.js rename to web/dist/assets/index-484e4067.js index aacb8ae7..8f7f957c 100644 --- a/web/dist/assets/index-24edfee9.js +++ b/web/dist/assets/index-484e4067.js @@ -78,7 +78,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),me=P,re=$),ee===void 0 `+this.text.slice(e,n)+"\n```\n"+this.text.slice(n),e=e+4+t.length):(this.text=this.text.slice(0,e)+"\n```"+t+` `+this.text.slice(e,n)+"\n```\n"+this.text.slice(n),e=e+3+t.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},insertTab(t){const e=t.target,n=e.selectionStart,s=e.selectionEnd,i=e.value.substring(0,n),r=e.value.substring(s),o=i+" "+r;this.text=o,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4}),t.preventDefault()},mdTextarea_changed(){console.log("mdTextarea_changed"),this.cursorPosition=this.$refs.mdTextarea.selectionStart},mdTextarea_clicked(){console.log(`mdTextarea_clicked: ${this.$refs.mdTextarea.selectionStart}`),this.cursorPosition=this.$refs.mdTextarea.selectionStart},setModel(){this.selecting_model=!0,de.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:this.selectedModel}).then(t=>{console.log(t),t.status&&this.$refs.toast.showToast(`Model changed to ${this.selectedModel}`,4,!0),this.selecting_model=!1}).catch(t=>{this.$refs.toast.showToast(`Error ${t}`,4,!0),this.selecting_model=!1})},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){console.log("READING..."),this.isSynthesizingVoice=!0;let t=this.$refs.mdTextarea.selectionStart,e=this.$refs.mdTextarea.selectionEnd,n=this.text;t!=e&&(n=n.slice(t,e)),de.post("./text2Wave",{client_id:this.$store.state.client_id,text:n}).then(s=>{console.log(s.data.url);let i=s.data.url;this.audio_url=i,this.isSynthesizingVoice=!1,Fe(()=>{Ge.replace()})}).catch(s=>{this.$refs.toast.showToast(`Error: ${s}`,4,!1),this.isSynthesizingVoice=!1,Fe(()=>{Ge.replace()})})},speak(){if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let t=0;console.log("voice on"),this.isSpeaking=!0;const e=200;this.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(i=>i.name===this.$store.state.config.audio_out_voice)[0]);const n=i=>{let r=this.text.substring(i,i+e);const o=[".","!","?",` `];let a=-1;return o.forEach(c=>{const u=r.lastIndexOf(c);u>a&&(a=u)}),a==-1&&(a=r.length),console.log(a),a+i+1},s=()=>{const i=n(t),r=this.text.substring(t,i);this.msg.text=r,t=i+1,this.msg.onend=o=>{t{s()},1):(this.isSpeaking=!1,console.log("voice off :",this.text.length," ",i))},this.speechSynthesis.speak(this.msg)};s()},getCursorPosition(){return this.$refs.mdTextarea.selectionStart},appendToOutput(t){this.pre_text+=t,this.text=this.pre_text+this.post_text},generate_in_placeholder(){console.log("Finding cursor position");let t=this.text.indexOf("@@");if(t<0){this.$refs.toast.showToast("No generation placeholder found",4,!1);return}this.text=this.text.substring(0,t)+this.text.substring(t+26,this.text.length),this.pre_text=this.text.substring(0,t),this.post_text=this.text.substring(t,this.text.length);var e=this.text.substring(0,t);console.log(e),qe.emit("generate_text",{prompt:e,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},async tokenize_text(){const t=await de.post("/lollms_tokenize",{prompt:this.text},{headers:this.posts_headers});console.log(t.data.named_tokens),this.namedTokens=t.data.named_tokens},generate(){console.log("Finding cursor position"),this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length);var t=this.text.substring(0,this.getCursorPosition());console.log(this.text),console.log(`cursor position :${this.getCursorPosition()}`),console.log(`pretext:${this.pre_text}`),console.log(`post_text:${this.post_text}`),console.log(`prompt:${t}`),qe.emit("generate_text",{prompt:t,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},stopGeneration(){qe.emit("cancel_text_generation",{})},exportText(){const t=this.text,e=document.createElement("a"),n=new Blob([t],{type:"text/plain"});e.href=URL.createObjectURL(n),e.download="exported_text.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)},importText(){const t=document.getElementById("import-input");t&&(t.addEventListener("change",e=>{if(e.target.files&&e.target.files[0]){const n=new FileReader;n.onload=()=>{this.text=n.result},n.readAsText(e.target.files[0])}else alert("Please select a file.")}),t.click())},setPreset(){console.log("Setting preset"),console.log(this.selectedPreset),this.tab_id="render",this.text=NZe(this.selectedPreset.content,t=>{console.log("Done"),console.log(t),this.text=t})},addPreset(){let t=prompt("Enter the title of the preset:");this.presets[t]={client_id:this.$store.state.client_id,name:t,content:this.text},de.post("./add_preset",this.presets[t]).then(e=>{console.log(e.data)}).catch(e=>{this.$refs.toast.showToast(`Error: ${e}`,4,!1)})},removePreset(){this.selectedPreset&&delete this.presets[this.selectedPreset.name]},reloadPresets(){de.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecording(){this.pending=!0,this.is_recording?de.post("/stop_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!1,this.pending=!1,console.log(t),this.text+=t.data.text,console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):de.post("/start_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!0,this.pending=!1,console.log(t.data)}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecordingAndTranscribing(){this.pending=!0,this.is_deaf_transcribing?de.get("/stop_recording").then(t=>{this.is_deaf_transcribing=!1,this.pending=!1,this.text=t.data.text,this.read()}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):de.get("/start_recording").then(t=>{this.is_deaf_transcribing=!0,this.pending=!1}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length),this.recognition.onresult=t=>{this.generated="";for(let e=t.resultIndex;e{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,this.pre_text=this.pre_text+this.generated,this.cursorPosition=this.pre_text.length,clearTimeout(this.silenceTimer)},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")}}},IZe={class:"container w-full bg-bg-light dark:bg-bg-dark shadow-lg overflow-y-auto 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"},MZe={class:"container flex flex-row m-2 w-full"},DZe={class:"flex-grow max-w-[900px] m-2"},kZe={class:"flex gap-3 flex-1 items-center flex-grow flex-row m-2 p-2 border border-blue-300 rounded-md border-2 border-blue-300 m-2 p-4"},LZe=l("i",{"data-feather":"pen-tool"},null,-1),PZe=[LZe],UZe=l("i",{"data-feather":"archive"},null,-1),FZe=[UZe],BZe=["src"],GZe=l("span",{class:"w-80"},null,-1),VZe=l("i",{"data-feather":"x"},null,-1),zZe=[VZe],HZe=l("i",{"data-feather":"mic"},null,-1),qZe=[HZe],YZe=l("i",{"data-feather":"volume-2"},null,-1),$Ze=[YZe],WZe=l("i",{"data-feather":"speaker"},null,-1),KZe=[WZe],jZe=["src"],QZe=["src"],XZe=["src"],ZZe=["src"],JZe=l("i",{"data-feather":"voicemail"},null,-1),eJe=[JZe],tJe={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"},nJe=l("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),sJe=l("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),iJe=[nJe,sJe],rJe=l("i",{"data-feather":"upload"},null,-1),oJe=[rJe],aJe=l("i",{"data-feather":"download"},null,-1),lJe=[aJe],cJe={class:"flex gap-3 flex-1 items-center flex-grow justify-end"},dJe=l("input",{type:"file",id:"import-input",class:"hidden"},null,-1),uJe={key:0},pJe={class:"flex flex-row justify-end mx-2"},_Je=["src"],hJe=["src"],fJe=["src"],mJe=["src"],gJe=["src"],bJe=["src"],EJe=["src"],yJe=["src"],vJe=l("i",{"data-feather":"copy"},null,-1),SJe=[vJe],TJe=["src"],xJe={key:2},CJe=["value"],wJe={key:0,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},RJe=l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Selecting model...")],-1),AJe=[RJe],NJe=["value"],OJe=l("br",null,null,-1),IJe=l("i",{"data-feather":"check"},null,-1),MJe=[IJe],DJe=l("i",{"data-feather":"plus"},null,-1),kJe=[DJe],LJe=l("i",{"data-feather":"x"},null,-1),PJe=[LJe],UJe=l("i",{"data-feather":"refresh-ccw"},null,-1),FJe=[UJe],BJe={class:"slider-container ml-2 mr-2"},GJe=l("h3",{class:"text-gray-600"},"Temperature",-1),VJe={class:"slider-value text-gray-500"},zJe={class:"slider-container ml-2 mr-2"},HJe=l("h3",{class:"text-gray-600"},"Top K",-1),qJe={class:"slider-value text-gray-500"},YJe={class:"slider-container ml-2 mr-2"},$Je=l("h3",{class:"text-gray-600"},"Top P",-1),WJe={class:"slider-value text-gray-500"},KJe={class:"slider-container ml-2 mr-2"},jJe=l("h3",{class:"text-gray-600"},"Repeat Penalty",-1),QJe={class:"slider-value text-gray-500"},XJe={class:"slider-container ml-2 mr-2"},ZJe=l("h3",{class:"text-gray-600"},"Repeat Last N",-1),JJe={class:"slider-value text-gray-500"},eet={class:"slider-container ml-2 mr-2"},tet=l("h3",{class:"text-gray-600"},"Number of tokens to crop the text to",-1),net={class:"slider-value text-gray-500"},set={class:"slider-container ml-2 mr-2"},iet=l("h3",{class:"text-gray-600"},"Number of tokens to generate",-1),ret={class:"slider-value text-gray-500"},oet={class:"slider-container ml-2 mr-2"},aet=l("h3",{class:"text-gray-600"},"Seed",-1),cet={class:"slider-value text-gray-500"};function det(t,e,n,s,i,r){const o=ct("tokens-hilighter"),a=ct("MarkdownRenderer"),c=ct("Card"),u=ct("Toast");return T(),w(Ve,null,[l("div",IZe,[l("div",MZe,[l("div",DZe,[l("div",kZe,[U(l("button",{id:"generate-button",title:"Generate from current cursor position",onClick:e[0]||(e[0]=(...d)=>r.generate&&r.generate(...d)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},PZe,512),[[wt,!i.generating]]),U(l("button",{id:"generate-next-button",title:"Generate from next place holder",onClick:e[1]||(e[1]=(...d)=>r.generate_in_placeholder&&r.generate_in_placeholder(...d)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},FZe,512),[[wt,!i.generating]]),U(l("button",{id:"tokenize",title:"Tokenize text",onClick:e[2]||(e[2]=(...d)=>r.tokenize_text&&r.tokenize_text(...d)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},[l("img",{width:"25",height:"25",src:i.tokenize_icon},null,8,BZe)],512),[[wt,!i.generating]]),GZe,U(l("button",{id:"stop-button",onClick:e[3]||(e[3]=(...d)=>r.stopGeneration&&r.stopGeneration(...d)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},zZe,512),[[wt,i.generating]]),l("button",{type:"button",title:"Dictate (using your browser for transcription)",onClick:e[4]||(e[4]=(...d)=>r.startSpeechRecognition&&r.startSpeechRecognition(...d)),class:Ue([{"text-red-500":i.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"])},qZe,2),l("button",{title:"convert text to audio (not saved and uses your browser tts service)",onClick:e[5]||(e[5]=ae(d=>r.speak(),["stop"])),class:Ue([{"text-red-500":r.isTalking},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"])},$Ze,2),l("input",{type:"file",ref:"fileInput",onChange:e[6]||(e[6]=(...d)=>r.handleFileUpload&&r.handleFileUpload(...d)),style:{display:"none"},accept:".wav"},null,544),l("button",{title:"Upload a voice",onClick:e[7]||(e[7]=(...d)=>r.triggerFileUpload&&r.triggerFileUpload(...d))},KZe),l("button",{type:"button",title:"Start audio to audio",onClick:e[8]||(e[8]=(...d)=>r.startRecordingAndTranscribing&&r.startRecordingAndTranscribing(...d)),class:Ue([{"text-green-500":i.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer text-red-500"])},[i.pending?G("",!0):(T(),w("img",{key:0,src:i.is_deaf_transcribing?i.deaf_on:i.deaf_off,height:"25"},null,8,jZe)),i.pending?(T(),w("img",{key:1,src:i.loading_icon,height:"25"},null,8,QZe)):G("",!0)],2),l("button",{type:"button",title:"Start recording audio",onClick:e[9]||(e[9]=(...d)=>r.startRecording&&r.startRecording(...d)),class:Ue([{"text-green-500":i.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer text-red-500"])},[i.pending?G("",!0):(T(),w("img",{key:0,src:i.is_recording?i.rec_on:i.rec_off,height:"25"},null,8,XZe)),i.pending?(T(),w("img",{key:1,src:i.loading_icon,height:"25"},null,8,ZZe)):G("",!0)],2),i.isSynthesizingVoice?(T(),w("svg",tJe,iJe)):(T(),w("button",{key:0,title:"generate audio from the text",onClick:e[10]||(e[10]=ae(d=>r.read(),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},eJe)),U(l("button",{id:"export-button",onClick:e[11]||(e[11]=(...d)=>r.exportText&&r.exportText(...d)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},oJe,512),[[wt,!i.generating]]),U(l("button",{id:"import-button",onClick:e[12]||(e[12]=(...d)=>r.importText&&r.importText(...d)),class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer"},lJe,512),[[wt,!i.generating]]),l("div",cJe,[l("button",{class:Ue(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="source"}]),onClick:e[13]||(e[13]=d=>i.tab_id="source")}," Source ",2),l("button",{class:Ue(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="render"}]),onClick:e[14]||(e[14]=d=>i.tab_id="render")}," Render ",2)]),dJe]),l("div",{class:Ue(["flex-grow m-2 p-2 border border-blue-300 rounded-md border-2 border-blue-300 m-2 p-4",{"border-red-500":i.generating}])},[i.tab_id==="source"?(T(),w("div",uJe,[l("div",pJe,[l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add generic block",onClick:e[15]||(e[15]=ae(d=>r.addBlock(""),["stop"]))},[l("img",{src:i.code_block,width:"25",height:"25"},null,8,_Je)]),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add python block",onClick:e[16]||(e[16]=ae(d=>r.addBlock("python"),["stop"]))},[l("img",{src:i.python_block,width:"25",height:"25"},null,8,hJe)]),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add javascript block",onClick:e[17]||(e[17]=ae(d=>r.addBlock("javascript"),["stop"]))},[l("img",{src:i.javascript_block,width:"25",height:"25"},null,8,fJe)]),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add json block",onClick:e[18]||(e[18]=ae(d=>r.addBlock("json"),["stop"]))},[l("img",{src:i.json_block,width:"25",height:"25"},null,8,mJe)]),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add c++ block",onClick:e[19]||(e[19]=ae(d=>r.addBlock("c++"),["stop"]))},[l("img",{src:i.cpp_block,width:"25",height:"25"},null,8,gJe)]),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add html block",onClick:e[20]||(e[20]=ae(d=>r.addBlock("html"),["stop"]))},[l("img",{src:i.html5_block,width:"25",height:"25"},null,8,bJe)]),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add LaTex block",onClick:e[21]||(e[21]=ae(d=>r.addBlock("latex"),["stop"]))},[l("img",{src:i.LaTeX_block,width:"25",height:"25"},null,8,EJe)]),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add bash block",onClick:e[22]||(e[22]=ae(d=>r.addBlock("bash"),["stop"]))},[l("img",{src:i.bash_block,width:"25",height:"25"},null,8,yJe)]),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Copy message to clipboard",onClick:e[23]||(e[23]=ae(d=>t.copyContentToClipboard(),["stop"]))},SJe)]),U(l("textarea",{ref:"mdTextarea",onKeydown:e[24]||(e[24]=ti(ae((...d)=>r.insertTab&&r.insertTab(...d),["prevent"]),["tab"])),class:"block min-h-500 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:$t({minHeight:i.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[25]||(e[25]=d=>i.text=d),onClick:e[26]||(e[26]=ae((...d)=>r.mdTextarea_clicked&&r.mdTextarea_clicked(...d),["prevent"])),onChange:e[27]||(e[27]=ae((...d)=>r.mdTextarea_changed&&r.mdTextarea_changed(...d),["prevent"]))},`\r - `,36),[[ue,i.text]]),l("span",null,"Cursor position "+J(i.cursorPosition),1)])):G("",!0),i.audio_url!=null?(T(),w("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,TJe),Xe(" Your browser does not support the audio element. ")])):G("",!0),_e(o,{namedTokens:i.namedTokens},null,8,["namedTokens"]),i.tab_id==="render"?(T(),w("div",xJe,[_e(a,{ref:"mdRender",client_id:this.$store.state.client_id,message_id:0,discussion_id:0,"markdown-text":i.text,class:"mt-4 p-2 rounded shadow-lg dark:bg-bg-dark"},null,8,["client_id","markdown-text"])])):G("",!0)],2)]),_e(c,{title:"settings",class:"slider-container ml-0 mr-0",isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[_e(c,{title:"Model",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[U(l("select",{"onUpdate:modelValue":e[28]||(e[28]=d=>this.$store.state.selectedModel=d),onChange:e[29]||(e[29]=(...d)=>r.setModel&&r.setModel(...d)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),w(Ve,null,Je(r.models,d=>(T(),w("option",{key:d,value:d},J(d),9,CJe))),128))],544),[[Vt,this.$store.state.selectedModel]]),i.selecting_model?(T(),w("div",wJe,AJe)):G("",!0)]),_:1}),_e(c,{title:"Presets",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[U(l("select",{"onUpdate:modelValue":e[30]||(e[30]=d=>i.selectedPreset=d),class:"bg-white dark:bg-black mb-2 border-2 rounded-md shadow-sm w-full"},[(T(!0),w(Ve,null,Je(i.presets,d=>(T(),w("option",{key:d,value:d},J(d.name),9,NJe))),128))],512),[[Vt,i.selectedPreset]]),OJe,l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[31]||(e[31]=(...d)=>r.setPreset&&r.setPreset(...d)),title:"Use preset"},MJe),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[32]||(e[32]=(...d)=>r.addPreset&&r.addPreset(...d)),title:"Add this text as a preset"},kJe),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[33]||(e[33]=(...d)=>r.removePreset&&r.removePreset(...d)),title:"Remove preset"},PJe),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[34]||(e[34]=(...d)=>r.reloadPresets&&r.reloadPresets(...d)),title:"Reload presets list"},FJe)]),_:1}),_e(c,{title:"Generation params",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[l("div",BJe,[GJe,U(l("input",{type:"range","onUpdate:modelValue":e[35]||(e[35]=d=>i.temperature=d),min:"0",max:"5",step:"0.1",class:"w-full"},null,512),[[ue,i.temperature]]),l("span",VJe,"Current value: "+J(i.temperature),1)]),l("div",zJe,[HJe,U(l("input",{type:"range","onUpdate:modelValue":e[36]||(e[36]=d=>i.top_k=d),min:"1",max:"100",step:"1",class:"w-full"},null,512),[[ue,i.top_k]]),l("span",qJe,"Current value: "+J(i.top_k),1)]),l("div",YJe,[$Je,U(l("input",{type:"range","onUpdate:modelValue":e[37]||(e[37]=d=>i.top_p=d),min:"0",max:"1",step:"0.1",class:"w-full"},null,512),[[ue,i.top_p]]),l("span",WJe,"Current value: "+J(i.top_p),1)]),l("div",KJe,[jJe,U(l("input",{type:"range","onUpdate:modelValue":e[38]||(e[38]=d=>i.repeat_penalty=d),min:"0",max:"5",step:"0.1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.repeat_penalty]]),l("span",QJe,"Current value: "+J(i.repeat_penalty),1)]),l("div",XJe,[ZJe,U(l("input",{type:"range","onUpdate:modelValue":e[39]||(e[39]=d=>i.repeat_last_n=d),min:"0",max:"100",step:"1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.repeat_last_n]]),l("span",JJe,"Current value: "+J(i.repeat_last_n),1)]),l("div",eet,[tet,U(l("input",{type:"number","onUpdate:modelValue":e[40]||(e[40]=d=>i.n_crop=d),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.n_crop]]),l("span",net,"Current value: "+J(i.n_crop),1)]),l("div",set,[iet,U(l("input",{type:"number","onUpdate:modelValue":e[41]||(e[41]=d=>i.n_predicts=d),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.n_predicts]]),l("span",ret,"Current value: "+J(i.n_predicts),1)]),l("div",oet,[aet,U(l("input",{type:"number","onUpdate:modelValue":e[42]||(e[42]=d=>i.seed=d),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.seed]]),l("span",cet,"Current value: "+J(i.seed),1)])]),_:1})]),_:1})])]),_e(u,{ref:"toast"},null,512)],64)}const uet=at(OZe,[["render",det]]);const pet={data(){return{activeExtension:null}},computed:{activeExtensions(){return console.log(this.$store.state.extensionsZoo),console.log(fI(this.$store.state.extensionsZoo)),this.$store.state.extensionsZoo}},methods:{showExtensionPage(t){this.activeExtension=t}}},_et={class:"container overflow-y-scroll flex flex-col 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"},het={key:0},fet=["onClick"],met={key:0},get=["src"],bet={key:1},Eet=l("p",null,"No extension is active. Please install and activate an extension.",-1),yet=[Eet];function vet(t,e,n,s,i,r){return T(),w("div",_et,[r.activeExtensions.length>0?(T(),w("div",het,[(T(!0),w(Ve,null,Je(r.activeExtensions,o=>(T(),w("div",{key:o.name,onClick:a=>r.showExtensionPage(o)},[l("div",{class:Ue({"active-tab":o===i.activeExtension})},J(o.name),3)],8,fet))),128)),i.activeExtension?(T(),w("div",met,[l("iframe",{src:i.activeExtension.page,width:"100%",height:"500px",frameborder:"0"},null,8,get)])):G("",!0)])):(T(),w("div",bet,yet))])}const Tet=at(pet,[["render",vet]]),xet={},Cet={style:{width:"100vw",height:"100vh"}},wet=l("iframe",{src:"/help/index.html",class:"m-0 p-0 w-full h-full"},null,-1),Ret=[wet];function Aet(t,e,n,s,i,r){return T(),w("div",Cet,Ret)}const Net=at(xet,[["render",Aet]]);function Xs(t,e=!0,n=1){const s=e?1e3:1024;if(Math.abs(t)=s&&r{Ge.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected",t),t.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(t))},positionMenu(){var t;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),n=window.innerHeight;t=e.bottom>n/2}else this.force_position==1?t=!0:t=!1;this.menuPosition.top=t?"auto":"calc(100% + 10px)",this.menuPosition.bottom=t?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),Fe(()=>{Ge.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},Iet={class:"menu-container"},Met=["title"],Det=["src"],ket=["data-feather"],Let={key:2,class:"w-5 h-5"},Pet={key:3,"data-feather":"menu"},Uet={class:"flex-grow menu-ul"},Fet=["onClick"],Bet={key:0,"data-feather":"check"},Get=["src","alt"],Vet=["data-feather"],zet={key:3,class:"menu-icon"};function Het(t,e,n,s,i,r){return T(),w("div",Iet,[l("button",{onClick:e[0]||(e[0]=ae((...o)=>r.toggleMenu&&r.toggleMenu(...o),["prevent"])),title:n.title,class:Ue([n.menuIconClass,"menu-button m-0 p-0 bg-blue-500 text-white dark:bg-blue-200 dark:text-gray-800 rounded flex items-center justify-center w-6 h-6 border-none cursor-pointer hover:bg-blue-400 w-8 h-8 object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-gray-300 border-secondary cursor-pointer"]),ref:"menuButton"},[n.icon&&!n.icon.includes("#")&&!n.icon.includes("feather")?(T(),w("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,Det)):n.icon&&n.icon.includes("feather")?(T(),w("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,ket)):n.icon&&n.icon.includes("#")?(T(),w("p",Let,J(n.icon.split("#")[1]),1)):(T(),w("i",Pet))],10,Met),_e(Ds,{name:"slide"},{default:He(()=>[i.isMenuOpen?(T(),w("div",{key:0,class:"menu-list flex-grow",style:$t(i.menuPosition),ref:"menu"},[l("ul",Uet,[(T(!0),w(Ve,null,Je(n.commands,(o,a)=>(T(),w("li",{key:a,onClick:ae(c=>r.executeCommand(o),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==o.name?(T(),w("i",Bet)):o.icon&&!o.icon.includes("feather")&&!o.is_file?(T(),w("img",{key:1,src:o.icon,alt:o.name,class:"menu-icon"},null,8,Get)):G("",!0),o.icon&&o.icon.includes("feather")&&!o.is_file?(T(),w("i",{key:2,"data-feather":o.icon.split(":")[1],class:"mr-2"},null,8,Vet)):(T(),w("span",zet)),l("span",null,J(o.name),1)],8,Fet))),128))])],4)):G("",!0)]),_:1})])}const eE=at(Oet,[["render",Het]]),qet={components:{InteractiveMenu:eE},props:{isInstalled:Boolean,onInstall:Function,onCancelInstall:Function,onUninstall:Function,onSelected:Function,onCopy:Function,onCopyLink:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,speed:0,total_size:0,downloaded_size:0,start_time:"",installing:!1,uninstalling:!1,failedToLoad:!1,linkNotValid:!1,selected_variant:""}},async mounted(){Fe(()=>{Ge.replace()})},methods:{formatFileSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(t){return Xs(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?As:this.model.icon},defaultImg(t){t.target.src=As},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t){if(console.log("event.target.tagName.toLowerCase()"),console.log(t.target.tagName.toLowerCase()),t.target.tagName.toLowerCase()==="button"||t.target.tagName.toLowerCase()==="svg"){t.stopPropagation();return}this.onSelected(this),this.model.selected=!0,Fe(()=>{Ge.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this),this.installing=!1},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)},copyContentToClipboard(){this.$emit("copy","this.message.content")}},computed:{computed_classes(){return this.model.isInstalled?this.selected?"border-4 border-gray-200 bg-primary cursor-pointer":"border-0 border-primary bg-primary cursor-pointer":"border-transparent"},commandsList(){let t=[{name:this.model.isInstalled?"Install Extra":"Install",icon:"feather:settings",is_file:!1,value:this.install},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return this.model.isInstalled&&t.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&t.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),t},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const t=this.model.variants[0].size;return this.formatFileSize(t)}return null}},speed_computed(){return Xs(this.speed)},total_size_computed(){return Xs(this.total_size)},downloaded_size_computed(){return Xs(this.downloaded_size)}},watch:{linkNotValid(){Fe(()=>{Ge.replace()})}}},Yet=["title"],$et={key:0,class:"flex flex-row"},Wet={class:"max-w-[300px] overflow-x-auto"},Ket={class:"flex gap-3 items-center grow"},jet=["href"],Qet=["src"],Xet={class:"flex-1 overflow-hidden"},Zet={class:"font-bold font-large text-lg truncate"},Jet={key:1,class:"flex items-center flex-row gap-2 my-1"},ett={class:"flex grow items-center"},ttt=l("i",{"data-feather":"box",class:"w-5"},null,-1),ntt=l("span",{class:"sr-only"},"Custom model / local model",-1),stt=[ttt,ntt],itt=l("span",{class:"sr-only"},"Remove",-1),rtt={key:2,class:"absolute z-10 -m-4 p-5 shadow-md text-center rounded-lg w-full h-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel bg-opacity-70 dark:bg-opacity-70 flex justify-center items-center"},ott={class:"relative flex flex-col items-center justify-center flex-grow h-full"},att=l("div",{role:"status",class:"justify-center"},[l("svg",{"aria-hidden":"true",class:"w-24 h-24 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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1),ltt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},ctt={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},dtt={class:"flex justify-between mb-1"},utt=l("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1),ptt={class:"text-sm font-medium text-blue-700 dark:text-white"},_tt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},htt={class:"flex justify-between mb-1"},ftt={class:"text-base font-medium text-blue-700 dark:text-white"},mtt={class:"text-sm font-medium text-blue-700 dark:text-white"},gtt={class:"flex flex-grow"},btt={class:"flex flex-row flex-grow gap-3"},Ett={class:"p-2 text-center grow"},ytt={key:3},vtt={class:"flex flex-row items-center gap-3"},Stt=["src"],Ttt={class:"font-bold font-large text-lg truncate"},xtt=l("div",{class:"grow"},null,-1),Ctt={class:"flex items-center flex-row-reverse gap-2 my-1"},wtt={class:"flex flex-row items-center"},Rtt={key:0,class:"text-base text-red-600 flex items-center mt-1"},Att=l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),Ntt=["title"],Ott={class:""},Itt={class:"flex flex-row items-center"},Mtt=l("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1),Dtt=l("b",null,"Card: ",-1),ktt=["href","title"],Ltt=l("div",{class:"grow"},null,-1),Ptt=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),Utt=[Ptt],Ftt={class:"flex items-center"},Btt=l("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),Gtt=l("b",null,"File size: ",-1),Vtt={class:"flex items-center"},ztt=l("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),Htt=l("b",null,"License: ",-1),qtt={key:0,class:"flex items-center"},Ytt=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),$tt=l("b",null,"quantizer: ",-1),Wtt=["href"],Ktt={class:"flex items-center"},jtt=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),Qtt=l("b",null,"Model creator: ",-1),Xtt=["href"],Ztt={class:"flex items-center"},Jtt=l("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1),ent=l("b",null,"Release date: ",-1),tnt={class:"flex items-center"},nnt=l("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1),snt=l("b",null,"Category: ",-1),int=["href"];function rnt(t,e,n,s,i,r){const o=ct("InteractiveMenu");return T(),w("div",{class:Ue(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",r.computed_classes]),title:n.model.name,onClick:e[10]||(e[10]=ae(a=>r.toggleSelected(a),["prevent"]))},[n.model.isCustomModel?(T(),w("div",$et,[l("div",Wet,[l("div",Ket,[l("a",{href:n.model.model_creator_link,target:"_blank"},[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,Qet)],8,jet),l("div",Xet,[l("h3",Zet,J(n.model.name),1)])])])])):G("",!0),n.model.isCustomModel?(T(),w("div",Jet,[l("div",ett,[l("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=ae(()=>{},["stop"]))},stt),Xe(" Custom model ")]),l("div",null,[n.model.isInstalled?(T(),w("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=ae((...a)=>r.uninstall&&r.uninstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},[Xe(" Uninstall "),itt])):G("",!0)])])):G("",!0),i.installing?(T(),w("div",rtt,[l("div",ott,[att,l("div",ltt,[l("div",ctt,[l("div",dtt,[utt,l("span",ptt,J(Math.floor(i.progress))+"%",1)]),l("div",_tt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t({width:i.progress+"%"})},null,4)]),l("div",htt,[l("span",ftt,"Download speed: "+J(r.speed_computed)+"/s",1),l("span",mtt,J(r.downloaded_size_computed)+"/"+J(r.total_size_computed),1)])])]),l("div",gtt,[l("div",btt,[l("div",Ett,[l("button",{onClick:e[3]||(e[3]=ae((...a)=>r.toggleCancelInstall&&r.toggleCancelInstall(...a),["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 ")])])])])])):G("",!0),n.model.isCustomModel?G("",!0):(T(),w("div",ytt,[l("div",vtt,[l("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[4]||(e[4]=a=>r.defaultImg(a)),class:Ue(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,Stt),l("h3",Ttt,J(n.model.name),1),xtt,_e(o,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),l("div",Ctt,[l("div",wtt,[i.linkNotValid?(T(),w("div",Rtt,[Att,Xe(" Link is not valid ")])):G("",!0)])]),l("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[l("div",Ott,[l("div",Itt,[Mtt,Dtt,l("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[5]||(e[5]=ae(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:i.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,ktt),Ltt,l("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[6]||(e[6]=ae(a=>r.toggleCopyLink(),["stop"]))},Utt)]),l("div",Ftt,[l("div",{class:Ue(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[Btt,Gtt,Xe(" "+J(r.fileSize),1)],2)]),l("div",Vtt,[ztt,Htt,Xe(" "+J(n.model.license),1)]),n.model.quantizer!="None"&&n.model.type!="transformers"?(T(),w("div",qtt,[Ytt,$tt,l("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=ae(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},J(n.model.quantizer),9,Wtt)])):G("",!0),l("div",Ktt,[jtt,Qtt,l("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=ae(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},J(n.model.model_creator),9,Xtt)]),l("div",Ztt,[Jtt,ent,Xe(" "+J(n.model.last_commit_time),1)]),l("div",tnt,[nnt,snt,l("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=ae(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},J(n.model.category),9,int)])])],8,Ntt)]))],10,Yet)}const ont=at(qet,[["render",rnt]]),ant={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},lnt={class:"p-4"},cnt={class:"flex items-center mb-4"},dnt=["src"],unt={class:"text-lg font-semibold"},pnt=l("strong",null,"Author:",-1),_nt=l("strong",null,"Description:",-1),hnt=l("strong",null,"Category:",-1),fnt={key:0},mnt=l("strong",null,"Disclaimer:",-1),gnt=l("strong",null,"Conditioning Text:",-1),bnt=l("strong",null,"AI Prefix:",-1),Ent=l("strong",null,"User Prefix:",-1),ynt=l("strong",null,"Antiprompts:",-1);function vnt(t,e,n,s,i,r){return T(),w("div",lnt,[l("div",cnt,[l("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,dnt),l("h2",unt,J(i.personalityName),1)]),l("p",null,[pnt,Xe(" "+J(i.personalityAuthor),1)]),l("p",null,[_nt,Xe(" "+J(i.personalityDescription),1)]),l("p",null,[hnt,Xe(" "+J(i.personalityCategory),1)]),i.disclaimer?(T(),w("p",fnt,[mnt,Xe(" "+J(i.disclaimer),1)])):G("",!0),l("p",null,[gnt,Xe(" "+J(i.conditioningText),1)]),l("p",null,[bnt,Xe(" "+J(i.aiPrefix),1)]),l("p",null,[Ent,Xe(" "+J(i.userPrefix),1)]),l("div",null,[ynt,l("ul",null,[(T(!0),w(Ve,null,Je(i.antipromptsList,o=>(T(),w("li",{key:o.id},J(o.text),1))),128))])]),l("button",{onClick:e[0]||(e[0]=o=>i.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),i.editMode?(T(),w("button",{key:1,onClick:e[1]||(e[1]=(...o)=>r.commitChanges&&r.commitChanges(...o)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):G("",!0)])}const Snt=at(ant,[["render",vnt]]),Vu="/assets/logo-9d653710.svg",Tnt="/",xnt={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onOpenFolder:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function},components:{InteractiveMenu:eE},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0}}},computed:{commandsList(){let t=[{name:this.isMounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.isMounted?this.unmount:this.mount},{name:"reinstall",icon:"feather:terminal",is_file:!1,value:this.toggleReinstall}];return console.log("this.category",this.personality.category),this.personality.category=="custom_personalities"?t.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):t.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&t.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),t},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,Fe(()=>{Ge.replace()})},methods:{showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return Tnt+this.personality.avatar},defaultImg(t){t.target.src=Vu},showFolder(){this.onOpenFolder(this)},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},edit(){this.onEdit(this)},copyToCustom(){this.onCopyToCustom(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this),this.isMounted=!1},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){Fe(()=>{Ge.replace()})}}},Cnt=["title"],wnt={class:"flex flex-row items-center flex-shrink-0 gap-3"},Rnt=["src"],Ant=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),Nnt=[Ant],Ont=["src"],Int={class:""},Mnt={class:""},Dnt={class:"flex items-center"},knt=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),Lnt=l("b",null,"Author: ",-1),Pnt={class:"flex items-center"},Unt=l("i",{"data-feather":"git-commit",class:"w-5 m-1"},null,-1),Fnt=l("b",null,"Version: ",-1),Bnt={key:0,class:"flex items-center"},Gnt=l("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),Vnt=l("b",null,"Languages: ",-1),znt=["selected"],Hnt={key:1,class:"flex items-center"},qnt=l("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),Ynt=l("b",null,"Language: ",-1),$nt={class:"flex items-center"},Wnt=l("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),Knt=l("b",null,"Category: ",-1),jnt=l("div",{class:"flex items-center"},[l("i",{"data-feather":"info",class:"w-5 m-1"}),l("b",null,"Description: "),l("br")],-1),Qnt=["title","innerHTML"],Xnt={class:"rounded bg-blue-300"},Znt=l("i",{"data-feather":"check"},null,-1),Jnt=l("span",{class:"sr-only"},"Select",-1),est=[Znt,Jnt],tst=l("i",{"data-feather":"send",class:"w-5"},null,-1),nst=l("span",{class:"sr-only"},"Talk",-1),sst=[tst,nst],ist=l("i",{"data-feather":"folder",class:"w-5"},null,-1),rst=l("span",{class:"sr-only"},"Show Folder",-1),ost=[ist,rst];function ast(t,e,n,s,i,r){const o=ct("InteractiveMenu");return T(),w("div",{class:Ue(["min-w-96 items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",r.selected_computed?"border-2 border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),tabindex:"-1",title:n.personality.installed?"":"Not installed"},[l("div",{class:Ue(n.personality.installed?"":"border-red-500")},[l("div",wnt,[l("img",{onClick:e[0]||(e[0]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),ref:"imgElement",src:r.getImgUrl(),onError:e[1]||(e[1]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer",onMouseover:e[2]||(e[2]=(...a)=>r.showThumbnail&&r.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>r.updateThumbnailPosition&&r.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>r.hideThumbnail&&r.hideThumbnail(...a))},null,40,Rnt),l("h3",{onClick:e[5]||(e[5]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),class:"font-bold font-large text-lg line-clamp-3 cursor-pointer",onMouseover:e[6]||(e[6]=(...a)=>r.showThumbnail&&r.showThumbnail(...a)),onMousemove:e[7]||(e[7]=(...a)=>r.updateThumbnailPosition&&r.updateThumbnailPosition(...a)),onMouseleave:e[8]||(e[8]=(...a)=>r.hideThumbnail&&r.hideThumbnail(...a))},J(n.personality.name),33),l("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[9]||(e[9]=ae(a=>r.toggleCopyLink(),["stop"]))},Nnt),i.thumbnailVisible?(T(),w("div",{key:0,style:$t({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[l("img",{src:r.getImgUrl(),class:"w-full h-full object-fill"},null,8,Ont)],4)):G("",!0)]),l("div",Int,[l("div",Mnt,[l("div",Dnt,[knt,Lnt,Xe(" "+J(n.personality.author),1)]),l("div",Pnt,[Unt,Fnt,Xe(" "+J(n.personality.version),1)]),n.personality.languages&&n.select_language?(T(),w("div",Bnt,[Gnt,Vnt,i.isMounted?G("",!0):U((T(),w("select",{key:0,id:"languages","onUpdate:modelValue":e[10]||(e[10]=a=>n.personality.language=a),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"},[(T(!0),w(Ve,null,Je(n.personality.languages,(a,c)=>(T(),w("option",{key:c,selected:a==n.personality.languages[0]},J(a),9,znt))),128))],512)),[[Vt,n.personality.language]])])):G("",!0),n.personality.language?(T(),w("div",Hnt,[qnt,Ynt,Xe(" "+J(n.personality.language),1)])):G("",!0),l("div",$nt,[Wnt,Knt,Xe(" "+J(n.personality.category),1)])]),jnt,l("p",{class:"mx-1 opacity-80 h-20 overflow-y-auto 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",title:n.personality.description,innerHTML:n.personality.description},null,8,Qnt)]),l("div",Xnt,[i.isMounted?(T(),w("button",{key:0,type:"button",title:"Select",onClick:[e[11]||(e[11]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),e[12]||(e[12]=ae(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},est)):G("",!0),i.isMounted?(T(),w("button",{key:1,type:"button",title:"Talk",onClick:[e[13]||(e[13]=(...a)=>r.toggleTalk&&r.toggleTalk(...a)),e[14]||(e[14]=ae(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},sst)):G("",!0),l("button",{type:"button",title:"Show_folder",onClick:[e[15]||(e[15]=(...a)=>r.showFolder&&r.showFolder(...a)),e[16]||(e[16]=ae(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},ost),_e(o,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])])],2)],10,Cnt)}const RN=at(xnt,[["render",ast]]);const lst={props:{ui:{type:String,required:!0,default:""}},watch:{ui(t,e){console.log(`ui changed from ${e} to ${t}`),this.$nextTick(()=>{this.evaluateScriptTags()})}},data(){return{}},mounted(){this.$nextTick(()=>{this.evaluateScriptTags()})},methods:{evaluateScriptTags(){console.log("evaluateScriptTags");const t=document.createElement("div");t.innerHTML=this.ui,t.querySelectorAll("script").forEach(n=>{const s=document.createElement("script");s.textContent=n.textContent,document.body.appendChild(s),document.body.removeChild(s)}),this.$refs.ui.innerHTML=t.innerHTML,console.log("this.$refs.ui.innerHTML"),console.log(this.$refs.ui.innerHTML)}}},cst={class:"w-full h-auto overflow-y-auto 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",ref:"ui"};function dst(t,e,n,s,i,r){return T(),w("div",cst,null,512)}const AN=at(lst,[["render",dst]]),ust="/",pst={components:{DynamicUIRenderer:AN},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){Fe(()=>{Ge.replace()})},methods:{copyToClipBoard(t){console.log("Copying to clipboard :",t),navigator.clipboard.writeText(t)},getImgUrl(){return ust+this.binding.icon},defaultImg(t){t.target.src=Vu},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(this)},toggleUnInstall(){this.onUnInstall(this)},toggleReinstall(){this.onReinstall(this)},toggleReloadBinding(){this.onReloadBinding(this)},toggleSettings(){this.onSettings(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}},watch:{selected(){Fe(()=>{Ge.replace()})}}},_st=["title"],hst={class:"flex flex-row items-center gap-3"},fst=["src"],mst={class:"font-bold font-large text-lg truncate"},gst=l("div",{class:"grow"},null,-1),bst={class:"flex-none gap-1"},Est=l("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),yst=l("span",{class:"sr-only"},"Help",-1),vst=[Est,yst],Sst={class:"flex items-center flex-row-reverse gap-2 my-1"},Tst=l("span",{class:"sr-only"},"Click to install",-1),xst=l("span",{class:"sr-only"},"Reinstall",-1),Cst=l("span",{class:"sr-only"},"UnInstall",-1),wst=l("span",{class:"sr-only"},"Settings",-1),Rst={class:""},Ast={class:""},Nst={class:"flex items-center"},Ost=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),Ist=l("b",null,"Author: ",-1),Mst={class:"flex items-center"},Dst=l("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),kst=l("b",null,"Folder: ",-1),Lst=l("div",{class:"grow"},null,-1),Pst=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),Ust=[Pst],Fst={class:"flex items-center"},Bst=l("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),Gst=l("b",null,"Version: ",-1),Vst={class:"flex items-center"},zst=l("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),Hst=l("b",null,"Link: ",-1),qst=["href"],Yst=l("div",{class:"flex items-center"},[l("i",{"data-feather":"info",class:"w-5 m-1"}),l("b",null,"Description: "),l("br")],-1),$st=["title","innerHTML"];function Wst(t,e,n,s,i,r){const o=ct("DynamicUIRenderer");return T(),w("div",{class:Ue(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",n.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=ae((...a)=>r.toggleSelected&&r.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[l("div",null,[l("div",hst,[l("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,fst),l("h3",mst,J(n.binding.name),1),gst,l("div",bst,[n.selected?(T(),w("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>r.toggleReloadBinding&&r.toggleReloadBinding(...a)),e[2]||(e[2]=ae(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},vst)):G("",!0)])]),l("div",Sst,[n.binding.installed?G("",!0):(T(),w("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=ae((...a)=>r.toggleInstall&&r.toggleInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[Xe(" Install "),Tst])),n.binding.installed?(T(),w("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=ae((...a)=>r.toggleReinstall&&r.toggleReinstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-green-700 hover:bg-red-800 focus:ring-4 focus:ring-green-300 rounded-lg dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-red-900"},[Xe(" Reinstall "),xst])):G("",!0),n.binding.installed?(T(),w("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=ae((...a)=>r.toggleUnInstall&&r.toggleUnInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},[Xe(" Uninstall "),Cst])):G("",!0),n.selected?(T(),w("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=ae((...a)=>r.toggleSettings&&r.toggleSettings(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[Xe(" Settings "),wst])):G("",!0)]),n.binding.ui?(T(),St(o,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):G("",!0),l("div",Rst,[l("div",Ast,[l("div",Nst,[Ost,Ist,Xe(" "+J(n.binding.author),1)]),l("div",Mst,[Dst,kst,Xe(" "+J(n.binding.folder)+" ",1),Lst,l("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[7]||(e[7]=ae(a=>r.copyToClipBoard(this.binding.folder),["stop"]))},Ust)]),l("div",Fst,[Bst,Gst,Xe(" "+J(n.binding.version),1)]),l("div",Vst,[zst,Hst,l("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},J(n.binding.link),9,qst)])]),Yst,l("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,$st)])])],10,_st)}const Kst=at(pst,[["render",Wst]]),jst={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(t=>{this.resolve=t})},hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},showDialog(t){return new Promise(e=>{this.model_path=t,this.show=!0,this.resolve=e})}}},Qst={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},Xst={class:"relative w-full max-w-md max-h-full"},Zst={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},Jst=l("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("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),eit=l("span",{class:"sr-only"},"Close modal",-1),tit=[Jst,eit],nit={class:"p-4 text-center"},sit=l("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),iit={class:"p-4 text-center mx-auto mb-4"},rit=l("label",{class:"mr-2"},"Model path",-1);function oit(t,e,n,s,i,r){return i.show?(T(),w("div",Qst,[l("div",Xst,[l("div",Zst,[l("button",{type:"button",onClick:e[0]||(e[0]=o=>r.hide(!1)),class:"absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},tit),l("div",nit,[sit,l("div",iit,[rit,U(l("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>i.model_path=o),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[ue,i.model_path]])]),l("button",{onClick:e[2]||(e[2]=o=>r.hide(!0)),type:"button",class:"text-white bg-green-600 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Add "),l("button",{onClick:e[3]||(e[3]=o=>r.hide(!1)),type:"button",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"},"No, cancel")])])])])):G("",!0)}const ait=at(jst,[["render",oit]]);const lit={props:{show:{type:Boolean,default:!1,required:!1},can_remove:{type:Boolean,default:!1},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null,showInput:!1,newFilename:""}},methods:{displayName(t){return console.log("choice:",t),typeof t=="string"?t:t&&t.name?t.name:""},selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},toggleInput(){this.showInput=!this.showInput},addNewFilename(){const t=this.newFilename.trim();t!==""&&(this.choices.push(t),this.newFilename="",this.selectChoice(t)),this.showInput=!1},removeChoice(t,e){this.choices.splice(e,1),t===this.selectedChoice&&(this.selectedChoice=null),this.$emit("choice-removed",t)}}},cit={key:0,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},dit={class:"bg-bg-light dark:bg-bg-dark rounded-lg p-6 w-96"},uit={class:"text-xl font-bold text-5xl drop-shadow-md align-middle"},pit={class:"h-48 text-light-text-panel dark:text-dark-text-panel bg-bg-light-tone-panel dark:bg-dark-tone-panel overflow-y-auto rounded drop-shadow-md overflow-y-auto 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"},_it=["onClick"],hit={class:"font-bold text-dark-text-panel dark:text-light-text-panel"},fit=l("br",null,null,-1),mit={key:0,class:"text-xs text-gray-500"},git=["onClick"],bit={key:0,class:"flex flex-row mt-4 bg-light-tone-panel dark:bg-dark-tone-panel"},Eit={class:"flex justify-end mt-4"},yit=["disabled"];function vit(t,e,n,s,i,r){return T(),St(Ds,{name:"fade"},{default:He(()=>[n.show?(T(),w("div",cit,[l("div",dit,[l("h2",uit,J(n.title),1),l("div",pit,[l("ul",null,[(T(!0),w(Ve,null,Je(n.choices,(o,a)=>(T(),w("li",{key:a,onClick:c=>r.selectChoice(o),class:Ue([{"selected-choice":o===i.selectedChoice},"py-2 px-4 cursor-pointer hover:bg-accent dark:hover:bg-secondary"])},[l("span",hit,J(r.displayName(o)),1),fit,o.size?(T(),w("span",mit,J(r.formatSize(o.size)),1)):G("",!0),n.can_remove?(T(),w("button",{key:1,onClick:ae(c=>r.removeChoice(o,a),["stop"]),class:"ml-2 text-red-500 hover:text-red-600"}," X ",8,git)):G("",!0)],10,_it))),128))])]),i.showInput?(T(),w("div",bit,[U(l("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>i.newFilename=o),placeholder:"Enter a filename",class:"border border-gray-300 p-2 rounded-lg w-full"},null,512),[[ue,i.newFilename]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.addNewFilename&&r.addNewFilename(...o)),class:"ml-2 grow pl-2 pr-2 bg-primary hover:bg-primary-light text-white rounded-lg transition duration-300"}," Add ")])):G("",!0),l("div",Eit,[l("button",{onClick:e[2]||(e[2]=(...o)=>r.closeDialog&&r.closeDialog(...o)),class:"py-2 px-4 mr-2 bg-secondary hover:bg-accent text-white rounded-lg transition duration-300"}," Cancel "),l("button",{onClick:e[3]||(e[3]=(...o)=>r.validateChoice&&r.validateChoice(...o)),class:Ue([{"bg-gray-400 cursor-not-allowed":!i.selectedChoice,"bg-primary hover:bg-primary-light":i.selectedChoice,"text-white":i.selectedChoice,"text-gray-500":!i.selectedChoice},"py-2 px-4 rounded-lg transition duration-300"]),disabled:!i.selectedChoice}," Validate ",10,yit),l("button",{onClick:e[4]||(e[4]=(...o)=>r.toggleInput&&r.toggleInput(...o)),class:"py-2 px-4 ml-2 bg-accent hover:bg-secondary text-white rounded-lg transition duration-300"}," Add New ")])])])):G("",!0)]),_:1})}const tE=at(lit,[["render",vit]]),Sit={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const t=this.radioOptions.find(e=>e.value===this.selectedValue);return t?t.label:""}},watch:{selectedValue(t,e){this.$emit("radio-selected",t)}},methods:{handleRadioChange(){}}},Tit={class:"flex space-x-4"},xit=["value","aria-checked"],Cit={class:"text-gray-700"};function wit(t,e,n,s,i,r){return T(),w("div",Tit,[(T(!0),w(Ve,null,Je(n.radioOptions,(o,a)=>(T(),w("label",{key:o.value,class:"flex items-center space-x-2"},[U(l("input",{type:"radio",value:o.value,"onUpdate:modelValue":e[0]||(e[0]=c=>i.selectedValue=c),onChange:e[1]||(e[1]=(...c)=>r.handleRadioChange&&r.handleRadioChange(...c)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===o.value.toString(),role:"radio"},null,40,xit),[[nD,i.selectedValue]]),l("span",Cit,J(o.label),1)]))),128))])}const Rit=at(Sit,[["render",wit]]),Ait="/assets/gpu-df72bf63.svg",Nit={name:"StringListManager",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Enter an item"}},emits:["update:modelValue","change"],data(){return{newItem:"",draggingIndex:null}},methods:{addItem(){if(this.newItem.trim()){const t=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",t),this.$emit("change"),this.newItem=""}},removeItem(t){const e=this.modelValue.filter((n,s)=>s!==t);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(t){this.draggingIndex=t},dragItem(t){if(this.draggingIndex!==null){const e=[...this.modelValue],n=e.splice(this.draggingIndex,1)[0];e.splice(t,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null}}},Oit={class:"flex mb-2"},Iit=["placeholder"],Mit={key:0,class:"list-disc list-inside"},Dit={class:"flex-grow"},kit=["onClick"],Lit=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[l("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),Pit=[Lit],Uit=["onMousedown","onMousemove"],Fit=["onMousedown","onMousemove"],Bit=["onMousedown","onMousemove"],Git={key:1,class:"mt-2"};function Vit(t,e,n,s,i,r){return T(),w("div",null,[l("div",Oit,[U(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>i.newItem=o),placeholder:n.placeholder,onKeyup:e[1]||(e[1]=ti((...o)=>r.addItem&&r.addItem(...o),["enter"])),class:"flex-grow mr-2 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,40,Iit),[[ue,i.newItem]]),l("button",{onClick:e[2]||(e[2]=(...o)=>r.addItem&&r.addItem(...o)),class:"bg-blue-500 text-white px-4 py-1 rounded hover:bg-blue-600"},"Add")]),n.modelValue.length>0?(T(),w("ul",Mit,[(T(!0),w(Ve,null,Je(n.modelValue,(o,a)=>(T(),w("li",{key:a,class:Ue(["flex items-center mb-1 relative",{"bg-gray-200":i.draggingIndex===a}])},[l("span",Dit,J(o),1),l("button",{onClick:c=>r.removeItem(a),class:"text-red-500 hover:text-red-700 ml-2"},Pit,8,kit),i.draggingIndex===a?(T(),w("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:c=>r.startDragging(a),onMousemove:c=>r.dragItem(a),onMouseup:e[3]||(e[3]=(...c)=>r.stopDragging&&r.stopDragging(...c))},null,40,Uit)):G("",!0),i.draggingIndex!==a&&a>i.draggingIndex?(T(),w("div",{key:1,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:c=>r.startDragging(a),onMousemove:c=>r.dragItem(a),onMouseup:e[4]||(e[4]=(...c)=>r.stopDragging&&r.stopDragging(...c))},null,40,Fit)):G("",!0),i.draggingIndex!==a&&ar.startDragging(a),onMousemove:c=>r.dragItem(a),onMouseup:e[5]||(e[5]=(...c)=>r.stopDragging&&r.stopDragging(...c))},null,40,Bit)):G("",!0)],2))),128))])):G("",!0),n.modelValue.length>0?(T(),w("div",Git,[l("button",{onClick:e[6]||(e[6]=(...o)=>r.removeAll&&r.removeAll(...o)),class:"bg-red-500 text-white px-4 py-1 rounded hover:bg-red-600"},"Remove All")])):G("",!0)])}const zit=at(Nit,[["render",Vit]]);const Hit="/";de.defaults.baseURL="/";const qit={components:{AddModelDialog:ait,ModelEntry:ont,PersonalityViewer:Snt,PersonalityEntry:RN,BindingEntry:Kst,ChoiceDialog:tE,Card:Gu,StringListManager:zit,RadioOptions:Rit},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},defaultModelImgPlaceholder:As,snd_input_devices:[],snd_input_devices_indexes:[],snd_output_devices:[],snd_output_devices_indexes:[],voices:[],voice_languages:{Arabic:"ar","Brazilian Portuguese":"pt",Chinese:"zh-cn",Czech:"cs",Dutch:"nl",English:"en",French:"fr",German:"de",Italian:"it",Polish:"pl",Russian:"ru",Spanish:"es",Turkish:"tr",Japanese:"ja",Korean:"ko",Hungarian:"hu",Hindi:"hi"},storeLogo:ms,binding_changed:!1,SVGGPU:Ait,models_zoo:[],models_zoo_initialLoadCount:10,models_zoo_loadMoreCount:5,models_zoo_loadedEntries:[],models_zoo_scrollThreshold:200,sortOptions:[{label:"Sort by Date",value:0},{label:"Sort by Rank",value:1},{label:"Sort by Name",value:2},{label:"Sort by Maker",value:3},{label:"Sort by Quantizer",value:4}],comfyui_models:[],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],collapsedArr:[],all_collapsed:!0,data_conf_collapsed:!0,internet_conf_collapsed:!0,servers_conf_collapsed:!0,mainconf_collapsed:!0,smartrouterconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,ezl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:Hit,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){try{this.$store.state.loading_infos="Getting Hardware usage",await this.refreshHardwareUsage(this.$store)}catch(t){console.log("Error cought:",t)}qe.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(t=>t.json()).then(t=>{this.voices=t.voices}).catch(t=>console.error("Error fetching voices:",t))},async refreshHardwareUsage(t){await t.dispatch("refreshDiskUsage"),await t.dispatch("refreshRamUsage"),await t.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.rag_databases.push(""),this.settingsChanged=!0},removeDataSource(t){this.$store.state.config.rag_databases.splice(t,1),this.settingsChanged=!0},async vectorize_folder(t){await de.post("/vectorize_folder",{client_id:this.$store.state.client_id,db_path:this.$store.state.config.rag_databases[t]},this.posts_headers)},async select_folder(t){try{qe.on("rag_db_added",e=>{console.log(e),e?(this.$store.state.config.rag_databases[t]=`${e.database_name}::${e.database_path}`,this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await de.post("/add_rag_database",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},handleTemplateSelection(t){console.log("handleTemplateSelection");const e=t.target.value;console.log("handleTemplateSelection: ",e),e==="lollms"?(console.log("Using lollms template"),this.configFile.start_header_id_template="!@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` + `,36),[[ue,i.text]]),l("span",null,"Cursor position "+J(i.cursorPosition),1)])):G("",!0),i.audio_url!=null?(T(),w("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,TJe),Xe(" Your browser does not support the audio element. ")])):G("",!0),_e(o,{namedTokens:i.namedTokens},null,8,["namedTokens"]),i.tab_id==="render"?(T(),w("div",xJe,[_e(a,{ref:"mdRender",client_id:this.$store.state.client_id,message_id:0,discussion_id:0,"markdown-text":i.text,class:"mt-4 p-2 rounded shadow-lg dark:bg-bg-dark"},null,8,["client_id","markdown-text"])])):G("",!0)],2)]),_e(c,{title:"settings",class:"slider-container ml-0 mr-0",isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[_e(c,{title:"Model",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[U(l("select",{"onUpdate:modelValue":e[28]||(e[28]=d=>this.$store.state.selectedModel=d),onChange:e[29]||(e[29]=(...d)=>r.setModel&&r.setModel(...d)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),w(Ve,null,Je(r.models,d=>(T(),w("option",{key:d,value:d},J(d),9,CJe))),128))],544),[[Vt,this.$store.state.selectedModel]]),i.selecting_model?(T(),w("div",wJe,AJe)):G("",!0)]),_:1}),_e(c,{title:"Presets",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[U(l("select",{"onUpdate:modelValue":e[30]||(e[30]=d=>i.selectedPreset=d),class:"bg-white dark:bg-black mb-2 border-2 rounded-md shadow-sm w-full"},[(T(!0),w(Ve,null,Je(i.presets,d=>(T(),w("option",{key:d,value:d},J(d.name),9,NJe))),128))],512),[[Vt,i.selectedPreset]]),OJe,l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[31]||(e[31]=(...d)=>r.setPreset&&r.setPreset(...d)),title:"Use preset"},MJe),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[32]||(e[32]=(...d)=>r.addPreset&&r.addPreset(...d)),title:"Add this text as a preset"},kJe),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[33]||(e[33]=(...d)=>r.removePreset&&r.removePreset(...d)),title:"Remove preset"},PJe),l("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[34]||(e[34]=(...d)=>r.reloadPresets&&r.reloadPresets(...d)),title:"Reload presets list"},FJe)]),_:1}),_e(c,{title:"Generation params",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[l("div",BJe,[GJe,U(l("input",{type:"range","onUpdate:modelValue":e[35]||(e[35]=d=>i.temperature=d),min:"0",max:"5",step:"0.1",class:"w-full"},null,512),[[ue,i.temperature]]),l("span",VJe,"Current value: "+J(i.temperature),1)]),l("div",zJe,[HJe,U(l("input",{type:"range","onUpdate:modelValue":e[36]||(e[36]=d=>i.top_k=d),min:"1",max:"100",step:"1",class:"w-full"},null,512),[[ue,i.top_k]]),l("span",qJe,"Current value: "+J(i.top_k),1)]),l("div",YJe,[$Je,U(l("input",{type:"range","onUpdate:modelValue":e[37]||(e[37]=d=>i.top_p=d),min:"0",max:"1",step:"0.1",class:"w-full"},null,512),[[ue,i.top_p]]),l("span",WJe,"Current value: "+J(i.top_p),1)]),l("div",KJe,[jJe,U(l("input",{type:"range","onUpdate:modelValue":e[38]||(e[38]=d=>i.repeat_penalty=d),min:"0",max:"5",step:"0.1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.repeat_penalty]]),l("span",QJe,"Current value: "+J(i.repeat_penalty),1)]),l("div",XJe,[ZJe,U(l("input",{type:"range","onUpdate:modelValue":e[39]||(e[39]=d=>i.repeat_last_n=d),min:"0",max:"100",step:"1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.repeat_last_n]]),l("span",JJe,"Current value: "+J(i.repeat_last_n),1)]),l("div",eet,[tet,U(l("input",{type:"number","onUpdate:modelValue":e[40]||(e[40]=d=>i.n_crop=d),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.n_crop]]),l("span",net,"Current value: "+J(i.n_crop),1)]),l("div",set,[iet,U(l("input",{type:"number","onUpdate:modelValue":e[41]||(e[41]=d=>i.n_predicts=d),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.n_predicts]]),l("span",ret,"Current value: "+J(i.n_predicts),1)]),l("div",oet,[aet,U(l("input",{type:"number","onUpdate:modelValue":e[42]||(e[42]=d=>i.seed=d),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[ue,i.seed]]),l("span",cet,"Current value: "+J(i.seed),1)])]),_:1})]),_:1})])]),_e(u,{ref:"toast"},null,512)],64)}const uet=at(OZe,[["render",det]]);const pet={data(){return{activeExtension:null}},computed:{activeExtensions(){return console.log(this.$store.state.extensionsZoo),console.log(fI(this.$store.state.extensionsZoo)),this.$store.state.extensionsZoo}},methods:{showExtensionPage(t){this.activeExtension=t}}},_et={class:"container overflow-y-scroll flex flex-col 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"},het={key:0},fet=["onClick"],met={key:0},get=["src"],bet={key:1},Eet=l("p",null,"No extension is active. Please install and activate an extension.",-1),yet=[Eet];function vet(t,e,n,s,i,r){return T(),w("div",_et,[r.activeExtensions.length>0?(T(),w("div",het,[(T(!0),w(Ve,null,Je(r.activeExtensions,o=>(T(),w("div",{key:o.name,onClick:a=>r.showExtensionPage(o)},[l("div",{class:Ue({"active-tab":o===i.activeExtension})},J(o.name),3)],8,fet))),128)),i.activeExtension?(T(),w("div",met,[l("iframe",{src:i.activeExtension.page,width:"100%",height:"500px",frameborder:"0"},null,8,get)])):G("",!0)])):(T(),w("div",bet,yet))])}const Tet=at(pet,[["render",vet]]),xet={},Cet={style:{width:"100vw",height:"100vh"}},wet=l("iframe",{src:"/help/index.html",class:"m-0 p-0 w-full h-full"},null,-1),Ret=[wet];function Aet(t,e,n,s,i,r){return T(),w("div",Cet,Ret)}const Net=at(xet,[["render",Aet]]);function Xs(t,e=!0,n=1){const s=e?1e3:1024;if(Math.abs(t)=s&&r{Ge.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected",t),t.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(t))},positionMenu(){var t;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),n=window.innerHeight;t=e.bottom>n/2}else this.force_position==1?t=!0:t=!1;this.menuPosition.top=t?"auto":"calc(100% + 10px)",this.menuPosition.bottom=t?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),Fe(()=>{Ge.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},Iet={class:"menu-container"},Met=["title"],Det=["src"],ket=["data-feather"],Let={key:2,class:"w-5 h-5"},Pet={key:3,"data-feather":"menu"},Uet={class:"flex-grow menu-ul"},Fet=["onClick"],Bet={key:0,"data-feather":"check"},Get=["src","alt"],Vet=["data-feather"],zet={key:3,class:"menu-icon"};function Het(t,e,n,s,i,r){return T(),w("div",Iet,[l("button",{onClick:e[0]||(e[0]=ae((...o)=>r.toggleMenu&&r.toggleMenu(...o),["prevent"])),title:n.title,class:Ue([n.menuIconClass,"menu-button m-0 p-0 bg-blue-500 text-white dark:bg-blue-200 dark:text-gray-800 rounded flex items-center justify-center w-6 h-6 border-none cursor-pointer hover:bg-blue-400 w-8 h-8 object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-gray-300 border-secondary cursor-pointer"]),ref:"menuButton"},[n.icon&&!n.icon.includes("#")&&!n.icon.includes("feather")?(T(),w("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,Det)):n.icon&&n.icon.includes("feather")?(T(),w("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,ket)):n.icon&&n.icon.includes("#")?(T(),w("p",Let,J(n.icon.split("#")[1]),1)):(T(),w("i",Pet))],10,Met),_e(Ds,{name:"slide"},{default:He(()=>[i.isMenuOpen?(T(),w("div",{key:0,class:"menu-list flex-grow",style:$t(i.menuPosition),ref:"menu"},[l("ul",Uet,[(T(!0),w(Ve,null,Je(n.commands,(o,a)=>(T(),w("li",{key:a,onClick:ae(c=>r.executeCommand(o),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==o.name?(T(),w("i",Bet)):o.icon&&!o.icon.includes("feather")&&!o.is_file?(T(),w("img",{key:1,src:o.icon,alt:o.name,class:"menu-icon"},null,8,Get)):G("",!0),o.icon&&o.icon.includes("feather")&&!o.is_file?(T(),w("i",{key:2,"data-feather":o.icon.split(":")[1],class:"mr-2"},null,8,Vet)):(T(),w("span",zet)),l("span",null,J(o.name),1)],8,Fet))),128))])],4)):G("",!0)]),_:1})])}const eE=at(Oet,[["render",Het]]),qet={components:{InteractiveMenu:eE},props:{isInstalled:Boolean,onInstall:Function,onCancelInstall:Function,onUninstall:Function,onSelected:Function,onCopy:Function,onCopyLink:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,speed:0,total_size:0,downloaded_size:0,start_time:"",installing:!1,uninstalling:!1,failedToLoad:!1,linkNotValid:!1,selected_variant:""}},async mounted(){Fe(()=>{Ge.replace()})},methods:{formatFileSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(t){return Xs(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?As:this.model.icon},defaultImg(t){t.target.src=As},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t){if(console.log("event.target.tagName.toLowerCase()"),console.log(t.target.tagName.toLowerCase()),t.target.tagName.toLowerCase()==="button"||t.target.tagName.toLowerCase()==="svg"){t.stopPropagation();return}this.onSelected(this),this.model.selected=!0,Fe(()=>{Ge.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this),this.installing=!1},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)},copyContentToClipboard(){this.$emit("copy","this.message.content")}},computed:{computed_classes(){return this.model.isInstalled?this.selected?"border-4 border-gray-200 bg-primary cursor-pointer":"border-0 border-primary bg-primary cursor-pointer":"border-transparent"},commandsList(){let t=[{name:this.model.isInstalled?"Install Extra":"Install",icon:"feather:settings",is_file:!1,value:this.install},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return this.model.isInstalled&&t.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&t.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),t},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const t=this.model.variants[0].size;return this.formatFileSize(t)}return null}},speed_computed(){return Xs(this.speed)},total_size_computed(){return Xs(this.total_size)},downloaded_size_computed(){return Xs(this.downloaded_size)}},watch:{linkNotValid(){Fe(()=>{Ge.replace()})}}},Yet=["title"],$et={key:0,class:"flex flex-row"},Wet={class:"max-w-[300px] overflow-x-auto"},Ket={class:"flex gap-3 items-center grow"},jet=["href"],Qet=["src"],Xet={class:"flex-1 overflow-hidden"},Zet={class:"font-bold font-large text-lg truncate"},Jet={key:1,class:"flex items-center flex-row gap-2 my-1"},ett={class:"flex grow items-center"},ttt=l("i",{"data-feather":"box",class:"w-5"},null,-1),ntt=l("span",{class:"sr-only"},"Custom model / local model",-1),stt=[ttt,ntt],itt=l("span",{class:"sr-only"},"Remove",-1),rtt={key:2,class:"absolute z-10 -m-4 p-5 shadow-md text-center rounded-lg w-full h-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel bg-opacity-70 dark:bg-opacity-70 flex justify-center items-center"},ott={class:"relative flex flex-col items-center justify-center flex-grow h-full"},att=l("div",{role:"status",class:"justify-center"},[l("svg",{"aria-hidden":"true",class:"w-24 h-24 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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1),ltt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},ctt={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},dtt={class:"flex justify-between mb-1"},utt=l("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1),ptt={class:"text-sm font-medium text-blue-700 dark:text-white"},_tt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},htt={class:"flex justify-between mb-1"},ftt={class:"text-base font-medium text-blue-700 dark:text-white"},mtt={class:"text-sm font-medium text-blue-700 dark:text-white"},gtt={class:"flex flex-grow"},btt={class:"flex flex-row flex-grow gap-3"},Ett={class:"p-2 text-center grow"},ytt={key:3},vtt={class:"flex flex-row items-center gap-3"},Stt=["src"],Ttt={class:"font-bold font-large text-lg truncate"},xtt=l("div",{class:"grow"},null,-1),Ctt={class:"flex items-center flex-row-reverse gap-2 my-1"},wtt={class:"flex flex-row items-center"},Rtt={key:0,class:"text-base text-red-600 flex items-center mt-1"},Att=l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),Ntt=["title"],Ott={class:""},Itt={class:"flex flex-row items-center"},Mtt=l("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1),Dtt=l("b",null,"Card: ",-1),ktt=["href","title"],Ltt=l("div",{class:"grow"},null,-1),Ptt=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),Utt=[Ptt],Ftt={class:"flex items-center"},Btt=l("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),Gtt=l("b",null,"File size: ",-1),Vtt={class:"flex items-center"},ztt=l("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),Htt=l("b",null,"License: ",-1),qtt={key:0,class:"flex items-center"},Ytt=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),$tt=l("b",null,"quantizer: ",-1),Wtt=["href"],Ktt={class:"flex items-center"},jtt=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),Qtt=l("b",null,"Model creator: ",-1),Xtt=["href"],Ztt={class:"flex items-center"},Jtt=l("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1),ent=l("b",null,"Release date: ",-1),tnt={class:"flex items-center"},nnt=l("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1),snt=l("b",null,"Category: ",-1),int=["href"];function rnt(t,e,n,s,i,r){const o=ct("InteractiveMenu");return T(),w("div",{class:Ue(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",r.computed_classes]),title:n.model.name,onClick:e[10]||(e[10]=ae(a=>r.toggleSelected(a),["prevent"]))},[n.model.isCustomModel?(T(),w("div",$et,[l("div",Wet,[l("div",Ket,[l("a",{href:n.model.model_creator_link,target:"_blank"},[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,Qet)],8,jet),l("div",Xet,[l("h3",Zet,J(n.model.name),1)])])])])):G("",!0),n.model.isCustomModel?(T(),w("div",Jet,[l("div",ett,[l("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=ae(()=>{},["stop"]))},stt),Xe(" Custom model ")]),l("div",null,[n.model.isInstalled?(T(),w("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=ae((...a)=>r.uninstall&&r.uninstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},[Xe(" Uninstall "),itt])):G("",!0)])])):G("",!0),i.installing?(T(),w("div",rtt,[l("div",ott,[att,l("div",ltt,[l("div",ctt,[l("div",dtt,[utt,l("span",ptt,J(Math.floor(i.progress))+"%",1)]),l("div",_tt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t({width:i.progress+"%"})},null,4)]),l("div",htt,[l("span",ftt,"Download speed: "+J(r.speed_computed)+"/s",1),l("span",mtt,J(r.downloaded_size_computed)+"/"+J(r.total_size_computed),1)])])]),l("div",gtt,[l("div",btt,[l("div",Ett,[l("button",{onClick:e[3]||(e[3]=ae((...a)=>r.toggleCancelInstall&&r.toggleCancelInstall(...a),["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 ")])])])])])):G("",!0),n.model.isCustomModel?G("",!0):(T(),w("div",ytt,[l("div",vtt,[l("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[4]||(e[4]=a=>r.defaultImg(a)),class:Ue(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,Stt),l("h3",Ttt,J(n.model.name),1),xtt,_e(o,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),l("div",Ctt,[l("div",wtt,[i.linkNotValid?(T(),w("div",Rtt,[Att,Xe(" Link is not valid ")])):G("",!0)])]),l("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[l("div",Ott,[l("div",Itt,[Mtt,Dtt,l("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[5]||(e[5]=ae(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:i.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,ktt),Ltt,l("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[6]||(e[6]=ae(a=>r.toggleCopyLink(),["stop"]))},Utt)]),l("div",Ftt,[l("div",{class:Ue(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[Btt,Gtt,Xe(" "+J(r.fileSize),1)],2)]),l("div",Vtt,[ztt,Htt,Xe(" "+J(n.model.license),1)]),n.model.quantizer!="None"&&n.model.type!="transformers"?(T(),w("div",qtt,[Ytt,$tt,l("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=ae(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},J(n.model.quantizer),9,Wtt)])):G("",!0),l("div",Ktt,[jtt,Qtt,l("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=ae(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},J(n.model.model_creator),9,Xtt)]),l("div",Ztt,[Jtt,ent,Xe(" "+J(n.model.last_commit_time),1)]),l("div",tnt,[nnt,snt,l("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=ae(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},J(n.model.category),9,int)])])],8,Ntt)]))],10,Yet)}const ont=at(qet,[["render",rnt]]),ant={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},lnt={class:"p-4"},cnt={class:"flex items-center mb-4"},dnt=["src"],unt={class:"text-lg font-semibold"},pnt=l("strong",null,"Author:",-1),_nt=l("strong",null,"Description:",-1),hnt=l("strong",null,"Category:",-1),fnt={key:0},mnt=l("strong",null,"Disclaimer:",-1),gnt=l("strong",null,"Conditioning Text:",-1),bnt=l("strong",null,"AI Prefix:",-1),Ent=l("strong",null,"User Prefix:",-1),ynt=l("strong",null,"Antiprompts:",-1);function vnt(t,e,n,s,i,r){return T(),w("div",lnt,[l("div",cnt,[l("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,dnt),l("h2",unt,J(i.personalityName),1)]),l("p",null,[pnt,Xe(" "+J(i.personalityAuthor),1)]),l("p",null,[_nt,Xe(" "+J(i.personalityDescription),1)]),l("p",null,[hnt,Xe(" "+J(i.personalityCategory),1)]),i.disclaimer?(T(),w("p",fnt,[mnt,Xe(" "+J(i.disclaimer),1)])):G("",!0),l("p",null,[gnt,Xe(" "+J(i.conditioningText),1)]),l("p",null,[bnt,Xe(" "+J(i.aiPrefix),1)]),l("p",null,[Ent,Xe(" "+J(i.userPrefix),1)]),l("div",null,[ynt,l("ul",null,[(T(!0),w(Ve,null,Je(i.antipromptsList,o=>(T(),w("li",{key:o.id},J(o.text),1))),128))])]),l("button",{onClick:e[0]||(e[0]=o=>i.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),i.editMode?(T(),w("button",{key:1,onClick:e[1]||(e[1]=(...o)=>r.commitChanges&&r.commitChanges(...o)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):G("",!0)])}const Snt=at(ant,[["render",vnt]]),Vu="/assets/logo-9d653710.svg",Tnt="/",xnt={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onOpenFolder:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function},components:{InteractiveMenu:eE},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0}}},computed:{commandsList(){let t=[{name:this.isMounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.isMounted?this.unmount:this.mount},{name:"reinstall",icon:"feather:terminal",is_file:!1,value:this.toggleReinstall}];return console.log("this.category",this.personality.category),this.personality.category=="custom_personalities"?t.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):t.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&t.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),t},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,Fe(()=>{Ge.replace()})},methods:{showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return Tnt+this.personality.avatar},defaultImg(t){t.target.src=Vu},showFolder(){this.onOpenFolder(this)},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},edit(){this.onEdit(this)},copyToCustom(){this.onCopyToCustom(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this),this.isMounted=!1},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)}},watch:{selected(){Fe(()=>{Ge.replace()})}}},Cnt=["title"],wnt={class:"flex flex-row items-center flex-shrink-0 gap-3"},Rnt=["src"],Ant=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),Nnt=[Ant],Ont=["src"],Int={class:""},Mnt={class:""},Dnt={class:"flex items-center"},knt=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),Lnt=l("b",null,"Author: ",-1),Pnt={class:"flex items-center"},Unt=l("i",{"data-feather":"git-commit",class:"w-5 m-1"},null,-1),Fnt=l("b",null,"Version: ",-1),Bnt={key:0,class:"flex items-center"},Gnt=l("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),Vnt=l("b",null,"Languages: ",-1),znt=["selected"],Hnt={key:1,class:"flex items-center"},qnt=l("i",{"data-feather":"globe",class:"w-5 m-1"},null,-1),Ynt=l("b",null,"Language: ",-1),$nt={class:"flex items-center"},Wnt=l("i",{"data-feather":"bookmark",class:"w-5 m-1"},null,-1),Knt=l("b",null,"Category: ",-1),jnt=l("div",{class:"flex items-center"},[l("i",{"data-feather":"info",class:"w-5 m-1"}),l("b",null,"Description: "),l("br")],-1),Qnt=["title","innerHTML"],Xnt={class:"rounded bg-blue-300"},Znt=l("i",{"data-feather":"check"},null,-1),Jnt=l("span",{class:"sr-only"},"Select",-1),est=[Znt,Jnt],tst=l("i",{"data-feather":"send",class:"w-5"},null,-1),nst=l("span",{class:"sr-only"},"Talk",-1),sst=[tst,nst],ist=l("i",{"data-feather":"folder",class:"w-5"},null,-1),rst=l("span",{class:"sr-only"},"Show Folder",-1),ost=[ist,rst];function ast(t,e,n,s,i,r){const o=ct("InteractiveMenu");return T(),w("div",{class:Ue(["min-w-96 items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",r.selected_computed?"border-2 border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),tabindex:"-1",title:n.personality.installed?"":"Not installed"},[l("div",{class:Ue(n.personality.installed?"":"border-red-500")},[l("div",wnt,[l("img",{onClick:e[0]||(e[0]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),ref:"imgElement",src:r.getImgUrl(),onError:e[1]||(e[1]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-red-700 cursor-pointer",onMouseover:e[2]||(e[2]=(...a)=>r.showThumbnail&&r.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>r.updateThumbnailPosition&&r.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>r.hideThumbnail&&r.hideThumbnail(...a))},null,40,Rnt),l("h3",{onClick:e[5]||(e[5]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),class:"font-bold font-large text-lg line-clamp-3 cursor-pointer",onMouseover:e[6]||(e[6]=(...a)=>r.showThumbnail&&r.showThumbnail(...a)),onMousemove:e[7]||(e[7]=(...a)=>r.updateThumbnailPosition&&r.updateThumbnailPosition(...a)),onMouseleave:e[8]||(e[8]=(...a)=>r.hideThumbnail&&r.hideThumbnail(...a))},J(n.personality.name),33),l("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[9]||(e[9]=ae(a=>r.toggleCopyLink(),["stop"]))},Nnt),i.thumbnailVisible?(T(),w("div",{key:0,style:$t({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[l("img",{src:r.getImgUrl(),class:"w-full h-full object-fill"},null,8,Ont)],4)):G("",!0)]),l("div",Int,[l("div",Mnt,[l("div",Dnt,[knt,Lnt,Xe(" "+J(n.personality.author),1)]),l("div",Pnt,[Unt,Fnt,Xe(" "+J(n.personality.version),1)]),n.personality.languages&&n.select_language?(T(),w("div",Bnt,[Gnt,Vnt,i.isMounted?G("",!0):U((T(),w("select",{key:0,id:"languages","onUpdate:modelValue":e[10]||(e[10]=a=>n.personality.language=a),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"},[(T(!0),w(Ve,null,Je(n.personality.languages,(a,c)=>(T(),w("option",{key:c,selected:a==n.personality.languages[0]},J(a),9,znt))),128))],512)),[[Vt,n.personality.language]])])):G("",!0),n.personality.language?(T(),w("div",Hnt,[qnt,Ynt,Xe(" "+J(n.personality.language),1)])):G("",!0),l("div",$nt,[Wnt,Knt,Xe(" "+J(n.personality.category),1)])]),jnt,l("p",{class:"mx-1 opacity-80 h-20 overflow-y-auto 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",title:n.personality.description,innerHTML:n.personality.description},null,8,Qnt)]),l("div",Xnt,[i.isMounted?(T(),w("button",{key:0,type:"button",title:"Select",onClick:[e[11]||(e[11]=(...a)=>r.toggleSelected&&r.toggleSelected(...a)),e[12]||(e[12]=ae(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},est)):G("",!0),i.isMounted?(T(),w("button",{key:1,type:"button",title:"Talk",onClick:[e[13]||(e[13]=(...a)=>r.toggleTalk&&r.toggleTalk(...a)),e[14]||(e[14]=ae(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},sst)):G("",!0),l("button",{type:"button",title:"Show_folder",onClick:[e[15]||(e[15]=(...a)=>r.showFolder&&r.showFolder(...a)),e[16]||(e[16]=ae(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},ost),_e(o,{commands:r.commandsList,force_position:2,title:"Menu"},null,8,["commands"])])],2)],10,Cnt)}const RN=at(xnt,[["render",ast]]);const lst={props:{ui:{type:String,required:!0,default:""}},watch:{ui(t,e){console.log(`ui changed from ${e} to ${t}`),this.$nextTick(()=>{this.evaluateScriptTags()})}},data(){return{}},mounted(){this.$nextTick(()=>{this.evaluateScriptTags()})},methods:{evaluateScriptTags(){console.log("evaluateScriptTags");const t=document.createElement("div");t.innerHTML=this.ui,t.querySelectorAll("script").forEach(n=>{const s=document.createElement("script");s.textContent=n.textContent,document.body.appendChild(s),document.body.removeChild(s)}),this.$refs.ui.innerHTML=t.innerHTML,console.log("this.$refs.ui.innerHTML"),console.log(this.$refs.ui.innerHTML)}}},cst={class:"w-full h-auto overflow-y-auto 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",ref:"ui"};function dst(t,e,n,s,i,r){return T(),w("div",cst,null,512)}const AN=at(lst,[["render",dst]]),ust="/",pst={components:{DynamicUIRenderer:AN},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){Fe(()=>{Ge.replace()})},methods:{copyToClipBoard(t){console.log("Copying to clipboard :",t),navigator.clipboard.writeText(t)},getImgUrl(){return ust+this.binding.icon},defaultImg(t){t.target.src=Vu},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(this)},toggleUnInstall(){this.onUnInstall(this)},toggleReinstall(){this.onReinstall(this)},toggleReloadBinding(){this.onReloadBinding(this)},toggleSettings(){this.onSettings(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}},watch:{selected(){Fe(()=>{Ge.replace()})}}},_st=["title"],hst={class:"flex flex-row items-center gap-3"},fst=["src"],mst={class:"font-bold font-large text-lg truncate"},gst=l("div",{class:"grow"},null,-1),bst={class:"flex-none gap-1"},Est=l("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),yst=l("span",{class:"sr-only"},"Help",-1),vst=[Est,yst],Sst={class:"flex items-center flex-row-reverse gap-2 my-1"},Tst=l("span",{class:"sr-only"},"Click to install",-1),xst=l("span",{class:"sr-only"},"Reinstall",-1),Cst=l("span",{class:"sr-only"},"UnInstall",-1),wst=l("span",{class:"sr-only"},"Settings",-1),Rst={class:""},Ast={class:""},Nst={class:"flex items-center"},Ost=l("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),Ist=l("b",null,"Author: ",-1),Mst={class:"flex items-center"},Dst=l("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),kst=l("b",null,"Folder: ",-1),Lst=l("div",{class:"grow"},null,-1),Pst=l("i",{"data-feather":"clipboard",class:"w-5"},null,-1),Ust=[Pst],Fst={class:"flex items-center"},Bst=l("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),Gst=l("b",null,"Version: ",-1),Vst={class:"flex items-center"},zst=l("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),Hst=l("b",null,"Link: ",-1),qst=["href"],Yst=l("div",{class:"flex items-center"},[l("i",{"data-feather":"info",class:"w-5 m-1"}),l("b",null,"Description: "),l("br")],-1),$st=["title","innerHTML"];function Wst(t,e,n,s,i,r){const o=ct("DynamicUIRenderer");return T(),w("div",{class:Ue(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",n.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=ae((...a)=>r.toggleSelected&&r.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[l("div",null,[l("div",hst,[l("img",{ref:"imgElement",src:r.getImgUrl(),onError:e[0]||(e[0]=a=>r.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,fst),l("h3",mst,J(n.binding.name),1),gst,l("div",bst,[n.selected?(T(),w("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>r.toggleReloadBinding&&r.toggleReloadBinding(...a)),e[2]||(e[2]=ae(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},vst)):G("",!0)])]),l("div",Sst,[n.binding.installed?G("",!0):(T(),w("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=ae((...a)=>r.toggleInstall&&r.toggleInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[Xe(" Install "),Tst])),n.binding.installed?(T(),w("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=ae((...a)=>r.toggleReinstall&&r.toggleReinstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-green-700 hover:bg-red-800 focus:ring-4 focus:ring-green-300 rounded-lg dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-red-900"},[Xe(" Reinstall "),xst])):G("",!0),n.binding.installed?(T(),w("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=ae((...a)=>r.toggleUnInstall&&r.toggleUnInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},[Xe(" Uninstall "),Cst])):G("",!0),n.selected?(T(),w("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=ae((...a)=>r.toggleSettings&&r.toggleSettings(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[Xe(" Settings "),wst])):G("",!0)]),n.binding.ui?(T(),St(o,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):G("",!0),l("div",Rst,[l("div",Ast,[l("div",Nst,[Ost,Ist,Xe(" "+J(n.binding.author),1)]),l("div",Mst,[Dst,kst,Xe(" "+J(n.binding.folder)+" ",1),Lst,l("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[7]||(e[7]=ae(a=>r.copyToClipBoard(this.binding.folder),["stop"]))},Ust)]),l("div",Fst,[Bst,Gst,Xe(" "+J(n.binding.version),1)]),l("div",Vst,[zst,Hst,l("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},J(n.binding.link),9,qst)])]),Yst,l("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,$st)])])],10,_st)}const Kst=at(pst,[["render",Wst]]),jst={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(t=>{this.resolve=t})},hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},showDialog(t){return new Promise(e=>{this.model_path=t,this.show=!0,this.resolve=e})}}},Qst={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},Xst={class:"relative w-full max-w-md max-h-full"},Zst={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},Jst=l("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("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),eit=l("span",{class:"sr-only"},"Close modal",-1),tit=[Jst,eit],nit={class:"p-4 text-center"},sit=l("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),iit={class:"p-4 text-center mx-auto mb-4"},rit=l("label",{class:"mr-2"},"Model path",-1);function oit(t,e,n,s,i,r){return i.show?(T(),w("div",Qst,[l("div",Xst,[l("div",Zst,[l("button",{type:"button",onClick:e[0]||(e[0]=o=>r.hide(!1)),class:"absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},tit),l("div",nit,[sit,l("div",iit,[rit,U(l("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>i.model_path=o),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[ue,i.model_path]])]),l("button",{onClick:e[2]||(e[2]=o=>r.hide(!0)),type:"button",class:"text-white bg-green-600 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Add "),l("button",{onClick:e[3]||(e[3]=o=>r.hide(!1)),type:"button",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"},"No, cancel")])])])])):G("",!0)}const ait=at(jst,[["render",oit]]);const lit={props:{show:{type:Boolean,default:!1,required:!1},can_remove:{type:Boolean,default:!1},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null,showInput:!1,newFilename:""}},methods:{displayName(t){return console.log("choice:",t),typeof t=="string"?t:t&&t.name?t.name:""},selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},toggleInput(){this.showInput=!this.showInput},addNewFilename(){const t=this.newFilename.trim();t!==""&&(this.choices.push(t),this.newFilename="",this.selectChoice(t)),this.showInput=!1},removeChoice(t,e){this.choices.splice(e,1),t===this.selectedChoice&&(this.selectedChoice=null),this.$emit("choice-removed",t)}}},cit={key:0,class:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},dit={class:"bg-bg-light dark:bg-bg-dark rounded-lg p-6 w-96"},uit={class:"text-xl font-bold text-5xl drop-shadow-md align-middle"},pit={class:"h-48 text-light-text-panel dark:text-dark-text-panel bg-bg-light-tone-panel dark:bg-dark-tone-panel overflow-y-auto rounded drop-shadow-md overflow-y-auto 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"},_it=["onClick"],hit={class:"font-bold text-dark-text-panel dark:text-light-text-panel"},fit=l("br",null,null,-1),mit={key:0,class:"text-xs text-gray-500"},git=["onClick"],bit={key:0,class:"flex flex-row mt-4 bg-light-tone-panel dark:bg-dark-tone-panel"},Eit={class:"flex justify-end mt-4"},yit=["disabled"];function vit(t,e,n,s,i,r){return T(),St(Ds,{name:"fade"},{default:He(()=>[n.show?(T(),w("div",cit,[l("div",dit,[l("h2",uit,J(n.title),1),l("div",pit,[l("ul",null,[(T(!0),w(Ve,null,Je(n.choices,(o,a)=>(T(),w("li",{key:a,onClick:c=>r.selectChoice(o),class:Ue([{"selected-choice":o===i.selectedChoice},"py-2 px-4 cursor-pointer hover:bg-accent dark:hover:bg-secondary"])},[l("span",hit,J(r.displayName(o)),1),fit,o.size?(T(),w("span",mit,J(r.formatSize(o.size)),1)):G("",!0),n.can_remove?(T(),w("button",{key:1,onClick:ae(c=>r.removeChoice(o,a),["stop"]),class:"ml-2 text-red-500 hover:text-red-600"}," X ",8,git)):G("",!0)],10,_it))),128))])]),i.showInput?(T(),w("div",bit,[U(l("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>i.newFilename=o),placeholder:"Enter a filename",class:"border border-gray-300 p-2 rounded-lg w-full"},null,512),[[ue,i.newFilename]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.addNewFilename&&r.addNewFilename(...o)),class:"ml-2 grow pl-2 pr-2 bg-primary hover:bg-primary-light text-white rounded-lg transition duration-300"}," Add ")])):G("",!0),l("div",Eit,[l("button",{onClick:e[2]||(e[2]=(...o)=>r.closeDialog&&r.closeDialog(...o)),class:"py-2 px-4 mr-2 bg-secondary hover:bg-accent text-white rounded-lg transition duration-300"}," Cancel "),l("button",{onClick:e[3]||(e[3]=(...o)=>r.validateChoice&&r.validateChoice(...o)),class:Ue([{"bg-gray-400 cursor-not-allowed":!i.selectedChoice,"bg-primary hover:bg-primary-light":i.selectedChoice,"text-white":i.selectedChoice,"text-gray-500":!i.selectedChoice},"py-2 px-4 rounded-lg transition duration-300"]),disabled:!i.selectedChoice}," Validate ",10,yit),l("button",{onClick:e[4]||(e[4]=(...o)=>r.toggleInput&&r.toggleInput(...o)),class:"py-2 px-4 ml-2 bg-accent hover:bg-secondary text-white rounded-lg transition duration-300"}," Add New ")])])])):G("",!0)]),_:1})}const tE=at(lit,[["render",vit]]),Sit={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const t=this.radioOptions.find(e=>e.value===this.selectedValue);return t?t.label:""}},watch:{selectedValue(t,e){this.$emit("radio-selected",t)}},methods:{handleRadioChange(){}}},Tit={class:"flex space-x-4"},xit=["value","aria-checked"],Cit={class:"text-gray-700"};function wit(t,e,n,s,i,r){return T(),w("div",Tit,[(T(!0),w(Ve,null,Je(n.radioOptions,(o,a)=>(T(),w("label",{key:o.value,class:"flex items-center space-x-2"},[U(l("input",{type:"radio",value:o.value,"onUpdate:modelValue":e[0]||(e[0]=c=>i.selectedValue=c),onChange:e[1]||(e[1]=(...c)=>r.handleRadioChange&&r.handleRadioChange(...c)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===o.value.toString(),role:"radio"},null,40,xit),[[nD,i.selectedValue]]),l("span",Cit,J(o.label),1)]))),128))])}const Rit=at(Sit,[["render",wit]]),Ait="/assets/gpu-df72bf63.svg",Nit={name:"StringListManager",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Enter an item"}},emits:["update:modelValue","change"],data(){return{newItem:"",draggingIndex:null}},methods:{addItem(){if(this.newItem.trim()){const t=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",t),this.$emit("change"),this.newItem=""}},removeItem(t){const e=this.modelValue.filter((n,s)=>s!==t);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(t){this.draggingIndex=t},dragItem(t){if(this.draggingIndex!==null){const e=[...this.modelValue],n=e.splice(this.draggingIndex,1)[0];e.splice(t,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null},moveUp(t){if(t>0){const e=[...this.modelValue],n=e.splice(t,1)[0];e.splice(t-1,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},moveDown(t){if(ti.newItem=o),placeholder:n.placeholder,onKeyup:e[1]||(e[1]=ti((...o)=>r.addItem&&r.addItem(...o),["enter"])),class:"flex-grow mr-4 px-4 py-2 border border-gray-300 rounded dark:bg-gray-600 text-lg"},null,40,Iit),[[ue,i.newItem]]),l("button",{onClick:e[2]||(e[2]=(...o)=>r.addItem&&r.addItem(...o)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg"},"Add")]),n.modelValue.length>0?(T(),w("ul",Mit,[(T(!0),w(Ve,null,Je(n.modelValue,(o,a)=>(T(),w("li",{key:a,class:Ue(["flex items-center mb-2 relative",{"bg-gray-200":i.draggingIndex===a}])},[l("span",Dit,J(o),1),l("div",kit,[l("button",{onClick:c=>r.removeItem(a),class:"text-red-500 hover:text-red-700 p-2"},Uit,8,Lit),a>0?(T(),w("button",{key:0,onClick:c=>r.moveUp(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded mr-2"},Git,8,Fit)):G("",!0),ar.moveDown(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded"},Hit,8,Vit)):G("",!0)]),i.draggingIndex===a?(T(),w("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:c=>r.startDragging(a),onMousemove:c=>r.dragItem(a),onMouseup:e[3]||(e[3]=(...c)=>r.stopDragging&&r.stopDragging(...c))},null,40,qit)):G("",!0)],2))),128))])):G("",!0),n.modelValue.length>0?(T(),w("div",Yit,[l("button",{onClick:e[4]||(e[4]=(...o)=>r.removeAll&&r.removeAll(...o)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg"},"Remove All")])):G("",!0)])}const Wit=at(Nit,[["render",$it]]);const Kit="/";de.defaults.baseURL="/";const jit={components:{AddModelDialog:ait,ModelEntry:ont,PersonalityViewer:Snt,PersonalityEntry:RN,BindingEntry:Kst,ChoiceDialog:tE,Card:Gu,StringListManager:Wit,RadioOptions:Rit},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},defaultModelImgPlaceholder:As,snd_input_devices:[],snd_input_devices_indexes:[],snd_output_devices:[],snd_output_devices_indexes:[],voices:[],voice_languages:{Arabic:"ar","Brazilian Portuguese":"pt",Chinese:"zh-cn",Czech:"cs",Dutch:"nl",English:"en",French:"fr",German:"de",Italian:"it",Polish:"pl",Russian:"ru",Spanish:"es",Turkish:"tr",Japanese:"ja",Korean:"ko",Hungarian:"hu",Hindi:"hi"},storeLogo:ms,binding_changed:!1,SVGGPU:Ait,models_zoo:[],models_zoo_initialLoadCount:10,models_zoo_loadMoreCount:5,models_zoo_loadedEntries:[],models_zoo_scrollThreshold:200,sortOptions:[{label:"Sort by Date",value:0},{label:"Sort by Rank",value:1},{label:"Sort by Name",value:2},{label:"Sort by Maker",value:3},{label:"Sort by Quantizer",value:4}],comfyui_models:[],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],collapsedArr:[],all_collapsed:!0,data_conf_collapsed:!0,internet_conf_collapsed:!0,servers_conf_collapsed:!0,mainconf_collapsed:!0,smartrouterconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,ezl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:Kit,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){try{this.$store.state.loading_infos="Getting Hardware usage",await this.refreshHardwareUsage(this.$store)}catch(t){console.log("Error cought:",t)}qe.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(t=>t.json()).then(t=>{this.voices=t.voices}).catch(t=>console.error("Error fetching voices:",t))},async refreshHardwareUsage(t){await t.dispatch("refreshDiskUsage"),await t.dispatch("refreshRamUsage"),await t.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.rag_databases.push(""),this.settingsChanged=!0},removeDataSource(t){this.$store.state.config.rag_databases.splice(t,1),this.settingsChanged=!0},async vectorize_folder(t){await de.post("/vectorize_folder",{client_id:this.$store.state.client_id,db_path:this.$store.state.config.rag_databases[t]},this.posts_headers)},async select_folder(t){try{qe.on("rag_db_added",e=>{console.log(e),e?(this.$store.state.config.rag_databases[t]=`${e.database_name}::${e.database_path}`,this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await de.post("/add_rag_database",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},handleTemplateSelection(t){console.log("handleTemplateSelection");const e=t.target.value;console.log("handleTemplateSelection: ",e),e==="lollms"?(console.log("Using lollms template"),this.configFile.start_header_id_template="!@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="!@>",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="!@>",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="lollms_simplified"?(console.log("Using lollms template"),this.configFile.start_header_id_template="@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="@>",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="@>",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="bare"?(console.log("Using lollms template"),this.configFile.start_header_id_template="",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="llama3"?(console.log("Using llama3 template"),this.configFile.start_header_id_template="<|start_header_id|>",this.configFile.system_message_template="system",this.configFile.end_header_id_template="<|end_header_id|>",this.configFile.separator_template="<|eot_id|>",this.configFile.start_user_header_id_template="<|start_header_id|>",this.configFile.end_user_header_id_template="<|end_header_id|>",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="<|start_header_id|>",this.configFile.end_ai_header_id_template="<|end_header_id|>",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="mistral"&&(console.log("Using mistral template"),this.configFile.start_header_id_template="[INST]",this.configFile.system_message_template=" Using this information",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` @@ -146,25 +146,25 @@ Verify that the personality is not already copied there.`,4,!1)}).catch(e=>{this `,4,!1),console.error(e)})},async remountPersonality(t){await this.unmountPersonality(t),await this.mountPersonality(t)},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,console.log("Personality path:",t.personality.path),de.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:t.personality.path},{headers:this.posts_headers}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$store.state.toast.showToast("Personality reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(t){t.target.src=ms},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();try{console.log("Loading input devices list");const t=await de.get("/get_snd_input_devices");this.snd_input_devices=t.data.device_names,this.snd_input_devices_indexes=t.data.device_indexes}catch{console.log("Couldin't list input devices")}try{console.log("Loading output devices list");const t=await de.get("/get_snd_output_devices");this.snd_output_devices=t.data.device_names,this.snd_output_devices_indexes=t.data.device_indexes}catch{console.log("Couldin't list output devices")}try{console.log("Getting comfyui models");const t=await de.get("/list_comfyui_models");console.log("res is ",t),t.data.status&&(this.comfyui_models=t.data.models)}catch{console.log("Couldin't list output devices")}this.fetchElevenLabsVoices()},activated(){},computed:{full_template:{get(){return(this.configFile.start_header_id_template+this.configFile.system_message_template+this.configFile.end_header_id_template+" system message"+this.configFile.separator_template+this.configFile.start_user_header_id_template+"user name"+this.configFile.end_user_header_id_template+" User prompt"+this.configFile.separator_template+this.configFile.end_user_message_id_template+this.configFile.separator_template+this.configFile.start_ai_header_id_template+"ai personality"+this.configFile.end_ai_header_id_template+"ai response"+this.configFile.end_ai_message_id_template).replace(` `,"
")}},rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(t=>t.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(t=>t.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return As;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return As}}},imgModel:{get(){try{let t=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return t>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[t].icon}`),this.$store.state.modelsZoo[t].icon):As}catch{console.log("error")}if(!this.isMounted)return As;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return As}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(t){this.$store.state.config.audio_out_voice=t}},openaiWhisperModels(){return["whisper-1"]},whisperModels(){return["tiny.en","tiny","base.en","base","small.en","small","medium.en","medium","large-v1","large-v2","large-v3","large"]},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(t){this.$store.commit("setConfig",t)}},userName:{get(){return this.$store.state.config.user_name},set(t){this.$store.state.config.user_name=t}},user_avatar:{get(){return this.$store.state.config.user_avatar!=""?"/user_infos/"+this.$store.state.config.user_avatar:ms},set(t){this.$store.state.config.user_avatar=t}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(t){this.$store.state.config.hardware_mode=t}},auto_update:{get(){return this.$store.state.config.auto_update},set(t){this.$store.state.config.auto_update=t}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(t){this.$store.state.config.auto_speak=t}},auto_read:{get(){return this.$store.state.config.auto_read},set(t){this.$store.state.config.auto_read=t}},xtts_current_language:{get(){return this.$store.state.config.xtts_current_language},set(t){console.log("Current xtts voice set to ",t),this.$store.state.config.xtts_current_language=t}},xtts_current_voice:{get(){return this.$store.state.config.xtts_current_voice===null||this.$store.state.config.xtts_current_voice===void 0?(console.log("current voice",this.$store.state.config.xtts_current_voice),"main_voice"):this.$store.state.config.xtts_current_voice},set(t){t=="main_voice"||t===void 0?(console.log("Current voice set to None"),this.$store.state.config.xtts_current_voice=null):(console.log("Current voice set to ",t),this.$store.state.config.xtts_current_voice=t)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(t){this.$store.state.config.audio_pitch=t}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(t){this.$store.state.config.audio_in_language=t}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(t){this.$store.state.config.use_user_name_in_discussions=t}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(t){this.$store.state.config.discussion_db_name=t}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(t){this.$store.commit("setbindingsZoo",t)}},modelsArr:{get(){return this.$store.state.modelsArr},set(t){this.$store.commit("setModelsArr",t)}},models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},installed_models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},diskUsage:{get(){return this.$store.state.diskUsage},set(t){this.$store.commit("setDiskUsage",t)}},ramUsage:{get(){return this.$store.state.ramUsage},set(t){this.$store.commit("setRamUsage",t)}},vramUsage:{get(){return this.$store.state.vramUsage},set(t){this.$store.commit("setVramUsage",t)}},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 null;const t=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);return t>-1?this.bindingsZoo[t].name:null},active_pesonality(){if(!this.isMounted)return null;const t=this.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);return t>-1?this.personalities[t].name:null},speed_computed(){return Xs(this.addModel.speed)},total_size_computed(){return Xs(this.addModel.total_size)},downloaded_size_computed(){return Xs(this.addModel.downloaded_size)}},watch:{bec_collapsed(){Fe(()=>{Ge.replace()})},pc_collapsed(){Fe(()=>{Ge.replace()})},mc_collapsed(){Fe(()=>{Ge.replace()})},sc_collapsed(){Fe(()=>{Ge.replace()})},showConfirmation(){Fe(()=>{Ge.replace()})},mzl_collapsed(){Fe(()=>{Ge.replace()})},pzl_collapsed(){Fe(()=>{Ge.replace()})},ezl_collapsed(){Fe(()=>{Ge.replace()})},bzl_collapsed(){Fe(()=>{Ge.replace()})},all_collapsed(t){this.collapseAll(t),Fe(()=>{Ge.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,Fe(()=>{Ge.replace()})},isLoading(){Fe(()=>{Ge.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},mzdc_collapsed(){Fe(()=>{Ge.replace()})}},async beforeRouteLeave(t){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}},k=t=>(Mi("data-v-edf01d94"),t=t(),Di(),t),Yit={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"},$it={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"},Wit={key:0,class:"flex gap-3 flex-1 items-center duration-75"},Kit=k(()=>l("i",{"data-feather":"x"},null,-1)),jit=[Kit],Qit=k(()=>l("i",{"data-feather":"check"},null,-1)),Xit=[Qit],Zit={key:1,class:"flex gap-3 flex-1 items-center"},Jit=k(()=>l("i",{"data-feather":"refresh-ccw"},null,-1)),ert=[Jit],trt=k(()=>l("i",{"data-feather":"list"},null,-1)),nrt=[trt],srt={class:"flex gap-3 flex-1 items-center justify-end"},irt=k(()=>l("i",{"data-feather":"trash-2"},null,-1)),rrt=[irt],ort=k(()=>l("i",{"data-feather":"refresh-ccw"},null,-1)),art=[ort],lrt=k(()=>l("i",{"data-feather":"arrow-up-circle"},null,-1)),crt=k(()=>l("i",{"data-feather":"alert-circle"},null,-1)),drt=[lrt,crt],urt={class:"flex gap-3 items-center"},prt={key:0,class:"flex gap-3 items-center"},_rt=k(()=>l("div",{class:"flex flex-row"},[l("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),l("i",{"data-feather":"check"})],-1)),hrt=[_rt],frt=k(()=>l("div",{class:"flex flex-row"},[l("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),l("i",{"data-feather":"x"})],-1)),mrt=[frt],grt={key:1,role:"status"},brt=k(()=>l("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"},[l("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"}),l("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)),Ert=k(()=>l("span",{class:"sr-only"},"Loading...",-1)),yrt={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"},vrt={class:"flex flex-row p-3"},Srt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Trt=[Srt],xrt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Crt=[xrt],wrt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),Rrt=k(()=>l("div",{class:"mr-2"},"|",-1)),Art={class:"text-base font-semibold cursor-pointer select-none items-center"},Nrt={class:"flex gap-2 items-center"},Ort={key:0},Irt=["src"],Mrt={class:"font-bold font-large text-lg"},Drt={key:1},krt={class:"flex gap-2 items-center"},Lrt=["src"],Prt={class:"font-bold font-large text-lg"},Urt=k(()=>l("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),Frt={class:"font-bold font-large text-lg"},Brt=k(()=>l("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),Grt={class:"font-bold font-large text-lg"},Vrt={class:"mb-2"},zrt=k(()=>l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[l("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"})]),Xe(" CPU Ram usage: ")],-1)),Hrt={class:"flex flex-col mx-2"},qrt=k(()=>l("b",null,"Avaliable ram: ",-1)),Yrt=k(()=>l("b",null,"Ram usage: ",-1)),$rt={class:"p-2"},Wrt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Krt={class:"mb-2"},jrt=k(()=>l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),Xe(" Disk usage: ")],-1)),Qrt={class:"flex flex-col mx-2"},Xrt=k(()=>l("b",null,"Avaliable disk space: ",-1)),Zrt=k(()=>l("b",null,"Disk usage: ",-1)),Jrt={class:"p-2"},eot={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},tot={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},not=["src"],sot={class:"flex flex-col mx-2"},iot=k(()=>l("b",null,"Model: ",-1)),rot=k(()=>l("b",null,"Avaliable vram: ",-1)),oot=k(()=>l("b",null,"GPU usage: ",-1)),aot={class:"p-2"},lot={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},cot={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"},dot={class:"flex flex-row p-3"},uot=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),pot=[uot],_ot=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),hot=[_ot],fot=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1)),mot={class:"flex flex-col mb-2 px-3 pb-2"},got={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"},bot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_smart_routing",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use Smart Routing:")],-1)),Eot={style:{width:"100%"}},yot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"smart_routing_router_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Router Model:")],-1)),vot={style:{width:"100%"}},Sot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"smart_routing_models_by_power",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Models by Power:")],-1)),Tot={style:{width:"100%"}},xot={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"},Cot={class:"flex flex-row p-3"},wot=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Rot=[wot],Aot=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Not=[Aot],Oot=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),Iot={class:"flex flex-col mb-2 px-3 pb-2"},Mot={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"},Dot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),kot={for:"logo-upload"},Lot=["src"],Pot={style:{width:"10%"}},Uot=k(()=>l("i",{"data-feather":"x"},null,-1)),Fot=[Uot],Bot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),Got={class:"text-center items-center"},Vot={class:"flex flex-row"},zot=k(()=>l("option",{value:"cpu"},"CPU",-1)),Hot=k(()=>l("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),qot=k(()=>l("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),Yot=k(()=>l("option",{value:"nvidia"},"NVIDIA",-1)),$ot=k(()=>l("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),Wot=k(()=>l("option",{value:"amd"},"AMD",-1)),Kot=k(()=>l("option",{value:"apple-intel"},"Apple Intel",-1)),jot=k(()=>l("option",{value:"apple-silicon"},"Apple Silicon",-1)),Qot=[zot,Hot,qot,Yot,$ot,Wot,Kot,jot],Xot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),Zot={style:{width:"100%"}},Jot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),eat={class:"flex flex-row"},tat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),nat={class:"flex flex-row"},sat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),iat={class:"flex flex-row"},rat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate showing the full prompt in console (for debug):")],-1)),oat={class:"flex flex-row"},aat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show final full prompt in console:")],-1)),lat={class:"flex flex-row"},cat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show chunks in console:")],-1)),dat={class:"flex flex-row"},uat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),pat={class:"flex flex-row"},_at=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),hat={class:"flex flex-row"},fat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),mat={class:"flex flex-row"},gat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),bat={class:"flex flex-row"},Eat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),yat={class:"flex flex-row"},vat={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"},Sat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),Tat=k(()=>l("option",{value:"lollms"},"Lollms communication template",-1)),xat=k(()=>l("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1)),Cat=k(()=>l("option",{value:"bare"},"Bare, useful when in chat mode",-1)),wat=k(()=>l("option",{value:"llama3"},"LLama3 communication template",-1)),Rat=k(()=>l("option",{value:"mistral"},"Mistral communication template",-1)),Aat=[Tat,xat,Cat,wat,Rat],Nat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),Oat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),Iat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),Mat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),Dat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),kat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),Lat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),Pat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),Uat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),Fat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),Bat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),Gat=["innerHTML"],Vat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_continue_message",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"useful for chat models and repote models but can be less useful for instruct ones"},"Use continue message:")],-1)),zat={style:{width:"100%"}},Hat={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"},qat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),Yat={style:{width:"100%"}},$at=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),Wat={style:{width:"100%"}},Kat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),jat={style:{width:"100%"}},Qat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),Xat={style:{width:"100%"}},Zat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),Jat={for:"avatar-upload"},elt=["src"],tlt={style:{width:"10%"}},nlt=k(()=>l("i",{"data-feather":"x"},null,-1)),slt=[nlt],ilt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),rlt={class:"flex flex-row"},olt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),alt={style:{width:"100%"}},llt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_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)),clt={style:{width:"100%"}},dlt={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"},ult=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),plt={style:{width:"100%"}},_lt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),hlt={style:{width:"100%"}},flt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),mlt={style:{width:"100%"}},glt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),blt={style:{width:"100%"}},Elt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),ylt={style:{width:"100%"}},vlt={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"},Slt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),Tlt={class:"flex flex-row"},xlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),Clt={style:{width:"100%"}},wlt={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"},Rlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),Alt={class:"flex flex-row"},Nlt={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"},Olt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),Ilt={class:"flex flex-row"},Mlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),Dlt={class:"flex flex-row"},klt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),Llt={class:"flex flex-row"},Plt={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"},Ult={class:"flex flex-row p-3"},Flt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Blt=[Flt],Glt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Vlt=[Glt],zlt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1)),Hlt={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"},qlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),Ylt={style:{width:"100%"}},$lt=["onUpdate:modelValue"],Wlt=["onClick"],Klt=["onClick"],jlt=["onClick"],Qlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),Xlt=k(()=>l("option",{value:"bert"},"Bert Vectorizer",-1)),Zlt=k(()=>l("option",{value:"tfidf"},"TFIDF Vectorizer",-1)),Jlt=k(()=>l("option",{value:"word2vec"},"Word2Vec Vectorizer",-1)),ect=[Xlt,Zlt,Jlt],tct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),nct=k(()=>l("option",{value:"bert-base-nli-mean-tokens"},"bert-base-nli-mean-tokens",-1)),sct=[nct],ict=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),rct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_overlap",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG overlap size:")],-1)),oct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),act=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),lct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),cct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),dct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),uct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_activate_multi_hops",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate multi hops RAG:")],-1)),pct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"contextual_summary",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use contextual summary instead of rag (consumes alot of tokens and may be very slow but efficient, useful for summary and global questions that RAG can't do):")],-1)),_ct={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"},hct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save vectorized database:")],-1)),fct={class:"flex flex-row"},mct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),gct={class:"flex flex-row"},bct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),Ect={class:"flex flex-row"},yct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_force_first_chunk",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force adding the first chunk of the file to the context:")],-1)),vct={class:"flex flex-row"},Sct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),Tct={class:"flex flex-row"},xct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),Cct=k(()=>l("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),wct=k(()=>l("option",{value:"bm25_vectorizer"},"bm25 Vectorizer",-1)),Rct=k(()=>l("option",{value:"model_embedding"},"Model Embedding",-1)),Act=k(()=>l("option",{value:"sentense_transformer"},"Sentense Transformer",-1)),Nct=[Cct,wct,Rct,Act],Oct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_sentense_transformer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization model (for Sentense Transformer):")],-1)),Ict={style:{width:"100%"}},Mct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),Dct=k(()=>l("option",{value:"PCA"},"PCA",-1)),kct=k(()=>l("option",{value:"TSNE"},"TSNE",-1)),Lct=[Dct,kct],Pct=k(()=>l("td",{style:{"min-width":"200px"}},[l("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)),Uct={class:"flex flex-row"},Fct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),Bct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),Gct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),Vct={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"},zct={class:"flex flex-row p-3"},Hct=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),qct=[Hct],Yct=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),$ct=[Yct],Wct=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1)),Kct={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"},jct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),Qct={class:"flex flex-row"},Xct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),Zct={class:"flex flex-row"},Jct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),edt={class:"flex flex-row"},tdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),ndt={class:"flex flex-row"},sdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),idt={class:"flex flex-col"},rdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),odt={class:"flex flex-col"},adt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),ldt={class:"flex flex-col"},cdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),ddt={class:"flex flex-col"},udt={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"},pdt={class:"flex flex-row p-3"},_dt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),hdt=[_dt],fdt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),mdt=[fdt],gdt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1)),bdt={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"},Edt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),ydt={style:{width:"100%"}},vdt=k(()=>l("option",{value:"None"},"None",-1)),Sdt=k(()=>l("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1)),Tdt=k(()=>l("option",{value:"xtts"},"XTTS",-1)),xdt=k(()=>l("option",{value:"openai_tts"},"Open AI TTS",-1)),Cdt=k(()=>l("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1)),wdt=[vdt,Sdt,Tdt,xdt,Cdt],Rdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),Adt={style:{width:"100%"}},Ndt=k(()=>l("option",{value:"None"},"None",-1)),Odt=k(()=>l("option",{value:"whisper"},"Whisper",-1)),Idt=k(()=>l("option",{value:"openai_whisper"},"Open AI Whisper",-1)),Mdt=[Ndt,Odt,Idt],Ddt=k(()=>l("tr",null,null,-1)),kdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),Ldt={style:{width:"100%"}},Pdt=k(()=>l("option",{value:"None"},"None",-1)),Udt=k(()=>l("option",{value:"diffusers"},"Diffusers",-1)),Fdt=k(()=>l("option",{value:"autosd"},"AUTO1111's SD",-1)),Bdt=k(()=>l("option",{value:"dall-e"},"Open AI DALL-E",-1)),Gdt=k(()=>l("option",{value:"midjourney"},"Midjourney",-1)),Vdt=k(()=>l("option",{value:"comfyui"},"Comfyui",-1)),zdt=k(()=>l("option",{value:"fooocus"},"Fooocus",-1)),Hdt=[Pdt,Udt,Fdt,Bdt,Gdt,Vdt,zdt],qdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),Ydt={style:{width:"100%"}},$dt=k(()=>l("option",{value:"None"},"None",-1)),Wdt=k(()=>l("option",{value:"musicgen"},"Music Gen",-1)),Kdt=[$dt,Wdt],jdt={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"},Qdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),Xdt={class:"flex flex-row"},Zdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),Jdt={class:"flex flex-row"},eut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),tut={class:"flex flex-row"},nut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),sut={class:"flex flex-row"},iut={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"},rut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),out={style:{width:"100%"}},aut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),lut={style:{width:"100%"}},cut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),dut={style:{width:"100%"}},uut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),put={style:{width:"100%"}},_ut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),hut={style:{width:"100%"}},fut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),mut={style:{width:"100%"}},gut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),but={style:{width:"100%"}},Eut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),yut={class:"flex flex-row"},vut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),Sut={class:"flex flex-row"},Tut={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"},xut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),Cut={style:{width:"100%"}},wut=["value"],Rut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),Aut={style:{width:"100%"}},Nut=["value"],Out={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"},Iut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),Mut={style:{width:"100%"}},Dut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys:")],-1)),kut={style:{width:"100%"}},Lut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"port",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),Put={style:{width:"100%"}},Uut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"headless_server_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode:")],-1)),Fut={style:{width:"100%"}},But=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),Gut={style:{width:"100%"}},Vut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_rag_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms RAG server:")],-1)),zut={style:{width:"100%"}},Hut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tts_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTS server:")],-1)),qut={style:{width:"100%"}},Yut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_stt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms STT server:")],-1)),$ut={style:{width:"100%"}},Wut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tti_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTI server:")],-1)),Kut={style:{width:"100%"}},jut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_itt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms ITT server:")],-1)),Qut={style:{width:"100%"}},Xut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_ttm_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTM server:")],-1)),Zut={style:{width:"100%"}},Jut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),ept={style:{width:"100%"}},tpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),npt={style:{width:"100%"}},spt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),ipt={style:{width:"100%"}},rpt={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"},opt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),apt={class:"flex flex-row"},lpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),cpt={class:"flex flex-row"},dpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),upt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),ppt=["value"],_pt={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"},hpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),fpt={class:"flex flex-row"},mpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),gpt={class:"flex flex-row"},bpt=["value"],Ept={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"},ypt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),vpt={class:"flex flex-row"},Spt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),Tpt={class:"flex flex-row"},xpt=["value"],Cpt={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"},wpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),Rpt={class:"flex flex-row"},Apt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),Npt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),Opt=["value"],Ipt={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"},Mpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),Dpt={class:"flex flex-row"},kpt=["value"],Lpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),Ppt={class:"flex flex-row"},Upt=["value"],Fpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),Bpt={class:"flex flex-row"},Gpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),Vpt={class:"flex flex-row"},zpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),Hpt={class:"flex flex-row"},qpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),Ypt={class:"flex flex-row"},$pt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),Wpt={class:"flex flex-row"},Kpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),jpt={class:"flex flex-row"},Qpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),Xpt={class:"flex flex-row"},Zpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),Jpt={class:"flex flex-row"},e_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),t_t={class:"flex flex-row"},n_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),s_t={class:"flex flex-row"},i_t={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"},r_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),o_t={class:"flex flex-row"},a_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),l_t={class:"flex flex-row"},c_t=k(()=>l("option",null," tts-1 ",-1)),d_t=k(()=>l("option",null," tts-2 ",-1)),u_t=[c_t,d_t],p_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),__t={class:"flex flex-row"},h_t=k(()=>l("option",null," alloy ",-1)),f_t=k(()=>l("option",null," echo ",-1)),m_t=k(()=>l("option",null," fable ",-1)),g_t=k(()=>l("option",null," nova ",-1)),b_t=k(()=>l("option",null," shimmer ",-1)),E_t=[h_t,f_t,m_t,g_t,b_t],y_t={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"},v_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),S_t={class:"flex flex-row"},T_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),x_t={class:"flex flex-row"},C_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),w_t={class:"flex flex-row"},R_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),A_t={class:"flex flex-row"},N_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),O_t={class:"flex flex-row"},I_t=["value"],M_t={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"},D_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),k_t={class:"flex flex-row"},L_t=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),P_t=[L_t],U_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),F_t={class:"flex flex-row"},B_t=k(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1)),G_t={class:"flex flex-row"},V_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),z_t={class:"flex flex-row"},H_t={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"},q_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),Y_t={class:"flex flex-row"},$_t=k(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1)),W_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),K_t={class:"flex flex-row"},j_t=k(()=>l("td",null,null,-1)),Q_t={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"},X_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),Z_t={class:"flex flex-row"},J_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),eht={class:"flex flex-row"},tht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),nht={class:"flex flex-row"},sht={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"},iht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),rht={class:"flex flex-row"},oht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),aht={class:"flex flex-row"},lht=k(()=>l("option",null," dall-e-2 ",-1)),cht=k(()=>l("option",null," dall-e-3 ",-1)),dht=[lht,cht],uht={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"},pht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),_ht={class:"flex flex-row"},hht=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),fht=[hht],mht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),ght={class:"flex flex-row"},bht=["value"],Eht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),yht={class:"flex flex-row"},vht=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Sht=[vht],Tht=k(()=>l("td",{style:{"min-width":"200px"}},null,-1)),xht={class:"flex flex-row"},Cht=k(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1)),wht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),Rht={class:"flex flex-row"},Aht={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"},Nht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),Oht={class:"flex flex-row"},Iht=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Mht=[Iht],Dht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),kht={class:"flex flex-row"},Lht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),Pht={class:"flex flex-row"},Uht={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"},Fht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),Bht={class:"flex flex-row"},Ght=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Vht=[Ght],zht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),Hht={class:"flex flex-row"},qht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),Yht={class:"flex flex-row"},$ht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),Wht={class:"flex flex-col align-bottom"},Kht={class:"relative"},jht=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),Qht={class:"absolute right-0"},Xht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),Zht={class:"flex flex-row"},Jht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),eft={class:"flex flex-row"},tft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),nft={class:"flex flex-row"},sft={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"},ift=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),rft={class:"flex flex-row"},oft=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),aft=[oft],lft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),cft={class:"flex flex-row"},dft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),uft={class:"flex flex-row"},pft={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"},_ft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Motion Ctrl service:")],-1)),hft={class:"flex flex-row"},fft=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),mft=[fft],gft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Motion Ctrl service:")],-1)),bft={class:"flex flex-row"},Eft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),yft={class:"flex flex-row"},vft={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"},Sft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),Tft={class:"flex flex-row"},xft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),Cft={class:"flex flex-row"},wft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),Rft={class:"flex flex-row"},Aft={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"},Nft={class:"flex flex-row p-3"},Oft=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Ift=[Oft],Mft=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Dft=[Mft],kft=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),Lft={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Pft=k(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),Uft={key:1,class:"mr-2"},Fft={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},Bft={class:"flex gap-1 items-center"},Gft=["src"],Vft={class:"font-bold font-large text-lg line-clamp-1"},zft={key:0,class:"mb-2"},Hft={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},qft=k(()=>l("i",{"data-feather":"chevron-up"},null,-1)),Yft=[qft],$ft=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Wft=[$ft],Kft={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"},jft={class:"flex flex-row p-3"},Qft=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Xft=[Qft],Zft=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Jft=[Zft],emt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),tmt={class:"flex flex-row items-center"},nmt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},smt=k(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),imt={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},rmt=k(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),omt={key:2,class:"mr-2"},amt={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},lmt={class:"flex gap-1 items-center"},cmt=["src"],dmt={class:"font-bold font-large text-lg line-clamp-1"},umt={class:"mx-2 mb-4"},pmt={class:"relative"},_mt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},hmt={key:0},fmt=k(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),mmt=[fmt],gmt={key:1},bmt=k(()=>l("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"},[l("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)),Emt=[bmt],ymt=k(()=>l("label",{for:"only_installed"},"Show only installed models",-1)),vmt=k(()=>l("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)),Smt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},Tmt=k(()=>l("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"},[l("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"}),l("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)),xmt=k(()=>l("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),Cmt=[Tmt,xmt],wmt={key:1,class:"mb-2"},Rmt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Amt=k(()=>l("i",{"data-feather":"chevron-up"},null,-1)),Nmt=[Amt],Omt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Imt=[Omt],Mmt={class:"mb-2"},Dmt={class:"p-2"},kmt={class:"mb-3"},Lmt=k(()=>l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),Pmt={key:0},Umt={class:"mb-3"},Fmt=k(()=>l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),Bmt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},Gmt=k(()=>l("div",{role:"status",class:"justify-center"},null,-1)),Vmt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},zmt={class:"w-full p-2"},Hmt={class:"flex justify-between mb-1"},qmt=gu(' Downloading Loading...',1),Ymt={class:"text-sm font-medium text-blue-700 dark:text-white"},$mt=["title"],Wmt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Kmt={class:"flex justify-between mb-1"},jmt={class:"text-base font-medium text-blue-700 dark:text-white"},Qmt={class:"text-sm font-medium text-blue-700 dark:text-white"},Xmt={class:"flex flex-grow"},Zmt={class:"flex flex-row flex-grow gap-3"},Jmt={class:"p-2 text-center grow"},egt={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"},tgt={class:"flex flex-row p-3 items-center"},ngt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),sgt=[ngt],igt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),rgt=[igt],ogt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),agt={key:0,class:"mr-2"},lgt={class:"mr-2 font-bold font-large text-lg line-clamp-1"},cgt={key:1,class:"mr-2"},dgt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},ugt={key:0,class:"flex -space-x-4 items-center"},pgt={class:"group items-center flex flex-row"},_gt=["onClick"],hgt=["src","title"],fgt=["onClick"],mgt=k(()=>l("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[l("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"},[l("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)),ggt=[mgt],bgt=k(()=>l("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"},[l("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)),Egt=[bgt],ygt={class:"mx-2 mb-4"},vgt=k(()=>l("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Sgt={class:"relative"},Tgt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},xgt={key:0},Cgt=k(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),wgt=[Cgt],Rgt={key:1},Agt=k(()=>l("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"},[l("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)),Ngt=[Agt],Ogt={key:0,class:"mx-2 mb-4"},Igt={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},Mgt=["selected"],Dgt={key:0,class:"mb-2"},kgt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Lgt=k(()=>l("i",{"data-feather":"chevron-up"},null,-1)),Pgt=[Lgt],Ugt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Fgt=[Ugt],Bgt={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"},Ggt={class:"flex flex-row"},Vgt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),zgt=[Vgt],Hgt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),qgt=[Hgt],Ygt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),$gt={class:"m-2"},Wgt={class:"flex flex-row gap-2 items-center"},Kgt=k(()=>l("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),jgt={class:"m-2"},Qgt=k(()=>l("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),Xgt={class:"m-2"},Zgt={class:"flex flex-col align-bottom"},Jgt={class:"relative"},ebt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),tbt={class:"absolute right-0"},nbt={class:"m-2"},sbt={class:"flex flex-col align-bottom"},ibt={class:"relative"},rbt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),obt={class:"absolute right-0"},abt={class:"m-2"},lbt={class:"flex flex-col align-bottom"},cbt={class:"relative"},dbt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),ubt={class:"absolute right-0"},pbt={class:"m-2"},_bt={class:"flex flex-col align-bottom"},hbt={class:"relative"},fbt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),mbt={class:"absolute right-0"},gbt={class:"m-2"},bbt={class:"flex flex-col align-bottom"},Ebt={class:"relative"},ybt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),vbt={class:"absolute right-0"},Sbt={class:"m-2"},Tbt={class:"flex flex-col align-bottom"},xbt={class:"relative"},Cbt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),wbt={class:"absolute right-0"};function Rbt(t,e,n,s,i,r){const o=ct("StringListManager"),a=ct("Card"),c=ct("BindingEntry"),u=ct("RadioOptions"),d=ct("model-entry"),h=ct("personality-entry"),f=ct("AddModelDialog"),m=ct("ChoiceDialog");return T(),w(Ve,null,[l("div",Yit,[l("div",$it,[i.showConfirmation?(T(),w("div",Wit,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=ae(_=>i.showConfirmation=!1,["stop"]))},jit),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=ae(_=>r.save_configuration(),["stop"]))},Xit)])):G("",!0),i.showConfirmation?G("",!0):(T(),w("div",Zit,[l("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=_=>r.reset_configuration())},ert),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=ae(_=>i.all_collapsed=!i.all_collapsed,["stop"]))},nrt)])),l("div",srt,[l("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=_=>r.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)}))},rrt),l("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=_=>r.api_post_req("restart_program").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},art),i.has_updates?(T(),w("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=_=>r.api_post_req("update_software").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},drt)):G("",!0),l("div",urt,[i.settingsChanged?(T(),w("div",prt,[i.isLoading?G("",!0):(T(),w("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=ae(_=>r.applyConfiguration(),["stop"]))},hrt)),i.isLoading?G("",!0):(T(),w("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=ae(_=>r.cancelConfiguration(),["stop"]))},mrt))])):G("",!0),i.isLoading?(T(),w("div",grt,[l("p",null,J(i.loading_text),1),brt,Ert])):G("",!0)])])]),l("div",{class:Ue(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[l("div",yrt,[l("div",vrt,[l("button",{onClick:e[9]||(e[9]=ae(_=>i.sc_collapsed=!i.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,Trt,512),[[wt,i.sc_collapsed]]),U(l("div",null,Crt,512),[[wt,!i.sc_collapsed]]),wrt,Rrt,l("div",Art,[l("div",Nrt,[l("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(T(),w("div",Ort,[(T(!0),w(Ve,null,Je(r.vramUsage.gpus,_=>(T(),w("div",{class:"flex gap-2 items-center",key:_},[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Irt),l("h3",Mrt,[l("div",null,J(r.computedFileSize(_.used_vram))+" / "+J(r.computedFileSize(_.total_vram))+" ("+J(_.percentage)+"%) ",1)])]))),128))])):G("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(T(),w("div",Drt,[l("div",krt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Lrt),l("h3",Prt,[l("div",null,J(r.vramUsage.gpus.length)+"x ",1)])])])):G("",!0)]),Urt,l("h3",Frt,[l("div",null,J(r.ram_usage)+" / "+J(r.ram_total_space)+" ("+J(r.ram_percent_usage)+"%)",1)]),Brt,l("h3",Grt,[l("div",null,J(r.disk_binding_models_usage)+" / "+J(r.disk_total_space)+" ("+J(r.disk_percent_usage)+"%)",1)])])])])]),l("div",{class:Ue([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Vrt,[zrt,l("div",Hrt,[l("div",null,[qrt,Xe(J(r.ram_available_space),1)]),l("div",null,[Yrt,Xe(" "+J(r.ram_usage)+" / "+J(r.ram_total_space)+" ("+J(r.ram_percent_usage)+")% ",1)])]),l("div",$rt,[l("div",Wrt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t("width: "+r.ram_percent_usage+"%;")},null,4)])])]),l("div",Krt,[jrt,l("div",Qrt,[l("div",null,[Xrt,Xe(J(r.disk_available_space),1)]),l("div",null,[Zrt,Xe(" "+J(r.disk_binding_models_usage)+" / "+J(r.disk_total_space)+" ("+J(r.disk_percent_usage)+"%)",1)])]),l("div",Jrt,[l("div",eot,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(T(!0),w(Ve,null,Je(r.vramUsage.gpus,_=>(T(),w("div",{class:"mb-2",key:_},[l("label",tot,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,not),Xe(" GPU usage: ")]),l("div",sot,[l("div",null,[iot,Xe(J(_.gpu_model),1)]),l("div",null,[rot,Xe(J(this.computedFileSize(_.available_space)),1)]),l("div",null,[oot,Xe(" "+J(this.computedFileSize(_.used_vram))+" / "+J(this.computedFileSize(_.total_vram))+" ("+J(_.percentage)+"%)",1)])]),l("div",aot,[l("div",lot,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t("width: "+_.percentage+"%;")},null,4)])])]))),128))],2)]),l("div",cot,[l("div",dot,[l("button",{onClick:e[10]||(e[10]=ae(_=>i.smartrouterconf_collapsed=!i.smartrouterconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,pot,512),[[wt,i.smartrouterconf_collapsed]]),U(l("div",null,hot,512),[[wt,!i.smartrouterconf_collapsed]]),fot])]),l("div",{class:Ue([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",mot,[_e(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",got,[l("tr",null,[bot,l("td",Eot,[U(l("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=_=>r.configFile.use_smart_routing=_),onChange:e[12]||(e[12]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_smart_routing]])])]),l("tr",null,[yot,l("td",vot,[U(l("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[13]||(e[13]=_=>r.configFile.smart_routing_router_model=_),onChange:e[14]||(e[14]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.smart_routing_router_model]])])]),l("tr",null,[Sot,l("td",Tot,[_e(o,{modelValue:r.configFile.smart_routing_models_by_power,"onUpdate:modelValue":e[15]||(e[15]=_=>r.configFile.smart_routing_models_by_power=_),onChange:e[16]||(e[16]=_=>i.settingsChanged=!0),placeholder:"Enter model name"},null,8,["modelValue"])])])])]),_:1})])],2)]),l("div",xot,[l("div",Cot,[l("button",{onClick:e[17]||(e[17]=ae(_=>i.mainconf_collapsed=!i.mainconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,Rot,512),[[wt,i.mainconf_collapsed]]),U(l("div",null,Not,512),[[wt,!i.mainconf_collapsed]]),Oot])]),l("div",{class:Ue([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Iot,[_e(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Mot,[l("tr",null,[Dot,l("td",null,[l("label",kot,[l("img",{src:r.configFile.app_custom_logo!=null&&r.configFile.app_custom_logo!=""?"/user_infos/"+r.configFile.app_custom_logo:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,Lot)]),l("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[18]||(e[18]=(..._)=>r.uploadLogo&&r.uploadLogo(..._))},null,32)]),l("td",Pot,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[19]||(e[19]=ae(_=>r.resetLogo(),["stop"]))},Fot)])]),l("tr",null,[Bot,l("td",Got,[l("div",Vot,[U(l("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[20]||(e[20]=_=>r.configFile.hardware_mode=_),onChange:e[21]||(e[21]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},Qot,544),[[Vt,r.configFile.hardware_mode]])])])]),l("tr",null,[Xot,l("td",Zot,[U(l("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[22]||(e[22]=_=>r.configFile.discussion_db_name=_),onChange:e[23]||(e[23]=_=>i.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),[[ue,r.configFile.discussion_db_name]])])]),l("tr",null,[Jot,l("td",null,[l("div",eat,[U(l("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[24]||(e[24]=_=>r.configFile.copy_to_clipboard_add_all_details=_),onChange:e[25]||(e[25]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.copy_to_clipboard_add_all_details]])])])]),l("tr",null,[tat,l("td",null,[l("div",nat,[U(l("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[26]||(e[26]=_=>r.configFile.auto_show_browser=_),onChange:e[27]||(e[27]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_show_browser]])])])]),l("tr",null,[sat,l("td",null,[l("div",iat,[U(l("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[28]||(e[28]=_=>r.configFile.debug=_),onChange:e[29]||(e[29]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug]])])])]),l("tr",null,[rat,l("td",null,[l("div",oat,[U(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[30]||(e[30]=_=>r.configFile.debug_show_final_full_prompt=_),onChange:e[31]||(e[31]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[aat,l("td",null,[l("div",lat,[U(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[32]||(e[32]=_=>r.configFile.debug_show_final_full_prompt=_),onChange:e[33]||(e[33]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[cat,l("td",null,[l("div",dat,[U(l("input",{type:"checkbox",id:"debug_show_chunks",required:"","onUpdate:modelValue":e[34]||(e[34]=_=>r.configFile.debug_show_chunks=_),onChange:e[35]||(e[35]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_chunks]])])])]),l("tr",null,[uat,l("td",null,[l("div",pat,[U(l("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[36]||(e[36]=_=>r.configFile.debug_log_file_path=_),onChange:e[37]||(e[37]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.debug_log_file_path]])])])]),l("tr",null,[_at,l("td",null,[l("div",hat,[U(l("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[38]||(e[38]=_=>r.configFile.show_news_panel=_),onChange:e[39]||(e[39]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.show_news_panel]])])])]),l("tr",null,[fat,l("td",null,[l("div",mat,[U(l("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[40]||(e[40]=_=>r.configFile.auto_save=_),onChange:e[41]||(e[41]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_save]])])])]),l("tr",null,[gat,l("td",null,[l("div",bat,[U(l("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[42]||(e[42]=_=>r.configFile.auto_update=_),onChange:e[43]||(e[43]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_update]])])])]),l("tr",null,[Eat,l("td",null,[l("div",yat,[U(l("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[44]||(e[44]=_=>r.configFile.auto_title=_),onChange:e[45]||(e[45]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_title]])])])])])]),_:1}),_e(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",vat,[l("tr",null,[Sat,l("td",null,[l("select",{onChange:e[46]||(e[46]=(..._)=>r.handleTemplateSelection&&r.handleTemplateSelection(..._))},Aat,32)])]),l("tr",null,[Nat,l("td",null,[U(l("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[47]||(e[47]=_=>r.configFile.start_header_id_template=_),onChange:e[48]||(e[48]=_=>i.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),[[ue,r.configFile.start_header_id_template]])])]),l("tr",null,[Oat,l("td",null,[U(l("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[49]||(e[49]=_=>r.configFile.end_header_id_template=_),onChange:e[50]||(e[50]=_=>i.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),[[ue,r.configFile.end_header_id_template]])])]),l("tr",null,[Iat,l("td",null,[U(l("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[51]||(e[51]=_=>r.configFile.start_user_header_id_template=_),onChange:e[52]||(e[52]=_=>i.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),[[ue,r.configFile.start_user_header_id_template]])])]),l("tr",null,[Mat,l("td",null,[U(l("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[53]||(e[53]=_=>r.configFile.end_user_header_id_template=_),onChange:e[54]||(e[54]=_=>i.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),[[ue,r.configFile.end_user_header_id_template]])])]),l("tr",null,[Dat,l("td",null,[U(l("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[55]||(e[55]=_=>r.configFile.end_user_message_id_template=_),onChange:e[56]||(e[56]=_=>i.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),[[ue,r.configFile.end_user_message_id_template]])])]),l("tr",null,[kat,l("td",null,[U(l("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[57]||(e[57]=_=>r.configFile.start_ai_header_id_template=_),onChange:e[58]||(e[58]=_=>i.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),[[ue,r.configFile.start_ai_header_id_template]])])]),l("tr",null,[Lat,l("td",null,[U(l("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[59]||(e[59]=_=>r.configFile.end_ai_header_id_template=_),onChange:e[60]||(e[60]=_=>i.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),[[ue,r.configFile.end_ai_header_id_template]])])]),l("tr",null,[Pat,l("td",null,[U(l("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[61]||(e[61]=_=>r.configFile.end_ai_message_id_template=_),onChange:e[62]||(e[62]=_=>i.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),[[ue,r.configFile.end_ai_message_id_template]])])]),l("tr",null,[Uat,l("td",null,[U(l("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[63]||(e[63]=_=>r.configFile.separator_template=_),onChange:e[64]||(e[64]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.separator_template]])])]),l("tr",null,[Fat,l("td",null,[U(l("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[65]||(e[65]=_=>r.configFile.system_message_template=_),onChange:e[66]||(e[66]=_=>i.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),[[ue,r.configFile.system_message_template]])])]),l("tr",null,[Bat,l("td",null,[l("div",{innerHTML:r.full_template},null,8,Gat)])]),l("tr",null,[Vat,l("td",zat,[U(l("input",{type:"checkbox",id:"use_continue_message",required:"","onUpdate:modelValue":e[67]||(e[67]=_=>r.configFile.use_continue_message=_),onChange:e[68]||(e[68]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_continue_message]])])])])]),_:1}),_e(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Hat,[l("tr",null,[qat,l("td",Yat,[U(l("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[69]||(e[69]=_=>r.configFile.user_name=_),onChange:e[70]||(e[70]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.user_name]])])]),l("tr",null,[$at,l("td",Wat,[U(l("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[71]||(e[71]=_=>r.configFile.user_description=_),onChange:e[72]||(e[72]=_=>i.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.user_description]])])]),l("tr",null,[Kat,l("td",jat,[U(l("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[73]||(e[73]=_=>r.configFile.use_user_informations_in_discussion=_),onChange:e[74]||(e[74]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_user_informations_in_discussion]])])]),l("tr",null,[Qat,l("td",Xat,[U(l("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[75]||(e[75]=_=>r.configFile.use_model_name_in_discussions=_),onChange:e[76]||(e[76]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_model_name_in_discussions]])])]),l("tr",null,[Zat,l("td",null,[l("label",Jat,[l("img",{src:r.configFile.user_avatar!=null&&r.configFile.user_avatar!=""?"/user_infos/"+r.configFile.user_avatar:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,elt)]),l("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[77]||(e[77]=(..._)=>r.uploadAvatar&&r.uploadAvatar(..._))},null,32)]),l("td",tlt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[78]||(e[78]=ae(_=>r.resetAvatar(),["stop"]))},slt)])]),l("tr",null,[ilt,l("td",null,[l("div",rlt,[U(l("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[79]||(e[79]=_=>r.configFile.use_user_name_in_discussions=_),onChange:e[80]||(e[80]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_user_name_in_discussions]])])])]),l("tr",null,[olt,l("td",alt,[U(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[81]||(e[81]=_=>r.configFile.max_n_predict=_),onChange:e[82]||(e[82]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.max_n_predict]])])]),l("tr",null,[llt,l("td",clt,[U(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=_=>r.configFile.max_n_predict=_),onChange:e[84]||(e[84]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.max_n_predict]])])])])]),_:1}),_e(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",dlt,[l("tr",null,[ult,l("td",plt,[U(l("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[85]||(e[85]=_=>r.configFile.turn_on_code_execution=_),onChange:e[86]||(e[86]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_code_execution]])])]),l("tr",null,[_lt,l("td",hlt,[U(l("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[87]||(e[87]=_=>r.configFile.turn_on_code_validation=_),onChange:e[88]||(e[88]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_code_validation]])])]),l("tr",null,[flt,l("td",mlt,[U(l("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=_=>r.configFile.turn_on_setting_update_validation=_),onChange:e[90]||(e[90]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_setting_update_validation]])])]),l("tr",null,[glt,l("td",blt,[U(l("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=_=>r.configFile.turn_on_open_file_validation=_),onChange:e[92]||(e[92]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_open_file_validation]])])]),l("tr",null,[Elt,l("td",ylt,[U(l("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=_=>r.configFile.turn_on_send_file_validation=_),onChange:e[94]||(e[94]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),_e(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",vlt,[l("tr",null,[Slt,l("td",null,[l("div",Tlt,[U(l("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[95]||(e[95]=_=>r.configFile.activate_skills_lib=_),onChange:e[96]||(e[96]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_skills_lib]])])])]),l("tr",null,[xlt,l("td",Clt,[U(l("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[97]||(e[97]=_=>r.configFile.skills_lib_database_name=_),onChange:e[98]||(e[98]=_=>i.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),[[ue,r.configFile.skills_lib_database_name]])])])])]),_:1}),_e(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",wlt,[l("tr",null,[Rlt,l("td",null,[l("div",Alt,[U(l("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[99]||(e[99]=_=>r.configFile.pdf_latex_path=_),onChange:e[100]||(e[100]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.pdf_latex_path]])])])])])]),_:1}),_e(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Nlt,[l("tr",null,[Olt,l("td",null,[l("div",Ilt,[U(l("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[101]||(e[101]=_=>r.configFile.positive_boost=_),onChange:e[102]||(e[102]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.positive_boost]])])])]),l("tr",null,[Mlt,l("td",null,[l("div",Dlt,[U(l("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=_=>r.configFile.negative_boost=_),onChange:e[104]||(e[104]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.negative_boost]])])])]),l("tr",null,[klt,l("td",null,[l("div",Llt,[U(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[105]||(e[105]=_=>r.configFile.fun_mode=_),onChange:e[106]||(e[106]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.fun_mode]])])])])])]),_:1})])],2)]),l("div",Plt,[l("div",Ult,[l("button",{onClick:e[107]||(e[107]=ae(_=>i.data_conf_collapsed=!i.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,Blt,512),[[wt,i.data_conf_collapsed]]),U(l("div",null,Vlt,512),[[wt,!i.data_conf_collapsed]]),zlt])]),l("div",{class:Ue([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_e(a,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Hlt,[l("tr",null,[qlt,l("td",Ylt,[(T(!0),w(Ve,null,Je(r.configFile.rag_databases,(_,E)=>(T(),w("div",{key:E,class:"flex items-center mb-2"},[U(l("input",{type:"text","onUpdate:modelValue":b=>r.configFile.rag_databases[E]=b,onChange:e[108]||(e[108]=b=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,40,$lt),[[ue,r.configFile.rag_databases[E]]]),l("button",{onClick:b=>r.vectorize_folder(E),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded"},"(Re)Vectorize",8,Wlt),l("button",{onClick:b=>r.select_folder(E),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-green-300 rounded"},"Select Folder",8,Klt),l("button",{onClick:b=>r.removeDataSource(E),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-green-300 rounded"},"Remove",8,jlt)]))),128)),l("button",{onClick:e[109]||(e[109]=(..._)=>r.addDataSource&&r.addDataSource(..._)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),l("tr",null,[Qlt,l("td",null,[U(l("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[110]||(e[110]=_=>r.configFile.rag_vectorizer=_),onChange:e[111]||(e[111]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},ect,544),[[Vt,r.configFile.rag_vectorizer]])])]),l("tr",null,[tct,l("td",null,[U(l("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[112]||(e[112]=_=>r.configFile.rag_vectorizer_model=_),onChange:e[113]||(e[113]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},sct,544),[[Vt,r.configFile.rag_vectorizer_model]])])]),l("tr",null,[ict,l("td",null,[U(l("input",{id:"rag_chunk_size","onUpdate:modelValue":e[114]||(e[114]=_=>r.configFile.rag_chunk_size=_),onChange:e[115]||(e[115]=_=>i.settingsChanged=!0),type:"range",min:"2",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),[[ue,r.configFile.rag_chunk_size]]),U(l("input",{"onUpdate:modelValue":e[116]||(e[116]=_=>r.configFile.rag_chunk_size=_),type:"number",onChange:e[117]||(e[117]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_chunk_size]])])]),l("tr",null,[rct,l("td",null,[U(l("input",{id:"rag_overlap","onUpdate:modelValue":e[118]||(e[118]=_=>r.configFile.rag_overlap=_),onChange:e[119]||(e[119]=_=>i.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),[[ue,r.configFile.rag_overlap]]),U(l("input",{"onUpdate:modelValue":e[120]||(e[120]=_=>r.configFile.rag_overlap=_),type:"number",onChange:e[121]||(e[121]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_overlap]])])]),l("tr",null,[oct,l("td",null,[U(l("input",{id:"rag_n_chunks","onUpdate:modelValue":e[122]||(e[122]=_=>r.configFile.rag_n_chunks=_),onChange:e[123]||(e[123]=_=>i.settingsChanged=!0),type:"range",min:"2",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),[[ue,r.configFile.rag_n_chunks]]),U(l("input",{"onUpdate:modelValue":e[124]||(e[124]=_=>r.configFile.rag_n_chunks=_),type:"number",onChange:e[125]||(e[125]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_n_chunks]])])]),l("tr",null,[act,l("td",null,[U(l("input",{"onUpdate:modelValue":e[126]||(e[126]=_=>r.configFile.rag_clean_chunks=_),type:"checkbox",onChange:e[127]||(e[127]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_clean_chunks]])])]),l("tr",null,[lct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[128]||(e[128]=_=>r.configFile.rag_follow_subfolders=_),type:"checkbox",onChange:e[129]||(e[129]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_follow_subfolders]])])]),l("tr",null,[cct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[130]||(e[130]=_=>r.configFile.rag_check_new_files_at_startup=_),type:"checkbox",onChange:e[131]||(e[131]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_check_new_files_at_startup]])])]),l("tr",null,[dct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[132]||(e[132]=_=>r.configFile.rag_preprocess_chunks=_),type:"checkbox",onChange:e[133]||(e[133]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_preprocess_chunks]])])]),l("tr",null,[uct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[134]||(e[134]=_=>r.configFile.rag_activate_multi_hops=_),type:"checkbox",onChange:e[135]||(e[135]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_activate_multi_hops]])])]),l("tr",null,[pct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[136]||(e[136]=_=>r.configFile.contextual_summary=_),type:"checkbox",onChange:e[137]||(e[137]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.contextual_summary]])])])])]),_:1}),_e(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",_ct,[l("tr",null,[hct,l("td",null,[l("div",fct,[U(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[138]||(e[138]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[139]||(e[139]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_save_db]])])])]),l("tr",null,[mct,l("td",null,[l("div",gct,[U(l("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[140]||(e[140]=_=>r.configFile.data_vectorization_visualize_on_vectorization=_),onChange:e[141]||(e[141]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),l("tr",null,[bct,l("td",null,[l("div",Ect,[U(l("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[142]||(e[142]=_=>r.configFile.data_vectorization_build_keys_words=_),onChange:e[143]||(e[143]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_build_keys_words]])])])]),l("tr",null,[yct,l("td",null,[l("div",vct,[U(l("input",{type:"checkbox",id:"data_vectorization_force_first_chunk",required:"","onUpdate:modelValue":e[144]||(e[144]=_=>r.configFile.data_vectorization_force_first_chunk=_),onChange:e[145]||(e[145]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_force_first_chunk]])])])]),l("tr",null,[Sct,l("td",null,[l("div",Tct,[U(l("input",{type:"checkbox",id:"data_vectorization_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[146]||(e[146]=_=>r.configFile.data_vectorization_put_chunk_informations_into_context=_),onChange:e[147]||(e[147]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_put_chunk_informations_into_context]])])])]),l("tr",null,[xct,l("td",null,[U(l("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[148]||(e[148]=_=>r.configFile.data_vectorization_method=_),onChange:e[149]||(e[149]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Nct,544),[[Vt,r.configFile.data_vectorization_method]])])]),l("tr",null,[Oct,l("td",Ict,[U(l("input",{type:"text",id:"data_vectorization_sentense_transformer_model",required:"","onUpdate:modelValue":e[150]||(e[150]=_=>r.configFile.data_vectorization_sentense_transformer_model=_),onChange:e[151]||(e[151]=_=>i.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),[[ue,r.configFile.data_vectorization_sentense_transformer_model]])])]),l("tr",null,[Mct,l("td",null,[U(l("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[152]||(e[152]=_=>r.configFile.data_visualization_method=_),onChange:e[153]||(e[153]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Lct,544),[[Vt,r.configFile.data_visualization_method]])])]),l("tr",null,[Pct,l("td",null,[l("div",Uct,[U(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[154]||(e[154]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[155]||(e[155]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_save_db]])])])]),l("tr",null,[Fct,l("td",null,[U(l("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[156]||(e[156]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[157]||(e[157]=_=>i.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),[[ue,r.configFile.data_vectorization_chunk_size]]),U(l("input",{"onUpdate:modelValue":e[158]||(e[158]=_=>r.configFile.data_vectorization_chunk_size=_),type:"number",onChange:e[159]||(e[159]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.data_vectorization_chunk_size]])])]),l("tr",null,[Bct,l("td",null,[U(l("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[160]||(e[160]=_=>r.configFile.data_vectorization_overlap_size=_),onChange:e[161]||(e[161]=_=>i.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),[[ue,r.configFile.data_vectorization_overlap_size]]),U(l("input",{"onUpdate:modelValue":e[162]||(e[162]=_=>r.configFile.data_vectorization_overlap_size=_),type:"number",onChange:e[163]||(e[163]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.data_vectorization_overlap_size]])])]),l("tr",null,[Gct,l("td",null,[U(l("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[164]||(e[164]=_=>r.configFile.data_vectorization_nb_chunks=_),onChange:e[165]||(e[165]=_=>i.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),[[ue,r.configFile.data_vectorization_nb_chunks]]),U(l("input",{"onUpdate:modelValue":e[166]||(e[166]=_=>r.configFile.data_vectorization_nb_chunks=_),type:"number",onChange:e[167]||(e[167]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1})],2)]),l("div",Vct,[l("div",zct,[l("button",{onClick:e[168]||(e[168]=ae(_=>i.internet_conf_collapsed=!i.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,qct,512),[[wt,i.internet_conf_collapsed]]),U(l("div",null,$ct,512),[[wt,!i.internet_conf_collapsed]]),Wct])]),l("div",{class:Ue([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_e(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Kct,[l("tr",null,[jct,l("td",null,[l("div",Qct,[U(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[169]||(e[169]=_=>r.configFile.activate_internet_search=_),onChange:e[170]||(e[170]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_internet_search]])])])]),l("tr",null,[Xct,l("td",null,[l("div",Zct,[U(l("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[171]||(e[171]=_=>r.configFile.activate_internet_pages_judgement=_),onChange:e[172]||(e[172]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_internet_pages_judgement]])])])]),l("tr",null,[Jct,l("td",null,[l("div",edt,[U(l("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[173]||(e[173]=_=>r.configFile.internet_quick_search=_),onChange:e[174]||(e[174]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.internet_quick_search]])])])]),l("tr",null,[tdt,l("td",null,[l("div",ndt,[U(l("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[175]||(e[175]=_=>r.configFile.internet_activate_search_decision=_),onChange:e[176]||(e[176]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.internet_activate_search_decision]])])])]),l("tr",null,[sdt,l("td",null,[l("div",idt,[U(l("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[177]||(e[177]=_=>r.configFile.internet_vectorization_chunk_size=_),onChange:e[178]||(e[178]=_=>i.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),[[ue,r.configFile.internet_vectorization_chunk_size]]),U(l("input",{"onUpdate:modelValue":e[179]||(e[179]=_=>r.configFile.internet_vectorization_chunk_size=_),type:"number",onChange:e[180]||(e[180]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_chunk_size]])])])]),l("tr",null,[rdt,l("td",null,[l("div",odt,[U(l("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[181]||(e[181]=_=>r.configFile.internet_vectorization_overlap_size=_),onChange:e[182]||(e[182]=_=>i.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),[[ue,r.configFile.internet_vectorization_overlap_size]]),U(l("input",{"onUpdate:modelValue":e[183]||(e[183]=_=>r.configFile.internet_vectorization_overlap_size=_),type:"number",onChange:e[184]||(e[184]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_overlap_size]])])])]),l("tr",null,[adt,l("td",null,[l("div",ldt,[U(l("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[185]||(e[185]=_=>r.configFile.internet_vectorization_nb_chunks=_),onChange:e[186]||(e[186]=_=>i.settingsChanged=!0),type:"range",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),[[ue,r.configFile.internet_vectorization_nb_chunks]]),U(l("input",{"onUpdate:modelValue":e[187]||(e[187]=_=>r.configFile.internet_vectorization_nb_chunks=_),type:"number",onChange:e[188]||(e[188]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_nb_chunks]])])])]),l("tr",null,[cdt,l("td",null,[l("div",ddt,[U(l("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[189]||(e[189]=_=>r.configFile.internet_nb_search_pages=_),onChange:e[190]||(e[190]=_=>i.settingsChanged=!0),type:"range",min:"1",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),[[ue,r.configFile.internet_nb_search_pages]]),U(l("input",{"onUpdate:modelValue":e[191]||(e[191]=_=>r.configFile.internet_nb_search_pages=_),type:"number",onChange:e[192]||(e[192]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),l("div",udt,[l("div",pdt,[l("button",{onClick:e[193]||(e[193]=ae(_=>i.servers_conf_collapsed=!i.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,hdt,512),[[wt,i.servers_conf_collapsed]]),U(l("div",null,mdt,512),[[wt,!i.servers_conf_collapsed]]),gdt])]),l("div",{class:Ue([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_e(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",bdt,[l("tr",null,[Edt,l("td",ydt,[U(l("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[194]||(e[194]=_=>r.configFile.active_tts_service=_),onChange:e[195]||(e[195]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},wdt,544),[[Vt,r.configFile.active_tts_service]])])]),l("tr",null,[Rdt,l("td",Adt,[U(l("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[196]||(e[196]=_=>r.configFile.active_stt_service=_),onChange:e[197]||(e[197]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Mdt,544),[[Vt,r.configFile.active_stt_service]])])]),Ddt,l("tr",null,[kdt,l("td",Ldt,[U(l("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[198]||(e[198]=_=>r.configFile.active_tti_service=_),onChange:e[199]||(e[199]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Hdt,544),[[Vt,r.configFile.active_tti_service]])])]),l("tr",null,[qdt,l("td",Ydt,[U(l("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[200]||(e[200]=_=>r.configFile.active_ttm_service=_),onChange:e[201]||(e[201]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Kdt,544),[[Vt,r.configFile.active_ttm_service]])])])])]),_:1}),_e(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",jdt,[l("tr",null,[Qdt,l("td",null,[l("div",Xdt,[U(l("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[202]||(e[202]=_=>r.configFile.use_negative_prompt=_),onChange:e[203]||(e[203]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_negative_prompt]])])])]),l("tr",null,[Zdt,l("td",null,[l("div",Jdt,[U(l("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[204]||(e[204]=_=>r.configFile.use_ai_generated_negative_prompt=_),onChange:e[205]||(e[205]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_ai_generated_negative_prompt]])])])]),l("tr",null,[eut,l("td",null,[l("div",tut,[U(l("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[206]||(e[206]=_=>r.configFile.negative_prompt_generation_prompt=_),onChange:e[207]||(e[207]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.negative_prompt_generation_prompt]])])])]),l("tr",null,[nut,l("td",null,[l("div",sut,[U(l("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[208]||(e[208]=_=>r.configFile.default_negative_prompt=_),onChange:e[209]||(e[209]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.default_negative_prompt]])])])])])]),_:1}),_e(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",iut,[l("tr",null,[rut,l("td",out,[U(l("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[210]||(e[210]=_=>r.configFile.stt_listening_threshold=_),onChange:e[211]||(e[211]=_=>i.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),[[ue,r.configFile.stt_listening_threshold]])])]),l("tr",null,[aut,l("td",lut,[U(l("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[212]||(e[212]=_=>r.configFile.stt_silence_duration=_),onChange:e[213]||(e[213]=_=>i.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),[[ue,r.configFile.stt_silence_duration]])])]),l("tr",null,[cut,l("td",dut,[U(l("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[214]||(e[214]=_=>r.configFile.stt_sound_threshold_percentage=_),onChange:e[215]||(e[215]=_=>i.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),[[ue,r.configFile.stt_sound_threshold_percentage]])])]),l("tr",null,[uut,l("td",put,[U(l("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[216]||(e[216]=_=>r.configFile.stt_gain=_),onChange:e[217]||(e[217]=_=>i.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),[[ue,r.configFile.stt_gain]])])]),l("tr",null,[_ut,l("td",hut,[U(l("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[218]||(e[218]=_=>r.configFile.stt_rate=_),onChange:e[219]||(e[219]=_=>i.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),[[ue,r.configFile.stt_rate]])])]),l("tr",null,[fut,l("td",mut,[U(l("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[220]||(e[220]=_=>r.configFile.stt_channels=_),onChange:e[221]||(e[221]=_=>i.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),[[ue,r.configFile.stt_channels]])])]),l("tr",null,[gut,l("td",but,[U(l("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[222]||(e[222]=_=>r.configFile.stt_buffer_size=_),onChange:e[223]||(e[223]=_=>i.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),[[ue,r.configFile.stt_buffer_size]])])]),l("tr",null,[Eut,l("td",null,[l("div",yut,[U(l("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[224]||(e[224]=_=>r.configFile.stt_activate_word_detection=_),onChange:e[225]||(e[225]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.stt_activate_word_detection]])])])]),l("tr",null,[vut,l("td",null,[l("div",Sut,[U(l("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[226]||(e[226]=_=>r.configFile.stt_word_detection_file=_),onChange:e[227]||(e[227]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_word_detection_file]])])])])])]),_:1}),_e(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Tut,[l("tr",null,[xut,l("td",Cut,[U(l("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[228]||(e[228]=_=>r.configFile.stt_input_device=_),onChange:e[229]||(e[229]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(i.snd_input_devices,(_,E)=>(T(),w("option",{key:_,value:i.snd_input_devices_indexes[E]},J(_),9,wut))),128))],544),[[Vt,r.configFile.stt_input_device]])])]),l("tr",null,[Rut,l("td",Aut,[U(l("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[230]||(e[230]=_=>r.configFile.tts_output_device=_),onChange:e[231]||(e[231]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(i.snd_output_devices,(_,E)=>(T(),w("option",{key:_,value:i.snd_output_devices_indexes[E]},J(_),9,Nut))),128))],544),[[Vt,r.configFile.tts_output_device]])])])])]),_:1}),_e(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Out,[l("tr",null,[Iut,l("td",Mut,[U(l("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[232]||(e[232]=_=>r.configFile.host=_),onChange:e[233]||(e[233]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.host]])])]),l("tr",null,[Dut,l("td",kut,[_e(o,{modelValue:r.configFile.lollms_access_keys,"onUpdate:modelValue":e[234]||(e[234]=_=>r.configFile.lollms_access_keys=_),onChange:e[235]||(e[235]=_=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])])]),l("tr",null,[Lut,l("td",Put,[U(l("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[236]||(e[236]=_=>r.configFile.port=_),onChange:e[237]||(e[237]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.port]])])]),l("tr",null,[Uut,l("td",Fut,[U(l("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[238]||(e[238]=_=>r.configFile.headless_server_mode=_),onChange:e[239]||(e[239]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.headless_server_mode]])])]),l("tr",null,[But,l("td",Gut,[U(l("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[240]||(e[240]=_=>r.configFile.activate_lollms_server=_),onChange:e[241]||(e[241]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_server]])])]),l("tr",null,[Vut,l("td",zut,[U(l("input",{type:"checkbox",id:"activate_lollms_rag_server",required:"","onUpdate:modelValue":e[242]||(e[242]=_=>r.configFile.activate_lollms_rag_server=_),onChange:e[243]||(e[243]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_rag_server]])])]),l("tr",null,[Hut,l("td",qut,[U(l("input",{type:"checkbox",id:"activate_lollms_tts_server",required:"","onUpdate:modelValue":e[244]||(e[244]=_=>r.configFile.activate_lollms_tts_server=_),onChange:e[245]||(e[245]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_tts_server]])])]),l("tr",null,[Yut,l("td",$ut,[U(l("input",{type:"checkbox",id:"activate_lollms_stt_server",required:"","onUpdate:modelValue":e[246]||(e[246]=_=>r.configFile.activate_lollms_stt_server=_),onChange:e[247]||(e[247]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_stt_server]])])]),l("tr",null,[Wut,l("td",Kut,[U(l("input",{type:"checkbox",id:"activate_lollms_tti_server",required:"","onUpdate:modelValue":e[248]||(e[248]=_=>r.configFile.activate_lollms_tti_server=_),onChange:e[249]||(e[249]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_tti_server]])])]),l("tr",null,[jut,l("td",Qut,[U(l("input",{type:"checkbox",id:"activate_lollms_itt_server",required:"","onUpdate:modelValue":e[250]||(e[250]=_=>r.configFile.activate_lollms_itt_server=_),onChange:e[251]||(e[251]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_itt_server]])])]),l("tr",null,[Xut,l("td",Zut,[U(l("input",{type:"checkbox",id:"activate_lollms_ttm_server",required:"","onUpdate:modelValue":e[252]||(e[252]=_=>r.configFile.activate_lollms_ttm_server=_),onChange:e[253]||(e[253]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_ttm_server]])])]),l("tr",null,[Jut,l("td",ept,[U(l("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[254]||(e[254]=_=>r.configFile.activate_ollama_emulator=_),onChange:e[255]||(e[255]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_ollama_emulator]])])]),l("tr",null,[tpt,l("td",npt,[U(l("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[256]||(e[256]=_=>r.configFile.activate_openai_emulator=_),onChange:e[257]||(e[257]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_openai_emulator]])])]),l("tr",null,[spt,l("td",ipt,[U(l("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[258]||(e[258]=_=>r.configFile.activate_mistralai_emulator=_),onChange:e[259]||(e[259]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),_e(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",rpt,[l("tr",null,[opt,l("td",null,[l("div",apt,[U(l("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[260]||(e[260]=_=>r.configFile.activate_audio_infos=_),onChange:e[261]||(e[261]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_audio_infos]])])])]),l("tr",null,[lpt,l("td",null,[l("div",cpt,[U(l("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[262]||(e[262]=_=>r.configFile.audio_auto_send_input=_),onChange:e[263]||(e[263]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.audio_auto_send_input]])])])]),l("tr",null,[dpt,l("td",null,[U(l("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[264]||(e[264]=_=>r.configFile.audio_silenceTimer=_),onChange:e[265]||(e[265]=_=>i.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),[[ue,r.configFile.audio_silenceTimer]]),U(l("input",{"onUpdate:modelValue":e[266]||(e[266]=_=>r.configFile.audio_silenceTimer=_),onChange:e[267]||(e[267]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.audio_silenceTimer]])])]),l("tr",null,[upt,l("td",null,[U(l("select",{id:"audio_in_language","onUpdate:modelValue":e[268]||(e[268]=_=>r.configFile.audio_in_language=_),onChange:e[269]||(e[269]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(r.audioLanguages,_=>(T(),w("option",{key:_.code,value:_.code},J(_.name),9,ppt))),128))],544),[[Vt,r.configFile.audio_in_language]])])])])]),_:1}),_e(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",_pt,[l("tr",null,[hpt,l("td",null,[l("div",fpt,[U(l("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[270]||(e[270]=_=>r.configFile.whisper_activate=_),onChange:e[271]||(e[271]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.whisper_activate]])])])]),l("tr",null,[mpt,l("td",null,[l("div",gpt,[U(l("select",{id:"whisper_model","onUpdate:modelValue":e[272]||(e[272]=_=>r.configFile.whisper_model=_),onChange:e[273]||(e[273]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(r.whisperModels,_=>(T(),w("option",{key:_,value:_},J(_),9,bpt))),128))],544),[[Vt,r.configFile.whisper_model]])])])])])]),_:1}),_e(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Ept,[l("tr",null,[ypt,l("td",null,[l("div",vpt,[U(l("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[274]||(e[274]=_=>r.configFile.openai_whisper_key=_),onChange:e[275]||(e[275]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.openai_whisper_key]])])])]),l("tr",null,[Spt,l("td",null,[l("div",Tpt,[U(l("select",{id:"openai_whisper_model","onUpdate:modelValue":e[276]||(e[276]=_=>r.configFile.openai_whisper_model=_),onChange:e[277]||(e[277]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(r.openaiWhisperModels,_=>(T(),w("option",{key:_,value:_},J(_),9,xpt))),128))],544),[[Vt,r.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),_e(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Cpt,[l("tr",null,[wpt,l("td",null,[l("div",Rpt,[U(l("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[278]||(e[278]=_=>r.configFile.auto_speak=_),onChange:e[279]||(e[279]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_speak]])])])]),l("tr",null,[Apt,l("td",null,[U(l("input",{id:"audio_pitch","onUpdate:modelValue":e[280]||(e[280]=_=>r.configFile.audio_pitch=_),onChange:e[281]||(e[281]=_=>i.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),[[ue,r.configFile.audio_pitch]]),U(l("input",{"onUpdate:modelValue":e[282]||(e[282]=_=>r.configFile.audio_pitch=_),onChange:e[283]||(e[283]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.audio_pitch]])])]),l("tr",null,[Npt,l("td",null,[U(l("select",{id:"audio_out_voice","onUpdate:modelValue":e[284]||(e[284]=_=>r.configFile.audio_out_voice=_),onChange:e[285]||(e[285]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(i.audioVoices,_=>(T(),w("option",{key:_.name,value:_.name},J(_.name),9,Opt))),128))],544),[[Vt,r.configFile.audio_out_voice]])])])])]),_:1}),_e(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Ipt,[l("tr",null,[Mpt,l("td",null,[l("div",Dpt,[U(l("select",{"onUpdate:modelValue":e[286]||(e[286]=_=>r.xtts_current_language=_),onChange:e[287]||(e[287]=_=>i.settingsChanged=!0)},[(T(!0),w(Ve,null,Je(i.voice_languages,(_,E)=>(T(),w("option",{key:E,value:_},J(E),9,kpt))),128))],544),[[Vt,r.xtts_current_language]])])])]),l("tr",null,[Lpt,l("td",null,[l("div",Ppt,[U(l("select",{"onUpdate:modelValue":e[288]||(e[288]=_=>r.xtts_current_voice=_),onChange:e[289]||(e[289]=_=>i.settingsChanged=!0)},[(T(!0),w(Ve,null,Je(i.voices,_=>(T(),w("option",{key:_,value:_},J(_),9,Upt))),128))],544),[[Vt,r.xtts_current_voice]])])])]),l("tr",null,[Fpt,l("td",null,[l("div",Bpt,[U(l("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[290]||(e[290]=_=>r.configFile.xtts_freq=_),onChange:e[291]||(e[291]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[ue,r.configFile.xtts_freq,void 0,{number:!0}]])])])]),l("tr",null,[Gpt,l("td",null,[l("div",Vpt,[U(l("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[292]||(e[292]=_=>r.configFile.auto_read=_),onChange:e[293]||(e[293]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_read]])])])]),l("tr",null,[zpt,l("td",null,[l("div",Hpt,[U(l("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[294]||(e[294]=_=>r.configFile.xtts_stream_chunk_size=_),onChange:e[295]||(e[295]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_stream_chunk_size]])])])]),l("tr",null,[qpt,l("td",null,[l("div",Ypt,[U(l("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[296]||(e[296]=_=>r.configFile.xtts_temperature=_),onChange:e[297]||(e[297]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[ue,r.configFile.xtts_temperature,void 0,{number:!0}]])])])]),l("tr",null,[$pt,l("td",null,[l("div",Wpt,[U(l("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[298]||(e[298]=_=>r.configFile.xtts_length_penalty=_),onChange:e[299]||(e[299]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),l("tr",null,[Kpt,l("td",null,[l("div",jpt,[U(l("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[300]||(e[300]=_=>r.configFile.xtts_repetition_penalty=_),onChange:e[301]||(e[301]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),l("tr",null,[Qpt,l("td",null,[l("div",Xpt,[U(l("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[302]||(e[302]=_=>r.configFile.xtts_top_k=_),onChange:e[303]||(e[303]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_top_k,void 0,{number:!0}]])])])]),l("tr",null,[Zpt,l("td",null,[l("div",Jpt,[U(l("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[304]||(e[304]=_=>r.configFile.xtts_top_p=_),onChange:e[305]||(e[305]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_top_p,void 0,{number:!0}]])])])]),l("tr",null,[e_t,l("td",null,[l("div",t_t,[U(l("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[306]||(e[306]=_=>r.configFile.xtts_speed=_),onChange:e[307]||(e[307]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_speed,void 0,{number:!0}]])])])]),l("tr",null,[n_t,l("td",null,[l("div",s_t,[U(l("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[308]||(e[308]=_=>r.configFile.enable_text_splitting=_),onChange:e[309]||(e[309]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_text_splitting]])])])])])]),_:1}),_e(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",i_t,[l("tr",null,[r_t,l("td",null,[l("div",o_t,[U(l("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[310]||(e[310]=_=>r.configFile.openai_tts_key=_),onChange:e[311]||(e[311]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.openai_tts_key]])])])]),l("tr",null,[a_t,l("td",null,[l("div",l_t,[U(l("select",{"onUpdate:modelValue":e[312]||(e[312]=_=>r.configFile.openai_tts_model=_),onChange:e[313]||(e[313]=_=>i.settingsChanged=!0)},u_t,544),[[Vt,r.configFile.openai_tts_model]])])])]),l("tr",null,[p_t,l("td",null,[l("div",__t,[U(l("select",{"onUpdate:modelValue":e[314]||(e[314]=_=>r.configFile.openai_tts_voice=_),onChange:e[315]||(e[315]=_=>i.settingsChanged=!0)},E_t,544),[[Vt,r.configFile.openai_tts_voice]])])])])])]),_:1}),_e(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",y_t,[l("tr",null,[v_t,l("td",null,[l("div",S_t,[U(l("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[316]||(e[316]=_=>r.configFile.elevenlabs_tts_key=_),onChange:e[317]||(e[317]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elevenlabs_tts_key]])])])]),l("tr",null,[T_t,l("td",null,[l("div",x_t,[U(l("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[318]||(e[318]=_=>r.configFile.elevenlabs_tts_model_id=_),onChange:e[319]||(e[319]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elevenlabs_tts_model_id]])])])]),l("tr",null,[C_t,l("td",null,[l("div",w_t,[U(l("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[320]||(e[320]=_=>r.configFile.elevenlabs_tts_voice_stability=_),onChange:e[321]||(e[321]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[ue,r.configFile.elevenlabs_tts_voice_stability]])])])]),l("tr",null,[R_t,l("td",null,[l("div",A_t,[U(l("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[322]||(e[322]=_=>r.configFile.elevenlabs_tts_voice_boost=_),onChange:e[323]||(e[323]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[ue,r.configFile.elevenlabs_tts_voice_boost]])])])]),l("tr",null,[N_t,l("td",null,[l("div",O_t,[U(l("select",{"onUpdate:modelValue":e[324]||(e[324]=_=>r.configFile.elevenlabs_tts_voice_id=_),onChange:e[325]||(e[325]=_=>i.settingsChanged=!0)},[(T(!0),w(Ve,null,Je(i.voices,_=>(T(),w("option",{key:_.voice_id,value:_.voice_id},J(_.name),9,I_t))),128))],544),[[Vt,r.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1})]),_:1}),_e(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",M_t,[l("tr",null,[D_t,l("td",null,[l("div",k_t,[U(l("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[326]||(e[326]=_=>r.configFile.enable_sd_service=_),onChange:e[327]||(e[327]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_sd_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[328]||(e[328]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},P_t)])]),l("tr",null,[U_t,l("td",null,[l("div",F_t,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[329]||(e[329]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[330]||(e[330]=(..._)=>r.upgradeSDService&&r.upgradeSDService(..._))},"upgrade sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[331]||(e[331]=(..._)=>r.startSDService&&r.startSDService(..._))},"start sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[332]||(e[332]=(..._)=>r.showSD&&r.showSD(..._))},"show sd ui"),B_t])]),l("td",null,[l("div",G_t,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[333]||(e[333]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service")])])]),l("tr",null,[V_t,l("td",null,[l("div",z_t,[U(l("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[334]||(e[334]=_=>r.configFile.sd_base_url=_),onChange:e[335]||(e[335]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.sd_base_url]])])])])])]),_:1}),_e(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",H_t,[l("tr",null,[q_t,l("td",null,[l("div",Y_t,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[336]||(e[336]=(..._)=>r.reinstallDiffusersService&&r.reinstallDiffusersService(..._))},"install diffusers service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[337]||(e[337]=(..._)=>r.upgradeDiffusersService&&r.upgradeDiffusersService(..._))},"upgrade diffusers service"),$_t])])]),l("tr",null,[W_t,l("td",null,[l("div",K_t,[U(l("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[338]||(e[338]=_=>r.configFile.diffusers_model=_),onChange:e[339]||(e[339]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.diffusers_model]])])]),j_t])])]),_:1}),_e(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Q_t,[l("tr",null,[X_t,l("td",null,[l("div",Z_t,[U(l("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[340]||(e[340]=_=>r.configFile.midjourney_key=_),onChange:e[341]||(e[341]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_key]])])])]),l("tr",null,[J_t,l("td",null,[l("div",eht,[U(l("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[342]||(e[342]=_=>r.configFile.midjourney_timeout=_),onChange:e[343]||(e[343]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_timeout]])])])]),l("tr",null,[tht,l("td",null,[l("div",nht,[U(l("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[344]||(e[344]=_=>r.configFile.midjourney_retries=_),onChange:e[345]||(e[345]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_retries]])])])])])]),_:1}),_e(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",sht,[l("tr",null,[iht,l("td",null,[l("div",rht,[U(l("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[346]||(e[346]=_=>r.configFile.dall_e_key=_),onChange:e[347]||(e[347]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.dall_e_key]])])])]),l("tr",null,[oht,l("td",null,[l("div",aht,[U(l("select",{"onUpdate:modelValue":e[348]||(e[348]=_=>r.configFile.dall_e_generation_engine=_),onChange:e[349]||(e[349]=_=>i.settingsChanged=!0)},dht,544),[[Vt,r.configFile.dall_e_generation_engine]])])])])])]),_:1}),_e(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",uht,[l("tr",null,[pht,l("td",null,[l("div",_ht,[U(l("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[350]||(e[350]=_=>r.configFile.enable_comfyui_service=_),onChange:e[351]||(e[351]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_comfyui_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[352]||(e[352]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},fht)])]),l("tr",null,[mht,l("td",null,[l("div",ght,[U(l("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[353]||(e[353]=_=>r.configFile.comfyui_model=_),onChange:e[354]||(e[354]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(i.comfyui_models,(_,E)=>(T(),w("option",{key:_,value:_},J(_),9,bht))),128))],544),[[Vt,r.configFile.comfyui_model]])])])]),l("tr",null,[Eht,l("td",null,[l("div",yht,[U(l("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[355]||(e[355]=_=>r.configFile.comfyui_model=_),onChange:e[356]||(e[356]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.comfyui_model]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[357]||(e[357]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Sht)])]),l("tr",null,[Tht,l("td",null,[l("div",xht,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[358]||(e[358]=(..._)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(..._))},"install comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[359]||(e[359]=(..._)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(..._))},"upgrade comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[360]||(e[360]=(..._)=>r.startComfyUIService&&r.startComfyUIService(..._))},"start comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[361]||(e[361]=(..._)=>r.showComfyui&&r.showComfyui(..._))},"show comfyui"),Cht])])]),l("tr",null,[wht,l("td",null,[l("div",Rht,[U(l("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[362]||(e[362]=_=>r.configFile.comfyui_base_url=_),onChange:e[363]||(e[363]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),_e(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Aht,[l("tr",null,[Nht,l("td",null,[l("div",Oht,[U(l("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[364]||(e[364]=_=>r.configFile.enable_ollama_service=_),onChange:e[365]||(e[365]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_ollama_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[366]||(e[366]=_=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. +You need to apply changes before you leave, or else.`,"Apply configuration","Cancel")&&this.applyConfiguration(),!1}},k=t=>(Mi("data-v-ef6f3916"),t=t(),Di(),t),Qit={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"},Xit={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"},Zit={key:0,class:"flex gap-3 flex-1 items-center duration-75"},Jit=k(()=>l("i",{"data-feather":"x"},null,-1)),ert=[Jit],trt=k(()=>l("i",{"data-feather":"check"},null,-1)),nrt=[trt],srt={key:1,class:"flex gap-3 flex-1 items-center"},irt=k(()=>l("i",{"data-feather":"refresh-ccw"},null,-1)),rrt=[irt],ort=k(()=>l("i",{"data-feather":"list"},null,-1)),art=[ort],lrt={class:"flex gap-3 flex-1 items-center justify-end"},crt=k(()=>l("i",{"data-feather":"trash-2"},null,-1)),drt=[crt],urt=k(()=>l("i",{"data-feather":"refresh-ccw"},null,-1)),prt=[urt],_rt=k(()=>l("i",{"data-feather":"arrow-up-circle"},null,-1)),hrt=k(()=>l("i",{"data-feather":"alert-circle"},null,-1)),frt=[_rt,hrt],mrt={class:"flex gap-3 items-center"},grt={key:0,class:"flex gap-3 items-center"},brt=k(()=>l("div",{class:"flex flex-row"},[l("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),l("i",{"data-feather":"check"})],-1)),Ert=[brt],yrt=k(()=>l("div",{class:"flex flex-row"},[l("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),l("i",{"data-feather":"x"})],-1)),vrt=[yrt],Srt={key:1,role:"status"},Trt=k(()=>l("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"},[l("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"}),l("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)),xrt=k(()=>l("span",{class:"sr-only"},"Loading...",-1)),Crt={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"},wrt={class:"flex flex-row p-3"},Rrt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Art=[Rrt],Nrt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Ort=[Nrt],Irt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),Mrt=k(()=>l("div",{class:"mr-2"},"|",-1)),Drt={class:"text-base font-semibold cursor-pointer select-none items-center"},krt={class:"flex gap-2 items-center"},Lrt={key:0},Prt=["src"],Urt={class:"font-bold font-large text-lg"},Frt={key:1},Brt={class:"flex gap-2 items-center"},Grt=["src"],Vrt={class:"font-bold font-large text-lg"},zrt=k(()=>l("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),Hrt={class:"font-bold font-large text-lg"},qrt=k(()=>l("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),Yrt={class:"font-bold font-large text-lg"},$rt={class:"mb-2"},Wrt=k(()=>l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[l("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"})]),Xe(" CPU Ram usage: ")],-1)),Krt={class:"flex flex-col mx-2"},jrt=k(()=>l("b",null,"Avaliable ram: ",-1)),Qrt=k(()=>l("b",null,"Ram usage: ",-1)),Xrt={class:"p-2"},Zrt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Jrt={class:"mb-2"},eot=k(()=>l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),Xe(" Disk usage: ")],-1)),tot={class:"flex flex-col mx-2"},not=k(()=>l("b",null,"Avaliable disk space: ",-1)),sot=k(()=>l("b",null,"Disk usage: ",-1)),iot={class:"p-2"},rot={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},oot={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},aot=["src"],lot={class:"flex flex-col mx-2"},cot=k(()=>l("b",null,"Model: ",-1)),dot=k(()=>l("b",null,"Avaliable vram: ",-1)),uot=k(()=>l("b",null,"GPU usage: ",-1)),pot={class:"p-2"},_ot={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},hot={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"},fot={class:"flex flex-row p-3"},mot=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),got=[mot],bot=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Eot=[bot],yot=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1)),vot={class:"flex flex-col mb-2 px-3 pb-2"},Sot={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"},Tot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_smart_routing",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use Smart Routing:")],-1)),xot={style:{width:"100%"}},Cot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"restore_model_after_smart_routing",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Restore model after smart routing:")],-1)),wot={style:{width:"100%"}},Rot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"smart_routing_router_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Router Model:")],-1)),Aot={style:{width:"100%"}},Not=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"smart_routing_models_by_power",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Models by Power:")],-1)),Oot={style:{width:"100%"}},Iot={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"},Mot={class:"flex flex-row p-3"},Dot=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),kot=[Dot],Lot=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Pot=[Lot],Uot=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1)),Fot={class:"flex flex-col mb-2 px-3 pb-2"},Bot={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"},Got=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),Vot={for:"logo-upload"},zot=["src"],Hot={style:{width:"10%"}},qot=k(()=>l("i",{"data-feather":"x"},null,-1)),Yot=[qot],$ot=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),Wot={class:"text-center items-center"},Kot={class:"flex flex-row"},jot=k(()=>l("option",{value:"cpu"},"CPU",-1)),Qot=k(()=>l("option",{value:"cpu-noavx"},"CPU (No AVX)",-1)),Xot=k(()=>l("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1)),Zot=k(()=>l("option",{value:"nvidia"},"NVIDIA",-1)),Jot=k(()=>l("option",{value:"amd-noavx"},"AMD (No AVX)",-1)),eat=k(()=>l("option",{value:"amd"},"AMD",-1)),tat=k(()=>l("option",{value:"apple-intel"},"Apple Intel",-1)),nat=k(()=>l("option",{value:"apple-silicon"},"Apple Silicon",-1)),sat=[jot,Qot,Xot,Zot,Jot,eat,tat,nat],iat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),rat={style:{width:"100%"}},oat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),aat={class:"flex flex-row"},lat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),cat={class:"flex flex-row"},dat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),uat={class:"flex flex-row"},pat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate showing the full prompt in console (for debug):")],-1)),_at={class:"flex flex-row"},hat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show final full prompt in console:")],-1)),fat={class:"flex flex-row"},mat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show chunks in console:")],-1)),gat={class:"flex flex-row"},bat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),Eat={class:"flex flex-row"},yat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),vat={class:"flex flex-row"},Sat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),Tat={class:"flex flex-row"},xat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),Cat={class:"flex flex-row"},wat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),Rat={class:"flex flex-row"},Aat={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"},Nat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),Oat=k(()=>l("option",{value:"lollms"},"Lollms communication template",-1)),Iat=k(()=>l("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1)),Mat=k(()=>l("option",{value:"bare"},"Bare, useful when in chat mode",-1)),Dat=k(()=>l("option",{value:"llama3"},"LLama3 communication template",-1)),kat=k(()=>l("option",{value:"mistral"},"Mistral communication template",-1)),Lat=[Oat,Iat,Mat,Dat,kat],Pat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),Uat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),Fat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),Bat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),Gat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),Vat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),zat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),Hat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),qat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),Yat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),$at=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),Wat=["innerHTML"],Kat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_continue_message",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"useful for chat models and repote models but can be less useful for instruct ones"},"Use continue message:")],-1)),jat={style:{width:"100%"}},Qat={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"},Xat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),Zat={style:{width:"100%"}},Jat=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),elt={style:{width:"100%"}},tlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),nlt={style:{width:"100%"}},slt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),ilt={style:{width:"100%"}},rlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),olt={for:"avatar-upload"},alt=["src"],llt={style:{width:"10%"}},clt=k(()=>l("i",{"data-feather":"x"},null,-1)),dlt=[clt],ult=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),plt={class:"flex flex-row"},_lt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),hlt={style:{width:"100%"}},flt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_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)),mlt={style:{width:"100%"}},glt={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"},blt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),Elt={style:{width:"100%"}},ylt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),vlt={style:{width:"100%"}},Slt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),Tlt={style:{width:"100%"}},xlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),Clt={style:{width:"100%"}},wlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),Rlt={style:{width:"100%"}},Alt={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"},Nlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),Olt={class:"flex flex-row"},Ilt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),Mlt={style:{width:"100%"}},Dlt={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"},klt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),Llt={class:"flex flex-row"},Plt={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"},Ult=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),Flt={class:"flex flex-row"},Blt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),Glt={class:"flex flex-row"},Vlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),zlt={class:"flex flex-row"},Hlt={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"},qlt={class:"flex flex-row p-3"},Ylt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),$lt=[Ylt],Wlt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Klt=[Wlt],jlt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1)),Qlt={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"},Xlt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),Zlt={style:{width:"100%"}},Jlt=["onUpdate:modelValue"],ect=["onClick"],tct=["onClick"],nct=["onClick"],sct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),ict=k(()=>l("option",{value:"bert"},"Bert Vectorizer",-1)),rct=k(()=>l("option",{value:"tfidf"},"TFIDF Vectorizer",-1)),oct=k(()=>l("option",{value:"word2vec"},"Word2Vec Vectorizer",-1)),act=[ict,rct,oct],lct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),cct=k(()=>l("option",{value:"bert-base-nli-mean-tokens"},"bert-base-nli-mean-tokens",-1)),dct=[cct],uct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),pct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_overlap",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG overlap size:")],-1)),_ct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),hct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),fct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),mct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),gct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),bct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_activate_multi_hops",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate multi hops RAG:")],-1)),Ect=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"contextual_summary",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use contextual summary instead of rag (consumes alot of tokens and may be very slow but efficient, useful for summary and global questions that RAG can't do):")],-1)),yct={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"},vct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save vectorized database:")],-1)),Sct={class:"flex flex-row"},Tct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_visualize_on_vectorization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"show vectorized data:")],-1)),xct={class:"flex flex-row"},Cct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),wct={class:"flex flex-row"},Rct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_force_first_chunk",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Force adding the first chunk of the file to the context:")],-1)),Act={class:"flex flex-row"},Nct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),Oct={class:"flex flex-row"},Ict=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization method:")],-1)),Mct=k(()=>l("option",{value:"tfidf_vectorizer"},"tfidf Vectorizer",-1)),Dct=k(()=>l("option",{value:"bm25_vectorizer"},"bm25 Vectorizer",-1)),kct=k(()=>l("option",{value:"model_embedding"},"Model Embedding",-1)),Lct=k(()=>l("option",{value:"sentense_transformer"},"Sentense Transformer",-1)),Pct=[Mct,Dct,kct,Lct],Uct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_sentense_transformer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization model (for Sentense Transformer):")],-1)),Fct={style:{width:"100%"}},Bct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_visualization_method",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data visualization method:")],-1)),Gct=k(()=>l("option",{value:"PCA"},"PCA",-1)),Vct=k(()=>l("option",{value:"TSNE"},"TSNE",-1)),zct=[Gct,Vct],Hct=k(()=>l("td",{style:{"min-width":"200px"}},[l("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)),qct={class:"flex flex-row"},Yct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization chunk size(tokens):")],-1)),$ct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data vectorization overlap size(tokens):")],-1)),Wct=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Number of chunks to use for each message:")],-1)),Kct={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"},jct={class:"flex flex-row p-3"},Qct=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Xct=[Qct],Zct=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Jct=[Zct],edt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1)),tdt={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"},ndt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet search:")],-1)),sdt={class:"flex flex-row"},idt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),rdt={class:"flex flex-row"},odt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),adt={class:"flex flex-row"},ldt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),cdt={class:"flex flex-row"},ddt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),udt={class:"flex flex-col"},pdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),_dt={class:"flex flex-col"},hdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),fdt={class:"flex flex-col"},mdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),gdt={class:"flex flex-col"},bdt={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"},Edt={class:"flex flex-row p-3"},ydt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),vdt=[ydt],Sdt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Tdt=[Sdt],xdt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1)),Cdt={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"},wdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),Rdt={style:{width:"100%"}},Adt=k(()=>l("option",{value:"None"},"None",-1)),Ndt=k(()=>l("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1)),Odt=k(()=>l("option",{value:"xtts"},"XTTS",-1)),Idt=k(()=>l("option",{value:"openai_tts"},"Open AI TTS",-1)),Mdt=k(()=>l("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1)),Ddt=[Adt,Ndt,Odt,Idt,Mdt],kdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),Ldt={style:{width:"100%"}},Pdt=k(()=>l("option",{value:"None"},"None",-1)),Udt=k(()=>l("option",{value:"whisper"},"Whisper",-1)),Fdt=k(()=>l("option",{value:"openai_whisper"},"Open AI Whisper",-1)),Bdt=[Pdt,Udt,Fdt],Gdt=k(()=>l("tr",null,null,-1)),Vdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),zdt={style:{width:"100%"}},Hdt=k(()=>l("option",{value:"None"},"None",-1)),qdt=k(()=>l("option",{value:"diffusers"},"Diffusers",-1)),Ydt=k(()=>l("option",{value:"autosd"},"AUTO1111's SD",-1)),$dt=k(()=>l("option",{value:"dall-e"},"Open AI DALL-E",-1)),Wdt=k(()=>l("option",{value:"midjourney"},"Midjourney",-1)),Kdt=k(()=>l("option",{value:"comfyui"},"Comfyui",-1)),jdt=k(()=>l("option",{value:"fooocus"},"Fooocus",-1)),Qdt=[Hdt,qdt,Ydt,$dt,Wdt,Kdt,jdt],Xdt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),Zdt={style:{width:"100%"}},Jdt=k(()=>l("option",{value:"None"},"None",-1)),eut=k(()=>l("option",{value:"musicgen"},"Music Gen",-1)),tut=[Jdt,eut],nut={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"},sut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),iut={class:"flex flex-row"},rut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),out={class:"flex flex-row"},aut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),lut={class:"flex flex-row"},cut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),dut={class:"flex flex-row"},uut={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"},put=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),_ut={style:{width:"100%"}},hut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),fut={style:{width:"100%"}},mut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),gut={style:{width:"100%"}},but=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),Eut={style:{width:"100%"}},yut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),vut={style:{width:"100%"}},Sut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),Tut={style:{width:"100%"}},xut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),Cut={style:{width:"100%"}},wut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),Rut={class:"flex flex-row"},Aut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),Nut={class:"flex flex-row"},Out={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"},Iut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),Mut={style:{width:"100%"}},Dut=["value"],kut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),Lut={style:{width:"100%"}},Put=["value"],Uut={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"},Fut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),But={style:{width:"100%"}},Gut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys:")],-1)),Vut={style:{width:"100%"}},zut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"port",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),Hut={style:{width:"100%"}},qut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"headless_server_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode:")],-1)),Yut={style:{width:"100%"}},$ut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),Wut={style:{width:"100%"}},Kut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_rag_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms RAG server:")],-1)),jut={style:{width:"100%"}},Qut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tts_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTS server:")],-1)),Xut={style:{width:"100%"}},Zut=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_stt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms STT server:")],-1)),Jut={style:{width:"100%"}},ept=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tti_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTI server:")],-1)),tpt={style:{width:"100%"}},npt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_itt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms ITT server:")],-1)),spt={style:{width:"100%"}},ipt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_ttm_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTM server:")],-1)),rpt={style:{width:"100%"}},opt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),apt={style:{width:"100%"}},lpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),cpt={style:{width:"100%"}},dpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),upt={style:{width:"100%"}},ppt={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"},_pt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),hpt={class:"flex flex-row"},fpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),mpt={class:"flex flex-row"},gpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),bpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),Ept=["value"],ypt={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"},vpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),Spt={class:"flex flex-row"},Tpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),xpt={class:"flex flex-row"},Cpt=["value"],wpt={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"},Rpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),Apt={class:"flex flex-row"},Npt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),Opt={class:"flex flex-row"},Ipt=["value"],Mpt={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"},Dpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),kpt={class:"flex flex-row"},Lpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),Ppt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),Upt=["value"],Fpt={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"},Bpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),Gpt={class:"flex flex-row"},Vpt=["value"],zpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),Hpt={class:"flex flex-row"},qpt=["value"],Ypt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),$pt={class:"flex flex-row"},Wpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),Kpt={class:"flex flex-row"},jpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),Qpt={class:"flex flex-row"},Xpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),Zpt={class:"flex flex-row"},Jpt=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),e_t={class:"flex flex-row"},t_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),n_t={class:"flex flex-row"},s_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),i_t={class:"flex flex-row"},r_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),o_t={class:"flex flex-row"},a_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),l_t={class:"flex flex-row"},c_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),d_t={class:"flex flex-row"},u_t={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"},p_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),__t={class:"flex flex-row"},h_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),f_t={class:"flex flex-row"},m_t=k(()=>l("option",null," tts-1 ",-1)),g_t=k(()=>l("option",null," tts-2 ",-1)),b_t=[m_t,g_t],E_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),y_t={class:"flex flex-row"},v_t=k(()=>l("option",null," alloy ",-1)),S_t=k(()=>l("option",null," echo ",-1)),T_t=k(()=>l("option",null," fable ",-1)),x_t=k(()=>l("option",null," nova ",-1)),C_t=k(()=>l("option",null," shimmer ",-1)),w_t=[v_t,S_t,T_t,x_t,C_t],R_t={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"},A_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),N_t={class:"flex flex-row"},O_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),I_t={class:"flex flex-row"},M_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),D_t={class:"flex flex-row"},k_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),L_t={class:"flex flex-row"},P_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),U_t={class:"flex flex-row"},F_t=["value"],B_t={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"},G_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),V_t={class:"flex flex-row"},z_t=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),H_t=[z_t],q_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),Y_t={class:"flex flex-row"},$_t=k(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1)),W_t={class:"flex flex-row"},K_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),j_t={class:"flex flex-row"},Q_t={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"},X_t=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),Z_t={class:"flex flex-row"},J_t=k(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1)),eht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),tht={class:"flex flex-row"},nht=k(()=>l("td",null,null,-1)),sht={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"},iht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),rht={class:"flex flex-row"},oht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),aht={class:"flex flex-row"},lht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),cht={class:"flex flex-row"},dht={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"},uht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),pht={class:"flex flex-row"},_ht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),hht={class:"flex flex-row"},fht=k(()=>l("option",null," dall-e-2 ",-1)),mht=k(()=>l("option",null," dall-e-3 ",-1)),ght=[fht,mht],bht={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"},Eht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),yht={class:"flex flex-row"},vht=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Sht=[vht],Tht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),xht={class:"flex flex-row"},Cht=["value"],wht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),Rht={class:"flex flex-row"},Aht=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Nht=[Aht],Oht=k(()=>l("td",{style:{"min-width":"200px"}},null,-1)),Iht={class:"flex flex-row"},Mht=k(()=>l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1)),Dht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),kht={class:"flex flex-row"},Lht={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"},Pht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),Uht={class:"flex flex-row"},Fht=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Bht=[Fht],Ght=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),Vht={class:"flex flex-row"},zht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),Hht={class:"flex flex-row"},qht={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"},Yht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),$ht={class:"flex flex-row"},Wht=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Kht=[Wht],jht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),Qht={class:"flex flex-row"},Xht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),Zht={class:"flex flex-row"},Jht=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),eft={class:"flex flex-col align-bottom"},tft={class:"relative"},nft=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),sft={class:"absolute right-0"},ift=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),rft={class:"flex flex-row"},oft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),aft={class:"flex flex-row"},lft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),cft={class:"flex flex-row"},dft={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"},uft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),pft={class:"flex flex-row"},_ft=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),hft=[_ft],fft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),mft={class:"flex flex-row"},gft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),bft={class:"flex flex-row"},Eft={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"},yft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Motion Ctrl service:")],-1)),vft={class:"flex flex-row"},Sft=k(()=>l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)),Tft=[Sft],xft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Motion Ctrl service:")],-1)),Cft={class:"flex flex-row"},wft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),Rft={class:"flex flex-row"},Aft={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"},Nft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),Oft={class:"flex flex-row"},Ift=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),Mft={class:"flex flex-row"},Dft=k(()=>l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),kft={class:"flex flex-row"},Lft={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"},Pft={class:"flex flex-row p-3"},Uft=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),Fft=[Uft],Bft=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Gft=[Bft],Vft=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),zft={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Hft=k(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),qft={key:1,class:"mr-2"},Yft={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},$ft={class:"flex gap-1 items-center"},Wft=["src"],Kft={class:"font-bold font-large text-lg line-clamp-1"},jft={key:0,class:"mb-2"},Qft={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Xft=k(()=>l("i",{"data-feather":"chevron-up"},null,-1)),Zft=[Xft],Jft=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),emt=[Jft],tmt={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"},nmt={class:"flex flex-row p-3"},smt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),imt=[smt],rmt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),omt=[rmt],amt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),lmt={class:"flex flex-row items-center"},cmt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},dmt=k(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),umt={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},pmt=k(()=>l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1)),_mt={key:2,class:"mr-2"},hmt={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},fmt={class:"flex gap-1 items-center"},mmt=["src"],gmt={class:"font-bold font-large text-lg line-clamp-1"},bmt={class:"mx-2 mb-4"},Emt={class:"relative"},ymt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},vmt={key:0},Smt=k(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),Tmt=[Smt],xmt={key:1},Cmt=k(()=>l("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"},[l("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)),wmt=[Cmt],Rmt=k(()=>l("label",{for:"only_installed"},"Show only installed models",-1)),Amt=k(()=>l("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)),Nmt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},Omt=k(()=>l("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"},[l("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"}),l("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)),Imt=k(()=>l("p",{class:"heartbeat-text"},"Loading models Zoo",-1)),Mmt=[Omt,Imt],Dmt={key:1,class:"mb-2"},kmt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Lmt=k(()=>l("i",{"data-feather":"chevron-up"},null,-1)),Pmt=[Lmt],Umt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Fmt=[Umt],Bmt={class:"mb-2"},Gmt={class:"p-2"},Vmt={class:"mb-3"},zmt=k(()=>l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),Hmt={key:0},qmt={class:"mb-3"},Ymt=k(()=>l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),$mt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},Wmt=k(()=>l("div",{role:"status",class:"justify-center"},null,-1)),Kmt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},jmt={class:"w-full p-2"},Qmt={class:"flex justify-between mb-1"},Xmt=gu(' Downloading Loading...',1),Zmt={class:"text-sm font-medium text-blue-700 dark:text-white"},Jmt=["title"],egt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},tgt={class:"flex justify-between mb-1"},ngt={class:"text-base font-medium text-blue-700 dark:text-white"},sgt={class:"text-sm font-medium text-blue-700 dark:text-white"},igt={class:"flex flex-grow"},rgt={class:"flex flex-row flex-grow gap-3"},ogt={class:"p-2 text-center grow"},agt={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"},lgt={class:"flex flex-row p-3 items-center"},cgt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),dgt=[cgt],ugt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),pgt=[ugt],_gt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),hgt={key:0,class:"mr-2"},fgt={class:"mr-2 font-bold font-large text-lg line-clamp-1"},mgt={key:1,class:"mr-2"},ggt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},bgt={key:0,class:"flex -space-x-4 items-center"},Egt={class:"group items-center flex flex-row"},ygt=["onClick"],vgt=["src","title"],Sgt=["onClick"],Tgt=k(()=>l("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[l("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"},[l("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)),xgt=[Tgt],Cgt=k(()=>l("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"},[l("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)),wgt=[Cgt],Rgt={class:"mx-2 mb-4"},Agt=k(()=>l("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),Ngt={class:"relative"},Ogt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Igt={key:0},Mgt=k(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),Dgt=[Mgt],kgt={key:1},Lgt=k(()=>l("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"},[l("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)),Pgt=[Lgt],Ugt={key:0,class:"mx-2 mb-4"},Fgt={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},Bgt=["selected"],Ggt={key:0,class:"mb-2"},Vgt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},zgt=k(()=>l("i",{"data-feather":"chevron-up"},null,-1)),Hgt=[zgt],qgt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Ygt=[qgt],$gt={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"},Wgt={class:"flex flex-row"},Kgt=k(()=>l("i",{"data-feather":"chevron-right"},null,-1)),jgt=[Kgt],Qgt=k(()=>l("i",{"data-feather":"chevron-down"},null,-1)),Xgt=[Qgt],Zgt=k(()=>l("h3",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1)),Jgt={class:"m-2"},ebt={class:"flex flex-row gap-2 items-center"},tbt=k(()=>l("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1)),nbt={class:"m-2"},sbt=k(()=>l("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),ibt={class:"m-2"},rbt={class:"flex flex-col align-bottom"},obt={class:"relative"},abt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),lbt={class:"absolute right-0"},cbt={class:"m-2"},dbt={class:"flex flex-col align-bottom"},ubt={class:"relative"},pbt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),_bt={class:"absolute right-0"},hbt={class:"m-2"},fbt={class:"flex flex-col align-bottom"},mbt={class:"relative"},gbt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),bbt={class:"absolute right-0"},Ebt={class:"m-2"},ybt={class:"flex flex-col align-bottom"},vbt={class:"relative"},Sbt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),Tbt={class:"absolute right-0"},xbt={class:"m-2"},Cbt={class:"flex flex-col align-bottom"},wbt={class:"relative"},Rbt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),Abt={class:"absolute right-0"},Nbt={class:"m-2"},Obt={class:"flex flex-col align-bottom"},Ibt={class:"relative"},Mbt=k(()=>l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),Dbt={class:"absolute right-0"};function kbt(t,e,n,s,i,r){const o=ct("StringListManager"),a=ct("Card"),c=ct("BindingEntry"),u=ct("RadioOptions"),d=ct("model-entry"),h=ct("personality-entry"),f=ct("AddModelDialog"),m=ct("ChoiceDialog");return T(),w(Ve,null,[l("div",Qit,[l("div",Xit,[i.showConfirmation?(T(),w("div",Zit,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=ae(_=>i.showConfirmation=!1,["stop"]))},ert),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=ae(_=>r.save_configuration(),["stop"]))},nrt)])):G("",!0),i.showConfirmation?G("",!0):(T(),w("div",srt,[l("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=_=>r.reset_configuration())},rrt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=ae(_=>i.all_collapsed=!i.all_collapsed,["stop"]))},art)])),l("div",lrt,[l("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=_=>r.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)}))},drt),l("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=_=>r.api_post_req("restart_program").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},prt),i.has_updates?(T(),w("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=_=>r.api_post_req("update_software").then(E=>{E.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},frt)):G("",!0),l("div",mrt,[i.settingsChanged?(T(),w("div",grt,[i.isLoading?G("",!0):(T(),w("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=ae(_=>r.applyConfiguration(),["stop"]))},Ert)),i.isLoading?G("",!0):(T(),w("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=ae(_=>r.cancelConfiguration(),["stop"]))},vrt))])):G("",!0),i.isLoading?(T(),w("div",Srt,[l("p",null,J(i.loading_text),1),Trt,xrt])):G("",!0)])])]),l("div",{class:Ue(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[l("div",Crt,[l("div",wrt,[l("button",{onClick:e[9]||(e[9]=ae(_=>i.sc_collapsed=!i.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,Art,512),[[wt,i.sc_collapsed]]),U(l("div",null,Ort,512),[[wt,!i.sc_collapsed]]),Irt,Mrt,l("div",Drt,[l("div",krt,[l("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(T(),w("div",Lrt,[(T(!0),w(Ve,null,Je(r.vramUsage.gpus,_=>(T(),w("div",{class:"flex gap-2 items-center",key:_},[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Prt),l("h3",Urt,[l("div",null,J(r.computedFileSize(_.used_vram))+" / "+J(r.computedFileSize(_.total_vram))+" ("+J(_.percentage)+"%) ",1)])]))),128))])):G("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(T(),w("div",Frt,[l("div",Brt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Grt),l("h3",Vrt,[l("div",null,J(r.vramUsage.gpus.length)+"x ",1)])])])):G("",!0)]),zrt,l("h3",Hrt,[l("div",null,J(r.ram_usage)+" / "+J(r.ram_total_space)+" ("+J(r.ram_percent_usage)+"%)",1)]),qrt,l("h3",Yrt,[l("div",null,J(r.disk_binding_models_usage)+" / "+J(r.disk_total_space)+" ("+J(r.disk_percent_usage)+"%)",1)])])])])]),l("div",{class:Ue([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",$rt,[Wrt,l("div",Krt,[l("div",null,[jrt,Xe(J(r.ram_available_space),1)]),l("div",null,[Qrt,Xe(" "+J(r.ram_usage)+" / "+J(r.ram_total_space)+" ("+J(r.ram_percent_usage)+")% ",1)])]),l("div",Xrt,[l("div",Zrt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t("width: "+r.ram_percent_usage+"%;")},null,4)])])]),l("div",Jrt,[eot,l("div",tot,[l("div",null,[not,Xe(J(r.disk_available_space),1)]),l("div",null,[sot,Xe(" "+J(r.disk_binding_models_usage)+" / "+J(r.disk_total_space)+" ("+J(r.disk_percent_usage)+"%)",1)])]),l("div",iot,[l("div",rot,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(T(!0),w(Ve,null,Je(r.vramUsage.gpus,_=>(T(),w("div",{class:"mb-2",key:_},[l("label",oot,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,aot),Xe(" GPU usage: ")]),l("div",lot,[l("div",null,[cot,Xe(J(_.gpu_model),1)]),l("div",null,[dot,Xe(J(this.computedFileSize(_.available_space)),1)]),l("div",null,[uot,Xe(" "+J(this.computedFileSize(_.used_vram))+" / "+J(this.computedFileSize(_.total_vram))+" ("+J(_.percentage)+"%)",1)])]),l("div",pot,[l("div",_ot,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t("width: "+_.percentage+"%;")},null,4)])])]))),128))],2)]),l("div",hot,[l("div",fot,[l("button",{onClick:e[10]||(e[10]=ae(_=>i.smartrouterconf_collapsed=!i.smartrouterconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,got,512),[[wt,i.smartrouterconf_collapsed]]),U(l("div",null,Eot,512),[[wt,!i.smartrouterconf_collapsed]]),yot])]),l("div",{class:Ue([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",vot,[_e(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Sot,[l("tr",null,[Tot,l("td",xot,[U(l("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=_=>r.configFile.use_smart_routing=_),onChange:e[12]||(e[12]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_smart_routing]])])]),l("tr",null,[Cot,l("td",wot,[U(l("input",{type:"checkbox",id:"restore_model_after_smart_routing","onUpdate:modelValue":e[13]||(e[13]=_=>r.configFile.restore_model_after_smart_routing=_),onChange:e[14]||(e[14]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.restore_model_after_smart_routing]])])]),l("tr",null,[Rot,l("td",Aot,[U(l("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[15]||(e[15]=_=>r.configFile.smart_routing_router_model=_),onChange:e[16]||(e[16]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.smart_routing_router_model]])])]),l("tr",null,[Not,l("td",Oot,[_e(o,{modelValue:r.configFile.smart_routing_models_by_power,"onUpdate:modelValue":e[17]||(e[17]=_=>r.configFile.smart_routing_models_by_power=_),onChange:e[18]||(e[18]=_=>i.settingsChanged=!0),placeholder:"Enter model name"},null,8,["modelValue"])])])])]),_:1})])],2)]),l("div",Iot,[l("div",Mot,[l("button",{onClick:e[19]||(e[19]=ae(_=>i.mainconf_collapsed=!i.mainconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,kot,512),[[wt,i.mainconf_collapsed]]),U(l("div",null,Pot,512),[[wt,!i.mainconf_collapsed]]),Uot])]),l("div",{class:Ue([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Fot,[_e(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Bot,[l("tr",null,[Got,l("td",null,[l("label",Vot,[l("img",{src:r.configFile.app_custom_logo!=null&&r.configFile.app_custom_logo!=""?"/user_infos/"+r.configFile.app_custom_logo:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,zot)]),l("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[20]||(e[20]=(..._)=>r.uploadLogo&&r.uploadLogo(..._))},null,32)]),l("td",Hot,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[21]||(e[21]=ae(_=>r.resetLogo(),["stop"]))},Yot)])]),l("tr",null,[$ot,l("td",Wot,[l("div",Kot,[U(l("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[22]||(e[22]=_=>r.configFile.hardware_mode=_),onChange:e[23]||(e[23]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},sat,544),[[Vt,r.configFile.hardware_mode]])])])]),l("tr",null,[iat,l("td",rat,[U(l("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[24]||(e[24]=_=>r.configFile.discussion_db_name=_),onChange:e[25]||(e[25]=_=>i.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),[[ue,r.configFile.discussion_db_name]])])]),l("tr",null,[oat,l("td",null,[l("div",aat,[U(l("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[26]||(e[26]=_=>r.configFile.copy_to_clipboard_add_all_details=_),onChange:e[27]||(e[27]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.copy_to_clipboard_add_all_details]])])])]),l("tr",null,[lat,l("td",null,[l("div",cat,[U(l("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[28]||(e[28]=_=>r.configFile.auto_show_browser=_),onChange:e[29]||(e[29]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_show_browser]])])])]),l("tr",null,[dat,l("td",null,[l("div",uat,[U(l("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[30]||(e[30]=_=>r.configFile.debug=_),onChange:e[31]||(e[31]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug]])])])]),l("tr",null,[pat,l("td",null,[l("div",_at,[U(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[32]||(e[32]=_=>r.configFile.debug_show_final_full_prompt=_),onChange:e[33]||(e[33]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[hat,l("td",null,[l("div",fat,[U(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[34]||(e[34]=_=>r.configFile.debug_show_final_full_prompt=_),onChange:e[35]||(e[35]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[mat,l("td",null,[l("div",gat,[U(l("input",{type:"checkbox",id:"debug_show_chunks",required:"","onUpdate:modelValue":e[36]||(e[36]=_=>r.configFile.debug_show_chunks=_),onChange:e[37]||(e[37]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_chunks]])])])]),l("tr",null,[bat,l("td",null,[l("div",Eat,[U(l("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[38]||(e[38]=_=>r.configFile.debug_log_file_path=_),onChange:e[39]||(e[39]=_=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.debug_log_file_path]])])])]),l("tr",null,[yat,l("td",null,[l("div",vat,[U(l("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[40]||(e[40]=_=>r.configFile.show_news_panel=_),onChange:e[41]||(e[41]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.show_news_panel]])])])]),l("tr",null,[Sat,l("td",null,[l("div",Tat,[U(l("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[42]||(e[42]=_=>r.configFile.auto_save=_),onChange:e[43]||(e[43]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_save]])])])]),l("tr",null,[xat,l("td",null,[l("div",Cat,[U(l("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[44]||(e[44]=_=>r.configFile.auto_update=_),onChange:e[45]||(e[45]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_update]])])])]),l("tr",null,[wat,l("td",null,[l("div",Rat,[U(l("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[46]||(e[46]=_=>r.configFile.auto_title=_),onChange:e[47]||(e[47]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_title]])])])])])]),_:1}),_e(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Aat,[l("tr",null,[Nat,l("td",null,[l("select",{onChange:e[48]||(e[48]=(..._)=>r.handleTemplateSelection&&r.handleTemplateSelection(..._))},Lat,32)])]),l("tr",null,[Pat,l("td",null,[U(l("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[49]||(e[49]=_=>r.configFile.start_header_id_template=_),onChange:e[50]||(e[50]=_=>i.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),[[ue,r.configFile.start_header_id_template]])])]),l("tr",null,[Uat,l("td",null,[U(l("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[51]||(e[51]=_=>r.configFile.end_header_id_template=_),onChange:e[52]||(e[52]=_=>i.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),[[ue,r.configFile.end_header_id_template]])])]),l("tr",null,[Fat,l("td",null,[U(l("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[53]||(e[53]=_=>r.configFile.start_user_header_id_template=_),onChange:e[54]||(e[54]=_=>i.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),[[ue,r.configFile.start_user_header_id_template]])])]),l("tr",null,[Bat,l("td",null,[U(l("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[55]||(e[55]=_=>r.configFile.end_user_header_id_template=_),onChange:e[56]||(e[56]=_=>i.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),[[ue,r.configFile.end_user_header_id_template]])])]),l("tr",null,[Gat,l("td",null,[U(l("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[57]||(e[57]=_=>r.configFile.end_user_message_id_template=_),onChange:e[58]||(e[58]=_=>i.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),[[ue,r.configFile.end_user_message_id_template]])])]),l("tr",null,[Vat,l("td",null,[U(l("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[59]||(e[59]=_=>r.configFile.start_ai_header_id_template=_),onChange:e[60]||(e[60]=_=>i.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),[[ue,r.configFile.start_ai_header_id_template]])])]),l("tr",null,[zat,l("td",null,[U(l("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[61]||(e[61]=_=>r.configFile.end_ai_header_id_template=_),onChange:e[62]||(e[62]=_=>i.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),[[ue,r.configFile.end_ai_header_id_template]])])]),l("tr",null,[Hat,l("td",null,[U(l("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[63]||(e[63]=_=>r.configFile.end_ai_message_id_template=_),onChange:e[64]||(e[64]=_=>i.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),[[ue,r.configFile.end_ai_message_id_template]])])]),l("tr",null,[qat,l("td",null,[U(l("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[65]||(e[65]=_=>r.configFile.separator_template=_),onChange:e[66]||(e[66]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.separator_template]])])]),l("tr",null,[Yat,l("td",null,[U(l("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[67]||(e[67]=_=>r.configFile.system_message_template=_),onChange:e[68]||(e[68]=_=>i.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),[[ue,r.configFile.system_message_template]])])]),l("tr",null,[$at,l("td",null,[l("div",{innerHTML:r.full_template},null,8,Wat)])]),l("tr",null,[Kat,l("td",jat,[U(l("input",{type:"checkbox",id:"use_continue_message",required:"","onUpdate:modelValue":e[69]||(e[69]=_=>r.configFile.use_continue_message=_),onChange:e[70]||(e[70]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_continue_message]])])])])]),_:1}),_e(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Qat,[l("tr",null,[Xat,l("td",Zat,[U(l("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[71]||(e[71]=_=>r.configFile.user_name=_),onChange:e[72]||(e[72]=_=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.user_name]])])]),l("tr",null,[Jat,l("td",elt,[U(l("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[73]||(e[73]=_=>r.configFile.user_description=_),onChange:e[74]||(e[74]=_=>i.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.user_description]])])]),l("tr",null,[tlt,l("td",nlt,[U(l("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[75]||(e[75]=_=>r.configFile.use_user_informations_in_discussion=_),onChange:e[76]||(e[76]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_user_informations_in_discussion]])])]),l("tr",null,[slt,l("td",ilt,[U(l("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[77]||(e[77]=_=>r.configFile.use_model_name_in_discussions=_),onChange:e[78]||(e[78]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_model_name_in_discussions]])])]),l("tr",null,[rlt,l("td",null,[l("label",olt,[l("img",{src:r.configFile.user_avatar!=null&&r.configFile.user_avatar!=""?"/user_infos/"+r.configFile.user_avatar:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,alt)]),l("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[79]||(e[79]=(..._)=>r.uploadAvatar&&r.uploadAvatar(..._))},null,32)]),l("td",llt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[80]||(e[80]=ae(_=>r.resetAvatar(),["stop"]))},dlt)])]),l("tr",null,[ult,l("td",null,[l("div",plt,[U(l("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[81]||(e[81]=_=>r.configFile.use_user_name_in_discussions=_),onChange:e[82]||(e[82]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_user_name_in_discussions]])])])]),l("tr",null,[_lt,l("td",hlt,[U(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=_=>r.configFile.max_n_predict=_),onChange:e[84]||(e[84]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.max_n_predict]])])]),l("tr",null,[flt,l("td",mlt,[U(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[85]||(e[85]=_=>r.configFile.max_n_predict=_),onChange:e[86]||(e[86]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.max_n_predict]])])])])]),_:1}),_e(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",glt,[l("tr",null,[blt,l("td",Elt,[U(l("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[87]||(e[87]=_=>r.configFile.turn_on_code_execution=_),onChange:e[88]||(e[88]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_code_execution]])])]),l("tr",null,[ylt,l("td",vlt,[U(l("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=_=>r.configFile.turn_on_code_validation=_),onChange:e[90]||(e[90]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_code_validation]])])]),l("tr",null,[Slt,l("td",Tlt,[U(l("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=_=>r.configFile.turn_on_setting_update_validation=_),onChange:e[92]||(e[92]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_setting_update_validation]])])]),l("tr",null,[xlt,l("td",Clt,[U(l("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=_=>r.configFile.turn_on_open_file_validation=_),onChange:e[94]||(e[94]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_open_file_validation]])])]),l("tr",null,[wlt,l("td",Rlt,[U(l("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[95]||(e[95]=_=>r.configFile.turn_on_send_file_validation=_),onChange:e[96]||(e[96]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),_e(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Alt,[l("tr",null,[Nlt,l("td",null,[l("div",Olt,[U(l("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[97]||(e[97]=_=>r.configFile.activate_skills_lib=_),onChange:e[98]||(e[98]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_skills_lib]])])])]),l("tr",null,[Ilt,l("td",Mlt,[U(l("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[99]||(e[99]=_=>r.configFile.skills_lib_database_name=_),onChange:e[100]||(e[100]=_=>i.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),[[ue,r.configFile.skills_lib_database_name]])])])])]),_:1}),_e(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Dlt,[l("tr",null,[klt,l("td",null,[l("div",Llt,[U(l("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[101]||(e[101]=_=>r.configFile.pdf_latex_path=_),onChange:e[102]||(e[102]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.pdf_latex_path]])])])])])]),_:1}),_e(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Plt,[l("tr",null,[Ult,l("td",null,[l("div",Flt,[U(l("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=_=>r.configFile.positive_boost=_),onChange:e[104]||(e[104]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.positive_boost]])])])]),l("tr",null,[Blt,l("td",null,[l("div",Glt,[U(l("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[105]||(e[105]=_=>r.configFile.negative_boost=_),onChange:e[106]||(e[106]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.negative_boost]])])])]),l("tr",null,[Vlt,l("td",null,[l("div",zlt,[U(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[107]||(e[107]=_=>r.configFile.fun_mode=_),onChange:e[108]||(e[108]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.fun_mode]])])])])])]),_:1})])],2)]),l("div",Hlt,[l("div",qlt,[l("button",{onClick:e[109]||(e[109]=ae(_=>i.data_conf_collapsed=!i.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,$lt,512),[[wt,i.data_conf_collapsed]]),U(l("div",null,Klt,512),[[wt,!i.data_conf_collapsed]]),jlt])]),l("div",{class:Ue([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_e(a,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Qlt,[l("tr",null,[Xlt,l("td",Zlt,[(T(!0),w(Ve,null,Je(r.configFile.rag_databases,(_,E)=>(T(),w("div",{key:E,class:"flex items-center mb-2"},[U(l("input",{type:"text","onUpdate:modelValue":b=>r.configFile.rag_databases[E]=b,onChange:e[110]||(e[110]=b=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,40,Jlt),[[ue,r.configFile.rag_databases[E]]]),l("button",{onClick:b=>r.vectorize_folder(E),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded"},"(Re)Vectorize",8,ect),l("button",{onClick:b=>r.select_folder(E),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-green-300 rounded"},"Select Folder",8,tct),l("button",{onClick:b=>r.removeDataSource(E),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-green-300 rounded"},"Remove",8,nct)]))),128)),l("button",{onClick:e[111]||(e[111]=(..._)=>r.addDataSource&&r.addDataSource(..._)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),l("tr",null,[sct,l("td",null,[U(l("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[112]||(e[112]=_=>r.configFile.rag_vectorizer=_),onChange:e[113]||(e[113]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},act,544),[[Vt,r.configFile.rag_vectorizer]])])]),l("tr",null,[lct,l("td",null,[U(l("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[114]||(e[114]=_=>r.configFile.rag_vectorizer_model=_),onChange:e[115]||(e[115]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},dct,544),[[Vt,r.configFile.rag_vectorizer_model]])])]),l("tr",null,[uct,l("td",null,[U(l("input",{id:"rag_chunk_size","onUpdate:modelValue":e[116]||(e[116]=_=>r.configFile.rag_chunk_size=_),onChange:e[117]||(e[117]=_=>i.settingsChanged=!0),type:"range",min:"2",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),[[ue,r.configFile.rag_chunk_size]]),U(l("input",{"onUpdate:modelValue":e[118]||(e[118]=_=>r.configFile.rag_chunk_size=_),type:"number",onChange:e[119]||(e[119]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_chunk_size]])])]),l("tr",null,[pct,l("td",null,[U(l("input",{id:"rag_overlap","onUpdate:modelValue":e[120]||(e[120]=_=>r.configFile.rag_overlap=_),onChange:e[121]||(e[121]=_=>i.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),[[ue,r.configFile.rag_overlap]]),U(l("input",{"onUpdate:modelValue":e[122]||(e[122]=_=>r.configFile.rag_overlap=_),type:"number",onChange:e[123]||(e[123]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_overlap]])])]),l("tr",null,[_ct,l("td",null,[U(l("input",{id:"rag_n_chunks","onUpdate:modelValue":e[124]||(e[124]=_=>r.configFile.rag_n_chunks=_),onChange:e[125]||(e[125]=_=>i.settingsChanged=!0),type:"range",min:"2",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),[[ue,r.configFile.rag_n_chunks]]),U(l("input",{"onUpdate:modelValue":e[126]||(e[126]=_=>r.configFile.rag_n_chunks=_),type:"number",onChange:e[127]||(e[127]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_n_chunks]])])]),l("tr",null,[hct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[128]||(e[128]=_=>r.configFile.rag_clean_chunks=_),type:"checkbox",onChange:e[129]||(e[129]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_clean_chunks]])])]),l("tr",null,[fct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[130]||(e[130]=_=>r.configFile.rag_follow_subfolders=_),type:"checkbox",onChange:e[131]||(e[131]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_follow_subfolders]])])]),l("tr",null,[mct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[132]||(e[132]=_=>r.configFile.rag_check_new_files_at_startup=_),type:"checkbox",onChange:e[133]||(e[133]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_check_new_files_at_startup]])])]),l("tr",null,[gct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[134]||(e[134]=_=>r.configFile.rag_preprocess_chunks=_),type:"checkbox",onChange:e[135]||(e[135]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_preprocess_chunks]])])]),l("tr",null,[bct,l("td",null,[U(l("input",{"onUpdate:modelValue":e[136]||(e[136]=_=>r.configFile.rag_activate_multi_hops=_),type:"checkbox",onChange:e[137]||(e[137]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_activate_multi_hops]])])]),l("tr",null,[Ect,l("td",null,[U(l("input",{"onUpdate:modelValue":e[138]||(e[138]=_=>r.configFile.contextual_summary=_),type:"checkbox",onChange:e[139]||(e[139]=_=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.contextual_summary]])])])])]),_:1}),_e(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",yct,[l("tr",null,[vct,l("td",null,[l("div",Sct,[U(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[140]||(e[140]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[141]||(e[141]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_save_db]])])])]),l("tr",null,[Tct,l("td",null,[l("div",xct,[U(l("input",{type:"checkbox",id:"data_vectorization_visualize_on_vectorization",required:"","onUpdate:modelValue":e[142]||(e[142]=_=>r.configFile.data_vectorization_visualize_on_vectorization=_),onChange:e[143]||(e[143]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_visualize_on_vectorization]])])])]),l("tr",null,[Cct,l("td",null,[l("div",wct,[U(l("input",{type:"checkbox",id:"data_vectorization_build_keys_words",required:"","onUpdate:modelValue":e[144]||(e[144]=_=>r.configFile.data_vectorization_build_keys_words=_),onChange:e[145]||(e[145]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_build_keys_words]])])])]),l("tr",null,[Rct,l("td",null,[l("div",Act,[U(l("input",{type:"checkbox",id:"data_vectorization_force_first_chunk",required:"","onUpdate:modelValue":e[146]||(e[146]=_=>r.configFile.data_vectorization_force_first_chunk=_),onChange:e[147]||(e[147]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_force_first_chunk]])])])]),l("tr",null,[Nct,l("td",null,[l("div",Oct,[U(l("input",{type:"checkbox",id:"data_vectorization_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[148]||(e[148]=_=>r.configFile.data_vectorization_put_chunk_informations_into_context=_),onChange:e[149]||(e[149]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_put_chunk_informations_into_context]])])])]),l("tr",null,[Ict,l("td",null,[U(l("select",{id:"data_vectorization_method",required:"","onUpdate:modelValue":e[150]||(e[150]=_=>r.configFile.data_vectorization_method=_),onChange:e[151]||(e[151]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Pct,544),[[Vt,r.configFile.data_vectorization_method]])])]),l("tr",null,[Uct,l("td",Fct,[U(l("input",{type:"text",id:"data_vectorization_sentense_transformer_model",required:"","onUpdate:modelValue":e[152]||(e[152]=_=>r.configFile.data_vectorization_sentense_transformer_model=_),onChange:e[153]||(e[153]=_=>i.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),[[ue,r.configFile.data_vectorization_sentense_transformer_model]])])]),l("tr",null,[Bct,l("td",null,[U(l("select",{id:"data_visualization_method",required:"","onUpdate:modelValue":e[154]||(e[154]=_=>r.configFile.data_visualization_method=_),onChange:e[155]||(e[155]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},zct,544),[[Vt,r.configFile.data_visualization_method]])])]),l("tr",null,[Hct,l("td",null,[l("div",qct,[U(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[156]||(e[156]=_=>r.configFile.data_vectorization_save_db=_),onChange:e[157]||(e[157]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_save_db]])])])]),l("tr",null,[Yct,l("td",null,[U(l("input",{id:"data_vectorization_chunk_size","onUpdate:modelValue":e[158]||(e[158]=_=>r.configFile.data_vectorization_chunk_size=_),onChange:e[159]||(e[159]=_=>i.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),[[ue,r.configFile.data_vectorization_chunk_size]]),U(l("input",{"onUpdate:modelValue":e[160]||(e[160]=_=>r.configFile.data_vectorization_chunk_size=_),type:"number",onChange:e[161]||(e[161]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.data_vectorization_chunk_size]])])]),l("tr",null,[$ct,l("td",null,[U(l("input",{id:"data_vectorization_overlap_size","onUpdate:modelValue":e[162]||(e[162]=_=>r.configFile.data_vectorization_overlap_size=_),onChange:e[163]||(e[163]=_=>i.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),[[ue,r.configFile.data_vectorization_overlap_size]]),U(l("input",{"onUpdate:modelValue":e[164]||(e[164]=_=>r.configFile.data_vectorization_overlap_size=_),type:"number",onChange:e[165]||(e[165]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.data_vectorization_overlap_size]])])]),l("tr",null,[Wct,l("td",null,[U(l("input",{id:"data_vectorization_nb_chunks","onUpdate:modelValue":e[166]||(e[166]=_=>r.configFile.data_vectorization_nb_chunks=_),onChange:e[167]||(e[167]=_=>i.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),[[ue,r.configFile.data_vectorization_nb_chunks]]),U(l("input",{"onUpdate:modelValue":e[168]||(e[168]=_=>r.configFile.data_vectorization_nb_chunks=_),type:"number",onChange:e[169]||(e[169]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.data_vectorization_nb_chunks]])])])])]),_:1})],2)]),l("div",Kct,[l("div",jct,[l("button",{onClick:e[170]||(e[170]=ae(_=>i.internet_conf_collapsed=!i.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,Xct,512),[[wt,i.internet_conf_collapsed]]),U(l("div",null,Jct,512),[[wt,!i.internet_conf_collapsed]]),edt])]),l("div",{class:Ue([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_e(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",tdt,[l("tr",null,[ndt,l("td",null,[l("div",sdt,[U(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[171]||(e[171]=_=>r.configFile.activate_internet_search=_),onChange:e[172]||(e[172]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_internet_search]])])])]),l("tr",null,[idt,l("td",null,[l("div",rdt,[U(l("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[173]||(e[173]=_=>r.configFile.activate_internet_pages_judgement=_),onChange:e[174]||(e[174]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_internet_pages_judgement]])])])]),l("tr",null,[odt,l("td",null,[l("div",adt,[U(l("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[175]||(e[175]=_=>r.configFile.internet_quick_search=_),onChange:e[176]||(e[176]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.internet_quick_search]])])])]),l("tr",null,[ldt,l("td",null,[l("div",cdt,[U(l("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[177]||(e[177]=_=>r.configFile.internet_activate_search_decision=_),onChange:e[178]||(e[178]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.internet_activate_search_decision]])])])]),l("tr",null,[ddt,l("td",null,[l("div",udt,[U(l("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[179]||(e[179]=_=>r.configFile.internet_vectorization_chunk_size=_),onChange:e[180]||(e[180]=_=>i.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),[[ue,r.configFile.internet_vectorization_chunk_size]]),U(l("input",{"onUpdate:modelValue":e[181]||(e[181]=_=>r.configFile.internet_vectorization_chunk_size=_),type:"number",onChange:e[182]||(e[182]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_chunk_size]])])])]),l("tr",null,[pdt,l("td",null,[l("div",_dt,[U(l("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[183]||(e[183]=_=>r.configFile.internet_vectorization_overlap_size=_),onChange:e[184]||(e[184]=_=>i.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),[[ue,r.configFile.internet_vectorization_overlap_size]]),U(l("input",{"onUpdate:modelValue":e[185]||(e[185]=_=>r.configFile.internet_vectorization_overlap_size=_),type:"number",onChange:e[186]||(e[186]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_overlap_size]])])])]),l("tr",null,[hdt,l("td",null,[l("div",fdt,[U(l("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[187]||(e[187]=_=>r.configFile.internet_vectorization_nb_chunks=_),onChange:e[188]||(e[188]=_=>i.settingsChanged=!0),type:"range",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),[[ue,r.configFile.internet_vectorization_nb_chunks]]),U(l("input",{"onUpdate:modelValue":e[189]||(e[189]=_=>r.configFile.internet_vectorization_nb_chunks=_),type:"number",onChange:e[190]||(e[190]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_nb_chunks]])])])]),l("tr",null,[mdt,l("td",null,[l("div",gdt,[U(l("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[191]||(e[191]=_=>r.configFile.internet_nb_search_pages=_),onChange:e[192]||(e[192]=_=>i.settingsChanged=!0),type:"range",min:"1",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),[[ue,r.configFile.internet_nb_search_pages]]),U(l("input",{"onUpdate:modelValue":e[193]||(e[193]=_=>r.configFile.internet_nb_search_pages=_),type:"number",onChange:e[194]||(e[194]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),l("div",bdt,[l("div",Edt,[l("button",{onClick:e[195]||(e[195]=ae(_=>i.servers_conf_collapsed=!i.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,vdt,512),[[wt,i.servers_conf_collapsed]]),U(l("div",null,Tdt,512),[[wt,!i.servers_conf_collapsed]]),xdt])]),l("div",{class:Ue([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[_e(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Cdt,[l("tr",null,[wdt,l("td",Rdt,[U(l("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[196]||(e[196]=_=>r.configFile.active_tts_service=_),onChange:e[197]||(e[197]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Ddt,544),[[Vt,r.configFile.active_tts_service]])])]),l("tr",null,[kdt,l("td",Ldt,[U(l("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[198]||(e[198]=_=>r.configFile.active_stt_service=_),onChange:e[199]||(e[199]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Bdt,544),[[Vt,r.configFile.active_stt_service]])])]),Gdt,l("tr",null,[Vdt,l("td",zdt,[U(l("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[200]||(e[200]=_=>r.configFile.active_tti_service=_),onChange:e[201]||(e[201]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},Qdt,544),[[Vt,r.configFile.active_tti_service]])])]),l("tr",null,[Xdt,l("td",Zdt,[U(l("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[202]||(e[202]=_=>r.configFile.active_ttm_service=_),onChange:e[203]||(e[203]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},tut,544),[[Vt,r.configFile.active_ttm_service]])])])])]),_:1}),_e(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",nut,[l("tr",null,[sut,l("td",null,[l("div",iut,[U(l("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[204]||(e[204]=_=>r.configFile.use_negative_prompt=_),onChange:e[205]||(e[205]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_negative_prompt]])])])]),l("tr",null,[rut,l("td",null,[l("div",out,[U(l("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[206]||(e[206]=_=>r.configFile.use_ai_generated_negative_prompt=_),onChange:e[207]||(e[207]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_ai_generated_negative_prompt]])])])]),l("tr",null,[aut,l("td",null,[l("div",lut,[U(l("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[208]||(e[208]=_=>r.configFile.negative_prompt_generation_prompt=_),onChange:e[209]||(e[209]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.negative_prompt_generation_prompt]])])])]),l("tr",null,[cut,l("td",null,[l("div",dut,[U(l("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[210]||(e[210]=_=>r.configFile.default_negative_prompt=_),onChange:e[211]||(e[211]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.default_negative_prompt]])])])])])]),_:1}),_e(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",uut,[l("tr",null,[put,l("td",_ut,[U(l("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[212]||(e[212]=_=>r.configFile.stt_listening_threshold=_),onChange:e[213]||(e[213]=_=>i.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),[[ue,r.configFile.stt_listening_threshold]])])]),l("tr",null,[hut,l("td",fut,[U(l("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[214]||(e[214]=_=>r.configFile.stt_silence_duration=_),onChange:e[215]||(e[215]=_=>i.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),[[ue,r.configFile.stt_silence_duration]])])]),l("tr",null,[mut,l("td",gut,[U(l("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[216]||(e[216]=_=>r.configFile.stt_sound_threshold_percentage=_),onChange:e[217]||(e[217]=_=>i.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),[[ue,r.configFile.stt_sound_threshold_percentage]])])]),l("tr",null,[but,l("td",Eut,[U(l("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[218]||(e[218]=_=>r.configFile.stt_gain=_),onChange:e[219]||(e[219]=_=>i.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),[[ue,r.configFile.stt_gain]])])]),l("tr",null,[yut,l("td",vut,[U(l("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[220]||(e[220]=_=>r.configFile.stt_rate=_),onChange:e[221]||(e[221]=_=>i.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),[[ue,r.configFile.stt_rate]])])]),l("tr",null,[Sut,l("td",Tut,[U(l("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[222]||(e[222]=_=>r.configFile.stt_channels=_),onChange:e[223]||(e[223]=_=>i.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),[[ue,r.configFile.stt_channels]])])]),l("tr",null,[xut,l("td",Cut,[U(l("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[224]||(e[224]=_=>r.configFile.stt_buffer_size=_),onChange:e[225]||(e[225]=_=>i.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),[[ue,r.configFile.stt_buffer_size]])])]),l("tr",null,[wut,l("td",null,[l("div",Rut,[U(l("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[226]||(e[226]=_=>r.configFile.stt_activate_word_detection=_),onChange:e[227]||(e[227]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.stt_activate_word_detection]])])])]),l("tr",null,[Aut,l("td",null,[l("div",Nut,[U(l("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[228]||(e[228]=_=>r.configFile.stt_word_detection_file=_),onChange:e[229]||(e[229]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_word_detection_file]])])])])])]),_:1}),_e(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Out,[l("tr",null,[Iut,l("td",Mut,[U(l("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[230]||(e[230]=_=>r.configFile.stt_input_device=_),onChange:e[231]||(e[231]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(i.snd_input_devices,(_,E)=>(T(),w("option",{key:_,value:i.snd_input_devices_indexes[E]},J(_),9,Dut))),128))],544),[[Vt,r.configFile.stt_input_device]])])]),l("tr",null,[kut,l("td",Lut,[U(l("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[232]||(e[232]=_=>r.configFile.tts_output_device=_),onChange:e[233]||(e[233]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(i.snd_output_devices,(_,E)=>(T(),w("option",{key:_,value:i.snd_output_devices_indexes[E]},J(_),9,Put))),128))],544),[[Vt,r.configFile.tts_output_device]])])])])]),_:1}),_e(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Uut,[l("tr",null,[Fut,l("td",But,[U(l("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[234]||(e[234]=_=>r.configFile.host=_),onChange:e[235]||(e[235]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.host]])])]),l("tr",null,[Gut,l("td",Vut,[_e(o,{modelValue:r.configFile.lollms_access_keys,"onUpdate:modelValue":e[236]||(e[236]=_=>r.configFile.lollms_access_keys=_),onChange:e[237]||(e[237]=_=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])])]),l("tr",null,[zut,l("td",Hut,[U(l("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[238]||(e[238]=_=>r.configFile.port=_),onChange:e[239]||(e[239]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.port]])])]),l("tr",null,[qut,l("td",Yut,[U(l("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[240]||(e[240]=_=>r.configFile.headless_server_mode=_),onChange:e[241]||(e[241]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.headless_server_mode]])])]),l("tr",null,[$ut,l("td",Wut,[U(l("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[242]||(e[242]=_=>r.configFile.activate_lollms_server=_),onChange:e[243]||(e[243]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_server]])])]),l("tr",null,[Kut,l("td",jut,[U(l("input",{type:"checkbox",id:"activate_lollms_rag_server",required:"","onUpdate:modelValue":e[244]||(e[244]=_=>r.configFile.activate_lollms_rag_server=_),onChange:e[245]||(e[245]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_rag_server]])])]),l("tr",null,[Qut,l("td",Xut,[U(l("input",{type:"checkbox",id:"activate_lollms_tts_server",required:"","onUpdate:modelValue":e[246]||(e[246]=_=>r.configFile.activate_lollms_tts_server=_),onChange:e[247]||(e[247]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_tts_server]])])]),l("tr",null,[Zut,l("td",Jut,[U(l("input",{type:"checkbox",id:"activate_lollms_stt_server",required:"","onUpdate:modelValue":e[248]||(e[248]=_=>r.configFile.activate_lollms_stt_server=_),onChange:e[249]||(e[249]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_stt_server]])])]),l("tr",null,[ept,l("td",tpt,[U(l("input",{type:"checkbox",id:"activate_lollms_tti_server",required:"","onUpdate:modelValue":e[250]||(e[250]=_=>r.configFile.activate_lollms_tti_server=_),onChange:e[251]||(e[251]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_tti_server]])])]),l("tr",null,[npt,l("td",spt,[U(l("input",{type:"checkbox",id:"activate_lollms_itt_server",required:"","onUpdate:modelValue":e[252]||(e[252]=_=>r.configFile.activate_lollms_itt_server=_),onChange:e[253]||(e[253]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_itt_server]])])]),l("tr",null,[ipt,l("td",rpt,[U(l("input",{type:"checkbox",id:"activate_lollms_ttm_server",required:"","onUpdate:modelValue":e[254]||(e[254]=_=>r.configFile.activate_lollms_ttm_server=_),onChange:e[255]||(e[255]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_ttm_server]])])]),l("tr",null,[opt,l("td",apt,[U(l("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[256]||(e[256]=_=>r.configFile.activate_ollama_emulator=_),onChange:e[257]||(e[257]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_ollama_emulator]])])]),l("tr",null,[lpt,l("td",cpt,[U(l("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[258]||(e[258]=_=>r.configFile.activate_openai_emulator=_),onChange:e[259]||(e[259]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_openai_emulator]])])]),l("tr",null,[dpt,l("td",upt,[U(l("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[260]||(e[260]=_=>r.configFile.activate_mistralai_emulator=_),onChange:e[261]||(e[261]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),_e(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",ppt,[l("tr",null,[_pt,l("td",null,[l("div",hpt,[U(l("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[262]||(e[262]=_=>r.configFile.activate_audio_infos=_),onChange:e[263]||(e[263]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_audio_infos]])])])]),l("tr",null,[fpt,l("td",null,[l("div",mpt,[U(l("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[264]||(e[264]=_=>r.configFile.audio_auto_send_input=_),onChange:e[265]||(e[265]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.audio_auto_send_input]])])])]),l("tr",null,[gpt,l("td",null,[U(l("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[266]||(e[266]=_=>r.configFile.audio_silenceTimer=_),onChange:e[267]||(e[267]=_=>i.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),[[ue,r.configFile.audio_silenceTimer]]),U(l("input",{"onUpdate:modelValue":e[268]||(e[268]=_=>r.configFile.audio_silenceTimer=_),onChange:e[269]||(e[269]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.audio_silenceTimer]])])]),l("tr",null,[bpt,l("td",null,[U(l("select",{id:"audio_in_language","onUpdate:modelValue":e[270]||(e[270]=_=>r.configFile.audio_in_language=_),onChange:e[271]||(e[271]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(r.audioLanguages,_=>(T(),w("option",{key:_.code,value:_.code},J(_.name),9,Ept))),128))],544),[[Vt,r.configFile.audio_in_language]])])])])]),_:1}),_e(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",ypt,[l("tr",null,[vpt,l("td",null,[l("div",Spt,[U(l("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[272]||(e[272]=_=>r.configFile.whisper_activate=_),onChange:e[273]||(e[273]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.whisper_activate]])])])]),l("tr",null,[Tpt,l("td",null,[l("div",xpt,[U(l("select",{id:"whisper_model","onUpdate:modelValue":e[274]||(e[274]=_=>r.configFile.whisper_model=_),onChange:e[275]||(e[275]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(r.whisperModels,_=>(T(),w("option",{key:_,value:_},J(_),9,Cpt))),128))],544),[[Vt,r.configFile.whisper_model]])])])])])]),_:1}),_e(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",wpt,[l("tr",null,[Rpt,l("td",null,[l("div",Apt,[U(l("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[276]||(e[276]=_=>r.configFile.openai_whisper_key=_),onChange:e[277]||(e[277]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.openai_whisper_key]])])])]),l("tr",null,[Npt,l("td",null,[l("div",Opt,[U(l("select",{id:"openai_whisper_model","onUpdate:modelValue":e[278]||(e[278]=_=>r.configFile.openai_whisper_model=_),onChange:e[279]||(e[279]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(r.openaiWhisperModels,_=>(T(),w("option",{key:_,value:_},J(_),9,Ipt))),128))],544),[[Vt,r.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),_e(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Mpt,[l("tr",null,[Dpt,l("td",null,[l("div",kpt,[U(l("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[280]||(e[280]=_=>r.configFile.auto_speak=_),onChange:e[281]||(e[281]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_speak]])])])]),l("tr",null,[Lpt,l("td",null,[U(l("input",{id:"audio_pitch","onUpdate:modelValue":e[282]||(e[282]=_=>r.configFile.audio_pitch=_),onChange:e[283]||(e[283]=_=>i.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),[[ue,r.configFile.audio_pitch]]),U(l("input",{"onUpdate:modelValue":e[284]||(e[284]=_=>r.configFile.audio_pitch=_),onChange:e[285]||(e[285]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.audio_pitch]])])]),l("tr",null,[Ppt,l("td",null,[U(l("select",{id:"audio_out_voice","onUpdate:modelValue":e[286]||(e[286]=_=>r.configFile.audio_out_voice=_),onChange:e[287]||(e[287]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(i.audioVoices,_=>(T(),w("option",{key:_.name,value:_.name},J(_.name),9,Upt))),128))],544),[[Vt,r.configFile.audio_out_voice]])])])])]),_:1}),_e(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Fpt,[l("tr",null,[Bpt,l("td",null,[l("div",Gpt,[U(l("select",{"onUpdate:modelValue":e[288]||(e[288]=_=>r.xtts_current_language=_),onChange:e[289]||(e[289]=_=>i.settingsChanged=!0)},[(T(!0),w(Ve,null,Je(i.voice_languages,(_,E)=>(T(),w("option",{key:E,value:_},J(E),9,Vpt))),128))],544),[[Vt,r.xtts_current_language]])])])]),l("tr",null,[zpt,l("td",null,[l("div",Hpt,[U(l("select",{"onUpdate:modelValue":e[290]||(e[290]=_=>r.xtts_current_voice=_),onChange:e[291]||(e[291]=_=>i.settingsChanged=!0)},[(T(!0),w(Ve,null,Je(i.voices,_=>(T(),w("option",{key:_,value:_},J(_),9,qpt))),128))],544),[[Vt,r.xtts_current_voice]])])])]),l("tr",null,[Ypt,l("td",null,[l("div",$pt,[U(l("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[292]||(e[292]=_=>r.configFile.xtts_freq=_),onChange:e[293]||(e[293]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[ue,r.configFile.xtts_freq,void 0,{number:!0}]])])])]),l("tr",null,[Wpt,l("td",null,[l("div",Kpt,[U(l("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[294]||(e[294]=_=>r.configFile.auto_read=_),onChange:e[295]||(e[295]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_read]])])])]),l("tr",null,[jpt,l("td",null,[l("div",Qpt,[U(l("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[296]||(e[296]=_=>r.configFile.xtts_stream_chunk_size=_),onChange:e[297]||(e[297]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_stream_chunk_size]])])])]),l("tr",null,[Xpt,l("td",null,[l("div",Zpt,[U(l("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[298]||(e[298]=_=>r.configFile.xtts_temperature=_),onChange:e[299]||(e[299]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[ue,r.configFile.xtts_temperature,void 0,{number:!0}]])])])]),l("tr",null,[Jpt,l("td",null,[l("div",e_t,[U(l("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[300]||(e[300]=_=>r.configFile.xtts_length_penalty=_),onChange:e[301]||(e[301]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),l("tr",null,[t_t,l("td",null,[l("div",n_t,[U(l("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[302]||(e[302]=_=>r.configFile.xtts_repetition_penalty=_),onChange:e[303]||(e[303]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),l("tr",null,[s_t,l("td",null,[l("div",i_t,[U(l("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[304]||(e[304]=_=>r.configFile.xtts_top_k=_),onChange:e[305]||(e[305]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_top_k,void 0,{number:!0}]])])])]),l("tr",null,[r_t,l("td",null,[l("div",o_t,[U(l("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[306]||(e[306]=_=>r.configFile.xtts_top_p=_),onChange:e[307]||(e[307]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_top_p,void 0,{number:!0}]])])])]),l("tr",null,[a_t,l("td",null,[l("div",l_t,[U(l("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[308]||(e[308]=_=>r.configFile.xtts_speed=_),onChange:e[309]||(e[309]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_speed,void 0,{number:!0}]])])])]),l("tr",null,[c_t,l("td",null,[l("div",d_t,[U(l("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[310]||(e[310]=_=>r.configFile.enable_text_splitting=_),onChange:e[311]||(e[311]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_text_splitting]])])])])])]),_:1}),_e(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",u_t,[l("tr",null,[p_t,l("td",null,[l("div",__t,[U(l("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[312]||(e[312]=_=>r.configFile.openai_tts_key=_),onChange:e[313]||(e[313]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.openai_tts_key]])])])]),l("tr",null,[h_t,l("td",null,[l("div",f_t,[U(l("select",{"onUpdate:modelValue":e[314]||(e[314]=_=>r.configFile.openai_tts_model=_),onChange:e[315]||(e[315]=_=>i.settingsChanged=!0)},b_t,544),[[Vt,r.configFile.openai_tts_model]])])])]),l("tr",null,[E_t,l("td",null,[l("div",y_t,[U(l("select",{"onUpdate:modelValue":e[316]||(e[316]=_=>r.configFile.openai_tts_voice=_),onChange:e[317]||(e[317]=_=>i.settingsChanged=!0)},w_t,544),[[Vt,r.configFile.openai_tts_voice]])])])])])]),_:1}),_e(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",R_t,[l("tr",null,[A_t,l("td",null,[l("div",N_t,[U(l("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[318]||(e[318]=_=>r.configFile.elevenlabs_tts_key=_),onChange:e[319]||(e[319]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elevenlabs_tts_key]])])])]),l("tr",null,[O_t,l("td",null,[l("div",I_t,[U(l("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[320]||(e[320]=_=>r.configFile.elevenlabs_tts_model_id=_),onChange:e[321]||(e[321]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elevenlabs_tts_model_id]])])])]),l("tr",null,[M_t,l("td",null,[l("div",D_t,[U(l("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[322]||(e[322]=_=>r.configFile.elevenlabs_tts_voice_stability=_),onChange:e[323]||(e[323]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[ue,r.configFile.elevenlabs_tts_voice_stability]])])])]),l("tr",null,[k_t,l("td",null,[l("div",L_t,[U(l("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[324]||(e[324]=_=>r.configFile.elevenlabs_tts_voice_boost=_),onChange:e[325]||(e[325]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[ue,r.configFile.elevenlabs_tts_voice_boost]])])])]),l("tr",null,[P_t,l("td",null,[l("div",U_t,[U(l("select",{"onUpdate:modelValue":e[326]||(e[326]=_=>r.configFile.elevenlabs_tts_voice_id=_),onChange:e[327]||(e[327]=_=>i.settingsChanged=!0)},[(T(!0),w(Ve,null,Je(i.voices,_=>(T(),w("option",{key:_.voice_id,value:_.voice_id},J(_.name),9,F_t))),128))],544),[[Vt,r.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1})]),_:1}),_e(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",B_t,[l("tr",null,[G_t,l("td",null,[l("div",V_t,[U(l("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[328]||(e[328]=_=>r.configFile.enable_sd_service=_),onChange:e[329]||(e[329]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_sd_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[330]||(e[330]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},H_t)])]),l("tr",null,[q_t,l("td",null,[l("div",Y_t,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[331]||(e[331]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[332]||(e[332]=(..._)=>r.upgradeSDService&&r.upgradeSDService(..._))},"upgrade sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[333]||(e[333]=(..._)=>r.startSDService&&r.startSDService(..._))},"start sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[334]||(e[334]=(..._)=>r.showSD&&r.showSD(..._))},"show sd ui"),$_t])]),l("td",null,[l("div",W_t,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[335]||(e[335]=(..._)=>r.reinstallSDService&&r.reinstallSDService(..._))},"install sd service")])])]),l("tr",null,[K_t,l("td",null,[l("div",j_t,[U(l("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[336]||(e[336]=_=>r.configFile.sd_base_url=_),onChange:e[337]||(e[337]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.sd_base_url]])])])])])]),_:1}),_e(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Q_t,[l("tr",null,[X_t,l("td",null,[l("div",Z_t,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[338]||(e[338]=(..._)=>r.reinstallDiffusersService&&r.reinstallDiffusersService(..._))},"install diffusers service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[339]||(e[339]=(..._)=>r.upgradeDiffusersService&&r.upgradeDiffusersService(..._))},"upgrade diffusers service"),J_t])])]),l("tr",null,[eht,l("td",null,[l("div",tht,[U(l("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[340]||(e[340]=_=>r.configFile.diffusers_model=_),onChange:e[341]||(e[341]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.diffusers_model]])])]),nht])])]),_:1}),_e(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",sht,[l("tr",null,[iht,l("td",null,[l("div",rht,[U(l("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[342]||(e[342]=_=>r.configFile.midjourney_key=_),onChange:e[343]||(e[343]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_key]])])])]),l("tr",null,[oht,l("td",null,[l("div",aht,[U(l("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[344]||(e[344]=_=>r.configFile.midjourney_timeout=_),onChange:e[345]||(e[345]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_timeout]])])])]),l("tr",null,[lht,l("td",null,[l("div",cht,[U(l("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[346]||(e[346]=_=>r.configFile.midjourney_retries=_),onChange:e[347]||(e[347]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_retries]])])])])])]),_:1}),_e(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",dht,[l("tr",null,[uht,l("td",null,[l("div",pht,[U(l("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[348]||(e[348]=_=>r.configFile.dall_e_key=_),onChange:e[349]||(e[349]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.dall_e_key]])])])]),l("tr",null,[_ht,l("td",null,[l("div",hht,[U(l("select",{"onUpdate:modelValue":e[350]||(e[350]=_=>r.configFile.dall_e_generation_engine=_),onChange:e[351]||(e[351]=_=>i.settingsChanged=!0)},ght,544),[[Vt,r.configFile.dall_e_generation_engine]])])])])])]),_:1}),_e(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",bht,[l("tr",null,[Eht,l("td",null,[l("div",yht,[U(l("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[352]||(e[352]=_=>r.configFile.enable_comfyui_service=_),onChange:e[353]||(e[353]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_comfyui_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[354]||(e[354]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Sht)])]),l("tr",null,[Tht,l("td",null,[l("div",xht,[U(l("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[355]||(e[355]=_=>r.configFile.comfyui_model=_),onChange:e[356]||(e[356]=_=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),w(Ve,null,Je(i.comfyui_models,(_,E)=>(T(),w("option",{key:_,value:_},J(_),9,Cht))),128))],544),[[Vt,r.configFile.comfyui_model]])])])]),l("tr",null,[wht,l("td",null,[l("div",Rht,[U(l("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[357]||(e[357]=_=>r.configFile.comfyui_model=_),onChange:e[358]||(e[358]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.comfyui_model]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[359]||(e[359]=_=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},Nht)])]),l("tr",null,[Oht,l("td",null,[l("div",Iht,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[360]||(e[360]=(..._)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(..._))},"install comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[361]||(e[361]=(..._)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(..._))},"upgrade comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[362]||(e[362]=(..._)=>r.startComfyUIService&&r.startComfyUIService(..._))},"start comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[363]||(e[363]=(..._)=>r.showComfyui&&r.showComfyui(..._))},"show comfyui"),Mht])])]),l("tr",null,[Dht,l("td",null,[l("div",kht,[U(l("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[364]||(e[364]=_=>r.configFile.comfyui_base_url=_),onChange:e[365]||(e[365]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),_e(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Lht,[l("tr",null,[Pht,l("td",null,[l("div",Uht,[U(l("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[366]||(e[366]=_=>r.configFile.enable_ollama_service=_),onChange:e[367]||(e[367]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_ollama_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[368]||(e[368]=_=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},Mht)])]),l("tr",null,[Dht,l("td",null,[l("div",kht,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[367]||(e[367]=(..._)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(..._))},"install ollama service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[368]||(e[368]=(..._)=>r.startollamaService&&r.startollamaService(..._))},"start ollama service")])])]),l("tr",null,[Lht,l("td",null,[l("div",Pht,[U(l("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[369]||(e[369]=_=>r.configFile.ollama_base_url=_),onChange:e[370]||(e[370]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.ollama_base_url]])])])])])]),_:1}),_e(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Uht,[l("tr",null,[Fht,l("td",null,[l("div",Bht,[U(l("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[371]||(e[371]=_=>r.configFile.enable_vllm_service=_),onChange:e[372]||(e[372]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_vllm_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[373]||(e[373]=_=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. +Here is how you can do that`))},Bht)])]),l("tr",null,[Ght,l("td",null,[l("div",Vht,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[369]||(e[369]=(..._)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(..._))},"install ollama service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[370]||(e[370]=(..._)=>r.startollamaService&&r.startollamaService(..._))},"start ollama service")])])]),l("tr",null,[zht,l("td",null,[l("div",Hht,[U(l("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[371]||(e[371]=_=>r.configFile.ollama_base_url=_),onChange:e[372]||(e[372]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.ollama_base_url]])])])])])]),_:1}),_e(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",qht,[l("tr",null,[Yht,l("td",null,[l("div",$ht,[U(l("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[373]||(e[373]=_=>r.configFile.enable_vllm_service=_),onChange:e[374]||(e[374]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_vllm_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[375]||(e[375]=_=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},Vht)])]),l("tr",null,[zht,l("td",null,[l("div",Hht,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[374]||(e[374]=(..._)=>r.reinstallvLLMService&&r.reinstallvLLMService(..._))},"install vLLM service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[375]||(e[375]=(..._)=>r.startvLLMService&&r.startvLLMService(..._))},"start vllm service")])])]),l("tr",null,[qht,l("td",null,[l("div",Yht,[U(l("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[376]||(e[376]=_=>r.configFile.vllm_url=_),onChange:e[377]||(e[377]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_url]])])])]),l("tr",null,[$ht,l("td",null,[l("div",Wht,[l("div",Kht,[jht,l("p",Qht,[U(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[378]||(e[378]=_=>r.configFile.vllm_gpu_memory_utilization=_),onChange:e[379]||(e[379]=_=>i.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),[[ue,r.configFile.vllm_gpu_memory_utilization]])])]),U(l("input",{id:"vllm_gpu_memory_utilization",onChange:e[380]||(e[380]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[381]||(e[381]=_=>r.configFile.vllm_gpu_memory_utilization=_),min:"0.10",max:"1",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),[[ue,r.configFile.vllm_gpu_memory_utilization]])])])]),l("tr",null,[Xht,l("td",null,[l("div",Zht,[U(l("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[382]||(e[382]=_=>r.configFile.vllm_max_num_seqs=_),onChange:e[383]||(e[383]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_max_num_seqs]])])])]),l("tr",null,[Jht,l("td",null,[l("div",eft,[U(l("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[384]||(e[384]=_=>r.configFile.vllm_max_model_len=_),onChange:e[385]||(e[385]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_max_model_len]])])])]),l("tr",null,[tft,l("td",null,[l("div",nft,[U(l("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[386]||(e[386]=_=>r.configFile.vllm_model_path=_),onChange:e[387]||(e[387]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_model_path]])])])])])]),_:1}),_e(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",sft,[l("tr",null,[ift,l("td",null,[l("div",rft,[U(l("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[388]||(e[388]=_=>r.configFile.enable_petals_service=_),onChange:e[389]||(e[389]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_petals_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[390]||(e[390]=_=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. +Here is how you can do that`))},Kht)])]),l("tr",null,[jht,l("td",null,[l("div",Qht,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[376]||(e[376]=(..._)=>r.reinstallvLLMService&&r.reinstallvLLMService(..._))},"install vLLM service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[377]||(e[377]=(..._)=>r.startvLLMService&&r.startvLLMService(..._))},"start vllm service")])])]),l("tr",null,[Xht,l("td",null,[l("div",Zht,[U(l("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[378]||(e[378]=_=>r.configFile.vllm_url=_),onChange:e[379]||(e[379]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_url]])])])]),l("tr",null,[Jht,l("td",null,[l("div",eft,[l("div",tft,[nft,l("p",sft,[U(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[380]||(e[380]=_=>r.configFile.vllm_gpu_memory_utilization=_),onChange:e[381]||(e[381]=_=>i.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),[[ue,r.configFile.vllm_gpu_memory_utilization]])])]),U(l("input",{id:"vllm_gpu_memory_utilization",onChange:e[382]||(e[382]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[383]||(e[383]=_=>r.configFile.vllm_gpu_memory_utilization=_),min:"0.10",max:"1",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),[[ue,r.configFile.vllm_gpu_memory_utilization]])])])]),l("tr",null,[ift,l("td",null,[l("div",rft,[U(l("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[384]||(e[384]=_=>r.configFile.vllm_max_num_seqs=_),onChange:e[385]||(e[385]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_max_num_seqs]])])])]),l("tr",null,[oft,l("td",null,[l("div",aft,[U(l("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[386]||(e[386]=_=>r.configFile.vllm_max_model_len=_),onChange:e[387]||(e[387]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_max_model_len]])])])]),l("tr",null,[lft,l("td",null,[l("div",cft,[U(l("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[388]||(e[388]=_=>r.configFile.vllm_model_path=_),onChange:e[389]||(e[389]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_model_path]])])])])])]),_:1}),_e(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",dft,[l("tr",null,[uft,l("td",null,[l("div",pft,[U(l("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[390]||(e[390]=_=>r.configFile.enable_petals_service=_),onChange:e[391]||(e[391]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_petals_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[392]||(e[392]=_=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},aft)])]),l("tr",null,[lft,l("td",null,[l("div",cft,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[391]||(e[391]=(..._)=>r.reinstallPetalsService&&r.reinstallPetalsService(..._))},"install petals service")])])]),l("tr",null,[dft,l("td",null,[l("div",uft,[U(l("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[392]||(e[392]=_=>r.configFile.petals_base_url=_),onChange:e[393]||(e[393]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),_e(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Motion Ctrl service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",pft,[l("tr",null,[_ft,l("td",null,[l("div",hft,[U(l("input",{type:"checkbox",id:"enable_motion_ctrl_service",required:"","onUpdate:modelValue":e[394]||(e[394]=_=>r.configFile.enable_motion_ctrl_service=_),onChange:e[395]||(e[395]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_motion_ctrl_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[396]||(e[396]=_=>this.$store.state.messageBox.showMessage("Activates Motion ctrl service. The service will be automatically loaded at startup alowing you to use the motoin control endpoint to generate videos"))},mft)])]),l("tr",null,[gft,l("td",null,[l("div",bft,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[397]||(e[397]=(..._)=>r.reinstallMotionCtrlService&&r.reinstallMotionCtrlService(..._))},"install Motion Ctrl service")])])]),l("tr",null,[Eft,l("td",null,[l("div",yft,[U(l("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[398]||(e[398]=_=>r.configFile.sd_base_url=_),onChange:e[399]||(e[399]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.sd_base_url]])])])])])]),_:1}),_e(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",vft,[l("tr",null,[Sft,l("td",null,[l("div",Tft,[U(l("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[400]||(e[400]=_=>r.configFile.elastic_search_service=_),onChange:e[401]||(e[401]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.elastic_search_service]])])])]),l("tr",null,[xft,l("td",null,[l("div",Cft,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[402]||(e[402]=(..._)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(..._))},"install ElasticSearch service")])])]),l("tr",null,[wft,l("td",null,[l("div",Rft,[U(l("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[403]||(e[403]=_=>r.configFile.elastic_search_url=_),onChange:e[404]||(e[404]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),l("div",Aft,[l("div",Nft,[l("button",{onClick:e[405]||(e[405]=ae(_=>i.bzc_collapsed=!i.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,Ift,512),[[wt,i.bzc_collapsed]]),U(l("div",null,Dft,512),[[wt,!i.bzc_collapsed]]),kft,r.configFile.binding_name?G("",!0):(T(),w("div",Lft,[Pft,Xe(" No binding selected! ")])),r.configFile.binding_name?(T(),w("div",Uft,"|")):G("",!0),r.configFile.binding_name?(T(),w("div",Fft,[l("div",Bft,[l("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,Gft),l("h3",Vft,J(r.binding_name),1)])])):G("",!0)])]),l("div",{class:Ue([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(T(),w("div",zft,[l("label",Hft," Bindings: ("+J(r.bindingsZoo.length)+") ",1),l("div",{class:Ue(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.bzl_collapsed?"":"max-h-96"])},[_e(Zs,{name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(r.bindingsZoo,(_,E)=>(T(),St(c,{ref_for:!0,ref:"bindingZoo",key:"index-"+E+"-"+_.folder,binding:_,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:_.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):G("",!0),i.bzl_collapsed?(T(),w("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[406]||(e[406]=_=>i.bzl_collapsed=!i.bzl_collapsed)},Yft)):(T(),w("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[407]||(e[407]=_=>i.bzl_collapsed=!i.bzl_collapsed)},Wft))],2)]),l("div",Kft,[l("div",jft,[l("button",{onClick:e[408]||(e[408]=ae(_=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[U(l("div",null,Xft,512),[[wt,i.mzc_collapsed]]),U(l("div",null,Jft,512),[[wt,!i.mzc_collapsed]]),emt,l("div",tmt,[r.configFile.binding_name?G("",!0):(T(),w("div",nmt,[smt,Xe(" Select binding first! ")])),!r.configFile.model_name&&r.configFile.binding_name?(T(),w("div",imt,[rmt,Xe(" No model selected! ")])):G("",!0),r.configFile.model_name?(T(),w("div",omt,"|")):G("",!0),r.configFile.model_name?(T(),w("div",amt,[l("div",lmt,[l("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,cmt),l("h3",dmt,J(r.configFile.model_name),1)])])):G("",!0)])])]),l("div",{class:Ue([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",umt,[l("div",pmt,[l("div",_mt,[i.searchModelInProgress?(T(),w("div",hmt,mmt)):G("",!0),i.searchModelInProgress?G("",!0):(T(),w("div",gmt,Emt))]),U(l("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[409]||(e[409]=_=>i.searchModel=_),onKeyup:e[410]||(e[410]=ti((..._)=>r.searchModel_func&&r.searchModel_func(..._),["enter"]))},null,544),[[ue,i.searchModel]]),i.searchModel?(T(),w("button",{key:0,onClick:e[411]||(e[411]=ae(_=>i.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")):G("",!0)])]),l("div",null,[U(l("input",{"onUpdate:modelValue":e[412]||(e[412]=_=>i.show_only_installed_models=_),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[Ye,i.show_only_installed_models]]),ymt]),l("div",null,[_e(u,{radioOptions:i.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),vmt,i.is_loading_zoo?(T(),w("div",Smt,Cmt)):G("",!0),i.models_zoo&&i.models_zoo.length>0?(T(),w("div",wmt,[l("label",Rmt," Models: ("+J(i.models_zoo.length)+") ",1),l("div",{class:Ue(["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",i.mzl_collapsed?"":"max-h-96"])},[_e(Zs,{name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(r.rendered_models_zoo,(_,E)=>(T(),St(d,{ref_for:!0,ref:"modelZoo",key:"index-"+E+"-"+_.name,model:_,"is-installed":_.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:_.name===r.configFile.model_name,model_type:_.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),l("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[413]||(e[413]=(..._)=>r.load_more_models&&r.load_more_models(..._))},"Load more models",512)]),_:1})],2)])):G("",!0),i.mzl_collapsed?(T(),w("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[414]||(e[414]=(..._)=>r.open_mzl&&r.open_mzl(..._))},Nmt)):(T(),w("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[415]||(e[415]=(..._)=>r.open_mzl&&r.open_mzl(..._))},Imt)),l("div",Mmt,[l("div",Dmt,[l("div",null,[l("div",kmt,[Lmt,U(l("input",{type:"text","onUpdate:modelValue":e[416]||(e[416]=_=>i.reference_path=_),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),[[ue,i.reference_path]])]),l("button",{type:"button",onClick:e[417]||(e[417]=ae(_=>r.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")]),i.modelDownlaodInProgress?G("",!0):(T(),w("div",Pmt,[l("div",Umt,[Fmt,U(l("input",{type:"text","onUpdate:modelValue":e[418]||(e[418]=_=>i.addModel.url=_),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),[[ue,i.addModel.url]])]),l("button",{type:"button",onClick:e[419]||(e[419]=ae(_=>r.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")])),i.modelDownlaodInProgress?(T(),w("div",Bmt,[Gmt,l("div",Vmt,[l("div",zmt,[l("div",Hmt,[qmt,l("span",Ymt,J(Math.floor(i.addModel.progress))+"%",1)]),l("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},J(i.addModel.url),9,$mt),l("div",Wmt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t({width:i.addModel.progress+"%"})},null,4)]),l("div",Kmt,[l("span",jmt,"Download speed: "+J(r.speed_computed)+"/s",1),l("span",Qmt,J(r.downloaded_size_computed)+"/"+J(r.total_size_computed),1)])])]),l("div",Xmt,[l("div",Zmt,[l("div",Jmt,[l("button",{onClick:e[420]||(e[420]=ae((..._)=>r.onCancelInstall&&r.onCancelInstall(..._),["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 ")])])])])):G("",!0)])])],2)]),l("div",egt,[l("div",tgt,[l("button",{onClick:e[423]||(e[423]=ae(_=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[U(l("div",null,sgt,512),[[wt,i.pzc_collapsed]]),U(l("div",null,rgt,512),[[wt,!i.pzc_collapsed]]),ogt,r.configFile.personalities?(T(),w("div",agt,"|")):G("",!0),l("div",lgt,J(r.active_pesonality),1),r.configFile.personalities?(T(),w("div",cgt,"|")):G("",!0),r.configFile.personalities?(T(),w("div",dgt,[r.mountedPersArr.length>0?(T(),w("div",ugt,[(T(!0),w(Ve,null,Je(r.mountedPersArr,(_,E)=>(T(),w("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+_.name,ref_for:!0,ref:"mountedPersonalities"},[l("div",pgt,[l("button",{onClick:ae(b=>r.onPersonalitySelected(_),["stop"])},[l("img",{src:i.bUrl+_.avatar,onError:e[421]||(e[421]=(...b)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...b)),class:Ue(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(_.full_path)?"border-secondary":"border-transparent z-0"]),title:_.name},null,42,hgt)],8,_gt),l("button",{onClick:ae(b=>r.unmountPersonality(_),["stop"])},ggt,8,fgt)])]))),128))])):G("",!0)])):G("",!0),l("button",{onClick:e[422]||(e[422]=ae(_=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},Egt)])]),l("div",{class:Ue([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",ygt,[vgt,l("div",Sgt,[l("div",Tgt,[i.searchPersonalityInProgress?(T(),w("div",xgt,wgt)):G("",!0),i.searchPersonalityInProgress?G("",!0):(T(),w("div",Rgt,Ngt))]),U(l("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[424]||(e[424]=_=>i.searchPersonality=_),onKeyup:e[425]||(e[425]=ae((..._)=>r.searchPersonality_func&&r.searchPersonality_func(..._),["stop"]))},null,544),[[ue,i.searchPersonality]]),i.searchPersonality?(T(),w("button",{key:0,onClick:e[426]||(e[426]=ae(_=>i.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")):G("",!0)])]),i.searchPersonality?G("",!0):(T(),w("div",Ogt,[l("label",Igt," Personalities Category: ("+J(i.persCatgArr.length)+") ",1),l("select",{id:"persCat",onChange:e[427]||(e[427]=_=>r.update_personality_category(_.target.value,r.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"},[(T(!0),w(Ve,null,Je(i.persCatgArr,(_,E)=>(T(),w("option",{key:E,selected:_==this.configFile.personality_category},J(_),9,Mgt))),128))],32)])),l("div",null,[i.personalitiesFiltered.length>0?(T(),w("div",Dgt,[l("label",kgt,J(i.searchPersonality?"Search results":"Personalities")+": ("+J(i.personalitiesFiltered.length)+") ",1),l("div",{class:Ue(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.pzl_collapsed?"":"max-h-96"])},[_e(Zs,{name:"bounce"},{default:He(()=>[(T(!0),w(Ve,null,Je(i.personalitiesFiltered,(_,E)=>(T(),St(h,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+E+"-"+_.name,personality:_,select_language:!0,full_path:_.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(b=>b===_.full_path||b===_.full_path+":"+_.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})],2)])):G("",!0)]),i.pzl_collapsed?(T(),w("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[428]||(e[428]=_=>i.pzl_collapsed=!i.pzl_collapsed)},Pgt)):(T(),w("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[429]||(e[429]=_=>i.pzl_collapsed=!i.pzl_collapsed)},Fgt))],2)]),l("div",Bgt,[l("div",Ggt,[l("button",{onClick:e[430]||(e[430]=ae(_=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[U(l("div",null,zgt,512),[[wt,i.mc_collapsed]]),U(l("div",null,qgt,512),[[wt,!i.mc_collapsed]]),Ygt])]),l("div",{class:Ue([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[l("div",$gt,[l("div",Wgt,[U(l("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[431]||(e[431]=ae(()=>{},["stop"])),"onUpdate:modelValue":e[432]||(e[432]=_=>r.configFile.override_personality_model_parameters=_),onChange:e[433]||(e[433]=_=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[Ye,r.configFile.override_personality_model_parameters]]),Kgt])]),l("div",{class:Ue(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[l("div",jgt,[Qgt,U(l("input",{type:"text",id:"seed","onUpdate:modelValue":e[434]||(e[434]=_=>r.configFile.seed=_),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),[[ue,r.configFile.seed]])]),l("div",Xgt,[l("div",Zgt,[l("div",Jgt,[ebt,l("p",tbt,[U(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[435]||(e[435]=_=>r.configFile.temperature=_),onChange:e[436]||(e[436]=_=>i.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),[[ue,r.configFile.temperature]])])]),U(l("input",{id:"temperature",onChange:e[437]||(e[437]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[438]||(e[438]=_=>r.configFile.temperature=_),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),[[ue,r.configFile.temperature]])])]),l("div",nbt,[l("div",sbt,[l("div",ibt,[rbt,l("p",obt,[U(l("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[439]||(e[439]=_=>r.configFile.n_predict=_),onChange:e[440]||(e[440]=_=>i.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),[[ue,r.configFile.n_predict]])])]),U(l("input",{id:"predict",type:"range",onChange:e[441]||(e[441]=_=>i.settingsChanged=!0),"onUpdate:modelValue":e[442]||(e[442]=_=>r.configFile.n_predict=_),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),[[ue,r.configFile.n_predict]])])]),l("div",abt,[l("div",lbt,[l("div",cbt,[dbt,l("p",ubt,[U(l("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[443]||(e[443]=_=>r.configFile.top_k=_),onChange:e[444]||(e[444]=_=>i.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),[[ue,r.configFile.top_k]])])]),U(l("input",{id:"top_k",type:"range",onChange:e[445]||(e[445]=_=>i.settingsChanged=!0),"onUpdate:modelValue":e[446]||(e[446]=_=>r.configFile.top_k=_),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),[[ue,r.configFile.top_k]])])]),l("div",pbt,[l("div",_bt,[l("div",hbt,[fbt,l("p",mbt,[U(l("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[447]||(e[447]=_=>r.configFile.top_p=_),onChange:e[448]||(e[448]=_=>i.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),[[ue,r.configFile.top_p]])])]),U(l("input",{id:"top_p",type:"range","onUpdate:modelValue":e[449]||(e[449]=_=>r.configFile.top_p=_),min:"0",max:"1",step:"0.01",onChange:e[450]||(e[450]=_=>i.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),[[ue,r.configFile.top_p]])])]),l("div",gbt,[l("div",bbt,[l("div",Ebt,[ybt,l("p",vbt,[U(l("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[451]||(e[451]=_=>r.configFile.repeat_penalty=_),onChange:e[452]||(e[452]=_=>i.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),[[ue,r.configFile.repeat_penalty]])])]),U(l("input",{id:"repeat_penalty",onChange:e[453]||(e[453]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[454]||(e[454]=_=>r.configFile.repeat_penalty=_),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),[[ue,r.configFile.repeat_penalty]])])]),l("div",Sbt,[l("div",Tbt,[l("div",xbt,[Cbt,l("p",wbt,[U(l("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[455]||(e[455]=_=>r.configFile.repeat_last_n=_),onChange:e[456]||(e[456]=_=>i.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),[[ue,r.configFile.repeat_last_n]])])]),U(l("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[457]||(e[457]=_=>r.configFile.repeat_last_n=_),min:"0",max:"100",step:"1",onChange:e[458]||(e[458]=_=>i.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),[[ue,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),_e(f,{ref:"addmodeldialog"},null,512),_e(m,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const Abt=at(qit,[["render",Rbt],["__scopeId","data-v-edf01d94"]]),Nbt={components:{ClipBoardTextInput:Jb,Card:Gu},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const t={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};de.post("/start_training",t).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(t){const e=t.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(t){console.log("watching model_name",t),this.$refs.clipboardInput.inputValue=t}}},Obt={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"},Ibt={class:"mb-4"},Mbt=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),Dbt=["value"],kbt={class:"mb-4"},Lbt=l("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),Pbt={class:"mb-4"},Ubt=l("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),Fbt={class:"mb-4"},Bbt=l("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),Gbt={class:"mb-4"},Vbt=l("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),zbt={class:"mb-4"},Hbt=l("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),qbt={class:"mb-4"},Ybt=l("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),$bt=l("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),Wbt={key:1};function Kbt(t,e,n,s,i,r){const o=ct("Card"),a=ct("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(T(),w("div",Obt,[l("form",{onSubmit:e[2]||(e[2]=ae((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:""},[_e(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[_e(o,{title:"Model",class:"",isHorizontal:!1},{default:He(()=>[l("div",Ibt,[Mbt,U(l("select",{"onUpdate:modelValue":e[0]||(e[0]=c=>r.selectedModel=c),onChange:e[1]||(e[1]=(...c)=>t.setModel&&t.setModel(...c)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),w(Ve,null,Je(r.models,c=>(T(),w("option",{key:c,value:c},J(c),9,Dbt))),128))],544),[[Vt,r.selectedModel]])])]),_:1}),_e(o,{title:"Data",isHorizontal:!1},{default:He(()=>[l("div",kbt,[Lbt,_e(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),_e(o,{title:"Training",isHorizontal:!1},{default:He(()=>[l("div",Pbt,[Ubt,_e(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),l("div",Fbt,[Bbt,_e(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),l("div",Gbt,[Vbt,_e(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),l("div",zbt,[Hbt,_e(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),_e(o,{title:"Output",isHorizontal:!1},{default:He(()=>[l("div",qbt,[Ybt,_e(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),_e(o,{disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[$bt]),_:1})],32)])):(T(),w("div",Wbt,[_e(o,{title:"Info",class:"",isHorizontal:!1},{default:He(()=>[Xe(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const jbt=at(Nbt,[["render",Kbt]]),Qbt={components:{ClipBoardTextInput:Jb,Card:Gu},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(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(t){const e=t.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},Xbt={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"},Zbt={class:"mb-4"},Jbt=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),eEt={class:"mb-4"},tEt=l("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),nEt=l("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function sEt(t,e,n,s,i,r){const o=ct("ClipBoardTextInput"),a=ct("Card");return T(),w("div",Xbt,[l("form",{onSubmit:e[0]||(e[0]=ae((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:"max-w-md mx-auto"},[_e(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[_e(a,{title:"Model",class:"",isHorizontal:!1},{default:He(()=>[l("div",Zbt,[Jbt,_e(o,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),l("div",eEt,[tEt,_e(o,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),_e(a,{disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[nEt]),_:1})],32)])}const iEt=at(Qbt,[["render",sEt]]),rEt={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,Fe(()=>{Ge.replace()})},watch:{showConfirmation(){Fe(()=>{Ge.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&Fe(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&Fe(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},oEt=["id"],aEt={class:"flex flex-row items-center gap-2"},lEt={key:0},cEt={class:"flex flex-row items-center w-full"},dEt=["title"],uEt=["value"],pEt={class:"flex items-center flex-1 max-h-6"},_Et={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},hEt=l("i",{"data-feather":"x"},null,-1),fEt=[hEt],mEt=l("i",{"data-feather":"check"},null,-1),gEt=[mEt],bEt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},EEt=l("i",{"data-feather":"folder"},null,-1),yEt=[EEt],vEt=l("i",{"data-feather":"type"},null,-1),SEt=[vEt],TEt=l("i",{"data-feather":"edit-2"},null,-1),xEt=[TEt],CEt=l("i",{"data-feather":"trash"},null,-1),wEt=[CEt];function REt(t,e,n,s,i,r){return T(),w("div",{class:Ue([n.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md min-w-[23rem] max-w-[23rem]":" min-w-[23rem] max-w-[23rem]","flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"]),id:"dis-"+n.id,onClick:e[13]||(e[13]=ae(o=>r.selectEvent(),["stop"]))},[l("div",aEt,[n.isCheckbox?(T(),w("div",lEt,[U(l("input",{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[0]||(e[0]=ae(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>i.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,n.id))},null,544),[[Ye,i.checkBoxValue_local]])])):G("",!0),n.selected?(T(),w("div",{key:1,class:Ue(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):G("",!0),n.selected?G("",!0):(T(),w("div",{key:2,class:Ue(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),l("div",cEt,[i.editTitle?G("",!0):(T(),w("p",{key:0,title:n.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},J(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,dEt)),i.editTitle?(T(),w("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:n.title,required:"",onKeydown:[e[3]||(e[3]=ti(ae(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=ti(ae(o=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=ae(()=>{},["stop"]))},null,40,uEt)):G("",!0),l("div",pEt,[i.showConfirmation?(T(),w("div",_Et,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=ae(o=>r.cancel(),["stop"]))},fEt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=ae(o=>i.editTitleMode?r.editTitleEvent():i.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},gEt)])):G("",!0),i.showConfirmation?G("",!0):(T(),w("div",bEt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=ae(o=>r.openFolderEvent(),["stop"]))},yEt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=ae(o=>i.makeTitleMode=!0,["stop"]))},SEt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=ae(o=>i.editTitleMode=!0,["stop"]))},xEt),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=ae(o=>i.deleteMode=!0,["stop"]))},wEt)]))])])],10,oEt)}const nE=at(rEt,[["render",REt]]),AEt={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(t){this.prompt=t}}},NEt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},OEt={class:"bg-white p-8 rounded"},IEt={class:"text-xl font-bold mb-4"};function MEt(t,e,n,s,i,r){return T(),w("div",null,[i.show?(T(),w("div",NEt,[l("div",OEt,[l("h2",IEt,J(n.promptText),1),U(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>i.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[ue,i.inputText]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),l("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):G("",!0)])}const NN=at(AEt,[["render",MEt]]),DEt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:nE,MarkdownRenderer:Uu},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){de.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),de.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){de.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),de.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){de.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},kEt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},LEt={class:"min-w-[23rem] max-w-[23rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},PEt={class:"search p-4"},UEt={classclass:"absolute flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},FEt=l("h2",{class:"text-xl font-bold m-4"},"Titles",-1),BEt={class:"z-0 flex flex-col flex-grow overflow-y-auto 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"},GEt=l("h2",{class:"text-xl font-bold m-4"},"Content",-1);function VEt(t,e,n,s,i,r){const o=ct("Discussion"),a=ct("MarkdownRenderer");return T(),w("div",{class:Ue([{hidden:!i.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[l("div",kEt,[l("div",LEt,[l("div",PEt,[U(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=c=>i.searchQuery=c),placeholder:"Search skills",class:"border border-gray-300 rounded px-2 py-1 mr-2"},null,512),[[ue,i.searchQuery]]),l("button",{onClick:e[1]||(e[1]=(...c)=>r.searchSkills&&r.searchSkills(...c)),class:"bg-blue-500 text-white rounded px-4 py-1"},"Search")]),l("div",UEt,[FEt,i.titles.length>0?(T(),St(Zs,{key:0,name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(i.titles,c=>(T(),St(o,{key:c.id,id:c.id,title:c.title,selected:r.fetchContent(c.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,onSelect:u=>r.fetchContent(c.id),onDelete:u=>r.deleteSkill(c.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):G("",!0)])]),l("div",BEt,[GEt,_e(a,{host:n.host,"markdown-text":i.content,message_id:i.id,discussion_id:i.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),l("button",{onClick:e[2]||(e[2]=(...c)=>r.closeComponent&&r.closeComponent(...c)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const ON=at(DEt,[["render",VEt]]),zEt={props:{htmlContent:{type:String,required:!0}}},HEt=["innerHTML"];function qEt(t,e,n,s,i,r){return T(),w("div",{class:"w-full h-full overflow-y-auto 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",innerHTML:n.htmlContent},null,8,HEt)}const YEt=at(zEt,[["render",qEt]]);const $Et={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,"
"):JSON.stringify(this.jsonData,null," ").replace(/\n/g,"
")},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}}},WEt={key:0},KEt={class:"toggle-icon mr-1"},jEt={key:0,class:"fas fa-plus-circle text-gray-600"},QEt={key:1,class:"fas fa-minus-circle text-gray-600"},XEt={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},ZEt={key:0,class:"fas fa-plus-circle text-gray-600"},JEt={key:1,class:"fas fa-minus-circle text-gray-600"},eyt=["innerHTML"];function tyt(t,e,n,s,i,r){return r.isContentPresent?(T(),w("div",WEt,[l("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...o)=>r.toggleCollapsible&&r.toggleCollapsible(...o))},[l("span",KEt,[i.collapsed?(T(),w("i",jEt)):(T(),w("i",QEt))]),Xe(" "+J(n.jsonFormText),1)]),U(l("div",null,[l("div",XEt,[r.isObject?(T(),w("span",{key:0,onClick:e[1]||(e[1]=(...o)=>r.toggleCollapsed&&r.toggleCollapsed(...o)),class:"toggle-icon cursor-pointer mr-1"},[i.collapsed?(T(),w("i",ZEt)):(T(),w("i",JEt))])):G("",!0),l("pre",{innerHTML:r.formattedJson},null,8,eyt)])],512),[[wt,!i.collapsed]])])):G("",!0)}const nyt=at($Et,[["render",tyt]]),syt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0},step_type:{type:String,required:!1,default:"start_end"}}},iyt={class:"flex items-start"},ryt={class:"step flex items-center mb-4"},oyt={key:0,class:"flex items-center justify-center w-6 h-6 mr-2"},ayt={key:0},lyt=l("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),cyt=[lyt],dyt={key:1},uyt=l("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),pyt=[uyt],_yt={key:2},hyt=l("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),fyt=[hyt],myt={key:1,role:"status",class:"m-15"},gyt=l("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"},[l("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"}),l("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),byt=[gyt],Eyt={class:"text-sm ml-6"};function yyt(t,e,n,s,i,r){return T(),w("div",iyt,[l("div",ryt,[n.step_type=="start_end"?(T(),w("div",oyt,[n.done?G("",!0):(T(),w("div",ayt,cyt)),n.done&&n.status?(T(),w("div",dyt,pyt)):G("",!0),n.done&&!n.status?(T(),w("div",_yt,fyt)):G("",!0)])):G("",!0),n.done?G("",!0):(T(),w("div",myt,byt)),l("h3",Eyt,J(n.message),1)])])}const vyt=at(syt,[["render",yyt]]),Syt="/assets/process-61f7a21b.svg",Tyt="/assets/ok-a0b56451.svg",xyt="/assets/failed-183609e7.svg",IN="/assets/send_globe-321ebb96.svg";const Cyt="/",wyt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:Uu,Step:vyt,RenderHTMLJS:YEt,JsonViewer:nyt,DynamicUIRenderer:AN},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:SN,html5_block:TN,LaTeX_block:xN,json_block:vN,javascript_block:yN,process_svg:Syt,ok_svg:Tyt,failed_svg:xyt,loading_svg:wN,sendGlobe:IN,code_block:bN,python_block:EN,bash_block:CN,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Fe(()=>{Ge.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const s=Math.floor(n/(1e3*60*60));n-=s*(1e3*60*60);const i=Math.floor(n/(1e3*60));n-=i*(1e3*60);const r=Math.floor(n/1e3);return n-=r*1e3,[s,i,r]},insertTab(t){const e=t.target,n=e.selectionStart,s=e.selectionEnd,i=t.shiftKey;if(n===s)if(i){if(e.value.substring(n-4,n)==" "){const r=e.value.substring(0,n-4),o=e.value.substring(s),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const r=e.value.substring(0,n),o=e.value.substring(s),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const o=e.value.substring(n,s).split(` +Here is how you can do that`))},hft)])]),l("tr",null,[fft,l("td",null,[l("div",mft,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[393]||(e[393]=(..._)=>r.reinstallPetalsService&&r.reinstallPetalsService(..._))},"install petals service")])])]),l("tr",null,[gft,l("td",null,[l("div",bft,[U(l("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[394]||(e[394]=_=>r.configFile.petals_base_url=_),onChange:e[395]||(e[395]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),_e(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[_e(a,{title:"Motion Ctrl service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Eft,[l("tr",null,[yft,l("td",null,[l("div",vft,[U(l("input",{type:"checkbox",id:"enable_motion_ctrl_service",required:"","onUpdate:modelValue":e[396]||(e[396]=_=>r.configFile.enable_motion_ctrl_service=_),onChange:e[397]||(e[397]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_motion_ctrl_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[398]||(e[398]=_=>this.$store.state.messageBox.showMessage("Activates Motion ctrl service. The service will be automatically loaded at startup alowing you to use the motoin control endpoint to generate videos"))},Tft)])]),l("tr",null,[xft,l("td",null,[l("div",Cft,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[399]||(e[399]=(..._)=>r.reinstallMotionCtrlService&&r.reinstallMotionCtrlService(..._))},"install Motion Ctrl service")])])]),l("tr",null,[wft,l("td",null,[l("div",Rft,[U(l("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[400]||(e[400]=_=>r.configFile.sd_base_url=_),onChange:e[401]||(e[401]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.sd_base_url]])])])])])]),_:1}),_e(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[l("table",Aft,[l("tr",null,[Nft,l("td",null,[l("div",Oft,[U(l("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[402]||(e[402]=_=>r.configFile.elastic_search_service=_),onChange:e[403]||(e[403]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.elastic_search_service]])])])]),l("tr",null,[Ift,l("td",null,[l("div",Mft,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[404]||(e[404]=(..._)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(..._))},"install ElasticSearch service")])])]),l("tr",null,[Dft,l("td",null,[l("div",kft,[U(l("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[405]||(e[405]=_=>r.configFile.elastic_search_url=_),onChange:e[406]||(e[406]=_=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),l("div",Lft,[l("div",Pft,[l("button",{onClick:e[407]||(e[407]=ae(_=>i.bzc_collapsed=!i.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[U(l("div",null,Fft,512),[[wt,i.bzc_collapsed]]),U(l("div",null,Gft,512),[[wt,!i.bzc_collapsed]]),Vft,r.configFile.binding_name?G("",!0):(T(),w("div",zft,[Hft,Xe(" No binding selected! ")])),r.configFile.binding_name?(T(),w("div",qft,"|")):G("",!0),r.configFile.binding_name?(T(),w("div",Yft,[l("div",$ft,[l("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,Wft),l("h3",Kft,J(r.binding_name),1)])])):G("",!0)])]),l("div",{class:Ue([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(T(),w("div",jft,[l("label",Qft," Bindings: ("+J(r.bindingsZoo.length)+") ",1),l("div",{class:Ue(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.bzl_collapsed?"":"max-h-96"])},[_e(Zs,{name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(r.bindingsZoo,(_,E)=>(T(),St(c,{ref_for:!0,ref:"bindingZoo",key:"index-"+E+"-"+_.folder,binding:_,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:_.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):G("",!0),i.bzl_collapsed?(T(),w("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[408]||(e[408]=_=>i.bzl_collapsed=!i.bzl_collapsed)},Zft)):(T(),w("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[409]||(e[409]=_=>i.bzl_collapsed=!i.bzl_collapsed)},emt))],2)]),l("div",tmt,[l("div",nmt,[l("button",{onClick:e[410]||(e[410]=ae(_=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[U(l("div",null,imt,512),[[wt,i.mzc_collapsed]]),U(l("div",null,omt,512),[[wt,!i.mzc_collapsed]]),amt,l("div",lmt,[r.configFile.binding_name?G("",!0):(T(),w("div",cmt,[dmt,Xe(" Select binding first! ")])),!r.configFile.model_name&&r.configFile.binding_name?(T(),w("div",umt,[pmt,Xe(" No model selected! ")])):G("",!0),r.configFile.model_name?(T(),w("div",_mt,"|")):G("",!0),r.configFile.model_name?(T(),w("div",hmt,[l("div",fmt,[l("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,mmt),l("h3",gmt,J(r.configFile.model_name),1)])])):G("",!0)])])]),l("div",{class:Ue([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",bmt,[l("div",Emt,[l("div",ymt,[i.searchModelInProgress?(T(),w("div",vmt,Tmt)):G("",!0),i.searchModelInProgress?G("",!0):(T(),w("div",xmt,wmt))]),U(l("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[411]||(e[411]=_=>i.searchModel=_),onKeyup:e[412]||(e[412]=ti((..._)=>r.searchModel_func&&r.searchModel_func(..._),["enter"]))},null,544),[[ue,i.searchModel]]),i.searchModel?(T(),w("button",{key:0,onClick:e[413]||(e[413]=ae(_=>i.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")):G("",!0)])]),l("div",null,[U(l("input",{"onUpdate:modelValue":e[414]||(e[414]=_=>i.show_only_installed_models=_),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[Ye,i.show_only_installed_models]]),Rmt]),l("div",null,[_e(u,{radioOptions:i.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),Amt,i.is_loading_zoo?(T(),w("div",Nmt,Mmt)):G("",!0),i.models_zoo&&i.models_zoo.length>0?(T(),w("div",Dmt,[l("label",kmt," Models: ("+J(i.models_zoo.length)+") ",1),l("div",{class:Ue(["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",i.mzl_collapsed?"":"max-h-96"])},[_e(Zs,{name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(r.rendered_models_zoo,(_,E)=>(T(),St(d,{ref_for:!0,ref:"modelZoo",key:"index-"+E+"-"+_.name,model:_,"is-installed":_.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:_.name===r.configFile.model_name,model_type:_.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),l("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[415]||(e[415]=(..._)=>r.load_more_models&&r.load_more_models(..._))},"Load more models",512)]),_:1})],2)])):G("",!0),i.mzl_collapsed?(T(),w("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[416]||(e[416]=(..._)=>r.open_mzl&&r.open_mzl(..._))},Pmt)):(T(),w("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[417]||(e[417]=(..._)=>r.open_mzl&&r.open_mzl(..._))},Fmt)),l("div",Bmt,[l("div",Gmt,[l("div",null,[l("div",Vmt,[zmt,U(l("input",{type:"text","onUpdate:modelValue":e[418]||(e[418]=_=>i.reference_path=_),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),[[ue,i.reference_path]])]),l("button",{type:"button",onClick:e[419]||(e[419]=ae(_=>r.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")]),i.modelDownlaodInProgress?G("",!0):(T(),w("div",Hmt,[l("div",qmt,[Ymt,U(l("input",{type:"text","onUpdate:modelValue":e[420]||(e[420]=_=>i.addModel.url=_),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),[[ue,i.addModel.url]])]),l("button",{type:"button",onClick:e[421]||(e[421]=ae(_=>r.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")])),i.modelDownlaodInProgress?(T(),w("div",$mt,[Wmt,l("div",Kmt,[l("div",jmt,[l("div",Qmt,[Xmt,l("span",Zmt,J(Math.floor(i.addModel.progress))+"%",1)]),l("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},J(i.addModel.url),9,Jmt),l("div",egt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:$t({width:i.addModel.progress+"%"})},null,4)]),l("div",tgt,[l("span",ngt,"Download speed: "+J(r.speed_computed)+"/s",1),l("span",sgt,J(r.downloaded_size_computed)+"/"+J(r.total_size_computed),1)])])]),l("div",igt,[l("div",rgt,[l("div",ogt,[l("button",{onClick:e[422]||(e[422]=ae((..._)=>r.onCancelInstall&&r.onCancelInstall(..._),["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 ")])])])])):G("",!0)])])],2)]),l("div",agt,[l("div",lgt,[l("button",{onClick:e[425]||(e[425]=ae(_=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[U(l("div",null,dgt,512),[[wt,i.pzc_collapsed]]),U(l("div",null,pgt,512),[[wt,!i.pzc_collapsed]]),_gt,r.configFile.personalities?(T(),w("div",hgt,"|")):G("",!0),l("div",fgt,J(r.active_pesonality),1),r.configFile.personalities?(T(),w("div",mgt,"|")):G("",!0),r.configFile.personalities?(T(),w("div",ggt,[r.mountedPersArr.length>0?(T(),w("div",bgt,[(T(!0),w(Ve,null,Je(r.mountedPersArr,(_,E)=>(T(),w("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+_.name,ref_for:!0,ref:"mountedPersonalities"},[l("div",Egt,[l("button",{onClick:ae(b=>r.onPersonalitySelected(_),["stop"])},[l("img",{src:i.bUrl+_.avatar,onError:e[423]||(e[423]=(...b)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...b)),class:Ue(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(_.full_path)?"border-secondary":"border-transparent z-0"]),title:_.name},null,42,vgt)],8,ygt),l("button",{onClick:ae(b=>r.unmountPersonality(_),["stop"])},xgt,8,Sgt)])]))),128))])):G("",!0)])):G("",!0),l("button",{onClick:e[424]||(e[424]=ae(_=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},wgt)])]),l("div",{class:Ue([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Rgt,[Agt,l("div",Ngt,[l("div",Ogt,[i.searchPersonalityInProgress?(T(),w("div",Igt,Dgt)):G("",!0),i.searchPersonalityInProgress?G("",!0):(T(),w("div",kgt,Pgt))]),U(l("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[426]||(e[426]=_=>i.searchPersonality=_),onKeyup:e[427]||(e[427]=ae((..._)=>r.searchPersonality_func&&r.searchPersonality_func(..._),["stop"]))},null,544),[[ue,i.searchPersonality]]),i.searchPersonality?(T(),w("button",{key:0,onClick:e[428]||(e[428]=ae(_=>i.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")):G("",!0)])]),i.searchPersonality?G("",!0):(T(),w("div",Ugt,[l("label",Fgt," Personalities Category: ("+J(i.persCatgArr.length)+") ",1),l("select",{id:"persCat",onChange:e[429]||(e[429]=_=>r.update_personality_category(_.target.value,r.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"},[(T(!0),w(Ve,null,Je(i.persCatgArr,(_,E)=>(T(),w("option",{key:E,selected:_==this.configFile.personality_category},J(_),9,Bgt))),128))],32)])),l("div",null,[i.personalitiesFiltered.length>0?(T(),w("div",Ggt,[l("label",Vgt,J(i.searchPersonality?"Search results":"Personalities")+": ("+J(i.personalitiesFiltered.length)+") ",1),l("div",{class:Ue(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.pzl_collapsed?"":"max-h-96"])},[_e(Zs,{name:"bounce"},{default:He(()=>[(T(!0),w(Ve,null,Je(i.personalitiesFiltered,(_,E)=>(T(),St(h,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+E+"-"+_.name,personality:_,select_language:!0,full_path:_.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(b=>b===_.full_path||b===_.full_path+":"+_.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})],2)])):G("",!0)]),i.pzl_collapsed?(T(),w("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[430]||(e[430]=_=>i.pzl_collapsed=!i.pzl_collapsed)},Hgt)):(T(),w("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[431]||(e[431]=_=>i.pzl_collapsed=!i.pzl_collapsed)},Ygt))],2)]),l("div",$gt,[l("div",Wgt,[l("button",{onClick:e[432]||(e[432]=ae(_=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[U(l("div",null,jgt,512),[[wt,i.mc_collapsed]]),U(l("div",null,Xgt,512),[[wt,!i.mc_collapsed]]),Zgt])]),l("div",{class:Ue([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[l("div",Jgt,[l("div",ebt,[U(l("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[433]||(e[433]=ae(()=>{},["stop"])),"onUpdate:modelValue":e[434]||(e[434]=_=>r.configFile.override_personality_model_parameters=_),onChange:e[435]||(e[435]=_=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[Ye,r.configFile.override_personality_model_parameters]]),tbt])]),l("div",{class:Ue(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[l("div",nbt,[sbt,U(l("input",{type:"text",id:"seed","onUpdate:modelValue":e[436]||(e[436]=_=>r.configFile.seed=_),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),[[ue,r.configFile.seed]])]),l("div",ibt,[l("div",rbt,[l("div",obt,[abt,l("p",lbt,[U(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[437]||(e[437]=_=>r.configFile.temperature=_),onChange:e[438]||(e[438]=_=>i.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),[[ue,r.configFile.temperature]])])]),U(l("input",{id:"temperature",onChange:e[439]||(e[439]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[440]||(e[440]=_=>r.configFile.temperature=_),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),[[ue,r.configFile.temperature]])])]),l("div",cbt,[l("div",dbt,[l("div",ubt,[pbt,l("p",_bt,[U(l("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[441]||(e[441]=_=>r.configFile.n_predict=_),onChange:e[442]||(e[442]=_=>i.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),[[ue,r.configFile.n_predict]])])]),U(l("input",{id:"predict",type:"range",onChange:e[443]||(e[443]=_=>i.settingsChanged=!0),"onUpdate:modelValue":e[444]||(e[444]=_=>r.configFile.n_predict=_),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),[[ue,r.configFile.n_predict]])])]),l("div",hbt,[l("div",fbt,[l("div",mbt,[gbt,l("p",bbt,[U(l("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[445]||(e[445]=_=>r.configFile.top_k=_),onChange:e[446]||(e[446]=_=>i.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),[[ue,r.configFile.top_k]])])]),U(l("input",{id:"top_k",type:"range",onChange:e[447]||(e[447]=_=>i.settingsChanged=!0),"onUpdate:modelValue":e[448]||(e[448]=_=>r.configFile.top_k=_),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),[[ue,r.configFile.top_k]])])]),l("div",Ebt,[l("div",ybt,[l("div",vbt,[Sbt,l("p",Tbt,[U(l("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[449]||(e[449]=_=>r.configFile.top_p=_),onChange:e[450]||(e[450]=_=>i.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),[[ue,r.configFile.top_p]])])]),U(l("input",{id:"top_p",type:"range","onUpdate:modelValue":e[451]||(e[451]=_=>r.configFile.top_p=_),min:"0",max:"1",step:"0.01",onChange:e[452]||(e[452]=_=>i.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),[[ue,r.configFile.top_p]])])]),l("div",xbt,[l("div",Cbt,[l("div",wbt,[Rbt,l("p",Abt,[U(l("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[453]||(e[453]=_=>r.configFile.repeat_penalty=_),onChange:e[454]||(e[454]=_=>i.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),[[ue,r.configFile.repeat_penalty]])])]),U(l("input",{id:"repeat_penalty",onChange:e[455]||(e[455]=_=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[456]||(e[456]=_=>r.configFile.repeat_penalty=_),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),[[ue,r.configFile.repeat_penalty]])])]),l("div",Nbt,[l("div",Obt,[l("div",Ibt,[Mbt,l("p",Dbt,[U(l("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[457]||(e[457]=_=>r.configFile.repeat_last_n=_),onChange:e[458]||(e[458]=_=>i.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),[[ue,r.configFile.repeat_last_n]])])]),U(l("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[459]||(e[459]=_=>r.configFile.repeat_last_n=_),min:"0",max:"100",step:"1",onChange:e[460]||(e[460]=_=>i.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),[[ue,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),_e(f,{ref:"addmodeldialog"},null,512),_e(m,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const Lbt=at(jit,[["render",kbt],["__scopeId","data-v-ef6f3916"]]),Pbt={components:{ClipBoardTextInput:Jb,Card:Gu},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const t={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};de.post("/start_training",t).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(t){const e=t.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(t){console.log("watching model_name",t),this.$refs.clipboardInput.inputValue=t}}},Ubt={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"},Fbt={class:"mb-4"},Bbt=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),Gbt=["value"],Vbt={class:"mb-4"},zbt=l("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),Hbt={class:"mb-4"},qbt=l("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),Ybt={class:"mb-4"},$bt=l("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),Wbt={class:"mb-4"},Kbt=l("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),jbt={class:"mb-4"},Qbt=l("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),Xbt={class:"mb-4"},Zbt=l("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),Jbt=l("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),eEt={key:1};function tEt(t,e,n,s,i,r){const o=ct("Card"),a=ct("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(T(),w("div",Ubt,[l("form",{onSubmit:e[2]||(e[2]=ae((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:""},[_e(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[_e(o,{title:"Model",class:"",isHorizontal:!1},{default:He(()=>[l("div",Fbt,[Bbt,U(l("select",{"onUpdate:modelValue":e[0]||(e[0]=c=>r.selectedModel=c),onChange:e[1]||(e[1]=(...c)=>t.setModel&&t.setModel(...c)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),w(Ve,null,Je(r.models,c=>(T(),w("option",{key:c,value:c},J(c),9,Gbt))),128))],544),[[Vt,r.selectedModel]])])]),_:1}),_e(o,{title:"Data",isHorizontal:!1},{default:He(()=>[l("div",Vbt,[zbt,_e(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),_e(o,{title:"Training",isHorizontal:!1},{default:He(()=>[l("div",Hbt,[qbt,_e(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),l("div",Ybt,[$bt,_e(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),l("div",Wbt,[Kbt,_e(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),l("div",jbt,[Qbt,_e(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),_e(o,{title:"Output",isHorizontal:!1},{default:He(()=>[l("div",Xbt,[Zbt,_e(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),_e(o,{disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[Jbt]),_:1})],32)])):(T(),w("div",eEt,[_e(o,{title:"Info",class:"",isHorizontal:!1},{default:He(()=>[Xe(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const nEt=at(Pbt,[["render",tEt]]),sEt={components:{ClipBoardTextInput:Jb,Card:Gu},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(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(t){const e=t.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},iEt={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"},rEt={class:"mb-4"},oEt=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),aEt={class:"mb-4"},lEt=l("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),cEt=l("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function dEt(t,e,n,s,i,r){const o=ct("ClipBoardTextInput"),a=ct("Card");return T(),w("div",iEt,[l("form",{onSubmit:e[0]||(e[0]=ae((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:"max-w-md mx-auto"},[_e(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[_e(a,{title:"Model",class:"",isHorizontal:!1},{default:He(()=>[l("div",rEt,[oEt,_e(o,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),l("div",aEt,[lEt,_e(o,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),_e(a,{disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[cEt]),_:1})],32)])}const uEt=at(sEt,[["render",dEt]]),pEt={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,Fe(()=>{Ge.replace()})},watch:{showConfirmation(){Fe(()=>{Ge.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&Fe(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&Fe(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},_Et=["id"],hEt={class:"flex flex-row items-center gap-2"},fEt={key:0},mEt={class:"flex flex-row items-center w-full"},gEt=["title"],bEt=["value"],EEt={class:"flex items-center flex-1 max-h-6"},yEt={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},vEt=l("i",{"data-feather":"x"},null,-1),SEt=[vEt],TEt=l("i",{"data-feather":"check"},null,-1),xEt=[TEt],CEt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},wEt=l("i",{"data-feather":"folder"},null,-1),REt=[wEt],AEt=l("i",{"data-feather":"type"},null,-1),NEt=[AEt],OEt=l("i",{"data-feather":"edit-2"},null,-1),IEt=[OEt],MEt=l("i",{"data-feather":"trash"},null,-1),DEt=[MEt];function kEt(t,e,n,s,i,r){return T(),w("div",{class:Ue([n.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md min-w-[23rem] max-w-[23rem]":" min-w-[23rem] max-w-[23rem]","flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"]),id:"dis-"+n.id,onClick:e[13]||(e[13]=ae(o=>r.selectEvent(),["stop"]))},[l("div",hEt,[n.isCheckbox?(T(),w("div",fEt,[U(l("input",{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[0]||(e[0]=ae(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>i.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,n.id))},null,544),[[Ye,i.checkBoxValue_local]])])):G("",!0),n.selected?(T(),w("div",{key:1,class:Ue(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):G("",!0),n.selected?G("",!0):(T(),w("div",{key:2,class:Ue(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),l("div",mEt,[i.editTitle?G("",!0):(T(),w("p",{key:0,title:n.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},J(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,gEt)),i.editTitle?(T(),w("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:n.title,required:"",onKeydown:[e[3]||(e[3]=ti(ae(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=ti(ae(o=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=ae(()=>{},["stop"]))},null,40,bEt)):G("",!0),l("div",EEt,[i.showConfirmation?(T(),w("div",yEt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=ae(o=>r.cancel(),["stop"]))},SEt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=ae(o=>i.editTitleMode?r.editTitleEvent():i.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},xEt)])):G("",!0),i.showConfirmation?G("",!0):(T(),w("div",CEt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=ae(o=>r.openFolderEvent(),["stop"]))},REt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=ae(o=>i.makeTitleMode=!0,["stop"]))},NEt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=ae(o=>i.editTitleMode=!0,["stop"]))},IEt),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=ae(o=>i.deleteMode=!0,["stop"]))},DEt)]))])])],10,_Et)}const nE=at(pEt,[["render",kEt]]),LEt={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(t){this.prompt=t}}},PEt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},UEt={class:"bg-white p-8 rounded"},FEt={class:"text-xl font-bold mb-4"};function BEt(t,e,n,s,i,r){return T(),w("div",null,[i.show?(T(),w("div",PEt,[l("div",UEt,[l("h2",FEt,J(n.promptText),1),U(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>i.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[ue,i.inputText]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),l("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):G("",!0)])}const NN=at(LEt,[["render",BEt]]),GEt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:nE,MarkdownRenderer:Uu},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){de.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),de.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){de.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),de.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){de.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},VEt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},zEt={class:"min-w-[23rem] max-w-[23rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},HEt={class:"search p-4"},qEt={classclass:"absolute flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},YEt=l("h2",{class:"text-xl font-bold m-4"},"Titles",-1),$Et={class:"z-0 flex flex-col flex-grow overflow-y-auto 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"},WEt=l("h2",{class:"text-xl font-bold m-4"},"Content",-1);function KEt(t,e,n,s,i,r){const o=ct("Discussion"),a=ct("MarkdownRenderer");return T(),w("div",{class:Ue([{hidden:!i.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[l("div",VEt,[l("div",zEt,[l("div",HEt,[U(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=c=>i.searchQuery=c),placeholder:"Search skills",class:"border border-gray-300 rounded px-2 py-1 mr-2"},null,512),[[ue,i.searchQuery]]),l("button",{onClick:e[1]||(e[1]=(...c)=>r.searchSkills&&r.searchSkills(...c)),class:"bg-blue-500 text-white rounded px-4 py-1"},"Search")]),l("div",qEt,[YEt,i.titles.length>0?(T(),St(Zs,{key:0,name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(i.titles,c=>(T(),St(o,{key:c.id,id:c.id,title:c.title,selected:r.fetchContent(c.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,onSelect:u=>r.fetchContent(c.id),onDelete:u=>r.deleteSkill(c.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):G("",!0)])]),l("div",$Et,[WEt,_e(a,{host:n.host,"markdown-text":i.content,message_id:i.id,discussion_id:i.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),l("button",{onClick:e[2]||(e[2]=(...c)=>r.closeComponent&&r.closeComponent(...c)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const ON=at(GEt,[["render",KEt]]),jEt={props:{htmlContent:{type:String,required:!0}}},QEt=["innerHTML"];function XEt(t,e,n,s,i,r){return T(),w("div",{class:"w-full h-full overflow-y-auto 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",innerHTML:n.htmlContent},null,8,QEt)}const ZEt=at(jEt,[["render",XEt]]);const JEt={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,"
"):JSON.stringify(this.jsonData,null," ").replace(/\n/g,"
")},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}}},eyt={key:0},tyt={class:"toggle-icon mr-1"},nyt={key:0,class:"fas fa-plus-circle text-gray-600"},syt={key:1,class:"fas fa-minus-circle text-gray-600"},iyt={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},ryt={key:0,class:"fas fa-plus-circle text-gray-600"},oyt={key:1,class:"fas fa-minus-circle text-gray-600"},ayt=["innerHTML"];function lyt(t,e,n,s,i,r){return r.isContentPresent?(T(),w("div",eyt,[l("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...o)=>r.toggleCollapsible&&r.toggleCollapsible(...o))},[l("span",tyt,[i.collapsed?(T(),w("i",nyt)):(T(),w("i",syt))]),Xe(" "+J(n.jsonFormText),1)]),U(l("div",null,[l("div",iyt,[r.isObject?(T(),w("span",{key:0,onClick:e[1]||(e[1]=(...o)=>r.toggleCollapsed&&r.toggleCollapsed(...o)),class:"toggle-icon cursor-pointer mr-1"},[i.collapsed?(T(),w("i",ryt)):(T(),w("i",oyt))])):G("",!0),l("pre",{innerHTML:r.formattedJson},null,8,ayt)])],512),[[wt,!i.collapsed]])])):G("",!0)}const cyt=at(JEt,[["render",lyt]]),dyt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0},step_type:{type:String,required:!1,default:"start_end"}}},uyt={class:"flex items-start"},pyt={class:"step flex items-center mb-4"},_yt={key:0,class:"flex items-center justify-center w-6 h-6 mr-2"},hyt={key:0},fyt=l("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),myt=[fyt],gyt={key:1},byt=l("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),Eyt=[byt],yyt={key:2},vyt=l("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),Syt=[vyt],Tyt={key:1,role:"status",class:"m-15"},xyt=l("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"},[l("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"}),l("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),Cyt=[xyt],wyt={class:"text-sm ml-6"};function Ryt(t,e,n,s,i,r){return T(),w("div",uyt,[l("div",pyt,[n.step_type=="start_end"?(T(),w("div",_yt,[n.done?G("",!0):(T(),w("div",hyt,myt)),n.done&&n.status?(T(),w("div",gyt,Eyt)):G("",!0),n.done&&!n.status?(T(),w("div",yyt,Syt)):G("",!0)])):G("",!0),n.done?G("",!0):(T(),w("div",Tyt,Cyt)),l("h3",wyt,J(n.message),1)])])}const Ayt=at(dyt,[["render",Ryt]]),Nyt="/assets/process-61f7a21b.svg",Oyt="/assets/ok-a0b56451.svg",Iyt="/assets/failed-183609e7.svg",IN="/assets/send_globe-321ebb96.svg";const Myt="/",Dyt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:Uu,Step:Ayt,RenderHTMLJS:ZEt,JsonViewer:cyt,DynamicUIRenderer:AN},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:SN,html5_block:TN,LaTeX_block:xN,json_block:vN,javascript_block:yN,process_svg:Nyt,ok_svg:Oyt,failed_svg:Iyt,loading_svg:wN,sendGlobe:IN,code_block:bN,python_block:EN,bash_block:CN,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Fe(()=>{Ge.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const s=Math.floor(n/(1e3*60*60));n-=s*(1e3*60*60);const i=Math.floor(n/(1e3*60));n-=i*(1e3*60);const r=Math.floor(n/1e3);return n-=r*1e3,[s,i,r]},insertTab(t){const e=t.target,n=e.selectionStart,s=e.selectionEnd,i=t.shiftKey;if(n===s)if(i){if(e.value.substring(n-4,n)==" "){const r=e.value.substring(0,n-4),o=e.value.substring(s),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const r=e.value.substring(0,n),o=e.value.substring(s),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const o=e.value.substring(n,s).split(` `).map(d=>d.trim()===""?d:i?d.startsWith(" ")?d.substring(4):d:" "+d),a=e.value.substring(0,n),c=e.value.substring(s),u=a+o.join(` `)+c;this.message.content=u,this.$nextTick(()=>{e.selectionStart=n,e.selectionEnd=s+o.length*4})}t.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){this.isSynthesizingVoice?(this.isSynthesizingVoice=!1,this.$refs.audio_player.pause()):(this.isSynthesizingVoice=!0,de.post("./text2wav",{text:this.message.content}).then(t=>{this.isSynthesizingVoice=!1;let e=t.data.url;console.log(e),this.audio_url=e,this.message.metadata||(this.message.metadata=[]);let n=!1;for(let s of this.message.metadata)Object.prototype.hasOwnProperty.call(s,"audio_url")&&(s.audio_url=this.audio_url,n=!0);n||this.message.metadata.push({audio_url:this.audio_url}),this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url)}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSynthesizingVoice=!1}))},async speak(){if(this.$store.state.config.active_tts_service!="browser"&&this.$store.state.config.active_tts_service!="None")this.isSpeaking?(this.isSpeaking=!0,de.post("./stop",{text:this.message.content}).then(t=>{this.isSpeaking=!1}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSpeaking=!1})):(this.isSpeaking=!0,de.post("./text2Audio",{client_id:this.$store.state.client_id,text:this.message.content}).then(t=>{this.isSpeaking=!1}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSpeaking=!1}));else{if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let t=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(i=>i.name===this.$store.state.config.audio_out_voice)[0]);const n=i=>{let r=this.message.content.substring(i,i+e);const o=[".","!","?",` `];let a=-1;return o.forEach(c=>{const u=r.lastIndexOf(c);u>a&&(a=u)}),a==-1&&(a=r.length),console.log(a),a+i+1},s=()=>{if(this.status_message=="Done"||this.message.content.includes(".")||this.message.content.includes("?")||this.message.content.includes("!")){const i=n(t),r=this.message.content.substring(t,i);this.msg.text=r,t=i+1,this.msg.onend=o=>{t{s()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",i))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{s()},1)};console.log("Speaking chunk"),s()}},toggleModel(){this.expanded=!this.expanded},addBlock(t){let e=this.$refs.mdTextarea.selectionStart,n=this.$refs.mdTextarea.selectionEnd;e==n?speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+3+t.length):speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+t+` `+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+` -`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},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.audio_url),this.editMsgMode=!1},resendMessage(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?Cyt+this.avatar:(console.log("No avatar found"),ms)},defaultImg(t){t.target.src=ms},parseDate(t){let e=new Date(Date.parse(t)),s=Math.floor((new Date-e)/1e3);return s<=1?"just now":s<20?s+" seconds ago":s<40?"half a minute ago":s<60?"less than a minute ago":s<=90?"one minute ago":s<=3540?Math.round(s/60)+" minutes ago":s<=5400?"1 hour ago":s<=86400?Math.round(s/3600)+" hours ago":s<=129600?"1 day ago":s<604800?Math.round(s/86400)+" days ago":s<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,s=Math.floor(n/86400);if(!(isNaN(s)||s<0||s>=31))return s==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||s==1&&"Yesterday"||s<7&&s+" days ago"||s<31&&Math.ceil(s/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){this.$store.state.config.auto_speak&&(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode||this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed"),this.ui_componentKey++},showConfirmation(){Fe(()=>{Ge.replace()})},deleteMsgMode(){Fe(()=>{Ge.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,Fe(()=>{Ge.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 t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[s,i,r]=this.computeTimeDiff(t,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},warmup_duration(){const t=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let s,i,r;[s,i,r]=this.computeTimeDiff(t,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let i=e.getTime()-t.getTime();const r=Math.floor(i/1e3),o=n/r;return Math.round(o)+" t/s"}}},Ryt={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"},Ayt={class:"flex flex-row gap-2"},Nyt={class:"flex-shrink-0"},Oyt={class:"group/avatar"},Iyt=["src","data-popover-target"],Myt={class:"flex flex-col w-full flex-grow-0"},Dyt={class:"flex flex-row flex-grow items-start"},kyt={class:"flex flex-col mb-2"},Lyt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Pyt=["title"],Uyt=l("div",{class:"flex-grow"},null,-1),Fyt={class:"overflow-x-auto w-full overflow-y-auto 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"},Byt={class:"flex w-full cursor-pointer rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900 mb-3.5 max-w-full"},Gyt={class:"grid min-w-72 select-none grid-cols-[40px,1fr] items-center gap-2.5 p-2"},Vyt={class:"relative grid aspect-square place-content-center overflow-hidden rounded-lg bg-gray-300 dark:bg-gray-200"},zyt=["src"],Hyt=["src"],qyt=["src"],Yyt={class:"leading-4"},$yt=l("dd",{class:"text-sm"},"Processing infos",-1),Wyt={class:"flex items-center gap-1 truncate whitespace-nowrap text-[.82rem] text-gray-400"},Kyt={class:"content px-5 pb-5 pt-4"},jyt={class:"list-none"},Qyt=l("div",{class:"flex flex-col items-start w-full"},null,-1),Xyt={class:"flex flex-col items-start w-full overflow-y-auto 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"},Zyt={key:1},Jyt={key:2},evt=["src"],tvt={class:"flex-row justify-end mx-2"},nvt={class:"invisible group-hover:visible flex flex-row"},svt={key:0,class:"flex items-center duration-75"},ivt=l("i",{"data-feather":"x"},null,-1),rvt=[ivt],ovt=l("i",{"data-feather":"check"},null,-1),avt=[ovt],lvt=l("i",{"data-feather":"edit"},null,-1),cvt=[lvt],dvt=["src"],uvt=["src"],pvt=["src"],_vt=["src"],hvt=["src"],fvt=["src"],mvt=["src"],gvt=["src"],bvt=l("i",{"data-feather":"copy"},null,-1),Evt=[bvt],yvt=l("i",{"data-feather":"send"},null,-1),vvt=[yvt],Svt=["src"],Tvt=l("i",{"data-feather":"send"},null,-1),xvt=[Tvt],Cvt=l("i",{"data-feather":"fast-forward"},null,-1),wvt=[Cvt],Rvt={key:14,class:"flex items-center duration-75"},Avt=l("i",{"data-feather":"x"},null,-1),Nvt=[Avt],Ovt=l("i",{"data-feather":"check"},null,-1),Ivt=[Ovt],Mvt=l("i",{"data-feather":"trash"},null,-1),Dvt=[Mvt],kvt=l("i",{"data-feather":"thumbs-up"},null,-1),Lvt=[kvt],Pvt={class:"flex flex-row items-center"},Uvt=l("i",{"data-feather":"thumbs-down"},null,-1),Fvt=[Uvt],Bvt={class:"flex flex-row items-center"},Gvt=l("i",{"data-feather":"volume-2"},null,-1),Vvt=[Gvt],zvt={key:16,class:"flex flex-row items-center"},Hvt=l("i",{"data-feather":"voicemail"},null,-1),qvt=[Hvt],Yvt=["src"],$vt={class:"text-sm text-gray-400 mt-2"},Wvt={class:"flex flex-row items-center gap-2"},Kvt={key:0},jvt={class:"font-thin"},Qvt={key:1},Xvt={class:"font-thin"},Zvt={key:2},Jvt={class:"font-thin"},eSt={key:3},tSt=["title"],nSt={key:4},sSt=["title"],iSt={key:5},rSt=["title"],oSt={key:6},aSt=["title"];function lSt(t,e,n,s,i,r){var h;const o=ct("Step"),a=ct("RenderHTMLJS"),c=ct("MarkdownRenderer"),u=ct("JsonViewer"),d=ct("DynamicUIRenderer");return T(),w("div",Ryt,[l("div",Ayt,[l("div",Nyt,[l("div",Oyt,[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=f=>r.defaultImg(f)),"data-popover-target":"avatar"+n.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,Iyt)])]),l("div",Myt,[l("div",Dyt,[l("div",kyt,[l("div",Lyt,J(n.message.sender)+" ",1),n.message.created_at?(T(),w("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},J(r.created_at),9,Pyt)):G("",!0)]),Uyt]),l("div",Fyt,[U(l("details",Byt,[l("summary",Gyt,[l("div",Vyt,[n.message.status_message!="Done"&n.message.status_message!="Generation canceled"?(T(),w("img",{key:0,src:i.loading_svg,class:"w-50 h-50 absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,zyt)):G("",!0),n.message.status_message=="Generation canceled"?(T(),w("img",{key:1,src:i.failed_svg,class:"w-50 h-50 absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,Hyt)):G("",!0),n.message.status_message=="Done"?(T(),w("img",{key:2,src:i.ok_svg,class:"w-50 h-50 absolute m-2 w-6 inset-0 text-geen-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,qyt)):G("",!0)]),l("dl",Yyt,[$yt,l("dt",Wyt,J(n.message==null?"":n.message.status_message),1)])]),l("div",Kyt,[l("ol",jyt,[(T(!0),w(Ve,null,Je(n.message.steps,(f,m)=>(T(),w("div",{key:"step-"+n.message.id+"-"+m,class:"group border-l pb-6 last:!border-transparent last:pb-0 dark:border-gray-800",style:$t({backgroundColor:f.done?"transparent":"inherit"})},[_e(o,{done:f.done,message:f.message,status:f.status,step_type:f.type},null,8,["done","message","status","step_type"])],4))),128))])])],512),[[wt,n.message!=null&&n.message.steps!=null&&n.message.steps.length>0]]),Qyt,l("div",Xyt,[(T(!0),w(Ve,null,Je(n.message.html_js_s,(f,m)=>(T(),w("div",{key:"htmljs-"+n.message.id+"-"+m,class:"htmljs font-bold",style:$t({backgroundColor:t.step.done?"transparent":"inherit"})},[_e(a,{htmlContent:f},null,8,["htmlContent"])],4))),128))]),r.editMsgMode?G("",!0):(T(),St(c,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),l("div",null,[n.message.open?U((T(),w("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=ti(ae((...f)=>r.insertTab&&r.insertTab(...f),["prevent"]),["tab"])),class:"block min-h-[500px] 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,placeholder:"Enter message here...","onUpdate:modelValue":e[2]||(e[2]=f=>n.message.content=f)},`\r - `,544)),[[ue,n.message.content]]):G("",!0)]),n.message.metadata!==null?(T(),w("div",Zyt,[(T(!0),w(Ve,null,Je(((h=n.message.metadata)==null?void 0:h.filter(f=>f!=null&&f.hasOwnProperty("title")&&f.hasOwnProperty("content")))||[],(f,m)=>(T(),w("div",{key:"json-"+n.message.id+"-"+m,class:"json font-bold"},[_e(u,{jsonFormText:f.title,jsonData:f.content},null,8,["jsonFormText","jsonData"])]))),128))])):G("",!0),n.message.ui!==null?(T(),w("div",Jyt,[_e(d,{ref:"ui",class:"w-full",ui:n.message.ui},null,8,["ui"])])):G("",!0),i.audio_url!=null?(T(),w("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,evt),Xe(" Your browser does not support the audio element. ")])):G("",!0)]),l("div",tvt,[l("div",nvt,[r.editMsgMode?(T(),w("div",svt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[3]||(e[3]=ae(f=>r.editMsgMode=!1,["stop"]))},rvt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[4]||(e[4]=ae((...f)=>r.updateMessage&&r.updateMessage(...f),["stop"]))},avt)])):G("",!0),r.editMsgMode?G("",!0):(T(),w("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Edit message",onClick:e[5]||(e[5]=ae(f=>r.editMsgMode=!0,["stop"]))},cvt)),r.editMsgMode?(T(),w("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add generic block",onClick:e[6]||(e[6]=ae(f=>r.addBlock(""),["stop"]))},[l("img",{src:i.code_block,width:"25",height:"25"},null,8,dvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add python block",onClick:e[7]||(e[7]=ae(f=>r.addBlock("python"),["stop"]))},[l("img",{src:i.python_block,width:"25",height:"25"},null,8,uvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add javascript block",onClick:e[8]||(e[8]=ae(f=>r.addBlock("javascript"),["stop"]))},[l("img",{src:i.javascript_block,width:"25",height:"25"},null,8,pvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:5,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add json block",onClick:e[9]||(e[9]=ae(f=>r.addBlock("json"),["stop"]))},[l("img",{src:i.json_block,width:"25",height:"25"},null,8,_vt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:6,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add c++ block",onClick:e[10]||(e[10]=ae(f=>r.addBlock("c++"),["stop"]))},[l("img",{src:i.cpp_block,width:"25",height:"25"},null,8,hvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:7,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add html block",onClick:e[11]||(e[11]=ae(f=>r.addBlock("html"),["stop"]))},[l("img",{src:i.html5_block,width:"25",height:"25"},null,8,fvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:8,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add LaTex block",onClick:e[12]||(e[12]=ae(f=>r.addBlock("latex"),["stop"]))},[l("img",{src:i.LaTeX_block,width:"25",height:"25"},null,8,mvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:9,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add bash block",onClick:e[13]||(e[13]=ae(f=>r.addBlock("bash"),["stop"]))},[l("img",{src:i.bash_block,width:"25",height:"25"},null,8,gvt)])):G("",!0),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Copy message to clipboard",onClick:e[14]||(e[14]=ae(f=>r.copyContentToClipboard(),["stop"]))},Evt),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(T(),w("div",{key:10,class:Ue(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message with full context",onClick:e[15]||(e[15]=ae(f=>r.resendMessage("full_context"),["stop"]))},vvt,2)):G("",!0),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(T(),w("div",{key:11,class:Ue(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[16]||(e[16]=ae(f=>r.resendMessage("full_context_with_internet"),["stop"]))},[l("img",{src:i.sendGlobe,width:"25",height:"25"},null,8,Svt)],2)):G("",!0),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(T(),w("div",{key:12,class:Ue(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[17]||(e[17]=ae(f=>r.resendMessage("simple_question"),["stop"]))},xvt,2)):G("",!0),!r.editMsgMode&&n.message.sender==this.$store.state.mountedPers.name?(T(),w("div",{key:13,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Resend message",onClick:e[18]||(e[18]=ae(f=>r.continueMessage(),["stop"]))},wvt)):G("",!0),i.deleteMsgMode?(T(),w("div",Rvt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[19]||(e[19]=ae(f=>i.deleteMsgMode=!1,["stop"]))},Nvt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[20]||(e[20]=ae(f=>r.deleteMsg(),["stop"]))},Ivt)])):G("",!0),!r.editMsgMode&&!i.deleteMsgMode?(T(),w("div",{key:15,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[21]||(e[21]=f=>i.deleteMsgMode=!0)},Dvt)):G("",!0),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[22]||(e[22]=ae(f=>r.rankUp(),["stop"]))},Lvt),l("div",Pvt,[l("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[23]||(e[23]=ae(f=>r.rankDown(),["stop"]))},Fvt),n.message.rank!=0?(T(),w("div",{key:0,class:Ue(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},J(n.message.rank),3)):G("",!0)]),l("div",Bvt,[this.$store.state.config.active_tts_service!="None"?(T(),w("div",{key:0,class:Ue(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[24]||(e[24]=ae(f=>r.speak(),["stop"]))},Vvt,2)):G("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(T(),w("div",zvt,[i.isSynthesizingVoice?(T(),w("img",{key:1,src:i.loading_svg},null,8,Yvt)):(T(),w("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"generate_audio",onClick:e[25]||(e[25]=ae(f=>r.read(),["stop"]))},qvt))])):G("",!0)])]),l("div",$vt,[l("div",Wvt,[n.message.binding?(T(),w("p",Kvt,[Xe("Binding: "),l("span",jvt,J(n.message.binding),1)])):G("",!0),n.message.model?(T(),w("p",Qvt,[Xe("Model: "),l("span",Xvt,J(n.message.model),1)])):G("",!0),n.message.seed?(T(),w("p",Zvt,[Xe("Seed: "),l("span",Jvt,J(n.message.seed),1)])):G("",!0),n.message.nb_tokens?(T(),w("p",eSt,[Xe("Number of tokens: "),l("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},J(n.message.nb_tokens),9,tSt)])):G("",!0),r.warmup_duration?(T(),w("p",nSt,[Xe("Warmup duration: "),l("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},J(r.warmup_duration),9,sSt)])):G("",!0),r.time_spent?(T(),w("p",iSt,[Xe("Generation duration: "),l("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},J(r.time_spent),9,rSt)])):G("",!0),r.generation_rate?(T(),w("p",oSt,[Xe("Rate: "),l("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},J(r.generation_rate),9,aSt)])):G("",!0)])])])])])}const MN=at(wyt,[["render",lSt]]),cSt="/";de.defaults.baseURL="/";const dSt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:Wl,UniversalForm:Xl},data(){return{bUrl:cSt,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(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await de.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),s={client_id:this.$store.state.client_id,id:n};e=await de.post("/select_personality",s),console.log("Generating message from ",e.data.status),qe.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await de.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{de.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 - "+t.name,"Save changes","Cancel").then(n=>{try{de.post("/set_active_personality_settings",n).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. +`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},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.audio_url),this.editMsgMode=!1},resendMessage(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?Myt+this.avatar:(console.log("No avatar found"),ms)},defaultImg(t){t.target.src=ms},parseDate(t){let e=new Date(Date.parse(t)),s=Math.floor((new Date-e)/1e3);return s<=1?"just now":s<20?s+" seconds ago":s<40?"half a minute ago":s<60?"less than a minute ago":s<=90?"one minute ago":s<=3540?Math.round(s/60)+" minutes ago":s<=5400?"1 hour ago":s<=86400?Math.round(s/3600)+" hours ago":s<=129600?"1 day ago":s<604800?Math.round(s/86400)+" days ago":s<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,s=Math.floor(n/86400);if(!(isNaN(s)||s<0||s>=31))return s==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||s==1&&"Yesterday"||s<7&&s+" days ago"||s<31&&Math.ceil(s/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){this.$store.state.config.auto_speak&&(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode||this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed"),this.ui_componentKey++},showConfirmation(){Fe(()=>{Ge.replace()})},deleteMsgMode(){Fe(()=>{Ge.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,Fe(()=>{Ge.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 t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[s,i,r]=this.computeTimeDiff(t,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},warmup_duration(){const t=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let s,i,r;[s,i,r]=this.computeTimeDiff(t,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let i=e.getTime()-t.getTime();const r=Math.floor(i/1e3),o=n/r;return Math.round(o)+" t/s"}}},kyt={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"},Lyt={class:"flex flex-row gap-2"},Pyt={class:"flex-shrink-0"},Uyt={class:"group/avatar"},Fyt=["src","data-popover-target"],Byt={class:"flex flex-col w-full flex-grow-0"},Gyt={class:"flex flex-row flex-grow items-start"},Vyt={class:"flex flex-col mb-2"},zyt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Hyt=["title"],qyt=l("div",{class:"flex-grow"},null,-1),Yyt={class:"overflow-x-auto w-full overflow-y-auto 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"},$yt={class:"flex w-full cursor-pointer rounded-xl border border-gray-200 bg-white shadow-sm dark:border-gray-800 dark:bg-gray-900 mb-3.5 max-w-full"},Wyt={class:"grid min-w-72 select-none grid-cols-[40px,1fr] items-center gap-2.5 p-2"},Kyt={class:"relative grid aspect-square place-content-center overflow-hidden rounded-lg bg-gray-300 dark:bg-gray-200"},jyt=["src"],Qyt=["src"],Xyt=["src"],Zyt={class:"leading-4"},Jyt=l("dd",{class:"text-sm"},"Processing infos",-1),evt={class:"flex items-center gap-1 truncate whitespace-nowrap text-[.82rem] text-gray-400"},tvt={class:"content px-5 pb-5 pt-4"},nvt={class:"list-none"},svt=l("div",{class:"flex flex-col items-start w-full"},null,-1),ivt={class:"flex flex-col items-start w-full overflow-y-auto 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"},rvt={key:1},ovt={key:2},avt=["src"],lvt={class:"flex-row justify-end mx-2"},cvt={class:"invisible group-hover:visible flex flex-row"},dvt={key:0,class:"flex items-center duration-75"},uvt=l("i",{"data-feather":"x"},null,-1),pvt=[uvt],_vt=l("i",{"data-feather":"check"},null,-1),hvt=[_vt],fvt=l("i",{"data-feather":"edit"},null,-1),mvt=[fvt],gvt=["src"],bvt=["src"],Evt=["src"],yvt=["src"],vvt=["src"],Svt=["src"],Tvt=["src"],xvt=["src"],Cvt=l("i",{"data-feather":"copy"},null,-1),wvt=[Cvt],Rvt=l("i",{"data-feather":"send"},null,-1),Avt=[Rvt],Nvt=["src"],Ovt=l("i",{"data-feather":"send"},null,-1),Ivt=[Ovt],Mvt=l("i",{"data-feather":"fast-forward"},null,-1),Dvt=[Mvt],kvt={key:14,class:"flex items-center duration-75"},Lvt=l("i",{"data-feather":"x"},null,-1),Pvt=[Lvt],Uvt=l("i",{"data-feather":"check"},null,-1),Fvt=[Uvt],Bvt=l("i",{"data-feather":"trash"},null,-1),Gvt=[Bvt],Vvt=l("i",{"data-feather":"thumbs-up"},null,-1),zvt=[Vvt],Hvt={class:"flex flex-row items-center"},qvt=l("i",{"data-feather":"thumbs-down"},null,-1),Yvt=[qvt],$vt={class:"flex flex-row items-center"},Wvt=l("i",{"data-feather":"volume-2"},null,-1),Kvt=[Wvt],jvt={key:16,class:"flex flex-row items-center"},Qvt=l("i",{"data-feather":"voicemail"},null,-1),Xvt=[Qvt],Zvt=["src"],Jvt={class:"text-sm text-gray-400 mt-2"},eSt={class:"flex flex-row items-center gap-2"},tSt={key:0},nSt={class:"font-thin"},sSt={key:1},iSt={class:"font-thin"},rSt={key:2},oSt={class:"font-thin"},aSt={key:3},lSt=["title"],cSt={key:4},dSt=["title"],uSt={key:5},pSt=["title"],_St={key:6},hSt=["title"];function fSt(t,e,n,s,i,r){var h;const o=ct("Step"),a=ct("RenderHTMLJS"),c=ct("MarkdownRenderer"),u=ct("JsonViewer"),d=ct("DynamicUIRenderer");return T(),w("div",kyt,[l("div",Lyt,[l("div",Pyt,[l("div",Uyt,[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=f=>r.defaultImg(f)),"data-popover-target":"avatar"+n.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,Fyt)])]),l("div",Byt,[l("div",Gyt,[l("div",Vyt,[l("div",zyt,J(n.message.sender)+" ",1),n.message.created_at?(T(),w("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},J(r.created_at),9,Hyt)):G("",!0)]),qyt]),l("div",Yyt,[U(l("details",$yt,[l("summary",Wyt,[l("div",Kyt,[n.message.status_message!="Done"&n.message.status_message!="Generation canceled"?(T(),w("img",{key:0,src:i.loading_svg,class:"w-50 h-50 absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,jyt)):G("",!0),n.message.status_message=="Generation canceled"?(T(),w("img",{key:1,src:i.failed_svg,class:"w-50 h-50 absolute inset-0 text-gray-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,Qyt)):G("",!0),n.message.status_message=="Done"?(T(),w("img",{key:2,src:i.ok_svg,class:"w-50 h-50 absolute m-2 w-6 inset-0 text-geen-100 transition-opacity dark:text-gray-800 opacity-100"},null,8,Xyt)):G("",!0)]),l("dl",Zyt,[Jyt,l("dt",evt,J(n.message==null?"":n.message.status_message),1)])]),l("div",tvt,[l("ol",nvt,[(T(!0),w(Ve,null,Je(n.message.steps,(f,m)=>(T(),w("div",{key:"step-"+n.message.id+"-"+m,class:"group border-l pb-6 last:!border-transparent last:pb-0 dark:border-gray-800",style:$t({backgroundColor:f.done?"transparent":"inherit"})},[_e(o,{done:f.done,message:f.message,status:f.status,step_type:f.type},null,8,["done","message","status","step_type"])],4))),128))])])],512),[[wt,n.message!=null&&n.message.steps!=null&&n.message.steps.length>0]]),svt,l("div",ivt,[(T(!0),w(Ve,null,Je(n.message.html_js_s,(f,m)=>(T(),w("div",{key:"htmljs-"+n.message.id+"-"+m,class:"htmljs font-bold",style:$t({backgroundColor:t.step.done?"transparent":"inherit"})},[_e(a,{htmlContent:f},null,8,["htmlContent"])],4))),128))]),r.editMsgMode?G("",!0):(T(),St(c,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),l("div",null,[n.message.open?U((T(),w("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=ti(ae((...f)=>r.insertTab&&r.insertTab(...f),["prevent"]),["tab"])),class:"block min-h-[500px] 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,placeholder:"Enter message here...","onUpdate:modelValue":e[2]||(e[2]=f=>n.message.content=f)},`\r + `,544)),[[ue,n.message.content]]):G("",!0)]),n.message.metadata!==null?(T(),w("div",rvt,[(T(!0),w(Ve,null,Je(((h=n.message.metadata)==null?void 0:h.filter(f=>f!=null&&f.hasOwnProperty("title")&&f.hasOwnProperty("content")))||[],(f,m)=>(T(),w("div",{key:"json-"+n.message.id+"-"+m,class:"json font-bold"},[_e(u,{jsonFormText:f.title,jsonData:f.content},null,8,["jsonFormText","jsonData"])]))),128))])):G("",!0),n.message.ui!==null?(T(),w("div",ovt,[_e(d,{ref:"ui",class:"w-full",ui:n.message.ui},null,8,["ui"])])):G("",!0),i.audio_url!=null?(T(),w("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,avt),Xe(" Your browser does not support the audio element. ")])):G("",!0)]),l("div",lvt,[l("div",cvt,[r.editMsgMode?(T(),w("div",dvt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2",title:"Cancel edit",type:"button",onClick:e[3]||(e[3]=ae(f=>r.editMsgMode=!1,["stop"]))},pvt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2",title:"Update message",type:"button",onClick:e[4]||(e[4]=ae((...f)=>r.updateMessage&&r.updateMessage(...f),["stop"]))},hvt)])):G("",!0),r.editMsgMode?G("",!0):(T(),w("div",{key:1,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Edit message",onClick:e[5]||(e[5]=ae(f=>r.editMsgMode=!0,["stop"]))},mvt)),r.editMsgMode?(T(),w("div",{key:2,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add generic block",onClick:e[6]||(e[6]=ae(f=>r.addBlock(""),["stop"]))},[l("img",{src:i.code_block,width:"25",height:"25"},null,8,gvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:3,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer hover:border-2",title:"Add python block",onClick:e[7]||(e[7]=ae(f=>r.addBlock("python"),["stop"]))},[l("img",{src:i.python_block,width:"25",height:"25"},null,8,bvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:4,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add javascript block",onClick:e[8]||(e[8]=ae(f=>r.addBlock("javascript"),["stop"]))},[l("img",{src:i.javascript_block,width:"25",height:"25"},null,8,Evt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:5,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add json block",onClick:e[9]||(e[9]=ae(f=>r.addBlock("json"),["stop"]))},[l("img",{src:i.json_block,width:"25",height:"25"},null,8,yvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:6,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add c++ block",onClick:e[10]||(e[10]=ae(f=>r.addBlock("c++"),["stop"]))},[l("img",{src:i.cpp_block,width:"25",height:"25"},null,8,vvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:7,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add html block",onClick:e[11]||(e[11]=ae(f=>r.addBlock("html"),["stop"]))},[l("img",{src:i.html5_block,width:"25",height:"25"},null,8,Svt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:8,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add LaTex block",onClick:e[12]||(e[12]=ae(f=>r.addBlock("latex"),["stop"]))},[l("img",{src:i.LaTeX_block,width:"25",height:"25"},null,8,Tvt)])):G("",!0),r.editMsgMode?(T(),w("div",{key:9,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Add bash block",onClick:e[13]||(e[13]=ae(f=>r.addBlock("bash"),["stop"]))},[l("img",{src:i.bash_block,width:"25",height:"25"},null,8,xvt)])):G("",!0),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Copy message to clipboard",onClick:e[14]||(e[14]=ae(f=>r.copyContentToClipboard(),["stop"]))},wvt),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(T(),w("div",{key:10,class:Ue(["text-lg text-red-500 hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message with full context",onClick:e[15]||(e[15]=ae(f=>r.resendMessage("full_context"),["stop"]))},Avt,2)):G("",!0),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(T(),w("div",{key:11,class:Ue(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[16]||(e[16]=ae(f=>r.resendMessage("full_context_with_internet"),["stop"]))},[l("img",{src:i.sendGlobe,width:"25",height:"25"},null,8,Nvt)],2)):G("",!0),!r.editMsgMode&&n.message.sender!=this.$store.state.mountedPers.name?(T(),w("div",{key:12,class:Ue(["text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",{"text-5xl":r.editMsgMode}]),title:"Resend message without the full context",onClick:e[17]||(e[17]=ae(f=>r.resendMessage("simple_question"),["stop"]))},Ivt,2)):G("",!0),!r.editMsgMode&&n.message.sender==this.$store.state.mountedPers.name?(T(),w("div",{key:13,class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Resend message",onClick:e[18]||(e[18]=ae(f=>r.continueMessage(),["stop"]))},Dvt)):G("",!0),i.deleteMsgMode?(T(),w("div",kvt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[19]||(e[19]=ae(f=>i.deleteMsgMode=!1,["stop"]))},Pvt),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[20]||(e[20]=ae(f=>r.deleteMsg(),["stop"]))},Fvt)])):G("",!0),!r.editMsgMode&&!i.deleteMsgMode?(T(),w("div",{key:15,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[21]||(e[21]=f=>i.deleteMsgMode=!0)},Gvt)):G("",!0),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[22]||(e[22]=ae(f=>r.rankUp(),["stop"]))},zvt),l("div",Hvt,[l("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[23]||(e[23]=ae(f=>r.rankDown(),["stop"]))},Yvt),n.message.rank!=0?(T(),w("div",{key:0,class:Ue(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},J(n.message.rank),3)):G("",!0)]),l("div",$vt,[this.$store.state.config.active_tts_service!="None"?(T(),w("div",{key:0,class:Ue(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[24]||(e[24]=ae(f=>r.speak(),["stop"]))},Kvt,2)):G("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(T(),w("div",jvt,[i.isSynthesizingVoice?(T(),w("img",{key:1,src:i.loading_svg},null,8,Zvt)):(T(),w("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"generate_audio",onClick:e[25]||(e[25]=ae(f=>r.read(),["stop"]))},Xvt))])):G("",!0)])]),l("div",Jvt,[l("div",eSt,[n.message.binding?(T(),w("p",tSt,[Xe("Binding: "),l("span",nSt,J(n.message.binding),1)])):G("",!0),n.message.model?(T(),w("p",sSt,[Xe("Model: "),l("span",iSt,J(n.message.model),1)])):G("",!0),n.message.seed?(T(),w("p",rSt,[Xe("Seed: "),l("span",oSt,J(n.message.seed),1)])):G("",!0),n.message.nb_tokens?(T(),w("p",aSt,[Xe("Number of tokens: "),l("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},J(n.message.nb_tokens),9,lSt)])):G("",!0),r.warmup_duration?(T(),w("p",cSt,[Xe("Warmup duration: "),l("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},J(r.warmup_duration),9,dSt)])):G("",!0),r.time_spent?(T(),w("p",uSt,[Xe("Generation duration: "),l("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},J(r.time_spent),9,pSt)])):G("",!0),r.generation_rate?(T(),w("p",_St,[Xe("Rate: "),l("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},J(r.generation_rate),9,hSt)])):G("",!0)])])])])])}const MN=at(Dyt,[["render",fSt]]),mSt="/";de.defaults.baseURL="/";const gSt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:Wl,UniversalForm:Xl},data(){return{bUrl:mSt,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(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await de.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),s={client_id:this.$store.state.client_id,id:n};e=await de.post("/select_personality",s),console.log("Generating message from ",e.data.status),qe.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await de.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{de.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 - "+t.name,"Save changes","Cancel").then(n=>{try{de.post("/set_active_personality_settings",n).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. `+s,4,!1)})}catch(s){this.$refs.toast.showToast(`Did not get Personality settings responses. - Endpoint error: `+s.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(Fe(()=>{Ge.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await de.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Vu}}},uSt={class:"w-fit flex select-none"},pSt={class:"w-fit flex select-none"},_St={class:"w-8 h-8 group relative"},hSt=["src","title"],fSt={class:"opacity-0 group-hover:opacity-100"},mSt=l("span",{title:"Remount"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-0 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("g",{id:"surface1"},[l("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1),gSt=[mSt],bSt=l("span",{title:"Talk"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),l("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1),ESt=[bSt];function ySt(t,e,n,s,i,r){const o=ct("UniversalForm");return T(),w(Ve,null,[l("div",uSt,[l("div",pSt,[l("div",_St,[l("img",{src:i.bUrl+r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 hover:scale-150 active:scale-90 hover:z-50 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+r.mountedPers.name,onClick:e[1]||(e[1]=a=>r.onSettingsPersonality(r.mountedPers))},null,40,hSt),l("div",fSt,[t.personalityHoveredIndex===t.index?(T(),w("button",{key:0,class:"z-50 -top-1 group-hover:translate-x-5 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[2]||(e[2]=ae(a=>r.remount_personality(),["prevent"]))},gSt)):G("",!0),t.personalityHoveredIndex===t.index?(T(),w("button",{key:1,class:"-top-1 group-hover:-translate-x-12 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[3]||(e[3]=ae(a=>r.handleOnTalk(),["prevent"]))},ESt)):G("",!0),l("div",{class:"top-0 group-hover:-translate-x-8 group-hover:-translate-y-8 left-0 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-500 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[4]||(e[4]=ae((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+J(r.mountedPersArr.length-1),1)])])])]),_e(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const vSt=at(dSt,[["render",ySt]]);const SSt="/";de.defaults.baseURL="/";const TSt={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:RN,Toast:Wl,UniversalForm:Xl},name:"MountedPersonalitiesList",data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},bUrl:SSt,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(t){this.$store.commit("setConfig",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async onCopyToCustom(t){await de.post("/copy_to_custom_personas",{client_id:this.$store.state.client_id,category:t.personality.category,name:t.personality.name})},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(t){try{const e=await de.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Vu},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,de.post("/reinstall_personality",{name:t.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 + Endpoint error: `+s.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(Fe(()=>{Ge.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await de.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Vu}}},bSt={class:"w-fit flex select-none"},ESt={class:"w-fit flex select-none"},ySt={class:"w-8 h-8 group relative"},vSt=["src","title"],SSt={class:"opacity-0 group-hover:opacity-100"},TSt=l("span",{title:"Remount"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-0 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("g",{id:"surface1"},[l("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1),xSt=[TSt],CSt=l("span",{title:"Talk"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),l("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1),wSt=[CSt];function RSt(t,e,n,s,i,r){const o=ct("UniversalForm");return T(),w(Ve,null,[l("div",bSt,[l("div",ESt,[l("div",ySt,[l("img",{src:i.bUrl+r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 hover:scale-150 active:scale-90 hover:z-50 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+r.mountedPers.name,onClick:e[1]||(e[1]=a=>r.onSettingsPersonality(r.mountedPers))},null,40,vSt),l("div",SSt,[t.personalityHoveredIndex===t.index?(T(),w("button",{key:0,class:"z-50 -top-1 group-hover:translate-x-5 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[2]||(e[2]=ae(a=>r.remount_personality(),["prevent"]))},xSt)):G("",!0),t.personalityHoveredIndex===t.index?(T(),w("button",{key:1,class:"-top-1 group-hover:-translate-x-12 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[3]||(e[3]=ae(a=>r.handleOnTalk(),["prevent"]))},wSt)):G("",!0),l("div",{class:"top-0 group-hover:-translate-x-8 group-hover:-translate-y-8 left-0 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-500 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",onClick:e[4]||(e[4]=ae((...a)=>r.toggleShowPersList&&r.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+J(r.mountedPersArr.length-1),1)])])])]),_e(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const ASt=at(gSt,[["render",RSt]]);const NSt="/";de.defaults.baseURL="/";const OSt={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:RN,Toast:Wl,UniversalForm:Xl},name:"MountedPersonalitiesList",data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},bUrl:NSt,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(t){this.$store.commit("setConfig",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async onCopyToCustom(t){await de.post("/copy_to_custom_personas",{client_id:this.$store.state.client_id,category:t.personality.category,name:t.personality.name})},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},toggleShowPersList(){this.onShowPersList()},async constructor(){},async api_get_req(t){try{const e=await de.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Vu},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,de.post("/reinstall_personality",{name:t.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 `+e.message,4,!1),{status:!1}))},editPersonality(t){t=t.personality,de.post("/get_personality_config",{client_id:this.$store.state.client_id,category:t.category,name:t.folder}).then(e=>{const n=e.data;console.log("Done"),n.status?(this.$store.state.currentPersonConfig=n.config,this.$store.state.showPersonalityEditor=!0,this.$store.state.personality_editor.showPanel(),this.$store.state.selectedPersonality=t):console.error(n.error)}).catch(e=>{console.error(e)})},onPersonalityMounted(t){this.mountPersonality(t)},onPersonalityUnMounted(t){this.unmountPersonality(t)},onPersonalityRemount(t){this.reMountPersonality(t)},async handleOpenFolder(t){const e={client_id:this.$store.state.client_id,personality_folder:t.personality.folder};console.log(e),await de.post("/open_personality_folder",e)},async handleOnTalk(t){if(Ge.replace(),console.log("ppa",t),t){if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality: `+t.name,4,!0))}else this.onPersonalityMounted(t);this.onTalk(t)}},async onPersonalitySelected(t){if(Ge.replace(),console.log("Selected personality : ",JSON.stringify(t.personality)),t){if(t.selected){this.$refs.toast.showToast("Personality already selected",4,!0);return}if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this.$refs.toast.showToast(`Selected personality: `+t.name,4,!0))}else this.onPersonalityMounted(t)}},onSettingsPersonality(t){try{de.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 - "+t.personality.name,"Save changes","Cancel").then(n=>{try{de.post("/set_active_personality_settings",n).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$refs.toast.showToast("Personality settings updated successfully!",4,!0)):this.$refs.toast.showToast(`Did not get Personality settings responses. @@ -174,15 +174,15 @@ If You are using windows, this will install wsl so you need to activate it. Error: `+e.error,4,!1))},async reMountPersonality(t){if(console.log("remount pers",t),!t)return;if(!this.configFile.personalities.includes(t.personality.full_path)){this.$refs.toast.showToast("Personality not mounted",4,!1);return}const e=await this.remount_personality(t.personality);console.log("remount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this.$refs.toast.showToast("Personality remounted",4,!0),t.isMounted=!0,this.onMounted(this),(await this.select_personality(t.personality)).status&&this.$refs.toast.showToast(`Selected personality: `+t.personality.name,4,!0),this.getMountedPersonalities()):(t.isMounted=!1,this.$refs.toast.showToast(`Could not mount personality Error: `+e.error,4,!1))},async unmountPersonality(t){if(!t)return;console.log(`Unmounting ${JSON.stringify(t.personality)}`);const e=await this.unmount_personality(t.personality);if(e.status){console.log("unmount response",e),this.configFile.active_personality_id=e.active_personality_id,this.configFile.personalities=e.personalities;const n=this.configFile.personalities[this.configFile.active_personality_id],s=this.personalities.findIndex(a=>a.full_path==n),i=this.$refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path),r=this.personalities[s];r.isMounted=!1,r.selected=!0,this.$refs.personalitiesZoo[i].isMounted=!1,this.getMountedPersonalities(),(await this.select_personality(r)).status&&Ge.replace(),this.$refs.toast.showToast("Personality unmounted",4,!0),this.onUnMounted(this)}else this.$refs.toast.showToast(`Could not unmount personality -Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;er.full_path==n),i=this.personalities[s];if(i)console.log("adding from config"),t.push(i);else{console.log("adding default");const r=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),o=this.personalities[r];t.push(o)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;ei.full_path==n);if(console.log("discussionPersonalities -includes",s),console.log("discussionPersonalities -mounted list",this.mountedPersArr),s==-1){const i=this.personalities.findIndex(o=>o.full_path==n),r=this.personalities[i];console.log("adding discucc121",r,n),r&&(this.mountedPersArr.push(r),console.log("adding discucc",r))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},sE=t=>(Mi("data-v-de7bc8fe"),t=t(),Di(),t),xSt={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},CSt={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},wSt=sE(()=>l("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"},[l("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"}),l("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)),RSt=sE(()=>l("span",{class:"sr-only"},"Loading...",-1)),ASt=[wSt,RSt],NSt=sE(()=>l("i",{"data-feather":"chevron-down"},null,-1)),OSt=[NSt],ISt={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},MSt={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function DSt(t,e,n,s,i,r){const o=ct("personality-entry"),a=ct("Toast"),c=ct("UniversalForm");return T(),w("div",xSt,[i.isLoading?(T(),w("div",CSt,ASt)):G("",!0),l("div",null,[r.mountedPersArr.length>0?(T(),w("div",{key:0,class:Ue(i.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[l("button",{class:"mt-0 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Close personality list",type:"button",onClick:e[0]||(e[0]=ae((...u)=>r.toggleShowPersList&&r.toggleShowPersList(...u),["stop"]))},OSt),l("label",ISt," Mounted Personalities: ("+J(r.mountedPersArr.length)+") ",1),l("div",MSt,[_e(Zs,{name:"bounce"},{default:He(()=>[(T(!0),w(Ve,null,Je(this.$store.state.mountedPersArr,(u,d)=>(T(),St(o,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+d+"-"+u.name,personality:u,full_path:u.full_path,select_language:!1,selected:r.configFile.personalities[r.configFile.active_personality_id]===u.full_path||r.configFile.personalities[r.configFile.active_personality_id]===u.full_path+":"+u.language,"on-selected":r.onPersonalitySelected,"on-mount":r.onPersonalityMounted,"on-edit":r.editPersonality,"on-un-mount":r.onPersonalityUnMounted,"on-remount":r.onPersonalityRemount,"on-settings":r.onSettingsPersonality,"on-reinstall":r.onPersonalityReinstall,"on-talk":r.handleOnTalk,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-edit","on-un-mount","on-remount","on-settings","on-reinstall","on-talk","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})])],2)):G("",!0)]),_e(a,{ref:"toast"},null,512),_e(c,{ref:"universalForm",class:"z-20"},null,512)])}const kSt=at(TSt,[["render",DSt],["__scopeId","data-v-de7bc8fe"]]);const LSt={components:{InteractiveMenu:eE},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){this.commands=this.commandsList,console.log("Commands",this.commands),document.addEventListener("click",this.handleClickOutside),Fe(()=>{Ge.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(s=>s.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=s=>{this.selectedFile=s.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};qe.on("file_received",s=>{s.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file -`+s.error,4,!1),this.loading=!1,qe.off("file_received")}),qe.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){Fe(()=>{Ge.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},PSt=t=>(Mi("data-v-1a32c141"),t=t(),Di(),t),USt={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},FSt=PSt(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),BSt=[FSt];function GSt(t,e,n,s,i,r){const o=ct("InteractiveMenu");return i.loading?(T(),w("div",USt,BSt)):(T(),St(o,{key:1,commands:n.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const VSt=at(LSt,[["render",GSt],["__scopeId","data-v-1a32c141"]]),zSt="/assets/loader_v0-16906488.svg";console.log("modelImgPlaceholder:",As);const HSt="/",qSt={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{UniversalForm:Xl,MountedPersonalities:vSt,MountedPersonalitiesList:kSt,PersonalitiesCommands:VSt},setup(){},data(){return{is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:zSt,sendGlobe:IN,modelImgPlaceholder:As,bUrl:HSt,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{isDataSourceNamesValid(){return console.log("dataSourceNames:",this.dataSourceNames),console.log("Type of dataSourceNames:",typeof this.dataSourceNames),Array.isArray(this.dataSourceNames)&&this.dataSourceNames.length>0},dataSourceNames(){console.log("dataSourceNames",this.$store.state.config.rag_databases);const t=this.$store.state.config.rag_databases.map(e=>{console.log("entry",e);const n=e.split("::");console.log("extracted",n[0]);const i=e.endsWith("mounted")?"feather:check":"";return console.log("icon decision",i),{name:n[0],value:n[0]||"default_value",icon:i,help:"mounts the database"}});return console.log("formatted data sources",t),t},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},installedBindings(){return this.$store.state.installedBindings},installedModels(){return this.$store.state.installedModels},mountedPersonalities(){return this.$store.state.mountedPersArr},binding_name(){return this.$store.state.config.binding_name},model_name(){return this.$store.state.config.model_name},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let t=[];for(let e=0;e0&&this.addFiles(n)},toggleSwitch(){this.$store.state.config.activate_internet_search=!this.$store.state.config.activate_internet_search,this.isLoading=!0,de.post("/apply_settings",{config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.config.activate_internet_search?this.$store.state.toast.showToast("Websearch activated.",4,!0):this.$store.state.toast.showToast("Websearch deactivated.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Fe(()=>{Ge.replace()})})},copyModelName(){navigator.clipboard.writeText(this.binding_name+"::"+this.model_name),this.$store.state.toast.showToast("Model name copyed to clipboard: "+this.binding_name+"::"+this.model_name,4,!0)},showModelConfig(){try{this.isLoading=!0,de.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{de.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:e}).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. +Error: `+e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;er.full_path==n),i=this.personalities[s];if(i)console.log("adding from config"),t.push(i);else{console.log("adding default");const r=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),o=this.personalities[r];t.push(o)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;ei.full_path==n);if(console.log("discussionPersonalities -includes",s),console.log("discussionPersonalities -mounted list",this.mountedPersArr),s==-1){const i=this.personalities.findIndex(o=>o.full_path==n),r=this.personalities[i];console.log("adding discucc121",r,n),r&&(this.mountedPersArr.push(r),console.log("adding discucc",r))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},sE=t=>(Mi("data-v-de7bc8fe"),t=t(),Di(),t),ISt={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},MSt={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},DSt=sE(()=>l("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"},[l("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"}),l("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)),kSt=sE(()=>l("span",{class:"sr-only"},"Loading...",-1)),LSt=[DSt,kSt],PSt=sE(()=>l("i",{"data-feather":"chevron-down"},null,-1)),USt=[PSt],FSt={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},BSt={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function GSt(t,e,n,s,i,r){const o=ct("personality-entry"),a=ct("Toast"),c=ct("UniversalForm");return T(),w("div",ISt,[i.isLoading?(T(),w("div",MSt,LSt)):G("",!0),l("div",null,[r.mountedPersArr.length>0?(T(),w("div",{key:0,class:Ue(i.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[l("button",{class:"mt-0 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Close personality list",type:"button",onClick:e[0]||(e[0]=ae((...u)=>r.toggleShowPersList&&r.toggleShowPersList(...u),["stop"]))},USt),l("label",FSt," Mounted Personalities: ("+J(r.mountedPersArr.length)+") ",1),l("div",BSt,[_e(Zs,{name:"bounce"},{default:He(()=>[(T(!0),w(Ve,null,Je(this.$store.state.mountedPersArr,(u,d)=>(T(),St(o,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+d+"-"+u.name,personality:u,full_path:u.full_path,select_language:!1,selected:r.configFile.personalities[r.configFile.active_personality_id]===u.full_path||r.configFile.personalities[r.configFile.active_personality_id]===u.full_path+":"+u.language,"on-selected":r.onPersonalitySelected,"on-mount":r.onPersonalityMounted,"on-edit":r.editPersonality,"on-un-mount":r.onPersonalityUnMounted,"on-remount":r.onPersonalityRemount,"on-settings":r.onSettingsPersonality,"on-reinstall":r.onPersonalityReinstall,"on-talk":r.handleOnTalk,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-edit","on-un-mount","on-remount","on-settings","on-reinstall","on-talk","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})])],2)):G("",!0)]),_e(a,{ref:"toast"},null,512),_e(c,{ref:"universalForm",class:"z-20"},null,512)])}const VSt=at(OSt,[["render",GSt],["__scopeId","data-v-de7bc8fe"]]);const zSt={components:{InteractiveMenu:eE},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){this.commands=this.commandsList,console.log("Commands",this.commands),document.addEventListener("click",this.handleClickOutside),Fe(()=>{Ge.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(s=>s.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=s=>{this.selectedFile=s.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};qe.on("file_received",s=>{s.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file +`+s.error,4,!1),this.loading=!1,qe.off("file_received")}),qe.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){Fe(()=>{Ge.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},HSt=t=>(Mi("data-v-1a32c141"),t=t(),Di(),t),qSt={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},YSt=HSt(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),$St=[YSt];function WSt(t,e,n,s,i,r){const o=ct("InteractiveMenu");return i.loading?(T(),w("div",qSt,$St)):(T(),St(o,{key:1,commands:n.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const KSt=at(zSt,[["render",WSt],["__scopeId","data-v-1a32c141"]]),jSt="/assets/loader_v0-16906488.svg";console.log("modelImgPlaceholder:",As);const QSt="/",XSt={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{UniversalForm:Xl,MountedPersonalities:ASt,MountedPersonalitiesList:VSt,PersonalitiesCommands:KSt},setup(){},data(){return{is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:jSt,sendGlobe:IN,modelImgPlaceholder:As,bUrl:QSt,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{isDataSourceNamesValid(){return console.log("dataSourceNames:",this.dataSourceNames),console.log("Type of dataSourceNames:",typeof this.dataSourceNames),Array.isArray(this.dataSourceNames)&&this.dataSourceNames.length>0},dataSourceNames(){console.log("dataSourceNames",this.$store.state.config.rag_databases);const t=this.$store.state.config.rag_databases.map(e=>{console.log("entry",e);const n=e.split("::");console.log("extracted",n[0]);const i=e.endsWith("mounted")?"feather:check":"";return console.log("icon decision",i),{name:n[0],value:n[0]||"default_value",icon:i,help:"mounts the database"}});return console.log("formatted data sources",t),t},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},installedBindings(){return this.$store.state.installedBindings},installedModels(){return this.$store.state.installedModels},mountedPersonalities(){return this.$store.state.mountedPersArr},binding_name(){return this.$store.state.config.binding_name},model_name(){return this.$store.state.config.model_name},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let t=[];for(let e=0;e0&&this.addFiles(n)},toggleSwitch(){this.$store.state.config.activate_internet_search=!this.$store.state.config.activate_internet_search,this.isLoading=!0,de.post("/apply_settings",{config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.config.activate_internet_search?this.$store.state.toast.showToast("Websearch activated.",4,!0):this.$store.state.toast.showToast("Websearch deactivated.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1),Fe(()=>{Ge.replace()})})},copyModelName(){navigator.clipboard.writeText(this.binding_name+"::"+this.model_name),this.$store.state.toast.showToast("Model name copyed to clipboard: "+this.binding_name+"::"+this.model_name,4,!0)},showModelConfig(){try{this.isLoading=!0,de.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(console.log("binding sett",t),t.data&&Object.keys(t.data).length>0?this.$refs.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{de.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:e}).then(n=>{n&&n.data?(console.log("binding set with new settings",n.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+n,4,!1),this.isLoading=!1)})}catch(n){this.$store.state.toast.showToast(`Did not get binding settings responses. Endpoint error: `+n.message,4,!1),this.isLoading=!1}}):(this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(t){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},async remount_personality(t){if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await de.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},async unmountPersonality(t){if(console.log("Unmounting personality:",t),!t)return;const e=await this.unmount_personality(t.personality||t);if(console.log(e),e.status){this.$store.state.config.personalities=e.personalities,this.$store.state.toast.showToast("Personality unmounted",4,!0),this.$store.dispatch("refreshMountedPersonalities");const n=this.$store.state.mountedPersArr[this.$store.state.mountedPersArr.length-1];console.log(n,this.$store.state.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this.$store.state.toast.showToast(`Selected personality: `+n.name,4,!0)}else this.$store.state.toast.showToast(`Could not unmount personality Error: `+e.error,4,!1)},async unmount_personality(t){if(!t)return{status:!1,error:"no personality - unmount_personality"};const e={client_id:this.$store.state.client_id,language:t.language,category:t.category,folder:t.folder};try{const n=await de.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async showBindingHoveredIn(t){this.bindingHoveredIndex=t},async showBindingHoveredOut(){this.bindingHoveredIndex=null},async showModelHoveredIn(t){this.modelHoveredIndex=t},async showModelHoveredOut(){this.modelHoveredIndex=null},async showPersonalityHoveredIn(t){this.personalityHoveredIndex=t},async showPersonalityHoveredOut(){this.personalityHoveredIndex=null},async onPersonalitySelected(t){if(t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=t.language===null?t.full_path:t.full_path+":"+t.language;if(console.log("pers_path",e),console.log("this.$store.state.config.personalities",this.$store.state.config.personalities),this.$store.state.config.personalities.includes(e)){const n=await this.select_personality(t);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshMountedPersonalities"),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage"),await this.$store.dispatch("fetchisRTOn"),console.log("pers is mounted",n),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+t.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: -`+t.name,4,!1)}else console.log("mounting pers");this.$emit("personalitySelected"),Fe(()=>{Ge.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const e=t.language===null?t.full_path:t.full_path+":"+t.language;console.log("Selecting personality ",e);const n=this.$store.state.config.personalities.findIndex(i=>i===e),s={client_id:this.$store.state.client_id,id:n};try{const i=await de.post("/select_personality",s);if(i)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),i.data}catch(i){console.log(i.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(t){t.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const n=new MouseEvent("click");e.dispatchEvent(n)},setBinding(t){console.log("Setting binding to "+t.name),this.selecting_binding=!0,this.selectedBinding=t,this.$store.state.messageBox.showBlockingMessage("Loading binding"),de.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},setModel(t){console.log("Setting model to "+t.name),this.selecting_model=!0,this.selectedModel=t,this.$store.state.messageBox.showBlockingMessage("Loading model"),de.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},download_files(){de.get("/download_files")},remove_file(t){de.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){de.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(t,e){console.log("Send file triggered");const n=new FileReader,s=24*1024;let i=0,r=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,c=i+a.byteLength>=t.size;qe.emit("send_file_chunk",{filename:t.name,chunk:a,offset:i,isLastChunk:c,chunkIndex:r}),i+=a.byteLength,r++,c?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=t.slice(i,i+s);n.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},startRTCom(){this.is_rt=!0,console.log("is_rt:",this.is_rt),qe.emit("start_bidirectional_audio_stream"),Fe(()=>{Ge.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),qe.emit("stop_bidirectional_audio_stream"),Fe(()=>{Ge.replace()})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isListeningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(t){this.showPersonalities=!this.showPersonalities},handleOnTalk(t){console.log("talking"),this.showPersonalities=!1,this.$store.state.toast.showToast(`Personality ${t.name} is Talking`,4,!0),this.onTalk(t)},onMountFun(t){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(t){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(t){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(t){return Fe(()=>{Ge.replace()}),Xs(t)},removeItem(t){console.log("Removing ",t.name),de.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await de.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){qe.emit("take_picture"),qe.on("picture_taken",()=>{de.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(t){console.log("Adding files");const e=[...t];let n=0;const s=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[n];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{n++,s()})};s()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){Fe(()=>{Ge.replace()})},loading(t,e){Fe(()=>{Ge.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let s=0;s{Ge.replace()}),console.log("Chatbar mounted"),qe.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.status),console.log("active_tts_service: ",this.$store.state.config.active_tts_service),console.log("is_rt_on: ",this.$store.state.is_rt_on)}),this.$store.dispatch("fetchisRTOn")},activated(){Fe(()=>{Ge.replace()})}},Dt=t=>(Mi("data-v-64fb461b"),t=t(),Di(),t),YSt={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},$St={key:0,class:"items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},WSt={class:"flex"},KSt=["title"],jSt=Dt(()=>l("i",{"data-feather":"list"},null,-1)),QSt=[jSt],XSt={key:0},ZSt={class:"flex flex-col max-h-64"},JSt=["title"],e0t={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},t0t={key:0,filesList:"",role:"status"},n0t=Dt(()=>l("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"},[l("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"}),l("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)),s0t=Dt(()=>l("span",{class:"sr-only"},"Loading...",-1)),i0t=[n0t,s0t],r0t=Dt(()=>l("div",null,[l("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),o0t=Dt(()=>l("div",{class:"grow"},null,-1)),a0t={class:"flex flex-row items-center"},l0t={class:"whitespace-nowrap"},c0t=["onClick"],d0t=Dt(()=>l("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),u0t=[d0t],p0t={key:1,class:"flex mx-1 w-500"},_0t={class:"whitespace-nowrap flex flex-row gap-2"},h0t=Dt(()=>l("p",{class:"font-bold"}," Total size: ",-1)),f0t=Dt(()=>l("div",{class:"grow"},null,-1)),m0t=Dt(()=>l("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),g0t=[m0t],b0t=Dt(()=>l("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)),E0t=[b0t],y0t={key:2,class:"mx-1"},v0t={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end bg-primary"},S0t={role:"status"},T0t=["src"],x0t=Dt(()=>l("span",{class:"sr-only"},"Selecting model...",-1)),C0t={class:"flex w-fit relative grow w-full"},w0t={class:"relative text-light-text-panel dark:text-dark-text-panel grow flex h-12.5 cursor-pointer select-none items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone p-1 shadow-sm hover:shadow-none dark:border-gray-800",tabindex:"0"},R0t={key:0,title:"Waiting for reply"},A0t=["src"],N0t=Dt(()=>l("div",{role:"status"},[l("span",{class:"sr-only"},"Loading...")],-1)),O0t={key:1,class:"w-fit group relative"},I0t={class:"hide top-50 hide opacity-0 group-hover:bottom-0 opacity-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},M0t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},D0t=["onMouseover"],k0t={class:"relative"},L0t=["onClick"],P0t=["src","title"],U0t={class:"group items-center flex flex-row"},F0t=["src","title"],B0t={key:2,class:"w-fit group relative"},G0t={class:"hide top-50 hide opacity-0 group-hover:bottom-0 opacity-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},V0t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},z0t=["onMouseover"],H0t={class:"relative"},q0t=["onClick"],Y0t=["src","title"],$0t={class:"group items-center flex flex-row"},W0t=["src","title"],K0t={key:3,class:"w-fit group relative"},j0t={class:"top-50 hide opacity-0 group-hover:bottom-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},Q0t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},X0t=["onMouseover"],Z0t={class:"relative"},J0t=["onClick"],eTt=["src","title"],tTt=["onClick"],nTt=Dt(()=>l("span",{class:"-top-6 -right-6 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Unmount personality"},[l("svg",{"aria-hidden":"true",class:"top-1 left-1 relative w-5 h-5 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20","stroke-width":"1",xmlns:"http://www.w3.org/2000/svg"},[l("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)),sTt=[nTt],iTt=["onClick"],rTt=Dt(()=>l("span",{class:"-top-9 left-2 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Remount"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("g",{id:"surface1"},[l("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1)),oTt=[rTt],aTt=["onClick"],lTt=Dt(()=>l("span",{class:"-top-6 -left-6 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Talk"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),l("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1)),cTt=[lTt],dTt={class:"w-fit"},uTt={class:"w-fit"},pTt={class:"relative grow"},_Tt={class:"group relative w-max"},hTt=Dt(()=>l("i",{"data-feather":"send"},null,-1)),fTt=[hTt],mTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI.")],-1)),gTt={class:"group relative w-max"},bTt=["src"],ETt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI with internet search.")],-1)),yTt={class:"group relative w-max"},vTt=Dt(()=>l("i",{"data-feather":"mic"},null,-1)),STt=[vTt],TTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Press and talk.")],-1)),xTt={key:5,class:"group relative w-max"},CTt=Dt(()=>l("i",{"data-feather":"mic"},null,-1)),wTt=[CTt],RTt=Dt(()=>l("i",{"data-feather":"mic"},null,-1)),ATt=[RTt],NTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Real time bidirectional audio mode.")],-1)),OTt={key:6,class:"group relative w-max"},ITt=Dt(()=>l("i",{"data-feather":"file-plus"},null,-1)),MTt=[ITt],DTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Send File to the AI.")],-1)),kTt={class:"group relative w-max"},LTt=Dt(()=>l("i",{"data-feather":"camera"},null,-1)),PTt=[LTt],UTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Take a shot from webcam.")],-1)),FTt={class:"group relative w-max"},BTt=Dt(()=>l("i",{"data-feather":"globe"},null,-1)),GTt=[BTt],VTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Add a weblink to the discussion.")],-1)),zTt={class:"group relative w-max"},HTt=Dt(()=>l("i",{"data-feather":"message-square"},null,-1)),qTt=[HTt],YTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty User message.")],-1)),$Tt={class:"group relative w-max"},WTt=Dt(()=>l("i",{"data-feather":"message-square"},null,-1)),KTt=[WTt],jTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty ai message.")],-1)),QTt=Dt(()=>l("div",{class:"ml-auto gap-2"},null,-1));function XTt(t,e,n,s,i,r){const o=ct("MountedPersonalitiesList"),a=ct("MountedPersonalities"),c=ct("PersonalitiesCommands"),u=ct("UniversalForm");return T(),w(Ve,null,[l("form",null,[l("div",YSt,[i.filesList.length>0||i.showPersonalities?(T(),w("div",$St,[l("div",WSt,[l("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:i.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=ae(d=>i.showfilesList=!i.showfilesList,["stop"]))},QSt,8,KSt)]),i.filesList.length>0&&i.showfilesList==!0?(T(),w("div",XSt,[l("div",ZSt,[_e(Zs,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:He(()=>[(T(!0),w(Ve,null,Je(i.filesList,(d,h)=>(T(),w("div",{key:h+"-"+d.name},[l("div",{class:"m-1",title:d.name},[l("div",e0t,[i.isFileSentList[h]?G("",!0):(T(),w("div",t0t,i0t)),r0t,l("div",{class:Ue(["line-clamp-1 w-3/5",i.isFileSentList[h]?"text-green-500":"text-red-200"])},J(d.name),3),o0t,l("div",a0t,[l("p",l0t,J(r.computedFileSize(d.size)),1),l("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:f=>r.removeItem(d)},u0t,8,c0t)])])],8,JSt)]))),128))]),_:1})])])):G("",!0),i.filesList.length>0?(T(),w("div",p0t,[l("div",_0t,[h0t,Xe(" "+J(i.totalSize)+" ("+J(i.filesList.length)+") ",1)]),f0t,l("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...d)=>r.clear_files&&r.clear_files(...d))},g0t),l("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...d)=>r.download_files&&r.download_files(...d))},E0t)])):G("",!0),i.showPersonalities?(T(),w("div",y0t,[_e(o,{ref:"mountedPersList",onShowPersList:r.onShowPersListFun,"on-mounted":r.onMountFun,"on-un-mounted":r.onUnmountFun,"on-remounted":t.onRemountFun,"on-talk":r.handleOnTalk,discussionPersonalities:r.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):G("",!0)])):G("",!0),i.selecting_model||i.selecting_binding?(T(),w("div",v0t,[l("div",S0t,[l("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,T0t),x0t])])):G("",!0),l("div",C0t,[l("div",w0t,[n.loading?(T(),w("div",R0t,[l("img",{src:i.loader_v0},null,8,A0t),N0t])):G("",!0),n.loading?G("",!0):(T(),w("div",O0t,[l("div",I0t,[l("div",M0t,[(T(!0),w(Ve,null,Je(r.installedBindings,(d,h)=>(T(),w("div",{class:"w-fit h-fit inset-0 opacity-100",key:h+"-"+d.name,ref_for:!0,ref:"installedBindings",onMouseover:f=>r.showBindingHoveredIn(h),onMouseleave:e[4]||(e[4]=f=>r.showBindingHoveredOut())},[h!=r.binding_name?(T(),w("div",{key:0,class:Ue(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.bindingHoveredIndex===h?"scale-150":""])},[l("div",k0t,[l("button",{onClick:ae(f=>r.setBinding(d),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:d.icon?d.icon:i.modelImgPlaceholder,onError:e[3]||(e[3]=(...f)=>i.modelImgPlaceholder&&i.modelImgPlaceholder(...f)),class:Ue(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.bindingHoveredIndex===h?"scale-150 ":""+d.name==r.binding_name?"border-secondary":"border-transparent z-0"]),title:d.name},null,42,P0t)],8,L0t)])],2)):G("",!0)],40,D0t))),128))])]),l("div",U0t,[l("button",{onClick:e[5]||(e[5]=ae(d=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[l("img",{src:r.currentBindingIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-200",title:r.currentBinding?r.currentBinding.name:"unknown"},null,8,F0t)])])])),n.loading?G("",!0):(T(),w("div",B0t,[l("div",G0t,[l("div",V0t,[(T(!0),w(Ve,null,Je(r.installedModels,(d,h)=>(T(),w("div",{class:"w-fit h-fit",key:h+"-"+d.name,ref_for:!0,ref:"installedModels",onMouseover:f=>r.showModelHoveredIn(h),onMouseleave:e[7]||(e[7]=f=>r.showModelHoveredOut())},[h!=r.model_name?(T(),w("div",{key:0,class:Ue(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.modelHoveredIndex===h?"scale-150":""])},[l("div",H0t,[l("button",{onClick:ae(f=>r.setModel(d),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:d.icon?d.icon:i.modelImgPlaceholder,onError:e[6]||(e[6]=(...f)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...f)),class:Ue(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.modelHoveredIndex===h?"scale-150 ":""+d.name==r.model_name?"border-secondary":"border-transparent z-0"]),title:d.name},null,42,Y0t)],8,q0t)])],2)):G("",!0)],40,z0t))),128))])]),l("div",$0t,[l("button",{onClick:e[8]||(e[8]=ae(d=>r.copyModelName(),["prevent"])),class:"w-8 h-8"},[l("img",{src:r.currentModelIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-400",title:r.currentModel?r.currentModel.name:"unknown"},null,8,W0t)])])])),n.loading?G("",!0):(T(),w("div",K0t,[l("div",j0t,[l("div",Q0t,[(T(!0),w(Ve,null,Je(r.mountedPersonalities,(d,h)=>(T(),w("div",{class:"w-fit h-fit inset-0 opacity-100",key:h+"-"+d.name,ref_for:!0,ref:"mountedPersonalities",onMouseover:f=>r.showPersonalityHoveredIn(h),onMouseleave:e[10]||(e[10]=f=>r.showPersonalityHoveredOut())},[h!=r.personality_name?(T(),w("div",{key:0,class:Ue(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.personalityHoveredIndex===h?"scale-150":""])},[l("div",Z0t,[l("button",{onClick:ae(f=>r.onPersonalitySelected(d),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:i.bUrl+d.avatar,onError:e[9]||(e[9]=(...f)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...f)),class:Ue(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.personalityHoveredIndex===h?"scale-150 ":""+this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(d.full_path)?"border-secondary":"border-transparent z-0"]),title:d.name},null,42,eTt)],8,J0t),i.personalityHoveredIndex===h?(T(),w("button",{key:0,onClick:ae(f=>r.unmountPersonality(d),["prevent"])},sTt,8,tTt)):G("",!0),i.personalityHoveredIndex===h?(T(),w("button",{key:1,onClick:ae(f=>r.remount_personality(d),["prevent"])},oTt,8,iTt)):G("",!0),i.personalityHoveredIndex===h?(T(),w("button",{key:2,onClick:ae(f=>r.handleOnTalk(d),["prevent"])},cTt,8,aTt)):G("",!0)])],2)):G("",!0)],40,X0t))),128))])]),_e(a,{ref:"mountedPers",onShowPersList:r.onShowPersListFun,onReady:r.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])])),l("div",dTt,[i.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(T(),St(c,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):G("",!0)]),l("div",uTt,[r.isDataSourceNamesValid?(T(),St(c,{key:0,icon:"feather:book",commandsList:r.dataSourceNames,sendCommand:r.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):G("",!0)]),l("div",pTt,[U(l("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[11]||(e[11]=d=>i.message=d),title:"Hold SHIFT + ENTER to add new line",onPaste:e[12]||(e[12]=(...d)=>r.handlePaste&&r.handlePaste(...d)),class:"inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:e[13]||(e[13]=ti(ae(d=>r.submitOnEnter(d),["exact"]),["enter"]))},`\r - `,544),[[ue,i.message]])]),n.loading?(T(),w("button",{key:4,type:"button",class:"bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800",onClick:e[14]||(e[14]=ae((...d)=>r.stopGenerating&&r.stopGenerating(...d),["stop"]))}," Stop generating ")):G("",!0),l("div",_Tt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[15]||(e[15]=(...d)=>r.submit&&r.submit(...d)),title:"Send",class:"w-6 text-panel hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},fTt)),mTt]),l("div",gTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[16]||(e[16]=(...d)=>r.submitWithInternetSearch&&r.submitWithInternetSearch(...d)),title:"Send With internet",class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},[l("img",{src:i.sendGlobe,width:"50",height:"50",style:{stroke:"currentColor",fill:"currentColor"}},null,8,bTt)])),ETt]),l("div",yTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[17]||(e[17]=(...d)=>r.startSpeechRecognition&&r.startSpeechRecognition(...d)),class:Ue([{"text-red-500":i.isListeningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"])},STt,2)),TTt]),t.$store.state.config.active_tts_service!="None"?(T(),w("div",xTt,[i.is_rt?(T(),w("button",{key:0,type:"button",onClick:e[18]||(e[18]=(...d)=>r.stopRTCom&&r.stopRTCom(...d)),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90 bg-red-500 border borderred700 rounded-md"},wTt)):(T(),w("button",{key:1,type:"button",onClick:e[19]||(e[19]=(...d)=>r.startRTCom&&r.startRTCom(...d)),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90 bg-green-500 border border-green-700 rounded-md"},ATt)),NTt])):G("",!0),n.loading?G("",!0):(T(),w("div",OTt,[l("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[20]||(e[20]=(...d)=>r.addFiles&&r.addFiles(...d)),multiple:""},null,544),l("button",{type:"button",onClick:e[21]||(e[21]=ae((...d)=>r.add_file&&r.add_file(...d),["prevent"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},MTt),DTt])),l("div",kTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[22]||(e[22]=ae((...d)=>r.takePicture&&r.takePicture(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},PTt)),UTt]),l("div",FTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[23]||(e[23]=ae((...d)=>r.addWebLink&&r.addWebLink(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},GTt)),VTt]),l("div",zTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[24]||(e[24]=ae((...d)=>r.makeAnEmptyUserMessage&&r.makeAnEmptyUserMessage(...d),["stop"])),class:"w-6 text-gray-800 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},qTt)),YTt]),l("div",$Tt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[25]||(e[25]=ae((...d)=>r.makeAnEmptyAIMessage&&r.makeAnEmptyAIMessage(...d),["stop"])),class:"w-6 text-red-400 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},KTt)),jTt])]),QTt])])]),_e(u,{ref:"universalForm",class:"z-20"},null,512)],64)}const DN=at(qSt,[["render",XTt],["__scopeId","data-v-64fb461b"]]);const ZTt={name:"WelcomeComponent",setup(){const t=bD();return{logoSrc:et(()=>t.state.config&&t.state.config.app_custom_logo?`/user_infos/${t.state.config.app_custom_logo}`:ms)}}},JTt=t=>(Mi("data-v-b052c8c7"),t=t(),Di(),t),ext={class:"flex flex-col items-center justify-center w-full h-full min-h-screen bg-gradient-to-br from-indigo-100 to-purple-100 dark:from-indigo-900 dark:to-purple-900 p-8"},txt={class:"text-center max-w-4xl"},nxt={class:"flex items-center justify-center gap-8 mb-12"},sxt={class:"relative w-24 h-24"},ixt=["src"],rxt=JTt(()=>l("div",{class:"flex flex-col items-start"},[l("h1",{class:"text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-400 dark:to-purple-400"}," LoLLMS "),l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic mt-2"}," Lord of Large Language And Multimodal Systems ")],-1)),oxt=gu('

Welcome to LoLLMS WebUI

Embark on a journey through the realm of advanced AI with LoLLMS, your ultimate companion for intelligent conversations and multimodal interactions. Unleash the power of large language models and explore new frontiers in artificial intelligence.

Discover the capabilities of LoLLMS:

  • Engage in natural language conversations
  • Generate creative content and ideas
  • Analyze complex data and provide insights
  • Assist with coding and technical tasks
  • Process and understand multimodal inputs
',1);function axt(t,e,n,s,i,r){return T(),w("div",ext,[l("div",txt,[l("div",nxt,[l("div",sxt,[l("img",{src:s.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,ixt)]),rxt]),oxt])])}const kN=at(ZTt,[["render",axt],["__scopeId","data-v-b052c8c7"]]);var lxt=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),Pd=globalThis&&globalThis.__assign||function(){return Pd=Object.assign||function(t){for(var e,n=1,s=arguments.length;n"u")return!1;var e=es(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function vxt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var s=e.styles[n]||{},i=e.attributes[n]||{},r=e.elements[n];!gs(r)||!si(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(o){var a=i[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function Sxt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(s){var i=e.elements[s],r=e.attributes[s]||{},o=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:n[s]),a=o.reduce(function(c,u){return c[u]="",c},{});!gs(i)||!si(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(c){i.removeAttribute(c)}))})}}const Txt={name:"applyStyles",enabled:!0,phase:"write",fn:vxt,effect:Sxt,requires:["computeStyles"]};function Js(t){return t.split("-")[0]}var Yr=Math.max,Gd=Math.min,ra=Math.round;function Ig(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function VN(){return!/^((?!chrome|android).)*safari/i.test(Ig())}function oa(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var s=t.getBoundingClientRect(),i=1,r=1;e&&gs(t)&&(i=t.offsetWidth>0&&ra(s.width)/t.offsetWidth||1,r=t.offsetHeight>0&&ra(s.height)/t.offsetHeight||1);var o=Jr(t)?es(t):window,a=o.visualViewport,c=!VN()&&n,u=(s.left+(c&&a?a.offsetLeft:0))/i,d=(s.top+(c&&a?a.offsetTop:0))/r,h=s.width/i,f=s.height/r;return{width:h,height:f,top:d,right:u+h,bottom:d+f,left:u,x:u,y:d}}function dE(t){var e=oa(t),n=t.offsetWidth,s=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:s}}function zN(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&cE(n)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Oi(t){return es(t).getComputedStyle(t)}function xxt(t){return["table","td","th"].indexOf(si(t))>=0}function br(t){return((Jr(t)?t.ownerDocument:t.document)||window.document).documentElement}function zu(t){return si(t)==="html"?t:t.assignedSlot||t.parentNode||(cE(t)?t.host:null)||br(t)}function jx(t){return!gs(t)||Oi(t).position==="fixed"?null:t.offsetParent}function Cxt(t){var e=/firefox/i.test(Ig()),n=/Trident/i.test(Ig());if(n&&gs(t)){var s=Oi(t);if(s.position==="fixed")return null}var i=zu(t);for(cE(i)&&(i=i.host);gs(i)&&["html","body"].indexOf(si(i))<0;){var r=Oi(i);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return i;i=i.parentNode}return null}function Jl(t){for(var e=es(t),n=jx(t);n&&xxt(n)&&Oi(n).position==="static";)n=jx(n);return n&&(si(n)==="html"||si(n)==="body"&&Oi(n).position==="static")?e:n||Cxt(t)||e}function uE(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function hl(t,e,n){return Yr(t,Gd(e,n))}function wxt(t,e,n){var s=hl(t,e,n);return s>n?n:s}function HN(){return{top:0,right:0,bottom:0,left:0}}function qN(t){return Object.assign({},HN(),t)}function YN(t,e){return e.reduce(function(n,s){return n[s]=t,n},{})}var Rxt=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,qN(typeof e!="number"?e:YN(e,Zl))};function Axt(t){var e,n=t.state,s=t.name,i=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Js(n.placement),c=uE(a),u=[qn,ys].indexOf(a)>=0,d=u?"height":"width";if(!(!r||!o)){var h=Rxt(i.padding,n),f=dE(r),m=c==="y"?Hn:qn,_=c==="y"?Es:ys,E=n.rects.reference[d]+n.rects.reference[c]-o[c]-n.rects.popper[d],b=o[c]-n.rects.reference[c],g=Jl(r),y=g?c==="y"?g.clientHeight||0:g.clientWidth||0:0,v=E/2-b/2,S=h[m],R=y-f[d]-h[_],C=y/2-f[d]/2+v,A=hl(S,C,R),D=c;n.modifiersData[s]=(e={},e[D]=A,e.centerOffset=A-C,e)}}function Nxt(t){var e=t.state,n=t.options,s=n.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||zN(e.elements.popper,i)&&(e.elements.arrow=i))}const Oxt={name:"arrow",enabled:!0,phase:"main",fn:Axt,effect:Nxt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function aa(t){return t.split("-")[1]}var Ixt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Mxt(t,e){var n=t.x,s=t.y,i=e.devicePixelRatio||1;return{x:ra(n*i)/i||0,y:ra(s*i)/i||0}}function Qx(t){var e,n=t.popper,s=t.popperRect,i=t.placement,r=t.variation,o=t.offsets,a=t.position,c=t.gpuAcceleration,u=t.adaptive,d=t.roundOffsets,h=t.isFixed,f=o.x,m=f===void 0?0:f,_=o.y,E=_===void 0?0:_,b=typeof d=="function"?d({x:m,y:E}):{x:m,y:E};m=b.x,E=b.y;var g=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=qn,S=Hn,R=window;if(u){var C=Jl(n),A="clientHeight",D="clientWidth";if(C===es(n)&&(C=br(n),Oi(C).position!=="static"&&a==="absolute"&&(A="scrollHeight",D="scrollWidth")),C=C,i===Hn||(i===qn||i===ys)&&r===Pl){S=Es;var x=h&&C===R&&R.visualViewport?R.visualViewport.height:C[A];E-=x-s.height,E*=c?1:-1}if(i===qn||(i===Hn||i===Es)&&r===Pl){v=ys;var O=h&&C===R&&R.visualViewport?R.visualViewport.width:C[D];m-=O-s.width,m*=c?1:-1}}var B=Object.assign({position:a},u&&Ixt),z=d===!0?Mxt({x:m,y:E},es(n)):{x:m,y:E};if(m=z.x,E=z.y,c){var Z;return Object.assign({},B,(Z={},Z[S]=y?"0":"",Z[v]=g?"0":"",Z.transform=(R.devicePixelRatio||1)<=1?"translate("+m+"px, "+E+"px)":"translate3d("+m+"px, "+E+"px, 0)",Z))}return Object.assign({},B,(e={},e[S]=y?E+"px":"",e[v]=g?m+"px":"",e.transform="",e))}function Dxt(t){var e=t.state,n=t.options,s=n.gpuAcceleration,i=s===void 0?!0:s,r=n.adaptive,o=r===void 0?!0:r,a=n.roundOffsets,c=a===void 0?!0:a,u={placement:Js(e.placement),variation:aa(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Qx(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Qx(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const kxt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Dxt,data:{}};var xc={passive:!0};function Lxt(t){var e=t.state,n=t.instance,s=t.options,i=s.scroll,r=i===void 0?!0:i,o=s.resize,a=o===void 0?!0:o,c=es(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&u.forEach(function(d){d.addEventListener("scroll",n.update,xc)}),a&&c.addEventListener("resize",n.update,xc),function(){r&&u.forEach(function(d){d.removeEventListener("scroll",n.update,xc)}),a&&c.removeEventListener("resize",n.update,xc)}}const Pxt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Lxt,data:{}};var Uxt={left:"right",right:"left",bottom:"top",top:"bottom"};function gd(t){return t.replace(/left|right|bottom|top/g,function(e){return Uxt[e]})}var Fxt={start:"end",end:"start"};function Xx(t){return t.replace(/start|end/g,function(e){return Fxt[e]})}function pE(t){var e=es(t),n=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:n,scrollTop:s}}function _E(t){return oa(br(t)).left+pE(t).scrollLeft}function Bxt(t,e){var n=es(t),s=br(t),i=n.visualViewport,r=s.clientWidth,o=s.clientHeight,a=0,c=0;if(i){r=i.width,o=i.height;var u=VN();(u||!u&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:o,x:a+_E(t),y:c}}function Gxt(t){var e,n=br(t),s=pE(t),i=(e=t.ownerDocument)==null?void 0:e.body,r=Yr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Yr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+_E(t),c=-s.scrollTop;return Oi(i||n).direction==="rtl"&&(a+=Yr(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:o,x:a,y:c}}function hE(t){var e=Oi(t),n=e.overflow,s=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function $N(t){return["html","body","#document"].indexOf(si(t))>=0?t.ownerDocument.body:gs(t)&&hE(t)?t:$N(zu(t))}function fl(t,e){var n;e===void 0&&(e=[]);var s=$N(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),r=es(s),o=i?[r].concat(r.visualViewport||[],hE(s)?s:[]):s,a=e.concat(o);return i?a:a.concat(fl(zu(o)))}function Mg(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Vxt(t,e){var n=oa(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Zx(t,e,n){return e===BN?Mg(Bxt(t,n)):Jr(e)?Vxt(e,n):Mg(Gxt(br(t)))}function zxt(t){var e=fl(zu(t)),n=["absolute","fixed"].indexOf(Oi(t).position)>=0,s=n&&gs(t)?Jl(t):t;return Jr(s)?e.filter(function(i){return Jr(i)&&zN(i,s)&&si(i)!=="body"}):[]}function Hxt(t,e,n,s){var i=e==="clippingParents"?zxt(t):[].concat(e),r=[].concat(i,[n]),o=r[0],a=r.reduce(function(c,u){var d=Zx(t,u,s);return c.top=Yr(d.top,c.top),c.right=Gd(d.right,c.right),c.bottom=Gd(d.bottom,c.bottom),c.left=Yr(d.left,c.left),c},Zx(t,o,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function WN(t){var e=t.reference,n=t.element,s=t.placement,i=s?Js(s):null,r=s?aa(s):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,c;switch(i){case Hn:c={x:o,y:e.y-n.height};break;case Es:c={x:o,y:e.y+e.height};break;case ys:c={x:e.x+e.width,y:a};break;case qn:c={x:e.x-n.width,y:a};break;default:c={x:e.x,y:e.y}}var u=i?uE(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(r){case ia:c[u]=c[u]-(e[d]/2-n[d]/2);break;case Pl:c[u]=c[u]+(e[d]/2-n[d]/2);break}}return c}function Ul(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=s===void 0?t.placement:s,r=n.strategy,o=r===void 0?t.strategy:r,a=n.boundary,c=a===void 0?cxt:a,u=n.rootBoundary,d=u===void 0?BN:u,h=n.elementContext,f=h===void 0?Ka:h,m=n.altBoundary,_=m===void 0?!1:m,E=n.padding,b=E===void 0?0:E,g=qN(typeof b!="number"?b:YN(b,Zl)),y=f===Ka?dxt:Ka,v=t.rects.popper,S=t.elements[_?y:f],R=Hxt(Jr(S)?S:S.contextElement||br(t.elements.popper),c,d,o),C=oa(t.elements.reference),A=WN({reference:C,element:v,strategy:"absolute",placement:i}),D=Mg(Object.assign({},v,A)),x=f===Ka?D:C,O={top:R.top-x.top+g.top,bottom:x.bottom-R.bottom+g.bottom,left:R.left-x.left+g.left,right:x.right-R.right+g.right},B=t.modifiersData.offset;if(f===Ka&&B){var z=B[i];Object.keys(O).forEach(function(Z){var M=[ys,Es].indexOf(Z)>=0?1:-1,q=[Hn,Es].indexOf(Z)>=0?"y":"x";O[Z]+=z[q]*M})}return O}function qxt(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?GN:c,d=aa(s),h=d?a?Kx:Kx.filter(function(_){return aa(_)===d}):Zl,f=h.filter(function(_){return u.indexOf(_)>=0});f.length===0&&(f=h);var m=f.reduce(function(_,E){return _[E]=Ul(t,{placement:E,boundary:i,rootBoundary:r,padding:o})[Js(E)],_},{});return Object.keys(m).sort(function(_,E){return m[_]-m[E]})}function Yxt(t){if(Js(t)===lE)return[];var e=gd(t);return[Xx(t),e,Xx(e)]}function $xt(t){var e=t.state,n=t.options,s=t.name;if(!e.modifiersData[s]._skip){for(var i=n.mainAxis,r=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!0:o,c=n.fallbackPlacements,u=n.padding,d=n.boundary,h=n.rootBoundary,f=n.altBoundary,m=n.flipVariations,_=m===void 0?!0:m,E=n.allowedAutoPlacements,b=e.options.placement,g=Js(b),y=g===b,v=c||(y||!_?[gd(b)]:Yxt(b)),S=[b].concat(v).reduce(function(Ee,Oe){return Ee.concat(Js(Oe)===lE?qxt(e,{placement:Oe,boundary:d,rootBoundary:h,padding:u,flipVariations:_,allowedAutoPlacements:E}):Oe)},[]),R=e.rects.reference,C=e.rects.popper,A=new Map,D=!0,x=S[0],O=0;O=0,q=M?"width":"height",H=Ul(e,{placement:B,boundary:d,rootBoundary:h,altBoundary:f,padding:u}),P=M?Z?ys:qn:Z?Es:Hn;R[q]>C[q]&&(P=gd(P));var $=gd(P),ee=[];if(r&&ee.push(H[z]<=0),a&&ee.push(H[P]<=0,H[$]<=0),ee.every(function(Ee){return Ee})){x=B,D=!1;break}A.set(B,ee)}if(D)for(var re=_?3:1,me=function(Oe){var Me=S.find(function(j){var he=A.get(j);if(he)return he.slice(0,Oe).every(function(pe){return pe})});if(Me)return x=Me,"break"},Se=re;Se>0;Se--){var le=me(Se);if(le==="break")break}e.placement!==x&&(e.modifiersData[s]._skip=!0,e.placement=x,e.reset=!0)}}const Wxt={name:"flip",enabled:!0,phase:"main",fn:$xt,requiresIfExists:["offset"],data:{_skip:!1}};function Jx(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function eC(t){return[Hn,ys,Es,qn].some(function(e){return t[e]>=0})}function Kxt(t){var e=t.state,n=t.name,s=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,o=Ul(e,{elementContext:"reference"}),a=Ul(e,{altBoundary:!0}),c=Jx(o,s),u=Jx(a,i,r),d=eC(c),h=eC(u);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const jxt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Kxt};function Qxt(t,e,n){var s=Js(t),i=[qn,Hn].indexOf(s)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*i,[qn,ys].indexOf(s)>=0?{x:a,y:o}:{x:o,y:a}}function Xxt(t){var e=t.state,n=t.options,s=t.name,i=n.offset,r=i===void 0?[0,0]:i,o=GN.reduce(function(d,h){return d[h]=Qxt(h,e.rects,r),d},{}),a=o[e.placement],c=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[s]=o}const Zxt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Xxt};function Jxt(t){var e=t.state,n=t.name;e.modifiersData[n]=WN({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const eCt={name:"popperOffsets",enabled:!0,phase:"read",fn:Jxt,data:{}};function tCt(t){return t==="x"?"y":"x"}function nCt(t){var e=t.state,n=t.options,s=t.name,i=n.mainAxis,r=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!1:o,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.padding,f=n.tether,m=f===void 0?!0:f,_=n.tetherOffset,E=_===void 0?0:_,b=Ul(e,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),g=Js(e.placement),y=aa(e.placement),v=!y,S=uE(g),R=tCt(S),C=e.modifiersData.popperOffsets,A=e.rects.reference,D=e.rects.popper,x=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,O=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,z={x:0,y:0};if(C){if(r){var Z,M=S==="y"?Hn:qn,q=S==="y"?Es:ys,H=S==="y"?"height":"width",P=C[S],$=P+b[M],ee=P-b[q],re=m?-D[H]/2:0,me=y===ia?A[H]:D[H],Se=y===ia?-D[H]:-A[H],le=e.elements.arrow,Ee=m&&le?dE(le):{width:0,height:0},Oe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:HN(),Me=Oe[M],j=Oe[q],he=hl(0,A[H],Ee[H]),pe=v?A[H]/2-re-he-Me-O.mainAxis:me-he-Me-O.mainAxis,Ce=v?-A[H]/2+re+he+j+O.mainAxis:Se+he+j+O.mainAxis,ke=e.elements.arrow&&Jl(e.elements.arrow),N=ke?S==="y"?ke.clientTop||0:ke.clientLeft||0:0,V=(Z=B==null?void 0:B[S])!=null?Z:0,Y=P+pe-V-N,oe=P+Ce-V,se=hl(m?Gd($,Y):$,P,m?Yr(ee,oe):ee);C[S]=se,z[S]=se-P}if(a){var Te,Ae=S==="x"?Hn:qn,ne=S==="x"?Es:ys,we=C[R],ge=R==="y"?"height":"width",De=we+b[Ae],L=we-b[ne],I=[Hn,qn].indexOf(g)!==-1,W=(Te=B==null?void 0:B[R])!=null?Te:0,ye=I?De:we-A[ge]-D[ge]-W+O.altAxis,K=I?we+A[ge]+D[ge]-W-O.altAxis:L,te=m&&I?wxt(ye,we,K):hl(m?ye:De,we,m?K:L);C[R]=te,z[R]=te-we}e.modifiersData[s]=z}}const sCt={name:"preventOverflow",enabled:!0,phase:"main",fn:nCt,requiresIfExists:["offset"]};function iCt(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function rCt(t){return t===es(t)||!gs(t)?pE(t):iCt(t)}function oCt(t){var e=t.getBoundingClientRect(),n=ra(e.width)/t.offsetWidth||1,s=ra(e.height)/t.offsetHeight||1;return n!==1||s!==1}function aCt(t,e,n){n===void 0&&(n=!1);var s=gs(e),i=gs(e)&&oCt(e),r=br(e),o=oa(t,i,n),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!n)&&((si(e)!=="body"||hE(r))&&(a=rCt(e)),gs(e)?(c=oa(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):r&&(c.x=_E(r))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function lCt(t){var e=new Map,n=new Set,s=[];t.forEach(function(r){e.set(r.name,r)});function i(r){n.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var c=e.get(a);c&&i(c)}}),s.push(r)}return t.forEach(function(r){n.has(r.name)||i(r)}),s}function cCt(t){var e=lCt(t);return yxt.reduce(function(n,s){return n.concat(e.filter(function(i){return i.phase===s}))},[])}function dCt(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function uCt(t){var e=t.reduce(function(n,s){var i=n[s.name];return n[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,n},{});return Object.keys(e).map(function(n){return e[n]})}var tC={placement:"bottom",modifiers:[],strategy:"absolute"};function nC(){for(var t=arguments.length,e=new Array(t),n=0;n(Mi("data-v-1219cfc9"),t=t(),Di(),t),yCt={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center bg-gradient-to-br from-blue-100 to-purple-100 dark:from-blue-900 dark:to-purple-900"},vCt={class:"flex flex-col items-center text-center max-w-4xl w-full px-4"},SCt={class:"mb-8 w-full"},TCt={class:"text-5xl md:text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400 mb-2"},xCt=kt(()=>l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic"}," One tool to rule them all ",-1)),CCt=kt(()=>l("p",{class:"text-xl text-gray-500 dark:text-gray-400 mb-6"}," by ParisNeo ",-1)),wCt={class:"w-full h-24 relative overflow-hidden bg-gradient-to-r from-blue-200 to-purple-200 dark:from-blue-800 dark:to-purple-800 rounded-full shadow-lg"},RCt={class:"w-full max-w-2xl"},ACt=kt(()=>l("h2",{class:"text-3xl font-semibold text-gray-800 dark:text-gray-200 mb-6"}," Welcome ",-1)),NCt={role:"status",class:"w-full"},OCt={class:"text-xl text-gray-700 dark:text-gray-300"},ICt={class:"text-2xl font-bold text-blue-600 dark:text-blue-400 mt-2"},MCt=kt(()=>l("i",{"data-feather":"chevron-right"},null,-1)),DCt=[MCt],kCt=kt(()=>l("i",{"data-feather":"chevron-left"},null,-1)),LCt=[kCt],PCt=gu('',1),UCt=[PCt],FCt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},BCt={class:"text-light-text-panel dark:text-dark-text-panel bg-bg-light-panel sticky z-10 top-0 dark:bg-bg-dark-tone shadow-md"},GCt={class:"flex-row p-4 flex items-center gap-3 flex-0"},VCt=kt(()=>l("i",{"data-feather":"plus"},null,-1)),zCt=[VCt],HCt=kt(()=>l("i",{"data-feather":"check-square"},null,-1)),qCt=[HCt],YCt={class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},$Ct=kt(()=>l("i",{"data-feather":"database"},null,-1)),WCt=[$Ct],KCt=kt(()=>l("i",{"data-feather":"log-in"},null,-1)),jCt=[KCt],QCt=kt(()=>l("i",{"data-feather":"folder"},null,-1)),XCt=[QCt],ZCt={key:1,class:"dropdown"},JCt=kt(()=>l("i",{"data-feather":"search"},null,-1)),e1t=[JCt],t1t={key:2,class:"flex gap-3 flex-1 items-center duration-75"},n1t=kt(()=>l("i",{"data-feather":"x"},null,-1)),s1t=[n1t],i1t=kt(()=>l("i",{"data-feather":"check"},null,-1)),r1t=[i1t],o1t=kt(()=>l("i",{"data-feather":"hard-drive"},null,-1)),a1t=[o1t],l1t=kt(()=>l("i",{"data-feather":"check-circle"},null,-1)),c1t=[l1t],d1t=kt(()=>l("i",{"data-feather":"x-octagon"},null,-1)),u1t=[d1t],p1t=kt(()=>l("i",{"data-feather":"book"},null,-1)),_1t=[p1t],h1t={key:7,title:"Loading..",class:"flex flex-row flex-grow justify-end"},f1t=kt(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),m1t=[f1t],g1t={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},b1t={class:"p-4 pt-2"},E1t={class:"relative"},y1t=kt(()=>l("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[l("div",{class:"scale-75"},[l("i",{"data-feather":"search"})])],-1)),v1t={class:"absolute inset-y-0 right-0 flex items-center pr-3"},S1t=kt(()=>l("i",{"data-feather":"x"},null,-1)),T1t=[S1t],x1t={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},C1t={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},w1t={class:"flex flex-row flex-grow"},R1t={key:0},A1t={class:"flex flex-row"},N1t={key:0,class:"flex gap-3"},O1t=kt(()=>l("i",{"data-feather":"trash"},null,-1)),I1t=[O1t],M1t={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},D1t=kt(()=>l("i",{"data-feather":"check"},null,-1)),k1t=[D1t],L1t=kt(()=>l("i",{"data-feather":"x"},null,-1)),P1t=[L1t],U1t={class:"flex gap-3"},F1t=kt(()=>l("i",{"data-feather":"codepen"},null,-1)),B1t=[F1t],G1t=kt(()=>l("i",{"data-feather":"folder"},null,-1)),V1t=[G1t],z1t=kt(()=>l("i",{"data-feather":"bookmark"},null,-1)),H1t=[z1t],q1t=kt(()=>l("i",{"data-feather":"list"},null,-1)),Y1t=[q1t],$1t={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},W1t={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},K1t=kt(()=>l("p",{class:"px-3"},"No discussions are found",-1)),j1t=[K1t],Q1t=kt(()=>l("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),X1t={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},Z1t={key:2,class:"relative flex flex-col flex-grow"},J1t={class:"container pt-4 pb-50 mb-50 w-full"},ewt={key:0,class:"w-full 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 overflow-hidden p-4 pb-2 h-[600px]"},twt=kt(()=>l("h2",{class:"text-2xl font-bold mb-4"},"Prompt examples",-1)),nwt={key:0,class:"overflow-y-auto flex-grow pr-2 custom-scrollbar"},swt={class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-2"},iwt=["onClick"],rwt=["title"],owt={class:"absolute inset-0 overflow-hidden"},awt=kt(()=>l("div",{class:"absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-white dark:to-gray-800 group-hover:opacity-0 transition-opacity duration-300"},null,-1)),lwt=kt(()=>l("div",{class:"mt-2 text-sm text-gray-500 dark:text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}," Click to select ",-1)),cwt=kt(()=>l("div",null,[l("br"),l("br"),l("br"),l("br"),l("br"),l("br"),l("br")],-1)),dwt=kt(()=>l("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1)),uwt={key:0,class:"flex flex-row items-center justify-center h-10"},pwt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-1/2 bg-bg-light-tone dark:bg-bg-dark-tone h-full"},_wt={ref:"isolatedContent",class:"h-full"},hwt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},fwt={class:"text-2xl animate-pulse mt-2 text-light-text-panel dark:text-dark-text-panel"},mwt={setup(){},data(){return{lastMessageHtml:"",defaultMessageHtml:` +`+t.name,4,!1)}else console.log("mounting pers");this.$emit("personalitySelected"),Fe(()=>{Ge.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const e=t.language===null?t.full_path:t.full_path+":"+t.language;console.log("Selecting personality ",e);const n=this.$store.state.config.personalities.findIndex(i=>i===e),s={client_id:this.$store.state.client_id,id:n};try{const i=await de.post("/select_personality",s);if(i)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),i.data}catch(i){console.log(i.message,"select_personality - settings");return}},emitloaded(){this.$emit("loaded")},showModels(t){t.preventDefault();const e=this.$refs.modelsSelectionList;console.log(e);const n=new MouseEvent("click");e.dispatchEvent(n)},setBinding(t){console.log("Setting binding to "+t.name),this.selecting_binding=!0,this.selectedBinding=t,this.$store.state.messageBox.showBlockingMessage("Loading binding"),de.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},setModel(t){console.log("Setting model to "+t.name),this.selecting_model=!0,this.selectedModel=t,this.$store.state.messageBox.showBlockingMessage("Loading model"),de.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:t.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),console.log("UPDATED"),console.log(e),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},download_files(){de.get("/download_files")},remove_file(t){de.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){de.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(t,e){console.log("Send file triggered");const n=new FileReader,s=24*1024;let i=0,r=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,c=i+a.byteLength>=t.size;qe.emit("send_file_chunk",{filename:t.name,chunk:a,offset:i,isLastChunk:c,chunkIndex:r}),i+=a.byteLength,r++,c?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=t.slice(i,i+s);n.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},startRTCom(){this.is_rt=!0,console.log("is_rt:",this.is_rt),qe.emit("start_bidirectional_audio_stream"),Fe(()=>{Ge.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),qe.emit("stop_bidirectional_audio_stream"),Fe(()=>{Ge.replace()})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isListeningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(t){this.showPersonalities=!this.showPersonalities},handleOnTalk(t){console.log("talking"),this.showPersonalities=!1,this.$store.state.toast.showToast(`Personality ${t.name} is Talking`,4,!0),this.onTalk(t)},onMountFun(t){console.log("Mounting personality"),this.$refs.mountedPers.constructor()},onUnmountFun(t){console.log("Unmounting personality"),this.$refs.mountedPers.constructor()},onRemount(t){console.log("Remounting chat"),this.$refs.mountedPers.constructor()},computedFileSize(t){return Fe(()=>{Ge.replace()}),Xs(t)},removeItem(t){console.log("Removing ",t.name),de.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await de.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){qe.emit("take_picture"),qe.on("picture_taken",()=>{de.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(t){console.log("Adding files");const e=[...t];let n=0;const s=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[n];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{n++,s()})};s()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){Fe(()=>{Ge.replace()})},loading(t,e){Fe(()=>{Ge.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let s=0;s{Ge.replace()}),console.log("Chatbar mounted"),qe.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.status),console.log("active_tts_service: ",this.$store.state.config.active_tts_service),console.log("is_rt_on: ",this.$store.state.is_rt_on)}),this.$store.dispatch("fetchisRTOn")},activated(){Fe(()=>{Ge.replace()})}},Dt=t=>(Mi("data-v-64fb461b"),t=t(),Di(),t),ZSt={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},JSt={key:0,class:"items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},e0t={class:"flex"},t0t=["title"],n0t=Dt(()=>l("i",{"data-feather":"list"},null,-1)),s0t=[n0t],i0t={key:0},r0t={class:"flex flex-col max-h-64"},o0t=["title"],a0t={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},l0t={key:0,filesList:"",role:"status"},c0t=Dt(()=>l("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"},[l("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"}),l("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)),d0t=Dt(()=>l("span",{class:"sr-only"},"Loading...",-1)),u0t=[c0t,d0t],p0t=Dt(()=>l("div",null,[l("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),_0t=Dt(()=>l("div",{class:"grow"},null,-1)),h0t={class:"flex flex-row items-center"},f0t={class:"whitespace-nowrap"},m0t=["onClick"],g0t=Dt(()=>l("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)),b0t=[g0t],E0t={key:1,class:"flex mx-1 w-500"},y0t={class:"whitespace-nowrap flex flex-row gap-2"},v0t=Dt(()=>l("p",{class:"font-bold"}," Total size: ",-1)),S0t=Dt(()=>l("div",{class:"grow"},null,-1)),T0t=Dt(()=>l("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)),x0t=[T0t],C0t=Dt(()=>l("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)),w0t=[C0t],R0t={key:2,class:"mx-1"},A0t={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end bg-primary"},N0t={role:"status"},O0t=["src"],I0t=Dt(()=>l("span",{class:"sr-only"},"Selecting model...",-1)),M0t={class:"flex w-fit relative grow w-full"},D0t={class:"relative text-light-text-panel dark:text-dark-text-panel grow flex h-12.5 cursor-pointer select-none items-center gap-2 bg-bg-light-panel dark:bg-bg-dark-tone p-1 shadow-sm hover:shadow-none dark:border-gray-800",tabindex:"0"},k0t={key:0,title:"Waiting for reply"},L0t=["src"],P0t=Dt(()=>l("div",{role:"status"},[l("span",{class:"sr-only"},"Loading...")],-1)),U0t={key:1,class:"w-fit group relative"},F0t={class:"hide top-50 hide opacity-0 group-hover:bottom-0 opacity-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},B0t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},G0t=["onMouseover"],V0t={class:"relative"},z0t=["onClick"],H0t=["src","title"],q0t={class:"group items-center flex flex-row"},Y0t=["src","title"],$0t={key:2,class:"w-fit group relative"},W0t={class:"hide top-50 hide opacity-0 group-hover:bottom-0 opacity-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},K0t={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},j0t=["onMouseover"],Q0t={class:"relative"},X0t=["onClick"],Z0t=["src","title"],J0t={class:"group items-center flex flex-row"},eTt=["src","title"],tTt={key:3,class:"w-fit group relative"},nTt={class:"top-50 hide opacity-0 group-hover:bottom-0 .group-hover:block fixed w-[1000px] group absolute group-hover:opacity-100 transform group-hover:translate-y-[-50px] group-hover:translate-x-[0px] transition-all duration-300"},sTt={class:"w-fit flex-wrap flex bg-white bg-opacity-50 backdrop-blur-md rounded p-4"},iTt=["onMouseover"],rTt={class:"relative"},oTt=["onClick"],aTt=["src","title"],lTt=["onClick"],cTt=Dt(()=>l("span",{class:"-top-6 -right-6 border-gray-500 absolute active:scale-90 w-7 h-7 hover:scale-150 transition bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Unmount personality"},[l("svg",{"aria-hidden":"true",class:"top-1 left-1 relative w-5 h-5 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20","stroke-width":"1",xmlns:"http://www.w3.org/2000/svg"},[l("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)),dTt=[cTt],uTt=["onClick"],pTt=Dt(()=>l("span",{class:"-top-9 left-2 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Remount"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 30 30",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("g",{id:"surface1"},[l("path",{style:{},d:"M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z "})])])],-1)),_Tt=[pTt],hTt=["onClick"],fTt=Dt(()=>l("span",{class:"-top-6 -left-6 border-gray-500 active:scale-90 absolute items-center w-7 h-7 hover:scale-150 transition text-red-200 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2",title:"Talk"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"top-1 left-1 relative w-4 h-4 text-red-600 hover:text-red-500",viewBox:"0 0 24 24",width:"2",height:"2",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},[l("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),l("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})])],-1)),mTt=[fTt],gTt={class:"w-fit"},bTt={class:"w-fit"},ETt={class:"relative grow"},yTt={class:"group relative w-max"},vTt=Dt(()=>l("i",{"data-feather":"send"},null,-1)),STt=[vTt],TTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI.")],-1)),xTt={class:"group relative w-max"},CTt=["src"],wTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Sends your message to the AI with internet search.")],-1)),RTt={class:"group relative w-max"},ATt=Dt(()=>l("i",{"data-feather":"mic"},null,-1)),NTt=[ATt],OTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Press and talk.")],-1)),ITt={key:5,class:"group relative w-max"},MTt=Dt(()=>l("i",{"data-feather":"mic"},null,-1)),DTt=[MTt],kTt=Dt(()=>l("i",{"data-feather":"mic"},null,-1)),LTt=[kTt],PTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Real time bidirectional audio mode.")],-1)),UTt={key:6,class:"group relative w-max"},FTt=Dt(()=>l("i",{"data-feather":"file-plus"},null,-1)),BTt=[FTt],GTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Send File to the AI.")],-1)),VTt={class:"group relative w-max"},zTt=Dt(()=>l("i",{"data-feather":"camera"},null,-1)),HTt=[zTt],qTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Take a shot from webcam.")],-1)),YTt={class:"group relative w-max"},$Tt=Dt(()=>l("i",{"data-feather":"globe"},null,-1)),WTt=[$Tt],KTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"Add a weblink to the discussion.")],-1)),jTt={class:"group relative w-max"},QTt=Dt(()=>l("i",{"data-feather":"message-square"},null,-1)),XTt=[QTt],ZTt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty User message.")],-1)),JTt={class:"group relative w-max"},ext=Dt(()=>l("i",{"data-feather":"message-square"},null,-1)),txt=[ext],nxt=Dt(()=>l("div",{class:"pointer-events-none absolute -top-20 left-1/2 w-max -translate-x-1/2 rounded-md bg-gray-100 p-2 opacity-0 transition-opacity group-hover:opacity-100 dark:bg-gray-800"},[l("p",{class:"max-w-sm text-sm text-gray-800 dark:text-gray-200"},"New empty ai message.")],-1)),sxt=Dt(()=>l("div",{class:"ml-auto gap-2"},null,-1));function ixt(t,e,n,s,i,r){const o=ct("MountedPersonalitiesList"),a=ct("MountedPersonalities"),c=ct("PersonalitiesCommands"),u=ct("UniversalForm");return T(),w(Ve,null,[l("form",null,[l("div",ZSt,[i.filesList.length>0||i.showPersonalities?(T(),w("div",JSt,[l("div",e0t,[l("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:i.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=ae(d=>i.showfilesList=!i.showfilesList,["stop"]))},s0t,8,t0t)]),i.filesList.length>0&&i.showfilesList==!0?(T(),w("div",i0t,[l("div",r0t,[_e(Zs,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:He(()=>[(T(!0),w(Ve,null,Je(i.filesList,(d,h)=>(T(),w("div",{key:h+"-"+d.name},[l("div",{class:"m-1",title:d.name},[l("div",a0t,[i.isFileSentList[h]?G("",!0):(T(),w("div",l0t,u0t)),p0t,l("div",{class:Ue(["line-clamp-1 w-3/5",i.isFileSentList[h]?"text-green-500":"text-red-200"])},J(d.name),3),_0t,l("div",h0t,[l("p",f0t,J(r.computedFileSize(d.size)),1),l("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:f=>r.removeItem(d)},b0t,8,m0t)])])],8,o0t)]))),128))]),_:1})])])):G("",!0),i.filesList.length>0?(T(),w("div",E0t,[l("div",y0t,[v0t,Xe(" "+J(i.totalSize)+" ("+J(i.filesList.length)+") ",1)]),S0t,l("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...d)=>r.clear_files&&r.clear_files(...d))},x0t),l("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...d)=>r.download_files&&r.download_files(...d))},w0t)])):G("",!0),i.showPersonalities?(T(),w("div",R0t,[_e(o,{ref:"mountedPersList",onShowPersList:r.onShowPersListFun,"on-mounted":r.onMountFun,"on-un-mounted":r.onUnmountFun,"on-remounted":t.onRemountFun,"on-talk":r.handleOnTalk,discussionPersonalities:r.allDiscussionPersonalities},null,8,["onShowPersList","on-mounted","on-un-mounted","on-remounted","on-talk","discussionPersonalities"])])):G("",!0)])):G("",!0),i.selecting_model||i.selecting_binding?(T(),w("div",A0t,[l("div",N0t,[l("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,O0t),I0t])])):G("",!0),l("div",M0t,[l("div",D0t,[n.loading?(T(),w("div",k0t,[l("img",{src:i.loader_v0},null,8,L0t),P0t])):G("",!0),n.loading?G("",!0):(T(),w("div",U0t,[l("div",F0t,[l("div",B0t,[(T(!0),w(Ve,null,Je(r.installedBindings,(d,h)=>(T(),w("div",{class:"w-fit h-fit inset-0 opacity-100",key:h+"-"+d.name,ref_for:!0,ref:"installedBindings",onMouseover:f=>r.showBindingHoveredIn(h),onMouseleave:e[4]||(e[4]=f=>r.showBindingHoveredOut())},[h!=r.binding_name?(T(),w("div",{key:0,class:Ue(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.bindingHoveredIndex===h?"scale-150":""])},[l("div",V0t,[l("button",{onClick:ae(f=>r.setBinding(d),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:d.icon?d.icon:i.modelImgPlaceholder,onError:e[3]||(e[3]=(...f)=>i.modelImgPlaceholder&&i.modelImgPlaceholder(...f)),class:Ue(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.bindingHoveredIndex===h?"scale-150 ":""+d.name==r.binding_name?"border-secondary":"border-transparent z-0"]),title:d.name},null,42,H0t)],8,z0t)])],2)):G("",!0)],40,G0t))),128))])]),l("div",q0t,[l("button",{onClick:e[5]||(e[5]=ae(d=>r.showModelConfig(),["prevent"])),class:"w-8 h-8"},[l("img",{src:r.currentBindingIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-200",title:r.currentBinding?r.currentBinding.name:"unknown"},null,8,Y0t)])])])),n.loading?G("",!0):(T(),w("div",$0t,[l("div",W0t,[l("div",K0t,[(T(!0),w(Ve,null,Je(r.installedModels,(d,h)=>(T(),w("div",{class:"w-fit h-fit",key:h+"-"+d.name,ref_for:!0,ref:"installedModels",onMouseover:f=>r.showModelHoveredIn(h),onMouseleave:e[7]||(e[7]=f=>r.showModelHoveredOut())},[h!=r.model_name?(T(),w("div",{key:0,class:Ue(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.modelHoveredIndex===h?"scale-150":""])},[l("div",Q0t,[l("button",{onClick:ae(f=>r.setModel(d),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:d.icon?d.icon:i.modelImgPlaceholder,onError:e[6]||(e[6]=(...f)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...f)),class:Ue(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.modelHoveredIndex===h?"scale-150 ":""+d.name==r.model_name?"border-secondary":"border-transparent z-0"]),title:d.name},null,42,Z0t)],8,X0t)])],2)):G("",!0)],40,j0t))),128))])]),l("div",J0t,[l("button",{onClick:e[8]||(e[8]=ae(d=>r.copyModelName(),["prevent"])),class:"w-8 h-8"},[l("img",{src:r.currentModelIcon,class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-400",title:r.currentModel?r.currentModel.name:"unknown"},null,8,eTt)])])])),n.loading?G("",!0):(T(),w("div",tTt,[l("div",nTt,[l("div",sTt,[(T(!0),w(Ve,null,Je(r.mountedPersonalities,(d,h)=>(T(),w("div",{class:"w-fit h-fit inset-0 opacity-100",key:h+"-"+d.name,ref_for:!0,ref:"mountedPersonalities",onMouseover:f=>r.showPersonalityHoveredIn(h),onMouseleave:e[10]||(e[10]=f=>r.showPersonalityHoveredOut())},[h!=r.personality_name?(T(),w("div",{key:0,class:Ue(["items-center flex flex-row relative z-20 hover:-translate-y-8 duration-300",i.personalityHoveredIndex===h?"scale-150":""])},[l("div",rTt,[l("button",{onClick:ae(f=>r.onPersonalitySelected(d),["prevent"]),class:"w-10 h-10 relative"},[l("img",{src:i.bUrl+d.avatar,onError:e[9]||(e[9]=(...f)=>t.personalityImgPlacehodler&&t.personalityImgPlacehodler(...f)),class:Ue(["z-50 w-10 h-10 rounded-full object-fill text-red-700 border-2 border-gray-500 active:scale-90",i.personalityHoveredIndex===h?"scale-150 ":""+this.$store.state.active_personality_id==this.$store.state.personalities.indexOf(d.full_path)?"border-secondary":"border-transparent z-0"]),title:d.name},null,42,aTt)],8,oTt),i.personalityHoveredIndex===h?(T(),w("button",{key:0,onClick:ae(f=>r.unmountPersonality(d),["prevent"])},dTt,8,lTt)):G("",!0),i.personalityHoveredIndex===h?(T(),w("button",{key:1,onClick:ae(f=>r.remount_personality(d),["prevent"])},_Tt,8,uTt)):G("",!0),i.personalityHoveredIndex===h?(T(),w("button",{key:2,onClick:ae(f=>r.handleOnTalk(d),["prevent"])},mTt,8,hTt)):G("",!0)])],2)):G("",!0)],40,iTt))),128))])]),_e(a,{ref:"mountedPers",onShowPersList:r.onShowPersListFun,onReady:r.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])])),l("div",gTt,[i.personalities_ready&&this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(T(),St(c,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):G("",!0)]),l("div",bTt,[r.isDataSourceNamesValid?(T(),St(c,{key:0,icon:"feather:book",commandsList:r.dataSourceNames,sendCommand:r.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):G("",!0)]),l("div",ETt,[U(l("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[11]||(e[11]=d=>i.message=d),title:"Hold SHIFT + ENTER to add new line",onPaste:e[12]||(e[12]=(...d)=>r.handlePaste&&r.handlePaste(...d)),class:"inline-block no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:e[13]||(e[13]=ti(ae(d=>r.submitOnEnter(d),["exact"]),["enter"]))},`\r + `,544),[[ue,i.message]])]),n.loading?(T(),w("button",{key:4,type:"button",class:"bg-red-500 dark:bg-red-800 hover:bg-red-600 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:hover:bg-bg-dark-tone focus:outline-none dark:focus:ring-blue-800",onClick:e[14]||(e[14]=ae((...d)=>r.stopGenerating&&r.stopGenerating(...d),["stop"]))}," Stop generating ")):G("",!0),l("div",yTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[15]||(e[15]=(...d)=>r.submit&&r.submit(...d)),title:"Send",class:"w-6 text-panel hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},STt)),TTt]),l("div",xTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[16]||(e[16]=(...d)=>r.submitWithInternetSearch&&r.submitWithInternetSearch(...d)),title:"Send With internet",class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},[l("img",{src:i.sendGlobe,width:"50",height:"50",style:{stroke:"currentColor",fill:"currentColor"}},null,8,CTt)])),wTt]),l("div",RTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[17]||(e[17]=(...d)=>r.startSpeechRecognition&&r.startSpeechRecognition(...d)),class:Ue([{"text-red-500":i.isListeningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"])},NTt,2)),OTt]),t.$store.state.config.active_tts_service!="None"?(T(),w("div",ITt,[i.is_rt?(T(),w("button",{key:0,type:"button",onClick:e[18]||(e[18]=(...d)=>r.stopRTCom&&r.stopRTCom(...d)),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90 bg-red-500 border borderred700 rounded-md"},DTt)):(T(),w("button",{key:1,type:"button",onClick:e[19]||(e[19]=(...d)=>r.startRTCom&&r.startRTCom(...d)),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90 bg-green-500 border border-green-700 rounded-md"},LTt)),PTt])):G("",!0),n.loading?G("",!0):(T(),w("div",UTt,[l("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[20]||(e[20]=(...d)=>r.addFiles&&r.addFiles(...d)),multiple:""},null,544),l("button",{type:"button",onClick:e[21]||(e[21]=ae((...d)=>r.add_file&&r.add_file(...d),["prevent"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},BTt),GTt])),l("div",VTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[22]||(e[22]=ae((...d)=>r.takePicture&&r.takePicture(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},HTt)),qTt]),l("div",YTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[23]||(e[23]=ae((...d)=>r.addWebLink&&r.addWebLink(...d),["stop"])),class:"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer transform transition-transform hover:translate-y-[-5px] active:scale-90"},WTt)),KTt]),l("div",jTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[24]||(e[24]=ae((...d)=>r.makeAnEmptyUserMessage&&r.makeAnEmptyUserMessage(...d),["stop"])),class:"w-6 text-gray-800 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},XTt)),ZTt]),l("div",JTt,[n.loading?G("",!0):(T(),w("button",{key:0,type:"button",onClick:e[25]||(e[25]=ae((...d)=>r.makeAnEmptyAIMessage&&r.makeAnEmptyAIMessage(...d),["stop"])),class:"w-6 text-red-400 hover:text-secondary duration-75 active:scale-90 hover:translate-y-[-5px]"},txt)),nxt])]),sxt])])]),_e(u,{ref:"universalForm",class:"z-20"},null,512)],64)}const DN=at(XSt,[["render",ixt],["__scopeId","data-v-64fb461b"]]);const rxt={name:"WelcomeComponent",setup(){const t=bD();return{logoSrc:et(()=>t.state.config&&t.state.config.app_custom_logo?`/user_infos/${t.state.config.app_custom_logo}`:ms)}}},oxt=t=>(Mi("data-v-b052c8c7"),t=t(),Di(),t),axt={class:"flex flex-col items-center justify-center w-full h-full min-h-screen bg-gradient-to-br from-indigo-100 to-purple-100 dark:from-indigo-900 dark:to-purple-900 p-8"},lxt={class:"text-center max-w-4xl"},cxt={class:"flex items-center justify-center gap-8 mb-12"},dxt={class:"relative w-24 h-24"},uxt=["src"],pxt=oxt(()=>l("div",{class:"flex flex-col items-start"},[l("h1",{class:"text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-400 dark:to-purple-400"}," LoLLMS "),l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic mt-2"}," Lord of Large Language And Multimodal Systems ")],-1)),_xt=gu('

Welcome to LoLLMS WebUI

Embark on a journey through the realm of advanced AI with LoLLMS, your ultimate companion for intelligent conversations and multimodal interactions. Unleash the power of large language models and explore new frontiers in artificial intelligence.

Discover the capabilities of LoLLMS:

  • Engage in natural language conversations
  • Generate creative content and ideas
  • Analyze complex data and provide insights
  • Assist with coding and technical tasks
  • Process and understand multimodal inputs
',1);function hxt(t,e,n,s,i,r){return T(),w("div",axt,[l("div",lxt,[l("div",cxt,[l("div",dxt,[l("img",{src:s.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,uxt)]),pxt]),_xt])])}const kN=at(rxt,[["render",hxt],["__scopeId","data-v-b052c8c7"]]);var fxt=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),Pd=globalThis&&globalThis.__assign||function(){return Pd=Object.assign||function(t){for(var e,n=1,s=arguments.length;n"u")return!1;var e=es(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Axt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var s=e.styles[n]||{},i=e.attributes[n]||{},r=e.elements[n];!gs(r)||!si(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(o){var a=i[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function Nxt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(s){var i=e.elements[s],r=e.attributes[s]||{},o=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:n[s]),a=o.reduce(function(c,u){return c[u]="",c},{});!gs(i)||!si(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(c){i.removeAttribute(c)}))})}}const Oxt={name:"applyStyles",enabled:!0,phase:"write",fn:Axt,effect:Nxt,requires:["computeStyles"]};function Js(t){return t.split("-")[0]}var Yr=Math.max,Gd=Math.min,ra=Math.round;function Ig(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function VN(){return!/^((?!chrome|android).)*safari/i.test(Ig())}function oa(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var s=t.getBoundingClientRect(),i=1,r=1;e&&gs(t)&&(i=t.offsetWidth>0&&ra(s.width)/t.offsetWidth||1,r=t.offsetHeight>0&&ra(s.height)/t.offsetHeight||1);var o=Jr(t)?es(t):window,a=o.visualViewport,c=!VN()&&n,u=(s.left+(c&&a?a.offsetLeft:0))/i,d=(s.top+(c&&a?a.offsetTop:0))/r,h=s.width/i,f=s.height/r;return{width:h,height:f,top:d,right:u+h,bottom:d+f,left:u,x:u,y:d}}function dE(t){var e=oa(t),n=t.offsetWidth,s=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:s}}function zN(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&cE(n)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Oi(t){return es(t).getComputedStyle(t)}function Ixt(t){return["table","td","th"].indexOf(si(t))>=0}function br(t){return((Jr(t)?t.ownerDocument:t.document)||window.document).documentElement}function zu(t){return si(t)==="html"?t:t.assignedSlot||t.parentNode||(cE(t)?t.host:null)||br(t)}function jx(t){return!gs(t)||Oi(t).position==="fixed"?null:t.offsetParent}function Mxt(t){var e=/firefox/i.test(Ig()),n=/Trident/i.test(Ig());if(n&&gs(t)){var s=Oi(t);if(s.position==="fixed")return null}var i=zu(t);for(cE(i)&&(i=i.host);gs(i)&&["html","body"].indexOf(si(i))<0;){var r=Oi(i);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return i;i=i.parentNode}return null}function Jl(t){for(var e=es(t),n=jx(t);n&&Ixt(n)&&Oi(n).position==="static";)n=jx(n);return n&&(si(n)==="html"||si(n)==="body"&&Oi(n).position==="static")?e:n||Mxt(t)||e}function uE(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function hl(t,e,n){return Yr(t,Gd(e,n))}function Dxt(t,e,n){var s=hl(t,e,n);return s>n?n:s}function HN(){return{top:0,right:0,bottom:0,left:0}}function qN(t){return Object.assign({},HN(),t)}function YN(t,e){return e.reduce(function(n,s){return n[s]=t,n},{})}var kxt=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,qN(typeof e!="number"?e:YN(e,Zl))};function Lxt(t){var e,n=t.state,s=t.name,i=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Js(n.placement),c=uE(a),u=[qn,ys].indexOf(a)>=0,d=u?"height":"width";if(!(!r||!o)){var h=kxt(i.padding,n),f=dE(r),m=c==="y"?Hn:qn,_=c==="y"?Es:ys,E=n.rects.reference[d]+n.rects.reference[c]-o[c]-n.rects.popper[d],b=o[c]-n.rects.reference[c],g=Jl(r),y=g?c==="y"?g.clientHeight||0:g.clientWidth||0:0,v=E/2-b/2,S=h[m],R=y-f[d]-h[_],C=y/2-f[d]/2+v,A=hl(S,C,R),D=c;n.modifiersData[s]=(e={},e[D]=A,e.centerOffset=A-C,e)}}function Pxt(t){var e=t.state,n=t.options,s=n.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||zN(e.elements.popper,i)&&(e.elements.arrow=i))}const Uxt={name:"arrow",enabled:!0,phase:"main",fn:Lxt,effect:Pxt,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function aa(t){return t.split("-")[1]}var Fxt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bxt(t,e){var n=t.x,s=t.y,i=e.devicePixelRatio||1;return{x:ra(n*i)/i||0,y:ra(s*i)/i||0}}function Qx(t){var e,n=t.popper,s=t.popperRect,i=t.placement,r=t.variation,o=t.offsets,a=t.position,c=t.gpuAcceleration,u=t.adaptive,d=t.roundOffsets,h=t.isFixed,f=o.x,m=f===void 0?0:f,_=o.y,E=_===void 0?0:_,b=typeof d=="function"?d({x:m,y:E}):{x:m,y:E};m=b.x,E=b.y;var g=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),v=qn,S=Hn,R=window;if(u){var C=Jl(n),A="clientHeight",D="clientWidth";if(C===es(n)&&(C=br(n),Oi(C).position!=="static"&&a==="absolute"&&(A="scrollHeight",D="scrollWidth")),C=C,i===Hn||(i===qn||i===ys)&&r===Pl){S=Es;var x=h&&C===R&&R.visualViewport?R.visualViewport.height:C[A];E-=x-s.height,E*=c?1:-1}if(i===qn||(i===Hn||i===Es)&&r===Pl){v=ys;var O=h&&C===R&&R.visualViewport?R.visualViewport.width:C[D];m-=O-s.width,m*=c?1:-1}}var B=Object.assign({position:a},u&&Fxt),z=d===!0?Bxt({x:m,y:E},es(n)):{x:m,y:E};if(m=z.x,E=z.y,c){var Z;return Object.assign({},B,(Z={},Z[S]=y?"0":"",Z[v]=g?"0":"",Z.transform=(R.devicePixelRatio||1)<=1?"translate("+m+"px, "+E+"px)":"translate3d("+m+"px, "+E+"px, 0)",Z))}return Object.assign({},B,(e={},e[S]=y?E+"px":"",e[v]=g?m+"px":"",e.transform="",e))}function Gxt(t){var e=t.state,n=t.options,s=n.gpuAcceleration,i=s===void 0?!0:s,r=n.adaptive,o=r===void 0?!0:r,a=n.roundOffsets,c=a===void 0?!0:a,u={placement:Js(e.placement),variation:aa(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Qx(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Qx(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Vxt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Gxt,data:{}};var xc={passive:!0};function zxt(t){var e=t.state,n=t.instance,s=t.options,i=s.scroll,r=i===void 0?!0:i,o=s.resize,a=o===void 0?!0:o,c=es(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&u.forEach(function(d){d.addEventListener("scroll",n.update,xc)}),a&&c.addEventListener("resize",n.update,xc),function(){r&&u.forEach(function(d){d.removeEventListener("scroll",n.update,xc)}),a&&c.removeEventListener("resize",n.update,xc)}}const Hxt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zxt,data:{}};var qxt={left:"right",right:"left",bottom:"top",top:"bottom"};function gd(t){return t.replace(/left|right|bottom|top/g,function(e){return qxt[e]})}var Yxt={start:"end",end:"start"};function Xx(t){return t.replace(/start|end/g,function(e){return Yxt[e]})}function pE(t){var e=es(t),n=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:n,scrollTop:s}}function _E(t){return oa(br(t)).left+pE(t).scrollLeft}function $xt(t,e){var n=es(t),s=br(t),i=n.visualViewport,r=s.clientWidth,o=s.clientHeight,a=0,c=0;if(i){r=i.width,o=i.height;var u=VN();(u||!u&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:o,x:a+_E(t),y:c}}function Wxt(t){var e,n=br(t),s=pE(t),i=(e=t.ownerDocument)==null?void 0:e.body,r=Yr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Yr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+_E(t),c=-s.scrollTop;return Oi(i||n).direction==="rtl"&&(a+=Yr(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:o,x:a,y:c}}function hE(t){var e=Oi(t),n=e.overflow,s=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function $N(t){return["html","body","#document"].indexOf(si(t))>=0?t.ownerDocument.body:gs(t)&&hE(t)?t:$N(zu(t))}function fl(t,e){var n;e===void 0&&(e=[]);var s=$N(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),r=es(s),o=i?[r].concat(r.visualViewport||[],hE(s)?s:[]):s,a=e.concat(o);return i?a:a.concat(fl(zu(o)))}function Mg(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Kxt(t,e){var n=oa(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Zx(t,e,n){return e===BN?Mg($xt(t,n)):Jr(e)?Kxt(e,n):Mg(Wxt(br(t)))}function jxt(t){var e=fl(zu(t)),n=["absolute","fixed"].indexOf(Oi(t).position)>=0,s=n&&gs(t)?Jl(t):t;return Jr(s)?e.filter(function(i){return Jr(i)&&zN(i,s)&&si(i)!=="body"}):[]}function Qxt(t,e,n,s){var i=e==="clippingParents"?jxt(t):[].concat(e),r=[].concat(i,[n]),o=r[0],a=r.reduce(function(c,u){var d=Zx(t,u,s);return c.top=Yr(d.top,c.top),c.right=Gd(d.right,c.right),c.bottom=Gd(d.bottom,c.bottom),c.left=Yr(d.left,c.left),c},Zx(t,o,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function WN(t){var e=t.reference,n=t.element,s=t.placement,i=s?Js(s):null,r=s?aa(s):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,c;switch(i){case Hn:c={x:o,y:e.y-n.height};break;case Es:c={x:o,y:e.y+e.height};break;case ys:c={x:e.x+e.width,y:a};break;case qn:c={x:e.x-n.width,y:a};break;default:c={x:e.x,y:e.y}}var u=i?uE(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(r){case ia:c[u]=c[u]-(e[d]/2-n[d]/2);break;case Pl:c[u]=c[u]+(e[d]/2-n[d]/2);break}}return c}function Ul(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=s===void 0?t.placement:s,r=n.strategy,o=r===void 0?t.strategy:r,a=n.boundary,c=a===void 0?mxt:a,u=n.rootBoundary,d=u===void 0?BN:u,h=n.elementContext,f=h===void 0?Ka:h,m=n.altBoundary,_=m===void 0?!1:m,E=n.padding,b=E===void 0?0:E,g=qN(typeof b!="number"?b:YN(b,Zl)),y=f===Ka?gxt:Ka,v=t.rects.popper,S=t.elements[_?y:f],R=Qxt(Jr(S)?S:S.contextElement||br(t.elements.popper),c,d,o),C=oa(t.elements.reference),A=WN({reference:C,element:v,strategy:"absolute",placement:i}),D=Mg(Object.assign({},v,A)),x=f===Ka?D:C,O={top:R.top-x.top+g.top,bottom:x.bottom-R.bottom+g.bottom,left:R.left-x.left+g.left,right:x.right-R.right+g.right},B=t.modifiersData.offset;if(f===Ka&&B){var z=B[i];Object.keys(O).forEach(function(Z){var M=[ys,Es].indexOf(Z)>=0?1:-1,q=[Hn,Es].indexOf(Z)>=0?"y":"x";O[Z]+=z[q]*M})}return O}function Xxt(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?GN:c,d=aa(s),h=d?a?Kx:Kx.filter(function(_){return aa(_)===d}):Zl,f=h.filter(function(_){return u.indexOf(_)>=0});f.length===0&&(f=h);var m=f.reduce(function(_,E){return _[E]=Ul(t,{placement:E,boundary:i,rootBoundary:r,padding:o})[Js(E)],_},{});return Object.keys(m).sort(function(_,E){return m[_]-m[E]})}function Zxt(t){if(Js(t)===lE)return[];var e=gd(t);return[Xx(t),e,Xx(e)]}function Jxt(t){var e=t.state,n=t.options,s=t.name;if(!e.modifiersData[s]._skip){for(var i=n.mainAxis,r=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!0:o,c=n.fallbackPlacements,u=n.padding,d=n.boundary,h=n.rootBoundary,f=n.altBoundary,m=n.flipVariations,_=m===void 0?!0:m,E=n.allowedAutoPlacements,b=e.options.placement,g=Js(b),y=g===b,v=c||(y||!_?[gd(b)]:Zxt(b)),S=[b].concat(v).reduce(function(Ee,Oe){return Ee.concat(Js(Oe)===lE?Xxt(e,{placement:Oe,boundary:d,rootBoundary:h,padding:u,flipVariations:_,allowedAutoPlacements:E}):Oe)},[]),R=e.rects.reference,C=e.rects.popper,A=new Map,D=!0,x=S[0],O=0;O=0,q=M?"width":"height",H=Ul(e,{placement:B,boundary:d,rootBoundary:h,altBoundary:f,padding:u}),P=M?Z?ys:qn:Z?Es:Hn;R[q]>C[q]&&(P=gd(P));var $=gd(P),ee=[];if(r&&ee.push(H[z]<=0),a&&ee.push(H[P]<=0,H[$]<=0),ee.every(function(Ee){return Ee})){x=B,D=!1;break}A.set(B,ee)}if(D)for(var re=_?3:1,me=function(Oe){var Me=S.find(function(j){var he=A.get(j);if(he)return he.slice(0,Oe).every(function(pe){return pe})});if(Me)return x=Me,"break"},Se=re;Se>0;Se--){var le=me(Se);if(le==="break")break}e.placement!==x&&(e.modifiersData[s]._skip=!0,e.placement=x,e.reset=!0)}}const eCt={name:"flip",enabled:!0,phase:"main",fn:Jxt,requiresIfExists:["offset"],data:{_skip:!1}};function Jx(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function eC(t){return[Hn,ys,Es,qn].some(function(e){return t[e]>=0})}function tCt(t){var e=t.state,n=t.name,s=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,o=Ul(e,{elementContext:"reference"}),a=Ul(e,{altBoundary:!0}),c=Jx(o,s),u=Jx(a,i,r),d=eC(c),h=eC(u);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const nCt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:tCt};function sCt(t,e,n){var s=Js(t),i=[qn,Hn].indexOf(s)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*i,[qn,ys].indexOf(s)>=0?{x:a,y:o}:{x:o,y:a}}function iCt(t){var e=t.state,n=t.options,s=t.name,i=n.offset,r=i===void 0?[0,0]:i,o=GN.reduce(function(d,h){return d[h]=sCt(h,e.rects,r),d},{}),a=o[e.placement],c=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[s]=o}const rCt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:iCt};function oCt(t){var e=t.state,n=t.name;e.modifiersData[n]=WN({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const aCt={name:"popperOffsets",enabled:!0,phase:"read",fn:oCt,data:{}};function lCt(t){return t==="x"?"y":"x"}function cCt(t){var e=t.state,n=t.options,s=t.name,i=n.mainAxis,r=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!1:o,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.padding,f=n.tether,m=f===void 0?!0:f,_=n.tetherOffset,E=_===void 0?0:_,b=Ul(e,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),g=Js(e.placement),y=aa(e.placement),v=!y,S=uE(g),R=lCt(S),C=e.modifiersData.popperOffsets,A=e.rects.reference,D=e.rects.popper,x=typeof E=="function"?E(Object.assign({},e.rects,{placement:e.placement})):E,O=typeof x=="number"?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,z={x:0,y:0};if(C){if(r){var Z,M=S==="y"?Hn:qn,q=S==="y"?Es:ys,H=S==="y"?"height":"width",P=C[S],$=P+b[M],ee=P-b[q],re=m?-D[H]/2:0,me=y===ia?A[H]:D[H],Se=y===ia?-D[H]:-A[H],le=e.elements.arrow,Ee=m&&le?dE(le):{width:0,height:0},Oe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:HN(),Me=Oe[M],j=Oe[q],he=hl(0,A[H],Ee[H]),pe=v?A[H]/2-re-he-Me-O.mainAxis:me-he-Me-O.mainAxis,Ce=v?-A[H]/2+re+he+j+O.mainAxis:Se+he+j+O.mainAxis,ke=e.elements.arrow&&Jl(e.elements.arrow),N=ke?S==="y"?ke.clientTop||0:ke.clientLeft||0:0,V=(Z=B==null?void 0:B[S])!=null?Z:0,Y=P+pe-V-N,oe=P+Ce-V,se=hl(m?Gd($,Y):$,P,m?Yr(ee,oe):ee);C[S]=se,z[S]=se-P}if(a){var Te,Ae=S==="x"?Hn:qn,ne=S==="x"?Es:ys,we=C[R],ge=R==="y"?"height":"width",De=we+b[Ae],L=we-b[ne],I=[Hn,qn].indexOf(g)!==-1,W=(Te=B==null?void 0:B[R])!=null?Te:0,ye=I?De:we-A[ge]-D[ge]-W+O.altAxis,K=I?we+A[ge]+D[ge]-W-O.altAxis:L,te=m&&I?Dxt(ye,we,K):hl(m?ye:De,we,m?K:L);C[R]=te,z[R]=te-we}e.modifiersData[s]=z}}const dCt={name:"preventOverflow",enabled:!0,phase:"main",fn:cCt,requiresIfExists:["offset"]};function uCt(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function pCt(t){return t===es(t)||!gs(t)?pE(t):uCt(t)}function _Ct(t){var e=t.getBoundingClientRect(),n=ra(e.width)/t.offsetWidth||1,s=ra(e.height)/t.offsetHeight||1;return n!==1||s!==1}function hCt(t,e,n){n===void 0&&(n=!1);var s=gs(e),i=gs(e)&&_Ct(e),r=br(e),o=oa(t,i,n),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!n)&&((si(e)!=="body"||hE(r))&&(a=pCt(e)),gs(e)?(c=oa(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):r&&(c.x=_E(r))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function fCt(t){var e=new Map,n=new Set,s=[];t.forEach(function(r){e.set(r.name,r)});function i(r){n.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var c=e.get(a);c&&i(c)}}),s.push(r)}return t.forEach(function(r){n.has(r.name)||i(r)}),s}function mCt(t){var e=fCt(t);return Rxt.reduce(function(n,s){return n.concat(e.filter(function(i){return i.phase===s}))},[])}function gCt(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function bCt(t){var e=t.reduce(function(n,s){var i=n[s.name];return n[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,n},{});return Object.keys(e).map(function(n){return e[n]})}var tC={placement:"bottom",modifiers:[],strategy:"absolute"};function nC(){for(var t=arguments.length,e=new Array(t),n=0;n(Mi("data-v-1219cfc9"),t=t(),Di(),t),RCt={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center bg-gradient-to-br from-blue-100 to-purple-100 dark:from-blue-900 dark:to-purple-900"},ACt={class:"flex flex-col items-center text-center max-w-4xl w-full px-4"},NCt={class:"mb-8 w-full"},OCt={class:"text-5xl md:text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-400 dark:to-purple-400 mb-2"},ICt=kt(()=>l("p",{class:"text-2xl text-gray-600 dark:text-gray-300 italic"}," One tool to rule them all ",-1)),MCt=kt(()=>l("p",{class:"text-xl text-gray-500 dark:text-gray-400 mb-6"}," by ParisNeo ",-1)),DCt={class:"w-full h-24 relative overflow-hidden bg-gradient-to-r from-blue-200 to-purple-200 dark:from-blue-800 dark:to-purple-800 rounded-full shadow-lg"},kCt={class:"w-full max-w-2xl"},LCt=kt(()=>l("h2",{class:"text-3xl font-semibold text-gray-800 dark:text-gray-200 mb-6"}," Welcome ",-1)),PCt={role:"status",class:"w-full"},UCt={class:"text-xl text-gray-700 dark:text-gray-300"},FCt={class:"text-2xl font-bold text-blue-600 dark:text-blue-400 mt-2"},BCt=kt(()=>l("i",{"data-feather":"chevron-right"},null,-1)),GCt=[BCt],VCt=kt(()=>l("i",{"data-feather":"chevron-left"},null,-1)),zCt=[VCt],HCt=gu('',1),qCt=[HCt],YCt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},$Ct={class:"text-light-text-panel dark:text-dark-text-panel bg-bg-light-panel sticky z-10 top-0 dark:bg-bg-dark-tone shadow-md"},WCt={class:"flex-row p-4 flex items-center gap-3 flex-0"},KCt=kt(()=>l("i",{"data-feather":"plus"},null,-1)),jCt=[KCt],QCt=kt(()=>l("i",{"data-feather":"check-square"},null,-1)),XCt=[QCt],ZCt={class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Reset database, remove all discussions"},JCt=kt(()=>l("i",{"data-feather":"database"},null,-1)),e1t=[JCt],t1t=kt(()=>l("i",{"data-feather":"log-in"},null,-1)),n1t=[t1t],s1t=kt(()=>l("i",{"data-feather":"folder"},null,-1)),i1t=[s1t],r1t={key:1,class:"dropdown"},o1t=kt(()=>l("i",{"data-feather":"search"},null,-1)),a1t=[o1t],l1t={key:2,class:"flex gap-3 flex-1 items-center duration-75"},c1t=kt(()=>l("i",{"data-feather":"x"},null,-1)),d1t=[c1t],u1t=kt(()=>l("i",{"data-feather":"check"},null,-1)),p1t=[u1t],_1t=kt(()=>l("i",{"data-feather":"hard-drive"},null,-1)),h1t=[_1t],f1t=kt(()=>l("i",{"data-feather":"check-circle"},null,-1)),m1t=[f1t],g1t=kt(()=>l("i",{"data-feather":"x-octagon"},null,-1)),b1t=[g1t],E1t=kt(()=>l("i",{"data-feather":"book"},null,-1)),y1t=[E1t],v1t={key:7,title:"Loading..",class:"flex flex-row flex-grow justify-end"},S1t=kt(()=>l("div",{role:"status"},[l("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"},[l("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"}),l("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"})]),l("span",{class:"sr-only"},"Loading...")],-1)),T1t=[S1t],x1t={key:0,class:"flex-row items-center gap-3 flex-0 w-full"},C1t={class:"p-4 pt-2"},w1t={class:"relative"},R1t=kt(()=>l("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[l("div",{class:"scale-75"},[l("i",{"data-feather":"search"})])],-1)),A1t={class:"absolute inset-y-0 right-0 flex items-center pr-3"},N1t=kt(()=>l("i",{"data-feather":"x"},null,-1)),O1t=[N1t],I1t={key:1,class:"h-px bg-bg-light p-0 mb-4 px-4 mx-4 border-0 dark:bg-bg-dark"},M1t={key:2,class:"flex flex-row flex-grow p-4 pt-0 items-center"},D1t={class:"flex flex-row flex-grow"},k1t={key:0},L1t={class:"flex flex-row"},P1t={key:0,class:"flex gap-3"},U1t=kt(()=>l("i",{"data-feather":"trash"},null,-1)),F1t=[U1t],B1t={key:1,class:"flex gap-3 mx-3 flex-1 items-center justify-end group-hover:visible duration-75"},G1t=kt(()=>l("i",{"data-feather":"check"},null,-1)),V1t=[G1t],z1t=kt(()=>l("i",{"data-feather":"x"},null,-1)),H1t=[z1t],q1t={class:"flex gap-3"},Y1t=kt(()=>l("i",{"data-feather":"codepen"},null,-1)),$1t=[Y1t],W1t=kt(()=>l("i",{"data-feather":"folder"},null,-1)),K1t=[W1t],j1t=kt(()=>l("i",{"data-feather":"bookmark"},null,-1)),Q1t=[j1t],X1t=kt(()=>l("i",{"data-feather":"list"},null,-1)),Z1t=[X1t],J1t={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},ewt={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},twt=kt(()=>l("p",{class:"px-3"},"No discussions are found",-1)),nwt=[twt],swt=kt(()=>l("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex flex-grow"},null,-1)),iwt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},rwt={key:2,class:"relative flex flex-col flex-grow"},owt={class:"container pt-4 pb-50 mb-50 w-full"},awt={key:0,class:"w-full 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 overflow-hidden p-4 pb-2 h-[600px]"},lwt=kt(()=>l("h2",{class:"text-2xl font-bold mb-4"},"Prompt examples",-1)),cwt={key:0,class:"overflow-y-auto flex-grow pr-2 custom-scrollbar"},dwt={class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-2"},uwt=["onClick"],pwt=["title"],_wt={class:"absolute inset-0 overflow-hidden"},hwt=kt(()=>l("div",{class:"absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-white dark:to-gray-800 group-hover:opacity-0 transition-opacity duration-300"},null,-1)),fwt=kt(()=>l("div",{class:"mt-2 text-sm text-gray-500 dark:text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}," Click to select ",-1)),mwt=kt(()=>l("div",null,[l("br"),l("br"),l("br"),l("br"),l("br"),l("br"),l("br")],-1)),gwt=kt(()=>l("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1)),bwt={key:0,class:"flex flex-row items-center justify-center h-10"},Ewt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-1/2 bg-bg-light-tone dark:bg-bg-dark-tone h-full"},ywt={ref:"isolatedContent",class:"h-full"},vwt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},Swt={class:"text-2xl animate-pulse mt-2 text-light-text-panel dark:text-dark-text-panel"},Twt={setup(){},data(){return{lastMessageHtml:"",defaultMessageHtml:` @@ -243,7 +243,7 @@ Error: `+e.error,4,!1)},async unmount_personality(t){if(!t)return{status:!1,erro - `,memory_icon:fCt,active_skills:mCt,inactive_skills:gCt,skillsRegistry:bCt,robot:ECt,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CHUNK:0,MSG_TYPE_FULL:1,MSG_TYPE_FULL_INVISIBLE_TO_AI:2,MSG_TYPE_FULL_INVISIBLE_TO_USER:3,MSG_TYPE_EXCEPTION:4,MSG_TYPE_WARNING:5,MSG_TYPE_INFO:6,MSG_TYPE_STEP:7,MSG_TYPE_STEP_START:8,MSG_TYPE_STEP_PROGRESS:9,MSG_TYPE_STEP_END:10,MSG_TYPE_JSON_INFOS:11,MSG_TYPE_REF:12,MSG_TYPE_CODE:13,MSG_TYPE_UI:14,MSG_TYPE_NEW_MESSAGE:15,MSG_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,leftPanelCollapsed:!1,rightPanelCollapsed:!0,isOpen:!1,discussion_id:0}},methods:{selectPrompt(t){this.$refs.chatBox.message=t},extractHtml(){if(this.discussionArr.length>0){const t=this.discussionArr[this.discussionArr.length-1].content,e="```html",n="```";let s=t.indexOf(e);if(s===-1)return this.lastMessageHtml=this.defaultMessageHtml,this.renderIsolatedContent(),this.defaultMessageHtml;s+=e.length;let i=t.indexOf(n,s);i===-1?this.lastMessageHtml=t.slice(s).trim():this.lastMessageHtml=t.slice(s,i).trim()}else this.lastMessageHtml=this.defaultMessageHtml;this.renderIsolatedContent()},renderIsolatedContent(){const t=document.createElement("iframe");if(t.style.border="none",t.style.width="100%",t.style.height="100%",this.$refs.isolatedContent){this.$refs.isolatedContent.innerHTML="",this.$refs.isolatedContent.appendChild(t);const e=t.contentDocument||t.contentWindow.document;e.open(),e.write(` + `,memory_icon:SCt,active_skills:TCt,inactive_skills:xCt,skillsRegistry:CCt,robot:wCt,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CHUNK:0,MSG_TYPE_FULL:1,MSG_TYPE_FULL_INVISIBLE_TO_AI:2,MSG_TYPE_FULL_INVISIBLE_TO_USER:3,MSG_TYPE_EXCEPTION:4,MSG_TYPE_WARNING:5,MSG_TYPE_INFO:6,MSG_TYPE_STEP:7,MSG_TYPE_STEP_START:8,MSG_TYPE_STEP_PROGRESS:9,MSG_TYPE_STEP_END:10,MSG_TYPE_JSON_INFOS:11,MSG_TYPE_REF:12,MSG_TYPE_CODE:13,MSG_TYPE_UI:14,MSG_TYPE_NEW_MESSAGE:15,MSG_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isSearch:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,leftPanelCollapsed:!1,rightPanelCollapsed:!0,isOpen:!1,discussion_id:0}},methods:{selectPrompt(t){this.$refs.chatBox.message=t},extractHtml(){if(this.discussionArr.length>0){const t=this.discussionArr[this.discussionArr.length-1].content,e="```html",n="```";let s=t.indexOf(e);if(s===-1)return this.lastMessageHtml=this.defaultMessageHtml,this.renderIsolatedContent(),this.defaultMessageHtml;s+=e.length;let i=t.indexOf(n,s);i===-1?this.lastMessageHtml=t.slice(s).trim():this.lastMessageHtml=t.slice(s,i).trim()}else this.lastMessageHtml=this.defaultMessageHtml;this.renderIsolatedContent()},renderIsolatedContent(){const t=document.createElement("iframe");if(t.style.border="none",t.style.width="100%",t.style.height="100%",this.$refs.isolatedContent){this.$refs.isolatedContent.innerHTML="",this.$refs.isolatedContent.appendChild(t);const e=t.contentDocument||t.contentWindow.document;e.open(),e.write(` ${this.lastMessageHtml} `),e.close()}},async triggerRobotAction(){this.rightPanelCollapsed=!this.rightPanelCollapsed,this.rightPanelCollapsed||(this.leftPanelCollapsed=!0,this.$nextTick(()=>{this.extractHtml()})),console.log(this.rightPanelCollapsed)},add_webpage(){console.log("addWebLink received"),this.$refs.web_url_input_box.showPanel()},addWebpage(){de.post("/add_webpage",{client_id:this.client_id,url:this.$refs.web_url_input_box.inputText},{headers:this.posts_headers}).then(t=>{t&&t.status&&(console.log("Done"),this.recoverFiles())})},show_progress(t){this.progress_visibility_val=!0},hide_progress(t){this.progress_visibility_val=!1},update_progress(t){console.log("Progress update"),this.progress_value=t.value},onSettingsBinding(){try{this.isLoading=!0,de.get("/get_active_binding_settings").then(t=>{if(this.isLoading=!1,t)if(t.data&&Object.keys(t.data).length>0){const e=this.$store.state.bindingsZoo.find(n=>n.name==this.state.config.binding_name);this.$store.state.universalForm.showForm(t.data,"Binding settings - "+e.binding.name,"Save changes","Cancel").then(n=>{try{de.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:n}).then(s=>{s&&s.data?(console.log("binding set with new settings",s.data),this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0)):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+s,4,!1),this.isLoading=!1)})}catch(s){this.$store.state.toast.showToast(`Did not get binding settings responses. @@ -256,15 +256,15 @@ ${e} ${c}`;navigator.clipboard.writeText(u)}else navigator.clipboard.writeText(e);this.$store.state.toast.showToast("Copied to clipboard successfully",4,!0),Fe(()=>{Ge.replace()})},closeToast(){this.showToast=!1},saveJSONtoFile(t,e){e=e||"data.json";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([JSON.stringify(t,null,2)],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},saveMarkdowntoFile(t,e){e=e||"data.md";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([t],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},parseJsonObj(t){try{return JSON.parse(t)}catch(e){return this.$store.state.toast.showToast(`Could not parse JSON. `+e.message,4,!1),null}},async parseJsonFile(t){return new Promise((e,n)=>{const s=new FileReader;s.onload=i=>e(this.parseJsonObj(i.target.result)),s.onerror=i=>n(i),s.readAsText(t)})},async exportDiscussionsAsMarkdown(){const t=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){console.log("export",t);let e=new Date;const n=e.getFullYear(),s=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),u="discussions_export_"+(n+"."+s+"."+i+"."+r+o+a)+".md";this.loading=!0;const d=await this.export_multiple_discussions(t,"markdown");d?(this.saveMarkdowntoFile(d,u),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async exportDiscussions(){},async exportDiscussionsAsJson(){const t=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){console.log("export",t);let e=new Date;const n=e.getFullYear(),s=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),u="discussions_export_"+(n+"."+s+"."+i+"."+r+o+a)+".json";this.loading=!0;const d=await this.export_multiple_discussions(t,"json");d?(this.saveJSONtoFile(d,u),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async importDiscussionsBundle(t){},async importDiscussions(t){const e=await this.parseJsonFile(t.target.files[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1)},async getPersonalityAvatars(){for(;this.$store.state.personalities===null;)await new Promise(e=>setTimeout(e,100));let t=this.$store.state.personalities;this.personalityAvatars=t.map(e=>({name:e.name,avatar:e.avatar}))},getAvatar(t){if(t.toLowerCase().trim()==this.$store.state.config.user_name.toLowerCase().trim())return"user_infos/"+this.$store.state.config.user_avatar;const e=this.personalityAvatars.findIndex(s=>s.name===t),n=this.personalityAvatars[e];if(n)return console.log("Avatar",n.avatar),n.avatar},setFileListChat(t){try{this.$refs.chatBox.fileList=this.$refs.chatBox.fileList.concat(t)}catch(e){this.$store.state.toast.showToast(`Failed to set filelist in chatbox -`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(t){if(t.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){console.log("Created discussions view");const e=(await de.get("/get_versionID")).data.versionId;qe.onopen=()=>{console.log("WebSocket connection established."),this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{Ge.replace()}),console.log("Connected to socket io");try{this.$store.state.loading_infos="Getting version",this.$store.state.loading_progress=30,await this.$store.dispatch("getVersion")}catch(n){console.log("Error cought:",n)}try{for(this.$store.state.loading_infos="Loading Configuration";qe.id===void 0;)await new Promise(n=>setTimeout(n,100));this.$store.state.client_id=qe.id,console.log(this.$store.state.client_id),await this.$store.dispatch("refreshConfig"),console.log("Config ready")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Loading Database",this.$store.state.loading_progress=20,await this.$store.dispatch("refreshDatabase")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting Bindings list",this.$store.state.loading_progress=40,await this.$store.dispatch("refreshBindings")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting personalities zoo",this.$store.state.loading_progress=70,await this.$store.dispatch("refreshPersonalitiesZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting mounted personalities",this.$store.state.loading_progress=80,await this.$store.dispatch("refreshMountedPersonalities")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting models zoo",this.$store.state.loading_progress=90,await this.$store.dispatch("refreshModelsZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting active models",this.$store.state.loading_progress=100,await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshModelStatus")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchisRTOn")}catch(n){console.log("Error cought:",n)}this.$store.state.isConnected=!0,this.$store.state.client_id=qe.id,console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,this.$store.state.ready=!0,qe.on("connected",this.socketIOConnected),qe.on("disconnected",this.socketIODisconnected),console.log("Added events"),qe.on("show_progress",this.show_progress),qe.on("hide_progress",this.hide_progress),qe.on("update_progress",this.update_progress),qe.on("notification",this.notify),qe.on("new_message",this.new_message),qe.on("update_message",this.streamMessageContent),qe.on("close_message",this.finalMsgEvent),qe.on("disucssion_renamed",n=>{console.log("Received new title",n.discussion_id,n.title);const s=this.list.findIndex(r=>r.id==n.discussion_id),i=this.list[s];i.title=n.title}),qe.onclose=n=>{console.log("WebSocket connection closed:",n.code,n.reason),this.socketIODisconnected()},qe.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),qe.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),qe.disconnect()}},async mounted(){qe.on("refresh_files",()=>{this.recoverFiles()}),this.$nextTick(()=>{Ge.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Fe(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:nE,Message:MN,ChatBox:DN,WelcomeComponent:kN,ChoiceDialog:tE,ProgressBar:Fu,InputBox:NN,SkillsLibraryViewer:ON},watch:{messages:{handler:"extractHtml",deep:!0},progress_visibility_val(t){console.log("progress_visibility changed to "+t)},filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){Fe(()=>{Ge.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){Fe(()=>{Ge.replace()})},isSearch(){Fe(()=>{Ge.replace()})}},computed:{...LD({versionId:t=>t.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?" v"+this.$store.state.version:""}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(t){this.$store.state.isModelOk=t}},isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},personality(){console.log("personality:",this.$store.state.config.personalities[this.$store.state.config.active_personality_id]);const t=this.$store.state.config.personalities[this.$store.state.config.active_personality_id];console.log("peronslities",this.$store.state.personalities[0]);const e=this.$store.state.personalities.find(n=>n.full_path===t);return console.log("personality:",e),e},prompts_list(){return console.log(this.personality.prompts_list),this.personality.prompts_list},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady(){return this.$store.state.ready},databases(){return this.$store.state.databases},client_id(){return qe.id},showLeftPanel(){return this.$store.state.ready&&!this.leftPanelCollapsed},showRightPanel(){return this.$store.state.ready&&!this.rightPanelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Fe(()=>{Ge.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},gwt=Object.assign(mwt,{__name:"DiscussionsView",setup(t){return Li(()=>{eO()}),de.defaults.baseURL="/",(e,n)=>(T(),w(Ve,null,[_e(Ds,{name:"fade-and-fly"},{default:He(()=>[e.isReady?G("",!0):(T(),w("div",yCt,[l("div",vCt,[l("div",SCt,[l("h1",TCt," LoLLMS "+J(e.version_info),1),xCt,CCt,l("div",wCt,[l("img",{class:"w-24 h-24 rounded-full absolute top-0 transition-all duration-300 ease-linear",style:$t({left:`calc(${e.loading_progress}% - 3rem)`}),title:"LoLLMS WebUI",src:ms,alt:"Logo"},null,4)])]),l("div",RCt,[ACt,l("div",NCt,[l("p",OCt,J(e.loading_infos)+"... ",1),l("p",ICt,J(Math.round(e.loading_progress))+"% ",1)])])])]))]),_:1}),e.isReady?(T(),w("button",{key:0,onClick:n[0]||(n[0]=(...s)=>e.togglePanel&&e.togglePanel(...s)),class:"absolute top-2 left-2 p-3 bg-white bg-opacity-0 cursor-pointer transition-all duration-300 hover:scale-110 hover:bg-opacity-20 hover:shadow-xl group"},[U(l("div",null,DCt,512),[[wt,e.leftPanelCollapsed]]),U(l("div",null,LCt,512),[[wt,!e.leftPanelCollapsed]])])):G("",!0),e.isReady?(T(),w("button",{key:1,onClick:n[1]||(n[1]=ae(s=>e.triggerRobotAction(),["stop"])),class:"absolute z-50 bottom-20 right-2 p-3 bg-white bg-opacity-10 rounded-full cursor-pointer transition-all duration-300 hover:scale-110 hover:bg-opacity-20 animate-pulse shadow-lg hover:shadow-xl group"},UCt)):G("",!0),_e(Ds,{name:"slide-right"},{default:He(()=>[e.showLeftPanel?(T(),w("div",FCt,[l("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:n[29]||(n[29]=ae(s=>e.setDropZoneDiscussion(),["stop","prevent"]))},[l("div",BCt,[l("div",GCt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[2]||(n[2]=s=>e.createNewDiscussion())},zCt),l("button",{class:Ue(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:n[3]||(n[3]=s=>e.isCheckbox=!e.isCheckbox)},qCt,2),l("button",YCt,[l("i",{"data-feather":"trash-2",onClick:n[4]||(n[4]=ae(()=>{},["stop"]))})]),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:n[5]||(n[5]=ae(s=>e.database_selectorDialogVisible=!0,["stop"]))},WCt),l("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:n[6]||(n[6]=(...s)=>e.importDiscussions&&e.importDiscussions(...s))},null,544),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:n[7]||(n[7]=ae(s=>e.$refs.fileDialog.click(),["stop"]))},jCt),l("input",{type:"file",ref:"bundleLoadingDialog",style:{display:"none"},onChange:n[8]||(n[8]=(...s)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...s))},null,544),e.showSaveConfirmation?G("",!0):(T(),w("button",{key:0,title:"Import discussion bundle",onClick:n[9]||(n[9]=ae(s=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-2xl hover:text-secondary duration-75 active:scale-90"},XCt)),e.isOpen?(T(),w("div",ZCt,[l("button",{onClick:n[10]||(n[10]=(...s)=>e.importDiscussions&&e.importDiscussions(...s))},"LOLLMS"),l("button",{onClick:n[11]||(n[11]=(...s)=>e.importChatGPT&&e.importChatGPT(...s))},"ChatGPT")])):G("",!0),l("button",{class:Ue(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:n[12]||(n[12]=s=>e.isSearch=!e.isSearch)},e1t,2),e.showSaveConfirmation?(T(),w("div",t1t,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:n[13]||(n[13]=ae(s=>e.showSaveConfirmation=!1,["stop"]))},s1t),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:n[14]||(n[14]=ae(s=>e.save_configuration(),["stop"]))},r1t)])):G("",!0),e.loading?G("",!0):(T(),w("button",{key:3,type:"button",onClick:n[15]||(n[15]=ae((...s)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...s),["stop"])),title:"Add this discussion content to skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},a1t)),!e.loading&&e.$store.state.config.activate_skills_lib?(T(),w("button",{key:4,type:"button",onClick:n[16]||(n[16]=ae((...s)=>e.toggleSkillsLib&&e.toggleSkillsLib(...s),["stop"])),title:"Skills database is activated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},c1t)):G("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(T(),w("button",{key:5,type:"button",onClick:n[17]||(n[17]=ae((...s)=>e.toggleSkillsLib&&e.toggleSkillsLib(...s),["stop"])),title:"Skills database is deactivated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},u1t)):G("",!0),e.loading?G("",!0):(T(),w("button",{key:6,type:"button",onClick:n[18]||(n[18]=ae((...s)=>e.showSkillsLib&&e.showSkillsLib(...s),["stop"])),title:"Show Skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},_1t)),e.loading?(T(),w("div",h1t,m1t)):G("",!0)]),e.isSearch?(T(),w("div",g1t,[l("div",b1t,[l("div",E1t,[y1t,l("div",v1t,[l("div",{class:Ue(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[19]||(n[19]=s=>e.filterTitle="")},T1t,2)]),U(l("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":n[20]||(n[20]=s=>e.filterTitle=s),onInput:n[21]||(n[21]=s=>e.filterDiscussions())},null,544),[[ue,e.filterTitle]])])])])):G("",!0),e.isCheckbox?(T(),w("hr",x1t)):G("",!0),e.isCheckbox?(T(),w("div",C1t,[l("div",w1t,[e.selectedDiscussions.length>0?(T(),w("p",R1t,"Selected: "+J(e.selectedDiscussions.length),1)):G("",!0)]),l("div",A1t,[e.selectedDiscussions.length>0?(T(),w("div",N1t,[e.showConfirmation?G("",!0):(T(),w("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[22]||(n[22]=ae(s=>e.showConfirmation=!0,["stop"]))},I1t)),e.showConfirmation?(T(),w("div",M1t,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[23]||(n[23]=ae((...s)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...s),["stop"]))},k1t),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[24]||(n[24]=ae(s=>e.showConfirmation=!1,["stop"]))},P1t)])):G("",!0)])):G("",!0),l("div",U1t,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:n[25]||(n[25]=ae((...s)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...s),["stop"]))},B1t),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[26]||(n[26]=ae((...s)=>e.exportDiscussions&&e.exportDiscussions(...s),["stop"]))},V1t),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[27]||(n[27]=ae((...s)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...s),["stop"]))},H1t),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[28]||(n[28]=ae((...s)=>e.selectAllDiscussions&&e.selectAllDiscussions(...s),["stop"]))},Y1t)])])])):G("",!0)]),l("div",$1t,[l("div",{class:Ue(["mx-4 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[l("div",{id:"dis-list",class:Ue([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full"])},[e.list.length>0?(T(),St(Zs,{key:0,name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(e.list,(s,i)=>(T(),St(nE,{key:s.id,id:s.id,title:s.title,selected:e.currentDiscussion.id==s.id,loading:s.loading,isCheckbox:e.isCheckbox,checkBoxValue:s.checkBoxValue,onSelect:r=>e.selectDiscussion(s),onDelete:r=>e.deleteDiscussion(s.id),onOpenFolder:e.openFolder,onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onOpenFolder","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):G("",!0),e.list.length<1?(T(),w("div",W1t,j1t)):G("",!0),Q1t],2)],2)])],32),l("div",{class:"absolute h-15 bottom-0 left-0 w-full bg-bg-light-panel dark:bg-bg-dark-tone light-text-panel py-4 cursor-pointer text-light-text-panel dark:text-dark-text-panel hover:text-secondary",onClick:n[30]||(n[30]=(...s)=>e.showDatabaseSelector&&e.showDatabaseSelector(...s))},[l("p",X1t,J(e.formatted_database_name.replace("_"," ")),1)])])):G("",!0)]),_:1}),e.isReady?(T(),w("div",Z1t,[l("div",{id:"messages-list",class:Ue(["w-full z-0 flex flex-col flex-grow overflow-y-auto 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",e.isDragOverChat?"pointer-events-none":""])},[l("div",J1t,[e.discussionArr.length>0?(T(),St(Zs,{key:0,name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(e.discussionArr,(s,i)=>(T(),St(MN,{key:s.id,message:s,id:"msg-"+s.id,ref_for:!0,ref:"msg-"+s.id,host:e.host,onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(s.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128)),e.discussionArr.length<2&&e.personality.prompts_list.length>0?(T(),w("div",ewt,[twt,e.discussionArr.length<2&&e.personality.prompts_list.length>0?(T(),w("div",nwt,[l("div",swt,[(T(!0),w(Ve,null,Je(e.personality.prompts_list,(s,i)=>(T(),w("div",{key:i,onClick:r=>e.selectPrompt(s),class:"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg p-4 cursor-pointer hover:shadow-lg transition-all duration-300 ease-in-out transform hover:scale-105 flex flex-col justify-between h-[220px] overflow-hidden group"},[l("div",{title:s,class:"text-base text-gray-700 dark:text-gray-300 overflow-hidden relative h-full"},[l("div",owt,J(s),1),awt],8,rwt),lwt],8,iwt))),128))])])):G("",!0)])):G("",!0)]),_:1})):G("",!0),e.currentDiscussion.id?G("",!0):(T(),St(kN,{key:1})),cwt]),dwt],2),e.currentDiscussion.id?(T(),w("div",uwt,[_e(DN,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):G("",!0)])):G("",!0),_e(Ds,{name:"slide-left"},{default:He(()=>[e.showRightPanel?(T(),w("div",pwt,[l("div",_wt,null,512)])):G("",!0)]),_:1}),_e(tE,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"]),U(l("div",hwt,[_e(Fu,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),l("p",fwt,J(e.loading_infos)+" ...",1)],512),[[wt,e.progress_visibility]]),_e(NN,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:e.addWebpage,ref:"web_url_input_box"},null,8,["onOk"]),_e(ON,{ref:"skills_lib"},null,512)],64))}}),bwt=at(gwt,[["__scopeId","data-v-1219cfc9"]]);/** +`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(t){if(t.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){console.log("Created discussions view");const e=(await de.get("/get_versionID")).data.versionId;qe.onopen=()=>{console.log("WebSocket connection established."),this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{Ge.replace()}),console.log("Connected to socket io");try{this.$store.state.loading_infos="Getting version",this.$store.state.loading_progress=30,await this.$store.dispatch("getVersion")}catch(n){console.log("Error cought:",n)}try{for(this.$store.state.loading_infos="Loading Configuration";qe.id===void 0;)await new Promise(n=>setTimeout(n,100));this.$store.state.client_id=qe.id,console.log(this.$store.state.client_id),await this.$store.dispatch("refreshConfig"),console.log("Config ready")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Loading Database",this.$store.state.loading_progress=20,await this.$store.dispatch("refreshDatabase")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting Bindings list",this.$store.state.loading_progress=40,await this.$store.dispatch("refreshBindings")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting personalities zoo",this.$store.state.loading_progress=70,await this.$store.dispatch("refreshPersonalitiesZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting mounted personalities",this.$store.state.loading_progress=80,await this.$store.dispatch("refreshMountedPersonalities")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting models zoo",this.$store.state.loading_progress=90,await this.$store.dispatch("refreshModelsZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting active models",this.$store.state.loading_progress=100,await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshModelStatus")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchisRTOn")}catch(n){console.log("Error cought:",n)}this.$store.state.isConnected=!0,this.$store.state.client_id=qe.id,console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,this.$store.state.ready=!0,qe.on("connected",this.socketIOConnected),qe.on("disconnected",this.socketIODisconnected),console.log("Added events"),qe.on("show_progress",this.show_progress),qe.on("hide_progress",this.hide_progress),qe.on("update_progress",this.update_progress),qe.on("notification",this.notify),qe.on("new_message",this.new_message),qe.on("update_message",this.streamMessageContent),qe.on("close_message",this.finalMsgEvent),qe.on("disucssion_renamed",n=>{console.log("Received new title",n.discussion_id,n.title);const s=this.list.findIndex(r=>r.id==n.discussion_id),i=this.list[s];i.title=n.title}),qe.onclose=n=>{console.log("WebSocket connection closed:",n.code,n.reason),this.socketIODisconnected()},qe.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),qe.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),qe.disconnect()}},async mounted(){qe.on("refresh_files",()=>{this.recoverFiles()}),this.$nextTick(()=>{Ge.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Fe(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:nE,Message:MN,ChatBox:DN,WelcomeComponent:kN,ChoiceDialog:tE,ProgressBar:Fu,InputBox:NN,SkillsLibraryViewer:ON},watch:{messages:{handler:"extractHtml",deep:!0},progress_visibility_val(t){console.log("progress_visibility changed to "+t)},filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){Fe(()=>{Ge.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){Fe(()=>{Ge.replace()})},isSearch(){Fe(()=>{Ge.replace()})}},computed:{...LD({versionId:t=>t.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?" v"+this.$store.state.version:""}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(t){this.$store.state.isModelOk=t}},isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},personality(){console.log("personality:",this.$store.state.config.personalities[this.$store.state.config.active_personality_id]);const t=this.$store.state.config.personalities[this.$store.state.config.active_personality_id];console.log("peronslities",this.$store.state.personalities[0]);const e=this.$store.state.personalities.find(n=>n.full_path===t);return console.log("personality:",e),e},prompts_list(){return console.log(this.personality.prompts_list),this.personality.prompts_list},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady(){return this.$store.state.ready},databases(){return this.$store.state.databases},client_id(){return qe.id},showLeftPanel(){return this.$store.state.ready&&!this.leftPanelCollapsed},showRightPanel(){return this.$store.state.ready&&!this.rightPanelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Fe(()=>{Ge.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},xwt=Object.assign(Twt,{__name:"DiscussionsView",setup(t){return Li(()=>{eO()}),de.defaults.baseURL="/",(e,n)=>(T(),w(Ve,null,[_e(Ds,{name:"fade-and-fly"},{default:He(()=>[e.isReady?G("",!0):(T(),w("div",RCt,[l("div",ACt,[l("div",NCt,[l("h1",OCt," LoLLMS "+J(e.version_info),1),ICt,MCt,l("div",DCt,[l("img",{class:"w-24 h-24 rounded-full absolute top-0 transition-all duration-300 ease-linear",style:$t({left:`calc(${e.loading_progress}% - 3rem)`}),title:"LoLLMS WebUI",src:ms,alt:"Logo"},null,4)])]),l("div",kCt,[LCt,l("div",PCt,[l("p",UCt,J(e.loading_infos)+"... ",1),l("p",FCt,J(Math.round(e.loading_progress))+"% ",1)])])])]))]),_:1}),e.isReady?(T(),w("button",{key:0,onClick:n[0]||(n[0]=(...s)=>e.togglePanel&&e.togglePanel(...s)),class:"absolute top-2 left-2 p-3 bg-white bg-opacity-0 cursor-pointer transition-all duration-300 hover:scale-110 hover:bg-opacity-20 hover:shadow-xl group"},[U(l("div",null,GCt,512),[[wt,e.leftPanelCollapsed]]),U(l("div",null,zCt,512),[[wt,!e.leftPanelCollapsed]])])):G("",!0),e.isReady?(T(),w("button",{key:1,onClick:n[1]||(n[1]=ae(s=>e.triggerRobotAction(),["stop"])),class:"absolute z-50 bottom-20 right-2 p-3 bg-white bg-opacity-10 rounded-full cursor-pointer transition-all duration-300 hover:scale-110 hover:bg-opacity-20 animate-pulse shadow-lg hover:shadow-xl group"},qCt)):G("",!0),_e(Ds,{name:"slide-right"},{default:He(()=>[e.showLeftPanel?(T(),w("div",YCt,[l("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll no-scrollbar",onDragover:n[29]||(n[29]=ae(s=>e.setDropZoneDiscussion(),["stop","prevent"]))},[l("div",$Ct,[l("div",WCt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[2]||(n[2]=s=>e.createNewDiscussion())},jCt),l("button",{class:Ue(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isCheckbox?"text-secondary":""]),title:"Edit discussion list",type:"button",onClick:n[3]||(n[3]=s=>e.isCheckbox=!e.isCheckbox)},XCt,2),l("button",ZCt,[l("i",{"data-feather":"trash-2",onClick:n[4]||(n[4]=ae(()=>{},["stop"]))})]),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Export database",type:"button",onClick:n[5]||(n[5]=ae(s=>e.database_selectorDialogVisible=!0,["stop"]))},e1t),l("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:n[6]||(n[6]=(...s)=>e.importDiscussions&&e.importDiscussions(...s))},null,544),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Import discussions",type:"button",onClick:n[7]||(n[7]=ae(s=>e.$refs.fileDialog.click(),["stop"]))},n1t),l("input",{type:"file",ref:"bundleLoadingDialog",style:{display:"none"},onChange:n[8]||(n[8]=(...s)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...s))},null,544),e.showSaveConfirmation?G("",!0):(T(),w("button",{key:0,title:"Import discussion bundle",onClick:n[9]||(n[9]=ae(s=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-2xl hover:text-secondary duration-75 active:scale-90"},i1t)),e.isOpen?(T(),w("div",r1t,[l("button",{onClick:n[10]||(n[10]=(...s)=>e.importDiscussions&&e.importDiscussions(...s))},"LOLLMS"),l("button",{onClick:n[11]||(n[11]=(...s)=>e.importChatGPT&&e.importChatGPT(...s))},"ChatGPT")])):G("",!0),l("button",{class:Ue(["text-2xl hover:text-secondary duration-75 active:scale-90",e.isSearch?"text-secondary":""]),title:"Filter discussions",type:"button",onClick:n[12]||(n[12]=s=>e.isSearch=!e.isSearch)},a1t,2),e.showSaveConfirmation?(T(),w("div",l1t,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:n[13]||(n[13]=ae(s=>e.showSaveConfirmation=!1,["stop"]))},d1t),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:n[14]||(n[14]=ae(s=>e.save_configuration(),["stop"]))},p1t)])):G("",!0),e.loading?G("",!0):(T(),w("button",{key:3,type:"button",onClick:n[15]||(n[15]=ae((...s)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...s),["stop"])),title:"Add this discussion content to skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},h1t)),!e.loading&&e.$store.state.config.activate_skills_lib?(T(),w("button",{key:4,type:"button",onClick:n[16]||(n[16]=ae((...s)=>e.toggleSkillsLib&&e.toggleSkillsLib(...s),["stop"])),title:"Skills database is activated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},m1t)):G("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(T(),w("button",{key:5,type:"button",onClick:n[17]||(n[17]=ae((...s)=>e.toggleSkillsLib&&e.toggleSkillsLib(...s),["stop"])),title:"Skills database is deactivated",class:"w-6 hover:text-secondary duration-75 active:scale-90"},b1t)):G("",!0),e.loading?G("",!0):(T(),w("button",{key:6,type:"button",onClick:n[18]||(n[18]=ae((...s)=>e.showSkillsLib&&e.showSkillsLib(...s),["stop"])),title:"Show Skills database",class:"w-6 hover:text-secondary duration-75 active:scale-90"},y1t)),e.loading?(T(),w("div",v1t,T1t)):G("",!0)]),e.isSearch?(T(),w("div",x1t,[l("div",C1t,[l("div",w1t,[R1t,l("div",A1t,[l("div",{class:Ue(["hover:text-secondary duration-75 active:scale-90",e.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[19]||(n[19]=s=>e.filterTitle="")},O1t,2)]),U(l("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":n[20]||(n[20]=s=>e.filterTitle=s),onInput:n[21]||(n[21]=s=>e.filterDiscussions())},null,544),[[ue,e.filterTitle]])])])])):G("",!0),e.isCheckbox?(T(),w("hr",I1t)):G("",!0),e.isCheckbox?(T(),w("div",M1t,[l("div",D1t,[e.selectedDiscussions.length>0?(T(),w("p",k1t,"Selected: "+J(e.selectedDiscussions.length),1)):G("",!0)]),l("div",L1t,[e.selectedDiscussions.length>0?(T(),w("div",P1t,[e.showConfirmation?G("",!0):(T(),w("button",{key:0,class:"flex mx-3 flex-1 text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[22]||(n[22]=ae(s=>e.showConfirmation=!0,["stop"]))},F1t)),e.showConfirmation?(T(),w("div",B1t,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[23]||(n[23]=ae((...s)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...s),["stop"]))},V1t),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[24]||(n[24]=ae(s=>e.showConfirmation=!1,["stop"]))},H1t)])):G("",!0)])):G("",!0),l("div",q1t,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:n[25]||(n[25]=ae((...s)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...s),["stop"]))},$1t),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[26]||(n[26]=ae((...s)=>e.exportDiscussions&&e.exportDiscussions(...s),["stop"]))},K1t),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a martkdown file",type:"button",onClick:n[27]||(n[27]=ae((...s)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...s),["stop"]))},Q1t),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[28]||(n[28]=ae((...s)=>e.selectAllDiscussions&&e.selectAllDiscussions(...s),["stop"]))},Z1t)])])])):G("",!0)]),l("div",J1t,[l("div",{class:Ue(["mx-4 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[l("div",{id:"dis-list",class:Ue([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full"])},[e.list.length>0?(T(),St(Zs,{key:0,name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(e.list,(s,i)=>(T(),St(nE,{key:s.id,id:s.id,title:s.title,selected:e.currentDiscussion.id==s.id,loading:s.loading,isCheckbox:e.isCheckbox,checkBoxValue:s.checkBoxValue,onSelect:r=>e.selectDiscussion(s),onDelete:r=>e.deleteDiscussion(s.id),onOpenFolder:e.openFolder,onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onOpenFolder","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):G("",!0),e.list.length<1?(T(),w("div",ewt,nwt)):G("",!0),swt],2)],2)])],32),l("div",{class:"absolute h-15 bottom-0 left-0 w-full bg-bg-light-panel dark:bg-bg-dark-tone light-text-panel py-4 cursor-pointer text-light-text-panel dark:text-dark-text-panel hover:text-secondary",onClick:n[30]||(n[30]=(...s)=>e.showDatabaseSelector&&e.showDatabaseSelector(...s))},[l("p",iwt,J(e.formatted_database_name.replace("_"," ")),1)])])):G("",!0)]),_:1}),e.isReady?(T(),w("div",rwt,[l("div",{id:"messages-list",class:Ue(["w-full z-0 flex flex-col flex-grow overflow-y-auto 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",e.isDragOverChat?"pointer-events-none":""])},[l("div",owt,[e.discussionArr.length>0?(T(),St(Zs,{key:0,name:"list"},{default:He(()=>[(T(!0),w(Ve,null,Je(e.discussionArr,(s,i)=>(T(),St(MN,{key:s.id,message:s,id:"msg-"+s.id,ref_for:!0,ref:"msg-"+s.id,host:e.host,onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(s.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128)),e.discussionArr.length<2&&e.personality.prompts_list.length>0?(T(),w("div",awt,[lwt,e.discussionArr.length<2&&e.personality.prompts_list.length>0?(T(),w("div",cwt,[l("div",dwt,[(T(!0),w(Ve,null,Je(e.personality.prompts_list,(s,i)=>(T(),w("div",{key:i,onClick:r=>e.selectPrompt(s),class:"bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg p-4 cursor-pointer hover:shadow-lg transition-all duration-300 ease-in-out transform hover:scale-105 flex flex-col justify-between h-[220px] overflow-hidden group"},[l("div",{title:s,class:"text-base text-gray-700 dark:text-gray-300 overflow-hidden relative h-full"},[l("div",_wt,J(s),1),hwt],8,pwt),fwt],8,uwt))),128))])])):G("",!0)])):G("",!0)]),_:1})):G("",!0),e.currentDiscussion.id?G("",!0):(T(),St(kN,{key:1})),mwt]),gwt],2),e.currentDiscussion.id?(T(),w("div",bwt,[_e(DN,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):G("",!0)])):G("",!0),_e(Ds,{name:"slide-left"},{default:He(()=>[e.showRightPanel?(T(),w("div",Ewt,[l("div",ywt,null,512)])):G("",!0)]),_:1}),_e(tE,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"]),U(l("div",vwt,[_e(Fu,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),l("p",Swt,J(e.loading_infos)+" ...",1)],512),[[wt,e.progress_visibility]]),_e(NN,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:e.addWebpage,ref:"web_url_input_box"},null,8,["onOk"]),_e(ON,{ref:"skills_lib"},null,512)],64))}}),Cwt=at(xwt,[["__scopeId","data-v-1219cfc9"]]);/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const TE="159",Ewt=0,iC=1,ywt=2,tO=1,vwt=2,yi=3,Ii=0,Yn=1,$s=2,dr=0,$o=1,rC=2,oC=3,aC=4,Swt=5,Ur=100,Twt=101,xwt=102,lC=103,cC=104,Cwt=200,wwt=201,Rwt=202,Awt=203,Lg=204,Pg=205,Nwt=206,Owt=207,Iwt=208,Mwt=209,Dwt=210,kwt=211,Lwt=212,Pwt=213,Uwt=214,Fwt=0,Bwt=1,Gwt=2,$d=3,Vwt=4,zwt=5,Hwt=6,qwt=7,xE=0,Ywt=1,$wt=2,ur=0,Wwt=1,Kwt=2,jwt=3,Qwt=4,Xwt=5,dC="attached",Zwt="detached",nO=300,la=301,ca=302,Ug=303,Fg=304,Hu=306,da=1e3,ls=1001,Wd=1002,mn=1003,Bg=1004,bd=1005,zn=1006,sO=1007,eo=1008,pr=1009,Jwt=1010,eRt=1011,CE=1012,iO=1013,or=1014,Ti=1015,Fl=1016,rO=1017,oO=1018,$r=1020,tRt=1021,cs=1023,nRt=1024,sRt=1025,Wr=1026,ua=1027,iRt=1028,aO=1029,rRt=1030,lO=1031,cO=1033,fm=33776,mm=33777,gm=33778,bm=33779,uC=35840,pC=35841,_C=35842,hC=35843,dO=36196,fC=37492,mC=37496,gC=37808,bC=37809,EC=37810,yC=37811,vC=37812,SC=37813,TC=37814,xC=37815,CC=37816,wC=37817,RC=37818,AC=37819,NC=37820,OC=37821,Em=36492,IC=36494,MC=36495,oRt=36283,DC=36284,kC=36285,LC=36286,Bl=2300,pa=2301,ym=2302,PC=2400,UC=2401,FC=2402,aRt=2500,lRt=0,uO=1,Gg=2,pO=3e3,Kr=3001,cRt=3200,dRt=3201,wE=0,uRt=1,ds="",en="srgb",Cn="srgb-linear",RE="display-p3",qu="display-p3-linear",Kd="linear",Kt="srgb",jd="rec709",Qd="p3",fo=7680,BC=519,pRt=512,_Rt=513,hRt=514,_O=515,fRt=516,mRt=517,gRt=518,bRt=519,Vg=35044,GC="300 es",zg=1035,xi=2e3,Xd=2001;class Da{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const s=this._listeners;s[e]===void 0&&(s[e]=[]),s[e].indexOf(n)===-1&&s[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const s=this._listeners;return s[e]!==void 0&&s[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const s=this._listeners[e.type];if(s!==void 0){e.target=this;const i=s.slice(0);for(let r=0,o=i.length;r>8&255]+wn[t>>16&255]+wn[t>>24&255]+"-"+wn[e&255]+wn[e>>8&255]+"-"+wn[e>>16&15|64]+wn[e>>24&255]+"-"+wn[n&63|128]+wn[n>>8&255]+"-"+wn[n>>16&255]+wn[n>>24&255]+wn[s&255]+wn[s>>8&255]+wn[s>>16&255]+wn[s>>24&255]).toLowerCase()}function Nn(t,e,n){return Math.max(e,Math.min(n,t))}function AE(t,e){return(t%e+e)%e}function ERt(t,e,n,s,i){return s+(t-e)*(i-s)/(n-e)}function yRt(t,e,n){return t!==e?(n-t)/(e-t):0}function bl(t,e,n){return(1-n)*t+n*e}function vRt(t,e,n,s){return bl(t,e,1-Math.exp(-n*s))}function SRt(t,e=1){return e-Math.abs(AE(t,e*2)-e)}function TRt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function xRt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function CRt(t,e){return t+Math.floor(Math.random()*(e-t+1))}function wRt(t,e){return t+Math.random()*(e-t)}function RRt(t){return t*(.5-Math.random())}function ARt(t){t!==void 0&&(VC=t);let e=VC+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function NRt(t){return t*gl}function ORt(t){return t*_a}function Hg(t){return(t&t-1)===0&&t!==0}function IRt(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Zd(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function MRt(t,e,n,s,i){const r=Math.cos,o=Math.sin,a=r(n/2),c=o(n/2),u=r((e+s)/2),d=o((e+s)/2),h=r((e-s)/2),f=o((e-s)/2),m=r((s-e)/2),_=o((s-e)/2);switch(i){case"XYX":t.set(a*d,c*h,c*f,a*u);break;case"YZY":t.set(c*f,a*d,c*h,a*u);break;case"ZXZ":t.set(c*h,c*f,a*d,a*u);break;case"XZX":t.set(a*d,c*_,c*m,a*u);break;case"YXY":t.set(c*m,a*d,c*_,a*u);break;case"ZYZ":t.set(c*_,c*m,a*d,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Ws(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function zt(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const DRt={DEG2RAD:gl,RAD2DEG:_a,generateUUID:ks,clamp:Nn,euclideanModulo:AE,mapLinear:ERt,inverseLerp:yRt,lerp:bl,damp:vRt,pingpong:SRt,smoothstep:TRt,smootherstep:xRt,randInt:CRt,randFloat:wRt,randFloatSpread:RRt,seededRandom:ARt,degToRad:NRt,radToDeg:ORt,isPowerOfTwo:Hg,ceilPowerOfTwo:IRt,floorPowerOfTwo:Zd,setQuaternionFromProperEuler:MRt,normalize:zt,denormalize:Ws};class At{constructor(e=0,n=0){At.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,s=this.y,i=e.elements;return this.x=i[0]*n+i[3]*s+i[6],this.y=i[1]*n+i[4]*s+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(n,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const s=this.dot(e)/n;return Math.acos(Nn(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,s=this.y-e.y;return n*n+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,s){return this.x=e.x+(n.x-e.x)*s,this.y=e.y+(n.y-e.y)*s,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const s=Math.cos(n),i=Math.sin(n),r=this.x-e.x,o=this.y-e.y;return this.x=r*s-o*i+e.x,this.y=r*i+o*s+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Tt{constructor(e,n,s,i,r,o,a,c,u){Tt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,s,i,r,o,a,c,u)}set(e,n,s,i,r,o,a,c,u){const d=this.elements;return d[0]=e,d[1]=i,d[2]=a,d[3]=n,d[4]=r,d[5]=c,d[6]=s,d[7]=o,d[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,s=e.elements;return n[0]=s[0],n[1]=s[1],n[2]=s[2],n[3]=s[3],n[4]=s[4],n[5]=s[5],n[6]=s[6],n[7]=s[7],n[8]=s[8],this}extractBasis(e,n,s){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),s.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const s=e.elements,i=n.elements,r=this.elements,o=s[0],a=s[3],c=s[6],u=s[1],d=s[4],h=s[7],f=s[2],m=s[5],_=s[8],E=i[0],b=i[3],g=i[6],y=i[1],v=i[4],S=i[7],R=i[2],C=i[5],A=i[8];return r[0]=o*E+a*y+c*R,r[3]=o*b+a*v+c*C,r[6]=o*g+a*S+c*A,r[1]=u*E+d*y+h*R,r[4]=u*b+d*v+h*C,r[7]=u*g+d*S+h*A,r[2]=f*E+m*y+_*R,r[5]=f*b+m*v+_*C,r[8]=f*g+m*S+_*A,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],u=e[7],d=e[8];return n*o*d-n*a*u-s*r*d+s*a*c+i*r*u-i*o*c}invert(){const e=this.elements,n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],u=e[7],d=e[8],h=d*o-a*u,f=a*c-d*r,m=u*r-o*c,_=n*h+s*f+i*m;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);const E=1/_;return e[0]=h*E,e[1]=(i*u-d*s)*E,e[2]=(a*s-i*o)*E,e[3]=f*E,e[4]=(d*n-i*c)*E,e[5]=(i*r-a*n)*E,e[6]=m*E,e[7]=(s*c-u*n)*E,e[8]=(o*n-s*r)*E,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,s,i,r,o,a){const c=Math.cos(r),u=Math.sin(r);return this.set(s*c,s*u,-s*(c*o+u*a)+o+e,-i*u,i*c,-i*(-u*o+c*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(vm.makeScale(e,n)),this}rotate(e){return this.premultiply(vm.makeRotation(-e)),this}translate(e,n){return this.premultiply(vm.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),s=Math.sin(e);return this.set(n,-s,0,s,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,s=e.elements;for(let i=0;i<9;i++)if(n[i]!==s[i])return!1;return!0}fromArray(e,n=0){for(let s=0;s<9;s++)this.elements[s]=e[s+n];return this}toArray(e=[],n=0){const s=this.elements;return e[n]=s[0],e[n+1]=s[1],e[n+2]=s[2],e[n+3]=s[3],e[n+4]=s[4],e[n+5]=s[5],e[n+6]=s[6],e[n+7]=s[7],e[n+8]=s[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const vm=new Tt;function hO(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function Gl(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function kRt(){const t=Gl("canvas");return t.style.display="block",t}const zC={};function El(t){t in zC||(zC[t]=!0,console.warn(t))}const HC=new Tt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),qC=new Tt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Oc={[Cn]:{transfer:Kd,primaries:jd,toReference:t=>t,fromReference:t=>t},[en]:{transfer:Kt,primaries:jd,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[qu]:{transfer:Kd,primaries:Qd,toReference:t=>t.applyMatrix3(qC),fromReference:t=>t.applyMatrix3(HC)},[RE]:{transfer:Kt,primaries:Qd,toReference:t=>t.convertSRGBToLinear().applyMatrix3(qC),fromReference:t=>t.applyMatrix3(HC).convertLinearToSRGB()}},LRt=new Set([Cn,qu]),Ut={enabled:!0,_workingColorSpace:Cn,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!LRt.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const s=Oc[e].toReference,i=Oc[n].fromReference;return i(s(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Oc[t].primaries},getTransfer:function(t){return t===ds?Kd:Oc[t].transfer}};function Wo(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function Sm(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let mo;class fO{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{mo===void 0&&(mo=Gl("canvas")),mo.width=e.width,mo.height=e.height;const s=mo.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),n=mo}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Gl("canvas");n.width=e.width,n.height=e.height;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height);const i=s.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o0&&(s.userData=this.userData),n||(e.textures[this.uuid]=s),s}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==nO)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case da:e.x=e.x-Math.floor(e.x);break;case ls:e.x=e.x<0?0:1;break;case Wd:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case da:e.y=e.y-Math.floor(e.y);break;case ls:e.y=e.y<0?0:1;break;case Wd:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return El("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===en?Kr:pO}set encoding(e){El("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Kr?en:ds}}xn.DEFAULT_IMAGE=null;xn.DEFAULT_MAPPING=nO;xn.DEFAULT_ANISOTROPY=1;class Yt{constructor(e=0,n=0,s=0,i=1){Yt.prototype.isVector4=!0,this.x=e,this.y=n,this.z=s,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,s,i){return this.x=e,this.y=n,this.z=s,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,s=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*n+o[4]*s+o[8]*i+o[12]*r,this.y=o[1]*n+o[5]*s+o[9]*i+o[13]*r,this.z=o[2]*n+o[6]*s+o[10]*i+o[14]*r,this.w=o[3]*n+o[7]*s+o[11]*i+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,s,i,r;const c=e.elements,u=c[0],d=c[4],h=c[8],f=c[1],m=c[5],_=c[9],E=c[2],b=c[6],g=c[10];if(Math.abs(d-f)<.01&&Math.abs(h-E)<.01&&Math.abs(_-b)<.01){if(Math.abs(d+f)<.1&&Math.abs(h+E)<.1&&Math.abs(_+b)<.1&&Math.abs(u+m+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const v=(u+1)/2,S=(m+1)/2,R=(g+1)/2,C=(d+f)/4,A=(h+E)/4,D=(_+b)/4;return v>S&&v>R?v<.01?(s=0,i=.707106781,r=.707106781):(s=Math.sqrt(v),i=C/s,r=A/s):S>R?S<.01?(s=.707106781,i=0,r=.707106781):(i=Math.sqrt(S),s=C/i,r=D/i):R<.01?(s=.707106781,i=.707106781,r=0):(r=Math.sqrt(R),s=A/r,i=D/r),this.set(s,i,r,n),this}let y=Math.sqrt((b-_)*(b-_)+(h-E)*(h-E)+(f-d)*(f-d));return Math.abs(y)<.001&&(y=1),this.x=(b-_)/y,this.y=(h-E)/y,this.z=(f-d)/y,this.w=Math.acos((u+m+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(n,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,s){return this.x=e.x+(n.x-e.x)*s,this.y=e.y+(n.y-e.y)*s,this.z=e.z+(n.z-e.z)*s,this.w=e.w+(n.w-e.w)*s,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class FRt extends Da{constructor(e=1,n=1,s={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Yt(0,0,e,n),this.scissorTest=!1,this.viewport=new Yt(0,0,e,n);const i={width:e,height:n,depth:1};s.encoding!==void 0&&(El("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),s.colorSpace=s.encoding===Kr?en:ds),s=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:zn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},s),this.texture=new xn(i,s.mapping,s.wrapS,s.wrapT,s.magFilter,s.minFilter,s.format,s.type,s.anisotropy,s.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=s.generateMipmaps,this.texture.internalFormat=s.internalFormat,this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,this.depthTexture=s.depthTexture,this.samples=s.samples}setSize(e,n,s=1){(this.width!==e||this.height!==n||this.depth!==s)&&(this.width=e,this.height=n,this.depth=s,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=s,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new mO(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class to extends FRt{constructor(e=1,n=1,s={}){super(e,n,s),this.isWebGLRenderTarget=!0}}class gO extends xn{constructor(e=null,n=1,s=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:s,depth:i},this.magFilter=mn,this.minFilter=mn,this.wrapR=ls,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class BRt extends xn{constructor(e=null,n=1,s=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:s,depth:i},this.magFilter=mn,this.minFilter=mn,this.wrapR=ls,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Er{constructor(e=0,n=0,s=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=s,this._w=i}static slerpFlat(e,n,s,i,r,o,a){let c=s[i+0],u=s[i+1],d=s[i+2],h=s[i+3];const f=r[o+0],m=r[o+1],_=r[o+2],E=r[o+3];if(a===0){e[n+0]=c,e[n+1]=u,e[n+2]=d,e[n+3]=h;return}if(a===1){e[n+0]=f,e[n+1]=m,e[n+2]=_,e[n+3]=E;return}if(h!==E||c!==f||u!==m||d!==_){let b=1-a;const g=c*f+u*m+d*_+h*E,y=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){const R=Math.sqrt(v),C=Math.atan2(R,g*y);b=Math.sin(b*C)/R,a=Math.sin(a*C)/R}const S=a*y;if(c=c*b+f*S,u=u*b+m*S,d=d*b+_*S,h=h*b+E*S,b===1-a){const R=1/Math.sqrt(c*c+u*u+d*d+h*h);c*=R,u*=R,d*=R,h*=R}}e[n]=c,e[n+1]=u,e[n+2]=d,e[n+3]=h}static multiplyQuaternionsFlat(e,n,s,i,r,o){const a=s[i],c=s[i+1],u=s[i+2],d=s[i+3],h=r[o],f=r[o+1],m=r[o+2],_=r[o+3];return e[n]=a*_+d*h+c*m-u*f,e[n+1]=c*_+d*f+u*h-a*m,e[n+2]=u*_+d*m+a*f-c*h,e[n+3]=d*_-a*h-c*f-u*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,s,i){return this._x=e,this._y=n,this._z=s,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const s=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,c=Math.sin,u=a(s/2),d=a(i/2),h=a(r/2),f=c(s/2),m=c(i/2),_=c(r/2);switch(o){case"XYZ":this._x=f*d*h+u*m*_,this._y=u*m*h-f*d*_,this._z=u*d*_+f*m*h,this._w=u*d*h-f*m*_;break;case"YXZ":this._x=f*d*h+u*m*_,this._y=u*m*h-f*d*_,this._z=u*d*_-f*m*h,this._w=u*d*h+f*m*_;break;case"ZXY":this._x=f*d*h-u*m*_,this._y=u*m*h+f*d*_,this._z=u*d*_+f*m*h,this._w=u*d*h-f*m*_;break;case"ZYX":this._x=f*d*h-u*m*_,this._y=u*m*h+f*d*_,this._z=u*d*_-f*m*h,this._w=u*d*h+f*m*_;break;case"YZX":this._x=f*d*h+u*m*_,this._y=u*m*h+f*d*_,this._z=u*d*_-f*m*h,this._w=u*d*h-f*m*_;break;case"XZY":this._x=f*d*h-u*m*_,this._y=u*m*h-f*d*_,this._z=u*d*_+f*m*h,this._w=u*d*h+f*m*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const s=n/2,i=Math.sin(s);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(s),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,s=n[0],i=n[4],r=n[8],o=n[1],a=n[5],c=n[9],u=n[2],d=n[6],h=n[10],f=s+a+h;if(f>0){const m=.5/Math.sqrt(f+1);this._w=.25/m,this._x=(d-c)*m,this._y=(r-u)*m,this._z=(o-i)*m}else if(s>a&&s>h){const m=2*Math.sqrt(1+s-a-h);this._w=(d-c)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(r+u)/m}else if(a>h){const m=2*Math.sqrt(1+a-s-h);this._w=(r-u)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(c+d)/m}else{const m=2*Math.sqrt(1+h-s-a);this._w=(o-i)/m,this._x=(r+u)/m,this._y=(c+d)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let s=e.dot(n)+1;return sMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=s):(this._x=0,this._y=-e.z,this._z=e.y,this._w=s)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=s),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Nn(this.dot(e),-1,1)))}rotateTowards(e,n){const s=this.angleTo(e);if(s===0)return this;const i=Math.min(1,n/s);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const s=e._x,i=e._y,r=e._z,o=e._w,a=n._x,c=n._y,u=n._z,d=n._w;return this._x=s*d+o*a+i*u-r*c,this._y=i*d+o*c+r*a-s*u,this._z=r*d+o*u+s*c-i*a,this._w=o*d-s*a-i*c-r*u,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const s=this._x,i=this._y,r=this._z,o=this._w;let a=o*e._w+s*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=s,this._y=i,this._z=r,this;const c=1-a*a;if(c<=Number.EPSILON){const m=1-n;return this._w=m*o+n*this._w,this._x=m*s+n*this._x,this._y=m*i+n*this._y,this._z=m*r+n*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(c),d=Math.atan2(u,a),h=Math.sin((1-n)*d)/u,f=Math.sin(n*d)/u;return this._w=o*h+this._w*f,this._x=s*h+this._x*f,this._y=i*h+this._y*f,this._z=r*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,n,s){return this.copy(e).slerp(n,s)}random(){const e=Math.random(),n=Math.sqrt(1-e),s=Math.sqrt(e),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(n*Math.cos(i),s*Math.sin(r),s*Math.cos(r),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class ie{constructor(e=0,n=0,s=0){ie.prototype.isVector3=!0,this.x=e,this.y=n,this.z=s}set(e,n,s){return s===void 0&&(s=this.z),this.x=e,this.y=n,this.z=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(YC.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(YC.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[3]*s+r[6]*i,this.y=r[1]*n+r[4]*s+r[7]*i,this.z=r[2]*n+r[5]*s+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,s=this.y,i=this.z,r=e.elements,o=1/(r[3]*n+r[7]*s+r[11]*i+r[15]);return this.x=(r[0]*n+r[4]*s+r[8]*i+r[12])*o,this.y=(r[1]*n+r[5]*s+r[9]*i+r[13])*o,this.z=(r[2]*n+r[6]*s+r[10]*i+r[14])*o,this}applyQuaternion(e){const n=this.x,s=this.y,i=this.z,r=e.x,o=e.y,a=e.z,c=e.w,u=2*(o*i-a*s),d=2*(a*n-r*i),h=2*(r*s-o*n);return this.x=n+c*u+o*h-a*d,this.y=s+c*d+a*u-r*h,this.z=i+c*h+r*d-o*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[4]*s+r[8]*i,this.y=r[1]*n+r[5]*s+r[9]*i,this.z=r[2]*n+r[6]*s+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(n,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,s){return this.x=e.x+(n.x-e.x)*s,this.y=e.y+(n.y-e.y)*s,this.z=e.z+(n.z-e.z)*s,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const s=e.x,i=e.y,r=e.z,o=n.x,a=n.y,c=n.z;return this.x=i*c-r*a,this.y=r*o-s*c,this.z=s*a-i*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const s=e.dot(this)/n;return this.copy(e).multiplyScalar(s)}projectOnPlane(e){return xm.copy(this).projectOnVector(e),this.sub(xm)}reflect(e){return this.sub(xm.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const s=this.dot(e)/n;return Math.acos(Nn(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,s=this.y-e.y,i=this.z-e.z;return n*n+s*s+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,s){const i=Math.sin(n)*e;return this.x=i*Math.sin(s),this.y=Math.cos(n)*e,this.z=i*Math.cos(s),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,s){return this.x=e*Math.sin(n),this.y=s,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),s=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=s,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,s=Math.sqrt(1-e**2);return this.x=s*Math.cos(n),this.y=s*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const xm=new ie,YC=new Er;class Ui{constructor(e=new ie(1/0,1/0,1/0),n=new ie(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,s=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,xs),xs.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,s;return e.normal.x>0?(n=e.normal.x*this.min.x,s=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,s=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,s+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,s+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,s+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,s+=e.normal.z*this.min.z),n<=-e.constant&&s>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ja),Mc.subVectors(this.max,ja),go.subVectors(e.a,ja),bo.subVectors(e.b,ja),Eo.subVectors(e.c,ja),Hi.subVectors(bo,go),qi.subVectors(Eo,bo),Cr.subVectors(go,Eo);let n=[0,-Hi.z,Hi.y,0,-qi.z,qi.y,0,-Cr.z,Cr.y,Hi.z,0,-Hi.x,qi.z,0,-qi.x,Cr.z,0,-Cr.x,-Hi.y,Hi.x,0,-qi.y,qi.x,0,-Cr.y,Cr.x,0];return!Cm(n,go,bo,Eo,Mc)||(n=[1,0,0,0,1,0,0,0,1],!Cm(n,go,bo,Eo,Mc))?!1:(Dc.crossVectors(Hi,qi),n=[Dc.x,Dc.y,Dc.z],Cm(n,go,bo,Eo,Mc))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,xs).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(xs).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(_i[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_i[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_i[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_i[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_i[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_i[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_i[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_i[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_i),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const _i=[new ie,new ie,new ie,new ie,new ie,new ie,new ie,new ie],xs=new ie,Ic=new Ui,go=new ie,bo=new ie,Eo=new ie,Hi=new ie,qi=new ie,Cr=new ie,ja=new ie,Mc=new ie,Dc=new ie,wr=new ie;function Cm(t,e,n,s,i){for(let r=0,o=t.length-3;r<=o;r+=3){wr.fromArray(t,r);const a=i.x*Math.abs(wr.x)+i.y*Math.abs(wr.y)+i.z*Math.abs(wr.z),c=e.dot(wr),u=n.dot(wr),d=s.dot(wr);if(Math.max(-Math.max(c,u,d),Math.min(c,u,d))>a)return!1}return!0}const GRt=new Ui,Qa=new ie,wm=new ie;class ai{constructor(e=new ie,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const s=this.center;n!==void 0?s.copy(n):GRt.setFromPoints(e).getCenter(s);let i=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Qa.subVectors(e,this.center);const n=Qa.lengthSq();if(n>this.radius*this.radius){const s=Math.sqrt(n),i=(s-this.radius)*.5;this.center.addScaledVector(Qa,i/s),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(wm.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Qa.copy(e.center).add(wm)),this.expandByPoint(Qa.copy(e.center).sub(wm))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const hi=new ie,Rm=new ie,kc=new ie,Yi=new ie,Am=new ie,Lc=new ie,Nm=new ie;class Yu{constructor(e=new ie,n=new ie(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,hi)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const s=n.dot(this.direction);return s<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,s)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=hi.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(hi.copy(this.origin).addScaledVector(this.direction,n),hi.distanceToSquared(e))}distanceSqToSegment(e,n,s,i){Rm.copy(e).add(n).multiplyScalar(.5),kc.copy(n).sub(e).normalize(),Yi.copy(this.origin).sub(Rm);const r=e.distanceTo(n)*.5,o=-this.direction.dot(kc),a=Yi.dot(this.direction),c=-Yi.dot(kc),u=Yi.lengthSq(),d=Math.abs(1-o*o);let h,f,m,_;if(d>0)if(h=o*c-a,f=o*a-c,_=r*d,h>=0)if(f>=-_)if(f<=_){const E=1/d;h*=E,f*=E,m=h*(h+o*f+2*a)+f*(o*h+f+2*c)+u}else f=r,h=Math.max(0,-(o*f+a)),m=-h*h+f*(f+2*c)+u;else f=-r,h=Math.max(0,-(o*f+a)),m=-h*h+f*(f+2*c)+u;else f<=-_?(h=Math.max(0,-(-o*r+a)),f=h>0?-r:Math.min(Math.max(-r,-c),r),m=-h*h+f*(f+2*c)+u):f<=_?(h=0,f=Math.min(Math.max(-r,-c),r),m=f*(f+2*c)+u):(h=Math.max(0,-(o*r+a)),f=h>0?r:Math.min(Math.max(-r,-c),r),m=-h*h+f*(f+2*c)+u);else f=o>0?-r:r,h=Math.max(0,-(o*f+a)),m=-h*h+f*(f+2*c)+u;return s&&s.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(Rm).addScaledVector(kc,f),m}intersectSphere(e,n){hi.subVectors(e.center,this.origin);const s=hi.dot(this.direction),i=hi.dot(hi)-s*s,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),a=s-o,c=s+o;return c<0?null:a<0?this.at(c,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const s=-(this.origin.dot(e.normal)+e.constant)/n;return s>=0?s:null}intersectPlane(e,n){const s=this.distanceToPlane(e);return s===null?null:this.at(s,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let s,i,r,o,a,c;const u=1/this.direction.x,d=1/this.direction.y,h=1/this.direction.z,f=this.origin;return u>=0?(s=(e.min.x-f.x)*u,i=(e.max.x-f.x)*u):(s=(e.max.x-f.x)*u,i=(e.min.x-f.x)*u),d>=0?(r=(e.min.y-f.y)*d,o=(e.max.y-f.y)*d):(r=(e.max.y-f.y)*d,o=(e.min.y-f.y)*d),s>o||r>i||((r>s||isNaN(s))&&(s=r),(o=0?(a=(e.min.z-f.z)*h,c=(e.max.z-f.z)*h):(a=(e.max.z-f.z)*h,c=(e.min.z-f.z)*h),s>c||a>i)||((a>s||s!==s)&&(s=a),(c=0?s:i,n)}intersectsBox(e){return this.intersectBox(e,hi)!==null}intersectTriangle(e,n,s,i,r){Am.subVectors(n,e),Lc.subVectors(s,e),Nm.crossVectors(Am,Lc);let o=this.direction.dot(Nm),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Yi.subVectors(this.origin,e);const c=a*this.direction.dot(Lc.crossVectors(Yi,Lc));if(c<0)return null;const u=a*this.direction.dot(Am.cross(Yi));if(u<0||c+u>o)return null;const d=-a*Yi.dot(Nm);return d<0?null:this.at(d/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class xt{constructor(e,n,s,i,r,o,a,c,u,d,h,f,m,_,E,b){xt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,s,i,r,o,a,c,u,d,h,f,m,_,E,b)}set(e,n,s,i,r,o,a,c,u,d,h,f,m,_,E,b){const g=this.elements;return g[0]=e,g[4]=n,g[8]=s,g[12]=i,g[1]=r,g[5]=o,g[9]=a,g[13]=c,g[2]=u,g[6]=d,g[10]=h,g[14]=f,g[3]=m,g[7]=_,g[11]=E,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new xt().fromArray(this.elements)}copy(e){const n=this.elements,s=e.elements;return n[0]=s[0],n[1]=s[1],n[2]=s[2],n[3]=s[3],n[4]=s[4],n[5]=s[5],n[6]=s[6],n[7]=s[7],n[8]=s[8],n[9]=s[9],n[10]=s[10],n[11]=s[11],n[12]=s[12],n[13]=s[13],n[14]=s[14],n[15]=s[15],this}copyPosition(e){const n=this.elements,s=e.elements;return n[12]=s[12],n[13]=s[13],n[14]=s[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,s){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),s.setFromMatrixColumn(this,2),this}makeBasis(e,n,s){return this.set(e.x,n.x,s.x,0,e.y,n.y,s.y,0,e.z,n.z,s.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,s=e.elements,i=1/yo.setFromMatrixColumn(e,0).length(),r=1/yo.setFromMatrixColumn(e,1).length(),o=1/yo.setFromMatrixColumn(e,2).length();return n[0]=s[0]*i,n[1]=s[1]*i,n[2]=s[2]*i,n[3]=0,n[4]=s[4]*r,n[5]=s[5]*r,n[6]=s[6]*r,n[7]=0,n[8]=s[8]*o,n[9]=s[9]*o,n[10]=s[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,s=e.x,i=e.y,r=e.z,o=Math.cos(s),a=Math.sin(s),c=Math.cos(i),u=Math.sin(i),d=Math.cos(r),h=Math.sin(r);if(e.order==="XYZ"){const f=o*d,m=o*h,_=a*d,E=a*h;n[0]=c*d,n[4]=-c*h,n[8]=u,n[1]=m+_*u,n[5]=f-E*u,n[9]=-a*c,n[2]=E-f*u,n[6]=_+m*u,n[10]=o*c}else if(e.order==="YXZ"){const f=c*d,m=c*h,_=u*d,E=u*h;n[0]=f+E*a,n[4]=_*a-m,n[8]=o*u,n[1]=o*h,n[5]=o*d,n[9]=-a,n[2]=m*a-_,n[6]=E+f*a,n[10]=o*c}else if(e.order==="ZXY"){const f=c*d,m=c*h,_=u*d,E=u*h;n[0]=f-E*a,n[4]=-o*h,n[8]=_+m*a,n[1]=m+_*a,n[5]=o*d,n[9]=E-f*a,n[2]=-o*u,n[6]=a,n[10]=o*c}else if(e.order==="ZYX"){const f=o*d,m=o*h,_=a*d,E=a*h;n[0]=c*d,n[4]=_*u-m,n[8]=f*u+E,n[1]=c*h,n[5]=E*u+f,n[9]=m*u-_,n[2]=-u,n[6]=a*c,n[10]=o*c}else if(e.order==="YZX"){const f=o*c,m=o*u,_=a*c,E=a*u;n[0]=c*d,n[4]=E-f*h,n[8]=_*h+m,n[1]=h,n[5]=o*d,n[9]=-a*d,n[2]=-u*d,n[6]=m*h+_,n[10]=f-E*h}else if(e.order==="XZY"){const f=o*c,m=o*u,_=a*c,E=a*u;n[0]=c*d,n[4]=-h,n[8]=u*d,n[1]=f*h+E,n[5]=o*d,n[9]=m*h-_,n[2]=_*h-m,n[6]=a*d,n[10]=E*h+f}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(VRt,e,zRt)}lookAt(e,n,s){const i=this.elements;return Qn.subVectors(e,n),Qn.lengthSq()===0&&(Qn.z=1),Qn.normalize(),$i.crossVectors(s,Qn),$i.lengthSq()===0&&(Math.abs(s.z)===1?Qn.x+=1e-4:Qn.z+=1e-4,Qn.normalize(),$i.crossVectors(s,Qn)),$i.normalize(),Pc.crossVectors(Qn,$i),i[0]=$i.x,i[4]=Pc.x,i[8]=Qn.x,i[1]=$i.y,i[5]=Pc.y,i[9]=Qn.y,i[2]=$i.z,i[6]=Pc.z,i[10]=Qn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const s=e.elements,i=n.elements,r=this.elements,o=s[0],a=s[4],c=s[8],u=s[12],d=s[1],h=s[5],f=s[9],m=s[13],_=s[2],E=s[6],b=s[10],g=s[14],y=s[3],v=s[7],S=s[11],R=s[15],C=i[0],A=i[4],D=i[8],x=i[12],O=i[1],B=i[5],z=i[9],Z=i[13],M=i[2],q=i[6],H=i[10],P=i[14],$=i[3],ee=i[7],re=i[11],me=i[15];return r[0]=o*C+a*O+c*M+u*$,r[4]=o*A+a*B+c*q+u*ee,r[8]=o*D+a*z+c*H+u*re,r[12]=o*x+a*Z+c*P+u*me,r[1]=d*C+h*O+f*M+m*$,r[5]=d*A+h*B+f*q+m*ee,r[9]=d*D+h*z+f*H+m*re,r[13]=d*x+h*Z+f*P+m*me,r[2]=_*C+E*O+b*M+g*$,r[6]=_*A+E*B+b*q+g*ee,r[10]=_*D+E*z+b*H+g*re,r[14]=_*x+E*Z+b*P+g*me,r[3]=y*C+v*O+S*M+R*$,r[7]=y*A+v*B+S*q+R*ee,r[11]=y*D+v*z+S*H+R*re,r[15]=y*x+v*Z+S*P+R*me,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],s=e[4],i=e[8],r=e[12],o=e[1],a=e[5],c=e[9],u=e[13],d=e[2],h=e[6],f=e[10],m=e[14],_=e[3],E=e[7],b=e[11],g=e[15];return _*(+r*c*h-i*u*h-r*a*f+s*u*f+i*a*m-s*c*m)+E*(+n*c*m-n*u*f+r*o*f-i*o*m+i*u*d-r*c*d)+b*(+n*u*h-n*a*m-r*o*h+s*o*m+r*a*d-s*u*d)+g*(-i*a*d-n*c*h+n*a*f+i*o*h-s*o*f+s*c*d)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,s){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=s),this}invert(){const e=this.elements,n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],u=e[7],d=e[8],h=e[9],f=e[10],m=e[11],_=e[12],E=e[13],b=e[14],g=e[15],y=h*b*u-E*f*u+E*c*m-a*b*m-h*c*g+a*f*g,v=_*f*u-d*b*u-_*c*m+o*b*m+d*c*g-o*f*g,S=d*E*u-_*h*u+_*a*m-o*E*m-d*a*g+o*h*g,R=_*h*c-d*E*c-_*a*f+o*E*f+d*a*b-o*h*b,C=n*y+s*v+i*S+r*R;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/C;return e[0]=y*A,e[1]=(E*f*r-h*b*r-E*i*m+s*b*m+h*i*g-s*f*g)*A,e[2]=(a*b*r-E*c*r+E*i*u-s*b*u-a*i*g+s*c*g)*A,e[3]=(h*c*r-a*f*r-h*i*u+s*f*u+a*i*m-s*c*m)*A,e[4]=v*A,e[5]=(d*b*r-_*f*r+_*i*m-n*b*m-d*i*g+n*f*g)*A,e[6]=(_*c*r-o*b*r-_*i*u+n*b*u+o*i*g-n*c*g)*A,e[7]=(o*f*r-d*c*r+d*i*u-n*f*u-o*i*m+n*c*m)*A,e[8]=S*A,e[9]=(_*h*r-d*E*r-_*s*m+n*E*m+d*s*g-n*h*g)*A,e[10]=(o*E*r-_*a*r+_*s*u-n*E*u-o*s*g+n*a*g)*A,e[11]=(d*a*r-o*h*r-d*s*u+n*h*u+o*s*m-n*a*m)*A,e[12]=R*A,e[13]=(d*E*i-_*h*i+_*s*f-n*E*f-d*s*b+n*h*b)*A,e[14]=(_*a*i-o*E*i-_*s*c+n*E*c+o*s*b-n*a*b)*A,e[15]=(o*h*i-d*a*i+d*s*c-n*h*c-o*s*f+n*a*f)*A,this}scale(e){const n=this.elements,s=e.x,i=e.y,r=e.z;return n[0]*=s,n[4]*=i,n[8]*=r,n[1]*=s,n[5]*=i,n[9]*=r,n[2]*=s,n[6]*=i,n[10]*=r,n[3]*=s,n[7]*=i,n[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],s=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,s,i))}makeTranslation(e,n,s){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,s,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),s=Math.sin(e);return this.set(1,0,0,0,0,n,-s,0,0,s,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),s=Math.sin(e);return this.set(n,0,s,0,0,1,0,0,-s,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),s=Math.sin(e);return this.set(n,-s,0,0,s,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const s=Math.cos(n),i=Math.sin(n),r=1-s,o=e.x,a=e.y,c=e.z,u=r*o,d=r*a;return this.set(u*o+s,u*a-i*c,u*c+i*a,0,u*a+i*c,d*a+s,d*c-i*o,0,u*c-i*a,d*c+i*o,r*c*c+s,0,0,0,0,1),this}makeScale(e,n,s){return this.set(e,0,0,0,0,n,0,0,0,0,s,0,0,0,0,1),this}makeShear(e,n,s,i,r,o){return this.set(1,s,r,0,e,1,o,0,n,i,1,0,0,0,0,1),this}compose(e,n,s){const i=this.elements,r=n._x,o=n._y,a=n._z,c=n._w,u=r+r,d=o+o,h=a+a,f=r*u,m=r*d,_=r*h,E=o*d,b=o*h,g=a*h,y=c*u,v=c*d,S=c*h,R=s.x,C=s.y,A=s.z;return i[0]=(1-(E+g))*R,i[1]=(m+S)*R,i[2]=(_-v)*R,i[3]=0,i[4]=(m-S)*C,i[5]=(1-(f+g))*C,i[6]=(b+y)*C,i[7]=0,i[8]=(_+v)*A,i[9]=(b-y)*A,i[10]=(1-(f+E))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,s){const i=this.elements;let r=yo.set(i[0],i[1],i[2]).length();const o=yo.set(i[4],i[5],i[6]).length(),a=yo.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],Cs.copy(this);const u=1/r,d=1/o,h=1/a;return Cs.elements[0]*=u,Cs.elements[1]*=u,Cs.elements[2]*=u,Cs.elements[4]*=d,Cs.elements[5]*=d,Cs.elements[6]*=d,Cs.elements[8]*=h,Cs.elements[9]*=h,Cs.elements[10]*=h,n.setFromRotationMatrix(Cs),s.x=r,s.y=o,s.z=a,this}makePerspective(e,n,s,i,r,o,a=xi){const c=this.elements,u=2*r/(n-e),d=2*r/(s-i),h=(n+e)/(n-e),f=(s+i)/(s-i);let m,_;if(a===xi)m=-(o+r)/(o-r),_=-2*o*r/(o-r);else if(a===Xd)m=-o/(o-r),_=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=h,c[12]=0,c[1]=0,c[5]=d,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=m,c[14]=_,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,n,s,i,r,o,a=xi){const c=this.elements,u=1/(n-e),d=1/(s-i),h=1/(o-r),f=(n+e)*u,m=(s+i)*d;let _,E;if(a===xi)_=(o+r)*h,E=-2*h;else if(a===Xd)_=r*h,E=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*u,c[4]=0,c[8]=0,c[12]=-f,c[1]=0,c[5]=2*d,c[9]=0,c[13]=-m,c[2]=0,c[6]=0,c[10]=E,c[14]=-_,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const n=this.elements,s=e.elements;for(let i=0;i<16;i++)if(n[i]!==s[i])return!1;return!0}fromArray(e,n=0){for(let s=0;s<16;s++)this.elements[s]=e[s+n];return this}toArray(e=[],n=0){const s=this.elements;return e[n]=s[0],e[n+1]=s[1],e[n+2]=s[2],e[n+3]=s[3],e[n+4]=s[4],e[n+5]=s[5],e[n+6]=s[6],e[n+7]=s[7],e[n+8]=s[8],e[n+9]=s[9],e[n+10]=s[10],e[n+11]=s[11],e[n+12]=s[12],e[n+13]=s[13],e[n+14]=s[14],e[n+15]=s[15],e}}const yo=new ie,Cs=new xt,VRt=new ie(0,0,0),zRt=new ie(1,1,1),$i=new ie,Pc=new ie,Qn=new ie,$C=new xt,WC=new Er;class $u{constructor(e=0,n=0,s=0,i=$u.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=s,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,s,i=this._order){return this._x=e,this._y=n,this._z=s,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,s=!0){const i=e.elements,r=i[0],o=i[4],a=i[8],c=i[1],u=i[5],d=i[9],h=i[2],f=i[6],m=i[10];switch(n){case"XYZ":this._y=Math.asin(Nn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,m),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Nn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Nn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,m),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-Nn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,m),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(Nn(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-d,u),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Nn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-d,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,s===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,s){return $C.makeRotationFromQuaternion(e),this.setFromRotationMatrix($C,n,s)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return WC.setFromEuler(this),this.setFromQuaternion(WC,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}$u.DEFAULT_ORDER="XYZ";class bO{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let s=0;s0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function r(a,c){return a[c.uuid]===void 0&&(a[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const c=a.shapes;if(Array.isArray(c))for(let u=0,d=c.length;u0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(s.geometries=a),c.length>0&&(s.materials=c),u.length>0&&(s.textures=u),d.length>0&&(s.images=d),h.length>0&&(s.shapes=h),f.length>0&&(s.skeletons=f),m.length>0&&(s.animations=m),_.length>0&&(s.nodes=_)}return s.object=i,s;function o(a){const c=[];for(const u in a){const d=a[u];delete d.metadata,c.push(d)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let s=0;s0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,n,s,i,r){ws.subVectors(i,n),mi.subVectors(s,n),Om.subVectors(e,n);const o=ws.dot(ws),a=ws.dot(mi),c=ws.dot(Om),u=mi.dot(mi),d=mi.dot(Om),h=o*u-a*a;if(h===0)return r.set(-2,-1,-1);const f=1/h,m=(u*c-a*d)*f,_=(o*d-a*c)*f;return r.set(1-m-_,_,m)}static containsPoint(e,n,s,i){return this.getBarycoord(e,n,s,i,gi),gi.x>=0&&gi.y>=0&&gi.x+gi.y<=1}static getUV(e,n,s,i,r,o,a,c){return Fc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Fc=!0),this.getInterpolation(e,n,s,i,r,o,a,c)}static getInterpolation(e,n,s,i,r,o,a,c){return this.getBarycoord(e,n,s,i,gi),c.setScalar(0),c.addScaledVector(r,gi.x),c.addScaledVector(o,gi.y),c.addScaledVector(a,gi.z),c}static isFrontFacing(e,n,s,i){return ws.subVectors(s,n),mi.subVectors(e,n),ws.cross(mi).dot(i)<0}set(e,n,s){return this.a.copy(e),this.b.copy(n),this.c.copy(s),this}setFromPointsAndIndices(e,n,s,i){return this.a.copy(e[n]),this.b.copy(e[s]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,s,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,s),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ws.subVectors(this.c,this.b),mi.subVectors(this.a,this.b),ws.cross(mi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ns.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Ns.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,s,i,r){return Fc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Fc=!0),Ns.getInterpolation(e,this.a,this.b,this.c,n,s,i,r)}getInterpolation(e,n,s,i,r){return Ns.getInterpolation(e,this.a,this.b,this.c,n,s,i,r)}containsPoint(e){return Ns.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ns.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const s=this.a,i=this.b,r=this.c;let o,a;So.subVectors(i,s),To.subVectors(r,s),Im.subVectors(e,s);const c=So.dot(Im),u=To.dot(Im);if(c<=0&&u<=0)return n.copy(s);Mm.subVectors(e,i);const d=So.dot(Mm),h=To.dot(Mm);if(d>=0&&h<=d)return n.copy(i);const f=c*h-d*u;if(f<=0&&c>=0&&d<=0)return o=c/(c-d),n.copy(s).addScaledVector(So,o);Dm.subVectors(e,r);const m=So.dot(Dm),_=To.dot(Dm);if(_>=0&&m<=_)return n.copy(r);const E=m*u-c*_;if(E<=0&&u>=0&&_<=0)return a=u/(u-_),n.copy(s).addScaledVector(To,a);const b=d*_-m*h;if(b<=0&&h-d>=0&&m-_>=0)return ZC.subVectors(r,i),a=(h-d)/(h-d+(m-_)),n.copy(i).addScaledVector(ZC,a);const g=1/(b+E+f);return o=E*g,a=f*g,n.copy(s).addScaledVector(So,o).addScaledVector(To,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const EO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Wi={h:0,s:0,l:0},Bc={h:0,s:0,l:0};function km(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class pt{constructor(e,n,s){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,s)}set(e,n,s){if(n===void 0&&s===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,s);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=en){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ut.toWorkingColorSpace(this,n),this}setRGB(e,n,s,i=Ut.workingColorSpace){return this.r=e,this.g=n,this.b=s,Ut.toWorkingColorSpace(this,i),this}setHSL(e,n,s,i=Ut.workingColorSpace){if(e=AE(e,1),n=Nn(n,0,1),s=Nn(s,0,1),n===0)this.r=this.g=this.b=s;else{const r=s<=.5?s*(1+n):s+n-s*n,o=2*s-r;this.r=km(o,r,e+1/3),this.g=km(o,r,e),this.b=km(o,r,e-1/3)}return Ut.toWorkingColorSpace(this,i),this}setStyle(e,n=en){function s(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,n);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,n);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=en){const s=EO[e.toLowerCase()];return s!==void 0?this.setHex(s,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Wo(e.r),this.g=Wo(e.g),this.b=Wo(e.b),this}copyLinearToSRGB(e){return this.r=Sm(e.r),this.g=Sm(e.g),this.b=Sm(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=en){return Ut.fromWorkingColorSpace(Rn.copy(this),e),Math.round(Nn(Rn.r*255,0,255))*65536+Math.round(Nn(Rn.g*255,0,255))*256+Math.round(Nn(Rn.b*255,0,255))}getHexString(e=en){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Ut.workingColorSpace){Ut.fromWorkingColorSpace(Rn.copy(this),n);const s=Rn.r,i=Rn.g,r=Rn.b,o=Math.max(s,i,r),a=Math.min(s,i,r);let c,u;const d=(a+o)/2;if(a===o)c=0,u=0;else{const h=o-a;switch(u=d<=.5?h/(o+a):h/(2-o-a),o){case s:c=(i-r)/h+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const s=e[n];if(s===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(s):i&&i.isVector3&&s&&s.isVector3?i.copy(s):this[n]=s}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const s={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.color&&this.color.isColor&&(s.color=this.color.getHex()),this.roughness!==void 0&&(s.roughness=this.roughness),this.metalness!==void 0&&(s.metalness=this.metalness),this.sheen!==void 0&&(s.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(s.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(s.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(s.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(s.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(s.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(s.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(s.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(s.shininess=this.shininess),this.clearcoat!==void 0&&(s.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(s.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(s.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(s.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(s.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,s.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(s.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(s.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(s.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(s.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(s.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(s.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(s.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(s.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(s.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(s.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(s.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(s.lightMap=this.lightMap.toJSON(e).uuid,s.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(s.aoMap=this.aoMap.toJSON(e).uuid,s.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(s.bumpMap=this.bumpMap.toJSON(e).uuid,s.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(s.normalMap=this.normalMap.toJSON(e).uuid,s.normalMapType=this.normalMapType,s.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(s.displacementMap=this.displacementMap.toJSON(e).uuid,s.displacementScale=this.displacementScale,s.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(s.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(s.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(s.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(s.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(s.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(s.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(s.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(s.combine=this.combine)),this.envMapIntensity!==void 0&&(s.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(s.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(s.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(s.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(s.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(s.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(s.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(s.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(s.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(s.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(s.size=this.size),this.shadowSide!==null&&(s.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(s.sizeAttenuation=this.sizeAttenuation),this.blending!==$o&&(s.blending=this.blending),this.side!==Ii&&(s.side=this.side),this.vertexColors===!0&&(s.vertexColors=!0),this.opacity<1&&(s.opacity=this.opacity),this.transparent===!0&&(s.transparent=!0),this.blendSrc!==Lg&&(s.blendSrc=this.blendSrc),this.blendDst!==Pg&&(s.blendDst=this.blendDst),this.blendEquation!==Ur&&(s.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(s.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(s.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(s.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(s.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(s.blendAlpha=this.blendAlpha),this.depthFunc!==$d&&(s.depthFunc=this.depthFunc),this.depthTest===!1&&(s.depthTest=this.depthTest),this.depthWrite===!1&&(s.depthWrite=this.depthWrite),this.colorWrite===!1&&(s.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(s.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==BC&&(s.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(s.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(s.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==fo&&(s.stencilFail=this.stencilFail),this.stencilZFail!==fo&&(s.stencilZFail=this.stencilZFail),this.stencilZPass!==fo&&(s.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(s.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(s.rotation=this.rotation),this.polygonOffset===!0&&(s.polygonOffset=!0),this.polygonOffsetFactor!==0&&(s.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(s.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(s.linewidth=this.linewidth),this.dashSize!==void 0&&(s.dashSize=this.dashSize),this.gapSize!==void 0&&(s.gapSize=this.gapSize),this.scale!==void 0&&(s.scale=this.scale),this.dithering===!0&&(s.dithering=!0),this.alphaTest>0&&(s.alphaTest=this.alphaTest),this.alphaHash===!0&&(s.alphaHash=!0),this.alphaToCoverage===!0&&(s.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(s.premultipliedAlpha=!0),this.forceSinglePass===!0&&(s.forceSinglePass=!0),this.wireframe===!0&&(s.wireframe=!0),this.wireframeLinewidth>1&&(s.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(s.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(s.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(s.flatShading=!0),this.visible===!1&&(s.visible=!1),this.toneMapped===!1&&(s.toneMapped=!1),this.fog===!1&&(s.fog=!1),Object.keys(this.userData).length>0&&(s.userData=this.userData);function i(r){const o=[];for(const a in r){const c=r[a];delete c.metadata,o.push(c)}return o}if(n){const r=i(e.textures),o=i(e.images);r.length>0&&(s.textures=r),o.length>0&&(s.images=o)}return s}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let s=null;if(n!==null){const i=n.length;s=new Array(i);for(let r=0;r!==i;++r)s[r]=n[r].clone()}return this.clippingPlanes=s,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class ar extends Ls{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new pt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=xE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const on=new ie,Gc=new At;class Bn{constructor(e,n,s=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=s,this.usage=Vg,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ti,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,s){e*=this.itemSize,s*=n.itemSize;for(let i=0,r=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const c=this.parameters;for(const u in c)c[u]!==void 0&&(e[u]=c[u]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const s=this.attributes;for(const c in s){const u=s[c];e.data.attributes[c]=u.toJSON(e.data)}const i={};let r=!1;for(const c in this.morphAttributes){const u=this.morphAttributes[c],d=[];for(let h=0,f=u.length;h0&&(i[c]=d,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const s=e.index;s!==null&&this.setIndex(s.clone(n));const i=e.attributes;for(const u in i){const d=i[u];this.setAttribute(u,d.clone(n))}const r=e.morphAttributes;for(const u in r){const d=[],h=r[u];for(let f=0,m=h.length;f0){const i=n[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r(e.far-e.near)**2))&&(JC.copy(r).invert(),Rr.copy(e.ray).applyMatrix4(JC),!(s.boundingBox!==null&&Rr.intersectsBox(s.boundingBox)===!1)&&this._computeIntersections(e,n,Rr)))}_computeIntersections(e,n,s){let i;const r=this.geometry,o=this.material,a=r.index,c=r.attributes.position,u=r.attributes.uv,d=r.attributes.uv1,h=r.attributes.normal,f=r.groups,m=r.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,E=f.length;_n.far?null:{distance:u,point:Wc.clone(),object:t}}function Kc(t,e,n,s,i,r,o,a,c,u){t.getVertexPosition(a,Co),t.getVertexPosition(c,wo),t.getVertexPosition(u,Ro);const d=QRt(t,e,n,s,Co,wo,Ro,$c);if(d){i&&(Hc.fromBufferAttribute(i,a),qc.fromBufferAttribute(i,c),Yc.fromBufferAttribute(i,u),d.uv=Ns.getInterpolation($c,Co,wo,Ro,Hc,qc,Yc,new At)),r&&(Hc.fromBufferAttribute(r,a),qc.fromBufferAttribute(r,c),Yc.fromBufferAttribute(r,u),d.uv1=Ns.getInterpolation($c,Co,wo,Ro,Hc,qc,Yc,new At),d.uv2=d.uv1),o&&(t1.fromBufferAttribute(o,a),n1.fromBufferAttribute(o,c),s1.fromBufferAttribute(o,u),d.normal=Ns.getInterpolation($c,Co,wo,Ro,t1,n1,s1,new ie),d.normal.dot(s.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:c,c:u,normal:new ie,materialIndex:0};Ns.getNormal(Co,wo,Ro,h.normal),d.face=h}return d}class _r extends li{constructor(e=1,n=1,s=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:s,widthSegments:i,heightSegments:r,depthSegments:o};const a=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const c=[],u=[],d=[],h=[];let f=0,m=0;_("z","y","x",-1,-1,s,n,e,o,r,0),_("z","y","x",1,-1,s,n,-e,o,r,1),_("x","z","y",1,1,e,s,n,i,o,2),_("x","z","y",1,-1,e,s,-n,i,o,3),_("x","y","z",1,-1,e,n,s,i,r,4),_("x","y","z",-1,-1,e,n,-s,i,r,5),this.setIndex(c),this.setAttribute("position",new wi(u,3)),this.setAttribute("normal",new wi(d,3)),this.setAttribute("uv",new wi(h,2));function _(E,b,g,y,v,S,R,C,A,D,x){const O=S/A,B=R/D,z=S/2,Z=R/2,M=C/2,q=A+1,H=D+1;let P=0,$=0;const ee=new ie;for(let re=0;re0?1:-1,d.push(ee.x,ee.y,ee.z),h.push(Se/A),h.push(1-re/D),P+=1}}for(let re=0;re>8&255]+wn[t>>16&255]+wn[t>>24&255]+"-"+wn[e&255]+wn[e>>8&255]+"-"+wn[e>>16&15|64]+wn[e>>24&255]+"-"+wn[n&63|128]+wn[n>>8&255]+"-"+wn[n>>16&255]+wn[n>>24&255]+wn[s&255]+wn[s>>8&255]+wn[s>>16&255]+wn[s>>24&255]).toLowerCase()}function Nn(t,e,n){return Math.max(e,Math.min(n,t))}function AE(t,e){return(t%e+e)%e}function wRt(t,e,n,s,i){return s+(t-e)*(i-s)/(n-e)}function RRt(t,e,n){return t!==e?(n-t)/(e-t):0}function bl(t,e,n){return(1-n)*t+n*e}function ARt(t,e,n,s){return bl(t,e,1-Math.exp(-n*s))}function NRt(t,e=1){return e-Math.abs(AE(t,e*2)-e)}function ORt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function IRt(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function MRt(t,e){return t+Math.floor(Math.random()*(e-t+1))}function DRt(t,e){return t+Math.random()*(e-t)}function kRt(t){return t*(.5-Math.random())}function LRt(t){t!==void 0&&(VC=t);let e=VC+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function PRt(t){return t*gl}function URt(t){return t*_a}function Hg(t){return(t&t-1)===0&&t!==0}function FRt(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Zd(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function BRt(t,e,n,s,i){const r=Math.cos,o=Math.sin,a=r(n/2),c=o(n/2),u=r((e+s)/2),d=o((e+s)/2),h=r((e-s)/2),f=o((e-s)/2),m=r((s-e)/2),_=o((s-e)/2);switch(i){case"XYX":t.set(a*d,c*h,c*f,a*u);break;case"YZY":t.set(c*f,a*d,c*h,a*u);break;case"ZXZ":t.set(c*h,c*f,a*d,a*u);break;case"XZX":t.set(a*d,c*_,c*m,a*u);break;case"YXY":t.set(c*m,a*d,c*_,a*u);break;case"ZYZ":t.set(c*_,c*m,a*d,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Ws(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function zt(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const GRt={DEG2RAD:gl,RAD2DEG:_a,generateUUID:ks,clamp:Nn,euclideanModulo:AE,mapLinear:wRt,inverseLerp:RRt,lerp:bl,damp:ARt,pingpong:NRt,smoothstep:ORt,smootherstep:IRt,randInt:MRt,randFloat:DRt,randFloatSpread:kRt,seededRandom:LRt,degToRad:PRt,radToDeg:URt,isPowerOfTwo:Hg,ceilPowerOfTwo:FRt,floorPowerOfTwo:Zd,setQuaternionFromProperEuler:BRt,normalize:zt,denormalize:Ws};class At{constructor(e=0,n=0){At.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,s=this.y,i=e.elements;return this.x=i[0]*n+i[3]*s+i[6],this.y=i[1]*n+i[4]*s+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(n,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const s=this.dot(e)/n;return Math.acos(Nn(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,s=this.y-e.y;return n*n+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,s){return this.x=e.x+(n.x-e.x)*s,this.y=e.y+(n.y-e.y)*s,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const s=Math.cos(n),i=Math.sin(n),r=this.x-e.x,o=this.y-e.y;return this.x=r*s-o*i+e.x,this.y=r*i+o*s+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Tt{constructor(e,n,s,i,r,o,a,c,u){Tt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,s,i,r,o,a,c,u)}set(e,n,s,i,r,o,a,c,u){const d=this.elements;return d[0]=e,d[1]=i,d[2]=a,d[3]=n,d[4]=r,d[5]=c,d[6]=s,d[7]=o,d[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,s=e.elements;return n[0]=s[0],n[1]=s[1],n[2]=s[2],n[3]=s[3],n[4]=s[4],n[5]=s[5],n[6]=s[6],n[7]=s[7],n[8]=s[8],this}extractBasis(e,n,s){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),s.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const s=e.elements,i=n.elements,r=this.elements,o=s[0],a=s[3],c=s[6],u=s[1],d=s[4],h=s[7],f=s[2],m=s[5],_=s[8],E=i[0],b=i[3],g=i[6],y=i[1],v=i[4],S=i[7],R=i[2],C=i[5],A=i[8];return r[0]=o*E+a*y+c*R,r[3]=o*b+a*v+c*C,r[6]=o*g+a*S+c*A,r[1]=u*E+d*y+h*R,r[4]=u*b+d*v+h*C,r[7]=u*g+d*S+h*A,r[2]=f*E+m*y+_*R,r[5]=f*b+m*v+_*C,r[8]=f*g+m*S+_*A,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],u=e[7],d=e[8];return n*o*d-n*a*u-s*r*d+s*a*c+i*r*u-i*o*c}invert(){const e=this.elements,n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],u=e[7],d=e[8],h=d*o-a*u,f=a*c-d*r,m=u*r-o*c,_=n*h+s*f+i*m;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);const E=1/_;return e[0]=h*E,e[1]=(i*u-d*s)*E,e[2]=(a*s-i*o)*E,e[3]=f*E,e[4]=(d*n-i*c)*E,e[5]=(i*r-a*n)*E,e[6]=m*E,e[7]=(s*c-u*n)*E,e[8]=(o*n-s*r)*E,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,s,i,r,o,a){const c=Math.cos(r),u=Math.sin(r);return this.set(s*c,s*u,-s*(c*o+u*a)+o+e,-i*u,i*c,-i*(-u*o+c*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(vm.makeScale(e,n)),this}rotate(e){return this.premultiply(vm.makeRotation(-e)),this}translate(e,n){return this.premultiply(vm.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),s=Math.sin(e);return this.set(n,-s,0,s,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,s=e.elements;for(let i=0;i<9;i++)if(n[i]!==s[i])return!1;return!0}fromArray(e,n=0){for(let s=0;s<9;s++)this.elements[s]=e[s+n];return this}toArray(e=[],n=0){const s=this.elements;return e[n]=s[0],e[n+1]=s[1],e[n+2]=s[2],e[n+3]=s[3],e[n+4]=s[4],e[n+5]=s[5],e[n+6]=s[6],e[n+7]=s[7],e[n+8]=s[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const vm=new Tt;function hO(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function Gl(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function VRt(){const t=Gl("canvas");return t.style.display="block",t}const zC={};function El(t){t in zC||(zC[t]=!0,console.warn(t))}const HC=new Tt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),qC=new Tt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Oc={[Cn]:{transfer:Kd,primaries:jd,toReference:t=>t,fromReference:t=>t},[en]:{transfer:Kt,primaries:jd,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[qu]:{transfer:Kd,primaries:Qd,toReference:t=>t.applyMatrix3(qC),fromReference:t=>t.applyMatrix3(HC)},[RE]:{transfer:Kt,primaries:Qd,toReference:t=>t.convertSRGBToLinear().applyMatrix3(qC),fromReference:t=>t.applyMatrix3(HC).convertLinearToSRGB()}},zRt=new Set([Cn,qu]),Ut={enabled:!0,_workingColorSpace:Cn,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!zRt.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const s=Oc[e].toReference,i=Oc[n].fromReference;return i(s(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return Oc[t].primaries},getTransfer:function(t){return t===ds?Kd:Oc[t].transfer}};function Wo(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function Sm(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let mo;class fO{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{mo===void 0&&(mo=Gl("canvas")),mo.width=e.width,mo.height=e.height;const s=mo.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),n=mo}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Gl("canvas");n.width=e.width,n.height=e.height;const s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height);const i=s.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o0&&(s.userData=this.userData),n||(e.textures[this.uuid]=s),s}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==nO)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case da:e.x=e.x-Math.floor(e.x);break;case ls:e.x=e.x<0?0:1;break;case Wd:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case da:e.y=e.y-Math.floor(e.y);break;case ls:e.y=e.y<0?0:1;break;case Wd:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return El("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===en?Kr:pO}set encoding(e){El("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Kr?en:ds}}xn.DEFAULT_IMAGE=null;xn.DEFAULT_MAPPING=nO;xn.DEFAULT_ANISOTROPY=1;class Yt{constructor(e=0,n=0,s=0,i=1){Yt.prototype.isVector4=!0,this.x=e,this.y=n,this.z=s,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,s,i){return this.x=e,this.y=n,this.z=s,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,s=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*n+o[4]*s+o[8]*i+o[12]*r,this.y=o[1]*n+o[5]*s+o[9]*i+o[13]*r,this.z=o[2]*n+o[6]*s+o[10]*i+o[14]*r,this.w=o[3]*n+o[7]*s+o[11]*i+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,s,i,r;const c=e.elements,u=c[0],d=c[4],h=c[8],f=c[1],m=c[5],_=c[9],E=c[2],b=c[6],g=c[10];if(Math.abs(d-f)<.01&&Math.abs(h-E)<.01&&Math.abs(_-b)<.01){if(Math.abs(d+f)<.1&&Math.abs(h+E)<.1&&Math.abs(_+b)<.1&&Math.abs(u+m+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const v=(u+1)/2,S=(m+1)/2,R=(g+1)/2,C=(d+f)/4,A=(h+E)/4,D=(_+b)/4;return v>S&&v>R?v<.01?(s=0,i=.707106781,r=.707106781):(s=Math.sqrt(v),i=C/s,r=A/s):S>R?S<.01?(s=.707106781,i=0,r=.707106781):(i=Math.sqrt(S),s=C/i,r=D/i):R<.01?(s=.707106781,i=.707106781,r=0):(r=Math.sqrt(R),s=A/r,i=D/r),this.set(s,i,r,n),this}let y=Math.sqrt((b-_)*(b-_)+(h-E)*(h-E)+(f-d)*(f-d));return Math.abs(y)<.001&&(y=1),this.x=(b-_)/y,this.y=(h-E)/y,this.z=(f-d)/y,this.w=Math.acos((u+m+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(n,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,s){return this.x=e.x+(n.x-e.x)*s,this.y=e.y+(n.y-e.y)*s,this.z=e.z+(n.z-e.z)*s,this.w=e.w+(n.w-e.w)*s,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class YRt extends Da{constructor(e=1,n=1,s={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Yt(0,0,e,n),this.scissorTest=!1,this.viewport=new Yt(0,0,e,n);const i={width:e,height:n,depth:1};s.encoding!==void 0&&(El("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),s.colorSpace=s.encoding===Kr?en:ds),s=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:zn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},s),this.texture=new xn(i,s.mapping,s.wrapS,s.wrapT,s.magFilter,s.minFilter,s.format,s.type,s.anisotropy,s.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=s.generateMipmaps,this.texture.internalFormat=s.internalFormat,this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,this.depthTexture=s.depthTexture,this.samples=s.samples}setSize(e,n,s=1){(this.width!==e||this.height!==n||this.depth!==s)&&(this.width=e,this.height=n,this.depth=s,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=s,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new mO(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class to extends YRt{constructor(e=1,n=1,s={}){super(e,n,s),this.isWebGLRenderTarget=!0}}class gO extends xn{constructor(e=null,n=1,s=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:s,depth:i},this.magFilter=mn,this.minFilter=mn,this.wrapR=ls,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class $Rt extends xn{constructor(e=null,n=1,s=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:s,depth:i},this.magFilter=mn,this.minFilter=mn,this.wrapR=ls,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Er{constructor(e=0,n=0,s=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=s,this._w=i}static slerpFlat(e,n,s,i,r,o,a){let c=s[i+0],u=s[i+1],d=s[i+2],h=s[i+3];const f=r[o+0],m=r[o+1],_=r[o+2],E=r[o+3];if(a===0){e[n+0]=c,e[n+1]=u,e[n+2]=d,e[n+3]=h;return}if(a===1){e[n+0]=f,e[n+1]=m,e[n+2]=_,e[n+3]=E;return}if(h!==E||c!==f||u!==m||d!==_){let b=1-a;const g=c*f+u*m+d*_+h*E,y=g>=0?1:-1,v=1-g*g;if(v>Number.EPSILON){const R=Math.sqrt(v),C=Math.atan2(R,g*y);b=Math.sin(b*C)/R,a=Math.sin(a*C)/R}const S=a*y;if(c=c*b+f*S,u=u*b+m*S,d=d*b+_*S,h=h*b+E*S,b===1-a){const R=1/Math.sqrt(c*c+u*u+d*d+h*h);c*=R,u*=R,d*=R,h*=R}}e[n]=c,e[n+1]=u,e[n+2]=d,e[n+3]=h}static multiplyQuaternionsFlat(e,n,s,i,r,o){const a=s[i],c=s[i+1],u=s[i+2],d=s[i+3],h=r[o],f=r[o+1],m=r[o+2],_=r[o+3];return e[n]=a*_+d*h+c*m-u*f,e[n+1]=c*_+d*f+u*h-a*m,e[n+2]=u*_+d*m+a*f-c*h,e[n+3]=d*_-a*h-c*f-u*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,s,i){return this._x=e,this._y=n,this._z=s,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const s=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,c=Math.sin,u=a(s/2),d=a(i/2),h=a(r/2),f=c(s/2),m=c(i/2),_=c(r/2);switch(o){case"XYZ":this._x=f*d*h+u*m*_,this._y=u*m*h-f*d*_,this._z=u*d*_+f*m*h,this._w=u*d*h-f*m*_;break;case"YXZ":this._x=f*d*h+u*m*_,this._y=u*m*h-f*d*_,this._z=u*d*_-f*m*h,this._w=u*d*h+f*m*_;break;case"ZXY":this._x=f*d*h-u*m*_,this._y=u*m*h+f*d*_,this._z=u*d*_+f*m*h,this._w=u*d*h-f*m*_;break;case"ZYX":this._x=f*d*h-u*m*_,this._y=u*m*h+f*d*_,this._z=u*d*_-f*m*h,this._w=u*d*h+f*m*_;break;case"YZX":this._x=f*d*h+u*m*_,this._y=u*m*h+f*d*_,this._z=u*d*_-f*m*h,this._w=u*d*h-f*m*_;break;case"XZY":this._x=f*d*h-u*m*_,this._y=u*m*h-f*d*_,this._z=u*d*_+f*m*h,this._w=u*d*h+f*m*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const s=n/2,i=Math.sin(s);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(s),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,s=n[0],i=n[4],r=n[8],o=n[1],a=n[5],c=n[9],u=n[2],d=n[6],h=n[10],f=s+a+h;if(f>0){const m=.5/Math.sqrt(f+1);this._w=.25/m,this._x=(d-c)*m,this._y=(r-u)*m,this._z=(o-i)*m}else if(s>a&&s>h){const m=2*Math.sqrt(1+s-a-h);this._w=(d-c)/m,this._x=.25*m,this._y=(i+o)/m,this._z=(r+u)/m}else if(a>h){const m=2*Math.sqrt(1+a-s-h);this._w=(r-u)/m,this._x=(i+o)/m,this._y=.25*m,this._z=(c+d)/m}else{const m=2*Math.sqrt(1+h-s-a);this._w=(o-i)/m,this._x=(r+u)/m,this._y=(c+d)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let s=e.dot(n)+1;return sMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=s):(this._x=0,this._y=-e.z,this._z=e.y,this._w=s)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=s),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Nn(this.dot(e),-1,1)))}rotateTowards(e,n){const s=this.angleTo(e);if(s===0)return this;const i=Math.min(1,n/s);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const s=e._x,i=e._y,r=e._z,o=e._w,a=n._x,c=n._y,u=n._z,d=n._w;return this._x=s*d+o*a+i*u-r*c,this._y=i*d+o*c+r*a-s*u,this._z=r*d+o*u+s*c-i*a,this._w=o*d-s*a-i*c-r*u,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const s=this._x,i=this._y,r=this._z,o=this._w;let a=o*e._w+s*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=s,this._y=i,this._z=r,this;const c=1-a*a;if(c<=Number.EPSILON){const m=1-n;return this._w=m*o+n*this._w,this._x=m*s+n*this._x,this._y=m*i+n*this._y,this._z=m*r+n*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(c),d=Math.atan2(u,a),h=Math.sin((1-n)*d)/u,f=Math.sin(n*d)/u;return this._w=o*h+this._w*f,this._x=s*h+this._x*f,this._y=i*h+this._y*f,this._z=r*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,n,s){return this.copy(e).slerp(n,s)}random(){const e=Math.random(),n=Math.sqrt(1-e),s=Math.sqrt(e),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(n*Math.cos(i),s*Math.sin(r),s*Math.cos(r),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class ie{constructor(e=0,n=0,s=0){ie.prototype.isVector3=!0,this.x=e,this.y=n,this.z=s}set(e,n,s){return s===void 0&&(s=this.z),this.x=e,this.y=n,this.z=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(YC.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(YC.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[3]*s+r[6]*i,this.y=r[1]*n+r[4]*s+r[7]*i,this.z=r[2]*n+r[5]*s+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,s=this.y,i=this.z,r=e.elements,o=1/(r[3]*n+r[7]*s+r[11]*i+r[15]);return this.x=(r[0]*n+r[4]*s+r[8]*i+r[12])*o,this.y=(r[1]*n+r[5]*s+r[9]*i+r[13])*o,this.z=(r[2]*n+r[6]*s+r[10]*i+r[14])*o,this}applyQuaternion(e){const n=this.x,s=this.y,i=this.z,r=e.x,o=e.y,a=e.z,c=e.w,u=2*(o*i-a*s),d=2*(a*n-r*i),h=2*(r*s-o*n);return this.x=n+c*u+o*h-a*d,this.y=s+c*d+a*u-r*h,this.z=i+c*h+r*d-o*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*n+r[4]*s+r[8]*i,this.y=r[1]*n+r[5]*s+r[9]*i,this.z=r[2]*n+r[6]*s+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(n,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,s){return this.x=e.x+(n.x-e.x)*s,this.y=e.y+(n.y-e.y)*s,this.z=e.z+(n.z-e.z)*s,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const s=e.x,i=e.y,r=e.z,o=n.x,a=n.y,c=n.z;return this.x=i*c-r*a,this.y=r*o-s*c,this.z=s*a-i*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const s=e.dot(this)/n;return this.copy(e).multiplyScalar(s)}projectOnPlane(e){return xm.copy(this).projectOnVector(e),this.sub(xm)}reflect(e){return this.sub(xm.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const s=this.dot(e)/n;return Math.acos(Nn(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,s=this.y-e.y,i=this.z-e.z;return n*n+s*s+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,s){const i=Math.sin(n)*e;return this.x=i*Math.sin(s),this.y=Math.cos(n)*e,this.z=i*Math.cos(s),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,s){return this.x=e*Math.sin(n),this.y=s,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),s=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=s,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,s=Math.sqrt(1-e**2);return this.x=s*Math.cos(n),this.y=s*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const xm=new ie,YC=new Er;class Ui{constructor(e=new ie(1/0,1/0,1/0),n=new ie(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,s=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,xs),xs.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,s;return e.normal.x>0?(n=e.normal.x*this.min.x,s=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,s=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,s+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,s+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,s+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,s+=e.normal.z*this.min.z),n<=-e.constant&&s>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ja),Mc.subVectors(this.max,ja),go.subVectors(e.a,ja),bo.subVectors(e.b,ja),Eo.subVectors(e.c,ja),Hi.subVectors(bo,go),qi.subVectors(Eo,bo),Cr.subVectors(go,Eo);let n=[0,-Hi.z,Hi.y,0,-qi.z,qi.y,0,-Cr.z,Cr.y,Hi.z,0,-Hi.x,qi.z,0,-qi.x,Cr.z,0,-Cr.x,-Hi.y,Hi.x,0,-qi.y,qi.x,0,-Cr.y,Cr.x,0];return!Cm(n,go,bo,Eo,Mc)||(n=[1,0,0,0,1,0,0,0,1],!Cm(n,go,bo,Eo,Mc))?!1:(Dc.crossVectors(Hi,qi),n=[Dc.x,Dc.y,Dc.z],Cm(n,go,bo,Eo,Mc))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,xs).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(xs).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(_i[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_i[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_i[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_i[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_i[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_i[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_i[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_i[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_i),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const _i=[new ie,new ie,new ie,new ie,new ie,new ie,new ie,new ie],xs=new ie,Ic=new Ui,go=new ie,bo=new ie,Eo=new ie,Hi=new ie,qi=new ie,Cr=new ie,ja=new ie,Mc=new ie,Dc=new ie,wr=new ie;function Cm(t,e,n,s,i){for(let r=0,o=t.length-3;r<=o;r+=3){wr.fromArray(t,r);const a=i.x*Math.abs(wr.x)+i.y*Math.abs(wr.y)+i.z*Math.abs(wr.z),c=e.dot(wr),u=n.dot(wr),d=s.dot(wr);if(Math.max(-Math.max(c,u,d),Math.min(c,u,d))>a)return!1}return!0}const WRt=new Ui,Qa=new ie,wm=new ie;class ai{constructor(e=new ie,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const s=this.center;n!==void 0?s.copy(n):WRt.setFromPoints(e).getCenter(s);let i=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Qa.subVectors(e,this.center);const n=Qa.lengthSq();if(n>this.radius*this.radius){const s=Math.sqrt(n),i=(s-this.radius)*.5;this.center.addScaledVector(Qa,i/s),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(wm.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Qa.copy(e.center).add(wm)),this.expandByPoint(Qa.copy(e.center).sub(wm))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const hi=new ie,Rm=new ie,kc=new ie,Yi=new ie,Am=new ie,Lc=new ie,Nm=new ie;class Yu{constructor(e=new ie,n=new ie(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,hi)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const s=n.dot(this.direction);return s<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,s)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=hi.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(hi.copy(this.origin).addScaledVector(this.direction,n),hi.distanceToSquared(e))}distanceSqToSegment(e,n,s,i){Rm.copy(e).add(n).multiplyScalar(.5),kc.copy(n).sub(e).normalize(),Yi.copy(this.origin).sub(Rm);const r=e.distanceTo(n)*.5,o=-this.direction.dot(kc),a=Yi.dot(this.direction),c=-Yi.dot(kc),u=Yi.lengthSq(),d=Math.abs(1-o*o);let h,f,m,_;if(d>0)if(h=o*c-a,f=o*a-c,_=r*d,h>=0)if(f>=-_)if(f<=_){const E=1/d;h*=E,f*=E,m=h*(h+o*f+2*a)+f*(o*h+f+2*c)+u}else f=r,h=Math.max(0,-(o*f+a)),m=-h*h+f*(f+2*c)+u;else f=-r,h=Math.max(0,-(o*f+a)),m=-h*h+f*(f+2*c)+u;else f<=-_?(h=Math.max(0,-(-o*r+a)),f=h>0?-r:Math.min(Math.max(-r,-c),r),m=-h*h+f*(f+2*c)+u):f<=_?(h=0,f=Math.min(Math.max(-r,-c),r),m=f*(f+2*c)+u):(h=Math.max(0,-(o*r+a)),f=h>0?r:Math.min(Math.max(-r,-c),r),m=-h*h+f*(f+2*c)+u);else f=o>0?-r:r,h=Math.max(0,-(o*f+a)),m=-h*h+f*(f+2*c)+u;return s&&s.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(Rm).addScaledVector(kc,f),m}intersectSphere(e,n){hi.subVectors(e.center,this.origin);const s=hi.dot(this.direction),i=hi.dot(hi)-s*s,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),a=s-o,c=s+o;return c<0?null:a<0?this.at(c,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const s=-(this.origin.dot(e.normal)+e.constant)/n;return s>=0?s:null}intersectPlane(e,n){const s=this.distanceToPlane(e);return s===null?null:this.at(s,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let s,i,r,o,a,c;const u=1/this.direction.x,d=1/this.direction.y,h=1/this.direction.z,f=this.origin;return u>=0?(s=(e.min.x-f.x)*u,i=(e.max.x-f.x)*u):(s=(e.max.x-f.x)*u,i=(e.min.x-f.x)*u),d>=0?(r=(e.min.y-f.y)*d,o=(e.max.y-f.y)*d):(r=(e.max.y-f.y)*d,o=(e.min.y-f.y)*d),s>o||r>i||((r>s||isNaN(s))&&(s=r),(o=0?(a=(e.min.z-f.z)*h,c=(e.max.z-f.z)*h):(a=(e.max.z-f.z)*h,c=(e.min.z-f.z)*h),s>c||a>i)||((a>s||s!==s)&&(s=a),(c=0?s:i,n)}intersectsBox(e){return this.intersectBox(e,hi)!==null}intersectTriangle(e,n,s,i,r){Am.subVectors(n,e),Lc.subVectors(s,e),Nm.crossVectors(Am,Lc);let o=this.direction.dot(Nm),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Yi.subVectors(this.origin,e);const c=a*this.direction.dot(Lc.crossVectors(Yi,Lc));if(c<0)return null;const u=a*this.direction.dot(Am.cross(Yi));if(u<0||c+u>o)return null;const d=-a*Yi.dot(Nm);return d<0?null:this.at(d/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class xt{constructor(e,n,s,i,r,o,a,c,u,d,h,f,m,_,E,b){xt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,s,i,r,o,a,c,u,d,h,f,m,_,E,b)}set(e,n,s,i,r,o,a,c,u,d,h,f,m,_,E,b){const g=this.elements;return g[0]=e,g[4]=n,g[8]=s,g[12]=i,g[1]=r,g[5]=o,g[9]=a,g[13]=c,g[2]=u,g[6]=d,g[10]=h,g[14]=f,g[3]=m,g[7]=_,g[11]=E,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new xt().fromArray(this.elements)}copy(e){const n=this.elements,s=e.elements;return n[0]=s[0],n[1]=s[1],n[2]=s[2],n[3]=s[3],n[4]=s[4],n[5]=s[5],n[6]=s[6],n[7]=s[7],n[8]=s[8],n[9]=s[9],n[10]=s[10],n[11]=s[11],n[12]=s[12],n[13]=s[13],n[14]=s[14],n[15]=s[15],this}copyPosition(e){const n=this.elements,s=e.elements;return n[12]=s[12],n[13]=s[13],n[14]=s[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,s){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),s.setFromMatrixColumn(this,2),this}makeBasis(e,n,s){return this.set(e.x,n.x,s.x,0,e.y,n.y,s.y,0,e.z,n.z,s.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,s=e.elements,i=1/yo.setFromMatrixColumn(e,0).length(),r=1/yo.setFromMatrixColumn(e,1).length(),o=1/yo.setFromMatrixColumn(e,2).length();return n[0]=s[0]*i,n[1]=s[1]*i,n[2]=s[2]*i,n[3]=0,n[4]=s[4]*r,n[5]=s[5]*r,n[6]=s[6]*r,n[7]=0,n[8]=s[8]*o,n[9]=s[9]*o,n[10]=s[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,s=e.x,i=e.y,r=e.z,o=Math.cos(s),a=Math.sin(s),c=Math.cos(i),u=Math.sin(i),d=Math.cos(r),h=Math.sin(r);if(e.order==="XYZ"){const f=o*d,m=o*h,_=a*d,E=a*h;n[0]=c*d,n[4]=-c*h,n[8]=u,n[1]=m+_*u,n[5]=f-E*u,n[9]=-a*c,n[2]=E-f*u,n[6]=_+m*u,n[10]=o*c}else if(e.order==="YXZ"){const f=c*d,m=c*h,_=u*d,E=u*h;n[0]=f+E*a,n[4]=_*a-m,n[8]=o*u,n[1]=o*h,n[5]=o*d,n[9]=-a,n[2]=m*a-_,n[6]=E+f*a,n[10]=o*c}else if(e.order==="ZXY"){const f=c*d,m=c*h,_=u*d,E=u*h;n[0]=f-E*a,n[4]=-o*h,n[8]=_+m*a,n[1]=m+_*a,n[5]=o*d,n[9]=E-f*a,n[2]=-o*u,n[6]=a,n[10]=o*c}else if(e.order==="ZYX"){const f=o*d,m=o*h,_=a*d,E=a*h;n[0]=c*d,n[4]=_*u-m,n[8]=f*u+E,n[1]=c*h,n[5]=E*u+f,n[9]=m*u-_,n[2]=-u,n[6]=a*c,n[10]=o*c}else if(e.order==="YZX"){const f=o*c,m=o*u,_=a*c,E=a*u;n[0]=c*d,n[4]=E-f*h,n[8]=_*h+m,n[1]=h,n[5]=o*d,n[9]=-a*d,n[2]=-u*d,n[6]=m*h+_,n[10]=f-E*h}else if(e.order==="XZY"){const f=o*c,m=o*u,_=a*c,E=a*u;n[0]=c*d,n[4]=-h,n[8]=u*d,n[1]=f*h+E,n[5]=o*d,n[9]=m*h-_,n[2]=_*h-m,n[6]=a*d,n[10]=E*h+f}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(KRt,e,jRt)}lookAt(e,n,s){const i=this.elements;return Qn.subVectors(e,n),Qn.lengthSq()===0&&(Qn.z=1),Qn.normalize(),$i.crossVectors(s,Qn),$i.lengthSq()===0&&(Math.abs(s.z)===1?Qn.x+=1e-4:Qn.z+=1e-4,Qn.normalize(),$i.crossVectors(s,Qn)),$i.normalize(),Pc.crossVectors(Qn,$i),i[0]=$i.x,i[4]=Pc.x,i[8]=Qn.x,i[1]=$i.y,i[5]=Pc.y,i[9]=Qn.y,i[2]=$i.z,i[6]=Pc.z,i[10]=Qn.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const s=e.elements,i=n.elements,r=this.elements,o=s[0],a=s[4],c=s[8],u=s[12],d=s[1],h=s[5],f=s[9],m=s[13],_=s[2],E=s[6],b=s[10],g=s[14],y=s[3],v=s[7],S=s[11],R=s[15],C=i[0],A=i[4],D=i[8],x=i[12],O=i[1],B=i[5],z=i[9],Z=i[13],M=i[2],q=i[6],H=i[10],P=i[14],$=i[3],ee=i[7],re=i[11],me=i[15];return r[0]=o*C+a*O+c*M+u*$,r[4]=o*A+a*B+c*q+u*ee,r[8]=o*D+a*z+c*H+u*re,r[12]=o*x+a*Z+c*P+u*me,r[1]=d*C+h*O+f*M+m*$,r[5]=d*A+h*B+f*q+m*ee,r[9]=d*D+h*z+f*H+m*re,r[13]=d*x+h*Z+f*P+m*me,r[2]=_*C+E*O+b*M+g*$,r[6]=_*A+E*B+b*q+g*ee,r[10]=_*D+E*z+b*H+g*re,r[14]=_*x+E*Z+b*P+g*me,r[3]=y*C+v*O+S*M+R*$,r[7]=y*A+v*B+S*q+R*ee,r[11]=y*D+v*z+S*H+R*re,r[15]=y*x+v*Z+S*P+R*me,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],s=e[4],i=e[8],r=e[12],o=e[1],a=e[5],c=e[9],u=e[13],d=e[2],h=e[6],f=e[10],m=e[14],_=e[3],E=e[7],b=e[11],g=e[15];return _*(+r*c*h-i*u*h-r*a*f+s*u*f+i*a*m-s*c*m)+E*(+n*c*m-n*u*f+r*o*f-i*o*m+i*u*d-r*c*d)+b*(+n*u*h-n*a*m-r*o*h+s*o*m+r*a*d-s*u*d)+g*(-i*a*d-n*c*h+n*a*f+i*o*h-s*o*f+s*c*d)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,s){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=s),this}invert(){const e=this.elements,n=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],u=e[7],d=e[8],h=e[9],f=e[10],m=e[11],_=e[12],E=e[13],b=e[14],g=e[15],y=h*b*u-E*f*u+E*c*m-a*b*m-h*c*g+a*f*g,v=_*f*u-d*b*u-_*c*m+o*b*m+d*c*g-o*f*g,S=d*E*u-_*h*u+_*a*m-o*E*m-d*a*g+o*h*g,R=_*h*c-d*E*c-_*a*f+o*E*f+d*a*b-o*h*b,C=n*y+s*v+i*S+r*R;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/C;return e[0]=y*A,e[1]=(E*f*r-h*b*r-E*i*m+s*b*m+h*i*g-s*f*g)*A,e[2]=(a*b*r-E*c*r+E*i*u-s*b*u-a*i*g+s*c*g)*A,e[3]=(h*c*r-a*f*r-h*i*u+s*f*u+a*i*m-s*c*m)*A,e[4]=v*A,e[5]=(d*b*r-_*f*r+_*i*m-n*b*m-d*i*g+n*f*g)*A,e[6]=(_*c*r-o*b*r-_*i*u+n*b*u+o*i*g-n*c*g)*A,e[7]=(o*f*r-d*c*r+d*i*u-n*f*u-o*i*m+n*c*m)*A,e[8]=S*A,e[9]=(_*h*r-d*E*r-_*s*m+n*E*m+d*s*g-n*h*g)*A,e[10]=(o*E*r-_*a*r+_*s*u-n*E*u-o*s*g+n*a*g)*A,e[11]=(d*a*r-o*h*r-d*s*u+n*h*u+o*s*m-n*a*m)*A,e[12]=R*A,e[13]=(d*E*i-_*h*i+_*s*f-n*E*f-d*s*b+n*h*b)*A,e[14]=(_*a*i-o*E*i-_*s*c+n*E*c+o*s*b-n*a*b)*A,e[15]=(o*h*i-d*a*i+d*s*c-n*h*c-o*s*f+n*a*f)*A,this}scale(e){const n=this.elements,s=e.x,i=e.y,r=e.z;return n[0]*=s,n[4]*=i,n[8]*=r,n[1]*=s,n[5]*=i,n[9]*=r,n[2]*=s,n[6]*=i,n[10]*=r,n[3]*=s,n[7]*=i,n[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],s=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,s,i))}makeTranslation(e,n,s){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,s,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),s=Math.sin(e);return this.set(1,0,0,0,0,n,-s,0,0,s,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),s=Math.sin(e);return this.set(n,0,s,0,0,1,0,0,-s,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),s=Math.sin(e);return this.set(n,-s,0,0,s,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const s=Math.cos(n),i=Math.sin(n),r=1-s,o=e.x,a=e.y,c=e.z,u=r*o,d=r*a;return this.set(u*o+s,u*a-i*c,u*c+i*a,0,u*a+i*c,d*a+s,d*c-i*o,0,u*c-i*a,d*c+i*o,r*c*c+s,0,0,0,0,1),this}makeScale(e,n,s){return this.set(e,0,0,0,0,n,0,0,0,0,s,0,0,0,0,1),this}makeShear(e,n,s,i,r,o){return this.set(1,s,r,0,e,1,o,0,n,i,1,0,0,0,0,1),this}compose(e,n,s){const i=this.elements,r=n._x,o=n._y,a=n._z,c=n._w,u=r+r,d=o+o,h=a+a,f=r*u,m=r*d,_=r*h,E=o*d,b=o*h,g=a*h,y=c*u,v=c*d,S=c*h,R=s.x,C=s.y,A=s.z;return i[0]=(1-(E+g))*R,i[1]=(m+S)*R,i[2]=(_-v)*R,i[3]=0,i[4]=(m-S)*C,i[5]=(1-(f+g))*C,i[6]=(b+y)*C,i[7]=0,i[8]=(_+v)*A,i[9]=(b-y)*A,i[10]=(1-(f+E))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,s){const i=this.elements;let r=yo.set(i[0],i[1],i[2]).length();const o=yo.set(i[4],i[5],i[6]).length(),a=yo.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],Cs.copy(this);const u=1/r,d=1/o,h=1/a;return Cs.elements[0]*=u,Cs.elements[1]*=u,Cs.elements[2]*=u,Cs.elements[4]*=d,Cs.elements[5]*=d,Cs.elements[6]*=d,Cs.elements[8]*=h,Cs.elements[9]*=h,Cs.elements[10]*=h,n.setFromRotationMatrix(Cs),s.x=r,s.y=o,s.z=a,this}makePerspective(e,n,s,i,r,o,a=xi){const c=this.elements,u=2*r/(n-e),d=2*r/(s-i),h=(n+e)/(n-e),f=(s+i)/(s-i);let m,_;if(a===xi)m=-(o+r)/(o-r),_=-2*o*r/(o-r);else if(a===Xd)m=-o/(o-r),_=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=h,c[12]=0,c[1]=0,c[5]=d,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=m,c[14]=_,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,n,s,i,r,o,a=xi){const c=this.elements,u=1/(n-e),d=1/(s-i),h=1/(o-r),f=(n+e)*u,m=(s+i)*d;let _,E;if(a===xi)_=(o+r)*h,E=-2*h;else if(a===Xd)_=r*h,E=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*u,c[4]=0,c[8]=0,c[12]=-f,c[1]=0,c[5]=2*d,c[9]=0,c[13]=-m,c[2]=0,c[6]=0,c[10]=E,c[14]=-_,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const n=this.elements,s=e.elements;for(let i=0;i<16;i++)if(n[i]!==s[i])return!1;return!0}fromArray(e,n=0){for(let s=0;s<16;s++)this.elements[s]=e[s+n];return this}toArray(e=[],n=0){const s=this.elements;return e[n]=s[0],e[n+1]=s[1],e[n+2]=s[2],e[n+3]=s[3],e[n+4]=s[4],e[n+5]=s[5],e[n+6]=s[6],e[n+7]=s[7],e[n+8]=s[8],e[n+9]=s[9],e[n+10]=s[10],e[n+11]=s[11],e[n+12]=s[12],e[n+13]=s[13],e[n+14]=s[14],e[n+15]=s[15],e}}const yo=new ie,Cs=new xt,KRt=new ie(0,0,0),jRt=new ie(1,1,1),$i=new ie,Pc=new ie,Qn=new ie,$C=new xt,WC=new Er;class $u{constructor(e=0,n=0,s=0,i=$u.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=s,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,s,i=this._order){return this._x=e,this._y=n,this._z=s,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,s=!0){const i=e.elements,r=i[0],o=i[4],a=i[8],c=i[1],u=i[5],d=i[9],h=i[2],f=i[6],m=i[10];switch(n){case"XYZ":this._y=Math.asin(Nn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,m),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Nn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Nn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,m),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-Nn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,m),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(Nn(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-d,u),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-Nn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-d,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,s===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,s){return $C.makeRotationFromQuaternion(e),this.setFromRotationMatrix($C,n,s)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return WC.setFromEuler(this),this.setFromQuaternion(WC,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}$u.DEFAULT_ORDER="XYZ";class bO{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let s=0;s0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function r(a,c){return a[c.uuid]===void 0&&(a[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const c=a.shapes;if(Array.isArray(c))for(let u=0,d=c.length;u0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(s.geometries=a),c.length>0&&(s.materials=c),u.length>0&&(s.textures=u),d.length>0&&(s.images=d),h.length>0&&(s.shapes=h),f.length>0&&(s.skeletons=f),m.length>0&&(s.animations=m),_.length>0&&(s.nodes=_)}return s.object=i,s;function o(a){const c=[];for(const u in a){const d=a[u];delete d.metadata,c.push(d)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let s=0;s0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,n,s,i,r){ws.subVectors(i,n),mi.subVectors(s,n),Om.subVectors(e,n);const o=ws.dot(ws),a=ws.dot(mi),c=ws.dot(Om),u=mi.dot(mi),d=mi.dot(Om),h=o*u-a*a;if(h===0)return r.set(-2,-1,-1);const f=1/h,m=(u*c-a*d)*f,_=(o*d-a*c)*f;return r.set(1-m-_,_,m)}static containsPoint(e,n,s,i){return this.getBarycoord(e,n,s,i,gi),gi.x>=0&&gi.y>=0&&gi.x+gi.y<=1}static getUV(e,n,s,i,r,o,a,c){return Fc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Fc=!0),this.getInterpolation(e,n,s,i,r,o,a,c)}static getInterpolation(e,n,s,i,r,o,a,c){return this.getBarycoord(e,n,s,i,gi),c.setScalar(0),c.addScaledVector(r,gi.x),c.addScaledVector(o,gi.y),c.addScaledVector(a,gi.z),c}static isFrontFacing(e,n,s,i){return ws.subVectors(s,n),mi.subVectors(e,n),ws.cross(mi).dot(i)<0}set(e,n,s){return this.a.copy(e),this.b.copy(n),this.c.copy(s),this}setFromPointsAndIndices(e,n,s,i){return this.a.copy(e[n]),this.b.copy(e[s]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,s,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,s),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ws.subVectors(this.c,this.b),mi.subVectors(this.a,this.b),ws.cross(mi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ns.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return Ns.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,s,i,r){return Fc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Fc=!0),Ns.getInterpolation(e,this.a,this.b,this.c,n,s,i,r)}getInterpolation(e,n,s,i,r){return Ns.getInterpolation(e,this.a,this.b,this.c,n,s,i,r)}containsPoint(e){return Ns.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ns.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const s=this.a,i=this.b,r=this.c;let o,a;So.subVectors(i,s),To.subVectors(r,s),Im.subVectors(e,s);const c=So.dot(Im),u=To.dot(Im);if(c<=0&&u<=0)return n.copy(s);Mm.subVectors(e,i);const d=So.dot(Mm),h=To.dot(Mm);if(d>=0&&h<=d)return n.copy(i);const f=c*h-d*u;if(f<=0&&c>=0&&d<=0)return o=c/(c-d),n.copy(s).addScaledVector(So,o);Dm.subVectors(e,r);const m=So.dot(Dm),_=To.dot(Dm);if(_>=0&&m<=_)return n.copy(r);const E=m*u-c*_;if(E<=0&&u>=0&&_<=0)return a=u/(u-_),n.copy(s).addScaledVector(To,a);const b=d*_-m*h;if(b<=0&&h-d>=0&&m-_>=0)return ZC.subVectors(r,i),a=(h-d)/(h-d+(m-_)),n.copy(i).addScaledVector(ZC,a);const g=1/(b+E+f);return o=E*g,a=f*g,n.copy(s).addScaledVector(So,o).addScaledVector(To,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const EO={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Wi={h:0,s:0,l:0},Bc={h:0,s:0,l:0};function km(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class pt{constructor(e,n,s){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,s)}set(e,n,s){if(n===void 0&&s===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,n,s);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=en){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ut.toWorkingColorSpace(this,n),this}setRGB(e,n,s,i=Ut.workingColorSpace){return this.r=e,this.g=n,this.b=s,Ut.toWorkingColorSpace(this,i),this}setHSL(e,n,s,i=Ut.workingColorSpace){if(e=AE(e,1),n=Nn(n,0,1),s=Nn(s,0,1),n===0)this.r=this.g=this.b=s;else{const r=s<=.5?s*(1+n):s+n-s*n,o=2*s-r;this.r=km(o,r,e+1/3),this.g=km(o,r,e),this.b=km(o,r,e-1/3)}return Ut.toWorkingColorSpace(this,i),this}setStyle(e,n=en){function s(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,n);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,n);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=en){const s=EO[e.toLowerCase()];return s!==void 0?this.setHex(s,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Wo(e.r),this.g=Wo(e.g),this.b=Wo(e.b),this}copyLinearToSRGB(e){return this.r=Sm(e.r),this.g=Sm(e.g),this.b=Sm(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=en){return Ut.fromWorkingColorSpace(Rn.copy(this),e),Math.round(Nn(Rn.r*255,0,255))*65536+Math.round(Nn(Rn.g*255,0,255))*256+Math.round(Nn(Rn.b*255,0,255))}getHexString(e=en){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Ut.workingColorSpace){Ut.fromWorkingColorSpace(Rn.copy(this),n);const s=Rn.r,i=Rn.g,r=Rn.b,o=Math.max(s,i,r),a=Math.min(s,i,r);let c,u;const d=(a+o)/2;if(a===o)c=0,u=0;else{const h=o-a;switch(u=d<=.5?h/(o+a):h/(2-o-a),o){case s:c=(i-r)/h+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const s=e[n];if(s===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(s):i&&i.isVector3&&s&&s.isVector3?i.copy(s):this[n]=s}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const s={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.color&&this.color.isColor&&(s.color=this.color.getHex()),this.roughness!==void 0&&(s.roughness=this.roughness),this.metalness!==void 0&&(s.metalness=this.metalness),this.sheen!==void 0&&(s.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(s.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(s.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(s.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(s.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(s.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(s.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(s.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(s.shininess=this.shininess),this.clearcoat!==void 0&&(s.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(s.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(s.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(s.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(s.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,s.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(s.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(s.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(s.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(s.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(s.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(s.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(s.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(s.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(s.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(s.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(s.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(s.lightMap=this.lightMap.toJSON(e).uuid,s.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(s.aoMap=this.aoMap.toJSON(e).uuid,s.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(s.bumpMap=this.bumpMap.toJSON(e).uuid,s.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(s.normalMap=this.normalMap.toJSON(e).uuid,s.normalMapType=this.normalMapType,s.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(s.displacementMap=this.displacementMap.toJSON(e).uuid,s.displacementScale=this.displacementScale,s.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(s.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(s.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(s.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(s.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(s.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(s.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(s.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(s.combine=this.combine)),this.envMapIntensity!==void 0&&(s.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(s.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(s.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(s.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(s.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(s.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(s.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(s.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(s.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(s.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(s.size=this.size),this.shadowSide!==null&&(s.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(s.sizeAttenuation=this.sizeAttenuation),this.blending!==$o&&(s.blending=this.blending),this.side!==Ii&&(s.side=this.side),this.vertexColors===!0&&(s.vertexColors=!0),this.opacity<1&&(s.opacity=this.opacity),this.transparent===!0&&(s.transparent=!0),this.blendSrc!==Lg&&(s.blendSrc=this.blendSrc),this.blendDst!==Pg&&(s.blendDst=this.blendDst),this.blendEquation!==Ur&&(s.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(s.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(s.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(s.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(s.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(s.blendAlpha=this.blendAlpha),this.depthFunc!==$d&&(s.depthFunc=this.depthFunc),this.depthTest===!1&&(s.depthTest=this.depthTest),this.depthWrite===!1&&(s.depthWrite=this.depthWrite),this.colorWrite===!1&&(s.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(s.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==BC&&(s.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(s.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(s.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==fo&&(s.stencilFail=this.stencilFail),this.stencilZFail!==fo&&(s.stencilZFail=this.stencilZFail),this.stencilZPass!==fo&&(s.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(s.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(s.rotation=this.rotation),this.polygonOffset===!0&&(s.polygonOffset=!0),this.polygonOffsetFactor!==0&&(s.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(s.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(s.linewidth=this.linewidth),this.dashSize!==void 0&&(s.dashSize=this.dashSize),this.gapSize!==void 0&&(s.gapSize=this.gapSize),this.scale!==void 0&&(s.scale=this.scale),this.dithering===!0&&(s.dithering=!0),this.alphaTest>0&&(s.alphaTest=this.alphaTest),this.alphaHash===!0&&(s.alphaHash=!0),this.alphaToCoverage===!0&&(s.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(s.premultipliedAlpha=!0),this.forceSinglePass===!0&&(s.forceSinglePass=!0),this.wireframe===!0&&(s.wireframe=!0),this.wireframeLinewidth>1&&(s.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(s.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(s.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(s.flatShading=!0),this.visible===!1&&(s.visible=!1),this.toneMapped===!1&&(s.toneMapped=!1),this.fog===!1&&(s.fog=!1),Object.keys(this.userData).length>0&&(s.userData=this.userData);function i(r){const o=[];for(const a in r){const c=r[a];delete c.metadata,o.push(c)}return o}if(n){const r=i(e.textures),o=i(e.images);r.length>0&&(s.textures=r),o.length>0&&(s.images=o)}return s}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let s=null;if(n!==null){const i=n.length;s=new Array(i);for(let r=0;r!==i;++r)s[r]=n[r].clone()}return this.clippingPlanes=s,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class ar extends Ls{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new pt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=xE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const on=new ie,Gc=new At;class Bn{constructor(e,n,s=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=s,this.usage=Vg,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ti,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,s){e*=this.itemSize,s*=n.itemSize;for(let i=0,r=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const c=this.parameters;for(const u in c)c[u]!==void 0&&(e[u]=c[u]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const s=this.attributes;for(const c in s){const u=s[c];e.data.attributes[c]=u.toJSON(e.data)}const i={};let r=!1;for(const c in this.morphAttributes){const u=this.morphAttributes[c],d=[];for(let h=0,f=u.length;h0&&(i[c]=d,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const s=e.index;s!==null&&this.setIndex(s.clone(n));const i=e.attributes;for(const u in i){const d=i[u];this.setAttribute(u,d.clone(n))}const r=e.morphAttributes;for(const u in r){const d=[],h=r[u];for(let f=0,m=h.length;f0){const i=n[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r(e.far-e.near)**2))&&(JC.copy(r).invert(),Rr.copy(e.ray).applyMatrix4(JC),!(s.boundingBox!==null&&Rr.intersectsBox(s.boundingBox)===!1)&&this._computeIntersections(e,n,Rr)))}_computeIntersections(e,n,s){let i;const r=this.geometry,o=this.material,a=r.index,c=r.attributes.position,u=r.attributes.uv,d=r.attributes.uv1,h=r.attributes.normal,f=r.groups,m=r.drawRange;if(a!==null)if(Array.isArray(o))for(let _=0,E=f.length;_n.far?null:{distance:u,point:Wc.clone(),object:t}}function Kc(t,e,n,s,i,r,o,a,c,u){t.getVertexPosition(a,Co),t.getVertexPosition(c,wo),t.getVertexPosition(u,Ro);const d=sAt(t,e,n,s,Co,wo,Ro,$c);if(d){i&&(Hc.fromBufferAttribute(i,a),qc.fromBufferAttribute(i,c),Yc.fromBufferAttribute(i,u),d.uv=Ns.getInterpolation($c,Co,wo,Ro,Hc,qc,Yc,new At)),r&&(Hc.fromBufferAttribute(r,a),qc.fromBufferAttribute(r,c),Yc.fromBufferAttribute(r,u),d.uv1=Ns.getInterpolation($c,Co,wo,Ro,Hc,qc,Yc,new At),d.uv2=d.uv1),o&&(t1.fromBufferAttribute(o,a),n1.fromBufferAttribute(o,c),s1.fromBufferAttribute(o,u),d.normal=Ns.getInterpolation($c,Co,wo,Ro,t1,n1,s1,new ie),d.normal.dot(s.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:c,c:u,normal:new ie,materialIndex:0};Ns.getNormal(Co,wo,Ro,h.normal),d.face=h}return d}class _r extends li{constructor(e=1,n=1,s=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:s,widthSegments:i,heightSegments:r,depthSegments:o};const a=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const c=[],u=[],d=[],h=[];let f=0,m=0;_("z","y","x",-1,-1,s,n,e,o,r,0),_("z","y","x",1,-1,s,n,-e,o,r,1),_("x","z","y",1,1,e,s,n,i,o,2),_("x","z","y",1,-1,e,s,-n,i,o,3),_("x","y","z",1,-1,e,n,s,i,r,4),_("x","y","z",-1,-1,e,n,-s,i,r,5),this.setIndex(c),this.setAttribute("position",new wi(u,3)),this.setAttribute("normal",new wi(d,3)),this.setAttribute("uv",new wi(h,2));function _(E,b,g,y,v,S,R,C,A,D,x){const O=S/A,B=R/D,z=S/2,Z=R/2,M=C/2,q=A+1,H=D+1;let P=0,$=0;const ee=new ie;for(let re=0;re0?1:-1,d.push(ee.x,ee.y,ee.z),h.push(Se/A),h.push(1-re/D),P+=1}}for(let re=0;re0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const s={};for(const i in this.extensions)this.extensions[i]===!0&&(s[i]=!0);return Object.keys(s).length>0&&(n.extensions=s),n}}class TO extends Jt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new xt,this.projectionMatrix=new xt,this.projectionMatrixInverse=new xt,this.coordinateSystem=xi}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Pn extends TO{constructor(e=50,n=1,s=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=s,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=_a*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(gl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return _a*2*Math.atan(Math.tan(gl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,s,i,r,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(gl*.5*this.fov)/this.zoom,s=2*n,i=this.aspect*s,r=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const c=o.fullWidth,u=o.fullHeight;r+=o.offsetX*i/c,n-=o.offsetY*s/u,i*=o.width/c,s*=o.height/u}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,n,n-s,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Ao=-90,No=1;class tAt extends Jt{constructor(e,n,s){super(),this.type="CubeCamera",this.renderTarget=s,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Pn(Ao,No,e,n);i.layers=this.layers,this.add(i);const r=new Pn(Ao,No,e,n);r.layers=this.layers,this.add(r);const o=new Pn(Ao,No,e,n);o.layers=this.layers,this.add(o);const a=new Pn(Ao,No,e,n);a.layers=this.layers,this.add(a);const c=new Pn(Ao,No,e,n);c.layers=this.layers,this.add(c);const u=new Pn(Ao,No,e,n);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[s,i,r,o,a,c]=n;for(const u of n)this.remove(u);if(e===xi)s.up.set(0,1,0),s.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===Xd)s.up.set(0,-1,0),s.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of n)this.add(u),u.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:s,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,c,u,d]=this.children,h=e.getRenderTarget(),f=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),_=e.xr.enabled;e.xr.enabled=!1;const E=s.texture.generateMipmaps;s.texture.generateMipmaps=!1,e.setRenderTarget(s,0,i),e.render(n,r),e.setRenderTarget(s,1,i),e.render(n,o),e.setRenderTarget(s,2,i),e.render(n,a),e.setRenderTarget(s,3,i),e.render(n,c),e.setRenderTarget(s,4,i),e.render(n,u),s.texture.generateMipmaps=E,e.setRenderTarget(s,5,i),e.render(n,d),e.setRenderTarget(h,f,m),e.xr.enabled=_,s.texture.needsPMREMUpdate=!0}}class xO extends xn{constructor(e,n,s,i,r,o,a,c,u,d){e=e!==void 0?e:[],n=n!==void 0?n:la,super(e,n,s,i,r,o,a,c,u,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class nAt extends to{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const s={width:e,height:e,depth:1},i=[s,s,s,s,s,s];n.encoding!==void 0&&(El("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Kr?en:ds),this.texture=new xO(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:zn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const s={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class no extends Ls{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=oAt,this.fragmentShader=aAt,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=ha(e.uniforms),this.uniformsGroups=iAt(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?n.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?n.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?n.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?n.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?n.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?n.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?n.uniforms[i]={type:"m4",value:o.toArray()}:n.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const s={};for(const i in this.extensions)this.extensions[i]===!0&&(s[i]=!0);return Object.keys(s).length>0&&(n.extensions=s),n}}class TO extends Jt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new xt,this.projectionMatrix=new xt,this.projectionMatrixInverse=new xt,this.coordinateSystem=xi}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Pn extends TO{constructor(e=50,n=1,s=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=s,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=_a*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(gl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return _a*2*Math.atan(Math.tan(gl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,s,i,r,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(gl*.5*this.fov)/this.zoom,s=2*n,i=this.aspect*s,r=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const c=o.fullWidth,u=o.fullHeight;r+=o.offsetX*i/c,n-=o.offsetY*s/u,i*=o.width/c,s*=o.height/u}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,n,n-s,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Ao=-90,No=1;class lAt extends Jt{constructor(e,n,s){super(),this.type="CubeCamera",this.renderTarget=s,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Pn(Ao,No,e,n);i.layers=this.layers,this.add(i);const r=new Pn(Ao,No,e,n);r.layers=this.layers,this.add(r);const o=new Pn(Ao,No,e,n);o.layers=this.layers,this.add(o);const a=new Pn(Ao,No,e,n);a.layers=this.layers,this.add(a);const c=new Pn(Ao,No,e,n);c.layers=this.layers,this.add(c);const u=new Pn(Ao,No,e,n);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[s,i,r,o,a,c]=n;for(const u of n)this.remove(u);if(e===xi)s.up.set(0,1,0),s.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===Xd)s.up.set(0,-1,0),s.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of n)this.add(u),u.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:s,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,c,u,d]=this.children,h=e.getRenderTarget(),f=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),_=e.xr.enabled;e.xr.enabled=!1;const E=s.texture.generateMipmaps;s.texture.generateMipmaps=!1,e.setRenderTarget(s,0,i),e.render(n,r),e.setRenderTarget(s,1,i),e.render(n,o),e.setRenderTarget(s,2,i),e.render(n,a),e.setRenderTarget(s,3,i),e.render(n,c),e.setRenderTarget(s,4,i),e.render(n,u),s.texture.generateMipmaps=E,e.setRenderTarget(s,5,i),e.render(n,d),e.setRenderTarget(h,f,m),e.xr.enabled=_,s.texture.needsPMREMUpdate=!0}}class xO extends xn{constructor(e,n,s,i,r,o,a,c,u,d){e=e!==void 0?e:[],n=n!==void 0?n:la,super(e,n,s,i,r,o,a,c,u,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class cAt extends to{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const s={width:e,height:e,depth:1},i=[s,s,s,s,s,s];n.encoding!==void 0&&(El("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Kr?en:ds),this.texture=new xO(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:zn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const s={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -299,9 +299,9 @@ ${c}`;navigator.clipboard.writeText(u)}else navigator.clipboard.writeText(e);thi gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new _r(5,5,5),r=new no({name:"CubemapFromEquirect",uniforms:ha(s.uniforms),vertexShader:s.vertexShader,fragmentShader:s.fragmentShader,side:Yn,blending:dr});r.uniforms.tEquirect.value=n;const o=new Un(i,r),a=n.minFilter;return n.minFilter===eo&&(n.minFilter=zn),new tAt(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,s,i){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,s,i);e.setRenderTarget(r)}}const Um=new ie,sAt=new ie,iAt=new Tt;class Ir{constructor(e=new ie(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,s,i){return this.normal.set(e,n,s),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,s){const i=Um.subVectors(s,n).cross(sAt.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const s=e.delta(Um),i=this.normal.dot(s);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:n.copy(e.start).addScaledVector(s,r)}intersectsLine(e){const n=this.distanceToPoint(e.start),s=this.distanceToPoint(e.end);return n<0&&s>0||s<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const s=n||iAt.getNormalMatrix(e),i=this.coplanarPoint(Um).applyMatrix4(e),r=this.normal.applyMatrix3(s).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Ar=new ai,jc=new ie;class NE{constructor(e=new Ir,n=new Ir,s=new Ir,i=new Ir,r=new Ir,o=new Ir){this.planes=[e,n,s,i,r,o]}set(e,n,s,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(s),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const n=this.planes;for(let s=0;s<6;s++)n[s].copy(e.planes[s]);return this}setFromProjectionMatrix(e,n=xi){const s=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],c=i[3],u=i[4],d=i[5],h=i[6],f=i[7],m=i[8],_=i[9],E=i[10],b=i[11],g=i[12],y=i[13],v=i[14],S=i[15];if(s[0].setComponents(c-r,f-u,b-m,S-g).normalize(),s[1].setComponents(c+r,f+u,b+m,S+g).normalize(),s[2].setComponents(c+o,f+d,b+_,S+y).normalize(),s[3].setComponents(c-o,f-d,b-_,S-y).normalize(),s[4].setComponents(c-a,f-h,b-E,S-v).normalize(),n===xi)s[5].setComponents(c+a,f+h,b+E,S+v).normalize();else if(n===Xd)s[5].setComponents(a,h,E,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ar.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Ar.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ar)}intersectsSprite(e){return Ar.center.set(0,0,0),Ar.radius=.7071067811865476,Ar.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ar)}intersectsSphere(e){const n=this.planes,s=e.center,i=-e.radius;for(let r=0;r<6;r++)if(n[r].distanceToPoint(s)0?e.max.x:e.min.x,jc.y=i.normal.y>0?e.max.y:e.min.y,jc.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(jc)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let s=0;s<6;s++)if(n[s].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function CO(){let t=null,e=!1,n=null,s=null;function i(r,o){n(r,o),s=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(s=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(s),e=!1},setAnimationLoop:function(r){n=r},setContext:function(r){t=r}}}function rAt(t,e){const n=e.isWebGL2,s=new WeakMap;function i(u,d){const h=u.array,f=u.usage,m=h.byteLength,_=t.createBuffer();t.bindBuffer(d,_),t.bufferData(d,h,f),u.onUploadCallback();let E;if(h instanceof Float32Array)E=t.FLOAT;else if(h instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(n)E=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else E=t.UNSIGNED_SHORT;else if(h instanceof Int16Array)E=t.SHORT;else if(h instanceof Uint32Array)E=t.UNSIGNED_INT;else if(h instanceof Int32Array)E=t.INT;else if(h instanceof Int8Array)E=t.BYTE;else if(h instanceof Uint8Array)E=t.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)E=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:_,type:E,bytesPerElement:h.BYTES_PER_ELEMENT,version:u.version,size:m}}function r(u,d,h){const f=d.array,m=d._updateRange,_=d.updateRanges;if(t.bindBuffer(h,u),m.count===-1&&_.length===0&&t.bufferSubData(h,0,f),_.length!==0){for(let E=0,b=_.length;E1?null:n.copy(e.start).addScaledVector(s,r)}intersectsLine(e){const n=this.distanceToPoint(e.start),s=this.distanceToPoint(e.end);return n<0&&s>0||s<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const s=n||uAt.getNormalMatrix(e),i=this.coplanarPoint(Um).applyMatrix4(e),r=this.normal.applyMatrix3(s).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Ar=new ai,jc=new ie;class NE{constructor(e=new Ir,n=new Ir,s=new Ir,i=new Ir,r=new Ir,o=new Ir){this.planes=[e,n,s,i,r,o]}set(e,n,s,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(s),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const n=this.planes;for(let s=0;s<6;s++)n[s].copy(e.planes[s]);return this}setFromProjectionMatrix(e,n=xi){const s=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],c=i[3],u=i[4],d=i[5],h=i[6],f=i[7],m=i[8],_=i[9],E=i[10],b=i[11],g=i[12],y=i[13],v=i[14],S=i[15];if(s[0].setComponents(c-r,f-u,b-m,S-g).normalize(),s[1].setComponents(c+r,f+u,b+m,S+g).normalize(),s[2].setComponents(c+o,f+d,b+_,S+y).normalize(),s[3].setComponents(c-o,f-d,b-_,S-y).normalize(),s[4].setComponents(c-a,f-h,b-E,S-v).normalize(),n===xi)s[5].setComponents(c+a,f+h,b+E,S+v).normalize();else if(n===Xd)s[5].setComponents(a,h,E,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ar.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Ar.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ar)}intersectsSprite(e){return Ar.center.set(0,0,0),Ar.radius=.7071067811865476,Ar.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ar)}intersectsSphere(e){const n=this.planes,s=e.center,i=-e.radius;for(let r=0;r<6;r++)if(n[r].distanceToPoint(s)0?e.max.x:e.min.x,jc.y=i.normal.y>0?e.max.y:e.min.y,jc.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(jc)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let s=0;s<6;s++)if(n[s].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function CO(){let t=null,e=!1,n=null,s=null;function i(r,o){n(r,o),s=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(s=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(s),e=!1},setAnimationLoop:function(r){n=r},setContext:function(r){t=r}}}function pAt(t,e){const n=e.isWebGL2,s=new WeakMap;function i(u,d){const h=u.array,f=u.usage,m=h.byteLength,_=t.createBuffer();t.bindBuffer(d,_),t.bufferData(d,h,f),u.onUploadCallback();let E;if(h instanceof Float32Array)E=t.FLOAT;else if(h instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(n)E=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else E=t.UNSIGNED_SHORT;else if(h instanceof Int16Array)E=t.SHORT;else if(h instanceof Uint32Array)E=t.UNSIGNED_INT;else if(h instanceof Int32Array)E=t.INT;else if(h instanceof Int8Array)E=t.BYTE;else if(h instanceof Uint8Array)E=t.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)E=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:_,type:E,bytesPerElement:h.BYTES_PER_ELEMENT,version:u.version,size:m}}function r(u,d,h){const f=d.array,m=d._updateRange,_=d.updateRanges;if(t.bindBuffer(h,u),m.count===-1&&_.length===0&&t.bufferSubData(h,0,f),_.length!==0){for(let E=0,b=_.length;E 0 +#endif`,AAt=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -498,26 +498,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,SAt=`#if NUM_CLIPPING_PLANES > 0 +#endif`,NAt=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,TAt=`#if NUM_CLIPPING_PLANES > 0 +#endif`,OAt=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,xAt=`#if NUM_CLIPPING_PLANES > 0 +#endif`,IAt=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,CAt=`#if defined( USE_COLOR_ALPHA ) +#endif`,MAt=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,wAt=`#if defined( USE_COLOR_ALPHA ) +#endif`,DAt=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,RAt=`#if defined( USE_COLOR_ALPHA ) +#endif`,kAt=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,AAt=`#if defined( USE_COLOR_ALPHA ) +#endif`,LAt=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -527,7 +527,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,NAt=`#define PI 3.141592653589793 +#endif`,PAt=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -605,7 +605,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,OAt=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,UAt=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -703,7 +703,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,IAt=`vec3 transformedNormal = objectNormal; +#endif`,FAt=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -732,18 +732,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,MAt=`#ifdef USE_DISPLACEMENTMAP +#endif`,BAt=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,DAt=`#ifdef USE_DISPLACEMENTMAP +#endif`,GAt=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,kAt=`#ifdef USE_EMISSIVEMAP +#endif`,VAt=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,LAt=`#ifdef USE_EMISSIVEMAP +#endif`,zAt=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,PAt="gl_FragColor = linearToOutputTexel( gl_FragColor );",UAt=` +#endif`,HAt="gl_FragColor = linearToOutputTexel( gl_FragColor );",qAt=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -771,7 +771,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,FAt=`#ifdef USE_ENVMAP +}`,YAt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -800,7 +800,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,BAt=`#ifdef USE_ENVMAP +#endif`,$At=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -809,7 +809,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,GAt=`#ifdef USE_ENVMAP +#endif`,WAt=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -820,7 +820,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,VAt=`#ifdef USE_ENVMAP +#endif`,KAt=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -831,7 +831,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,zAt=`#ifdef USE_ENVMAP +#endif`,jAt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -848,18 +848,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,HAt=`#ifdef USE_FOG +#endif`,QAt=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,qAt=`#ifdef USE_FOG +#endif`,XAt=`#ifdef USE_FOG varying float vFogDepth; -#endif`,YAt=`#ifdef USE_FOG +#endif`,ZAt=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,$At=`#ifdef USE_FOG +#endif`,JAt=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -868,7 +868,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,WAt=`#ifdef USE_GRADIENTMAP +#endif`,eNt=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -880,16 +880,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,KAt=`#ifdef USE_LIGHTMAP +}`,tNt=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,jAt=`#ifdef USE_LIGHTMAP +#endif`,nNt=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,QAt=`LambertMaterial material; +#endif`,sNt=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,XAt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,iNt=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -903,7 +903,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,ZAt=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,rNt=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -1026,7 +1026,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,JAt=`#ifdef USE_ENVMAP +#endif`,oNt=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -1059,8 +1059,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,eNt=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,tNt=`varying vec3 vViewPosition; +#endif`,aNt=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,lNt=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1072,11 +1072,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,nNt=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,cNt=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,sNt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,dNt=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1093,7 +1093,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,iNt=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,uNt=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -1176,7 +1176,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,rNt=`struct PhysicalMaterial { +#endif`,pNt=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1476,7 +1476,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,oNt=` +}`,_Nt=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1591,7 +1591,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,aNt=`#if defined( RE_IndirectDiffuse ) +#endif`,hNt=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1610,25 +1610,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,lNt=`#if defined( RE_IndirectDiffuse ) +#endif`,fNt=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,cNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,mNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,dNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,gNt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,uNt=`#ifdef USE_LOGDEPTHBUF +#endif`,bNt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,pNt=`#ifdef USE_LOGDEPTHBUF +#endif`,ENt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1638,16 +1638,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,_Nt=`#ifdef USE_MAP +#endif`,yNt=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,hNt=`#ifdef USE_MAP +#endif`,vNt=`#ifdef USE_MAP uniform sampler2D map; -#endif`,fNt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,SNt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1659,7 +1659,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,mNt=`#if defined( USE_POINTS_UV ) +#endif`,TNt=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1671,13 +1671,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,gNt=`float metalnessFactor = metalness; +#endif`,xNt=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,bNt=`#ifdef USE_METALNESSMAP +#endif`,CNt=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,ENt=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,wNt=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1686,7 +1686,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,yNt=`#ifdef USE_MORPHNORMALS +#endif`,RNt=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1698,7 +1698,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,vNt=`#ifdef USE_MORPHTARGETS +#endif`,ANt=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1718,7 +1718,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,SNt=`#ifdef USE_MORPHTARGETS +#endif`,NNt=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1736,7 +1736,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,TNt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,ONt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1777,7 +1777,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,xNt=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,INt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1792,25 +1792,25 @@ vec3 nonPerturbedNormal = normal;`,xNt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,CNt=`#ifndef FLAT_SHADED +#endif`,MNt=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,wNt=`#ifndef FLAT_SHADED +#endif`,DNt=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,RNt=`#ifndef FLAT_SHADED +#endif`,kNt=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,ANt=`#ifdef USE_NORMALMAP +#endif`,LNt=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1832,13 +1832,13 @@ vec3 nonPerturbedNormal = normal;`,xNt=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,NNt=`#ifdef USE_CLEARCOAT +#endif`,PNt=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,ONt=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,UNt=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,INt=`#ifdef USE_CLEARCOATMAP +#endif`,FNt=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1847,18 +1847,18 @@ vec3 nonPerturbedNormal = normal;`,xNt=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,MNt=`#ifdef USE_IRIDESCENCEMAP +#endif`,BNt=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,DNt=`#ifdef OPAQUE +#endif`,GNt=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,kNt=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,VNt=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1899,9 +1899,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,LNt=`#ifdef PREMULTIPLIED_ALPHA +}`,zNt=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,PNt=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,HNt=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1909,22 +1909,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,UNt=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,qNt=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,FNt=`#ifdef DITHERING +#endif`,YNt=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,BNt=`float roughnessFactor = roughness; +#endif`,$Nt=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,GNt=`#ifdef USE_ROUGHNESSMAP +#endif`,WNt=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,VNt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,KNt=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2101,7 +2101,7 @@ gl_Position = projectionMatrix * mvPosition;`,UNt=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,zNt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,jNt=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2139,7 +2139,7 @@ gl_Position = projectionMatrix * mvPosition;`,UNt=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,HNt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,QNt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -2171,7 +2171,7 @@ gl_Position = projectionMatrix * mvPosition;`,UNt=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,qNt=`float getShadowMask() { +#endif`,XNt=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2203,12 +2203,12 @@ gl_Position = projectionMatrix * mvPosition;`,UNt=`#ifdef DITHERING #endif #endif return shadow; -}`,YNt=`#ifdef USE_SKINNING +}`,ZNt=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,$Nt=`#ifdef USE_SKINNING +#endif`,JNt=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2223,7 +2223,7 @@ gl_Position = projectionMatrix * mvPosition;`,UNt=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,WNt=`#ifdef USE_SKINNING +#endif`,eOt=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2231,7 +2231,7 @@ gl_Position = projectionMatrix * mvPosition;`,UNt=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,KNt=`#ifdef USE_SKINNING +#endif`,tOt=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2242,17 +2242,17 @@ gl_Position = projectionMatrix * mvPosition;`,UNt=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,jNt=`float specularStrength; +#endif`,nOt=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,QNt=`#ifdef USE_SPECULARMAP +#endif`,sOt=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,XNt=`#if defined( TONE_MAPPING ) +#endif`,iOt=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,ZNt=`#ifndef saturate +#endif`,rOt=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2288,7 +2288,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,JNt=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,oOt=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2309,7 +2309,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,JNt=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,eOt=`#ifdef USE_TRANSMISSION +#endif`,aOt=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2415,7 +2415,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,JNt=`#ifdef USE_TRANSMIS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,tOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,lOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2485,7 +2485,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,JNt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,nOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,cOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2579,7 +2579,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,JNt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,sOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,dOt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2650,7 +2650,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,JNt=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,iOt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,uOt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2659,12 +2659,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,JNt=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const rOt=`varying vec2 vUv; +#endif`;const pOt=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,oOt=`uniform sampler2D t2D; +}`,_Ot=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2676,14 +2676,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,aOt=`varying vec3 vWorldDirection; +}`,hOt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,lOt=`#ifdef ENVMAP_TYPE_CUBE +}`,fOt=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2705,14 +2705,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,cOt=`varying vec3 vWorldDirection; +}`,mOt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,dOt=`uniform samplerCube tCube; +}`,gOt=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2722,7 +2722,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,uOt=`#include +}`,bOt=`#include #include #include #include @@ -2748,7 +2748,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,pOt=`#if DEPTH_PACKING == 3200 +}`,EOt=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2778,7 +2778,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,_Ot=`#define DISTANCE +}`,yOt=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2804,7 +2804,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,hOt=`#define DISTANCE +}`,vOt=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2828,13 +2828,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,fOt=`varying vec3 vWorldDirection; +}`,SOt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,mOt=`uniform sampler2D tEquirect; +}`,TOt=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2843,7 +2843,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,gOt=`uniform float scale; +}`,xOt=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2864,7 +2864,7 @@ void main() { #include #include #include -}`,bOt=`uniform vec3 diffuse; +}`,COt=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2892,7 +2892,7 @@ void main() { #include #include #include -}`,EOt=`#include +}`,wOt=`#include #include #include #include @@ -2923,7 +2923,7 @@ void main() { #include #include #include -}`,yOt=`uniform vec3 diffuse; +}`,ROt=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2971,7 +2971,7 @@ void main() { #include #include #include -}`,vOt=`#define LAMBERT +}`,AOt=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -3009,7 +3009,7 @@ void main() { #include #include #include -}`,SOt=`#define LAMBERT +}`,NOt=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3066,7 +3066,7 @@ void main() { #include #include #include -}`,TOt=`#define MATCAP +}`,OOt=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3099,7 +3099,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,xOt=`#define MATCAP +}`,IOt=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3145,7 +3145,7 @@ void main() { #include #include #include -}`,COt=`#define NORMAL +}`,MOt=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3177,7 +3177,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,wOt=`#define NORMAL +}`,DOt=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3198,7 +3198,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,ROt=`#define PHONG +}`,kOt=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3236,7 +3236,7 @@ void main() { #include #include #include -}`,AOt=`#define PHONG +}`,LOt=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3295,7 +3295,7 @@ void main() { #include #include #include -}`,NOt=`#define STANDARD +}`,POt=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3337,7 +3337,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,OOt=`#define STANDARD +}`,UOt=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3459,7 +3459,7 @@ void main() { #include #include #include -}`,IOt=`#define TOON +}`,FOt=`#define TOON varying vec3 vViewPosition; #include #include @@ -3495,7 +3495,7 @@ void main() { #include #include #include -}`,MOt=`#define TOON +}`,BOt=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3548,7 +3548,7 @@ void main() { #include #include #include -}`,DOt=`uniform float size; +}`,GOt=`uniform float size; uniform float scale; #include #include @@ -3578,7 +3578,7 @@ void main() { #include #include #include -}`,kOt=`uniform vec3 diffuse; +}`,VOt=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3603,7 +3603,7 @@ void main() { #include #include #include -}`,LOt=`#include +}`,zOt=`#include #include #include #include @@ -3625,7 +3625,7 @@ void main() { #include #include #include -}`,POt=`uniform vec3 color; +}`,HOt=`uniform vec3 color; uniform float opacity; #include #include @@ -3641,7 +3641,7 @@ void main() { #include #include #include -}`,UOt=`uniform float rotation; +}`,qOt=`uniform float rotation; uniform vec2 center; #include #include @@ -3667,7 +3667,7 @@ void main() { #include #include #include -}`,FOt=`uniform vec3 diffuse; +}`,YOt=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3692,7 +3692,7 @@ void main() { #include #include #include -}`,vt={alphahash_fragment:oAt,alphahash_pars_fragment:aAt,alphamap_fragment:lAt,alphamap_pars_fragment:cAt,alphatest_fragment:dAt,alphatest_pars_fragment:uAt,aomap_fragment:pAt,aomap_pars_fragment:_At,batching_pars_vertex:hAt,batching_vertex:fAt,begin_vertex:mAt,beginnormal_vertex:gAt,bsdfs:bAt,iridescence_fragment:EAt,bumpmap_pars_fragment:yAt,clipping_planes_fragment:vAt,clipping_planes_pars_fragment:SAt,clipping_planes_pars_vertex:TAt,clipping_planes_vertex:xAt,color_fragment:CAt,color_pars_fragment:wAt,color_pars_vertex:RAt,color_vertex:AAt,common:NAt,cube_uv_reflection_fragment:OAt,defaultnormal_vertex:IAt,displacementmap_pars_vertex:MAt,displacementmap_vertex:DAt,emissivemap_fragment:kAt,emissivemap_pars_fragment:LAt,colorspace_fragment:PAt,colorspace_pars_fragment:UAt,envmap_fragment:FAt,envmap_common_pars_fragment:BAt,envmap_pars_fragment:GAt,envmap_pars_vertex:VAt,envmap_physical_pars_fragment:JAt,envmap_vertex:zAt,fog_vertex:HAt,fog_pars_vertex:qAt,fog_fragment:YAt,fog_pars_fragment:$At,gradientmap_pars_fragment:WAt,lightmap_fragment:KAt,lightmap_pars_fragment:jAt,lights_lambert_fragment:QAt,lights_lambert_pars_fragment:XAt,lights_pars_begin:ZAt,lights_toon_fragment:eNt,lights_toon_pars_fragment:tNt,lights_phong_fragment:nNt,lights_phong_pars_fragment:sNt,lights_physical_fragment:iNt,lights_physical_pars_fragment:rNt,lights_fragment_begin:oNt,lights_fragment_maps:aNt,lights_fragment_end:lNt,logdepthbuf_fragment:cNt,logdepthbuf_pars_fragment:dNt,logdepthbuf_pars_vertex:uNt,logdepthbuf_vertex:pNt,map_fragment:_Nt,map_pars_fragment:hNt,map_particle_fragment:fNt,map_particle_pars_fragment:mNt,metalnessmap_fragment:gNt,metalnessmap_pars_fragment:bNt,morphcolor_vertex:ENt,morphnormal_vertex:yNt,morphtarget_pars_vertex:vNt,morphtarget_vertex:SNt,normal_fragment_begin:TNt,normal_fragment_maps:xNt,normal_pars_fragment:CNt,normal_pars_vertex:wNt,normal_vertex:RNt,normalmap_pars_fragment:ANt,clearcoat_normal_fragment_begin:NNt,clearcoat_normal_fragment_maps:ONt,clearcoat_pars_fragment:INt,iridescence_pars_fragment:MNt,opaque_fragment:DNt,packing:kNt,premultiplied_alpha_fragment:LNt,project_vertex:PNt,dithering_fragment:UNt,dithering_pars_fragment:FNt,roughnessmap_fragment:BNt,roughnessmap_pars_fragment:GNt,shadowmap_pars_fragment:VNt,shadowmap_pars_vertex:zNt,shadowmap_vertex:HNt,shadowmask_pars_fragment:qNt,skinbase_vertex:YNt,skinning_pars_vertex:$Nt,skinning_vertex:WNt,skinnormal_vertex:KNt,specularmap_fragment:jNt,specularmap_pars_fragment:QNt,tonemapping_fragment:XNt,tonemapping_pars_fragment:ZNt,transmission_fragment:JNt,transmission_pars_fragment:eOt,uv_pars_fragment:tOt,uv_pars_vertex:nOt,uv_vertex:sOt,worldpos_vertex:iOt,background_vert:rOt,background_frag:oOt,backgroundCube_vert:aOt,backgroundCube_frag:lOt,cube_vert:cOt,cube_frag:dOt,depth_vert:uOt,depth_frag:pOt,distanceRGBA_vert:_Ot,distanceRGBA_frag:hOt,equirect_vert:fOt,equirect_frag:mOt,linedashed_vert:gOt,linedashed_frag:bOt,meshbasic_vert:EOt,meshbasic_frag:yOt,meshlambert_vert:vOt,meshlambert_frag:SOt,meshmatcap_vert:TOt,meshmatcap_frag:xOt,meshnormal_vert:COt,meshnormal_frag:wOt,meshphong_vert:ROt,meshphong_frag:AOt,meshphysical_vert:NOt,meshphysical_frag:OOt,meshtoon_vert:IOt,meshtoon_frag:MOt,points_vert:DOt,points_frag:kOt,shadow_vert:LOt,shadow_frag:POt,sprite_vert:UOt,sprite_frag:FOt},We={common:{diffuse:{value:new pt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Tt},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Tt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Tt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Tt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Tt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Tt},normalScale:{value:new At(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Tt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Tt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Tt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Tt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new pt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new pt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0},uvTransform:{value:new Tt}},sprite:{diffuse:{value:new pt(16777215)},opacity:{value:1},center:{value:new At(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Tt},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0}}},qs={basic:{uniforms:Ln([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.fog]),vertexShader:vt.meshbasic_vert,fragmentShader:vt.meshbasic_frag},lambert:{uniforms:Ln([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.fog,We.lights,{emissive:{value:new pt(0)}}]),vertexShader:vt.meshlambert_vert,fragmentShader:vt.meshlambert_frag},phong:{uniforms:Ln([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.fog,We.lights,{emissive:{value:new pt(0)},specular:{value:new pt(1118481)},shininess:{value:30}}]),vertexShader:vt.meshphong_vert,fragmentShader:vt.meshphong_frag},standard:{uniforms:Ln([We.common,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.roughnessmap,We.metalnessmap,We.fog,We.lights,{emissive:{value:new pt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag},toon:{uniforms:Ln([We.common,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.gradientmap,We.fog,We.lights,{emissive:{value:new pt(0)}}]),vertexShader:vt.meshtoon_vert,fragmentShader:vt.meshtoon_frag},matcap:{uniforms:Ln([We.common,We.bumpmap,We.normalmap,We.displacementmap,We.fog,{matcap:{value:null}}]),vertexShader:vt.meshmatcap_vert,fragmentShader:vt.meshmatcap_frag},points:{uniforms:Ln([We.points,We.fog]),vertexShader:vt.points_vert,fragmentShader:vt.points_frag},dashed:{uniforms:Ln([We.common,We.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vt.linedashed_vert,fragmentShader:vt.linedashed_frag},depth:{uniforms:Ln([We.common,We.displacementmap]),vertexShader:vt.depth_vert,fragmentShader:vt.depth_frag},normal:{uniforms:Ln([We.common,We.bumpmap,We.normalmap,We.displacementmap,{opacity:{value:1}}]),vertexShader:vt.meshnormal_vert,fragmentShader:vt.meshnormal_frag},sprite:{uniforms:Ln([We.sprite,We.fog]),vertexShader:vt.sprite_vert,fragmentShader:vt.sprite_frag},background:{uniforms:{uvTransform:{value:new Tt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vt.background_vert,fragmentShader:vt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:vt.backgroundCube_vert,fragmentShader:vt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vt.cube_vert,fragmentShader:vt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vt.equirect_vert,fragmentShader:vt.equirect_frag},distanceRGBA:{uniforms:Ln([We.common,We.displacementmap,{referencePosition:{value:new ie},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vt.distanceRGBA_vert,fragmentShader:vt.distanceRGBA_frag},shadow:{uniforms:Ln([We.lights,We.fog,{color:{value:new pt(0)},opacity:{value:1}}]),vertexShader:vt.shadow_vert,fragmentShader:vt.shadow_frag}};qs.physical={uniforms:Ln([qs.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Tt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Tt},clearcoatNormalScale:{value:new At(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Tt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Tt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Tt},sheen:{value:0},sheenColor:{value:new pt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Tt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Tt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Tt},transmissionSamplerSize:{value:new At},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Tt},attenuationDistance:{value:0},attenuationColor:{value:new pt(0)},specularColor:{value:new pt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Tt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Tt},anisotropyVector:{value:new At},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Tt}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag};const Qc={r:0,b:0,g:0};function BOt(t,e,n,s,i,r,o){const a=new pt(0);let c=r===!0?0:1,u,d,h=null,f=0,m=null;function _(b,g){let y=!1,v=g.isScene===!0?g.background:null;v&&v.isTexture&&(v=(g.backgroundBlurriness>0?n:e).get(v)),v===null?E(a,c):v&&v.isColor&&(E(v,1),y=!0);const S=t.xr.getEnvironmentBlendMode();S==="additive"?s.buffers.color.setClear(0,0,0,1,o):S==="alpha-blend"&&s.buffers.color.setClear(0,0,0,0,o),(t.autoClear||y)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),v&&(v.isCubeTexture||v.mapping===Hu)?(d===void 0&&(d=new Un(new _r(1,1,1),new no({name:"BackgroundCubeMaterial",uniforms:ha(qs.backgroundCube.uniforms),vertexShader:qs.backgroundCube.vertexShader,fragmentShader:qs.backgroundCube.fragmentShader,side:Yn,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(R,C,A){this.matrixWorld.copyPosition(A.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),d.material.uniforms.envMap.value=v,d.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,d.material.toneMapped=Ut.getTransfer(v.colorSpace)!==Kt,(h!==v||f!==v.version||m!==t.toneMapping)&&(d.material.needsUpdate=!0,h=v,f=v.version,m=t.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null)):v&&v.isTexture&&(u===void 0&&(u=new Un(new OE(2,2),new no({name:"BackgroundMaterial",uniforms:ha(qs.background.uniforms),vertexShader:qs.background.vertexShader,fragmentShader:qs.background.fragmentShader,side:Ii,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(u)),u.material.uniforms.t2D.value=v,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.toneMapped=Ut.getTransfer(v.colorSpace)!==Kt,v.matrixAutoUpdate===!0&&v.updateMatrix(),u.material.uniforms.uvTransform.value.copy(v.matrix),(h!==v||f!==v.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,h=v,f=v.version,m=t.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null))}function E(b,g){b.getRGB(Qc,SO(t)),s.buffers.color.setClear(Qc.r,Qc.g,Qc.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(b,g=1){a.set(b),c=g,E(a,c)},getClearAlpha:function(){return c},setClearAlpha:function(b){c=b,E(a,c)},render:_}}function GOt(t,e,n,s){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),r=s.isWebGL2?null:e.get("OES_vertex_array_object"),o=s.isWebGL2||r!==null,a={},c=b(null);let u=c,d=!1;function h(M,q,H,P,$){let ee=!1;if(o){const re=E(P,H,q);u!==re&&(u=re,m(u.object)),ee=g(M,P,H,$),ee&&y(M,P,H,$)}else{const re=q.wireframe===!0;(u.geometry!==P.id||u.program!==H.id||u.wireframe!==re)&&(u.geometry=P.id,u.program=H.id,u.wireframe=re,ee=!0)}$!==null&&n.update($,t.ELEMENT_ARRAY_BUFFER),(ee||d)&&(d=!1,D(M,q,H,P),$!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get($).buffer))}function f(){return s.isWebGL2?t.createVertexArray():r.createVertexArrayOES()}function m(M){return s.isWebGL2?t.bindVertexArray(M):r.bindVertexArrayOES(M)}function _(M){return s.isWebGL2?t.deleteVertexArray(M):r.deleteVertexArrayOES(M)}function E(M,q,H){const P=H.wireframe===!0;let $=a[M.id];$===void 0&&($={},a[M.id]=$);let ee=$[q.id];ee===void 0&&(ee={},$[q.id]=ee);let re=ee[P];return re===void 0&&(re=b(f()),ee[P]=re),re}function b(M){const q=[],H=[],P=[];for(let $=0;$=0){const Ee=$[Se];let Oe=ee[Se];if(Oe===void 0&&(Se==="instanceMatrix"&&M.instanceMatrix&&(Oe=M.instanceMatrix),Se==="instanceColor"&&M.instanceColor&&(Oe=M.instanceColor)),Ee===void 0||Ee.attribute!==Oe||Oe&&Ee.data!==Oe.data)return!0;re++}return u.attributesNum!==re||u.index!==P}function y(M,q,H,P){const $={},ee=q.attributes;let re=0;const me=H.getAttributes();for(const Se in me)if(me[Se].location>=0){let Ee=ee[Se];Ee===void 0&&(Se==="instanceMatrix"&&M.instanceMatrix&&(Ee=M.instanceMatrix),Se==="instanceColor"&&M.instanceColor&&(Ee=M.instanceColor));const Oe={};Oe.attribute=Ee,Ee&&Ee.data&&(Oe.data=Ee.data),$[Se]=Oe,re++}u.attributes=$,u.attributesNum=re,u.index=P}function v(){const M=u.newAttributes;for(let q=0,H=M.length;q=0){let le=$[me];if(le===void 0&&(me==="instanceMatrix"&&M.instanceMatrix&&(le=M.instanceMatrix),me==="instanceColor"&&M.instanceColor&&(le=M.instanceColor)),le!==void 0){const Ee=le.normalized,Oe=le.itemSize,Me=n.get(le);if(Me===void 0)continue;const j=Me.buffer,he=Me.type,pe=Me.bytesPerElement,Ce=s.isWebGL2===!0&&(he===t.INT||he===t.UNSIGNED_INT||le.gpuType===iO);if(le.isInterleavedBufferAttribute){const ke=le.data,N=ke.stride,V=le.offset;if(ke.isInstancedInterleavedBuffer){for(let Y=0;Y0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";A="mediump"}return A==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const c=r(a);c!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",c,"instead."),a=c);const u=o||e.has("WEBGL_draw_buffers"),d=n.logarithmicDepthBuffer===!0,h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=t.getParameter(t.MAX_TEXTURE_SIZE),_=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),E=t.getParameter(t.MAX_VERTEX_ATTRIBS),b=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),y=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=f>0,S=o||e.has("OES_texture_float"),R=v&&S,C=o?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:i,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:d,maxTextures:h,maxVertexTextures:f,maxTextureSize:m,maxCubemapSize:_,maxAttributes:E,maxVertexUniforms:b,maxVaryings:g,maxFragmentUniforms:y,vertexTextures:v,floatFragmentTextures:S,floatVertexTextures:R,maxSamples:C}}function HOt(t){const e=this;let n=null,s=0,i=!1,r=!1;const o=new Ir,a=new Tt,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(h,f){const m=h.length!==0||f||s!==0||i;return i=f,s=h.length,m},this.beginShadows=function(){r=!0,d(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(h,f){n=d(h,f,0)},this.setState=function(h,f,m){const _=h.clippingPlanes,E=h.clipIntersection,b=h.clipShadows,g=t.get(h);if(!i||_===null||_.length===0||r&&!b)r?d(null):u();else{const y=r?0:s,v=y*4;let S=g.clippingState||null;c.value=S,S=d(_,f,v,m);for(let R=0;R!==v;++R)S[R]=n[R];g.clippingState=S,this.numIntersection=E?this.numPlanes:0,this.numPlanes+=y}};function u(){c.value!==n&&(c.value=n,c.needsUpdate=s>0),e.numPlanes=s,e.numIntersection=0}function d(h,f,m,_){const E=h!==null?h.length:0;let b=null;if(E!==0){if(b=c.value,_!==!0||b===null){const g=m+E*4,y=f.matrixWorldInverse;a.getNormalMatrix(y),(b===null||b.length0){const u=new nAt(c.height/2);return u.fromEquirectangularTexture(t,o),e.set(o,u),o.addEventListener("dispose",i),n(u.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const c=e.get(a);c!==void 0&&(e.delete(a),c.dispose())}function r(){e=new WeakMap}return{get:s,dispose:r}}class IE extends TO{constructor(e=-1,n=1,s=1,i=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=s,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,s,i,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),s=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=s-e,o=s+e,a=i+n,c=i-n;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=u*this.view.offsetX,o=r+u*this.view.width,a-=d*this.view.offsetY,c=a-d*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,c,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Po=4,i1=[.125,.215,.35,.446,.526,.582],Fr=20,Fm=new IE,r1=new pt;let Bm=null,Gm=0,Vm=0;const Mr=(1+Math.sqrt(5))/2,Oo=1/Mr,o1=[new ie(1,1,1),new ie(-1,1,1),new ie(1,1,-1),new ie(-1,1,-1),new ie(0,Mr,Oo),new ie(0,Mr,-Oo),new ie(Oo,0,Mr),new ie(-Oo,0,Mr),new ie(Mr,Oo,0),new ie(-Mr,Oo,0)];class a1{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,s=.1,i=100){Bm=this._renderer.getRenderTarget(),Gm=this._renderer.getActiveCubeFace(),Vm=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,s,i,r),n>0&&this._blur(r,0,0,n),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=d1(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=c1(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?v:0,v,v),d.setRenderTarget(i),E&&d.render(_,a),d.render(e,a)}_.geometry.dispose(),_.material.dispose(),d.toneMapping=f,d.autoClear=h,e.background=b}_textureToCubeUV(e,n){const s=this._renderer,i=e.mapping===la||e.mapping===ca;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=d1()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=c1());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new Un(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const c=this._cubeSize;Xc(n,0,0,3*c,2*c),s.setRenderTarget(n),s.render(o,Fm)}_applyPMREM(e){const n=this._renderer,s=n.autoClear;n.autoClear=!1;for(let i=1;iFr&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${Fr}`);const g=[];let y=0;for(let A=0;Av-Po?i-v+Po:0),C=4*(this._cubeSize-S);Xc(n,R,C,3*S,2*S),c.setRenderTarget(n),c.render(h,Fm)}}function YOt(t){const e=[],n=[],s=[];let i=t;const r=t-Po+1+i1.length;for(let o=0;ot-Po?c=i1[o-t+Po-1]:o===0&&(c=0),s.push(c);const u=1/(a-2),d=-u,h=1+u,f=[d,d,h,d,h,h,d,d,h,h,d,h],m=6,_=6,E=3,b=2,g=1,y=new Float32Array(E*_*m),v=new Float32Array(b*_*m),S=new Float32Array(g*_*m);for(let C=0;C2?0:-1,x=[A,D,0,A+2/3,D,0,A+2/3,D+1,0,A,D,0,A+2/3,D+1,0,A,D+1,0];y.set(x,E*_*C),v.set(f,b*_*C);const O=[C,C,C,C,C,C];S.set(O,g*_*C)}const R=new li;R.setAttribute("position",new Bn(y,E)),R.setAttribute("uv",new Bn(v,b)),R.setAttribute("faceIndex",new Bn(S,g)),e.push(R),i>Po&&i--}return{lodPlanes:e,sizeLods:n,sigmas:s}}function l1(t,e,n){const s=new to(t,e,n);return s.texture.mapping=Hu,s.texture.name="PMREM.cubeUv",s.scissorTest=!0,s}function Xc(t,e,n,s,i){t.viewport.set(e,n,s,i),t.scissor.set(e,n,s,i)}function $Ot(t,e,n){const s=new Float32Array(Fr),i=new ie(0,1,0);return new no({name:"SphericalGaussianBlur",defines:{n:Fr,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:s},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:ME(),fragmentShader:` +}`,vt={alphahash_fragment:_At,alphahash_pars_fragment:hAt,alphamap_fragment:fAt,alphamap_pars_fragment:mAt,alphatest_fragment:gAt,alphatest_pars_fragment:bAt,aomap_fragment:EAt,aomap_pars_fragment:yAt,batching_pars_vertex:vAt,batching_vertex:SAt,begin_vertex:TAt,beginnormal_vertex:xAt,bsdfs:CAt,iridescence_fragment:wAt,bumpmap_pars_fragment:RAt,clipping_planes_fragment:AAt,clipping_planes_pars_fragment:NAt,clipping_planes_pars_vertex:OAt,clipping_planes_vertex:IAt,color_fragment:MAt,color_pars_fragment:DAt,color_pars_vertex:kAt,color_vertex:LAt,common:PAt,cube_uv_reflection_fragment:UAt,defaultnormal_vertex:FAt,displacementmap_pars_vertex:BAt,displacementmap_vertex:GAt,emissivemap_fragment:VAt,emissivemap_pars_fragment:zAt,colorspace_fragment:HAt,colorspace_pars_fragment:qAt,envmap_fragment:YAt,envmap_common_pars_fragment:$At,envmap_pars_fragment:WAt,envmap_pars_vertex:KAt,envmap_physical_pars_fragment:oNt,envmap_vertex:jAt,fog_vertex:QAt,fog_pars_vertex:XAt,fog_fragment:ZAt,fog_pars_fragment:JAt,gradientmap_pars_fragment:eNt,lightmap_fragment:tNt,lightmap_pars_fragment:nNt,lights_lambert_fragment:sNt,lights_lambert_pars_fragment:iNt,lights_pars_begin:rNt,lights_toon_fragment:aNt,lights_toon_pars_fragment:lNt,lights_phong_fragment:cNt,lights_phong_pars_fragment:dNt,lights_physical_fragment:uNt,lights_physical_pars_fragment:pNt,lights_fragment_begin:_Nt,lights_fragment_maps:hNt,lights_fragment_end:fNt,logdepthbuf_fragment:mNt,logdepthbuf_pars_fragment:gNt,logdepthbuf_pars_vertex:bNt,logdepthbuf_vertex:ENt,map_fragment:yNt,map_pars_fragment:vNt,map_particle_fragment:SNt,map_particle_pars_fragment:TNt,metalnessmap_fragment:xNt,metalnessmap_pars_fragment:CNt,morphcolor_vertex:wNt,morphnormal_vertex:RNt,morphtarget_pars_vertex:ANt,morphtarget_vertex:NNt,normal_fragment_begin:ONt,normal_fragment_maps:INt,normal_pars_fragment:MNt,normal_pars_vertex:DNt,normal_vertex:kNt,normalmap_pars_fragment:LNt,clearcoat_normal_fragment_begin:PNt,clearcoat_normal_fragment_maps:UNt,clearcoat_pars_fragment:FNt,iridescence_pars_fragment:BNt,opaque_fragment:GNt,packing:VNt,premultiplied_alpha_fragment:zNt,project_vertex:HNt,dithering_fragment:qNt,dithering_pars_fragment:YNt,roughnessmap_fragment:$Nt,roughnessmap_pars_fragment:WNt,shadowmap_pars_fragment:KNt,shadowmap_pars_vertex:jNt,shadowmap_vertex:QNt,shadowmask_pars_fragment:XNt,skinbase_vertex:ZNt,skinning_pars_vertex:JNt,skinning_vertex:eOt,skinnormal_vertex:tOt,specularmap_fragment:nOt,specularmap_pars_fragment:sOt,tonemapping_fragment:iOt,tonemapping_pars_fragment:rOt,transmission_fragment:oOt,transmission_pars_fragment:aOt,uv_pars_fragment:lOt,uv_pars_vertex:cOt,uv_vertex:dOt,worldpos_vertex:uOt,background_vert:pOt,background_frag:_Ot,backgroundCube_vert:hOt,backgroundCube_frag:fOt,cube_vert:mOt,cube_frag:gOt,depth_vert:bOt,depth_frag:EOt,distanceRGBA_vert:yOt,distanceRGBA_frag:vOt,equirect_vert:SOt,equirect_frag:TOt,linedashed_vert:xOt,linedashed_frag:COt,meshbasic_vert:wOt,meshbasic_frag:ROt,meshlambert_vert:AOt,meshlambert_frag:NOt,meshmatcap_vert:OOt,meshmatcap_frag:IOt,meshnormal_vert:MOt,meshnormal_frag:DOt,meshphong_vert:kOt,meshphong_frag:LOt,meshphysical_vert:POt,meshphysical_frag:UOt,meshtoon_vert:FOt,meshtoon_frag:BOt,points_vert:GOt,points_frag:VOt,shadow_vert:zOt,shadow_frag:HOt,sprite_vert:qOt,sprite_frag:YOt},We={common:{diffuse:{value:new pt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Tt},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Tt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Tt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Tt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Tt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Tt},normalScale:{value:new At(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Tt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Tt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Tt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Tt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new pt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new pt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0},uvTransform:{value:new Tt}},sprite:{diffuse:{value:new pt(16777215)},opacity:{value:1},center:{value:new At(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Tt},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0}}},qs={basic:{uniforms:Ln([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.fog]),vertexShader:vt.meshbasic_vert,fragmentShader:vt.meshbasic_frag},lambert:{uniforms:Ln([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.fog,We.lights,{emissive:{value:new pt(0)}}]),vertexShader:vt.meshlambert_vert,fragmentShader:vt.meshlambert_frag},phong:{uniforms:Ln([We.common,We.specularmap,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.fog,We.lights,{emissive:{value:new pt(0)},specular:{value:new pt(1118481)},shininess:{value:30}}]),vertexShader:vt.meshphong_vert,fragmentShader:vt.meshphong_frag},standard:{uniforms:Ln([We.common,We.envmap,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.roughnessmap,We.metalnessmap,We.fog,We.lights,{emissive:{value:new pt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag},toon:{uniforms:Ln([We.common,We.aomap,We.lightmap,We.emissivemap,We.bumpmap,We.normalmap,We.displacementmap,We.gradientmap,We.fog,We.lights,{emissive:{value:new pt(0)}}]),vertexShader:vt.meshtoon_vert,fragmentShader:vt.meshtoon_frag},matcap:{uniforms:Ln([We.common,We.bumpmap,We.normalmap,We.displacementmap,We.fog,{matcap:{value:null}}]),vertexShader:vt.meshmatcap_vert,fragmentShader:vt.meshmatcap_frag},points:{uniforms:Ln([We.points,We.fog]),vertexShader:vt.points_vert,fragmentShader:vt.points_frag},dashed:{uniforms:Ln([We.common,We.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vt.linedashed_vert,fragmentShader:vt.linedashed_frag},depth:{uniforms:Ln([We.common,We.displacementmap]),vertexShader:vt.depth_vert,fragmentShader:vt.depth_frag},normal:{uniforms:Ln([We.common,We.bumpmap,We.normalmap,We.displacementmap,{opacity:{value:1}}]),vertexShader:vt.meshnormal_vert,fragmentShader:vt.meshnormal_frag},sprite:{uniforms:Ln([We.sprite,We.fog]),vertexShader:vt.sprite_vert,fragmentShader:vt.sprite_frag},background:{uniforms:{uvTransform:{value:new Tt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vt.background_vert,fragmentShader:vt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:vt.backgroundCube_vert,fragmentShader:vt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vt.cube_vert,fragmentShader:vt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vt.equirect_vert,fragmentShader:vt.equirect_frag},distanceRGBA:{uniforms:Ln([We.common,We.displacementmap,{referencePosition:{value:new ie},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vt.distanceRGBA_vert,fragmentShader:vt.distanceRGBA_frag},shadow:{uniforms:Ln([We.lights,We.fog,{color:{value:new pt(0)},opacity:{value:1}}]),vertexShader:vt.shadow_vert,fragmentShader:vt.shadow_frag}};qs.physical={uniforms:Ln([qs.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Tt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Tt},clearcoatNormalScale:{value:new At(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Tt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Tt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Tt},sheen:{value:0},sheenColor:{value:new pt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Tt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Tt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Tt},transmissionSamplerSize:{value:new At},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Tt},attenuationDistance:{value:0},attenuationColor:{value:new pt(0)},specularColor:{value:new pt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Tt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Tt},anisotropyVector:{value:new At},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Tt}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag};const Qc={r:0,b:0,g:0};function $Ot(t,e,n,s,i,r,o){const a=new pt(0);let c=r===!0?0:1,u,d,h=null,f=0,m=null;function _(b,g){let y=!1,v=g.isScene===!0?g.background:null;v&&v.isTexture&&(v=(g.backgroundBlurriness>0?n:e).get(v)),v===null?E(a,c):v&&v.isColor&&(E(v,1),y=!0);const S=t.xr.getEnvironmentBlendMode();S==="additive"?s.buffers.color.setClear(0,0,0,1,o):S==="alpha-blend"&&s.buffers.color.setClear(0,0,0,0,o),(t.autoClear||y)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),v&&(v.isCubeTexture||v.mapping===Hu)?(d===void 0&&(d=new Un(new _r(1,1,1),new no({name:"BackgroundCubeMaterial",uniforms:ha(qs.backgroundCube.uniforms),vertexShader:qs.backgroundCube.vertexShader,fragmentShader:qs.backgroundCube.fragmentShader,side:Yn,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(R,C,A){this.matrixWorld.copyPosition(A.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),d.material.uniforms.envMap.value=v,d.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,d.material.toneMapped=Ut.getTransfer(v.colorSpace)!==Kt,(h!==v||f!==v.version||m!==t.toneMapping)&&(d.material.needsUpdate=!0,h=v,f=v.version,m=t.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null)):v&&v.isTexture&&(u===void 0&&(u=new Un(new OE(2,2),new no({name:"BackgroundMaterial",uniforms:ha(qs.background.uniforms),vertexShader:qs.background.vertexShader,fragmentShader:qs.background.fragmentShader,side:Ii,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(u)),u.material.uniforms.t2D.value=v,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.toneMapped=Ut.getTransfer(v.colorSpace)!==Kt,v.matrixAutoUpdate===!0&&v.updateMatrix(),u.material.uniforms.uvTransform.value.copy(v.matrix),(h!==v||f!==v.version||m!==t.toneMapping)&&(u.material.needsUpdate=!0,h=v,f=v.version,m=t.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null))}function E(b,g){b.getRGB(Qc,SO(t)),s.buffers.color.setClear(Qc.r,Qc.g,Qc.b,g,o)}return{getClearColor:function(){return a},setClearColor:function(b,g=1){a.set(b),c=g,E(a,c)},getClearAlpha:function(){return c},setClearAlpha:function(b){c=b,E(a,c)},render:_}}function WOt(t,e,n,s){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),r=s.isWebGL2?null:e.get("OES_vertex_array_object"),o=s.isWebGL2||r!==null,a={},c=b(null);let u=c,d=!1;function h(M,q,H,P,$){let ee=!1;if(o){const re=E(P,H,q);u!==re&&(u=re,m(u.object)),ee=g(M,P,H,$),ee&&y(M,P,H,$)}else{const re=q.wireframe===!0;(u.geometry!==P.id||u.program!==H.id||u.wireframe!==re)&&(u.geometry=P.id,u.program=H.id,u.wireframe=re,ee=!0)}$!==null&&n.update($,t.ELEMENT_ARRAY_BUFFER),(ee||d)&&(d=!1,D(M,q,H,P),$!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get($).buffer))}function f(){return s.isWebGL2?t.createVertexArray():r.createVertexArrayOES()}function m(M){return s.isWebGL2?t.bindVertexArray(M):r.bindVertexArrayOES(M)}function _(M){return s.isWebGL2?t.deleteVertexArray(M):r.deleteVertexArrayOES(M)}function E(M,q,H){const P=H.wireframe===!0;let $=a[M.id];$===void 0&&($={},a[M.id]=$);let ee=$[q.id];ee===void 0&&(ee={},$[q.id]=ee);let re=ee[P];return re===void 0&&(re=b(f()),ee[P]=re),re}function b(M){const q=[],H=[],P=[];for(let $=0;$=0){const Ee=$[Se];let Oe=ee[Se];if(Oe===void 0&&(Se==="instanceMatrix"&&M.instanceMatrix&&(Oe=M.instanceMatrix),Se==="instanceColor"&&M.instanceColor&&(Oe=M.instanceColor)),Ee===void 0||Ee.attribute!==Oe||Oe&&Ee.data!==Oe.data)return!0;re++}return u.attributesNum!==re||u.index!==P}function y(M,q,H,P){const $={},ee=q.attributes;let re=0;const me=H.getAttributes();for(const Se in me)if(me[Se].location>=0){let Ee=ee[Se];Ee===void 0&&(Se==="instanceMatrix"&&M.instanceMatrix&&(Ee=M.instanceMatrix),Se==="instanceColor"&&M.instanceColor&&(Ee=M.instanceColor));const Oe={};Oe.attribute=Ee,Ee&&Ee.data&&(Oe.data=Ee.data),$[Se]=Oe,re++}u.attributes=$,u.attributesNum=re,u.index=P}function v(){const M=u.newAttributes;for(let q=0,H=M.length;q=0){let le=$[me];if(le===void 0&&(me==="instanceMatrix"&&M.instanceMatrix&&(le=M.instanceMatrix),me==="instanceColor"&&M.instanceColor&&(le=M.instanceColor)),le!==void 0){const Ee=le.normalized,Oe=le.itemSize,Me=n.get(le);if(Me===void 0)continue;const j=Me.buffer,he=Me.type,pe=Me.bytesPerElement,Ce=s.isWebGL2===!0&&(he===t.INT||he===t.UNSIGNED_INT||le.gpuType===iO);if(le.isInterleavedBufferAttribute){const ke=le.data,N=ke.stride,V=le.offset;if(ke.isInstancedInterleavedBuffer){for(let Y=0;Y0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";A="mediump"}return A==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const c=r(a);c!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",c,"instead."),a=c);const u=o||e.has("WEBGL_draw_buffers"),d=n.logarithmicDepthBuffer===!0,h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=t.getParameter(t.MAX_TEXTURE_SIZE),_=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),E=t.getParameter(t.MAX_VERTEX_ATTRIBS),b=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),y=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=f>0,S=o||e.has("OES_texture_float"),R=v&&S,C=o?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:i,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:d,maxTextures:h,maxVertexTextures:f,maxTextureSize:m,maxCubemapSize:_,maxAttributes:E,maxVertexUniforms:b,maxVaryings:g,maxFragmentUniforms:y,vertexTextures:v,floatFragmentTextures:S,floatVertexTextures:R,maxSamples:C}}function QOt(t){const e=this;let n=null,s=0,i=!1,r=!1;const o=new Ir,a=new Tt,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(h,f){const m=h.length!==0||f||s!==0||i;return i=f,s=h.length,m},this.beginShadows=function(){r=!0,d(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(h,f){n=d(h,f,0)},this.setState=function(h,f,m){const _=h.clippingPlanes,E=h.clipIntersection,b=h.clipShadows,g=t.get(h);if(!i||_===null||_.length===0||r&&!b)r?d(null):u();else{const y=r?0:s,v=y*4;let S=g.clippingState||null;c.value=S,S=d(_,f,v,m);for(let R=0;R!==v;++R)S[R]=n[R];g.clippingState=S,this.numIntersection=E?this.numPlanes:0,this.numPlanes+=y}};function u(){c.value!==n&&(c.value=n,c.needsUpdate=s>0),e.numPlanes=s,e.numIntersection=0}function d(h,f,m,_){const E=h!==null?h.length:0;let b=null;if(E!==0){if(b=c.value,_!==!0||b===null){const g=m+E*4,y=f.matrixWorldInverse;a.getNormalMatrix(y),(b===null||b.length0){const u=new cAt(c.height/2);return u.fromEquirectangularTexture(t,o),e.set(o,u),o.addEventListener("dispose",i),n(u.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const c=e.get(a);c!==void 0&&(e.delete(a),c.dispose())}function r(){e=new WeakMap}return{get:s,dispose:r}}class IE extends TO{constructor(e=-1,n=1,s=1,i=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=s,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,s,i,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),s=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=s-e,o=s+e,a=i+n,c=i-n;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=u*this.view.offsetX,o=r+u*this.view.width,a-=d*this.view.offsetY,c=a-d*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,c,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Po=4,i1=[.125,.215,.35,.446,.526,.582],Fr=20,Fm=new IE,r1=new pt;let Bm=null,Gm=0,Vm=0;const Mr=(1+Math.sqrt(5))/2,Oo=1/Mr,o1=[new ie(1,1,1),new ie(-1,1,1),new ie(1,1,-1),new ie(-1,1,-1),new ie(0,Mr,Oo),new ie(0,Mr,-Oo),new ie(Oo,0,Mr),new ie(-Oo,0,Mr),new ie(Mr,Oo,0),new ie(-Mr,Oo,0)];class a1{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,s=.1,i=100){Bm=this._renderer.getRenderTarget(),Gm=this._renderer.getActiveCubeFace(),Vm=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,s,i,r),n>0&&this._blur(r,0,0,n),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=d1(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=c1(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?v:0,v,v),d.setRenderTarget(i),E&&d.render(_,a),d.render(e,a)}_.geometry.dispose(),_.material.dispose(),d.toneMapping=f,d.autoClear=h,e.background=b}_textureToCubeUV(e,n){const s=this._renderer,i=e.mapping===la||e.mapping===ca;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=d1()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=c1());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new Un(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const c=this._cubeSize;Xc(n,0,0,3*c,2*c),s.setRenderTarget(n),s.render(o,Fm)}_applyPMREM(e){const n=this._renderer,s=n.autoClear;n.autoClear=!1;for(let i=1;iFr&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${Fr}`);const g=[];let y=0;for(let A=0;Av-Po?i-v+Po:0),C=4*(this._cubeSize-S);Xc(n,R,C,3*S,2*S),c.setRenderTarget(n),c.render(h,Fm)}}function ZOt(t){const e=[],n=[],s=[];let i=t;const r=t-Po+1+i1.length;for(let o=0;ot-Po?c=i1[o-t+Po-1]:o===0&&(c=0),s.push(c);const u=1/(a-2),d=-u,h=1+u,f=[d,d,h,d,h,h,d,d,h,h,d,h],m=6,_=6,E=3,b=2,g=1,y=new Float32Array(E*_*m),v=new Float32Array(b*_*m),S=new Float32Array(g*_*m);for(let C=0;C2?0:-1,x=[A,D,0,A+2/3,D,0,A+2/3,D+1,0,A,D,0,A+2/3,D+1,0,A,D+1,0];y.set(x,E*_*C),v.set(f,b*_*C);const O=[C,C,C,C,C,C];S.set(O,g*_*C)}const R=new li;R.setAttribute("position",new Bn(y,E)),R.setAttribute("uv",new Bn(v,b)),R.setAttribute("faceIndex",new Bn(S,g)),e.push(R),i>Po&&i--}return{lodPlanes:e,sizeLods:n,sigmas:s}}function l1(t,e,n){const s=new to(t,e,n);return s.texture.mapping=Hu,s.texture.name="PMREM.cubeUv",s.scissorTest=!0,s}function Xc(t,e,n,s,i){t.viewport.set(e,n,s,i),t.scissor.set(e,n,s,i)}function JOt(t,e,n){const s=new Float32Array(Fr),i=new ie(0,1,0);return new no({name:"SphericalGaussianBlur",defines:{n:Fr,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:s},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:ME(),fragmentShader:` precision mediump float; precision mediump int; @@ -3842,26 +3842,26 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function WOt(t){let e=new WeakMap,n=null;function s(a){if(a&&a.isTexture){const c=a.mapping,u=c===Ug||c===Fg,d=c===la||c===ca;if(u||d)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let h=e.get(a);return n===null&&(n=new a1(t)),h=u?n.fromEquirectangular(a,h):n.fromCubemap(a,h),e.set(a,h),h.texture}else{if(e.has(a))return e.get(a).texture;{const h=a.image;if(u&&h&&h.height>0||d&&h&&i(h)){n===null&&(n=new a1(t));const f=u?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,f),a.addEventListener("dispose",r),f.texture}else return null}}}return a}function i(a){let c=0;const u=6;for(let d=0;de.maxTextureSize&&(B=Math.ceil(O/e.maxTextureSize),O=e.maxTextureSize);const z=new Float32Array(O*B*4*E),Z=new gO(z,O,B,E);Z.type=Ti,Z.needsUpdate=!0;const M=x*4;for(let H=0;H0)return t;const i=e*n;let r=u1[i];if(r===void 0&&(r=new Float32Array(i),u1[i]=r),e!==0){s.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(r,a)}return r}function pn(t,e){if(t.length!==e.length)return!1;for(let n=0,s=t.length;n0||d&&h&&i(h)){n===null&&(n=new a1(t));const f=u?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,f),a.addEventListener("dispose",r),f.texture}else return null}}}return a}function i(a){let c=0;const u=6;for(let d=0;de.maxTextureSize&&(B=Math.ceil(O/e.maxTextureSize),O=e.maxTextureSize);const z=new Float32Array(O*B*4*E),Z=new gO(z,O,B,E);Z.type=Ti,Z.needsUpdate=!0;const M=x*4;for(let H=0;H0)return t;const i=e*n;let r=u1[i];if(r===void 0&&(r=new Float32Array(i),u1[i]=r),e!==0){s.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(r,a)}return r}function pn(t,e){if(t.length!==e.length)return!1;for(let n=0,s=t.length;n":" "} ${a}: ${n[o]}`)}return s.join(` -`)}function jIt(t){const e=Ut.getPrimaries(Ut.workingColorSpace),n=Ut.getPrimaries(t);let s;switch(e===n?s="":e===Qd&&n===jd?s="LinearDisplayP3ToLinearSRGB":e===jd&&n===Qd&&(s="LinearSRGBToLinearDisplayP3"),t){case Cn:case qu:return[s,"LinearTransferOETF"];case en:case RE:return[s,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[s,"LinearTransferOETF"]}}function b1(t,e,n){const s=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(s&&i==="")return"";const r=/ERROR: 0:(\d+)/.exec(i);if(r){const o=parseInt(r[1]);return n.toUpperCase()+` +`)}function nMt(t){const e=Ut.getPrimaries(Ut.workingColorSpace),n=Ut.getPrimaries(t);let s;switch(e===n?s="":e===Qd&&n===jd?s="LinearDisplayP3ToLinearSRGB":e===jd&&n===Qd&&(s="LinearSRGBToLinearDisplayP3"),t){case Cn:case qu:return[s,"LinearTransferOETF"];case en:case RE:return[s,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[s,"LinearTransferOETF"]}}function b1(t,e,n){const s=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(s&&i==="")return"";const r=/ERROR: 0:(\d+)/.exec(i);if(r){const o=parseInt(r[1]);return n.toUpperCase()+` `+i+` -`+KIt(t.getShaderSource(e),o)}else return i}function QIt(t,e){const n=jIt(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function XIt(t,e){let n;switch(e){case Wwt:n="Linear";break;case Kwt:n="Reinhard";break;case jwt:n="OptimizedCineon";break;case Qwt:n="ACESFilmic";break;case Xwt:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function ZIt(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.normalMapTangentSpace||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(al).join(` -`)}function JIt(t){const e=[];for(const n in t){const s=t[n];s!==!1&&e.push("#define "+n+" "+s)}return e.join(` -`)}function eMt(t,e){const n={},s=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function qg(t){return t.replace(tMt,sMt)}const nMt=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function sMt(t,e){let n=vt[e];if(n===void 0){const s=nMt.get(e);if(s!==void 0)n=vt[s],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,s);else throw new Error("Can not resolve #include <"+e+">")}return qg(n)}const iMt=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function v1(t){return t.replace(iMt,rMt)}function rMt(t,e,n,s){let i="";for(let r=parseInt(e);r/gm;function qg(t){return t.replace(lMt,dMt)}const cMt=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function dMt(t,e){let n=vt[e];if(n===void 0){const s=cMt.get(e);if(s!==void 0)n=vt[s],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,s);else throw new Error("Can not resolve #include <"+e+">")}return qg(n)}const uMt=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function v1(t){return t.replace(uMt,pMt)}function pMt(t,e,n,s){let i="";for(let r=parseInt(e);r0&&(b+=` `),g=[m,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,_].filter(al).join(` `),g.length>0&&(g+=` `)):(b=[S1(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,_,n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(al).join(` -`),g=[m,S1(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,_,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",n.envMap?"#define "+h:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ur?"#define TONE_MAPPING":"",n.toneMapping!==ur?vt.tonemapping_pars_fragment:"",n.toneMapping!==ur?XIt("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",vt.colorspace_pars_fragment,QIt("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`),g=[m,S1(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,_,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",n.envMap?"#define "+h:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ur?"#define TONE_MAPPING":"",n.toneMapping!==ur?vt.tonemapping_pars_fragment:"",n.toneMapping!==ur?iMt("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",vt.colorspace_pars_fragment,sMt("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` `].filter(al).join(` `)),o=qg(o),o=E1(o,n),o=y1(o,n),a=qg(a),a=E1(a,n),a=y1(a,n),o=v1(o),a=v1(a),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(y=`#version 300 es `,b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` @@ -3872,9 +3872,9 @@ precision `+t.precision+" int;";return t.precision==="highp"?e+=` Program Info Log: `+z+` `+P+` -`+$)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(Z===""||M==="")&&(H=!1);H&&(B.diagnostics={runnable:q,programLog:z,vertexShader:{log:Z,prefix:b},fragmentShader:{log:M,prefix:g}})}i.deleteShader(R),i.deleteShader(C),D=new Ed(i,E),x=eMt(i,E)}let D;this.getUniforms=function(){return D===void 0&&A(this),D};let x;this.getAttributes=function(){return x===void 0&&A(this),x};let O=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return O===!1&&(O=i.getProgramParameter(E,$It)),O},this.destroy=function(){s.releaseStatesOfProgram(this),i.deleteProgram(E),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=WIt++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=R,this.fragmentShader=C,this}let pMt=0;class _Mt{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,s=e.fragmentShader,i=this._getShaderStage(n),r=this._getShaderStage(s),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const s of n)s.usedTimes--,s.usedTimes===0&&this.shaderCache.delete(s.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let s=n.get(e);return s===void 0&&(s=new Set,n.set(e,s)),s}_getShaderStage(e){const n=this.shaderCache;let s=n.get(e);return s===void 0&&(s=new hMt(e),n.set(e,s)),s}}class hMt{constructor(e){this.id=pMt++,this.code=e,this.usedTimes=0}}function fMt(t,e,n,s,i,r,o){const a=new bO,c=new _Mt,u=[],d=i.isWebGL2,h=i.logarithmicDepthBuffer,f=i.vertexTextures;let m=i.precision;const _={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function E(x){return x===0?"uv":`uv${x}`}function b(x,O,B,z,Z){const M=z.fog,q=Z.geometry,H=x.isMeshStandardMaterial?z.environment:null,P=(x.isMeshStandardMaterial?n:e).get(x.envMap||H),$=P&&P.mapping===Hu?P.image.height:null,ee=_[x.type];x.precision!==null&&(m=i.getMaxPrecision(x.precision),m!==x.precision&&console.warn("THREE.WebGLProgram.getParameters:",x.precision,"not supported, using",m,"instead."));const re=q.morphAttributes.position||q.morphAttributes.normal||q.morphAttributes.color,me=re!==void 0?re.length:0;let Se=0;q.morphAttributes.position!==void 0&&(Se=1),q.morphAttributes.normal!==void 0&&(Se=2),q.morphAttributes.color!==void 0&&(Se=3);let le,Ee,Oe,Me;if(ee){const bn=qs[ee];le=bn.vertexShader,Ee=bn.fragmentShader}else le=x.vertexShader,Ee=x.fragmentShader,c.update(x),Oe=c.getVertexShaderID(x),Me=c.getFragmentShaderID(x);const j=t.getRenderTarget(),he=Z.isInstancedMesh===!0,pe=Z.isBatchedMesh===!0,Ce=!!x.map,ke=!!x.matcap,N=!!P,V=!!x.aoMap,Y=!!x.lightMap,oe=!!x.bumpMap,se=!!x.normalMap,Te=!!x.displacementMap,Ae=!!x.emissiveMap,ne=!!x.metalnessMap,we=!!x.roughnessMap,ge=x.anisotropy>0,De=x.clearcoat>0,L=x.iridescence>0,I=x.sheen>0,W=x.transmission>0,ye=ge&&!!x.anisotropyMap,K=De&&!!x.clearcoatMap,te=De&&!!x.clearcoatNormalMap,Re=De&&!!x.clearcoatRoughnessMap,xe=L&&!!x.iridescenceMap,Le=L&&!!x.iridescenceThicknessMap,Ze=I&&!!x.sheenColorMap,ft=I&&!!x.sheenRoughnessMap,Pe=!!x.specularMap,ut=!!x.specularColorMap,nt=!!x.specularIntensityMap,$e=W&&!!x.transmissionMap,tt=W&&!!x.thicknessMap,Ke=!!x.gradientMap,Et=!!x.alphaMap,X=x.alphaTest>0,je=!!x.alphaHash,Be=!!x.extensions,Ne=!!q.attributes.uv1,ze=!!q.attributes.uv2,ot=!!q.attributes.uv3;let Nt=ur;return x.toneMapped&&(j===null||j.isXRRenderTarget===!0)&&(Nt=t.toneMapping),{isWebGL2:d,shaderID:ee,shaderType:x.type,shaderName:x.name,vertexShader:le,fragmentShader:Ee,defines:x.defines,customVertexShaderID:Oe,customFragmentShaderID:Me,isRawShaderMaterial:x.isRawShaderMaterial===!0,glslVersion:x.glslVersion,precision:m,batching:pe,instancing:he,instancingColor:he&&Z.instanceColor!==null,supportsVertexTextures:f,outputColorSpace:j===null?t.outputColorSpace:j.isXRRenderTarget===!0?j.texture.colorSpace:Cn,map:Ce,matcap:ke,envMap:N,envMapMode:N&&P.mapping,envMapCubeUVHeight:$,aoMap:V,lightMap:Y,bumpMap:oe,normalMap:se,displacementMap:f&&Te,emissiveMap:Ae,normalMapObjectSpace:se&&x.normalMapType===uRt,normalMapTangentSpace:se&&x.normalMapType===wE,metalnessMap:ne,roughnessMap:we,anisotropy:ge,anisotropyMap:ye,clearcoat:De,clearcoatMap:K,clearcoatNormalMap:te,clearcoatRoughnessMap:Re,iridescence:L,iridescenceMap:xe,iridescenceThicknessMap:Le,sheen:I,sheenColorMap:Ze,sheenRoughnessMap:ft,specularMap:Pe,specularColorMap:ut,specularIntensityMap:nt,transmission:W,transmissionMap:$e,thicknessMap:tt,gradientMap:Ke,opaque:x.transparent===!1&&x.blending===$o,alphaMap:Et,alphaTest:X,alphaHash:je,combine:x.combine,mapUv:Ce&&E(x.map.channel),aoMapUv:V&&E(x.aoMap.channel),lightMapUv:Y&&E(x.lightMap.channel),bumpMapUv:oe&&E(x.bumpMap.channel),normalMapUv:se&&E(x.normalMap.channel),displacementMapUv:Te&&E(x.displacementMap.channel),emissiveMapUv:Ae&&E(x.emissiveMap.channel),metalnessMapUv:ne&&E(x.metalnessMap.channel),roughnessMapUv:we&&E(x.roughnessMap.channel),anisotropyMapUv:ye&&E(x.anisotropyMap.channel),clearcoatMapUv:K&&E(x.clearcoatMap.channel),clearcoatNormalMapUv:te&&E(x.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&E(x.clearcoatRoughnessMap.channel),iridescenceMapUv:xe&&E(x.iridescenceMap.channel),iridescenceThicknessMapUv:Le&&E(x.iridescenceThicknessMap.channel),sheenColorMapUv:Ze&&E(x.sheenColorMap.channel),sheenRoughnessMapUv:ft&&E(x.sheenRoughnessMap.channel),specularMapUv:Pe&&E(x.specularMap.channel),specularColorMapUv:ut&&E(x.specularColorMap.channel),specularIntensityMapUv:nt&&E(x.specularIntensityMap.channel),transmissionMapUv:$e&&E(x.transmissionMap.channel),thicknessMapUv:tt&&E(x.thicknessMap.channel),alphaMapUv:Et&&E(x.alphaMap.channel),vertexTangents:!!q.attributes.tangent&&(se||ge),vertexColors:x.vertexColors,vertexAlphas:x.vertexColors===!0&&!!q.attributes.color&&q.attributes.color.itemSize===4,vertexUv1s:Ne,vertexUv2s:ze,vertexUv3s:ot,pointsUvs:Z.isPoints===!0&&!!q.attributes.uv&&(Ce||Et),fog:!!M,useFog:x.fog===!0,fogExp2:M&&M.isFogExp2,flatShading:x.flatShading===!0,sizeAttenuation:x.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:Z.isSkinnedMesh===!0,morphTargets:q.morphAttributes.position!==void 0,morphNormals:q.morphAttributes.normal!==void 0,morphColors:q.morphAttributes.color!==void 0,morphTargetsCount:me,morphTextureStride:Se,numDirLights:O.directional.length,numPointLights:O.point.length,numSpotLights:O.spot.length,numSpotLightMaps:O.spotLightMap.length,numRectAreaLights:O.rectArea.length,numHemiLights:O.hemi.length,numDirLightShadows:O.directionalShadowMap.length,numPointLightShadows:O.pointShadowMap.length,numSpotLightShadows:O.spotShadowMap.length,numSpotLightShadowsWithMaps:O.numSpotLightShadowsWithMaps,numLightProbes:O.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:x.dithering,shadowMapEnabled:t.shadowMap.enabled&&B.length>0,shadowMapType:t.shadowMap.type,toneMapping:Nt,useLegacyLights:t._useLegacyLights,decodeVideoTexture:Ce&&x.map.isVideoTexture===!0&&Ut.getTransfer(x.map.colorSpace)===Kt,premultipliedAlpha:x.premultipliedAlpha,doubleSided:x.side===$s,flipSided:x.side===Yn,useDepthPacking:x.depthPacking>=0,depthPacking:x.depthPacking||0,index0AttributeName:x.index0AttributeName,extensionDerivatives:Be&&x.extensions.derivatives===!0,extensionFragDepth:Be&&x.extensions.fragDepth===!0,extensionDrawBuffers:Be&&x.extensions.drawBuffers===!0,extensionShaderTextureLOD:Be&&x.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:d||s.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||s.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||s.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:s.has("KHR_parallel_shader_compile"),customProgramCacheKey:x.customProgramCacheKey()}}function g(x){const O=[];if(x.shaderID?O.push(x.shaderID):(O.push(x.customVertexShaderID),O.push(x.customFragmentShaderID)),x.defines!==void 0)for(const B in x.defines)O.push(B),O.push(x.defines[B]);return x.isRawShaderMaterial===!1&&(y(O,x),v(O,x),O.push(t.outputColorSpace)),O.push(x.customProgramCacheKey),O.join()}function y(x,O){x.push(O.precision),x.push(O.outputColorSpace),x.push(O.envMapMode),x.push(O.envMapCubeUVHeight),x.push(O.mapUv),x.push(O.alphaMapUv),x.push(O.lightMapUv),x.push(O.aoMapUv),x.push(O.bumpMapUv),x.push(O.normalMapUv),x.push(O.displacementMapUv),x.push(O.emissiveMapUv),x.push(O.metalnessMapUv),x.push(O.roughnessMapUv),x.push(O.anisotropyMapUv),x.push(O.clearcoatMapUv),x.push(O.clearcoatNormalMapUv),x.push(O.clearcoatRoughnessMapUv),x.push(O.iridescenceMapUv),x.push(O.iridescenceThicknessMapUv),x.push(O.sheenColorMapUv),x.push(O.sheenRoughnessMapUv),x.push(O.specularMapUv),x.push(O.specularColorMapUv),x.push(O.specularIntensityMapUv),x.push(O.transmissionMapUv),x.push(O.thicknessMapUv),x.push(O.combine),x.push(O.fogExp2),x.push(O.sizeAttenuation),x.push(O.morphTargetsCount),x.push(O.morphAttributeCount),x.push(O.numDirLights),x.push(O.numPointLights),x.push(O.numSpotLights),x.push(O.numSpotLightMaps),x.push(O.numHemiLights),x.push(O.numRectAreaLights),x.push(O.numDirLightShadows),x.push(O.numPointLightShadows),x.push(O.numSpotLightShadows),x.push(O.numSpotLightShadowsWithMaps),x.push(O.numLightProbes),x.push(O.shadowMapType),x.push(O.toneMapping),x.push(O.numClippingPlanes),x.push(O.numClipIntersection),x.push(O.depthPacking)}function v(x,O){a.disableAll(),O.isWebGL2&&a.enable(0),O.supportsVertexTextures&&a.enable(1),O.instancing&&a.enable(2),O.instancingColor&&a.enable(3),O.matcap&&a.enable(4),O.envMap&&a.enable(5),O.normalMapObjectSpace&&a.enable(6),O.normalMapTangentSpace&&a.enable(7),O.clearcoat&&a.enable(8),O.iridescence&&a.enable(9),O.alphaTest&&a.enable(10),O.vertexColors&&a.enable(11),O.vertexAlphas&&a.enable(12),O.vertexUv1s&&a.enable(13),O.vertexUv2s&&a.enable(14),O.vertexUv3s&&a.enable(15),O.vertexTangents&&a.enable(16),O.anisotropy&&a.enable(17),O.alphaHash&&a.enable(18),O.batching&&a.enable(19),x.push(a.mask),a.disableAll(),O.fog&&a.enable(0),O.useFog&&a.enable(1),O.flatShading&&a.enable(2),O.logarithmicDepthBuffer&&a.enable(3),O.skinning&&a.enable(4),O.morphTargets&&a.enable(5),O.morphNormals&&a.enable(6),O.morphColors&&a.enable(7),O.premultipliedAlpha&&a.enable(8),O.shadowMapEnabled&&a.enable(9),O.useLegacyLights&&a.enable(10),O.doubleSided&&a.enable(11),O.flipSided&&a.enable(12),O.useDepthPacking&&a.enable(13),O.dithering&&a.enable(14),O.transmission&&a.enable(15),O.sheen&&a.enable(16),O.opaque&&a.enable(17),O.pointsUvs&&a.enable(18),O.decodeVideoTexture&&a.enable(19),x.push(a.mask)}function S(x){const O=_[x.type];let B;if(O){const z=qs[O];B=ZRt.clone(z.uniforms)}else B=x.uniforms;return B}function R(x,O){let B;for(let z=0,Z=u.length;z0?s.push(g):m.transparent===!0?i.push(g):n.push(g)}function c(h,f,m,_,E,b){const g=o(h,f,m,_,E,b);m.transmission>0?s.unshift(g):m.transparent===!0?i.unshift(g):n.unshift(g)}function u(h,f){n.length>1&&n.sort(h||gMt),s.length>1&&s.sort(f||T1),i.length>1&&i.sort(f||T1)}function d(){for(let h=e,f=t.length;h=r.length?(o=new x1,r.push(o)):o=r[i],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function EMt(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new ie,color:new pt};break;case"SpotLight":n={position:new ie,direction:new ie,color:new pt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new ie,color:new pt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new ie,skyColor:new pt,groundColor:new pt};break;case"RectAreaLight":n={color:new pt,position:new ie,halfWidth:new ie,halfHeight:new ie};break}return t[e.id]=n,n}}}function yMt(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let vMt=0;function SMt(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function TMt(t,e){const n=new EMt,s=yMt(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let d=0;d<9;d++)i.probe.push(new ie);const r=new ie,o=new xt,a=new xt;function c(d,h){let f=0,m=0,_=0;for(let z=0;z<9;z++)i.probe[z].set(0,0,0);let E=0,b=0,g=0,y=0,v=0,S=0,R=0,C=0,A=0,D=0,x=0;d.sort(SMt);const O=h===!0?Math.PI:1;for(let z=0,Z=d.length;z0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=We.LTC_FLOAT_1,i.rectAreaLTC2=We.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=We.LTC_HALF_1,i.rectAreaLTC2=We.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=f,i.ambient[1]=m,i.ambient[2]=_;const B=i.hash;(B.directionalLength!==E||B.pointLength!==b||B.spotLength!==g||B.rectAreaLength!==y||B.hemiLength!==v||B.numDirectionalShadows!==S||B.numPointShadows!==R||B.numSpotShadows!==C||B.numSpotMaps!==A||B.numLightProbes!==x)&&(i.directional.length=E,i.spot.length=g,i.rectArea.length=y,i.point.length=b,i.hemi.length=v,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=R,i.pointShadowMap.length=R,i.spotShadow.length=C,i.spotShadowMap.length=C,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=R,i.spotLightMatrix.length=C+A-D,i.spotLightMap.length=A,i.numSpotLightShadowsWithMaps=D,i.numLightProbes=x,B.directionalLength=E,B.pointLength=b,B.spotLength=g,B.rectAreaLength=y,B.hemiLength=v,B.numDirectionalShadows=S,B.numPointShadows=R,B.numSpotShadows=C,B.numSpotMaps=A,B.numLightProbes=x,i.version=vMt++)}function u(d,h){let f=0,m=0,_=0,E=0,b=0;const g=h.matrixWorldInverse;for(let y=0,v=d.length;y=a.length?(c=new C1(t,e),a.push(c)):c=a[o],c}function i(){n=new WeakMap}return{get:s,dispose:i}}class CMt extends Ls{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=cRt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class wMt extends Ls{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const RMt=`void main() { +`+$)}else z!==""?console.warn("THREE.WebGLProgram: Program Info Log:",z):(Z===""||M==="")&&(H=!1);H&&(B.diagnostics={runnable:q,programLog:z,vertexShader:{log:Z,prefix:b},fragmentShader:{log:M,prefix:g}})}i.deleteShader(R),i.deleteShader(C),D=new Ed(i,E),x=aMt(i,E)}let D;this.getUniforms=function(){return D===void 0&&A(this),D};let x;this.getAttributes=function(){return x===void 0&&A(this),x};let O=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return O===!1&&(O=i.getProgramParameter(E,JIt)),O},this.destroy=function(){s.releaseStatesOfProgram(this),i.deleteProgram(E),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=eMt++,this.cacheKey=e,this.usedTimes=1,this.program=E,this.vertexShader=R,this.fragmentShader=C,this}let EMt=0;class yMt{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,s=e.fragmentShader,i=this._getShaderStage(n),r=this._getShaderStage(s),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const s of n)s.usedTimes--,s.usedTimes===0&&this.shaderCache.delete(s.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let s=n.get(e);return s===void 0&&(s=new Set,n.set(e,s)),s}_getShaderStage(e){const n=this.shaderCache;let s=n.get(e);return s===void 0&&(s=new vMt(e),n.set(e,s)),s}}class vMt{constructor(e){this.id=EMt++,this.code=e,this.usedTimes=0}}function SMt(t,e,n,s,i,r,o){const a=new bO,c=new yMt,u=[],d=i.isWebGL2,h=i.logarithmicDepthBuffer,f=i.vertexTextures;let m=i.precision;const _={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function E(x){return x===0?"uv":`uv${x}`}function b(x,O,B,z,Z){const M=z.fog,q=Z.geometry,H=x.isMeshStandardMaterial?z.environment:null,P=(x.isMeshStandardMaterial?n:e).get(x.envMap||H),$=P&&P.mapping===Hu?P.image.height:null,ee=_[x.type];x.precision!==null&&(m=i.getMaxPrecision(x.precision),m!==x.precision&&console.warn("THREE.WebGLProgram.getParameters:",x.precision,"not supported, using",m,"instead."));const re=q.morphAttributes.position||q.morphAttributes.normal||q.morphAttributes.color,me=re!==void 0?re.length:0;let Se=0;q.morphAttributes.position!==void 0&&(Se=1),q.morphAttributes.normal!==void 0&&(Se=2),q.morphAttributes.color!==void 0&&(Se=3);let le,Ee,Oe,Me;if(ee){const bn=qs[ee];le=bn.vertexShader,Ee=bn.fragmentShader}else le=x.vertexShader,Ee=x.fragmentShader,c.update(x),Oe=c.getVertexShaderID(x),Me=c.getFragmentShaderID(x);const j=t.getRenderTarget(),he=Z.isInstancedMesh===!0,pe=Z.isBatchedMesh===!0,Ce=!!x.map,ke=!!x.matcap,N=!!P,V=!!x.aoMap,Y=!!x.lightMap,oe=!!x.bumpMap,se=!!x.normalMap,Te=!!x.displacementMap,Ae=!!x.emissiveMap,ne=!!x.metalnessMap,we=!!x.roughnessMap,ge=x.anisotropy>0,De=x.clearcoat>0,L=x.iridescence>0,I=x.sheen>0,W=x.transmission>0,ye=ge&&!!x.anisotropyMap,K=De&&!!x.clearcoatMap,te=De&&!!x.clearcoatNormalMap,Re=De&&!!x.clearcoatRoughnessMap,xe=L&&!!x.iridescenceMap,Le=L&&!!x.iridescenceThicknessMap,Ze=I&&!!x.sheenColorMap,ft=I&&!!x.sheenRoughnessMap,Pe=!!x.specularMap,ut=!!x.specularColorMap,nt=!!x.specularIntensityMap,$e=W&&!!x.transmissionMap,tt=W&&!!x.thicknessMap,Ke=!!x.gradientMap,Et=!!x.alphaMap,X=x.alphaTest>0,je=!!x.alphaHash,Be=!!x.extensions,Ne=!!q.attributes.uv1,ze=!!q.attributes.uv2,ot=!!q.attributes.uv3;let Nt=ur;return x.toneMapped&&(j===null||j.isXRRenderTarget===!0)&&(Nt=t.toneMapping),{isWebGL2:d,shaderID:ee,shaderType:x.type,shaderName:x.name,vertexShader:le,fragmentShader:Ee,defines:x.defines,customVertexShaderID:Oe,customFragmentShaderID:Me,isRawShaderMaterial:x.isRawShaderMaterial===!0,glslVersion:x.glslVersion,precision:m,batching:pe,instancing:he,instancingColor:he&&Z.instanceColor!==null,supportsVertexTextures:f,outputColorSpace:j===null?t.outputColorSpace:j.isXRRenderTarget===!0?j.texture.colorSpace:Cn,map:Ce,matcap:ke,envMap:N,envMapMode:N&&P.mapping,envMapCubeUVHeight:$,aoMap:V,lightMap:Y,bumpMap:oe,normalMap:se,displacementMap:f&&Te,emissiveMap:Ae,normalMapObjectSpace:se&&x.normalMapType===bRt,normalMapTangentSpace:se&&x.normalMapType===wE,metalnessMap:ne,roughnessMap:we,anisotropy:ge,anisotropyMap:ye,clearcoat:De,clearcoatMap:K,clearcoatNormalMap:te,clearcoatRoughnessMap:Re,iridescence:L,iridescenceMap:xe,iridescenceThicknessMap:Le,sheen:I,sheenColorMap:Ze,sheenRoughnessMap:ft,specularMap:Pe,specularColorMap:ut,specularIntensityMap:nt,transmission:W,transmissionMap:$e,thicknessMap:tt,gradientMap:Ke,opaque:x.transparent===!1&&x.blending===$o,alphaMap:Et,alphaTest:X,alphaHash:je,combine:x.combine,mapUv:Ce&&E(x.map.channel),aoMapUv:V&&E(x.aoMap.channel),lightMapUv:Y&&E(x.lightMap.channel),bumpMapUv:oe&&E(x.bumpMap.channel),normalMapUv:se&&E(x.normalMap.channel),displacementMapUv:Te&&E(x.displacementMap.channel),emissiveMapUv:Ae&&E(x.emissiveMap.channel),metalnessMapUv:ne&&E(x.metalnessMap.channel),roughnessMapUv:we&&E(x.roughnessMap.channel),anisotropyMapUv:ye&&E(x.anisotropyMap.channel),clearcoatMapUv:K&&E(x.clearcoatMap.channel),clearcoatNormalMapUv:te&&E(x.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&E(x.clearcoatRoughnessMap.channel),iridescenceMapUv:xe&&E(x.iridescenceMap.channel),iridescenceThicknessMapUv:Le&&E(x.iridescenceThicknessMap.channel),sheenColorMapUv:Ze&&E(x.sheenColorMap.channel),sheenRoughnessMapUv:ft&&E(x.sheenRoughnessMap.channel),specularMapUv:Pe&&E(x.specularMap.channel),specularColorMapUv:ut&&E(x.specularColorMap.channel),specularIntensityMapUv:nt&&E(x.specularIntensityMap.channel),transmissionMapUv:$e&&E(x.transmissionMap.channel),thicknessMapUv:tt&&E(x.thicknessMap.channel),alphaMapUv:Et&&E(x.alphaMap.channel),vertexTangents:!!q.attributes.tangent&&(se||ge),vertexColors:x.vertexColors,vertexAlphas:x.vertexColors===!0&&!!q.attributes.color&&q.attributes.color.itemSize===4,vertexUv1s:Ne,vertexUv2s:ze,vertexUv3s:ot,pointsUvs:Z.isPoints===!0&&!!q.attributes.uv&&(Ce||Et),fog:!!M,useFog:x.fog===!0,fogExp2:M&&M.isFogExp2,flatShading:x.flatShading===!0,sizeAttenuation:x.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:Z.isSkinnedMesh===!0,morphTargets:q.morphAttributes.position!==void 0,morphNormals:q.morphAttributes.normal!==void 0,morphColors:q.morphAttributes.color!==void 0,morphTargetsCount:me,morphTextureStride:Se,numDirLights:O.directional.length,numPointLights:O.point.length,numSpotLights:O.spot.length,numSpotLightMaps:O.spotLightMap.length,numRectAreaLights:O.rectArea.length,numHemiLights:O.hemi.length,numDirLightShadows:O.directionalShadowMap.length,numPointLightShadows:O.pointShadowMap.length,numSpotLightShadows:O.spotShadowMap.length,numSpotLightShadowsWithMaps:O.numSpotLightShadowsWithMaps,numLightProbes:O.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:x.dithering,shadowMapEnabled:t.shadowMap.enabled&&B.length>0,shadowMapType:t.shadowMap.type,toneMapping:Nt,useLegacyLights:t._useLegacyLights,decodeVideoTexture:Ce&&x.map.isVideoTexture===!0&&Ut.getTransfer(x.map.colorSpace)===Kt,premultipliedAlpha:x.premultipliedAlpha,doubleSided:x.side===$s,flipSided:x.side===Yn,useDepthPacking:x.depthPacking>=0,depthPacking:x.depthPacking||0,index0AttributeName:x.index0AttributeName,extensionDerivatives:Be&&x.extensions.derivatives===!0,extensionFragDepth:Be&&x.extensions.fragDepth===!0,extensionDrawBuffers:Be&&x.extensions.drawBuffers===!0,extensionShaderTextureLOD:Be&&x.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:d||s.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||s.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||s.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:s.has("KHR_parallel_shader_compile"),customProgramCacheKey:x.customProgramCacheKey()}}function g(x){const O=[];if(x.shaderID?O.push(x.shaderID):(O.push(x.customVertexShaderID),O.push(x.customFragmentShaderID)),x.defines!==void 0)for(const B in x.defines)O.push(B),O.push(x.defines[B]);return x.isRawShaderMaterial===!1&&(y(O,x),v(O,x),O.push(t.outputColorSpace)),O.push(x.customProgramCacheKey),O.join()}function y(x,O){x.push(O.precision),x.push(O.outputColorSpace),x.push(O.envMapMode),x.push(O.envMapCubeUVHeight),x.push(O.mapUv),x.push(O.alphaMapUv),x.push(O.lightMapUv),x.push(O.aoMapUv),x.push(O.bumpMapUv),x.push(O.normalMapUv),x.push(O.displacementMapUv),x.push(O.emissiveMapUv),x.push(O.metalnessMapUv),x.push(O.roughnessMapUv),x.push(O.anisotropyMapUv),x.push(O.clearcoatMapUv),x.push(O.clearcoatNormalMapUv),x.push(O.clearcoatRoughnessMapUv),x.push(O.iridescenceMapUv),x.push(O.iridescenceThicknessMapUv),x.push(O.sheenColorMapUv),x.push(O.sheenRoughnessMapUv),x.push(O.specularMapUv),x.push(O.specularColorMapUv),x.push(O.specularIntensityMapUv),x.push(O.transmissionMapUv),x.push(O.thicknessMapUv),x.push(O.combine),x.push(O.fogExp2),x.push(O.sizeAttenuation),x.push(O.morphTargetsCount),x.push(O.morphAttributeCount),x.push(O.numDirLights),x.push(O.numPointLights),x.push(O.numSpotLights),x.push(O.numSpotLightMaps),x.push(O.numHemiLights),x.push(O.numRectAreaLights),x.push(O.numDirLightShadows),x.push(O.numPointLightShadows),x.push(O.numSpotLightShadows),x.push(O.numSpotLightShadowsWithMaps),x.push(O.numLightProbes),x.push(O.shadowMapType),x.push(O.toneMapping),x.push(O.numClippingPlanes),x.push(O.numClipIntersection),x.push(O.depthPacking)}function v(x,O){a.disableAll(),O.isWebGL2&&a.enable(0),O.supportsVertexTextures&&a.enable(1),O.instancing&&a.enable(2),O.instancingColor&&a.enable(3),O.matcap&&a.enable(4),O.envMap&&a.enable(5),O.normalMapObjectSpace&&a.enable(6),O.normalMapTangentSpace&&a.enable(7),O.clearcoat&&a.enable(8),O.iridescence&&a.enable(9),O.alphaTest&&a.enable(10),O.vertexColors&&a.enable(11),O.vertexAlphas&&a.enable(12),O.vertexUv1s&&a.enable(13),O.vertexUv2s&&a.enable(14),O.vertexUv3s&&a.enable(15),O.vertexTangents&&a.enable(16),O.anisotropy&&a.enable(17),O.alphaHash&&a.enable(18),O.batching&&a.enable(19),x.push(a.mask),a.disableAll(),O.fog&&a.enable(0),O.useFog&&a.enable(1),O.flatShading&&a.enable(2),O.logarithmicDepthBuffer&&a.enable(3),O.skinning&&a.enable(4),O.morphTargets&&a.enable(5),O.morphNormals&&a.enable(6),O.morphColors&&a.enable(7),O.premultipliedAlpha&&a.enable(8),O.shadowMapEnabled&&a.enable(9),O.useLegacyLights&&a.enable(10),O.doubleSided&&a.enable(11),O.flipSided&&a.enable(12),O.useDepthPacking&&a.enable(13),O.dithering&&a.enable(14),O.transmission&&a.enable(15),O.sheen&&a.enable(16),O.opaque&&a.enable(17),O.pointsUvs&&a.enable(18),O.decodeVideoTexture&&a.enable(19),x.push(a.mask)}function S(x){const O=_[x.type];let B;if(O){const z=qs[O];B=rAt.clone(z.uniforms)}else B=x.uniforms;return B}function R(x,O){let B;for(let z=0,Z=u.length;z0?s.push(g):m.transparent===!0?i.push(g):n.push(g)}function c(h,f,m,_,E,b){const g=o(h,f,m,_,E,b);m.transmission>0?s.unshift(g):m.transparent===!0?i.unshift(g):n.unshift(g)}function u(h,f){n.length>1&&n.sort(h||xMt),s.length>1&&s.sort(f||T1),i.length>1&&i.sort(f||T1)}function d(){for(let h=e,f=t.length;h=r.length?(o=new x1,r.push(o)):o=r[i],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function wMt(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new ie,color:new pt};break;case"SpotLight":n={position:new ie,direction:new ie,color:new pt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new ie,color:new pt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new ie,skyColor:new pt,groundColor:new pt};break;case"RectAreaLight":n={color:new pt,position:new ie,halfWidth:new ie,halfHeight:new ie};break}return t[e.id]=n,n}}}function RMt(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new At,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let AMt=0;function NMt(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function OMt(t,e){const n=new wMt,s=RMt(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let d=0;d<9;d++)i.probe.push(new ie);const r=new ie,o=new xt,a=new xt;function c(d,h){let f=0,m=0,_=0;for(let z=0;z<9;z++)i.probe[z].set(0,0,0);let E=0,b=0,g=0,y=0,v=0,S=0,R=0,C=0,A=0,D=0,x=0;d.sort(NMt);const O=h===!0?Math.PI:1;for(let z=0,Z=d.length;z0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=We.LTC_FLOAT_1,i.rectAreaLTC2=We.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=We.LTC_HALF_1,i.rectAreaLTC2=We.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=f,i.ambient[1]=m,i.ambient[2]=_;const B=i.hash;(B.directionalLength!==E||B.pointLength!==b||B.spotLength!==g||B.rectAreaLength!==y||B.hemiLength!==v||B.numDirectionalShadows!==S||B.numPointShadows!==R||B.numSpotShadows!==C||B.numSpotMaps!==A||B.numLightProbes!==x)&&(i.directional.length=E,i.spot.length=g,i.rectArea.length=y,i.point.length=b,i.hemi.length=v,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=R,i.pointShadowMap.length=R,i.spotShadow.length=C,i.spotShadowMap.length=C,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=R,i.spotLightMatrix.length=C+A-D,i.spotLightMap.length=A,i.numSpotLightShadowsWithMaps=D,i.numLightProbes=x,B.directionalLength=E,B.pointLength=b,B.spotLength=g,B.rectAreaLength=y,B.hemiLength=v,B.numDirectionalShadows=S,B.numPointShadows=R,B.numSpotShadows=C,B.numSpotMaps=A,B.numLightProbes=x,i.version=AMt++)}function u(d,h){let f=0,m=0,_=0,E=0,b=0;const g=h.matrixWorldInverse;for(let y=0,v=d.length;y=a.length?(c=new C1(t,e),a.push(c)):c=a[o],c}function i(){n=new WeakMap}return{get:s,dispose:i}}class MMt extends Ls{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=mRt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class DMt extends Ls{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const kMt=`void main() { gl_Position = vec4( position, 1.0 ); -}`,AMt=`uniform sampler2D shadow_pass; +}`,LMt=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3900,8 +3900,8 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function NMt(t,e,n){let s=new NE;const i=new At,r=new At,o=new Yt,a=new CMt({depthPacking:dRt}),c=new wMt,u={},d=n.maxTextureSize,h={[Ii]:Yn,[Yn]:Ii,[$s]:$s},f=new no({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new At},radius:{value:4}},vertexShader:RMt,fragmentShader:AMt}),m=f.clone();m.defines.HORIZONTAL_PASS=1;const _=new li;_.setAttribute("position",new Bn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Un(_,f),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=tO;let g=this.type;this.render=function(R,C,A){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||R.length===0)return;const D=t.getRenderTarget(),x=t.getActiveCubeFace(),O=t.getActiveMipmapLevel(),B=t.state;B.setBlending(dr),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const z=g!==yi&&this.type===yi,Z=g===yi&&this.type!==yi;for(let M=0,q=R.length;Md||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/$.x),i.x=r.x*$.x,P.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/$.y),i.y=r.y*$.y,P.mapSize.y=r.y)),P.map===null||z===!0||Z===!0){const re=this.type!==yi?{minFilter:mn,magFilter:mn}:{};P.map!==null&&P.map.dispose(),P.map=new to(i.x,i.y,re),P.map.texture.name=H.name+".shadowMap",P.camera.updateProjectionMatrix()}t.setRenderTarget(P.map),t.clear();const ee=P.getViewportCount();for(let re=0;re0||C.map&&C.alphaTest>0){const B=x.uuid,z=C.uuid;let Z=u[B];Z===void 0&&(Z={},u[B]=Z);let M=Z[z];M===void 0&&(M=x.clone(),Z[z]=M),x=M}if(x.visible=C.visible,x.wireframe=C.wireframe,D===yi?x.side=C.shadowSide!==null?C.shadowSide:C.side:x.side=C.shadowSide!==null?C.shadowSide:h[C.side],x.alphaMap=C.alphaMap,x.alphaTest=C.alphaTest,x.map=C.map,x.clipShadows=C.clipShadows,x.clippingPlanes=C.clippingPlanes,x.clipIntersection=C.clipIntersection,x.displacementMap=C.displacementMap,x.displacementScale=C.displacementScale,x.displacementBias=C.displacementBias,x.wireframeLinewidth=C.wireframeLinewidth,x.linewidth=C.linewidth,A.isPointLight===!0&&x.isMeshDistanceMaterial===!0){const B=t.properties.get(x);B.light=A}return x}function S(R,C,A,D,x){if(R.visible===!1)return;if(R.layers.test(C.layers)&&(R.isMesh||R.isLine||R.isPoints)&&(R.castShadow||R.receiveShadow&&x===yi)&&(!R.frustumCulled||s.intersectsObject(R))){R.modelViewMatrix.multiplyMatrices(A.matrixWorldInverse,R.matrixWorld);const z=e.update(R),Z=R.material;if(Array.isArray(Z)){const M=z.groups;for(let q=0,H=M.length;q=1):re.indexOf("OpenGL ES")!==-1&&(ee=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),$=ee>=2);let me=null,Se={};const le=t.getParameter(t.SCISSOR_BOX),Ee=t.getParameter(t.VIEWPORT),Oe=new Yt().fromArray(le),Me=new Yt().fromArray(Ee);function j(X,je,Be,Ne){const ze=new Uint8Array(4),ot=t.createTexture();t.bindTexture(X,ot),t.texParameteri(X,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(X,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Nt=0;Nt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),_=new WeakMap;let E;const b=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(L,I){return g?new OffscreenCanvas(L,I):Gl("canvas")}function v(L,I,W,ye){let K=1;if((L.width>ye||L.height>ye)&&(K=ye/Math.max(L.width,L.height)),K<1||I===!0)if(typeof HTMLImageElement<"u"&&L instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&L instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&L instanceof ImageBitmap){const te=I?Zd:Math.floor,Re=te(K*L.width),xe=te(K*L.height);E===void 0&&(E=y(Re,xe));const Le=W?y(Re,xe):E;return Le.width=Re,Le.height=xe,Le.getContext("2d").drawImage(L,0,0,Re,xe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+L.width+"x"+L.height+") to ("+Re+"x"+xe+")."),Le}else return"data"in L&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+L.width+"x"+L.height+")."),L;return L}function S(L){return Hg(L.width)&&Hg(L.height)}function R(L){return a?!1:L.wrapS!==ls||L.wrapT!==ls||L.minFilter!==mn&&L.minFilter!==zn}function C(L,I){return L.generateMipmaps&&I&&L.minFilter!==mn&&L.minFilter!==zn}function A(L){t.generateMipmap(L)}function D(L,I,W,ye,K=!1){if(a===!1)return I;if(L!==null){if(t[L]!==void 0)return t[L];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+L+"'")}let te=I;if(I===t.RED&&(W===t.FLOAT&&(te=t.R32F),W===t.HALF_FLOAT&&(te=t.R16F),W===t.UNSIGNED_BYTE&&(te=t.R8)),I===t.RED_INTEGER&&(W===t.UNSIGNED_BYTE&&(te=t.R8UI),W===t.UNSIGNED_SHORT&&(te=t.R16UI),W===t.UNSIGNED_INT&&(te=t.R32UI),W===t.BYTE&&(te=t.R8I),W===t.SHORT&&(te=t.R16I),W===t.INT&&(te=t.R32I)),I===t.RG&&(W===t.FLOAT&&(te=t.RG32F),W===t.HALF_FLOAT&&(te=t.RG16F),W===t.UNSIGNED_BYTE&&(te=t.RG8)),I===t.RGBA){const Re=K?Kd:Ut.getTransfer(ye);W===t.FLOAT&&(te=t.RGBA32F),W===t.HALF_FLOAT&&(te=t.RGBA16F),W===t.UNSIGNED_BYTE&&(te=Re===Kt?t.SRGB8_ALPHA8:t.RGBA8),W===t.UNSIGNED_SHORT_4_4_4_4&&(te=t.RGBA4),W===t.UNSIGNED_SHORT_5_5_5_1&&(te=t.RGB5_A1)}return(te===t.R16F||te===t.R32F||te===t.RG16F||te===t.RG32F||te===t.RGBA16F||te===t.RGBA32F)&&e.get("EXT_color_buffer_float"),te}function x(L,I,W){return C(L,W)===!0||L.isFramebufferTexture&&L.minFilter!==mn&&L.minFilter!==zn?Math.log2(Math.max(I.width,I.height))+1:L.mipmaps!==void 0&&L.mipmaps.length>0?L.mipmaps.length:L.isCompressedTexture&&Array.isArray(L.image)?I.mipmaps.length:1}function O(L){return L===mn||L===Bg||L===bd?t.NEAREST:t.LINEAR}function B(L){const I=L.target;I.removeEventListener("dispose",B),Z(I),I.isVideoTexture&&_.delete(I)}function z(L){const I=L.target;I.removeEventListener("dispose",z),q(I)}function Z(L){const I=s.get(L);if(I.__webglInit===void 0)return;const W=L.source,ye=b.get(W);if(ye){const K=ye[I.__cacheKey];K.usedTimes--,K.usedTimes===0&&M(L),Object.keys(ye).length===0&&b.delete(W)}s.remove(L)}function M(L){const I=s.get(L);t.deleteTexture(I.__webglTexture);const W=L.source,ye=b.get(W);delete ye[I.__cacheKey],o.memory.textures--}function q(L){const I=L.texture,W=s.get(L),ye=s.get(I);if(ye.__webglTexture!==void 0&&(t.deleteTexture(ye.__webglTexture),o.memory.textures--),L.depthTexture&&L.depthTexture.dispose(),L.isWebGLCubeRenderTarget)for(let K=0;K<6;K++){if(Array.isArray(W.__webglFramebuffer[K]))for(let te=0;te=c&&console.warn("THREE.WebGLTextures: Trying to use "+L+" texture units while this GPU supports only "+c),H+=1,L}function ee(L){const I=[];return I.push(L.wrapS),I.push(L.wrapT),I.push(L.wrapR||0),I.push(L.magFilter),I.push(L.minFilter),I.push(L.anisotropy),I.push(L.internalFormat),I.push(L.format),I.push(L.type),I.push(L.generateMipmaps),I.push(L.premultiplyAlpha),I.push(L.flipY),I.push(L.unpackAlignment),I.push(L.colorSpace),I.join()}function re(L,I){const W=s.get(L);if(L.isVideoTexture&&ge(L),L.isRenderTargetTexture===!1&&L.version>0&&W.__version!==L.version){const ye=L.image;if(ye===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ye.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{pe(W,L,I);return}}n.bindTexture(t.TEXTURE_2D,W.__webglTexture,t.TEXTURE0+I)}function me(L,I){const W=s.get(L);if(L.version>0&&W.__version!==L.version){pe(W,L,I);return}n.bindTexture(t.TEXTURE_2D_ARRAY,W.__webglTexture,t.TEXTURE0+I)}function Se(L,I){const W=s.get(L);if(L.version>0&&W.__version!==L.version){pe(W,L,I);return}n.bindTexture(t.TEXTURE_3D,W.__webglTexture,t.TEXTURE0+I)}function le(L,I){const W=s.get(L);if(L.version>0&&W.__version!==L.version){Ce(W,L,I);return}n.bindTexture(t.TEXTURE_CUBE_MAP,W.__webglTexture,t.TEXTURE0+I)}const Ee={[da]:t.REPEAT,[ls]:t.CLAMP_TO_EDGE,[Wd]:t.MIRRORED_REPEAT},Oe={[mn]:t.NEAREST,[Bg]:t.NEAREST_MIPMAP_NEAREST,[bd]:t.NEAREST_MIPMAP_LINEAR,[zn]:t.LINEAR,[sO]:t.LINEAR_MIPMAP_NEAREST,[eo]:t.LINEAR_MIPMAP_LINEAR},Me={[pRt]:t.NEVER,[bRt]:t.ALWAYS,[_Rt]:t.LESS,[_O]:t.LEQUAL,[hRt]:t.EQUAL,[gRt]:t.GEQUAL,[fRt]:t.GREATER,[mRt]:t.NOTEQUAL};function j(L,I,W){if(W?(t.texParameteri(L,t.TEXTURE_WRAP_S,Ee[I.wrapS]),t.texParameteri(L,t.TEXTURE_WRAP_T,Ee[I.wrapT]),(L===t.TEXTURE_3D||L===t.TEXTURE_2D_ARRAY)&&t.texParameteri(L,t.TEXTURE_WRAP_R,Ee[I.wrapR]),t.texParameteri(L,t.TEXTURE_MAG_FILTER,Oe[I.magFilter]),t.texParameteri(L,t.TEXTURE_MIN_FILTER,Oe[I.minFilter])):(t.texParameteri(L,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(L,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(L===t.TEXTURE_3D||L===t.TEXTURE_2D_ARRAY)&&t.texParameteri(L,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(I.wrapS!==ls||I.wrapT!==ls)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(L,t.TEXTURE_MAG_FILTER,O(I.magFilter)),t.texParameteri(L,t.TEXTURE_MIN_FILTER,O(I.minFilter)),I.minFilter!==mn&&I.minFilter!==zn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(t.texParameteri(L,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(L,t.TEXTURE_COMPARE_FUNC,Me[I.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ye=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===mn||I.minFilter!==bd&&I.minFilter!==eo||I.type===Ti&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===Fl&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||s.get(I).__currentAnisotropy)&&(t.texParameterf(L,ye.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,i.getMaxAnisotropy())),s.get(I).__currentAnisotropy=I.anisotropy)}}function he(L,I){let W=!1;L.__webglInit===void 0&&(L.__webglInit=!0,I.addEventListener("dispose",B));const ye=I.source;let K=b.get(ye);K===void 0&&(K={},b.set(ye,K));const te=ee(I);if(te!==L.__cacheKey){K[te]===void 0&&(K[te]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,W=!0),K[te].usedTimes++;const Re=K[L.__cacheKey];Re!==void 0&&(K[L.__cacheKey].usedTimes--,Re.usedTimes===0&&M(I)),L.__cacheKey=te,L.__webglTexture=K[te].texture}return W}function pe(L,I,W){let ye=t.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(ye=t.TEXTURE_2D_ARRAY),I.isData3DTexture&&(ye=t.TEXTURE_3D);const K=he(L,I),te=I.source;n.bindTexture(ye,L.__webglTexture,t.TEXTURE0+W);const Re=s.get(te);if(te.version!==Re.__version||K===!0){n.activeTexture(t.TEXTURE0+W);const xe=Ut.getPrimaries(Ut.workingColorSpace),Le=I.colorSpace===ds?null:Ut.getPrimaries(I.colorSpace),Ze=I.colorSpace===ds||xe===Le?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,I.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,I.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ze);const ft=R(I)&&S(I.image)===!1;let Pe=v(I.image,ft,!1,d);Pe=De(I,Pe);const ut=S(Pe)||a,nt=r.convert(I.format,I.colorSpace);let $e=r.convert(I.type),tt=D(I.internalFormat,nt,$e,I.colorSpace,I.isVideoTexture);j(ye,I,ut);let Ke;const Et=I.mipmaps,X=a&&I.isVideoTexture!==!0&&tt!==dO,je=Re.__version===void 0||K===!0,Be=x(I,Pe,ut);if(I.isDepthTexture)tt=t.DEPTH_COMPONENT,a?I.type===Ti?tt=t.DEPTH_COMPONENT32F:I.type===or?tt=t.DEPTH_COMPONENT24:I.type===$r?tt=t.DEPTH24_STENCIL8:tt=t.DEPTH_COMPONENT16:I.type===Ti&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===Wr&&tt===t.DEPTH_COMPONENT&&I.type!==CE&&I.type!==or&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=or,$e=r.convert(I.type)),I.format===ua&&tt===t.DEPTH_COMPONENT&&(tt=t.DEPTH_STENCIL,I.type!==$r&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=$r,$e=r.convert(I.type))),je&&(X?n.texStorage2D(t.TEXTURE_2D,1,tt,Pe.width,Pe.height):n.texImage2D(t.TEXTURE_2D,0,tt,Pe.width,Pe.height,0,nt,$e,null));else if(I.isDataTexture)if(Et.length>0&&ut){X&&je&&n.texStorage2D(t.TEXTURE_2D,Be,tt,Et[0].width,Et[0].height);for(let Ne=0,ze=Et.length;Ne>=1,ze>>=1}}else if(Et.length>0&&ut){X&&je&&n.texStorage2D(t.TEXTURE_2D,Be,tt,Et[0].width,Et[0].height);for(let Ne=0,ze=Et.length;Ne0&&je++,n.texStorage2D(t.TEXTURE_CUBE_MAP,je,Ke,Pe[0].width,Pe[0].height));for(let Ne=0;Ne<6;Ne++)if(ft){Et?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,0,0,Pe[Ne].width,Pe[Ne].height,$e,tt,Pe[Ne].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,Ke,Pe[Ne].width,Pe[Ne].height,0,$e,tt,Pe[Ne].data);for(let ze=0;ze>te),Pe=Math.max(1,I.height>>te);K===t.TEXTURE_3D||K===t.TEXTURE_2D_ARRAY?n.texImage3D(K,te,Le,ft,Pe,I.depth,0,Re,xe,null):n.texImage2D(K,te,Le,ft,Pe,0,Re,xe,null)}n.bindFramebuffer(t.FRAMEBUFFER,L),we(I)?f.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ye,K,s.get(W).__webglTexture,0,ne(I)):(K===t.TEXTURE_2D||K>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&K<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ye,K,s.get(W).__webglTexture,te),n.bindFramebuffer(t.FRAMEBUFFER,null)}function N(L,I,W){if(t.bindRenderbuffer(t.RENDERBUFFER,L),I.depthBuffer&&!I.stencilBuffer){let ye=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(W||we(I)){const K=I.depthTexture;K&&K.isDepthTexture&&(K.type===Ti?ye=t.DEPTH_COMPONENT32F:K.type===or&&(ye=t.DEPTH_COMPONENT24));const te=ne(I);we(I)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,te,ye,I.width,I.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,te,ye,I.width,I.height)}else t.renderbufferStorage(t.RENDERBUFFER,ye,I.width,I.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,L)}else if(I.depthBuffer&&I.stencilBuffer){const ye=ne(I);W&&we(I)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ye,t.DEPTH24_STENCIL8,I.width,I.height):we(I)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ye,t.DEPTH24_STENCIL8,I.width,I.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,I.width,I.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,L)}else{const ye=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let K=0;K0){W.__webglFramebuffer[xe]=[];for(let Le=0;Le0){W.__webglFramebuffer=[];for(let xe=0;xe0&&we(L)===!1){const xe=te?I:[I];W.__webglMultisampledFramebuffer=t.createFramebuffer(),W.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,W.__webglMultisampledFramebuffer);for(let Le=0;Le0)for(let Le=0;Le0)for(let Le=0;Le0&&we(L)===!1){const I=L.isWebGLMultipleRenderTargets?L.texture:[L.texture],W=L.width,ye=L.height;let K=t.COLOR_BUFFER_BIT;const te=[],Re=L.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,xe=s.get(L),Le=L.isWebGLMultipleRenderTargets===!0;if(Le)for(let Ze=0;Ze0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function ge(L){const I=o.render.frame;_.get(L)!==I&&(_.set(L,I),L.update())}function De(L,I){const W=L.colorSpace,ye=L.format,K=L.type;return L.isCompressedTexture===!0||L.isVideoTexture===!0||L.format===zg||W!==Cn&&W!==ds&&(Ut.getTransfer(W)===Kt?a===!1?e.has("EXT_sRGB")===!0&&ye===cs?(L.format=zg,L.minFilter=zn,L.generateMipmaps=!1):I=fO.sRGBToLinear(I):(ye!==cs||K!==pr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",W)),I}this.allocateTextureUnit=$,this.resetTextureUnits=P,this.setTexture2D=re,this.setTexture2DArray=me,this.setTexture3D=Se,this.setTextureCube=le,this.rebindTextures=oe,this.setupRenderTarget=se,this.updateRenderTargetMipmap=Te,this.updateMultisampleRenderTarget=Ae,this.setupDepthRenderbuffer=Y,this.setupFrameBufferTexture=ke,this.useMultisampledRTT=we}function MMt(t,e,n){const s=n.isWebGL2;function i(r,o=ds){let a;const c=Ut.getTransfer(o);if(r===pr)return t.UNSIGNED_BYTE;if(r===rO)return t.UNSIGNED_SHORT_4_4_4_4;if(r===oO)return t.UNSIGNED_SHORT_5_5_5_1;if(r===Jwt)return t.BYTE;if(r===eRt)return t.SHORT;if(r===CE)return t.UNSIGNED_SHORT;if(r===iO)return t.INT;if(r===or)return t.UNSIGNED_INT;if(r===Ti)return t.FLOAT;if(r===Fl)return s?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(r===tRt)return t.ALPHA;if(r===cs)return t.RGBA;if(r===nRt)return t.LUMINANCE;if(r===sRt)return t.LUMINANCE_ALPHA;if(r===Wr)return t.DEPTH_COMPONENT;if(r===ua)return t.DEPTH_STENCIL;if(r===zg)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(r===iRt)return t.RED;if(r===aO)return t.RED_INTEGER;if(r===rRt)return t.RG;if(r===lO)return t.RG_INTEGER;if(r===cO)return t.RGBA_INTEGER;if(r===fm||r===mm||r===gm||r===bm)if(c===Kt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===fm)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===mm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===gm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===bm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===fm)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===mm)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===gm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===bm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===uC||r===pC||r===_C||r===hC)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===uC)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===pC)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===_C)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===hC)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===dO)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===fC||r===mC)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===fC)return c===Kt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===mC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===gC||r===bC||r===EC||r===yC||r===vC||r===SC||r===TC||r===xC||r===CC||r===wC||r===RC||r===AC||r===NC||r===OC)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===gC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===bC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===EC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===yC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===vC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===SC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===TC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===xC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===CC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===wC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===RC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===AC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===NC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===OC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Em||r===IC||r===MC)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===Em)return c===Kt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===IC)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===MC)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===oRt||r===DC||r===kC||r===LC)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===Em)return a.COMPRESSED_RED_RGTC1_EXT;if(r===DC)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===kC)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===LC)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===$r?s?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[r]!==void 0?t[r]:null}return{convert:i}}class DMt extends Pn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Vr extends Jt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const kMt={type:"move"};class Hm{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Vr,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Vr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ie,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ie),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Vr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ie,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ie),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const s of e.hand.values())this._getHandJoint(n,s)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,s){let i=null,r=null,o=null;const a=this._targetRay,c=this._grip,u=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const E of e.hand.values()){const b=n.getJointPose(E,s),g=this._getHandJoint(u,E);b!==null&&(g.matrix.fromArray(b.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=b.radius),g.visible=b!==null}const d=u.joints["index-finger-tip"],h=u.joints["thumb-tip"],f=d.position.distanceTo(h.position),m=.02,_=.005;u.inputState.pinching&&f>m+_?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&f<=m-_&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=n.getPose(e.gripSpace,s),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,s),i===null&&r!==null&&(i=r),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(kMt)))}return a!==null&&(a.visible=i!==null),c!==null&&(c.visible=r!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const s=new Vr;s.matrixAutoUpdate=!1,s.visible=!1,e.joints[n.jointName]=s,e.add(s)}return e.joints[n.jointName]}}class LMt extends Da{constructor(e,n){super();const s=this;let i=null,r=1,o=null,a="local-floor",c=1,u=null,d=null,h=null,f=null,m=null,_=null;const E=n.getContextAttributes();let b=null,g=null;const y=[],v=[],S=new At;let R=null;const C=new Pn;C.layers.enable(1),C.viewport=new Yt;const A=new Pn;A.layers.enable(2),A.viewport=new Yt;const D=[C,A],x=new DMt;x.layers.enable(1),x.layers.enable(2);let O=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Ee=y[le];return Ee===void 0&&(Ee=new Hm,y[le]=Ee),Ee.getTargetRaySpace()},this.getControllerGrip=function(le){let Ee=y[le];return Ee===void 0&&(Ee=new Hm,y[le]=Ee),Ee.getGripSpace()},this.getHand=function(le){let Ee=y[le];return Ee===void 0&&(Ee=new Hm,y[le]=Ee),Ee.getHandSpace()};function z(le){const Ee=v.indexOf(le.inputSource);if(Ee===-1)return;const Oe=y[Ee];Oe!==void 0&&(Oe.update(le.inputSource,le.frame,u||o),Oe.dispatchEvent({type:le.type,data:le.inputSource}))}function Z(){i.removeEventListener("select",z),i.removeEventListener("selectstart",z),i.removeEventListener("selectend",z),i.removeEventListener("squeeze",z),i.removeEventListener("squeezestart",z),i.removeEventListener("squeezeend",z),i.removeEventListener("end",Z),i.removeEventListener("inputsourceschange",M);for(let le=0;le=0&&(v[Me]=null,y[Me].disconnect(Oe))}for(let Ee=0;Ee=v.length){v.push(Oe),Me=he;break}else if(v[he]===null){v[he]=Oe,Me=he;break}if(Me===-1)break}const j=y[Me];j&&j.connect(Oe)}}const q=new ie,H=new ie;function P(le,Ee,Oe){q.setFromMatrixPosition(Ee.matrixWorld),H.setFromMatrixPosition(Oe.matrixWorld);const Me=q.distanceTo(H),j=Ee.projectionMatrix.elements,he=Oe.projectionMatrix.elements,pe=j[14]/(j[10]-1),Ce=j[14]/(j[10]+1),ke=(j[9]+1)/j[5],N=(j[9]-1)/j[5],V=(j[8]-1)/j[0],Y=(he[8]+1)/he[0],oe=pe*V,se=pe*Y,Te=Me/(-V+Y),Ae=Te*-V;Ee.matrixWorld.decompose(le.position,le.quaternion,le.scale),le.translateX(Ae),le.translateZ(Te),le.matrixWorld.compose(le.position,le.quaternion,le.scale),le.matrixWorldInverse.copy(le.matrixWorld).invert();const ne=pe+Te,we=Ce+Te,ge=oe-Ae,De=se+(Me-Ae),L=ke*Ce/we*ne,I=N*Ce/we*ne;le.projectionMatrix.makePerspective(ge,De,L,I,ne,we),le.projectionMatrixInverse.copy(le.projectionMatrix).invert()}function $(le,Ee){Ee===null?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Ee.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(i===null)return;x.near=A.near=C.near=le.near,x.far=A.far=C.far=le.far,(O!==x.near||B!==x.far)&&(i.updateRenderState({depthNear:x.near,depthFar:x.far}),O=x.near,B=x.far);const Ee=le.parent,Oe=x.cameras;$(x,Ee);for(let Me=0;Me0&&(b.alphaTest.value=g.alphaTest);const y=e.get(g).envMap;if(y&&(b.envMap.value=y,b.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=g.reflectivity,b.ior.value=g.ior,b.refractionRatio.value=g.refractionRatio),g.lightMap){b.lightMap.value=g.lightMap;const v=t._useLegacyLights===!0?Math.PI:1;b.lightMapIntensity.value=g.lightMapIntensity*v,n(g.lightMap,b.lightMapTransform)}g.aoMap&&(b.aoMap.value=g.aoMap,b.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,b.aoMapTransform))}function o(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform))}function a(b,g){b.dashSize.value=g.dashSize,b.totalSize.value=g.dashSize+g.gapSize,b.scale.value=g.scale}function c(b,g,y,v){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.size.value=g.size*y,b.scale.value=v*.5,g.map&&(b.map.value=g.map,n(g.map,b.uvTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function u(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.rotation.value=g.rotation,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function d(b,g){b.specular.value.copy(g.specular),b.shininess.value=Math.max(g.shininess,1e-4)}function h(b,g){g.gradientMap&&(b.gradientMap.value=g.gradientMap)}function f(b,g){b.metalness.value=g.metalness,g.metalnessMap&&(b.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,b.metalnessMapTransform)),b.roughness.value=g.roughness,g.roughnessMap&&(b.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,b.roughnessMapTransform)),e.get(g).envMap&&(b.envMapIntensity.value=g.envMapIntensity)}function m(b,g,y){b.ior.value=g.ior,g.sheen>0&&(b.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),b.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(b.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,b.sheenColorMapTransform)),g.sheenRoughnessMap&&(b.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,b.sheenRoughnessMapTransform))),g.clearcoat>0&&(b.clearcoat.value=g.clearcoat,b.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(b.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,b.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(b.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Yn&&b.clearcoatNormalScale.value.negate())),g.iridescence>0&&(b.iridescence.value=g.iridescence,b.iridescenceIOR.value=g.iridescenceIOR,b.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(b.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,b.iridescenceMapTransform)),g.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),g.transmission>0&&(b.transmission.value=g.transmission,b.transmissionSamplerMap.value=y.texture,b.transmissionSamplerSize.value.set(y.width,y.height),g.transmissionMap&&(b.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,b.transmissionMapTransform)),b.thickness.value=g.thickness,g.thicknessMap&&(b.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=g.attenuationDistance,b.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(b.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(b.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=g.specularIntensity,b.specularColor.value.copy(g.specularColor),g.specularColorMap&&(b.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,b.specularColorMapTransform)),g.specularIntensityMap&&(b.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,b.specularIntensityMapTransform))}function _(b,g){g.matcap&&(b.matcap.value=g.matcap)}function E(b,g){const y=e.get(g).light;b.referencePosition.value.setFromMatrixPosition(y.matrixWorld),b.nearDistance.value=y.shadow.camera.near,b.farDistance.value=y.shadow.camera.far}return{refreshFogUniforms:s,refreshMaterialUniforms:i}}function UMt(t,e,n,s){let i={},r={},o=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function c(y,v){const S=v.program;s.uniformBlockBinding(y,S)}function u(y,v){let S=i[y.id];S===void 0&&(_(y),S=d(y),i[y.id]=S,y.addEventListener("dispose",b));const R=v.program;s.updateUBOMapping(y,R);const C=e.render.frame;r[y.id]!==C&&(f(y),r[y.id]=C)}function d(y){const v=h();y.__bindingPointIndex=v;const S=t.createBuffer(),R=y.__size,C=y.usage;return t.bindBuffer(t.UNIFORM_BUFFER,S),t.bufferData(t.UNIFORM_BUFFER,R,C),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,v,S),S}function h(){for(let y=0;y0){C=S%R;const z=R-C;C!==0&&z-O.boundary<0&&(S+=R-C,x.__offset=S)}S+=O.storage}return C=S%R,C>0&&(S+=R-C),y.__size=S,y.__cache={},this}function E(y){const v={boundary:0,storage:0};return typeof y=="number"?(v.boundary=4,v.storage=4):y.isVector2?(v.boundary=8,v.storage=8):y.isVector3||y.isColor?(v.boundary=16,v.storage=12):y.isVector4?(v.boundary=16,v.storage=16):y.isMatrix3?(v.boundary=48,v.storage=48):y.isMatrix4?(v.boundary=64,v.storage=64):y.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",y),v}function b(y){const v=y.target;v.removeEventListener("dispose",b);const S=o.indexOf(v.__bindingPointIndex);o.splice(S,1),t.deleteBuffer(i[v.id]),delete i[v.id],delete r[v.id]}function g(){for(const y in i)t.deleteBuffer(i[y]);o=[],i={},r={}}return{bind:c,update:u,dispose:g}}class MO{constructor(e={}){const{canvas:n=kRt(),context:s=null,depth:i=!0,stencil:r=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:u=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:h=!1}=e;this.isWebGLRenderer=!0;let f;s!==null?f=s.getContextAttributes().alpha:f=o;const m=new Uint32Array(4),_=new Int32Array(4);let E=null,b=null;const g=[],y=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=en,this._useLegacyLights=!1,this.toneMapping=ur,this.toneMappingExposure=1;const v=this;let S=!1,R=0,C=0,A=null,D=-1,x=null;const O=new Yt,B=new Yt;let z=null;const Z=new pt(0);let M=0,q=n.width,H=n.height,P=1,$=null,ee=null;const re=new Yt(0,0,q,H),me=new Yt(0,0,q,H);let Se=!1;const le=new NE;let Ee=!1,Oe=!1,Me=null;const j=new xt,he=new At,pe=new ie,Ce={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ke(){return A===null?P:1}let N=s;function V(F,ce){for(let be=0;be{function Qe(){if(ve.forEach(function(st){Ae.get(st).currentProgram.isReady()&&ve.delete(st)}),ve.size===0){fe(F);return}setTimeout(Qe,10)}Y.get("KHR_parallel_shader_compile")!==null?Qe():setTimeout(Qe,10)})};let Nt=null;function sn(F){Nt&&Nt(F)}function bn(){En.stop()}function Gt(){En.start()}const En=new CO;En.setAnimationLoop(sn),typeof self<"u"&&En.setContext(self),this.setAnimationLoop=function(F){Nt=F,Ke.setAnimationLoop(F),F===null?En.stop():En.start()},Ke.addEventListener("sessionstart",bn),Ke.addEventListener("sessionend",Gt),this.render=function(F,ce){if(ce!==void 0&&ce.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),ce.parent===null&&ce.matrixWorldAutoUpdate===!0&&ce.updateMatrixWorld(),Ke.enabled===!0&&Ke.isPresenting===!0&&(Ke.cameraAutoUpdate===!0&&Ke.updateCamera(ce),ce=Ke.getCamera()),F.isScene===!0&&F.onBeforeRender(v,F,ce,A),b=te.get(F,y.length),b.init(),y.push(b),j.multiplyMatrices(ce.projectionMatrix,ce.matrixWorldInverse),le.setFromProjectionMatrix(j),Oe=this.localClippingEnabled,Ee=Re.init(this.clippingPlanes,Oe),E=K.get(F,g.length),E.init(),g.push(E),ns(F,ce,0,v.sortObjects),E.finish(),v.sortObjects===!0&&E.sort($,ee),this.info.render.frame++,Ee===!0&&Re.beginShadows();const be=b.state.shadowsArray;if(xe.render(be,F,ce),Ee===!0&&Re.endShadows(),this.info.autoReset===!0&&this.info.reset(),Le.render(E,F),b.setupLights(v._useLegacyLights),ce.isArrayCamera){const ve=ce.cameras;for(let fe=0,Qe=ve.length;fe0?b=y[y.length-1]:b=null,g.pop(),g.length>0?E=g[g.length-1]:E=null};function ns(F,ce,be,ve){if(F.visible===!1)return;if(F.layers.test(ce.layers)){if(F.isGroup)be=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(ce);else if(F.isLight)b.pushLight(F),F.castShadow&&b.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||le.intersectsSprite(F)){ve&&pe.setFromMatrixPosition(F.matrixWorld).applyMatrix4(j);const st=I.update(F),rt=F.material;rt.visible&&E.push(F,st,rt,be,pe.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||le.intersectsObject(F))){const st=I.update(F),rt=F.material;if(ve&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),pe.copy(F.boundingSphere.center)):(st.boundingSphere===null&&st.computeBoundingSphere(),pe.copy(st.boundingSphere.center)),pe.applyMatrix4(F.matrixWorld).applyMatrix4(j)),Array.isArray(rt)){const lt=st.groups;for(let bt=0,_t=lt.length;bt<_t;bt++){const mt=lt[bt],Zt=rt[mt.materialIndex];Zt&&Zt.visible&&E.push(F,st,Zt,be,pe.z,mt)}}else rt.visible&&E.push(F,st,rt,be,pe.z,null)}}const Qe=F.children;for(let st=0,rt=Qe.length;st0&&Xu(fe,Qe,ce,be),ve&&se.viewport(O.copy(ve)),fe.length>0&&ao(fe,ce,be),Qe.length>0&&ao(Qe,ce,be),st.length>0&&ao(st,ce,be),se.buffers.depth.setTest(!0),se.buffers.depth.setMask(!0),se.buffers.color.setMask(!0),se.setPolygonOffset(!1)}function Xu(F,ce,be,ve){if((be.isScene===!0?be.overrideMaterial:null)!==null)return;const Qe=oe.isWebGL2;Me===null&&(Me=new to(1,1,{generateMipmaps:!0,type:Y.has("EXT_color_buffer_half_float")?Fl:pr,minFilter:eo,samples:Qe?4:0})),v.getDrawingBufferSize(he),Qe?Me.setSize(he.x,he.y):Me.setSize(Zd(he.x),Zd(he.y));const st=v.getRenderTarget();v.setRenderTarget(Me),v.getClearColor(Z),M=v.getClearAlpha(),M<1&&v.setClearColor(16777215,.5),v.clear();const rt=v.toneMapping;v.toneMapping=ur,ao(F,be,ve),ne.updateMultisampleRenderTarget(Me),ne.updateRenderTargetMipmap(Me);let lt=!1;for(let bt=0,_t=ce.length;bt<_t;bt++){const mt=ce[bt],Zt=mt.object,Mn=mt.geometry,rn=mt.material,Ts=mt.group;if(rn.side===$s&&Zt.layers.test(ve.layers)){const Wt=rn.side;rn.side=Yn,rn.needsUpdate=!0,ic(Zt,be,ve,Mn,rn,Ts),rn.side=Wt,rn.needsUpdate=!0,lt=!0}}lt===!0&&(ne.updateMultisampleRenderTarget(Me),ne.updateRenderTargetMipmap(Me)),v.setRenderTarget(st),v.setClearColor(Z,M),v.toneMapping=rt}function ao(F,ce,be){const ve=ce.isScene===!0?ce.overrideMaterial:null;for(let fe=0,Qe=F.length;fe0),mt=!!be.morphAttributes.position,Zt=!!be.morphAttributes.normal,Mn=!!be.morphAttributes.color;let rn=ur;ve.toneMapped&&(A===null||A.isXRRenderTarget===!0)&&(rn=v.toneMapping);const Ts=be.morphAttributes.position||be.morphAttributes.normal||be.morphAttributes.color,Wt=Ts!==void 0?Ts.length:0,yt=Ae.get(ve),Ba=b.state.lights;if(Ee===!0&&(Oe===!0||F!==x)){const Gn=F===x&&ve.id===D;Re.setState(ve,F,Gn)}let Qt=!1;ve.version===yt.__version?(yt.needsLights&&yt.lightsStateVersion!==Ba.state.version||yt.outputColorSpace!==rt||fe.isBatchedMesh&&yt.batching===!1||!fe.isBatchedMesh&&yt.batching===!0||fe.isInstancedMesh&&yt.instancing===!1||!fe.isInstancedMesh&&yt.instancing===!0||fe.isSkinnedMesh&&yt.skinning===!1||!fe.isSkinnedMesh&&yt.skinning===!0||fe.isInstancedMesh&&yt.instancingColor===!0&&fe.instanceColor===null||fe.isInstancedMesh&&yt.instancingColor===!1&&fe.instanceColor!==null||yt.envMap!==lt||ve.fog===!0&&yt.fog!==Qe||yt.numClippingPlanes!==void 0&&(yt.numClippingPlanes!==Re.numPlanes||yt.numIntersection!==Re.numIntersection)||yt.vertexAlphas!==bt||yt.vertexTangents!==_t||yt.morphTargets!==mt||yt.morphNormals!==Zt||yt.morphColors!==Mn||yt.toneMapping!==rn||oe.isWebGL2===!0&&yt.morphTargetsCount!==Wt)&&(Qt=!0):(Qt=!0,yt.__version=ve.version);let di=yt.currentProgram;Qt===!0&&(di=lo(ve,ce,fe));let ac=!1,yr=!1,Ga=!1;const hn=di.getUniforms(),ui=yt.uniforms;if(se.useProgram(di.program)&&(ac=!0,yr=!0,Ga=!0),ve.id!==D&&(D=ve.id,yr=!0),ac||x!==F){hn.setValue(N,"projectionMatrix",F.projectionMatrix),hn.setValue(N,"viewMatrix",F.matrixWorldInverse);const Gn=hn.map.cameraPosition;Gn!==void 0&&Gn.setValue(N,pe.setFromMatrixPosition(F.matrixWorld)),oe.logarithmicDepthBuffer&&hn.setValue(N,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(ve.isMeshPhongMaterial||ve.isMeshToonMaterial||ve.isMeshLambertMaterial||ve.isMeshBasicMaterial||ve.isMeshStandardMaterial||ve.isShaderMaterial)&&hn.setValue(N,"isOrthographic",F.isOrthographicCamera===!0),x!==F&&(x=F,yr=!0,Ga=!0)}if(fe.isSkinnedMesh){hn.setOptional(N,fe,"bindMatrix"),hn.setOptional(N,fe,"bindMatrixInverse");const Gn=fe.skeleton;Gn&&(oe.floatVertexTextures?(Gn.boneTexture===null&&Gn.computeBoneTexture(),hn.setValue(N,"boneTexture",Gn.boneTexture,ne)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}fe.isBatchedMesh&&(hn.setOptional(N,fe,"batchingTexture"),hn.setValue(N,"batchingTexture",fe._matricesTexture,ne));const Va=be.morphAttributes;if((Va.position!==void 0||Va.normal!==void 0||Va.color!==void 0&&oe.isWebGL2===!0)&&Ze.update(fe,be,di),(yr||yt.receiveShadow!==fe.receiveShadow)&&(yt.receiveShadow=fe.receiveShadow,hn.setValue(N,"receiveShadow",fe.receiveShadow)),ve.isMeshGouraudMaterial&&ve.envMap!==null&&(ui.envMap.value=lt,ui.flipEnvMap.value=lt.isCubeTexture&<.isRenderTargetTexture===!1?-1:1),yr&&(hn.setValue(N,"toneMappingExposure",v.toneMappingExposure),yt.needsLights&&Ju(ui,Ga),Qe&&ve.fog===!0&&ye.refreshFogUniforms(ui,Qe),ye.refreshMaterialUniforms(ui,ve,P,H,Me),Ed.upload(N,rc(yt),ui,ne)),ve.isShaderMaterial&&ve.uniformsNeedUpdate===!0&&(Ed.upload(N,rc(yt),ui,ne),ve.uniformsNeedUpdate=!1),ve.isSpriteMaterial&&hn.setValue(N,"center",fe.center),hn.setValue(N,"modelViewMatrix",fe.modelViewMatrix),hn.setValue(N,"normalMatrix",fe.normalMatrix),hn.setValue(N,"modelMatrix",fe.matrixWorld),ve.isShaderMaterial||ve.isRawShaderMaterial){const Gn=ve.uniformsGroups;for(let za=0,tp=Gn.length;za0&&ne.useMultisampledRTT(F)===!1?fe=Ae.get(F).__webglMultisampledFramebuffer:Array.isArray(_t)?fe=_t[be]:fe=_t,O.copy(F.viewport),B.copy(F.scissor),z=F.scissorTest}else O.copy(re).multiplyScalar(P).floor(),B.copy(me).multiplyScalar(P).floor(),z=Se;if(se.bindFramebuffer(N.FRAMEBUFFER,fe)&&oe.drawBuffers&&ve&&se.drawBuffers(F,fe),se.viewport(O),se.scissor(B),se.setScissorTest(z),Qe){const lt=Ae.get(F.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+ce,lt.__webglTexture,be)}else if(st){const lt=Ae.get(F.texture),bt=ce||0;N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,lt.__webglTexture,be||0,bt)}D=-1},this.readRenderTargetPixels=function(F,ce,be,ve,fe,Qe,st){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let rt=Ae.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&st!==void 0&&(rt=rt[st]),rt){se.bindFramebuffer(N.FRAMEBUFFER,rt);try{const lt=F.texture,bt=lt.format,_t=lt.type;if(bt!==cs&&ut.convert(bt)!==N.getParameter(N.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const mt=_t===Fl&&(Y.has("EXT_color_buffer_half_float")||oe.isWebGL2&&Y.has("EXT_color_buffer_float"));if(_t!==pr&&ut.convert(_t)!==N.getParameter(N.IMPLEMENTATION_COLOR_READ_TYPE)&&!(_t===Ti&&(oe.isWebGL2||Y.has("OES_texture_float")||Y.has("WEBGL_color_buffer_float")))&&!mt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ce>=0&&ce<=F.width-ve&&be>=0&&be<=F.height-fe&&N.readPixels(ce,be,ve,fe,ut.convert(bt),ut.convert(_t),Qe)}finally{const lt=A!==null?Ae.get(A).__webglFramebuffer:null;se.bindFramebuffer(N.FRAMEBUFFER,lt)}}},this.copyFramebufferToTexture=function(F,ce,be=0){const ve=Math.pow(2,-be),fe=Math.floor(ce.image.width*ve),Qe=Math.floor(ce.image.height*ve);ne.setTexture2D(ce,0),N.copyTexSubImage2D(N.TEXTURE_2D,be,0,0,F.x,F.y,fe,Qe),se.unbindTexture()},this.copyTextureToTexture=function(F,ce,be,ve=0){const fe=ce.image.width,Qe=ce.image.height,st=ut.convert(be.format),rt=ut.convert(be.type);ne.setTexture2D(be,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,be.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,be.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,be.unpackAlignment),ce.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,ve,F.x,F.y,fe,Qe,st,rt,ce.image.data):ce.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,ve,F.x,F.y,ce.mipmaps[0].width,ce.mipmaps[0].height,st,ce.mipmaps[0].data):N.texSubImage2D(N.TEXTURE_2D,ve,F.x,F.y,st,rt,ce.image),ve===0&&be.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),se.unbindTexture()},this.copyTextureToTexture3D=function(F,ce,be,ve,fe=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Qe=F.max.x-F.min.x+1,st=F.max.y-F.min.y+1,rt=F.max.z-F.min.z+1,lt=ut.convert(ve.format),bt=ut.convert(ve.type);let _t;if(ve.isData3DTexture)ne.setTexture3D(ve,0),_t=N.TEXTURE_3D;else if(ve.isDataArrayTexture)ne.setTexture2DArray(ve,0),_t=N.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,ve.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ve.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,ve.unpackAlignment);const mt=N.getParameter(N.UNPACK_ROW_LENGTH),Zt=N.getParameter(N.UNPACK_IMAGE_HEIGHT),Mn=N.getParameter(N.UNPACK_SKIP_PIXELS),rn=N.getParameter(N.UNPACK_SKIP_ROWS),Ts=N.getParameter(N.UNPACK_SKIP_IMAGES),Wt=be.isCompressedTexture?be.mipmaps[0]:be.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,Wt.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,Wt.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,F.min.x),N.pixelStorei(N.UNPACK_SKIP_ROWS,F.min.y),N.pixelStorei(N.UNPACK_SKIP_IMAGES,F.min.z),be.isDataTexture||be.isData3DTexture?N.texSubImage3D(_t,fe,ce.x,ce.y,ce.z,Qe,st,rt,lt,bt,Wt.data):be.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),N.compressedTexSubImage3D(_t,fe,ce.x,ce.y,ce.z,Qe,st,rt,lt,Wt.data)):N.texSubImage3D(_t,fe,ce.x,ce.y,ce.z,Qe,st,rt,lt,bt,Wt),N.pixelStorei(N.UNPACK_ROW_LENGTH,mt),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,Zt),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mn),N.pixelStorei(N.UNPACK_SKIP_ROWS,rn),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Ts),fe===0&&ve.generateMipmaps&&N.generateMipmap(_t),se.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?ne.setTextureCube(F,0):F.isData3DTexture?ne.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?ne.setTexture2DArray(F,0):ne.setTexture2D(F,0),se.unbindTexture()},this.resetState=function(){R=0,C=0,A=null,se.reset(),nt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return xi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===RE?"display-p3":"srgb",n.unpackColorSpace=Ut.workingColorSpace===qu?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===en?Kr:pO}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Kr?en:Cn}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class FMt extends MO{}FMt.prototype.isWebGL1Renderer=!0;class BMt extends Jt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class GMt{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Vg,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=ks()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,s){e*=this.stride,s*=n.stride;for(let i=0,r=this.stride;ic)continue;f.applyMatrix4(this.matrixWorld);const D=e.ray.origin.distanceTo(f);De.far||n.push({distance:D,point:h.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),y=Math.min(b.count,o.start+o.count);for(let v=g,S=y-1;vc)continue;f.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(f);Ce.far||n.push({distance:C,point:h.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,s=Object.keys(n);if(s.length>0){const i=n[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r0){const i=n[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;ri.far)return;r.push({distance:u,distanceToRay:Math.sqrt(a),point:c,index:e,face:null,object:o})}}class PE extends Ls{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new pt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wE,this.normalScale=new At(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Fi extends PE{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new At(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Nn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new pt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new pt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new pt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class V1 extends Ls{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new pt(16777215),this.specular=new pt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wE,this.normalScale=new At(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=xE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function sd(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function QMt(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function XMt(t){function e(i,r){return t[i]-t[r]}const n=t.length,s=new Array(n);for(let i=0;i!==n;++i)s[i]=i;return s.sort(e),s}function z1(t,e,n){const s=t.length,i=new t.constructor(s);for(let r=0,o=0;o!==s;++r){const a=n[r]*e;for(let c=0;c!==e;++c)i[o++]=t[a+c]}return i}function PO(t,e,n,s){let i=1,r=t[0];for(;r!==void 0&&r[s]===void 0;)r=t[i++];if(r===void 0)return;let o=r[s];if(o!==void 0)if(Array.isArray(o))do o=r[s],o!==void 0&&(e.push(r.time),n.push.apply(n,o)),r=t[i++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[s],o!==void 0&&(e.push(r.time),o.toArray(n,n.length)),r=t[i++];while(r!==void 0);else do o=r[s],o!==void 0&&(e.push(r.time),n.push(o)),r=t[i++];while(r!==void 0)}class ec{constructor(e,n,s,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new n.constructor(s),this.sampleValues=n,this.valueSize=s,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let s=this._cachedIndex,i=n[s],r=n[s-1];e:{t:{let o;n:{s:if(!(e=r)){const a=n[1];e=r)break t}o=s,s=0;break n}break e}for(;s>>1;en;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=s.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const s=this.times,i=this.values,r=s.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const c=s[a];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,c),e=!1;break}if(o!==null&&o>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,c,o),e=!1;break}o=c}if(i!==void 0&&QMt(i))for(let a=0,c=i.length;a!==c;++a){const u=i[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),s=this.getValueSize(),i=this.getInterpolation()===ym,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*s,c=o*s,u=0;u!==s;++u)n[c+u]=n[a+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*s)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),s=this.constructor,i=new s(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}ci.prototype.TimeBufferType=Float32Array;ci.prototype.ValueBufferType=Float32Array;ci.prototype.DefaultInterpolation=pa;class La extends ci{}La.prototype.ValueTypeName="bool";La.prototype.ValueBufferType=Array;La.prototype.DefaultInterpolation=Bl;La.prototype.InterpolantFactoryMethodLinear=void 0;La.prototype.InterpolantFactoryMethodSmooth=void 0;class UO extends ci{}UO.prototype.ValueTypeName="color";class fa extends ci{}fa.prototype.ValueTypeName="number";class t2t extends ec{constructor(e,n,s,i){super(e,n,s,i)}interpolate_(e,n,s,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,c=(s-n)/(i-n);let u=e*a;for(let d=u+a;u!==d;u+=4)Er.slerpFlat(r,0,o,u-a,o,u,c);return r}}class so extends ci{InterpolantFactoryMethodLinear(e){return new t2t(this.times,this.values,this.getValueSize(),e)}}so.prototype.ValueTypeName="quaternion";so.prototype.DefaultInterpolation=pa;so.prototype.InterpolantFactoryMethodSmooth=void 0;class Pa extends ci{}Pa.prototype.ValueTypeName="string";Pa.prototype.ValueBufferType=Array;Pa.prototype.DefaultInterpolation=Bl;Pa.prototype.InterpolantFactoryMethodLinear=void 0;Pa.prototype.InterpolantFactoryMethodSmooth=void 0;class ma extends ci{}ma.prototype.ValueTypeName="vector";class n2t{constructor(e,n=-1,s,i=aRt){this.name=e,this.tracks=s,this.duration=n,this.blendMode=i,this.uuid=ks(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],s=e.tracks,i=1/(e.fps||1);for(let o=0,a=s.length;o!==a;++o)n.push(i2t(s[o]).scale(i));const r=new this(e.name,e.duration,n,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const n=[],s=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=s.length;r!==o;++r)n.push(ci.toJSON(s[r]));return i}static CreateFromMorphTargetSequence(e,n,s,i){const r=n.length,o=[];for(let a=0;a1){const h=d[1];let f=i[h];f||(i[h]=f=[]),f.push(u)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],n,s));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const s=function(h,f,m,_,E){if(m.length!==0){const b=[],g=[];PO(m,b,g,_),b.length!==0&&E.push(new h(f,b,g))}},i=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let c=e.length||-1;const u=e.hierarchy||[];for(let h=0;h{n&&n(r),this.manager.itemEnd(e)},0),r;if(bi[e]!==void 0){bi[e].push({onLoad:n,onProgress:s,onError:i});return}bi[e]=[],bi[e].push({onLoad:n,onProgress:s,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,c=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const d=bi[e],h=u.body.getReader(),f=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),m=f?parseInt(f):0,_=m!==0;let E=0;const b=new ReadableStream({start(g){y();function y(){h.read().then(({done:v,value:S})=>{if(v)g.close();else{E+=S.byteLength;const R=new ProgressEvent("progress",{lengthComputable:_,loaded:E,total:m});for(let C=0,A=d.length;C{switch(c){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(d=>new DOMParser().parseFromString(d,a));case"json":return u.json();default:if(a===void 0)return u.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),f=h&&h[1]?h[1].toLowerCase():void 0,m=new TextDecoder(f);return u.arrayBuffer().then(_=>m.decode(_))}}}).then(u=>{ga.add(e,u);const d=bi[e];delete bi[e];for(let h=0,f=d.length;h{const d=bi[e];if(d===void 0)throw this.manager.itemError(e),u;delete bi[e];for(let h=0,f=d.length;h{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class l2t extends Ua{constructor(e){super(e)}load(e,n,s,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=ga.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(o),r.manager.itemEnd(e)},0),o;const a=Gl("img");function c(){d(),ga.add(e,this),n&&n(this),r.manager.itemEnd(e)}function u(h){d(),i&&i(h),r.manager.itemError(e),r.manager.itemEnd(e)}function d(){a.removeEventListener("load",c,!1),a.removeEventListener("error",u,!1)}return a.addEventListener("load",c,!1),a.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class BO extends Ua{constructor(e){super(e)}load(e,n,s,i){const r=new xn,o=new l2t(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,n!==void 0&&n(r)},s,i),r}}class Ku extends Jt{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new pt(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}const Wm=new xt,H1=new ie,q1=new ie;class UE{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new At(512,512),this.map=null,this.mapPass=null,this.matrix=new xt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new NE,this._frameExtents=new At(1,1),this._viewportCount=1,this._viewports=[new Yt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,s=this.matrix;H1.setFromMatrixPosition(e.matrixWorld),n.position.copy(H1),q1.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(q1),n.updateMatrixWorld(),Wm.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Wm),s.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),s.multiply(Wm)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class c2t extends UE{constructor(){super(new Pn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,s=_a*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=e.distance||n.far;(s!==n.fov||i!==n.aspect||r!==n.far)&&(n.fov=s,n.aspect=i,n.far=r,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class d2t extends Ku{constructor(e,n,s=0,i=Math.PI/3,r=0,o=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Jt.DEFAULT_UP),this.updateMatrix(),this.target=new Jt,this.distance=s,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new c2t}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Y1=new xt,tl=new ie,Km=new ie;class u2t extends UE{constructor(){super(new Pn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new At(4,2),this._viewportCount=6,this._viewports=[new Yt(2,1,1,1),new Yt(0,1,1,1),new Yt(3,1,1,1),new Yt(1,1,1,1),new Yt(3,0,1,1),new Yt(1,0,1,1)],this._cubeDirections=[new ie(1,0,0),new ie(-1,0,0),new ie(0,0,1),new ie(0,0,-1),new ie(0,1,0),new ie(0,-1,0)],this._cubeUps=[new ie(0,1,0),new ie(0,1,0),new ie(0,1,0),new ie(0,1,0),new ie(0,0,1),new ie(0,0,-1)]}updateMatrices(e,n=0){const s=this.camera,i=this.matrix,r=e.distance||s.far;r!==s.far&&(s.far=r,s.updateProjectionMatrix()),tl.setFromMatrixPosition(e.matrixWorld),s.position.copy(tl),Km.copy(s.position),Km.add(this._cubeDirections[n]),s.up.copy(this._cubeUps[n]),s.lookAt(Km),s.updateMatrixWorld(),i.makeTranslation(-tl.x,-tl.y,-tl.z),Y1.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Y1)}}class p2t extends Ku{constructor(e,n,s=0,i=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=s,this.decay=i,this.shadow=new u2t}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class _2t extends UE{constructor(){super(new IE(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class GO extends Ku{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Jt.DEFAULT_UP),this.updateMatrix(),this.target=new Jt,this.shadow=new _2t}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class h2t extends Ku{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class yl{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let s=0,i=e.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,s,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=ga.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(o),r.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(c){ga.add(e,c),n&&n(c),r.manager.itemEnd(e)}).catch(function(c){i&&i(c),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}const FE="\\[\\]\\.:\\/",m2t=new RegExp("["+FE+"]","g"),BE="[^"+FE+"]",g2t="[^"+FE.replace("\\.","")+"]",b2t=/((?:WC+[\/:])*)/.source.replace("WC",BE),E2t=/(WCOD+)?/.source.replace("WCOD",g2t),y2t=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",BE),v2t=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",BE),S2t=new RegExp("^"+b2t+E2t+y2t+v2t+"$"),T2t=["material","materials","bones","map"];class x2t{constructor(e,n,s){const i=s||Bt.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const s=this._targetGroup.nCachedObjects_,i=this._bindings[s];i!==void 0&&i.getValue(e,n)}setValue(e,n){const s=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=s.length;i!==r;++i)s[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,s=e.length;n!==s;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,s=e.length;n!==s;++n)e[n].unbind()}}class Bt{constructor(e,n,s){this.path=n,this.parsedPath=s||Bt.parseTrackName(n),this.node=Bt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,s){return e&&e.isAnimationObjectGroup?new Bt.Composite(e,n,s):new Bt(e,n,s)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(m2t,"")}static parseTrackName(e){const n=S2t.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const s={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=s.nodeName&&s.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const r=s.nodeName.substring(i+1);T2t.indexOf(r)!==-1&&(s.nodeName=s.nodeName.substring(0,i),s.objectName=r)}if(s.propertyName===null||s.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return s}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const s=e.skeleton.getBoneByName(n);if(s!==void 0)return s}if(e.children){const s=function(r){for(let o=0;o=2.0 are supported."));return}const u=new sDt(r,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}u.setExtensions(o),u.setPlugins(a),u.parse(s,i)}parseAsync(e,n){const s=this;return new Promise(function(i,r){s.parse(e,n,i,r)})}}function w2t(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Rt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class R2t{constructor(e){this.parser=e,this.name=Rt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let s=0,i=n.length;s=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,r.source,o)}}class G2t{constructor(e){this.parser=e,this.name=Rt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,s=this.parser,i=s.json,r=i.textures[e];if(!r.extensions||!r.extensions[n])return null;const o=r.extensions[n],a=i.images[o.source];let c=s.textureLoader;if(a.uri){const u=s.options.manager.getHandler(a.uri);u!==null&&(c=u)}return this.detectSupport().then(function(u){if(u)return s.loadTextureImage(e,o.source,c);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return s.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class V2t{constructor(e){this.parser=e,this.name=Rt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,s=this.parser,i=s.json,r=i.textures[e];if(!r.extensions||!r.extensions[n])return null;const o=r.extensions[n],a=i.images[o.source];let c=s.textureLoader;if(a.uri){const u=s.options.manager.getHandler(a.uri);u!==null&&(c=u)}return this.detectSupport().then(function(u){if(u)return s.loadTextureImage(e,o.source,c);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return s.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class z2t{constructor(e){this.name=Rt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,s=n.bufferViews[e];if(s.extensions&&s.extensions[this.name]){const i=s.extensions[this.name],r=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const c=i.byteOffset||0,u=i.byteLength||0,d=i.count,h=i.byteStride,f=new Uint8Array(a,c,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,f,i.mode,i.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,f,i.mode,i.filter),m})})}else return null}}class H2t{constructor(e){this.name=Rt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,s=n.nodes[e];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const i=n.meshes[s.mesh];for(const u of i.primitives)if(u.mode!==os.TRIANGLES&&u.mode!==os.TRIANGLE_STRIP&&u.mode!==os.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=s.extensions[this.name].attributes,a=[],c={};for(const u in o)a.push(this.parser.getDependency("accessor",o[u]).then(d=>(c[u]=d,c[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(u=>{const d=u.pop(),h=d.isGroup?d.children:[d],f=u[0].count,m=[];for(const _ of h){const E=new xt,b=new ie,g=new Er,y=new ie(1,1,1),v=new $Mt(_.geometry,_.material,f);for(let S=0;S0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const nDt=new xt;class sDt{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new w2t,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,i=!1,r=-1;typeof navigator<"u"&&(s=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,r=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||s||i&&r<98?this.textureLoader=new BO(this.options.manager):this.textureLoader=new f2t(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new FO(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const s=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(o){const a={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:s,userData:{}};return Nr(r,a,i),sr(a,i),Promise.all(s._invokeAll(function(c){return c.afterRoot&&c.afterRoot(a)})).then(function(){e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],s=this.json.meshes||[];for(let i=0,r=n.length;i{const c=this.associations.get(o);c!=null&&this.associations.set(a,c);for(const[u,d]of o.children.entries())r(d,a.children[u])};return r(s,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let s=0;s=2&&b.setY(x,C[A*c+1]),c>=3&&b.setZ(x,C[A*c+2]),c>=4&&b.setW(x,C[A*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const n=this.json,s=this.options,r=n.textures[e].source,o=n.images[r];let a=this.textureLoader;if(o.uri){const c=s.manager.getHandler(o.uri);c!==null&&(a=c)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,n,s){const i=this,r=this.json,o=r.textures[e],a=r.images[n],c=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[c])return this.textureCache[c];const u=this.loadImageSource(n,s).then(function(d){d.flipY=!1,d.name=o.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(r.samplers||{})[o.sampler]||{};return d.magFilter=K1[f.magFilter]||zn,d.minFilter=K1[f.minFilter]||eo,d.wrapS=j1[f.wrapS]||da,d.wrapT=j1[f.wrapT]||da,i.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[c]=u,u}loadImageSource(e,n){const s=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const o=i.images[e],a=self.URL||self.webkitURL;let c=o.uri||"",u=!1;if(o.bufferView!==void 0)c=s.getDependency("bufferView",o.bufferView).then(function(h){u=!0;const f=new Blob([h],{type:o.mimeType});return c=a.createObjectURL(f),c});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(c).then(function(h){return new Promise(function(f,m){let _=f;n.isImageBitmapLoader===!0&&(_=function(E){const b=new xn(E);b.needsUpdate=!0,f(b)}),n.load(yl.resolveURL(h,r.path),_,void 0,m)})}).then(function(h){return u===!0&&a.revokeObjectURL(c),h.userData.mimeType=o.mimeType||tDt(o.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),h});return this.sourceCache[e]=d,d}assignTexture(e,n,s,i){const r=this;return this.getDependency("texture",s.index).then(function(o){if(!o)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(o=o.clone(),o.channel=s.texCoord),r.extensions[Rt.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[Rt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const c=r.associations.get(o);o=r.extensions[Rt.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,c)}}return i!==void 0&&(o.colorSpace=i),e[n]=o,o})}assignFinalMaterial(e){const n=e.geometry;let s=e.material;const i=n.attributes.tangent===void 0,r=n.attributes.color!==void 0,o=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+s.uuid;let c=this.cache.get(a);c||(c=new LO,Ls.prototype.copy.call(c,s),c.color.copy(s.color),c.map=s.map,c.sizeAttenuation=!1,this.cache.add(a,c)),s=c}else if(e.isLine){const a="LineBasicMaterial:"+s.uuid;let c=this.cache.get(a);c||(c=new kO,Ls.prototype.copy.call(c,s),c.color.copy(s.color),c.map=s.map,this.cache.add(a,c)),s=c}if(i||r||o){let a="ClonedMaterial:"+s.uuid+":";i&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let c=this.cache.get(a);c||(c=s.clone(),r&&(c.vertexColors=!0),o&&(c.flatShading=!0),i&&(c.normalScale&&(c.normalScale.y*=-1),c.clearcoatNormalScale&&(c.clearcoatNormalScale.y*=-1)),this.cache.add(a,c),this.associations.set(c,this.associations.get(s))),s=c}e.material=s}getMaterialType(){return PE}loadMaterial(e){const n=this,s=this.json,i=this.extensions,r=s.materials[e];let o;const a={},c=r.extensions||{},u=[];if(c[Rt.KHR_MATERIALS_UNLIT]){const h=i[Rt.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),u.push(h.extendParams(a,r,n))}else{const h=r.pbrMetallicRoughness||{};if(a.color=new pt(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const f=h.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],Cn),a.opacity=f[3]}h.baseColorTexture!==void 0&&u.push(n.assignTexture(a,"map",h.baseColorTexture,en)),a.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,a.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),u.push(n.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=$s);const d=r.alphaMode||Qm.OPAQUE;if(d===Qm.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===Qm.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==ar&&(u.push(n.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new At(1,1),r.normalTexture.scale!==void 0)){const h=r.normalTexture.scale;a.normalScale.set(h,h)}if(r.occlusionTexture!==void 0&&o!==ar&&(u.push(n.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==ar){const h=r.emissiveFactor;a.emissive=new pt().setRGB(h[0],h[1],h[2],Cn)}return r.emissiveTexture!==void 0&&o!==ar&&u.push(n.assignTexture(a,"emissiveMap",r.emissiveTexture,en)),Promise.all(u).then(function(){const h=new o(a);return r.name&&(h.name=r.name),sr(h,r),n.associations.set(h,{materials:e}),r.extensions&&Nr(i,h,r),h})}createUniqueName(e){const n=Bt.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,s=this.extensions,i=this.primitiveCache;function r(a){return s[Rt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(c){return Q1(c,a,n)})}const o=[];for(let a=0,c=e.length;a0&&J2t(g,r),g.name=n.createUniqueName(r.name||"mesh_"+e),sr(g,r),b.extensions&&Nr(i,g,b),n.assignFinalMaterial(g),h.push(g)}for(let m=0,_=h.length;m<_;m++)n.associations.set(h[m],{meshes:e,primitives:m});if(h.length===1)return r.extensions&&Nr(i,h[0],r),h[0];const f=new Vr;r.extensions&&Nr(i,f,r),n.associations.set(f,{meshes:e});for(let m=0,_=h.length;m<_;m++)f.add(h[m]);return f})}loadCamera(e){let n;const s=this.json.cameras[e],i=s[s.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?n=new Pn(DRt.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):s.type==="orthographic"&&(n=new IE(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),s.name&&(n.name=this.createUniqueName(s.name)),sr(n,s),Promise.resolve(n)}loadSkin(e){const n=this.json.skins[e],s=[];for(let i=0,r=n.joints.length;i1?d=new Vr:u.length===1?d=u[0]:d=new Jt,d!==u[0])for(let h=0,f=u.length;h{const h=new Map;for(const[f,m]of i.associations)(f instanceof Ls||f instanceof xn)&&h.set(f,m);return d.traverse(f=>{const m=i.associations.get(f);m!=null&&h.set(f,m)}),h};return i.associations=u(r),r})}_createAnimationTracks(e,n,s,i,r){const o=[],a=e.name?e.name:e.uuid,c=[];Ki[r.path]===Ki.weights?e.traverse(function(f){f.morphTargetInfluences&&c.push(f.name?f.name:f.uuid)}):c.push(a);let u;switch(Ki[r.path]){case Ki.weights:u=fa;break;case Ki.rotation:u=so;break;case Ki.position:case Ki.scale:u=ma;break;default:switch(s.itemSize){case 1:u=fa;break;case 2:case 3:default:u=ma;break}break}const d=i.interpolation!==void 0?Q2t[i.interpolation]:pa,h=this._getArrayFromAccessor(s);for(let f=0,m=c.length;f{Ge.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,qe.emit("stop_webcam_video_stream"),Fe(()=>{Ge.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ge.replace(),qe.on("video_stream_image",t=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},oDt=["src"],aDt=["src"],lDt={class:"controls"},cDt=l("i",{"data-feather":"video"},null,-1),dDt=[cDt],uDt=l("i",{"data-feather":"video"},null,-1),pDt=[uDt],_Dt={key:2};function hDt(t,e,n,s,i,r){return T(),w("div",{class:"floating-frame bg-white",style:$t({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=ae((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=ae((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[l("div",{class:"handle",onMousedown:e[0]||(e[0]=ae((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=ae((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),i.isVideoActive&&i.imageDataUrl!=null?(T(),w("img",{key:0,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,oDt)):G("",!0),i.isVideoActive&&i.imageDataUrl==null?(T(),w("p",{key:1,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,aDt)):G("",!0),l("div",lDt,[i.isVideoActive?G("",!0):(T(),w("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startVideoStream&&r.startVideoStream(...o))},dDt)),i.isVideoActive?(T(),w("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopVideoStream&&r.stopVideoStream(...o))},pDt)):G("",!0),i.isVideoActive?(T(),w("span",_Dt,"FPS: "+J(i.frameRate),1)):G("",!0)])],36)}const fDt=at(rDt,[["render",hDt]]);const mDt={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){qe.emit("start_audio_stream",()=>{this.isAudioActive=!0}),Fe(()=>{Ge.replace()})},stopAudioStream(){qe.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),Fe(()=>{Ge.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ge.replace(),qe.on("update_spectrogram",t=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},gDt=["src"],bDt={class:"controls"},EDt=l("i",{"data-feather":"mic"},null,-1),yDt=[EDt],vDt=l("i",{"data-feather":"mic"},null,-1),SDt=[vDt];function TDt(t,e,n,s,i,r){return T(),w("div",{class:"floating-frame bg-white",style:$t({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=ae((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=ae((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[l("div",{class:"handle",onMousedown:e[0]||(e[0]=ae((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=ae((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),i.isAudioActive&&i.imageDataUrl!=null?(T(),w("img",{key:0,src:i.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,gDt)):G("",!0),l("div",bDt,[i.isAudioActive?G("",!0):(T(),w("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startAudioStream&&r.startAudioStream(...o))},yDt)),i.isAudioActive?(T(),w("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopAudioStream&&r.stopAudioStream(...o))},SDt)):G("",!0)])],36)}const xDt=at(mDt,[["render",TDt]]);const CDt={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:fDt,AudioFrame:xDt},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),Fe(()=>{Ge.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new BMt,this.camera=new Pn(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new MO,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const t=new _r,e=new V1({color:65280});this.cube=new Un(t,e),this.scene.add(this.cube);const n=new h2t(4210752),s=new GO(16777215,.5);s.position.set(0,1,0),this.scene.add(n),this.scene.add(s),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:t,config:e}=this.$store.state;this.activePersonality=t[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(t){new C2t().load(t,n=>{this.scene.remove(this.cube),this.cube=n.scene,this.scene.add(this.cube)})},showBoxWithAvatar(t){this.cube&&this.scene.remove(this.cube);const e=new _r,n=new BO().load(t),s=new ar({map:n});this.cube=new Un(e,s),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const t=new _r,e=new V1({color:65280});this.cube=new Un(t,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},wDt={ref:"webglContainer"},RDt={class:"flex-col y-overflow 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"},ADt={key:0,class:"text-center"},NDt={key:1,class:"text-center"},ODt={class:"floating-frame2"},IDt=["innerHTML"];function MDt(t,e,n,s,i,r){const o=ct("VideoFrame"),a=ct("AudioFrame");return T(),w(Ve,null,[l("div",wDt,null,512),l("div",RDt,[!i.activePersonality||!i.activePersonality.scene_path?(T(),w("div",ADt," Personality does not have a 3d avatar. ")):G("",!0),!i.activePersonality||!i.activePersonality.avatar||i.activePersonality.avatar===""?(T(),w("div",NDt," Personality does not have an avatar. ")):G("",!0),l("div",ODt,[l("div",{innerHTML:t.htmlContent},null,8,IDt)])]),_e(o,{ref:"video_frame"},null,512),_e(a,{ref:"audio_frame"},null,512)],64)}const DDt=at(CDt,[["render",MDt]]);let id;const kDt=new Uint8Array(16);function LDt(){if(!id&&(id=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!id))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return id(kDt)}const yn=[];for(let t=0;t<256;++t)yn.push((t+256).toString(16).slice(1));function PDt(t,e=0){return yn[t[e+0]]+yn[t[e+1]]+yn[t[e+2]]+yn[t[e+3]]+"-"+yn[t[e+4]]+yn[t[e+5]]+"-"+yn[t[e+6]]+yn[t[e+7]]+"-"+yn[t[e+8]]+yn[t[e+9]]+"-"+yn[t[e+10]]+yn[t[e+11]]+yn[t[e+12]]+yn[t[e+13]]+yn[t[e+14]]+yn[t[e+15]]}const UDt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),X1={randomUUID:UDt};function Ri(t,e,n){if(X1.randomUUID&&!e&&!t)return X1.randomUUID();t=t||{};const s=t.random||(t.rng||LDt)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=s[i];return e}return PDt(s)}class jr{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,n){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. +}`;function PMt(t,e,n){let s=new NE;const i=new At,r=new At,o=new Yt,a=new MMt({depthPacking:gRt}),c=new DMt,u={},d=n.maxTextureSize,h={[Ii]:Yn,[Yn]:Ii,[$s]:$s},f=new no({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new At},radius:{value:4}},vertexShader:kMt,fragmentShader:LMt}),m=f.clone();m.defines.HORIZONTAL_PASS=1;const _=new li;_.setAttribute("position",new Bn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Un(_,f),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=tO;let g=this.type;this.render=function(R,C,A){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||R.length===0)return;const D=t.getRenderTarget(),x=t.getActiveCubeFace(),O=t.getActiveMipmapLevel(),B=t.state;B.setBlending(dr),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const z=g!==yi&&this.type===yi,Z=g===yi&&this.type!==yi;for(let M=0,q=R.length;Md||i.y>d)&&(i.x>d&&(r.x=Math.floor(d/$.x),i.x=r.x*$.x,P.mapSize.x=r.x),i.y>d&&(r.y=Math.floor(d/$.y),i.y=r.y*$.y,P.mapSize.y=r.y)),P.map===null||z===!0||Z===!0){const re=this.type!==yi?{minFilter:mn,magFilter:mn}:{};P.map!==null&&P.map.dispose(),P.map=new to(i.x,i.y,re),P.map.texture.name=H.name+".shadowMap",P.camera.updateProjectionMatrix()}t.setRenderTarget(P.map),t.clear();const ee=P.getViewportCount();for(let re=0;re0||C.map&&C.alphaTest>0){const B=x.uuid,z=C.uuid;let Z=u[B];Z===void 0&&(Z={},u[B]=Z);let M=Z[z];M===void 0&&(M=x.clone(),Z[z]=M),x=M}if(x.visible=C.visible,x.wireframe=C.wireframe,D===yi?x.side=C.shadowSide!==null?C.shadowSide:C.side:x.side=C.shadowSide!==null?C.shadowSide:h[C.side],x.alphaMap=C.alphaMap,x.alphaTest=C.alphaTest,x.map=C.map,x.clipShadows=C.clipShadows,x.clippingPlanes=C.clippingPlanes,x.clipIntersection=C.clipIntersection,x.displacementMap=C.displacementMap,x.displacementScale=C.displacementScale,x.displacementBias=C.displacementBias,x.wireframeLinewidth=C.wireframeLinewidth,x.linewidth=C.linewidth,A.isPointLight===!0&&x.isMeshDistanceMaterial===!0){const B=t.properties.get(x);B.light=A}return x}function S(R,C,A,D,x){if(R.visible===!1)return;if(R.layers.test(C.layers)&&(R.isMesh||R.isLine||R.isPoints)&&(R.castShadow||R.receiveShadow&&x===yi)&&(!R.frustumCulled||s.intersectsObject(R))){R.modelViewMatrix.multiplyMatrices(A.matrixWorldInverse,R.matrixWorld);const z=e.update(R),Z=R.material;if(Array.isArray(Z)){const M=z.groups;for(let q=0,H=M.length;q=1):re.indexOf("OpenGL ES")!==-1&&(ee=parseFloat(/^OpenGL ES (\d)/.exec(re)[1]),$=ee>=2);let me=null,Se={};const le=t.getParameter(t.SCISSOR_BOX),Ee=t.getParameter(t.VIEWPORT),Oe=new Yt().fromArray(le),Me=new Yt().fromArray(Ee);function j(X,je,Be,Ne){const ze=new Uint8Array(4),ot=t.createTexture();t.bindTexture(X,ot),t.texParameteri(X,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(X,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Nt=0;Nt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),_=new WeakMap;let E;const b=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(L,I){return g?new OffscreenCanvas(L,I):Gl("canvas")}function v(L,I,W,ye){let K=1;if((L.width>ye||L.height>ye)&&(K=ye/Math.max(L.width,L.height)),K<1||I===!0)if(typeof HTMLImageElement<"u"&&L instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&L instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&L instanceof ImageBitmap){const te=I?Zd:Math.floor,Re=te(K*L.width),xe=te(K*L.height);E===void 0&&(E=y(Re,xe));const Le=W?y(Re,xe):E;return Le.width=Re,Le.height=xe,Le.getContext("2d").drawImage(L,0,0,Re,xe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+L.width+"x"+L.height+") to ("+Re+"x"+xe+")."),Le}else return"data"in L&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+L.width+"x"+L.height+")."),L;return L}function S(L){return Hg(L.width)&&Hg(L.height)}function R(L){return a?!1:L.wrapS!==ls||L.wrapT!==ls||L.minFilter!==mn&&L.minFilter!==zn}function C(L,I){return L.generateMipmaps&&I&&L.minFilter!==mn&&L.minFilter!==zn}function A(L){t.generateMipmap(L)}function D(L,I,W,ye,K=!1){if(a===!1)return I;if(L!==null){if(t[L]!==void 0)return t[L];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+L+"'")}let te=I;if(I===t.RED&&(W===t.FLOAT&&(te=t.R32F),W===t.HALF_FLOAT&&(te=t.R16F),W===t.UNSIGNED_BYTE&&(te=t.R8)),I===t.RED_INTEGER&&(W===t.UNSIGNED_BYTE&&(te=t.R8UI),W===t.UNSIGNED_SHORT&&(te=t.R16UI),W===t.UNSIGNED_INT&&(te=t.R32UI),W===t.BYTE&&(te=t.R8I),W===t.SHORT&&(te=t.R16I),W===t.INT&&(te=t.R32I)),I===t.RG&&(W===t.FLOAT&&(te=t.RG32F),W===t.HALF_FLOAT&&(te=t.RG16F),W===t.UNSIGNED_BYTE&&(te=t.RG8)),I===t.RGBA){const Re=K?Kd:Ut.getTransfer(ye);W===t.FLOAT&&(te=t.RGBA32F),W===t.HALF_FLOAT&&(te=t.RGBA16F),W===t.UNSIGNED_BYTE&&(te=Re===Kt?t.SRGB8_ALPHA8:t.RGBA8),W===t.UNSIGNED_SHORT_4_4_4_4&&(te=t.RGBA4),W===t.UNSIGNED_SHORT_5_5_5_1&&(te=t.RGB5_A1)}return(te===t.R16F||te===t.R32F||te===t.RG16F||te===t.RG32F||te===t.RGBA16F||te===t.RGBA32F)&&e.get("EXT_color_buffer_float"),te}function x(L,I,W){return C(L,W)===!0||L.isFramebufferTexture&&L.minFilter!==mn&&L.minFilter!==zn?Math.log2(Math.max(I.width,I.height))+1:L.mipmaps!==void 0&&L.mipmaps.length>0?L.mipmaps.length:L.isCompressedTexture&&Array.isArray(L.image)?I.mipmaps.length:1}function O(L){return L===mn||L===Bg||L===bd?t.NEAREST:t.LINEAR}function B(L){const I=L.target;I.removeEventListener("dispose",B),Z(I),I.isVideoTexture&&_.delete(I)}function z(L){const I=L.target;I.removeEventListener("dispose",z),q(I)}function Z(L){const I=s.get(L);if(I.__webglInit===void 0)return;const W=L.source,ye=b.get(W);if(ye){const K=ye[I.__cacheKey];K.usedTimes--,K.usedTimes===0&&M(L),Object.keys(ye).length===0&&b.delete(W)}s.remove(L)}function M(L){const I=s.get(L);t.deleteTexture(I.__webglTexture);const W=L.source,ye=b.get(W);delete ye[I.__cacheKey],o.memory.textures--}function q(L){const I=L.texture,W=s.get(L),ye=s.get(I);if(ye.__webglTexture!==void 0&&(t.deleteTexture(ye.__webglTexture),o.memory.textures--),L.depthTexture&&L.depthTexture.dispose(),L.isWebGLCubeRenderTarget)for(let K=0;K<6;K++){if(Array.isArray(W.__webglFramebuffer[K]))for(let te=0;te=c&&console.warn("THREE.WebGLTextures: Trying to use "+L+" texture units while this GPU supports only "+c),H+=1,L}function ee(L){const I=[];return I.push(L.wrapS),I.push(L.wrapT),I.push(L.wrapR||0),I.push(L.magFilter),I.push(L.minFilter),I.push(L.anisotropy),I.push(L.internalFormat),I.push(L.format),I.push(L.type),I.push(L.generateMipmaps),I.push(L.premultiplyAlpha),I.push(L.flipY),I.push(L.unpackAlignment),I.push(L.colorSpace),I.join()}function re(L,I){const W=s.get(L);if(L.isVideoTexture&&ge(L),L.isRenderTargetTexture===!1&&L.version>0&&W.__version!==L.version){const ye=L.image;if(ye===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ye.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{pe(W,L,I);return}}n.bindTexture(t.TEXTURE_2D,W.__webglTexture,t.TEXTURE0+I)}function me(L,I){const W=s.get(L);if(L.version>0&&W.__version!==L.version){pe(W,L,I);return}n.bindTexture(t.TEXTURE_2D_ARRAY,W.__webglTexture,t.TEXTURE0+I)}function Se(L,I){const W=s.get(L);if(L.version>0&&W.__version!==L.version){pe(W,L,I);return}n.bindTexture(t.TEXTURE_3D,W.__webglTexture,t.TEXTURE0+I)}function le(L,I){const W=s.get(L);if(L.version>0&&W.__version!==L.version){Ce(W,L,I);return}n.bindTexture(t.TEXTURE_CUBE_MAP,W.__webglTexture,t.TEXTURE0+I)}const Ee={[da]:t.REPEAT,[ls]:t.CLAMP_TO_EDGE,[Wd]:t.MIRRORED_REPEAT},Oe={[mn]:t.NEAREST,[Bg]:t.NEAREST_MIPMAP_NEAREST,[bd]:t.NEAREST_MIPMAP_LINEAR,[zn]:t.LINEAR,[sO]:t.LINEAR_MIPMAP_NEAREST,[eo]:t.LINEAR_MIPMAP_LINEAR},Me={[ERt]:t.NEVER,[CRt]:t.ALWAYS,[yRt]:t.LESS,[_O]:t.LEQUAL,[vRt]:t.EQUAL,[xRt]:t.GEQUAL,[SRt]:t.GREATER,[TRt]:t.NOTEQUAL};function j(L,I,W){if(W?(t.texParameteri(L,t.TEXTURE_WRAP_S,Ee[I.wrapS]),t.texParameteri(L,t.TEXTURE_WRAP_T,Ee[I.wrapT]),(L===t.TEXTURE_3D||L===t.TEXTURE_2D_ARRAY)&&t.texParameteri(L,t.TEXTURE_WRAP_R,Ee[I.wrapR]),t.texParameteri(L,t.TEXTURE_MAG_FILTER,Oe[I.magFilter]),t.texParameteri(L,t.TEXTURE_MIN_FILTER,Oe[I.minFilter])):(t.texParameteri(L,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(L,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(L===t.TEXTURE_3D||L===t.TEXTURE_2D_ARRAY)&&t.texParameteri(L,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(I.wrapS!==ls||I.wrapT!==ls)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(L,t.TEXTURE_MAG_FILTER,O(I.magFilter)),t.texParameteri(L,t.TEXTURE_MIN_FILTER,O(I.minFilter)),I.minFilter!==mn&&I.minFilter!==zn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),I.compareFunction&&(t.texParameteri(L,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(L,t.TEXTURE_COMPARE_FUNC,Me[I.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ye=e.get("EXT_texture_filter_anisotropic");if(I.magFilter===mn||I.minFilter!==bd&&I.minFilter!==eo||I.type===Ti&&e.has("OES_texture_float_linear")===!1||a===!1&&I.type===Fl&&e.has("OES_texture_half_float_linear")===!1)return;(I.anisotropy>1||s.get(I).__currentAnisotropy)&&(t.texParameterf(L,ye.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,i.getMaxAnisotropy())),s.get(I).__currentAnisotropy=I.anisotropy)}}function he(L,I){let W=!1;L.__webglInit===void 0&&(L.__webglInit=!0,I.addEventListener("dispose",B));const ye=I.source;let K=b.get(ye);K===void 0&&(K={},b.set(ye,K));const te=ee(I);if(te!==L.__cacheKey){K[te]===void 0&&(K[te]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,W=!0),K[te].usedTimes++;const Re=K[L.__cacheKey];Re!==void 0&&(K[L.__cacheKey].usedTimes--,Re.usedTimes===0&&M(I)),L.__cacheKey=te,L.__webglTexture=K[te].texture}return W}function pe(L,I,W){let ye=t.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(ye=t.TEXTURE_2D_ARRAY),I.isData3DTexture&&(ye=t.TEXTURE_3D);const K=he(L,I),te=I.source;n.bindTexture(ye,L.__webglTexture,t.TEXTURE0+W);const Re=s.get(te);if(te.version!==Re.__version||K===!0){n.activeTexture(t.TEXTURE0+W);const xe=Ut.getPrimaries(Ut.workingColorSpace),Le=I.colorSpace===ds?null:Ut.getPrimaries(I.colorSpace),Ze=I.colorSpace===ds||xe===Le?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,I.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,I.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ze);const ft=R(I)&&S(I.image)===!1;let Pe=v(I.image,ft,!1,d);Pe=De(I,Pe);const ut=S(Pe)||a,nt=r.convert(I.format,I.colorSpace);let $e=r.convert(I.type),tt=D(I.internalFormat,nt,$e,I.colorSpace,I.isVideoTexture);j(ye,I,ut);let Ke;const Et=I.mipmaps,X=a&&I.isVideoTexture!==!0&&tt!==dO,je=Re.__version===void 0||K===!0,Be=x(I,Pe,ut);if(I.isDepthTexture)tt=t.DEPTH_COMPONENT,a?I.type===Ti?tt=t.DEPTH_COMPONENT32F:I.type===or?tt=t.DEPTH_COMPONENT24:I.type===$r?tt=t.DEPTH24_STENCIL8:tt=t.DEPTH_COMPONENT16:I.type===Ti&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),I.format===Wr&&tt===t.DEPTH_COMPONENT&&I.type!==CE&&I.type!==or&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),I.type=or,$e=r.convert(I.type)),I.format===ua&&tt===t.DEPTH_COMPONENT&&(tt=t.DEPTH_STENCIL,I.type!==$r&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),I.type=$r,$e=r.convert(I.type))),je&&(X?n.texStorage2D(t.TEXTURE_2D,1,tt,Pe.width,Pe.height):n.texImage2D(t.TEXTURE_2D,0,tt,Pe.width,Pe.height,0,nt,$e,null));else if(I.isDataTexture)if(Et.length>0&&ut){X&&je&&n.texStorage2D(t.TEXTURE_2D,Be,tt,Et[0].width,Et[0].height);for(let Ne=0,ze=Et.length;Ne>=1,ze>>=1}}else if(Et.length>0&&ut){X&&je&&n.texStorage2D(t.TEXTURE_2D,Be,tt,Et[0].width,Et[0].height);for(let Ne=0,ze=Et.length;Ne0&&je++,n.texStorage2D(t.TEXTURE_CUBE_MAP,je,Ke,Pe[0].width,Pe[0].height));for(let Ne=0;Ne<6;Ne++)if(ft){Et?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,0,0,Pe[Ne].width,Pe[Ne].height,$e,tt,Pe[Ne].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Ne,0,Ke,Pe[Ne].width,Pe[Ne].height,0,$e,tt,Pe[Ne].data);for(let ze=0;ze>te),Pe=Math.max(1,I.height>>te);K===t.TEXTURE_3D||K===t.TEXTURE_2D_ARRAY?n.texImage3D(K,te,Le,ft,Pe,I.depth,0,Re,xe,null):n.texImage2D(K,te,Le,ft,Pe,0,Re,xe,null)}n.bindFramebuffer(t.FRAMEBUFFER,L),we(I)?f.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ye,K,s.get(W).__webglTexture,0,ne(I)):(K===t.TEXTURE_2D||K>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&K<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ye,K,s.get(W).__webglTexture,te),n.bindFramebuffer(t.FRAMEBUFFER,null)}function N(L,I,W){if(t.bindRenderbuffer(t.RENDERBUFFER,L),I.depthBuffer&&!I.stencilBuffer){let ye=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(W||we(I)){const K=I.depthTexture;K&&K.isDepthTexture&&(K.type===Ti?ye=t.DEPTH_COMPONENT32F:K.type===or&&(ye=t.DEPTH_COMPONENT24));const te=ne(I);we(I)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,te,ye,I.width,I.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,te,ye,I.width,I.height)}else t.renderbufferStorage(t.RENDERBUFFER,ye,I.width,I.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,L)}else if(I.depthBuffer&&I.stencilBuffer){const ye=ne(I);W&&we(I)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ye,t.DEPTH24_STENCIL8,I.width,I.height):we(I)?f.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ye,t.DEPTH24_STENCIL8,I.width,I.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,I.width,I.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,L)}else{const ye=I.isWebGLMultipleRenderTargets===!0?I.texture:[I.texture];for(let K=0;K0){W.__webglFramebuffer[xe]=[];for(let Le=0;Le0){W.__webglFramebuffer=[];for(let xe=0;xe0&&we(L)===!1){const xe=te?I:[I];W.__webglMultisampledFramebuffer=t.createFramebuffer(),W.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,W.__webglMultisampledFramebuffer);for(let Le=0;Le0)for(let Le=0;Le0)for(let Le=0;Le0&&we(L)===!1){const I=L.isWebGLMultipleRenderTargets?L.texture:[L.texture],W=L.width,ye=L.height;let K=t.COLOR_BUFFER_BIT;const te=[],Re=L.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,xe=s.get(L),Le=L.isWebGLMultipleRenderTargets===!0;if(Le)for(let Ze=0;Ze0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function ge(L){const I=o.render.frame;_.get(L)!==I&&(_.set(L,I),L.update())}function De(L,I){const W=L.colorSpace,ye=L.format,K=L.type;return L.isCompressedTexture===!0||L.isVideoTexture===!0||L.format===zg||W!==Cn&&W!==ds&&(Ut.getTransfer(W)===Kt?a===!1?e.has("EXT_sRGB")===!0&&ye===cs?(L.format=zg,L.minFilter=zn,L.generateMipmaps=!1):I=fO.sRGBToLinear(I):(ye!==cs||K!==pr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",W)),I}this.allocateTextureUnit=$,this.resetTextureUnits=P,this.setTexture2D=re,this.setTexture2DArray=me,this.setTexture3D=Se,this.setTextureCube=le,this.rebindTextures=oe,this.setupRenderTarget=se,this.updateRenderTargetMipmap=Te,this.updateMultisampleRenderTarget=Ae,this.setupDepthRenderbuffer=Y,this.setupFrameBufferTexture=ke,this.useMultisampledRTT=we}function BMt(t,e,n){const s=n.isWebGL2;function i(r,o=ds){let a;const c=Ut.getTransfer(o);if(r===pr)return t.UNSIGNED_BYTE;if(r===rO)return t.UNSIGNED_SHORT_4_4_4_4;if(r===oO)return t.UNSIGNED_SHORT_5_5_5_1;if(r===oRt)return t.BYTE;if(r===aRt)return t.SHORT;if(r===CE)return t.UNSIGNED_SHORT;if(r===iO)return t.INT;if(r===or)return t.UNSIGNED_INT;if(r===Ti)return t.FLOAT;if(r===Fl)return s?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(r===lRt)return t.ALPHA;if(r===cs)return t.RGBA;if(r===cRt)return t.LUMINANCE;if(r===dRt)return t.LUMINANCE_ALPHA;if(r===Wr)return t.DEPTH_COMPONENT;if(r===ua)return t.DEPTH_STENCIL;if(r===zg)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(r===uRt)return t.RED;if(r===aO)return t.RED_INTEGER;if(r===pRt)return t.RG;if(r===lO)return t.RG_INTEGER;if(r===cO)return t.RGBA_INTEGER;if(r===fm||r===mm||r===gm||r===bm)if(c===Kt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===fm)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===mm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===gm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===bm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===fm)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===mm)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===gm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===bm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===uC||r===pC||r===_C||r===hC)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===uC)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===pC)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===_C)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===hC)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===dO)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===fC||r===mC)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===fC)return c===Kt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===mC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===gC||r===bC||r===EC||r===yC||r===vC||r===SC||r===TC||r===xC||r===CC||r===wC||r===RC||r===AC||r===NC||r===OC)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===gC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===bC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===EC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===yC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===vC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===SC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===TC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===xC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===CC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===wC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===RC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===AC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===NC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===OC)return c===Kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Em||r===IC||r===MC)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===Em)return c===Kt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===IC)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===MC)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===_Rt||r===DC||r===kC||r===LC)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===Em)return a.COMPRESSED_RED_RGTC1_EXT;if(r===DC)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===kC)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===LC)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===$r?s?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[r]!==void 0?t[r]:null}return{convert:i}}class GMt extends Pn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Vr extends Jt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const VMt={type:"move"};class Hm{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Vr,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Vr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ie,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ie),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Vr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ie,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ie),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const s of e.hand.values())this._getHandJoint(n,s)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,s){let i=null,r=null,o=null;const a=this._targetRay,c=this._grip,u=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const E of e.hand.values()){const b=n.getJointPose(E,s),g=this._getHandJoint(u,E);b!==null&&(g.matrix.fromArray(b.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=b.radius),g.visible=b!==null}const d=u.joints["index-finger-tip"],h=u.joints["thumb-tip"],f=d.position.distanceTo(h.position),m=.02,_=.005;u.inputState.pinching&&f>m+_?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&f<=m-_&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=n.getPose(e.gripSpace,s),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,s),i===null&&r!==null&&(i=r),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(VMt)))}return a!==null&&(a.visible=i!==null),c!==null&&(c.visible=r!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const s=new Vr;s.matrixAutoUpdate=!1,s.visible=!1,e.joints[n.jointName]=s,e.add(s)}return e.joints[n.jointName]}}class zMt extends Da{constructor(e,n){super();const s=this;let i=null,r=1,o=null,a="local-floor",c=1,u=null,d=null,h=null,f=null,m=null,_=null;const E=n.getContextAttributes();let b=null,g=null;const y=[],v=[],S=new At;let R=null;const C=new Pn;C.layers.enable(1),C.viewport=new Yt;const A=new Pn;A.layers.enable(2),A.viewport=new Yt;const D=[C,A],x=new GMt;x.layers.enable(1),x.layers.enable(2);let O=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let Ee=y[le];return Ee===void 0&&(Ee=new Hm,y[le]=Ee),Ee.getTargetRaySpace()},this.getControllerGrip=function(le){let Ee=y[le];return Ee===void 0&&(Ee=new Hm,y[le]=Ee),Ee.getGripSpace()},this.getHand=function(le){let Ee=y[le];return Ee===void 0&&(Ee=new Hm,y[le]=Ee),Ee.getHandSpace()};function z(le){const Ee=v.indexOf(le.inputSource);if(Ee===-1)return;const Oe=y[Ee];Oe!==void 0&&(Oe.update(le.inputSource,le.frame,u||o),Oe.dispatchEvent({type:le.type,data:le.inputSource}))}function Z(){i.removeEventListener("select",z),i.removeEventListener("selectstart",z),i.removeEventListener("selectend",z),i.removeEventListener("squeeze",z),i.removeEventListener("squeezestart",z),i.removeEventListener("squeezeend",z),i.removeEventListener("end",Z),i.removeEventListener("inputsourceschange",M);for(let le=0;le=0&&(v[Me]=null,y[Me].disconnect(Oe))}for(let Ee=0;Ee=v.length){v.push(Oe),Me=he;break}else if(v[he]===null){v[he]=Oe,Me=he;break}if(Me===-1)break}const j=y[Me];j&&j.connect(Oe)}}const q=new ie,H=new ie;function P(le,Ee,Oe){q.setFromMatrixPosition(Ee.matrixWorld),H.setFromMatrixPosition(Oe.matrixWorld);const Me=q.distanceTo(H),j=Ee.projectionMatrix.elements,he=Oe.projectionMatrix.elements,pe=j[14]/(j[10]-1),Ce=j[14]/(j[10]+1),ke=(j[9]+1)/j[5],N=(j[9]-1)/j[5],V=(j[8]-1)/j[0],Y=(he[8]+1)/he[0],oe=pe*V,se=pe*Y,Te=Me/(-V+Y),Ae=Te*-V;Ee.matrixWorld.decompose(le.position,le.quaternion,le.scale),le.translateX(Ae),le.translateZ(Te),le.matrixWorld.compose(le.position,le.quaternion,le.scale),le.matrixWorldInverse.copy(le.matrixWorld).invert();const ne=pe+Te,we=Ce+Te,ge=oe-Ae,De=se+(Me-Ae),L=ke*Ce/we*ne,I=N*Ce/we*ne;le.projectionMatrix.makePerspective(ge,De,L,I,ne,we),le.projectionMatrixInverse.copy(le.projectionMatrix).invert()}function $(le,Ee){Ee===null?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(Ee.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(i===null)return;x.near=A.near=C.near=le.near,x.far=A.far=C.far=le.far,(O!==x.near||B!==x.far)&&(i.updateRenderState({depthNear:x.near,depthFar:x.far}),O=x.near,B=x.far);const Ee=le.parent,Oe=x.cameras;$(x,Ee);for(let Me=0;Me0&&(b.alphaTest.value=g.alphaTest);const y=e.get(g).envMap;if(y&&(b.envMap.value=y,b.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=g.reflectivity,b.ior.value=g.ior,b.refractionRatio.value=g.refractionRatio),g.lightMap){b.lightMap.value=g.lightMap;const v=t._useLegacyLights===!0?Math.PI:1;b.lightMapIntensity.value=g.lightMapIntensity*v,n(g.lightMap,b.lightMapTransform)}g.aoMap&&(b.aoMap.value=g.aoMap,b.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,b.aoMapTransform))}function o(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform))}function a(b,g){b.dashSize.value=g.dashSize,b.totalSize.value=g.dashSize+g.gapSize,b.scale.value=g.scale}function c(b,g,y,v){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.size.value=g.size*y,b.scale.value=v*.5,g.map&&(b.map.value=g.map,n(g.map,b.uvTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function u(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.rotation.value=g.rotation,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function d(b,g){b.specular.value.copy(g.specular),b.shininess.value=Math.max(g.shininess,1e-4)}function h(b,g){g.gradientMap&&(b.gradientMap.value=g.gradientMap)}function f(b,g){b.metalness.value=g.metalness,g.metalnessMap&&(b.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,b.metalnessMapTransform)),b.roughness.value=g.roughness,g.roughnessMap&&(b.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,b.roughnessMapTransform)),e.get(g).envMap&&(b.envMapIntensity.value=g.envMapIntensity)}function m(b,g,y){b.ior.value=g.ior,g.sheen>0&&(b.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),b.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(b.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,b.sheenColorMapTransform)),g.sheenRoughnessMap&&(b.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,b.sheenRoughnessMapTransform))),g.clearcoat>0&&(b.clearcoat.value=g.clearcoat,b.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(b.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,b.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(b.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Yn&&b.clearcoatNormalScale.value.negate())),g.iridescence>0&&(b.iridescence.value=g.iridescence,b.iridescenceIOR.value=g.iridescenceIOR,b.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(b.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,b.iridescenceMapTransform)),g.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),g.transmission>0&&(b.transmission.value=g.transmission,b.transmissionSamplerMap.value=y.texture,b.transmissionSamplerSize.value.set(y.width,y.height),g.transmissionMap&&(b.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,b.transmissionMapTransform)),b.thickness.value=g.thickness,g.thicknessMap&&(b.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=g.attenuationDistance,b.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(b.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(b.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=g.specularIntensity,b.specularColor.value.copy(g.specularColor),g.specularColorMap&&(b.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,b.specularColorMapTransform)),g.specularIntensityMap&&(b.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,b.specularIntensityMapTransform))}function _(b,g){g.matcap&&(b.matcap.value=g.matcap)}function E(b,g){const y=e.get(g).light;b.referencePosition.value.setFromMatrixPosition(y.matrixWorld),b.nearDistance.value=y.shadow.camera.near,b.farDistance.value=y.shadow.camera.far}return{refreshFogUniforms:s,refreshMaterialUniforms:i}}function qMt(t,e,n,s){let i={},r={},o=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function c(y,v){const S=v.program;s.uniformBlockBinding(y,S)}function u(y,v){let S=i[y.id];S===void 0&&(_(y),S=d(y),i[y.id]=S,y.addEventListener("dispose",b));const R=v.program;s.updateUBOMapping(y,R);const C=e.render.frame;r[y.id]!==C&&(f(y),r[y.id]=C)}function d(y){const v=h();y.__bindingPointIndex=v;const S=t.createBuffer(),R=y.__size,C=y.usage;return t.bindBuffer(t.UNIFORM_BUFFER,S),t.bufferData(t.UNIFORM_BUFFER,R,C),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,v,S),S}function h(){for(let y=0;y0){C=S%R;const z=R-C;C!==0&&z-O.boundary<0&&(S+=R-C,x.__offset=S)}S+=O.storage}return C=S%R,C>0&&(S+=R-C),y.__size=S,y.__cache={},this}function E(y){const v={boundary:0,storage:0};return typeof y=="number"?(v.boundary=4,v.storage=4):y.isVector2?(v.boundary=8,v.storage=8):y.isVector3||y.isColor?(v.boundary=16,v.storage=12):y.isVector4?(v.boundary=16,v.storage=16):y.isMatrix3?(v.boundary=48,v.storage=48):y.isMatrix4?(v.boundary=64,v.storage=64):y.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",y),v}function b(y){const v=y.target;v.removeEventListener("dispose",b);const S=o.indexOf(v.__bindingPointIndex);o.splice(S,1),t.deleteBuffer(i[v.id]),delete i[v.id],delete r[v.id]}function g(){for(const y in i)t.deleteBuffer(i[y]);o=[],i={},r={}}return{bind:c,update:u,dispose:g}}class MO{constructor(e={}){const{canvas:n=VRt(),context:s=null,depth:i=!0,stencil:r=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:u=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:h=!1}=e;this.isWebGLRenderer=!0;let f;s!==null?f=s.getContextAttributes().alpha:f=o;const m=new Uint32Array(4),_=new Int32Array(4);let E=null,b=null;const g=[],y=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=en,this._useLegacyLights=!1,this.toneMapping=ur,this.toneMappingExposure=1;const v=this;let S=!1,R=0,C=0,A=null,D=-1,x=null;const O=new Yt,B=new Yt;let z=null;const Z=new pt(0);let M=0,q=n.width,H=n.height,P=1,$=null,ee=null;const re=new Yt(0,0,q,H),me=new Yt(0,0,q,H);let Se=!1;const le=new NE;let Ee=!1,Oe=!1,Me=null;const j=new xt,he=new At,pe=new ie,Ce={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ke(){return A===null?P:1}let N=s;function V(F,ce){for(let be=0;be{function Qe(){if(ve.forEach(function(st){Ae.get(st).currentProgram.isReady()&&ve.delete(st)}),ve.size===0){fe(F);return}setTimeout(Qe,10)}Y.get("KHR_parallel_shader_compile")!==null?Qe():setTimeout(Qe,10)})};let Nt=null;function sn(F){Nt&&Nt(F)}function bn(){En.stop()}function Gt(){En.start()}const En=new CO;En.setAnimationLoop(sn),typeof self<"u"&&En.setContext(self),this.setAnimationLoop=function(F){Nt=F,Ke.setAnimationLoop(F),F===null?En.stop():En.start()},Ke.addEventListener("sessionstart",bn),Ke.addEventListener("sessionend",Gt),this.render=function(F,ce){if(ce!==void 0&&ce.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),ce.parent===null&&ce.matrixWorldAutoUpdate===!0&&ce.updateMatrixWorld(),Ke.enabled===!0&&Ke.isPresenting===!0&&(Ke.cameraAutoUpdate===!0&&Ke.updateCamera(ce),ce=Ke.getCamera()),F.isScene===!0&&F.onBeforeRender(v,F,ce,A),b=te.get(F,y.length),b.init(),y.push(b),j.multiplyMatrices(ce.projectionMatrix,ce.matrixWorldInverse),le.setFromProjectionMatrix(j),Oe=this.localClippingEnabled,Ee=Re.init(this.clippingPlanes,Oe),E=K.get(F,g.length),E.init(),g.push(E),ns(F,ce,0,v.sortObjects),E.finish(),v.sortObjects===!0&&E.sort($,ee),this.info.render.frame++,Ee===!0&&Re.beginShadows();const be=b.state.shadowsArray;if(xe.render(be,F,ce),Ee===!0&&Re.endShadows(),this.info.autoReset===!0&&this.info.reset(),Le.render(E,F),b.setupLights(v._useLegacyLights),ce.isArrayCamera){const ve=ce.cameras;for(let fe=0,Qe=ve.length;fe0?b=y[y.length-1]:b=null,g.pop(),g.length>0?E=g[g.length-1]:E=null};function ns(F,ce,be,ve){if(F.visible===!1)return;if(F.layers.test(ce.layers)){if(F.isGroup)be=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(ce);else if(F.isLight)b.pushLight(F),F.castShadow&&b.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||le.intersectsSprite(F)){ve&&pe.setFromMatrixPosition(F.matrixWorld).applyMatrix4(j);const st=I.update(F),rt=F.material;rt.visible&&E.push(F,st,rt,be,pe.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||le.intersectsObject(F))){const st=I.update(F),rt=F.material;if(ve&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),pe.copy(F.boundingSphere.center)):(st.boundingSphere===null&&st.computeBoundingSphere(),pe.copy(st.boundingSphere.center)),pe.applyMatrix4(F.matrixWorld).applyMatrix4(j)),Array.isArray(rt)){const lt=st.groups;for(let bt=0,_t=lt.length;bt<_t;bt++){const mt=lt[bt],Zt=rt[mt.materialIndex];Zt&&Zt.visible&&E.push(F,st,Zt,be,pe.z,mt)}}else rt.visible&&E.push(F,st,rt,be,pe.z,null)}}const Qe=F.children;for(let st=0,rt=Qe.length;st0&&Xu(fe,Qe,ce,be),ve&&se.viewport(O.copy(ve)),fe.length>0&&ao(fe,ce,be),Qe.length>0&&ao(Qe,ce,be),st.length>0&&ao(st,ce,be),se.buffers.depth.setTest(!0),se.buffers.depth.setMask(!0),se.buffers.color.setMask(!0),se.setPolygonOffset(!1)}function Xu(F,ce,be,ve){if((be.isScene===!0?be.overrideMaterial:null)!==null)return;const Qe=oe.isWebGL2;Me===null&&(Me=new to(1,1,{generateMipmaps:!0,type:Y.has("EXT_color_buffer_half_float")?Fl:pr,minFilter:eo,samples:Qe?4:0})),v.getDrawingBufferSize(he),Qe?Me.setSize(he.x,he.y):Me.setSize(Zd(he.x),Zd(he.y));const st=v.getRenderTarget();v.setRenderTarget(Me),v.getClearColor(Z),M=v.getClearAlpha(),M<1&&v.setClearColor(16777215,.5),v.clear();const rt=v.toneMapping;v.toneMapping=ur,ao(F,be,ve),ne.updateMultisampleRenderTarget(Me),ne.updateRenderTargetMipmap(Me);let lt=!1;for(let bt=0,_t=ce.length;bt<_t;bt++){const mt=ce[bt],Zt=mt.object,Mn=mt.geometry,rn=mt.material,Ts=mt.group;if(rn.side===$s&&Zt.layers.test(ve.layers)){const Wt=rn.side;rn.side=Yn,rn.needsUpdate=!0,ic(Zt,be,ve,Mn,rn,Ts),rn.side=Wt,rn.needsUpdate=!0,lt=!0}}lt===!0&&(ne.updateMultisampleRenderTarget(Me),ne.updateRenderTargetMipmap(Me)),v.setRenderTarget(st),v.setClearColor(Z,M),v.toneMapping=rt}function ao(F,ce,be){const ve=ce.isScene===!0?ce.overrideMaterial:null;for(let fe=0,Qe=F.length;fe0),mt=!!be.morphAttributes.position,Zt=!!be.morphAttributes.normal,Mn=!!be.morphAttributes.color;let rn=ur;ve.toneMapped&&(A===null||A.isXRRenderTarget===!0)&&(rn=v.toneMapping);const Ts=be.morphAttributes.position||be.morphAttributes.normal||be.morphAttributes.color,Wt=Ts!==void 0?Ts.length:0,yt=Ae.get(ve),Ba=b.state.lights;if(Ee===!0&&(Oe===!0||F!==x)){const Gn=F===x&&ve.id===D;Re.setState(ve,F,Gn)}let Qt=!1;ve.version===yt.__version?(yt.needsLights&&yt.lightsStateVersion!==Ba.state.version||yt.outputColorSpace!==rt||fe.isBatchedMesh&&yt.batching===!1||!fe.isBatchedMesh&&yt.batching===!0||fe.isInstancedMesh&&yt.instancing===!1||!fe.isInstancedMesh&&yt.instancing===!0||fe.isSkinnedMesh&&yt.skinning===!1||!fe.isSkinnedMesh&&yt.skinning===!0||fe.isInstancedMesh&&yt.instancingColor===!0&&fe.instanceColor===null||fe.isInstancedMesh&&yt.instancingColor===!1&&fe.instanceColor!==null||yt.envMap!==lt||ve.fog===!0&&yt.fog!==Qe||yt.numClippingPlanes!==void 0&&(yt.numClippingPlanes!==Re.numPlanes||yt.numIntersection!==Re.numIntersection)||yt.vertexAlphas!==bt||yt.vertexTangents!==_t||yt.morphTargets!==mt||yt.morphNormals!==Zt||yt.morphColors!==Mn||yt.toneMapping!==rn||oe.isWebGL2===!0&&yt.morphTargetsCount!==Wt)&&(Qt=!0):(Qt=!0,yt.__version=ve.version);let di=yt.currentProgram;Qt===!0&&(di=lo(ve,ce,fe));let ac=!1,yr=!1,Ga=!1;const hn=di.getUniforms(),ui=yt.uniforms;if(se.useProgram(di.program)&&(ac=!0,yr=!0,Ga=!0),ve.id!==D&&(D=ve.id,yr=!0),ac||x!==F){hn.setValue(N,"projectionMatrix",F.projectionMatrix),hn.setValue(N,"viewMatrix",F.matrixWorldInverse);const Gn=hn.map.cameraPosition;Gn!==void 0&&Gn.setValue(N,pe.setFromMatrixPosition(F.matrixWorld)),oe.logarithmicDepthBuffer&&hn.setValue(N,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(ve.isMeshPhongMaterial||ve.isMeshToonMaterial||ve.isMeshLambertMaterial||ve.isMeshBasicMaterial||ve.isMeshStandardMaterial||ve.isShaderMaterial)&&hn.setValue(N,"isOrthographic",F.isOrthographicCamera===!0),x!==F&&(x=F,yr=!0,Ga=!0)}if(fe.isSkinnedMesh){hn.setOptional(N,fe,"bindMatrix"),hn.setOptional(N,fe,"bindMatrixInverse");const Gn=fe.skeleton;Gn&&(oe.floatVertexTextures?(Gn.boneTexture===null&&Gn.computeBoneTexture(),hn.setValue(N,"boneTexture",Gn.boneTexture,ne)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}fe.isBatchedMesh&&(hn.setOptional(N,fe,"batchingTexture"),hn.setValue(N,"batchingTexture",fe._matricesTexture,ne));const Va=be.morphAttributes;if((Va.position!==void 0||Va.normal!==void 0||Va.color!==void 0&&oe.isWebGL2===!0)&&Ze.update(fe,be,di),(yr||yt.receiveShadow!==fe.receiveShadow)&&(yt.receiveShadow=fe.receiveShadow,hn.setValue(N,"receiveShadow",fe.receiveShadow)),ve.isMeshGouraudMaterial&&ve.envMap!==null&&(ui.envMap.value=lt,ui.flipEnvMap.value=lt.isCubeTexture&<.isRenderTargetTexture===!1?-1:1),yr&&(hn.setValue(N,"toneMappingExposure",v.toneMappingExposure),yt.needsLights&&Ju(ui,Ga),Qe&&ve.fog===!0&&ye.refreshFogUniforms(ui,Qe),ye.refreshMaterialUniforms(ui,ve,P,H,Me),Ed.upload(N,rc(yt),ui,ne)),ve.isShaderMaterial&&ve.uniformsNeedUpdate===!0&&(Ed.upload(N,rc(yt),ui,ne),ve.uniformsNeedUpdate=!1),ve.isSpriteMaterial&&hn.setValue(N,"center",fe.center),hn.setValue(N,"modelViewMatrix",fe.modelViewMatrix),hn.setValue(N,"normalMatrix",fe.normalMatrix),hn.setValue(N,"modelMatrix",fe.matrixWorld),ve.isShaderMaterial||ve.isRawShaderMaterial){const Gn=ve.uniformsGroups;for(let za=0,tp=Gn.length;za0&&ne.useMultisampledRTT(F)===!1?fe=Ae.get(F).__webglMultisampledFramebuffer:Array.isArray(_t)?fe=_t[be]:fe=_t,O.copy(F.viewport),B.copy(F.scissor),z=F.scissorTest}else O.copy(re).multiplyScalar(P).floor(),B.copy(me).multiplyScalar(P).floor(),z=Se;if(se.bindFramebuffer(N.FRAMEBUFFER,fe)&&oe.drawBuffers&&ve&&se.drawBuffers(F,fe),se.viewport(O),se.scissor(B),se.setScissorTest(z),Qe){const lt=Ae.get(F.texture);N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_CUBE_MAP_POSITIVE_X+ce,lt.__webglTexture,be)}else if(st){const lt=Ae.get(F.texture),bt=ce||0;N.framebufferTextureLayer(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,lt.__webglTexture,be||0,bt)}D=-1},this.readRenderTargetPixels=function(F,ce,be,ve,fe,Qe,st){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let rt=Ae.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&st!==void 0&&(rt=rt[st]),rt){se.bindFramebuffer(N.FRAMEBUFFER,rt);try{const lt=F.texture,bt=lt.format,_t=lt.type;if(bt!==cs&&ut.convert(bt)!==N.getParameter(N.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const mt=_t===Fl&&(Y.has("EXT_color_buffer_half_float")||oe.isWebGL2&&Y.has("EXT_color_buffer_float"));if(_t!==pr&&ut.convert(_t)!==N.getParameter(N.IMPLEMENTATION_COLOR_READ_TYPE)&&!(_t===Ti&&(oe.isWebGL2||Y.has("OES_texture_float")||Y.has("WEBGL_color_buffer_float")))&&!mt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ce>=0&&ce<=F.width-ve&&be>=0&&be<=F.height-fe&&N.readPixels(ce,be,ve,fe,ut.convert(bt),ut.convert(_t),Qe)}finally{const lt=A!==null?Ae.get(A).__webglFramebuffer:null;se.bindFramebuffer(N.FRAMEBUFFER,lt)}}},this.copyFramebufferToTexture=function(F,ce,be=0){const ve=Math.pow(2,-be),fe=Math.floor(ce.image.width*ve),Qe=Math.floor(ce.image.height*ve);ne.setTexture2D(ce,0),N.copyTexSubImage2D(N.TEXTURE_2D,be,0,0,F.x,F.y,fe,Qe),se.unbindTexture()},this.copyTextureToTexture=function(F,ce,be,ve=0){const fe=ce.image.width,Qe=ce.image.height,st=ut.convert(be.format),rt=ut.convert(be.type);ne.setTexture2D(be,0),N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,be.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,be.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,be.unpackAlignment),ce.isDataTexture?N.texSubImage2D(N.TEXTURE_2D,ve,F.x,F.y,fe,Qe,st,rt,ce.image.data):ce.isCompressedTexture?N.compressedTexSubImage2D(N.TEXTURE_2D,ve,F.x,F.y,ce.mipmaps[0].width,ce.mipmaps[0].height,st,ce.mipmaps[0].data):N.texSubImage2D(N.TEXTURE_2D,ve,F.x,F.y,st,rt,ce.image),ve===0&&be.generateMipmaps&&N.generateMipmap(N.TEXTURE_2D),se.unbindTexture()},this.copyTextureToTexture3D=function(F,ce,be,ve,fe=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Qe=F.max.x-F.min.x+1,st=F.max.y-F.min.y+1,rt=F.max.z-F.min.z+1,lt=ut.convert(ve.format),bt=ut.convert(ve.type);let _t;if(ve.isData3DTexture)ne.setTexture3D(ve,0),_t=N.TEXTURE_3D;else if(ve.isDataArrayTexture)ne.setTexture2DArray(ve,0),_t=N.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,ve.flipY),N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ve.premultiplyAlpha),N.pixelStorei(N.UNPACK_ALIGNMENT,ve.unpackAlignment);const mt=N.getParameter(N.UNPACK_ROW_LENGTH),Zt=N.getParameter(N.UNPACK_IMAGE_HEIGHT),Mn=N.getParameter(N.UNPACK_SKIP_PIXELS),rn=N.getParameter(N.UNPACK_SKIP_ROWS),Ts=N.getParameter(N.UNPACK_SKIP_IMAGES),Wt=be.isCompressedTexture?be.mipmaps[0]:be.image;N.pixelStorei(N.UNPACK_ROW_LENGTH,Wt.width),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,Wt.height),N.pixelStorei(N.UNPACK_SKIP_PIXELS,F.min.x),N.pixelStorei(N.UNPACK_SKIP_ROWS,F.min.y),N.pixelStorei(N.UNPACK_SKIP_IMAGES,F.min.z),be.isDataTexture||be.isData3DTexture?N.texSubImage3D(_t,fe,ce.x,ce.y,ce.z,Qe,st,rt,lt,bt,Wt.data):be.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),N.compressedTexSubImage3D(_t,fe,ce.x,ce.y,ce.z,Qe,st,rt,lt,Wt.data)):N.texSubImage3D(_t,fe,ce.x,ce.y,ce.z,Qe,st,rt,lt,bt,Wt),N.pixelStorei(N.UNPACK_ROW_LENGTH,mt),N.pixelStorei(N.UNPACK_IMAGE_HEIGHT,Zt),N.pixelStorei(N.UNPACK_SKIP_PIXELS,Mn),N.pixelStorei(N.UNPACK_SKIP_ROWS,rn),N.pixelStorei(N.UNPACK_SKIP_IMAGES,Ts),fe===0&&ve.generateMipmaps&&N.generateMipmap(_t),se.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?ne.setTextureCube(F,0):F.isData3DTexture?ne.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?ne.setTexture2DArray(F,0):ne.setTexture2D(F,0),se.unbindTexture()},this.resetState=function(){R=0,C=0,A=null,se.reset(),nt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return xi}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===RE?"display-p3":"srgb",n.unpackColorSpace=Ut.workingColorSpace===qu?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===en?Kr:pO}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Kr?en:Cn}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class YMt extends MO{}YMt.prototype.isWebGL1Renderer=!0;class $Mt extends Jt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class WMt{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Vg,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=ks()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,s){e*=this.stride,s*=n.stride;for(let i=0,r=this.stride;ic)continue;f.applyMatrix4(this.matrixWorld);const D=e.ray.origin.distanceTo(f);De.far||n.push({distance:D,point:h.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else{const g=Math.max(0,o.start),y=Math.min(b.count,o.start+o.count);for(let v=g,S=y-1;vc)continue;f.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(f);Ce.far||n.push({distance:C,point:h.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,s=Object.keys(n);if(s.length>0){const i=n[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r0){const i=n[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;ri.far)return;r.push({distance:u,distanceToRay:Math.sqrt(a),point:c,index:e,face:null,object:o})}}class PE extends Ls{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new pt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wE,this.normalScale=new At(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Fi extends PE{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new At(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Nn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new pt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new pt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new pt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class V1 extends Ls{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new pt(16777215),this.specular=new pt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wE,this.normalScale=new At(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=xE,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function sd(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function s2t(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function i2t(t){function e(i,r){return t[i]-t[r]}const n=t.length,s=new Array(n);for(let i=0;i!==n;++i)s[i]=i;return s.sort(e),s}function z1(t,e,n){const s=t.length,i=new t.constructor(s);for(let r=0,o=0;o!==s;++r){const a=n[r]*e;for(let c=0;c!==e;++c)i[o++]=t[a+c]}return i}function PO(t,e,n,s){let i=1,r=t[0];for(;r!==void 0&&r[s]===void 0;)r=t[i++];if(r===void 0)return;let o=r[s];if(o!==void 0)if(Array.isArray(o))do o=r[s],o!==void 0&&(e.push(r.time),n.push.apply(n,o)),r=t[i++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[s],o!==void 0&&(e.push(r.time),o.toArray(n,n.length)),r=t[i++];while(r!==void 0);else do o=r[s],o!==void 0&&(e.push(r.time),n.push(o)),r=t[i++];while(r!==void 0)}class ec{constructor(e,n,s,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new n.constructor(s),this.sampleValues=n,this.valueSize=s,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let s=this._cachedIndex,i=n[s],r=n[s-1];e:{t:{let o;n:{s:if(!(e=r)){const a=n[1];e=r)break t}o=s,s=0;break n}break e}for(;s>>1;en;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=s.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const s=this.times,i=this.values,r=s.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const c=s[a];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,c),e=!1;break}if(o!==null&&o>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,c,o),e=!1;break}o=c}if(i!==void 0&&s2t(i))for(let a=0,c=i.length;a!==c;++a){const u=i[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),s=this.getValueSize(),i=this.getInterpolation()===ym,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*s,c=o*s,u=0;u!==s;++u)n[c+u]=n[a+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=n.slice(0,o*s)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),s=this.constructor,i=new s(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}ci.prototype.TimeBufferType=Float32Array;ci.prototype.ValueBufferType=Float32Array;ci.prototype.DefaultInterpolation=pa;class La extends ci{}La.prototype.ValueTypeName="bool";La.prototype.ValueBufferType=Array;La.prototype.DefaultInterpolation=Bl;La.prototype.InterpolantFactoryMethodLinear=void 0;La.prototype.InterpolantFactoryMethodSmooth=void 0;class UO extends ci{}UO.prototype.ValueTypeName="color";class fa extends ci{}fa.prototype.ValueTypeName="number";class l2t extends ec{constructor(e,n,s,i){super(e,n,s,i)}interpolate_(e,n,s,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,c=(s-n)/(i-n);let u=e*a;for(let d=u+a;u!==d;u+=4)Er.slerpFlat(r,0,o,u-a,o,u,c);return r}}class so extends ci{InterpolantFactoryMethodLinear(e){return new l2t(this.times,this.values,this.getValueSize(),e)}}so.prototype.ValueTypeName="quaternion";so.prototype.DefaultInterpolation=pa;so.prototype.InterpolantFactoryMethodSmooth=void 0;class Pa extends ci{}Pa.prototype.ValueTypeName="string";Pa.prototype.ValueBufferType=Array;Pa.prototype.DefaultInterpolation=Bl;Pa.prototype.InterpolantFactoryMethodLinear=void 0;Pa.prototype.InterpolantFactoryMethodSmooth=void 0;class ma extends ci{}ma.prototype.ValueTypeName="vector";class c2t{constructor(e,n=-1,s,i=hRt){this.name=e,this.tracks=s,this.duration=n,this.blendMode=i,this.uuid=ks(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],s=e.tracks,i=1/(e.fps||1);for(let o=0,a=s.length;o!==a;++o)n.push(u2t(s[o]).scale(i));const r=new this(e.name,e.duration,n,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const n=[],s=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=s.length;r!==o;++r)n.push(ci.toJSON(s[r]));return i}static CreateFromMorphTargetSequence(e,n,s,i){const r=n.length,o=[];for(let a=0;a1){const h=d[1];let f=i[h];f||(i[h]=f=[]),f.push(u)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],n,s));return o}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const s=function(h,f,m,_,E){if(m.length!==0){const b=[],g=[];PO(m,b,g,_),b.length!==0&&E.push(new h(f,b,g))}},i=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let c=e.length||-1;const u=e.hierarchy||[];for(let h=0;h{n&&n(r),this.manager.itemEnd(e)},0),r;if(bi[e]!==void 0){bi[e].push({onLoad:n,onProgress:s,onError:i});return}bi[e]=[],bi[e].push({onLoad:n,onProgress:s,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,c=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const d=bi[e],h=u.body.getReader(),f=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),m=f?parseInt(f):0,_=m!==0;let E=0;const b=new ReadableStream({start(g){y();function y(){h.read().then(({done:v,value:S})=>{if(v)g.close();else{E+=S.byteLength;const R=new ProgressEvent("progress",{lengthComputable:_,loaded:E,total:m});for(let C=0,A=d.length;C{switch(c){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(d=>new DOMParser().parseFromString(d,a));case"json":return u.json();default:if(a===void 0)return u.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),f=h&&h[1]?h[1].toLowerCase():void 0,m=new TextDecoder(f);return u.arrayBuffer().then(_=>m.decode(_))}}}).then(u=>{ga.add(e,u);const d=bi[e];delete bi[e];for(let h=0,f=d.length;h{const d=bi[e];if(d===void 0)throw this.manager.itemError(e),u;delete bi[e];for(let h=0,f=d.length;h{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class f2t extends Ua{constructor(e){super(e)}load(e,n,s,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=ga.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(o),r.manager.itemEnd(e)},0),o;const a=Gl("img");function c(){d(),ga.add(e,this),n&&n(this),r.manager.itemEnd(e)}function u(h){d(),i&&i(h),r.manager.itemError(e),r.manager.itemEnd(e)}function d(){a.removeEventListener("load",c,!1),a.removeEventListener("error",u,!1)}return a.addEventListener("load",c,!1),a.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class BO extends Ua{constructor(e){super(e)}load(e,n,s,i){const r=new xn,o=new f2t(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,n!==void 0&&n(r)},s,i),r}}class Ku extends Jt{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new pt(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}const Wm=new xt,H1=new ie,q1=new ie;class UE{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new At(512,512),this.map=null,this.mapPass=null,this.matrix=new xt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new NE,this._frameExtents=new At(1,1),this._viewportCount=1,this._viewports=[new Yt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,s=this.matrix;H1.setFromMatrixPosition(e.matrixWorld),n.position.copy(H1),q1.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(q1),n.updateMatrixWorld(),Wm.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Wm),s.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),s.multiply(Wm)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class m2t extends UE{constructor(){super(new Pn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,s=_a*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=e.distance||n.far;(s!==n.fov||i!==n.aspect||r!==n.far)&&(n.fov=s,n.aspect=i,n.far=r,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class g2t extends Ku{constructor(e,n,s=0,i=Math.PI/3,r=0,o=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Jt.DEFAULT_UP),this.updateMatrix(),this.target=new Jt,this.distance=s,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new m2t}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Y1=new xt,tl=new ie,Km=new ie;class b2t extends UE{constructor(){super(new Pn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new At(4,2),this._viewportCount=6,this._viewports=[new Yt(2,1,1,1),new Yt(0,1,1,1),new Yt(3,1,1,1),new Yt(1,1,1,1),new Yt(3,0,1,1),new Yt(1,0,1,1)],this._cubeDirections=[new ie(1,0,0),new ie(-1,0,0),new ie(0,0,1),new ie(0,0,-1),new ie(0,1,0),new ie(0,-1,0)],this._cubeUps=[new ie(0,1,0),new ie(0,1,0),new ie(0,1,0),new ie(0,1,0),new ie(0,0,1),new ie(0,0,-1)]}updateMatrices(e,n=0){const s=this.camera,i=this.matrix,r=e.distance||s.far;r!==s.far&&(s.far=r,s.updateProjectionMatrix()),tl.setFromMatrixPosition(e.matrixWorld),s.position.copy(tl),Km.copy(s.position),Km.add(this._cubeDirections[n]),s.up.copy(this._cubeUps[n]),s.lookAt(Km),s.updateMatrixWorld(),i.makeTranslation(-tl.x,-tl.y,-tl.z),Y1.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Y1)}}class E2t extends Ku{constructor(e,n,s=0,i=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=s,this.decay=i,this.shadow=new b2t}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class y2t extends UE{constructor(){super(new IE(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class GO extends Ku{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Jt.DEFAULT_UP),this.updateMatrix(),this.target=new Jt,this.shadow=new y2t}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class v2t extends Ku{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class yl{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let s=0,i=e.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,s,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=ga.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(o),r.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(c){ga.add(e,c),n&&n(c),r.manager.itemEnd(e)}).catch(function(c){i&&i(c),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}const FE="\\[\\]\\.:\\/",T2t=new RegExp("["+FE+"]","g"),BE="[^"+FE+"]",x2t="[^"+FE.replace("\\.","")+"]",C2t=/((?:WC+[\/:])*)/.source.replace("WC",BE),w2t=/(WCOD+)?/.source.replace("WCOD",x2t),R2t=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",BE),A2t=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",BE),N2t=new RegExp("^"+C2t+w2t+R2t+A2t+"$"),O2t=["material","materials","bones","map"];class I2t{constructor(e,n,s){const i=s||Bt.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const s=this._targetGroup.nCachedObjects_,i=this._bindings[s];i!==void 0&&i.getValue(e,n)}setValue(e,n){const s=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=s.length;i!==r;++i)s[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,s=e.length;n!==s;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,s=e.length;n!==s;++n)e[n].unbind()}}class Bt{constructor(e,n,s){this.path=n,this.parsedPath=s||Bt.parseTrackName(n),this.node=Bt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,s){return e&&e.isAnimationObjectGroup?new Bt.Composite(e,n,s):new Bt(e,n,s)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(T2t,"")}static parseTrackName(e){const n=N2t.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const s={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=s.nodeName&&s.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const r=s.nodeName.substring(i+1);O2t.indexOf(r)!==-1&&(s.nodeName=s.nodeName.substring(0,i),s.objectName=r)}if(s.propertyName===null||s.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return s}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const s=e.skeleton.getBoneByName(n);if(s!==void 0)return s}if(e.children){const s=function(r){for(let o=0;o=2.0 are supported."));return}const u=new dDt(r,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}u.setExtensions(o),u.setPlugins(a),u.parse(s,i)}parseAsync(e,n){const s=this;return new Promise(function(i,r){s.parse(e,n,i,r)})}}function D2t(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Rt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class k2t{constructor(e){this.parser=e,this.name=Rt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let s=0,i=n.length;s=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,r.source,o)}}class W2t{constructor(e){this.parser=e,this.name=Rt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,s=this.parser,i=s.json,r=i.textures[e];if(!r.extensions||!r.extensions[n])return null;const o=r.extensions[n],a=i.images[o.source];let c=s.textureLoader;if(a.uri){const u=s.options.manager.getHandler(a.uri);u!==null&&(c=u)}return this.detectSupport().then(function(u){if(u)return s.loadTextureImage(e,o.source,c);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return s.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class K2t{constructor(e){this.parser=e,this.name=Rt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,s=this.parser,i=s.json,r=i.textures[e];if(!r.extensions||!r.extensions[n])return null;const o=r.extensions[n],a=i.images[o.source];let c=s.textureLoader;if(a.uri){const u=s.options.manager.getHandler(a.uri);u!==null&&(c=u)}return this.detectSupport().then(function(u){if(u)return s.loadTextureImage(e,o.source,c);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return s.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class j2t{constructor(e){this.name=Rt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,s=n.bufferViews[e];if(s.extensions&&s.extensions[this.name]){const i=s.extensions[this.name],r=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const c=i.byteOffset||0,u=i.byteLength||0,d=i.count,h=i.byteStride,f=new Uint8Array(a,c,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(d,h,f,i.mode,i.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(d*h);return o.decodeGltfBuffer(new Uint8Array(m),d,h,f,i.mode,i.filter),m})})}else return null}}class Q2t{constructor(e){this.name=Rt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,s=n.nodes[e];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const i=n.meshes[s.mesh];for(const u of i.primitives)if(u.mode!==os.TRIANGLES&&u.mode!==os.TRIANGLE_STRIP&&u.mode!==os.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=s.extensions[this.name].attributes,a=[],c={};for(const u in o)a.push(this.parser.getDependency("accessor",o[u]).then(d=>(c[u]=d,c[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(u=>{const d=u.pop(),h=d.isGroup?d.children:[d],f=u[0].count,m=[];for(const _ of h){const E=new xt,b=new ie,g=new Er,y=new ie(1,1,1),v=new JMt(_.geometry,_.material,f);for(let S=0;S0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const cDt=new xt;class dDt{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new D2t,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,i=!1,r=-1;typeof navigator<"u"&&(s=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,r=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||s||i&&r<98?this.textureLoader=new BO(this.options.manager):this.textureLoader=new S2t(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new FO(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const s=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(o){const a={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:s,userData:{}};return Nr(r,a,i),sr(a,i),Promise.all(s._invokeAll(function(c){return c.afterRoot&&c.afterRoot(a)})).then(function(){e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],s=this.json.meshes||[];for(let i=0,r=n.length;i{const c=this.associations.get(o);c!=null&&this.associations.set(a,c);for(const[u,d]of o.children.entries())r(d,a.children[u])};return r(s,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let s=0;s=2&&b.setY(x,C[A*c+1]),c>=3&&b.setZ(x,C[A*c+2]),c>=4&&b.setW(x,C[A*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const n=this.json,s=this.options,r=n.textures[e].source,o=n.images[r];let a=this.textureLoader;if(o.uri){const c=s.manager.getHandler(o.uri);c!==null&&(a=c)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,n,s){const i=this,r=this.json,o=r.textures[e],a=r.images[n],c=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[c])return this.textureCache[c];const u=this.loadImageSource(n,s).then(function(d){d.flipY=!1,d.name=o.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(r.samplers||{})[o.sampler]||{};return d.magFilter=K1[f.magFilter]||zn,d.minFilter=K1[f.minFilter]||eo,d.wrapS=j1[f.wrapS]||da,d.wrapT=j1[f.wrapT]||da,i.associations.set(d,{textures:e}),d}).catch(function(){return null});return this.textureCache[c]=u,u}loadImageSource(e,n){const s=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const o=i.images[e],a=self.URL||self.webkitURL;let c=o.uri||"",u=!1;if(o.bufferView!==void 0)c=s.getDependency("bufferView",o.bufferView).then(function(h){u=!0;const f=new Blob([h],{type:o.mimeType});return c=a.createObjectURL(f),c});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const d=Promise.resolve(c).then(function(h){return new Promise(function(f,m){let _=f;n.isImageBitmapLoader===!0&&(_=function(E){const b=new xn(E);b.needsUpdate=!0,f(b)}),n.load(yl.resolveURL(h,r.path),_,void 0,m)})}).then(function(h){return u===!0&&a.revokeObjectURL(c),h.userData.mimeType=o.mimeType||lDt(o.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),h});return this.sourceCache[e]=d,d}assignTexture(e,n,s,i){const r=this;return this.getDependency("texture",s.index).then(function(o){if(!o)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(o=o.clone(),o.channel=s.texCoord),r.extensions[Rt.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[Rt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const c=r.associations.get(o);o=r.extensions[Rt.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,c)}}return i!==void 0&&(o.colorSpace=i),e[n]=o,o})}assignFinalMaterial(e){const n=e.geometry;let s=e.material;const i=n.attributes.tangent===void 0,r=n.attributes.color!==void 0,o=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+s.uuid;let c=this.cache.get(a);c||(c=new LO,Ls.prototype.copy.call(c,s),c.color.copy(s.color),c.map=s.map,c.sizeAttenuation=!1,this.cache.add(a,c)),s=c}else if(e.isLine){const a="LineBasicMaterial:"+s.uuid;let c=this.cache.get(a);c||(c=new kO,Ls.prototype.copy.call(c,s),c.color.copy(s.color),c.map=s.map,this.cache.add(a,c)),s=c}if(i||r||o){let a="ClonedMaterial:"+s.uuid+":";i&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let c=this.cache.get(a);c||(c=s.clone(),r&&(c.vertexColors=!0),o&&(c.flatShading=!0),i&&(c.normalScale&&(c.normalScale.y*=-1),c.clearcoatNormalScale&&(c.clearcoatNormalScale.y*=-1)),this.cache.add(a,c),this.associations.set(c,this.associations.get(s))),s=c}e.material=s}getMaterialType(){return PE}loadMaterial(e){const n=this,s=this.json,i=this.extensions,r=s.materials[e];let o;const a={},c=r.extensions||{},u=[];if(c[Rt.KHR_MATERIALS_UNLIT]){const h=i[Rt.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),u.push(h.extendParams(a,r,n))}else{const h=r.pbrMetallicRoughness||{};if(a.color=new pt(1,1,1),a.opacity=1,Array.isArray(h.baseColorFactor)){const f=h.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],Cn),a.opacity=f[3]}h.baseColorTexture!==void 0&&u.push(n.assignTexture(a,"map",h.baseColorTexture,en)),a.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,a.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(a,"metalnessMap",h.metallicRoughnessTexture)),u.push(n.assignTexture(a,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=$s);const d=r.alphaMode||Qm.OPAQUE;if(d===Qm.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===Qm.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==ar&&(u.push(n.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new At(1,1),r.normalTexture.scale!==void 0)){const h=r.normalTexture.scale;a.normalScale.set(h,h)}if(r.occlusionTexture!==void 0&&o!==ar&&(u.push(n.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==ar){const h=r.emissiveFactor;a.emissive=new pt().setRGB(h[0],h[1],h[2],Cn)}return r.emissiveTexture!==void 0&&o!==ar&&u.push(n.assignTexture(a,"emissiveMap",r.emissiveTexture,en)),Promise.all(u).then(function(){const h=new o(a);return r.name&&(h.name=r.name),sr(h,r),n.associations.set(h,{materials:e}),r.extensions&&Nr(i,h,r),h})}createUniqueName(e){const n=Bt.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,s=this.extensions,i=this.primitiveCache;function r(a){return s[Rt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(c){return Q1(c,a,n)})}const o=[];for(let a=0,c=e.length;a0&&oDt(g,r),g.name=n.createUniqueName(r.name||"mesh_"+e),sr(g,r),b.extensions&&Nr(i,g,b),n.assignFinalMaterial(g),h.push(g)}for(let m=0,_=h.length;m<_;m++)n.associations.set(h[m],{meshes:e,primitives:m});if(h.length===1)return r.extensions&&Nr(i,h[0],r),h[0];const f=new Vr;r.extensions&&Nr(i,f,r),n.associations.set(f,{meshes:e});for(let m=0,_=h.length;m<_;m++)f.add(h[m]);return f})}loadCamera(e){let n;const s=this.json.cameras[e],i=s[s.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?n=new Pn(GRt.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):s.type==="orthographic"&&(n=new IE(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),s.name&&(n.name=this.createUniqueName(s.name)),sr(n,s),Promise.resolve(n)}loadSkin(e){const n=this.json.skins[e],s=[];for(let i=0,r=n.joints.length;i1?d=new Vr:u.length===1?d=u[0]:d=new Jt,d!==u[0])for(let h=0,f=u.length;h{const h=new Map;for(const[f,m]of i.associations)(f instanceof Ls||f instanceof xn)&&h.set(f,m);return d.traverse(f=>{const m=i.associations.get(f);m!=null&&h.set(f,m)}),h};return i.associations=u(r),r})}_createAnimationTracks(e,n,s,i,r){const o=[],a=e.name?e.name:e.uuid,c=[];Ki[r.path]===Ki.weights?e.traverse(function(f){f.morphTargetInfluences&&c.push(f.name?f.name:f.uuid)}):c.push(a);let u;switch(Ki[r.path]){case Ki.weights:u=fa;break;case Ki.rotation:u=so;break;case Ki.position:case Ki.scale:u=ma;break;default:switch(s.itemSize){case 1:u=fa;break;case 2:case 3:default:u=ma;break}break}const d=i.interpolation!==void 0?sDt[i.interpolation]:pa,h=this._getArrayFromAccessor(s);for(let f=0,m=c.length;f{Ge.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,qe.emit("stop_webcam_video_stream"),Fe(()=>{Ge.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ge.replace(),qe.on("video_stream_image",t=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},_Dt=["src"],hDt=["src"],fDt={class:"controls"},mDt=l("i",{"data-feather":"video"},null,-1),gDt=[mDt],bDt=l("i",{"data-feather":"video"},null,-1),EDt=[bDt],yDt={key:2};function vDt(t,e,n,s,i,r){return T(),w("div",{class:"floating-frame bg-white",style:$t({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=ae((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=ae((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[l("div",{class:"handle",onMousedown:e[0]||(e[0]=ae((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=ae((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),i.isVideoActive&&i.imageDataUrl!=null?(T(),w("img",{key:0,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,_Dt)):G("",!0),i.isVideoActive&&i.imageDataUrl==null?(T(),w("p",{key:1,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,hDt)):G("",!0),l("div",fDt,[i.isVideoActive?G("",!0):(T(),w("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startVideoStream&&r.startVideoStream(...o))},gDt)),i.isVideoActive?(T(),w("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopVideoStream&&r.stopVideoStream(...o))},EDt)):G("",!0),i.isVideoActive?(T(),w("span",yDt,"FPS: "+J(i.frameRate),1)):G("",!0)])],36)}const SDt=at(pDt,[["render",vDt]]);const TDt={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){qe.emit("start_audio_stream",()=>{this.isAudioActive=!0}),Fe(()=>{Ge.replace()})},stopAudioStream(){qe.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),Fe(()=>{Ge.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ge.replace(),qe.on("update_spectrogram",t=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},xDt=["src"],CDt={class:"controls"},wDt=l("i",{"data-feather":"mic"},null,-1),RDt=[wDt],ADt=l("i",{"data-feather":"mic"},null,-1),NDt=[ADt];function ODt(t,e,n,s,i,r){return T(),w("div",{class:"floating-frame bg-white",style:$t({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=ae((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=ae((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[l("div",{class:"handle",onMousedown:e[0]||(e[0]=ae((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=ae((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),i.isAudioActive&&i.imageDataUrl!=null?(T(),w("img",{key:0,src:i.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,xDt)):G("",!0),l("div",CDt,[i.isAudioActive?G("",!0):(T(),w("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startAudioStream&&r.startAudioStream(...o))},RDt)),i.isAudioActive?(T(),w("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopAudioStream&&r.stopAudioStream(...o))},NDt)):G("",!0)])],36)}const IDt=at(TDt,[["render",ODt]]);const MDt={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:SDt,AudioFrame:IDt},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),Fe(()=>{Ge.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new $Mt,this.camera=new Pn(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new MO,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const t=new _r,e=new V1({color:65280});this.cube=new Un(t,e),this.scene.add(this.cube);const n=new v2t(4210752),s=new GO(16777215,.5);s.position.set(0,1,0),this.scene.add(n),this.scene.add(s),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:t,config:e}=this.$store.state;this.activePersonality=t[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(t){new M2t().load(t,n=>{this.scene.remove(this.cube),this.cube=n.scene,this.scene.add(this.cube)})},showBoxWithAvatar(t){this.cube&&this.scene.remove(this.cube);const e=new _r,n=new BO().load(t),s=new ar({map:n});this.cube=new Un(e,s),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const t=new _r,e=new V1({color:65280});this.cube=new Un(t,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},DDt={ref:"webglContainer"},kDt={class:"flex-col y-overflow 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"},LDt={key:0,class:"text-center"},PDt={key:1,class:"text-center"},UDt={class:"floating-frame2"},FDt=["innerHTML"];function BDt(t,e,n,s,i,r){const o=ct("VideoFrame"),a=ct("AudioFrame");return T(),w(Ve,null,[l("div",DDt,null,512),l("div",kDt,[!i.activePersonality||!i.activePersonality.scene_path?(T(),w("div",LDt," Personality does not have a 3d avatar. ")):G("",!0),!i.activePersonality||!i.activePersonality.avatar||i.activePersonality.avatar===""?(T(),w("div",PDt," Personality does not have an avatar. ")):G("",!0),l("div",UDt,[l("div",{innerHTML:t.htmlContent},null,8,FDt)])]),_e(o,{ref:"video_frame"},null,512),_e(a,{ref:"audio_frame"},null,512)],64)}const GDt=at(MDt,[["render",BDt]]);let id;const VDt=new Uint8Array(16);function zDt(){if(!id&&(id=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!id))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return id(VDt)}const yn=[];for(let t=0;t<256;++t)yn.push((t+256).toString(16).slice(1));function HDt(t,e=0){return yn[t[e+0]]+yn[t[e+1]]+yn[t[e+2]]+yn[t[e+3]]+"-"+yn[t[e+4]]+yn[t[e+5]]+"-"+yn[t[e+6]]+yn[t[e+7]]+"-"+yn[t[e+8]]+yn[t[e+9]]+"-"+yn[t[e+10]]+yn[t[e+11]]+yn[t[e+12]]+yn[t[e+13]]+yn[t[e+14]]+yn[t[e+15]]}const qDt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),X1={randomUUID:qDt};function Ri(t,e,n){if(X1.randomUUID&&!e&&!t)return X1.randomUUID();t=t||{};const s=t.random||(t.rng||zDt)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=s[i];return e}return HDt(s)}class jr{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,n){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. Please check that you don't accidentally use the same token twice to register two different handlers for the same event/hook.`),this.unsubscribe(e)),this.listenerMap.set(e,n),this._listeners.push(n)}unsubscribe(e){if(this.listenerMap.has(e)){const n=this.listenerMap.get(e);this.listenerMap.delete(e);const s=this._listeners.indexOf(n);s>=0&&this._listeners.splice(s,1)}}registerProxy(e,n){this.proxyMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. -Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,n),this.proxies.push(n)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const n=this.proxyMap.get(e);this.proxyMap.delete(e);const s=this.proxies.indexOf(n);s>=0&&this.proxies.splice(s,1)}}class Ht extends jr{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(n=>n(e,this.entity))}}class In extends jr{constructor(e){super(),this.entity=e}emit(e){let n=!1;const s=()=>[n=!0];for(const i of Array.from(this.listeners.values()))if(i(e,s,this.entity),n)return{prevented:!0};return{prevented:!1}}}class HO extends jr{execute(e,n){let s=e;for(const i of this.listeners)s=i(s,n);return s}}class ts extends HO{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class FDt extends jr{constructor(e){super(),this.entity=e}execute(e){const n=[];for(const s of this.listeners)n.push(s(e,this.entity));return n}}function zs(){const t=Symbol(),e=new Map,n=new Set,s=(c,u)=>{u instanceof jr&&u.registerProxy(t,()=>{var d,h;return(h=(d=e.get(c))===null||d===void 0?void 0:d.listeners)!==null&&h!==void 0?h:[]})},i=c=>{const u=new jr;e.set(c,u),n.forEach(d=>s(c,d[c]))},r=c=>{n.add(c);for(const u of e.keys())s(u,c[u])},o=c=>{for(const u of e.keys())c[u]instanceof jr&&c[u].unregisterProxy(t);n.delete(c)},a=()=>{n.forEach(c=>o(c)),e.clear()};return new Proxy({},{get(c,u){return u==="addTarget"?r:u==="removeTarget"?o:u==="destroy"?a:typeof u!="string"||u.startsWith("_")?c[u]:(e.has(u)||i(u),e.get(u))}})}class Z1{constructor(e,n){if(this.destructed=!1,this.events={destruct:new Ht(this)},!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Ri(),this.from=e,this.to=n,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class qO{constructor(e,n){if(!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Ri(),this.from=e,this.to=n}}function jg(t,e){return Object.fromEntries(Object.entries(t).map(([n,s])=>[n,e(s)]))}class YO{constructor(){this._title="",this.id=Ri(),this.events={loaded:new Ht(this),beforeAddInput:new In(this),addInput:new Ht(this),beforeRemoveInput:new In(this),removeInput:new Ht(this),beforeAddOutput:new In(this),addOutput:new Ht(this),beforeRemoveOutput:new In(this),removeOutput:new Ht(this),beforeTitleChanged:new In(this),titleChanged:new Ht(this),update:new Ht(this)},this.hooks={beforeLoad:new ts(this),afterSave:new ts(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,n){return this.addInterface("input",e,n)}addOutput(e,n){return this.addInterface("output",e,n)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([n,s])=>{this.inputs[n]&&(this.inputs[n].load(s),this.inputs[n].nodeId=this.id)}),Object.entries(e.outputs).forEach(([n,s])=>{this.outputs[n]&&(this.outputs[n].load(s),this.outputs[n].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=jg(this.inputs,i=>i.save()),n=jg(this.outputs,i=>i.save()),s={type:this.type,id:this.id,title:this.title,inputs:e,outputs:n};return this.hooks.afterSave.execute(s)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,n])=>this.initializeIntf("input",e,n)),Object.entries(this.outputs).forEach(([e,n])=>this.initializeIntf("output",e,n))}initializeIntf(e,n,s){s.isInput=e==="input",s.nodeId=this.id,s.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:n,intf:s}))}addInterface(e,n,s){const i=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,r=e==="input"?this.events.addInput:this.events.addOutput,o=e==="input"?this.inputs:this.outputs;return i.emit(s).prevented?!1:(o[n]=s,this.initializeIntf(e,n,s),r.emit(s),!0)}removeInterface(e,n){const s=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,i=e==="input"?this.events.removeInput:this.events.removeOutput,r=e==="input"?this.inputs[n]:this.outputs[n];if(!r||s.emit(r).prevented)return!1;if(r.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===r||a.to===r).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return r.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[n]:delete this.outputs[n],i.emit(r),!0}}let $O=class extends YO{load(e){super.load(e)}save(){return super.save()}};function Fa(t){return class extends $O{constructor(){var e,n;super(),this.type=t.type,this.inputs={},this.outputs={},this.calculate=t.calculate?(s,i)=>t.calculate.call(this,s,i):void 0,this._title=(e=t.title)!==null&&e!==void 0?e:t.type,this.executeFactory("input",t.inputs),this.executeFactory("output",t.outputs),(n=t.onCreate)===null||n===void 0||n.call(this)}onPlaced(){var e;(e=t.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=t.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,n){Object.keys(n||{}).forEach(s=>{const i=n[s]();e==="input"?this.addInput(s,i):this.addOutput(s,i)})}}}class Xt{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,n){this.id=Ri(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new Ht(this),beforeSetValue:new In(this),setValue:new Ht(this),updated:new Ht(this)},this.hooks={load:new ts(this),save:new ts(this)},this._connectionCount=0,this.name=e,this._value=n}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...n){return e(this,...n),this}}const ba="__baklava_SubgraphInputNode",Ea="__baklava_SubgraphOutputNode";class WO extends $O{constructor(){super(),this.graphInterfaceId=Ri()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class KO extends WO{constructor(){super(...arguments),this.type=ba,this.inputs={name:new Xt("Name","Input")},this.outputs={placeholder:new Xt("Value",void 0)}}static isGraphInputNode(e){return e.type===ba}}class jO extends WO{constructor(){super(...arguments),this.type=Ea,this.inputs={name:new Xt("Name","Output"),placeholder:new Xt("Value",void 0)},this.outputs={output:new Xt("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===Ea}}class tc{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(n=>n.type===ba).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===Ea).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Ri(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new In(this),addNode:new Ht(this),beforeRemoveNode:new In(this),removeNode:new Ht(this),beforeAddConnection:new In(this),addConnection:new Ht(this),checkConnection:new In(this),beforeRemoveConnection:new In(this),removeConnection:new Ht(this)},this.hooks={save:new ts(this),load:new ts(this),checkConnection:new FDt(this)},this.nodeEvents=zs(),this.nodeHooks=zs(),this.connectionEvents=zs(),this.editor=e,this.template=n,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(n=>n.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const n=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(s=>n.includes(s.from)||n.includes(s.to)).forEach(s=>this.removeConnection(s)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,n){const s=this.checkConnection(e,n);if(!s.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:n}).prevented)return;for(const r of s.connectionsInDanger){const o=this.connections.find(a=>a.id===r.id);o&&this.removeConnection(o)}const i=new Z1(s.dummyConnection.from,s.dummyConnection.to);return this.internalAddConnection(i),i}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,n){if(!e||!n)return{connectionAllowed:!1};const s=this.findNodeById(e.nodeId),i=this.findNodeById(n.nodeId);if(s&&i&&s===i)return{connectionAllowed:!1};if(e.isInput&&!n.isInput){const a=e;e=n,n=a}if(e.isInput||!n.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===n))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:n}).prevented)return{connectionAllowed:!1};const r=this.hooks.checkConnection.execute({from:e,to:n});if(r.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const o=Array.from(new Set(r.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new qO(e,n),connectionsInDanger:o}}findNodeInterface(e){for(const n of this.nodes){for(const s in n.inputs){const i=n.inputs[s];if(i.id===e)return i}for(const s in n.outputs){const i=n.outputs[s];if(i.id===e)return i}}}findNodeById(e){return this.nodes.find(n=>n.id===e)}load(e){try{this._loading=!0;const n=[];for(let s=this.connections.length-1;s>=0;s--)this.removeConnection(this.connections[s]);for(let s=this.nodes.length-1;s>=0;s--)this.removeNode(this.nodes[s]);this.id=e.id;for(const s of e.nodes){const i=this.editor.nodeTypes.get(s.type);if(!i){n.push(`Node type ${s.type} is not registered`);continue}const r=new i.type;this.addNode(r),r.load(s)}for(const s of e.connections){const i=this.findNodeInterface(s.from),r=this.findNodeInterface(s.to);if(i)if(r){const o=new Z1(i,r);o.id=s.id,this.internalAddConnection(o)}else{n.push(`Could not find interface with id ${s.to}`);continue}else{n.push(`Could not find interface with id ${s.from}`);continue}}return this.hooks.load.execute(e),n}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(n=>n.save()),connections:this.connections.map(n=>({id:n.id,from:n.from.id,to:n.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const Vl="__baklava_GraphNode-";function ya(t){return Vl+t.id}function BDt(t){return class extends YO{constructor(){super(...arguments),this.type=ya(t),this.inputs={},this.outputs={},this.template=t,this.calculate=async(n,s)=>{var i;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!s.engine||typeof s.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const r=s.engine.getInputValues(this.subgraph);for(const c of this.subgraph.inputs)r.set(c.nodeInterfaceId,n[c.id]);const o=await s.engine.runGraph(this.subgraph,r,s.globalValues),a={};for(const c of this.subgraph.outputs)a[c.id]=(i=o.get(c.nodeId))===null||i===void 0?void 0:i.get("output");return a._calculationResults=o,a}}get title(){return this._title}set title(n){this.template.name=n}load(n){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(n.graphState),super.load(n)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,n=>{this._title=n}),this.initialize()}onDestroy(){var n;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(n=this.subgraph)===null||n===void 0||n.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const n of this.subgraph.inputs)n.id in this.inputs?this.inputs[n.id].name=n.name:this.addInput(n.id,new Xt(n.name,void 0));for(const n of Object.keys(this.inputs))this.subgraph.inputs.some(s=>s.id===n)||this.removeInput(n);for(const n of this.subgraph.outputs)n.id in this.outputs?this.outputs[n.id].name=n.name:this.addOutput(n.id,new Xt(n.name,void 0));for(const n of Object.keys(this.outputs))this.subgraph.outputs.some(s=>s.id===n)||this.removeOutput(n);this.addOutput("_calculationResults",new Xt("_calculationResults",void 0).setHidden(!0))}}}class ju{static fromGraph(e,n){return new ju(e.save(),n)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const n=this.editor.nodeTypes.get(ya(this));n&&(n.title=e)}get inputs(){return this.nodes.filter(n=>n.type===ba).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===Ea).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Ri(),this._name="Subgraph",this.events={nameChanged:new Ht(this),updated:new Ht(this)},this.hooks={beforeLoad:new ts(this),afterSave:new ts(this)},this.editor=n,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const n=new Map,s=f=>{const m=Ri();return n.set(f,m),m},i=f=>{const m=n.get(f);if(!m)throw new Error(`Unable to create graph from template: Could not map old id ${f} to new id`);return m},r=f=>jg(f,m=>({id:s(m.id),templateId:m.id,value:m.value})),o=this.nodes.map(f=>({...f,id:s(f.id),inputs:r(f.inputs),outputs:r(f.outputs)})),a=this.connections.map(f=>({id:s(f.id),from:i(f.from),to:i(f.to)})),c=this.inputs.map(f=>({id:f.id,name:f.name,nodeId:i(f.nodeId),nodeInterfaceId:i(f.nodeInterfaceId)})),u=this.outputs.map(f=>({id:f.id,name:f.name,nodeId:i(f.nodeId),nodeInterfaceId:i(f.nodeInterfaceId)})),d={id:Ri(),nodes:o,connections:a,inputs:c,outputs:u};return e||(e=new tc(this.editor)),e.load(d).forEach(f=>console.warn(f)),e.template=this,e}}class GDt{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new Ht(this),beforeRegisterNodeType:new In(this),registerNodeType:new Ht(this),beforeUnregisterNodeType:new In(this),unregisterNodeType:new Ht(this),beforeAddGraphTemplate:new In(this),addGraphTemplate:new Ht(this),beforeRemoveGraphTemplate:new In(this),removeGraphTemplate:new Ht(this),registerGraph:new Ht(this),unregisterGraph:new Ht(this)},this.hooks={save:new ts(this),load:new ts(this)},this.graphTemplateEvents=zs(),this.graphTemplateHooks=zs(),this.graphEvents=zs(),this.graphHooks=zs(),this.nodeEvents=zs(),this.nodeHooks=zs(),this.connectionEvents=zs(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new tc(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(KO),this.registerNodeType(jO)}registerNodeType(e,n){var s,i;if(this.events.beforeRegisterNodeType.emit({type:e,options:n}).prevented)return;const r=new e;this._nodeTypes.set(r.type,{type:e,category:(s=n==null?void 0:n.category)!==null&&s!==void 0?s:"default",title:(i=n==null?void 0:n.title)!==null&&i!==void 0?i:r.title}),this.events.registerNodeType.emit({type:e,options:n})}unregisterNodeType(e){const n=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(n)){if(this.events.beforeUnregisterNodeType.emit(n).prevented)return;this._nodeTypes.delete(n),this.events.unregisterNodeType.emit(n)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const n=BDt(e);this.registerNodeType(n,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const n=ya(e);for(const s of[this.graph,...this.graphs.values()]){const i=s.nodes.filter(r=>r.type===n);for(const r of i)s.removeNode(r)}this.unregisterNodeType(n),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{this._loading=!0,e=this.hooks.load.execute(e),e.graphTemplates.forEach(s=>{const i=new ju(s,this);this.addGraphTemplate(i)});const n=this._graph.load(e.graph);return this.events.loaded.emit(),n.forEach(s=>console.warn(s)),n}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(n=>n.save())};return this.hooks.save.execute(e)}}function VDt(t,e){const n=new Map;e.graphs.forEach(s=>{s.nodes.forEach(i=>n.set(i.id,i))}),t.forEach((s,i)=>{const r=n.get(i);r&&s.forEach((o,a)=>{const c=r.outputs[a];c&&(c.value=o)})})}class QO extends Error{constructor(){super("Cycle detected")}}function zDt(t){return typeof t=="string"}function XO(t,e){const n=new Map,s=new Map,i=new Map;let r,o;if(t instanceof tc)r=t.nodes,o=t.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");r=t,o=e}r.forEach(u=>{Object.values(u.inputs).forEach(d=>n.set(d.id,u.id)),Object.values(u.outputs).forEach(d=>n.set(d.id,u.id))}),r.forEach(u=>{const d=o.filter(f=>f.from&&n.get(f.from.id)===u.id),h=new Set(d.map(f=>n.get(f.to.id)).filter(zDt));s.set(u.id,h),i.set(u,d)});const a=r.slice();o.forEach(u=>{const d=a.findIndex(h=>n.get(u.to.id)===h.id);d>=0&&a.splice(d,1)});const c=[];for(;a.length>0;){const u=a.pop();c.push(u);const d=s.get(u.id);for(;d.size>0;){const h=d.values().next().value;if(d.delete(h),Array.from(s.values()).every(f=>!f.has(h))){const f=r.find(m=>m.id===h);a.push(f)}}}if(Array.from(s.values()).some(u=>u.size>0))throw new QO;return{calculationOrder:c,connectionsFromNode:i,interfaceIdToNodeId:n}}function HDt(t,e){try{return XO(t,e),!1}catch(n){if(n instanceof QO)return!0;throw n}}var Vn;(function(t){t.Running="Running",t.Idle="Idle",t.Paused="Paused",t.Stopped="Stopped"})(Vn||(Vn={}));class qDt{get status(){return this.isRunning?Vn.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new In(this),afterRun:new Ht(this),statusChange:new Ht(this),beforeNodeCalculation:new Ht(this),afterNodeCalculation:new Ht(this)},this.hooks={gatherCalculationData:new ts(this),transferData:new HO},this.recalculateOrder=!0,this.internalStatus=Vn.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(n,s)=>{s.graph&&!s.graph.loading&&s.graph.activeTransactions===0&&this.internalOnChange(s,n??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(n,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(n,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(n,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(n,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,n=>this.checkConnection(n.from,n.to))}start(){this.internalStatus===Vn.Stopped&&(this.internalStatus=Vn.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===Vn.Idle&&(this.internalStatus=Vn.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===Vn.Paused&&(this.internalStatus=Vn.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===Vn.Idle||this.internalStatus===Vn.Paused)&&(this.internalStatus=Vn.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...n){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const s=await this.execute(e,...n);return this.events.afterRun.emit(s),s}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,n){if(e.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};e=r}if(n.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,n.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};n=r}const s=new qO(e,n);let i=this.editor.graph.connections.slice();return n.allowMultipleConnections||(i=i.filter(r=>r.to!==n)),i.push(s),HDt(this.editor.graph.nodes,i)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:n.allowMultipleConnections?[]:this.editor.graph.connections.filter(r=>r.to===n)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const n=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(n,...e)}validateNodeCalculationOutput(e,n){if(typeof n!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(s=>{if(!(s in n))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${s}"`)})}internalOnChange(e,n){this.internalStatus===Vn.Idle&&this.onChange(this.recalculateOrder,e,n)}findInterfaceByTemplateId(e,n){for(const s of e)for(const i of[...Object.values(s.inputs),...Object.values(s.outputs)])if(i.templateId===n)return i;return null}}class YDt extends qDt{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,n,s){this.order.has(e.id)||this.order.set(e.id,XO(e));const{calculationOrder:i,connectionsFromNode:r}=this.order.get(e.id),o=new Map;for(const a of i){const c={};Object.entries(a.inputs).forEach(([d,h])=>{c[d]=this.getInterfaceValue(n,h.id)}),this.events.beforeNodeCalculation.emit({inputValues:c,node:a});let u;if(a.calculate)u=await a.calculate(c,{globalValues:s,engine:this});else{u={};for(const[d,h]of Object.entries(a.outputs))u[d]=this.getInterfaceValue(n,h.id)}this.validateNodeCalculationOutput(a,u),this.events.afterNodeCalculation.emit({outputValues:u,node:a}),o.set(a.id,new Map(Object.entries(u))),r.has(a)&&r.get(a).forEach(d=>{var h;const f=(h=Object.entries(a.outputs).find(([,_])=>_.id===d.from.id))===null||h===void 0?void 0:h[0];if(!f)throw new Error(`Could not find key for interface ${d.from.id} +Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,n),this.proxies.push(n)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const n=this.proxyMap.get(e);this.proxyMap.delete(e);const s=this.proxies.indexOf(n);s>=0&&this.proxies.splice(s,1)}}class Ht extends jr{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(n=>n(e,this.entity))}}class In extends jr{constructor(e){super(),this.entity=e}emit(e){let n=!1;const s=()=>[n=!0];for(const i of Array.from(this.listeners.values()))if(i(e,s,this.entity),n)return{prevented:!0};return{prevented:!1}}}class HO extends jr{execute(e,n){let s=e;for(const i of this.listeners)s=i(s,n);return s}}class ts extends HO{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class YDt extends jr{constructor(e){super(),this.entity=e}execute(e){const n=[];for(const s of this.listeners)n.push(s(e,this.entity));return n}}function zs(){const t=Symbol(),e=new Map,n=new Set,s=(c,u)=>{u instanceof jr&&u.registerProxy(t,()=>{var d,h;return(h=(d=e.get(c))===null||d===void 0?void 0:d.listeners)!==null&&h!==void 0?h:[]})},i=c=>{const u=new jr;e.set(c,u),n.forEach(d=>s(c,d[c]))},r=c=>{n.add(c);for(const u of e.keys())s(u,c[u])},o=c=>{for(const u of e.keys())c[u]instanceof jr&&c[u].unregisterProxy(t);n.delete(c)},a=()=>{n.forEach(c=>o(c)),e.clear()};return new Proxy({},{get(c,u){return u==="addTarget"?r:u==="removeTarget"?o:u==="destroy"?a:typeof u!="string"||u.startsWith("_")?c[u]:(e.has(u)||i(u),e.get(u))}})}class Z1{constructor(e,n){if(this.destructed=!1,this.events={destruct:new Ht(this)},!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Ri(),this.from=e,this.to=n,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class qO{constructor(e,n){if(!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Ri(),this.from=e,this.to=n}}function jg(t,e){return Object.fromEntries(Object.entries(t).map(([n,s])=>[n,e(s)]))}class YO{constructor(){this._title="",this.id=Ri(),this.events={loaded:new Ht(this),beforeAddInput:new In(this),addInput:new Ht(this),beforeRemoveInput:new In(this),removeInput:new Ht(this),beforeAddOutput:new In(this),addOutput:new Ht(this),beforeRemoveOutput:new In(this),removeOutput:new Ht(this),beforeTitleChanged:new In(this),titleChanged:new Ht(this),update:new Ht(this)},this.hooks={beforeLoad:new ts(this),afterSave:new ts(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,n){return this.addInterface("input",e,n)}addOutput(e,n){return this.addInterface("output",e,n)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([n,s])=>{this.inputs[n]&&(this.inputs[n].load(s),this.inputs[n].nodeId=this.id)}),Object.entries(e.outputs).forEach(([n,s])=>{this.outputs[n]&&(this.outputs[n].load(s),this.outputs[n].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=jg(this.inputs,i=>i.save()),n=jg(this.outputs,i=>i.save()),s={type:this.type,id:this.id,title:this.title,inputs:e,outputs:n};return this.hooks.afterSave.execute(s)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,n])=>this.initializeIntf("input",e,n)),Object.entries(this.outputs).forEach(([e,n])=>this.initializeIntf("output",e,n))}initializeIntf(e,n,s){s.isInput=e==="input",s.nodeId=this.id,s.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:n,intf:s}))}addInterface(e,n,s){const i=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,r=e==="input"?this.events.addInput:this.events.addOutput,o=e==="input"?this.inputs:this.outputs;return i.emit(s).prevented?!1:(o[n]=s,this.initializeIntf(e,n,s),r.emit(s),!0)}removeInterface(e,n){const s=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,i=e==="input"?this.events.removeInput:this.events.removeOutput,r=e==="input"?this.inputs[n]:this.outputs[n];if(!r||s.emit(r).prevented)return!1;if(r.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===r||a.to===r).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return r.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[n]:delete this.outputs[n],i.emit(r),!0}}let $O=class extends YO{load(e){super.load(e)}save(){return super.save()}};function Fa(t){return class extends $O{constructor(){var e,n;super(),this.type=t.type,this.inputs={},this.outputs={},this.calculate=t.calculate?(s,i)=>t.calculate.call(this,s,i):void 0,this._title=(e=t.title)!==null&&e!==void 0?e:t.type,this.executeFactory("input",t.inputs),this.executeFactory("output",t.outputs),(n=t.onCreate)===null||n===void 0||n.call(this)}onPlaced(){var e;(e=t.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=t.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,n){Object.keys(n||{}).forEach(s=>{const i=n[s]();e==="input"?this.addInput(s,i):this.addOutput(s,i)})}}}class Xt{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,n){this.id=Ri(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new Ht(this),beforeSetValue:new In(this),setValue:new Ht(this),updated:new Ht(this)},this.hooks={load:new ts(this),save:new ts(this)},this._connectionCount=0,this.name=e,this._value=n}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...n){return e(this,...n),this}}const ba="__baklava_SubgraphInputNode",Ea="__baklava_SubgraphOutputNode";class WO extends $O{constructor(){super(),this.graphInterfaceId=Ri()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class KO extends WO{constructor(){super(...arguments),this.type=ba,this.inputs={name:new Xt("Name","Input")},this.outputs={placeholder:new Xt("Value",void 0)}}static isGraphInputNode(e){return e.type===ba}}class jO extends WO{constructor(){super(...arguments),this.type=Ea,this.inputs={name:new Xt("Name","Output"),placeholder:new Xt("Value",void 0)},this.outputs={output:new Xt("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===Ea}}class tc{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(n=>n.type===ba).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===Ea).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Ri(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new In(this),addNode:new Ht(this),beforeRemoveNode:new In(this),removeNode:new Ht(this),beforeAddConnection:new In(this),addConnection:new Ht(this),checkConnection:new In(this),beforeRemoveConnection:new In(this),removeConnection:new Ht(this)},this.hooks={save:new ts(this),load:new ts(this),checkConnection:new YDt(this)},this.nodeEvents=zs(),this.nodeHooks=zs(),this.connectionEvents=zs(),this.editor=e,this.template=n,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(n=>n.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const n=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(s=>n.includes(s.from)||n.includes(s.to)).forEach(s=>this.removeConnection(s)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,n){const s=this.checkConnection(e,n);if(!s.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:n}).prevented)return;for(const r of s.connectionsInDanger){const o=this.connections.find(a=>a.id===r.id);o&&this.removeConnection(o)}const i=new Z1(s.dummyConnection.from,s.dummyConnection.to);return this.internalAddConnection(i),i}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,n){if(!e||!n)return{connectionAllowed:!1};const s=this.findNodeById(e.nodeId),i=this.findNodeById(n.nodeId);if(s&&i&&s===i)return{connectionAllowed:!1};if(e.isInput&&!n.isInput){const a=e;e=n,n=a}if(e.isInput||!n.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===n))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:n}).prevented)return{connectionAllowed:!1};const r=this.hooks.checkConnection.execute({from:e,to:n});if(r.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const o=Array.from(new Set(r.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new qO(e,n),connectionsInDanger:o}}findNodeInterface(e){for(const n of this.nodes){for(const s in n.inputs){const i=n.inputs[s];if(i.id===e)return i}for(const s in n.outputs){const i=n.outputs[s];if(i.id===e)return i}}}findNodeById(e){return this.nodes.find(n=>n.id===e)}load(e){try{this._loading=!0;const n=[];for(let s=this.connections.length-1;s>=0;s--)this.removeConnection(this.connections[s]);for(let s=this.nodes.length-1;s>=0;s--)this.removeNode(this.nodes[s]);this.id=e.id;for(const s of e.nodes){const i=this.editor.nodeTypes.get(s.type);if(!i){n.push(`Node type ${s.type} is not registered`);continue}const r=new i.type;this.addNode(r),r.load(s)}for(const s of e.connections){const i=this.findNodeInterface(s.from),r=this.findNodeInterface(s.to);if(i)if(r){const o=new Z1(i,r);o.id=s.id,this.internalAddConnection(o)}else{n.push(`Could not find interface with id ${s.to}`);continue}else{n.push(`Could not find interface with id ${s.from}`);continue}}return this.hooks.load.execute(e),n}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(n=>n.save()),connections:this.connections.map(n=>({id:n.id,from:n.from.id,to:n.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const Vl="__baklava_GraphNode-";function ya(t){return Vl+t.id}function $Dt(t){return class extends YO{constructor(){super(...arguments),this.type=ya(t),this.inputs={},this.outputs={},this.template=t,this.calculate=async(n,s)=>{var i;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!s.engine||typeof s.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const r=s.engine.getInputValues(this.subgraph);for(const c of this.subgraph.inputs)r.set(c.nodeInterfaceId,n[c.id]);const o=await s.engine.runGraph(this.subgraph,r,s.globalValues),a={};for(const c of this.subgraph.outputs)a[c.id]=(i=o.get(c.nodeId))===null||i===void 0?void 0:i.get("output");return a._calculationResults=o,a}}get title(){return this._title}set title(n){this.template.name=n}load(n){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(n.graphState),super.load(n)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,n=>{this._title=n}),this.initialize()}onDestroy(){var n;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(n=this.subgraph)===null||n===void 0||n.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const n of this.subgraph.inputs)n.id in this.inputs?this.inputs[n.id].name=n.name:this.addInput(n.id,new Xt(n.name,void 0));for(const n of Object.keys(this.inputs))this.subgraph.inputs.some(s=>s.id===n)||this.removeInput(n);for(const n of this.subgraph.outputs)n.id in this.outputs?this.outputs[n.id].name=n.name:this.addOutput(n.id,new Xt(n.name,void 0));for(const n of Object.keys(this.outputs))this.subgraph.outputs.some(s=>s.id===n)||this.removeOutput(n);this.addOutput("_calculationResults",new Xt("_calculationResults",void 0).setHidden(!0))}}}class ju{static fromGraph(e,n){return new ju(e.save(),n)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const n=this.editor.nodeTypes.get(ya(this));n&&(n.title=e)}get inputs(){return this.nodes.filter(n=>n.type===ba).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===Ea).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Ri(),this._name="Subgraph",this.events={nameChanged:new Ht(this),updated:new Ht(this)},this.hooks={beforeLoad:new ts(this),afterSave:new ts(this)},this.editor=n,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const n=new Map,s=f=>{const m=Ri();return n.set(f,m),m},i=f=>{const m=n.get(f);if(!m)throw new Error(`Unable to create graph from template: Could not map old id ${f} to new id`);return m},r=f=>jg(f,m=>({id:s(m.id),templateId:m.id,value:m.value})),o=this.nodes.map(f=>({...f,id:s(f.id),inputs:r(f.inputs),outputs:r(f.outputs)})),a=this.connections.map(f=>({id:s(f.id),from:i(f.from),to:i(f.to)})),c=this.inputs.map(f=>({id:f.id,name:f.name,nodeId:i(f.nodeId),nodeInterfaceId:i(f.nodeInterfaceId)})),u=this.outputs.map(f=>({id:f.id,name:f.name,nodeId:i(f.nodeId),nodeInterfaceId:i(f.nodeInterfaceId)})),d={id:Ri(),nodes:o,connections:a,inputs:c,outputs:u};return e||(e=new tc(this.editor)),e.load(d).forEach(f=>console.warn(f)),e.template=this,e}}class WDt{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new Ht(this),beforeRegisterNodeType:new In(this),registerNodeType:new Ht(this),beforeUnregisterNodeType:new In(this),unregisterNodeType:new Ht(this),beforeAddGraphTemplate:new In(this),addGraphTemplate:new Ht(this),beforeRemoveGraphTemplate:new In(this),removeGraphTemplate:new Ht(this),registerGraph:new Ht(this),unregisterGraph:new Ht(this)},this.hooks={save:new ts(this),load:new ts(this)},this.graphTemplateEvents=zs(),this.graphTemplateHooks=zs(),this.graphEvents=zs(),this.graphHooks=zs(),this.nodeEvents=zs(),this.nodeHooks=zs(),this.connectionEvents=zs(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new tc(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(KO),this.registerNodeType(jO)}registerNodeType(e,n){var s,i;if(this.events.beforeRegisterNodeType.emit({type:e,options:n}).prevented)return;const r=new e;this._nodeTypes.set(r.type,{type:e,category:(s=n==null?void 0:n.category)!==null&&s!==void 0?s:"default",title:(i=n==null?void 0:n.title)!==null&&i!==void 0?i:r.title}),this.events.registerNodeType.emit({type:e,options:n})}unregisterNodeType(e){const n=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(n)){if(this.events.beforeUnregisterNodeType.emit(n).prevented)return;this._nodeTypes.delete(n),this.events.unregisterNodeType.emit(n)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const n=$Dt(e);this.registerNodeType(n,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const n=ya(e);for(const s of[this.graph,...this.graphs.values()]){const i=s.nodes.filter(r=>r.type===n);for(const r of i)s.removeNode(r)}this.unregisterNodeType(n),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{this._loading=!0,e=this.hooks.load.execute(e),e.graphTemplates.forEach(s=>{const i=new ju(s,this);this.addGraphTemplate(i)});const n=this._graph.load(e.graph);return this.events.loaded.emit(),n.forEach(s=>console.warn(s)),n}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(n=>n.save())};return this.hooks.save.execute(e)}}function KDt(t,e){const n=new Map;e.graphs.forEach(s=>{s.nodes.forEach(i=>n.set(i.id,i))}),t.forEach((s,i)=>{const r=n.get(i);r&&s.forEach((o,a)=>{const c=r.outputs[a];c&&(c.value=o)})})}class QO extends Error{constructor(){super("Cycle detected")}}function jDt(t){return typeof t=="string"}function XO(t,e){const n=new Map,s=new Map,i=new Map;let r,o;if(t instanceof tc)r=t.nodes,o=t.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");r=t,o=e}r.forEach(u=>{Object.values(u.inputs).forEach(d=>n.set(d.id,u.id)),Object.values(u.outputs).forEach(d=>n.set(d.id,u.id))}),r.forEach(u=>{const d=o.filter(f=>f.from&&n.get(f.from.id)===u.id),h=new Set(d.map(f=>n.get(f.to.id)).filter(jDt));s.set(u.id,h),i.set(u,d)});const a=r.slice();o.forEach(u=>{const d=a.findIndex(h=>n.get(u.to.id)===h.id);d>=0&&a.splice(d,1)});const c=[];for(;a.length>0;){const u=a.pop();c.push(u);const d=s.get(u.id);for(;d.size>0;){const h=d.values().next().value;if(d.delete(h),Array.from(s.values()).every(f=>!f.has(h))){const f=r.find(m=>m.id===h);a.push(f)}}}if(Array.from(s.values()).some(u=>u.size>0))throw new QO;return{calculationOrder:c,connectionsFromNode:i,interfaceIdToNodeId:n}}function QDt(t,e){try{return XO(t,e),!1}catch(n){if(n instanceof QO)return!0;throw n}}var Vn;(function(t){t.Running="Running",t.Idle="Idle",t.Paused="Paused",t.Stopped="Stopped"})(Vn||(Vn={}));class XDt{get status(){return this.isRunning?Vn.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new In(this),afterRun:new Ht(this),statusChange:new Ht(this),beforeNodeCalculation:new Ht(this),afterNodeCalculation:new Ht(this)},this.hooks={gatherCalculationData:new ts(this),transferData:new HO},this.recalculateOrder=!0,this.internalStatus=Vn.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(n,s)=>{s.graph&&!s.graph.loading&&s.graph.activeTransactions===0&&this.internalOnChange(s,n??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(n,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(n,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(n,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(n,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,n=>this.checkConnection(n.from,n.to))}start(){this.internalStatus===Vn.Stopped&&(this.internalStatus=Vn.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===Vn.Idle&&(this.internalStatus=Vn.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===Vn.Paused&&(this.internalStatus=Vn.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===Vn.Idle||this.internalStatus===Vn.Paused)&&(this.internalStatus=Vn.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...n){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const s=await this.execute(e,...n);return this.events.afterRun.emit(s),s}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,n){if(e.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};e=r}if(n.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,n.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};n=r}const s=new qO(e,n);let i=this.editor.graph.connections.slice();return n.allowMultipleConnections||(i=i.filter(r=>r.to!==n)),i.push(s),QDt(this.editor.graph.nodes,i)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:n.allowMultipleConnections?[]:this.editor.graph.connections.filter(r=>r.to===n)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const n=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(n,...e)}validateNodeCalculationOutput(e,n){if(typeof n!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(s=>{if(!(s in n))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${s}"`)})}internalOnChange(e,n){this.internalStatus===Vn.Idle&&this.onChange(this.recalculateOrder,e,n)}findInterfaceByTemplateId(e,n){for(const s of e)for(const i of[...Object.values(s.inputs),...Object.values(s.outputs)])if(i.templateId===n)return i;return null}}class ZDt extends XDt{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,n,s){this.order.has(e.id)||this.order.set(e.id,XO(e));const{calculationOrder:i,connectionsFromNode:r}=this.order.get(e.id),o=new Map;for(const a of i){const c={};Object.entries(a.inputs).forEach(([d,h])=>{c[d]=this.getInterfaceValue(n,h.id)}),this.events.beforeNodeCalculation.emit({inputValues:c,node:a});let u;if(a.calculate)u=await a.calculate(c,{globalValues:s,engine:this});else{u={};for(const[d,h]of Object.entries(a.outputs))u[d]=this.getInterfaceValue(n,h.id)}this.validateNodeCalculationOutput(a,u),this.events.afterNodeCalculation.emit({outputValues:u,node:a}),o.set(a.id,new Map(Object.entries(u))),r.has(a)&&r.get(a).forEach(d=>{var h;const f=(h=Object.entries(a.outputs).find(([,_])=>_.id===d.from.id))===null||h===void 0?void 0:h[0];if(!f)throw new Error(`Could not find key for interface ${d.from.id} This is likely a Baklava internal issue. Please report it on GitHub.`);const m=this.hooks.transferData.execute(u[f],d);d.to.allowMultipleConnections?n.has(d.to.id)?n.get(d.to.id).push(m):n.set(d.to.id,[m]):n.set(d.to.id,m)})}return o}async execute(e){this.recalculateOrder&&(this.order.clear(),this.recalculateOrder=!1);const n=this.getInputValues(this.editor.graph);return await this.runGraph(this.editor.graph,n,e)}getInputValues(e){const n=new Map;for(const s of e.nodes)Object.values(s.inputs).forEach(i=>{i.connectionCount===0&&n.set(i.id,i.value)}),s.calculate||Object.values(s.outputs).forEach(i=>{n.set(i.id,i.value)});return n}onChange(e){this.recalculateOrder=e||this.recalculateOrder,this.calculateWithoutData()}getInterfaceValue(e,n){if(!e.has(n))throw new Error(`Could not find value for interface ${n} -This is likely a Baklava internal issue. Please report it on GitHub.`);return e.get(n)}}let Qg=null;function $Dt(t){Qg=t}function Ss(){if(!Qg)throw new Error("providePlugin() must be called before usePlugin()");return{viewModel:Qg}}function Bs(){const{viewModel:t}=Ss();return{graph:Cd(t.value,"displayedGraph"),switchGraph:t.value.switchGraph}}function ZO(t){const{graph:e}=Bs(),n=dt(null),s=dt(null);return{dragging:et(()=>!!n.value),onPointerDown:c=>{n.value={x:c.pageX,y:c.pageY},s.value={x:t.value.x,y:t.value.y}},onPointerMove:c=>{if(n.value){const u=c.pageX-n.value.x,d=c.pageY-n.value.y;t.value.x=s.value.x+u/e.value.scaling,t.value.y=s.value.y+d/e.value.scaling}},onPointerUp:()=>{n.value=null,s.value=null}}}function JO(t,e,n){if(!e.template)return!1;if(ya(e.template)===n)return!0;const s=t.graphTemplates.find(r=>ya(r)===n);return s?s.nodes.filter(r=>r.type.startsWith(Vl)).some(r=>JO(t,e,r.type)):!1}function eI(t){return et(()=>{const e=Array.from(t.value.editor.nodeTypes.entries()),n=new Set(e.map(([,i])=>i.category)),s=[];for(const i of n.values()){let r=e.filter(([,o])=>o.category===i);t.value.displayedGraph.template?r=r.filter(([o])=>!JO(t.value.editor,t.value.displayedGraph,o)):r=r.filter(([o])=>![ba,Ea].includes(o)),r.length>0&&s.push({name:i,nodeTypes:Object.fromEntries(r)})}return s.sort((i,r)=>i.name==="default"?-1:r.name==="default"||i.name>r.name?1:-1),s})}function tI(){const{graph:t}=Bs();return{transform:(n,s)=>{const i=n/t.value.scaling-t.value.panning.x,r=s/t.value.scaling-t.value.panning.y;return[i,r]}}}function WDt(){const{graph:t}=Bs();let e=[],n=-1,s={x:0,y:0};const i=et(()=>t.value.panning),r=ZO(i),o=et(()=>({"transform-origin":"0 0",transform:`scale(${t.value.scaling}) translate(${t.value.panning.x}px, ${t.value.panning.y}px)`})),a=(m,_,E)=>{const b=[m/t.value.scaling-t.value.panning.x,_/t.value.scaling-t.value.panning.y],g=[m/E-t.value.panning.x,_/E-t.value.panning.y],y=[g[0]-b[0],g[1]-b[1]];t.value.panning.x+=y[0],t.value.panning.y+=y[1],t.value.scaling=E},c=m=>{m.preventDefault();let _=m.deltaY;m.deltaMode===1&&(_*=32);const E=t.value.scaling*(1-_/3e3);a(m.offsetX,m.offsetY,E)},u=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:o,...r,onPointerDown:m=>{if(e.push(m),r.onPointerDown(m),e.length===2){const{ax:_,ay:E,bx:b,by:g}=u();s={x:_+(b-_)/2,y:E+(g-E)/2}}},onPointerMove:m=>{for(let _=0;_0){const R=t.value.scaling*(1+(S-n)/500);a(s.x,s.y,R)}n=S}else r.onPointerMove(m)},onPointerUp:m=>{e=e.filter(_=>_.pointerId!==m.pointerId),n=-1,r.onPointerUp()},onMouseWheel:c}}var us=(t=>(t[t.NONE=0]="NONE",t[t.ALLOWED=1]="ALLOWED",t[t.FORBIDDEN=2]="FORBIDDEN",t))(us||{});const nI=Symbol();function KDt(){const{graph:t}=Bs(),e=dt(null),n=dt(null),s=a=>{e.value&&(e.value.mx=a.offsetX/t.value.scaling-t.value.panning.x,e.value.my=a.offsetY/t.value.scaling-t.value.panning.y)},i=()=>{if(n.value){if(e.value)return;const a=t.value.connections.find(c=>c.to===n.value);n.value.isInput&&a?(e.value={status:us.NONE,from:a.from},t.value.removeConnection(a)):e.value={status:us.NONE,from:n.value},e.value.mx=void 0,e.value.my=void 0}},r=()=>{if(e.value&&n.value){if(e.value.from===n.value)return;t.value.addConnection(e.value.from,e.value.to)}e.value=null},o=a=>{if(n.value=a??null,a&&e.value){e.value.to=a;const c=t.value.checkConnection(e.value.from,e.value.to);if(e.value.status=c.connectionAllowed?us.ALLOWED:us.FORBIDDEN,c.connectionAllowed){const u=c.connectionsInDanger.map(d=>d.id);t.value.connections.forEach(d=>{u.includes(d.id)&&(d.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=us.NONE,t.value.connections.forEach(c=>{c.isInDanger=!1}))};return Ho(nI,{temporaryConnection:e,hoveredOver:o}),{temporaryConnection:e,onMouseMove:s,onMouseDown:i,onMouseUp:r,hoveredOver:o}}function jDt(t){const e=dt(!1),n=dt(0),s=dt(0),i=eI(t),{transform:r}=tI(),o=et(()=>{let d=[];const h={};for(const m of i.value){const _=Object.entries(m.nodeTypes).map(([E,b])=>({label:b.title,value:"addNode:"+E}));m.name==="default"?d=_:h[m.name]=_}const f=[...Object.entries(h).map(([m,_])=>({label:m,submenu:_}))];return f.length>0&&d.length>0&&f.push({isDivider:!0}),f.push(...d),f}),a=et(()=>t.value.settings.contextMenu.additionalItems.length===0?o.value:[{label:"Add node",submenu:o.value},...t.value.settings.contextMenu.additionalItems.map(d=>"isDivider"in d||"submenu"in d?d:{label:d.label,value:"command:"+d.command,disabled:!t.value.commandHandler.canExecuteCommand(d.command)})]);function c(d){e.value=!0,n.value=d.offsetX,s.value=d.offsetY}function u(d){if(d.startsWith("addNode:")){const h=d.substring(8),f=t.value.editor.nodeTypes.get(h);if(!f)return;const m=Wn(new f.type);t.value.displayedGraph.addNode(m);const[_,E]=r(n.value,s.value);m.position.x=_,m.position.y=E}else if(d.startsWith("command:")){const h=d.substring(8);t.value.commandHandler.canExecuteCommand(h)&&t.value.commandHandler.executeCommand(h)}}return{show:e,x:n,y:s,items:a,open:c,onClick:u}}const QDt=cn({setup(){const{viewModel:t}=Ss(),{graph:e}=Bs();return{styles:et(()=>{const s=t.value.settings.background,i=e.value.panning.x*e.value.scaling,r=e.value.panning.y*e.value.scaling,o=e.value.scaling*s.gridSize,a=o/s.gridDivision,c=`${o}px ${o}px, ${o}px ${o}px`,u=e.value.scaling>s.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${i}px top ${r}px`,backgroundSize:`${c} ${u}`}})}}}),dn=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n};function XDt(t,e,n,s,i,r){return T(),w("div",{class:"background",style:$t(t.styles)},null,4)}const ZDt=dn(QDt,[["render",XDt]]);function JDt(t){return mw()?(zI(t),!0):!1}function GE(t){return typeof t=="function"?t():ht(t)}const sI=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ekt=Object.prototype.toString,tkt=t=>ekt.call(t)==="[object Object]",yd=()=>{},nkt=skt();function skt(){var t,e;return sI&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ikt(t,e,n=!1){return e.reduce((s,i)=>(i in t&&(!n||t[i]!==void 0)&&(s[i]=t[i]),s),{})}function rkt(t,e={}){if(!un(t))return TM(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const s in t.value)n[s]=SM(()=>({get(){return t.value[s]},set(i){var r;if((r=GE(e.replaceRef))!=null?r:!0)if(Array.isArray(t.value)){const a=[...t.value];a[s]=i,t.value=a}else{const a={...t.value,[s]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[s]=i}}));return n}function ll(t){var e;const n=GE(t);return(e=n==null?void 0:n.$el)!=null?e:n}const VE=sI?window:void 0;function vl(...t){let e,n,s,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,s,i]=t,e=VE):[e,n,s,i]=t,!e)return yd;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const r=[],o=()=>{r.forEach(d=>d()),r.length=0},a=(d,h,f,m)=>(d.addEventListener(h,f,m),()=>d.removeEventListener(h,f,m)),c=Fn(()=>[ll(e),GE(i)],([d,h])=>{if(o(),!d)return;const f=tkt(h)?{...h}:h;r.push(...n.flatMap(m=>s.map(_=>a(d,m,_,f))))},{immediate:!0,flush:"post"}),u=()=>{c(),o()};return JDt(u),u}let J1=!1;function iI(t,e,n={}){const{window:s=VE,ignore:i=[],capture:r=!0,detectIframe:o=!1}=n;if(!s)return yd;nkt&&!J1&&(J1=!0,Array.from(s.document.body.children).forEach(f=>f.addEventListener("click",yd)),s.document.documentElement.addEventListener("click",yd));let a=!0;const c=f=>i.some(m=>{if(typeof m=="string")return Array.from(s.document.querySelectorAll(m)).some(_=>_===f.target||f.composedPath().includes(_));{const _=ll(m);return _&&(f.target===_||f.composedPath().includes(_))}}),d=[vl(s,"click",f=>{const m=ll(t);if(!(!m||m===f.target||f.composedPath().includes(m))){if(f.detail===0&&(a=!c(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:r}),vl(s,"pointerdown",f=>{const m=ll(t);a=!c(f)&&!!(m&&!f.composedPath().includes(m))},{passive:!0}),o&&vl(s,"blur",f=>{setTimeout(()=>{var m;const _=ll(t);((m=s.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(_!=null&&_.contains(s.document.activeElement))&&e(f)},0)})].filter(Boolean);return()=>d.forEach(f=>f())}const rI={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},okt=Object.keys(rI);function akt(t={}){const{target:e=VE}=t,n=dt(!1),s=dt(t.initialValue||{});Object.assign(s.value,rI,s.value);const i=r=>{n.value=!0,!(t.pointerTypes&&!t.pointerTypes.includes(r.pointerType))&&(s.value=ikt(r,okt,!1))};if(e){const r={passive:!0};vl(e,["pointerdown","pointermove","pointerup"],i,r),vl(e,"pointerleave",()=>n.value=!1,r)}return{...rkt(s),isInside:n}}const lkt=["onMouseenter","onMouseleave","onClick"],ckt={class:"flex-fill"},dkt={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},ukt=l("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[l("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),pkt=[ukt],zE=cn({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(t,{emit:e}){const n=t,s=e;let i=null;const r=dt(null),o=dt(-1),a=dt(0),c=dt({x:!1,y:!1}),u=et(()=>n.flippable&&(c.value.x||n.isFlipped.x)),d=et(()=>n.flippable&&(c.value.y||n.isFlipped.y)),h=et(()=>{const y={};return n.isNested||(y.top=(d.value?n.y-a.value:n.y)+"px",y.left=n.x+"px"),y}),f=et(()=>({"--flipped-x":u.value,"--flipped-y":d.value,"--nested":n.isNested})),m=et(()=>n.items.map(y=>({...y,hover:!1})));Fn([()=>n.y,()=>n.items],()=>{var y,v,S,R;a.value=n.items.length*30;const C=((v=(y=r.value)==null?void 0:y.parentElement)==null?void 0:v.offsetWidth)??0,A=((R=(S=r.value)==null?void 0:S.parentElement)==null?void 0:R.offsetHeight)??0;c.value.x=!n.isNested&&n.x>C*.75,c.value.y=!n.isNested&&n.y+a.value>A-20}),iI(r,()=>{n.modelValue&&s("update:modelValue",!1)});const _=y=>{!y.submenu&&y.value&&(s("click",y.value),s("update:modelValue",!1))},E=y=>{s("click",y),o.value=-1,n.isNested||s("update:modelValue",!1)},b=(y,v)=>{n.items[v].submenu&&(o.value=v,i!==null&&(clearTimeout(i),i=null))},g=(y,v)=>{n.items[v].submenu&&(i=window.setTimeout(()=>{o.value=-1,i=null},200))};return(y,v)=>{const S=ct("ContextMenu",!0);return T(),St(Ds,{name:"slide-fade"},{default:He(()=>[U(l("div",{ref_key:"el",ref:r,class:Ue(["baklava-context-menu",f.value]),style:$t(h.value)},[(T(!0),w(Ve,null,Je(m.value,(R,C)=>(T(),w(Ve,null,[R.isDivider?(T(),w("div",{key:`d-${C}`,class:"divider"})):(T(),w("div",{key:`i-${C}`,class:Ue(["item",{submenu:!!R.submenu,"--disabled":!!R.disabled}]),onMouseenter:A=>b(A,C),onMouseleave:A=>g(A,C),onClick:ae(A=>_(R),["stop","prevent"])},[l("div",ckt,J(R.label),1),R.submenu?(T(),w("div",dkt,pkt)):G("",!0),R.submenu?(T(),St(S,{key:1,"model-value":o.value===C,items:R.submenu,"is-nested":!0,"is-flipped":{x:u.value,y:d.value},flippable:y.flippable,onClick:E},null,8,["model-value","items","is-flipped","flippable"])):G("",!0)],42,lkt))],64))),256))],6),[[wt,y.modelValue]])]),_:1})}}}),_kt={},hkt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},fkt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),mkt=l("circle",{cx:"12",cy:"12",r:"1"},null,-1),gkt=l("circle",{cx:"12",cy:"19",r:"1"},null,-1),bkt=l("circle",{cx:"12",cy:"5",r:"1"},null,-1),Ekt=[fkt,mkt,gkt,bkt];function ykt(t,e){return T(),w("svg",hkt,Ekt)}const oI=dn(_kt,[["render",ykt]]),vkt=["id"],Skt={key:0,class:"__tooltip"},Tkt={key:2,class:"align-middle"},ew=cn({__name:"NodeInterface",props:{node:{},intf:{}},setup(t){const e=(b,g=100)=>{const y=b!=null&&b.toString?b.toString():"";return y.length>g?y.slice(0,g)+"...":y},n=t,{viewModel:s}=Ss(),{hoveredOver:i,temporaryConnection:r}=_s(nI),o=dt(null),a=et(()=>n.intf.connectionCount>0),c=dt(!1),u=et(()=>s.value.settings.displayValueOnHover&&c.value),d=et(()=>({"--input":n.intf.isInput,"--output":!n.intf.isInput,"--connected":a.value})),h=et(()=>n.intf.component&&(!n.intf.isInput||!n.intf.port||n.intf.connectionCount===0)),f=()=>{c.value=!0,i(n.intf)},m=()=>{c.value=!1,i(void 0)},_=()=>{o.value&&s.value.hooks.renderInterface.execute({intf:n.intf,el:o.value})},E=()=>{const b=s.value.displayedGraph.sidebar;b.nodeId=n.node.id,b.optionName=n.intf.name,b.visible=!0};return Li(_),ql(_),(b,g)=>{var y;return T(),w("div",{id:b.intf.id,ref_key:"el",ref:o,class:Ue(["baklava-node-interface",d.value])},[b.intf.port?(T(),w("div",{key:0,class:Ue(["__port",{"--selected":((y=ht(r))==null?void 0:y.from)===b.intf}]),onPointerover:f,onPointerout:m},[An(b.$slots,"portTooltip",{showTooltip:u.value},()=>[u.value===!0?(T(),w("span",Skt,J(e(b.intf.value)),1)):G("",!0)])],34)):G("",!0),h.value?(T(),St(hu(b.intf.component),{key:1,modelValue:b.intf.value,"onUpdate:modelValue":g[0]||(g[0]=v=>b.intf.value=v),node:b.node,intf:b.intf,onOpenSidebar:E},null,40,["modelValue","node","intf"])):(T(),w("span",Tkt,J(b.intf.name),1))],10,vkt)}}}),xkt=["id","data-node-type"],Ckt={class:"__title-label"},wkt={class:"__menu"},Rkt={class:"__outputs"},Akt={class:"__inputs"},Nkt=cn({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(t,{emit:e}){const n=t,s=e,{viewModel:i}=Ss(),{graph:r,switchGraph:o}=Bs(),a=dt(null),c=dt(!1),u=dt(""),d=dt(null),h=dt(!1),f=dt(!1),m=et(()=>{const B=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return n.node.type.startsWith(Vl)&&B.push({value:"editSubgraph",label:"Edit Subgraph"}),B}),_=et(()=>({"--selected":n.selected,"--dragging":n.dragging,"--two-column":!!n.node.twoColumn})),E=et(()=>{var B,z;return{top:`${((B=n.node.position)==null?void 0:B.y)??0}px`,left:`${((z=n.node.position)==null?void 0:z.x)??0}px`,"--width":`${n.node.width??i.value.settings.nodes.defaultWidth}px`}}),b=et(()=>Object.values(n.node.inputs).filter(B=>!B.hidden)),g=et(()=>Object.values(n.node.outputs).filter(B=>!B.hidden)),y=()=>{s("select")},v=B=>{n.selected||y(),s("start-drag",B)},S=()=>{f.value=!0},R=async B=>{var z;switch(B){case"delete":r.value.removeNode(n.node);break;case"rename":u.value=n.node.title,c.value=!0,await Fe(),(z=d.value)==null||z.focus();break;case"editSubgraph":o(n.node.template);break}},C=()=>{n.node.title=u.value,c.value=!1},A=()=>{a.value&&i.value.hooks.renderNode.execute({node:n.node,el:a.value})},D=B=>{h.value=!0,B.preventDefault()},x=B=>{if(!h.value)return;const z=n.node.width+B.movementX/r.value.scaling,Z=i.value.settings.nodes.minWidth,M=i.value.settings.nodes.maxWidth;n.node.width=Math.max(Z,Math.min(M,z))},O=()=>{h.value=!1};return Li(()=>{A(),window.addEventListener("mousemove",x),window.addEventListener("mouseup",O)}),ql(A),wa(()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",O)}),(B,z)=>(T(),w("div",{id:B.node.id,ref_key:"el",ref:a,class:Ue(["baklava-node",_.value]),style:$t(E.value),"data-node-type":B.node.type,onPointerdown:y},[ht(i).settings.nodes.resizable?(T(),w("div",{key:0,class:"__resize-handle",onMousedown:D},null,32)):G("",!0),An(B.$slots,"title",{},()=>[l("div",{class:"__title",onPointerdown:ae(v,["self","stop"])},[c.value?U((T(),w("input",{key:1,ref_key:"renameInputEl",ref:d,"onUpdate:modelValue":z[1]||(z[1]=Z=>u.value=Z),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:C,onKeydown:ti(C,["enter"])},null,544)),[[ue,u.value]]):(T(),w(Ve,{key:0},[l("div",Ckt,J(B.node.title),1),l("div",wkt,[_e(oI,{class:"--clickable",onClick:S}),_e(zE,{modelValue:f.value,"onUpdate:modelValue":z[0]||(z[0]=Z=>f.value=Z),x:0,y:0,items:m.value,onClick:R},null,8,["modelValue","items"])])],64))],32)]),An(B.$slots,"content",{},()=>[l("div",{class:"__content",onKeydown:z[2]||(z[2]=ti(ae(()=>{},["stop"]),["delete"]))},[l("div",Rkt,[(T(!0),w(Ve,null,Je(g.value,Z=>An(B.$slots,"nodeInterface",{key:Z.id,type:"output",node:B.node,intf:Z},()=>[_e(ew,{node:B.node,intf:Z},null,8,["node","intf"])])),128))]),l("div",Akt,[(T(!0),w(Ve,null,Je(b.value,Z=>An(B.$slots,"nodeInterface",{key:Z.id,type:"input",node:B.node,intf:Z},()=>[_e(ew,{node:B.node,intf:Z},null,8,["node","intf"])])),128))])],32)])],46,xkt))}}),Okt=cn({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:us.NONE},isTemporary:{type:Boolean,default:!1}},setup(t){const{viewModel:e}=Ss(),{graph:n}=Bs(),s=(o,a)=>{const c=(o+n.value.panning.x)*n.value.scaling,u=(a+n.value.panning.y)*n.value.scaling;return[c,u]},i=et(()=>{const[o,a]=s(t.x1,t.y1),[c,u]=s(t.x2,t.y2);if(e.value.settings.useStraightConnections)return`M ${o} ${a} L ${c} ${u}`;{const d=.3*Math.abs(o-c);return`M ${o} ${a} C ${o+d} ${a}, ${c-d} ${u}, ${c} ${u}`}}),r=et(()=>({"--temporary":t.isTemporary,"--allowed":t.state===us.ALLOWED,"--forbidden":t.state===us.FORBIDDEN}));return{d:i,classes:r}}}),Ikt=["d"];function Mkt(t,e,n,s,i,r){return T(),w("path",{class:Ue(["baklava-connection",t.classes]),d:t.d},null,10,Ikt)}const aI=dn(Okt,[["render",Mkt]]);function Dkt(t){return document.getElementById(t.id)}function va(t){const e=document.getElementById(t.id),n=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:n&&n.length>0?n[0]:null}}const kkt=cn({components:{"connection-view":aI},props:{connection:{type:Object,required:!0}},setup(t){const{graph:e}=Bs();let n;const s=dt({x1:0,y1:0,x2:0,y2:0}),i=et(()=>t.connection.isInDanger?us.FORBIDDEN:us.NONE),r=et(()=>{var u;return(u=e.value.findNodeById(t.connection.from.nodeId))==null?void 0:u.position}),o=et(()=>{var u;return(u=e.value.findNodeById(t.connection.to.nodeId))==null?void 0:u.position}),a=u=>u.node&&u.interface&&u.port?[u.node.offsetLeft+u.interface.offsetLeft+u.port.offsetLeft+u.port.clientWidth/2,u.node.offsetTop+u.interface.offsetTop+u.port.offsetTop+u.port.clientHeight/2]:[0,0],c=()=>{const u=va(t.connection.from),d=va(t.connection.to);u.node&&d.node&&(n||(n=new ResizeObserver(()=>{c()}),n.observe(u.node),n.observe(d.node)));const[h,f]=a(u),[m,_]=a(d);s.value={x1:h,y1:f,x2:m,y2:_}};return Li(async()=>{await Fe(),c()}),wa(()=>{n&&n.disconnect()}),Fn([r,o],()=>c(),{deep:!0}),{d:s,state:i}}});function Lkt(t,e,n,s,i,r){const o=ct("connection-view");return T(),St(o,{x1:t.d.x1,y1:t.d.y1,x2:t.d.x2,y2:t.d.y2,state:t.state},null,8,["x1","y1","x2","y2","state"])}const Pkt=dn(kkt,[["render",Lkt]]);function Jd(t){return t.node&&t.interface&&t.port?[t.node.offsetLeft+t.interface.offsetLeft+t.port.offsetLeft+t.port.clientWidth/2,t.node.offsetTop+t.interface.offsetTop+t.port.offsetTop+t.port.clientHeight/2]:[0,0]}const Ukt=cn({components:{"connection-view":aI},props:{connection:{type:Object,required:!0}},setup(t){const e=et(()=>t.connection?t.connection.status:us.NONE);return{d:et(()=>{if(!t.connection)return{input:[0,0],output:[0,0]};const s=Jd(va(t.connection.from)),i=t.connection.to?Jd(va(t.connection.to)):[t.connection.mx||s[0],t.connection.my||s[1]];return t.connection.from.isInput?{input:i,output:s}:{input:s,output:i}}),status:e}}});function Fkt(t,e,n,s,i,r){const o=ct("connection-view");return T(),St(o,{x1:t.d.input[0],y1:t.d.input[1],x2:t.d.output[0],y2:t.d.output[1],state:t.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const Bkt=dn(Ukt,[["render",Fkt]]),Gkt=cn({setup(){const{viewModel:t}=Ss(),{graph:e}=Bs(),n=dt(null),s=Cd(t.value.settings.sidebar,"width"),i=et(()=>t.value.settings.sidebar.resizable),r=et(()=>{const h=e.value.sidebar.nodeId;return e.value.nodes.find(f=>f.id===h)}),o=et(()=>({width:`${s.value}px`})),a=et(()=>r.value?[...Object.values(r.value.inputs),...Object.values(r.value.outputs)].filter(f=>f.displayInSidebar&&f.component):[]),c=()=>{e.value.sidebar.visible=!1},u=()=>{window.addEventListener("mousemove",d),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",d)},{once:!0})},d=h=>{var f,m;const _=((m=(f=n.value)==null?void 0:f.parentElement)==null?void 0:m.getBoundingClientRect().width)??500;let E=s.value-h.movementX;E<300?E=300:E>.9*_&&(E=.9*_),s.value=E};return{el:n,graph:e,resizable:i,node:r,styles:o,displayedInterfaces:a,startResize:u,close:c}}}),Vkt={class:"__header"},zkt={class:"__node-name"};function Hkt(t,e,n,s,i,r){return T(),w("div",{ref:"el",class:Ue(["baklava-sidebar",{"--open":t.graph.sidebar.visible}]),style:$t(t.styles)},[t.resizable?(T(),w("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...o)=>t.startResize&&t.startResize(...o))},null,32)):G("",!0),l("div",Vkt,[l("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...o)=>t.close&&t.close(...o))},"×"),l("div",zkt,[l("b",null,J(t.node?t.node.title:""),1)])]),(T(!0),w(Ve,null,Je(t.displayedInterfaces,o=>(T(),w("div",{key:o.id,class:"__interface"},[(T(),St(hu(o.component),{modelValue:o.value,"onUpdate:modelValue":a=>o.value=a,node:t.node,intf:o},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const qkt=dn(Gkt,[["render",Hkt]]),Ykt=cn({__name:"Minimap",setup(t){const{viewModel:e}=Ss(),{graph:n}=Bs(),s=dt(null),i=dt(!1);let r,o=!1,a={x1:0,y1:0,x2:0,y2:0},c;const u=()=>{var C,A;if(!r)return;r.canvas.width=s.value.offsetWidth,r.canvas.height=s.value.offsetHeight;const D=new Map,x=new Map;for(const M of n.value.nodes){const q=Dkt(M),H=(q==null?void 0:q.offsetWidth)??0,P=(q==null?void 0:q.offsetHeight)??0,$=((C=M.position)==null?void 0:C.x)??0,ee=((A=M.position)==null?void 0:A.y)??0;D.set(M,{x1:$,y1:ee,x2:$+H,y2:ee+P}),x.set(M,q)}const O={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const M of D.values())M.x1O.x2&&(O.x2=M.x2),M.y2>O.y2&&(O.y2=M.y2);const B=50;O.x1-=B,O.y1-=B,O.x2+=B,O.y2+=B,a=O;const z=r.canvas.width/r.canvas.height,Z=(a.x2-a.x1)/(a.y2-a.y1);if(z>Z){const M=(z-Z)*(a.y2-a.y1)*.5;a.x1-=M,a.x2+=M}else{const M=a.x2-a.x1,q=a.y2-a.y1,H=(M-z*q)/z*.5;a.y1-=H,a.y2+=H}r.clearRect(0,0,r.canvas.width,r.canvas.height),r.strokeStyle="white";for(const M of n.value.connections){const[q,H]=Jd(va(M.from)),[P,$]=Jd(va(M.to)),[ee,re]=d(q,H),[me,Se]=d(P,$);if(r.beginPath(),r.moveTo(ee,re),e.value.settings.useStraightConnections)r.lineTo(me,Se);else{const le=.3*Math.abs(ee-me);r.bezierCurveTo(ee+le,re,me-le,Se,me,Se)}r.stroke()}r.strokeStyle="lightgray";for(const[M,q]of D.entries()){const[H,P]=d(q.x1,q.y1),[$,ee]=d(q.x2,q.y2);r.fillStyle=f(x.get(M)),r.beginPath(),r.rect(H,P,$-H,ee-P),r.fill(),r.stroke()}if(i.value){const M=_(),[q,H]=d(M.x1,M.y1),[P,$]=d(M.x2,M.y2);r.fillStyle="rgba(255, 255, 255, 0.2)",r.fillRect(q,H,P-q,$-H)}},d=(C,A)=>[(C-a.x1)/(a.x2-a.x1)*r.canvas.width,(A-a.y1)/(a.y2-a.y1)*r.canvas.height],h=(C,A)=>[C*(a.x2-a.x1)/r.canvas.width+a.x1,A*(a.y2-a.y1)/r.canvas.height+a.y1],f=C=>{if(C){const A=C.querySelector(".__content");if(A){const x=m(A);if(x)return x}const D=m(C);if(D)return D}return"gray"},m=C=>{const A=getComputedStyle(C).backgroundColor;if(A&&A!=="rgba(0, 0, 0, 0)")return A},_=()=>{const C=s.value.parentElement.offsetWidth,A=s.value.parentElement.offsetHeight,D=C/n.value.scaling-n.value.panning.x,x=A/n.value.scaling-n.value.panning.y;return{x1:-n.value.panning.x,y1:-n.value.panning.y,x2:D,y2:x}},E=C=>{C.button===0&&(o=!0,b(C))},b=C=>{if(o){const[A,D]=h(C.offsetX,C.offsetY),x=_(),O=(x.x2-x.x1)/2,B=(x.y2-x.y1)/2;n.value.panning.x=-(A-O),n.value.panning.y=-(D-B)}},g=()=>{o=!1},y=()=>{i.value=!0},v=()=>{i.value=!1,g()};Fn([i,n.value.panning,()=>n.value.scaling,()=>n.value.connections.length],()=>{u()});const S=et(()=>n.value.nodes.map(C=>C.position)),R=et(()=>n.value.nodes.map(C=>C.width));return Fn([S,R],()=>{u()},{deep:!0}),Li(()=>{r=s.value.getContext("2d"),r.imageSmoothingQuality="high",u(),c=setInterval(u,500)}),wa(()=>{clearInterval(c)}),(C,A)=>(T(),w("canvas",{ref_key:"canvas",ref:s,class:"baklava-minimap",onMouseenter:y,onMouseleave:v,onMousedown:ae(E,["self"]),onMousemove:ae(b,["self"]),onMouseup:g},null,544))}}),$kt=cn({components:{ContextMenu:zE,VerticalDots:oI},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(t){const{viewModel:e}=Ss(),{switchGraph:n}=Bs(),s=dt(!1),i=et(()=>t.type.startsWith(Vl));return{showContextMenu:s,hasContextMenu:i,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{s.value=!0},onContextMenuClick:c=>{const u=t.type.substring(Vl.length),d=e.value.editor.graphTemplates.find(h=>h.id===u);if(d)switch(c){case"editSubgraph":n(d);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(d);break}}}}}),Wkt=["data-node-type"],Kkt={class:"__title"},jkt={class:"__title-label"},Qkt={key:0,class:"__menu"};function Xkt(t,e,n,s,i,r){const o=ct("vertical-dots"),a=ct("context-menu");return T(),w("div",{class:"baklava-node --palette","data-node-type":t.type},[l("div",Kkt,[l("div",jkt,J(t.title),1),t.hasContextMenu?(T(),w("div",Qkt,[_e(o,{class:"--clickable",onPointerdown:e[0]||(e[0]=ae(()=>{},["stop","prevent"])),onClick:ae(t.openContextMenu,["stop","prevent"])},null,8,["onClick"]),_e(a,{modelValue:t.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=c=>t.showContextMenu=c),x:-100,y:0,items:t.contextMenuItems,onClick:t.onContextMenuClick,onPointerdown:e[2]||(e[2]=ae(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):G("",!0)])],8,Wkt)}const tw=dn($kt,[["render",Xkt]]),Zkt={class:"baklava-node-palette"},Jkt={key:0},eLt=cn({__name:"NodePalette",setup(t){const{viewModel:e}=Ss(),{x:n,y:s}=akt(),{transform:i}=tI(),r=eI(e),o=_s("editorEl"),a=dt(null),c=et(()=>{if(!a.value||!(o!=null&&o.value))return{};const{left:d,top:h}=o.value.getBoundingClientRect();return{top:`${s.value-h}px`,left:`${n.value-d}px`}}),u=(d,h)=>{a.value={type:d,nodeInformation:h};const f=()=>{const m=Wn(new h.type);e.value.displayedGraph.addNode(m);const _=o.value.getBoundingClientRect(),[E,b]=i(n.value-_.left,s.value-_.top);m.position.x=E,m.position.y=b,a.value=null,document.removeEventListener("pointerup",f)};document.addEventListener("pointerup",f)};return(d,h)=>(T(),w(Ve,null,[l("div",Zkt,[(T(!0),w(Ve,null,Je(ht(r),f=>(T(),w("section",{key:f.name},[f.name!=="default"?(T(),w("h1",Jkt,J(f.name),1)):G("",!0),(T(!0),w(Ve,null,Je(f.nodeTypes,(m,_)=>(T(),St(tw,{key:_,type:_,title:m.title,onPointerdown:E=>u(_,m)},null,8,["type","title","onPointerdown"]))),128))]))),128))]),_e(Ds,{name:"fade"},{default:He(()=>[a.value?(T(),w("div",{key:0,class:"baklava-dragged-node",style:$t(c.value)},[_e(tw,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):G("",!0)]),_:1})],64))}});let rd;const tLt=new Uint8Array(16);function nLt(){if(!rd&&(rd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!rd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rd(tLt)}const vn=[];for(let t=0;t<256;++t)vn.push((t+256).toString(16).slice(1));function sLt(t,e=0){return vn[t[e+0]]+vn[t[e+1]]+vn[t[e+2]]+vn[t[e+3]]+"-"+vn[t[e+4]]+vn[t[e+5]]+"-"+vn[t[e+6]]+vn[t[e+7]]+"-"+vn[t[e+8]]+vn[t[e+9]]+"-"+vn[t[e+10]]+vn[t[e+11]]+vn[t[e+12]]+vn[t[e+13]]+vn[t[e+14]]+vn[t[e+15]]}const iLt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nw={randomUUID:iLt};function eu(t,e,n){if(nw.randomUUID&&!e&&!t)return nw.randomUUID();t=t||{};const s=t.random||(t.rng||nLt)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=s[i];return e}return sLt(s)}const zl="SAVE_SUBGRAPH";function rLt(t,e){const n=()=>{const s=t.value;if(!s.template)throw new Error("Graph template property not set");s.template.update(s.save()),s.template.panning=s.panning,s.template.scaling=s.scaling};e.registerCommand(zl,{canExecute:()=>{var s;return t.value!==((s=t.value.editor)==null?void 0:s.graph)},execute:n})}const oLt={},aLt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},lLt=l("polyline",{points:"6 9 12 15 18 9"},null,-1),cLt=[lLt];function dLt(t,e){return T(),w("svg",aLt,cLt)}const uLt=dn(oLt,[["render",dLt]]),pLt=cn({components:{"i-arrow":uLt},props:{intf:{type:Object,required:!0}},setup(t){const e=dt(null),n=dt(!1),s=et(()=>t.intf.items.find(o=>typeof o=="string"?o===t.intf.value:o.value===t.intf.value)),i=et(()=>s.value?typeof s.value=="string"?s.value:s.value.text:""),r=o=>{t.intf.value=typeof o=="string"?o:o.value};return iI(e,()=>{n.value=!1}),{el:e,open:n,selectedItem:s,selectedText:i,setSelected:r}}}),_Lt=["title"],hLt={class:"__selected"},fLt={class:"__text"},mLt={class:"__icon"},gLt={class:"__dropdown"},bLt={class:"item --header"},ELt=["onClick"];function yLt(t,e,n,s,i,r){const o=ct("i-arrow");return T(),w("div",{ref:"el",class:Ue(["baklava-select",{"--open":t.open}]),title:t.intf.name,onClick:e[0]||(e[0]=a=>t.open=!t.open)},[l("div",hLt,[l("div",fLt,J(t.selectedText),1),l("div",mLt,[_e(o)])]),_e(Ds,{name:"slide-fade"},{default:He(()=>[U(l("div",gLt,[l("div",bLt,J(t.intf.name),1),(T(!0),w(Ve,null,Je(t.intf.items,(a,c)=>(T(),w("div",{key:c,class:Ue(["item",{"--active":a===t.selectedItem}]),onClick:u=>t.setSelected(a)},J(typeof a=="string"?a:a.text),11,ELt))),128))],512),[[wt,t.open]])]),_:1})],10,_Lt)}const vLt=dn(pLt,[["render",yLt]]);class SLt extends Xt{constructor(e,n,s){super(e,n),this.component=Hl(vLt),this.items=s}}const TLt=cn({props:{intf:{type:Object,required:!0}}});function xLt(t,e,n,s,i,r){return T(),w("div",null,J(t.intf.value),1)}const CLt=dn(TLt,[["render",xLt]]);class wLt extends Xt{constructor(e,n){super(e,n),this.component=Hl(CLt),this.setPort(!1)}}const RLt=cn({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){return{v:et({get:()=>t.modelValue,set:s=>{e("update:modelValue",s)}})}}}),ALt=["placeholder","title"];function NLt(t,e,n,s,i,r){return T(),w("div",null,[U(l("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>t.v=o),type:"text",class:"baklava-input",placeholder:t.intf.name,title:t.intf.name},null,8,ALt),[[ue,t.v]])])}const OLt=dn(RLt,[["render",NLt]]);class nc extends Xt{constructor(){super(...arguments),this.component=Hl(OLt)}}class lI extends KO{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new nc("Name","Input").setPort(!1)},this.outputs={placeholder:new Xt("Connection",void 0)}}}class cI extends jO{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new nc("Name","Output").setPort(!1),placeholder:new Xt("Connection",void 0)},this.outputs={output:new Xt("Output",void 0).setHidden(!0)}}}const dI="CREATE_SUBGRAPH",sw=[ba,Ea];function ILt(t,e,n){const s=()=>t.value.selectedNodes.filter(r=>!sw.includes(r.type)).length>0,i=()=>{const{viewModel:r}=Ss(),o=t.value,a=t.value.editor;if(o.selectedNodes.length===0)return;const c=o.selectedNodes.filter(x=>!sw.includes(x.type)),u=c.flatMap(x=>Object.values(x.inputs)),d=c.flatMap(x=>Object.values(x.outputs)),h=o.connections.filter(x=>!d.includes(x.from)&&u.includes(x.to)),f=o.connections.filter(x=>d.includes(x.from)&&!u.includes(x.to)),m=o.connections.filter(x=>d.includes(x.from)&&u.includes(x.to)),_=c.map(x=>x.save()),E=m.map(x=>({id:x.id,from:x.from.id,to:x.to.id})),b=new Map,{xLeft:g,xRight:y,yTop:v}=MLt(c);console.log(g,y,v);for(const[x,O]of h.entries()){const B=new lI;B.inputs.name.value=O.to.name,_.push({...B.save(),position:{x:y-r.value.settings.nodes.defaultWidth-100,y:v+x*200}}),E.push({id:eu(),from:B.outputs.placeholder.id,to:O.to.id}),b.set(O.to.id,B.graphInterfaceId)}for(const[x,O]of f.entries()){const B=new cI;B.inputs.name.value=O.from.name,_.push({...B.save(),position:{x:g+100,y:v+x*200}}),E.push({id:eu(),from:O.from.id,to:B.inputs.placeholder.id}),b.set(O.from.id,B.graphInterfaceId)}const S=Wn(new ju({connections:E,nodes:_,inputs:[],outputs:[]},a));a.addGraphTemplate(S);const R=a.nodeTypes.get(ya(S));if(!R)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");const C=Wn(new R.type);o.addNode(C);const A=Math.round(c.map(x=>x.position.x).reduce((x,O)=>x+O,0)/c.length),D=Math.round(c.map(x=>x.position.y).reduce((x,O)=>x+O,0)/c.length);C.position.x=A,C.position.y=D,h.forEach(x=>{o.removeConnection(x),o.addConnection(x.from,C.inputs[b.get(x.to.id)])}),f.forEach(x=>{o.removeConnection(x),o.addConnection(C.outputs[b.get(x.from.id)],x.to)}),c.forEach(x=>o.removeNode(x)),e.canExecuteCommand(zl)&&e.executeCommand(zl),n(S),t.value.panning={...o.panning},t.value.scaling=o.scaling};e.registerCommand(dI,{canExecute:s,execute:i})}function MLt(t){const e=t.reduce((i,r)=>{const o=r.position.x;return o{const o=r.position.y;return o{const o=r.position.x+r.width;return o>i?o:i},-1/0),xRight:e,yTop:n}}const iw="DELETE_NODES";function DLt(t,e){e.registerCommand(iw,{canExecute:()=>t.value.selectedNodes.length>0,execute(){t.value.selectedNodes.forEach(n=>t.value.removeNode(n))}}),e.registerHotkey(["Delete"],iw)}const uI="SWITCH_TO_MAIN_GRAPH";function kLt(t,e,n){e.registerCommand(uI,{canExecute:()=>t.value!==t.value.editor.graph,execute:()=>{e.executeCommand(zl),n(t.value.editor.graph)}})}function LLt(t,e,n){DLt(t,e),ILt(t,e,n),rLt(t,e),kLt(t,e,n)}class rw{constructor(e,n){this.type=e,e==="addNode"?this.nodeId=n:this.nodeState=n}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const n=e.editor.nodeTypes.get(this.nodeState.type);if(!n)return;const s=new n.type;e.addNode(s),s.load(this.nodeState),this.nodeId=s.id}removeNode(e){const n=e.nodes.find(s=>s.id===this.nodeId);n&&(this.nodeState=n.save(),e.removeNode(n))}}class ow{constructor(e,n){if(this.type=e,e==="addConnection")this.connectionId=n;else{const s=n;this.connectionState={id:s.id,from:s.from.id,to:s.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const n=e.findNodeInterface(this.connectionState.from),s=e.findNodeInterface(this.connectionState.to);!n||!s||e.addConnection(n,s)}removeConnection(e){const n=e.connections.find(s=>s.id===this.connectionId);n&&(this.connectionState={id:n.id,from:n.from.id,to:n.to.id},e.removeConnection(n))}}class PLt{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let n=this.steps.length-1;n>=0;n--)this.steps[n].undo(e)}redo(e){for(let n=0;n{if(!r.value)if(a.value)c.value.push(b);else for(o.value!==i.value.length-1&&(i.value=i.value.slice(0,o.value+1)),i.value.push(b),o.value++;i.value.length>s.value;)i.value.shift()},d=()=>{a.value=!0},h=()=>{a.value=!1,c.value.length>0&&(u(new PLt(c.value)),c.value=[])},f=()=>i.value.length!==0&&o.value!==-1,m=()=>{f()&&(r.value=!0,i.value[o.value--].undo(t.value),r.value=!1)},_=()=>i.value.length!==0&&o.value{_()&&(r.value=!0,i.value[++o.value].redo(t.value),r.value=!1)};return Fn(t,(b,g)=>{g&&(g.events.addNode.unsubscribe(n),g.events.removeNode.unsubscribe(n),g.events.addConnection.unsubscribe(n),g.events.removeConnection.unsubscribe(n)),b&&(b.events.addNode.subscribe(n,y=>{u(new rw("addNode",y.id))}),b.events.removeNode.subscribe(n,y=>{u(new rw("removeNode",y.save()))}),b.events.addConnection.subscribe(n,y=>{u(new ow("addConnection",y.id))}),b.events.removeConnection.subscribe(n,y=>{u(new ow("removeConnection",y))}))},{immediate:!0}),e.registerCommand(Xg,{canExecute:f,execute:m}),e.registerCommand(Zg,{canExecute:_,execute:E}),e.registerCommand(pI,{canExecute:()=>!a.value,execute:d}),e.registerCommand(_I,{canExecute:()=>a.value,execute:h}),e.registerHotkey(["Control","z"],Xg),e.registerHotkey(["Control","y"],Zg),Wn({maxSteps:s})}const Jg="COPY",eb="PASTE",FLt="CLEAR_CLIPBOARD";function BLt(t,e,n){const s=Symbol("ClipboardToken"),i=dt(""),r=dt(""),o=et(()=>!i.value),a=()=>{i.value="",r.value=""},c=()=>{const h=t.value.selectedNodes.flatMap(m=>[...Object.values(m.inputs),...Object.values(m.outputs)]),f=t.value.connections.filter(m=>h.includes(m.from)||h.includes(m.to)).map(m=>({from:m.from.id,to:m.to.id}));r.value=JSON.stringify(f),i.value=JSON.stringify(t.value.selectedNodes.map(m=>m.save()))},u=(h,f,m)=>{for(const _ of h){let E;if((!m||m==="input")&&(E=Object.values(_.inputs).find(b=>b.id===f)),!E&&(!m||m==="output")&&(E=Object.values(_.outputs).find(b=>b.id===f)),E)return E}},d=()=>{if(o.value)return;const h=new Map,f=JSON.parse(i.value),m=JSON.parse(r.value),_=[],E=[],b=t.value;n.executeCommand(pI);for(const g of f){const y=e.value.nodeTypes.get(g.type);if(!y){console.warn(`Node type ${g.type} not registered`);return}const v=new y.type,S=v.id;_.push(v),v.hooks.beforeLoad.subscribe(s,R=>{const C=R;return C.position&&(C.position.x+=100,C.position.y+=100),v.hooks.beforeLoad.unsubscribe(s),C}),b.addNode(v),v.load({...g,id:S}),v.id=S,h.set(g.id,S);for(const R of Object.values(v.inputs)){const C=eu();h.set(R.id,C),R.id=C}for(const R of Object.values(v.outputs)){const C=eu();h.set(R.id,C),R.id=C}}for(const g of m){const y=u(_,h.get(g.from),"output"),v=u(_,h.get(g.to),"input");if(!y||!v)continue;const S=b.addConnection(y,v);S&&E.push(S)}return t.value.selectedNodes=_,n.executeCommand(_I),{newNodes:_,newConnections:E}};return n.registerCommand(Jg,{canExecute:()=>t.value.selectedNodes.length>0,execute:c}),n.registerHotkey(["Control","c"],Jg),n.registerCommand(eb,{canExecute:()=>!o.value,execute:d}),n.registerHotkey(["Control","v"],eb),n.registerCommand(FLt,{canExecute:()=>!0,execute:a}),Wn({isEmpty:o})}const GLt="OPEN_SIDEBAR";function VLt(t,e){e.registerCommand(GLt,{execute:n=>{t.value.sidebar.nodeId=n,t.value.sidebar.visible=!0},canExecute:()=>!0})}function zLt(t,e){VLt(t,e)}const HLt={},qLt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},YLt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),$Lt=l("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),WLt=[YLt,$Lt];function KLt(t,e){return T(),w("svg",qLt,WLt)}const jLt=dn(HLt,[["render",KLt]]),QLt={},XLt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ZLt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),JLt=l("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),ePt=[ZLt,JLt];function tPt(t,e){return T(),w("svg",XLt,ePt)}const nPt=dn(QLt,[["render",tPt]]),sPt={},iPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},rPt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),oPt=l("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),aPt=l("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),lPt=l("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),cPt=[rPt,oPt,aPt,lPt];function dPt(t,e){return T(),w("svg",iPt,cPt)}const uPt=dn(sPt,[["render",dPt]]),pPt={},_Pt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},hPt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),fPt=l("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),mPt=l("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),gPt=[hPt,fPt,mPt];function bPt(t,e){return T(),w("svg",_Pt,gPt)}const EPt=dn(pPt,[["render",bPt]]),yPt={},vPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},SPt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),TPt=l("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),xPt=l("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),CPt=[SPt,TPt,xPt];function wPt(t,e){return T(),w("svg",vPt,CPt)}const RPt=dn(yPt,[["render",wPt]]),APt={},NPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},OPt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),IPt=l("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),MPt=l("circle",{cx:"12",cy:"14",r:"2"},null,-1),DPt=l("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),kPt=[OPt,IPt,MPt,DPt];function LPt(t,e){return T(),w("svg",NPt,kPt)}const PPt=dn(APt,[["render",LPt]]),UPt={},FPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},BPt=gu('',6),GPt=[BPt];function VPt(t,e){return T(),w("svg",FPt,GPt)}const zPt=dn(UPt,[["render",VPt]]),HPt=cn({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:t}=Ss();return{viewModel:t}}}),qPt=["disabled","title"];function YPt(t,e,n,s,i,r){return T(),w("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!t.viewModel.commandHandler.canExecuteCommand(t.command),title:t.title,onClick:e[0]||(e[0]=o=>t.viewModel.commandHandler.executeCommand(t.command))},[t.icon?(T(),St(hu(t.icon),{key:0})):(T(),w(Ve,{key:1},[Xe(J(t.title),1)],64))],8,qPt)}const $Pt=dn(HPt,[["render",YPt]]),WPt=cn({components:{ToolbarButton:$Pt},setup(){const{viewModel:t}=Ss();return{isSubgraph:et(()=>t.value.displayedGraph!==t.value.editor.graph),commands:[{command:Jg,title:"Copy",icon:RPt},{command:eb,title:"Paste",icon:EPt},{command:Xg,title:"Undo",icon:jLt},{command:Zg,title:"Redo",icon:nPt},{command:dI,title:"Create Subgraph",icon:zPt}],subgraphCommands:[{command:zl,title:"Save Subgraph",icon:PPt},{command:uI,title:"Back to Main Graph",icon:uPt}]}}}),KPt={class:"baklava-toolbar"};function jPt(t,e,n,s,i,r){const o=ct("toolbar-button");return T(),w("div",KPt,[(T(!0),w(Ve,null,Je(t.commands,a=>(T(),St(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),t.isSubgraph?(T(!0),w(Ve,{key:0},Je(t.subgraphCommands,a=>(T(),St(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):G("",!0)])}const QPt=dn(WPt,[["render",jPt]]),XPt={class:"connections-container"},ZPt=cn({__name:"Editor",props:{viewModel:{}},setup(t){const e=t,n=Symbol("EditorToken"),s=Cd(e,"viewModel");$Dt(s);const i=dt(null);Ho("editorEl",i);const r=et(()=>e.viewModel.displayedGraph.nodes),o=et(()=>e.viewModel.displayedGraph.nodes.map(A=>ZO(Cd(A,"position")))),a=et(()=>e.viewModel.displayedGraph.connections),c=et(()=>e.viewModel.displayedGraph.selectedNodes),u=WDt(),d=KDt(),h=jDt(s),f=et(()=>({...u.styles.value})),m=dt(0);e.viewModel.editor.hooks.load.subscribe(n,A=>(m.value++,A));const _=A=>{u.onPointerMove(A),d.onMouseMove(A)},E=A=>{A.button===0&&(A.target===i.value&&(S(),u.onPointerDown(A)),d.onMouseDown())},b=A=>{u.onPointerUp(A),d.onMouseUp()},g=A=>{A.key==="Tab"&&A.preventDefault(),e.viewModel.commandHandler.handleKeyDown(A)},y=A=>{e.viewModel.commandHandler.handleKeyUp(A)},v=A=>{["Control","Shift"].some(D=>e.viewModel.commandHandler.pressedKeys.includes(D))||S(),e.viewModel.displayedGraph.selectedNodes.push(A)},S=()=>{e.viewModel.displayedGraph.selectedNodes=[]},R=A=>{for(const D of e.viewModel.displayedGraph.selectedNodes){const x=r.value.indexOf(D),O=o.value[x];O.onPointerDown(A),document.addEventListener("pointermove",O.onPointerMove)}document.addEventListener("pointerup",C)},C=()=>{for(const A of e.viewModel.displayedGraph.selectedNodes){const D=r.value.indexOf(A),x=o.value[D];x.onPointerUp(),document.removeEventListener("pointermove",x.onPointerMove)}document.removeEventListener("pointerup",C)};return(A,D)=>(T(),w("div",{ref_key:"el",ref:i,tabindex:"-1",class:Ue(["baklava-editor",{"baklava-ignore-mouse":!!ht(d).temporaryConnection.value||ht(u).dragging.value,"--temporary-connection":!!ht(d).temporaryConnection.value}]),onPointermove:ae(_,["self"]),onPointerdown:E,onPointerup:b,onWheel:D[1]||(D[1]=ae((...x)=>ht(u).onMouseWheel&&ht(u).onMouseWheel(...x),["self"])),onKeydown:g,onKeyup:y,onContextmenu:D[2]||(D[2]=ae((...x)=>ht(h).open&&ht(h).open(...x),["self","prevent"]))},[An(A.$slots,"background",{},()=>[_e(ZDt)]),An(A.$slots,"toolbar",{},()=>[_e(QPt)]),An(A.$slots,"palette",{},()=>[_e(eLt)]),(T(),w("svg",XPt,[(T(!0),w(Ve,null,Je(a.value,x=>(T(),w("g",{key:x.id+m.value.toString()},[An(A.$slots,"connection",{connection:x},()=>[_e(Pkt,{connection:x},null,8,["connection"])])]))),128)),An(A.$slots,"temporaryConnection",{temporaryConnection:ht(d).temporaryConnection.value},()=>[ht(d).temporaryConnection.value?(T(),St(Bkt,{key:0,connection:ht(d).temporaryConnection.value},null,8,["connection"])):G("",!0)])])),l("div",{class:"node-container",style:$t(f.value)},[_e(Zs,{name:"fade"},{default:He(()=>[(T(!0),w(Ve,null,Je(r.value,(x,O)=>An(A.$slots,"node",{key:x.id+m.value.toString(),node:x,selected:c.value.includes(x),dragging:o.value[O].dragging.value,onSelect:B=>v(x),onStartDrag:R},()=>[_e(Nkt,{node:x,selected:c.value.includes(x),dragging:o.value[O].dragging.value,onSelect:B=>v(x),onStartDrag:R},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),An(A.$slots,"sidebar",{},()=>[_e(qkt)]),An(A.$slots,"minimap",{},()=>[A.viewModel.settings.enableMinimap?(T(),St(Ykt,{key:0})):G("",!0)]),An(A.$slots,"contextMenu",{contextMenu:ht(h)},()=>[A.viewModel.settings.contextMenu.enabled?(T(),St(zE,{key:0,modelValue:ht(h).show.value,"onUpdate:modelValue":D[0]||(D[0]=x=>ht(h).show.value=x),items:ht(h).items.value,x:ht(h).x.value,y:ht(h).y.value,onClick:ht(h).onClick},null,8,["modelValue","items","x","y","onClick"])):G("",!0)])],34))}}),JPt=["INPUT","TEXTAREA","SELECT"];function eUt(t){const e=dt([]),n=dt([]);return{pressedKeys:e,handleKeyDown:o=>{var a;e.value.includes(o.key)||e.value.push(o.key),!JPt.includes(((a=document.activeElement)==null?void 0:a.tagName)??"")&&n.value.forEach(c=>{c.keys.every(u=>e.value.includes(u))&&t(c.commandName)})},handleKeyUp:o=>{const a=e.value.indexOf(o.key);a>=0&&e.value.splice(a,1)},registerHotkey:(o,a)=>{n.value.push({keys:o,commandName:a})}}}const tUt=()=>{const t=dt(new Map),e=(r,o)=>{if(t.value.has(r))throw new Error(`Command "${r}" already exists`);t.value.set(r,o)},n=(r,o=!1,...a)=>{if(!t.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return}return t.value.get(r).execute(...a)},s=(r,o=!1,...a)=>{if(!t.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return!1}return t.value.get(r).canExecute(a)},i=eUt(n);return Wn({registerCommand:e,executeCommand:n,canExecuteCommand:s,...i})},nUt=t=>!(t instanceof tc);function sUt(t,e){return{switchGraph:s=>{let i;if(nUt(s))i=new tc(t.value),s.createGraph(i);else{if(s!==t.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");i=s}e.value&&e.value!==t.value.graph&&e.value.destroy(),i.panning=i.panning??s.panning??{x:0,y:0},i.scaling=i.scaling??s.scaling??1,i.selectedNodes=i.selectedNodes??[],i.sidebar=i.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=i}}}function iUt(t,e){t.position=t.position??{x:0,y:0},t.disablePointerEvents=!1,t.twoColumn=t.twoColumn??!1,t.width=t.width??e.defaultWidth}const rUt=()=>({useStraightConnections:!1,enableMinimap:!1,background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1},contextMenu:{enabled:!0,additionalItems:[]}});function oUt(t){const e=dt(t??new GDt),n=Symbol("ViewModelToken"),s=dt(null),i=gM(s),{switchGraph:r}=sUt(e,s),o=et(()=>i.value&&i.value!==e.value.graph),a=Wn(rUt()),c=tUt(),u=ULt(i,c),d=BLt(i,e,c),h={renderNode:new ts(null),renderInterface:new ts(null)};return LLt(i,c,r),zLt(i,c),Fn(e,(f,m)=>{m&&(m.events.registerGraph.unsubscribe(n),m.graphEvents.beforeAddNode.unsubscribe(n),f.nodeHooks.beforeLoad.unsubscribe(n),f.nodeHooks.afterSave.unsubscribe(n),f.graphTemplateHooks.beforeLoad.unsubscribe(n),f.graphTemplateHooks.afterSave.unsubscribe(n),f.graph.hooks.load.unsubscribe(n),f.graph.hooks.save.unsubscribe(n)),f&&(f.nodeHooks.beforeLoad.subscribe(n,(_,E)=>(E.position=_.position??{x:0,y:0},E.width=_.width??a.nodes.defaultWidth,E.twoColumn=_.twoColumn??!1,_)),f.nodeHooks.afterSave.subscribe(n,(_,E)=>(_.position=E.position,_.width=E.width,_.twoColumn=E.twoColumn,_)),f.graphTemplateHooks.beforeLoad.subscribe(n,(_,E)=>(E.panning=_.panning,E.scaling=_.scaling,_)),f.graphTemplateHooks.afterSave.subscribe(n,(_,E)=>(_.panning=E.panning,_.scaling=E.scaling,_)),f.graph.hooks.load.subscribe(n,(_,E)=>(E.panning=_.panning,E.scaling=_.scaling,_)),f.graph.hooks.save.subscribe(n,(_,E)=>(_.panning=E.panning,_.scaling=E.scaling,_)),f.graphEvents.beforeAddNode.subscribe(n,_=>iUt(_,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(lI,{category:"Subgraphs"}),e.value.registerNodeType(cI,{category:"Subgraphs"}),r(f.graph))},{immediate:!0}),Wn({editor:e,displayedGraph:i,isSubgraph:o,settings:a,commandHandler:c,history:u,clipboard:d,hooks:h,switchGraph:r})}const aUt=Fa({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new Xt("Request",""),agent_name:()=>new SLt("Personality","",tu.state.config.personalities).setPort(!1)},outputs:{response:()=>new Xt("Response","")},async calculate({request:t}){console.log(tu.state.config.personalities);let e="";try{e=(await de.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),lUt=Fa({type:"RAGNode",title:"RAG",inputs:{request:()=>new Xt("Prompt",""),document_path:()=>new nc("Document path","").setPort(!1)},outputs:{prompt:()=>new Xt("Prompt with Data","")},async calculate({request:t,document_path:e}){let n="";try{n=(await de.get("/rag",{params:{text:t,doc_path:e}})).data}catch(s){console.error(s)}return{response:n}}}),aw=Fa({type:"Task",title:"Task",inputs:{description:()=>new nc("Task description","").setPort(!1)},outputs:{prompt:()=>new Xt("Prompt")},calculate({description:t}){return{prompt:t}}}),lw=Fa({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new Xt("Input","")},outputs:{response:()=>new wLt("Text","")},async calculate({request:t}){}}),cw=Fa({type:"LLMNode",title:"LLM",inputs:{request:()=>new Xt("Request","")},outputs:{response:()=>new Xt("Response","")},async calculate({request:t}){console.log(tu.state.config.personalities);let e="";try{e=(await de.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),cUt=Fa({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new Xt("Question",""),outputs:()=>new nc("choices, one per line","","").setPort(!1)},outputs:{response:()=>new Xt("Response","")}}),dUt=cn({components:{"baklava-editor":ZPt},setup(){const t=oUt(),e=new YDt(t.editor);t.editor.registerNodeType(aUt),t.editor.registerNodeType(aw),t.editor.registerNodeType(lUt),t.editor.registerNodeType(lw),t.editor.registerNodeType(cw),t.editor.registerNodeType(cUt);const n=Symbol();e.events.afterRun.subscribe(n,a=>{e.pause(),VDt(a,t.editor),e.resume()}),e.start();function s(a,c,u){const d=new a;return t.displayedGraph.addNode(d),d.position.x=c,d.position.y=u,d}const i=s(aw,300,140),r=s(cw,550,140),o=s(lw,850,140);return t.displayedGraph.addConnection(i.outputs.prompt,r.inputs.request),t.displayedGraph.addConnection(r.outputs.response,o.inputs.text2display),{baklava:t,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),uUt={style:{width:"100vw",height:"100vh"}};function pUt(t,e,n,s,i,r){const o=ct("baklava-editor");return T(),w("div",uUt,[_e(o,{"view-model":t.baklava},null,8,["view-model"]),l("button",{onClick:e[0]||(e[0]=(...a)=>t.saveGraph&&t.saveGraph(...a))},"Save Graph"),l("button",{onClick:e[1]||(e[1]=(...a)=>t.loadGraph&&t.loadGraph(...a))},"Load Graph")])}const _Ut=at(dUt,[["render",pUt]]),hUt={},fUt={style:{width:"100vw",height:"100vh"}},mUt=["src"];function gUt(t,e,n,s,i,r){return T(),w("div",fUt,[l("iframe",{src:t.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,mUt)])}const bUt=at(hUt,[["render",gUt]]),EUt={},yUt={style:{width:"100vw",height:"100vh"}},vUt=["src"];function SUt(t,e,n,s,i,r){return T(),w("div",yUt,[l("iframe",{src:t.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,vUt)])}const TUt=at(EUt,[["render",SUt]]);const xUt={data(){return{apps:[],githubApps:[],selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:""}},computed:{combinedApps(){this.apps.map(e=>e.name);const t=new Map(this.apps.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},filteredApps(){return this.combinedApps.filter(t=>t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase()))},categories(){return[...new Set(this.combinedApps.map(t=>t.category))]}},methods:{async fetchApps(){this.loading=!0;try{const t=await de.get("/apps");this.apps=t.data,this.showMessage("Refresh successful!",!0)}catch{this.showMessage("Failed to refresh apps.",!1)}finally{this.loading=!1}},async openAppsFolder(){this.loading=!0;try{console.log("opening apps folder");const t=await de.post("/show_apps_folder",{client_id:this.$store.state.client_id})}catch{this.showMessage("Failed to open apps folder.",!1)}finally{this.loading=!1}},async fetchGithubApps(){this.loading=!0;try{const t=await de.get("/github/apps");this.githubApps=t.data.apps,await this.fetchApps()}catch{this.showMessage("Failed to refresh GitHub apps.",!1)}finally{this.loading=!1}},async handleAppClick(t){if(t.installed){this.selectedApp=t;const e=await de.get(`/apps/${t.folder_name}/index.html`);this.appCode=e.data}else this.showMessage(`Please install ${t.folder_name} to view its code.`,!1)},backToZoo(){this.selectedApp=null,this.appCode=""},async installApp(t){this.loading=!0;try{await de.post(`/install/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Installation succeeded!",!0)}catch{this.showMessage("Installation failed.",!1)}finally{this.loading=!1,this.fetchApps(),this.fetchGithubApps()}},async uninstallApp(t){this.loading=!0;try{await de.post(`/uninstall/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Uninstallation succeeded!",!0)}catch{this.showMessage("Uninstallation failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async deleteApp(t){this.loading=!0;try{await de.post(`/delete/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Deletion succeeded!",!0)}catch{this.showMessage("Deletion failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async editApp(t){this.loading=!0;try{const e=await de.post("/open_app_in_vscode",{client_id:this.$store.state.client_id,app_name:t.folder_name});this.showMessage(e.data.message,!0)}catch{this.showMessage("Failed to open folder in VSCode.",!1)}finally{this.loading=!1}},async downloadApp(t){try{const e=await de.get(`/download/${t}`,{responseType:"blob"}),n=window.URL.createObjectURL(new Blob([e.data])),s=document.createElement("a");s.href=n,s.setAttribute("download",`${t}.zip`),document.body.appendChild(s),s.click(),s.remove(),this.showMessage("Download started!",!0)}catch{this.showMessage("Download failed.",!1)}},openApp(t){t.installed?window.open(`/apps/${t.folder_name}/index.html?client_id=${this.$store.state.client_id}`,"_blank"):this.showMessage(`Please install ${t.name} before opening.`,!1)},showMessage(t,e){this.message=t,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)}},mounted(){this.fetchGithubApps()}},jn=t=>(Mi("data-v-bb6b8f80"),t=t(),Di(),t),CUt={class:"app-zoo w-full p-6 overflow-y-auto 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"},wUt={class:"bg-white shadow-lg rounded-lg p-4 max-w-4xl mx-auto"},RUt={class:"flex flex-wrap items-center justify-between gap-4"},AUt={class:"flex items-center space-x-4"},NUt=jn(()=>l("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)),OUt=jn(()=>l("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"})],-1)),IUt={class:"relative flex-grow max-w-md"},MUt=jn(()=>l("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("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)),DUt={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},kUt=jn(()=>l("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1)),LUt=jn(()=>l("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)),PUt=[kUt,LUt],UUt={class:"text-3xl font-bold mb-6 text-gray-800"},FUt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},BUt={class:"flex-grow"},GUt={class:"flex items-center mb-4"},VUt=["src"],zUt={class:"font-bold text-xl text-gray-800"},HUt={class:"text-sm text-gray-600"},qUt={class:"text-sm text-gray-600"},YUt={class:"mb-4"},$Ut=jn(()=>l("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),WUt={class:"text-sm text-gray-600 h-20 overflow-y-auto"},KUt={class:"text-sm text-gray-600 mb-2"},jUt={key:0,class:"mb-4"},QUt=jn(()=>l("h4",{class:"font-semibold mb-1 text-gray-700"},"Disclaimer:",-1)),XUt={class:"text-xs text-gray-500 italic h-16 overflow-y-auto"},ZUt={class:"mt-auto pt-4 border-t"},JUt={class:"flex justify-between"},eFt=["onClick"],tFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)),nFt=[tFt],sFt=["onClick"],iFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)),rFt=[iFt],oFt=["onClick"],aFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)),lFt=[aFt],cFt=["onClick"],dFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)),uFt=[dFt],pFt=["onClick"],_Ft=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)),hFt=[_Ft],fFt=["onClick"],mFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)),gFt=[mFt],bFt=["onClick"],EFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)),yFt=[EFt],vFt={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},SFt={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},TFt={class:"flex justify-between items-center mb-4"},xFt={class:"text-2xl font-bold"},CFt=["srcdoc"],wFt={key:1,class:"text-center text-red-500"};function RFt(t,e,n,s,i,r){return T(),w("div",CUt,[l("nav",wUt,[l("div",RUt,[l("div",AUt,[l("button",{onClick:e[0]||(e[0]=(...o)=>r.fetchGithubApps&&r.fetchGithubApps(...o)),class:"btn btn-primary","aria-label":"Refresh apps from GitHub"},[NUt,Xe(" Refresh ")]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.openAppsFolder&&r.openAppsFolder(...o)),class:"btn btn-secondary","aria-label":"Open apps folder"},[OUt,Xe(" Open Folder ")])]),l("div",IUt,[U(l("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>i.searchQuery=o),placeholder:"Search apps...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search apps"},null,512),[[ue,i.searchQuery]]),MUt])])]),i.loading?(T(),w("div",DUt,PUt)):G("",!0),(T(!0),w(Ve,null,Je(r.categories,o=>(T(),w("div",{key:o,class:"mb-12"},[l("h2",UUt,J(o),1),l("div",FUt,[(T(!0),w(Ve,null,Je(r.filteredApps.filter(a=>a.category===o),a=>(T(),w("div",{key:a.uid,class:"app-card bg-white border rounded-xl shadow-lg p-6 hover:shadow-xl transition duration-300 ease-in-out flex flex-col h-full"},[l("div",BUt,[l("div",GUt,[l("img",{src:a.icon,alt:"App Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4"},null,8,VUt),l("div",null,[l("h3",zUt,J(a.name),1),l("p",HUt,"Author: "+J(a.author),1),l("p",qUt,"Version: "+J(a.version),1)])]),l("div",YUt,[$Ut,l("p",WUt,J(a.description),1)]),l("p",KUt,"AI Model: "+J(a.model_name),1),a.disclaimer&&a.disclaimer.trim()!==""?(T(),w("div",jUt,[QUt,l("p",XUt,J(a.disclaimer),1)])):G("",!0)]),l("div",ZUt,[l("div",JUt,[a.installed?(T(),w("button",{key:0,onClick:c=>r.uninstallApp(a.folder_name),class:"text-red-500 hover:text-red-600 transition duration-300 ease-in-out",title:"Uninstall"},nFt,8,eFt)):a.existsInFolder?(T(),w("button",{key:1,onClick:c=>r.deleteApp(a.name),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:"Delete"},rFt,8,sFt)):(T(),w("button",{key:2,onClick:c=>r.installApp(a.folder_name),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Install"},lFt,8,oFt)),a.installed?(T(),w("button",{key:3,onClick:c=>r.editApp(a),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Edit"},uFt,8,cFt)):G("",!0),l("button",{onClick:c=>r.downloadApp(a.name),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Download"},hFt,8,pFt),l("button",{onClick:c=>r.handleAppClick(a),class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out",title:"View"},gFt,8,fFt),l("button",{onClick:c=>r.openApp(a),class:"text-indigo-500 hover:text-indigo-600 transition duration-300 ease-in-out",title:"Open"},yFt,8,bFt)])])]))),128))])]))),128)),i.selectedApp?(T(),w("div",vFt,[l("div",SFt,[l("div",TFt,[l("h2",xFt,J(i.selectedApp.name),1),l("button",{onClick:e[3]||(e[3]=(...o)=>r.backToZoo&&r.backToZoo(...o)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(T(),w("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,CFt)):(T(),w("p",wFt,"Please install this app to view its code."))])])):G("",!0),i.message?(T(),w("div",{key:2,class:Ue(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},J(i.message),3)):G("",!0)])}const AFt=at(xUt,[["render",RFt],["__scopeId","data-v-bb6b8f80"]]),NFt=nP({history:yL("/"),routes:[{path:"/apps_view/",name:"AppsZoo",component:AFt},{path:"/auto_sd_view/",name:"AutoSD",component:TUt},{path:"/comfyui_view/",name:"ComfyUI",component:bUt},{path:"/playground/",name:"playground",component:uet},{path:"/extensions/",name:"extensions",component:Tet},{path:"/help_view/",name:"help_view",component:Net},{path:"/settings/",name:"settings",component:Abt},{path:"/training/",name:"training",component:jbt},{path:"/quantizing/",name:"quantizing",component:iEt},{path:"/",name:"discussions",component:bwt},{path:"/",name:"interactive",component:DDt},{path:"/",name:"nodes",component:_Ut}]});const Qu=lD(_Xe);console.log("Loaded main.js");function OFt(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const tu=kD({state(){return{is_rt_on:!1,language:"english",languages:[],currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},posts_headers:{accept:"application/json","Content-Type":"application/json"},client_id:"",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,api_post_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,databases:[]}},mutations:{setisRTOn(t,e){t.is_rt_on=e},setLanguages(t,e){t.languages=e},setLanguage(t,e){t.language=e},setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=e},setIsModelOk(t,e){t.isModelOk=e},setIsGenerating(t,e){t.isGenerating=e},setConfig(t,e){t.config=e},setPersonalities(t,e){t.personalities=e},setMountedPers(t,e){t.mountedPers=e},setMountedPersArr(t,e){t.mountedPersArr=e},setbindingsZoo(t,e){t.bindingsZoo=e},setModelsArr(t,e){t.modelsArr=e},setselectedModel(t,e){t.selectedModel=e},setDiskUsage(t,e){t.diskUsage=e},setRamUsage(t,e){t.ramUsage=e},setVramUsage(t,e){t.vramUsage=e},setModelsZoo(t,e){t.modelsZoo=e},setCurrentBinding(t,e){t.currentBinding=e},setCurrentModel(t,e){t.currentModel=e},setDatabases(t,e){t.databases=e},setTheme(t){this.currentTheme=t}},getters:{getisRTOn(t){return t.is_rt_on},getLanguages(t){return t.languages},getLanguage(t){return t.language},getIsConnected(t){return t.isConnected},getIsModelOk(t){return t.isModelOk},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getMountedPers(t){return t.mountedPers},getbindingsZoo(t){return t.bindingsZoo},getModelsArr(t){return t.modelsArr},getDiskUsage(t){return t.diskUsage},getRamUsage(t){return t.ramUsage},getVramUsage(t){return t.vramUsage},getDatabasesList(t){return t.databases},getModelsZoo(t){return t.modelsZoo},getCyrrentBinding(t){return t.currentBinding},getCurrentModel(t){return t.currentModel}},actions:{async getVersion(){try{let t=await de.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data,console.log("version res:",t),console.log("version :",this.state.version))}catch{console.log("Coudln't get version")}},async refreshConfig({commit:t}){console.log("Fetching configuration");try{console.log("Fetching configuration with client id: ",this.state.client_id);const e=await hI("get_config",this.state.client_id);e.active_personality_id<0&&(e.active_personality_id=0);let n=e.personalities[e.active_personality_id].split("/");e.personality_category=n[0],e.personality_folder=n[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),t("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:t}){let e=await Gs("list_databases");console.log("databases:",e),t("setDatabases",e)},async fetchisRTOn({commit:t}){const n=(await de.get("/is_rt_on")).data.status;t("setisRTOn",n)},async fetchLanguages({commit:t}){console.log("get_personality_languages_list",this.state.client_id);const e=await de.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("languages",n),t("setLanguages",n)},async fetchLanguage({commit:t}){console.log("get_personality_language",this.state.client_id);const e=await de.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("language",n),t("setLanguage",n)},async changeLanguage({commit:t},e){console.log("Changing language to ",e);let n=await de.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await de.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const s=n.data;console.log("languages",s),t("setLanguages",s),n=await de.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("language",i),t("setLanguage",i),console.log("Language changed successfully:",n.data.message)},async deleteLanguage({commit:t},e){console.log("Deleting ",e);let n=await de.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await de.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const s=n.data;console.log("languages",s),t("setLanguages",s),n=await de.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("language",i),t("setLanguage",i),console.log("Language changed successfully:",n.data.message)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await Gs("get_all_personalities"),s=Object.keys(n);console.log("Personalities recovered:"+this.state.config.personalities);for(let i=0;i{let u=!1;for(const h of this.state.config.personalities)if(h.includes(r+"/"+c.folder))if(u=!0,h.includes(":")){const f=h.split(":");c.language=f[1]}else c.language=null;let d={};return d=c,d.category=r,d.full_path=r+"/"+c.folder,d.isMounted=u,d});e.length==0?e=a:e=e.concat(a)}e.sort((i,r)=>i.name.localeCompare(r.name)),t("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:t}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const n=[];for(let s=0;sa.full_path==i||a.full_path==r[0]);if(o>=0){let a=OFt(this.state.personalities[o]);r.length>1&&(a.language=r[1]),a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(c=>c.full_path=="generic/lollms")])}else n.push(s),console.log("Couldn't load personality : ",i)}for(let s=n.length-1;s>=0;s--)console.log("Removing personality : ",this.state.config.personalities[n[s]]),this.state.config.personalities.splice(n[s],1),this.state.config.active_personality_id>n[s]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e),this.state.mountedPers=this.state.personalities[this.state.personalities.findIndex(s=>s.full_path==this.state.config.personalities[this.state.config.active_personality_id]||s.full_path+":"+s.language==this.state.config.personalities[this.state.config.active_personality_id])]},async refreshBindings({commit:t}){let e=await Gs("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(s=>s.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),t("setbindingsZoo",e);const n=e.findIndex(s=>s.name==this.state.config.binding_name);n!=-1&&t("setCurrentBinding",e[n])},async refreshModelsZoo({commit:t}){console.log("Fetching models");const n=(await de.get("/get_available_models")).data.filter(s=>s.variants&&s.variants.length>0);console.log(`get_available_models: ${n}`),t("setModelsZoo",n)},async refreshModelStatus({commit:t}){let e=await Gs("get_model_status");t("setIsModelOk",e.status)},async refreshModels({commit:t}){console.log("Fetching models");let e=await Gs("list_models");console.log(`Found ${e}`);let n=await Gs("get_active_model");console.log("Selected model ",n),n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),console.log("setModelsArr",e),console.log("this.state.modelsZoo",this.state.modelsZoo),this.state.modelsZoo.map(i=>{i.isInstalled=e.includes(i.name)}),this.state.installedModels=this.state.modelsZoo.filter(i=>i.isInstalled);const s=this.state.modelsZoo.findIndex(i=>i.name==this.state.config.model_name);s!=-1&&t("setCurrentModel",this.state.modelsZoo[s])},async refreshDiskUsage({commit:t}){this.state.diskUsage=await Gs("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await Gs("ram_usage")},async refreshVramUsage({commit:t}){const e=await Gs("vram_usage"),n=[];if(e.nb_gpus>0){for(let i=0;i!!n.value),onPointerDown:c=>{n.value={x:c.pageX,y:c.pageY},s.value={x:t.value.x,y:t.value.y}},onPointerMove:c=>{if(n.value){const u=c.pageX-n.value.x,d=c.pageY-n.value.y;t.value.x=s.value.x+u/e.value.scaling,t.value.y=s.value.y+d/e.value.scaling}},onPointerUp:()=>{n.value=null,s.value=null}}}function JO(t,e,n){if(!e.template)return!1;if(ya(e.template)===n)return!0;const s=t.graphTemplates.find(r=>ya(r)===n);return s?s.nodes.filter(r=>r.type.startsWith(Vl)).some(r=>JO(t,e,r.type)):!1}function eI(t){return et(()=>{const e=Array.from(t.value.editor.nodeTypes.entries()),n=new Set(e.map(([,i])=>i.category)),s=[];for(const i of n.values()){let r=e.filter(([,o])=>o.category===i);t.value.displayedGraph.template?r=r.filter(([o])=>!JO(t.value.editor,t.value.displayedGraph,o)):r=r.filter(([o])=>![ba,Ea].includes(o)),r.length>0&&s.push({name:i,nodeTypes:Object.fromEntries(r)})}return s.sort((i,r)=>i.name==="default"?-1:r.name==="default"||i.name>r.name?1:-1),s})}function tI(){const{graph:t}=Bs();return{transform:(n,s)=>{const i=n/t.value.scaling-t.value.panning.x,r=s/t.value.scaling-t.value.panning.y;return[i,r]}}}function ekt(){const{graph:t}=Bs();let e=[],n=-1,s={x:0,y:0};const i=et(()=>t.value.panning),r=ZO(i),o=et(()=>({"transform-origin":"0 0",transform:`scale(${t.value.scaling}) translate(${t.value.panning.x}px, ${t.value.panning.y}px)`})),a=(m,_,E)=>{const b=[m/t.value.scaling-t.value.panning.x,_/t.value.scaling-t.value.panning.y],g=[m/E-t.value.panning.x,_/E-t.value.panning.y],y=[g[0]-b[0],g[1]-b[1]];t.value.panning.x+=y[0],t.value.panning.y+=y[1],t.value.scaling=E},c=m=>{m.preventDefault();let _=m.deltaY;m.deltaMode===1&&(_*=32);const E=t.value.scaling*(1-_/3e3);a(m.offsetX,m.offsetY,E)},u=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:o,...r,onPointerDown:m=>{if(e.push(m),r.onPointerDown(m),e.length===2){const{ax:_,ay:E,bx:b,by:g}=u();s={x:_+(b-_)/2,y:E+(g-E)/2}}},onPointerMove:m=>{for(let _=0;_0){const R=t.value.scaling*(1+(S-n)/500);a(s.x,s.y,R)}n=S}else r.onPointerMove(m)},onPointerUp:m=>{e=e.filter(_=>_.pointerId!==m.pointerId),n=-1,r.onPointerUp()},onMouseWheel:c}}var us=(t=>(t[t.NONE=0]="NONE",t[t.ALLOWED=1]="ALLOWED",t[t.FORBIDDEN=2]="FORBIDDEN",t))(us||{});const nI=Symbol();function tkt(){const{graph:t}=Bs(),e=dt(null),n=dt(null),s=a=>{e.value&&(e.value.mx=a.offsetX/t.value.scaling-t.value.panning.x,e.value.my=a.offsetY/t.value.scaling-t.value.panning.y)},i=()=>{if(n.value){if(e.value)return;const a=t.value.connections.find(c=>c.to===n.value);n.value.isInput&&a?(e.value={status:us.NONE,from:a.from},t.value.removeConnection(a)):e.value={status:us.NONE,from:n.value},e.value.mx=void 0,e.value.my=void 0}},r=()=>{if(e.value&&n.value){if(e.value.from===n.value)return;t.value.addConnection(e.value.from,e.value.to)}e.value=null},o=a=>{if(n.value=a??null,a&&e.value){e.value.to=a;const c=t.value.checkConnection(e.value.from,e.value.to);if(e.value.status=c.connectionAllowed?us.ALLOWED:us.FORBIDDEN,c.connectionAllowed){const u=c.connectionsInDanger.map(d=>d.id);t.value.connections.forEach(d=>{u.includes(d.id)&&(d.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=us.NONE,t.value.connections.forEach(c=>{c.isInDanger=!1}))};return Ho(nI,{temporaryConnection:e,hoveredOver:o}),{temporaryConnection:e,onMouseMove:s,onMouseDown:i,onMouseUp:r,hoveredOver:o}}function nkt(t){const e=dt(!1),n=dt(0),s=dt(0),i=eI(t),{transform:r}=tI(),o=et(()=>{let d=[];const h={};for(const m of i.value){const _=Object.entries(m.nodeTypes).map(([E,b])=>({label:b.title,value:"addNode:"+E}));m.name==="default"?d=_:h[m.name]=_}const f=[...Object.entries(h).map(([m,_])=>({label:m,submenu:_}))];return f.length>0&&d.length>0&&f.push({isDivider:!0}),f.push(...d),f}),a=et(()=>t.value.settings.contextMenu.additionalItems.length===0?o.value:[{label:"Add node",submenu:o.value},...t.value.settings.contextMenu.additionalItems.map(d=>"isDivider"in d||"submenu"in d?d:{label:d.label,value:"command:"+d.command,disabled:!t.value.commandHandler.canExecuteCommand(d.command)})]);function c(d){e.value=!0,n.value=d.offsetX,s.value=d.offsetY}function u(d){if(d.startsWith("addNode:")){const h=d.substring(8),f=t.value.editor.nodeTypes.get(h);if(!f)return;const m=Wn(new f.type);t.value.displayedGraph.addNode(m);const[_,E]=r(n.value,s.value);m.position.x=_,m.position.y=E}else if(d.startsWith("command:")){const h=d.substring(8);t.value.commandHandler.canExecuteCommand(h)&&t.value.commandHandler.executeCommand(h)}}return{show:e,x:n,y:s,items:a,open:c,onClick:u}}const skt=cn({setup(){const{viewModel:t}=Ss(),{graph:e}=Bs();return{styles:et(()=>{const s=t.value.settings.background,i=e.value.panning.x*e.value.scaling,r=e.value.panning.y*e.value.scaling,o=e.value.scaling*s.gridSize,a=o/s.gridDivision,c=`${o}px ${o}px, ${o}px ${o}px`,u=e.value.scaling>s.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${i}px top ${r}px`,backgroundSize:`${c} ${u}`}})}}}),dn=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n};function ikt(t,e,n,s,i,r){return T(),w("div",{class:"background",style:$t(t.styles)},null,4)}const rkt=dn(skt,[["render",ikt]]);function okt(t){return mw()?(zI(t),!0):!1}function GE(t){return typeof t=="function"?t():ht(t)}const sI=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const akt=Object.prototype.toString,lkt=t=>akt.call(t)==="[object Object]",yd=()=>{},ckt=dkt();function dkt(){var t,e;return sI&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ukt(t,e,n=!1){return e.reduce((s,i)=>(i in t&&(!n||t[i]!==void 0)&&(s[i]=t[i]),s),{})}function pkt(t,e={}){if(!un(t))return TM(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const s in t.value)n[s]=SM(()=>({get(){return t.value[s]},set(i){var r;if((r=GE(e.replaceRef))!=null?r:!0)if(Array.isArray(t.value)){const a=[...t.value];a[s]=i,t.value=a}else{const a={...t.value,[s]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[s]=i}}));return n}function ll(t){var e;const n=GE(t);return(e=n==null?void 0:n.$el)!=null?e:n}const VE=sI?window:void 0;function vl(...t){let e,n,s,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,s,i]=t,e=VE):[e,n,s,i]=t,!e)return yd;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const r=[],o=()=>{r.forEach(d=>d()),r.length=0},a=(d,h,f,m)=>(d.addEventListener(h,f,m),()=>d.removeEventListener(h,f,m)),c=Fn(()=>[ll(e),GE(i)],([d,h])=>{if(o(),!d)return;const f=lkt(h)?{...h}:h;r.push(...n.flatMap(m=>s.map(_=>a(d,m,_,f))))},{immediate:!0,flush:"post"}),u=()=>{c(),o()};return okt(u),u}let J1=!1;function iI(t,e,n={}){const{window:s=VE,ignore:i=[],capture:r=!0,detectIframe:o=!1}=n;if(!s)return yd;ckt&&!J1&&(J1=!0,Array.from(s.document.body.children).forEach(f=>f.addEventListener("click",yd)),s.document.documentElement.addEventListener("click",yd));let a=!0;const c=f=>i.some(m=>{if(typeof m=="string")return Array.from(s.document.querySelectorAll(m)).some(_=>_===f.target||f.composedPath().includes(_));{const _=ll(m);return _&&(f.target===_||f.composedPath().includes(_))}}),d=[vl(s,"click",f=>{const m=ll(t);if(!(!m||m===f.target||f.composedPath().includes(m))){if(f.detail===0&&(a=!c(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:r}),vl(s,"pointerdown",f=>{const m=ll(t);a=!c(f)&&!!(m&&!f.composedPath().includes(m))},{passive:!0}),o&&vl(s,"blur",f=>{setTimeout(()=>{var m;const _=ll(t);((m=s.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(_!=null&&_.contains(s.document.activeElement))&&e(f)},0)})].filter(Boolean);return()=>d.forEach(f=>f())}const rI={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},_kt=Object.keys(rI);function hkt(t={}){const{target:e=VE}=t,n=dt(!1),s=dt(t.initialValue||{});Object.assign(s.value,rI,s.value);const i=r=>{n.value=!0,!(t.pointerTypes&&!t.pointerTypes.includes(r.pointerType))&&(s.value=ukt(r,_kt,!1))};if(e){const r={passive:!0};vl(e,["pointerdown","pointermove","pointerup"],i,r),vl(e,"pointerleave",()=>n.value=!1,r)}return{...pkt(s),isInside:n}}const fkt=["onMouseenter","onMouseleave","onClick"],mkt={class:"flex-fill"},gkt={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},bkt=l("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[l("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),Ekt=[bkt],zE=cn({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(t,{emit:e}){const n=t,s=e;let i=null;const r=dt(null),o=dt(-1),a=dt(0),c=dt({x:!1,y:!1}),u=et(()=>n.flippable&&(c.value.x||n.isFlipped.x)),d=et(()=>n.flippable&&(c.value.y||n.isFlipped.y)),h=et(()=>{const y={};return n.isNested||(y.top=(d.value?n.y-a.value:n.y)+"px",y.left=n.x+"px"),y}),f=et(()=>({"--flipped-x":u.value,"--flipped-y":d.value,"--nested":n.isNested})),m=et(()=>n.items.map(y=>({...y,hover:!1})));Fn([()=>n.y,()=>n.items],()=>{var y,v,S,R;a.value=n.items.length*30;const C=((v=(y=r.value)==null?void 0:y.parentElement)==null?void 0:v.offsetWidth)??0,A=((R=(S=r.value)==null?void 0:S.parentElement)==null?void 0:R.offsetHeight)??0;c.value.x=!n.isNested&&n.x>C*.75,c.value.y=!n.isNested&&n.y+a.value>A-20}),iI(r,()=>{n.modelValue&&s("update:modelValue",!1)});const _=y=>{!y.submenu&&y.value&&(s("click",y.value),s("update:modelValue",!1))},E=y=>{s("click",y),o.value=-1,n.isNested||s("update:modelValue",!1)},b=(y,v)=>{n.items[v].submenu&&(o.value=v,i!==null&&(clearTimeout(i),i=null))},g=(y,v)=>{n.items[v].submenu&&(i=window.setTimeout(()=>{o.value=-1,i=null},200))};return(y,v)=>{const S=ct("ContextMenu",!0);return T(),St(Ds,{name:"slide-fade"},{default:He(()=>[U(l("div",{ref_key:"el",ref:r,class:Ue(["baklava-context-menu",f.value]),style:$t(h.value)},[(T(!0),w(Ve,null,Je(m.value,(R,C)=>(T(),w(Ve,null,[R.isDivider?(T(),w("div",{key:`d-${C}`,class:"divider"})):(T(),w("div",{key:`i-${C}`,class:Ue(["item",{submenu:!!R.submenu,"--disabled":!!R.disabled}]),onMouseenter:A=>b(A,C),onMouseleave:A=>g(A,C),onClick:ae(A=>_(R),["stop","prevent"])},[l("div",mkt,J(R.label),1),R.submenu?(T(),w("div",gkt,Ekt)):G("",!0),R.submenu?(T(),St(S,{key:1,"model-value":o.value===C,items:R.submenu,"is-nested":!0,"is-flipped":{x:u.value,y:d.value},flippable:y.flippable,onClick:E},null,8,["model-value","items","is-flipped","flippable"])):G("",!0)],42,fkt))],64))),256))],6),[[wt,y.modelValue]])]),_:1})}}}),ykt={},vkt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Skt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Tkt=l("circle",{cx:"12",cy:"12",r:"1"},null,-1),xkt=l("circle",{cx:"12",cy:"19",r:"1"},null,-1),Ckt=l("circle",{cx:"12",cy:"5",r:"1"},null,-1),wkt=[Skt,Tkt,xkt,Ckt];function Rkt(t,e){return T(),w("svg",vkt,wkt)}const oI=dn(ykt,[["render",Rkt]]),Akt=["id"],Nkt={key:0,class:"__tooltip"},Okt={key:2,class:"align-middle"},ew=cn({__name:"NodeInterface",props:{node:{},intf:{}},setup(t){const e=(b,g=100)=>{const y=b!=null&&b.toString?b.toString():"";return y.length>g?y.slice(0,g)+"...":y},n=t,{viewModel:s}=Ss(),{hoveredOver:i,temporaryConnection:r}=_s(nI),o=dt(null),a=et(()=>n.intf.connectionCount>0),c=dt(!1),u=et(()=>s.value.settings.displayValueOnHover&&c.value),d=et(()=>({"--input":n.intf.isInput,"--output":!n.intf.isInput,"--connected":a.value})),h=et(()=>n.intf.component&&(!n.intf.isInput||!n.intf.port||n.intf.connectionCount===0)),f=()=>{c.value=!0,i(n.intf)},m=()=>{c.value=!1,i(void 0)},_=()=>{o.value&&s.value.hooks.renderInterface.execute({intf:n.intf,el:o.value})},E=()=>{const b=s.value.displayedGraph.sidebar;b.nodeId=n.node.id,b.optionName=n.intf.name,b.visible=!0};return Li(_),ql(_),(b,g)=>{var y;return T(),w("div",{id:b.intf.id,ref_key:"el",ref:o,class:Ue(["baklava-node-interface",d.value])},[b.intf.port?(T(),w("div",{key:0,class:Ue(["__port",{"--selected":((y=ht(r))==null?void 0:y.from)===b.intf}]),onPointerover:f,onPointerout:m},[An(b.$slots,"portTooltip",{showTooltip:u.value},()=>[u.value===!0?(T(),w("span",Nkt,J(e(b.intf.value)),1)):G("",!0)])],34)):G("",!0),h.value?(T(),St(hu(b.intf.component),{key:1,modelValue:b.intf.value,"onUpdate:modelValue":g[0]||(g[0]=v=>b.intf.value=v),node:b.node,intf:b.intf,onOpenSidebar:E},null,40,["modelValue","node","intf"])):(T(),w("span",Okt,J(b.intf.name),1))],10,Akt)}}}),Ikt=["id","data-node-type"],Mkt={class:"__title-label"},Dkt={class:"__menu"},kkt={class:"__outputs"},Lkt={class:"__inputs"},Pkt=cn({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(t,{emit:e}){const n=t,s=e,{viewModel:i}=Ss(),{graph:r,switchGraph:o}=Bs(),a=dt(null),c=dt(!1),u=dt(""),d=dt(null),h=dt(!1),f=dt(!1),m=et(()=>{const B=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return n.node.type.startsWith(Vl)&&B.push({value:"editSubgraph",label:"Edit Subgraph"}),B}),_=et(()=>({"--selected":n.selected,"--dragging":n.dragging,"--two-column":!!n.node.twoColumn})),E=et(()=>{var B,z;return{top:`${((B=n.node.position)==null?void 0:B.y)??0}px`,left:`${((z=n.node.position)==null?void 0:z.x)??0}px`,"--width":`${n.node.width??i.value.settings.nodes.defaultWidth}px`}}),b=et(()=>Object.values(n.node.inputs).filter(B=>!B.hidden)),g=et(()=>Object.values(n.node.outputs).filter(B=>!B.hidden)),y=()=>{s("select")},v=B=>{n.selected||y(),s("start-drag",B)},S=()=>{f.value=!0},R=async B=>{var z;switch(B){case"delete":r.value.removeNode(n.node);break;case"rename":u.value=n.node.title,c.value=!0,await Fe(),(z=d.value)==null||z.focus();break;case"editSubgraph":o(n.node.template);break}},C=()=>{n.node.title=u.value,c.value=!1},A=()=>{a.value&&i.value.hooks.renderNode.execute({node:n.node,el:a.value})},D=B=>{h.value=!0,B.preventDefault()},x=B=>{if(!h.value)return;const z=n.node.width+B.movementX/r.value.scaling,Z=i.value.settings.nodes.minWidth,M=i.value.settings.nodes.maxWidth;n.node.width=Math.max(Z,Math.min(M,z))},O=()=>{h.value=!1};return Li(()=>{A(),window.addEventListener("mousemove",x),window.addEventListener("mouseup",O)}),ql(A),wa(()=>{window.removeEventListener("mousemove",x),window.removeEventListener("mouseup",O)}),(B,z)=>(T(),w("div",{id:B.node.id,ref_key:"el",ref:a,class:Ue(["baklava-node",_.value]),style:$t(E.value),"data-node-type":B.node.type,onPointerdown:y},[ht(i).settings.nodes.resizable?(T(),w("div",{key:0,class:"__resize-handle",onMousedown:D},null,32)):G("",!0),An(B.$slots,"title",{},()=>[l("div",{class:"__title",onPointerdown:ae(v,["self","stop"])},[c.value?U((T(),w("input",{key:1,ref_key:"renameInputEl",ref:d,"onUpdate:modelValue":z[1]||(z[1]=Z=>u.value=Z),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:C,onKeydown:ti(C,["enter"])},null,544)),[[ue,u.value]]):(T(),w(Ve,{key:0},[l("div",Mkt,J(B.node.title),1),l("div",Dkt,[_e(oI,{class:"--clickable",onClick:S}),_e(zE,{modelValue:f.value,"onUpdate:modelValue":z[0]||(z[0]=Z=>f.value=Z),x:0,y:0,items:m.value,onClick:R},null,8,["modelValue","items"])])],64))],32)]),An(B.$slots,"content",{},()=>[l("div",{class:"__content",onKeydown:z[2]||(z[2]=ti(ae(()=>{},["stop"]),["delete"]))},[l("div",kkt,[(T(!0),w(Ve,null,Je(g.value,Z=>An(B.$slots,"nodeInterface",{key:Z.id,type:"output",node:B.node,intf:Z},()=>[_e(ew,{node:B.node,intf:Z},null,8,["node","intf"])])),128))]),l("div",Lkt,[(T(!0),w(Ve,null,Je(b.value,Z=>An(B.$slots,"nodeInterface",{key:Z.id,type:"input",node:B.node,intf:Z},()=>[_e(ew,{node:B.node,intf:Z},null,8,["node","intf"])])),128))])],32)])],46,Ikt))}}),Ukt=cn({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:us.NONE},isTemporary:{type:Boolean,default:!1}},setup(t){const{viewModel:e}=Ss(),{graph:n}=Bs(),s=(o,a)=>{const c=(o+n.value.panning.x)*n.value.scaling,u=(a+n.value.panning.y)*n.value.scaling;return[c,u]},i=et(()=>{const[o,a]=s(t.x1,t.y1),[c,u]=s(t.x2,t.y2);if(e.value.settings.useStraightConnections)return`M ${o} ${a} L ${c} ${u}`;{const d=.3*Math.abs(o-c);return`M ${o} ${a} C ${o+d} ${a}, ${c-d} ${u}, ${c} ${u}`}}),r=et(()=>({"--temporary":t.isTemporary,"--allowed":t.state===us.ALLOWED,"--forbidden":t.state===us.FORBIDDEN}));return{d:i,classes:r}}}),Fkt=["d"];function Bkt(t,e,n,s,i,r){return T(),w("path",{class:Ue(["baklava-connection",t.classes]),d:t.d},null,10,Fkt)}const aI=dn(Ukt,[["render",Bkt]]);function Gkt(t){return document.getElementById(t.id)}function va(t){const e=document.getElementById(t.id),n=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:n&&n.length>0?n[0]:null}}const Vkt=cn({components:{"connection-view":aI},props:{connection:{type:Object,required:!0}},setup(t){const{graph:e}=Bs();let n;const s=dt({x1:0,y1:0,x2:0,y2:0}),i=et(()=>t.connection.isInDanger?us.FORBIDDEN:us.NONE),r=et(()=>{var u;return(u=e.value.findNodeById(t.connection.from.nodeId))==null?void 0:u.position}),o=et(()=>{var u;return(u=e.value.findNodeById(t.connection.to.nodeId))==null?void 0:u.position}),a=u=>u.node&&u.interface&&u.port?[u.node.offsetLeft+u.interface.offsetLeft+u.port.offsetLeft+u.port.clientWidth/2,u.node.offsetTop+u.interface.offsetTop+u.port.offsetTop+u.port.clientHeight/2]:[0,0],c=()=>{const u=va(t.connection.from),d=va(t.connection.to);u.node&&d.node&&(n||(n=new ResizeObserver(()=>{c()}),n.observe(u.node),n.observe(d.node)));const[h,f]=a(u),[m,_]=a(d);s.value={x1:h,y1:f,x2:m,y2:_}};return Li(async()=>{await Fe(),c()}),wa(()=>{n&&n.disconnect()}),Fn([r,o],()=>c(),{deep:!0}),{d:s,state:i}}});function zkt(t,e,n,s,i,r){const o=ct("connection-view");return T(),St(o,{x1:t.d.x1,y1:t.d.y1,x2:t.d.x2,y2:t.d.y2,state:t.state},null,8,["x1","y1","x2","y2","state"])}const Hkt=dn(Vkt,[["render",zkt]]);function Jd(t){return t.node&&t.interface&&t.port?[t.node.offsetLeft+t.interface.offsetLeft+t.port.offsetLeft+t.port.clientWidth/2,t.node.offsetTop+t.interface.offsetTop+t.port.offsetTop+t.port.clientHeight/2]:[0,0]}const qkt=cn({components:{"connection-view":aI},props:{connection:{type:Object,required:!0}},setup(t){const e=et(()=>t.connection?t.connection.status:us.NONE);return{d:et(()=>{if(!t.connection)return{input:[0,0],output:[0,0]};const s=Jd(va(t.connection.from)),i=t.connection.to?Jd(va(t.connection.to)):[t.connection.mx||s[0],t.connection.my||s[1]];return t.connection.from.isInput?{input:i,output:s}:{input:s,output:i}}),status:e}}});function Ykt(t,e,n,s,i,r){const o=ct("connection-view");return T(),St(o,{x1:t.d.input[0],y1:t.d.input[1],x2:t.d.output[0],y2:t.d.output[1],state:t.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const $kt=dn(qkt,[["render",Ykt]]),Wkt=cn({setup(){const{viewModel:t}=Ss(),{graph:e}=Bs(),n=dt(null),s=Cd(t.value.settings.sidebar,"width"),i=et(()=>t.value.settings.sidebar.resizable),r=et(()=>{const h=e.value.sidebar.nodeId;return e.value.nodes.find(f=>f.id===h)}),o=et(()=>({width:`${s.value}px`})),a=et(()=>r.value?[...Object.values(r.value.inputs),...Object.values(r.value.outputs)].filter(f=>f.displayInSidebar&&f.component):[]),c=()=>{e.value.sidebar.visible=!1},u=()=>{window.addEventListener("mousemove",d),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",d)},{once:!0})},d=h=>{var f,m;const _=((m=(f=n.value)==null?void 0:f.parentElement)==null?void 0:m.getBoundingClientRect().width)??500;let E=s.value-h.movementX;E<300?E=300:E>.9*_&&(E=.9*_),s.value=E};return{el:n,graph:e,resizable:i,node:r,styles:o,displayedInterfaces:a,startResize:u,close:c}}}),Kkt={class:"__header"},jkt={class:"__node-name"};function Qkt(t,e,n,s,i,r){return T(),w("div",{ref:"el",class:Ue(["baklava-sidebar",{"--open":t.graph.sidebar.visible}]),style:$t(t.styles)},[t.resizable?(T(),w("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...o)=>t.startResize&&t.startResize(...o))},null,32)):G("",!0),l("div",Kkt,[l("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...o)=>t.close&&t.close(...o))},"×"),l("div",jkt,[l("b",null,J(t.node?t.node.title:""),1)])]),(T(!0),w(Ve,null,Je(t.displayedInterfaces,o=>(T(),w("div",{key:o.id,class:"__interface"},[(T(),St(hu(o.component),{modelValue:o.value,"onUpdate:modelValue":a=>o.value=a,node:t.node,intf:o},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const Xkt=dn(Wkt,[["render",Qkt]]),Zkt=cn({__name:"Minimap",setup(t){const{viewModel:e}=Ss(),{graph:n}=Bs(),s=dt(null),i=dt(!1);let r,o=!1,a={x1:0,y1:0,x2:0,y2:0},c;const u=()=>{var C,A;if(!r)return;r.canvas.width=s.value.offsetWidth,r.canvas.height=s.value.offsetHeight;const D=new Map,x=new Map;for(const M of n.value.nodes){const q=Gkt(M),H=(q==null?void 0:q.offsetWidth)??0,P=(q==null?void 0:q.offsetHeight)??0,$=((C=M.position)==null?void 0:C.x)??0,ee=((A=M.position)==null?void 0:A.y)??0;D.set(M,{x1:$,y1:ee,x2:$+H,y2:ee+P}),x.set(M,q)}const O={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const M of D.values())M.x1O.x2&&(O.x2=M.x2),M.y2>O.y2&&(O.y2=M.y2);const B=50;O.x1-=B,O.y1-=B,O.x2+=B,O.y2+=B,a=O;const z=r.canvas.width/r.canvas.height,Z=(a.x2-a.x1)/(a.y2-a.y1);if(z>Z){const M=(z-Z)*(a.y2-a.y1)*.5;a.x1-=M,a.x2+=M}else{const M=a.x2-a.x1,q=a.y2-a.y1,H=(M-z*q)/z*.5;a.y1-=H,a.y2+=H}r.clearRect(0,0,r.canvas.width,r.canvas.height),r.strokeStyle="white";for(const M of n.value.connections){const[q,H]=Jd(va(M.from)),[P,$]=Jd(va(M.to)),[ee,re]=d(q,H),[me,Se]=d(P,$);if(r.beginPath(),r.moveTo(ee,re),e.value.settings.useStraightConnections)r.lineTo(me,Se);else{const le=.3*Math.abs(ee-me);r.bezierCurveTo(ee+le,re,me-le,Se,me,Se)}r.stroke()}r.strokeStyle="lightgray";for(const[M,q]of D.entries()){const[H,P]=d(q.x1,q.y1),[$,ee]=d(q.x2,q.y2);r.fillStyle=f(x.get(M)),r.beginPath(),r.rect(H,P,$-H,ee-P),r.fill(),r.stroke()}if(i.value){const M=_(),[q,H]=d(M.x1,M.y1),[P,$]=d(M.x2,M.y2);r.fillStyle="rgba(255, 255, 255, 0.2)",r.fillRect(q,H,P-q,$-H)}},d=(C,A)=>[(C-a.x1)/(a.x2-a.x1)*r.canvas.width,(A-a.y1)/(a.y2-a.y1)*r.canvas.height],h=(C,A)=>[C*(a.x2-a.x1)/r.canvas.width+a.x1,A*(a.y2-a.y1)/r.canvas.height+a.y1],f=C=>{if(C){const A=C.querySelector(".__content");if(A){const x=m(A);if(x)return x}const D=m(C);if(D)return D}return"gray"},m=C=>{const A=getComputedStyle(C).backgroundColor;if(A&&A!=="rgba(0, 0, 0, 0)")return A},_=()=>{const C=s.value.parentElement.offsetWidth,A=s.value.parentElement.offsetHeight,D=C/n.value.scaling-n.value.panning.x,x=A/n.value.scaling-n.value.panning.y;return{x1:-n.value.panning.x,y1:-n.value.panning.y,x2:D,y2:x}},E=C=>{C.button===0&&(o=!0,b(C))},b=C=>{if(o){const[A,D]=h(C.offsetX,C.offsetY),x=_(),O=(x.x2-x.x1)/2,B=(x.y2-x.y1)/2;n.value.panning.x=-(A-O),n.value.panning.y=-(D-B)}},g=()=>{o=!1},y=()=>{i.value=!0},v=()=>{i.value=!1,g()};Fn([i,n.value.panning,()=>n.value.scaling,()=>n.value.connections.length],()=>{u()});const S=et(()=>n.value.nodes.map(C=>C.position)),R=et(()=>n.value.nodes.map(C=>C.width));return Fn([S,R],()=>{u()},{deep:!0}),Li(()=>{r=s.value.getContext("2d"),r.imageSmoothingQuality="high",u(),c=setInterval(u,500)}),wa(()=>{clearInterval(c)}),(C,A)=>(T(),w("canvas",{ref_key:"canvas",ref:s,class:"baklava-minimap",onMouseenter:y,onMouseleave:v,onMousedown:ae(E,["self"]),onMousemove:ae(b,["self"]),onMouseup:g},null,544))}}),Jkt=cn({components:{ContextMenu:zE,VerticalDots:oI},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(t){const{viewModel:e}=Ss(),{switchGraph:n}=Bs(),s=dt(!1),i=et(()=>t.type.startsWith(Vl));return{showContextMenu:s,hasContextMenu:i,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{s.value=!0},onContextMenuClick:c=>{const u=t.type.substring(Vl.length),d=e.value.editor.graphTemplates.find(h=>h.id===u);if(d)switch(c){case"editSubgraph":n(d);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(d);break}}}}}),eLt=["data-node-type"],tLt={class:"__title"},nLt={class:"__title-label"},sLt={key:0,class:"__menu"};function iLt(t,e,n,s,i,r){const o=ct("vertical-dots"),a=ct("context-menu");return T(),w("div",{class:"baklava-node --palette","data-node-type":t.type},[l("div",tLt,[l("div",nLt,J(t.title),1),t.hasContextMenu?(T(),w("div",sLt,[_e(o,{class:"--clickable",onPointerdown:e[0]||(e[0]=ae(()=>{},["stop","prevent"])),onClick:ae(t.openContextMenu,["stop","prevent"])},null,8,["onClick"]),_e(a,{modelValue:t.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=c=>t.showContextMenu=c),x:-100,y:0,items:t.contextMenuItems,onClick:t.onContextMenuClick,onPointerdown:e[2]||(e[2]=ae(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):G("",!0)])],8,eLt)}const tw=dn(Jkt,[["render",iLt]]),rLt={class:"baklava-node-palette"},oLt={key:0},aLt=cn({__name:"NodePalette",setup(t){const{viewModel:e}=Ss(),{x:n,y:s}=hkt(),{transform:i}=tI(),r=eI(e),o=_s("editorEl"),a=dt(null),c=et(()=>{if(!a.value||!(o!=null&&o.value))return{};const{left:d,top:h}=o.value.getBoundingClientRect();return{top:`${s.value-h}px`,left:`${n.value-d}px`}}),u=(d,h)=>{a.value={type:d,nodeInformation:h};const f=()=>{const m=Wn(new h.type);e.value.displayedGraph.addNode(m);const _=o.value.getBoundingClientRect(),[E,b]=i(n.value-_.left,s.value-_.top);m.position.x=E,m.position.y=b,a.value=null,document.removeEventListener("pointerup",f)};document.addEventListener("pointerup",f)};return(d,h)=>(T(),w(Ve,null,[l("div",rLt,[(T(!0),w(Ve,null,Je(ht(r),f=>(T(),w("section",{key:f.name},[f.name!=="default"?(T(),w("h1",oLt,J(f.name),1)):G("",!0),(T(!0),w(Ve,null,Je(f.nodeTypes,(m,_)=>(T(),St(tw,{key:_,type:_,title:m.title,onPointerdown:E=>u(_,m)},null,8,["type","title","onPointerdown"]))),128))]))),128))]),_e(Ds,{name:"fade"},{default:He(()=>[a.value?(T(),w("div",{key:0,class:"baklava-dragged-node",style:$t(c.value)},[_e(tw,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):G("",!0)]),_:1})],64))}});let rd;const lLt=new Uint8Array(16);function cLt(){if(!rd&&(rd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!rd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rd(lLt)}const vn=[];for(let t=0;t<256;++t)vn.push((t+256).toString(16).slice(1));function dLt(t,e=0){return vn[t[e+0]]+vn[t[e+1]]+vn[t[e+2]]+vn[t[e+3]]+"-"+vn[t[e+4]]+vn[t[e+5]]+"-"+vn[t[e+6]]+vn[t[e+7]]+"-"+vn[t[e+8]]+vn[t[e+9]]+"-"+vn[t[e+10]]+vn[t[e+11]]+vn[t[e+12]]+vn[t[e+13]]+vn[t[e+14]]+vn[t[e+15]]}const uLt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nw={randomUUID:uLt};function eu(t,e,n){if(nw.randomUUID&&!e&&!t)return nw.randomUUID();t=t||{};const s=t.random||(t.rng||cLt)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=s[i];return e}return dLt(s)}const zl="SAVE_SUBGRAPH";function pLt(t,e){const n=()=>{const s=t.value;if(!s.template)throw new Error("Graph template property not set");s.template.update(s.save()),s.template.panning=s.panning,s.template.scaling=s.scaling};e.registerCommand(zl,{canExecute:()=>{var s;return t.value!==((s=t.value.editor)==null?void 0:s.graph)},execute:n})}const _Lt={},hLt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},fLt=l("polyline",{points:"6 9 12 15 18 9"},null,-1),mLt=[fLt];function gLt(t,e){return T(),w("svg",hLt,mLt)}const bLt=dn(_Lt,[["render",gLt]]),ELt=cn({components:{"i-arrow":bLt},props:{intf:{type:Object,required:!0}},setup(t){const e=dt(null),n=dt(!1),s=et(()=>t.intf.items.find(o=>typeof o=="string"?o===t.intf.value:o.value===t.intf.value)),i=et(()=>s.value?typeof s.value=="string"?s.value:s.value.text:""),r=o=>{t.intf.value=typeof o=="string"?o:o.value};return iI(e,()=>{n.value=!1}),{el:e,open:n,selectedItem:s,selectedText:i,setSelected:r}}}),yLt=["title"],vLt={class:"__selected"},SLt={class:"__text"},TLt={class:"__icon"},xLt={class:"__dropdown"},CLt={class:"item --header"},wLt=["onClick"];function RLt(t,e,n,s,i,r){const o=ct("i-arrow");return T(),w("div",{ref:"el",class:Ue(["baklava-select",{"--open":t.open}]),title:t.intf.name,onClick:e[0]||(e[0]=a=>t.open=!t.open)},[l("div",vLt,[l("div",SLt,J(t.selectedText),1),l("div",TLt,[_e(o)])]),_e(Ds,{name:"slide-fade"},{default:He(()=>[U(l("div",xLt,[l("div",CLt,J(t.intf.name),1),(T(!0),w(Ve,null,Je(t.intf.items,(a,c)=>(T(),w("div",{key:c,class:Ue(["item",{"--active":a===t.selectedItem}]),onClick:u=>t.setSelected(a)},J(typeof a=="string"?a:a.text),11,wLt))),128))],512),[[wt,t.open]])]),_:1})],10,yLt)}const ALt=dn(ELt,[["render",RLt]]);class NLt extends Xt{constructor(e,n,s){super(e,n),this.component=Hl(ALt),this.items=s}}const OLt=cn({props:{intf:{type:Object,required:!0}}});function ILt(t,e,n,s,i,r){return T(),w("div",null,J(t.intf.value),1)}const MLt=dn(OLt,[["render",ILt]]);class DLt extends Xt{constructor(e,n){super(e,n),this.component=Hl(MLt),this.setPort(!1)}}const kLt=cn({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){return{v:et({get:()=>t.modelValue,set:s=>{e("update:modelValue",s)}})}}}),LLt=["placeholder","title"];function PLt(t,e,n,s,i,r){return T(),w("div",null,[U(l("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>t.v=o),type:"text",class:"baklava-input",placeholder:t.intf.name,title:t.intf.name},null,8,LLt),[[ue,t.v]])])}const ULt=dn(kLt,[["render",PLt]]);class nc extends Xt{constructor(){super(...arguments),this.component=Hl(ULt)}}class lI extends KO{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new nc("Name","Input").setPort(!1)},this.outputs={placeholder:new Xt("Connection",void 0)}}}class cI extends jO{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new nc("Name","Output").setPort(!1),placeholder:new Xt("Connection",void 0)},this.outputs={output:new Xt("Output",void 0).setHidden(!0)}}}const dI="CREATE_SUBGRAPH",sw=[ba,Ea];function FLt(t,e,n){const s=()=>t.value.selectedNodes.filter(r=>!sw.includes(r.type)).length>0,i=()=>{const{viewModel:r}=Ss(),o=t.value,a=t.value.editor;if(o.selectedNodes.length===0)return;const c=o.selectedNodes.filter(x=>!sw.includes(x.type)),u=c.flatMap(x=>Object.values(x.inputs)),d=c.flatMap(x=>Object.values(x.outputs)),h=o.connections.filter(x=>!d.includes(x.from)&&u.includes(x.to)),f=o.connections.filter(x=>d.includes(x.from)&&!u.includes(x.to)),m=o.connections.filter(x=>d.includes(x.from)&&u.includes(x.to)),_=c.map(x=>x.save()),E=m.map(x=>({id:x.id,from:x.from.id,to:x.to.id})),b=new Map,{xLeft:g,xRight:y,yTop:v}=BLt(c);console.log(g,y,v);for(const[x,O]of h.entries()){const B=new lI;B.inputs.name.value=O.to.name,_.push({...B.save(),position:{x:y-r.value.settings.nodes.defaultWidth-100,y:v+x*200}}),E.push({id:eu(),from:B.outputs.placeholder.id,to:O.to.id}),b.set(O.to.id,B.graphInterfaceId)}for(const[x,O]of f.entries()){const B=new cI;B.inputs.name.value=O.from.name,_.push({...B.save(),position:{x:g+100,y:v+x*200}}),E.push({id:eu(),from:O.from.id,to:B.inputs.placeholder.id}),b.set(O.from.id,B.graphInterfaceId)}const S=Wn(new ju({connections:E,nodes:_,inputs:[],outputs:[]},a));a.addGraphTemplate(S);const R=a.nodeTypes.get(ya(S));if(!R)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");const C=Wn(new R.type);o.addNode(C);const A=Math.round(c.map(x=>x.position.x).reduce((x,O)=>x+O,0)/c.length),D=Math.round(c.map(x=>x.position.y).reduce((x,O)=>x+O,0)/c.length);C.position.x=A,C.position.y=D,h.forEach(x=>{o.removeConnection(x),o.addConnection(x.from,C.inputs[b.get(x.to.id)])}),f.forEach(x=>{o.removeConnection(x),o.addConnection(C.outputs[b.get(x.from.id)],x.to)}),c.forEach(x=>o.removeNode(x)),e.canExecuteCommand(zl)&&e.executeCommand(zl),n(S),t.value.panning={...o.panning},t.value.scaling=o.scaling};e.registerCommand(dI,{canExecute:s,execute:i})}function BLt(t){const e=t.reduce((i,r)=>{const o=r.position.x;return o{const o=r.position.y;return o{const o=r.position.x+r.width;return o>i?o:i},-1/0),xRight:e,yTop:n}}const iw="DELETE_NODES";function GLt(t,e){e.registerCommand(iw,{canExecute:()=>t.value.selectedNodes.length>0,execute(){t.value.selectedNodes.forEach(n=>t.value.removeNode(n))}}),e.registerHotkey(["Delete"],iw)}const uI="SWITCH_TO_MAIN_GRAPH";function VLt(t,e,n){e.registerCommand(uI,{canExecute:()=>t.value!==t.value.editor.graph,execute:()=>{e.executeCommand(zl),n(t.value.editor.graph)}})}function zLt(t,e,n){GLt(t,e),FLt(t,e,n),pLt(t,e),VLt(t,e,n)}class rw{constructor(e,n){this.type=e,e==="addNode"?this.nodeId=n:this.nodeState=n}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const n=e.editor.nodeTypes.get(this.nodeState.type);if(!n)return;const s=new n.type;e.addNode(s),s.load(this.nodeState),this.nodeId=s.id}removeNode(e){const n=e.nodes.find(s=>s.id===this.nodeId);n&&(this.nodeState=n.save(),e.removeNode(n))}}class ow{constructor(e,n){if(this.type=e,e==="addConnection")this.connectionId=n;else{const s=n;this.connectionState={id:s.id,from:s.from.id,to:s.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const n=e.findNodeInterface(this.connectionState.from),s=e.findNodeInterface(this.connectionState.to);!n||!s||e.addConnection(n,s)}removeConnection(e){const n=e.connections.find(s=>s.id===this.connectionId);n&&(this.connectionState={id:n.id,from:n.from.id,to:n.to.id},e.removeConnection(n))}}class HLt{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let n=this.steps.length-1;n>=0;n--)this.steps[n].undo(e)}redo(e){for(let n=0;n{if(!r.value)if(a.value)c.value.push(b);else for(o.value!==i.value.length-1&&(i.value=i.value.slice(0,o.value+1)),i.value.push(b),o.value++;i.value.length>s.value;)i.value.shift()},d=()=>{a.value=!0},h=()=>{a.value=!1,c.value.length>0&&(u(new HLt(c.value)),c.value=[])},f=()=>i.value.length!==0&&o.value!==-1,m=()=>{f()&&(r.value=!0,i.value[o.value--].undo(t.value),r.value=!1)},_=()=>i.value.length!==0&&o.value{_()&&(r.value=!0,i.value[++o.value].redo(t.value),r.value=!1)};return Fn(t,(b,g)=>{g&&(g.events.addNode.unsubscribe(n),g.events.removeNode.unsubscribe(n),g.events.addConnection.unsubscribe(n),g.events.removeConnection.unsubscribe(n)),b&&(b.events.addNode.subscribe(n,y=>{u(new rw("addNode",y.id))}),b.events.removeNode.subscribe(n,y=>{u(new rw("removeNode",y.save()))}),b.events.addConnection.subscribe(n,y=>{u(new ow("addConnection",y.id))}),b.events.removeConnection.subscribe(n,y=>{u(new ow("removeConnection",y))}))},{immediate:!0}),e.registerCommand(Xg,{canExecute:f,execute:m}),e.registerCommand(Zg,{canExecute:_,execute:E}),e.registerCommand(pI,{canExecute:()=>!a.value,execute:d}),e.registerCommand(_I,{canExecute:()=>a.value,execute:h}),e.registerHotkey(["Control","z"],Xg),e.registerHotkey(["Control","y"],Zg),Wn({maxSteps:s})}const Jg="COPY",eb="PASTE",YLt="CLEAR_CLIPBOARD";function $Lt(t,e,n){const s=Symbol("ClipboardToken"),i=dt(""),r=dt(""),o=et(()=>!i.value),a=()=>{i.value="",r.value=""},c=()=>{const h=t.value.selectedNodes.flatMap(m=>[...Object.values(m.inputs),...Object.values(m.outputs)]),f=t.value.connections.filter(m=>h.includes(m.from)||h.includes(m.to)).map(m=>({from:m.from.id,to:m.to.id}));r.value=JSON.stringify(f),i.value=JSON.stringify(t.value.selectedNodes.map(m=>m.save()))},u=(h,f,m)=>{for(const _ of h){let E;if((!m||m==="input")&&(E=Object.values(_.inputs).find(b=>b.id===f)),!E&&(!m||m==="output")&&(E=Object.values(_.outputs).find(b=>b.id===f)),E)return E}},d=()=>{if(o.value)return;const h=new Map,f=JSON.parse(i.value),m=JSON.parse(r.value),_=[],E=[],b=t.value;n.executeCommand(pI);for(const g of f){const y=e.value.nodeTypes.get(g.type);if(!y){console.warn(`Node type ${g.type} not registered`);return}const v=new y.type,S=v.id;_.push(v),v.hooks.beforeLoad.subscribe(s,R=>{const C=R;return C.position&&(C.position.x+=100,C.position.y+=100),v.hooks.beforeLoad.unsubscribe(s),C}),b.addNode(v),v.load({...g,id:S}),v.id=S,h.set(g.id,S);for(const R of Object.values(v.inputs)){const C=eu();h.set(R.id,C),R.id=C}for(const R of Object.values(v.outputs)){const C=eu();h.set(R.id,C),R.id=C}}for(const g of m){const y=u(_,h.get(g.from),"output"),v=u(_,h.get(g.to),"input");if(!y||!v)continue;const S=b.addConnection(y,v);S&&E.push(S)}return t.value.selectedNodes=_,n.executeCommand(_I),{newNodes:_,newConnections:E}};return n.registerCommand(Jg,{canExecute:()=>t.value.selectedNodes.length>0,execute:c}),n.registerHotkey(["Control","c"],Jg),n.registerCommand(eb,{canExecute:()=>!o.value,execute:d}),n.registerHotkey(["Control","v"],eb),n.registerCommand(YLt,{canExecute:()=>!0,execute:a}),Wn({isEmpty:o})}const WLt="OPEN_SIDEBAR";function KLt(t,e){e.registerCommand(WLt,{execute:n=>{t.value.sidebar.nodeId=n,t.value.sidebar.visible=!0},canExecute:()=>!0})}function jLt(t,e){KLt(t,e)}const QLt={},XLt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},ZLt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),JLt=l("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),ePt=[ZLt,JLt];function tPt(t,e){return T(),w("svg",XLt,ePt)}const nPt=dn(QLt,[["render",tPt]]),sPt={},iPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},rPt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),oPt=l("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),aPt=[rPt,oPt];function lPt(t,e){return T(),w("svg",iPt,aPt)}const cPt=dn(sPt,[["render",lPt]]),dPt={},uPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},pPt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),_Pt=l("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),hPt=l("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),fPt=l("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),mPt=[pPt,_Pt,hPt,fPt];function gPt(t,e){return T(),w("svg",uPt,mPt)}const bPt=dn(dPt,[["render",gPt]]),EPt={},yPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},vPt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),SPt=l("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),TPt=l("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),xPt=[vPt,SPt,TPt];function CPt(t,e){return T(),w("svg",yPt,xPt)}const wPt=dn(EPt,[["render",CPt]]),RPt={},APt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},NPt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),OPt=l("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),IPt=l("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),MPt=[NPt,OPt,IPt];function DPt(t,e){return T(),w("svg",APt,MPt)}const kPt=dn(RPt,[["render",DPt]]),LPt={},PPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},UPt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),FPt=l("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),BPt=l("circle",{cx:"12",cy:"14",r:"2"},null,-1),GPt=l("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),VPt=[UPt,FPt,BPt,GPt];function zPt(t,e){return T(),w("svg",PPt,VPt)}const HPt=dn(LPt,[["render",zPt]]),qPt={},YPt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},$Pt=gu('',6),WPt=[$Pt];function KPt(t,e){return T(),w("svg",YPt,WPt)}const jPt=dn(qPt,[["render",KPt]]),QPt=cn({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:t}=Ss();return{viewModel:t}}}),XPt=["disabled","title"];function ZPt(t,e,n,s,i,r){return T(),w("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!t.viewModel.commandHandler.canExecuteCommand(t.command),title:t.title,onClick:e[0]||(e[0]=o=>t.viewModel.commandHandler.executeCommand(t.command))},[t.icon?(T(),St(hu(t.icon),{key:0})):(T(),w(Ve,{key:1},[Xe(J(t.title),1)],64))],8,XPt)}const JPt=dn(QPt,[["render",ZPt]]),eUt=cn({components:{ToolbarButton:JPt},setup(){const{viewModel:t}=Ss();return{isSubgraph:et(()=>t.value.displayedGraph!==t.value.editor.graph),commands:[{command:Jg,title:"Copy",icon:kPt},{command:eb,title:"Paste",icon:wPt},{command:Xg,title:"Undo",icon:nPt},{command:Zg,title:"Redo",icon:cPt},{command:dI,title:"Create Subgraph",icon:jPt}],subgraphCommands:[{command:zl,title:"Save Subgraph",icon:HPt},{command:uI,title:"Back to Main Graph",icon:bPt}]}}}),tUt={class:"baklava-toolbar"};function nUt(t,e,n,s,i,r){const o=ct("toolbar-button");return T(),w("div",tUt,[(T(!0),w(Ve,null,Je(t.commands,a=>(T(),St(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),t.isSubgraph?(T(!0),w(Ve,{key:0},Je(t.subgraphCommands,a=>(T(),St(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):G("",!0)])}const sUt=dn(eUt,[["render",nUt]]),iUt={class:"connections-container"},rUt=cn({__name:"Editor",props:{viewModel:{}},setup(t){const e=t,n=Symbol("EditorToken"),s=Cd(e,"viewModel");JDt(s);const i=dt(null);Ho("editorEl",i);const r=et(()=>e.viewModel.displayedGraph.nodes),o=et(()=>e.viewModel.displayedGraph.nodes.map(A=>ZO(Cd(A,"position")))),a=et(()=>e.viewModel.displayedGraph.connections),c=et(()=>e.viewModel.displayedGraph.selectedNodes),u=ekt(),d=tkt(),h=nkt(s),f=et(()=>({...u.styles.value})),m=dt(0);e.viewModel.editor.hooks.load.subscribe(n,A=>(m.value++,A));const _=A=>{u.onPointerMove(A),d.onMouseMove(A)},E=A=>{A.button===0&&(A.target===i.value&&(S(),u.onPointerDown(A)),d.onMouseDown())},b=A=>{u.onPointerUp(A),d.onMouseUp()},g=A=>{A.key==="Tab"&&A.preventDefault(),e.viewModel.commandHandler.handleKeyDown(A)},y=A=>{e.viewModel.commandHandler.handleKeyUp(A)},v=A=>{["Control","Shift"].some(D=>e.viewModel.commandHandler.pressedKeys.includes(D))||S(),e.viewModel.displayedGraph.selectedNodes.push(A)},S=()=>{e.viewModel.displayedGraph.selectedNodes=[]},R=A=>{for(const D of e.viewModel.displayedGraph.selectedNodes){const x=r.value.indexOf(D),O=o.value[x];O.onPointerDown(A),document.addEventListener("pointermove",O.onPointerMove)}document.addEventListener("pointerup",C)},C=()=>{for(const A of e.viewModel.displayedGraph.selectedNodes){const D=r.value.indexOf(A),x=o.value[D];x.onPointerUp(),document.removeEventListener("pointermove",x.onPointerMove)}document.removeEventListener("pointerup",C)};return(A,D)=>(T(),w("div",{ref_key:"el",ref:i,tabindex:"-1",class:Ue(["baklava-editor",{"baklava-ignore-mouse":!!ht(d).temporaryConnection.value||ht(u).dragging.value,"--temporary-connection":!!ht(d).temporaryConnection.value}]),onPointermove:ae(_,["self"]),onPointerdown:E,onPointerup:b,onWheel:D[1]||(D[1]=ae((...x)=>ht(u).onMouseWheel&&ht(u).onMouseWheel(...x),["self"])),onKeydown:g,onKeyup:y,onContextmenu:D[2]||(D[2]=ae((...x)=>ht(h).open&&ht(h).open(...x),["self","prevent"]))},[An(A.$slots,"background",{},()=>[_e(rkt)]),An(A.$slots,"toolbar",{},()=>[_e(sUt)]),An(A.$slots,"palette",{},()=>[_e(aLt)]),(T(),w("svg",iUt,[(T(!0),w(Ve,null,Je(a.value,x=>(T(),w("g",{key:x.id+m.value.toString()},[An(A.$slots,"connection",{connection:x},()=>[_e(Hkt,{connection:x},null,8,["connection"])])]))),128)),An(A.$slots,"temporaryConnection",{temporaryConnection:ht(d).temporaryConnection.value},()=>[ht(d).temporaryConnection.value?(T(),St($kt,{key:0,connection:ht(d).temporaryConnection.value},null,8,["connection"])):G("",!0)])])),l("div",{class:"node-container",style:$t(f.value)},[_e(Zs,{name:"fade"},{default:He(()=>[(T(!0),w(Ve,null,Je(r.value,(x,O)=>An(A.$slots,"node",{key:x.id+m.value.toString(),node:x,selected:c.value.includes(x),dragging:o.value[O].dragging.value,onSelect:B=>v(x),onStartDrag:R},()=>[_e(Pkt,{node:x,selected:c.value.includes(x),dragging:o.value[O].dragging.value,onSelect:B=>v(x),onStartDrag:R},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),An(A.$slots,"sidebar",{},()=>[_e(Xkt)]),An(A.$slots,"minimap",{},()=>[A.viewModel.settings.enableMinimap?(T(),St(Zkt,{key:0})):G("",!0)]),An(A.$slots,"contextMenu",{contextMenu:ht(h)},()=>[A.viewModel.settings.contextMenu.enabled?(T(),St(zE,{key:0,modelValue:ht(h).show.value,"onUpdate:modelValue":D[0]||(D[0]=x=>ht(h).show.value=x),items:ht(h).items.value,x:ht(h).x.value,y:ht(h).y.value,onClick:ht(h).onClick},null,8,["modelValue","items","x","y","onClick"])):G("",!0)])],34))}}),oUt=["INPUT","TEXTAREA","SELECT"];function aUt(t){const e=dt([]),n=dt([]);return{pressedKeys:e,handleKeyDown:o=>{var a;e.value.includes(o.key)||e.value.push(o.key),!oUt.includes(((a=document.activeElement)==null?void 0:a.tagName)??"")&&n.value.forEach(c=>{c.keys.every(u=>e.value.includes(u))&&t(c.commandName)})},handleKeyUp:o=>{const a=e.value.indexOf(o.key);a>=0&&e.value.splice(a,1)},registerHotkey:(o,a)=>{n.value.push({keys:o,commandName:a})}}}const lUt=()=>{const t=dt(new Map),e=(r,o)=>{if(t.value.has(r))throw new Error(`Command "${r}" already exists`);t.value.set(r,o)},n=(r,o=!1,...a)=>{if(!t.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return}return t.value.get(r).execute(...a)},s=(r,o=!1,...a)=>{if(!t.value.has(r)){if(o)throw new Error(`[CommandHandler] Command ${r} not registered`);return!1}return t.value.get(r).canExecute(a)},i=aUt(n);return Wn({registerCommand:e,executeCommand:n,canExecuteCommand:s,...i})},cUt=t=>!(t instanceof tc);function dUt(t,e){return{switchGraph:s=>{let i;if(cUt(s))i=new tc(t.value),s.createGraph(i);else{if(s!==t.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");i=s}e.value&&e.value!==t.value.graph&&e.value.destroy(),i.panning=i.panning??s.panning??{x:0,y:0},i.scaling=i.scaling??s.scaling??1,i.selectedNodes=i.selectedNodes??[],i.sidebar=i.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=i}}}function uUt(t,e){t.position=t.position??{x:0,y:0},t.disablePointerEvents=!1,t.twoColumn=t.twoColumn??!1,t.width=t.width??e.defaultWidth}const pUt=()=>({useStraightConnections:!1,enableMinimap:!1,background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1},contextMenu:{enabled:!0,additionalItems:[]}});function _Ut(t){const e=dt(t??new WDt),n=Symbol("ViewModelToken"),s=dt(null),i=gM(s),{switchGraph:r}=dUt(e,s),o=et(()=>i.value&&i.value!==e.value.graph),a=Wn(pUt()),c=lUt(),u=qLt(i,c),d=$Lt(i,e,c),h={renderNode:new ts(null),renderInterface:new ts(null)};return zLt(i,c,r),jLt(i,c),Fn(e,(f,m)=>{m&&(m.events.registerGraph.unsubscribe(n),m.graphEvents.beforeAddNode.unsubscribe(n),f.nodeHooks.beforeLoad.unsubscribe(n),f.nodeHooks.afterSave.unsubscribe(n),f.graphTemplateHooks.beforeLoad.unsubscribe(n),f.graphTemplateHooks.afterSave.unsubscribe(n),f.graph.hooks.load.unsubscribe(n),f.graph.hooks.save.unsubscribe(n)),f&&(f.nodeHooks.beforeLoad.subscribe(n,(_,E)=>(E.position=_.position??{x:0,y:0},E.width=_.width??a.nodes.defaultWidth,E.twoColumn=_.twoColumn??!1,_)),f.nodeHooks.afterSave.subscribe(n,(_,E)=>(_.position=E.position,_.width=E.width,_.twoColumn=E.twoColumn,_)),f.graphTemplateHooks.beforeLoad.subscribe(n,(_,E)=>(E.panning=_.panning,E.scaling=_.scaling,_)),f.graphTemplateHooks.afterSave.subscribe(n,(_,E)=>(_.panning=E.panning,_.scaling=E.scaling,_)),f.graph.hooks.load.subscribe(n,(_,E)=>(E.panning=_.panning,E.scaling=_.scaling,_)),f.graph.hooks.save.subscribe(n,(_,E)=>(_.panning=E.panning,_.scaling=E.scaling,_)),f.graphEvents.beforeAddNode.subscribe(n,_=>uUt(_,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(lI,{category:"Subgraphs"}),e.value.registerNodeType(cI,{category:"Subgraphs"}),r(f.graph))},{immediate:!0}),Wn({editor:e,displayedGraph:i,isSubgraph:o,settings:a,commandHandler:c,history:u,clipboard:d,hooks:h,switchGraph:r})}const hUt=Fa({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new Xt("Request",""),agent_name:()=>new NLt("Personality","",tu.state.config.personalities).setPort(!1)},outputs:{response:()=>new Xt("Response","")},async calculate({request:t}){console.log(tu.state.config.personalities);let e="";try{e=(await de.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),fUt=Fa({type:"RAGNode",title:"RAG",inputs:{request:()=>new Xt("Prompt",""),document_path:()=>new nc("Document path","").setPort(!1)},outputs:{prompt:()=>new Xt("Prompt with Data","")},async calculate({request:t,document_path:e}){let n="";try{n=(await de.get("/rag",{params:{text:t,doc_path:e}})).data}catch(s){console.error(s)}return{response:n}}}),aw=Fa({type:"Task",title:"Task",inputs:{description:()=>new nc("Task description","").setPort(!1)},outputs:{prompt:()=>new Xt("Prompt")},calculate({description:t}){return{prompt:t}}}),lw=Fa({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new Xt("Input","")},outputs:{response:()=>new DLt("Text","")},async calculate({request:t}){}}),cw=Fa({type:"LLMNode",title:"LLM",inputs:{request:()=>new Xt("Request","")},outputs:{response:()=>new Xt("Response","")},async calculate({request:t}){console.log(tu.state.config.personalities);let e="";try{e=(await de.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),mUt=Fa({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new Xt("Question",""),outputs:()=>new nc("choices, one per line","","").setPort(!1)},outputs:{response:()=>new Xt("Response","")}}),gUt=cn({components:{"baklava-editor":rUt},setup(){const t=_Ut(),e=new ZDt(t.editor);t.editor.registerNodeType(hUt),t.editor.registerNodeType(aw),t.editor.registerNodeType(fUt),t.editor.registerNodeType(lw),t.editor.registerNodeType(cw),t.editor.registerNodeType(mUt);const n=Symbol();e.events.afterRun.subscribe(n,a=>{e.pause(),KDt(a,t.editor),e.resume()}),e.start();function s(a,c,u){const d=new a;return t.displayedGraph.addNode(d),d.position.x=c,d.position.y=u,d}const i=s(aw,300,140),r=s(cw,550,140),o=s(lw,850,140);return t.displayedGraph.addConnection(i.outputs.prompt,r.inputs.request),t.displayedGraph.addConnection(r.outputs.response,o.inputs.text2display),{baklava:t,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),bUt={style:{width:"100vw",height:"100vh"}};function EUt(t,e,n,s,i,r){const o=ct("baklava-editor");return T(),w("div",bUt,[_e(o,{"view-model":t.baklava},null,8,["view-model"]),l("button",{onClick:e[0]||(e[0]=(...a)=>t.saveGraph&&t.saveGraph(...a))},"Save Graph"),l("button",{onClick:e[1]||(e[1]=(...a)=>t.loadGraph&&t.loadGraph(...a))},"Load Graph")])}const yUt=at(gUt,[["render",EUt]]),vUt={},SUt={style:{width:"100vw",height:"100vh"}},TUt=["src"];function xUt(t,e,n,s,i,r){return T(),w("div",SUt,[l("iframe",{src:t.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,TUt)])}const CUt=at(vUt,[["render",xUt]]),wUt={},RUt={style:{width:"100vw",height:"100vh"}},AUt=["src"];function NUt(t,e,n,s,i,r){return T(),w("div",RUt,[l("iframe",{src:t.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,AUt)])}const OUt=at(wUt,[["render",NUt]]);const IUt={data(){return{apps:[],githubApps:[],selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:""}},computed:{combinedApps(){this.apps.map(e=>e.name);const t=new Map(this.apps.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},filteredApps(){return this.combinedApps.filter(t=>t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase()))},categories(){return[...new Set(this.combinedApps.map(t=>t.category))]}},methods:{async fetchApps(){this.loading=!0;try{const t=await de.get("/apps");this.apps=t.data,this.showMessage("Refresh successful!",!0)}catch{this.showMessage("Failed to refresh apps.",!1)}finally{this.loading=!1}},async openAppsFolder(){this.loading=!0;try{console.log("opening apps folder");const t=await de.post("/show_apps_folder",{client_id:this.$store.state.client_id})}catch{this.showMessage("Failed to open apps folder.",!1)}finally{this.loading=!1}},async fetchGithubApps(){this.loading=!0;try{const t=await de.get("/github/apps");this.githubApps=t.data.apps,await this.fetchApps()}catch{this.showMessage("Failed to refresh GitHub apps.",!1)}finally{this.loading=!1}},async handleAppClick(t){if(t.installed){this.selectedApp=t;const e=await de.get(`/apps/${t.folder_name}/index.html`);this.appCode=e.data}else this.showMessage(`Please install ${t.folder_name} to view its code.`,!1)},backToZoo(){this.selectedApp=null,this.appCode=""},async installApp(t){this.loading=!0;try{await de.post(`/install/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Installation succeeded!",!0)}catch{this.showMessage("Installation failed.",!1)}finally{this.loading=!1,this.fetchApps(),this.fetchGithubApps()}},async uninstallApp(t){this.loading=!0;try{await de.post(`/uninstall/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Uninstallation succeeded!",!0)}catch{this.showMessage("Uninstallation failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async deleteApp(t){this.loading=!0;try{await de.post(`/delete/${t}`,{client_id:this.$store.state.client_id}),this.showMessage("Deletion succeeded!",!0)}catch{this.showMessage("Deletion failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async editApp(t){this.loading=!0;try{const e=await de.post("/open_app_in_vscode",{client_id:this.$store.state.client_id,app_name:t.folder_name});this.showMessage(e.data.message,!0)}catch{this.showMessage("Failed to open folder in VSCode.",!1)}finally{this.loading=!1}},async downloadApp(t){try{const e=await de.get(`/download/${t}`,{responseType:"blob"}),n=window.URL.createObjectURL(new Blob([e.data])),s=document.createElement("a");s.href=n,s.setAttribute("download",`${t}.zip`),document.body.appendChild(s),s.click(),s.remove(),this.showMessage("Download started!",!0)}catch{this.showMessage("Download failed.",!1)}},openApp(t){t.installed?window.open(`/apps/${t.folder_name}/index.html?client_id=${this.$store.state.client_id}`,"_blank"):this.showMessage(`Please install ${t.name} before opening.`,!1)},showMessage(t,e){this.message=t,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)}},mounted(){this.fetchGithubApps()}},jn=t=>(Mi("data-v-bb6b8f80"),t=t(),Di(),t),MUt={class:"app-zoo w-full p-6 overflow-y-auto 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"},DUt={class:"bg-white shadow-lg rounded-lg p-4 max-w-4xl mx-auto"},kUt={class:"flex flex-wrap items-center justify-between gap-4"},LUt={class:"flex items-center space-x-4"},PUt=jn(()=>l("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)),UUt=jn(()=>l("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"})],-1)),FUt={class:"relative flex-grow max-w-md"},BUt=jn(()=>l("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("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)),GUt={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},VUt=jn(()=>l("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1)),zUt=jn(()=>l("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)),HUt=[VUt,zUt],qUt={class:"text-3xl font-bold mb-6 text-gray-800"},YUt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},$Ut={class:"flex-grow"},WUt={class:"flex items-center mb-4"},KUt=["src"],jUt={class:"font-bold text-xl text-gray-800"},QUt={class:"text-sm text-gray-600"},XUt={class:"text-sm text-gray-600"},ZUt={class:"mb-4"},JUt=jn(()=>l("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),eFt={class:"text-sm text-gray-600 h-20 overflow-y-auto"},tFt={class:"text-sm text-gray-600 mb-2"},nFt={key:0,class:"mb-4"},sFt=jn(()=>l("h4",{class:"font-semibold mb-1 text-gray-700"},"Disclaimer:",-1)),iFt={class:"text-xs text-gray-500 italic h-16 overflow-y-auto"},rFt={class:"mt-auto pt-4 border-t"},oFt={class:"flex justify-between"},aFt=["onClick"],lFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)),cFt=[lFt],dFt=["onClick"],uFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)),pFt=[uFt],_Ft=["onClick"],hFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)),fFt=[hFt],mFt=["onClick"],gFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)),bFt=[gFt],EFt=["onClick"],yFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)),vFt=[yFt],SFt=["onClick"],TFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)),xFt=[TFt],CFt=["onClick"],wFt=jn(()=>l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)),RFt=[wFt],AFt={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},NFt={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},OFt={class:"flex justify-between items-center mb-4"},IFt={class:"text-2xl font-bold"},MFt=["srcdoc"],DFt={key:1,class:"text-center text-red-500"};function kFt(t,e,n,s,i,r){return T(),w("div",MUt,[l("nav",DUt,[l("div",kUt,[l("div",LUt,[l("button",{onClick:e[0]||(e[0]=(...o)=>r.fetchGithubApps&&r.fetchGithubApps(...o)),class:"btn btn-primary","aria-label":"Refresh apps from GitHub"},[PUt,Xe(" Refresh ")]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.openAppsFolder&&r.openAppsFolder(...o)),class:"btn btn-secondary","aria-label":"Open apps folder"},[UUt,Xe(" Open Folder ")])]),l("div",FUt,[U(l("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>i.searchQuery=o),placeholder:"Search apps...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search apps"},null,512),[[ue,i.searchQuery]]),BUt])])]),i.loading?(T(),w("div",GUt,HUt)):G("",!0),(T(!0),w(Ve,null,Je(r.categories,o=>(T(),w("div",{key:o,class:"mb-12"},[l("h2",qUt,J(o),1),l("div",YUt,[(T(!0),w(Ve,null,Je(r.filteredApps.filter(a=>a.category===o),a=>(T(),w("div",{key:a.uid,class:"app-card bg-white border rounded-xl shadow-lg p-6 hover:shadow-xl transition duration-300 ease-in-out flex flex-col h-full"},[l("div",$Ut,[l("div",WUt,[l("img",{src:a.icon,alt:"App Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4"},null,8,KUt),l("div",null,[l("h3",jUt,J(a.name),1),l("p",QUt,"Author: "+J(a.author),1),l("p",XUt,"Version: "+J(a.version),1)])]),l("div",ZUt,[JUt,l("p",eFt,J(a.description),1)]),l("p",tFt,"AI Model: "+J(a.model_name),1),a.disclaimer&&a.disclaimer.trim()!==""?(T(),w("div",nFt,[sFt,l("p",iFt,J(a.disclaimer),1)])):G("",!0)]),l("div",rFt,[l("div",oFt,[a.installed?(T(),w("button",{key:0,onClick:c=>r.uninstallApp(a.folder_name),class:"text-red-500 hover:text-red-600 transition duration-300 ease-in-out",title:"Uninstall"},cFt,8,aFt)):a.existsInFolder?(T(),w("button",{key:1,onClick:c=>r.deleteApp(a.name),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:"Delete"},pFt,8,dFt)):(T(),w("button",{key:2,onClick:c=>r.installApp(a.folder_name),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Install"},fFt,8,_Ft)),a.installed?(T(),w("button",{key:3,onClick:c=>r.editApp(a),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Edit"},bFt,8,mFt)):G("",!0),l("button",{onClick:c=>r.downloadApp(a.name),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Download"},vFt,8,EFt),l("button",{onClick:c=>r.handleAppClick(a),class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out",title:"View"},xFt,8,SFt),l("button",{onClick:c=>r.openApp(a),class:"text-indigo-500 hover:text-indigo-600 transition duration-300 ease-in-out",title:"Open"},RFt,8,CFt)])])]))),128))])]))),128)),i.selectedApp?(T(),w("div",AFt,[l("div",NFt,[l("div",OFt,[l("h2",IFt,J(i.selectedApp.name),1),l("button",{onClick:e[3]||(e[3]=(...o)=>r.backToZoo&&r.backToZoo(...o)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(T(),w("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,MFt)):(T(),w("p",DFt,"Please install this app to view its code."))])])):G("",!0),i.message?(T(),w("div",{key:2,class:Ue(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},J(i.message),3)):G("",!0)])}const LFt=at(IUt,[["render",kFt],["__scopeId","data-v-bb6b8f80"]]),PFt=nP({history:yL("/"),routes:[{path:"/apps_view/",name:"AppsZoo",component:LFt},{path:"/auto_sd_view/",name:"AutoSD",component:OUt},{path:"/comfyui_view/",name:"ComfyUI",component:CUt},{path:"/playground/",name:"playground",component:uet},{path:"/extensions/",name:"extensions",component:Tet},{path:"/help_view/",name:"help_view",component:Net},{path:"/settings/",name:"settings",component:Lbt},{path:"/training/",name:"training",component:nEt},{path:"/quantizing/",name:"quantizing",component:uEt},{path:"/",name:"discussions",component:Cwt},{path:"/",name:"interactive",component:GDt},{path:"/",name:"nodes",component:yUt}]});const Qu=lD(_Xe);console.log("Loaded main.js");function UFt(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const tu=kD({state(){return{is_rt_on:!1,language:"english",languages:[],currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},posts_headers:{accept:"application/json","Content-Type":"application/json"},client_id:"",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,api_post_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,databases:[]}},mutations:{setisRTOn(t,e){t.is_rt_on=e},setLanguages(t,e){t.languages=e},setLanguage(t,e){t.language=e},setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=e},setIsModelOk(t,e){t.isModelOk=e},setIsGenerating(t,e){t.isGenerating=e},setConfig(t,e){t.config=e},setPersonalities(t,e){t.personalities=e},setMountedPers(t,e){t.mountedPers=e},setMountedPersArr(t,e){t.mountedPersArr=e},setbindingsZoo(t,e){t.bindingsZoo=e},setModelsArr(t,e){t.modelsArr=e},setselectedModel(t,e){t.selectedModel=e},setDiskUsage(t,e){t.diskUsage=e},setRamUsage(t,e){t.ramUsage=e},setVramUsage(t,e){t.vramUsage=e},setModelsZoo(t,e){t.modelsZoo=e},setCurrentBinding(t,e){t.currentBinding=e},setCurrentModel(t,e){t.currentModel=e},setDatabases(t,e){t.databases=e},setTheme(t){this.currentTheme=t}},getters:{getisRTOn(t){return t.is_rt_on},getLanguages(t){return t.languages},getLanguage(t){return t.language},getIsConnected(t){return t.isConnected},getIsModelOk(t){return t.isModelOk},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getMountedPers(t){return t.mountedPers},getbindingsZoo(t){return t.bindingsZoo},getModelsArr(t){return t.modelsArr},getDiskUsage(t){return t.diskUsage},getRamUsage(t){return t.ramUsage},getVramUsage(t){return t.vramUsage},getDatabasesList(t){return t.databases},getModelsZoo(t){return t.modelsZoo},getCyrrentBinding(t){return t.currentBinding},getCurrentModel(t){return t.currentModel}},actions:{async getVersion(){try{let t=await de.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data,console.log("version res:",t),console.log("version :",this.state.version))}catch{console.log("Coudln't get version")}},async refreshConfig({commit:t}){console.log("Fetching configuration");try{console.log("Fetching configuration with client id: ",this.state.client_id);const e=await hI("get_config",this.state.client_id);e.active_personality_id<0&&(e.active_personality_id=0);let n=e.personalities[e.active_personality_id].split("/");e.personality_category=n[0],e.personality_folder=n[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),t("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:t}){let e=await Gs("list_databases");console.log("databases:",e),t("setDatabases",e)},async fetchisRTOn({commit:t}){const n=(await de.get("/is_rt_on")).data.status;t("setisRTOn",n)},async fetchLanguages({commit:t}){console.log("get_personality_languages_list",this.state.client_id);const e=await de.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("languages",n),t("setLanguages",n)},async fetchLanguage({commit:t}){console.log("get_personality_language",this.state.client_id);const e=await de.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("language",n),t("setLanguage",n)},async changeLanguage({commit:t},e){console.log("Changing language to ",e);let n=await de.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await de.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const s=n.data;console.log("languages",s),t("setLanguages",s),n=await de.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("language",i),t("setLanguage",i),console.log("Language changed successfully:",n.data.message)},async deleteLanguage({commit:t},e){console.log("Deleting ",e);let n=await de.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await de.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const s=n.data;console.log("languages",s),t("setLanguages",s),n=await de.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("language",i),t("setLanguage",i),console.log("Language changed successfully:",n.data.message)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await Gs("get_all_personalities"),s=Object.keys(n);console.log("Personalities recovered:"+this.state.config.personalities);for(let i=0;i{let u=!1;for(const h of this.state.config.personalities)if(h.includes(r+"/"+c.folder))if(u=!0,h.includes(":")){const f=h.split(":");c.language=f[1]}else c.language=null;let d={};return d=c,d.category=r,d.full_path=r+"/"+c.folder,d.isMounted=u,d});e.length==0?e=a:e=e.concat(a)}e.sort((i,r)=>i.name.localeCompare(r.name)),t("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:t}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const n=[];for(let s=0;sa.full_path==i||a.full_path==r[0]);if(o>=0){let a=UFt(this.state.personalities[o]);r.length>1&&(a.language=r[1]),a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(c=>c.full_path=="generic/lollms")])}else n.push(s),console.log("Couldn't load personality : ",i)}for(let s=n.length-1;s>=0;s--)console.log("Removing personality : ",this.state.config.personalities[n[s]]),this.state.config.personalities.splice(n[s],1),this.state.config.active_personality_id>n[s]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e),this.state.mountedPers=this.state.personalities[this.state.personalities.findIndex(s=>s.full_path==this.state.config.personalities[this.state.config.active_personality_id]||s.full_path+":"+s.language==this.state.config.personalities[this.state.config.active_personality_id])]},async refreshBindings({commit:t}){let e=await Gs("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(s=>s.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),t("setbindingsZoo",e);const n=e.findIndex(s=>s.name==this.state.config.binding_name);n!=-1&&t("setCurrentBinding",e[n])},async refreshModelsZoo({commit:t}){console.log("Fetching models");const n=(await de.get("/get_available_models")).data.filter(s=>s.variants&&s.variants.length>0);console.log(`get_available_models: ${n}`),t("setModelsZoo",n)},async refreshModelStatus({commit:t}){let e=await Gs("get_model_status");t("setIsModelOk",e.status)},async refreshModels({commit:t}){console.log("Fetching models");let e=await Gs("list_models");console.log(`Found ${e}`);let n=await Gs("get_active_model");console.log("Selected model ",n),n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),console.log("setModelsArr",e),console.log("this.state.modelsZoo",this.state.modelsZoo),this.state.modelsZoo.map(i=>{i.isInstalled=e.includes(i.name)}),this.state.installedModels=this.state.modelsZoo.filter(i=>i.isInstalled);const s=this.state.modelsZoo.findIndex(i=>i.name==this.state.config.model_name);s!=-1&&t("setCurrentModel",this.state.modelsZoo[s])},async refreshDiskUsage({commit:t}){this.state.diskUsage=await Gs("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await Gs("ram_usage")},async refreshVramUsage({commit:t}){const e=await Gs("vram_usage"),n=[];if(e.nb_gpus>0){for(let i=0;i License: see project LICENSE Touched: 2022 -*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0;outline:none}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.container{margin:0;padding:0}.link-item{height:25px;margin-top:5px;padding:0 20px;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.link-item-dark{padding:0 20px;color:#f0f8ff;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.nav-ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;height:100%}.nav-li{cursor:pointer;display:flex;align-items:center;padding:5px}.fade-in{animation:fadeInAnimation .5s}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}.bounce-in{animation:bounceInAnimation .5s}.bounce-out{animation:bounceOutAnimation .5s}@keyframes bounceInAnimation{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.shadow-no-bottom{box-shadow:0 -4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}@keyframes pulse{0%,to{opacity:1}50%{opacity:.7}}.logo-container{position:relative;width:48px;height:48px}.logo-image{width:100%;height:100%;border-radius:50%;-o-object-fit:cover;object-fit:cover}@keyframes roll-and-bounce{0%,to{transform:translate(0) rotate(0)}45%{transform:translate(100px) rotate(360deg)}50%{transform:translate(90px) rotate(390deg)}55%{transform:translate(100px) rotate(360deg)}95%{transform:translate(0) rotate(0)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.logo-text{position:relative;left:100px}.hovered{transition:transform .3s cubic-bezier(.175,.885,.32,1.275);transform:scale(1.1)}.active{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;pointer-events:all}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:250px;background-color:#fff;z-index:1000;display:none}.settings-button{cursor:pointer;padding:10px;border:1px solid #ddd;border-radius:5px;color:#333;font-size:14px}.settings-button:hover{background-color:#eee}.settings-button:active{background-color:#ddd}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.selected-choice{background-color:#bde4ff}.heartbeat-text[data-v-edf01d94]{font-size:24px;animation:pulsate-edf01d94 1.5s infinite}@keyframes pulsate-edf01d94{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-edf01d94],.list-enter-active[data-v-edf01d94],.list-leave-active[data-v-edf01d94]{transition:all .5s ease}.list-enter-from[data-v-edf01d94]{transform:translatey(-30px)}.list-leave-to[data-v-edf01d94]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-edf01d94]{position:absolute}.bounce-enter-active[data-v-edf01d94]{animation:bounce-in-edf01d94 .5s}.bounce-leave-active[data-v-edf01d94]{animation:bounce-in-edf01d94 .5s reverse}@keyframes bounce-in-edf01d94{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-edf01d94]{background-color:#0ff}.hover[data-v-edf01d94]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-edf01d94]{font-weight:700}.collapsible-section{cursor:pointer;margin-bottom:10px;font-weight:700}.collapsible-section:hover{color:#1a202c}.collapsible-section .toggle-icon{margin-right:.25rem}.collapsible-section .toggle-icon i{color:#4a5568}.collapsible-section .toggle-icon i:hover{color:#1a202c}.json-viewer{max-height:300px;max-width:700px;flex:auto;overflow-y:auto;padding:10px;background-color:#f1f1f1;border:1px solid #ccc;border-radius:4px}.json-viewer .toggle-icon{cursor:pointer;margin-right:.25rem}.json-viewer .toggle-icon i{color:#4a5568}.json-viewer .toggle-icon i:hover{color:#1a202c}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}.bounce-enter-active[data-v-de7bc8fe]{animation:bounce-in-de7bc8fe .5s}.bounce-leave-active[data-v-de7bc8fe]{animation:bounce-in-de7bc8fe .5s reverse}@keyframes bounce-in-de7bc8fe{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-1a32c141]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-1a32c141]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-1a32c141]{top:calc(-100% - 2rem)}.list-move[data-v-64fb461b],.list-enter-active[data-v-64fb461b],.list-leave-active[data-v-64fb461b]{transition:all .5s ease}.list-enter-from[data-v-64fb461b]{transform:translatey(-30px)}.list-leave-to[data-v-64fb461b]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-64fb461b]{position:absolute}@keyframes rolling-ball-b052c8c7{0%{transform:translate(-50px) rotate(0)}25%{transform:translate(0) rotate(90deg)}50%{transform:translate(50px) rotate(180deg)}75%{transform:translate(0) rotate(270deg)}to{transform:translate(-50px) rotate(360deg)}}@keyframes bounce-b052c8c7{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}@keyframes fade-in-up-b052c8c7{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.animate-rolling-ball[data-v-b052c8c7]{animation:rolling-ball-b052c8c7 4s infinite ease-in-out,bounce-b052c8c7 1s infinite ease-in-out}.animate-fade-in-up[data-v-b052c8c7]{animation:fade-in-up-b052c8c7 1.5s ease-out}.custom-scrollbar[data-v-1219cfc9]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-1219cfc9]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1219cfc9]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-1219cfc9]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}@keyframes custom-pulse-1219cfc9{0%,to{box-shadow:0 0 #3b82f680}50%{box-shadow:0 0 0 15px #3b82f600}}.animate-pulse[data-v-1219cfc9]{animation:custom-pulse-1219cfc9 2s infinite}.slide-right-enter-active[data-v-1219cfc9],.slide-right-leave-active[data-v-1219cfc9]{transition:transform .3s ease}.slide-right-enter[data-v-1219cfc9],.slide-right-leave-to[data-v-1219cfc9]{transform:translate(-100%)}.slide-left-enter-active[data-v-1219cfc9],.slide-left-leave-active[data-v-1219cfc9]{transition:transform .3s ease}.slide-left-enter[data-v-1219cfc9],.slide-left-leave-to[data-v-1219cfc9]{transform:translate(100%)}.fade-and-fly-enter-active[data-v-1219cfc9]{animation:fade-and-fly-enter-1219cfc9 .5s ease}.fade-and-fly-leave-active[data-v-1219cfc9]{animation:fade-and-fly-leave-1219cfc9 .5s ease}@keyframes fade-and-fly-enter-1219cfc9{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-1219cfc9{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-1219cfc9],.list-enter-active[data-v-1219cfc9],.list-leave-active[data-v-1219cfc9]{transition:all .5s ease}.list-enter-from[data-v-1219cfc9]{transform:translatey(-30px)}.list-leave-to[data-v-1219cfc9]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-1219cfc9]{position:absolute}@keyframes float-1219cfc9{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}.animate-float[data-v-1219cfc9]{animation:float-1219cfc9 3s ease-in-out infinite}@keyframes roll-1219cfc9{0%{transform:translate(-50%) rotate(0)}to{transform:translate(50%) rotate(360deg)}}.animate-roll[data-v-1219cfc9]{animation:roll-1219cfc9 4s linear infinite}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:white;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}.app-card[data-v-bb6b8f80]{transition:all .3s ease}.app-card[data-v-bb6b8f80]:hover{transform:translateY(-5px)}button[data-v-bb6b8f80]{transition:all .3s ease}button[data-v-bb6b8f80]:hover{transform:translateY(-2px)}.scrollbar-thin[data-v-bb6b8f80]::-webkit-scrollbar{width:6px}.scrollbar-thin[data-v-bb6b8f80]::-webkit-scrollbar-track{background:#f1f1f1}.scrollbar-thin[data-v-bb6b8f80]::-webkit-scrollbar-thumb{background:#888;border-radius:3px}.scrollbar-thin[data-v-bb6b8f80]::-webkit-scrollbar-thumb:hover{background:#555}.btn[data-v-bb6b8f80]{font-weight:600;padding:.5rem 1rem;border-radius:.5rem;transition:all .3s ease-in-out;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;display:flex;align-items:center}.btn-primary[data-v-bb6b8f80]{background-color:#3b82f6;color:#fff}.btn-primary[data-v-bb6b8f80]:hover{background-color:#2563eb}.btn-primary[data-v-bb6b8f80]:focus{box-shadow:0 0 0 3px #3b82f680}.btn-secondary[data-v-bb6b8f80]{background-color:#e5e7eb;color:#374151}.btn-secondary[data-v-bb6b8f80]:hover{background-color:#d1d5db}.btn-secondary[data-v-bb6b8f80]:focus{box-shadow:0 0 0 3px #6b728080}.search-input[data-v-bb6b8f80]{width:100%;border-bottom:2px solid #e5e7eb;padding:.5rem 1rem .5rem 2.5rem;transition:border-color .3s ease-in-out}.search-input[data-v-bb6b8f80]:focus{outline:none;border-color:#3b82f6}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:PTSans,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1F2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4B5563}.dark input[type=file]::file-selector-button:hover{background:#6B7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6B7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-moz-range-thumb{background:#6B7280}input[type=range]::-moz-range-progress{background:#3F83F8}input[type=range]::-ms-fill-lower{background:#3F83F8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:white;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1C64F2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}html{scroll-behavior:smooth}@font-face{font-family:Roboto;src:url(/assets/Roboto-Regular-7277cfb8.ttf) format("truetype")}@font-face{font-family:PTSans;src:url(/assets/PTSans-Regular-23b91352.ttf) format("truetype")}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1{left:-.25rem}.-left-1\.5{left:-.375rem}.-left-6{left:-1.5rem}.-right-0{right:-0px}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-right-6{right:-1.5rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.-top-2{top:-.5rem}.-top-20{top:-5rem}.-top-6{top:-1.5rem}.-top-9{top:-2.25rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-\[60px\]{bottom:60px}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-20{left:5rem}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1{margin-top:-.25rem;margin-bottom:-.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-5\/6{height:83.333333%}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-\[220px\]{height:220px}.h-\[600px\]{height:600px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-6{max-height:1.5rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-\[500px\]{min-height:500px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[1000px\]{width:1000px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-\[23rem\]{min-width:23rem}.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[23rem\]{max-width:23rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-\[900px\]{max-width:900px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y: -0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\[40px\,1fr\]{grid-template-columns:40px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-discussion{background-color:var(--color-bg-light-discussion)}.bg-bg-light-panel{background-color:var(--color-bg-light-panel)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-0{--tw-bg-opacity: 0}.bg-opacity-10{--tw-bg-opacity: .1}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bg-light-tone{--tw-gradient-from: var(--color-bg-light-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-100{--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-200{--tw-gradient-from: #C3DDFD var(--tw-gradient-from-position);--tw-gradient-to: rgb(195 221 253 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-600{--tw-gradient-from: #1C64F2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-100{--tw-gradient-from: #E5EDFF var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 237 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-600{--tw-gradient-from: #5850EC var(--tw-gradient-from-position);--tw-gradient-to: rgb(88 80 236 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-100{--tw-gradient-to: #EDEBFE var(--tw-gradient-to-position)}.to-purple-200{--tw-gradient-to: #DCD7FE var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #7E3AF2 var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #ffffff var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-blue-600{fill:#1c64f2}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-sans{font-family:PTSans,Roboto,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-\[\.82rem\]{font-size:.82rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-dark-text-panel{color:var(--color-dark-text-panel)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{font-size:36px;font-weight:700}h2{font-size:24px;font-weight:700}h3{font-size:18px;font-weight:700}h4{font-size:18px;font-style:italic}p{font-size:16px;word-wrap:break-word;overflow-wrap:break-word;white-space:normal}ul{list-style-type:disc;margin-left:0}li{list-style-type:disc;margin-left:20px}ol{list-style-type:decimal;margin-left:20px}:root{--color-primary: #0e8ef0;--color-primary-light: #3dabff;--color-secondary: #0fd974;--color-accent: #f0700e;--color-light-text-panel: #ffffff;--color-dark-text-panel: #ffffff;--color-bg-light-panel: #7cb5ec;--color-bg-light: #e2edff;--color-bg-light-tone: #b9d2f7;--color-bg-light-code-block: #cad7ed;--color-bg-light-tone-panel: #8fb5ef;--color-bg-light-discussion: #c5d8f8;--color-bg-light-discussion-odd: #d6e7ff;--color-bg-dark: #132e59;--color-bg-dark-tone: #25477d;--color-bg-dark-tone-panel: #4367a3;--color-bg-dark-code-block: #2254a7;--color-bg-dark-discussion: #435E8A;--color-bg-dark-discussion-odd: #284471}.last\:mb-0:last-child{margin-bottom:0}.last\:\!border-transparent:last-child{border-color:transparent!important}.last\:pb-0:last-child{padding-bottom:0}.odd\:bg-bg-light-tone:nth-child(odd){background-color:var(--color-bg-light-tone)}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.even\:bg-bg-light-tone-panel:nth-child(2n){background-color:var(--color-bg-light-tone-panel)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:bottom-0{bottom:0}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:-translate-x-12{--tw-translate-x: -3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-y-8{--tw-translate-y: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-\[0px\]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-y-\[-50px\]{--tw-translate-y: -50px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group:hover .group-hover\:text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-0{opacity:0}.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:z-50:hover{z-index:50}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-8:hover{--tw-translate-y: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:translate-y-\[-5px\]:hover{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-150:hover{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-400:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{background-color:var(--color-secondary)}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-opacity-20:hover{--tw-bg-opacity: .2}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:fill-primary:hover{fill:var(--color-primary)}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-300:hover{--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(88 80 236 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-purple-600:hover{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(159 88 10 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}:is(.dark .dark\:divide-gray-700)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}:is(.dark .dark\:border-bg-light){border-color:var(--color-bg-light)}:is(.dark .dark\:border-blue-500){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-500){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-600){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-800){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-900){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}:is(.dark .dark\:border-green-500){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-400){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-500){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-400){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-500){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}:is(.dark .dark\:border-red-500){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}:is(.dark .dark\:border-transparent){border-color:transparent}:is(.dark .dark\:border-yellow-300){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}:is(.dark .dark\:bg-bg-dark){background-color:var(--color-bg-dark)}:is(.dark .dark\:bg-bg-dark-discussion){background-color:var(--color-bg-dark-discussion)}:is(.dark .dark\:bg-bg-dark-tone){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:bg-bg-dark-tone-panel){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:bg-black){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-200){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-500){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-600){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-700){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-800){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-900){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-200){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-300){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-600){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800\/30){background-color:#1f29374d}:is(.dark .dark\:bg-gray-800\/50){background-color:#1f293780}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-200){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-500){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-600){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-800){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-200){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-500){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-700){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-800){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-200){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-600){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-200){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-500){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-600){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-200){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-500){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-600){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-200){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-opacity-70){--tw-bg-opacity: .7}:is(.dark .dark\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\:from-bg-dark){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-bg-dark-tone){--tw-gradient-from: var(--color-bg-dark-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-blue-400){--tw-gradient-from: #76A9FA var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-blue-800){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-blue-900){--tw-gradient-from: #233876 var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-indigo-400){--tw-gradient-from: #8DA2FB var(--tw-gradient-from-position);--tw-gradient-to: rgb(141 162 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-indigo-900){--tw-gradient-from: #362F78 var(--tw-gradient-from-position);--tw-gradient-to: rgb(54 47 120 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:via-bg-dark){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}:is(.dark .dark\:to-gray-800){--tw-gradient-to: #1F2937 var(--tw-gradient-to-position)}:is(.dark .dark\:to-purple-400){--tw-gradient-to: #AC94FA var(--tw-gradient-to-position)}:is(.dark .dark\:to-purple-800){--tw-gradient-to: #5521B5 var(--tw-gradient-to-position)}:is(.dark .dark\:to-purple-900){--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}:is(.dark .dark\:fill-gray-300){fill:#d1d5db}:is(.dark .dark\:fill-white){fill:#fff}:is(.dark .dark\:text-blue-200){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-400){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-800){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}:is(.dark .dark\:text-dark-text-panel){color:var(--color-dark-text-panel)}:is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-100){--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-200){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-500){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-800){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-900){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-500){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-900){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}:is(.dark .dark\:text-light-text-panel){color:var(--color-light-text-panel)}:is(.dark .dark\:text-orange-200){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-400){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-500){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-900){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}:is(.dark .dark\:text-primary){color:var(--color-primary)}:is(.dark .dark\:text-purple-400){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-500){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-900){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-200){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-800){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-900){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-50){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-300){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-500){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-800){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-900){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-gray-400)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:shadow-lg){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-blue-800\/80){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-cyan-800\/80){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-green-800\/80){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-lime-800\/80){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-pink-800\/80){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-purple-800\/80){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-red-800\/80){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-teal-800\/80){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:ring-gray-500){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:ring-offset-gray-700){--tw-ring-offset-color: #374151}:is(.dark .dark\:ring-offset-gray-800){--tw-ring-offset-color: #1F2937}:is(.dark .dark\:scrollbar-track-bg-dark){--scrollbar-track: var(--color-bg-dark) !important}:is(.dark .dark\:scrollbar-track-bg-dark-tone){--scrollbar-track: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone){--scrollbar-thumb: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone-panel){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}:is(.dark .odd\:dark\:bg-bg-dark-tone):nth-child(odd){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n)){background-color:var(--color-bg-dark-discussion-odd)}:is(.dark .dark\:even\:bg-bg-dark-tone-panel:nth-child(2n)){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60){background-color:#1f293799}:is(.dark .group:hover .dark\:group-hover\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70){--tw-ring-color: rgb(31 41 55 / .7)}:is(.dark .dark\:hover\:border-gray-600:hover){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-primary:hover){border-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-bg-dark-tone:hover){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:hover\:bg-blue-300:hover){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-600:hover){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-700:hover){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-600:hover){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-300:hover){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-600:hover){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-700:hover){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-500:hover){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-700:hover){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-primary:hover){background-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-purple-500:hover){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-700:hover){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-300:hover){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-600:hover){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-700:hover){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-secondary:hover){background-color:var(--color-secondary)}:is(.dark .dark\:hover\:bg-yellow-300:hover){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-400:hover){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}:is(.dark .hover\:dark\:bg-bg-dark-tone):hover{background-color:var(--color-bg-dark-tone)}:is(.dark .hover\:dark\:bg-bg-dark-tone-panel):hover{background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:hover\:fill-primary:hover){fill:var(--color-primary)}:is(.dark .dark\:hover\:text-blue-500:hover){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-900:hover){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:scrollbar-thumb-primary){--scrollbar-thumb-hover: var(--color-primary) !important}:is(.dark .dark\:focus\:border-blue-500:focus){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-secondary:focus){border-color:var(--color-secondary)}:is(.dark .dark\:focus\:text-white:focus){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:focus\:ring-blue-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-cyan-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-lime-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-400:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-secondary:focus){--tw-ring-color: var(--color-secondary)}:is(.dark .dark\:focus\:ring-teal-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-offset-gray-700:focus){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}:is(.dark .md\:dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .md\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .md\:dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} +*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0;outline:none}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.container{margin:0;padding:0}.link-item{height:25px;margin-top:5px;padding:0 20px;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.link-item-dark{padding:0 20px;color:#f0f8ff;margin-bottom:-5px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:5px 5px 0 0;font-weight:700;transition:duration-300 ease-in-out transform}.nav-ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;height:100%}.nav-li{cursor:pointer;display:flex;align-items:center;padding:5px}.fade-in{animation:fadeInAnimation .5s}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}.bounce-in{animation:bounceInAnimation .5s}.bounce-out{animation:bounceOutAnimation .5s}@keyframes bounceInAnimation{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.shadow-no-bottom{box-shadow:0 -4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.dot{width:10px;height:10px;border-radius:50%}.dot-green{background-color:green}.dot-red{background-color:red}@keyframes pulse{0%,to{opacity:1}50%{opacity:.7}}.logo-container{position:relative;width:48px;height:48px}.logo-image{width:100%;height:100%;border-radius:50%;-o-object-fit:cover;object-fit:cover}@keyframes roll-and-bounce{0%,to{transform:translate(0) rotate(0)}45%{transform:translate(100px) rotate(360deg)}50%{transform:translate(90px) rotate(390deg)}55%{transform:translate(100px) rotate(360deg)}95%{transform:translate(0) rotate(0)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.logo-text{position:relative;left:100px}.hovered{transition:transform .3s cubic-bezier(.175,.885,.32,1.275);transform:scale(1.1)}.active{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;pointer-events:all}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:250px;background-color:#fff;z-index:1000;display:none}.settings-button{cursor:pointer;padding:10px;border:1px solid #ddd;border-radius:5px;color:#333;font-size:14px}.settings-button:hover{background-color:#eee}.settings-button:active{background-color:#ddd}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.selected-choice{background-color:#bde4ff}.heartbeat-text[data-v-ef6f3916]{font-size:24px;animation:pulsate-ef6f3916 1.5s infinite}@keyframes pulsate-ef6f3916{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-ef6f3916],.list-enter-active[data-v-ef6f3916],.list-leave-active[data-v-ef6f3916]{transition:all .5s ease}.list-enter-from[data-v-ef6f3916]{transform:translatey(-30px)}.list-leave-to[data-v-ef6f3916]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-ef6f3916]{position:absolute}.bounce-enter-active[data-v-ef6f3916]{animation:bounce-in-ef6f3916 .5s}.bounce-leave-active[data-v-ef6f3916]{animation:bounce-in-ef6f3916 .5s reverse}@keyframes bounce-in-ef6f3916{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-ef6f3916]{background-color:#0ff}.hover[data-v-ef6f3916]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-ef6f3916]{font-weight:700}.collapsible-section{cursor:pointer;margin-bottom:10px;font-weight:700}.collapsible-section:hover{color:#1a202c}.collapsible-section .toggle-icon{margin-right:.25rem}.collapsible-section .toggle-icon i{color:#4a5568}.collapsible-section .toggle-icon i:hover{color:#1a202c}.json-viewer{max-height:300px;max-width:700px;flex:auto;overflow-y:auto;padding:10px;background-color:#f1f1f1;border:1px solid #ccc;border-radius:4px}.json-viewer .toggle-icon{cursor:pointer;margin-right:.25rem}.json-viewer .toggle-icon i{color:#4a5568}.json-viewer .toggle-icon i:hover{color:#1a202c}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}.bounce-enter-active[data-v-de7bc8fe]{animation:bounce-in-de7bc8fe .5s}.bounce-leave-active[data-v-de7bc8fe]{animation:bounce-in-de7bc8fe .5s reverse}@keyframes bounce-in-de7bc8fe{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-1a32c141]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-1a32c141]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-1a32c141]{top:calc(-100% - 2rem)}.list-move[data-v-64fb461b],.list-enter-active[data-v-64fb461b],.list-leave-active[data-v-64fb461b]{transition:all .5s ease}.list-enter-from[data-v-64fb461b]{transform:translatey(-30px)}.list-leave-to[data-v-64fb461b]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-64fb461b]{position:absolute}@keyframes rolling-ball-b052c8c7{0%{transform:translate(-50px) rotate(0)}25%{transform:translate(0) rotate(90deg)}50%{transform:translate(50px) rotate(180deg)}75%{transform:translate(0) rotate(270deg)}to{transform:translate(-50px) rotate(360deg)}}@keyframes bounce-b052c8c7{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}@keyframes fade-in-up-b052c8c7{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.animate-rolling-ball[data-v-b052c8c7]{animation:rolling-ball-b052c8c7 4s infinite ease-in-out,bounce-b052c8c7 1s infinite ease-in-out}.animate-fade-in-up[data-v-b052c8c7]{animation:fade-in-up-b052c8c7 1.5s ease-out}.custom-scrollbar[data-v-1219cfc9]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-1219cfc9]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1219cfc9]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-1219cfc9]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}@keyframes custom-pulse-1219cfc9{0%,to{box-shadow:0 0 #3b82f680}50%{box-shadow:0 0 0 15px #3b82f600}}.animate-pulse[data-v-1219cfc9]{animation:custom-pulse-1219cfc9 2s infinite}.slide-right-enter-active[data-v-1219cfc9],.slide-right-leave-active[data-v-1219cfc9]{transition:transform .3s ease}.slide-right-enter[data-v-1219cfc9],.slide-right-leave-to[data-v-1219cfc9]{transform:translate(-100%)}.slide-left-enter-active[data-v-1219cfc9],.slide-left-leave-active[data-v-1219cfc9]{transition:transform .3s ease}.slide-left-enter[data-v-1219cfc9],.slide-left-leave-to[data-v-1219cfc9]{transform:translate(100%)}.fade-and-fly-enter-active[data-v-1219cfc9]{animation:fade-and-fly-enter-1219cfc9 .5s ease}.fade-and-fly-leave-active[data-v-1219cfc9]{animation:fade-and-fly-leave-1219cfc9 .5s ease}@keyframes fade-and-fly-enter-1219cfc9{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-1219cfc9{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-1219cfc9],.list-enter-active[data-v-1219cfc9],.list-leave-active[data-v-1219cfc9]{transition:all .5s ease}.list-enter-from[data-v-1219cfc9]{transform:translatey(-30px)}.list-leave-to[data-v-1219cfc9]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-1219cfc9]{position:absolute}@keyframes float-1219cfc9{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}.animate-float[data-v-1219cfc9]{animation:float-1219cfc9 3s ease-in-out infinite}@keyframes roll-1219cfc9{0%{transform:translate(-50%) rotate(0)}to{transform:translate(50%) rotate(360deg)}}.animate-roll[data-v-1219cfc9]{animation:roll-1219cfc9 4s linear infinite}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:white;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}.app-card[data-v-bb6b8f80]{transition:all .3s ease}.app-card[data-v-bb6b8f80]:hover{transform:translateY(-5px)}button[data-v-bb6b8f80]{transition:all .3s ease}button[data-v-bb6b8f80]:hover{transform:translateY(-2px)}.scrollbar-thin[data-v-bb6b8f80]::-webkit-scrollbar{width:6px}.scrollbar-thin[data-v-bb6b8f80]::-webkit-scrollbar-track{background:#f1f1f1}.scrollbar-thin[data-v-bb6b8f80]::-webkit-scrollbar-thumb{background:#888;border-radius:3px}.scrollbar-thin[data-v-bb6b8f80]::-webkit-scrollbar-thumb:hover{background:#555}.btn[data-v-bb6b8f80]{font-weight:600;padding:.5rem 1rem;border-radius:.5rem;transition:all .3s ease-in-out;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;display:flex;align-items:center}.btn-primary[data-v-bb6b8f80]{background-color:#3b82f6;color:#fff}.btn-primary[data-v-bb6b8f80]:hover{background-color:#2563eb}.btn-primary[data-v-bb6b8f80]:focus{box-shadow:0 0 0 3px #3b82f680}.btn-secondary[data-v-bb6b8f80]{background-color:#e5e7eb;color:#374151}.btn-secondary[data-v-bb6b8f80]:hover{background-color:#d1d5db}.btn-secondary[data-v-bb6b8f80]:focus{box-shadow:0 0 0 3px #6b728080}.search-input[data-v-bb6b8f80]{width:100%;border-bottom:2px solid #e5e7eb;padding:.5rem 1rem .5rem 2.5rem;transition:border-color .3s ease-in-out}.search-input[data-v-bb6b8f80]:focus{outline:none;border-color:#3b82f6}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:PTSans,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1F2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4B5563}.dark input[type=file]::file-selector-button:hover{background:#6B7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6B7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1C64F2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9CA3AF}.dark input[type=range]:disabled::-moz-range-thumb{background:#6B7280}input[type=range]::-moz-range-progress{background:#3F83F8}input[type=range]::-ms-fill-lower{background:#3F83F8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:white;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1C64F2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}html{scroll-behavior:smooth}@font-face{font-family:Roboto;src:url(/assets/Roboto-Regular-7277cfb8.ttf) format("truetype")}@font-face{font-family:PTSans;src:url(/assets/PTSans-Regular-23b91352.ttf) format("truetype")}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1{left:-.25rem}.-left-1\.5{left:-.375rem}.-left-6{left:-1.5rem}.-right-0{right:-0px}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-right-6{right:-1.5rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.-top-2{top:-.5rem}.-top-20{top:-5rem}.-top-6{top:-1.5rem}.-top-9{top:-2.25rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-\[60px\]{bottom:60px}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-20{left:5rem}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1{margin-top:-.25rem;margin-bottom:-.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-5\/6{height:83.333333%}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-\[220px\]{height:220px}.h-\[600px\]{height:600px}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-6{max-height:1.5rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-\[500px\]{min-height:500px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-4\/6{width:66.666667%}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[1000px\]{width:1000px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-\[23rem\]{min-width:23rem}.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[23rem\]{max-width:23rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-\[900px\]{max-width:900px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y: -0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-\[40px\,1fr\]{grid-template-columns:40px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-discussion{background-color:var(--color-bg-light-discussion)}.bg-bg-light-panel{background-color:var(--color-bg-light-panel)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-300{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-0{--tw-bg-opacity: 0}.bg-opacity-10{--tw-bg-opacity: .1}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bg-light-tone{--tw-gradient-from: var(--color-bg-light-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-100{--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-200{--tw-gradient-from: #C3DDFD var(--tw-gradient-from-position);--tw-gradient-to: rgb(195 221 253 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-600{--tw-gradient-from: #1C64F2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-100{--tw-gradient-from: #E5EDFF var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 237 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-600{--tw-gradient-from: #5850EC var(--tw-gradient-from-position);--tw-gradient-to: rgb(88 80 236 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-100{--tw-gradient-to: #EDEBFE var(--tw-gradient-to-position)}.to-purple-200{--tw-gradient-to: #DCD7FE var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #7E3AF2 var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #ffffff var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-blue-600{fill:#1c64f2}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-sans{font-family:PTSans,Roboto,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-\[\.82rem\]{font-size:.82rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-dark-text-panel{color:var(--color-dark-text-panel)}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{font-size:36px;font-weight:700}h2{font-size:24px;font-weight:700}h3{font-size:18px;font-weight:700}h4{font-size:18px;font-style:italic}p{font-size:16px;word-wrap:break-word;overflow-wrap:break-word;white-space:normal}ul{list-style-type:disc;margin-left:0}li{list-style-type:disc;margin-left:20px}ol{list-style-type:decimal;margin-left:20px}:root{--color-primary: #0e8ef0;--color-primary-light: #3dabff;--color-secondary: #0fd974;--color-accent: #f0700e;--color-light-text-panel: #ffffff;--color-dark-text-panel: #ffffff;--color-bg-light-panel: #7cb5ec;--color-bg-light: #e2edff;--color-bg-light-tone: #b9d2f7;--color-bg-light-code-block: #cad7ed;--color-bg-light-tone-panel: #8fb5ef;--color-bg-light-discussion: #c5d8f8;--color-bg-light-discussion-odd: #d6e7ff;--color-bg-dark: #132e59;--color-bg-dark-tone: #25477d;--color-bg-dark-tone-panel: #4367a3;--color-bg-dark-code-block: #2254a7;--color-bg-dark-discussion: #435E8A;--color-bg-dark-discussion-odd: #284471}.last\:mb-0:last-child{margin-bottom:0}.last\:\!border-transparent:last-child{border-color:transparent!important}.last\:pb-0:last-child{padding-bottom:0}.odd\:bg-bg-light-tone:nth-child(odd){background-color:var(--color-bg-light-tone)}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.even\:bg-bg-light-tone-panel:nth-child(2n){background-color:var(--color-bg-light-tone-panel)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:bottom-0{bottom:0}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:-translate-x-12{--tw-translate-x: -3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-y-8{--tw-translate-y: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-x-\[0px\]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:translate-y-\[-50px\]{--tw-translate-y: -50px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group:hover .group-hover\:text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-0{opacity:0}.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:z-50:hover{z-index:50}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-8:hover{--tw-translate-y: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:translate-y-\[-5px\]:hover{--tw-translate-y: -5px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-150:hover{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-400:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{background-color:var(--color-secondary)}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-opacity-20:hover{--tw-bg-opacity: .2}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:fill-primary:hover{fill:var(--color-primary)}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-300:hover{--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(88 80 236 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-purple-600:hover{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(159 88 10 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}:is(.dark .dark\:divide-gray-700)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}:is(.dark .dark\:border-bg-light){border-color:var(--color-bg-light)}:is(.dark .dark\:border-blue-500){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-500){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-600){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-800){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-900){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}:is(.dark .dark\:border-green-500){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-400){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}:is(.dark .dark\:border-pink-500){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-400){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}:is(.dark .dark\:border-purple-500){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}:is(.dark .dark\:border-red-500){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}:is(.dark .dark\:border-transparent){border-color:transparent}:is(.dark .dark\:border-yellow-300){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}:is(.dark .dark\:bg-bg-dark){background-color:var(--color-bg-dark)}:is(.dark .dark\:bg-bg-dark-discussion){background-color:var(--color-bg-dark-discussion)}:is(.dark .dark\:bg-bg-dark-tone){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:bg-bg-dark-tone-panel){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:bg-black){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-200){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-500){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-600){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-700){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-800){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-blue-900){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-200){--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-300){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-500){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-600){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800\/30){background-color:#1f29374d}:is(.dark .dark\:bg-gray-800\/50){background-color:#1f293780}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-200){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-500){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-600){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-green-800){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-200){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-indigo-500){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-700){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-orange-800){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-200){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-pink-600){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-200){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-500){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-purple-600){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-200){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-500){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-600){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-red-800){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-yellow-200){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-opacity-70){--tw-bg-opacity: .7}:is(.dark .dark\:bg-opacity-80){--tw-bg-opacity: .8}:is(.dark .dark\:from-bg-dark){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-bg-dark-tone){--tw-gradient-from: var(--color-bg-dark-tone) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-blue-400){--tw-gradient-from: #76A9FA var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-blue-800){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-blue-900){--tw-gradient-from: #233876 var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-indigo-400){--tw-gradient-from: #8DA2FB var(--tw-gradient-from-position);--tw-gradient-to: rgb(141 162 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:from-indigo-900){--tw-gradient-from: #362F78 var(--tw-gradient-from-position);--tw-gradient-to: rgb(54 47 120 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}:is(.dark .dark\:via-bg-dark){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}:is(.dark .dark\:to-gray-800){--tw-gradient-to: #1F2937 var(--tw-gradient-to-position)}:is(.dark .dark\:to-purple-400){--tw-gradient-to: #AC94FA var(--tw-gradient-to-position)}:is(.dark .dark\:to-purple-800){--tw-gradient-to: #5521B5 var(--tw-gradient-to-position)}:is(.dark .dark\:to-purple-900){--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}:is(.dark .dark\:fill-gray-300){fill:#d1d5db}:is(.dark .dark\:fill-white){fill:#fff}:is(.dark .dark\:text-blue-200){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-400){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-500){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:text-blue-800){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}:is(.dark .dark\:text-dark-text-panel){color:var(--color-dark-text-panel)}:is(.dark .dark\:text-gray-200){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-500){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-600){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-100){--tw-text-opacity: 1;color:rgb(222 247 236 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-200){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-500){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-800){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}:is(.dark .dark\:text-green-900){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-500){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}:is(.dark .dark\:text-indigo-900){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}:is(.dark .dark\:text-light-text-panel){color:var(--color-light-text-panel)}:is(.dark .dark\:text-orange-200){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-400){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-500){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}:is(.dark .dark\:text-pink-900){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}:is(.dark .dark\:text-primary){color:var(--color-primary)}:is(.dark .dark\:text-purple-400){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-500){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}:is(.dark .dark\:text-purple-900){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-200){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-500){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-800){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}:is(.dark .dark\:text-red-900){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}:is(.dark .dark\:text-slate-50){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-300){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-500){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-800){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}:is(.dark .dark\:text-yellow-900){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}:is(.dark .dark\:placeholder-gray-400)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:placeholder-gray-400)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}:is(.dark .dark\:shadow-lg){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:is(.dark .dark\:shadow-blue-800\/80){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-cyan-800\/80){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-green-800\/80){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-lime-800\/80){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-pink-800\/80){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-purple-800\/80){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-red-800\/80){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:shadow-teal-800\/80){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}:is(.dark .dark\:ring-gray-500){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:ring-offset-gray-700){--tw-ring-offset-color: #374151}:is(.dark .dark\:ring-offset-gray-800){--tw-ring-offset-color: #1F2937}:is(.dark .dark\:scrollbar-track-bg-dark){--scrollbar-track: var(--color-bg-dark) !important}:is(.dark .dark\:scrollbar-track-bg-dark-tone){--scrollbar-track: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone){--scrollbar-thumb: var(--color-bg-dark-tone) !important}:is(.dark .dark\:scrollbar-thumb-bg-dark-tone-panel){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}:is(.dark .odd\:dark\:bg-bg-dark-tone):nth-child(odd){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n)){background-color:var(--color-bg-dark-discussion-odd)}:is(.dark .dark\:even\:bg-bg-dark-tone-panel:nth-child(2n)){background-color:var(--color-bg-dark-tone-panel)}:is(.dark .group:hover .dark\:group-hover\:bg-gray-800\/60){background-color:#1f293799}:is(.dark .group:hover .dark\:group-hover\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .group:focus .dark\:group-focus\:ring-gray-800\/70){--tw-ring-color: rgb(31 41 55 / .7)}:is(.dark .dark\:hover\:border-gray-600:hover){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}:is(.dark .dark\:hover\:border-primary:hover){border-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-bg-dark-tone:hover){background-color:var(--color-bg-dark-tone)}:is(.dark .dark\:hover\:bg-blue-300:hover){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-600:hover){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-blue-700:hover){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-600:hover){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-700:hover){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-gray-800:hover){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-300:hover){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-600:hover){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-green-700:hover){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-500:hover){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-pink-700:hover){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-primary:hover){background-color:var(--color-primary)}:is(.dark .dark\:hover\:bg-purple-500:hover){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-purple-700:hover){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-300:hover){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-600:hover){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-red-700:hover){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-secondary:hover){background-color:var(--color-secondary)}:is(.dark .dark\:hover\:bg-yellow-300:hover){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-yellow-400:hover){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}:is(.dark .hover\:dark\:bg-bg-dark-tone):hover{background-color:var(--color-bg-dark-tone)}:is(.dark .hover\:dark\:bg-bg-dark-tone-panel):hover{background-color:var(--color-bg-dark-tone-panel)}:is(.dark .dark\:hover\:fill-primary:hover){fill:var(--color-primary)}:is(.dark .dark\:hover\:text-blue-500:hover){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-300:hover){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-gray-900:hover){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:scrollbar-thumb-primary){--scrollbar-thumb-hover: var(--color-primary) !important}:is(.dark .dark\:focus\:border-blue-500:focus){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}:is(.dark .dark\:focus\:border-secondary:focus){border-color:var(--color-secondary)}:is(.dark .dark\:focus\:text-white:focus){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:focus\:ring-blue-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-blue-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-cyan-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-500:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-600:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-gray-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-green-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-lime-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-pink-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-purple-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-400:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-red-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-secondary:focus){--tw-ring-color: var(--color-secondary)}:is(.dark .dark\:focus\:ring-teal-700:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-teal-800:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-yellow-900:focus){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}:is(.dark .dark\:focus\:ring-offset-gray-700:focus){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}:is(.dark .md\:dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .md\:dark\:hover\:bg-transparent:hover){background-color:transparent}:is(.dark .md\:dark\:hover\:text-white:hover){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} diff --git a/web/dist/index.html b/web/dist/index.html index 1c43a8a5..c9971d56 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -6,8 +6,8 @@ LoLLMS WebUI - - + +
diff --git a/web/src/components/StringListManager.vue b/web/src/components/StringListManager.vue index 966c6208..381fd1e3 100644 --- a/web/src/components/StringListManager.vue +++ b/web/src/components/StringListManager.vue @@ -1,115 +1,138 @@ - - - - \ No newline at end of file + removeItem(index) { + const updatedList = this.modelValue.filter((_, i) => i !== index); + this.$emit('update:modelValue', updatedList); + this.$emit('change'); + }, + removeAll() { + this.$emit('update:modelValue', []); + this.$emit('change'); + }, + startDragging(index) { + this.draggingIndex = index; + }, + dragItem(index) { + if (this.draggingIndex !== null) { + const updatedList = [...this.modelValue]; + const draggedItem = updatedList.splice(this.draggingIndex, 1)[0]; + updatedList.splice(index, 0, draggedItem); + this.$emit('update:modelValue', updatedList); + this.$emit('change'); + } + }, + stopDragging() { + this.draggingIndex = null; + }, + moveUp(index) { + if (index > 0) { + const updatedList = [...this.modelValue]; + const itemToMove = updatedList.splice(index, 1)[0]; + updatedList.splice(index - 1, 0, itemToMove); + this.$emit('update:modelValue', updatedList); + this.$emit('change'); + } + }, + moveDown(index) { + if (index < this.modelValue.length - 1) { + const updatedList = [...this.modelValue]; + const itemToMove = updatedList.splice(index, 1)[0]; + updatedList.splice(index + 1, 0, itemToMove); + this.$emit('update:modelValue', updatedList); + this.$emit('change'); + } + }, + }, +}; + \ No newline at end of file diff --git a/web/src/views/SettingsView.vue b/web/src/views/SettingsView.vue index 85bc0d8e..e5f8c3bd 100644 --- a/web/src/views/SettingsView.vue +++ b/web/src/views/SettingsView.vue @@ -241,6 +241,22 @@ > + + + + + + + + + +