From 2d2d3736a6c25b8853d1c7d78570f8ea7560dc79 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 8 Apr 2025 22:58:29 +0200 Subject: [PATCH] done --- lollms_core | 2 +- lollms_webui.py | 8 ++++---- web/dist/assets/{index-Dw1B8Khu.js => index-BLyg1k4x.js} | 2 +- web/dist/assets/{index-D_wrAvKg.js => index-BSvAbCev.js} | 2 +- web/dist/assets/{index-BQOKF27n.js => index-BZZBodTC.js} | 2 +- web/dist/assets/{index-76yn-lwE.js => index-BoLdJ8R5.js} | 2 +- web/dist/assets/{index-CClvqRni.js => index-BoYRIm2P.js} | 2 +- web/dist/assets/{index-DiFBq1n1.js => index-DgMg835f.js} | 4 ++-- web/dist/assets/{index-COgkX41k.js => index-NKVHnLNP.js} | 2 +- web/dist/index.html | 2 +- web/src/views/DiscussionsView.vue | 3 ++- 11 files changed, 16 insertions(+), 15 deletions(-) rename web/dist/assets/{index-Dw1B8Khu.js => index-BLyg1k4x.js} (97%) rename web/dist/assets/{index-D_wrAvKg.js => index-BSvAbCev.js} (98%) rename web/dist/assets/{index-BQOKF27n.js => index-BZZBodTC.js} (99%) rename web/dist/assets/{index-76yn-lwE.js => index-BoLdJ8R5.js} (99%) rename web/dist/assets/{index-CClvqRni.js => index-BoYRIm2P.js} (99%) rename web/dist/assets/{index-DiFBq1n1.js => index-DgMg835f.js} (99%) rename web/dist/assets/{index-COgkX41k.js => index-NKVHnLNP.js} (99%) diff --git a/lollms_core b/lollms_core index f7759f0f..ad12efdf 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit f7759f0f7680ad6233c2ef5ef1ed4cc533d8a953 +Subproject commit ad12efdf07a0b39003118695c5bd2b6e29185965 diff --git a/lollms_webui.py b/lollms_webui.py index 74abb6da..43b85c0d 100644 --- a/lollms_webui.py +++ b/lollms_webui.py @@ -77,10 +77,10 @@ def terminate_thread(thread): lollms_webui_version = { - "version_main":19, - "version_secondary":"20", - "version_type":"", - "version_codename":"Ghibli" + "version_main":"19", + "version_secondary":"2242", + "version_type":"Alpha", + "version_codename":"Twins" } diff --git a/web/dist/assets/index-Dw1B8Khu.js b/web/dist/assets/index-BLyg1k4x.js similarity index 97% rename from web/dist/assets/index-Dw1B8Khu.js rename to web/dist/assets/index-BLyg1k4x.js index afe21f16..8a312d49 100644 --- a/web/dist/assets/index-Dw1B8Khu.js +++ b/web/dist/assets/index-BLyg1k4x.js @@ -1 +1 @@ -import{b as O,d as b,L as r,f as s,g as a,s as t,j as P,l as n,t as e}from"./index-DiFBq1n1.js";const S={__proto__:null,anyref:34,dataref:34,eqref:34,externref:34,i31ref:34,funcref:34,i8:34,i16:34,i32:34,i64:34,f32:34,f64:34},Q=r.deserialize({version:14,states:"!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",stateData:"!P~O_OSPOSQOS~OTPOVROXROYROZROaQO~OSUO~P]OSXO~P]O",goto:"xaPPPPPPbPbPPPhPPPrXROPTVQTOQVPTWTVXSOPTV",nodeNames:"⚠ LineComment BlockComment Module ) ( App Identifier Type Keyword Number String",maxTerm:17,nodeProps:[["isolate",-3,1,2,11,""],["openedBy",4,"("],["closedBy",5,")"],["group",-6,6,7,8,9,10,11,"Expression"]],skippedNodes:[0,1,2],repeatNodeCount:1,tokenData:"0o~R^XY}YZ}]^}pq}rs!Stu#pxy'Uyz(e{|(j}!O(j!Q!R(s!R![*p!]!^.^#T#o.{~!SO_~~!VVOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j<%lO!S~!qOZ~~!tRO;'S!S;'S;=`!};=`O!S~#QWOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j;=`<%l!S<%lO!S~#mP;=`<%l!S~#siqr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%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]||-1}],tokenPrec:0}),i=O.define({name:"wast",parser:Q.configure({props:[s.add({App:P({closing:")",align:!1})}),a.add({App:n,BlockComment(o){return{from:o.from+2,to:o.to-2}}}),t({Keyword:e.keyword,Type:e.typeName,Number:e.number,String:e.string,Identifier:e.variableName,LineComment:e.lineComment,BlockComment:e.blockComment,"( )":e.paren})]}),languageData:{commentTokens:{line:";;",block:{open:"(;",close:";)"}},closeBrackets:{brackets:["(",'"']}}});function p(){return new b(i)}export{p as wast,i as wastLanguage}; +import{b as O,d as b,L as r,f as s,g as a,s as t,j as P,l as n,t as e}from"./index-DgMg835f.js";const S={__proto__:null,anyref:34,dataref:34,eqref:34,externref:34,i31ref:34,funcref:34,i8:34,i16:34,i32:34,i64:34,f32:34,f64:34},Q=r.deserialize({version:14,states:"!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",stateData:"!P~O_OSPOSQOS~OTPOVROXROYROZROaQO~OSUO~P]OSXO~P]O",goto:"xaPPPPPPbPbPPPhPPPrXROPTVQTOQVPTWTVXSOPTV",nodeNames:"⚠ LineComment BlockComment Module ) ( App Identifier Type Keyword Number String",maxTerm:17,nodeProps:[["isolate",-3,1,2,11,""],["openedBy",4,"("],["closedBy",5,")"],["group",-6,6,7,8,9,10,11,"Expression"]],skippedNodes:[0,1,2],repeatNodeCount:1,tokenData:"0o~R^XY}YZ}]^}pq}rs!Stu#pxy'Uyz(e{|(j}!O(j!Q!R(s!R![*p!]!^.^#T#o.{~!SO_~~!VVOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j<%lO!S~!qOZ~~!tRO;'S!S;'S;=`!};=`O!S~#QWOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j;=`<%l!S<%lO!S~#mP;=`<%l!S~#siqr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!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3]},specialized:[{term:9,get:o=>S[o]||-1}],tokenPrec:0}),i=O.define({name:"wast",parser:Q.configure({props:[s.add({App:P({closing:")",align:!1})}),a.add({App:n,BlockComment(o){return{from:o.from+2,to:o.to-2}}}),t({Keyword:e.keyword,Type:e.typeName,Number:e.number,String:e.string,Identifier:e.variableName,LineComment:e.lineComment,BlockComment:e.blockComment,"( )":e.paren})]}),languageData:{commentTokens:{line:";;",block:{open:"(;",close:";)"}},closeBrackets:{brackets:["(",'"']}}});function p(){return new b(i)}export{p as wast,i as wastLanguage}; diff --git a/web/dist/assets/index-D_wrAvKg.js b/web/dist/assets/index-BSvAbCev.js similarity index 98% rename from web/dist/assets/index-D_wrAvKg.js rename to web/dist/assets/index-BSvAbCev.js index 1cbcac7d..b20e2c1a 100644 --- a/web/dist/assets/index-D_wrAvKg.js +++ b/web/dist/assets/index-BSvAbCev.js @@ -1 +1 @@ -import{b as q,d as P,q as g,r as l,L as c,u as i,s as R,t as r,E as p}from"./index-DiFBq1n1.js";const b=1,$=33,m=34,v=35,x=36,d=new p(O=>{let e=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>e&&O.acceptToken(b)});function n(O,e,a){return new p(t=>{let u=t.pos;for(;t.next!=O&&t.next>=0&&(a||t.next!=38&&(t.next!=123||t.peek(1)!=123));)t.advance();t.pos>u&&t.acceptToken(e)})}const W=n(39,$,!1),C=n(34,m,!1),T=n(39,v,!0),f=n(34,x,!0),A=c.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<O.name=="InterpolationContent"?o:null)}),y=Q.configure({wrap:l((O,e)=>{var a;return O.name=="InterpolationContent"?o:O.name!="AttributeInterpolation"?null:((a=O.node.parent)===null||a===void 0?void 0:a.name)=="StatementAttributeValue"?w:o}),top:"Attribute"}),E={parser:U},N={parser:y},s=g();function S(O){return O.configure({wrap:l(z)},"angular")}const k=S(s.language);function z(O,e){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(e.read(O.from,O.to))?N:null;case"Text":return E}return null}function G(O={}){let e=s;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof q))throw new RangeError("The base option must be the result of calling html(...)");e=O.base}return new P(e.language==s.language?k:S(e.language),[e.support,e.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{G as angular,k as angularLanguage}; +import{b as q,d as P,q as g,r as l,L as c,u as i,s as R,t as r,E as p}from"./index-DgMg835f.js";const b=1,$=33,m=34,v=35,x=36,d=new p(O=>{let e=O.pos;for(;;){if(O.next==10){O.advance();break}else if(O.next==123&&O.peek(1)==123||O.next<0)break;O.advance()}O.pos>e&&O.acceptToken(b)});function n(O,e,a){return new p(t=>{let u=t.pos;for(;t.next!=O&&t.next>=0&&(a||t.next!=38&&(t.next!=123||t.peek(1)!=123));)t.advance();t.pos>u&&t.acceptToken(e)})}const W=n(39,$,!1),C=n(34,m,!1),T=n(39,v,!0),f=n(34,x,!0),A=c.deserialize({version:14,states:"(jOVOqOOOeQpOOOvO!bO'#CaOOOP'#Cx'#CxQVOqOOO!OQpO'#CfO!WQpO'#ClO!]QpO'#CrO!bQpO'#CsOOQO'#Cv'#CvQ!gQpOOQ!lQpOOQ!qQpOOOOOV,58{,58{O!vOpO,58{OOOP-E6v-E6vO!{QpO,59QO#TQpO,59QOOQO,59W,59WO#YQpO,59^OOQO,59_,59_O#_QpOOO#_QpOOO#gQpOOOOOV1G.g1G.gO#oQpO'#CyO#tQpO1G.lOOQO1G.l1G.lO#|QpO1G.lOOQO1G.x1G.xO$UO`O'#DUO$ZOWO'#DUOOQO'#Co'#CoQOQpOOOOQO'#Cu'#CuO$`OtO'#CwO$qOrO'#CwOOQO,59e,59eOOQO-E6w-E6wOOQO7+$W7+$WO%SQpO7+$WO%[QpO7+$WOOOO'#Cp'#CpO%aOpO,59pOOOO'#Cq'#CqO%fOpO,59pOOOS'#Cz'#CzO%kOtO,59cOOQO,59c,59cOOOQ'#C{'#C{O%|OrO,59cO&_QpO<O.name=="InterpolationContent"?o:null)}),y=Q.configure({wrap:l((O,e)=>{var a;return O.name=="InterpolationContent"?o:O.name!="AttributeInterpolation"?null:((a=O.node.parent)===null||a===void 0?void 0:a.name)=="StatementAttributeValue"?w:o}),top:"Attribute"}),E={parser:U},N={parser:y},s=g();function S(O){return O.configure({wrap:l(z)},"angular")}const k=S(s.language);function z(O,e){switch(O.name){case"Attribute":return/^[*#(\[]|\{\{/.test(e.read(O.from,O.to))?N:null;case"Text":return E}return null}function G(O={}){let e=s;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof q))throw new RangeError("The base option must be the result of calling html(...)");e=O.base}return new P(e.language==s.language?k:S(e.language),[e.support,e.language.data.of({closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/})])}export{G as angular,k as angularLanguage}; diff --git a/web/dist/assets/index-BQOKF27n.js b/web/dist/assets/index-BZZBodTC.js similarity index 99% rename from web/dist/assets/index-BQOKF27n.js rename to web/dist/assets/index-BZZBodTC.js index ec7c2e2f..33fba337 100644 --- a/web/dist/assets/index-BQOKF27n.js +++ b/web/dist/assets/index-BZZBodTC.js @@ -1 +1 @@ -import{o as h,p as b,q as v,d as y,b as k,r as u,m as T,L as _,s as W,f as R,g as Y,t,j as w,E as P}from"./index-DiFBq1n1.js";const j=1,U=2,X=3,G=180,S=4,z=181,x=5,Z=182,E=6;function V(O){return O>=65&&O<=90||O>=97&&O<=122}const D=new P(O=>{let a=O.pos;for(;;){let{next:e}=O;if(e<0)break;if(e==123){let r=O.peek(1);if(r==123){if(O.pos>a)break;O.acceptToken(j,2);return}else if(r==37){if(O.pos>a)break;let $=2,i=2;for(;;){let n=O.peek($);if(n==32||n==10)++$;else if(n==35)for(++$;;){let Q=O.peek($);if(Q<0||Q==10)break;$++}else if(n==45&&i==2)i=++$;else{let Q=n==101&&O.peek($+1)==110&&O.peek($+2)==100;O.acceptToken(Q?X:U,i);return}}}}if(O.advance(),e==10)break}O.pos>a&&O.acceptToken(G)});function f(O,a,e){return new P(r=>{let $=r.pos;for(;;){let{next:i}=r;if(i==123&&r.peek(1)==37){let n=2;for(;;n++){let s=r.peek(n);if(s!=32&&s!=10)break}let Q="";for(;;n++){let s=r.peek(n);if(!V(s))break;Q+=String.fromCharCode(s)}if(Q==O){if(r.pos>$)break;r.acceptToken(e,2);break}}else if(i<0)break;if(r.advance(),i==10)break}r.pos>$&&r.acceptToken(a)})}const F=f("endcomment",Z,x),C=f("endraw",z,S),N=new P(O=>{if(O.next==35){for(O.advance();!(O.next==10||O.next<0||(O.next==37||O.next==125)&&O.peek(1)==125);)O.advance();O.acceptToken(E)}}),I={__proto__:null,contains:32,or:36,and:36,true:50,false:50,empty:52,forloop:54,tablerowloop:56,continue:58,in:128,with:194,for:196,as:198,if:234,endif:238,unless:244,endunless:248,elsif:252,else:256,case:262,endcase:266,when:270,endfor:278,tablerow:284,endtablerow:288,break:292,cycle:298,echo:302,render:306,include:312,assign:316,capture:322,endcapture:326,increment:330,decrement:334},L={__proto__:null,if:82,endif:86,elsif:90,else:94,unless:100,endunless:104,case:110,endcase:114,when:118,for:126,endfor:136,tablerow:142,endtablerow:146,break:150,continue:154,cycle:158,comment:164,endcomment:170,raw:176,endraw:182,echo:186,render:190,include:202,assign:206,capture:212,endcapture:216,increment:220,decrement:224,liquid:228},A=_.deserialize({version:14,states:"HOQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DQO#{OPO'#DTO$ZOPO'#D^O$iOPO'#DcO$wOPO'#DkO%VOPO'#DsO%eOSO'#EOO%jOQO'#EUO%oOPO'#EhOOOP'#G`'#G`OOOP'#G]'#G]OOOP'#Fz'#FzQYOPOOOOOP-E9y-E9yOOQW'#Cg'#CgO&`Q!jO,59QO&gQ!jO'#G^OsQhO'#CsOOQW'#G^'#G^OOOP,59l,59lO)PQhO,59lOsQhO,59pOsQhO,59tO)ZQhO,59vOsQhO,59yOsQhO,5:OOsQhO,5:SO!]QhO,5:WO!]QhO,5:`O)`QhO,5:dO)eQhO,5:fO)jQhO,5:hO)oQhO,5:kO)tQhO,5:qOsQhO,5:vOsQhO,5:xOsQhO,5;OOsQhO,5;QOsQhO,5;TOsQhO,5;XOsQhO,5;ZO+TQhO,5;]O+[OPO'#CdOOOP,59o,59oO#{OPO,59oO+jQxO'#DWOOOP,59x,59xO$ZOPO,59xO+oQxO'#DaOOOP,59},59}O$iOPO,59}O+tQxO'#DfOOOP,5:V,5:VO$wOPO,5:VO+yQxO'#DqOOOP,5:_,5:_O%VOPO,5:_O,OQxO'#DvOOOS'#GQ'#GQO,TOSO'#ERO,]OSO,5:jOOOQ'#GR'#GRO,bOQO'#EXO,jOQO,5:pOOOP,5;S,5;SO%oOPO,5;SO,oQxO'#EkOOOP-E9x-E9xO,tQ#|O,59SOsQhO,59VOsQhO,59VO,yQhO'#C|OOQW'#F|'#F|O-OQhO1G.lOOOP1G.l1G.lOsQhO,59VOsQhO,59ZO-WQ!jO,59_O-iQ!jO1G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OEfQhO,5;uOEkQhO,5;yOEpQhO,5dOOOPAN>dAN>dO!7QQhOAN>lOOOPAN>lAN>lO!7YQhOAN>tOOOPAN>tAN>tOsQhO1G0fO!]QhO1G0fO!7bQ!jO7+&{O!8qQ!jO7+'PO!:QQhO7+'WO!;tQhO,5I[O]||-1},{term:37,get:O=>L[O]||-1}],tokenPrec:0});function l(O,a){return O.split(" ").map(e=>({label:e,type:a}))}const q=l("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where","function"),p=l("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include","keyword"),d=l("empty forloop tablerowloop in with as contains","keyword"),B=l("first index index0 last length rindex","property"),H=l("col col0 col_first col_last first index index0 last length rindex rindex0 row","property");function M(O){var a;let{state:e,pos:r}=O,$=T(e).resolveInner(r,-1).enterUnfinishedNodesBefore(r),i=((a=$.childBefore(r))===null||a===void 0?void 0:a.name)||$.name;if($.name=="FilterName")return{type:"filter",node:$};if(O.explicit&&i=="|")return{type:"filter"};if($.name=="TagName")return{type:"tag",node:$};if(O.explicit&&i=="{%")return{type:"tag"};if($.name=="PropertyName"&&$.parent.name=="MemberExpression")return{type:"property",node:$,target:$.parent};if($.name=="."&&$.parent.name=="MemberExpression")return{type:"property",target:$.parent};if($.name=="MemberExpression"&&i==".")return{type:"property",target:$};if($.name=="VariableName")return{type:"expression",from:$.from};let n=O.matchBefore(/[\w\u00c0-\uffff]+$/);return n?{type:"expression",from:n.from}:O.explicit&&$.name!="CommentText"&&$.name!="StringLiteral"&&$.name!="NumberLiteral"&&$.name!="InlineComment"?{type:"expression"}:null}function K(O,a,e,r){let $=[];for(;;){let i=a.getChild("Expression");if(!i)return[];if(i.name=="forloop")return $.length?[]:B;if(i.name=="tablerowloop")return $.length?[]:H;if(i.name=="VariableName"){$.unshift(O.sliceDoc(i.from,i.to));break}else if(i.name=="MemberExpression"){let n=i.getChild("PropertyName");n&&$.unshift(O.sliceDoc(n.from,n.to)),a=i}else return[]}return r?r($,O,e):[]}function J(O={}){let a=O.filters?O.filters.concat(q):q,e=O.tags?O.tags.concat(p):p,r=O.variables?O.variables.concat(d):d,{properties:$}=O;return i=>{var n;let Q=M(i);if(!Q)return null;let s=(n=Q.from)!==null&&n!==void 0?n:Q.node?Q.node.from:i.pos,o;return Q.type=="filter"?o=a:Q.type=="tag"?o=e:Q.type=="expression"?o=r:o=K(i.state,Q.target,i,$),o.length?{options:o,from:s,validFor:/^[\w\u00c0-\uffff]*$/}:null}}const OO=h.inputHandler.of((O,a,e,r)=>r!="%"||a!=e||O.state.doc.sliceString(a-1,e+1)!="{}"?!1:(O.dispatch(O.state.changeByRange($=>({changes:{from:$.from,to:$.to,insert:"%%"},range:b.cursor($.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function c(O){return a=>{let e=O.test(a.textAfter);return a.lineIndent(a.node.from)+(e?0:a.unit)}}const $O=k.define({name:"liquid",parser:A.configure({props:[W({"cycle comment endcomment raw endraw echo increment decrement liquid in with as":t.keyword,"empty forloop tablerowloop":t.atom,"if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue":t.controlKeyword,"assign capture endcapture":t.definitionKeyword,contains:t.operatorKeyword,"render include":t.moduleKeyword,VariableName:t.variableName,TagName:t.tagName,FilterName:t.function(t.variableName),PropertyName:t.propertyName,CompareOp:t.compareOperator,AssignOp:t.definitionOperator,LogicOp:t.logicOperator,NumberLiteral:t.number,StringLiteral:t.string,BooleanLiteral:t.bool,InlineComment:t.lineComment,CommentText:t.blockComment,"{% %} {{ }}":t.brace,"( )":t.paren,".":t.derefOperator,", .. : |":t.punctuation}),R.add({Tag:w({closing:"%}"}),"UnlessDirective ForDirective TablerowDirective CaptureDirective":c(/^\s*(\{%-?\s*)?end\w/),IfDirective:c(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),CaseDirective:c(/^\s*(\{%-?\s*)?(endcase|when)\b/)}),Y.add({"UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(O){let a=O.firstChild,e=O.lastChild;return!a||a.name!="Tag"?null:{from:a.to,to:e.name=="EndTag"?e.from:O.to}}})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*{%-?\s*(?:end|elsif|else|when|)$/}}),m=v();function g(O){return $O.configure({wrap:u(a=>a.type.isTop?{parser:O.parser,overlay:e=>e.name=="Text"||e.name=="RawText"}:null)},"liquid")}const aO=g(m.language);function iO(O={}){let a=O.base||m,e=a.language==m.language?aO:g(a.language);return new y(e,[a.support,e.data.of({autocomplete:J(O)}),a.language.data.of({closeBrackets:{brackets:["{"]}}),OO])}export{OO as closePercentBrace,iO as liquid,J as liquidCompletionSource,aO as liquidLanguage}; +import{o as h,p as b,q as v,d as y,b as k,r as u,m as T,L as _,s as W,f as R,g as Y,t,j as w,E as P}from"./index-DgMg835f.js";const j=1,U=2,X=3,G=180,S=4,z=181,x=5,Z=182,E=6;function V(O){return O>=65&&O<=90||O>=97&&O<=122}const D=new P(O=>{let a=O.pos;for(;;){let{next:e}=O;if(e<0)break;if(e==123){let r=O.peek(1);if(r==123){if(O.pos>a)break;O.acceptToken(j,2);return}else if(r==37){if(O.pos>a)break;let $=2,i=2;for(;;){let n=O.peek($);if(n==32||n==10)++$;else if(n==35)for(++$;;){let Q=O.peek($);if(Q<0||Q==10)break;$++}else if(n==45&&i==2)i=++$;else{let Q=n==101&&O.peek($+1)==110&&O.peek($+2)==100;O.acceptToken(Q?X:U,i);return}}}}if(O.advance(),e==10)break}O.pos>a&&O.acceptToken(G)});function f(O,a,e){return new P(r=>{let $=r.pos;for(;;){let{next:i}=r;if(i==123&&r.peek(1)==37){let n=2;for(;;n++){let s=r.peek(n);if(s!=32&&s!=10)break}let Q="";for(;;n++){let s=r.peek(n);if(!V(s))break;Q+=String.fromCharCode(s)}if(Q==O){if(r.pos>$)break;r.acceptToken(e,2);break}}else if(i<0)break;if(r.advance(),i==10)break}r.pos>$&&r.acceptToken(a)})}const F=f("endcomment",Z,x),C=f("endraw",z,S),N=new P(O=>{if(O.next==35){for(O.advance();!(O.next==10||O.next<0||(O.next==37||O.next==125)&&O.peek(1)==125);)O.advance();O.acceptToken(E)}}),I={__proto__:null,contains:32,or:36,and:36,true:50,false:50,empty:52,forloop:54,tablerowloop:56,continue:58,in:128,with:194,for:196,as:198,if:234,endif:238,unless:244,endunless:248,elsif:252,else:256,case:262,endcase:266,when:270,endfor:278,tablerow:284,endtablerow:288,break:292,cycle:298,echo:302,render:306,include:312,assign:316,capture:322,endcapture:326,increment:330,decrement:334},L={__proto__:null,if:82,endif:86,elsif:90,else:94,unless:100,endunless:104,case:110,endcase:114,when:118,for:126,endfor:136,tablerow:142,endtablerow:146,break:150,continue:154,cycle:158,comment:164,endcomment:170,raw:176,endraw:182,echo:186,render:190,include:202,assign:206,capture:212,endcapture:216,increment:220,decrement:224,liquid:228},A=_.deserialize({version:14,states:"HOQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DQO#{OPO'#DTO$ZOPO'#D^O$iOPO'#DcO$wOPO'#DkO%VOPO'#DsO%eOSO'#EOO%jOQO'#EUO%oOPO'#EhOOOP'#G`'#G`OOOP'#G]'#G]OOOP'#Fz'#FzQYOPOOOOOP-E9y-E9yOOQW'#Cg'#CgO&`Q!jO,59QO&gQ!jO'#G^OsQhO'#CsOOQW'#G^'#G^OOOP,59l,59lO)PQhO,59lOsQhO,59pOsQhO,59tO)ZQhO,59vOsQhO,59yOsQhO,5:OOsQhO,5:SO!]QhO,5:WO!]QhO,5:`O)`QhO,5:dO)eQhO,5:fO)jQhO,5:hO)oQhO,5:kO)tQhO,5:qOsQhO,5:vOsQhO,5:xOsQhO,5;OOsQhO,5;QOsQhO,5;TOsQhO,5;XOsQhO,5;ZO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P1G/y1G/yO4]QhO,5:bOOOS-E:O-E:OOOOP1G0U1G0UO4bQxO'#ESOOOQ-E:P-E:POOOP1G0[1G0[O4gQxO'#EYOOOP1G0n1G0nO4lQhO,5;VOOQW1G.n1G.nOOQW1G.q1G.qO7QQ!jO1G.qOOQW'#DO'#DOO7[QhO,59hOOQW-E9z-E9zOOOP7+$W7+$WO9UQ!jO1G.qO9`Q!jO1G.uOsQhO1G.yO;uQhO7+$rOOOP7+$r7+$rOOOP7+$v7+$vOOOP7+$z7+$zOOOP7+%P7+%POOOP7+%U7+%UOsQhO'#F}O;}QhO7+%YOOOP7+%Y7+%YOsQhO7+%^OsQhO7+%fOrQ!jO,5;eO@]Q!jO,5;iOBYQ!jO,5;nOCsQ!jO,5;rOEfQhO,5;uOEkQhO,5;yOEpQhO,5dOOOPAN>dAN>dO!7QQhOAN>lOOOPAN>lAN>lO!7YQhOAN>tOOOPAN>tAN>tOsQhO1G0fO!]QhO1G0fO!7bQ!jO7+&{O!8qQ!jO7+'PO!:QQhO7+'WO!;tQhO,5I[O]||-1},{term:37,get:O=>L[O]||-1}],tokenPrec:0});function l(O,a){return O.split(" ").map(e=>({label:e,type:a}))}const q=l("abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where","function"),p=l("cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include","keyword"),d=l("empty forloop tablerowloop in with as contains","keyword"),B=l("first index index0 last length rindex","property"),H=l("col col0 col_first col_last first index index0 last length rindex rindex0 row","property");function M(O){var a;let{state:e,pos:r}=O,$=T(e).resolveInner(r,-1).enterUnfinishedNodesBefore(r),i=((a=$.childBefore(r))===null||a===void 0?void 0:a.name)||$.name;if($.name=="FilterName")return{type:"filter",node:$};if(O.explicit&&i=="|")return{type:"filter"};if($.name=="TagName")return{type:"tag",node:$};if(O.explicit&&i=="{%")return{type:"tag"};if($.name=="PropertyName"&&$.parent.name=="MemberExpression")return{type:"property",node:$,target:$.parent};if($.name=="."&&$.parent.name=="MemberExpression")return{type:"property",target:$.parent};if($.name=="MemberExpression"&&i==".")return{type:"property",target:$};if($.name=="VariableName")return{type:"expression",from:$.from};let n=O.matchBefore(/[\w\u00c0-\uffff]+$/);return n?{type:"expression",from:n.from}:O.explicit&&$.name!="CommentText"&&$.name!="StringLiteral"&&$.name!="NumberLiteral"&&$.name!="InlineComment"?{type:"expression"}:null}function K(O,a,e,r){let $=[];for(;;){let i=a.getChild("Expression");if(!i)return[];if(i.name=="forloop")return $.length?[]:B;if(i.name=="tablerowloop")return $.length?[]:H;if(i.name=="VariableName"){$.unshift(O.sliceDoc(i.from,i.to));break}else if(i.name=="MemberExpression"){let n=i.getChild("PropertyName");n&&$.unshift(O.sliceDoc(n.from,n.to)),a=i}else return[]}return r?r($,O,e):[]}function J(O={}){let a=O.filters?O.filters.concat(q):q,e=O.tags?O.tags.concat(p):p,r=O.variables?O.variables.concat(d):d,{properties:$}=O;return i=>{var n;let Q=M(i);if(!Q)return null;let s=(n=Q.from)!==null&&n!==void 0?n:Q.node?Q.node.from:i.pos,o;return Q.type=="filter"?o=a:Q.type=="tag"?o=e:Q.type=="expression"?o=r:o=K(i.state,Q.target,i,$),o.length?{options:o,from:s,validFor:/^[\w\u00c0-\uffff]*$/}:null}}const OO=h.inputHandler.of((O,a,e,r)=>r!="%"||a!=e||O.state.doc.sliceString(a-1,e+1)!="{}"?!1:(O.dispatch(O.state.changeByRange($=>({changes:{from:$.from,to:$.to,insert:"%%"},range:b.cursor($.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function c(O){return a=>{let e=O.test(a.textAfter);return a.lineIndent(a.node.from)+(e?0:a.unit)}}const $O=k.define({name:"liquid",parser:A.configure({props:[W({"cycle comment endcomment raw endraw echo increment decrement liquid in with as":t.keyword,"empty forloop tablerowloop":t.atom,"if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue":t.controlKeyword,"assign capture endcapture":t.definitionKeyword,contains:t.operatorKeyword,"render include":t.moduleKeyword,VariableName:t.variableName,TagName:t.tagName,FilterName:t.function(t.variableName),PropertyName:t.propertyName,CompareOp:t.compareOperator,AssignOp:t.definitionOperator,LogicOp:t.logicOperator,NumberLiteral:t.number,StringLiteral:t.string,BooleanLiteral:t.bool,InlineComment:t.lineComment,CommentText:t.blockComment,"{% %} {{ }}":t.brace,"( )":t.paren,".":t.derefOperator,", .. : |":t.punctuation}),R.add({Tag:w({closing:"%}"}),"UnlessDirective ForDirective TablerowDirective CaptureDirective":c(/^\s*(\{%-?\s*)?end\w/),IfDirective:c(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),CaseDirective:c(/^\s*(\{%-?\s*)?(endcase|when)\b/)}),Y.add({"UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(O){let a=O.firstChild,e=O.lastChild;return!a||a.name!="Tag"?null:{from:a.to,to:e.name=="EndTag"?e.from:O.to}}})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*{%-?\s*(?:end|elsif|else|when|)$/}}),m=v();function g(O){return $O.configure({wrap:u(a=>a.type.isTop?{parser:O.parser,overlay:e=>e.name=="Text"||e.name=="RawText"}:null)},"liquid")}const aO=g(m.language);function iO(O={}){let a=O.base||m,e=a.language==m.language?aO:g(a.language);return new y(e,[a.support,e.data.of({autocomplete:J(O)}),a.language.data.of({closeBrackets:{brackets:["{"]}}),OO])}export{OO as closePercentBrace,iO as liquid,J as liquidCompletionSource,aO as liquidLanguage}; diff --git a/web/dist/assets/index-76yn-lwE.js b/web/dist/assets/index-BoLdJ8R5.js similarity index 99% rename from web/dist/assets/index-76yn-lwE.js rename to web/dist/assets/index-BoLdJ8R5.js index d1cedf7a..5ac6651d 100644 --- a/web/dist/assets/index-76yn-lwE.js +++ b/web/dist/assets/index-BoLdJ8R5.js @@ -1 +1 @@ -import{n as r,b as i,d as n,L as $,f as y,g as P,h as X,l as m,E as S,s as c,t as O}from"./index-DiFBq1n1.js";const s=110,l=1,f=2,t=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function e(T){return T>=65&&T<=90||T>=97&&T<=122||T>=161}function p(T){return T>=48&&T<=57}const W=new S((T,Q)=>{if(T.next==40){let a=T.peek(-1);(e(a)||p(a)||a==95||a==45)&&T.acceptToken(f,1)}}),d=new S(T=>{if(t.indexOf(T.peek(-1))>-1){let{next:Q}=T;(e(Q)||Q==95||Q==35||Q==46||Q==91||Q==58||Q==45)&&T.acceptToken(s)}}),Z=new S(T=>{if(t.indexOf(T.peek(-1))<0){let{next:Q}=T;if(Q==37&&(T.advance(),T.acceptToken(l)),e(Q)){do T.advance();while(e(T.next));T.acceptToken(l)}}}),w=c({"import charset namespace keyframes media supports when":O.definitionKeyword,"from to selector":O.keyword,NamespaceName:O.namespace,KeyframeName:O.labelName,TagName:O.tagName,ClassName:O.className,PseudoClassName:O.constant(O.className),IdName:O.labelName,"FeatureName PropertyName PropertyVariable":O.propertyName,AttributeName:O.attributeName,NumberLiteral:O.number,KeywordQuery:O.keyword,UnaryQueryOp:O.operatorKeyword,"CallTag ValueName":O.atom,VariableName:O.variableName,"AtKeyword Interpolation":O.special(O.variableName),Callee:O.operatorKeyword,Unit:O.unit,"UniversalSelector NestingSelector":O.definitionOperator,MatchOp:O.compareOperator,"ChildOp SiblingOp, LogicOp":O.logicOperator,BinOp:O.arithmeticOperator,Important:O.modifier,"Comment LineComment":O.blockComment,ColorLiteral:O.color,"ParenthesizedContent StringLiteral":O.string,Escape:O.special(O.string),": ...":O.punctuation,"PseudoOp #":O.derefOperator,"; ,":O.separator,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),h={__proto__:null,lang:40,"nth-child":40,"nth-last-child":40,"nth-of-type":40,"nth-last-of-type":40,dir:40,"host-context":40,and:244,or:244,not:74,only:74,url:86,"url-prefix":86,domain:86,regexp:86,when:117,selector:142,from:172,to:174},z={__proto__:null,"@import":126,"@plugin":126,"@media":152,"@charset":156,"@namespace":160,"@keyframes":166,"@supports":178},g=$.deserialize({version:14,states:"@^O!gQWOOO!nQaO'#CeOOQP'#Cd'#CdO$RQWO'#CgO$xQaO'#EaO%cQWO'#CiO%kQWO'#DZO%pQWO'#D^O%uQaO'#DfOOQP'#Es'#EsO'YQWO'#DlO'yQWO'#DyO(QQWO'#D{O(xQWO'#D}O)TQWO'#EQO'bQWO'#EWO)YQ`O'#FTO)]Q`O'#FTO)hQ`O'#FTO)vQWO'#EYOOQO'#Er'#ErOOQO'#FV'#FVOOQO'#Ec'#EcO){QWO'#EqO*WQWO'#EqQOQWOOOOQP'#Ch'#ChOOQP,59R,59RO$RQWO,59RO*bQWO'#EdO+PQWO,58|O+_QWO,59TO%kQWO,59uO%pQWO,59xO*bQWO,59{O*bQWO,59}OOQO'#De'#DeO*bQWO,5:OO,bQpO'#E}O,iQWO'#DkOOQO,58|,58|O(QQWO,58|O,pQWO,5:{OOQO,5:{,5:{OOQT'#Cl'#ClO-UQeO,59TO.cQ[O,59TOOQP'#D]'#D]OOQP,59u,59uOOQO'#D_'#D_O.hQpO,59xOOQO'#EZ'#EZO.pQ`O,5;oOOQO,5;o,5;oO/OQWO,5:WO/VQWO,5:WOOQS'#Dn'#DnO/rQWO'#DsO/yQ!fO'#FRO0eQWO'#DtOOQS'#FS'#FSO+YQWO,5:eO'bQWO'#DrOOQS'#Cu'#CuO(QQWO'#CwO0jQ!hO'#CyO2^Q!fO,5:gO2oQWO'#DWOOQS'#Ex'#ExO(QQWO'#DQOOQO'#EP'#EPO2tQWO,5:iO2yQWO,5:iOOQO'#ES'#ESO3RQWO,5:lO3WQ!fO,5:rO3iQ`O'#EkO.pQ`O,5;oOOQO,5:|,5:|O3zQWO,5:tOOQO,5:},5:}O4XQWO,5;]OO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*k;'S;=`!.q<%lO!*km!+jSo]|`Oy%Tz;'S%T;'S;=`%f<%lO%T]!+yWOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d<%lO!+v]!,hOo]]!,kRO;'S!+v;'S;=`!,t;=`O!+v]!,wXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!+v<%lO!+v]!-gP;=`<%l!+vm!-oU|`Oy!*kyz!+vz;'S!*k;'S;=`!.R;=`<%l!+v<%lO!*km!.UXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!*k<%lO!+vm!.tP;=`<%l!*km!.|Z|`OY!.wYZ%TZw!.wwx!+cxy!.wyz!/oz#O!.w#O#P!1^#P;'S!.w;'S;=`!2e<%lO!.w]!/rWOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W<%lO!/o]!0_RO;'S!/o;'S;=`!0h;=`O!/o]!0kXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!/o<%lO!/o]!1ZP;=`<%l!/om!1cU|`Oy!.wyz!/oz;'S!.w;'S;=`!1u;=`<%l!/o<%lO!.wm!1xXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!.w<%lO!/om!2hP;=`<%l!.w`!2nP;=`<%l$t",tokenizers:[d,Z,W,0,1,2,3,4],topRules:{StyleSheet:[0,5]},specialized:[{term:116,get:T=>h[T]||-1},{term:23,get:T=>z[T]||-1}],tokenPrec:2180}),o=i.define({name:"less",parser:g.configure({props:[y.add({Declaration:X()}),P.add({Block:m})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"@-"}}),u=r(T=>T.name=="VariableName"||T.name=="AtKeyword");function R(){return new n(o,o.data.of({autocomplete:u}))}export{R as less,u as lessCompletionSource,o as lessLanguage}; +import{n as r,b as i,d as n,L as $,f as y,g as P,h as X,l as m,E as S,s as c,t as O}from"./index-DgMg835f.js";const s=110,l=1,f=2,t=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function e(T){return T>=65&&T<=90||T>=97&&T<=122||T>=161}function p(T){return T>=48&&T<=57}const W=new S((T,Q)=>{if(T.next==40){let a=T.peek(-1);(e(a)||p(a)||a==95||a==45)&&T.acceptToken(f,1)}}),d=new S(T=>{if(t.indexOf(T.peek(-1))>-1){let{next:Q}=T;(e(Q)||Q==95||Q==35||Q==46||Q==91||Q==58||Q==45)&&T.acceptToken(s)}}),Z=new S(T=>{if(t.indexOf(T.peek(-1))<0){let{next:Q}=T;if(Q==37&&(T.advance(),T.acceptToken(l)),e(Q)){do T.advance();while(e(T.next));T.acceptToken(l)}}}),w=c({"import charset namespace keyframes media supports when":O.definitionKeyword,"from to selector":O.keyword,NamespaceName:O.namespace,KeyframeName:O.labelName,TagName:O.tagName,ClassName:O.className,PseudoClassName:O.constant(O.className),IdName:O.labelName,"FeatureName PropertyName PropertyVariable":O.propertyName,AttributeName:O.attributeName,NumberLiteral:O.number,KeywordQuery:O.keyword,UnaryQueryOp:O.operatorKeyword,"CallTag ValueName":O.atom,VariableName:O.variableName,"AtKeyword Interpolation":O.special(O.variableName),Callee:O.operatorKeyword,Unit:O.unit,"UniversalSelector NestingSelector":O.definitionOperator,MatchOp:O.compareOperator,"ChildOp SiblingOp, LogicOp":O.logicOperator,BinOp:O.arithmeticOperator,Important:O.modifier,"Comment LineComment":O.blockComment,ColorLiteral:O.color,"ParenthesizedContent StringLiteral":O.string,Escape:O.special(O.string),": ...":O.punctuation,"PseudoOp #":O.derefOperator,"; ,":O.separator,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),h={__proto__:null,lang:40,"nth-child":40,"nth-last-child":40,"nth-of-type":40,"nth-last-of-type":40,dir:40,"host-context":40,and:244,or:244,not:74,only:74,url:86,"url-prefix":86,domain:86,regexp:86,when:117,selector:142,from:172,to:174},z={__proto__:null,"@import":126,"@plugin":126,"@media":152,"@charset":156,"@namespace":160,"@keyframes":166,"@supports":178},g=$.deserialize({version:14,states:"@^O!gQWOOO!nQaO'#CeOOQP'#Cd'#CdO$RQWO'#CgO$xQaO'#EaO%cQWO'#CiO%kQWO'#DZO%pQWO'#D^O%uQaO'#DfOOQP'#Es'#EsO'YQWO'#DlO'yQWO'#DyO(QQWO'#D{O(xQWO'#D}O)TQWO'#EQO'bQWO'#EWO)YQ`O'#FTO)]Q`O'#FTO)hQ`O'#FTO)vQWO'#EYOOQO'#Er'#ErOOQO'#FV'#FVOOQO'#Ec'#EcO){QWO'#EqO*WQWO'#EqQOQWOOOOQP'#Ch'#ChOOQP,59R,59RO$RQWO,59RO*bQWO'#EdO+PQWO,58|O+_QWO,59TO%kQWO,59uO%pQWO,59xO*bQWO,59{O*bQWO,59}OOQO'#De'#DeO*bQWO,5:OO,bQpO'#E}O,iQWO'#DkOOQO,58|,58|O(QQWO,58|O,pQWO,5:{OOQO,5:{,5:{OOQT'#Cl'#ClO-UQeO,59TO.cQ[O,59TOOQP'#D]'#D]OOQP,59u,59uOOQO'#D_'#D_O.hQpO,59xOOQO'#EZ'#EZO.pQ`O,5;oOOQO,5;o,5;oO/OQWO,5:WO/VQWO,5:WOOQS'#Dn'#DnO/rQWO'#DsO/yQ!fO'#FRO0eQWO'#DtOOQS'#FS'#FSO+YQWO,5:eO'bQWO'#DrOOQS'#Cu'#CuO(QQWO'#CwO0jQ!hO'#CyO2^Q!fO,5:gO2oQWO'#DWOOQS'#Ex'#ExO(QQWO'#DQOOQO'#EP'#EPO2tQWO,5:iO2yQWO,5:iOOQO'#ES'#ESO3RQWO,5:lO3WQ!fO,5:rO3iQ`O'#EkO.pQ`O,5;oOOQO,5:|,5:|O3zQWO,5:tOOQO,5:},5:}O4XQWO,5;]OOQO-E8a-E8aOOQP1G.m1G.mOOQP'#Ce'#CeO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%T;'S;=`%f<%lO%T]!+yWOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d<%lO!+v]!,hOo]]!,kRO;'S!+v;'S;=`!,t;=`O!+v]!,wXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!+v<%lO!+v]!-gP;=`<%l!+vm!-oU|`Oy!*kyz!+vz;'S!*k;'S;=`!.R;=`<%l!+v<%lO!*km!.UXOY!+vZr!+vrs!,cs#O!+v#O#P!,h#P;'S!+v;'S;=`!-d;=`<%l!*k<%lO!+vm!.tP;=`<%l!*km!.|Z|`OY!.wYZ%TZw!.wwx!+cxy!.wyz!/oz#O!.w#O#P!1^#P;'S!.w;'S;=`!2e<%lO!.w]!/rWOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W<%lO!/o]!0_RO;'S!/o;'S;=`!0h;=`O!/o]!0kXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!/o<%lO!/o]!1ZP;=`<%l!/om!1cU|`Oy!.wyz!/oz;'S!.w;'S;=`!1u;=`<%l!/o<%lO!.wm!1xXOY!/oZw!/owx!,cx#O!/o#O#P!0[#P;'S!/o;'S;=`!1W;=`<%l!.w<%lO!/om!2hP;=`<%l!.w`!2nP;=`<%l$t",tokenizers:[d,Z,W,0,1,2,3,4],topRules:{StyleSheet:[0,5]},specialized:[{term:116,get:T=>h[T]||-1},{term:23,get:T=>z[T]||-1}],tokenPrec:2180}),o=i.define({name:"less",parser:g.configure({props:[y.add({Declaration:X()}),P.add({Block:m})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"@-"}}),u=r(T=>T.name=="VariableName"||T.name=="AtKeyword");function R(){return new n(o,o.data.of({autocomplete:u}))}export{R as less,u as lessCompletionSource,o as lessLanguage}; diff --git a/web/dist/assets/index-CClvqRni.js b/web/dist/assets/index-BoYRIm2P.js similarity index 99% rename from web/dist/assets/index-CClvqRni.js rename to web/dist/assets/index-BoYRIm2P.js index b6aa8508..1365928f 100644 --- a/web/dist/assets/index-CClvqRni.js +++ b/web/dist/assets/index-BoYRIm2P.js @@ -1 +1 @@ -import{L as G,E as i,s as u,C as w,t as $,n as v,b as V,d as b,g,f as U,l as q,h as E}from"./index-DiFBq1n1.js";const z=154,X=155,C=156,N=1,D=2,f=3,I=157,F=158,Z=4,K=5,L=159,p=160,W=161,s=162,T=6,h=7,A=8,B=9,c=0,R=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],M=58,J=40,P=95,H=91,l=45,OO=46,m=35,$O=37,j=123,eO=125,o=47,S=42,r=10,_=61,aO=43,QO=38;function d(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function x(O){return O>=48&&O<=57}function k(O){let e;return O.next==o&&((e=O.peek(1))==o||e==S)}const tO=new i((O,e)=>{if(e.dialectEnabled(c)){let a;if(O.next<0&&e.canShift(W))O.acceptToken(W);else if(((a=O.peek(-1))==r||a<0)&&e.canShift(p)){let Q=0;for(;O.next!=r&&R.includes(O.next);)O.advance(),Q++;O.next==r||k(O)?O.acceptToken(p,-Q):Q&&O.acceptToken(s)}else if(O.next==r)O.acceptToken(L,1);else if(R.includes(O.next)){for(O.advance();O.next!=r&&R.includes(O.next);)O.advance();O.acceptToken(s)}}else{let a=0;for(;R.includes(O.next);)O.advance(),a++;a&&O.acceptToken(s)}},{contextual:!0}),nO=new i((O,e)=>{if(k(O)){if(O.advance(),e.dialectEnabled(c)){let a=-1;for(let Q=1;;Q++){let t=O.peek(-Q-1);if(t==r||t<0){a=Q+1;break}else if(!R.includes(t))break}if(a>-1){let Q=O.next==S,t=0;for(O.advance();O.next>=0;)if(O.next==r){O.advance();let n=0;for(;O.next!=r&&R.includes(O.next);)n++,O.advance();if(n=0;)O.advance();O.acceptToken(T)}else{for(O.advance();O.next>=0;){let{next:a}=O;if(O.advance(),a==S&&O.next==o){O.advance();break}}O.acceptToken(h)}}}),rO=new i((O,e)=>{(O.next==aO||O.next==_)&&e.dialectEnabled(c)&&O.acceptToken(O.next==_?A:B,1)}),RO=new i((O,e)=>{if(!e.dialectEnabled(c))return;let a=e.context.depth;if(O.next<0&&a){O.acceptToken(X);return}if(O.peek(-1)==r){let t=0;for(;O.next!=r&&R.includes(O.next);)O.advance(),t++;t!=a&&O.next!=r&&!k(O)&&(t{for(let a=!1,Q=0,t=0;;t++){let{next:n}=O;if(d(n)||n==l||n==P||a&&x(n))!a&&(n!=l||t>0)&&(a=!0),Q===t&&n==l&&Q++,O.advance();else if(n==m&&O.peek(1)==j){O.acceptToken(K,2);break}else{a&&O.acceptToken(n==J?I:Q==2&&e.canShift(Z)?Z:F);break}}}),lO=new i(O=>{if(O.next==eO){for(O.advance();d(O.next)||O.next==l||O.next==P||x(O.next);)O.advance();O.next==m&&O.peek(1)==j?O.acceptToken(D,2):O.acceptToken(N)}}),oO=new i(O=>{if(R.includes(O.peek(-1))){let{next:e}=O;(d(e)||e==P||e==m||e==OO||e==H||e==M||e==l||e==QO)&&O.acceptToken(C)}}),dO=new i(O=>{if(!R.includes(O.peek(-1))){let{next:e}=O;if(e==$O&&(O.advance(),O.acceptToken(f)),d(e)){do O.advance();while(d(O.next));O.acceptToken(f)}}});function Y(O,e){this.parent=O,this.depth=e,this.hash=(O?O.hash+O.hash<<8:0)+e+(e<<4)}const SO=new Y(null,0),cO=new w({start:SO,shift(O,e,a,Q){return e==z?new Y(O,a.pos-Q.pos):e==X?O.parent:O},hash(O){return O.hash}}),sO=u({"AtKeyword import charset namespace keyframes media supports include mixin use forward extend at-root":$.definitionKeyword,"Keyword selector":$.keyword,ControlKeyword:$.controlKeyword,NamespaceName:$.namespace,KeyframeName:$.labelName,TagName:$.tagName,"ClassName Suffix":$.className,PseudoClassName:$.constant($.className),IdName:$.labelName,"FeatureName PropertyName":$.propertyName,AttributeName:$.attributeName,NumberLiteral:$.number,KeywordQuery:$.keyword,UnaryQueryOp:$.operatorKeyword,"CallTag ValueName":$.atom,VariableName:$.variableName,SassVariableName:$.special($.variableName),Callee:$.operatorKeyword,Unit:$.unit,"UniversalSelector NestingSelector IndentedMixin IndentedInclude":$.definitionOperator,MatchOp:$.compareOperator,"ChildOp SiblingOp, LogicOp":$.logicOperator,BinOp:$.arithmeticOperator,"Important Global Default":$.modifier,Comment:$.blockComment,LineComment:$.lineComment,ColorLiteral:$.color,"ParenthesizedContent StringLiteral":$.string,"InterpolationStart InterpolationContinue InterpolationEnd":$.meta,': "..."':$.punctuation,"PseudoOp #":$.derefOperator,"; ,":$.separator,"( )":$.paren,"[ ]":$.squareBracket,"{ }":$.brace}),XO={__proto__:null,not:62,only:62,using:179,as:189,with:193,without:193,hide:207,show:207,from:230,to:232,if:245,through:251,in:257},yO={__proto__:null,url:80,"url-prefix":80,domain:80,regexp:80,lang:94,"nth-child":94,"nth-last-child":94,"nth-of-type":94,"nth-last-of-type":94,dir:94,"host-context":94,selector:172},PO={__proto__:null,"@import":156,"@include":176,"@mixin":182,"@function":182,"@use":186,"@extend":196,"@at-root":200,"@forward":204,"@media":210,"@charset":214,"@namespace":218,"@keyframes":224,"@supports":236,"@if":240,"@else":242,"@for":248,"@each":254,"@while":260,"@debug":264,"@warn":264,"@error":264,"@return":264},mO=G.deserialize({version:14,states:"L|Q`Q+tOOO#fQ+tOOP#mOpOOOOQ#U'#Ch'#ChO#rQ(pO'#CjOOQ#U'#Ci'#CiO%_Q)QO'#FxO%rQ.jO'#CnO&jQ#dO'#DWO'aQ(pO'#CgO'hQ)OO'#DYO'sQ#dO'#DaO'xQ#dO'#DeO'}Q#dO'#DnOOQ#U'#Fx'#FxO(SQ(pO'#FxO(ZQ(nO'#DrO%rQ.jO'#DzO%rQ.jO'#EVO%rQ.jO'#EYO%rQ.jO'#E[O(`Q)OO'#EaO)QQ)OO'#EcO%rQ.jO'#EeO)_Q)OO'#EhO%rQ.jO'#Ej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$R;'S;=`$d<%lO$RXJwWOy$Rz!c$R!c!}Ka!}#T$R#T#oKa#o;'S$R;'S;=`$d<%lO$RXKh[!oPyWOy$Rz}$R}!OKa!O!Q$R!Q![Ka![!c$R!c!}Ka!}#T$R#T#oKa#o;'S$R;'S;=`$d<%lO$RXLcS!YPOy$Rz;'S$R;'S;=`$d<%lO$R^LtS!WUOy$Rz;'S$R;'S;=`$d<%lO$R[MTUOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RZMjUOy$Rz#b$R#b#cM|#c;'S$R;'S;=`$d<%lO$RZNRUyWOy$Rz#W$R#W#XNe#X;'S$R;'S;=`$d<%lO$RZNlSmRyWOy$Rz;'S$R;'S;=`$d<%lO$RZN{UOy$Rz#f$R#f#gNe#g;'S$R;'S;=`$d<%lO$RZ! dS!eROy$Rz;'S$R;'S;=`$d<%lO$RZ! uS!mROy$Rz;'S$R;'S;=`$d<%lO$R]!!WU!aPOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RW!!mP;=`<%l#r",tokenizers:[RO,oO,lO,dO,iO,tO,nO,rO,0,1,2,3],topRules:{StyleSheet:[0,10],Styles:[1,134]},dialects:{indented:0},specialized:[{term:158,get:O=>XO[O]||-1},{term:157,get:O=>yO[O]||-1},{term:77,get:O=>PO[O]||-1}],tokenPrec:3003}),y=V.define({name:"sass",parser:mO.configure({props:[g.add({Block:q,Comment(O,e){return{from:O.from+2,to:e.sliceDoc(O.to-2,O.to)=="*/"?O.to-2:O.to}}}),U.add({Declaration:E()})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"$-"}}),kO=y.configure({dialect:"indented",props:[U.add({"Block RuleSet":O=>O.baseIndent+O.unit}),g.add({Block:O=>({from:O.from,to:O.to})})]}),fO=v(O=>O.name=="VariableName"||O.name=="SassVariableName");function pO(O){return new b(O!=null&&O.indented?kO:y,y.data.of({autocomplete:fO}))}export{pO as sass,fO as sassCompletionSource,y as sassLanguage}; +import{L as G,E as i,s as u,C as w,t as $,n as v,b as V,d as b,g,f as U,l as q,h as E}from"./index-DgMg835f.js";const z=154,X=155,C=156,N=1,D=2,f=3,I=157,F=158,Z=4,K=5,L=159,p=160,W=161,s=162,T=6,h=7,A=8,B=9,c=0,R=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],M=58,J=40,P=95,H=91,l=45,OO=46,m=35,$O=37,j=123,eO=125,o=47,S=42,r=10,_=61,aO=43,QO=38;function d(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function x(O){return O>=48&&O<=57}function k(O){let e;return O.next==o&&((e=O.peek(1))==o||e==S)}const tO=new i((O,e)=>{if(e.dialectEnabled(c)){let a;if(O.next<0&&e.canShift(W))O.acceptToken(W);else if(((a=O.peek(-1))==r||a<0)&&e.canShift(p)){let Q=0;for(;O.next!=r&&R.includes(O.next);)O.advance(),Q++;O.next==r||k(O)?O.acceptToken(p,-Q):Q&&O.acceptToken(s)}else if(O.next==r)O.acceptToken(L,1);else if(R.includes(O.next)){for(O.advance();O.next!=r&&R.includes(O.next);)O.advance();O.acceptToken(s)}}else{let a=0;for(;R.includes(O.next);)O.advance(),a++;a&&O.acceptToken(s)}},{contextual:!0}),nO=new i((O,e)=>{if(k(O)){if(O.advance(),e.dialectEnabled(c)){let a=-1;for(let Q=1;;Q++){let t=O.peek(-Q-1);if(t==r||t<0){a=Q+1;break}else if(!R.includes(t))break}if(a>-1){let Q=O.next==S,t=0;for(O.advance();O.next>=0;)if(O.next==r){O.advance();let n=0;for(;O.next!=r&&R.includes(O.next);)n++,O.advance();if(n=0;)O.advance();O.acceptToken(T)}else{for(O.advance();O.next>=0;){let{next:a}=O;if(O.advance(),a==S&&O.next==o){O.advance();break}}O.acceptToken(h)}}}),rO=new i((O,e)=>{(O.next==aO||O.next==_)&&e.dialectEnabled(c)&&O.acceptToken(O.next==_?A:B,1)}),RO=new i((O,e)=>{if(!e.dialectEnabled(c))return;let a=e.context.depth;if(O.next<0&&a){O.acceptToken(X);return}if(O.peek(-1)==r){let t=0;for(;O.next!=r&&R.includes(O.next);)O.advance(),t++;t!=a&&O.next!=r&&!k(O)&&(t{for(let a=!1,Q=0,t=0;;t++){let{next:n}=O;if(d(n)||n==l||n==P||a&&x(n))!a&&(n!=l||t>0)&&(a=!0),Q===t&&n==l&&Q++,O.advance();else if(n==m&&O.peek(1)==j){O.acceptToken(K,2);break}else{a&&O.acceptToken(n==J?I:Q==2&&e.canShift(Z)?Z:F);break}}}),lO=new i(O=>{if(O.next==eO){for(O.advance();d(O.next)||O.next==l||O.next==P||x(O.next);)O.advance();O.next==m&&O.peek(1)==j?O.acceptToken(D,2):O.acceptToken(N)}}),oO=new i(O=>{if(R.includes(O.peek(-1))){let{next:e}=O;(d(e)||e==P||e==m||e==OO||e==H||e==M||e==l||e==QO)&&O.acceptToken(C)}}),dO=new i(O=>{if(!R.includes(O.peek(-1))){let{next:e}=O;if(e==$O&&(O.advance(),O.acceptToken(f)),d(e)){do O.advance();while(d(O.next));O.acceptToken(f)}}});function Y(O,e){this.parent=O,this.depth=e,this.hash=(O?O.hash+O.hash<<8:0)+e+(e<<4)}const SO=new Y(null,0),cO=new w({start:SO,shift(O,e,a,Q){return e==z?new Y(O,a.pos-Q.pos):e==X?O.parent:O},hash(O){return O.hash}}),sO=u({"AtKeyword import charset namespace keyframes media supports include mixin use forward extend at-root":$.definitionKeyword,"Keyword selector":$.keyword,ControlKeyword:$.controlKeyword,NamespaceName:$.namespace,KeyframeName:$.labelName,TagName:$.tagName,"ClassName Suffix":$.className,PseudoClassName:$.constant($.className),IdName:$.labelName,"FeatureName PropertyName":$.propertyName,AttributeName:$.attributeName,NumberLiteral:$.number,KeywordQuery:$.keyword,UnaryQueryOp:$.operatorKeyword,"CallTag ValueName":$.atom,VariableName:$.variableName,SassVariableName:$.special($.variableName),Callee:$.operatorKeyword,Unit:$.unit,"UniversalSelector NestingSelector IndentedMixin IndentedInclude":$.definitionOperator,MatchOp:$.compareOperator,"ChildOp SiblingOp, LogicOp":$.logicOperator,BinOp:$.arithmeticOperator,"Important Global Default":$.modifier,Comment:$.blockComment,LineComment:$.lineComment,ColorLiteral:$.color,"ParenthesizedContent StringLiteral":$.string,"InterpolationStart InterpolationContinue InterpolationEnd":$.meta,': "..."':$.punctuation,"PseudoOp #":$.derefOperator,"; ,":$.separator,"( )":$.paren,"[ ]":$.squareBracket,"{ }":$.brace}),XO={__proto__:null,not:62,only:62,using:179,as:189,with:193,without:193,hide:207,show:207,from:230,to:232,if:245,through:251,in:257},yO={__proto__:null,url:80,"url-prefix":80,domain:80,regexp:80,lang:94,"nth-child":94,"nth-last-child":94,"nth-of-type":94,"nth-last-of-type":94,dir:94,"host-context":94,selector:172},PO={__proto__:null,"@import":156,"@include":176,"@mixin":182,"@function":182,"@use":186,"@extend":196,"@at-root":200,"@forward":204,"@media":210,"@charset":214,"@namespace":218,"@keyframes":224,"@supports":236,"@if":240,"@else":242,"@for":248,"@each":254,"@while":260,"@debug":264,"@warn":264,"@error":264,"@return":264},mO=G.deserialize({version:14,states:"L|Q`Q+tOOO#fQ+tOOP#mOpOOOOQ#U'#Ch'#ChO#rQ(pO'#CjOOQ#U'#Ci'#CiO%_Q)QO'#FxO%rQ.jO'#CnO&jQ#dO'#DWO'aQ(pO'#CgO'hQ)OO'#DYO'sQ#dO'#DaO'xQ#dO'#DeO'}Q#dO'#DnOOQ#U'#Fx'#FxO(SQ(pO'#FxO(ZQ(nO'#DrO%rQ.jO'#DzO%rQ.jO'#EVO%rQ.jO'#EYO%rQ.jO'#E[O(`Q)OO'#EaO)QQ)OO'#EcO%rQ.jO'#EeO)_Q)OO'#EhO%rQ.jO'#EjO)yQ)OO'#ElO*UQ#dO'#EoO*ZQ)OO'#EuO*oQ)OO'#FVOOQ&Z'#Fw'#FwOOQ&Y'#FY'#FYO*yQ(nO'#FYQ`Q+tOOO%rQ.jO'#EwO+UQ(nO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#T$R#T#oKa#o;'S$R;'S;=`$d<%lO$RXLcS!YPOy$Rz;'S$R;'S;=`$d<%lO$R^LtS!WUOy$Rz;'S$R;'S;=`$d<%lO$R[MTUOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RZMjUOy$Rz#b$R#b#cM|#c;'S$R;'S;=`$d<%lO$RZNRUyWOy$Rz#W$R#W#XNe#X;'S$R;'S;=`$d<%lO$RZNlSmRyWOy$Rz;'S$R;'S;=`$d<%lO$RZN{UOy$Rz#f$R#f#gNe#g;'S$R;'S;=`$d<%lO$RZ! dS!eROy$Rz;'S$R;'S;=`$d<%lO$RZ! uS!mROy$Rz;'S$R;'S;=`$d<%lO$R]!!WU!aPOy$Rz!_$R!_!`;T!`;'S$R;'S;=`$d<%lO$RW!!mP;=`<%l#r",tokenizers:[RO,oO,lO,dO,iO,tO,nO,rO,0,1,2,3],topRules:{StyleSheet:[0,10],Styles:[1,134]},dialects:{indented:0},specialized:[{term:158,get:O=>XO[O]||-1},{term:157,get:O=>yO[O]||-1},{term:77,get:O=>PO[O]||-1}],tokenPrec:3003}),y=V.define({name:"sass",parser:mO.configure({props:[g.add({Block:q,Comment(O,e){return{from:O.from+2,to:e.sliceDoc(O.to-2,O.to)=="*/"?O.to-2:O.to}}}),U.add({Declaration:E()})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"$-"}}),kO=y.configure({dialect:"indented",props:[U.add({"Block RuleSet":O=>O.baseIndent+O.unit}),g.add({Block:O=>({from:O.from,to:O.to})})]}),fO=v(O=>O.name=="VariableName"||O.name=="SassVariableName");function pO(O){return new b(O!=null&&O.indented?kO:y,y.data.of({autocomplete:fO}))}export{pO as sass,fO as sassCompletionSource,y as sassLanguage}; diff --git a/web/dist/assets/index-DiFBq1n1.js b/web/dist/assets/index-DgMg835f.js similarity index 99% rename from web/dist/assets/index-DiFBq1n1.js rename to web/dist/assets/index-DgMg835f.js index 43d36913..b0c8b425 100644 --- a/web/dist/assets/index-DiFBq1n1.js +++ b/web/dist/assets/index-DgMg835f.js @@ -562,7 +562,7 @@ ${e.disclaimer} Mount this personality?`,"Mount","Cancel"))return;this.setPersonalityProcessing(t,!0),this.show_toast(`Mounting ${e.name}...`,3,!0);const n=await this.mount_personality(e);if(n&&n.status){await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities"),this.show_toast(`Personality "${e.name}" mounted`,4,!0);const r=this.$store.state.config;if((r==null?void 0:r.active_personality_id)>-1){const i=e.language?`${e.full_path}:${e.language}`:e.full_path,s=r.personalities[r.active_personality_id];i===s&&this.show_toast(`${e.name} mounted and selected`,4,!0)}}else this.show_toast(`Could not mount personality Error: ${(n==null?void 0:n.error)||"Unknown error"}`,4,!1);this.setPersonalityProcessing(t,!1)},async mount_personality(t){if(!t)return{status:!1,error:"no personality provided"};try{const e={language:t.language||"",category:t.category||"",folder:t.folder||""};return await this.api_post_req("mount_personality",e)}catch(e){return{status:!1,error:e.message}}},async unmountPersonality(t){const e=t.personality;if(!e.isMounted||e.isProcessing||!await this.show_yes_no_dialog(`Unmount personality "${e.name}"?`,"Unmount","Cancel"))return;this.setPersonalityProcessing(t,!0),this.show_toast(`Unmounting ${e.name}...`,3,!0);const r=await this.unmount_personality(e);r&&r.status?(await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities"),this.show_toast("Personality unmounted",4,!0)):this.show_toast(`Could not unmount personality -Error: ${(r==null?void 0:r.error)||"Unknown error"}`,4,!1),this.setPersonalityProcessing(t,!1)},async unmount_personality(t){var s;if(!t)return{status:!1,error:"no personality provided"};const e=((s=this.$store.state.config)==null?void 0:s.personalities)||[];let n=null;const r=t.language?`${t.full_path}:${t.language}`:null;r&&e.includes(r)?n=r:(e.includes(t.full_path),n=t.full_path);const i={path:n};try{return await this.api_post_req("unmount_personality",i)}catch(o){return{status:!1,error:o.message}}},async unmountAll(){if(!await this.show_yes_no_dialog(`Unmount all ${this.mountedPersArr.length} personalities?`,"Unmount All","Cancel"))return;this.show_toast("Unmounting all...",3,!0),this.isLoading=!0;const e=await this.api_post_req("unmount_all_personalities");e&&e.status?(await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities"),this.show_toast("All personalities unmounted.",4,!0)):this.show_toast(`Failed to unmount all: ${(e==null?void 0:e.error)||"Unknown error"}`,4,!1),this.isLoading=!1},async remountPersonality(t){const e=t.personality;if(!(!e.isMounted||e.isProcessing)){this.setPersonalityProcessing(t,!0),this.show_toast(`Remounting ${e.name}...`,3,!0);try{const n=await this.unmount_personality(e);if(!n||!n.status)throw new Error(`Unmount failed: ${(n==null?void 0:n.error)||"Unknown error"}`);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities"),await new Promise(i=>setTimeout(i,200));const r=await this.mount_personality(e);if(!r||!r.status)throw new Error(`Mount failed: ${(r==null?void 0:r.error)||"Unknown error"}`);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities"),this.show_toast(`${e.name} remounted successfully.`,4,!0)}catch(n){this.show_toast(`Error remounting ${e.name}: ${n.message}`,4,!1),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities")}finally{this.setPersonalityProcessing(t,!1)}}},async editPersonality(t){var n;const e=t.personality;if(!e.isProcessing){this.setPersonalityProcessing(t,!0);try{const r=await this.api_post_req("get_personality_config",{category:e.category,name:e.folder});r.status&&r.config?(this.$store.commit("setCurrentPersonConfig",r.config),this.$store.commit("setShowPersonalityEditor",!0),this.$store.commit("setSelectedPersonality",e),(n=this.$store.state.personality_editor)!=null&&n.showPanel&&this.$store.state.personality_editor.showPanel()):this.show_toast(`Failed to load config for ${e.name}: ${r.error||"Not found/error"}`,4,!1)}catch(r){this.show_toast(`Error loading config for ${e.name}: ${r.message}`,4,!1)}finally{this.setPersonalityProcessing(t,!1)}}},async onCopyToCustom(t){const e=t.personality;if(e.isProcessing||!await this.show_yes_no_dialog(`Copy "${e.name}" to 'custom_personalities'?`,"Copy","Cancel"))return;this.setPersonalityProcessing(t,!0);const r=await this.api_post_req("copy_to_custom_personas",{category:e.category,name:e.folder});r&&r.status?(this.show_message_box(`"${e.name}" copied. Refreshing list...`),await new Promise(i=>setTimeout(i,500)),await this.$store.dispatch("refreshPersonalitiesZoo"),await this.$store.dispatch("refreshMountedPersonalities")):this.show_toast(`Failed to copy ${e.name}: ${(r==null?void 0:r.error)||"Error"}`,4,!1),this.setPersonalityProcessing(t,!1)},async onPersonalityReinstall(t){const e=t.personality;if(e.isProcessing||!await this.show_yes_no_dialog(`Reinstall "${e.name}"? This overwrites local changes.`,"Reinstall","Cancel"))return;this.setPersonalityProcessing(t,!0),this.show_toast(`Reinstalling ${e.name}...`,3,!0);const r=await this.api_post_req("reinstall_personality",{name:e.full_path});r&&r.status?this.show_toast(`${e.name} reinstalled. Remount if active.`,4,!0):this.show_toast(`Failed to reinstall ${e.name}: ${(r==null?void 0:r.error)||"Error"}`,4,!1),this.setPersonalityProcessing(t,!1)},async onSettingsPersonality(t){const e=t.personality;if(!(!this.isActivePersonality(e)||e.isProcessing)){if(!this.isActivePersonality(e)){this.show_toast(`Activate "${e.name}" first to configure settings.`,4,!1);return}this.setPersonalityProcessing(t,!0);try{const n=await this.api_get_req("/get_active_personality_settings");if(n&&typeof n=="object"&&Object.keys(n).length>0){const r=await this.show_universal_form(n,`Settings - ${e.name}`,"Save","Cancel");if(r!=null){this.setPersonalityProcessing(t,!0);const i=await this.api_post_req("set_active_personality_settings",r);i!=null&&i.status?this.show_toast(`Settings for ${e.name} updated.`,4,!0):this.show_toast(`Failed to update settings: ${(i==null?void 0:i.error)||"Error"}`,4,!1)}}else n&&typeof n=="object"?this.show_toast(`"${e.name}" has no configurable settings.`,3,!0):this.show_toast("Could not retrieve settings structure.",4,!1)}catch(n){this.show_toast(`Error accessing settings: ${n.message}`,4,!1)}finally{this.setPersonalityProcessing(t,!1)}}},onCopyPersonalityName(t){const e=t.personality;navigator.clipboard.writeText(e.name).then(()=>this.show_toast(`Copied name: ${e.name}`,3,!0)).catch(n=>this.show_toast("Failed to copy name.",3,!1))},async handleOpenFolder(t){const e=t.personality,n=await this.api_post_req("open_personality_folder",{category:e.category,name:e.folder});(!n||!n.status)&&this.show_toast(`Could not open folder: ${(n==null?void 0:n.error)||"Error"}`,4,!1)}},async mounted(){var t;await this.fetchInitialData(),this.selectedCategory=((t=this.config)==null?void 0:t.personality_category)||""},updated(){Fe(()=>{Re.replace()})}},rmr={class:"user-settings-panel flex flex-col mb-2 rounded-lg shadow-lg p-4 bg-white dark:bg-gray-800"},imr={class:"flex flex-row justify-between items-center mb-4 flex-wrap gap-y-2"},smr={class:"flex items-center flex-wrap"},omr={key:0,class:"flex items-center mr-2 text-lg text-blue-600 dark:text-blue-300"},amr=["title"],lmr={class:"flex items-center space-x-3 shrink-0"},cmr={key:0,class:"text-base font-semibold cursor-default select-none items-center flex flex-row"},umr={class:"flex -space-x-4 items-center"},dmr={class:"group/mounted items-center flex flex-row"},fmr=["onClick","title"],hmr=["src"],pmr=["onClick"],Tmr=["title"],Omr={class:"flex flex-col sm:flex-row gap-4 mb-4"},mmr={class:"flex-grow"},gmr={class:"relative"},Qmr={class:"absolute right-1.5 bottom-1.5 flex space-x-1"},_mr={class:"flex-shrink-0 sm:w-64"},vmr={value:""},ymr={value:"Mounted"},bmr={key:0,value:"Starred"},Smr={key:1,disabled:"",class:"text-blue-400 dark:text-blue-600"},xmr=["value"],Emr={key:0,class:"flex justify-center items-center p-10 text-loading text-blue-600 dark:text-blue-300"},wmr={key:1,class:"text-center text-blue-500 dark:text-blue-400 py-10"},Cmr={key:2,class:"overflow-y-auto flex-grow personalities-grid-container scrollbar",style:{"max-height":"calc(100vh - 300px)"},ref:"gridContainer"},Lmr={class:"label block ml-2 mb-2 text-blue-700 dark:text-blue-300"};function $mr(t,e,n,r,i,s){const o=Xe("PersonalityEntry");return k(),R("div",rmr,[b("div",imr,[b("div",smr,[e[9]||(e[9]=b("p",{class:"text-xl font-semibold cursor-default select-none mr-3 text-blue-800 dark:text-blue-100"}," Personalities Zoo ",-1)),s.active_personality_name?(k(),R("div",omr,[e[8]||(e[8]=b("span",{class:"mx-2 text-blue-400 dark:text-blue-500"},"|",-1)),b("span",{class:"font-bold line-clamp-1",title:`Active: ${s.active_personality_name}`},ae(s.active_personality_name),9,amr)])):ne("",!0)]),b("div",lmr,[s.mountedPersArr.length>0?(k(),R("div",cmr,[b("div",umr,[(k(!0),R(Ve,null,dt(s.displayedMountedPersonalities,(a,l)=>(k(),R("div",{class:"relative hover:-translate-y-1 duration-300 hover:z-10 shrink-0",key:a.id||a.full_path+"-"+l,ref_for:!0,ref:"mountedPersonalitiesRefs"},[b("div",dmr,[b("button",{onClick:oe(c=>s.onPersonalitySelected({personality:a,isMounted:!0}),["stop"]),title:`Select: ${a.name}`,class:"transition-transform duration-150 ease-in-out active:scale-90"},[b("img",{src:s.getPersonalityIconUrl(a.avatar),onError:e[0]||(e[0]=(...c)=>s.personalityImgPlaceholder&&s.personalityImgPlaceholder(...c)),class:ye(["w-8 h-8 rounded-full object-cover border-2 transition-colors duration-200 group-hover/mounted:border-blue-500 dark:group-hover/mounted:border-blue-400",s.isActivePersonality(a)?"border-blue-500 dark:border-blue-400":"border-blue-300 dark:border-blue-600"])},null,42,hmr)],8,fmr),b("button",{onClick:oe(c=>s.unmountPersonality({personality:a}),["stop"]),class:"absolute -top-1 -right-1 opacity-0 group-hover/mounted:opacity-100 transition-all duration-150 ease-in-out hover:scale-110",title:"Unmount personality"},e[10]||(e[10]=[b("span",{class:"bg-red-500 hover:bg-red-600 text-white rounded-full p-0.5 flex items-center justify-center shadow-md transition-colors duration-150"},[b("i",{"data-feather":"x",class:"w-3 h-3 stroke-current"})],-1)]),8,pmr)])]))),128)),s.mountedPersArr.length>i.maxDisplayedMounted?(k(),R("div",{key:0,class:"w-8 h-8 rounded-full bg-blue-200 dark:bg-blue-700 border-2 border-blue-300 dark:border-blue-600 flex items-center justify-center text-xs font-semibold text-blue-600 dark:text-blue-300 cursor-default",title:`${s.mountedPersArr.length-i.maxDisplayedMounted} more mounted`}," +"+ae(s.mountedPersArr.length-i.maxDisplayedMounted),9,Tmr)):ne("",!0)])])):ne("",!0),s.mountedPersArr.length>0?(k(),R("button",{key:1,onClick:e[1]||(e[1]=oe(a=>s.unmountAll(),["stop"])),class:"p-1 bg-red-100 hover:bg-red-200 dark:bg-red-900 dark:hover:bg-red-800 rounded-full border border-red-300 dark:border-red-700 active:scale-90 transition-all duration-150",title:"Unmount All Personalities"},e[11]||(e[11]=[b("i",{"data-feather":"x-octagon",class:"w-4 h-4 text-red-600 dark:text-red-400 stroke-current"},null,-1)]))):ne("",!0)])]),b("div",Omr,[b("div",mmr,[e[13]||(e[13]=b("label",{for:"personality-search",class:"sr-only"},"Search",-1)),b("div",gmr,[e[12]||(e[12]=b("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[b("i",{"data-feather":"search",class:"w-5 h-5 text-blue-400 dark:text-blue-500"})],-1)),He(b("input",{type:"search",id:"personality-search",class:"input search-input block w-full p-3 pl-10 text-sm text-blue-900 dark:text-blue-100 placeholder-blue-500 dark:placeholder-blue-400 pr-24",placeholder:"Search name, author, description...","onUpdate:modelValue":e[2]||(e[2]=a=>i.searchTermInput=a),onKeyup:e[3]||(e[3]=gr((...a)=>s.applySearch&&s.applySearch(...a),["enter"]))},null,544),[[vt,i.searchTermInput]]),b("div",Qmr,[i.searchTermInput?(k(),R("button",{key:0,onClick:e[4]||(e[4]=oe((...a)=>s.clearSearch&&s.clearSearch(...a),["stop"])),type:"button",class:"btn btn-secondary btn-sm text-xs px-3 py-1.5"}," Clear ")):ne("",!0),b("button",{onClick:e[5]||(e[5]=oe((...a)=>s.applySearch&&s.applySearch(...a),["stop"])),type:"button",class:"btn btn-primary btn-sm text-xs px-3 py-1.5"}," Search ")])])]),b("div",_mr,[e[14]||(e[14]=b("label",{for:"persCat",class:"sr-only"},"Category",-1)),He(b("select",{id:"persCat","onUpdate:modelValue":e[6]||(e[6]=a=>i.selectedCategory=a),onChange:e[7]||(e[7]=(...a)=>s.handleCategoryChange&&s.handleCategoryChange(...a)),class:"input block w-full p-3 text-sm text-blue-900 dark:text-blue-100"},[b("option",vmr,"All Categories ("+ae(i.allPersonalities.length)+")",1),b("option",ymr,"⬆️ Mounted ("+ae(s.mountedPersArr.length)+")",1),s.starredPersonalitiesPaths.length>0?(k(),R("option",bmr,"⭐ Starred ("+ae(s.getStarredCount())+")",1)):ne("",!0),(s.starredPersonalitiesPaths.length>0||s.mountedPersArr.length>0)&&i.persCatgArr.length>0?(k(),R("option",Smr,"──────────")):ne("",!0),(k(!0),R(Ve,null,dt(i.persCatgArr,(a,l)=>(k(),R("option",{key:l,value:a},ae(a)+" ("+ae(s.getCategoryCount(a))+") ",9,xmr))),128))],544),[[$s,i.selectedCategory]])])]),i.isLoading&&i.allPersonalities.length===0?(k(),R("div",Emr,e[15]||(e[15]=[b("svg",{"aria-hidden":"true",class:"w-8 h-8 mr-2 text-blue-400 animate-spin dark:text-blue-500 fill-blue-600 dark:fill-blue-300",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),Se(),b("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),b("span",null,"Loading personalities...",-1)]))):!i.isLoading&&s.filteredPersonalities.length===0?(k(),R("div",wmr," No personalities found"+ae(i.activeSearchTerm?' matching "'+i.activeSearchTerm+'"':"")+ae(s.getResultMessageQualifier())+". ",1)):(k(),R("div",Cmr,[b("label",Lmr,ae(s.getResultLabel())+": ("+ae(s.filteredPersonalities.length)+") ",1),(k(),R("div",{key:i.selectedCategory+"-"+i.activeSearchTerm,class:"p-2 pb-0 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 bg-blue-100/50 dark:bg-blue-800/30 rounded-md"},[te(V4,{name:"list"},{default:Ie(()=>[(k(!0),R(Ve,null,dt(s.filteredPersonalities,a=>(k(),Qt(o,{key:a.id||a.full_path,personality:a,select_language:!0,full_path:a.full_path,"is-mounted":a.isMounted,"is-active":s.isActivePersonality(a),"is-processing":a.isProcessing,"is-starred":a.isStarred,"base-url":i.bUrl,onSelect:s.onPersonalitySelected,onMount:s.mountPersonality,onUnmount:s.unmountPersonality,onRemount:s.remountPersonality,onEdit:s.editPersonality,onToggleStar:s.toggleStar,onCopyToCustom:s.onCopyToCustom,onReinstall:s.onPersonalityReinstall,onSettings:s.onSettingsPersonality,onCopyPersonalityName:s.onCopyPersonalityName,onOpenFolder:s.handleOpenFolder,onError:s.personalityImgPlaceholder},null,8,["personality","full_path","is-mounted","is-active","is-processing","is-starred","base-url","onSelect","onMount","onUnmount","onRemount","onEdit","onToggleStar","onCopyToCustom","onReinstall","onSettings","onCopyPersonalityName","onOpenFolder","onError"]))),128))]),_:1})]))],512))])}const Amr=st(nmr,[["render",$mr],["__scopeId","data-v-57acb6cf"]]),kmr="/assets/functioncall-Cm2fTSgb.png",Pmr="/",Rmr={props:{function_call:{},select_language:Boolean,full_path:String,onOpenFolder:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onShowSettings:Function,onCopyfunction_callName:Function,onToggleFavorite:Function},components:{InteractiveMenu:KC},data(){return{mounted:!1,name:this.function_call.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0},showHelpPopup:!1,renderedHelp:""}},computed:{commandsList(){let t=[{name:this.mounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.mounted?this.unmount:this.mount}];return console.log("this.category",this.function_call.category),this.function_call.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.mounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),t}},mounted(){this.mounted=this.function_call.mounted,console.log(this.function_call),Fe(()=>{Re.replace()})},methods:{show_settings(){this.onShowSettings(this)},formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return Pmr+this.function_call.avatar},defaultImg(t){t.target.src=kmr},toggleFavorite(){this.onToggleFavorite(this)},showFolder(){this.onOpenFolder(this)},toggleCopyLink(){this.onCopyfunction_callName(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.mounted=!1},showHelp(){this.renderedHelp=Kt(this.function_call.help),this.showHelpPopup=!0},closeHelp(){this.showHelpPopup=!1}},watch:{}},Mmr=["title"],Dmr={class:"flex-grow"},Nmr={class:"flex items-center mb-4"},Imr=["src"],Hmr={class:"font-bold text-xl text-gray-800 cursor-pointer"},Vmr={class:"text-sm text-gray-600"},qmr={class:"text-sm text-gray-600"},Umr={class:"text-sm text-gray-600"},Bmr={key:0,class:"text-sm text-gray-600"},zmr={key:1,class:"text-sm text-gray-600"},Xmr={class:"mb-4"},Fmr=["innerHTML"],jmr={class:"mt-auto pt-4 border-t"},Ymr={class:"flex justify-between items-center flex-wrap"},Gmr=["title"],Wmr=["fill"],Zmr=["src"],Kmr={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center"},Jmr={class:"bg-white p-4 rounded-lg shadow-lg w-[500px] h-[400px] flex flex-col"},egr={class:"flex justify-between items-center mb-2"},tgr={class:"flex-grow overflow-auto"},ngr=["innerHTML"];function rgr(t,e,n,r,i,s){const o=Xe("InteractiveMenu");return k(),R("div",{class:ye(["app-card flex flex-col h-full",i.mounted?"border-primary-light":"border-transparent"]),title:n.function_call.installed?"":"Not installed"},[b("div",Dmr,[b("div",Nmr,[b("img",{src:s.getImgUrl(),onError:e[0]||(e[0]=a=>s.defaultImg(a)),alt:"function_call Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4 cursor-pointer",onMouseover:e[1]||(e[1]=(...a)=>s.showThumbnail&&s.showThumbnail(...a)),onMousemove:e[2]||(e[2]=(...a)=>s.updateThumbnailPosition&&s.updateThumbnailPosition(...a)),onMouseleave:e[3]||(e[3]=(...a)=>s.hideThumbnail&&s.hideThumbnail(...a))},null,40,Imr),b("div",null,[b("h3",Hmr,ae(n.function_call.name),1),b("p",Vmr,"Author: "+ae(n.function_call.author),1),b("p",qmr,"Version: "+ae(n.function_call.version),1),b("p",Umr,"Category: "+ae(n.function_call.category),1),n.function_call.creation_date?(k(),R("p",Bmr,"Creation Date: "+ae(s.formatDate(n.function_call.creation_date)),1)):ne("",!0),n.function_call.last_update_date?(k(),R("p",zmr,"Last update Date: "+ae(s.formatDate(n.function_call.last_update_date)),1)):ne("",!0)]),n.function_call.help?(k(),R("button",{key:0,onClick:e[4]||(e[4]=(...a)=>s.showHelp&&s.showHelp(...a)),class:"ml-2 text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Help"},e[9]||(e[9]=[b("i",{"data-feather":"help-circle",class:"h-6 w-6"},null,-1)]))):ne("",!0)]),b("div",Xmr,[e[10]||(e[10]=b("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),b("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:n.function_call.description},null,8,Fmr)])]),b("div",jmr,[b("div",Ymr,[b("button",{onClick:e[5]||(e[5]=(...a)=>s.toggleFavorite&&s.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),R("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:t.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[11]||(e[11]=[b("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,Wmr))],8,Gmr),b("button",{onClick:e[6]||(e[6]=(...a)=>s.showFolder&&s.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},e[12]||(e[12]=[b("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1)])),i.mounted?(k(),R("button",{key:0,onClick:e[7]||(e[7]=(...a)=>s.show_settings&&s.show_settings(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Settings"},e[13]||(e[13]=[b("i",{"data-feather":"settings",class:"h-6 w-6"},null,-1)]))):ne("",!0),te(o,{commands:s.commandsList,force_position:2,title:"Menu",class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out"},null,8,["commands"])])]),i.thumbnailVisible?(k(),R("div",{key:0,style:qn({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[b("img",{src:s.getImgUrl(),class:"w-full h-full object-fill"},null,8,Zmr)],4)):ne("",!0),i.showHelpPopup?(k(),R("div",Kmr,[b("div",Jmr,[b("div",egr,[e[14]||(e[14]=b("h2",{class:"text-lg font-bold"},"Help",-1)),b("button",{onClick:e[8]||(e[8]=(...a)=>s.closeHelp&&s.closeHelp(...a)),class:"text-red-500 hover:text-red-600"},"Close")]),b("div",tgr,[b("div",{innerHTML:i.renderedHelp},null,8,ngr)])])])):ne("",!0)],10,Mmr)}const igr=st(Rmr,[["render",rgr]]),sgr="/assets/default_function-CyfcuNmo.png";function ogr(t,e){let n;return function(...i){const s=()=>{clearTimeout(n),t.apply(this,i)};clearTimeout(n),n=setTimeout(s,e)}}const agr={name:"FunctionCallsZoo",components:{FunctionEntry:igr},props:{config:{type:Object,required:!0},api_post_req:{type:Function,required:!0},api_get_req:{type:Function,required:!0},show_toast:{type:Function,required:!0},show_yes_no_dialog:{type:Function,required:!0},show_universal_form:{type:Function,required:!0},show_message_box:{type:Function,required:!0},client_id:{type:String,required:!0}},emits:["update:setting"],data(){return{allFunctions:[],categoriesFunc:[],filteredFunctions:[],pagedFunctions:[],isLoadingFunctions:!1,isSearchingFunc:!1,searchTermFunc:"",selectedCategoryFunc:"",sortOptionFunc:"mounted",itemsPerPageFunc:15,currentPageFunc:1,maxDisplayedMountedFunc:7,functionEntryRefs:{},observerFunc:null,defaultIcon:sgr,axiosBaseUrl:Ae.defaults.baseURL||""}},computed:{mountedFunctionPathsSet(){var t;return new Set(((t=this.config)==null?void 0:t.mounted_functions)||[])},mountedFunctions(){return this.allFunctions.filter(t=>this.mountedFunctionPathsSet.has(t.full_path))},displayedMountedFunctions(){return[...this.mountedFunctions].sort((e,n)=>(e.name||"").localeCompare(n.name||"")).slice(0,this.maxDisplayedMountedFunc)},hasMoreFunctionsToLoad(){return this.pagedFunctions.length{const i=e.has(r.full_path);r.isMounted!==i&&(r.isMounted=i,n=!0)}),n&&(console.log("Watcher: Re-applying filters and sort due to mounted status change."),this.resetAndReloadFunctions()),this.featherReplace()},deep:!0},searchTermFunc(){this.debouncedResetAndReload()},selectedCategoryFunc(){this.debouncedResetAndReload()},sortOptionFunc(){this.debouncedResetAndReload()},allFunctions:{handler(){console.log("Watcher: allFunctions list changed. Triggering initial load."),this.resetAndReloadFunctions()}}},methods:{getFunctionIcon(t){return t?t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?t.startsWith("/")?`${this.axiosBaseUrl}${t}`:t:`${this.axiosBaseUrl}/${t}`:this.defaultIcon},imgPlaceholder(t){t.target.src=this.defaultIcon},featherReplace(){this.$nextTick(()=>{try{Re.replace()}catch(t){console.error("Feather replace error:",t)}})},setFunctionRef(t,e){e&&(this.functionEntryRefs[t]=e)},async fetchFunctionsAndCategories(){if(!this.isLoadingFunctions){this.isLoadingFunctions=!0,console.log("Fetching functions and categories...");try{const t=await this.api_get_req("list_function_calls"),e=(t==null?void 0:t.function_calls)||[],n=new Set(e.map(r=>r.category).filter(Boolean));this.categoriesFunc=Array.from(n).sort(),this.allFunctions=e.map(r=>{const i=`${r.category}/${r.name}`,s=r.id||i;return{...r,full_path:i,isMounted:!1,id:s,isProcessing:!1}}),console.log(`Fetched ${this.allFunctions.length} total functions.`),this.$nextTick(()=>{var r;(r=this.config)!=null&&r.mounted_functions&&this.watch["config.mounted_functions"].handler.call(this,this.config.mounted_functions)})}catch(t){this.show_toast("Failed to load functions list.",4,!1),console.error("Error fetching functions:",t),this.allFunctions=[],this.categoriesFunc=[]}finally{this.isLoadingFunctions=!1}}},applyFiltersAndSortFunc(){console.time("FilterSortFunctions");let t=[...this.allFunctions];if(this.selectedCategoryFunc&&(t=t.filter(e=>e.category===this.selectedCategoryFunc)),this.searchTermFunc){const e=this.searchTermFunc.toLowerCase();t=t.filter(n=>{var c,u,d,f,h;const r=(c=n.name)==null?void 0:c.toLowerCase().includes(e),i=(u=n.author)==null?void 0:u.toLowerCase().includes(e),s=(d=n.description)==null?void 0:d.toLowerCase().includes(e),o=(f=n.category)==null?void 0:f.toLowerCase().includes(e),a=(h=n.full_path)==null?void 0:h.toLowerCase().includes(e),l=Array.isArray(n.keywords)?n.keywords.some(p=>p.toLowerCase().includes(e)):!1;return r||i||s||o||a||l})}t.sort((e,n)=>{if(this.sortOptionFunc==="mounted"){if(e.isMounted&&!n.isMounted)return-1;if(!e.isMounted&&n.isMounted)return 1}switch(this.sortOptionFunc!=="mounted"?this.sortOptionFunc:"name"){case"name":return(e.name||"").localeCompare(n.name||"");case"author":return(e.author||"").localeCompare(n.author||"");case"category":return(e.category||"").localeCompare(n.category||"");default:return 0}}),this.filteredFunctions=t,console.timeEnd("FilterSortFunctions"),console.log(`Filtered/Sorted functions: ${this.filteredFunctions.length}`)},resetAndReloadFunctions(){this.currentPageFunc=1,this.pagedFunctions=[],this.applyFiltersAndSortFunc(),this.$nextTick(()=>{this.loadMoreFunctions()})},debouncedResetAndReload:ogr(function(){this.isSearchingFunc=!0,this.resetAndReloadFunctions(),setTimeout(()=>{this.isSearchingFunc=!1},100)},300),loadMoreFunctions(){if(this.isLoadingFunctions||this.isSearchingFunc||!this.hasMoreFunctionsToLoad)return;console.log(`Loading page ${this.currentPageFunc}`);const t=(this.currentPageFunc-1)*this.itemsPerPageFunc,e=t+this.itemsPerPageFunc,n=this.filteredFunctions.slice(t,e),r=new Set(this.pagedFunctions.map(s=>s.id||s.full_path)),i=n.filter(s=>!r.has(s.id||s.full_path));i.length>0?(this.pagedFunctions.push(...i),this.currentPageFunc++,this.featherReplace()):n.length>0&&console.log("Load more triggered but items already seem to be loaded.")},setFunctionProcessing(t,e){const n=s=>{s&&(s.isProcessing=e)},r=this.allFunctions.findIndex(s=>(s.id||s.full_path)===t);n(this.allFunctions[r]);const i=this.pagedFunctions.findIndex(s=>(s.id||s.full_path)===t);n(this.pagedFunctions[i])},async handleMount(t){if(t.isMounted||t.isProcessing)return;const e=t.id||t.full_path;this.setFunctionProcessing(e,!0),this.show_toast(`Mounting ${t.name}...`,3,!0);try{const n=await this.api_post_req("mount_function_call",{client_id:this.client_id,function_category:t.category,function_name:t.name});if(n&&n.status){this.show_toast(`${t.name} mounted successfully.`,4,!0);const r=[...this.mountedFunctionPathsSet,t.full_path];this.$emit("update:setting",{key:"mounted_functions",value:r})}else this.show_toast(`Failed to mount ${t.name}: ${(n==null?void 0:n.error)||"Error"}`,4,!1)}catch(n){this.show_toast(`Error mounting ${t.name}: ${n.message||n}`,4,!1),console.error("Mount error:",n)}finally{this.setFunctionProcessing(e,!1)}},async handleUnmount(t){var n;if(!t.isMounted||t.isProcessing)return;const e=t.id||t.full_path;this.setFunctionProcessing(e,!0),this.show_toast(`Unmounting ${t.name}...`,3,!0);try{const r=await this.api_post_req("unmount_function_call",{client_id:this.client_id,function_category:t.category,function_name:t.name});if(r&&r.status){this.show_toast(`${t.name} unmounted.`,4,!0);const i=(((n=this.config)==null?void 0:n.mounted_functions)||[]).filter(s=>s!==t.full_path);this.$emit("update:setting",{key:"mounted_functions",value:i})}else this.show_toast(`Failed to unmount ${t.name}: ${(r==null?void 0:r.error)||"Error"}`,4,!1)}catch(r){this.show_toast(`Error unmounting ${t.name}: ${r.message||r}`,4,!1),console.error("Unmount error:",r)}finally{this.setFunctionProcessing(e,!1)}},async unmountAll(){if(!(this.mountedFunctions.length===0||!await this.show_yes_no_dialog(`Unmount all ${this.mountedFunctions.length} functions?`,"Unmount All","Cancel"))){this.show_toast("Unmounting all functions...",3,!0),this.mountedFunctions.forEach(e=>this.setFunctionProcessing(e.id||e.full_path,!0));try{const e=await this.api_post_req("unmount_all_functions",{client_id:this.client_id});e&&e.status?(this.show_toast("All functions unmounted.",4,!0),this.$emit("update:setting",{key:"mounted_functions",value:[]})):(this.show_toast(`Failed to unmount all: ${(e==null?void 0:e.error)||"Error"}`,4,!1),this.mountedFunctions.forEach(n=>this.setFunctionProcessing(n.id||n.full_path,!1)))}catch(e){this.show_toast(`Error unmounting all: ${e.message||e}`,4,!1),console.error("Unmount all error:",e),this.mountedFunctions.forEach(n=>this.setFunctionProcessing(n.id||n.full_path,!1))}}},async handleRemount(t){const e=t.id||t.full_path;if(!t.isProcessing){this.setFunctionProcessing(e,!0),this.show_toast(`Remounting ${t.name}...`,3,!0);try{let n=[...this.config.mounted_functions||[]];if(n.includes(t.full_path)){const s=await this.api_post_req("unmount_function_call",{client_id:this.client_id,function_category:t.category,function_name:t.name});if(!s||!s.status){this.show_toast(`Failed to unmount ${t.name} during remount. Aborting.`,4,!1),this.setFunctionProcessing(e,!1);return}n=n.filter(o=>o!==t.full_path),this.$emit("update:setting",{key:"mounted_functions",value:n}),await Fe(),console.log("Remount Step 1: Unmounted and emitted.")}const i=await this.api_post_req("mount_function_call",{client_id:this.client_id,function_category:t.category,function_name:t.name});i&&i.status?(this.show_toast(`${t.name} remounted successfully.`,4,!0),n.includes(t.full_path)||n.push(t.full_path),this.$emit("update:setting",{key:"mounted_functions",value:n}),console.log("Remount Step 2: Mounted and emitted.")):this.show_toast(`Failed to mount ${t.name} during remount: ${(i==null?void 0:i.error)||"Error"}`,4,!1)}catch(n){this.show_toast(`Error remounting ${t.name}: ${n.message||n}`,4,!1),console.error("Remount error:",n)}finally{this.setFunctionProcessing(e,!1)}}},async handleSettings(t){if(t.isProcessing)return;const e=t.id||t.full_path;this.setFunctionProcessing(e,!0);try{const n=await this.api_post_req("get_function_call_settings",{client_id:this.client_id,category:t.category,name:t.name});if(n&&typeof n=="object"&&Object.keys(n).length>0){const r=await this.show_universal_form(n,`Function Settings - ${t.name}`,"Save","Cancel");if(r!=null){const i=await this.api_post_req("set_function_call_settings",{client_id:this.client_id,category:t.category,name:t.name,settings:r});i&&i.status?this.show_toast(`Settings for ${t.name} updated.`,4,!0):this.show_toast(`Failed to update settings for ${t.name}: ${(i==null?void 0:i.error)||"Error"}`,4,!1)}else this.show_toast(`Settings update for ${t.name} cancelled.`,3,!0)}else n&&typeof n=="object"&&Object.keys(n).length===0?this.show_message_box(`Function "${t.name}" has no configurable settings.`):this.show_toast(`Could not retrieve settings for ${t.name}: ${(n==null?void 0:n.error)||"Invalid response"}`,4,!1)}catch(n){this.show_toast(`Error accessing settings for ${t.name}: ${n.message||n}`,4,!1),console.error("Settings error:",n)}finally{this.setFunctionProcessing(e,!1)}},async handleEdit(t){this.show_toast(`Opening folder containing "${t.name}" for editing...`,3,!0),await this.handleOpenFolder(t)},async handleCopyToCustom(t){if(!await this.show_yes_no_dialog(`Copy "${t.name}" from "${t.category}" to your 'custom_functions' folder?`,"Copy","Cancel")||t.isProcessing)return;const n=t.id||t.full_path;this.setFunctionProcessing(n,!0);try{const r=await this.api_post_req("copy_to_custom_functions",{client_id:this.client_id,category:t.category,name:t.name});r&&r.status?(this.show_message_box(`Function "${t.name}" copied to 'custom_functions'. The list will refresh shortly.`),await this.fetchFunctionsAndCategories()):this.show_toast(`Failed to copy ${t.name}: ${(r==null?void 0:r.error)||"Already exists in custom?"}`,4,!1)}catch(r){this.show_toast(`Error copying ${t.name}: ${r.message||r}`,4,!1),console.error("Copy to custom error:",r)}finally{this.setFunctionProcessing(n,!1)}},handleCopyName(t){navigator.clipboard.writeText(t.name).then(()=>this.show_toast(`Copied name: ${t.name}`,3,!0)).catch(e=>{this.show_toast("Failed to copy name to clipboard.",3,!1),console.error("Clipboard copy failed:",e)})},async handleOpenFolder(t){try{await this.api_post_req("open_function_folder",{client_id:this.client_id,category:t.category,name:t.name})}catch(e){this.show_toast(`Error opening folder for ${t.name}: ${e.message||e}`,4,!1),console.error("Open folder error:",e)}},scrollToFunction(t){const e=t.id||t.full_path,n=this.functionEntryRefs[e];if(n&&n.$el){const r=n.$el;r.scrollIntoView({behavior:"smooth",block:"center"}),r.classList.add("ring-2","ring-offset-2","ring-blue-500","dark:ring-offset-gray-800","transition-all","duration-1000","ease-out"),setTimeout(()=>{r.classList.remove("ring-2","ring-offset-2","ring-blue-500","dark:ring-offset-gray-800","transition-all","duration-1000","ease-out")},1500)}else console.warn(`Could not find ref $el to scroll to for function ID: ${e}. Is it loaded?`),this.hasMoreFunctionsToLoad&&!this.pagedFunctions.some(r=>(r.id||r.full_path)===e)?(this.show_toast(`Function ${t.name} not visible, attempting to load more...`,3,!0),this.loadMoreFunctions(),setTimeout(()=>this.scrollToFunction(t),500)):this.show_toast(`Could not scroll to ${t.name}.`,3,!1)},setupIntersectionObserverFunc(){this.disconnectIntersectionObserver();const t={root:null,rootMargin:"100px",threshold:.1};this.observerFunc=new IntersectionObserver(n=>{n.forEach(r=>{r.isIntersecting&&this.hasMoreFunctionsToLoad&&this.loadMoreFunctions()})},t);const e=this.$refs.loadMoreTriggerFunc;e?(this.observerFunc.observe(e),console.log("IntersectionObserver setup complete.")):this.$nextTick(()=>{const n=this.$refs.loadMoreTriggerFunc;n?(this.observerFunc.observe(n),console.log("IntersectionObserver setup complete (nextTick).")):console.error("Load more trigger element not found for IntersectionObserver setup.")})},disconnectIntersectionObserver(){if(this.observerFunc){console.log("Disconnecting IntersectionObserver.");const t=this.$refs.loadMoreTriggerFunc;if(t)try{this.observerFunc.unobserve(t)}catch(e){console.warn("Error unobserving trigger:",e)}this.observerFunc.disconnect(),this.observerFunc=null}}},mounted(){console.log("FunctionCallsZoo Mounted."),this.fetchFunctionsAndCategories(),this.featherReplace(),this.$nextTick(()=>{this.setupIntersectionObserverFunc()})},beforeUpdate(){this.functionEntryRefs={}},updated(){this.featherReplace(),this.$nextTick(()=>{const t=this.$refs.loadMoreTriggerFunc;if(t&&this.observerFunc&&!this.observerFunc.takeRecords().some(e=>e.target===t)){console.warn("IntersectionObserver detached from trigger, re-observing.");try{this.observerFunc.unobserve(t)}catch{}this.observerFunc.observe(t)}else t&&!this.observerFunc&&(console.warn("IntersectionObserver lost, re-setting up."),this.setupIntersectionObserverFunc())})},unmounted(){console.log("FunctionCallsZoo Unmounted."),this.disconnectIntersectionObserver()}},lgr={class:"user-settings-panel space-y-6 p-4 md:p-6 rounded-lg shadow-md bg-white dark:bg-gray-800"},cgr={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b border-blue-300 dark:border-blue-600 pb-3 mb-4"},ugr={class:"flex flex-col items-end"},dgr={class:"flex items-center flex-wrap gap-2 text-sm font-medium mb-1"},fgr={key:0,class:"text-blue-500 dark:text-blue-500 italic text-xs"},hgr={key:1,class:"flex -space-x-3 items-center"},pgr=["src","title","onClick"],Tgr=["onClick"],Ogr=["title"],mgr={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4 items-center"},ggr={class:"relative md:col-span-1"},Qgr={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center"},_gr={class:"md:col-span-1"},vgr=["value"],ygr={class:"md:col-span-1"},bgr={key:0,class:"flex justify-center items-center p-10 text-blue-500 dark:text-blue-400"},Sgr={key:1,class:"text-center text-blue-500 dark:text-blue-400 py-10"},xgr={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 scrollbar-thin scrollbar-thumb-blue-300 scrollbar-track-blue-100 dark:scrollbar-thumb-blue-700 dark:scrollbar-track-blue-900",ref:"scrollContainerFunc"},Egr={ref:"loadMoreTriggerFunc",class:"h-10"},wgr={key:0,class:"flex justify-center items-center text-center text-blue-500 dark:text-blue-400 py-4"};function Cgr(t,e,n,r,i,s){const o=Xe("FunctionEntry");return k(),R("div",lgr,[b("div",cgr,[e[9]||(e[9]=b("h2",{class:"text-2xl font-semibold text-blue-800 dark:text-blue-100 mb-2 sm:mb-0"}," Function Calls Zoo ",-1)),b("div",ugr,[b("div",dgr,[e[7]||(e[7]=b("span",{class:"text-blue-600 dark:text-blue-400"},"Mounted:",-1)),s.mountedFunctions.length===0?(k(),R("div",fgr,"None")):(k(),R("div",hgr,[(k(!0),R(Ve,null,dt(s.displayedMountedFunctions,(a,l)=>(k(),R("div",{key:`mounted-${a.id||a.full_path||l}`,class:"relative group"},[b("img",{src:s.getFunctionIcon(a.icon),onError:e[0]||(e[0]=(...c)=>s.imgPlaceholder&&s.imgPlaceholder(...c)),class:"w-7 h-7 rounded-full object-cover ring-2 ring-white dark:ring-gray-700 cursor-pointer hover:ring-blue-500 dark:hover:ring-blue-400 transition-all",title:`${a.name} (${a.category})`,onClick:c=>s.scrollToFunction(a)},null,40,pgr),b("button",{onClick:oe(c=>s.handleUnmount(a),["stop"]),class:"absolute -top-1 -right-1 p-0.5 rounded-full bg-red-600 text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-1 dark:focus:ring-offset-gray-900",title:"Unmount"},e[6]||(e[6]=[b("i",{"data-feather":"x",class:"w-3 h-3 stroke-current"},null,-1)]),8,Tgr)]))),128)),s.mountedFunctions.length>i.maxDisplayedMountedFunc?(k(),R("div",{key:0,class:"w-7 h-7 rounded-full bg-blue-200 dark:bg-blue-700 ring-2 ring-white dark:ring-gray-700 flex items-center justify-center text-xs font-semibold text-blue-600 dark:text-blue-300",title:`${s.mountedFunctions.length-i.maxDisplayedMountedFunc} more mounted`}," +"+ae(s.mountedFunctions.length-i.maxDisplayedMountedFunc),9,Ogr)):ne("",!0)]))]),s.mountedFunctions.length>0?(k(),R("button",{key:0,onClick:e[1]||(e[1]=(...a)=>s.unmountAll&&s.unmountAll(...a)),class:"btn btn-sm bg-red-600 hover:bg-red-700 text-white text-xs mt-1 focus:ring-red-300 dark:focus:ring-red-600"},e[8]||(e[8]=[b("i",{"data-feather":"x-octagon",class:"w-3 h-3 mr-1 stroke-current"},null,-1),Se("Unmount All ")]))):ne("",!0)])]),e[18]||(e[18]=b("p",{class:"text-sm text-blue-600 dark:text-blue-400"}," Mount functions to grant the AI specific capabilities and tools it can use during conversations. Requires a model trained for function calling. ",-1)),b("div",mgr,[b("div",ggr,[e[11]||(e[11]=b("div",{class:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"},[b("i",{"data-feather":"search",class:"w-5 h-5 text-blue-400 dark:text-blue-500"})],-1)),He(b("input",{type:"search","onUpdate:modelValue":e[2]||(e[2]=a=>i.searchTermFunc=a),placeholder:"Search functions...",class:"input pl-10 w-full placeholder:text-blue-400 dark:placeholder:text-blue-500",onInput:e[3]||(e[3]=(...a)=>t.debounceSearchFunc&&t.debounceSearchFunc(...a))},null,544),[[vt,i.searchTermFunc]]),i.isSearchingFunc?(k(),R("div",Qgr,e[10]||(e[10]=[b("svg",{"aria-hidden":"true",class:"w-5 h-5 text-blue-400 dark:text-blue-500 animate-spin fill-blue-500 dark:fill-blue-400",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),Se(),b("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)]))):ne("",!0)]),b("div",_gr,[e[13]||(e[13]=b("label",{for:"func-category",class:"sr-only"},"Filter by Category",-1)),He(b("select",{id:"func-category","onUpdate:modelValue":e[4]||(e[4]=a=>i.selectedCategoryFunc=a),class:"input w-full"},[e[12]||(e[12]=b("option",{value:""},"All Categories",-1)),(k(!0),R(Ve,null,dt(i.categoriesFunc,a=>(k(),R("option",{key:a,value:a},ae(a),9,vgr))),128))],512),[[$s,i.selectedCategoryFunc]])]),b("div",ygr,[e[15]||(e[15]=b("label",{for:"func-sort",class:"sr-only"},"Sort functions by",-1)),He(b("select",{id:"func-sort","onUpdate:modelValue":e[5]||(e[5]=a=>i.sortOptionFunc=a),class:"input w-full"},e[14]||(e[14]=[b("option",{value:"mounted"},"Sort by Mounted",-1),b("option",{value:"name"},"Sort by Name",-1),b("option",{value:"author"},"Sort by Author",-1),b("option",{value:"category"},"Sort by Category",-1)]),512),[[$s,i.sortOptionFunc]])])]),i.isLoadingFunctions?(k(),R("div",bgr,e[16]||(e[16]=[b("svg",{"aria-hidden":"true",class:"w-8 h-8 mr-2 text-blue-300 dark:text-blue-600 animate-spin fill-blue-500 dark:fill-blue-400",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),Se(),b("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),b("span",null,"Loading functions...",-1)]))):i.pagedFunctions.length===0&&i.filteredFunctions.length===0?(k(),R("div",Sgr," No functions found"+ae(i.searchTermFunc?' matching "'+i.searchTermFunc+'"':"")+ae(i.selectedCategoryFunc?' in category "'+i.selectedCategoryFunc+'"':"")+". ",1)):ne("",!0),b("div",xgr,[(k(!0),R(Ve,null,dt(i.pagedFunctions,a=>(k(),Qt(o,{key:a.id||a.full_path,ref_for:!0,ref:l=>s.setFunctionRef(a.id||a.full_path,l),function_call:a,"is-mounted":a.isMounted,"is-processing":a.isProcessing,"get-icon-url":s.getFunctionIcon,"on-img-error":s.imgPlaceholder,onMount:l=>s.handleMount(a),onUnmount:l=>s.handleUnmount(a),onRemount:l=>s.handleRemount(a),onShowSettings:l=>s.handleSettings(a),onEdit:l=>s.handleEdit(a),onCopyToCustom:l=>s.handleCopyToCustom(a),onCopyName:l=>s.handleCopyName(a),onOpenFolder:l=>s.handleOpenFolder(a)},null,8,["function_call","is-mounted","is-processing","get-icon-url","on-img-error","onMount","onUnmount","onRemount","onShowSettings","onEdit","onCopyToCustom","onCopyName","onOpenFolder"]))),128))],512),b("div",Egr,[s.hasMoreFunctionsToLoad&&!i.isLoadingFunctions&&!i.isSearchingFunc?(k(),R("div",wgr,e[17]||(e[17]=[b("svg",{"aria-hidden":"true",class:"w-5 h-5 mr-2 text-blue-300 dark:text-blue-600 animate-spin fill-blue-500 dark:fill-blue-400",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),Se(),b("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),b("span",null,"Loading more...",-1)]))):ne("",!0)],512)])}const Lgr=st(agr,[["render",Cgr],["__scopeId","data-v-8ff7e3ea"]]),$gr={name:"ModelConfigSettings",components:{ToggleSwitch:ju},props:{config:{type:Object,required:!0},loading:{type:Boolean,default:!1}},emits:["setting-updated"],computed:{isDisabled(){return!this.config.override_personality_model_parameters}},methods:{updateValue(t,e){this.$emit("setting-updated",{key:t,value:e})},handleNumberInput(t,e,n=!1){let r=n?parseInt(e):parseFloat(e);if(t==="seed"){if(String(e)==="-")return;(isNaN(r)||r<-1)&&(r=-1)}else if(isNaN(r)){console.warn(`Attempted to set invalid number for ${t}:`,e);return}this.updateValue(t,r)},replaceFeatherIcons(){Fe(()=>{try{Re.replace()}catch{}})}},mounted(){this.replaceFeatherIcons()},updated(){this.replaceFeatherIcons()}},Agr={class:"user-settings-panel space-y-6"},kgr={class:"toggle-item !justify-start gap-4 border border-blue-200 dark:border-blue-700 rounded-lg p-3 panels-color"},Pgr={class:"setting-item"},Rgr=["value","disabled"],Mgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},Dgr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},Ngr=["value","disabled"],Igr=["value","disabled"],Hgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},Vgr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},qgr=["value","disabled"],Ugr=["value","disabled"],Bgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},zgr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},Xgr=["value","disabled"],Fgr=["value","disabled"],jgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},Ygr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},Ggr=["value","disabled"],Wgr=["value","disabled"],Zgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},Kgr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},Jgr=["value","disabled"],eQr=["value","disabled"],tQr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},nQr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},rQr=["value","disabled"],iQr=["value","disabled"];function sQr(t,e,n,r,i,s){const o=Xe("ToggleSwitch");return k(),R("div",Agr,[e[22]||(e[22]=b("h2",{class:"text-xl font-semibold text-blue-800 dark:text-blue-100 border-b border-blue-300 dark:border-blue-600 pb-2"}," Model Generation Parameters ",-1)),e[23]||(e[23]=b("p",{class:"text-sm text-blue-600 dark:text-blue-400 mb-4"}," Adjust the core parameters that influence how the AI generates text. These settings can be overridden by specific personalities unless the option below is checked. ",-1)),b("div",kgr,[te(o,{id:"override_personality_model_parameters",checked:n.config.override_personality_model_parameters,"onUpdate:checked":e[0]||(e[0]=a=>s.updateValue("override_personality_model_parameters",a))},null,8,["checked"]),e[14]||(e[14]=b("label",{for:"override_personality_model_parameters",class:"toggle-label !flex-none"},[Se(" Override Personality Parameters "),b("span",{class:"toggle-description"},"Force the use of these global parameters, ignoring any settings defined within the selected personality.")],-1))]),b("div",{class:ye(["space-y-5 pt-4",s.isDisabled?"opacity-50 pointer-events-none":""])},[b("div",Pgr,[e[15]||(e[15]=To('',1)),b("input",{type:"number",id:"seed",value:n.config.seed,onInput:e[1]||(e[1]=a=>s.handleNumberInput("seed",a.target.value,!0)),class:"input-sm w-full md:w-32",step:"1",placeholder:"-1",disabled:s.isDisabled},null,40,Rgr)]),b("div",Mgr,[e[16]||(e[16]=To('',1)),b("div",Dgr,[b("input",{id:"temperature-range",value:n.config.temperature,onInput:e[2]||(e[2]=a=>s.handleNumberInput("temperature",a.target.value)),type:"range",min:"0",max:"2",step:"0.01",class:"range-input flex-grow",disabled:s.isDisabled},null,40,Ngr),b("input",{id:"temperature-number",value:n.config.temperature,onInput:e[3]||(e[3]=a=>s.handleNumberInput("temperature",a.target.value)),type:"number",min:"0",max:"2",step:"0.01",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,Igr)])]),b("div",Hgr,[e[17]||(e[17]=To('',1)),b("div",Vgr,[b("input",{id:"n_predict-range",value:n.config.n_predict,onInput:e[4]||(e[4]=a=>s.handleNumberInput("n_predict",a.target.value,!0)),type:"range",min:"32",max:"8192",step:"32",class:"range-input flex-grow",disabled:s.isDisabled},null,40,qgr),b("input",{id:"n_predict-number",value:n.config.n_predict,onInput:e[5]||(e[5]=a=>s.handleNumberInput("n_predict",a.target.value,!0)),type:"number",min:"32",max:"8192",step:"32",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,Ugr)])]),b("div",Bgr,[e[18]||(e[18]=To('',1)),b("div",zgr,[b("input",{id:"top_k-range",value:n.config.top_k,onInput:e[6]||(e[6]=a=>s.handleNumberInput("top_k",a.target.value,!0)),type:"range",min:"0",max:"100",step:"1",class:"range-input flex-grow",disabled:s.isDisabled},null,40,Xgr),b("input",{id:"top_k-number",value:n.config.top_k,onInput:e[7]||(e[7]=a=>s.handleNumberInput("top_k",a.target.value,!0)),type:"number",min:"0",max:"100",step:"1",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,Fgr)])]),b("div",jgr,[e[19]||(e[19]=To('',1)),b("div",Ygr,[b("input",{id:"top_p-range",value:n.config.top_p,onInput:e[8]||(e[8]=a=>s.handleNumberInput("top_p",a.target.value)),type:"range",min:"0",max:"1",step:"0.01",class:"range-input flex-grow",disabled:s.isDisabled},null,40,Ggr),b("input",{id:"top_p-number",value:n.config.top_p,onInput:e[9]||(e[9]=a=>s.handleNumberInput("top_p",a.target.value)),type:"number",min:"0",max:"1",step:"0.01",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,Wgr)])]),b("div",Zgr,[e[20]||(e[20]=To('',1)),b("div",Kgr,[b("input",{id:"repeat_penalty-range",value:n.config.repeat_penalty,onInput:e[10]||(e[10]=a=>s.handleNumberInput("repeat_penalty",a.target.value)),type:"range",min:"0.5",max:"2.0",step:"0.01",class:"range-input flex-grow",disabled:s.isDisabled},null,40,Jgr),b("input",{id:"repeat_penalty-number",value:n.config.repeat_penalty,onInput:e[11]||(e[11]=a=>s.handleNumberInput("repeat_penalty",a.target.value)),type:"number",min:"0.5",max:"2.0",step:"0.01",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,eQr)])]),b("div",tQr,[e[21]||(e[21]=To('',1)),b("div",nQr,[b("input",{id:"repeat_last_n-range",value:n.config.repeat_last_n,onInput:e[12]||(e[12]=a=>s.handleNumberInput("repeat_last_n",a.target.value,!0)),type:"range",min:"0",max:"512",step:"8",class:"range-input flex-grow",disabled:s.isDisabled},null,40,rQr),b("input",{id:"repeat_last_n-number",value:n.config.repeat_last_n,onInput:e[13]||(e[13]=a=>s.handleNumberInput("repeat_last_n",a.target.value,!0)),type:"number",min:"0",max:"512",step:"8",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,iQr)])])],2)])}const oQr=st($gr,[["render",sQr],["__scopeId","data-v-1dc5e8f0"]]);Ae.defaults.baseURL="/";const Y8={accept:"application/json","Content-Type":"application/json"},aQr={name:"SettingsView",components:{SettingsSidebar:s5r},data(){return{isLoading:!1,settingsChanged:!1,has_updates:!1,activeSection:"system_status",loading_text:"Loading settings...",editableConfig:null,sections:[{id:"system_status",name:"System Status",icon:"activity",component:rs(F5r)},{id:"main_config",name:"Main Config",icon:"sliders",component:rs(i7r)},{id:"model_config",name:"Model Parameters",icon:"cpu",component:rs(oQr)},{id:"smart_routing",name:"Smart Routing",icon:"git-branch",component:rs(v6r)},{id:"data_management",name:"Data Management",icon:"database",component:rs(q8r)},{id:"internet",name:"Internet",icon:"wifi",component:rs(chr)},{id:"services_zoo",name:"Services Zoo",icon:"server",component:rs(p9r)},{id:"binding_zoo",name:"Bindings Zoo",icon:"link",component:rs(gpr)},{id:"models_zoo",name:"Models Zoo",icon:"package",component:rs(_Or)},{id:"personalities_zoo",name:"Personalities Zoo",icon:"users",component:rs(Amr)},{id:"function_calls_zoo",name:"Function Calls Zoo",icon:"tool",component:rs(Lgr)}]}},computed:{configToEdit(){return this.editableConfig??this.$store.state.config},currentComponent(){const t=this.sections.find(e=>e.id===this.activeSection);return t?t.component:null}},methods:{deepClone(t){if(t===null||typeof t!="object")return t;if(t instanceof Date)return new Date(t.getTime());if(Array.isArray(t)){const n=[];for(let r=0;r{e&&(this.cancelConfiguration(!1),this.activeSection=t)}):this.activeSection=t},handleSettingUpdated(t){this.editableConfig||(this.editableConfig=this.deepClone(this.$store.state.config));const e=t.key.split(".");let n=this.editableConfig;try{for(;e.length>1;){const a=e.shift(),l=a.match(/^(\w+)\[(\d+)\]$/);let c=a,u=-1;if(l&&(c=l[1],u=parseInt(l[2],10)),!n||typeof n!="object"||!n.hasOwnProperty(c))throw new Error(`Invalid path segment: ${c}`);if(u!==-1){if(!Array.isArray(n[c])||u>=n[c].length)throw new Error(`Invalid array index: ${u} for key ${c}`);n=n[c][u]}else n=n[c]}const r=e[0],i=r.match(/^(\w+)\[(\d+)\]$/);let s=r,o=-1;if(i&&(s=i[1],o=parseInt(i[2],10)),typeof n!="object"||n===null)throw new Error(`Cannot set property on non-object: ${r}`);if(o!==-1){if(!n.hasOwnProperty(s)||!Array.isArray(n[s])||o>=n[s].length)throw new Error(`Invalid final array index: ${o} for key ${s}`);n[s][o]=t.value}else n[s]=t.value;this.settingsChanged=!0}catch(r){this.$store.state.toast.showToast(`Error updating setting ${t.key}: ${r.message}`,4,!1)}},async refreshConfigInView(){this.isLoading=!0,this.loading_text="Refreshing config...";try{await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModelsArr"),this.editableConfig=null,this.settingsChanged=!1,this.$store.state.toast.showToast("Configuration refreshed.",2,!0)}catch(t){this.$store.state.toast.showToast("Failed to load configuration.",4,!1),console.error("Error refreshing config or model lists:",t),this.editableConfig=null,this.settingsChanged=!1}finally{this.isLoading=!1,Fe(()=>{Re.replace()})}},async applyConfiguration(){if(!this.settingsChanged||!this.editableConfig){this.$store.state.toast.showToast("No changes to apply.",3,!1);return}this.isLoading=!0,this.loading_text="Applying settings...";let t=!1;try{const e=await Ae.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.editableConfig},{headers:Y8});e.data.status?(this.$store.state.toast.showToast("Settings applied. Refreshing...",4,!0),t=!0,await this.refreshConfigInView()):this.$store.state.toast.showToast(`Apply failed: ${e.data.error||"Error"}`,4,!1)}catch(e){this.$store.state.toast.showToast(`Error applying settings: ${e.message||e}`,4,!1)}finally{t||(this.isLoading=!1)}},cancelConfiguration(t=!0){this.editableConfig=null,this.settingsChanged=!1},async saveConfiguration(){this.isLoading=!0,this.loading_text="Saving configuration...";try{const t=await Ae.post("/save_settings",{client_id:this.$store.state.client_id},{headers:Y8});t.data.status?this.$store.state.toast.showToast("Settings saved successfully.",4,!0):this.$store.state.messageBox.showMessage(`Error saving settings: ${t.data.error||"Error"}`)}catch(t){this.$store.state.messageBox.showMessage(`Error saving settings: ${t.message}`)}finally{this.isLoading=!1,this.$store.commit("refreshBindings"),this.$store.commit("refreshModelsZoo")}},reset_configuration(){this.$store.state.yesNoDialog.askQuestion("Reset config to default? This deletes current settings.","Reset","Cancel").then(async t=>{if(t){this.isLoading=!0,this.loading_text="Resetting...";let e=!1;try{const n=await Ae.post("/reset_settings",{client_id:this.$store.state.client_id},{headers:Y8});n.data.status?(this.$store.state.messageBox.showMessage("Settings reset. Reloading..."),e=!0,setTimeout(()=>window.location.reload(),2e3)):this.$store.state.messageBox.showMessage(`Reset failed: ${n.data.error||"Error"}`)}catch(n){this.$store.state.messageBox.showMessage(`Reset failed: ${n.message}`)}finally{e||(this.isLoading=!1)}}})},async restart_program(){this.loading_text="Restarting...",this.isLoading=!0;let t=!1;try{const e=await this.api_post_req("restart_program");e.status?(this.$store.state.toast.showToast("Restarting LoLLMs...",4,!0),t=!0):this.$store.state.toast.showToast(`Restart command failed: ${e.error||"Error"}`,4,!1)}catch{}finally{t||(this.isLoading=!1)}},async clear_uploads(){this.loading_text="Clearing uploads...",this.isLoading=!0;try{const t=await this.api_get_req("clear_uploads");t.status?this.$store.state.toast.showToast("Uploads folder cleared!",4,!0):this.$store.state.toast.showToast(`Clear failed: ${t.error||"Error"}`,4,!1)}catch{}finally{this.isLoading=!1}},async update_software(){this.loading_text="Updating...",this.isLoading=!0;let t=!1;try{const e=await this.api_post_req("update_software");this.$store.state.toast.showToast("Update initiated. LoLLMs might restart.",4,!0),this.has_updates=!1,t=!0,e.status||this.$store.state.toast.showToast(`Update command sent, server reported issue: ${e.error||"Unknown"}`,4,!1)}catch{}finally{t||(this.isLoading=!1)}},async updateHasUpdates(){try{const t=await this.api_get_req("check_update");this.has_updates=(t==null?void 0:t.update_availability)||!1,Fe(()=>{Re.replace()})}catch{this.has_updates=!1}},async api_get_req(t){if(this.$store.state.api_get_req)return this.$store.state.api_get_req(t);try{return(await Ae.get(`/${t}?client_id=${this.$store.state.client_id}`)).data}catch(e){throw this.$store.state.toast.showToast(`GET Error: ${e.message}`,4,!1),e}},async api_post_req(t,e={}){if(this.$store.state.api_post_req)return this.$store.state.api_post_req(t,e);try{const n={...e,client_id:this.$store.state.client_id};return(await Ae.post(`/${t}`,n,{headers:Y8})).data}catch(n){throw this.$store.state.toast.showToast(`POST Error: ${n.message}`,4,!1),n}}},mounted(){this.refreshConfigInView(),this.updateHasUpdates(),Fe(()=>{Re.replace()})},updated(){Fe(()=>{Re.replace()})}},lQr={class:"flex h-screen w-screen font-sans antialiased theme-bg-primary theme-text-primary"},cQr={class:"flex-1 flex flex-col overflow-hidden"},uQr={class:"flex items-center gap-4 flex-1"},dQr={key:0,class:"flex items-center gap-2 theme-text-warning animate-pulse"},fQr={key:1,class:"flex gap-3 items-center"},hQr={key:0,class:"flex items-center gap-2"},pQr={key:1,class:"flex items-center gap-2 text-sm theme-text-muted"},TQr={class:"flex-1 overflow-x-hidden overflow-y-auto theme-scrollbar p-6"},OQr={key:1,class:"flex justify-center items-center h-full theme-text-secondary"};function mQr(t,e,n,r,i,s){const o=Xe("SettingsSidebar");return k(),R("div",lQr,[te(o,{sections:i.sections,"active-section":i.activeSection,"onUpdate:activeSection":s.setActiveSection,class:"flex-shrink-0 w-64 border-r theme-border-primary theme-bg-secondary overflow-y-auto theme-scrollbar"},null,8,["sections","active-section","onUpdate:activeSection"]),b("div",cQr,[b("div",{class:ye(["sticky top-0 z-20 flex items-center justify-between p-3 gap-3 shadow-md theme-bg-secondary theme-border-b theme-border-primary",i.isLoading?"opacity-50 pointer-events-none":""])},[b("div",uQr,[i.settingsChanged&&!i.isLoading?(k(),R("div",dQr,e[6]||(e[6]=[b("i",{"data-feather":"alert-circle",class:"w-5 h-5"},null,-1),b("span",{class:"text-sm font-medium"},"Settings have changed",-1)]))):ne("",!0),!i.settingsChanged&&!i.isLoading?(k(),R("div",fQr,[b("button",{title:"Reset configuration to default",class:"icon-button theme-text-secondary hover:theme-text-primary",onClick:e[0]||(e[0]=a=>s.reset_configuration())},e[7]||(e[7]=[b("i",{"data-feather":"refresh-ccw"},null,-1)])),b("button",{title:"Restart program",class:"icon-button theme-text-secondary hover:theme-text-primary",onClick:e[1]||(e[1]=a=>s.restart_program())},e[8]||(e[8]=[b("i",{"data-feather":"power"},null,-1)])),b("button",{title:"Clear uploads folder",class:"icon-button theme-text-secondary hover:theme-text-danger",onClick:e[2]||(e[2]=a=>s.clear_uploads())},e[9]||(e[9]=[b("i",{"data-feather":"trash-2"},null,-1)])),i.has_updates?(k(),R("button",{key:0,title:"Upgrade program",class:"icon-button theme-text-success hover:theme-text-primary relative",onClick:e[3]||(e[3]=a=>s.update_software())},e[10]||(e[10]=[b("i",{"data-feather":"arrow-up-circle"},null,-1),b("span",{class:"absolute top-0 right-0 block h-2 w-2 rounded-full theme-bg-danger ring-2 theme-ring-bg"},null,-1)]))):ne("",!0)])):ne("",!0)]),i.settingsChanged&&!i.isLoading?(k(),R("div",hQr,[b("button",{class:"flex items-center gap-2 px-3 py-1.5 rounded theme-button-success duration-150 active:scale-95",title:"Apply changes",type:"button",onClick:e[4]||(e[4]=oe(a=>s.applyConfiguration(),["stop"]))},e[11]||(e[11]=[b("span",{class:"font-medium text-sm"},"Apply",-1),b("i",{"data-feather":"check",class:"w-4 h-4"},null,-1)])),b("button",{class:"flex items-center gap-2 px-3 py-1.5 rounded theme-button-danger duration-150 active:scale-95",title:"Cancel changes",type:"button",onClick:e[5]||(e[5]=oe(a=>s.cancelConfiguration(),["stop"]))},e[12]||(e[12]=[b("span",{class:"font-medium text-sm"},"Cancel",-1),b("i",{"data-feather":"x",class:"w-4 h-4"},null,-1)]))])):ne("",!0),i.isLoading?(k(),R("div",pQr,[b("span",null,ae(i.loading_text),1),e[13]||(e[13]=b("svg",{"aria-hidden":"true",class:"w-5 h-5 animate-spin theme-spinner-color",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),b("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)),e[14]||(e[14]=b("span",{class:"sr-only"},"Loading...",-1))])):ne("",!0)],2),b("main",TQr,[s.configToEdit?(k(),Qt(t7(s.currentComponent),{key:0,config:s.configToEdit,loading:i.isLoading,onSettingUpdated:s.handleSettingUpdated,api_get_req:s.api_get_req,api_post_req:s.api_post_req,show_toast:this.$store.state.toast.showToast,show_yes_no_dialog:this.$store.state.yesNoDialog.askQuestion,show_message_box:this.$store.state.messageBox.showMessage,client_id:t.$store.state.client_id,show_universal_form:this.$store.state.universalForm.showForm},null,40,["config","loading","onSettingUpdated","api_get_req","api_post_req","show_toast","show_yes_no_dialog","show_message_box","client_id","show_universal_form"])):(k(),R("div",OQr,e[15]||(e[15]=[b("p",null,"Loading configuration...",-1)])))])])])}const gQr=st(aQr,[["render",mQr],["__scopeId","data-v-ea18b7b2"]]),QQr={components:{ClipBoardTextInput:Eoe,Card:zC},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};Ae.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}}},_Qr={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"},vQr={class:"mb-4"},yQr=["value"],bQr={class:"mb-4"},SQr={class:"mb-4"},xQr={class:"mb-4"},EQr={class:"mb-4"},wQr={class:"mb-4"},CQr={class:"mb-4"},LQr={key:1};function $Qr(t,e,n,r,i,s){const o=Xe("Card"),a=Xe("ClipBoardTextInput");return s.selectedModel!==null&&s.selectedModel.toLowerCase().includes("gptq")?(k(),R("div",_Qr,[b("form",{onSubmit:e[2]||(e[2]=oe((...l)=>s.submitForm&&s.submitForm(...l),["prevent"])),class:""},[te(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[te(o,{title:"Model",class:"",isHorizontal:!1},{default:Ie(()=>[b("div",vQr,[e[3]||(e[3]=b("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),He(b("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>s.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>t.setModel&&t.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(k(!0),R(Ve,null,dt(s.models,l=>(k(),R("option",{key:l,value:l},ae(l),9,yQr))),128))],544),[[$s,s.selectedModel]])])]),_:1}),te(o,{title:"Data",isHorizontal:!1},{default:Ie(()=>[b("div",bQr,[e[4]||(e[4]=b("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1)),te(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),te(o,{title:"Training",isHorizontal:!1},{default:Ie(()=>[b("div",SQr,[e[5]||(e[5]=b("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1)),te(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),b("div",xQr,[e[6]||(e[6]=b("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1)),te(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),b("div",EQr,[e[7]||(e[7]=b("label",{for:"max_length",class:"text-sm"},"Max Length:",-1)),te(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),b("div",wQr,[e[8]||(e[8]=b("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1)),te(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),te(o,{title:"Output",isHorizontal:!1},{default:Ie(()=>[b("div",CQr,[e[9]||(e[9]=b("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1)),te(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),te(o,{disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>e[10]||(e[10]=[b("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1)])),_:1})],32)])):(k(),R("div",LQr,[te(o,{title:"Info",class:"",isHorizontal:!1},{default:Ie(()=>e[11]||(e[11]=[Se(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")])),_:1})]))}const AQr=st(QQr,[["render",$Qr]]),kQr={components:{ClipBoardTextInput:Eoe,Card:zC},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)}}},PQr={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"},RQr={class:"mb-4"},MQr={class:"mb-4"};function DQr(t,e,n,r,i,s){const o=Xe("ClipBoardTextInput"),a=Xe("Card");return k(),R("div",PQr,[b("form",{onSubmit:e[0]||(e[0]=oe((...l)=>s.submitForm&&s.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[te(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[te(a,{title:"Model",class:"",isHorizontal:!1},{default:Ie(()=>[b("div",RQr,[e[1]||(e[1]=b("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),te(o,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),b("div",MQr,[e[2]||(e[2]=b("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1)),te(o,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),te(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>e[3]||(e[3]=[b("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1)])),_:1})],32)])}const NQr=st(kQr,[["render",DQr]]),IQr={name:"WelcomeScreen",props:{isReady:{type:Boolean,required:!0},loadingProgress:{type:Number,required:!0},loadingInfos:{type:String,required:!0},versionInfo:{type:String,required:!0},interestingFacts:{type:Array,required:!0}},data(){return{randomFact:""}},computed:{...Pu(["config","theme_vars"]),appName(){var t,e;return((t=this.config)==null?void 0:t.app_custom_name)||((e=this.theme_vars)==null?void 0:e.lollms_title)||"LoLLMs"},appSlogan(){var t;return((t=this.config)==null?void 0:t.app_custom_slogan)||"One tool to rule them all"},shouldShowLollmsParagraphs(){var t;return!((t=this.config)!=null&&t.app_custom_name)},shouldShowLollmsFunFacts(){var t;return(t=this.config)==null?void 0:t.app_show_fun_facts}},methods:{updateRandomFact(){let t;if(this.interestingFacts.length<=1){this.randomFact=this.interestingFacts.length===1?this.interestingFacts[0]:"";return}do t=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];while(t===this.randomFact);this.randomFact=t}},mounted(){this.updateRandomFact()},watch:{interestingFacts:{handler(){this.updateRandomFact()},immediate:!0}}},HQr={key:0,class:"fixed inset-0 z-50 flex items-center justify-center overflow-hidden bg-gradient-welcome text-blue-800 dark:text-blue-100"},VQr={key:0,class:"absolute inset-0 pointer-events-none overflow-hidden opacity-70"},qQr={class:"relative z-10 flex w-full max-w-4xl flex-col items-center px-6 text-center"},UQr={class:"mb-10 w-full"},BQr={class:"lollms-title-style mb-3 text-5xl font-extrabold tracking-tight drop-shadow-md md:text-7xl transition-transform duration-300 hover:scale-[1.03]"},zQr={class:"text-xl italic md:text-2xl text-subtitle"},XQr={key:0,class:"mt-4 text-base text-author"},FQr={class:"mt-1 text-sm text-author"},jQr={class:"text-base text-blue-800 dark:text-blue-200"},YQr=["innerHTML"],GQr={class:"w-full max-w-lg"},WQr={class:"mb-3 h-3 w-full overflow-hidden rounded-full shadow-inner animated-progressbar-bg"},ZQr={role:"status",class:"w-full"},KQr={class:"text-2xl font-semibold text-progress"};function JQr(t,e,n,r,i,s){return k(),Qt(cr,{name:"fade-smooth"},{default:Ie(()=>[n.isReady?ne("",!0):(k(),R("div",HQr,[t.$store.state.theme_vars.activate_dropping_animation?(k(),R("div",VQr,[(k(),R(Ve,null,dt(60,o=>b("div",{key:o,class:"absolute animate-fall text-xs text-blue-300 dark:text-blue-500",style:qn({left:`${Math.random()*100}%`,top:"-30px",animationDuration:`${4+Math.random()*8}s`,animationDelay:`${Math.random()*6}s`,opacity:`${.3+Math.random()*.5}`})},ae(t.$store.state.theme_vars.falling_object||"·"),5)),64))])):ne("",!0),b("div",qQr,[b("div",UQr,[b("h1",BQr,ae(s.appName),1),b("p",zQr,ae(s.appSlogan),1),s.shouldShowLollmsParagraphs?(k(),R("p",XQr," by ParisNeo ")):ne("",!0),b("p",FQr,ae(n.versionInfo),1)]),s.shouldShowLollmsFunFacts&&i.randomFact?(k(),R("div",{key:0,class:"mb-8 w-full max-w-xl cursor-pointer rounded-lg border p-4 shadow-lg backdrop-blur-sm transition-all duration-300 card border-blue-300 dark:border-blue-600 hover:bg-blue-200 dark:hover:bg-blue-700 hover:border-blue-400 dark:hover:border-blue-500",onClick:e[0]||(e[0]=(...o)=>s.updateRandomFact&&s.updateRandomFact(...o))},[b("p",jQr,[e[1]||(e[1]=b("span",{class:"font-semibold text-blue-600 dark:text-blue-400"},"🤔 Fun Fact: ",-1)),b("span",{innerHTML:i.randomFact,class:"italic"},null,8,YQr)])])):ne("",!0),b("div",GQr,[b("div",WQr,[b("div",{class:"h-full rounded-full shadow-md transition-all duration-500 ease-out animated-progressbar-fg",style:qn({width:`${n.loadingProgress}%`})},null,4)]),b("div",ZQr,[(k(),R("p",{class:"mb-1 text-lg transition-opacity duration-300 text-loading",key:n.loadingInfos},ae(n.loadingInfos)+"... ",1)),b("p",KQr,ae(Math.round(n.loadingProgress))+"% ",1)])])])]))]),_:1})}const e_r=st(IQr,[["render",JQr]]),t_r={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked","toggle-star"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean,openfolder_enabled:Boolean,isStarred:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,editTitle:!1,newTitle:"",checkBoxValue_local:!1}},computed:{confirmTitle(){return this.editTitleMode?"Confirm title change":this.makeTitleMode?"Confirm title generation":this.deleteMode?"Confirm deletion":"Confirm"}},methods:{updateFeatherIcons(){Fe(()=>{Re.replace()})},resetModes(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.editTitle=!1},cancel(){this.resetModes(),this.newTitle=this.title,this.updateFeatherIcons()},confirmAction(){this.editTitleMode?this.editTitleEvent():this.makeTitleMode?this.makeTitleEvent():this.deleteMode&&this.deleteEvent(),this.updateFeatherIcons()},deleteEvent(){this.$emit("delete"),this.resetModes()},selectEvent(){!this.showConfirmation&&!this.isCheckbox&&this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.$emit("editTitle",{title:this.newTitle,id:this.id}),this.resetModes()},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.resetModes()},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",{id:e,checked:t.target.checked}),this.checkBoxValue_local=t.target.checked},toggleStarEvent(){this.$emit("toggle-star")}},mounted(){this.newTitle=this.title,this.checkBoxValue_local=this.checkBoxValue,this.updateFeatherIcons()},watch:{showConfirmation(){this.updateFeatherIcons()},isStarred(){this.updateFeatherIcons()},isCheckbox(){this.updateFeatherIcons()},editTitleMode(t){t&&(this.showConfirmation=!0,this.editTitle=!0,this.makeTitleMode=!1,this.deleteMode=!1,this.newTitle=this.title,Fe(()=>{var e;(e=this.$refs.titleBox)==null||e.focus()})),this.updateFeatherIcons()},makeTitleMode(t){t&&(this.showConfirmation=!0,this.editTitleMode=!1,this.deleteMode=!1,this.editTitle=!1),this.updateFeatherIcons()},deleteMode(t){t&&(this.showConfirmation=!0,this.editTitleMode=!1,this.makeTitleMode=!1,this.editTitle=!1),this.updateFeatherIcons()},checkBoxValue(t){this.checkBoxValue_local!==t&&(this.checkBoxValue_local=t)},title(t){this.editTitleMode||(this.newTitle=t)}}},n_r=["id"],r_r={class:"flex flex-row items-center gap-2 flex-shrink-0"},i_r={key:0},s_r={class:"flex flex-row items-center flex-grow overflow-hidden mx-1"},o_r=["title"],a_r=["value"],l_r={class:"absolute top-0 right-0 h-full flex items-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 z-10"},c_r={class:"discussion-toolbox flex items-center space-x-1 bg-white dark:bg-gray-800 p-1 mr-1 rounded shadow-lg border border-gray-200 dark:border-gray-700"},u_r={key:0,class:"flex gap-1 items-center"},d_r=["title"],f_r={key:1,class:"flex gap-1 items-center"},h_r=["title"];function p_r(t,e,n,r,i,s){return k(),R("div",{class:ye([n.selected?"discussion-hilighted":"discussion","m-1 py-2 flex flex-row sm:flex-row flex-wrap flex-shrink-0 items-center rounded-md duration-75 cursor-pointer relative group w-[15rem]"]),id:"dis-"+n.id,onClick:e[14]||(e[14]=oe(o=>s.selectEvent(),["stop"]))},[b("div",r_r,[n.isCheckbox?(k(),R("div",i_r,[He(b("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 ml-1",onClick:e[0]||(e[0]=oe(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>i.checkBoxValue_local=o),onChange:e[2]||(e[2]=o=>s.checkedChangeEvent(o,n.id))},null,544),[[W3,i.checkBoxValue_local]])])):ne("",!0),n.selected?(k(),R("div",{key:1,class:ye(["min-h-full w-1.5 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent":"bg-secondary"])},null,2)):ne("",!0),n.selected?ne("",!0):(k(),R("div",{key:2,class:ye(["w-1.5",n.loading?"min-h-full w-1.5 rounded-xl self-stretch animate-bounce bg-accent":""])},null,2))]),b("div",s_r,[i.editTitle?ne("",!0):(k(),R("p",{key:0,title:n.title,class:"line-clamp-1 w-full text-xs"},ae(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,o_r)),i.editTitle?(k(),R("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full p-1 text-xs",value:n.title,required:"",onKeydown:[e[3]||(e[3]=gr(oe(o=>s.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=gr(oe(o=>s.cancel(),["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>s.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=oe(()=>{},["stop"]))},null,40,a_r)):ne("",!0)]),b("div",l_r,[b("div",c_r,[i.showConfirmation?(k(),R("div",u_r,[b("button",{class:"p-1 rounded hover:bg-red-100 dark:hover:bg-red-900 text-red-600 dark:text-red-400 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[7]||(e[7]=oe(o=>s.cancel(),["stop"]))},e[15]||(e[15]=[b("i",{"data-feather":"x",class:"w-4 h-4"},null,-1)])),b("button",{class:"p-1 rounded hover:bg-green-100 dark:hover:bg-green-900 text-green-600 dark:text-green-400 duration-75 active:scale-90",title:s.confirmTitle,type:"button",onClick:e[8]||(e[8]=oe(o=>s.confirmAction(),["stop"]))},e[16]||(e[16]=[b("i",{"data-feather":"check",class:"w-4 h-4"},null,-1)]),8,d_r)])):ne("",!0),i.showConfirmation?ne("",!0):(k(),R("div",f_r,[b("button",{class:ye(["p-1 rounded duration-75 active:scale-90",n.isStarred?"text-yellow-500 hover:bg-yellow-100 dark:hover:bg-yellow-900":"text-gray-400 hover:text-yellow-500 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-yellow-400"]),title:n.isStarred?"Unstar discussion":"Star discussion",type:"button",onClick:e[9]||(e[9]=oe(o=>s.toggleStarEvent(),["stop"]))},[b("i",{"data-feather":"star",class:ye(["w-4 h-4",{"fill-current":n.isStarred}])},null,2)],10,h_r),n.openfolder_enabled?(k(),R("button",{key:0,class:"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400 hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[10]||(e[10]=oe(o=>s.openFolderEvent(),["stop"]))},e[17]||(e[17]=[b("i",{"data-feather":"folder",class:"w-4 h-4"},null,-1)]))):ne("",!0),b("button",{class:"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400 hover:text-secondary duration-75 active:scale-90",title:"Generate title",type:"button",onClick:e[11]||(e[11]=oe(o=>i.makeTitleMode=!0,["stop"]))},e[18]||(e[18]=[b("i",{"data-feather":"type",class:"w-4 h-4"},null,-1)])),b("button",{class:"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400 hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[12]||(e[12]=oe(o=>i.editTitleMode=!0,["stop"]))},e[19]||(e[19]=[b("i",{"data-feather":"edit-2",class:"w-4 h-4"},null,-1)])),b("button",{class:"p-1 rounded hover:bg-red-100 dark:hover:bg-red-900 text-red-600 dark:text-red-400 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[13]||(e[13]=oe(o=>i.deleteMode=!0,["stop"]))},e[20]||(e[20]=[b("i",{"data-feather":"trash",class:"w-4 h-4"},null,-1)]))]))])])],10,n_r)}const Voe=st(t_r,[["render",p_r],["__scopeId","data-v-3d6bc6d8"]]),T_r="/";Ae.defaults.baseURL="/";const O_r={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{UniversalForm:doe},data(){return{bUrl:T_r,isMounted:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},isActive(){return this.$store.state.mountedPers&&this.$store.state.config.active_personality_id===this.$store.state.config.personalities.findIndex(t=>t===this.$store.state.mountedPers.full_path)}},methods:{async handleOnTalk(){const t=this.mountedPers;if(!t){this.$store.state.toast.showToast("No personality mounted to talk with.",3,!1);return}console.log("Talking with:",t.name);try{let e=await Ae.get("/get_generation_status",{});if(e&&!e.data.status){const n=this.$store.state.config.personalities.findIndex(r=>r===t.full_path);if(n!==this.$store.state.config.active_personality_id){const r={client_id:this.$store.state.client_id,id:n};let i=await Ae.post("/select_personality",r);if(!i.data.status){console.error("Failed to select personality before talking:",i.data.error),this.$store.state.toast.showToast(`Error selecting ${t.name}: ${i.data.error}`,4,!1);return}this.$store.commit("setActivePersonalityId",n),this.$store.commit("setMountedPers",this.$store.state.personalities_infos[n])}console.log("Requesting generation from:",t.name),et.emit("generate_msg_from",{id:n})}else e?(console.log("Already generating"),this.$store.state.toast.showToast("Generation is already in progress.",3,!1)):(console.error("Could not get generation status."),this.$store.state.toast.showToast("Error checking generation status.",4,!1))}catch(e){console.error("Error during handleOnTalk:",e),this.$store.state.toast.showToast(`Error initiating talk: ${e.message}`,4,!1)}finally{}},async remount_personality(){var e;const t=this.mountedPers;if(!t)return this.$store.state.toast.showToast("No personality mounted to remount.",3,!1),{status:!1,error:"no personality selected"};console.log("Remounting personality ",t.name),this.$store.state.toast.showToast(`Remounting ${t.name}...`,4,!0);try{const n={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language},r=await Ae.post("/remount_personality",n);if(r&&r.data.status)return console.log("Personality remounted successfully:",r.data),this.$store.state.toast.showToast(`${t.name} remounted successfully!`,4,!0),this.$store.dispatch("refreshPersonalityData"),r.data;{const i=((e=r==null?void 0:r.data)==null?void 0:e.error)||"Unknown error";return console.error("Failed remount_personality:",i),this.$store.state.toast.showToast(`Failed to remount ${t.name}: ${i}`,4,!1),(r==null?void 0:r.data)||{status:!1,error:i}}}catch(n){return console.error("Error during remount_personality:",n),this.$store.state.toast.showToast(`Error remounting: ${n.message}`,4,!1),{status:!1,error:n.message}}},async onSettingsPersonality(t){var e;if(!t){this.$store.state.toast.showToast("No personality selected for settings.",3,!1);return}console.log("Opening settings for:",t.name);try{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path);if(n!==this.$store.state.config.active_personality_id){const i={client_id:this.$store.state.client_id,id:n};let s=await Ae.post("/select_personality",i);if(!s.data.status){console.error("Failed to select personality before opening settings:",s.data.error),this.$store.state.toast.showToast(`Error selecting ${t.name} for settings: ${s.data.error}`,4,!1);return}this.$store.commit("setActivePersonalityId",n),this.$store.commit("setMountedPers",this.$store.state.personalities_infos[n]),await Fe()}const r=await Ae.get("/get_active_personality_settings");if(r&&r.data&&Object.keys(r.data).length>0){console.log("Personality settings data:",r.data);const i=await this.$refs.universalForm.showForm(r.data,`Settings - ${t.name}`,"Save changes","Cancel");if(i){console.log("Saving new settings:",i);try{const s=await Ae.post("/set_active_personality_settings",i);if(s&&s.data&&s.data.status)console.log("Settings saved successfully:",s.data),this.$store.state.toast.showToast("Personality settings updated successfully!",4,!0);else{const o=((e=s==null?void 0:s.data)==null?void 0:e.error)||"Unknown error saving settings.";console.error("Failed to save settings:",o),this.$store.state.toast.showToast(`Failed to save settings: ${o}`,4,!1)}}catch(s){console.error("Error saving personality settings:",s),this.$store.state.toast.showToast(`Error saving settings: ${s.message}`,4,!1)}}else console.log("Settings editing cancelled.")}else r&&r.data&&Object.keys(r.data).length===0?this.$store.state.toast.showToast(`${t.name} has no configurable settings.`,4,!1):(console.error("Could not get personality settings response:",r),this.$store.state.toast.showToast("Failed to retrieve personality settings.",4,!1))}catch(n){console.error("Error fetching/showing personality settings:",n),this.$store.state.toast.showToast(`Could not open settings: ${n.message}`,4,!1)}},async constructor(){for(Fe(()=>{Re.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady&&this.onReady()},personalityImgPlacehodler(t){t.target.src=Mh}}},m_r={class:"relative group/item"},g_r=["title"],Q_r=["src","alt"],__r={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-auto flex items-center justify-center space-x-1 opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 p-2 rounded-md shadow-lg bg-white dark:bg-gray-800 ring-1 ring-black ring-opacity-5 z-10"};function v_r(t,e,n,r,i,s){const o=Xe("UniversalForm");return k(),R(Ve,null,[b("div",m_r,[b("button",{onClick:e[1]||(e[1]=oe(a=>s.onSettingsPersonality(s.mountedPers),["prevent"])),class:ye(["w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none relative",{"glow-effect":t.$store.state.config.activate_skills_lib,"border-2 border-primary":s.isActive}]),title:"Configure "+s.mountedPers.name},[b("img",{src:s.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>s.personalityImgPlacehodler&&s.personalityImgPlacehodler(...a)),alt:s.mountedPers.name,class:"w-full h-full object-cover"},null,40,Q_r)],10,g_r),b("div",__r,[b("button",{onClick:e[2]||(e[2]=oe(a=>s.onSettingsPersonality(s.mountedPers),["prevent"])),class:"p-1 btn-secondary btn-xs rounded-full hover:scale-110 transition-transform duration-150",title:"Configure"},e[5]||(e[5]=[b("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[b("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826 3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),b("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])),b("button",{onClick:e[3]||(e[3]=oe(a=>s.remount_personality(),["prevent"])),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none btn-xs hover:scale-110 transition-transform duration-150",title:"Remount"},e[6]||(e[6]=[b("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[b("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)])),b("button",{onClick:e[4]||(e[4]=oe(a=>s.handleOnTalk(),["prevent"])),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none btn-xs hover:scale-110 transition-transform duration-150",title:"Talk"},e[7]||(e[7]=[b("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[b("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)]))])]),te(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const y_r=st(O_r,[["render",v_r],["__scopeId","data-v-5f8375f1"]]),b_r={name:"HoverMenu",props:{items:{type:Array,required:!0},isActive:{type:Function,default:()=>!1},itemKeyExtractor:{type:Function,default:t=>t.id||t.name},itemNameExtractor:{type:Function,default:t=>t.name},itemIconExtractor:{type:Function,required:!0},placeholderIcon:{type:String,required:!0},searchPlaceholder:{type:String,default:"Search..."},menuWidthClass:{type:String,default:"w-80"},gridLayoutClass:{type:String,default:"grid grid-cols-3 gap-x-4 gap-y-4"},activeItemClass:{type:String,default:"border-blue-500 dark:border-sky-500"}},emits:["select-item"],data(){return{isMenuVisible:!1,searchQuery:"",hideMenuTimeout:null}},computed:{filteredItems(){const t=this.searchQuery.toLowerCase().trim();return t?this.items.filter(e=>{var n;return(n=this.getItemName(e))==null?void 0:n.toLowerCase().includes(t)}):this.items}},methods:{getItemKey(t){return this.itemKeyExtractor(t)},getItemName(t){return this.itemNameExtractor(t)},getItemIcon(t){return this.itemIconExtractor(t)||this.placeholderIcon},showMenu(){clearTimeout(this.hideMenuTimeout),this.isMenuVisible=!0,this.$nextTick(()=>Re.replace())},hideMenu(){this.hideMenuTimeout=setTimeout(()=>{this.isMenuVisible=!1},300)},selectItem(t){this.$emit("select-item",t)}},mounted(){Fe(()=>Re.replace())},updated(){this.isMenuVisible&&Fe(()=>Re.replace())}},S_r={class:"p-2 border-b border-blue-200 dark:border-slate-700"},x_r=["placeholder"],E_r=["onClick","title"],w_r=["src","alt"],C_r={class:"animated-thought-bubble text-center"},L_r=["onClick"],$_r={key:0,class:"col-span-full text-center text-gray-500 dark:text-gray-400 py-4"};function A_r(t,e,n,r,i,s){return k(),R("div",{class:"relative",onMouseleave:e[3]||(e[3]=(...o)=>s.hideMenu&&s.hideMenu(...o))},[b("div",{onMouseenter:e[0]||(e[0]=(...o)=>s.showMenu&&s.showMenu(...o)),class:"hover-trigger flex items-center justify-center w-8 h-8"},[er(t.$slots,"trigger",{},void 0,!0)],32),te(cr,{name:"fade-and-fly"},{default:Ie(()=>[He(b("div",{onMouseenter:e[2]||(e[2]=(...o)=>s.showMenu&&s.showMenu(...o)),class:ye(["absolute top-full left-0 mt-1 z-50 transform panels-color rounded-md shadow-lg ring-1 ring-blue-300 dark:ring-slate-700 ring-opacity-50 focus:outline-none",n.menuWidthClass])},[b("div",S_r,[He(b("input",{type:"text","onUpdate:modelValue":e[1]||(e[1]=o=>i.searchQuery=o),placeholder:n.searchPlaceholder,class:"w-full input input-sm"},null,8,x_r),[[vt,i.searchQuery]])]),b("div",{class:ye(["px-4 py-3 pb-10 max-h-80 overflow-y-auto scrollbar",n.gridLayoutClass])},[(k(!0),R(Ve,null,dt(s.filteredItems,o=>(k(),R("div",{key:s.getItemKey(o),class:"relative group/item flex flex-col items-center"},[b("button",{onClick:oe(a=>s.selectItem(o),["prevent"]),title:s.getItemName(o),class:ye(["w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none border-2 mb-1",n.isActive(o)?n.activeItemClass:"border-transparent hover:border-blue-300 dark:hover:border-slate-600"])},[b("img",{src:s.getItemIcon(o),alt:s.getItemName(o),class:"w-full h-full object-cover"},null,8,w_r)],10,E_r),b("div",C_r,[b("span",{class:"text-xs font-medium mb-1 block cursor-pointer",onClick:oe(a=>s.selectItem(o),["prevent"])},ae(s.getItemName(o)),9,L_r),er(t.$slots,"item-actions",{item:o},void 0,!0)])]))),128)),s.filteredItems.length===0?(k(),R("div",$_r," No items found. ")):ne("",!0)],2)],34),[[mr,i.isMenuVisible]])]),_:3})],32)}const k_r=st(b_r,[["render",A_r],["__scopeId","data-v-9178f2bc"]]),P_r={name:"Toolbar",components:{MountedPersonalities:y_r,HoverMenu:k_r},props:{loading:Boolean,isCheckbox:Boolean},emits:["create-new-discussion","add-discussion-to-skills-library","toggle-skills-lib","show-skills-lib","toggle-edit-mode","reset-database","export-database","import-discussions","import-discussions-bundle","show-model-config","set-binding","copy-model-name","set-model","personality-selected","unmount-personality","remount-personality","talk-personality","personalities-ready","show-personality-list"],data(){return{isSkillsLibraryMenuVisible:!1,isMainMenuVisible:!1,modelImgPlaceholder:F9,hideMainMenuTimeout:null,hideSkillsLibraryMenuTimeout:null}},computed:{...Pu(["config","installedBindings","installedModels","mountedPersArr"]),...oE(["getCurrentBinding","getCurrentModel"]),currentBinding(){return this.getCurrentBinding||{name:"unknown",icon:this.modelImgPlaceholder}},currentModel(){return this.getCurrentModel||{name:"unknown",icon:this.modelImgPlaceholder}},currentBindingName(){var t;return(t=this.currentBinding)==null?void 0:t.name},currentModelName(){var t;return(t=this.currentModel)==null?void 0:t.name},currentBindingIcon(){var t;return((t=this.currentBinding)==null?void 0:t.icon)||this.modelImgPlaceholder},currentModelIcon(){var t;return((t=this.currentModel)==null?void 0:t.icon)||this.modelImgPlaceholder},activePersonalityId(){var t;return(t=this.$store.state.config)==null?void 0:t.active_personality_id},configPersonalities(){var t;return((t=this.$store.state.config)==null?void 0:t.personalities)||[]}},methods:{isActivePersonality(t){if(this.activePersonalityId===void 0||this.activePersonalityId<0||this.activePersonalityId>=this.configPersonalities.length||!(t!=null&&t.full_path))return!1;const e=this.configPersonalities[this.activePersonalityId];return t.full_path===e||t.full_path===(e==null?void 0:e.split(":")[0])},onPersonalitiesReadyFun(){this.$emit("personalities-ready")},onShowPersListFun(){this.$emit("show-personality-list")},triggerFileDialog(t){this.$refs[t]&&(this.$refs[t].value=null,this.$refs[t].click())},showSkillsLibraryMenu(){clearTimeout(this.hideSkillsLibraryMenuTimeout),this.isSkillsLibraryMenuVisible=!0,this.$nextTick(()=>Re.replace())},hideSkillsLibraryMenu(){this.hideSkillsLibraryMenuTimeout=setTimeout(()=>{this.isSkillsLibraryMenuVisible=!1},300)},showMainMenu(){clearTimeout(this.hideMainMenuTimeout),this.isMainMenuVisible=!0,this.$nextTick(()=>Re.replace())},hideMainMenu(){this.hideMainMenuTimeout=setTimeout(()=>{this.isMainMenuVisible=!1},300)}},mounted(){Fe(()=>{Re.replace()})},updated(){Fe(()=>{Re.replace()})}},R_r={class:"toolbar-color flex items-center p-1 justify-around"},M_r={key:0,class:"toolbar-container flex items-center gap-1 relative"},D_r={class:"relative"},N_r={class:"relative"},I_r=["title"],H_r=["src","alt"],V_r={class:"flex space-x-1 justify-center"},q_r=["onClick"],U_r=["title"],B_r=["src","alt"],z_r={class:"flex space-x-1 justify-center"},X_r=["onClick"],F_r={class:"personalities-hover-area flex items-center justify-center w-8 h-8"},j_r={class:"flex space-x-1 justify-center"},Y_r=["onClick"],G_r=["onClick"],W_r=["onClick"],Z_r={key:1,class:"flex items-center justify-center w-full h-10"};function K_r(t,e,n,r,i,s){const o=Xe("HoverMenu"),a=Xe("MountedPersonalities");return k(),R("div",R_r,[n.loading?(k(),R("div",Z_r,e[40]||(e[40]=[b("div",{class:"text-gray-500"},"Buzzy...",-1)]))):(k(),R("div",M_r,[b("button",{class:"toolbar-button svg-button",title:"Create new discussion",onClick:e[0]||(e[0]=l=>t.$emit("create-new-discussion"))},e[23]||(e[23]=[b("i",{"data-feather":"plus",class:"w-5 h-5"},null,-1)])),n.loading?ne("",!0):(k(),R("div",{key:0,class:"relative",onMouseleave:e[7]||(e[7]=(...l)=>s.hideSkillsLibraryMenu&&s.hideSkillsLibraryMenu(...l))},[b("div",{onMouseenter:e[1]||(e[1]=(...l)=>s.showSkillsLibraryMenu&&s.showSkillsLibraryMenu(...l)),class:"menu-hover-area flex items-center justify-center w-8 h-8"},e[24]||(e[24]=[b("button",{class:"toolbar-button svg-button",title:"Toggle Skills library menu"},[b("svg",{class:"w-5 h-5",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[b("path",{d:"M4 4v16h16V4H4zm2 2h12v12H6V6zm2 2h2v8H8V8zm3 0h2v8h-2V8zm3 0h2v8h-2V8z",fill:"currentColor"})])],-1)]),32),te(cr,{name:"fade-and-fly"},{default:Ie(()=>[He(b("div",{onMouseenter:e[6]||(e[6]=(...l)=>s.showSkillsLibraryMenu&&s.showSkillsLibraryMenu(...l)),class:"absolute top-full left-0 mt-1 z-50 transform card p-1 flex flex-wrap gap-1 items-center shadow-lg w-auto min-w-[10rem]"},[b("button",{type:"button",onClick:e[2]||(e[2]=oe(l=>t.$emit("add-discussion-to-skills-library"),["stop"])),title:"Add this discussion content to skills database",class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300"},e[25]||(e[25]=[b("i",{"data-feather":"plus",class:"w-5 h-5"},null,-1)])),t.$store.state.config.activate_skills_lib?(k(),R("button",{key:0,type:"button",onClick:e[3]||(e[3]=oe(l=>t.$emit("toggle-skills-lib"),["stop"])),title:"Skills database is activated",class:"svg-button text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-200"},e[26]||(e[26]=[b("i",{"data-feather":"check-circle",class:"w-5 h-5"},null,-1)]))):(k(),R("button",{key:1,type:"button",onClick:e[4]||(e[4]=oe(l=>t.$emit("toggle-skills-lib"),["stop"])),title:"Skills database is deactivated",class:"svg-button text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200"},e[27]||(e[27]=[b("i",{"data-feather":"x-octagon",class:"w-5 h-5"},null,-1)]))),b("button",{type:"button",onClick:e[5]||(e[5]=oe(l=>t.$emit("show-skills-lib"),["stop"])),title:"Show Skills database",class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300"},e[28]||(e[28]=[b("i",{"data-feather":"book",class:"w-5 h-5"},null,-1)]))],544),[[mr,i.isSkillsLibraryMenuVisible]])]),_:1})],32)),n.loading?ne("",!0):(k(),R("div",{key:1,class:"relative",onMouseleave:e[17]||(e[17]=(...l)=>s.hideMainMenu&&s.hideMainMenu(...l))},[b("div",{onMouseenter:e[8]||(e[8]=(...l)=>s.showMainMenu&&s.showMainMenu(...l)),class:"menu-hover-area flex items-center justify-center w-8 h-8"},e[29]||(e[29]=[b("button",{class:"toolbar-button svg-button",title:"Toggle menu"},[b("i",{"data-feather":"menu",class:"w-5 h-5"})],-1)]),32),te(cr,{name:"fade-and-fly"},{default:Ie(()=>[He(b("div",{onMouseenter:e[16]||(e[16]=(...l)=>s.showMainMenu&&s.showMainMenu(...l)),class:"absolute top-full left-0 mt-1 z-50 transform card p-1 flex flex-wrap gap-1 items-center shadow-lg w-auto min-w-[10rem]"},[b("button",{class:ye(["svg-button",n.isCheckbox?"text-blue-600 dark:text-sky-400 bg-blue-200 dark:bg-slate-700":"text-gray-600 dark:text-gray-300"]),title:"Edit discussion list",type:"button",onClick:e[9]||(e[9]=l=>t.$emit("toggle-edit-mode"))},e[30]||(e[30]=[b("i",{"data-feather":"check-square",class:"w-5 h-5"},null,-1)]),2),b("button",{class:"svg-button text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200",title:"Reset database, remove all discussions",onClick:e[10]||(e[10]=oe(l=>t.$emit("reset-database"),["stop"]))},e[31]||(e[31]=[b("i",{"data-feather":"trash-2",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300",title:"Export database",type:"button",onClick:e[11]||(e[11]=oe(l=>t.$emit("export-database"),["stop"]))},e[32]||(e[32]=[b("i",{"data-feather":"database",class:"w-5 h-5"},null,-1)])),b("div",D_r,[b("input",{type:"file",ref:"fileDialog",class:"hidden",onChange:e[12]||(e[12]=l=>t.$emit("import-discussions",l)),accept:".json, .yaml, .yml"},null,544),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300 rotate-90",title:"Import discussions",type:"button",onClick:e[13]||(e[13]=oe(l=>s.triggerFileDialog("fileDialog"),["stop"]))},e[33]||(e[33]=[b("i",{"data-feather":"log-in",class:"w-5 h-5"},null,-1)]))]),b("div",N_r,[b("input",{type:"file",ref:"bundleLoadingDialog",class:"hidden",onChange:e[14]||(e[14]=l=>t.$emit("import-discussions-bundle",l)),accept:".zip"},null,544),b("button",{title:"Import discussion bundle",onClick:e[15]||(e[15]=oe(l=>s.triggerFileDialog("bundleLoadingDialog"),["stop"])),class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300"},e[34]||(e[34]=[b("i",{"data-feather":"folder",class:"w-5 h-5"},null,-1)]))])],544),[[mr,i.isMainMenuVisible]])]),_:1})],32)),!n.loading&&t.installedBindings.length>0?(k(),Qt(o,{key:2,items:t.installedBindings,"item-name-extractor":l=>l.name,"item-icon-extractor":l=>l.icon,"is-active":l=>l.name===s.currentBindingName,"placeholder-icon":i.modelImgPlaceholder,"search-placeholder":"Search bindings...",onSelectItem:e[19]||(e[19]=l=>t.$emit("set-binding",l))},{trigger:Ie(()=>[b("button",{onClick:e[18]||(e[18]=oe(l=>t.$emit("show-model-config",null),["prevent"])),class:"w-6 h-6 block",title:s.currentBinding?s.currentBinding.name:"unknown"},[b("img",{src:s.currentBindingIcon,class:"w-full h-full rounded-full object-cover border-2 border-blue-300 dark:border-slate-600 active:scale-90 hover:border-blue-500 dark:hover:border-sky-400 hover:scale-110 hover:-translate-y-1 duration-200 transition-transform",alt:s.currentBinding?s.currentBinding.name:"Binding icon"},null,8,H_r)],8,I_r)]),"item-actions":Ie(({item:l})=>[b("div",V_r,[b("button",{onClick:oe(c=>t.$emit("show-model-config",l),["prevent"]),class:"p-1 btn-secondary btn-sm rounded-full hover:scale-110 transition-transform duration-150",title:"Configure Binding"},e[35]||(e[35]=[b("i",{"data-feather":"settings",class:"w-3 h-3"},null,-1)]),8,q_r)])]),_:1},8,["items","item-name-extractor","item-icon-extractor","is-active","placeholder-icon"])):ne("",!0),!n.loading&&t.installedModels.length>0?(k(),Qt(o,{key:3,items:t.installedModels,"item-name-extractor":l=>l.name,"item-icon-extractor":l=>l.icon,"is-active":l=>l.name===s.currentModelName,"placeholder-icon":i.modelImgPlaceholder,"search-placeholder":"Search models...",onSelectItem:e[21]||(e[21]=l=>t.$emit("set-model",l))},{trigger:Ie(()=>[b("button",{onClick:e[20]||(e[20]=oe(l=>t.$emit("copy-model-name",null),["prevent"])),class:"w-6 h-6 block",title:s.currentModel?s.currentModel.name:"unknown"},[b("img",{src:s.currentModelIcon,class:"w-full h-full rounded-full object-cover border-2 border-blue-300 dark:border-slate-600 active:scale-90 hover:border-blue-500 dark:hover:border-sky-400 hover:scale-110 hover:-translate-y-1 duration-200 transition-transform",alt:s.currentModel?s.currentModel.name:"Model icon"},null,8,B_r)],8,U_r)]),"item-actions":Ie(({item:l})=>[b("div",z_r,[b("button",{onClick:oe(c=>t.$emit("copy-model-name",l),["prevent"]),class:"p-1 btn-secondary btn-sm rounded-full hover:scale-110 transition-transform duration-150",title:"Copy Model Name"},e[36]||(e[36]=[b("i",{"data-feather":"copy",class:"w-3 h-3"},null,-1)]),8,X_r)])]),_:1},8,["items","item-name-extractor","item-icon-extractor","is-active","placeholder-icon"])):ne("",!0),!n.loading&&t.mountedPersArr.length>0?(k(),Qt(o,{key:4,items:t.mountedPersArr,"item-name-extractor":l=>l.name,"item-icon-extractor":l=>l.avatar,"item-key-extractor":l=>l.full_path||l.name,"is-active":s.isActivePersonality,"placeholder-icon":i.modelImgPlaceholder,"search-placeholder":"Search personalities...",onSelectItem:e[22]||(e[22]=l=>t.$emit("personality-selected",l))},{trigger:Ie(()=>[b("div",F_r,[te(a,{ref:"mountedPers",onShowPersList:s.onShowPersListFun,onReady:s.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])])]),"item-actions":Ie(({item:l})=>[b("div",j_r,[b("button",{onClick:oe(c=>t.$emit("unmount-personality",l),["prevent"]),class:"p-1 bg-red-500 rounded-full text-white hover:bg-red-600 focus:outline-none btn-sm hover:scale-110 transition-transform duration-150",title:"Unmount"},e[37]||(e[37]=[b("i",{"data-feather":"x",class:"w-3 h-3"},null,-1)]),8,Y_r),b("button",{onClick:oe(c=>t.$emit("remount-personality",l),["prevent"]),class:"p-1 btn-secondary btn-sm rounded-full hover:scale-110 transition-transform duration-150",title:"Remount"},e[38]||(e[38]=[b("i",{"data-feather":"refresh-cw",class:"w-3 h-3"},null,-1)]),8,G_r),b("button",{onClick:oe(c=>t.$emit("talk-personality",l),["prevent"]),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none btn-sm hover:scale-110 transition-transform duration-150",title:"Talk"},e[39]||(e[39]=[b("i",{"data-feather":"message-square",class:"w-3 h-3"},null,-1)]),8,W_r)])]),_:1},8,["items","item-name-extractor","item-icon-extractor","item-key-extractor","is-active","placeholder-icon"])):ne("",!0)]))])}const J_r=st(P_r,[["render",K_r],["__scopeId","data-v-66615957"]]),evr=t=>{const e=new Date;return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()},tvr=t=>{const e=new Date;return e.setDate(e.getDate()-1),t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()},nvr={name:"LeftPanel",components:{Discussion:Voe,RouterLink:t9,Toolbar:J_r},props:{showLeftPanel:Boolean,discussionsList:Array,currentDiscussion:Object,toolbarLoading:Boolean,formattedDatabaseName:String},emits:["select-discussion","delete-discussion","open-folder","edit-title","make-title","create-new-discussion","add-discussion-to-skills-library","toggle-skills-lib","show-skills-lib","reset-database","export-database","import-discussions","import-discussions-bundle","show-model-config","set-binding","copy-model-name","set-model","personality-selected","unmount-personality","remount-personality","talk-personality","personalities-ready","show-personality-list","delete-selected","export-discussions-as-json","export-discussions-to-folder","export-discussions-as-markdown","show-database-selector","import-discussion-file","toggle-star-discussion"],data(){return{filterTitle:"",filterInProgress:!1,isCheckbox:!1,showConfirmation:!1,isDragOverDiscussion:!1,searchTimeout:null,localDiscussionsState:[],sortBy:"date",sortOrder:"desc",collapsedSections:{starred:!1,today:!1,yesterday:!0,older:!0}}},computed:{...Pu(["config","theme_vars"]),...oE(["getStarredDiscussionsSet"]),logoSrc(){var t;return(t=this.config)!=null&&t.app_custom_logo?`/user_infos/${this.config.app_custom_logo}`:Eo},logoTitle(){var t;return((t=this.config)==null?void 0:t.app_custom_name)||"LoLLMs WebUI"},appName(){var t;return((t=this.config)==null?void 0:t.app_custom_name)||"LoLLMS WebUI"},appSlogan(){var t;return((t=this.config)==null?void 0:t.app_custom_slogan)||"One tool to rule them all"},starredSet(){return this.getStarredDiscussionsSet||new Set},sortIcon(){return this.sortOrder==="asc"?"arrow-up":"arrow-down"},sortByLabel(){return{date:"Date",title:"Title"}[this.sortBy]||"Date"},enhancedDiscussions(){return(this.discussionsList||[]).map(t=>{const e=this.localDiscussionsState.find(r=>r.id===t.id),n=t.created_at?new Date(t.created_at):new Date(0);return{...t,checkBoxValue:e?e.checkBoxValue:!1,isStarred:this.starredSet.has(String(t.id)),creationDate:n}})},filteredDiscussions(){if(!this.filterTitle.trim())return this.enhancedDiscussions;const t=this.filterTitle.toLowerCase();return this.enhancedDiscussions.filter(e=>e.title&&e.title.toLowerCase().includes(t))},groupedDiscussions(){const t=[],e=[],n=[],r=[];this.enhancedDiscussions.filter(a=>{if(!this.filterTitle.trim())return!0;const l=this.filterTitle.toLowerCase();return a.title&&a.title.toLowerCase().includes(l)}).forEach(a=>{if(a.isStarred)t.push(a);else{const l=a.creationDate;evr(l)?e.push(a):tvr(l)?n.push(a):r.push(a)}});const s=(a,l)=>{let c=0;this.sortBy==="date"?c=l.creationDate-a.creationDate:this.sortBy==="title"&&(c=(a.title||"").localeCompare(l.title||""));const u=this.sortBy==="date"&&this.sortOrder==="asc"||this.sortBy==="title"&&this.sortOrder==="desc"?-1:1;return c*u};t.sort(s),e.sort(s),n.sort(s),r.sort(s);const o=[];return t.length>0&&(o.push({type:"header",label:"Starred",key:"starred",collapsed:this.collapsedSections.starred}),this.collapsedSections.starred||t.forEach(a=>o.push({type:"discussion",data:a,key:`disc-${a.id}`}))),e.length>0&&(o.push({type:"header",label:"Today",key:"today",collapsed:this.collapsedSections.today}),this.collapsedSections.today||e.forEach(a=>o.push({type:"discussion",data:a,key:`disc-${a.id}`}))),n.length>0&&(o.push({type:"header",label:"Yesterday",key:"yesterday",collapsed:this.collapsedSections.yesterday}),this.collapsedSections.yesterday||n.forEach(a=>o.push({type:"discussion",data:a,key:`disc-${a.id}`}))),r.length>0&&(o.push({type:"header",label:"Older",key:"older",collapsed:this.collapsedSections.older}),this.collapsedSections.older||r.forEach(a=>o.push({type:"discussion",data:a,key:`disc-${a.id}`}))),o},selectedDiscussions(){return this.filteredDiscussions.filter(t=>{const e=this.localDiscussionsState.find(n=>n.id===t.id);return e&&e.checkBoxValue})},isAllSelected(){const t=this.filteredDiscussions;if(t.length===0)return!1;const e=new Set(this.selectedDiscussions.map(n=>n.id));return t.every(n=>e.has(n.id))}},methods:{toggleSection(t){t in this.collapsedSections&&(this.collapsedSections[t]=!this.collapsedSections[t],this.$nextTick(()=>Re.replace()))},handleSearchInput(){this.filterInProgress=!0,clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.filterInProgress=!1,this.$nextTick(()=>Re.replace())},300)},cycleSortOrder(){this.sortOrder=this.sortOrder==="asc"?"desc":"asc",this.$nextTick(()=>Re.replace())},cycleSortBy(){this.sortBy=this.sortBy==="date"?"title":"date",this.$nextTick(()=>Re.replace())},selectDiscussion(t){this.toolbarLoading||this.filterInProgress||this.$emit("select-discussion",t)},deleteDiscussion(t){this.localDiscussionsState=this.localDiscussionsState.filter(e=>e.id!==t.id),this.$emit("delete-discussion",t.id)},checkUncheckDiscussion({id:t,checked:e}){const n=this.localDiscussionsState.findIndex(r=>r.id===t);n!==-1?this.localDiscussionsState[n].checkBoxValue=e:this.discussionsList.some(r=>r.id===t)&&this.localDiscussionsState.push({id:t,checkBoxValue:e})},selectAllDiscussions(){const t=!this.isAllSelected,e=new Set(this.filteredDiscussions.map(n=>n.id));this.enhancedDiscussions.forEach(n=>{if(e.has(n.id)){const r=this.localDiscussionsState.findIndex(i=>i.id===n.id);r!==-1?this.localDiscussionsState[r].checkBoxValue=t:t&&this.localDiscussionsState.push({id:n.id,checkBoxValue:t})}}),this.$nextTick(()=>Re.replace())},deleteSelectedDiscussions(){const t=this.selectedDiscussions.map(e=>e.id);this.localDiscussionsState=this.localDiscussionsState.filter(e=>!t.includes(e.id)),this.$emit("delete-selected",t),this.showConfirmation=!1,this.isCheckbox=!1},handleDrop(t){this.isDragOverDiscussion=!1;const e=t.dataTransfer.files;e.length===1&&e[0].type==="application/json"?this.$emit("import-discussion-file",e[0]):alert("Please drop a single JSON file to import.")},toggleStarDiscussion(t){this.$emit("toggle-star-discussion",t)},toggleStarSelectedDiscussions(){const t=this.selectedDiscussions;if(t.length===0)return;const e=t.length>0?!t[0].isStarred:!0;t.forEach(n=>{n.isStarred!==e&&this.toggleStarDiscussion(n)})},syncLocalState(t){const e=new Set((t||[]).map(r=>r.id)),n=this.localDiscussionsState.filter(r=>e.has(r.id));(t||[]).forEach(r=>{n.some(i=>i.id===r.id)||n.push({id:r.id,checkBoxValue:!1})}),this.localDiscussionsState=n}},watch:{discussionsList:{handler(t,e){JSON.stringify(t)!==JSON.stringify(e)&&this.syncLocalState(t),this.$nextTick(()=>Re.replace())},immediate:!0,deep:!0},isCheckbox(t){this.$nextTick(()=>Re.replace()),t||(this.showConfirmation=!1)},showConfirmation(){this.$nextTick(()=>Re.replace())},filterTitle(){},sortBy(){this.$nextTick(()=>Re.replace())},sortOrder(){this.$nextTick(()=>Re.replace())}},mounted(){this.syncLocalState(this.discussionsList),Fe(()=>{Re.replace()})},updated(){}},rvr={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-[16rem] panels-color scrollbar h-full"},ivr={class:"logo-container w-12 h-12 flex-shrink-0"},svr=["src","title"],ovr={class:"flex flex-col justify-center overflow-hidden"},avr={class:"text-left p-1"},lvr={class:"text-md relative inline-block"},cvr={class:"relative inline-block font-bold tracking-wide text-blue-800 dark:text-blue-100 text-gradient-title truncate"},uvr={class:"text-blue-600 dark:text-blue-400 text-sm text-subtitle truncate"},dvr={class:"w-full max-w-md mx-auto p-2 border-b border-blue-100 dark:border-blue-800"},fvr={class:"flex items-center space-x-1"},hvr={class:"relative flex-grow"},pvr=["title"],Tvr=["data-feather"],Ovr=["title"],mvr=["data-feather"],gvr={key:0,class:"w-full p-2 bg-blue-100 dark:bg-blue-900 border-b border-blue-200 dark:border-blue-700"},Qvr={class:"flex flex-col space-y-1"},_vr={key:0,class:"text-sm text-blue-700 dark:text-blue-200"},vvr={key:1,class:"flex space-x-1 items-center"},yvr={key:1,class:"flex space-x-1 items-center"},bvr={class:"flex space-x-1 items-center"},Svr=["data-feather"],xvr={class:"relative flex flex-col flex-grow mb-10 z-0 w-full"},Evr=["onClick"],wvr=["data-feather"],Cvr={key:0,class:"p-4 text-center text-blue-600 dark:text-blue-400"},Lvr={key:0,class:"text-sm"},$vr={key:1,class:"p-4 text-center text-blue-500 dark:text-blue-400"},Avr={class:"flex flex-row items-center justify-center border-t border-blue-200 dark:border-blue-700 p-1"},kvr={class:"text-center font-semibold text-xs drop-shadow-md align-middle text-blue-700 dark:text-blue-300 truncate"};function Pvr(t,e,n,r,i,s){const o=Xe("RouterLink"),a=Xe("Toolbar"),l=Xe("Discussion");return k(),Qt(cr,{name:"slide-right"},{default:Ie(()=>[n.showLeftPanel?(k(),R("div",rvr,[te(o,{to:{name:"discussions"},class:"flex items-center space-x-2 p-2 border-b border-blue-200 dark:border-blue-700 hover:bg-blue-50 dark:hover:bg-blue-800 transition duration-150 ease-in-out"},{default:Ie(()=>[b("div",ivr,[b("img",{class:"w-full h-full rounded-full object-cover logo-image border-2 border-blue-300 dark:border-blue-600 shadow-sm",src:s.logoSrc,alt:"Logo",title:s.logoTitle},null,8,svr)]),b("div",ovr,[b("div",avr,[b("div",lvr,[b("span",cvr,ae(s.appName),1)])]),b("p",uvr,ae(s.appSlogan),1)])]),_:1}),te(a,{loading:n.toolbarLoading,"is-checkbox":i.isCheckbox,onCreateNewDiscussion:e[0]||(e[0]=c=>t.$emit("create-new-discussion")),onAddDiscussionToSkillsLibrary:e[1]||(e[1]=c=>t.$emit("add-discussion-to-skills-library")),onToggleSkillsLib:e[2]||(e[2]=c=>t.$emit("toggle-skills-lib")),onShowSkillsLib:e[3]||(e[3]=c=>t.$emit("show-skills-lib")),onToggleEditMode:e[4]||(e[4]=c=>i.isCheckbox=!i.isCheckbox),onResetDatabase:e[5]||(e[5]=c=>t.$emit("reset-database")),onExportDatabase:e[6]||(e[6]=c=>t.$emit("export-database")),onImportDiscussions:e[7]||(e[7]=c=>t.$emit("import-discussions",c)),onImportDiscussionsBundle:e[8]||(e[8]=c=>t.$emit("import-discussions-bundle",c)),onShowModelConfig:e[9]||(e[9]=c=>t.$emit("show-model-config",c)),onSetBinding:e[10]||(e[10]=c=>t.$emit("set-binding",c)),onCopyModelName:e[11]||(e[11]=c=>t.$emit("copy-model-name",c)),onSetModel:e[12]||(e[12]=c=>t.$emit("set-model",c)),onPersonalitySelected:e[13]||(e[13]=c=>t.$emit("personality-selected",c)),onUnmountPersonality:e[14]||(e[14]=c=>t.$emit("unmount-personality",c)),onRemountPersonality:e[15]||(e[15]=c=>t.$emit("remount-personality",c)),onTalkPersonality:e[16]||(e[16]=c=>t.$emit("talk-personality",c)),onPersonalitiesReady:e[17]||(e[17]=c=>t.$emit("personalities-ready")),onShowPersonalityList:e[18]||(e[18]=c=>t.$emit("show-personality-list"))},null,8,["loading","is-checkbox"]),b("div",dvr,[b("form",{onSubmit:e[23]||(e[23]=oe(()=>{},["prevent"])),class:"relative"},[b("div",fvr,[b("div",hvr,[He(b("input",{type:"search",id:"discussion-search",class:"block w-full h-8 pl-8 pr-4 text-sm input",placeholder:"Search discussions...",title:"Filter discussions by title","onUpdate:modelValue":e[19]||(e[19]=c=>i.filterTitle=c),onInput:e[20]||(e[20]=(...c)=>s.handleSearchInput&&s.handleSearchInput(...c))},null,544),[[vt,i.filterTitle]]),e[36]||(e[36]=b("div",{class:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none"},[b("i",{"data-feather":"search",class:"w-4 h-4 text-gray-400 dark:text-gray-500"})],-1))]),b("button",{onClick:e[21]||(e[21]=(...c)=>s.cycleSortOrder&&s.cycleSortOrder(...c)),class:"svg-button p-1",title:`Sort by ${i.sortBy}: ${i.sortOrder==="asc"?"Ascending":"Descending"}`},[b("i",{"data-feather":s.sortIcon,class:"w-4 h-4"},null,8,Tvr)],8,pvr),b("button",{onClick:e[22]||(e[22]=(...c)=>s.cycleSortBy&&s.cycleSortBy(...c)),class:"svg-button p-1",title:`Sorting by: ${s.sortByLabel}`},[b("i",{"data-feather":i.sortBy==="date"?"calendar":"type",class:"w-4 h-4"},null,8,mvr)],8,Ovr)])],32)]),i.isCheckbox?(k(),R("div",gvr,[b("div",Qvr,[s.selectedDiscussions.length>0?(k(),R("p",_vr,"Selected: "+ae(s.selectedDiscussions.length),1)):ne("",!0),s.selectedDiscussions.length>0?(k(),R("div",vvr,[i.showConfirmation?ne("",!0):(k(),R("button",{key:0,class:"svg-button text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200",title:"Remove selected",type:"button",onClick:e[24]||(e[24]=oe(c=>i.showConfirmation=!0,["stop"]))},e[37]||(e[37]=[b("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)]))),i.showConfirmation?(k(),R("div",yvr,[b("button",{class:"svg-button text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-200",title:"Confirm removal",type:"button",onClick:e[25]||(e[25]=oe((...c)=>s.deleteSelectedDiscussions&&s.deleteSelectedDiscussions(...c),["stop"]))},e[38]||(e[38]=[b("i",{"data-feather":"check",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200",title:"Cancel removal",type:"button",onClick:e[26]||(e[26]=oe(c=>i.showConfirmation=!1,["stop"]))},e[39]||(e[39]=[b("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]))])):ne("",!0)])):ne("",!0),b("div",bvr,[b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200 rotate-90",title:"Export selected to a json file",type:"button",onClick:e[27]||(e[27]=oe(c=>t.$emit("export-discussions-as-json",s.selectedDiscussions),["stop"]))},e[40]||(e[40]=[b("i",{"data-feather":"codepen",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200 rotate-90",title:"Export selected to a folder",type:"button",onClick:e[28]||(e[28]=oe(c=>t.$emit("export-discussions-to-folder",s.selectedDiscussions),["stop"]))},e[41]||(e[41]=[b("i",{"data-feather":"folder",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200",title:"Export selected to a markdown file",type:"button",onClick:e[29]||(e[29]=oe(c=>t.$emit("export-discussions-as-markdown",s.selectedDiscussions),["stop"]))},e[42]||(e[42]=[b("i",{"data-feather":"bookmark",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200",title:"Select/Deselect All",type:"button",onClick:e[30]||(e[30]=oe((...c)=>s.selectAllDiscussions&&s.selectAllDiscussions(...c),["stop"]))},[b("i",{"data-feather":s.isAllSelected?"minus-square":"check-square",class:"w-5 h-5"},null,8,Svr)])])])])):ne("",!0),b("div",{id:"leftPanelScroll",class:"flex flex-col flex-grow overflow-y-auto overflow-x-hidden scrollbar",onDragover:e[32]||(e[32]=oe(c=>i.isDragOverDiscussion=!0,["prevent"])),onDragleave:e[33]||(e[33]=c=>i.isDragOverDiscussion=!1),onDrop:e[34]||(e[34]=oe((...c)=>s.handleDrop&&s.handleDrop(...c),["prevent"]))},[b("div",xvr,[b("div",{class:ye(["mx-0 flex flex-col flex-grow w-full",i.isDragOverDiscussion?"opacity-50 border-2 border-dashed border-blue-500":""])},[b("div",{id:"dis-list",class:ye([i.filterInProgress||n.toolbarLoading?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full pb-10"])},[te(V4,{name:"discussionsList"},{default:Ie(()=>[(k(!0),R(Ve,null,dt(s.groupedDiscussions,c=>(k(),R(Ve,{key:c.key},[c.type==="header"?(k(),R("div",{key:0,class:"sticky top-0 z-10 px-2 py-1 bg-gray-100 dark:bg-gray-800 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider shadow-sm flex items-center justify-between cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700",onClick:u=>s.toggleSection(c.key)},[b("span",null,ae(c.label),1),b("i",{"data-feather":c.collapsed?"chevron-right":"chevron-down",class:"w-4 h-4"},null,8,wvr)],8,Evr)):ne("",!0),c.type==="discussion"?(k(),Qt(l,{key:1,id:`dis-${c.data.id}`,title:c.data.title,selected:n.currentDiscussion&&n.currentDiscussion.id===c.data.id,loading:c.data.loading,isCheckbox:i.isCheckbox,checkBoxValue:c.data.checkBoxValue,"is-starred":c.data.isStarred,openfolder_enabled:!0,onSelect:u=>s.selectDiscussion(c.data),onDelete:u=>s.deleteDiscussion(c.data),onOpenFolder:u=>t.$emit("open-folder",c.data),onEditTitle:e[31]||(e[31]=u=>t.$emit("edit-title",u)),onMakeTitle:u=>t.$emit("make-title",c.data),onChecked:s.checkUncheckDiscussion,onToggleStar:u=>s.toggleStarDiscussion(c.data)},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","is-starred","onSelect","onDelete","onOpenFolder","onMakeTitle","onChecked","onToggleStar"])):ne("",!0)],64))),128))]),_:1}),s.groupedDiscussions.length===0&&!i.filterInProgress&&!n.toolbarLoading?(k(),R("div",Cvr,[e[43]||(e[43]=b("p",null,"No discussions found.",-1)),i.filterTitle?(k(),R("p",Lvr,"Try adjusting your search or filters.")):ne("",!0)])):ne("",!0),i.filterInProgress||n.toolbarLoading?(k(),R("div",$vr,e[44]||(e[44]=[b("p",null,"Loading discussions...",-1)]))):ne("",!0)],2)],2)])],32),b("div",Avr,[b("div",{class:"chat-bar text-center flex items-center justify-center w-full cursor-pointer hover:bg-blue-100 dark:hover:bg-blue-700 rounded transition duration-150 ease-in-out",onClick:e[35]||(e[35]=c=>t.$emit("show-database-selector"))},[e[45]||(e[45]=b("button",{class:"svg-button p-1"},[b("i",{"data-feather":"database",class:"w-4 h-4 mr-1"})],-1)),b("p",kvr,ae(n.formattedDatabaseName),1)])])])):ne("",!0)]),_:1})}const Rvr=st(nvr,[["render",Pvr],["__scopeId","data-v-18952e34"]]),Mvr={props:{htmlContent:{type:String,required:!0}}},Dvr=["innerHTML"];function Nvr(t,e,n,r,i,s){return k(),R("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,Dvr)}const Ivr=st(Mvr,[["render",Nvr]]),Hvr={name:"JsonNode",props:{data:{required:!0},label:{type:String,default:""},depth:{type:Number,default:0}},data(){return{expanded:!0}},computed:{isObject(){return this.data!==null&&typeof this.data=="object"},isArray(){return Array.isArray(this.data)}},methods:{toggle(){this.expanded=!this.expanded},getValueType(t){return t===null?"null":typeof t},formatValue(t){return t===null?"null":typeof t=="string"?`"${t}"`:t}}},Vvr={class:"json-tree"},qvr={key:0,class:"tree-node"},Uvr={class:"toggle-icon"},Bvr={class:"key"},zvr={class:"bracket"},Xvr={key:0,class:"node-content"},Fvr={key:1,class:"bracket-close"},jvr={key:1,class:"tree-leaf"},Yvr={key:0,class:"key"};function Gvr(t,e,n,r,i,s){const o=Xe("json-node",!0);return k(),R("div",Vvr,[s.isObject?(k(),R("div",qvr,[b("div",{class:"node-label",onClick:e[0]||(e[0]=(...a)=>s.toggle&&s.toggle(...a))},[b("span",Uvr,ae(i.expanded?"▼":"▶"),1),b("span",Bvr,ae(n.label),1),b("span",zvr,ae(s.isArray?"[":"{"),1)]),i.expanded?(k(),R("div",Xvr,[(k(!0),R(Ve,null,dt(n.data,(a,l)=>(k(),R("div",{key:l,class:"node-item"},[te(o,{data:a,label:l,depth:n.depth+1},null,8,["data","label","depth"])]))),128))])):ne("",!0),i.expanded?(k(),R("div",Fvr,ae(s.isArray?"]":"}"),1)):ne("",!0)])):(k(),R("div",jvr,[n.label?(k(),R("span",Yvr,ae(n.label)+":",1)):ne("",!0),b("span",{class:ye(["value",s.getValueType(n.data)])},ae(s.formatValue(n.data)),3)]))])}const Wvr=st(Hvr,[["render",Gvr],["__scopeId","data-v-f98ed845"]]),Zvr={name:"JsonViewer",components:{JsonNode:Wvr},props:{data:{required:!0},title:{type:String,default:"JSON Data"}},data(){return{expanded:!0}},computed:{parsedData(){if(typeof this.data=="string")try{return JSON.parse(this.data)}catch{return{error:"Invalid JSON"}}return this.data}},methods:{toggle(){this.expanded=!this.expanded}}},Kvr={class:"json-viewer"},Jvr={class:"toggle-icon"},eyr={class:"title"},tyr={key:0,class:"viewer-content"};function nyr(t,e,n,r,i,s){const o=Xe("json-node");return k(),R("div",Kvr,[b("div",{class:"viewer-header",onClick:e[0]||(e[0]=(...a)=>s.toggle&&s.toggle(...a))},[b("span",Jvr,ae(i.expanded?"▼":"▶"),1),b("span",eyr,ae(n.title),1)]),i.expanded?(k(),R("div",tyr,[te(o,{data:s.parsedData},null,8,["data"])])):ne("",!0)])}const ryr=st(Zvr,[["render",nyr],["__scopeId","data-v-cd1635fc"]]),iyr={name:"Step",props:{done:Boolean,text:String,status:Boolean,description:String}},syr={class:"step-icon-wrapper"},oyr={key:"spinner",class:"step-spinner"},ayr={key:"success",class:"step-icon-success w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},lyr={key:"fail",class:"step-icon-fail w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},cyr={class:"step-text-content"},uyr={class:"step-text"},dyr={key:0,class:"step-description"};function fyr(t,e,n,r,i,s){return k(),R("div",{class:ye(["step-component",[n.done?n.status?"step-component-success":"step-component-fail":"step-component-pending"]])},[b("div",syr,[te(cr,{name:"fade-icon",mode:"out-in"},{default:Ie(()=>[n.done?n.status?(k(),R("svg",ayr,e[0]||(e[0]=[b("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1)]))):(k(),R("svg",lyr,e[1]||(e[1]=[b("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"},null,-1)]))):(k(),R("div",oyr))]),_:1})]),b("div",cyr,[b("div",uyr,ae(n.text||"Processing..."),1),n.description?(k(),R("div",dyr,ae(n.description),1)):ne("",!0)])],2)}const hyr=st(iyr,[["render",fyr],["__scopeId","data-v-6d675aab"]]),pyr=["title"],Tyr={key:0,class:"icon icon-success",viewBox:"0 0 24 24"},Oyr={key:1,class:"icon icon-fail",viewBox:"0 0 24 24"},myr={key:2,class:"icon-spinner"},gyr={key:1,class:"icon-text"},Qyr={__name:"StatusIcon",props:{status:{type:String,required:!0},icon:Boolean,iconDone:{type:String,default:"✓"},iconFailed:{type:String,default:"✗"},iconProcessing:{type:String,default:"⟳"},titleDone:{type:String,default:"Success"},titleFailed:{type:String,default:"Failure"},titleProcessing:{type:String,default:"Processing"}},setup(t){const e=t,n=Je(()=>e.status==="Done"?e.titleDone:e.status==="Failed"?e.titleFailed:e.titleProcessing),r=Je(()=>e.status==="Done"?e.iconDone:e.status==="Failed"?e.iconFailed:e.iconProcessing);return(i,s)=>(k(),R("div",{class:"status-icon",title:n.value},[t.icon?(k(),R(Ve,{key:0},[t.status==="Done"?(k(),R("svg",Tyr,s[0]||(s[0]=[b("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},null,-1)]))):t.status==="Failed"?(k(),R("svg",Oyr,s[1]||(s[1]=[b("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"},null,-1)]))):(k(),R("div",myr))],64)):(k(),R("span",gyr,ae(r.value),1))],8,pyr))}},_yr=st(Qyr,[["__scopeId","data-v-b3d110c2"]]),vyr=[sJ(),oJ(),WK(),VJ(),EJ(),FK(),GK(),nn.allowMultipleSelections.of(!0),OJ(),C3(wd,{fallback:!0}),AJ(),Mee(),Vee(),KK(),JK(),ZK(),jSt(),B4.of([...Iee,...Oee,...Cee,...BJ,...yJ,...Tw,...Bee])],yyr="modulepreload",byr=function(t){return"/"+t},cY={},Ee=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=byr(l),l in cY)return;cY[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":yyr,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};function Ne(t){return new ri(h4.define(t))}function Z2(t){return Ee(()=>Promise.resolve().then(()=>FPt),void 0).then(e=>e.sql({dialect:e[t]}))}const Syr=[be.of({name:"C",extensions:["c","h","ino"],load(){return Ee(()=>Promise.resolve().then(()=>rH),void 0).then(t=>t.cpp())}}),be.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return Ee(()=>Promise.resolve().then(()=>rH),void 0).then(t=>t.cpp())}}),be.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Z2("Cassandra")}}),be.of({name:"CSS",extensions:["css"],load(){return Ee(()=>Promise.resolve().then(()=>jLt),void 0).then(t=>t.css())}}),be.of({name:"Go",extensions:["go"],load(){return Ee(()=>import("./index-COgkX41k.js"),[]).then(t=>t.go())}}),be.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return Ee(()=>Promise.resolve().then(()=>JLt),void 0).then(t=>t.html())}}),be.of({name:"Java",extensions:["java"],load(){return Ee(()=>Promise.resolve().then(()=>fAt),void 0).then(t=>t.java())}}),be.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return Ee(()=>Promise.resolve().then(()=>x8),void 0).then(t=>t.javascript())}}),be.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return Ee(()=>Promise.resolve().then(()=>i$t),void 0).then(t=>t.json())}}),be.of({name:"JSX",extensions:["jsx"],load(){return Ee(()=>Promise.resolve().then(()=>x8),void 0).then(t=>t.javascript({jsx:!0}))}}),be.of({name:"LESS",extensions:["less"],load(){return Ee(()=>import("./index-76yn-lwE.js"),[]).then(t=>t.less())}}),be.of({name:"Liquid",extensions:["liquid"],load(){return Ee(()=>import("./index-BQOKF27n.js"),[]).then(t=>t.liquid())}}),be.of({name:"MariaDB SQL",load(){return Z2("MariaSQL")}}),be.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return Ee(()=>Promise.resolve().then(()=>q$t),void 0).then(t=>t.markdown())}}),be.of({name:"MS SQL",load(){return Z2("MSSQL")}}),be.of({name:"MySQL",load(){return Z2("MySQL")}}),be.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return Ee(()=>Promise.resolve().then(()=>Mkt),void 0).then(t=>t.php())}}),be.of({name:"PLSQL",extensions:["pls"],load(){return Z2("PLSQL")}}),be.of({name:"PostgreSQL",load(){return Z2("PostgreSQL")}}),be.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return Ee(()=>Promise.resolve().then(()=>NCt),void 0).then(t=>t.python())}}),be.of({name:"Rust",extensions:["rs"],load(){return Ee(()=>Promise.resolve().then(()=>tPt),void 0).then(t=>t.rust())}}),be.of({name:"Sass",extensions:["sass"],load(){return Ee(()=>import("./index-CClvqRni.js"),[]).then(t=>t.sass({indented:!0}))}}),be.of({name:"SCSS",extensions:["scss"],load(){return Ee(()=>import("./index-CClvqRni.js"),[]).then(t=>t.sass())}}),be.of({name:"SQL",extensions:["sql"],load(){return Z2("StandardSQL")}}),be.of({name:"SQLite",load(){return Z2("SQLite")}}),be.of({name:"TSX",extensions:["tsx"],load(){return Ee(()=>Promise.resolve().then(()=>x8),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),be.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return Ee(()=>Promise.resolve().then(()=>x8),void 0).then(t=>t.javascript({typescript:!0}))}}),be.of({name:"WebAssembly",extensions:["wat","wast"],load(){return Ee(()=>import("./index-Dw1B8Khu.js"),[]).then(t=>t.wast())}}),be.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return Ee(()=>Promise.resolve().then(()=>pRt),void 0).then(t=>t.xml())}}),be.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return Ee(()=>Promise.resolve().then(()=>FRt),void 0).then(t=>t.yaml())}}),be.of({name:"APL",extensions:["dyalog","apl"],load(){return Ee(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>Ne(t.apl))}}),be.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return Ee(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>Ne(t.asciiArmor))}}),be.of({name:"ASN.1",extensions:["asn","asn1"],load(){return Ee(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>Ne(t.asn1({})))}}),be.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return Ee(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>Ne(t.asterisk))}}),be.of({name:"Brainfuck",extensions:["b","bf"],load(){return Ee(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>Ne(t.brainfuck))}}),be.of({name:"Cobol",extensions:["cob","cpy"],load(){return Ee(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>Ne(t.cobol))}}),be.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.csharp))}}),be.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return Ee(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>Ne(t.clojure))}}),be.of({name:"ClojureScript",extensions:["cljs"],load(){return Ee(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>Ne(t.clojure))}}),be.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return Ee(()=>import("./css-BnMrqG3P.js"),[]).then(t=>Ne(t.gss))}}),be.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return Ee(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>Ne(t.cmake))}}),be.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return Ee(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>Ne(t.coffeeScript))}}),be.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return Ee(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>Ne(t.commonLisp))}}),be.of({name:"Cypher",extensions:["cyp","cypher"],load(){return Ee(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>Ne(t.cypher))}}),be.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return Ee(()=>import("./python-BuPzkPfP.js"),[]).then(t=>Ne(t.cython))}}),be.of({name:"Crystal",extensions:["cr"],load(){return Ee(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>Ne(t.crystal))}}),be.of({name:"D",extensions:["d"],load(){return Ee(()=>import("./d-pRatUO7H.js"),[]).then(t=>Ne(t.d))}}),be.of({name:"Dart",extensions:["dart"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.dart))}}),be.of({name:"diff",extensions:["diff","patch"],load(){return Ee(()=>import("./diff-DbItnlRl.js"),[]).then(t=>Ne(t.diff))}}),be.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return Ee(()=>import("./dockerfile-BU1Ap__c.js"),__vite__mapDeps([0,1])).then(t=>Ne(t.dockerFile))}}),be.of({name:"DTD",extensions:["dtd"],load(){return Ee(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>Ne(t.dtd))}}),be.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return Ee(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>Ne(t.dylan))}}),be.of({name:"EBNF",load(){return Ee(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>Ne(t.ebnf))}}),be.of({name:"ECL",extensions:["ecl"],load(){return Ee(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>Ne(t.ecl))}}),be.of({name:"edn",extensions:["edn"],load(){return Ee(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>Ne(t.clojure))}}),be.of({name:"Eiffel",extensions:["e"],load(){return Ee(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>Ne(t.eiffel))}}),be.of({name:"Elm",extensions:["elm"],load(){return Ee(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>Ne(t.elm))}}),be.of({name:"Erlang",extensions:["erl"],load(){return Ee(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>Ne(t.erlang))}}),be.of({name:"Esper",load(){return Ee(()=>import("./sql-D0XecflT.js"),[]).then(t=>Ne(t.esper))}}),be.of({name:"Factor",extensions:["factor"],load(){return Ee(()=>import("./factor-BPndPnYX.js"),__vite__mapDeps([2,1])).then(t=>Ne(t.factor))}}),be.of({name:"FCL",load(){return Ee(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>Ne(t.fcl))}}),be.of({name:"Forth",extensions:["forth","fth","4th"],load(){return Ee(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>Ne(t.forth))}}),be.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return Ee(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>Ne(t.fortran))}}),be.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return Ee(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>Ne(t.fSharp))}}),be.of({name:"Gas",extensions:["s"],load(){return Ee(()=>import("./gas-Bneqetm1.js"),[]).then(t=>Ne(t.gas))}}),be.of({name:"Gherkin",extensions:["feature"],load(){return Ee(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>Ne(t.gherkin))}}),be.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return Ee(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>Ne(t.groovy))}}),be.of({name:"Haskell",extensions:["hs"],load(){return Ee(()=>import("./haskell-BWDZoCOh.js"),[]).then(t=>Ne(t.haskell))}}),be.of({name:"Haxe",extensions:["hx"],load(){return Ee(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>Ne(t.haxe))}}),be.of({name:"HXML",extensions:["hxml"],load(){return Ee(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>Ne(t.hxml))}}),be.of({name:"HTTP",load(){return Ee(()=>import("./http-DBlCnlav.js"),[]).then(t=>Ne(t.http))}}),be.of({name:"IDL",extensions:["pro"],load(){return Ee(()=>import("./idl-BEugSyMb.js"),[]).then(t=>Ne(t.idl))}}),be.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return Ee(()=>import("./javascript-qCveANmP.js"),[]).then(t=>Ne(t.jsonld))}}),be.of({name:"Jinja2",extensions:["j2","jinja","jinja2"],load(){return Ee(()=>import("./jinja2-C4DGRd-O.js"),[]).then(t=>Ne(t.jinja2))}}),be.of({name:"Julia",extensions:["jl"],load(){return Ee(()=>import("./julia-DuME0IfC.js"),[]).then(t=>Ne(t.julia))}}),be.of({name:"Kotlin",extensions:["kt","kts"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.kotlin))}}),be.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return Ee(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>Ne(t.liveScript))}}),be.of({name:"Lua",extensions:["lua"],load(){return Ee(()=>Promise.resolve().then(()=>xMt),void 0).then(t=>Ne(t.lua))}}),be.of({name:"mIRC",extensions:["mrc"],load(){return Ee(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>Ne(t.mirc))}}),be.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return Ee(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>Ne(t.mathematica))}}),be.of({name:"Modelica",extensions:["mo"],load(){return Ee(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>Ne(t.modelica))}}),be.of({name:"MUMPS",extensions:["mps"],load(){return Ee(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>Ne(t.mumps))}}),be.of({name:"Mbox",extensions:["mbox"],load(){return Ee(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>Ne(t.mbox))}}),be.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return Ee(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>Ne(t.nginx))}}),be.of({name:"NSIS",extensions:["nsh","nsi"],load(){return Ee(()=>import("./nsis-ClDXqMnM.js"),__vite__mapDeps([3,1])).then(t=>Ne(t.nsis))}}),be.of({name:"NTriples",extensions:["nt","nq"],load(){return Ee(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>Ne(t.ntriples))}}),be.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.objectiveC))}}),be.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.objectiveCpp))}}),be.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return Ee(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>Ne(t.oCaml))}}),be.of({name:"Octave",extensions:["m"],load(){return Ee(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>Ne(t.octave))}}),be.of({name:"Oz",extensions:["oz"],load(){return Ee(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>Ne(t.oz))}}),be.of({name:"Pascal",extensions:["p","pas"],load(){return Ee(()=>import("./pascal--L3eBynH.js"),[]).then(t=>Ne(t.pascal))}}),be.of({name:"Perl",extensions:["pl","pm"],load(){return Ee(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>Ne(t.perl))}}),be.of({name:"Pig",extensions:["pig"],load(){return Ee(()=>import("./pig-CevX1Tat.js"),[]).then(t=>Ne(t.pig))}}),be.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return Ee(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>Ne(t.powerShell))}}),be.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return Ee(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>Ne(t.properties))}}),be.of({name:"ProtoBuf",extensions:["proto"],load(){return Ee(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>Ne(t.protobuf))}}),be.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return Ee(()=>import("./pug-DukmZTjD.js"),__vite__mapDeps([4,5])).then(t=>Ne(t.pug))}}),be.of({name:"Puppet",extensions:["pp"],load(){return Ee(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>Ne(t.puppet))}}),be.of({name:"Q",extensions:["q"],load(){return Ee(()=>import("./q-ZnEupP5q.js"),[]).then(t=>Ne(t.q))}}),be.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return Ee(()=>import("./r-B6wPVr8A.js"),[]).then(t=>Ne(t.r))}}),be.of({name:"RPM Changes",load(){return Ee(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>Ne(t.rpmChanges))}}),be.of({name:"RPM Spec",extensions:["spec"],load(){return Ee(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>Ne(t.rpmSpec))}}),be.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return Ee(()=>Promise.resolve().then(()=>mMt),void 0).then(t=>Ne(t.ruby))}}),be.of({name:"SAS",extensions:["sas"],load(){return Ee(()=>import("./sas-B4kiWyti.js"),[]).then(t=>Ne(t.sas))}}),be.of({name:"Scala",extensions:["scala"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.scala))}}),be.of({name:"Scheme",extensions:["scm","ss"],load(){return Ee(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>Ne(t.scheme))}}),be.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return Ee(()=>Promise.resolve().then(()=>iMt),void 0).then(t=>Ne(t.shell))}}),be.of({name:"Sieve",extensions:["siv","sieve"],load(){return Ee(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>Ne(t.sieve))}}),be.of({name:"Smalltalk",extensions:["st"],load(){return Ee(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>Ne(t.smalltalk))}}),be.of({name:"Solr",load(){return Ee(()=>import("./solr-DehyRSwq.js"),[]).then(t=>Ne(t.solr))}}),be.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return Ee(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>Ne(t.sml))}}),be.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return Ee(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>Ne(t.sparql))}}),be.of({name:"Spreadsheet",alias:["excel","formula"],load(){return Ee(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>Ne(t.spreadsheet))}}),be.of({name:"Squirrel",extensions:["nut"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.squirrel))}}),be.of({name:"Stylus",extensions:["styl"],load(){return Ee(()=>import("./stylus-BdAi1jBa.js"),[]).then(t=>Ne(t.stylus))}}),be.of({name:"Swift",extensions:["swift"],load(){return Ee(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>Ne(t.swift))}}),be.of({name:"sTeX",load(){return Ee(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>Ne(t.stex))}}),be.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return Ee(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>Ne(t.stex))}}),be.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return Ee(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>Ne(t.verilog))}}),be.of({name:"Tcl",extensions:["tcl"],load(){return Ee(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>Ne(t.tcl))}}),be.of({name:"Textile",extensions:["textile"],load(){return Ee(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>Ne(t.textile))}}),be.of({name:"TiddlyWiki",load(){return Ee(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>Ne(t.tiddlyWiki))}}),be.of({name:"Tiki wiki",load(){return Ee(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>Ne(t.tiki))}}),be.of({name:"TOML",extensions:["toml"],load(){return Ee(()=>import("./toml-BXUEaScT.js"),[]).then(t=>Ne(t.toml))}}),be.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return Ee(()=>import("./troff-wAsdV37c.js"),[]).then(t=>Ne(t.troff))}}),be.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return Ee(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>Ne(t.ttcn))}}),be.of({name:"TTCN_CFG",extensions:["cfg"],load(){return Ee(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>Ne(t.ttcnCfg))}}),be.of({name:"Turtle",extensions:["ttl"],load(){return Ee(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>Ne(t.turtle))}}),be.of({name:"Web IDL",extensions:["webidl"],load(){return Ee(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>Ne(t.webIDL))}}),be.of({name:"VB.NET",extensions:["vb"],load(){return Ee(()=>import("./vb-CmGdzxic.js"),[]).then(t=>Ne(t.vb))}}),be.of({name:"VBScript",extensions:["vbs"],load(){return Ee(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>Ne(t.vbScript))}}),be.of({name:"Velocity",extensions:["vtl"],load(){return Ee(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>Ne(t.velocity))}}),be.of({name:"Verilog",extensions:["v"],load(){return Ee(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>Ne(t.verilog))}}),be.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return Ee(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>Ne(t.vhdl))}}),be.of({name:"XQuery",extensions:["xy","xquery"],load(){return Ee(()=>import("./xquery-CQfU5ijd.js"),[]).then(t=>Ne(t.xQuery))}}),be.of({name:"Yacas",extensions:["ys"],load(){return Ee(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>Ne(t.yacas))}}),be.of({name:"Z80",extensions:["z80"],load(){return Ee(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>Ne(t.z80))}}),be.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return Ee(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>Ne(t.mscgen))}}),be.of({name:"Xù",extensions:["xu"],load(){return Ee(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>Ne(t.xu))}}),be.of({name:"MsGenny",extensions:["msgenny"],load(){return Ee(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>Ne(t.msgenny))}}),be.of({name:"Vue",extensions:["vue"],load(){return Ee(()=>Promise.resolve().then(()=>eMt),void 0).then(t=>t.vue())}}),be.of({name:"Angular Template",load(){return Ee(()=>import("./index-D_wrAvKg.js"),[]).then(t=>t.angular())}})],xyr={name:"DropdownSubmenu",props:{title:{type:String,required:!0},icon:{type:String,required:!1,default:null}},setup(){const t=We(!1);let e=null;const n=()=>{e&&(clearTimeout(e),e=null),t.value||(t.value=!0,Fe(()=>{Re.replace()}))},r=()=>{e=setTimeout(()=>{t.value=!1,e=null},150)};return Ii(()=>{Fe(()=>{Re.replace()})}),{isOpen:t,openSubmenu:n,closeSubmenu:r}}},Eyr=["aria-expanded"],wyr={class:"flex items-center gap-2"},Cyr=["data-feather"],Lyr={class:"truncate"},$yr={key:0,class:"absolute top-0 left-full mt-[-1px] ml-1 w-auto min-w-[10rem] origin-top-left rounded-md bg-white dark:bg-gray-800 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-20 py-1",role:"menu","aria-orientation":"vertical","aria-labelledby":"submenu-button"};function Ayr(t,e,n,r,i,s){return k(),R("div",{class:"relative",onMouseenter:e[0]||(e[0]=(...o)=>r.openSubmenu&&r.openSubmenu(...o)),onMouseleave:e[1]||(e[1]=(...o)=>r.closeSubmenu&&r.closeSubmenu(...o))},[b("button",{type:"button",class:"w-full flex items-center justify-between px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-700",role:"menuitem",tabindex:"-1","aria-haspopup":!0,"aria-expanded":r.isOpen},[b("div",wyr,[n.icon?(k(),R("i",{key:0,"data-feather":n.icon,class:"w-4 h-4 flex-shrink-0"},null,8,Cyr)):ne("",!0),b("span",Lyr,ae(n.title),1)]),e[2]||(e[2]=b("i",{"data-feather":"chevron-right",class:"w-4 h-4 ml-auto flex-shrink-0 text-gray-400"},null,-1))],8,Eyr),te(cr,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:Ie(()=>[r.isOpen?(k(),R("div",$yr,[er(t.$slots,"default",{},void 0,!0)])):ne("",!0)]),_:3})],32)}const kyr=st(xyr,[["render",Ayr],["__scopeId","data-v-6d202a8d"]]),Pyr=t=>{let e=[];for(let n of t.selection.ranges){const r=t.doc.lineAt(n.from),i=t.doc.lineAt(n.to);for(let s=r.number;s<=i.number;s++)e.some(o=>o.number===s)||e.push(t.doc.line(s))}return e},m3=(t,e,n)=>n&&e===0||!n&&e===t.doc.length?!1:(n?t.doc.sliceString(e-1,e):t.doc.sliceString(e,e+1))!==` +Error: ${(r==null?void 0:r.error)||"Unknown error"}`,4,!1),this.setPersonalityProcessing(t,!1)},async unmount_personality(t){var s;if(!t)return{status:!1,error:"no personality provided"};const e=((s=this.$store.state.config)==null?void 0:s.personalities)||[];let n=null;const r=t.language?`${t.full_path}:${t.language}`:null;r&&e.includes(r)?n=r:(e.includes(t.full_path),n=t.full_path);const i={path:n};try{return await this.api_post_req("unmount_personality",i)}catch(o){return{status:!1,error:o.message}}},async unmountAll(){if(!await this.show_yes_no_dialog(`Unmount all ${this.mountedPersArr.length} personalities?`,"Unmount All","Cancel"))return;this.show_toast("Unmounting all...",3,!0),this.isLoading=!0;const e=await this.api_post_req("unmount_all_personalities");e&&e.status?(await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities"),this.show_toast("All personalities unmounted.",4,!0)):this.show_toast(`Failed to unmount all: ${(e==null?void 0:e.error)||"Unknown error"}`,4,!1),this.isLoading=!1},async remountPersonality(t){const e=t.personality;if(!(!e.isMounted||e.isProcessing)){this.setPersonalityProcessing(t,!0),this.show_toast(`Remounting ${e.name}...`,3,!0);try{const n=await this.unmount_personality(e);if(!n||!n.status)throw new Error(`Unmount failed: ${(n==null?void 0:n.error)||"Unknown error"}`);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities"),await new Promise(i=>setTimeout(i,200));const r=await this.mount_personality(e);if(!r||!r.status)throw new Error(`Mount failed: ${(r==null?void 0:r.error)||"Unknown error"}`);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities"),this.show_toast(`${e.name} remounted successfully.`,4,!0)}catch(n){this.show_toast(`Error remounting ${e.name}: ${n.message}`,4,!1),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshMountedPersonalities")}finally{this.setPersonalityProcessing(t,!1)}}},async editPersonality(t){var n;const e=t.personality;if(!e.isProcessing){this.setPersonalityProcessing(t,!0);try{const r=await this.api_post_req("get_personality_config",{category:e.category,name:e.folder});r.status&&r.config?(this.$store.commit("setCurrentPersonConfig",r.config),this.$store.commit("setShowPersonalityEditor",!0),this.$store.commit("setSelectedPersonality",e),(n=this.$store.state.personality_editor)!=null&&n.showPanel&&this.$store.state.personality_editor.showPanel()):this.show_toast(`Failed to load config for ${e.name}: ${r.error||"Not found/error"}`,4,!1)}catch(r){this.show_toast(`Error loading config for ${e.name}: ${r.message}`,4,!1)}finally{this.setPersonalityProcessing(t,!1)}}},async onCopyToCustom(t){const e=t.personality;if(e.isProcessing||!await this.show_yes_no_dialog(`Copy "${e.name}" to 'custom_personalities'?`,"Copy","Cancel"))return;this.setPersonalityProcessing(t,!0);const r=await this.api_post_req("copy_to_custom_personas",{category:e.category,name:e.folder});r&&r.status?(this.show_message_box(`"${e.name}" copied. Refreshing list...`),await new Promise(i=>setTimeout(i,500)),await this.$store.dispatch("refreshPersonalitiesZoo"),await this.$store.dispatch("refreshMountedPersonalities")):this.show_toast(`Failed to copy ${e.name}: ${(r==null?void 0:r.error)||"Error"}`,4,!1),this.setPersonalityProcessing(t,!1)},async onPersonalityReinstall(t){const e=t.personality;if(e.isProcessing||!await this.show_yes_no_dialog(`Reinstall "${e.name}"? This overwrites local changes.`,"Reinstall","Cancel"))return;this.setPersonalityProcessing(t,!0),this.show_toast(`Reinstalling ${e.name}...`,3,!0);const r=await this.api_post_req("reinstall_personality",{name:e.full_path});r&&r.status?this.show_toast(`${e.name} reinstalled. Remount if active.`,4,!0):this.show_toast(`Failed to reinstall ${e.name}: ${(r==null?void 0:r.error)||"Error"}`,4,!1),this.setPersonalityProcessing(t,!1)},async onSettingsPersonality(t){const e=t.personality;if(!(!this.isActivePersonality(e)||e.isProcessing)){if(!this.isActivePersonality(e)){this.show_toast(`Activate "${e.name}" first to configure settings.`,4,!1);return}this.setPersonalityProcessing(t,!0);try{const n=await this.api_get_req("/get_active_personality_settings");if(n&&typeof n=="object"&&Object.keys(n).length>0){const r=await this.show_universal_form(n,`Settings - ${e.name}`,"Save","Cancel");if(r!=null){this.setPersonalityProcessing(t,!0);const i=await this.api_post_req("set_active_personality_settings",r);i!=null&&i.status?this.show_toast(`Settings for ${e.name} updated.`,4,!0):this.show_toast(`Failed to update settings: ${(i==null?void 0:i.error)||"Error"}`,4,!1)}}else n&&typeof n=="object"?this.show_toast(`"${e.name}" has no configurable settings.`,3,!0):this.show_toast("Could not retrieve settings structure.",4,!1)}catch(n){this.show_toast(`Error accessing settings: ${n.message}`,4,!1)}finally{this.setPersonalityProcessing(t,!1)}}},onCopyPersonalityName(t){const e=t.personality;navigator.clipboard.writeText(e.name).then(()=>this.show_toast(`Copied name: ${e.name}`,3,!0)).catch(n=>this.show_toast("Failed to copy name.",3,!1))},async handleOpenFolder(t){const e=t.personality,n=await this.api_post_req("open_personality_folder",{category:e.category,name:e.folder});(!n||!n.status)&&this.show_toast(`Could not open folder: ${(n==null?void 0:n.error)||"Error"}`,4,!1)}},async mounted(){var t;await this.fetchInitialData(),this.selectedCategory=((t=this.config)==null?void 0:t.personality_category)||""},updated(){Fe(()=>{Re.replace()})}},rmr={class:"user-settings-panel flex flex-col mb-2 rounded-lg shadow-lg p-4 bg-white dark:bg-gray-800"},imr={class:"flex flex-row justify-between items-center mb-4 flex-wrap gap-y-2"},smr={class:"flex items-center flex-wrap"},omr={key:0,class:"flex items-center mr-2 text-lg text-blue-600 dark:text-blue-300"},amr=["title"],lmr={class:"flex items-center space-x-3 shrink-0"},cmr={key:0,class:"text-base font-semibold cursor-default select-none items-center flex flex-row"},umr={class:"flex -space-x-4 items-center"},dmr={class:"group/mounted items-center flex flex-row"},fmr=["onClick","title"],hmr=["src"],pmr=["onClick"],Tmr=["title"],Omr={class:"flex flex-col sm:flex-row gap-4 mb-4"},mmr={class:"flex-grow"},gmr={class:"relative"},Qmr={class:"absolute right-1.5 bottom-1.5 flex space-x-1"},_mr={class:"flex-shrink-0 sm:w-64"},vmr={value:""},ymr={value:"Mounted"},bmr={key:0,value:"Starred"},Smr={key:1,disabled:"",class:"text-blue-400 dark:text-blue-600"},xmr=["value"],Emr={key:0,class:"flex justify-center items-center p-10 text-loading text-blue-600 dark:text-blue-300"},wmr={key:1,class:"text-center text-blue-500 dark:text-blue-400 py-10"},Cmr={key:2,class:"overflow-y-auto flex-grow personalities-grid-container scrollbar",style:{"max-height":"calc(100vh - 300px)"},ref:"gridContainer"},Lmr={class:"label block ml-2 mb-2 text-blue-700 dark:text-blue-300"};function $mr(t,e,n,r,i,s){const o=Xe("PersonalityEntry");return k(),R("div",rmr,[b("div",imr,[b("div",smr,[e[9]||(e[9]=b("p",{class:"text-xl font-semibold cursor-default select-none mr-3 text-blue-800 dark:text-blue-100"}," Personalities Zoo ",-1)),s.active_personality_name?(k(),R("div",omr,[e[8]||(e[8]=b("span",{class:"mx-2 text-blue-400 dark:text-blue-500"},"|",-1)),b("span",{class:"font-bold line-clamp-1",title:`Active: ${s.active_personality_name}`},ae(s.active_personality_name),9,amr)])):ne("",!0)]),b("div",lmr,[s.mountedPersArr.length>0?(k(),R("div",cmr,[b("div",umr,[(k(!0),R(Ve,null,dt(s.displayedMountedPersonalities,(a,l)=>(k(),R("div",{class:"relative hover:-translate-y-1 duration-300 hover:z-10 shrink-0",key:a.id||a.full_path+"-"+l,ref_for:!0,ref:"mountedPersonalitiesRefs"},[b("div",dmr,[b("button",{onClick:oe(c=>s.onPersonalitySelected({personality:a,isMounted:!0}),["stop"]),title:`Select: ${a.name}`,class:"transition-transform duration-150 ease-in-out active:scale-90"},[b("img",{src:s.getPersonalityIconUrl(a.avatar),onError:e[0]||(e[0]=(...c)=>s.personalityImgPlaceholder&&s.personalityImgPlaceholder(...c)),class:ye(["w-8 h-8 rounded-full object-cover border-2 transition-colors duration-200 group-hover/mounted:border-blue-500 dark:group-hover/mounted:border-blue-400",s.isActivePersonality(a)?"border-blue-500 dark:border-blue-400":"border-blue-300 dark:border-blue-600"])},null,42,hmr)],8,fmr),b("button",{onClick:oe(c=>s.unmountPersonality({personality:a}),["stop"]),class:"absolute -top-1 -right-1 opacity-0 group-hover/mounted:opacity-100 transition-all duration-150 ease-in-out hover:scale-110",title:"Unmount personality"},e[10]||(e[10]=[b("span",{class:"bg-red-500 hover:bg-red-600 text-white rounded-full p-0.5 flex items-center justify-center shadow-md transition-colors duration-150"},[b("i",{"data-feather":"x",class:"w-3 h-3 stroke-current"})],-1)]),8,pmr)])]))),128)),s.mountedPersArr.length>i.maxDisplayedMounted?(k(),R("div",{key:0,class:"w-8 h-8 rounded-full bg-blue-200 dark:bg-blue-700 border-2 border-blue-300 dark:border-blue-600 flex items-center justify-center text-xs font-semibold text-blue-600 dark:text-blue-300 cursor-default",title:`${s.mountedPersArr.length-i.maxDisplayedMounted} more mounted`}," +"+ae(s.mountedPersArr.length-i.maxDisplayedMounted),9,Tmr)):ne("",!0)])])):ne("",!0),s.mountedPersArr.length>0?(k(),R("button",{key:1,onClick:e[1]||(e[1]=oe(a=>s.unmountAll(),["stop"])),class:"p-1 bg-red-100 hover:bg-red-200 dark:bg-red-900 dark:hover:bg-red-800 rounded-full border border-red-300 dark:border-red-700 active:scale-90 transition-all duration-150",title:"Unmount All Personalities"},e[11]||(e[11]=[b("i",{"data-feather":"x-octagon",class:"w-4 h-4 text-red-600 dark:text-red-400 stroke-current"},null,-1)]))):ne("",!0)])]),b("div",Omr,[b("div",mmr,[e[13]||(e[13]=b("label",{for:"personality-search",class:"sr-only"},"Search",-1)),b("div",gmr,[e[12]||(e[12]=b("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[b("i",{"data-feather":"search",class:"w-5 h-5 text-blue-400 dark:text-blue-500"})],-1)),He(b("input",{type:"search",id:"personality-search",class:"input search-input block w-full p-3 pl-10 text-sm text-blue-900 dark:text-blue-100 placeholder-blue-500 dark:placeholder-blue-400 pr-24",placeholder:"Search name, author, description...","onUpdate:modelValue":e[2]||(e[2]=a=>i.searchTermInput=a),onKeyup:e[3]||(e[3]=gr((...a)=>s.applySearch&&s.applySearch(...a),["enter"]))},null,544),[[vt,i.searchTermInput]]),b("div",Qmr,[i.searchTermInput?(k(),R("button",{key:0,onClick:e[4]||(e[4]=oe((...a)=>s.clearSearch&&s.clearSearch(...a),["stop"])),type:"button",class:"btn btn-secondary btn-sm text-xs px-3 py-1.5"}," Clear ")):ne("",!0),b("button",{onClick:e[5]||(e[5]=oe((...a)=>s.applySearch&&s.applySearch(...a),["stop"])),type:"button",class:"btn btn-primary btn-sm text-xs px-3 py-1.5"}," Search ")])])]),b("div",_mr,[e[14]||(e[14]=b("label",{for:"persCat",class:"sr-only"},"Category",-1)),He(b("select",{id:"persCat","onUpdate:modelValue":e[6]||(e[6]=a=>i.selectedCategory=a),onChange:e[7]||(e[7]=(...a)=>s.handleCategoryChange&&s.handleCategoryChange(...a)),class:"input block w-full p-3 text-sm text-blue-900 dark:text-blue-100"},[b("option",vmr,"All Categories ("+ae(i.allPersonalities.length)+")",1),b("option",ymr,"⬆️ Mounted ("+ae(s.mountedPersArr.length)+")",1),s.starredPersonalitiesPaths.length>0?(k(),R("option",bmr,"⭐ Starred ("+ae(s.getStarredCount())+")",1)):ne("",!0),(s.starredPersonalitiesPaths.length>0||s.mountedPersArr.length>0)&&i.persCatgArr.length>0?(k(),R("option",Smr,"──────────")):ne("",!0),(k(!0),R(Ve,null,dt(i.persCatgArr,(a,l)=>(k(),R("option",{key:l,value:a},ae(a)+" ("+ae(s.getCategoryCount(a))+") ",9,xmr))),128))],544),[[$s,i.selectedCategory]])])]),i.isLoading&&i.allPersonalities.length===0?(k(),R("div",Emr,e[15]||(e[15]=[b("svg",{"aria-hidden":"true",class:"w-8 h-8 mr-2 text-blue-400 animate-spin dark:text-blue-500 fill-blue-600 dark:fill-blue-300",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),Se(),b("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),b("span",null,"Loading personalities...",-1)]))):!i.isLoading&&s.filteredPersonalities.length===0?(k(),R("div",wmr," No personalities found"+ae(i.activeSearchTerm?' matching "'+i.activeSearchTerm+'"':"")+ae(s.getResultMessageQualifier())+". ",1)):(k(),R("div",Cmr,[b("label",Lmr,ae(s.getResultLabel())+": ("+ae(s.filteredPersonalities.length)+") ",1),(k(),R("div",{key:i.selectedCategory+"-"+i.activeSearchTerm,class:"p-2 pb-0 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 bg-blue-100/50 dark:bg-blue-800/30 rounded-md"},[te(V4,{name:"list"},{default:Ie(()=>[(k(!0),R(Ve,null,dt(s.filteredPersonalities,a=>(k(),Qt(o,{key:a.id||a.full_path,personality:a,select_language:!0,full_path:a.full_path,"is-mounted":a.isMounted,"is-active":s.isActivePersonality(a),"is-processing":a.isProcessing,"is-starred":a.isStarred,"base-url":i.bUrl,onSelect:s.onPersonalitySelected,onMount:s.mountPersonality,onUnmount:s.unmountPersonality,onRemount:s.remountPersonality,onEdit:s.editPersonality,onToggleStar:s.toggleStar,onCopyToCustom:s.onCopyToCustom,onReinstall:s.onPersonalityReinstall,onSettings:s.onSettingsPersonality,onCopyPersonalityName:s.onCopyPersonalityName,onOpenFolder:s.handleOpenFolder,onError:s.personalityImgPlaceholder},null,8,["personality","full_path","is-mounted","is-active","is-processing","is-starred","base-url","onSelect","onMount","onUnmount","onRemount","onEdit","onToggleStar","onCopyToCustom","onReinstall","onSettings","onCopyPersonalityName","onOpenFolder","onError"]))),128))]),_:1})]))],512))])}const Amr=st(nmr,[["render",$mr],["__scopeId","data-v-57acb6cf"]]),kmr="/assets/functioncall-Cm2fTSgb.png",Pmr="/",Rmr={props:{function_call:{},select_language:Boolean,full_path:String,onOpenFolder:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onShowSettings:Function,onCopyfunction_callName:Function,onToggleFavorite:Function},components:{InteractiveMenu:KC},data(){return{mounted:!1,name:this.function_call.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0},showHelpPopup:!1,renderedHelp:""}},computed:{commandsList(){let t=[{name:this.mounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.mounted?this.unmount:this.mount}];return console.log("this.category",this.function_call.category),this.function_call.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.mounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),t}},mounted(){this.mounted=this.function_call.mounted,console.log(this.function_call),Fe(()=>{Re.replace()})},methods:{show_settings(){this.onShowSettings(this)},formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return Pmr+this.function_call.avatar},defaultImg(t){t.target.src=kmr},toggleFavorite(){this.onToggleFavorite(this)},showFolder(){this.onOpenFolder(this)},toggleCopyLink(){this.onCopyfunction_callName(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.mounted=!1},showHelp(){this.renderedHelp=Kt(this.function_call.help),this.showHelpPopup=!0},closeHelp(){this.showHelpPopup=!1}},watch:{}},Mmr=["title"],Dmr={class:"flex-grow"},Nmr={class:"flex items-center mb-4"},Imr=["src"],Hmr={class:"font-bold text-xl text-gray-800 cursor-pointer"},Vmr={class:"text-sm text-gray-600"},qmr={class:"text-sm text-gray-600"},Umr={class:"text-sm text-gray-600"},Bmr={key:0,class:"text-sm text-gray-600"},zmr={key:1,class:"text-sm text-gray-600"},Xmr={class:"mb-4"},Fmr=["innerHTML"],jmr={class:"mt-auto pt-4 border-t"},Ymr={class:"flex justify-between items-center flex-wrap"},Gmr=["title"],Wmr=["fill"],Zmr=["src"],Kmr={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center"},Jmr={class:"bg-white p-4 rounded-lg shadow-lg w-[500px] h-[400px] flex flex-col"},egr={class:"flex justify-between items-center mb-2"},tgr={class:"flex-grow overflow-auto"},ngr=["innerHTML"];function rgr(t,e,n,r,i,s){const o=Xe("InteractiveMenu");return k(),R("div",{class:ye(["app-card flex flex-col h-full",i.mounted?"border-primary-light":"border-transparent"]),title:n.function_call.installed?"":"Not installed"},[b("div",Dmr,[b("div",Nmr,[b("img",{src:s.getImgUrl(),onError:e[0]||(e[0]=a=>s.defaultImg(a)),alt:"function_call Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4 cursor-pointer",onMouseover:e[1]||(e[1]=(...a)=>s.showThumbnail&&s.showThumbnail(...a)),onMousemove:e[2]||(e[2]=(...a)=>s.updateThumbnailPosition&&s.updateThumbnailPosition(...a)),onMouseleave:e[3]||(e[3]=(...a)=>s.hideThumbnail&&s.hideThumbnail(...a))},null,40,Imr),b("div",null,[b("h3",Hmr,ae(n.function_call.name),1),b("p",Vmr,"Author: "+ae(n.function_call.author),1),b("p",qmr,"Version: "+ae(n.function_call.version),1),b("p",Umr,"Category: "+ae(n.function_call.category),1),n.function_call.creation_date?(k(),R("p",Bmr,"Creation Date: "+ae(s.formatDate(n.function_call.creation_date)),1)):ne("",!0),n.function_call.last_update_date?(k(),R("p",zmr,"Last update Date: "+ae(s.formatDate(n.function_call.last_update_date)),1)):ne("",!0)]),n.function_call.help?(k(),R("button",{key:0,onClick:e[4]||(e[4]=(...a)=>s.showHelp&&s.showHelp(...a)),class:"ml-2 text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Help"},e[9]||(e[9]=[b("i",{"data-feather":"help-circle",class:"h-6 w-6"},null,-1)]))):ne("",!0)]),b("div",Xmr,[e[10]||(e[10]=b("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),b("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:n.function_call.description},null,8,Fmr)])]),b("div",jmr,[b("div",Ymr,[b("button",{onClick:e[5]||(e[5]=(...a)=>s.toggleFavorite&&s.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),R("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:t.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[11]||(e[11]=[b("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,Wmr))],8,Gmr),b("button",{onClick:e[6]||(e[6]=(...a)=>s.showFolder&&s.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},e[12]||(e[12]=[b("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1)])),i.mounted?(k(),R("button",{key:0,onClick:e[7]||(e[7]=(...a)=>s.show_settings&&s.show_settings(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Settings"},e[13]||(e[13]=[b("i",{"data-feather":"settings",class:"h-6 w-6"},null,-1)]))):ne("",!0),te(o,{commands:s.commandsList,force_position:2,title:"Menu",class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out"},null,8,["commands"])])]),i.thumbnailVisible?(k(),R("div",{key:0,style:qn({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[b("img",{src:s.getImgUrl(),class:"w-full h-full object-fill"},null,8,Zmr)],4)):ne("",!0),i.showHelpPopup?(k(),R("div",Kmr,[b("div",Jmr,[b("div",egr,[e[14]||(e[14]=b("h2",{class:"text-lg font-bold"},"Help",-1)),b("button",{onClick:e[8]||(e[8]=(...a)=>s.closeHelp&&s.closeHelp(...a)),class:"text-red-500 hover:text-red-600"},"Close")]),b("div",tgr,[b("div",{innerHTML:i.renderedHelp},null,8,ngr)])])])):ne("",!0)],10,Mmr)}const igr=st(Rmr,[["render",rgr]]),sgr="/assets/default_function-CyfcuNmo.png";function ogr(t,e){let n;return function(...i){const s=()=>{clearTimeout(n),t.apply(this,i)};clearTimeout(n),n=setTimeout(s,e)}}const agr={name:"FunctionCallsZoo",components:{FunctionEntry:igr},props:{config:{type:Object,required:!0},api_post_req:{type:Function,required:!0},api_get_req:{type:Function,required:!0},show_toast:{type:Function,required:!0},show_yes_no_dialog:{type:Function,required:!0},show_universal_form:{type:Function,required:!0},show_message_box:{type:Function,required:!0},client_id:{type:String,required:!0}},emits:["update:setting"],data(){return{allFunctions:[],categoriesFunc:[],filteredFunctions:[],pagedFunctions:[],isLoadingFunctions:!1,isSearchingFunc:!1,searchTermFunc:"",selectedCategoryFunc:"",sortOptionFunc:"mounted",itemsPerPageFunc:15,currentPageFunc:1,maxDisplayedMountedFunc:7,functionEntryRefs:{},observerFunc:null,defaultIcon:sgr,axiosBaseUrl:Ae.defaults.baseURL||""}},computed:{mountedFunctionPathsSet(){var t;return new Set(((t=this.config)==null?void 0:t.mounted_functions)||[])},mountedFunctions(){return this.allFunctions.filter(t=>this.mountedFunctionPathsSet.has(t.full_path))},displayedMountedFunctions(){return[...this.mountedFunctions].sort((e,n)=>(e.name||"").localeCompare(n.name||"")).slice(0,this.maxDisplayedMountedFunc)},hasMoreFunctionsToLoad(){return this.pagedFunctions.length{const i=e.has(r.full_path);r.isMounted!==i&&(r.isMounted=i,n=!0)}),n&&(console.log("Watcher: Re-applying filters and sort due to mounted status change."),this.resetAndReloadFunctions()),this.featherReplace()},deep:!0},searchTermFunc(){this.debouncedResetAndReload()},selectedCategoryFunc(){this.debouncedResetAndReload()},sortOptionFunc(){this.debouncedResetAndReload()},allFunctions:{handler(){console.log("Watcher: allFunctions list changed. Triggering initial load."),this.resetAndReloadFunctions()}}},methods:{getFunctionIcon(t){return t?t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?t.startsWith("/")?`${this.axiosBaseUrl}${t}`:t:`${this.axiosBaseUrl}/${t}`:this.defaultIcon},imgPlaceholder(t){t.target.src=this.defaultIcon},featherReplace(){this.$nextTick(()=>{try{Re.replace()}catch(t){console.error("Feather replace error:",t)}})},setFunctionRef(t,e){e&&(this.functionEntryRefs[t]=e)},async fetchFunctionsAndCategories(){if(!this.isLoadingFunctions){this.isLoadingFunctions=!0,console.log("Fetching functions and categories...");try{const t=await this.api_get_req("list_function_calls"),e=(t==null?void 0:t.function_calls)||[],n=new Set(e.map(r=>r.category).filter(Boolean));this.categoriesFunc=Array.from(n).sort(),this.allFunctions=e.map(r=>{const i=`${r.category}/${r.name}`,s=r.id||i;return{...r,full_path:i,isMounted:!1,id:s,isProcessing:!1}}),console.log(`Fetched ${this.allFunctions.length} total functions.`),this.$nextTick(()=>{var r;(r=this.config)!=null&&r.mounted_functions&&this.watch["config.mounted_functions"].handler.call(this,this.config.mounted_functions)})}catch(t){this.show_toast("Failed to load functions list.",4,!1),console.error("Error fetching functions:",t),this.allFunctions=[],this.categoriesFunc=[]}finally{this.isLoadingFunctions=!1}}},applyFiltersAndSortFunc(){console.time("FilterSortFunctions");let t=[...this.allFunctions];if(this.selectedCategoryFunc&&(t=t.filter(e=>e.category===this.selectedCategoryFunc)),this.searchTermFunc){const e=this.searchTermFunc.toLowerCase();t=t.filter(n=>{var c,u,d,f,h;const r=(c=n.name)==null?void 0:c.toLowerCase().includes(e),i=(u=n.author)==null?void 0:u.toLowerCase().includes(e),s=(d=n.description)==null?void 0:d.toLowerCase().includes(e),o=(f=n.category)==null?void 0:f.toLowerCase().includes(e),a=(h=n.full_path)==null?void 0:h.toLowerCase().includes(e),l=Array.isArray(n.keywords)?n.keywords.some(p=>p.toLowerCase().includes(e)):!1;return r||i||s||o||a||l})}t.sort((e,n)=>{if(this.sortOptionFunc==="mounted"){if(e.isMounted&&!n.isMounted)return-1;if(!e.isMounted&&n.isMounted)return 1}switch(this.sortOptionFunc!=="mounted"?this.sortOptionFunc:"name"){case"name":return(e.name||"").localeCompare(n.name||"");case"author":return(e.author||"").localeCompare(n.author||"");case"category":return(e.category||"").localeCompare(n.category||"");default:return 0}}),this.filteredFunctions=t,console.timeEnd("FilterSortFunctions"),console.log(`Filtered/Sorted functions: ${this.filteredFunctions.length}`)},resetAndReloadFunctions(){this.currentPageFunc=1,this.pagedFunctions=[],this.applyFiltersAndSortFunc(),this.$nextTick(()=>{this.loadMoreFunctions()})},debouncedResetAndReload:ogr(function(){this.isSearchingFunc=!0,this.resetAndReloadFunctions(),setTimeout(()=>{this.isSearchingFunc=!1},100)},300),loadMoreFunctions(){if(this.isLoadingFunctions||this.isSearchingFunc||!this.hasMoreFunctionsToLoad)return;console.log(`Loading page ${this.currentPageFunc}`);const t=(this.currentPageFunc-1)*this.itemsPerPageFunc,e=t+this.itemsPerPageFunc,n=this.filteredFunctions.slice(t,e),r=new Set(this.pagedFunctions.map(s=>s.id||s.full_path)),i=n.filter(s=>!r.has(s.id||s.full_path));i.length>0?(this.pagedFunctions.push(...i),this.currentPageFunc++,this.featherReplace()):n.length>0&&console.log("Load more triggered but items already seem to be loaded.")},setFunctionProcessing(t,e){const n=s=>{s&&(s.isProcessing=e)},r=this.allFunctions.findIndex(s=>(s.id||s.full_path)===t);n(this.allFunctions[r]);const i=this.pagedFunctions.findIndex(s=>(s.id||s.full_path)===t);n(this.pagedFunctions[i])},async handleMount(t){if(t.isMounted||t.isProcessing)return;const e=t.id||t.full_path;this.setFunctionProcessing(e,!0),this.show_toast(`Mounting ${t.name}...`,3,!0);try{const n=await this.api_post_req("mount_function_call",{client_id:this.client_id,function_category:t.category,function_name:t.name});if(n&&n.status){this.show_toast(`${t.name} mounted successfully.`,4,!0);const r=[...this.mountedFunctionPathsSet,t.full_path];this.$emit("update:setting",{key:"mounted_functions",value:r})}else this.show_toast(`Failed to mount ${t.name}: ${(n==null?void 0:n.error)||"Error"}`,4,!1)}catch(n){this.show_toast(`Error mounting ${t.name}: ${n.message||n}`,4,!1),console.error("Mount error:",n)}finally{this.setFunctionProcessing(e,!1)}},async handleUnmount(t){var n;if(!t.isMounted||t.isProcessing)return;const e=t.id||t.full_path;this.setFunctionProcessing(e,!0),this.show_toast(`Unmounting ${t.name}...`,3,!0);try{const r=await this.api_post_req("unmount_function_call",{client_id:this.client_id,function_category:t.category,function_name:t.name});if(r&&r.status){this.show_toast(`${t.name} unmounted.`,4,!0);const i=(((n=this.config)==null?void 0:n.mounted_functions)||[]).filter(s=>s!==t.full_path);this.$emit("update:setting",{key:"mounted_functions",value:i})}else this.show_toast(`Failed to unmount ${t.name}: ${(r==null?void 0:r.error)||"Error"}`,4,!1)}catch(r){this.show_toast(`Error unmounting ${t.name}: ${r.message||r}`,4,!1),console.error("Unmount error:",r)}finally{this.setFunctionProcessing(e,!1)}},async unmountAll(){if(!(this.mountedFunctions.length===0||!await this.show_yes_no_dialog(`Unmount all ${this.mountedFunctions.length} functions?`,"Unmount All","Cancel"))){this.show_toast("Unmounting all functions...",3,!0),this.mountedFunctions.forEach(e=>this.setFunctionProcessing(e.id||e.full_path,!0));try{const e=await this.api_post_req("unmount_all_functions",{client_id:this.client_id});e&&e.status?(this.show_toast("All functions unmounted.",4,!0),this.$emit("update:setting",{key:"mounted_functions",value:[]})):(this.show_toast(`Failed to unmount all: ${(e==null?void 0:e.error)||"Error"}`,4,!1),this.mountedFunctions.forEach(n=>this.setFunctionProcessing(n.id||n.full_path,!1)))}catch(e){this.show_toast(`Error unmounting all: ${e.message||e}`,4,!1),console.error("Unmount all error:",e),this.mountedFunctions.forEach(n=>this.setFunctionProcessing(n.id||n.full_path,!1))}}},async handleRemount(t){const e=t.id||t.full_path;if(!t.isProcessing){this.setFunctionProcessing(e,!0),this.show_toast(`Remounting ${t.name}...`,3,!0);try{let n=[...this.config.mounted_functions||[]];if(n.includes(t.full_path)){const s=await this.api_post_req("unmount_function_call",{client_id:this.client_id,function_category:t.category,function_name:t.name});if(!s||!s.status){this.show_toast(`Failed to unmount ${t.name} during remount. Aborting.`,4,!1),this.setFunctionProcessing(e,!1);return}n=n.filter(o=>o!==t.full_path),this.$emit("update:setting",{key:"mounted_functions",value:n}),await Fe(),console.log("Remount Step 1: Unmounted and emitted.")}const i=await this.api_post_req("mount_function_call",{client_id:this.client_id,function_category:t.category,function_name:t.name});i&&i.status?(this.show_toast(`${t.name} remounted successfully.`,4,!0),n.includes(t.full_path)||n.push(t.full_path),this.$emit("update:setting",{key:"mounted_functions",value:n}),console.log("Remount Step 2: Mounted and emitted.")):this.show_toast(`Failed to mount ${t.name} during remount: ${(i==null?void 0:i.error)||"Error"}`,4,!1)}catch(n){this.show_toast(`Error remounting ${t.name}: ${n.message||n}`,4,!1),console.error("Remount error:",n)}finally{this.setFunctionProcessing(e,!1)}}},async handleSettings(t){if(t.isProcessing)return;const e=t.id||t.full_path;this.setFunctionProcessing(e,!0);try{const n=await this.api_post_req("get_function_call_settings",{client_id:this.client_id,category:t.category,name:t.name});if(n&&typeof n=="object"&&Object.keys(n).length>0){const r=await this.show_universal_form(n,`Function Settings - ${t.name}`,"Save","Cancel");if(r!=null){const i=await this.api_post_req("set_function_call_settings",{client_id:this.client_id,category:t.category,name:t.name,settings:r});i&&i.status?this.show_toast(`Settings for ${t.name} updated.`,4,!0):this.show_toast(`Failed to update settings for ${t.name}: ${(i==null?void 0:i.error)||"Error"}`,4,!1)}else this.show_toast(`Settings update for ${t.name} cancelled.`,3,!0)}else n&&typeof n=="object"&&Object.keys(n).length===0?this.show_message_box(`Function "${t.name}" has no configurable settings.`):this.show_toast(`Could not retrieve settings for ${t.name}: ${(n==null?void 0:n.error)||"Invalid response"}`,4,!1)}catch(n){this.show_toast(`Error accessing settings for ${t.name}: ${n.message||n}`,4,!1),console.error("Settings error:",n)}finally{this.setFunctionProcessing(e,!1)}},async handleEdit(t){this.show_toast(`Opening folder containing "${t.name}" for editing...`,3,!0),await this.handleOpenFolder(t)},async handleCopyToCustom(t){if(!await this.show_yes_no_dialog(`Copy "${t.name}" from "${t.category}" to your 'custom_functions' folder?`,"Copy","Cancel")||t.isProcessing)return;const n=t.id||t.full_path;this.setFunctionProcessing(n,!0);try{const r=await this.api_post_req("copy_to_custom_functions",{client_id:this.client_id,category:t.category,name:t.name});r&&r.status?(this.show_message_box(`Function "${t.name}" copied to 'custom_functions'. The list will refresh shortly.`),await this.fetchFunctionsAndCategories()):this.show_toast(`Failed to copy ${t.name}: ${(r==null?void 0:r.error)||"Already exists in custom?"}`,4,!1)}catch(r){this.show_toast(`Error copying ${t.name}: ${r.message||r}`,4,!1),console.error("Copy to custom error:",r)}finally{this.setFunctionProcessing(n,!1)}},handleCopyName(t){navigator.clipboard.writeText(t.name).then(()=>this.show_toast(`Copied name: ${t.name}`,3,!0)).catch(e=>{this.show_toast("Failed to copy name to clipboard.",3,!1),console.error("Clipboard copy failed:",e)})},async handleOpenFolder(t){try{await this.api_post_req("open_function_folder",{client_id:this.client_id,category:t.category,name:t.name})}catch(e){this.show_toast(`Error opening folder for ${t.name}: ${e.message||e}`,4,!1),console.error("Open folder error:",e)}},scrollToFunction(t){const e=t.id||t.full_path,n=this.functionEntryRefs[e];if(n&&n.$el){const r=n.$el;r.scrollIntoView({behavior:"smooth",block:"center"}),r.classList.add("ring-2","ring-offset-2","ring-blue-500","dark:ring-offset-gray-800","transition-all","duration-1000","ease-out"),setTimeout(()=>{r.classList.remove("ring-2","ring-offset-2","ring-blue-500","dark:ring-offset-gray-800","transition-all","duration-1000","ease-out")},1500)}else console.warn(`Could not find ref $el to scroll to for function ID: ${e}. Is it loaded?`),this.hasMoreFunctionsToLoad&&!this.pagedFunctions.some(r=>(r.id||r.full_path)===e)?(this.show_toast(`Function ${t.name} not visible, attempting to load more...`,3,!0),this.loadMoreFunctions(),setTimeout(()=>this.scrollToFunction(t),500)):this.show_toast(`Could not scroll to ${t.name}.`,3,!1)},setupIntersectionObserverFunc(){this.disconnectIntersectionObserver();const t={root:null,rootMargin:"100px",threshold:.1};this.observerFunc=new IntersectionObserver(n=>{n.forEach(r=>{r.isIntersecting&&this.hasMoreFunctionsToLoad&&this.loadMoreFunctions()})},t);const e=this.$refs.loadMoreTriggerFunc;e?(this.observerFunc.observe(e),console.log("IntersectionObserver setup complete.")):this.$nextTick(()=>{const n=this.$refs.loadMoreTriggerFunc;n?(this.observerFunc.observe(n),console.log("IntersectionObserver setup complete (nextTick).")):console.error("Load more trigger element not found for IntersectionObserver setup.")})},disconnectIntersectionObserver(){if(this.observerFunc){console.log("Disconnecting IntersectionObserver.");const t=this.$refs.loadMoreTriggerFunc;if(t)try{this.observerFunc.unobserve(t)}catch(e){console.warn("Error unobserving trigger:",e)}this.observerFunc.disconnect(),this.observerFunc=null}}},mounted(){console.log("FunctionCallsZoo Mounted."),this.fetchFunctionsAndCategories(),this.featherReplace(),this.$nextTick(()=>{this.setupIntersectionObserverFunc()})},beforeUpdate(){this.functionEntryRefs={}},updated(){this.featherReplace(),this.$nextTick(()=>{const t=this.$refs.loadMoreTriggerFunc;if(t&&this.observerFunc&&!this.observerFunc.takeRecords().some(e=>e.target===t)){console.warn("IntersectionObserver detached from trigger, re-observing.");try{this.observerFunc.unobserve(t)}catch{}this.observerFunc.observe(t)}else t&&!this.observerFunc&&(console.warn("IntersectionObserver lost, re-setting up."),this.setupIntersectionObserverFunc())})},unmounted(){console.log("FunctionCallsZoo Unmounted."),this.disconnectIntersectionObserver()}},lgr={class:"user-settings-panel space-y-6 p-4 md:p-6 rounded-lg shadow-md bg-white dark:bg-gray-800"},cgr={class:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b border-blue-300 dark:border-blue-600 pb-3 mb-4"},ugr={class:"flex flex-col items-end"},dgr={class:"flex items-center flex-wrap gap-2 text-sm font-medium mb-1"},fgr={key:0,class:"text-blue-500 dark:text-blue-500 italic text-xs"},hgr={key:1,class:"flex -space-x-3 items-center"},pgr=["src","title","onClick"],Tgr=["onClick"],Ogr=["title"],mgr={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4 items-center"},ggr={class:"relative md:col-span-1"},Qgr={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center"},_gr={class:"md:col-span-1"},vgr=["value"],ygr={class:"md:col-span-1"},bgr={key:0,class:"flex justify-center items-center p-10 text-blue-500 dark:text-blue-400"},Sgr={key:1,class:"text-center text-blue-500 dark:text-blue-400 py-10"},xgr={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 scrollbar-thin scrollbar-thumb-blue-300 scrollbar-track-blue-100 dark:scrollbar-thumb-blue-700 dark:scrollbar-track-blue-900",ref:"scrollContainerFunc"},Egr={ref:"loadMoreTriggerFunc",class:"h-10"},wgr={key:0,class:"flex justify-center items-center text-center text-blue-500 dark:text-blue-400 py-4"};function Cgr(t,e,n,r,i,s){const o=Xe("FunctionEntry");return k(),R("div",lgr,[b("div",cgr,[e[9]||(e[9]=b("h2",{class:"text-2xl font-semibold text-blue-800 dark:text-blue-100 mb-2 sm:mb-0"}," Function Calls Zoo ",-1)),b("div",ugr,[b("div",dgr,[e[7]||(e[7]=b("span",{class:"text-blue-600 dark:text-blue-400"},"Mounted:",-1)),s.mountedFunctions.length===0?(k(),R("div",fgr,"None")):(k(),R("div",hgr,[(k(!0),R(Ve,null,dt(s.displayedMountedFunctions,(a,l)=>(k(),R("div",{key:`mounted-${a.id||a.full_path||l}`,class:"relative group"},[b("img",{src:s.getFunctionIcon(a.icon),onError:e[0]||(e[0]=(...c)=>s.imgPlaceholder&&s.imgPlaceholder(...c)),class:"w-7 h-7 rounded-full object-cover ring-2 ring-white dark:ring-gray-700 cursor-pointer hover:ring-blue-500 dark:hover:ring-blue-400 transition-all",title:`${a.name} (${a.category})`,onClick:c=>s.scrollToFunction(a)},null,40,pgr),b("button",{onClick:oe(c=>s.handleUnmount(a),["stop"]),class:"absolute -top-1 -right-1 p-0.5 rounded-full bg-red-600 text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-1 dark:focus:ring-offset-gray-900",title:"Unmount"},e[6]||(e[6]=[b("i",{"data-feather":"x",class:"w-3 h-3 stroke-current"},null,-1)]),8,Tgr)]))),128)),s.mountedFunctions.length>i.maxDisplayedMountedFunc?(k(),R("div",{key:0,class:"w-7 h-7 rounded-full bg-blue-200 dark:bg-blue-700 ring-2 ring-white dark:ring-gray-700 flex items-center justify-center text-xs font-semibold text-blue-600 dark:text-blue-300",title:`${s.mountedFunctions.length-i.maxDisplayedMountedFunc} more mounted`}," +"+ae(s.mountedFunctions.length-i.maxDisplayedMountedFunc),9,Ogr)):ne("",!0)]))]),s.mountedFunctions.length>0?(k(),R("button",{key:0,onClick:e[1]||(e[1]=(...a)=>s.unmountAll&&s.unmountAll(...a)),class:"btn btn-sm bg-red-600 hover:bg-red-700 text-white text-xs mt-1 focus:ring-red-300 dark:focus:ring-red-600"},e[8]||(e[8]=[b("i",{"data-feather":"x-octagon",class:"w-3 h-3 mr-1 stroke-current"},null,-1),Se("Unmount All ")]))):ne("",!0)])]),e[18]||(e[18]=b("p",{class:"text-sm text-blue-600 dark:text-blue-400"}," Mount functions to grant the AI specific capabilities and tools it can use during conversations. Requires a model trained for function calling. ",-1)),b("div",mgr,[b("div",ggr,[e[11]||(e[11]=b("div",{class:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"},[b("i",{"data-feather":"search",class:"w-5 h-5 text-blue-400 dark:text-blue-500"})],-1)),He(b("input",{type:"search","onUpdate:modelValue":e[2]||(e[2]=a=>i.searchTermFunc=a),placeholder:"Search functions...",class:"input pl-10 w-full placeholder:text-blue-400 dark:placeholder:text-blue-500",onInput:e[3]||(e[3]=(...a)=>t.debounceSearchFunc&&t.debounceSearchFunc(...a))},null,544),[[vt,i.searchTermFunc]]),i.isSearchingFunc?(k(),R("div",Qgr,e[10]||(e[10]=[b("svg",{"aria-hidden":"true",class:"w-5 h-5 text-blue-400 dark:text-blue-500 animate-spin fill-blue-500 dark:fill-blue-400",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),Se(),b("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)]))):ne("",!0)]),b("div",_gr,[e[13]||(e[13]=b("label",{for:"func-category",class:"sr-only"},"Filter by Category",-1)),He(b("select",{id:"func-category","onUpdate:modelValue":e[4]||(e[4]=a=>i.selectedCategoryFunc=a),class:"input w-full"},[e[12]||(e[12]=b("option",{value:""},"All Categories",-1)),(k(!0),R(Ve,null,dt(i.categoriesFunc,a=>(k(),R("option",{key:a,value:a},ae(a),9,vgr))),128))],512),[[$s,i.selectedCategoryFunc]])]),b("div",ygr,[e[15]||(e[15]=b("label",{for:"func-sort",class:"sr-only"},"Sort functions by",-1)),He(b("select",{id:"func-sort","onUpdate:modelValue":e[5]||(e[5]=a=>i.sortOptionFunc=a),class:"input w-full"},e[14]||(e[14]=[b("option",{value:"mounted"},"Sort by Mounted",-1),b("option",{value:"name"},"Sort by Name",-1),b("option",{value:"author"},"Sort by Author",-1),b("option",{value:"category"},"Sort by Category",-1)]),512),[[$s,i.sortOptionFunc]])])]),i.isLoadingFunctions?(k(),R("div",bgr,e[16]||(e[16]=[b("svg",{"aria-hidden":"true",class:"w-8 h-8 mr-2 text-blue-300 dark:text-blue-600 animate-spin fill-blue-500 dark:fill-blue-400",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),Se(),b("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),b("span",null,"Loading functions...",-1)]))):i.pagedFunctions.length===0&&i.filteredFunctions.length===0?(k(),R("div",Sgr," No functions found"+ae(i.searchTermFunc?' matching "'+i.searchTermFunc+'"':"")+ae(i.selectedCategoryFunc?' in category "'+i.selectedCategoryFunc+'"':"")+". ",1)):ne("",!0),b("div",xgr,[(k(!0),R(Ve,null,dt(i.pagedFunctions,a=>(k(),Qt(o,{key:a.id||a.full_path,ref_for:!0,ref:l=>s.setFunctionRef(a.id||a.full_path,l),function_call:a,"is-mounted":a.isMounted,"is-processing":a.isProcessing,"get-icon-url":s.getFunctionIcon,"on-img-error":s.imgPlaceholder,onMount:l=>s.handleMount(a),onUnmount:l=>s.handleUnmount(a),onRemount:l=>s.handleRemount(a),onShowSettings:l=>s.handleSettings(a),onEdit:l=>s.handleEdit(a),onCopyToCustom:l=>s.handleCopyToCustom(a),onCopyName:l=>s.handleCopyName(a),onOpenFolder:l=>s.handleOpenFolder(a)},null,8,["function_call","is-mounted","is-processing","get-icon-url","on-img-error","onMount","onUnmount","onRemount","onShowSettings","onEdit","onCopyToCustom","onCopyName","onOpenFolder"]))),128))],512),b("div",Egr,[s.hasMoreFunctionsToLoad&&!i.isLoadingFunctions&&!i.isSearchingFunc?(k(),R("div",wgr,e[17]||(e[17]=[b("svg",{"aria-hidden":"true",class:"w-5 h-5 mr-2 text-blue-300 dark:text-blue-600 animate-spin fill-blue-500 dark:fill-blue-400",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),Se(),b("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),b("span",null,"Loading more...",-1)]))):ne("",!0)],512)])}const Lgr=st(agr,[["render",Cgr],["__scopeId","data-v-8ff7e3ea"]]),$gr={name:"ModelConfigSettings",components:{ToggleSwitch:ju},props:{config:{type:Object,required:!0},loading:{type:Boolean,default:!1}},emits:["setting-updated"],computed:{isDisabled(){return!this.config.override_personality_model_parameters}},methods:{updateValue(t,e){this.$emit("setting-updated",{key:t,value:e})},handleNumberInput(t,e,n=!1){let r=n?parseInt(e):parseFloat(e);if(t==="seed"){if(String(e)==="-")return;(isNaN(r)||r<-1)&&(r=-1)}else if(isNaN(r)){console.warn(`Attempted to set invalid number for ${t}:`,e);return}this.updateValue(t,r)},replaceFeatherIcons(){Fe(()=>{try{Re.replace()}catch{}})}},mounted(){this.replaceFeatherIcons()},updated(){this.replaceFeatherIcons()}},Agr={class:"user-settings-panel space-y-6"},kgr={class:"toggle-item !justify-start gap-4 border border-blue-200 dark:border-blue-700 rounded-lg p-3 panels-color"},Pgr={class:"setting-item"},Rgr=["value","disabled"],Mgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},Dgr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},Ngr=["value","disabled"],Igr=["value","disabled"],Hgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},Vgr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},qgr=["value","disabled"],Ugr=["value","disabled"],Bgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},zgr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},Xgr=["value","disabled"],Fgr=["value","disabled"],jgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},Ygr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},Ggr=["value","disabled"],Wgr=["value","disabled"],Zgr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},Kgr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},Jgr=["value","disabled"],eQr=["value","disabled"],tQr={class:"setting-item items-start md:items-center border-t border-blue-200 dark:border-blue-700 pt-4 mt-4"},nQr={class:"flex-1 flex flex-col sm:flex-row items-center gap-4 w-full"},rQr=["value","disabled"],iQr=["value","disabled"];function sQr(t,e,n,r,i,s){const o=Xe("ToggleSwitch");return k(),R("div",Agr,[e[22]||(e[22]=b("h2",{class:"text-xl font-semibold text-blue-800 dark:text-blue-100 border-b border-blue-300 dark:border-blue-600 pb-2"}," Model Generation Parameters ",-1)),e[23]||(e[23]=b("p",{class:"text-sm text-blue-600 dark:text-blue-400 mb-4"}," Adjust the core parameters that influence how the AI generates text. These settings can be overridden by specific personalities unless the option below is checked. ",-1)),b("div",kgr,[te(o,{id:"override_personality_model_parameters",checked:n.config.override_personality_model_parameters,"onUpdate:checked":e[0]||(e[0]=a=>s.updateValue("override_personality_model_parameters",a))},null,8,["checked"]),e[14]||(e[14]=b("label",{for:"override_personality_model_parameters",class:"toggle-label !flex-none"},[Se(" Override Personality Parameters "),b("span",{class:"toggle-description"},"Force the use of these global parameters, ignoring any settings defined within the selected personality.")],-1))]),b("div",{class:ye(["space-y-5 pt-4",s.isDisabled?"opacity-50 pointer-events-none":""])},[b("div",Pgr,[e[15]||(e[15]=To('',1)),b("input",{type:"number",id:"seed",value:n.config.seed,onInput:e[1]||(e[1]=a=>s.handleNumberInput("seed",a.target.value,!0)),class:"input-sm w-full md:w-32",step:"1",placeholder:"-1",disabled:s.isDisabled},null,40,Rgr)]),b("div",Mgr,[e[16]||(e[16]=To('',1)),b("div",Dgr,[b("input",{id:"temperature-range",value:n.config.temperature,onInput:e[2]||(e[2]=a=>s.handleNumberInput("temperature",a.target.value)),type:"range",min:"0",max:"2",step:"0.01",class:"range-input flex-grow",disabled:s.isDisabled},null,40,Ngr),b("input",{id:"temperature-number",value:n.config.temperature,onInput:e[3]||(e[3]=a=>s.handleNumberInput("temperature",a.target.value)),type:"number",min:"0",max:"2",step:"0.01",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,Igr)])]),b("div",Hgr,[e[17]||(e[17]=To('',1)),b("div",Vgr,[b("input",{id:"n_predict-range",value:n.config.n_predict,onInput:e[4]||(e[4]=a=>s.handleNumberInput("n_predict",a.target.value,!0)),type:"range",min:"32",max:"8192",step:"32",class:"range-input flex-grow",disabled:s.isDisabled},null,40,qgr),b("input",{id:"n_predict-number",value:n.config.n_predict,onInput:e[5]||(e[5]=a=>s.handleNumberInput("n_predict",a.target.value,!0)),type:"number",min:"32",max:"8192",step:"32",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,Ugr)])]),b("div",Bgr,[e[18]||(e[18]=To('',1)),b("div",zgr,[b("input",{id:"top_k-range",value:n.config.top_k,onInput:e[6]||(e[6]=a=>s.handleNumberInput("top_k",a.target.value,!0)),type:"range",min:"0",max:"100",step:"1",class:"range-input flex-grow",disabled:s.isDisabled},null,40,Xgr),b("input",{id:"top_k-number",value:n.config.top_k,onInput:e[7]||(e[7]=a=>s.handleNumberInput("top_k",a.target.value,!0)),type:"number",min:"0",max:"100",step:"1",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,Fgr)])]),b("div",jgr,[e[19]||(e[19]=To('',1)),b("div",Ygr,[b("input",{id:"top_p-range",value:n.config.top_p,onInput:e[8]||(e[8]=a=>s.handleNumberInput("top_p",a.target.value)),type:"range",min:"0",max:"1",step:"0.01",class:"range-input flex-grow",disabled:s.isDisabled},null,40,Ggr),b("input",{id:"top_p-number",value:n.config.top_p,onInput:e[9]||(e[9]=a=>s.handleNumberInput("top_p",a.target.value)),type:"number",min:"0",max:"1",step:"0.01",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,Wgr)])]),b("div",Zgr,[e[20]||(e[20]=To('',1)),b("div",Kgr,[b("input",{id:"repeat_penalty-range",value:n.config.repeat_penalty,onInput:e[10]||(e[10]=a=>s.handleNumberInput("repeat_penalty",a.target.value)),type:"range",min:"0.5",max:"2.0",step:"0.01",class:"range-input flex-grow",disabled:s.isDisabled},null,40,Jgr),b("input",{id:"repeat_penalty-number",value:n.config.repeat_penalty,onInput:e[11]||(e[11]=a=>s.handleNumberInput("repeat_penalty",a.target.value)),type:"number",min:"0.5",max:"2.0",step:"0.01",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,eQr)])]),b("div",tQr,[e[21]||(e[21]=To('',1)),b("div",nQr,[b("input",{id:"repeat_last_n-range",value:n.config.repeat_last_n,onInput:e[12]||(e[12]=a=>s.handleNumberInput("repeat_last_n",a.target.value,!0)),type:"range",min:"0",max:"512",step:"8",class:"range-input flex-grow",disabled:s.isDisabled},null,40,rQr),b("input",{id:"repeat_last_n-number",value:n.config.repeat_last_n,onInput:e[13]||(e[13]=a=>s.handleNumberInput("repeat_last_n",a.target.value,!0)),type:"number",min:"0",max:"512",step:"8",class:"input-sm w-24 text-center",disabled:s.isDisabled},null,40,iQr)])])],2)])}const oQr=st($gr,[["render",sQr],["__scopeId","data-v-1dc5e8f0"]]);Ae.defaults.baseURL="/";const Y8={accept:"application/json","Content-Type":"application/json"},aQr={name:"SettingsView",components:{SettingsSidebar:s5r},data(){return{isLoading:!1,settingsChanged:!1,has_updates:!1,activeSection:"system_status",loading_text:"Loading settings...",editableConfig:null,sections:[{id:"system_status",name:"System Status",icon:"activity",component:rs(F5r)},{id:"main_config",name:"Main Config",icon:"sliders",component:rs(i7r)},{id:"model_config",name:"Model Parameters",icon:"cpu",component:rs(oQr)},{id:"smart_routing",name:"Smart Routing",icon:"git-branch",component:rs(v6r)},{id:"data_management",name:"Data Management",icon:"database",component:rs(q8r)},{id:"internet",name:"Internet",icon:"wifi",component:rs(chr)},{id:"services_zoo",name:"Services Zoo",icon:"server",component:rs(p9r)},{id:"binding_zoo",name:"Bindings Zoo",icon:"link",component:rs(gpr)},{id:"models_zoo",name:"Models Zoo",icon:"package",component:rs(_Or)},{id:"personalities_zoo",name:"Personalities Zoo",icon:"users",component:rs(Amr)},{id:"function_calls_zoo",name:"Function Calls Zoo",icon:"tool",component:rs(Lgr)}]}},computed:{configToEdit(){return this.editableConfig??this.$store.state.config},currentComponent(){const t=this.sections.find(e=>e.id===this.activeSection);return t?t.component:null}},methods:{deepClone(t){if(t===null||typeof t!="object")return t;if(t instanceof Date)return new Date(t.getTime());if(Array.isArray(t)){const n=[];for(let r=0;r{e&&(this.cancelConfiguration(!1),this.activeSection=t)}):this.activeSection=t},handleSettingUpdated(t){this.editableConfig||(this.editableConfig=this.deepClone(this.$store.state.config));const e=t.key.split(".");let n=this.editableConfig;try{for(;e.length>1;){const a=e.shift(),l=a.match(/^(\w+)\[(\d+)\]$/);let c=a,u=-1;if(l&&(c=l[1],u=parseInt(l[2],10)),!n||typeof n!="object"||!n.hasOwnProperty(c))throw new Error(`Invalid path segment: ${c}`);if(u!==-1){if(!Array.isArray(n[c])||u>=n[c].length)throw new Error(`Invalid array index: ${u} for key ${c}`);n=n[c][u]}else n=n[c]}const r=e[0],i=r.match(/^(\w+)\[(\d+)\]$/);let s=r,o=-1;if(i&&(s=i[1],o=parseInt(i[2],10)),typeof n!="object"||n===null)throw new Error(`Cannot set property on non-object: ${r}`);if(o!==-1){if(!n.hasOwnProperty(s)||!Array.isArray(n[s])||o>=n[s].length)throw new Error(`Invalid final array index: ${o} for key ${s}`);n[s][o]=t.value}else n[s]=t.value;this.settingsChanged=!0}catch(r){this.$store.state.toast.showToast(`Error updating setting ${t.key}: ${r.message}`,4,!1)}},async refreshConfigInView(){this.isLoading=!0,this.loading_text="Refreshing config...";try{await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModelsArr"),this.editableConfig=null,this.settingsChanged=!1,this.$store.state.toast.showToast("Configuration refreshed.",2,!0)}catch(t){this.$store.state.toast.showToast("Failed to load configuration.",4,!1),console.error("Error refreshing config or model lists:",t),this.editableConfig=null,this.settingsChanged=!1}finally{this.isLoading=!1,Fe(()=>{Re.replace()})}},async applyConfiguration(){if(!this.settingsChanged||!this.editableConfig){this.$store.state.toast.showToast("No changes to apply.",3,!1);return}this.isLoading=!0,this.loading_text="Applying settings...";let t=!1;try{const e=await Ae.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.editableConfig},{headers:Y8});e.data.status?(this.$store.state.toast.showToast("Settings applied. Refreshing...",4,!0),t=!0,await this.refreshConfigInView()):this.$store.state.toast.showToast(`Apply failed: ${e.data.error||"Error"}`,4,!1)}catch(e){this.$store.state.toast.showToast(`Error applying settings: ${e.message||e}`,4,!1)}finally{t||(this.isLoading=!1)}},cancelConfiguration(t=!0){this.editableConfig=null,this.settingsChanged=!1},async saveConfiguration(){this.isLoading=!0,this.loading_text="Saving configuration...";try{const t=await Ae.post("/save_settings",{client_id:this.$store.state.client_id},{headers:Y8});t.data.status?this.$store.state.toast.showToast("Settings saved successfully.",4,!0):this.$store.state.messageBox.showMessage(`Error saving settings: ${t.data.error||"Error"}`)}catch(t){this.$store.state.messageBox.showMessage(`Error saving settings: ${t.message}`)}finally{this.isLoading=!1,this.$store.commit("refreshBindings"),this.$store.commit("refreshModelsZoo")}},reset_configuration(){this.$store.state.yesNoDialog.askQuestion("Reset config to default? This deletes current settings.","Reset","Cancel").then(async t=>{if(t){this.isLoading=!0,this.loading_text="Resetting...";let e=!1;try{const n=await Ae.post("/reset_settings",{client_id:this.$store.state.client_id},{headers:Y8});n.data.status?(this.$store.state.messageBox.showMessage("Settings reset. Reloading..."),e=!0,setTimeout(()=>window.location.reload(),2e3)):this.$store.state.messageBox.showMessage(`Reset failed: ${n.data.error||"Error"}`)}catch(n){this.$store.state.messageBox.showMessage(`Reset failed: ${n.message}`)}finally{e||(this.isLoading=!1)}}})},async restart_program(){this.loading_text="Restarting...",this.isLoading=!0;let t=!1;try{const e=await this.api_post_req("restart_program");e.status?(this.$store.state.toast.showToast("Restarting LoLLMs...",4,!0),t=!0):this.$store.state.toast.showToast(`Restart command failed: ${e.error||"Error"}`,4,!1)}catch{}finally{t||(this.isLoading=!1)}},async clear_uploads(){this.loading_text="Clearing uploads...",this.isLoading=!0;try{const t=await this.api_get_req("clear_uploads");t.status?this.$store.state.toast.showToast("Uploads folder cleared!",4,!0):this.$store.state.toast.showToast(`Clear failed: ${t.error||"Error"}`,4,!1)}catch{}finally{this.isLoading=!1}},async update_software(){this.loading_text="Updating...",this.isLoading=!0;let t=!1;try{const e=await this.api_post_req("update_software");this.$store.state.toast.showToast("Update initiated. LoLLMs might restart.",4,!0),this.has_updates=!1,t=!0,e.status||this.$store.state.toast.showToast(`Update command sent, server reported issue: ${e.error||"Unknown"}`,4,!1)}catch{}finally{t||(this.isLoading=!1)}},async updateHasUpdates(){try{const t=await this.api_get_req("check_update");this.has_updates=(t==null?void 0:t.update_availability)||!1,Fe(()=>{Re.replace()})}catch{this.has_updates=!1}},async api_get_req(t){if(this.$store.state.api_get_req)return this.$store.state.api_get_req(t);try{return(await Ae.get(`/${t}?client_id=${this.$store.state.client_id}`)).data}catch(e){throw this.$store.state.toast.showToast(`GET Error: ${e.message}`,4,!1),e}},async api_post_req(t,e={}){if(this.$store.state.api_post_req)return this.$store.state.api_post_req(t,e);try{const n={...e,client_id:this.$store.state.client_id};return(await Ae.post(`/${t}`,n,{headers:Y8})).data}catch(n){throw this.$store.state.toast.showToast(`POST Error: ${n.message}`,4,!1),n}}},mounted(){this.refreshConfigInView(),this.updateHasUpdates(),Fe(()=>{Re.replace()})},updated(){Fe(()=>{Re.replace()})}},lQr={class:"flex h-screen w-screen font-sans antialiased theme-bg-primary theme-text-primary"},cQr={class:"flex-1 flex flex-col overflow-hidden"},uQr={class:"flex items-center gap-4 flex-1"},dQr={key:0,class:"flex items-center gap-2 theme-text-warning animate-pulse"},fQr={key:1,class:"flex gap-3 items-center"},hQr={key:0,class:"flex items-center gap-2"},pQr={key:1,class:"flex items-center gap-2 text-sm theme-text-muted"},TQr={class:"flex-1 overflow-x-hidden overflow-y-auto theme-scrollbar p-6"},OQr={key:1,class:"flex justify-center items-center h-full theme-text-secondary"};function mQr(t,e,n,r,i,s){const o=Xe("SettingsSidebar");return k(),R("div",lQr,[te(o,{sections:i.sections,"active-section":i.activeSection,"onUpdate:activeSection":s.setActiveSection,class:"flex-shrink-0 w-64 border-r theme-border-primary theme-bg-secondary overflow-y-auto theme-scrollbar"},null,8,["sections","active-section","onUpdate:activeSection"]),b("div",cQr,[b("div",{class:ye(["sticky top-0 z-20 flex items-center justify-between p-3 gap-3 shadow-md theme-bg-secondary theme-border-b theme-border-primary",i.isLoading?"opacity-50 pointer-events-none":""])},[b("div",uQr,[i.settingsChanged&&!i.isLoading?(k(),R("div",dQr,e[6]||(e[6]=[b("i",{"data-feather":"alert-circle",class:"w-5 h-5"},null,-1),b("span",{class:"text-sm font-medium"},"Settings have changed",-1)]))):ne("",!0),!i.settingsChanged&&!i.isLoading?(k(),R("div",fQr,[b("button",{title:"Reset configuration to default",class:"icon-button theme-text-secondary hover:theme-text-primary",onClick:e[0]||(e[0]=a=>s.reset_configuration())},e[7]||(e[7]=[b("i",{"data-feather":"refresh-ccw"},null,-1)])),b("button",{title:"Restart program",class:"icon-button theme-text-secondary hover:theme-text-primary",onClick:e[1]||(e[1]=a=>s.restart_program())},e[8]||(e[8]=[b("i",{"data-feather":"power"},null,-1)])),b("button",{title:"Clear uploads folder",class:"icon-button theme-text-secondary hover:theme-text-danger",onClick:e[2]||(e[2]=a=>s.clear_uploads())},e[9]||(e[9]=[b("i",{"data-feather":"trash-2"},null,-1)])),i.has_updates?(k(),R("button",{key:0,title:"Upgrade program",class:"icon-button theme-text-success hover:theme-text-primary relative",onClick:e[3]||(e[3]=a=>s.update_software())},e[10]||(e[10]=[b("i",{"data-feather":"arrow-up-circle"},null,-1),b("span",{class:"absolute top-0 right-0 block h-2 w-2 rounded-full theme-bg-danger ring-2 theme-ring-bg"},null,-1)]))):ne("",!0)])):ne("",!0)]),i.settingsChanged&&!i.isLoading?(k(),R("div",hQr,[b("button",{class:"flex items-center gap-2 px-3 py-1.5 rounded theme-button-success duration-150 active:scale-95",title:"Apply changes",type:"button",onClick:e[4]||(e[4]=oe(a=>s.applyConfiguration(),["stop"]))},e[11]||(e[11]=[b("span",{class:"font-medium text-sm"},"Apply",-1),b("i",{"data-feather":"check",class:"w-4 h-4"},null,-1)])),b("button",{class:"flex items-center gap-2 px-3 py-1.5 rounded theme-button-danger duration-150 active:scale-95",title:"Cancel changes",type:"button",onClick:e[5]||(e[5]=oe(a=>s.cancelConfiguration(),["stop"]))},e[12]||(e[12]=[b("span",{class:"font-medium text-sm"},"Cancel",-1),b("i",{"data-feather":"x",class:"w-4 h-4"},null,-1)]))])):ne("",!0),i.isLoading?(k(),R("div",pQr,[b("span",null,ae(i.loading_text),1),e[13]||(e[13]=b("svg",{"aria-hidden":"true",class:"w-5 h-5 animate-spin theme-spinner-color",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[b("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"}),b("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)),e[14]||(e[14]=b("span",{class:"sr-only"},"Loading...",-1))])):ne("",!0)],2),b("main",TQr,[s.configToEdit?(k(),Qt(t7(s.currentComponent),{key:0,config:s.configToEdit,loading:i.isLoading,onSettingUpdated:s.handleSettingUpdated,api_get_req:s.api_get_req,api_post_req:s.api_post_req,show_toast:this.$store.state.toast.showToast,show_yes_no_dialog:this.$store.state.yesNoDialog.askQuestion,show_message_box:this.$store.state.messageBox.showMessage,client_id:t.$store.state.client_id,show_universal_form:this.$store.state.universalForm.showForm},null,40,["config","loading","onSettingUpdated","api_get_req","api_post_req","show_toast","show_yes_no_dialog","show_message_box","client_id","show_universal_form"])):(k(),R("div",OQr,e[15]||(e[15]=[b("p",null,"Loading configuration...",-1)])))])])])}const gQr=st(aQr,[["render",mQr],["__scopeId","data-v-ea18b7b2"]]),QQr={components:{ClipBoardTextInput:Eoe,Card:zC},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};Ae.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}}},_Qr={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"},vQr={class:"mb-4"},yQr=["value"],bQr={class:"mb-4"},SQr={class:"mb-4"},xQr={class:"mb-4"},EQr={class:"mb-4"},wQr={class:"mb-4"},CQr={class:"mb-4"},LQr={key:1};function $Qr(t,e,n,r,i,s){const o=Xe("Card"),a=Xe("ClipBoardTextInput");return s.selectedModel!==null&&s.selectedModel.toLowerCase().includes("gptq")?(k(),R("div",_Qr,[b("form",{onSubmit:e[2]||(e[2]=oe((...l)=>s.submitForm&&s.submitForm(...l),["prevent"])),class:""},[te(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[te(o,{title:"Model",class:"",isHorizontal:!1},{default:Ie(()=>[b("div",vQr,[e[3]||(e[3]=b("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),He(b("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>s.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>t.setModel&&t.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(k(!0),R(Ve,null,dt(s.models,l=>(k(),R("option",{key:l,value:l},ae(l),9,yQr))),128))],544),[[$s,s.selectedModel]])])]),_:1}),te(o,{title:"Data",isHorizontal:!1},{default:Ie(()=>[b("div",bQr,[e[4]||(e[4]=b("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1)),te(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),te(o,{title:"Training",isHorizontal:!1},{default:Ie(()=>[b("div",SQr,[e[5]||(e[5]=b("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1)),te(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),b("div",xQr,[e[6]||(e[6]=b("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1)),te(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),b("div",EQr,[e[7]||(e[7]=b("label",{for:"max_length",class:"text-sm"},"Max Length:",-1)),te(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),b("div",wQr,[e[8]||(e[8]=b("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1)),te(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),te(o,{title:"Output",isHorizontal:!1},{default:Ie(()=>[b("div",CQr,[e[9]||(e[9]=b("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1)),te(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),te(o,{disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>e[10]||(e[10]=[b("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1)])),_:1})],32)])):(k(),R("div",LQr,[te(o,{title:"Info",class:"",isHorizontal:!1},{default:Ie(()=>e[11]||(e[11]=[Se(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")])),_:1})]))}const AQr=st(QQr,[["render",$Qr]]),kQr={components:{ClipBoardTextInput:Eoe,Card:zC},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)}}},PQr={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"},RQr={class:"mb-4"},MQr={class:"mb-4"};function DQr(t,e,n,r,i,s){const o=Xe("ClipBoardTextInput"),a=Xe("Card");return k(),R("div",PQr,[b("form",{onSubmit:e[0]||(e[0]=oe((...l)=>s.submitForm&&s.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[te(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>[te(a,{title:"Model",class:"",isHorizontal:!1},{default:Ie(()=>[b("div",RQr,[e[1]||(e[1]=b("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),te(o,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),b("div",MQr,[e[2]||(e[2]=b("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1)),te(o,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),te(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Ie(()=>e[3]||(e[3]=[b("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1)])),_:1})],32)])}const NQr=st(kQr,[["render",DQr]]),IQr={name:"WelcomeScreen",props:{isReady:{type:Boolean,required:!0},loadingProgress:{type:Number,required:!0},loadingInfos:{type:String,required:!0},versionInfo:{type:String,required:!0},interestingFacts:{type:Array,required:!0}},data(){return{randomFact:""}},computed:{...Pu(["config","theme_vars"]),appName(){var t,e;return((t=this.config)==null?void 0:t.app_custom_name)||((e=this.theme_vars)==null?void 0:e.lollms_title)||"LoLLMs"},appSlogan(){var t;return((t=this.config)==null?void 0:t.app_custom_slogan)||"One tool to rule them all"},shouldShowLollmsParagraphs(){var t;return!((t=this.config)!=null&&t.app_custom_name)},shouldShowLollmsFunFacts(){var t;return(t=this.config)==null?void 0:t.app_show_fun_facts}},methods:{updateRandomFact(){let t;if(this.interestingFacts.length<=1){this.randomFact=this.interestingFacts.length===1?this.interestingFacts[0]:"";return}do t=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];while(t===this.randomFact);this.randomFact=t}},mounted(){this.updateRandomFact()},watch:{interestingFacts:{handler(){this.updateRandomFact()},immediate:!0}}},HQr={key:0,class:"fixed inset-0 z-50 flex items-center justify-center overflow-hidden bg-gradient-welcome text-blue-800 dark:text-blue-100"},VQr={key:0,class:"absolute inset-0 pointer-events-none overflow-hidden opacity-70"},qQr={class:"relative z-10 flex w-full max-w-4xl flex-col items-center px-6 text-center"},UQr={class:"mb-10 w-full"},BQr={class:"lollms-title-style mb-3 text-5xl font-extrabold tracking-tight drop-shadow-md md:text-7xl transition-transform duration-300 hover:scale-[1.03]"},zQr={class:"text-xl italic md:text-2xl text-subtitle"},XQr={key:0,class:"mt-4 text-base text-author"},FQr={class:"mt-1 text-sm text-author"},jQr={class:"text-base text-blue-800 dark:text-blue-200"},YQr=["innerHTML"],GQr={class:"w-full max-w-lg"},WQr={class:"mb-3 h-3 w-full overflow-hidden rounded-full shadow-inner animated-progressbar-bg"},ZQr={role:"status",class:"w-full"},KQr={class:"text-2xl font-semibold text-progress"};function JQr(t,e,n,r,i,s){return k(),Qt(cr,{name:"fade-smooth"},{default:Ie(()=>[n.isReady?ne("",!0):(k(),R("div",HQr,[t.$store.state.theme_vars.activate_dropping_animation?(k(),R("div",VQr,[(k(),R(Ve,null,dt(60,o=>b("div",{key:o,class:"absolute animate-fall text-xs text-blue-300 dark:text-blue-500",style:qn({left:`${Math.random()*100}%`,top:"-30px",animationDuration:`${4+Math.random()*8}s`,animationDelay:`${Math.random()*6}s`,opacity:`${.3+Math.random()*.5}`})},ae(t.$store.state.theme_vars.falling_object||"·"),5)),64))])):ne("",!0),b("div",qQr,[b("div",UQr,[b("h1",BQr,ae(s.appName),1),b("p",zQr,ae(s.appSlogan),1),s.shouldShowLollmsParagraphs?(k(),R("p",XQr," by ParisNeo ")):ne("",!0),b("p",FQr,ae(n.versionInfo),1)]),s.shouldShowLollmsFunFacts&&i.randomFact?(k(),R("div",{key:0,class:"mb-8 w-full max-w-xl cursor-pointer rounded-lg border p-4 shadow-lg backdrop-blur-sm transition-all duration-300 card border-blue-300 dark:border-blue-600 hover:bg-blue-200 dark:hover:bg-blue-700 hover:border-blue-400 dark:hover:border-blue-500",onClick:e[0]||(e[0]=(...o)=>s.updateRandomFact&&s.updateRandomFact(...o))},[b("p",jQr,[e[1]||(e[1]=b("span",{class:"font-semibold text-blue-600 dark:text-blue-400"},"🤔 Fun Fact: ",-1)),b("span",{innerHTML:i.randomFact,class:"italic"},null,8,YQr)])])):ne("",!0),b("div",GQr,[b("div",WQr,[b("div",{class:"h-full rounded-full shadow-md transition-all duration-500 ease-out animated-progressbar-fg",style:qn({width:`${n.loadingProgress}%`})},null,4)]),b("div",ZQr,[(k(),R("p",{class:"mb-1 text-lg transition-opacity duration-300 text-loading",key:n.loadingInfos},ae(n.loadingInfos)+"... ",1)),b("p",KQr,ae(Math.round(n.loadingProgress))+"% ",1)])])])]))]),_:1})}const e_r=st(IQr,[["render",JQr]]),t_r={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked","toggle-star"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean,openfolder_enabled:Boolean,isStarred:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,editTitle:!1,newTitle:"",checkBoxValue_local:!1}},computed:{confirmTitle(){return this.editTitleMode?"Confirm title change":this.makeTitleMode?"Confirm title generation":this.deleteMode?"Confirm deletion":"Confirm"}},methods:{updateFeatherIcons(){Fe(()=>{Re.replace()})},resetModes(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.editTitle=!1},cancel(){this.resetModes(),this.newTitle=this.title,this.updateFeatherIcons()},confirmAction(){this.editTitleMode?this.editTitleEvent():this.makeTitleMode?this.makeTitleEvent():this.deleteMode&&this.deleteEvent(),this.updateFeatherIcons()},deleteEvent(){this.$emit("delete"),this.resetModes()},selectEvent(){!this.showConfirmation&&!this.isCheckbox&&this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.$emit("editTitle",{title:this.newTitle,id:this.id}),this.resetModes()},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.resetModes()},chnageTitle(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",{id:e,checked:t.target.checked}),this.checkBoxValue_local=t.target.checked},toggleStarEvent(){this.$emit("toggle-star")}},mounted(){this.newTitle=this.title,this.checkBoxValue_local=this.checkBoxValue,this.updateFeatherIcons()},watch:{showConfirmation(){this.updateFeatherIcons()},isStarred(){this.updateFeatherIcons()},isCheckbox(){this.updateFeatherIcons()},editTitleMode(t){t&&(this.showConfirmation=!0,this.editTitle=!0,this.makeTitleMode=!1,this.deleteMode=!1,this.newTitle=this.title,Fe(()=>{var e;(e=this.$refs.titleBox)==null||e.focus()})),this.updateFeatherIcons()},makeTitleMode(t){t&&(this.showConfirmation=!0,this.editTitleMode=!1,this.deleteMode=!1,this.editTitle=!1),this.updateFeatherIcons()},deleteMode(t){t&&(this.showConfirmation=!0,this.editTitleMode=!1,this.makeTitleMode=!1,this.editTitle=!1),this.updateFeatherIcons()},checkBoxValue(t){this.checkBoxValue_local!==t&&(this.checkBoxValue_local=t)},title(t){this.editTitleMode||(this.newTitle=t)}}},n_r=["id"],r_r={class:"flex flex-row items-center gap-2 flex-shrink-0"},i_r={key:0},s_r={class:"flex flex-row items-center flex-grow overflow-hidden mx-1"},o_r=["title"],a_r=["value"],l_r={class:"absolute top-0 right-0 h-full flex items-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 z-10"},c_r={class:"discussion-toolbox flex items-center space-x-1 bg-white dark:bg-gray-800 p-1 mr-1 rounded shadow-lg border border-gray-200 dark:border-gray-700"},u_r={key:0,class:"flex gap-1 items-center"},d_r=["title"],f_r={key:1,class:"flex gap-1 items-center"},h_r=["title"];function p_r(t,e,n,r,i,s){return k(),R("div",{class:ye([n.selected?"discussion-hilighted":"discussion","m-1 py-2 flex flex-row sm:flex-row flex-wrap flex-shrink-0 items-center rounded-md duration-75 cursor-pointer relative group w-[15rem]"]),id:"dis-"+n.id,onClick:e[14]||(e[14]=oe(o=>s.selectEvent(),["stop"]))},[b("div",r_r,[n.isCheckbox?(k(),R("div",i_r,[He(b("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 ml-1",onClick:e[0]||(e[0]=oe(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>i.checkBoxValue_local=o),onChange:e[2]||(e[2]=o=>s.checkedChangeEvent(o,n.id))},null,544),[[W3,i.checkBoxValue_local]])])):ne("",!0),n.selected?(k(),R("div",{key:1,class:ye(["min-h-full w-1.5 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent":"bg-secondary"])},null,2)):ne("",!0),n.selected?ne("",!0):(k(),R("div",{key:2,class:ye(["w-1.5",n.loading?"min-h-full w-1.5 rounded-xl self-stretch animate-bounce bg-accent":""])},null,2))]),b("div",s_r,[i.editTitle?ne("",!0):(k(),R("p",{key:0,title:n.title,class:"line-clamp-1 w-full text-xs"},ae(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,o_r)),i.editTitle?(k(),R("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full p-1 text-xs",value:n.title,required:"",onKeydown:[e[3]||(e[3]=gr(oe(o=>s.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=gr(oe(o=>s.cancel(),["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>s.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=oe(()=>{},["stop"]))},null,40,a_r)):ne("",!0)]),b("div",l_r,[b("div",c_r,[i.showConfirmation?(k(),R("div",u_r,[b("button",{class:"p-1 rounded hover:bg-red-100 dark:hover:bg-red-900 text-red-600 dark:text-red-400 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[7]||(e[7]=oe(o=>s.cancel(),["stop"]))},e[15]||(e[15]=[b("i",{"data-feather":"x",class:"w-4 h-4"},null,-1)])),b("button",{class:"p-1 rounded hover:bg-green-100 dark:hover:bg-green-900 text-green-600 dark:text-green-400 duration-75 active:scale-90",title:s.confirmTitle,type:"button",onClick:e[8]||(e[8]=oe(o=>s.confirmAction(),["stop"]))},e[16]||(e[16]=[b("i",{"data-feather":"check",class:"w-4 h-4"},null,-1)]),8,d_r)])):ne("",!0),i.showConfirmation?ne("",!0):(k(),R("div",f_r,[b("button",{class:ye(["p-1 rounded duration-75 active:scale-90",n.isStarred?"text-yellow-500 hover:bg-yellow-100 dark:hover:bg-yellow-900":"text-gray-400 hover:text-yellow-500 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-yellow-400"]),title:n.isStarred?"Unstar discussion":"Star discussion",type:"button",onClick:e[9]||(e[9]=oe(o=>s.toggleStarEvent(),["stop"]))},[b("i",{"data-feather":"star",class:ye(["w-4 h-4",{"fill-current":n.isStarred}])},null,2)],10,h_r),n.openfolder_enabled?(k(),R("button",{key:0,class:"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400 hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[10]||(e[10]=oe(o=>s.openFolderEvent(),["stop"]))},e[17]||(e[17]=[b("i",{"data-feather":"folder",class:"w-4 h-4"},null,-1)]))):ne("",!0),b("button",{class:"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400 hover:text-secondary duration-75 active:scale-90",title:"Generate title",type:"button",onClick:e[11]||(e[11]=oe(o=>i.makeTitleMode=!0,["stop"]))},e[18]||(e[18]=[b("i",{"data-feather":"type",class:"w-4 h-4"},null,-1)])),b("button",{class:"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400 hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[12]||(e[12]=oe(o=>i.editTitleMode=!0,["stop"]))},e[19]||(e[19]=[b("i",{"data-feather":"edit-2",class:"w-4 h-4"},null,-1)])),b("button",{class:"p-1 rounded hover:bg-red-100 dark:hover:bg-red-900 text-red-600 dark:text-red-400 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[13]||(e[13]=oe(o=>i.deleteMode=!0,["stop"]))},e[20]||(e[20]=[b("i",{"data-feather":"trash",class:"w-4 h-4"},null,-1)]))]))])])],10,n_r)}const Voe=st(t_r,[["render",p_r],["__scopeId","data-v-3d6bc6d8"]]),T_r="/";Ae.defaults.baseURL="/";const O_r={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{UniversalForm:doe},data(){return{bUrl:T_r,isMounted:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},isActive(){return this.$store.state.mountedPers&&this.$store.state.config.active_personality_id===this.$store.state.config.personalities.findIndex(t=>t===this.$store.state.mountedPers.full_path)}},methods:{async handleOnTalk(){const t=this.mountedPers;if(!t){this.$store.state.toast.showToast("No personality mounted to talk with.",3,!1);return}console.log("Talking with:",t.name);try{let e=await Ae.get("/get_generation_status",{});if(e&&!e.data.status){const n=this.$store.state.config.personalities.findIndex(r=>r===t.full_path);if(n!==this.$store.state.config.active_personality_id){const r={client_id:this.$store.state.client_id,id:n};let i=await Ae.post("/select_personality",r);if(!i.data.status){console.error("Failed to select personality before talking:",i.data.error),this.$store.state.toast.showToast(`Error selecting ${t.name}: ${i.data.error}`,4,!1);return}this.$store.commit("setActivePersonalityId",n),this.$store.commit("setMountedPers",this.$store.state.personalities_infos[n])}console.log("Requesting generation from:",t.name),et.emit("generate_msg_from",{id:n})}else e?(console.log("Already generating"),this.$store.state.toast.showToast("Generation is already in progress.",3,!1)):(console.error("Could not get generation status."),this.$store.state.toast.showToast("Error checking generation status.",4,!1))}catch(e){console.error("Error during handleOnTalk:",e),this.$store.state.toast.showToast(`Error initiating talk: ${e.message}`,4,!1)}finally{}},async remount_personality(){var e;const t=this.mountedPers;if(!t)return this.$store.state.toast.showToast("No personality mounted to remount.",3,!1),{status:!1,error:"no personality selected"};console.log("Remounting personality ",t.name),this.$store.state.toast.showToast(`Remounting ${t.name}...`,4,!0);try{const n={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language},r=await Ae.post("/remount_personality",n);if(r&&r.data.status)return console.log("Personality remounted successfully:",r.data),this.$store.state.toast.showToast(`${t.name} remounted successfully!`,4,!0),this.$store.dispatch("refreshPersonalityData"),r.data;{const i=((e=r==null?void 0:r.data)==null?void 0:e.error)||"Unknown error";return console.error("Failed remount_personality:",i),this.$store.state.toast.showToast(`Failed to remount ${t.name}: ${i}`,4,!1),(r==null?void 0:r.data)||{status:!1,error:i}}}catch(n){return console.error("Error during remount_personality:",n),this.$store.state.toast.showToast(`Error remounting: ${n.message}`,4,!1),{status:!1,error:n.message}}},async onSettingsPersonality(t){var e;if(!t){this.$store.state.toast.showToast("No personality selected for settings.",3,!1);return}console.log("Opening settings for:",t.name);try{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path);if(n!==this.$store.state.config.active_personality_id){const i={client_id:this.$store.state.client_id,id:n};let s=await Ae.post("/select_personality",i);if(!s.data.status){console.error("Failed to select personality before opening settings:",s.data.error),this.$store.state.toast.showToast(`Error selecting ${t.name} for settings: ${s.data.error}`,4,!1);return}this.$store.commit("setActivePersonalityId",n),this.$store.commit("setMountedPers",this.$store.state.personalities_infos[n]),await Fe()}const r=await Ae.get("/get_active_personality_settings");if(r&&r.data&&Object.keys(r.data).length>0){console.log("Personality settings data:",r.data);const i=await this.$refs.universalForm.showForm(r.data,`Settings - ${t.name}`,"Save changes","Cancel");if(i){console.log("Saving new settings:",i);try{const s=await Ae.post("/set_active_personality_settings",i);if(s&&s.data&&s.data.status)console.log("Settings saved successfully:",s.data),this.$store.state.toast.showToast("Personality settings updated successfully!",4,!0);else{const o=((e=s==null?void 0:s.data)==null?void 0:e.error)||"Unknown error saving settings.";console.error("Failed to save settings:",o),this.$store.state.toast.showToast(`Failed to save settings: ${o}`,4,!1)}}catch(s){console.error("Error saving personality settings:",s),this.$store.state.toast.showToast(`Error saving settings: ${s.message}`,4,!1)}}else console.log("Settings editing cancelled.")}else r&&r.data&&Object.keys(r.data).length===0?this.$store.state.toast.showToast(`${t.name} has no configurable settings.`,4,!1):(console.error("Could not get personality settings response:",r),this.$store.state.toast.showToast("Failed to retrieve personality settings.",4,!1))}catch(n){console.error("Error fetching/showing personality settings:",n),this.$store.state.toast.showToast(`Could not open settings: ${n.message}`,4,!1)}},async constructor(){for(Fe(()=>{Re.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady&&this.onReady()},personalityImgPlacehodler(t){t.target.src=Mh}}},m_r={class:"relative group/item"},g_r=["title"],Q_r=["src","alt"],__r={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-auto flex items-center justify-center space-x-1 opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 p-2 rounded-md shadow-lg bg-white dark:bg-gray-800 ring-1 ring-black ring-opacity-5 z-10"};function v_r(t,e,n,r,i,s){const o=Xe("UniversalForm");return k(),R(Ve,null,[b("div",m_r,[b("button",{onClick:e[1]||(e[1]=oe(a=>s.onSettingsPersonality(s.mountedPers),["prevent"])),class:ye(["w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none relative",{"glow-effect":t.$store.state.config.activate_skills_lib,"border-2 border-primary":s.isActive}]),title:"Configure "+s.mountedPers.name},[b("img",{src:s.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>s.personalityImgPlacehodler&&s.personalityImgPlacehodler(...a)),alt:s.mountedPers.name,class:"w-full h-full object-cover"},null,40,Q_r)],10,g_r),b("div",__r,[b("button",{onClick:e[2]||(e[2]=oe(a=>s.onSettingsPersonality(s.mountedPers),["prevent"])),class:"p-1 btn-secondary btn-xs rounded-full hover:scale-110 transition-transform duration-150",title:"Configure"},e[5]||(e[5]=[b("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[b("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826 3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),b("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])),b("button",{onClick:e[3]||(e[3]=oe(a=>s.remount_personality(),["prevent"])),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none btn-xs hover:scale-110 transition-transform duration-150",title:"Remount"},e[6]||(e[6]=[b("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[b("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)])),b("button",{onClick:e[4]||(e[4]=oe(a=>s.handleOnTalk(),["prevent"])),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none btn-xs hover:scale-110 transition-transform duration-150",title:"Talk"},e[7]||(e[7]=[b("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[b("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)]))])]),te(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const y_r=st(O_r,[["render",v_r],["__scopeId","data-v-5f8375f1"]]),b_r={name:"HoverMenu",props:{items:{type:Array,required:!0},isActive:{type:Function,default:()=>!1},itemKeyExtractor:{type:Function,default:t=>t.id||t.name},itemNameExtractor:{type:Function,default:t=>t.name},itemIconExtractor:{type:Function,required:!0},placeholderIcon:{type:String,required:!0},searchPlaceholder:{type:String,default:"Search..."},menuWidthClass:{type:String,default:"w-80"},gridLayoutClass:{type:String,default:"grid grid-cols-3 gap-x-4 gap-y-4"},activeItemClass:{type:String,default:"border-blue-500 dark:border-sky-500"}},emits:["select-item"],data(){return{isMenuVisible:!1,searchQuery:"",hideMenuTimeout:null}},computed:{filteredItems(){const t=this.searchQuery.toLowerCase().trim();return t?this.items.filter(e=>{var n;return(n=this.getItemName(e))==null?void 0:n.toLowerCase().includes(t)}):this.items}},methods:{getItemKey(t){return this.itemKeyExtractor(t)},getItemName(t){return this.itemNameExtractor(t)},getItemIcon(t){return this.itemIconExtractor(t)||this.placeholderIcon},showMenu(){clearTimeout(this.hideMenuTimeout),this.isMenuVisible=!0,this.$nextTick(()=>Re.replace())},hideMenu(){this.hideMenuTimeout=setTimeout(()=>{this.isMenuVisible=!1},300)},selectItem(t){this.$emit("select-item",t)}},mounted(){Fe(()=>Re.replace())},updated(){this.isMenuVisible&&Fe(()=>Re.replace())}},S_r={class:"p-2 border-b border-blue-200 dark:border-slate-700"},x_r=["placeholder"],E_r=["onClick","title"],w_r=["src","alt"],C_r={class:"animated-thought-bubble text-center"},L_r=["onClick"],$_r={key:0,class:"col-span-full text-center text-gray-500 dark:text-gray-400 py-4"};function A_r(t,e,n,r,i,s){return k(),R("div",{class:"relative",onMouseleave:e[3]||(e[3]=(...o)=>s.hideMenu&&s.hideMenu(...o))},[b("div",{onMouseenter:e[0]||(e[0]=(...o)=>s.showMenu&&s.showMenu(...o)),class:"hover-trigger flex items-center justify-center w-8 h-8"},[er(t.$slots,"trigger",{},void 0,!0)],32),te(cr,{name:"fade-and-fly"},{default:Ie(()=>[He(b("div",{onMouseenter:e[2]||(e[2]=(...o)=>s.showMenu&&s.showMenu(...o)),class:ye(["absolute top-full left-0 mt-1 z-50 transform panels-color rounded-md shadow-lg ring-1 ring-blue-300 dark:ring-slate-700 ring-opacity-50 focus:outline-none",n.menuWidthClass])},[b("div",S_r,[He(b("input",{type:"text","onUpdate:modelValue":e[1]||(e[1]=o=>i.searchQuery=o),placeholder:n.searchPlaceholder,class:"w-full input input-sm"},null,8,x_r),[[vt,i.searchQuery]])]),b("div",{class:ye(["px-4 py-3 pb-10 max-h-80 overflow-y-auto scrollbar",n.gridLayoutClass])},[(k(!0),R(Ve,null,dt(s.filteredItems,o=>(k(),R("div",{key:s.getItemKey(o),class:"relative group/item flex flex-col items-center"},[b("button",{onClick:oe(a=>s.selectItem(o),["prevent"]),title:s.getItemName(o),class:ye(["w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none border-2 mb-1",n.isActive(o)?n.activeItemClass:"border-transparent hover:border-blue-300 dark:hover:border-slate-600"])},[b("img",{src:s.getItemIcon(o),alt:s.getItemName(o),class:"w-full h-full object-cover"},null,8,w_r)],10,E_r),b("div",C_r,[b("span",{class:"text-xs font-medium mb-1 block cursor-pointer",onClick:oe(a=>s.selectItem(o),["prevent"])},ae(s.getItemName(o)),9,L_r),er(t.$slots,"item-actions",{item:o},void 0,!0)])]))),128)),s.filteredItems.length===0?(k(),R("div",$_r," No items found. ")):ne("",!0)],2)],34),[[mr,i.isMenuVisible]])]),_:3})],32)}const k_r=st(b_r,[["render",A_r],["__scopeId","data-v-9178f2bc"]]),P_r={name:"Toolbar",components:{MountedPersonalities:y_r,HoverMenu:k_r},props:{loading:Boolean,isCheckbox:Boolean},emits:["create-new-discussion","add-discussion-to-skills-library","toggle-skills-lib","show-skills-lib","toggle-edit-mode","reset-database","export-database","import-discussions","import-discussions-bundle","show-model-config","set-binding","copy-model-name","set-model","personality-selected","unmount-personality","remount-personality","talk-personality","personalities-ready","show-personality-list"],data(){return{isSkillsLibraryMenuVisible:!1,isMainMenuVisible:!1,modelImgPlaceholder:F9,hideMainMenuTimeout:null,hideSkillsLibraryMenuTimeout:null}},computed:{...Pu(["config","installedBindings","installedModels","mountedPersArr"]),...oE(["getCurrentBinding","getCurrentModel"]),currentBinding(){return this.getCurrentBinding||{name:"unknown",icon:this.modelImgPlaceholder}},currentModel(){return this.getCurrentModel||{name:"unknown",icon:this.modelImgPlaceholder}},currentBindingName(){var t;return(t=this.currentBinding)==null?void 0:t.name},currentModelName(){var t;return(t=this.currentModel)==null?void 0:t.name},currentBindingIcon(){var t;return((t=this.currentBinding)==null?void 0:t.icon)||this.modelImgPlaceholder},currentModelIcon(){var t;return((t=this.currentModel)==null?void 0:t.icon)||this.modelImgPlaceholder},activePersonalityId(){var t;return(t=this.$store.state.config)==null?void 0:t.active_personality_id},configPersonalities(){var t;return((t=this.$store.state.config)==null?void 0:t.personalities)||[]}},methods:{isActivePersonality(t){if(this.activePersonalityId===void 0||this.activePersonalityId<0||this.activePersonalityId>=this.configPersonalities.length||!(t!=null&&t.full_path))return!1;const e=this.configPersonalities[this.activePersonalityId];return t.full_path===e||t.full_path===(e==null?void 0:e.split(":")[0])},onPersonalitiesReadyFun(){this.$emit("personalities-ready")},onShowPersListFun(){this.$emit("show-personality-list")},triggerFileDialog(t){this.$refs[t]&&(this.$refs[t].value=null,this.$refs[t].click())},showSkillsLibraryMenu(){clearTimeout(this.hideSkillsLibraryMenuTimeout),this.isSkillsLibraryMenuVisible=!0,this.$nextTick(()=>Re.replace())},hideSkillsLibraryMenu(){this.hideSkillsLibraryMenuTimeout=setTimeout(()=>{this.isSkillsLibraryMenuVisible=!1},300)},showMainMenu(){clearTimeout(this.hideMainMenuTimeout),this.isMainMenuVisible=!0,this.$nextTick(()=>Re.replace())},hideMainMenu(){this.hideMainMenuTimeout=setTimeout(()=>{this.isMainMenuVisible=!1},300)}},mounted(){Fe(()=>{Re.replace()})},updated(){Fe(()=>{Re.replace()})}},R_r={class:"toolbar-color flex items-center p-1 justify-around"},M_r={key:0,class:"toolbar-container flex items-center gap-1 relative"},D_r={class:"relative"},N_r={class:"relative"},I_r=["title"],H_r=["src","alt"],V_r={class:"flex space-x-1 justify-center"},q_r=["onClick"],U_r=["title"],B_r=["src","alt"],z_r={class:"flex space-x-1 justify-center"},X_r=["onClick"],F_r={class:"personalities-hover-area flex items-center justify-center w-8 h-8"},j_r={class:"flex space-x-1 justify-center"},Y_r=["onClick"],G_r=["onClick"],W_r=["onClick"],Z_r={key:1,class:"flex items-center justify-center w-full h-10"};function K_r(t,e,n,r,i,s){const o=Xe("HoverMenu"),a=Xe("MountedPersonalities");return k(),R("div",R_r,[n.loading?(k(),R("div",Z_r,e[40]||(e[40]=[b("div",{class:"text-gray-500"},"Buzzy...",-1)]))):(k(),R("div",M_r,[b("button",{class:"toolbar-button svg-button",title:"Create new discussion",onClick:e[0]||(e[0]=l=>t.$emit("create-new-discussion"))},e[23]||(e[23]=[b("i",{"data-feather":"plus",class:"w-5 h-5"},null,-1)])),n.loading?ne("",!0):(k(),R("div",{key:0,class:"relative",onMouseleave:e[7]||(e[7]=(...l)=>s.hideSkillsLibraryMenu&&s.hideSkillsLibraryMenu(...l))},[b("div",{onMouseenter:e[1]||(e[1]=(...l)=>s.showSkillsLibraryMenu&&s.showSkillsLibraryMenu(...l)),class:"menu-hover-area flex items-center justify-center w-8 h-8"},e[24]||(e[24]=[b("button",{class:"toolbar-button svg-button",title:"Toggle Skills library menu"},[b("svg",{class:"w-5 h-5",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[b("path",{d:"M4 4v16h16V4H4zm2 2h12v12H6V6zm2 2h2v8H8V8zm3 0h2v8h-2V8zm3 0h2v8h-2V8z",fill:"currentColor"})])],-1)]),32),te(cr,{name:"fade-and-fly"},{default:Ie(()=>[He(b("div",{onMouseenter:e[6]||(e[6]=(...l)=>s.showSkillsLibraryMenu&&s.showSkillsLibraryMenu(...l)),class:"absolute top-full left-0 mt-1 z-50 transform card p-1 flex flex-wrap gap-1 items-center shadow-lg w-auto min-w-[10rem]"},[b("button",{type:"button",onClick:e[2]||(e[2]=oe(l=>t.$emit("add-discussion-to-skills-library"),["stop"])),title:"Add this discussion content to skills database",class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300"},e[25]||(e[25]=[b("i",{"data-feather":"plus",class:"w-5 h-5"},null,-1)])),t.$store.state.config.activate_skills_lib?(k(),R("button",{key:0,type:"button",onClick:e[3]||(e[3]=oe(l=>t.$emit("toggle-skills-lib"),["stop"])),title:"Skills database is activated",class:"svg-button text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-200"},e[26]||(e[26]=[b("i",{"data-feather":"check-circle",class:"w-5 h-5"},null,-1)]))):(k(),R("button",{key:1,type:"button",onClick:e[4]||(e[4]=oe(l=>t.$emit("toggle-skills-lib"),["stop"])),title:"Skills database is deactivated",class:"svg-button text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200"},e[27]||(e[27]=[b("i",{"data-feather":"x-octagon",class:"w-5 h-5"},null,-1)]))),b("button",{type:"button",onClick:e[5]||(e[5]=oe(l=>t.$emit("show-skills-lib"),["stop"])),title:"Show Skills database",class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300"},e[28]||(e[28]=[b("i",{"data-feather":"book",class:"w-5 h-5"},null,-1)]))],544),[[mr,i.isSkillsLibraryMenuVisible]])]),_:1})],32)),n.loading?ne("",!0):(k(),R("div",{key:1,class:"relative",onMouseleave:e[17]||(e[17]=(...l)=>s.hideMainMenu&&s.hideMainMenu(...l))},[b("div",{onMouseenter:e[8]||(e[8]=(...l)=>s.showMainMenu&&s.showMainMenu(...l)),class:"menu-hover-area flex items-center justify-center w-8 h-8"},e[29]||(e[29]=[b("button",{class:"toolbar-button svg-button",title:"Toggle menu"},[b("i",{"data-feather":"menu",class:"w-5 h-5"})],-1)]),32),te(cr,{name:"fade-and-fly"},{default:Ie(()=>[He(b("div",{onMouseenter:e[16]||(e[16]=(...l)=>s.showMainMenu&&s.showMainMenu(...l)),class:"absolute top-full left-0 mt-1 z-50 transform card p-1 flex flex-wrap gap-1 items-center shadow-lg w-auto min-w-[10rem]"},[b("button",{class:ye(["svg-button",n.isCheckbox?"text-blue-600 dark:text-sky-400 bg-blue-200 dark:bg-slate-700":"text-gray-600 dark:text-gray-300"]),title:"Edit discussion list",type:"button",onClick:e[9]||(e[9]=l=>t.$emit("toggle-edit-mode"))},e[30]||(e[30]=[b("i",{"data-feather":"check-square",class:"w-5 h-5"},null,-1)]),2),b("button",{class:"svg-button text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200",title:"Reset database, remove all discussions",onClick:e[10]||(e[10]=oe(l=>t.$emit("reset-database"),["stop"]))},e[31]||(e[31]=[b("i",{"data-feather":"trash-2",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300",title:"Export database",type:"button",onClick:e[11]||(e[11]=oe(l=>t.$emit("export-database"),["stop"]))},e[32]||(e[32]=[b("i",{"data-feather":"database",class:"w-5 h-5"},null,-1)])),b("div",D_r,[b("input",{type:"file",ref:"fileDialog",class:"hidden",onChange:e[12]||(e[12]=l=>t.$emit("import-discussions",l)),accept:".json, .yaml, .yml"},null,544),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300 rotate-90",title:"Import discussions",type:"button",onClick:e[13]||(e[13]=oe(l=>s.triggerFileDialog("fileDialog"),["stop"]))},e[33]||(e[33]=[b("i",{"data-feather":"log-in",class:"w-5 h-5"},null,-1)]))]),b("div",N_r,[b("input",{type:"file",ref:"bundleLoadingDialog",class:"hidden",onChange:e[14]||(e[14]=l=>t.$emit("import-discussions-bundle",l)),accept:".zip"},null,544),b("button",{title:"Import discussion bundle",onClick:e[15]||(e[15]=oe(l=>s.triggerFileDialog("bundleLoadingDialog"),["stop"])),class:"svg-button text-blue-600 hover:text-blue-800 dark:text-sky-400 dark:hover:text-sky-300"},e[34]||(e[34]=[b("i",{"data-feather":"folder",class:"w-5 h-5"},null,-1)]))])],544),[[mr,i.isMainMenuVisible]])]),_:1})],32)),!n.loading&&t.installedBindings.length>0?(k(),Qt(o,{key:2,items:t.installedBindings,"item-name-extractor":l=>l.name,"item-icon-extractor":l=>l.icon,"is-active":l=>l.name===s.currentBindingName,"placeholder-icon":i.modelImgPlaceholder,"search-placeholder":"Search bindings...",onSelectItem:e[19]||(e[19]=l=>t.$emit("set-binding",l))},{trigger:Ie(()=>[b("button",{onClick:e[18]||(e[18]=oe(l=>t.$emit("show-model-config",null),["prevent"])),class:"w-6 h-6 block",title:s.currentBinding?s.currentBinding.name:"unknown"},[b("img",{src:s.currentBindingIcon,class:"w-full h-full rounded-full object-cover border-2 border-blue-300 dark:border-slate-600 active:scale-90 hover:border-blue-500 dark:hover:border-sky-400 hover:scale-110 hover:-translate-y-1 duration-200 transition-transform",alt:s.currentBinding?s.currentBinding.name:"Binding icon"},null,8,H_r)],8,I_r)]),"item-actions":Ie(({item:l})=>[b("div",V_r,[b("button",{onClick:oe(c=>t.$emit("show-model-config",l),["prevent"]),class:"p-1 btn-secondary btn-sm rounded-full hover:scale-110 transition-transform duration-150",title:"Configure Binding"},e[35]||(e[35]=[b("i",{"data-feather":"settings",class:"w-3 h-3"},null,-1)]),8,q_r)])]),_:1},8,["items","item-name-extractor","item-icon-extractor","is-active","placeholder-icon"])):ne("",!0),!n.loading&&t.installedModels.length>0?(k(),Qt(o,{key:3,items:t.installedModels,"item-name-extractor":l=>l.name,"item-icon-extractor":l=>l.icon,"is-active":l=>l.name===s.currentModelName,"placeholder-icon":i.modelImgPlaceholder,"search-placeholder":"Search models...",onSelectItem:e[21]||(e[21]=l=>t.$emit("set-model",l))},{trigger:Ie(()=>[b("button",{onClick:e[20]||(e[20]=oe(l=>t.$emit("copy-model-name",null),["prevent"])),class:"w-6 h-6 block",title:s.currentModel?s.currentModel.name:"unknown"},[b("img",{src:s.currentModelIcon,class:"w-full h-full rounded-full object-cover border-2 border-blue-300 dark:border-slate-600 active:scale-90 hover:border-blue-500 dark:hover:border-sky-400 hover:scale-110 hover:-translate-y-1 duration-200 transition-transform",alt:s.currentModel?s.currentModel.name:"Model icon"},null,8,B_r)],8,U_r)]),"item-actions":Ie(({item:l})=>[b("div",z_r,[b("button",{onClick:oe(c=>t.$emit("copy-model-name",l),["prevent"]),class:"p-1 btn-secondary btn-sm rounded-full hover:scale-110 transition-transform duration-150",title:"Copy Model Name"},e[36]||(e[36]=[b("i",{"data-feather":"copy",class:"w-3 h-3"},null,-1)]),8,X_r)])]),_:1},8,["items","item-name-extractor","item-icon-extractor","is-active","placeholder-icon"])):ne("",!0),!n.loading&&t.mountedPersArr.length>0?(k(),Qt(o,{key:4,items:t.mountedPersArr,"item-name-extractor":l=>l.name,"item-icon-extractor":l=>l.avatar,"item-key-extractor":l=>l.full_path||l.name,"is-active":s.isActivePersonality,"placeholder-icon":i.modelImgPlaceholder,"search-placeholder":"Search personalities...",onSelectItem:e[22]||(e[22]=l=>t.$emit("personality-selected",l))},{trigger:Ie(()=>[b("div",F_r,[te(a,{ref:"mountedPers",onShowPersList:s.onShowPersListFun,onReady:s.onPersonalitiesReadyFun},null,8,["onShowPersList","onReady"])])]),"item-actions":Ie(({item:l})=>[b("div",j_r,[b("button",{onClick:oe(c=>t.$emit("unmount-personality",l),["prevent"]),class:"p-1 bg-red-500 rounded-full text-white hover:bg-red-600 focus:outline-none btn-sm hover:scale-110 transition-transform duration-150",title:"Unmount"},e[37]||(e[37]=[b("i",{"data-feather":"x",class:"w-3 h-3"},null,-1)]),8,Y_r),b("button",{onClick:oe(c=>t.$emit("remount-personality",l),["prevent"]),class:"p-1 btn-secondary btn-sm rounded-full hover:scale-110 transition-transform duration-150",title:"Remount"},e[38]||(e[38]=[b("i",{"data-feather":"refresh-cw",class:"w-3 h-3"},null,-1)]),8,G_r),b("button",{onClick:oe(c=>t.$emit("talk-personality",l),["prevent"]),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none btn-sm hover:scale-110 transition-transform duration-150",title:"Talk"},e[39]||(e[39]=[b("i",{"data-feather":"message-square",class:"w-3 h-3"},null,-1)]),8,W_r)])]),_:1},8,["items","item-name-extractor","item-icon-extractor","item-key-extractor","is-active","placeholder-icon"])):ne("",!0)]))])}const J_r=st(P_r,[["render",K_r],["__scopeId","data-v-66615957"]]),evr=t=>{const e=new Date;return t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()},tvr=t=>{const e=new Date;return e.setDate(e.getDate()-1),t.getDate()===e.getDate()&&t.getMonth()===e.getMonth()&&t.getFullYear()===e.getFullYear()},nvr={name:"LeftPanel",components:{Discussion:Voe,RouterLink:t9,Toolbar:J_r},props:{showLeftPanel:Boolean,discussionsList:Array,currentDiscussion:Object,toolbarLoading:Boolean,formattedDatabaseName:String},emits:["select-discussion","delete-discussion","open-folder","edit-title","make-title","create-new-discussion","add-discussion-to-skills-library","toggle-skills-lib","show-skills-lib","reset-database","export-database","import-discussions","import-discussions-bundle","show-model-config","set-binding","copy-model-name","set-model","personality-selected","unmount-personality","remount-personality","talk-personality","personalities-ready","show-personality-list","delete-selected","export-discussions-as-json","export-discussions-to-folder","export-discussions-as-markdown","show-database-selector","import-discussion-file","toggle-star-discussion"],data(){return{filterTitle:"",filterInProgress:!1,isCheckbox:!1,showConfirmation:!1,isDragOverDiscussion:!1,searchTimeout:null,localDiscussionsState:[],sortBy:"date",sortOrder:"desc",collapsedSections:{starred:!1,today:!1,yesterday:!0,older:!0}}},computed:{...Pu(["config","theme_vars"]),...oE(["getStarredDiscussionsSet"]),logoSrc(){var t;return(t=this.config)!=null&&t.app_custom_logo?`/user_infos/${this.config.app_custom_logo}`:Eo},logoTitle(){var t;return((t=this.config)==null?void 0:t.app_custom_name)||"LoLLMs WebUI"},appName(){var t;return((t=this.config)==null?void 0:t.app_custom_name)||"LoLLMS WebUI"},appSlogan(){var t;return((t=this.config)==null?void 0:t.app_custom_slogan)||"One tool to rule them all"},starredSet(){return this.getStarredDiscussionsSet||new Set},sortIcon(){return this.sortOrder==="asc"?"arrow-up":"arrow-down"},sortByLabel(){return{date:"Date",title:"Title"}[this.sortBy]||"Date"},enhancedDiscussions(){return(this.discussionsList||[]).map(t=>{const e=this.localDiscussionsState.find(r=>r.id===t.id),n=t.created_at?new Date(t.created_at):new Date(0);return{...t,checkBoxValue:e?e.checkBoxValue:!1,isStarred:this.starredSet.has(String(t.id)),creationDate:n}})},filteredDiscussions(){if(!this.filterTitle.trim())return this.enhancedDiscussions;const t=this.filterTitle.toLowerCase();return this.enhancedDiscussions.filter(e=>e.title&&e.title.toLowerCase().includes(t))},groupedDiscussions(){const t=[],e=[],n=[],r=[];this.enhancedDiscussions.filter(a=>{if(!this.filterTitle.trim())return!0;const l=this.filterTitle.toLowerCase();return a.title&&a.title.toLowerCase().includes(l)}).forEach(a=>{if(a.isStarred)t.push(a);else{const l=a.creationDate;evr(l)?e.push(a):tvr(l)?n.push(a):r.push(a)}});const s=(a,l)=>{let c=0;this.sortBy==="date"?c=l.creationDate-a.creationDate:this.sortBy==="title"&&(c=(a.title||"").localeCompare(l.title||""));const u=this.sortBy==="date"&&this.sortOrder==="asc"||this.sortBy==="title"&&this.sortOrder==="desc"?-1:1;return c*u};t.sort(s),e.sort(s),n.sort(s),r.sort(s);const o=[];return t.length>0&&(o.push({type:"header",label:"Starred",key:"starred",collapsed:this.collapsedSections.starred}),this.collapsedSections.starred||t.forEach(a=>o.push({type:"discussion",data:a,key:`disc-${a.id}`}))),e.length>0&&(o.push({type:"header",label:"Today",key:"today",collapsed:this.collapsedSections.today}),this.collapsedSections.today||e.forEach(a=>o.push({type:"discussion",data:a,key:`disc-${a.id}`}))),n.length>0&&(o.push({type:"header",label:"Yesterday",key:"yesterday",collapsed:this.collapsedSections.yesterday}),this.collapsedSections.yesterday||n.forEach(a=>o.push({type:"discussion",data:a,key:`disc-${a.id}`}))),r.length>0&&(o.push({type:"header",label:"Older",key:"older",collapsed:this.collapsedSections.older}),this.collapsedSections.older||r.forEach(a=>o.push({type:"discussion",data:a,key:`disc-${a.id}`}))),o},selectedDiscussions(){return this.filteredDiscussions.filter(t=>{const e=this.localDiscussionsState.find(n=>n.id===t.id);return e&&e.checkBoxValue})},isAllSelected(){const t=this.filteredDiscussions;if(t.length===0)return!1;const e=new Set(this.selectedDiscussions.map(n=>n.id));return t.every(n=>e.has(n.id))}},methods:{toggleSection(t){t in this.collapsedSections&&(this.collapsedSections[t]=!this.collapsedSections[t],this.$nextTick(()=>Re.replace()))},handleSearchInput(){this.filterInProgress=!0,clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.filterInProgress=!1,this.$nextTick(()=>Re.replace())},300)},cycleSortOrder(){this.sortOrder=this.sortOrder==="asc"?"desc":"asc",this.$nextTick(()=>Re.replace())},cycleSortBy(){this.sortBy=this.sortBy==="date"?"title":"date",this.$nextTick(()=>Re.replace())},selectDiscussion(t){this.toolbarLoading||this.filterInProgress||this.$emit("select-discussion",t)},deleteDiscussion(t){this.localDiscussionsState=this.localDiscussionsState.filter(e=>e.id!==t.id),this.$emit("delete-discussion",t.id)},checkUncheckDiscussion({id:t,checked:e}){const n=this.localDiscussionsState.findIndex(r=>r.id===t);n!==-1?this.localDiscussionsState[n].checkBoxValue=e:this.discussionsList.some(r=>r.id===t)&&this.localDiscussionsState.push({id:t,checkBoxValue:e})},selectAllDiscussions(){const t=!this.isAllSelected,e=new Set(this.filteredDiscussions.map(n=>n.id));this.enhancedDiscussions.forEach(n=>{if(e.has(n.id)){const r=this.localDiscussionsState.findIndex(i=>i.id===n.id);r!==-1?this.localDiscussionsState[r].checkBoxValue=t:t&&this.localDiscussionsState.push({id:n.id,checkBoxValue:t})}}),this.$nextTick(()=>Re.replace())},deleteSelectedDiscussions(){const t=this.selectedDiscussions.map(e=>e.id);this.localDiscussionsState=this.localDiscussionsState.filter(e=>!t.includes(e.id)),this.$emit("delete-selected",t),this.showConfirmation=!1,this.isCheckbox=!1},handleDrop(t){this.isDragOverDiscussion=!1;const e=t.dataTransfer.files;e.length===1&&e[0].type==="application/json"?this.$emit("import-discussion-file",e[0]):alert("Please drop a single JSON file to import.")},toggleStarDiscussion(t){this.$emit("toggle-star-discussion",t)},toggleStarSelectedDiscussions(){const t=this.selectedDiscussions;if(t.length===0)return;const e=t.length>0?!t[0].isStarred:!0;t.forEach(n=>{n.isStarred!==e&&this.toggleStarDiscussion(n)})},syncLocalState(t){const e=new Set((t||[]).map(r=>r.id)),n=this.localDiscussionsState.filter(r=>e.has(r.id));(t||[]).forEach(r=>{n.some(i=>i.id===r.id)||n.push({id:r.id,checkBoxValue:!1})}),this.localDiscussionsState=n}},watch:{discussionsList:{handler(t,e){JSON.stringify(t)!==JSON.stringify(e)&&this.syncLocalState(t),this.$nextTick(()=>Re.replace())},immediate:!0,deep:!0},isCheckbox(t){this.$nextTick(()=>Re.replace()),t||(this.showConfirmation=!1)},showConfirmation(){this.$nextTick(()=>Re.replace())},filterTitle(){},sortBy(){this.$nextTick(()=>Re.replace())},sortOrder(){this.$nextTick(()=>Re.replace())}},mounted(){this.syncLocalState(this.discussionsList),Fe(()=>{Re.replace()})},updated(){}},rvr={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-[16rem] panels-color scrollbar h-full"},ivr={class:"logo-container w-12 h-12 flex-shrink-0"},svr=["src","title"],ovr={class:"flex flex-col justify-center overflow-hidden"},avr={class:"text-left p-1"},lvr={class:"text-md relative inline-block"},cvr={class:"relative inline-block font-bold tracking-wide text-blue-800 dark:text-blue-100 text-gradient-title truncate"},uvr={class:"text-blue-600 dark:text-blue-400 text-sm text-subtitle truncate"},dvr={class:"w-full max-w-md mx-auto p-2 border-b border-blue-100 dark:border-blue-800"},fvr={class:"flex items-center space-x-1"},hvr={class:"relative flex-grow"},pvr=["title"],Tvr=["data-feather"],Ovr=["title"],mvr=["data-feather"],gvr={key:0,class:"w-full p-2 bg-blue-100 dark:bg-blue-900 border-b border-blue-200 dark:border-blue-700"},Qvr={class:"flex flex-col space-y-1"},_vr={key:0,class:"text-sm text-blue-700 dark:text-blue-200"},vvr={key:1,class:"flex space-x-1 items-center"},yvr={key:1,class:"flex space-x-1 items-center"},bvr={class:"flex space-x-1 items-center"},Svr=["data-feather"],xvr={class:"relative flex flex-col flex-grow mb-10 z-0 w-full"},Evr=["onClick"],wvr=["data-feather"],Cvr={key:0,class:"p-4 text-center text-blue-600 dark:text-blue-400"},Lvr={key:0,class:"text-sm"},$vr={key:1,class:"p-4 text-center text-blue-500 dark:text-blue-400"},Avr={class:"flex flex-row items-center justify-center border-t border-blue-200 dark:border-blue-700 p-1"},kvr={class:"text-center font-semibold text-xs drop-shadow-md align-middle text-blue-700 dark:text-blue-300 truncate"};function Pvr(t,e,n,r,i,s){const o=Xe("RouterLink"),a=Xe("Toolbar"),l=Xe("Discussion");return k(),Qt(cr,{name:"slide-right"},{default:Ie(()=>[n.showLeftPanel?(k(),R("div",rvr,[te(o,{to:{name:"discussions"},class:"flex items-center space-x-2 p-2 border-b border-blue-200 dark:border-blue-700 hover:bg-blue-50 dark:hover:bg-blue-800 transition duration-150 ease-in-out"},{default:Ie(()=>[b("div",ivr,[b("img",{class:"w-full h-full rounded-full object-cover logo-image border-2 border-blue-300 dark:border-blue-600 shadow-sm",src:s.logoSrc,alt:"Logo",title:s.logoTitle},null,8,svr)]),b("div",ovr,[b("div",avr,[b("div",lvr,[b("span",cvr,ae(s.appName),1)])]),b("p",uvr,ae(s.appSlogan),1)])]),_:1}),te(a,{loading:n.toolbarLoading,"is-checkbox":i.isCheckbox,onCreateNewDiscussion:e[0]||(e[0]=c=>t.$emit("create-new-discussion")),onAddDiscussionToSkillsLibrary:e[1]||(e[1]=c=>t.$emit("add-discussion-to-skills-library")),onToggleSkillsLib:e[2]||(e[2]=c=>t.$emit("toggle-skills-lib")),onShowSkillsLib:e[3]||(e[3]=c=>t.$emit("show-skills-lib")),onToggleEditMode:e[4]||(e[4]=c=>i.isCheckbox=!i.isCheckbox),onResetDatabase:e[5]||(e[5]=c=>t.$emit("reset-database")),onExportDatabase:e[6]||(e[6]=c=>t.$emit("export-database")),onImportDiscussions:e[7]||(e[7]=c=>t.$emit("import-discussions",c)),onImportDiscussionsBundle:e[8]||(e[8]=c=>t.$emit("import-discussions-bundle",c)),onShowModelConfig:e[9]||(e[9]=c=>t.$emit("show-model-config",c)),onSetBinding:e[10]||(e[10]=c=>t.$emit("set-binding",c)),onCopyModelName:e[11]||(e[11]=c=>t.$emit("copy-model-name",c)),onSetModel:e[12]||(e[12]=c=>t.$emit("set-model",c)),onPersonalitySelected:e[13]||(e[13]=c=>t.$emit("personality-selected",c)),onUnmountPersonality:e[14]||(e[14]=c=>t.$emit("unmount-personality",c)),onRemountPersonality:e[15]||(e[15]=c=>t.$emit("remount-personality",c)),onTalkPersonality:e[16]||(e[16]=c=>t.$emit("talk-personality",c)),onPersonalitiesReady:e[17]||(e[17]=c=>t.$emit("personalities-ready")),onShowPersonalityList:e[18]||(e[18]=c=>t.$emit("show-personality-list"))},null,8,["loading","is-checkbox"]),b("div",dvr,[b("form",{onSubmit:e[23]||(e[23]=oe(()=>{},["prevent"])),class:"relative"},[b("div",fvr,[b("div",hvr,[He(b("input",{type:"search",id:"discussion-search",class:"block w-full h-8 pl-8 pr-4 text-sm input",placeholder:"Search discussions...",title:"Filter discussions by title","onUpdate:modelValue":e[19]||(e[19]=c=>i.filterTitle=c),onInput:e[20]||(e[20]=(...c)=>s.handleSearchInput&&s.handleSearchInput(...c))},null,544),[[vt,i.filterTitle]]),e[36]||(e[36]=b("div",{class:"absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none"},[b("i",{"data-feather":"search",class:"w-4 h-4 text-gray-400 dark:text-gray-500"})],-1))]),b("button",{onClick:e[21]||(e[21]=(...c)=>s.cycleSortOrder&&s.cycleSortOrder(...c)),class:"svg-button p-1",title:`Sort by ${i.sortBy}: ${i.sortOrder==="asc"?"Ascending":"Descending"}`},[b("i",{"data-feather":s.sortIcon,class:"w-4 h-4"},null,8,Tvr)],8,pvr),b("button",{onClick:e[22]||(e[22]=(...c)=>s.cycleSortBy&&s.cycleSortBy(...c)),class:"svg-button p-1",title:`Sorting by: ${s.sortByLabel}`},[b("i",{"data-feather":i.sortBy==="date"?"calendar":"type",class:"w-4 h-4"},null,8,mvr)],8,Ovr)])],32)]),i.isCheckbox?(k(),R("div",gvr,[b("div",Qvr,[s.selectedDiscussions.length>0?(k(),R("p",_vr,"Selected: "+ae(s.selectedDiscussions.length),1)):ne("",!0),s.selectedDiscussions.length>0?(k(),R("div",vvr,[i.showConfirmation?ne("",!0):(k(),R("button",{key:0,class:"svg-button text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200",title:"Remove selected",type:"button",onClick:e[24]||(e[24]=oe(c=>i.showConfirmation=!0,["stop"]))},e[37]||(e[37]=[b("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)]))),i.showConfirmation?(k(),R("div",yvr,[b("button",{class:"svg-button text-green-500 hover:text-green-700 dark:text-green-400 dark:hover:text-green-200",title:"Confirm removal",type:"button",onClick:e[25]||(e[25]=oe((...c)=>s.deleteSelectedDiscussions&&s.deleteSelectedDiscussions(...c),["stop"]))},e[38]||(e[38]=[b("i",{"data-feather":"check",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-200",title:"Cancel removal",type:"button",onClick:e[26]||(e[26]=oe(c=>i.showConfirmation=!1,["stop"]))},e[39]||(e[39]=[b("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]))])):ne("",!0)])):ne("",!0),b("div",bvr,[b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200 rotate-90",title:"Export selected to a json file",type:"button",onClick:e[27]||(e[27]=oe(c=>t.$emit("export-discussions-as-json",s.selectedDiscussions),["stop"]))},e[40]||(e[40]=[b("i",{"data-feather":"codepen",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200 rotate-90",title:"Export selected to a folder",type:"button",onClick:e[28]||(e[28]=oe(c=>t.$emit("export-discussions-to-folder",s.selectedDiscussions),["stop"]))},e[41]||(e[41]=[b("i",{"data-feather":"folder",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200",title:"Export selected to a markdown file",type:"button",onClick:e[29]||(e[29]=oe(c=>t.$emit("export-discussions-as-markdown",s.selectedDiscussions),["stop"]))},e[42]||(e[42]=[b("i",{"data-feather":"bookmark",class:"w-5 h-5"},null,-1)])),b("button",{class:"svg-button text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200",title:"Select/Deselect All",type:"button",onClick:e[30]||(e[30]=oe((...c)=>s.selectAllDiscussions&&s.selectAllDiscussions(...c),["stop"]))},[b("i",{"data-feather":s.isAllSelected?"minus-square":"check-square",class:"w-5 h-5"},null,8,Svr)])])])])):ne("",!0),b("div",{id:"leftPanelScroll",class:"flex flex-col flex-grow overflow-y-auto overflow-x-hidden scrollbar",onDragover:e[32]||(e[32]=oe(c=>i.isDragOverDiscussion=!0,["prevent"])),onDragleave:e[33]||(e[33]=c=>i.isDragOverDiscussion=!1),onDrop:e[34]||(e[34]=oe((...c)=>s.handleDrop&&s.handleDrop(...c),["prevent"]))},[b("div",xvr,[b("div",{class:ye(["mx-0 flex flex-col flex-grow w-full",i.isDragOverDiscussion?"opacity-50 border-2 border-dashed border-blue-500":""])},[b("div",{id:"dis-list",class:ye([i.filterInProgress||n.toolbarLoading?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full pb-10"])},[te(V4,{name:"discussionsList"},{default:Ie(()=>[(k(!0),R(Ve,null,dt(s.groupedDiscussions,c=>(k(),R(Ve,{key:c.key},[c.type==="header"?(k(),R("div",{key:0,class:"sticky top-0 z-10 px-2 py-1 bg-gray-100 dark:bg-gray-800 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider shadow-sm flex items-center justify-between cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700",onClick:u=>s.toggleSection(c.key)},[b("span",null,ae(c.label),1),b("i",{"data-feather":c.collapsed?"chevron-right":"chevron-down",class:"w-4 h-4"},null,8,wvr)],8,Evr)):ne("",!0),c.type==="discussion"?(k(),Qt(l,{key:1,id:`dis-${c.data.id}`,title:c.data.title,selected:n.currentDiscussion&&n.currentDiscussion.id===c.data.id,loading:c.data.loading,isCheckbox:i.isCheckbox,checkBoxValue:c.data.checkBoxValue,"is-starred":c.data.isStarred,openfolder_enabled:!0,onSelect:u=>s.selectDiscussion(c.data),onDelete:u=>s.deleteDiscussion(c.data),onOpenFolder:u=>t.$emit("open-folder",c.data),onEditTitle:e[31]||(e[31]=u=>t.$emit("edit-title",u)),onMakeTitle:u=>t.$emit("make-title",c.data),onChecked:s.checkUncheckDiscussion,onToggleStar:u=>s.toggleStarDiscussion(c.data)},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","is-starred","onSelect","onDelete","onOpenFolder","onMakeTitle","onChecked","onToggleStar"])):ne("",!0)],64))),128))]),_:1}),s.groupedDiscussions.length===0&&!i.filterInProgress&&!n.toolbarLoading?(k(),R("div",Cvr,[e[43]||(e[43]=b("p",null,"No discussions found.",-1)),i.filterTitle?(k(),R("p",Lvr,"Try adjusting your search or filters.")):ne("",!0)])):ne("",!0),i.filterInProgress||n.toolbarLoading?(k(),R("div",$vr,e[44]||(e[44]=[b("p",null,"Loading discussions...",-1)]))):ne("",!0)],2)],2)])],32),b("div",Avr,[b("div",{class:"chat-bar text-center flex items-center justify-center w-full cursor-pointer hover:bg-blue-100 dark:hover:bg-blue-700 rounded transition duration-150 ease-in-out",onClick:e[35]||(e[35]=c=>t.$emit("show-database-selector"))},[e[45]||(e[45]=b("button",{class:"svg-button p-1"},[b("i",{"data-feather":"database",class:"w-4 h-4 mr-1"})],-1)),b("p",kvr,ae(n.formattedDatabaseName),1)])])])):ne("",!0)]),_:1})}const Rvr=st(nvr,[["render",Pvr],["__scopeId","data-v-18952e34"]]),Mvr={props:{htmlContent:{type:String,required:!0}}},Dvr=["innerHTML"];function Nvr(t,e,n,r,i,s){return k(),R("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,Dvr)}const Ivr=st(Mvr,[["render",Nvr]]),Hvr={name:"JsonNode",props:{data:{required:!0},label:{type:String,default:""},depth:{type:Number,default:0}},data(){return{expanded:!0}},computed:{isObject(){return this.data!==null&&typeof this.data=="object"},isArray(){return Array.isArray(this.data)}},methods:{toggle(){this.expanded=!this.expanded},getValueType(t){return t===null?"null":typeof t},formatValue(t){return t===null?"null":typeof t=="string"?`"${t}"`:t}}},Vvr={class:"json-tree"},qvr={key:0,class:"tree-node"},Uvr={class:"toggle-icon"},Bvr={class:"key"},zvr={class:"bracket"},Xvr={key:0,class:"node-content"},Fvr={key:1,class:"bracket-close"},jvr={key:1,class:"tree-leaf"},Yvr={key:0,class:"key"};function Gvr(t,e,n,r,i,s){const o=Xe("json-node",!0);return k(),R("div",Vvr,[s.isObject?(k(),R("div",qvr,[b("div",{class:"node-label",onClick:e[0]||(e[0]=(...a)=>s.toggle&&s.toggle(...a))},[b("span",Uvr,ae(i.expanded?"▼":"▶"),1),b("span",Bvr,ae(n.label),1),b("span",zvr,ae(s.isArray?"[":"{"),1)]),i.expanded?(k(),R("div",Xvr,[(k(!0),R(Ve,null,dt(n.data,(a,l)=>(k(),R("div",{key:l,class:"node-item"},[te(o,{data:a,label:l,depth:n.depth+1},null,8,["data","label","depth"])]))),128))])):ne("",!0),i.expanded?(k(),R("div",Fvr,ae(s.isArray?"]":"}"),1)):ne("",!0)])):(k(),R("div",jvr,[n.label?(k(),R("span",Yvr,ae(n.label)+":",1)):ne("",!0),b("span",{class:ye(["value",s.getValueType(n.data)])},ae(s.formatValue(n.data)),3)]))])}const Wvr=st(Hvr,[["render",Gvr],["__scopeId","data-v-f98ed845"]]),Zvr={name:"JsonViewer",components:{JsonNode:Wvr},props:{data:{required:!0},title:{type:String,default:"JSON Data"}},data(){return{expanded:!0}},computed:{parsedData(){if(typeof this.data=="string")try{return JSON.parse(this.data)}catch{return{error:"Invalid JSON"}}return this.data}},methods:{toggle(){this.expanded=!this.expanded}}},Kvr={class:"json-viewer"},Jvr={class:"toggle-icon"},eyr={class:"title"},tyr={key:0,class:"viewer-content"};function nyr(t,e,n,r,i,s){const o=Xe("json-node");return k(),R("div",Kvr,[b("div",{class:"viewer-header",onClick:e[0]||(e[0]=(...a)=>s.toggle&&s.toggle(...a))},[b("span",Jvr,ae(i.expanded?"▼":"▶"),1),b("span",eyr,ae(n.title),1)]),i.expanded?(k(),R("div",tyr,[te(o,{data:s.parsedData},null,8,["data"])])):ne("",!0)])}const ryr=st(Zvr,[["render",nyr],["__scopeId","data-v-cd1635fc"]]),iyr={name:"Step",props:{done:Boolean,text:String,status:Boolean,description:String}},syr={class:"step-icon-wrapper"},oyr={key:"spinner",class:"step-spinner"},ayr={key:"success",class:"step-icon-success w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},lyr={key:"fail",class:"step-icon-fail w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},cyr={class:"step-text-content"},uyr={class:"step-text"},dyr={key:0,class:"step-description"};function fyr(t,e,n,r,i,s){return k(),R("div",{class:ye(["step-component",[n.done?n.status?"step-component-success":"step-component-fail":"step-component-pending"]])},[b("div",syr,[te(cr,{name:"fade-icon",mode:"out-in"},{default:Ie(()=>[n.done?n.status?(k(),R("svg",ayr,e[0]||(e[0]=[b("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z","clip-rule":"evenodd"},null,-1)]))):(k(),R("svg",lyr,e[1]||(e[1]=[b("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z","clip-rule":"evenodd"},null,-1)]))):(k(),R("div",oyr))]),_:1})]),b("div",cyr,[b("div",uyr,ae(n.text||"Processing..."),1),n.description?(k(),R("div",dyr,ae(n.description),1)):ne("",!0)])],2)}const hyr=st(iyr,[["render",fyr],["__scopeId","data-v-6d675aab"]]),pyr=["title"],Tyr={key:0,class:"icon icon-success",viewBox:"0 0 24 24"},Oyr={key:1,class:"icon icon-fail",viewBox:"0 0 24 24"},myr={key:2,class:"icon-spinner"},gyr={key:1,class:"icon-text"},Qyr={__name:"StatusIcon",props:{status:{type:String,required:!0},icon:Boolean,iconDone:{type:String,default:"✓"},iconFailed:{type:String,default:"✗"},iconProcessing:{type:String,default:"⟳"},titleDone:{type:String,default:"Success"},titleFailed:{type:String,default:"Failure"},titleProcessing:{type:String,default:"Processing"}},setup(t){const e=t,n=Je(()=>e.status==="Done"?e.titleDone:e.status==="Failed"?e.titleFailed:e.titleProcessing),r=Je(()=>e.status==="Done"?e.iconDone:e.status==="Failed"?e.iconFailed:e.iconProcessing);return(i,s)=>(k(),R("div",{class:"status-icon",title:n.value},[t.icon?(k(),R(Ve,{key:0},[t.status==="Done"?(k(),R("svg",Tyr,s[0]||(s[0]=[b("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},null,-1)]))):t.status==="Failed"?(k(),R("svg",Oyr,s[1]||(s[1]=[b("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"},null,-1)]))):(k(),R("div",myr))],64)):(k(),R("span",gyr,ae(r.value),1))],8,pyr))}},_yr=st(Qyr,[["__scopeId","data-v-b3d110c2"]]),vyr=[sJ(),oJ(),WK(),VJ(),EJ(),FK(),GK(),nn.allowMultipleSelections.of(!0),OJ(),C3(wd,{fallback:!0}),AJ(),Mee(),Vee(),KK(),JK(),ZK(),jSt(),B4.of([...Iee,...Oee,...Cee,...BJ,...yJ,...Tw,...Bee])],yyr="modulepreload",byr=function(t){return"/"+t},cY={},Ee=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=byr(l),l in cY)return;cY[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":yyr,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};function Ne(t){return new ri(h4.define(t))}function Z2(t){return Ee(()=>Promise.resolve().then(()=>FPt),void 0).then(e=>e.sql({dialect:e[t]}))}const Syr=[be.of({name:"C",extensions:["c","h","ino"],load(){return Ee(()=>Promise.resolve().then(()=>rH),void 0).then(t=>t.cpp())}}),be.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return Ee(()=>Promise.resolve().then(()=>rH),void 0).then(t=>t.cpp())}}),be.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Z2("Cassandra")}}),be.of({name:"CSS",extensions:["css"],load(){return Ee(()=>Promise.resolve().then(()=>jLt),void 0).then(t=>t.css())}}),be.of({name:"Go",extensions:["go"],load(){return Ee(()=>import("./index-NKVHnLNP.js"),[]).then(t=>t.go())}}),be.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return Ee(()=>Promise.resolve().then(()=>JLt),void 0).then(t=>t.html())}}),be.of({name:"Java",extensions:["java"],load(){return Ee(()=>Promise.resolve().then(()=>fAt),void 0).then(t=>t.java())}}),be.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return Ee(()=>Promise.resolve().then(()=>x8),void 0).then(t=>t.javascript())}}),be.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return Ee(()=>Promise.resolve().then(()=>i$t),void 0).then(t=>t.json())}}),be.of({name:"JSX",extensions:["jsx"],load(){return Ee(()=>Promise.resolve().then(()=>x8),void 0).then(t=>t.javascript({jsx:!0}))}}),be.of({name:"LESS",extensions:["less"],load(){return Ee(()=>import("./index-BoLdJ8R5.js"),[]).then(t=>t.less())}}),be.of({name:"Liquid",extensions:["liquid"],load(){return Ee(()=>import("./index-BZZBodTC.js"),[]).then(t=>t.liquid())}}),be.of({name:"MariaDB SQL",load(){return Z2("MariaSQL")}}),be.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return Ee(()=>Promise.resolve().then(()=>q$t),void 0).then(t=>t.markdown())}}),be.of({name:"MS SQL",load(){return Z2("MSSQL")}}),be.of({name:"MySQL",load(){return Z2("MySQL")}}),be.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return Ee(()=>Promise.resolve().then(()=>Mkt),void 0).then(t=>t.php())}}),be.of({name:"PLSQL",extensions:["pls"],load(){return Z2("PLSQL")}}),be.of({name:"PostgreSQL",load(){return Z2("PostgreSQL")}}),be.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return Ee(()=>Promise.resolve().then(()=>NCt),void 0).then(t=>t.python())}}),be.of({name:"Rust",extensions:["rs"],load(){return Ee(()=>Promise.resolve().then(()=>tPt),void 0).then(t=>t.rust())}}),be.of({name:"Sass",extensions:["sass"],load(){return Ee(()=>import("./index-BoYRIm2P.js"),[]).then(t=>t.sass({indented:!0}))}}),be.of({name:"SCSS",extensions:["scss"],load(){return Ee(()=>import("./index-BoYRIm2P.js"),[]).then(t=>t.sass())}}),be.of({name:"SQL",extensions:["sql"],load(){return Z2("StandardSQL")}}),be.of({name:"SQLite",load(){return Z2("SQLite")}}),be.of({name:"TSX",extensions:["tsx"],load(){return Ee(()=>Promise.resolve().then(()=>x8),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),be.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return Ee(()=>Promise.resolve().then(()=>x8),void 0).then(t=>t.javascript({typescript:!0}))}}),be.of({name:"WebAssembly",extensions:["wat","wast"],load(){return Ee(()=>import("./index-BLyg1k4x.js"),[]).then(t=>t.wast())}}),be.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return Ee(()=>Promise.resolve().then(()=>pRt),void 0).then(t=>t.xml())}}),be.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return Ee(()=>Promise.resolve().then(()=>FRt),void 0).then(t=>t.yaml())}}),be.of({name:"APL",extensions:["dyalog","apl"],load(){return Ee(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>Ne(t.apl))}}),be.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return Ee(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>Ne(t.asciiArmor))}}),be.of({name:"ASN.1",extensions:["asn","asn1"],load(){return Ee(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>Ne(t.asn1({})))}}),be.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return Ee(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>Ne(t.asterisk))}}),be.of({name:"Brainfuck",extensions:["b","bf"],load(){return Ee(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>Ne(t.brainfuck))}}),be.of({name:"Cobol",extensions:["cob","cpy"],load(){return Ee(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>Ne(t.cobol))}}),be.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.csharp))}}),be.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return Ee(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>Ne(t.clojure))}}),be.of({name:"ClojureScript",extensions:["cljs"],load(){return Ee(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>Ne(t.clojure))}}),be.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return Ee(()=>import("./css-BnMrqG3P.js"),[]).then(t=>Ne(t.gss))}}),be.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return Ee(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>Ne(t.cmake))}}),be.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return Ee(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>Ne(t.coffeeScript))}}),be.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return Ee(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>Ne(t.commonLisp))}}),be.of({name:"Cypher",extensions:["cyp","cypher"],load(){return Ee(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>Ne(t.cypher))}}),be.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return Ee(()=>import("./python-BuPzkPfP.js"),[]).then(t=>Ne(t.cython))}}),be.of({name:"Crystal",extensions:["cr"],load(){return Ee(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>Ne(t.crystal))}}),be.of({name:"D",extensions:["d"],load(){return Ee(()=>import("./d-pRatUO7H.js"),[]).then(t=>Ne(t.d))}}),be.of({name:"Dart",extensions:["dart"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.dart))}}),be.of({name:"diff",extensions:["diff","patch"],load(){return Ee(()=>import("./diff-DbItnlRl.js"),[]).then(t=>Ne(t.diff))}}),be.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return Ee(()=>import("./dockerfile-BU1Ap__c.js"),__vite__mapDeps([0,1])).then(t=>Ne(t.dockerFile))}}),be.of({name:"DTD",extensions:["dtd"],load(){return Ee(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>Ne(t.dtd))}}),be.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return Ee(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>Ne(t.dylan))}}),be.of({name:"EBNF",load(){return Ee(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>Ne(t.ebnf))}}),be.of({name:"ECL",extensions:["ecl"],load(){return Ee(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>Ne(t.ecl))}}),be.of({name:"edn",extensions:["edn"],load(){return Ee(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>Ne(t.clojure))}}),be.of({name:"Eiffel",extensions:["e"],load(){return Ee(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>Ne(t.eiffel))}}),be.of({name:"Elm",extensions:["elm"],load(){return Ee(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>Ne(t.elm))}}),be.of({name:"Erlang",extensions:["erl"],load(){return Ee(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>Ne(t.erlang))}}),be.of({name:"Esper",load(){return Ee(()=>import("./sql-D0XecflT.js"),[]).then(t=>Ne(t.esper))}}),be.of({name:"Factor",extensions:["factor"],load(){return Ee(()=>import("./factor-BPndPnYX.js"),__vite__mapDeps([2,1])).then(t=>Ne(t.factor))}}),be.of({name:"FCL",load(){return Ee(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>Ne(t.fcl))}}),be.of({name:"Forth",extensions:["forth","fth","4th"],load(){return Ee(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>Ne(t.forth))}}),be.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return Ee(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>Ne(t.fortran))}}),be.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return Ee(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>Ne(t.fSharp))}}),be.of({name:"Gas",extensions:["s"],load(){return Ee(()=>import("./gas-Bneqetm1.js"),[]).then(t=>Ne(t.gas))}}),be.of({name:"Gherkin",extensions:["feature"],load(){return Ee(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>Ne(t.gherkin))}}),be.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return Ee(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>Ne(t.groovy))}}),be.of({name:"Haskell",extensions:["hs"],load(){return Ee(()=>import("./haskell-BWDZoCOh.js"),[]).then(t=>Ne(t.haskell))}}),be.of({name:"Haxe",extensions:["hx"],load(){return Ee(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>Ne(t.haxe))}}),be.of({name:"HXML",extensions:["hxml"],load(){return Ee(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>Ne(t.hxml))}}),be.of({name:"HTTP",load(){return Ee(()=>import("./http-DBlCnlav.js"),[]).then(t=>Ne(t.http))}}),be.of({name:"IDL",extensions:["pro"],load(){return Ee(()=>import("./idl-BEugSyMb.js"),[]).then(t=>Ne(t.idl))}}),be.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return Ee(()=>import("./javascript-qCveANmP.js"),[]).then(t=>Ne(t.jsonld))}}),be.of({name:"Jinja2",extensions:["j2","jinja","jinja2"],load(){return Ee(()=>import("./jinja2-C4DGRd-O.js"),[]).then(t=>Ne(t.jinja2))}}),be.of({name:"Julia",extensions:["jl"],load(){return Ee(()=>import("./julia-DuME0IfC.js"),[]).then(t=>Ne(t.julia))}}),be.of({name:"Kotlin",extensions:["kt","kts"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.kotlin))}}),be.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return Ee(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>Ne(t.liveScript))}}),be.of({name:"Lua",extensions:["lua"],load(){return Ee(()=>Promise.resolve().then(()=>xMt),void 0).then(t=>Ne(t.lua))}}),be.of({name:"mIRC",extensions:["mrc"],load(){return Ee(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>Ne(t.mirc))}}),be.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return Ee(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>Ne(t.mathematica))}}),be.of({name:"Modelica",extensions:["mo"],load(){return Ee(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>Ne(t.modelica))}}),be.of({name:"MUMPS",extensions:["mps"],load(){return Ee(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>Ne(t.mumps))}}),be.of({name:"Mbox",extensions:["mbox"],load(){return Ee(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>Ne(t.mbox))}}),be.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return Ee(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>Ne(t.nginx))}}),be.of({name:"NSIS",extensions:["nsh","nsi"],load(){return Ee(()=>import("./nsis-ClDXqMnM.js"),__vite__mapDeps([3,1])).then(t=>Ne(t.nsis))}}),be.of({name:"NTriples",extensions:["nt","nq"],load(){return Ee(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>Ne(t.ntriples))}}),be.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.objectiveC))}}),be.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.objectiveCpp))}}),be.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return Ee(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>Ne(t.oCaml))}}),be.of({name:"Octave",extensions:["m"],load(){return Ee(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>Ne(t.octave))}}),be.of({name:"Oz",extensions:["oz"],load(){return Ee(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>Ne(t.oz))}}),be.of({name:"Pascal",extensions:["p","pas"],load(){return Ee(()=>import("./pascal--L3eBynH.js"),[]).then(t=>Ne(t.pascal))}}),be.of({name:"Perl",extensions:["pl","pm"],load(){return Ee(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>Ne(t.perl))}}),be.of({name:"Pig",extensions:["pig"],load(){return Ee(()=>import("./pig-CevX1Tat.js"),[]).then(t=>Ne(t.pig))}}),be.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return Ee(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>Ne(t.powerShell))}}),be.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return Ee(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>Ne(t.properties))}}),be.of({name:"ProtoBuf",extensions:["proto"],load(){return Ee(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>Ne(t.protobuf))}}),be.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return Ee(()=>import("./pug-DukmZTjD.js"),__vite__mapDeps([4,5])).then(t=>Ne(t.pug))}}),be.of({name:"Puppet",extensions:["pp"],load(){return Ee(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>Ne(t.puppet))}}),be.of({name:"Q",extensions:["q"],load(){return Ee(()=>import("./q-ZnEupP5q.js"),[]).then(t=>Ne(t.q))}}),be.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return Ee(()=>import("./r-B6wPVr8A.js"),[]).then(t=>Ne(t.r))}}),be.of({name:"RPM Changes",load(){return Ee(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>Ne(t.rpmChanges))}}),be.of({name:"RPM Spec",extensions:["spec"],load(){return Ee(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>Ne(t.rpmSpec))}}),be.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return Ee(()=>Promise.resolve().then(()=>mMt),void 0).then(t=>Ne(t.ruby))}}),be.of({name:"SAS",extensions:["sas"],load(){return Ee(()=>import("./sas-B4kiWyti.js"),[]).then(t=>Ne(t.sas))}}),be.of({name:"Scala",extensions:["scala"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.scala))}}),be.of({name:"Scheme",extensions:["scm","ss"],load(){return Ee(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>Ne(t.scheme))}}),be.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return Ee(()=>Promise.resolve().then(()=>iMt),void 0).then(t=>Ne(t.shell))}}),be.of({name:"Sieve",extensions:["siv","sieve"],load(){return Ee(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>Ne(t.sieve))}}),be.of({name:"Smalltalk",extensions:["st"],load(){return Ee(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>Ne(t.smalltalk))}}),be.of({name:"Solr",load(){return Ee(()=>import("./solr-DehyRSwq.js"),[]).then(t=>Ne(t.solr))}}),be.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return Ee(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>Ne(t.sml))}}),be.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return Ee(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>Ne(t.sparql))}}),be.of({name:"Spreadsheet",alias:["excel","formula"],load(){return Ee(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>Ne(t.spreadsheet))}}),be.of({name:"Squirrel",extensions:["nut"],load(){return Ee(()=>import("./clike-Cr_nJiF2.js"),[]).then(t=>Ne(t.squirrel))}}),be.of({name:"Stylus",extensions:["styl"],load(){return Ee(()=>import("./stylus-BdAi1jBa.js"),[]).then(t=>Ne(t.stylus))}}),be.of({name:"Swift",extensions:["swift"],load(){return Ee(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>Ne(t.swift))}}),be.of({name:"sTeX",load(){return Ee(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>Ne(t.stex))}}),be.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return Ee(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>Ne(t.stex))}}),be.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return Ee(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>Ne(t.verilog))}}),be.of({name:"Tcl",extensions:["tcl"],load(){return Ee(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>Ne(t.tcl))}}),be.of({name:"Textile",extensions:["textile"],load(){return Ee(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>Ne(t.textile))}}),be.of({name:"TiddlyWiki",load(){return Ee(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>Ne(t.tiddlyWiki))}}),be.of({name:"Tiki wiki",load(){return Ee(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>Ne(t.tiki))}}),be.of({name:"TOML",extensions:["toml"],load(){return Ee(()=>import("./toml-BXUEaScT.js"),[]).then(t=>Ne(t.toml))}}),be.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return Ee(()=>import("./troff-wAsdV37c.js"),[]).then(t=>Ne(t.troff))}}),be.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return Ee(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>Ne(t.ttcn))}}),be.of({name:"TTCN_CFG",extensions:["cfg"],load(){return Ee(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>Ne(t.ttcnCfg))}}),be.of({name:"Turtle",extensions:["ttl"],load(){return Ee(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>Ne(t.turtle))}}),be.of({name:"Web IDL",extensions:["webidl"],load(){return Ee(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>Ne(t.webIDL))}}),be.of({name:"VB.NET",extensions:["vb"],load(){return Ee(()=>import("./vb-CmGdzxic.js"),[]).then(t=>Ne(t.vb))}}),be.of({name:"VBScript",extensions:["vbs"],load(){return Ee(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>Ne(t.vbScript))}}),be.of({name:"Velocity",extensions:["vtl"],load(){return Ee(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>Ne(t.velocity))}}),be.of({name:"Verilog",extensions:["v"],load(){return Ee(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>Ne(t.verilog))}}),be.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return Ee(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>Ne(t.vhdl))}}),be.of({name:"XQuery",extensions:["xy","xquery"],load(){return Ee(()=>import("./xquery-CQfU5ijd.js"),[]).then(t=>Ne(t.xQuery))}}),be.of({name:"Yacas",extensions:["ys"],load(){return Ee(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>Ne(t.yacas))}}),be.of({name:"Z80",extensions:["z80"],load(){return Ee(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>Ne(t.z80))}}),be.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return Ee(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>Ne(t.mscgen))}}),be.of({name:"Xù",extensions:["xu"],load(){return Ee(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>Ne(t.xu))}}),be.of({name:"MsGenny",extensions:["msgenny"],load(){return Ee(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>Ne(t.msgenny))}}),be.of({name:"Vue",extensions:["vue"],load(){return Ee(()=>Promise.resolve().then(()=>eMt),void 0).then(t=>t.vue())}}),be.of({name:"Angular Template",load(){return Ee(()=>import("./index-BSvAbCev.js"),[]).then(t=>t.angular())}})],xyr={name:"DropdownSubmenu",props:{title:{type:String,required:!0},icon:{type:String,required:!1,default:null}},setup(){const t=We(!1);let e=null;const n=()=>{e&&(clearTimeout(e),e=null),t.value||(t.value=!0,Fe(()=>{Re.replace()}))},r=()=>{e=setTimeout(()=>{t.value=!1,e=null},150)};return Ii(()=>{Fe(()=>{Re.replace()})}),{isOpen:t,openSubmenu:n,closeSubmenu:r}}},Eyr=["aria-expanded"],wyr={class:"flex items-center gap-2"},Cyr=["data-feather"],Lyr={class:"truncate"},$yr={key:0,class:"absolute top-0 left-full mt-[-1px] ml-1 w-auto min-w-[10rem] origin-top-left rounded-md bg-white dark:bg-gray-800 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-20 py-1",role:"menu","aria-orientation":"vertical","aria-labelledby":"submenu-button"};function Ayr(t,e,n,r,i,s){return k(),R("div",{class:"relative",onMouseenter:e[0]||(e[0]=(...o)=>r.openSubmenu&&r.openSubmenu(...o)),onMouseleave:e[1]||(e[1]=(...o)=>r.closeSubmenu&&r.closeSubmenu(...o))},[b("button",{type:"button",class:"w-full flex items-center justify-between px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-700",role:"menuitem",tabindex:"-1","aria-haspopup":!0,"aria-expanded":r.isOpen},[b("div",wyr,[n.icon?(k(),R("i",{key:0,"data-feather":n.icon,class:"w-4 h-4 flex-shrink-0"},null,8,Cyr)):ne("",!0),b("span",Lyr,ae(n.title),1)]),e[2]||(e[2]=b("i",{"data-feather":"chevron-right",class:"w-4 h-4 ml-auto flex-shrink-0 text-gray-400"},null,-1))],8,Eyr),te(cr,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:Ie(()=>[r.isOpen?(k(),R("div",$yr,[er(t.$slots,"default",{},void 0,!0)])):ne("",!0)]),_:3})],32)}const kyr=st(xyr,[["render",Ayr],["__scopeId","data-v-6d202a8d"]]),Pyr=t=>{let e=[];for(let n of t.selection.ranges){const r=t.doc.lineAt(n.from),i=t.doc.lineAt(n.to);for(let s=r.number;s<=i.number;s++)e.some(o=>o.number===s)||e.push(t.doc.line(s))}return e},m3=(t,e,n)=>n&&e===0||!n&&e===t.doc.length?!1:(n?t.doc.sliceString(e-1,e):t.doc.sliceString(e,e+1))!==` `,Ryr={name:"MarkdownEditor",components:{DropdownMenu:Noe,DropdownSubmenu:kyr,ToolbarButton:oT},props:{modelValue:{type:String,required:!0},editorClass:{type:[String,Object,Array],default:""},toolbarClass:{type:[String,Object,Array],default:""},buttonClass:{type:[String,Object,Array],default:""},toolbarButtonIconSize:{type:Number,default:16},theme:{type:Object,required:!0}},emits:["update:modelValue"],data(){return{editorView:null,updatingFromSelf:!1}},computed:{toolbarButtonBaseClass(){return this.buttonClass||"px-1.5 py-1 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded hover:bg-gray-200 dark:hover:bg-gray-500 text-sm focus:outline-none focus:ring-1 focus:ring-blue-400 dark:text-gray-200 flex items-center justify-center w-7 h-7"},iconSize(){return this.toolbarButtonIconSize},svgIconSizeClass(){const t=Math.round(this.iconSize/4);return`w-${t} h-${t}`}},methods:{getButtonTitle(t){return{bold:"Bold (Ctrl+B)",italic:"Italic (Ctrl+I)",strikethrough:"Strikethrough",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",blockquote:"Blockquote",ul:"Unordered List",ol:"Ordered List",codeblock:"Code Block",inlinecode:"Inline Code",link:"Insert Link",image:"Insert Image",hr:"Horizontal Rule",latex:"Inline LaTeX ($...$)",latexBlock:"LaTeX Block ($$...$$)",latexEnvEquation:"Equation Environment",latexEnvAlign:"Align Environment",latexEnvGather:"Gather Environment",latexEnvEquationStar:"Equation* Environment (Unnumbered)",latexEnvAlignStar:"Align* Environment (Unnumbered)",latexEnvGatherStar:"Gather* Environment (Unnumbered)"}[t]||t},initializeEditor(){this.editorView&&this.editorView.destroy();const t=nn.create({doc:this.modelValue,extensions:[vyr,B4.of([mee]),Rw({base:Ip,codeLanguages:Syr}),this.theme,tt.lineWrapping,tt.updateListener.of(e=>{e.docChanged&&!this.updatingFromSelf&&this.$emit("update:modelValue",e.state.doc.toString())}),tt.contentAttributes.of({"aria-label":"Markdown editor content"})]});this.editorView=new tt({state:t,parent:this.$refs.editorRef})},destroyEditor(){this.editorView&&(this.editorView.destroy(),this.editorView=null)},applyFormat(t,e={}){if(!this.editorView)return;const n=this.editorView,r=n.state;let i=[];const s=r.selection.main,o=r.doc.sliceString(s.from,s.to);let a="",l="",c="",u=!1;switch(t){case"bold":a="**",l="**";break;case"italic":a="_",l="_";break;case"strikethrough":a="~~",l="~~";break;case"inlinecode":a="`",l="`";break;case"latex":a="$",l="$";break;case"h1":c="# ";break;case"h2":c="## ";break;case"h3":c="### ";break;case"blockquote":c="> ";break;case"ul":c="- ";break;case"ol":c="1. ";break;case"latexBlock":a=`$$ `,l=` $$`,u=!0;break;case"codeblock":a="```"+(e.language||"")+` @@ -616,7 +616,7 @@ $$`,u=!0;break;case"codeblock":a="```"+(e.language||"")+` - `}},watch:{htmlContent:{handler(t){this.renderIsolatedContent(t)},immediate:!0},showRightPanel(t){t&&this.$nextTick(()=>{this.renderIsolatedContent(this.htmlContent)})}},methods:{renderIsolatedContent(t){var r;if(!this.$refs.isolatedContent||!this.showRightPanel)return;this.$refs.isolatedContent.innerHTML="";const e=document.createElement("iframe");e.style.border="none",e.style.width="100%",e.style.height="100%",e.setAttribute("sandbox","allow-scripts allow-same-origin"),e.setAttribute("title","Rendered HTML Content"),this.$refs.isolatedContent.appendChild(e);const n=e.contentDocument||((r=e.contentWindow)==null?void 0:r.document);if(n){const i=document.documentElement.classList.contains("dark");let s=t;i&&(s=s.replace("[n.showRightPanel?(k(),R("div",_Cr,[b("div",vCr,null,512)])):ne("",!0)]),_:1})}const bCr=st(QCr,[["render",yCr]]),SCr={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:Voe,MarkdownRenderer:rT},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){Ae.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"),Ae.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){console.log("loading skill",t),Ae.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),Ae.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){Ae.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(){}}},xCr={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},ECr={class:"w-[15rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},wCr={classclass:"absolute flex flex-col no-scrollbar shadow-lg w-[15rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},CCr={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"};function LCr(t,e,n,r,i,s){const o=Xe("Discussion"),a=Xe("MarkdownRenderer");return k(),R("div",{class:ye([{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"])},[b("div",xCr,[b("div",ECr,[He(b("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 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 transition-all duration-200",placeholder:"Search discussions...",title:"Filter skills by title","onUpdate:modelValue":e[0]||(e[0]=l=>i.searchQuery=l),onKeyup:e[1]||(e[1]=gr((...l)=>s.searchSkills&&s.searchSkills(...l),["enter"]))},null,544),[[vt,i.searchQuery]]),b("div",wCr,[e[3]||(e[3]=b("h2",{class:"text-xl font-bold m-4"},"Titles",-1)),i.titles.length>0?(k(),Qt(V4,{key:0,name:"list"},{default:Ie(()=>[(k(!0),R(Ve,null,dt(i.titles,l=>(k(),Qt(o,{key:l.id,id:l.id,title:l.title,selected:s.fetchContent(l.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,openfolder_enabled:!1,onSelect:c=>s.fetchContent(l.id),onDelete:c=>s.deleteSkill(l.id),onEditTitle:s.editTitle,onMakeTitle:s.makeTitle,onChecked:s.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):ne("",!0)])]),b("div",CCr,[e[4]||(e[4]=b("h2",{class:"text-xl font-bold m-4"},"Content",-1)),te(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"])])]),b("button",{onClick:e[2]||(e[2]=(...l)=>s.closeComponent&&s.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const $Cr=st(SCr,[["render",LCr]]),ACr={props:{personality:{type:Object,required:!0},config:{type:Object,required:!0}},data(){return{show:!1,title:"Add AI Agent",iconUrl:"",file:null,tempConfig:{}}},methods:{showForm(){this.showDialog=!0},hideForm(){this.showDialog=!1},selectIcon(t){t.target.files&&(this.file=t.target.files[0],this.iconUrl=URL.createObjectURL(this.file))},showPanel(){this.show=!0},hide(){this.show=!1},submitForm(){Ae.post("/set_personality_config",{client_id:this.$store.state.client_id,category:this.personality.category,name:this.personality.folder,config:this.config}).then(t=>{const e=t.data;console.log("Done"),e.status?(this.currentPersonConfig=e.config,this.showPersonalityEditor=!0):console.error(e.error)}).catch(t=>{console.error(t)})}}},kCr={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},PCr={class:"relative w-full max-h-full bg-bg-light dark:bg-bg-dark"},RCr={class:"w-full h-full relative items-center gap-2 rounded-lg border bg-bg-light dark:bg-bg-dark p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-900"},MCr={class:"justify-center text-center items-center w-full bg-bg-light dark:bg-bg-dark"},DCr={class:"w-full flex flex-row mt-4 text-center justify-center"},NCr={class:"w-full max-h-full container bg-bg-light dark:bg-bg-dark"},ICr={class:"mb-4 w-full"},HCr={class:"w-full bg-bg-light dark:bg-bg-dark"};function VCr(t,e,n,r,i,s){return i.show?(k(),R("div",kCr,[b("div",PCr,[b("div",RCr,[b("button",{type:"button",onClick:e[0]||(e[0]=o=>s.hide()),class:"absolute top-1 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"},e[17]||(e[17]=[b("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[b("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),b("span",{class:"sr-only"},"Close modal",-1)])),b("div",MCr,[b("div",DCr,[b("button",{type:"submit",onClick:e[1]||(e[1]=oe((...o)=>s.submitForm&&s.submitForm(...o),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Commit AI to Server "),b("button",{onClick:e[2]||(e[2]=oe(o=>s.hide(),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Close ")]),b("div",NCr,[b("form",ICr,[b("table",HCr,[b("tr",null,[e[18]||(e[18]=b("td",null,[b("label",{for:"personalityConditioning"},"Personality Conditioning:")],-1)),b("td",null,[He(b("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"personalityConditioning","onUpdate:modelValue":e[3]||(e[3]=o=>n.config.personality_conditioning=o)},null,512),[[vt,n.config.personality_conditioning]])])]),b("tr",null,[e[19]||(e[19]=b("td",null,[b("label",{for:"userMessagePrefix"},"User Message Prefix:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"userMessagePrefix","onUpdate:modelValue":e[4]||(e[4]=o=>n.config.user_message_prefix=o)},null,512),[[vt,n.config.user_message_prefix]])])]),b("tr",null,[e[20]||(e[20]=b("td",null,[b("label",{for:"aiMessagePrefix"},"AI Message Prefix:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"aiMessagePrefix","onUpdate:modelValue":e[5]||(e[5]=o=>n.config.ai_message_prefix=o)},null,512),[[vt,n.config.ai_message_prefix]])])]),b("tr",null,[e[21]||(e[21]=b("td",null,[b("label",{for:"linkText"},"Link Text:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"linkText","onUpdate:modelValue":e[6]||(e[6]=o=>n.config.link_text=o)},null,512),[[vt,n.config.link_text]])])]),b("tr",null,[e[22]||(e[22]=b("td",null,[b("label",{for:"welcomeMessage"},"Welcome Message:")],-1)),b("td",null,[He(b("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"welcomeMessage","onUpdate:modelValue":e[7]||(e[7]=o=>n.config.welcome_message=o)},null,512),[[vt,n.config.welcome_message]])])]),b("tr",null,[e[23]||(e[23]=b("td",null,[b("label",{for:"modelTemperature"},"Model Temperature:")],-1)),b("td",null,[He(b("input",{type:"number",id:"modelTemperature","onUpdate:modelValue":e[8]||(e[8]=o=>n.config.model_temperature=o)},null,512),[[vt,n.config.model_temperature]])])]),b("tr",null,[e[24]||(e[24]=b("td",null,[b("label",{for:"modelTopK"},"Model Top K:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopK","onUpdate:modelValue":e[9]||(e[9]=o=>n.config.model_top_k=o)},null,512),[[vt,n.config.model_top_k]])])]),b("tr",null,[e[25]||(e[25]=b("td",null,[b("label",{for:"modelTopP"},"Model Top P:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopP","onUpdate:modelValue":e[10]||(e[10]=o=>n.config.model_top_p=o)},null,512),[[vt,n.config.model_top_p]])])]),b("tr",null,[e[26]||(e[26]=b("td",null,[b("label",{for:"modelRepeatPenalty"},"Model Repeat Penalty:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatPenalty","onUpdate:modelValue":e[11]||(e[11]=o=>n.config.model_repeat_penalty=o)},null,512),[[vt,n.config.model_repeat_penalty]])])]),b("tr",null,[e[27]||(e[27]=b("td",null,[b("label",{for:"modelRepeatLastN"},"Model Repeat Last N:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatLastN","onUpdate:modelValue":e[12]||(e[12]=o=>n.config.model_repeat_last_n=o)},null,512),[[vt,n.config.model_repeat_last_n]])])]),b("tr",null,[e[28]||(e[28]=b("td",null,[b("label",{for:"recommendedBinding"},"Recommended Binding:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedBinding","onUpdate:modelValue":e[13]||(e[13]=o=>n.config.recommended_binding=o)},null,512),[[vt,n.config.recommended_binding]])])]),b("tr",null,[e[29]||(e[29]=b("td",null,[b("label",{for:"recommendedModel"},"Recommended Model:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedModel","onUpdate:modelValue":e[14]||(e[14]=o=>n.config.recommended_model=o)},null,512),[[vt,n.config.recommended_model]])])]),b("tr",null,[e[30]||(e[30]=b("td",null,[b("label",{class:"dark:bg-black dark:text-primary w-full",for:"dependencies"},"Dependencies:")],-1)),b("td",null,[He(b("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"dependencies","onUpdate:modelValue":e[15]||(e[15]=o=>n.config.dependencies=o)},null,512),[[vt,n.config.dependencies]])])]),b("tr",null,[e[31]||(e[31]=b("td",null,[b("label",{for:"antiPrompts"},"Anti Prompts:")],-1)),b("td",null,[He(b("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"antiPrompts","onUpdate:modelValue":e[16]||(e[16]=o=>n.config.anti_prompts=o)},null,512),[[vt,n.config.anti_prompts]])])])])])])])])])])):ne("",!0)}const qCr=st(ACr,[["render",VCr]]),UCr={data(){return{showPopup:!1,webpageUrl:"https://lollms.com/"}},methods:{show(){this.showPopup=!0},hide(){this.showPopup=!1},save_configuration(){Ae.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1)})}}},BCr={key:0,class:"fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50"},zCr={class:"relative panels-color p-6 rounded-lg shadow-xl max-w-3xl w-full mx-4"},XCr=["src"],FCr={class:"flex items-center mt-4"};function jCr(t,e,n,r,i,s){return k(),Qt(cr,{name:"fade"},{default:Ie(()=>[i.showPopup?(k(),R("div",BCr,[b("div",zCr,[b("button",{onClick:e[0]||(e[0]=(...o)=>s.hide&&s.hide(...o)),class:"absolute top-2 right-2 svg-button z-10",title:"Close"},e[3]||(e[3]=[b("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[b("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])),b("iframe",{src:i.webpageUrl,class:"w-full h-[70vh] rounded-md border border-blue-300 dark:border-blue-600 bg-white dark:bg-blue-900"},null,8,XCr),b("div",FCr,[He(b("input",{type:"checkbox",id:"startup",class:"rounded border-blue-300 dark:border-blue-600 text-blue-600 focus:ring-blue-500 dark:bg-blue-700 dark:focus:ring-offset-blue-800","onUpdate:modelValue":e[1]||(e[1]=o=>this.$store.state.config.show_news_panel=o),onChange:e[2]||(e[2]=(...o)=>s.save_configuration&&s.save_configuration(...o))},null,544),[[W3,this.$store.state.config.show_news_panel]]),e[4]||(e[4]=b("label",{for:"startup",class:"ml-2 label !mb-0 cursor-pointer"},"Show at startup",-1))])])])):ne("",!0)]),_:1})}const YCr=st(UCr,[["render",jCr],["__scopeId","data-v-425d1bc4"]]),GCr={name:"ChangelogPopup",data(){return{showChangelogPopup:!1,changelogContent:"",currentVersion:"0.0.0"}},computed:{parsedChangelogContent(){const t={breaks:!0,gfm:!0},e=Kt(this.changelogContent,t);return C4.sanitize(e)}},async mounted(){await this.checkChangelogUpdate()},methods:{async fetchVersion(){try{const t=await Ae.get("/get_lollms_webui_version");if(t&&t.data){const{version_main:e,version_secondary:n,version_type:r,version_codename:i}=t.data;let s=`${e}.${n}`;return r&&(s+=` ${r}`),i&&(s+=` (${i})`),this.$store.state.version=s,this.currentVersion=s,s}}catch(t){console.error("Error fetching LoLLMs version:",t)}return this.$store.state.version||"0.0.0"},async checkChangelogUpdate(){try{const t=await Ae.get("/get_changelog");this.changelogContent=t.data||"*No changelog content found.*";const e=await this.fetchVersion(),r=(await Ae.get("/get_last_viewed_changelog_version")).data,i=s=>{s&&s.app_show_changelogs&&e!==r&&e!=="0.0.0"&&(this.showChangelogPopup=!0)};if(this.$store.state.config)i(this.$store.state.config);else{const s=this.$watch("$store.state.config",o=>{o&&(i(o),s())},{immediate:!1})}}catch(t){console.error("Error checking changelog:",t)}},async handleUnderstand(){try{await Ae.post("/set_last_viewed_changelog_version",{client_id:this.$store.state.client_id,version:this.currentVersion}),this.closePopup()}catch(t){console.error("Error setting last viewed changelog version:",t),this.closePopup()}},closePopup(){this.showChangelogPopup=!1}}},WCr={class:"flex justify-between items-center p-4 px-6 border-b border-blue-300 dark:border-blue-600 flex-shrink-0 unicolor-panels-color"},ZCr={class:"p-6 md:p-8 flex-grow overflow-y-auto scrollbar text-blue-900 dark:text-blue-200"},KCr=["innerHTML"],JCr={class:"flex justify-end p-4 px-6 border-t border-blue-300 dark:border-blue-600 flex-shrink-0 unicolor-panels-color"};function eLr(t,e,n,r,i,s){return k(),Qt(cr,{name:"fade"},{default:Ie(()=>[i.showChangelogPopup?(k(),R("div",{key:0,class:ye(["fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-[100] transition-opacity duration-300",{"opacity-0 pointer-events-none":!i.showChangelogPopup,"opacity-100":i.showChangelogPopup}])},[b("div",{class:ye(["panels-color rounded-lg w-[95%] max-w-4xl max-h-[90vh] flex flex-col shadow-2xl overflow-hidden transform transition-all duration-300 ease-out border border-blue-300 dark:border-blue-600",{"opacity-0 scale-95":!i.showChangelogPopup,"opacity-100 scale-100":i.showChangelogPopup}])},[b("div",WCr,[e[3]||(e[3]=b("h2",{class:"text-xl font-semibold text-blue-800 dark:text-blue-100"},"What's New",-1)),b("button",{class:"svg-button",onClick:e[0]||(e[0]=(...o)=>s.closePopup&&s.closePopup(...o)),"aria-label":"Close Changelog"},e[2]||(e[2]=[b("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[b("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),b("div",ZCr,[b("div",{class:"prose prose-blue dark:prose-invert max-w-none",innerHTML:s.parsedChangelogContent},null,8,KCr)]),b("div",JCr,[b("button",{class:"btn btn-primary",onClick:e[1]||(e[1]=(...o)=>s.handleUnderstand&&s.handleUnderstand(...o))}," Got it ")])],2)],2)):ne("",!0)]),_:1})}const tLr=st(GCr,[["render",eLr],["__scopeId","data-v-4427a40c"]]),nLr=Zn({name:"DiscussionsView",components:{WelcomeScreen:e_r,LeftPanel:Rvr,ChatArea:gCr,RenderPanel:bCr,ChoiceDialog:Hoe,ProgressBar:uoe,SkillsLibraryViewer:$Cr,PersonalityEditor:qCr,PopupViewer:YCr,ChangelogPopup:tLr},data(){return{discussionsList:[],currentDiscussion:{},discussionArr:[],personalityAvatars:[],lastMessageHtml:"",loading:!1,database_selectorDialogVisible:!1,progress_visibility:!1,progress_value:0,interestingFacts:["ParisNeo, the creator of LoLLMs, originally built his high-performance PC to play Cyberpunk 2077. However, his passion for AI took an unexpected turn, leading him to develop LoLLMs instead. Ironically, he never found the time to actually play the game that inspired his powerful setup!","Saïph, version 14 of LoLLMs, is named after a star in Orion's constellation (Kappa Orionis), representing bright guidance in AI!","The 'LoLLMs' name stands for 'Lord of Large Language Models', a playful nod to the power and potential of these AI systems.","LoLLMs v15 introduced 'Personality Packages', allowing users to customize AI interactions like never before.","Did you know? LoLLMs supports multiple AI backends, giving you flexibility in choosing the best engine for your needs.","LoLLMs v16 focused heavily on optimizing performance, making interactions faster and smoother.","The project is open-source, fostering a community of developers and users contributing to its growth.","LoLLMs v17 brought enhanced multi-modal capabilities, allowing interaction with images and potentially other media.","From text generation to coding assistance, LoLLMs aims to be a versatile AI tool.","LoLLMs v18, codenamed 'Orion', aimed for stellar improvements in stability and user experience.","The integrated 'Skills Library' allows LoLLMs to learn and perform specialized tasks.","LoLLMs is designed to run locally, ensuring data privacy and control for users.","The development of LoLLMs is driven by community feedback and the pursuit of cutting-edge AI accessibility.","Version 19, 'Fish Edition', dives deep into refining core features and improving aquatic-themed puns (results may vary).","The LoLLMs mascot, a wise owl, symbolizes knowledge and the ability to see through complex data.","Future versions aim to expand integration with various platforms and enhance collaborative features.","The configuration system in LoLLMs allows for deep customization of AI behavior and performance.","LoLLMs supports extensions, enabling developers to add new functionalities and integrations.","Keeping your LoLLMs updated ensures you have the latest features, optimizations, and security enhancements.","**Binary Brain Teaser:** The version number contains a secret message: `01100001 01110010 01110000 01101001 01101100 00100000 01100110 01101111 01101111 01101100`. If you decoded that, you truly understand the spirit of v19.1 'Fish Edition'!"],host:"",rebooting_audio:new Audio("/rebooting.wav"),connection_lost_audio:new Audio("/connection_lost.wav"),connection_recovered_audio:new Audio("/connection_recovered.wav"),chime:new Audio("/chime_aud.wav"),msgTypes:{MSG_TYPE_CONTENT:1,MSG_TYPE_CONTENT_INVISIBLE_TO_AI:2,MSG_TYPE_CONTENT_INVISIBLE_TO_USER:3},operationTypes:{MSG_OPERATION_TYPE_ADD_CHUNK:0,MSG_OPERATION_TYPE_SET_CONTENT:1,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:2,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_USER:3,MSG_OPERATION_TYPE_EXCEPTION:4,MSG_OPERATION_TYPE_WARNING:5,MSG_OPERATION_TYPE_INFO:6,MSG_OPERATION_TYPE_STEP:7,MSG_OPERATION_TYPE_STEP_START:8,MSG_OPERATION_TYPE_STEP_PROGRESS:9,MSG_OPERATION_TYPE_STEP_END_SUCCESS:10,MSG_OPERATION_TYPE_STEP_END_FAILURE:11,MSG_OPERATION_TYPE_JSON_INFOS:12,MSG_OPERATION_TYPE_REF:13,MSG_OPERATION_TYPE_CODE:14,MSG_OPERATION_TYPE_UI:15,MSG_OPERATION_TYPE_NEW_MESSAGE:16,MSG_OPERATION_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},is_first_connection:!0,defaultMessageHtml:`
Welcome

Render Panel Ready

`}},computed:{...Pu(["ready","loading_infos","loading_progress","version","config","databases","isConnected","isGenerating","client_id","leftPanelCollapsed","rightPanelCollapsed","theme_vars","selectedPersonality","currentPersonConfig","personalities","personalities_ready"]),...oE(["getIsReady","getVersion","getConfig","getClientId","getDatabases","getIsConnected","getIsGenerating","getLeftPanelCollapsed","getRightPanelCollapsed"]),isReady(){return this.getIsReady},version_info(){const t=this.getVersion;return t&&t!=="unknown"?t:"..."},showLeftPanel(){return this.isReady&&!this.getLeftPanelCollapsed},showRightPanel(){return this.isReady&&!this.getRightPanelCollapsed},formatted_database_name(){var e;return(((e=this.config)==null?void 0:e.discussion_db_name)||"default").replace(/_/g," ")}},methods:{...ace(["refreshConfig","refreshDatabase","refreshBindings","refreshPersonalitiesZoo","refreshMountedPersonalities","refreshModelsZoo","refreshModels","fetchLanguages","fetchLanguage","fetchIsRtOn","toggleStarPersonality","toggleStarDiscussion","applyConfiguration","saveConfiguration","refreshModelStatus"]),async initialLoad(){console.log("Initial Load Started");try{for(this.$store.commit("setLoadingInfos","Getting version"),this.$store.commit("setLoadingProgress",10),await this.$store.dispatch("getVersion"),this.$store.commit("setLoadingInfos","Connecting..."),this.$store.commit("setLoadingProgress",20);!et||et.id===void 0;)await new Promise(t=>setTimeout(t,200));this.$store.commit("setClientId",et.id),this.$store.commit("setLoadingInfos","Loading Configuration"),this.$store.commit("setLoadingProgress",30),await this.refreshConfig(),this.$store.commit("setLoadingInfos","Loading Database"),this.$store.commit("setLoadingProgress",40),await this.refreshDatabase(),this.$store.commit("setLoadingInfos","Getting Bindings list"),this.$store.commit("setLoadingProgress",50),await this.refreshBindings(),this.$store.commit("setLoadingInfos","Getting personalities zoo"),this.$store.commit("setLoadingProgress",60),await this.refreshPersonalitiesZoo(),this.$store.commit("setLoadingInfos","Getting mounted personalities"),this.$store.commit("setLoadingProgress",70),await this.refreshMountedPersonalities(),this.$store.commit("setLoadingInfos","Getting models zoo"),this.$store.commit("setLoadingProgress",80),await this.refreshModelsZoo(),this.$store.commit("setLoadingInfos","Getting active models"),this.$store.commit("setLoadingProgress",90),await this.refreshModels(),await this.refreshModelStatus(),await this.fetchLanguages(),await this.fetchLanguage(),await this.fetchIsRtOn(),await this.list_discussions(),await this.getPersonalityAvatars(),this.loadLastUsedDiscussion(),this.$store.commit("setLoadingProgress",100),this.$store.commit("setLoadingInfos","Ready"),await new Promise(t=>setTimeout(t,500)),this.$store.commit("setIsReady",!0),console.log("Initial Load Complete"),this.setupSocketListeners()}catch(t){console.error("Initial load failed:",t),this.$store.commit("setLoadingInfos",`Error: ${t.message||"Initialization failed"}`)}},setupSocketListeners(){et.on("connected",this.socketIOConnected),et.on("disconnect",this.socketIODisconnected),et.on("show_progress",this.show_progress),et.on("hide_progress",this.hide_progress),et.on("update_progress",this.update_progress),et.on("notification",this.notify),et.on("new_message",this.handleNewMessage),et.on("update_message",this.handleUpdateMessage),et.on("close_message",this.finalMsgEvent),et.on("discussion_renamed",this.handleDiscussionRenamed),et.on("refresh_files",this.recoverFiles),et.on("connect_error",this.handleConnectError),et.onerror=this.handleSocketError,et.onclose=this.handleSocketClose},async list_discussions(){try{this.loading=!0;const t=await Ae.get("/list_discussions");t&&Array.isArray(t.data)?this.discussionsList=t.data.map(e=>({id:e.id,title:e.title,created_at:e.created_at,loading:!1})).sort((e,n)=>n.id-e.id):this.discussionsList=[],this.loading=!1}catch(t){console.error("Error listing discussions:",t),this.$store.state.toast.showToast(`Error fetching discussions: ${t.message}`,4,!1),this.discussionsList=[],this.loading=!1}},loadLastUsedDiscussion(){const t=localStorage.getItem("selected_discussion");if(t){const e=this.discussionsList.find(n=>String(n.id)===t);e?this.selectDiscussion(e):(localStorage.removeItem("selected_discussion"),this.currentDiscussion={},this.discussionArr=[])}else this.currentDiscussion={},this.discussionArr=[]},selectDiscussion(t){var e;if(this.isGenerating){this.$store.state.toast.showToast("Please wait for generation to finish or stop.",4,!1);return}t&&((e=this.currentDiscussion)==null?void 0:e.id)!==t.id?(this.currentDiscussion={...t},this.setPageTitle(t),localStorage.setItem("selected_discussion",t.id),this.load_discussion(t.id)):t||(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle(),localStorage.removeItem("selected_discussion")),Fe(()=>this.scrollToDiscussionElement(t==null?void 0:t.id))},async createNewDiscussion(){try{this.loading=!0,this.$store.state.toast.showToast("Creating new discussion...",2,!0),et.emit("new_discussion",{title:null}),et.once("discussion_created",async t=>{if(t&&t.id){await this.list_discussions();const e=this.discussionsList.find(n=>n.id===t.id);e?this.selectDiscussion(e):(console.error("Newly created discussion not found in list:",t.id),this.$store.state.toast.showToast("Error: Couldn't find new discussion.",4,!1))}else console.error("Invalid discussion_created data:",t),this.$store.state.toast.showToast("Error creating discussion.",4,!1);this.loading=!1}),setTimeout(()=>{var t;this.loading&&!((t=this.currentDiscussion)!=null&&t.id)&&(et.off("discussion_created"),this.loading=!1,this.$store.state.toast.showToast("Timeout creating discussion.",4,!1))},1e4)}catch(t){console.error("Error initiating new discussion:",t),this.$store.state.toast.showToast(`Error: ${t.message}`,4,!1),this.loading=!1}},async deleteDiscussion(t){t&&this.$store.state.yesNoDialog.askQuestion(`Are you sure you want to delete discussion ${t}?`,"Delete","Cancel").then(async e=>{var n;if(e)try{this.setDiscussionLoading(t,!0),await Ae.post("/delete_discussion",{client_id:this.client_id,id:t}),this.$store.state.toast.showToast(`Discussion ${t} deleted.`,4,!0),this.discussionsList=this.discussionsList.filter(r=>r.id!==t),((n=this.currentDiscussion)==null?void 0:n.id)===t&&this.selectDiscussion(null)}catch(r){console.error("Error deleting discussion:",r),this.$store.state.toast.showToast(`Error deleting discussion ${t}: ${r.message}`,4,!1),this.setDiscussionLoading(t,!1)}})},async deleteDiscussionMulti(t){if(!Array.isArray(t)||t.length===0)return;const e=t.length;this.$store.state.yesNoDialog.askQuestion(`Are you sure you want to delete ${e} discussion(s)?`,"Delete Selected","Cancel").then(async n=>{var r;if(n){this.$store.state.toast.showToast(`Deleting ${e} discussions...`,5,!0);let i=0,s=0;t.forEach(o=>this.setDiscussionLoading(o,!0));for(const o of t)try{await Ae.post("/delete_discussion",{client_id:this.client_id,id:o}),i++,this.discussionsList=this.discussionsList.filter(a=>a.id!==o),((r=this.currentDiscussion)==null?void 0:r.id)===o&&this.selectDiscussion(null)}catch(a){console.error(`Error deleting discussion ${o}:`,a),s++,this.setDiscussionLoading(o,!1)}s>0?this.$store.state.toast.showToast(`Deleted ${i} discussions. Failed to delete ${s}.`,5,!1):this.$store.state.toast.showToast(`Successfully deleted ${i} discussions.`,4,!0)}})},async editTitle({id:t,title:e}){var n,r;try{this.setDiscussionLoading(t,!0);const i=await Ae.post("/edit_title",{client_id:this.client_id,id:t,title:e});if(i.status===200){const s=this.discussionsList.findIndex(o=>o.id===t);s>-1&&(this.discussionsList[s].title=e),((n=this.currentDiscussion)==null?void 0:n.id)===t&&(this.currentDiscussion.title=e),this.$store.state.toast.showToast("Title updated.",3,!0)}else throw new Error(((r=i.data)==null?void 0:r.error)||"Failed to edit title")}catch(i){console.error("Error editing title:",i),this.$store.state.toast.showToast(`Error editing title: ${i.message}`,4,!1)}finally{this.setDiscussionLoading(t,!1)}},async makeTitle(t){var n,r;const e=t.id;try{this.setDiscussionLoading(e,!0),this.$store.state.toast.showToast("Generating title...",3,!0);const i=await Ae.post("/make_title",{client_id:this.client_id,id:e});if(i.status===200&&i.data.title){const s=i.data.title,o=this.discussionsList.findIndex(a=>a.id===e);o>-1&&(this.discussionsList[o].title=s),((n=this.currentDiscussion)==null?void 0:n.id)===e&&(this.currentDiscussion.title=s),this.$store.state.toast.showToast("Title generated.",3,!0)}else throw new Error(((r=i.data)==null?void 0:r.error)||"Failed to generate title")}catch(i){console.error("Error making title:",i),this.$store.state.toast.showToast(`Error generating title: ${i.message}`,4,!1)}finally{this.setDiscussionLoading(e,!1)}},async openFolder(t){const e=t.id;try{await Ae.post("/open_discussion_folder",{client_id:this.client_id,discussion_id:e}),this.$store.state.toast.showToast(`Opening folder for discussion ${e}...`,3,!0)}catch(n){console.error("Error opening folder:",n),this.$store.state.toast.showToast(`Could not open folder: ${n.message}`,4,!1)}},toggleStarDiscussion(t){this.toggleStarDiscussion(t.id),this.$nextTick(()=>{this.$forceUpdate()})},load_discussion(t,e){if(!t){this.discussionArr=[],this.lastMessageHtml=this.defaultMessageHtml,this.extractHtml(),e&&e();return}this.loading=!0,this.setDiscussionLoading(t,!0),this.discussionArr=[],et.off("discussion"),et.on("discussion",n=>{et.off("discussion"),this.loading=!1,this.setDiscussionLoading(t,!1),n&&Array.isArray(n)?(this.discussionArr=n.filter(r=>r.message_type===this.msgTypes.MSG_TYPE_CONTENT||r.message_type===this.msgTypes.MSG_TYPE_CONTENT_INVISIBLE_TO_AI).map(r=>({...r,status_message:"Done"})),this.discussionArr.length>1&&(!this.currentDiscussion.title||this.currentDiscussion.title==="untitled")&&this.autoChangeTitle(t,this.discussionArr[1].content),this.extractHtml(),this.recoverFiles(),e&&e()):(console.warn("Received invalid discussion data for ID:",t),this.discussionArr=[],this.extractHtml()),this.scrollToBottomMessages()}),et.emit("load_discussion",{id:t}),setTimeout(()=>{var n;this.loading&&((n=this.currentDiscussion)==null?void 0:n.id)===t&&(et.off("discussion"),this.loading=!1,this.setDiscussionLoading(t,!1),this.$store.state.toast.showToast(`Timeout loading discussion ${t}.`,5,!1))},15e3)},handleNewMessage(t){var n;if(((n=this.currentDiscussion)==null?void 0:n.id)!==t.discussion_id){console.log("Received message for non-active discussion:",t.discussion_id);return}t.sender_type===this.senderTypes.SENDER_TYPES_AI&&this.$store.commit("setIsGenerating",!0);const e={sender:t.sender,message_type:t.message_type,sender_type:t.sender_type,content:t.content||(t.sender_type===this.senderTypes.SENDER_TYPES_AI,""),id:t.id,discussion_id:t.discussion_id,parent_id:t.parent_id,binding:t.binding,model:t.model,personality:t.personality,created_at:t.created_at,finished_generating_at:t.finished_generating_at,rank:t.rank||0,ui:t.ui,steps:[],parameters:t.parameters,metadata:t.metadata||[],open:t.open,status_message:t.sender_type===this.senderTypes.SENDER_TYPES_AI?"Generating...":"Sent"};this.discussionArr.push(e),this.discussionArr.length===2&&(!this.currentDiscussion.title||this.currentDiscussion.title==="untitled")&&e.sender_type===this.senderTypes.SENDER_TYPES_USER&&this.autoChangeTitle(this.currentDiscussion.id,e.content),this.extractHtml(),this.scrollToBottomMessages()},handleUpdateMessage(t){var r,i;if(((r=this.currentDiscussion)==null?void 0:r.id)!==t.discussion_id)return;const e=this.discussionArr.findIndex(s=>s.id===t.id);if(e===-1){console.warn("Update received for non-existent message ID:",t.id);return}const n=this.discussionArr[e];switch(t.operation_type){case this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT:case this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:n.content=t.content,this.$store.commit("setIsGenerating",!0);break;case this.operationTypes.MSG_OPERATION_TYPE_ADD_CHUNK:n.content+=t.content,this.$store.commit("setIsGenerating",!0);break;case this.operationTypes.MSG_OPERATION_TYPE_STEP:case this.operationTypes.MSG_OPERATION_TYPE_STEP_START:case this.operationTypes.MSG_OPERATION_TYPE_STEP_END_SUCCESS:case this.operationTypes.MSG_OPERATION_TYPE_STEP_END_FAILURE:Array.isArray(t.steps)&&(n.steps=t.steps,n.status_message=((i=t.steps[t.steps.length-1])==null?void 0:i.text)||n.status_message);break;case this.operationTypes.MSG_OPERATION_TYPE_JSON_INFOS:try{n.metadata=typeof t.metadata=="string"?JSON.parse(t.metadata):t.metadata||[]}catch(s){console.error("Failed to parse metadata JSON:",s),n.metadata={error:"Failed to parse",raw:t.metadata}}break;case this.operationTypes.MSG_OPERATION_TYPE_UI:n.ui=t.ui;break;case this.operationTypes.MSG_OPERATION_TYPE_EXCEPTION:this.$store.state.toast.showToast(`Error: ${t.content}`,5,!1),n.status_message="Error",this.$store.commit("setIsGenerating",!1);break;case this.operationTypes.MSG_OPERATION_TYPE_WARNING:this.$store.state.toast.showToast(`Warning: ${t.content}`,4,!1);break}t.created_at&&(n.created_at=t.created_at),t.started_generating_at&&(n.started_generating_at=t.started_generating_at),t.nb_tokens&&(n.nb_tokens=t.nb_tokens),t.finished_generating_at&&(n.finished_generating_at=t.finished_generating_at),this.extractHtml()},finalMsgEvent(t){var n,r,i,s;if(((n=this.currentDiscussion)==null?void 0:n.id)!==t.discussion_id)return;const e=this.discussionArr.findIndex(o=>o.id===t.id);if(e!==-1){const o=this.discussionArr[e];o.content=t.content,o.finished_generating_at=t.finished_generating_at,o.nb_tokens=t.nb_tokens,o.binding=t.binding,o.model=t.model,o.personality=t.personality,o.status_message="Done",this.$store.commit("setIsGenerating",!1),this.setDiscussionLoading(this.currentDiscussion.id,!1),this.extractHtml(),this.recoverFiles(),this.scrollToBottomMessages(),this.playChime(),(r=this.config)!=null&&r.auto_speak&&((i=this.config)!=null&&i.xtts_enable)&&Fe(()=>{const a=this.$refs[`msg-${t.id}`];a&&a[0]&&typeof a[0].speak=="function"?a[0].speak():console.warn("Could not find message component ref or speak method for ID:",t.id)})}else console.warn("Final message event received for non-existent message ID:",t.id),this.$store.commit("setIsGenerating",!1),this.setDiscussionLoading((s=this.currentDiscussion)==null?void 0:s.id,!1)},sendMsg({message:t,type:e}){var r;if(!t||!t.trim()){this.$store.state.toast.showToast("Message cannot be empty.",4,!1);return}if(!((r=this.currentDiscussion)!=null&&r.id)){this.$store.state.toast.showToast("Please select or create a discussion first.",4,!1);return}if(this.isGenerating){this.$store.state.toast.showToast("Please wait for the current response.",4,!1);return}this.$store.commit("setIsGenerating",!0),this.setDiscussionLoading(this.currentDiscussion.id,!0);const n=e==="internet"?"generate_msg_with_internet":"generate_msg";et.emit(n,{prompt:t}),this.scrollToBottomMessages()},sendCmd(t){var e;if(!t||!((e=this.currentDiscussion)!=null&&e.id)||this.isGenerating){this.isGenerating&&this.$store.state.toast.showToast("Please wait for the current response.",4,!1);return}this.$store.commit("setIsGenerating",!0),this.setDiscussionLoading(this.currentDiscussion.id,!0),this.$store.state.toast.showToast(`Executing command: ${t}...`,3,!0),et.emit("execute_command",{command:t,parameters:[]})},async deleteMessage(t){try{await Ae.post("/delete_message",{client_id:this.client_id,id:t}),this.discussionArr=this.discussionArr.filter(e=>e.id!==t),this.$store.state.toast.showToast("Message deleted.",3,!0),this.extractHtml()}catch(e){console.error("Error deleting message:",e),this.$store.state.toast.showToast(`Error deleting message: ${e.message}`,4,!1)}},async rankUpMessage(t){try{const e=await Ae.post("/message_rank_up",{client_id:this.client_id,id:t});if(e.data&&e.data.new_rank!==void 0){const n=this.discussionArr.findIndex(r=>r.id===t);n!==-1&&(this.discussionArr[n].rank=e.data.new_rank),this.$store.state.toast.showToast("Rank updated.",3,!0)}else throw new Error("Invalid rank response")}catch(e){console.error("Error ranking up:",e),this.$store.state.toast.showToast(`Error ranking up: ${e.message}`,4,!1)}},async rankDownMessage(t){try{const e=await Ae.post("/message_rank_down",{client_id:this.client_id,id:t});if(e.data&&e.data.new_rank!==void 0){const n=this.discussionArr.findIndex(r=>r.id===t);n!==-1&&(this.discussionArr[n].rank=e.data.new_rank),this.$store.state.toast.showToast("Rank updated.",3,!0)}else throw new Error("Invalid rank response")}catch(e){console.error("Error ranking down:",e),this.$store.state.toast.showToast(`Error ranking down: ${e.message}`,4,!1)}},async updateMessage({id:t,content:e,metadata:n}){try{await Ae.post("/edit_message",{client_id:this.client_id,id:t,message:e,metadata:n?[{audio_url:n}]:[]});const r=this.discussionArr.findIndex(i=>i.id===t);r!==-1&&(this.discussionArr[r].content=e),this.$store.state.toast.showToast("Message updated.",3,!0),this.extractHtml()}catch(r){console.error("Error updating message:",r),this.$store.state.toast.showToast(`Error updating message: ${r.message}`,4,!1)}},resendMessage({id:t,content:e,type:n}){if(this.isGenerating){this.$store.state.toast.showToast("Please wait for the current response.",4,!1);return}this.$store.commit("setIsGenerating",!0),this.setDiscussionLoading(this.currentDiscussion.id,!0),this.$store.state.toast.showToast(`Resending message ${t}...`,3,!0);const r=this.discussionArr.findIndex(i=>i.id===t);r!==-1&&(this.discussionArr=this.discussionArr.slice(0,r+1),this.discussionArr[r].status_message="Resending..."),et.emit("generate_msg_from",{prompt:e,id:t,msg_type:n}),this.scrollToBottomMessages()},continueMessage({id:t,content:e}){if(this.isGenerating){this.$store.state.toast.showToast("Please wait for the current response.",4,!1);return}this.$store.commit("setIsGenerating",!0),this.setDiscussionLoading(this.currentDiscussion.id,!0),this.$store.state.toast.showToast(`Continuing message ${t}...`,3,!0);const n=this.discussionArr.findIndex(r=>r.id===t);n!==-1&&(this.discussionArr[n].status_message="Continuing..."),et.emit("continue_generate_msg_from",{prompt:e,id:t}),this.scrollToBottomMessages()},stopGenerating(){var t;if(this.isGenerating){if(et.emit("cancel_generation"),this.$store.commit("setIsGenerating",!1),this.setDiscussionLoading((t=this.currentDiscussion)==null?void 0:t.id,!1),this.$store.state.toast.showToast("Generation stopped.",4,!0),this.discussionArr.length>0){const e=this.discussionArr[this.discussionArr.length-1];(e.status_message==="Generating..."||e.sender_type===this.senderTypes.SENDER_TYPES_AI&&!e.finished_generating_at)&&(e.status_message="Stopped")}this.scrollToBottomMessages()}},createEmptyUserMessage(t){var e;(e=this.currentDiscussion)!=null&&e.id&&(et.emit("create_empty_message",{type:0,message:t}),this.$store.state.toast.showToast("Creating empty user message...",2,!0))},createEmptyAIMessage(){var t;(t=this.currentDiscussion)!=null&&t.id&&(et.emit("create_empty_message",{type:1}),this.$store.state.toast.showToast("Creating empty AI message...",2,!0))},setDiscussionLoading(t,e){const n=this.discussionsList.findIndex(r=>r.id===t);n!==-1&&(this.discussionsList[n].loading=e)},setPageTitle(t=null){const e="L🌟LLMS WebUI";let n="Welcome";t&&t.title&&t.title!=="untitled"?n=t.title:t&&(n="New Discussion"),document.title=`${e} - ${n}`},scrollToBottomMessages(){Fe(()=>{const t=document.getElementById("messages-list");t&&(t.scrollTop=t.scrollHeight)})},scrollToDiscussionElement(t){t&&Fe(()=>{const e=document.getElementById(`dis-${t}`),n=document.getElementById("leftPanelScroll");e&&n&&n.scrollTo({top:e.offsetTop,behavior:"smooth"})})},copyToClipBoard(t){var r;let e=t.message.content||"",n=e;(r=this.config)!=null&&r.copy_to_clipboard_add_all_details&&(n=`${[t.message.sender?`Sender: ${t.message.sender}`:null,t.message.personality?`Personality: ${t.message.personality}`:null,t.created_at_parsed?`Created: ${t.created_at_parsed}`:null,t.message.binding?`Binding: ${t.message.binding}`:null,t.message.model?`Model: ${t.message.model}`:null,t.message.seed?`Seed: ${t.message.seed}`:null,t.time_spent?`Time spent: ${t.time_spent}`:null].filter(Boolean).join(` + `}},watch:{htmlContent:{handler(t){this.renderIsolatedContent(t)},immediate:!0},showRightPanel(t){t&&this.$nextTick(()=>{this.renderIsolatedContent(this.htmlContent)})}},methods:{renderIsolatedContent(t){var r;if(!this.$refs.isolatedContent||!this.showRightPanel)return;this.$refs.isolatedContent.innerHTML="";const e=document.createElement("iframe");e.style.border="none",e.style.width="100%",e.style.height="100%",e.setAttribute("sandbox","allow-scripts allow-same-origin"),e.setAttribute("title","Rendered HTML Content"),this.$refs.isolatedContent.appendChild(e);const n=e.contentDocument||((r=e.contentWindow)==null?void 0:r.document);if(n){const i=document.documentElement.classList.contains("dark");let s=t;i&&(s=s.replace("[n.showRightPanel?(k(),R("div",_Cr,[b("div",vCr,null,512)])):ne("",!0)]),_:1})}const bCr=st(QCr,[["render",yCr]]),SCr={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:Voe,MarkdownRenderer:rT},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){Ae.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"),Ae.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){console.log("loading skill",t),Ae.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),Ae.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){Ae.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(){}}},xCr={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},ECr={class:"w-[15rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},wCr={classclass:"absolute flex flex-col no-scrollbar shadow-lg w-[15rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},CCr={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"};function LCr(t,e,n,r,i,s){const o=Xe("Discussion"),a=Xe("MarkdownRenderer");return k(),R("div",{class:ye([{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"])},[b("div",xCr,[b("div",ECr,[He(b("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 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 transition-all duration-200",placeholder:"Search discussions...",title:"Filter skills by title","onUpdate:modelValue":e[0]||(e[0]=l=>i.searchQuery=l),onKeyup:e[1]||(e[1]=gr((...l)=>s.searchSkills&&s.searchSkills(...l),["enter"]))},null,544),[[vt,i.searchQuery]]),b("div",wCr,[e[3]||(e[3]=b("h2",{class:"text-xl font-bold m-4"},"Titles",-1)),i.titles.length>0?(k(),Qt(V4,{key:0,name:"list"},{default:Ie(()=>[(k(!0),R(Ve,null,dt(i.titles,l=>(k(),Qt(o,{key:l.id,id:l.id,title:l.title,selected:s.fetchContent(l.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,openfolder_enabled:!1,onSelect:c=>s.fetchContent(l.id),onDelete:c=>s.deleteSkill(l.id),onEditTitle:s.editTitle,onMakeTitle:s.makeTitle,onChecked:s.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):ne("",!0)])]),b("div",CCr,[e[4]||(e[4]=b("h2",{class:"text-xl font-bold m-4"},"Content",-1)),te(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"])])]),b("button",{onClick:e[2]||(e[2]=(...l)=>s.closeComponent&&s.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const $Cr=st(SCr,[["render",LCr]]),ACr={props:{personality:{type:Object,required:!0},config:{type:Object,required:!0}},data(){return{show:!1,title:"Add AI Agent",iconUrl:"",file:null,tempConfig:{}}},methods:{showForm(){this.showDialog=!0},hideForm(){this.showDialog=!1},selectIcon(t){t.target.files&&(this.file=t.target.files[0],this.iconUrl=URL.createObjectURL(this.file))},showPanel(){this.show=!0},hide(){this.show=!1},submitForm(){Ae.post("/set_personality_config",{client_id:this.$store.state.client_id,category:this.personality.category,name:this.personality.folder,config:this.config}).then(t=>{const e=t.data;console.log("Done"),e.status?(this.currentPersonConfig=e.config,this.showPersonalityEditor=!0):console.error(e.error)}).catch(t=>{console.error(t)})}}},kCr={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},PCr={class:"relative w-full max-h-full bg-bg-light dark:bg-bg-dark"},RCr={class:"w-full h-full relative items-center gap-2 rounded-lg border bg-bg-light dark:bg-bg-dark p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-900"},MCr={class:"justify-center text-center items-center w-full bg-bg-light dark:bg-bg-dark"},DCr={class:"w-full flex flex-row mt-4 text-center justify-center"},NCr={class:"w-full max-h-full container bg-bg-light dark:bg-bg-dark"},ICr={class:"mb-4 w-full"},HCr={class:"w-full bg-bg-light dark:bg-bg-dark"};function VCr(t,e,n,r,i,s){return i.show?(k(),R("div",kCr,[b("div",PCr,[b("div",RCr,[b("button",{type:"button",onClick:e[0]||(e[0]=o=>s.hide()),class:"absolute top-1 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"},e[17]||(e[17]=[b("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[b("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),b("span",{class:"sr-only"},"Close modal",-1)])),b("div",MCr,[b("div",DCr,[b("button",{type:"submit",onClick:e[1]||(e[1]=oe((...o)=>s.submitForm&&s.submitForm(...o),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Commit AI to Server "),b("button",{onClick:e[2]||(e[2]=oe(o=>s.hide(),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Close ")]),b("div",NCr,[b("form",ICr,[b("table",HCr,[b("tr",null,[e[18]||(e[18]=b("td",null,[b("label",{for:"personalityConditioning"},"Personality Conditioning:")],-1)),b("td",null,[He(b("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"personalityConditioning","onUpdate:modelValue":e[3]||(e[3]=o=>n.config.personality_conditioning=o)},null,512),[[vt,n.config.personality_conditioning]])])]),b("tr",null,[e[19]||(e[19]=b("td",null,[b("label",{for:"userMessagePrefix"},"User Message Prefix:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"userMessagePrefix","onUpdate:modelValue":e[4]||(e[4]=o=>n.config.user_message_prefix=o)},null,512),[[vt,n.config.user_message_prefix]])])]),b("tr",null,[e[20]||(e[20]=b("td",null,[b("label",{for:"aiMessagePrefix"},"AI Message Prefix:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"aiMessagePrefix","onUpdate:modelValue":e[5]||(e[5]=o=>n.config.ai_message_prefix=o)},null,512),[[vt,n.config.ai_message_prefix]])])]),b("tr",null,[e[21]||(e[21]=b("td",null,[b("label",{for:"linkText"},"Link Text:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"linkText","onUpdate:modelValue":e[6]||(e[6]=o=>n.config.link_text=o)},null,512),[[vt,n.config.link_text]])])]),b("tr",null,[e[22]||(e[22]=b("td",null,[b("label",{for:"welcomeMessage"},"Welcome Message:")],-1)),b("td",null,[He(b("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"welcomeMessage","onUpdate:modelValue":e[7]||(e[7]=o=>n.config.welcome_message=o)},null,512),[[vt,n.config.welcome_message]])])]),b("tr",null,[e[23]||(e[23]=b("td",null,[b("label",{for:"modelTemperature"},"Model Temperature:")],-1)),b("td",null,[He(b("input",{type:"number",id:"modelTemperature","onUpdate:modelValue":e[8]||(e[8]=o=>n.config.model_temperature=o)},null,512),[[vt,n.config.model_temperature]])])]),b("tr",null,[e[24]||(e[24]=b("td",null,[b("label",{for:"modelTopK"},"Model Top K:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopK","onUpdate:modelValue":e[9]||(e[9]=o=>n.config.model_top_k=o)},null,512),[[vt,n.config.model_top_k]])])]),b("tr",null,[e[25]||(e[25]=b("td",null,[b("label",{for:"modelTopP"},"Model Top P:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopP","onUpdate:modelValue":e[10]||(e[10]=o=>n.config.model_top_p=o)},null,512),[[vt,n.config.model_top_p]])])]),b("tr",null,[e[26]||(e[26]=b("td",null,[b("label",{for:"modelRepeatPenalty"},"Model Repeat Penalty:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatPenalty","onUpdate:modelValue":e[11]||(e[11]=o=>n.config.model_repeat_penalty=o)},null,512),[[vt,n.config.model_repeat_penalty]])])]),b("tr",null,[e[27]||(e[27]=b("td",null,[b("label",{for:"modelRepeatLastN"},"Model Repeat Last N:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatLastN","onUpdate:modelValue":e[12]||(e[12]=o=>n.config.model_repeat_last_n=o)},null,512),[[vt,n.config.model_repeat_last_n]])])]),b("tr",null,[e[28]||(e[28]=b("td",null,[b("label",{for:"recommendedBinding"},"Recommended Binding:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedBinding","onUpdate:modelValue":e[13]||(e[13]=o=>n.config.recommended_binding=o)},null,512),[[vt,n.config.recommended_binding]])])]),b("tr",null,[e[29]||(e[29]=b("td",null,[b("label",{for:"recommendedModel"},"Recommended Model:")],-1)),b("td",null,[He(b("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedModel","onUpdate:modelValue":e[14]||(e[14]=o=>n.config.recommended_model=o)},null,512),[[vt,n.config.recommended_model]])])]),b("tr",null,[e[30]||(e[30]=b("td",null,[b("label",{class:"dark:bg-black dark:text-primary w-full",for:"dependencies"},"Dependencies:")],-1)),b("td",null,[He(b("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"dependencies","onUpdate:modelValue":e[15]||(e[15]=o=>n.config.dependencies=o)},null,512),[[vt,n.config.dependencies]])])]),b("tr",null,[e[31]||(e[31]=b("td",null,[b("label",{for:"antiPrompts"},"Anti Prompts:")],-1)),b("td",null,[He(b("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"antiPrompts","onUpdate:modelValue":e[16]||(e[16]=o=>n.config.anti_prompts=o)},null,512),[[vt,n.config.anti_prompts]])])])])])])])])])])):ne("",!0)}const qCr=st(ACr,[["render",VCr]]),UCr={data(){return{showPopup:!1,webpageUrl:"https://lollms.com/"}},methods:{show(){this.showPopup=!0},hide(){this.showPopup=!1},save_configuration(){Ae.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.data.status?(this.$store.state.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1)})}}},BCr={key:0,class:"fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50"},zCr={class:"relative panels-color p-6 rounded-lg shadow-xl max-w-3xl w-full mx-4"},XCr=["src"],FCr={class:"flex items-center mt-4"};function jCr(t,e,n,r,i,s){return k(),Qt(cr,{name:"fade"},{default:Ie(()=>[i.showPopup?(k(),R("div",BCr,[b("div",zCr,[b("button",{onClick:e[0]||(e[0]=(...o)=>s.hide&&s.hide(...o)),class:"absolute top-2 right-2 svg-button z-10",title:"Close"},e[3]||(e[3]=[b("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[b("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])),b("iframe",{src:i.webpageUrl,class:"w-full h-[70vh] rounded-md border border-blue-300 dark:border-blue-600 bg-white dark:bg-blue-900"},null,8,XCr),b("div",FCr,[He(b("input",{type:"checkbox",id:"startup",class:"rounded border-blue-300 dark:border-blue-600 text-blue-600 focus:ring-blue-500 dark:bg-blue-700 dark:focus:ring-offset-blue-800","onUpdate:modelValue":e[1]||(e[1]=o=>this.$store.state.config.show_news_panel=o),onChange:e[2]||(e[2]=(...o)=>s.save_configuration&&s.save_configuration(...o))},null,544),[[W3,this.$store.state.config.show_news_panel]]),e[4]||(e[4]=b("label",{for:"startup",class:"ml-2 label !mb-0 cursor-pointer"},"Show at startup",-1))])])])):ne("",!0)]),_:1})}const YCr=st(UCr,[["render",jCr],["__scopeId","data-v-425d1bc4"]]),GCr={name:"ChangelogPopup",data(){return{showChangelogPopup:!1,changelogContent:"",currentVersion:"0.0.0"}},computed:{parsedChangelogContent(){const t={breaks:!0,gfm:!0},e=Kt(this.changelogContent,t);return C4.sanitize(e)}},async mounted(){await this.checkChangelogUpdate()},methods:{async fetchVersion(){try{const t=await Ae.get("/get_lollms_webui_version");if(t&&t.data){const{version_main:e,version_secondary:n,version_type:r,version_codename:i}=t.data;let s=`${e}.${n}`;return r&&(s+=` ${r}`),i&&(s+=` (${i})`),this.$store.state.version=s,this.currentVersion=s,s}}catch(t){console.error("Error fetching LoLLMs version:",t)}return this.$store.state.version||"0.0.0"},async checkChangelogUpdate(){try{const t=await Ae.get("/get_changelog");this.changelogContent=t.data||"*No changelog content found.*";const e=await this.fetchVersion(),r=(await Ae.get("/get_last_viewed_changelog_version")).data,i=s=>{s&&s.app_show_changelogs&&e!==r&&e!=="0.0.0"&&(this.showChangelogPopup=!0)};if(this.$store.state.config)i(this.$store.state.config);else{const s=this.$watch("$store.state.config",o=>{o&&(i(o),s())},{immediate:!1})}}catch(t){console.error("Error checking changelog:",t)}},async handleUnderstand(){try{await Ae.post("/set_last_viewed_changelog_version",{client_id:this.$store.state.client_id,version:this.currentVersion}),this.closePopup()}catch(t){console.error("Error setting last viewed changelog version:",t),this.closePopup()}},closePopup(){this.showChangelogPopup=!1}}},WCr={class:"flex justify-between items-center p-4 px-6 border-b border-blue-300 dark:border-blue-600 flex-shrink-0 unicolor-panels-color"},ZCr={class:"p-6 md:p-8 flex-grow overflow-y-auto scrollbar text-blue-900 dark:text-blue-200"},KCr=["innerHTML"],JCr={class:"flex justify-end p-4 px-6 border-t border-blue-300 dark:border-blue-600 flex-shrink-0 unicolor-panels-color"};function eLr(t,e,n,r,i,s){return k(),Qt(cr,{name:"fade"},{default:Ie(()=>[i.showChangelogPopup?(k(),R("div",{key:0,class:ye(["fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-[100] transition-opacity duration-300",{"opacity-0 pointer-events-none":!i.showChangelogPopup,"opacity-100":i.showChangelogPopup}])},[b("div",{class:ye(["panels-color rounded-lg w-[95%] max-w-4xl max-h-[90vh] flex flex-col shadow-2xl overflow-hidden transform transition-all duration-300 ease-out border border-blue-300 dark:border-blue-600",{"opacity-0 scale-95":!i.showChangelogPopup,"opacity-100 scale-100":i.showChangelogPopup}])},[b("div",WCr,[e[3]||(e[3]=b("h2",{class:"text-xl font-semibold text-blue-800 dark:text-blue-100"},"What's New",-1)),b("button",{class:"svg-button",onClick:e[0]||(e[0]=(...o)=>s.closePopup&&s.closePopup(...o)),"aria-label":"Close Changelog"},e[2]||(e[2]=[b("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[b("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),b("div",ZCr,[b("div",{class:"prose prose-blue dark:prose-invert max-w-none",innerHTML:s.parsedChangelogContent},null,8,KCr)]),b("div",JCr,[b("button",{class:"btn btn-primary",onClick:e[1]||(e[1]=(...o)=>s.handleUnderstand&&s.handleUnderstand(...o))}," Got it ")])],2)],2)):ne("",!0)]),_:1})}const tLr=st(GCr,[["render",eLr],["__scopeId","data-v-4427a40c"]]),nLr=Zn({name:"DiscussionsView",components:{WelcomeScreen:e_r,LeftPanel:Rvr,ChatArea:gCr,RenderPanel:bCr,ChoiceDialog:Hoe,ProgressBar:uoe,SkillsLibraryViewer:$Cr,PersonalityEditor:qCr,PopupViewer:YCr,ChangelogPopup:tLr},data(){return{discussionsList:[],currentDiscussion:{},discussionArr:[],personalityAvatars:[],lastMessageHtml:"",loading:!1,database_selectorDialogVisible:!1,progress_visibility:!1,progress_value:0,interestingFacts:["ParisNeo, the creator of LoLLMs, originally built his high-performance PC to play Cyberpunk 2077. However, his passion for AI took an unexpected turn, leading him to develop LoLLMs instead. Ironically, he never found the time to actually play the game that inspired his powerful setup!","Saïph, version 14 of LoLLMs, is named after a star in Orion's constellation (Kappa Orionis), representing bright guidance in AI!","The 'LoLLMs' name stands for 'Lord of Large Language Models', a playful nod to the power and potential of these AI systems.","LoLLMs v15 introduced 'Personality Packages', allowing users to customize AI interactions like never before.","Did you know? LoLLMs supports multiple AI backends, giving you flexibility in choosing the best engine for your needs.","LoLLMs v16 focused heavily on optimizing performance, making interactions faster and smoother.","The project is open-source, fostering a community of developers and users contributing to its growth.","LoLLMs v17 brought enhanced multi-modal capabilities, allowing interaction with images and potentially other media.","From text generation to coding assistance, LoLLMs aims to be a versatile AI tool.","LoLLMs v18, codenamed 'Orion', aimed for stellar improvements in stability and user experience.","The integrated 'Skills Library' allows LoLLMs to learn and perform specialized tasks.","LoLLMs is designed to run locally, ensuring data privacy and control for users.","The development of LoLLMs is driven by community feedback and the pursuit of cutting-edge AI accessibility.","Version 19, 'Fish Edition', dives deep into refining core features and improving aquatic-themed puns (results may vary).","The LoLLMs mascot, a wise owl, symbolizes knowledge and the ability to see through complex data.","Future versions aim to expand integration with various platforms and enhance collaborative features.","The configuration system in LoLLMs allows for deep customization of AI behavior and performance.","LoLLMs supports extensions, enabling developers to add new functionalities and integrations.","Keeping your LoLLMs updated ensures you have the latest features, optimizations, and security enhancements.","**Binary Brain Teaser:** The version number contains a secret message: `01100001 01110010 01110000 01101001 01101100 00100000 01100110 01101111 01101111 01101100`. If you decoded that, you truly understand the spirit of v19.1 'Fish Edition'!"],host:"",rebooting_audio:new Audio("/rebooting.wav"),connection_lost_audio:new Audio("/connection_lost.wav"),connection_recovered_audio:new Audio("/connection_recovered.wav"),chime:new Audio("/chime_aud.wav"),msgTypes:{MSG_TYPE_CONTENT:1,MSG_TYPE_CONTENT_INVISIBLE_TO_AI:2,MSG_TYPE_CONTENT_INVISIBLE_TO_USER:3},operationTypes:{MSG_OPERATION_TYPE_ADD_CHUNK:0,MSG_OPERATION_TYPE_SET_CONTENT:1,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:2,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_USER:3,MSG_OPERATION_TYPE_EXCEPTION:4,MSG_OPERATION_TYPE_WARNING:5,MSG_OPERATION_TYPE_INFO:6,MSG_OPERATION_TYPE_STEP:7,MSG_OPERATION_TYPE_STEP_START:8,MSG_OPERATION_TYPE_STEP_PROGRESS:9,MSG_OPERATION_TYPE_STEP_END_SUCCESS:10,MSG_OPERATION_TYPE_STEP_END_FAILURE:11,MSG_OPERATION_TYPE_JSON_INFOS:12,MSG_OPERATION_TYPE_REF:13,MSG_OPERATION_TYPE_CODE:14,MSG_OPERATION_TYPE_UI:15,MSG_OPERATION_TYPE_NEW_MESSAGE:16,MSG_OPERATION_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},is_first_connection:!0,defaultMessageHtml:`
Welcome

Render Panel Ready

`}},computed:{...Pu(["ready","loading_infos","loading_progress","version","config","databases","isConnected","isGenerating","client_id","leftPanelCollapsed","rightPanelCollapsed","theme_vars","selectedPersonality","currentPersonConfig","personalities","personalities_ready"]),...oE(["getIsReady","getVersion","getConfig","getClientId","getDatabases","getIsConnected","getIsGenerating","getLeftPanelCollapsed","getRightPanelCollapsed"]),isReady(){return this.getIsReady},version_info(){const t=this.getVersion;return t&&t!=="unknown"?t:"..."},showLeftPanel(){return this.isReady&&!this.getLeftPanelCollapsed},showRightPanel(){return this.isReady&&!this.getRightPanelCollapsed},formatted_database_name(){var e;return(((e=this.config)==null?void 0:e.discussion_db_name)||"default").replace(/_/g," ")}},methods:{...ace(["refreshConfig","refreshDatabase","refreshBindings","refreshPersonalitiesZoo","refreshMountedPersonalities","refreshModelsZoo","refreshModels","fetchLanguages","fetchLanguage","fetchIsRtOn","toggleStarPersonality","toggleStarDiscussion","applyConfiguration","saveConfiguration","refreshModelStatus"]),async initialLoad(){console.log("Initial Load Started");try{for(this.$store.commit("setLoadingInfos","Getting version"),this.$store.commit("setLoadingProgress",10),await this.$store.dispatch("getVersion"),this.$store.commit("setLoadingInfos","Connecting..."),this.$store.commit("setLoadingProgress",20);!et||et.id===void 0;)await new Promise(t=>setTimeout(t,200));this.$store.commit("setClientId",et.id),this.$store.commit("setLoadingInfos","Loading Configuration"),this.$store.commit("setLoadingProgress",30),await this.refreshConfig(),this.$store.commit("setLoadingInfos","Loading Database"),this.$store.commit("setLoadingProgress",40),await this.refreshDatabase(),this.$store.commit("setLoadingInfos","Getting Bindings list"),this.$store.commit("setLoadingProgress",50),await this.refreshBindings(),this.$store.commit("setLoadingInfos","Getting personalities zoo"),this.$store.commit("setLoadingProgress",60),await this.refreshPersonalitiesZoo(),this.$store.commit("setLoadingInfos","Getting mounted personalities"),this.$store.commit("setLoadingProgress",70),await this.refreshMountedPersonalities(),this.$store.commit("setLoadingInfos","Getting models zoo"),this.$store.commit("setLoadingProgress",80),await this.refreshModelsZoo(),this.$store.commit("setLoadingInfos","Getting active models"),this.$store.commit("setLoadingProgress",90),await this.refreshModels(),await this.refreshModelStatus(),await this.fetchLanguages(),await this.fetchLanguage(),await this.fetchIsRtOn(),await this.list_discussions(),await this.getPersonalityAvatars(),this.loadLastUsedDiscussion(),this.$store.commit("setLoadingProgress",100),this.$store.commit("setLoadingInfos","Ready"),await new Promise(t=>setTimeout(t,500)),this.$store.commit("setIsReady",!0),console.log("Initial Load Complete"),this.setupSocketListeners()}catch(t){console.error("Initial load failed:",t),this.$store.commit("setLoadingInfos",`Error: ${t.message||"Initialization failed"}`)}},setupSocketListeners(){et.on("connected",this.socketIOConnected),et.on("disconnect",this.socketIODisconnected),et.on("show_progress",this.show_progress),et.on("hide_progress",this.hide_progress),et.on("update_progress",this.update_progress),et.on("notification",this.notify),et.on("new_message",this.handleNewMessage),et.on("update_message",this.handleUpdateMessage),et.on("close_message",this.finalMsgEvent),et.on("discussion_renamed",this.handleDiscussionRenamed),et.on("refresh_files",this.recoverFiles),et.on("connect_error",this.handleConnectError),et.onerror=this.handleSocketError,et.onclose=this.handleSocketClose},async list_discussions(){try{this.loading=!0;const t=await Ae.get("/list_discussions");t&&Array.isArray(t.data)?this.discussionsList=t.data.map(e=>({id:e.id,title:e.title,created_at:e.created_at,loading:!1})).sort((e,n)=>n.id-e.id):this.discussionsList=[],this.loading=!1}catch(t){console.error("Error listing discussions:",t),this.$store.state.toast.showToast(`Error fetching discussions: ${t.message}`,4,!1),this.discussionsList=[],this.loading=!1}},loadLastUsedDiscussion(){const t=localStorage.getItem("selected_discussion");if(t){const e=this.discussionsList.find(n=>String(n.id)===t);e?this.selectDiscussion(e):(localStorage.removeItem("selected_discussion"),this.currentDiscussion={},this.discussionArr=[])}else this.currentDiscussion={},this.discussionArr=[]},selectDiscussion(t){var e;if(this.isGenerating){this.$store.state.toast.showToast("Please wait for generation to finish or stop.",4,!1);return}t&&((e=this.currentDiscussion)==null?void 0:e.id)!==t.id?(this.currentDiscussion={...t},this.setPageTitle(t),localStorage.setItem("selected_discussion",t.id),this.load_discussion(t.id)):t||(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle(),localStorage.removeItem("selected_discussion")),Fe(()=>this.scrollToDiscussionElement(t==null?void 0:t.id))},async createNewDiscussion(){try{this.loading=!0,this.$store.state.toast.showToast("Creating new discussion...",2,!0),et.emit("new_discussion",{title:null}),et.once("discussion_created",async t=>{if(t&&t.id){await this.list_discussions();const e=this.discussionsList.find(n=>n.id===t.id);e?this.selectDiscussion(e):(console.error("Newly created discussion not found in list:",t.id),this.$store.state.toast.showToast("Error: Couldn't find new discussion.",4,!1))}else console.error("Invalid discussion_created data:",t),this.$store.state.toast.showToast("Error creating discussion.",4,!1);this.loading=!1}),setTimeout(()=>{var t;this.loading&&!((t=this.currentDiscussion)!=null&&t.id)&&(et.off("discussion_created"),this.loading=!1,this.$store.state.toast.showToast("Timeout creating discussion.",4,!1))},1e4)}catch(t){console.error("Error initiating new discussion:",t),this.$store.state.toast.showToast(`Error: ${t.message}`,4,!1),this.loading=!1}},async deleteDiscussion(t){t&&this.$store.state.yesNoDialog.askQuestion(`Are you sure you want to delete discussion ${t}?`,"Delete","Cancel").then(async e=>{var n;if(e)try{this.setDiscussionLoading(t,!0),await Ae.post("/delete_discussion",{client_id:this.client_id,id:t}),this.$store.state.toast.showToast(`Discussion ${t} deleted.`,4,!0),this.discussionsList=this.discussionsList.filter(r=>r.id!==t),((n=this.currentDiscussion)==null?void 0:n.id)===t&&this.selectDiscussion(null)}catch(r){console.error("Error deleting discussion:",r),this.$store.state.toast.showToast(`Error deleting discussion ${t}: ${r.message}`,4,!1),this.setDiscussionLoading(t,!1)}})},async deleteDiscussionMulti(t){if(!Array.isArray(t)||t.length===0)return;const e=t.length;this.$store.state.yesNoDialog.askQuestion(`Are you sure you want to delete ${e} discussion(s)?`,"Delete Selected","Cancel").then(async n=>{var r;if(n){this.$store.state.toast.showToast(`Deleting ${e} discussions...`,5,!0);let i=0,s=0;t.forEach(o=>this.setDiscussionLoading(o,!0));for(const o of t)try{await Ae.post("/delete_discussion",{client_id:this.client_id,id:o}),i++,this.discussionsList=this.discussionsList.filter(a=>a.id!==o),((r=this.currentDiscussion)==null?void 0:r.id)===o&&this.selectDiscussion(null)}catch(a){console.error(`Error deleting discussion ${o}:`,a),s++,this.setDiscussionLoading(o,!1)}s>0?this.$store.state.toast.showToast(`Deleted ${i} discussions. Failed to delete ${s}.`,5,!1):this.$store.state.toast.showToast(`Successfully deleted ${i} discussions.`,4,!0)}})},async editTitle({id:t,title:e}){var n,r;try{this.setDiscussionLoading(t,!0);const i=await Ae.post("/edit_title",{client_id:this.client_id,id:t,title:e});if(i.status===200){const s=this.discussionsList.findIndex(o=>o.id===t);s>-1&&(this.discussionsList[s].title=e),((n=this.currentDiscussion)==null?void 0:n.id)===t&&(this.currentDiscussion.title=e),this.$store.state.toast.showToast("Title updated.",3,!0)}else throw new Error(((r=i.data)==null?void 0:r.error)||"Failed to edit title")}catch(i){console.error("Error editing title:",i),this.$store.state.toast.showToast(`Error editing title: ${i.message}`,4,!1)}finally{this.setDiscussionLoading(t,!1)}},async makeTitle(t){var n,r;const e=t.id;try{this.setDiscussionLoading(e,!0),this.$store.state.toast.showToast("Generating title...",3,!0);const i=await Ae.post("/make_title",{client_id:this.client_id,id:e});if(i.status===200&&i.data.title){const s=i.data.title,o=this.discussionsList.findIndex(a=>a.id===e);o>-1&&(this.discussionsList[o].title=s),((n=this.currentDiscussion)==null?void 0:n.id)===e&&(this.currentDiscussion.title=s),this.$store.state.toast.showToast("Title generated.",3,!0)}else throw new Error(((r=i.data)==null?void 0:r.error)||"Failed to generate title")}catch(i){console.error("Error making title:",i),this.$store.state.toast.showToast(`Error generating title: ${i.message}`,4,!1)}finally{this.setDiscussionLoading(e,!1)}},async openFolder(t){const e=t.id;try{await Ae.post("/open_discussion_folder",{client_id:this.client_id,discussion_id:e}),this.$store.state.toast.showToast(`Opening folder for discussion ${e}...`,3,!0)}catch(n){console.error("Error opening folder:",n),this.$store.state.toast.showToast(`Could not open folder: ${n.message}`,4,!1)}},toggleStarDiscussion(t){this.toggleStarDiscussion(t.id),this.$nextTick(()=>{this.$forceUpdate()})},load_discussion(t,e){if(!t){this.discussionArr=[],this.lastMessageHtml=this.defaultMessageHtml,this.extractHtml(),e&&e();return}this.loading=!0,this.setDiscussionLoading(t,!0),this.discussionArr=[],et.off("discussion"),et.on("discussion",n=>{et.off("discussion"),this.loading=!1,this.setDiscussionLoading(t,!1),n&&Array.isArray(n)?(this.discussionArr=n.filter(r=>r.message_type===this.msgTypes.MSG_TYPE_CONTENT||r.message_type===this.msgTypes.MSG_TYPE_CONTENT_INVISIBLE_TO_AI).map(r=>({...r,status_message:"Done"})),this.discussionArr.length>1&&(!this.currentDiscussion.title||this.currentDiscussion.title==="untitled")&&this.autoChangeTitle(t,this.discussionArr[1].content),this.extractHtml(),this.recoverFiles(),e&&e()):(console.warn("Received invalid discussion data for ID:",t),this.discussionArr=[],this.extractHtml()),this.scrollToBottomMessages()}),et.emit("load_discussion",{id:t}),setTimeout(()=>{var n;this.loading&&((n=this.currentDiscussion)==null?void 0:n.id)===t&&(et.off("discussion"),this.loading=!1,this.setDiscussionLoading(t,!1),this.$store.state.toast.showToast(`Timeout loading discussion ${t}.`,5,!1))},15e3)},handleNewMessage(t){var n;if(((n=this.currentDiscussion)==null?void 0:n.id)!==t.discussion_id){console.log("Received message for non-active discussion:",t.discussion_id);return}t.sender_type===this.senderTypes.SENDER_TYPES_AI&&this.$store.commit("setIsGenerating",!0);const e={sender:t.sender,message_type:t.message_type,sender_type:t.sender_type,content:t.content||(t.sender_type===this.senderTypes.SENDER_TYPES_AI,""),id:t.id,discussion_id:t.discussion_id,parent_id:t.parent_id,binding:t.binding,model:t.model,personality:t.personality,created_at:t.created_at,finished_generating_at:t.finished_generating_at,rank:t.rank||0,ui:t.ui,steps:[],parameters:t.parameters,metadata:t.metadata||[],open:t.open,status_message:t.sender_type===this.senderTypes.SENDER_TYPES_AI?"Generating...":"Sent"};this.discussionArr.push(e),this.discussionArr.length===2&&(!this.currentDiscussion.title||this.currentDiscussion.title==="untitled")&&e.sender_type===this.senderTypes.SENDER_TYPES_USER&&this.autoChangeTitle(this.currentDiscussion.id,e.content),this.extractHtml(),this.scrollToBottomMessages()},handleUpdateMessage(t){var r,i;if(((r=this.currentDiscussion)==null?void 0:r.id)!==t.discussion_id)return;const e=this.discussionArr.findIndex(s=>s.id===t.id);if(e===-1){console.warn("Update received for non-existent message ID:",t.id);return}const n=this.discussionArr[e];switch(t.operation_type){case this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT:case this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:n.content=t.content,this.$store.commit("setIsGenerating",!0);break;case this.operationTypes.MSG_OPERATION_TYPE_ADD_CHUNK:n.content+=t.content,this.$store.commit("setIsGenerating",!0);break;case this.operationTypes.MSG_OPERATION_TYPE_STEP:case this.operationTypes.MSG_OPERATION_TYPE_STEP_START:case this.operationTypes.MSG_OPERATION_TYPE_STEP_END_SUCCESS:case this.operationTypes.MSG_OPERATION_TYPE_STEP_END_FAILURE:Array.isArray(t.steps)&&(n.steps=t.steps,n.status_message=((i=t.steps[t.steps.length-1])==null?void 0:i.text)||n.status_message);break;case this.operationTypes.MSG_OPERATION_TYPE_JSON_INFOS:try{n.metadata=typeof t.metadata=="string"?JSON.parse(t.metadata):t.metadata||[]}catch(s){console.error("Failed to parse metadata JSON:",s),n.metadata={error:"Failed to parse",raw:t.metadata}}break;case this.operationTypes.MSG_OPERATION_TYPE_UI:n.ui=t.ui;break;case this.operationTypes.MSG_OPERATION_TYPE_EXCEPTION:this.$store.state.toast.showToast(`Error: ${t.content}`,5,!1),n.status_message="Error",this.$store.commit("setIsGenerating",!1);break;case this.operationTypes.MSG_OPERATION_TYPE_WARNING:this.$store.state.toast.showToast(`Warning: ${t.content}`,4,!1);break}t.created_at&&(n.created_at=t.created_at),t.started_generating_at&&(n.started_generating_at=t.started_generating_at),t.nb_tokens&&(n.nb_tokens=t.nb_tokens),t.finished_generating_at&&(n.finished_generating_at=t.finished_generating_at),this.extractHtml()},finalMsgEvent(t){var n,r,i,s;if(((n=this.currentDiscussion)==null?void 0:n.id)!==t.discussion_id)return;const e=this.discussionArr.findIndex(o=>o.id===t.id);if(e!==-1){const o=this.discussionArr[e];t.content!==void 0&&(o.content=t.content),o.finished_generating_at=t.finished_generating_at,o.nb_tokens=t.nb_tokens,o.binding=t.binding,o.model=t.model,o.personality=t.personality,o.status_message="Done",this.$store.commit("setIsGenerating",!1),this.setDiscussionLoading(this.currentDiscussion.id,!1),this.extractHtml(),this.recoverFiles(),this.scrollToBottomMessages(),this.playChime(),(r=this.config)!=null&&r.auto_speak&&((i=this.config)!=null&&i.xtts_enable)&&Fe(()=>{const a=this.$refs[`msg-${t.id}`];a&&a[0]&&typeof a[0].speak=="function"?a[0].speak():console.warn("Could not find message component ref or speak method for ID:",t.id)})}else console.warn("Final message event received for non-existent message ID:",t.id),this.$store.commit("setIsGenerating",!1),this.setDiscussionLoading((s=this.currentDiscussion)==null?void 0:s.id,!1)},sendMsg({message:t,type:e}){var r;if(!t||!t.trim()){this.$store.state.toast.showToast("Message cannot be empty.",4,!1);return}if(!((r=this.currentDiscussion)!=null&&r.id)){this.$store.state.toast.showToast("Please select or create a discussion first.",4,!1);return}if(this.isGenerating){this.$store.state.toast.showToast("Please wait for the current response.",4,!1);return}this.$store.commit("setIsGenerating",!0),this.setDiscussionLoading(this.currentDiscussion.id,!0);const n=e==="internet"?"generate_msg_with_internet":"generate_msg";et.emit(n,{prompt:t}),this.scrollToBottomMessages()},sendCmd(t){var e;if(!t||!((e=this.currentDiscussion)!=null&&e.id)||this.isGenerating){this.isGenerating&&this.$store.state.toast.showToast("Please wait for the current response.",4,!1);return}this.$store.commit("setIsGenerating",!0),this.setDiscussionLoading(this.currentDiscussion.id,!0),this.$store.state.toast.showToast(`Executing command: ${t}...`,3,!0),et.emit("execute_command",{command:t,parameters:[]})},async deleteMessage(t){try{await Ae.post("/delete_message",{client_id:this.client_id,id:t}),this.discussionArr=this.discussionArr.filter(e=>e.id!==t),this.$store.state.toast.showToast("Message deleted.",3,!0),this.extractHtml()}catch(e){console.error("Error deleting message:",e),this.$store.state.toast.showToast(`Error deleting message: ${e.message}`,4,!1)}},async rankUpMessage(t){try{const e=await Ae.post("/message_rank_up",{client_id:this.client_id,id:t});if(e.data&&e.data.new_rank!==void 0){const n=this.discussionArr.findIndex(r=>r.id===t);n!==-1&&(this.discussionArr[n].rank=e.data.new_rank),this.$store.state.toast.showToast("Rank updated.",3,!0)}else throw new Error("Invalid rank response")}catch(e){console.error("Error ranking up:",e),this.$store.state.toast.showToast(`Error ranking up: ${e.message}`,4,!1)}},async rankDownMessage(t){try{const e=await Ae.post("/message_rank_down",{client_id:this.client_id,id:t});if(e.data&&e.data.new_rank!==void 0){const n=this.discussionArr.findIndex(r=>r.id===t);n!==-1&&(this.discussionArr[n].rank=e.data.new_rank),this.$store.state.toast.showToast("Rank updated.",3,!0)}else throw new Error("Invalid rank response")}catch(e){console.error("Error ranking down:",e),this.$store.state.toast.showToast(`Error ranking down: ${e.message}`,4,!1)}},async updateMessage({id:t,content:e,metadata:n}){try{await Ae.post("/edit_message",{client_id:this.client_id,id:t,message:e,metadata:n?[{audio_url:n}]:[]});const r=this.discussionArr.findIndex(i=>i.id===t);r!==-1&&(this.discussionArr[r].content=e),this.$store.state.toast.showToast("Message updated.",3,!0),this.extractHtml()}catch(r){console.error("Error updating message:",r),this.$store.state.toast.showToast(`Error updating message: ${r.message}`,4,!1)}},resendMessage({id:t,content:e,type:n}){if(this.isGenerating){this.$store.state.toast.showToast("Please wait for the current response.",4,!1);return}this.$store.commit("setIsGenerating",!0),this.setDiscussionLoading(this.currentDiscussion.id,!0),this.$store.state.toast.showToast(`Resending message ${t}...`,3,!0);const r=this.discussionArr.findIndex(i=>i.id===t);r!==-1&&(this.discussionArr=this.discussionArr.slice(0,r+1),this.discussionArr[r].status_message="Resending..."),et.emit("generate_msg_from",{prompt:e,id:t,msg_type:n}),this.scrollToBottomMessages()},continueMessage({id:t,content:e}){if(this.isGenerating){this.$store.state.toast.showToast("Please wait for the current response.",4,!1);return}this.$store.commit("setIsGenerating",!0),this.setDiscussionLoading(this.currentDiscussion.id,!0),this.$store.state.toast.showToast(`Continuing message ${t}...`,3,!0);const n=this.discussionArr.findIndex(r=>r.id===t);n!==-1&&(this.discussionArr[n].status_message="Continuing..."),et.emit("continue_generate_msg_from",{prompt:e,id:t}),this.scrollToBottomMessages()},stopGenerating(){var t;if(this.isGenerating){if(et.emit("cancel_generation"),this.$store.commit("setIsGenerating",!1),this.setDiscussionLoading((t=this.currentDiscussion)==null?void 0:t.id,!1),this.$store.state.toast.showToast("Generation stopped.",4,!0),this.discussionArr.length>0){const e=this.discussionArr[this.discussionArr.length-1];(e.status_message==="Generating..."||e.sender_type===this.senderTypes.SENDER_TYPES_AI&&!e.finished_generating_at)&&(e.status_message="Stopped")}this.scrollToBottomMessages()}},createEmptyUserMessage(t){var e;(e=this.currentDiscussion)!=null&&e.id&&(et.emit("create_empty_message",{type:0,message:t}),this.$store.state.toast.showToast("Creating empty user message...",2,!0))},createEmptyAIMessage(){var t;(t=this.currentDiscussion)!=null&&t.id&&(et.emit("create_empty_message",{type:1}),this.$store.state.toast.showToast("Creating empty AI message...",2,!0))},setDiscussionLoading(t,e){const n=this.discussionsList.findIndex(r=>r.id===t);n!==-1&&(this.discussionsList[n].loading=e)},setPageTitle(t=null){const e="L🌟LLMS WebUI";let n="Welcome";t&&t.title&&t.title!=="untitled"?n=t.title:t&&(n="New Discussion"),document.title=`${e} - ${n}`},scrollToBottomMessages(){Fe(()=>{const t=document.getElementById("messages-list");t&&(t.scrollTop=t.scrollHeight)})},scrollToDiscussionElement(t){t&&Fe(()=>{const e=document.getElementById(`dis-${t}`),n=document.getElementById("leftPanelScroll");e&&n&&n.scrollTo({top:e.offsetTop,behavior:"smooth"})})},copyToClipBoard(t){var r;let e=t.message.content||"",n=e;(r=this.config)!=null&&r.copy_to_clipboard_add_all_details&&(n=`${[t.message.sender?`Sender: ${t.message.sender}`:null,t.message.personality?`Personality: ${t.message.personality}`:null,t.created_at_parsed?`Created: ${t.created_at_parsed}`:null,t.message.binding?`Binding: ${t.message.binding}`:null,t.message.model?`Model: ${t.message.model}`:null,t.message.seed?`Seed: ${t.message.seed}`:null,t.time_spent?`Time spent: ${t.time_spent}`:null].filter(Boolean).join(` `)} ${e}`),navigator.clipboard.writeText(n).then(()=>this.$store.state.toast.showToast("Copied to clipboard.",3,!0)).catch(i=>{console.error("Clipboard copy failed:",i),this.$store.state.toast.showToast("Failed to copy.",4,!1)})},playChime(){this.chime.play().catch(t=>console.debug("Chime play interrupted or failed:",t))},async recoverFiles(){var t,e;if((t=this.currentDiscussion)!=null&&t.id)try{const n=await Ae.post("/get_discussion_files_list",{client_id:this.client_id}),r=(e=this.$refs.chatArea)==null?void 0:e.$refs.chatBox;n.data&&r&&(r.filesList=n.data.files||[],r.isFileSentList=(n.data.files||[]).map(()=>!0))}catch(n){console.error("Error recovering files:",n),this.$store.state.toast.showToast("Could not load discussion files.",4,!1)}},handleChatFilesDropped(t){var e;(e=this.$refs.chatArea)!=null&&e.$refs.chatBox&&this.$refs.chatArea.$refs.chatBox.handleFiles(t)},importDiscussionFile(t){if(!t||t.type!=="application/json"){this.$store.state.toast.showToast("Please drop a valid JSON discussion file.",4,!1);return}this.parseAndImportDiscussions(t)},async parseAndImportDiscussions(t){var e,n;try{this.$store.state.toast.showToast("Importing discussion(s)...",3,!0);const r=await this.readFileAsJson(t),i=Array.isArray(r)?r:[r];if(i.length===0)throw new Error("JSON file contains no discussion data.");const s=await Ae.post("/import_multiple_discussions",{client_id:this.client_id,jArray:i});if((e=s.data)!=null&&e.status)this.$store.state.toast.showToast(`Successfully imported ${i.length} discussion(s).`,4,!0),await this.list_discussions();else throw new Error(((n=s.data)==null?void 0:n.error)||"Import failed on backend.")}catch(r){console.error("Error importing discussions:",r),this.$store.state.toast.showToast(`Import failed: ${r.message}`,5,!1)}},readFileAsJson(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=i=>{try{e(JSON.parse(i.target.result))}catch{n(new Error("Failed to parse JSON file."))}},r.onerror=i=>n(new Error("Failed to read file.")),r.readAsText(t)})},importDiscussions(t){const e=t.target.files[0];e&&this.parseAndImportDiscussions(e),t.target.value=null},importDiscussionsBundle(t){console.warn("Discussion bundle import not implemented yet."),this.$store.state.toast.showToast("Bundle import not yet available.",4,!1),t.target.value=null},async exportDiscussionsAsFormat(t,e){var n,r;if(!Array.isArray(e)||e.length===0){this.$store.state.toast.showToast("No discussions selected for export.",4,!1);return}try{this.$store.state.toast.showToast(`Exporting ${e.length} discussions as ${t}...`,4,!0),this.loading=!0;const i=await Ae.post("/export_multiple_discussions",{client_id:this.client_id,discussion_ids:e,export_format:t},{responseType:t==="json"?"json":"blob"});if(i.data){const s=`discussions_export_${new Date().toISOString().replace(/[:.]/g,"-")}.${t}`,o=t==="json"?new Blob([JSON.stringify(i.data,null,2)],{type:"application/json"}):new Blob([i.data],{type:"text/plain"}),a=URL.createObjectURL(o),l=document.createElement("a");l.href=a,l.download=s,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(a),this.$store.state.toast.showToast("Export successful.",4,!0)}else throw new Error("Backend returned no data for export.")}catch(i){console.error(`Error exporting discussions as ${t}:`,i),this.$store.state.toast.showToast(`Export failed: ${((r=(n=i.response)==null?void 0:n.data)==null?void 0:r.error)||i.message}`,5,!1)}finally{this.loading=!1}},exportDiscussionsAsJson(t){this.exportDiscussionsAsFormat("json",t.map(e=>e.id))},exportDiscussionsAsMarkdown(t){this.exportDiscussionsAsFormat("markdown",t.map(e=>e.id))},exportDiscussionsToFolder(t){console.warn("Export to folder not implemented yet."),this.$store.state.toast.showToast("Export to folder is not yet available.",4,!1)},showDatabaseSelector(){this.database_selectorDialogVisible=!0},onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=!1},async ondatabase_selectorDialogRemoved(t){console.log("Database removal not implemented on backend:",t)},async ondatabase_selectorDialogSelected(t){},async onvalidatedatabase_selectorChoice(t){var n,r,i;this.database_selectorDialogVisible=!1;const e=typeof t=="string"?t:t.name;if(e===((n=this.config)==null?void 0:n.discussion_db_name)){this.$store.state.toast.showToast("Database already selected.",3,!0);return}try{this.$store.state.toast.showToast(`Selecting database: ${e}...`,4,!0);const s=await Ae.post("/select_database",{client_id:this.client_id,name:e});if((r=s.data)!=null&&r.status)this.$store.state.toast.showToast("Database changed. Reloading...",5,!0),setTimeout(()=>window.location.reload(),1500);else throw new Error(((i=s.data)==null?void 0:i.error)||"Failed to select database.")}catch(s){console.error("Error selecting database:",s),this.$store.state.toast.showToast(`Error selecting database: ${s.message}`,5,!1)}},extractHtml(){if(this.discussionArr&&this.discussionArr.length>0){const t=this.discussionArr[this.discussionArr.length-1].content||"",e="```html",n="```";let r=t.indexOf(e);if(r!==-1){r+=e.length;let i=t.indexOf(n,r);this.lastMessageHtml=i===-1?t.substring(r).trim():t.substring(r,i).trim()}else{const i=t.trim().toLowerCase();i.startsWith("n.name===this.config.binding_name);if(!e){this.$store.state.toast.showToast("No binding selected or found.",4,!1);return}try{this.loading=!0,Ae.post("/get_active_binding_settings",{client_id:this.client_id,binding_name:e.name}).then(n=>{n.data&&Object.keys(n.data).length>0?this.$store.state.universalForm.showForm(n.data,`Configure ${e.name}`,"Save","Cancel").then(r=>{Ae.post("/set_binding_settings",{client_id:this.client_id,binding_name:e.name,settings:r}).then(i=>{var s,o;if(!((s=i.data)!=null&&s.status))throw new Error(((o=i.data)==null?void 0:o.error)||"Save failed.");this.$store.state.toast.showToast(`${e.name} settings updated.`,4,!0)}).catch(i=>this.$store.state.toast.showToast(`Error saving settings: ${i.message}`,5,!1))}).catch(()=>{}):this.$store.state.toast.showToast(`${e.name} has no configurable settings.`,3,!0)}).catch(n=>this.$store.state.toast.showToast(`Error getting settings: ${n.message}`,5,!1)).finally(()=>this.loading=!1)}catch(n){this.loading=!1,this.$store.state.toast.showToast(`Error: ${n.message}`,5,!1)}},async setBinding(t){var e,n;if(!(!t||this.config.binding_name===t.name)){this.loading=!0,this.$store.state.messageBox.showBlockingMessage(`Switching to binding: ${t.name}...`);try{const r=await Ae.post("/update_setting",{client_id:this.client_id,setting_name:"binding_name",setting_value:t.name});if(!((e=r.data)!=null&&e.status))throw new Error(((n=r.data)==null?void 0:n.error)||"Update failed");this.$store.state.toast.showToast(`Binding set to ${t.name}. Refreshing...`,4,!0),await this.refreshConfig(),await this.refreshBindings(),await this.refreshModelsZoo(),await this.refreshModels(),this.$store.state.messageBox.hideMessage()}catch(r){this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error setting binding: ${r.message}`,5,!1)}finally{this.loading=!1}}},async setModel(t){var e,n;if(!(!t||this.config.model_name===t.name)){this.loading=!0,this.$store.state.messageBox.showBlockingMessage(`Loading model: ${t.name}...`);try{const r=await Ae.post("/update_setting",{client_id:this.client_id,setting_name:"model_name",setting_value:t.name});if(!((e=r.data)!=null&&e.status))throw new Error(((n=r.data)==null?void 0:n.error)||"Update failed");this.$store.state.toast.showToast(`Model set to ${t.name}.`,4,!0),await this.refreshConfig(),await this.refreshModels(),await this.refreshModelStatus(),this.$store.state.messageBox.hideMessage()}catch(r){this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error setting model: ${r.message}`,5,!1)}finally{this.loading=!1}}},copyModelNameFrom(t){const e=t?`${this.config.binding_name}::${t.name}`:`${this.config.binding_name}::${this.config.model_name}`;navigator.clipboard.writeText(e).then(()=>this.$store.state.toast.showToast(`Copied: ${e}`,3,!0)).catch(n=>this.$store.state.toast.showToast(`Copy failed: ${n.message}`,4,!1))},async onPersonalitySelected(t){var i,s,o;if(!t||!t.full_path)return;const e=this.config.personalities&&this.config.active_personality_id>=0&&this.config.active_personality_idc===n);if(a===-1)throw new Error("Personality path not found in current configuration.");const l=await Ae.post("/select_personality",{client_id:this.client_id,id:a});if(!((i=l.data)!=null&&i.status))throw new Error(((s=l.data)==null?void 0:s.error)||"Selection failed on backend.");this.$store.state.toast.showToast(`Selected ${t.name}. Refreshing...`,4,!0),await this.refreshConfig(),await this.refreshMountedPersonalities(),this.load_discussion((o=this.currentDiscussion)==null?void 0:o.id)}catch(a){console.error("Error selecting personality:",a),this.$store.state.toast.showToast(`Error selecting ${t.name}: ${a.message}`,5,!1)}finally{this.loading=!1}},async unmountPersonality(t){var e,n;if(!(!t||!t.full_path)){this.loading=!0,this.$store.state.toast.showToast(`Unmounting ${t.name}...`,3,!0);try{const r=await Ae.post("/unmount_personality",{client_id:this.client_id,language:t.language||"",category:t.category,folder:t.folder});if(!((e=r.data)!=null&&e.status))throw new Error(((n=r.data)==null?void 0:n.error)||"Unmount failed on backend.");this.$store.state.toast.showToast(`${t.name} unmounted. Refreshing...`,4,!0),await this.refreshConfig(),await this.refreshPersonalitiesZoo(),await this.refreshMountedPersonalities(),this.config.active_personality_id===-1&&this.config.personalities.length>0&&this.$store.state.mountedPersArr.length>0?await this.onPersonalitySelected(this.$store.state.mountedPersArr[0]):this.config.personalities.length===0&&(console.warn("No personalities left mounted."),this.$store.state.toast.showToast("Warning: No personalities mounted.",4,!1))}catch(r){console.error("Error unmounting personality:",r),this.$store.state.toast.showToast(`Error unmounting ${t.name}: ${r.message}`,5,!1)}finally{this.loading=!1}}},async remount_personality(t){var e,n;if(!(!t||!t.full_path)){this.loading=!0,this.$store.state.toast.showToast(`Remounting ${t.name}...`,3,!0);try{const r=await Ae.post("/remount_personality",{client_id:this.client_id,category:t.category,folder:t.folder,language:t.language||""});if(!((e=r.data)!=null&&e.status))throw new Error(((n=r.data)==null?void 0:n.error)||"Remount failed.");this.$store.state.toast.showToast(`${t.name} remounted. Refreshing...`,4,!0),await this.refreshConfig(),await this.refreshMountedPersonalities()}catch(r){console.error("Error remounting personality:",r),this.$store.state.toast.showToast(`Error remounting ${t.name}: ${r.message}`,5,!1)}finally{this.loading=!1}}},async handleOnTalk(t){var e,n,r,i;if(!t||!t.full_path||this.isGenerating||!((e=this.currentDiscussion)!=null&&e.id)){this.isGenerating&&this.$store.state.toast.showToast("Please wait.",4,!1),(n=this.currentDiscussion)!=null&&n.id||this.$store.state.toast.showToast("Select discussion.",4,!1);return}this.$store.commit("setIsGenerating",!0),this.setDiscussionLoading(this.currentDiscussion.id,!0),this.$store.state.toast.showToast(`Asking ${t.name} to talk...`,3,!0);try{const s=this.config.personalities&&this.config.active_personality_id>=0&&this.config.active_personality_idu===o);if(l===-1)throw new Error("Target personality not mounted or path mismatch.");const c=await Ae.post("/select_personality",{client_id:this.client_id,id:l});if(!((r=c.data)!=null&&r.status))throw new Error(((i=c.data)==null?void 0:i.error)||"Failed to select target personality first.");await this.refreshConfig(),await this.refreshMountedPersonalities(),this.$store.state.toast.showToast(`Switched to ${t.name}. Now talking...`,3,!0)}et.emit("generate_msg_from",{id:-1})}catch(s){console.error("Error initiating talk:",s),this.$store.state.toast.showToast(`Error talking with ${t.name}: ${s.message}`,5,!1),this.$store.commit("setIsGenerating",!1),this.setDiscussionLoading(this.currentDiscussion.id,!1)}},onPersonalitiesReadyFun(){this.$store.commit("setPersonalitiesReady",!0)},onShowPersListFun(){},socketIOConnected(){var t,e;console.log("Socket connected:",et.id),this.$store.commit("setIsConnected",!0),this.$store.commit("setClientId",et.id),this.is_first_connection||(this.$store.state.messageBox.hideMessage(),this.$store.state.messageBox.showMessage("Server reconnected.",3),(t=this.config)!=null&&t.activate_audio_infos&&this.connection_recovered_audio.play(),this.refreshConfig(),this.list_discussions(),(e=this.currentDiscussion)!=null&&e.id&&this.load_discussion(this.currentDiscussion.id)),this.is_first_connection=!1},socketIODisconnected(){var t;console.warn("Socket disconnected."),this.$store.commit("setIsConnected",!1),this.$store.commit("setIsGenerating",!1),this.is_first_connection||(this.$store.state.messageBox.showBlockingMessage("Server disconnected. Attempting to reconnect..."),(t=this.config)!=null&&t.activate_audio_infos&&this.connection_lost_audio.play())},handleConnectError(t){console.error("Socket connection error:",t.message),this.$store.commit("setIsConnected",!1),this.$store.commit("setIsGenerating",!1),this.is_first_connection||this.$store.state.messageBox.showBlockingMessage(`Connection Error: ${t.message}. Please check the server.`)},handleSocketError(t){console.error("Socket general error:",t),this.socketIODisconnected()},handleSocketClose(t){console.warn("Socket connection closed.",t.code,t.reason),this.socketIODisconnected()},handleDiscussionRenamed({discussion_id:t,title:e}){var n;if(t&&e){const r=this.discussionsList.findIndex(i=>i.id===t);r!==-1&&(this.discussionsList[r].title=e),((n=this.currentDiscussion)==null?void 0:n.id)===t&&(this.currentDiscussion.title=e,this.setPageTitle(this.currentDiscussion))}},notify(t){var e;switch(console.log("Notification received:",t),["finished","cancelled","error"].includes(t.status)&&(this.$store.commit("setIsGenerating",!1),this.setDiscussionLoading((e=this.currentDiscussion)==null?void 0:e.id,!1),this.scrollToBottomMessages(),this.playChime()),t.display_type){case 0:this.$store.state.toast.showToast(t.content,t.duration||4,t.notification_type!==0);break;case 1:this.$store.state.messageBox.showMessage(t.content);break;case 2:this.$store.state.messageBox.hideMessage(),this.$store.state.yesNoDialog.askQuestion(t.content,"Yes","No").then(n=>et.emit("yesNoRes",{yesRes:n,notification_id:t.id})).catch(()=>et.emit("yesNoRes",{yesRes:!1,notification_id:t.id}));break;case 3:this.$store.state.messageBox.showBlockingMessage(t.content);break;case 4:this.$store.state.messageBox.hideMessage();break;default:console.warn("Unknown notification display type:",t.display_type),this.$store.state.toast.showToast(t.content,4,!0)}},show_progress(){this.progress_visibility=!0},hide_progress(){this.progress_visibility=!1,this.progress_value=0},update_progress(t){this.progress_value=t.value||0},async getPersonalityAvatars(){for(;!this.personalities_ready;)await new Promise(t=>setTimeout(t,200));this.personalityAvatars=(this.personalities||[]).map(t=>({name:t.name,avatar:t.avatar}))},autoChangeTitle(t,e){if(!t||!e||e.length===0)return;const n=e.substring(0,50)+(e.length>50?"...":"");this.editTitle({id:t,title:n})},add_webpage(){if(this.$store.state.web_url_input_box)this.$store.state.web_url_input_box.showPanel().then(t=>{t&&t.trim()&&this.sendWebpageAddRequest(t.trim())}).catch(()=>{});else{console.error("web_url_input_box not available");const t=prompt("Enter URL to add:");t&&t.trim()&&this.sendWebpageAddRequest(t.trim())}},async sendWebpageAddRequest(t){var e,n,r;if(!((e=this.currentDiscussion)!=null&&e.id)){this.$store.state.toast.showToast("Select a discussion first.",4,!1);return}try{this.$store.state.toast.showToast(`Adding webpage: ${t}...`,4,!0);const i=await Ae.post("/add_webpage",{client_id:this.client_id,url:t});if((n=i.data)!=null&&n.status)this.$store.state.toast.showToast("Webpage added successfully.",4,!0),this.recoverFiles();else throw new Error(((r=i.data)==null?void 0:r.error)||"Failed to add webpage.")}catch(i){console.error("Error adding webpage:",i),this.$store.state.toast.showToast(`Error: ${i.message}`,5,!1)}},handleShortcut(t){t.ctrlKey&&t.key==="d"&&(t.preventDefault(),t.stopPropagation(),this.createNewDiscussion())}},watch:{leftPanelCollapsed(t){localStorage.setItem("lollms_webui_left_panel_collapsed",t)},rightPanelCollapsed(t){localStorage.setItem("lollms_webui_right_panel_collapsed",t)}},created(){const t=localStorage.getItem("lollms_webui_left_panel_collapsed")==="true",e=localStorage.getItem("lollms_webui_right_panel_collapsed")==="true";this.$store.commit("setLeftPanelCollapsed",t),this.$store.commit("setRightPanelCollapsed",e),this.initialLoad()},mounted(){var t;this.$store.commit("setNews",this.$refs.news),this.$store.commit("setPersonalityEditor",this.$refs.personality_editor),window.addEventListener("keydown",this.handleShortcut),Fe(()=>{Re.replace()}),(t=this.config)!=null&&t.show_news_panel&&this.$refs.news&&setTimeout(()=>this.$refs.news.show(),500)},beforeUnmount(){window.removeEventListener("keydown",this.handleShortcut),et.off("connected",this.socketIOConnected),et.off("disconnect",this.socketIODisconnected),et.off("show_progress",this.show_progress),et.off("hide_progress",this.hide_progress),et.off("update_progress",this.update_progress),et.off("notification",this.notify),et.off("new_message",this.handleNewMessage),et.off("update_message",this.handleUpdateMessage),et.off("close_message",this.finalMsgEvent),et.off("discussion_renamed",this.handleDiscussionRenamed),et.off("refresh_files",this.recoverFiles),et.off("connect_error",this.handleConnectError),et.onerror=null,et.onclose=null},updated(){Fe(()=>{Re.replace()})}}),rLr={key:0,class:"flex flex-row h-screen w-screen overflow-hidden"},iLr={role:"status",class:"fixed m-0 p-4 left-4 bottom-4 min-w-[24rem] max-w-[24rem] h-auto flex flex-col justify-center items-center bg-blue-500 dark:bg-blue-700 rounded-lg shadow-lg z-50 text-white"},sLr={class:"text-lg font-semibold animate-pulse"};function oLr(t,e,n,r,i,s){var m;const o=Xe("WelcomeScreen"),a=Xe("LeftPanel"),l=Xe("ChatArea"),c=Xe("RenderPanel"),u=Xe("ChoiceDialog"),d=Xe("ProgressBar"),f=Xe("PersonalityEditor"),h=Xe("PopupViewer"),p=Xe("SkillsLibraryViewer"),T=Xe("ChangelogPopup");return k(),R(Ve,null,[te(o,{"is-ready":t.isReady,"loading-progress":t.loading_progress,"loading-infos":t.loading_infos,"version-info":t.version_info,"interesting-facts":t.interestingFacts},null,8,["is-ready","loading-progress","loading-infos","version-info","interesting-facts"]),t.isReady?(k(),R("div",rLr,[te(a,{"show-left-panel":t.showLeftPanel,"discussions-list":t.discussionsList,"current-discussion":t.currentDiscussion,"toolbar-loading":t.isGenerating,"formatted-database-name":t.formatted_database_name,onSelectDiscussion:t.selectDiscussion,onDeleteDiscussion:t.deleteDiscussion,onOpenFolder:t.openFolder,onEditTitle:t.editTitle,onMakeTitle:t.makeTitle,onCreateNewDiscussion:t.createNewDiscussion,onAddDiscussionToSkillsLibrary:t.addDiscussion2SkillsLibrary,onToggleSkillsLib:t.toggleSkillsLib,onShowSkillsLib:t.showSkillsLib,onResetDatabase:t.resetDB,onExportDatabase:e[0]||(e[0]=O=>t.database_selectorDialogVisible=!0),onImportDiscussions:t.importDiscussions,onImportDiscussionsBundle:t.importDiscussionsBundle,onShowModelConfig:t.showModelConfig,onSetBinding:t.setBinding,onCopyModelName:t.copyModelNameFrom,onSetModel:t.setModel,onPersonalitySelected:t.onPersonalitySelected,onUnmountPersonality:t.unmountPersonality,onRemountPersonality:t.remount_personality,onTalkPersonality:t.handleOnTalk,onPersonalitiesReady:t.onPersonalitiesReadyFun,onShowPersonalityList:t.onShowPersListFun,onDeleteSelected:t.deleteDiscussionMulti,onExportDiscussionsAsJson:t.exportDiscussionsAsJson,onExportDiscussionsToFolder:t.exportDiscussionsToFolder,onExportDiscussionsAsMarkdown:t.exportDiscussionsAsMarkdown,onShowDatabaseSelector:t.showDatabaseSelector,onImportDiscussionFile:t.importDiscussionFile,onToggleStarDiscussion:t.toggleStarDiscussion},null,8,["show-left-panel","discussions-list","current-discussion","toolbar-loading","formatted-database-name","onSelectDiscussion","onDeleteDiscussion","onOpenFolder","onEditTitle","onMakeTitle","onCreateNewDiscussion","onAddDiscussionToSkillsLibrary","onToggleSkillsLib","onShowSkillsLib","onResetDatabase","onImportDiscussions","onImportDiscussionsBundle","onShowModelConfig","onSetBinding","onCopyModelName","onSetModel","onPersonalitySelected","onUnmountPersonality","onRemountPersonality","onTalkPersonality","onPersonalitiesReady","onShowPersonalityList","onDeleteSelected","onExportDiscussionsAsJson","onExportDiscussionsToFolder","onExportDiscussionsAsMarkdown","onShowDatabaseSelector","onImportDiscussionFile","onToggleStarDiscussion"]),te(l,{ref:"chatArea","is-ready":t.isReady,"has-active-discussion":!!((m=t.currentDiscussion)!=null&&m.id),"discussion-arr":t.discussionArr,"is-generating":t.isGenerating,host:t.host,"personality-avatars":t.personalityAvatars,onCopyMessage:t.copyToClipBoard,onDeleteMessage:t.deleteMessage,onRankUp:t.rankUpMessage,onRankDown:t.rankDownMessage,onUpdateMessage:t.updateMessage,onResendMessage:t.resendMessage,onContinueMessage:t.continueMessage,onSendMessage:t.sendMsg,onSendCmd:t.sendCmd,onAddWebLink:t.add_webpage,onCreateEmptyUserMessage:t.createEmptyUserMessage,onCreateEmptyAiMessage:t.createEmptyAIMessage,onStopGenerating:t.stopGenerating,onRecoverFiles:t.recoverFiles,onTalkPersonality:t.handleOnTalk,onFilesDropped:t.handleChatFilesDropped},null,8,["is-ready","has-active-discussion","discussion-arr","is-generating","host","personality-avatars","onCopyMessage","onDeleteMessage","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","onSendMessage","onSendCmd","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAiMessage","onStopGenerating","onRecoverFiles","onTalkPersonality","onFilesDropped"]),te(c,{"show-right-panel":t.showRightPanel,"html-content":t.lastMessageHtml},null,8,["show-right-panel","html-content"])])):ne("",!0),te(u,{reference:"database_selector",class:"z-20",show:t.database_selectorDialogVisible,choices:t.databases,"can-remove":!0,onChoiceRemoved:t.ondatabase_selectorDialogRemoved,onChoiceSelected:t.ondatabase_selectorDialogSelected,onCloseDialog:t.onclosedatabase_selectorDialog,onChoiceValidated:t.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceRemoved","onChoiceSelected","onCloseDialog","onChoiceValidated"]),He(b("div",iLr,[te(d,{ref:"progress",progress:t.progress_value,class:"w-full h-3 mb-2"},null,8,["progress"]),b("p",sLr,ae(t.loading_infos)+" ...",1)],512),[[mr,t.progress_visibility]]),te(f,{ref:"personality_editor",config:t.currentPersonConfig,personality:t.selectedPersonality},null,8,["config","personality"]),te(h,{ref:"news"},null,512),te(p,{ref:"skills_lib"},null,512),te(T)],64)}const aLr=st(nLr,[["render",oLr]]);let Z8;const lLr=new Uint8Array(16);function cLr(){if(!Z8&&(Z8=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Z8))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Z8(lLr)}const hi=[];for(let t=0;t<256;++t)hi.push((t+256).toString(16).slice(1));function uLr(t,e=0){return hi[t[e+0]]+hi[t[e+1]]+hi[t[e+2]]+hi[t[e+3]]+"-"+hi[t[e+4]]+hi[t[e+5]]+"-"+hi[t[e+6]]+hi[t[e+7]]+"-"+hi[t[e+8]]+hi[t[e+9]]+"-"+hi[t[e+10]]+hi[t[e+11]]+hi[t[e+12]]+hi[t[e+13]]+hi[t[e+14]]+hi[t[e+15]]}const dLr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),bY={randomUUID:dLr};function S2(t,e,n){if(bY.randomUUID&&!t)return bY.randomUUID();t=t||{};const r=t.random||(t.rng||cLr)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,uLr(r)}class x4{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. diff --git a/web/dist/assets/index-COgkX41k.js b/web/dist/assets/index-NKVHnLNP.js similarity index 99% rename from web/dist/assets/index-COgkX41k.js rename to web/dist/assets/index-NKVHnLNP.js index a58105db..054b26cc 100644 --- a/web/dist/assets/index-COgkX41k.js +++ b/web/dist/assets/index-NKVHnLNP.js @@ -1,4 +1,4 @@ -import{L as s,E as R,a as Y,s as x,C as w,t as O,b as d,c as X,d as k,i as h,e as f,f as u,g as y,h as l,j as g,k as j,l as U,m as G,N as b,I as Z}from"./index-DiFBq1n1.js";const _=177,q=179,E=184,v=12,C=13,D=17,z=20,F=25,B=53,N=95,I=142,L=144,A=145,J=148,M=10,H=13,K=32,OO=9,$=47,QO=41,eO=125,aO=new R((Q,e)=>{for(let n=0,a=Q.next;(e.context&&(a<0||a==M||a==H||a==$&&Q.peek(n+1)==$)||a==QO||a==eO)&&Q.acceptToken(_),!(a!=K&&a!=OO);)a=Q.peek(++n)},{contextual:!0});let tO=new Set([N,E,z,v,D,L,A,I,J,C,B,F]);const iO=new w({start:!1,shift:(Q,e)=>e==q?Q:tO.has(e)}),XO=x({"func interface struct chan map const type var":O.definitionKeyword,"import package":O.moduleKeyword,"switch for go select return break continue goto fallthrough case if else defer":O.controlKeyword,range:O.keyword,Bool:O.bool,String:O.string,Rune:O.character,Number:O.number,Nil:O.null,VariableName:O.variableName,DefName:O.definition(O.variableName),TypeName:O.typeName,LabelName:O.labelName,FieldName:O.propertyName,"FunctionDecl/DefName":O.function(O.definition(O.variableName)),"TypeSpec/DefName":O.definition(O.typeName),"CallExpr/VariableName":O.function(O.variableName),LineComment:O.lineComment,BlockComment:O.blockComment,LogicOp:O.logicOperator,ArithOp:O.arithmeticOperator,BitOp:O.bitwiseOperator,"DerefOp .":O.derefOperator,"UpdateOp IncDecOp":O.updateOperator,CompareOp:O.compareOperator,"= :=":O.definitionOperator,"<-":O.operator,'~ "*"':O.modifier,"; ,":O.separator,"... :":O.punctuation,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),nO={__proto__:null,package:10,import:18,true:380,false:380,nil:383,struct:48,func:68,interface:78,chan:94,map:118,make:157,new:159,const:204,type:212,var:224,if:236,else:238,switch:242,case:248,default:250,for:260,range:266,go:270,select:274,return:284,break:288,continue:290,goto:292,fallthrough:296,defer:300},PO=s.deserialize({version:14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#xQ(R&QQ(W&UR(X&VT%|#u&OhqOScw!U!V#O#k#n&|'Y+gU$Q!R$R&jU$W!T$X&uQ$e!WY%y#u&O'})|*wQ)`']V-S'W)W*kS&[#y&]S*R(S(oR*z*QY&Y#y&](S(o*QR*W(['``OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dS&_#}&dW(S&S*S*|+^Q(e&bQ(o&lR*x*PS%U!t*`R+q+jR%S!qQ#PcQ(}&|Q)Z'YR+n+ghpOScw!U!V#O#k#n&|'Y+gQ$d!WQ$n!ZQ%g#VU%p#i'T,bU%q#j'U,cQ(j&gQ(u&sQ)Q'PQ)_']Q)y'wQ*_(kQ*a(tV-R'W)W*kT(U&S&l",nodeNames:"⚠ LineComment BlockComment SourceFile PackageClause package DefName ; ImportDecl import ImportSpec . String ) ( SpecList ExprStatement Number Bool Nil Rune VariableName TypedLiteral StructType struct } { StructBody FieldDecl FieldName , PointerType * FunctionType func Parameters Parameter ... InterfaceType interface InterfaceBody MethodElem UnderlyingType ~ TypeElem LogicOp ChannelType chan <- ParenthesizedType QualifiedType TypeName ParameterizedType ] [ TypeArgs ArrayType SliceType MapType map LiteralValue Element Key : Element Key ParenthesizedExpr FunctionLiteral Block Conversion SelectorExpr IndexExpr SliceExpr TypeAssertion CallExpr ParameterizedExpr Arguments CallExpr make new Arguments UnaryExp ArithOp LogicOp BitOp DerefOp BinaryExp ArithOp BitOp BitOp CompareOp LogicOp LogicOp SendStatement IncDecStatement IncDecOp Assignment = UpdateOp VarDecl := ConstDecl const ConstSpec SpecList TypeDecl type TypeSpec TypeParams TypeParam SpecList VarDecl var VarSpec SpecList LabeledStatement LabelName IfStatement if else SwitchStatement switch SwitchBlock Case case default TypeSwitchStatement SwitchBlock Case ForStatement for ForClause RangeClause range GoStatement go SelectStatement select SelectBlock Case ReceiveStatement ReturnStatement return GotoStatement break continue goto FallthroughStatement fallthrough DeferStatement defer FunctionDecl MethodDecl",maxTerm:218,context:iO,nodeProps:[["isolate",-3,2,12,20,""],["group",-18,12,17,18,19,20,21,22,66,67,69,70,71,72,73,74,77,81,86,"Expr",-20,16,68,93,94,96,99,101,105,111,115,117,120,126,129,134,136,141,143,147,149,"Statement",-12,23,31,33,38,46,49,50,51,52,56,57,58,"Type"],["openedBy",13,"(",25,"{",53,"["],["closedBy",14,")",26,"}",54,"]"]],propSources:[XO],skippedNodes:[0,1,2,153],repeatNodeCount:23,tokenData:":b~RvXY#iYZ#i]^#ipq#iqr#zrs$Xuv&Pvw&^wx&yxy(qyz(vz{({{|)T|})e}!O)j!O!P)u!P!Q+}!Q!R,y!R![-t![!]2^!]!^2k!^!_2p!_!`3]!`!a3e!c!}3x!}#O4j#P#Q4o#Q#R4t#R#S4|#S#T9X#T#o3x#o#p9q#p#q9v#q#r:W#r#s:]$g;'S3x;'S;=`4d<%lO3x~#nS$y~XY#iYZ#i]^#ipq#iU$PP%hQ!_!`$SS$XO!|S~$^W[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y<%lO$X~${O[~~%ORO;'S$X;'S;=`%X;=`O$X~%^X[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y;=`<%l$X<%lO$X~%|P;=`<%l$X~&UP%l~!_!`&X~&^O#U~~&cR%j~vw&l!_!`&X#Q#R&q~&qO%p~~&vP%o~!_!`&X~'OWd~OY&yZw&ywx'hx#O&y#O#P'm#P;'S&y;'S;=`(k<%lO&y~'mOd~~'pRO;'S&y;'S;=`'y;=`O&y~(OX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3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~4gP;=`<%l3x~4oO!W~~4tO!V~~4yP%i~!_!`&X~5RV%O~!Q![5h!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~5o^aQ%O~!O!P*`!Q![5h!c!g3x!g!h6k!h!}3x#R#S4|#T#X3x#X#Y6k#Y#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~6pX%O~{|+T}!O+T!Q![7]!c!}3x#R#S8P#T#o3x$g;'S3x;'S;=`4d<%lO3x~7dXaQ%O~!Q![7]!c!}3x#R#S8P#T#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~8UV%O~!Q![7]!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~8rVaQ%O~!Q![3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~9[TO#S9X#S#T$v#T;'S9X;'S;=`9k<%lO9X~9nP;=`<%l9X~9vOj~~9{Q%`~!_!`&X#p#q:R~:WO%q~~:]Oi~~:bO{~",tokenizers:[aO,1,2,new Y("j~RQYZXz{^~^O$|~~aP!P!Qd~iO$}~~",25,181)],topRules:{SourceFile:[0,3]},dynamicPrecedences:{19:1,51:-1,55:2,69:-1,108:-1},specialized:[{term:184,get:Q=>nO[Q]||-1}],tokenPrec:5451}),oO=[X("func ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"declaration",type:"keyword"}),X("func (${receiver}) ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"method declaration",type:"keyword"}),X("var ${name} = ${value}",{label:"var",detail:"declaration",type:"keyword"}),X("type ${name} ${type}",{label:"type",detail:"declaration",type:"keyword"}),X("const ${name} = ${value}",{label:"const",detail:"declaration",type:"keyword"}),X("type ${name} = ${type}",{label:"type",detail:"alias declaration",type:"keyword"}),X("for ${init}; ${test}; ${update} {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for ${i} := range ${value} {\n ${}\n}",{label:"for",detail:"range",type:"keyword"}),X(`select { +import{L as s,E as R,a as Y,s as x,C as w,t as O,b as d,c as X,d as k,i as h,e as f,f as u,g as y,h as l,j as g,k as j,l as U,m as G,N as b,I as Z}from"./index-DgMg835f.js";const _=177,q=179,E=184,v=12,C=13,D=17,z=20,F=25,B=53,N=95,I=142,L=144,A=145,J=148,M=10,H=13,K=32,OO=9,$=47,QO=41,eO=125,aO=new R((Q,e)=>{for(let n=0,a=Q.next;(e.context&&(a<0||a==M||a==H||a==$&&Q.peek(n+1)==$)||a==QO||a==eO)&&Q.acceptToken(_),!(a!=K&&a!=OO);)a=Q.peek(++n)},{contextual:!0});let tO=new Set([N,E,z,v,D,L,A,I,J,C,B,F]);const iO=new w({start:!1,shift:(Q,e)=>e==q?Q:tO.has(e)}),XO=x({"func interface struct chan map const type var":O.definitionKeyword,"import package":O.moduleKeyword,"switch for go select return break continue goto fallthrough case if else defer":O.controlKeyword,range:O.keyword,Bool:O.bool,String:O.string,Rune:O.character,Number:O.number,Nil:O.null,VariableName:O.variableName,DefName:O.definition(O.variableName),TypeName:O.typeName,LabelName:O.labelName,FieldName:O.propertyName,"FunctionDecl/DefName":O.function(O.definition(O.variableName)),"TypeSpec/DefName":O.definition(O.typeName),"CallExpr/VariableName":O.function(O.variableName),LineComment:O.lineComment,BlockComment:O.blockComment,LogicOp:O.logicOperator,ArithOp:O.arithmeticOperator,BitOp:O.bitwiseOperator,"DerefOp .":O.derefOperator,"UpdateOp IncDecOp":O.updateOperator,CompareOp:O.compareOperator,"= :=":O.definitionOperator,"<-":O.operator,'~ "*"':O.modifier,"; ,":O.separator,"... :":O.punctuation,"( )":O.paren,"[ ]":O.squareBracket,"{ }":O.brace}),nO={__proto__:null,package:10,import:18,true:380,false:380,nil:383,struct:48,func:68,interface:78,chan:94,map:118,make:157,new:159,const:204,type:212,var:224,if:236,else:238,switch:242,case:248,default:250,for:260,range:266,go:270,select:274,return:284,break:288,continue:290,goto:292,fallthrough:296,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dS#w|!pS$w!j-TQ&T#xQ(R&QQ(W&UR(X&VT%|#u&OhqOScw!U!V#O#k#n&|'Y+gU$Q!R$R&jU$W!T$X&uQ$e!WY%y#u&O'})|*wQ)`']V-S'W)W*kS&[#y&]S*R(S(oR*z*QY&Y#y&](S(o*QR*W(['``OSWYacmnw!O!U!V!W!X!Z!_!h!q!t!z#O#Q#S#T#V#^#_#`#a#b#c#e#h#i#j#k#n#u#v#y#|$P$Q$T$W$f$v$x%W%Y%a%c%x%y&O&W&]&`&g&m&s&x&y&|'P'R'T'U'W'X'Y']'a'b'e'o'r'w'|'}(S([(c(i(k(o(t(|)V)W)i)l)s)|*Q*`*h*k*l*n*o*p*r*w+R+g+j+l+|+},Q,R,S,T,U,V,W,X,Y,Z,[,],^,_,`,a,b,c,h,{,|,}-O-P-Q-U-V-W-X-Y-Z-[-]-^-_-dS&_#}&dW(S&S*S*|+^Q(e&bQ(o&lR*x*PS%U!t*`R+q+jR%S!qQ#PcQ(}&|Q)Z'YR+n+ghpOScw!U!V#O#k#n&|'Y+gQ$d!WQ$n!ZQ%g#VU%p#i'T,bU%q#j'U,cQ(j&gQ(u&sQ)Q'PQ)_']Q)y'wQ*_(kQ*a(tV-R'W)W*kT(U&S&l",nodeNames:"⚠ LineComment BlockComment SourceFile PackageClause package DefName ; ImportDecl import ImportSpec . String ) ( SpecList ExprStatement Number Bool Nil Rune VariableName TypedLiteral StructType struct } { StructBody FieldDecl FieldName , PointerType * FunctionType func Parameters Parameter ... InterfaceType interface InterfaceBody MethodElem UnderlyingType ~ TypeElem LogicOp ChannelType chan <- ParenthesizedType QualifiedType TypeName ParameterizedType ] [ TypeArgs ArrayType SliceType MapType map LiteralValue Element Key : Element Key ParenthesizedExpr FunctionLiteral Block Conversion SelectorExpr IndexExpr SliceExpr TypeAssertion CallExpr ParameterizedExpr Arguments CallExpr make new Arguments UnaryExp ArithOp LogicOp BitOp DerefOp BinaryExp ArithOp BitOp BitOp CompareOp LogicOp LogicOp SendStatement IncDecStatement IncDecOp Assignment = UpdateOp VarDecl := ConstDecl const ConstSpec SpecList TypeDecl type TypeSpec TypeParams TypeParam SpecList VarDecl var VarSpec SpecList LabeledStatement LabelName IfStatement if else SwitchStatement switch SwitchBlock Case case default TypeSwitchStatement SwitchBlock Case ForStatement for ForClause RangeClause range GoStatement go SelectStatement select SelectBlock Case ReceiveStatement ReturnStatement return GotoStatement break continue goto FallthroughStatement fallthrough DeferStatement defer FunctionDecl MethodDecl",maxTerm:218,context:iO,nodeProps:[["isolate",-3,2,12,20,""],["group",-18,12,17,18,19,20,21,22,66,67,69,70,71,72,73,74,77,81,86,"Expr",-20,16,68,93,94,96,99,101,105,111,115,117,120,126,129,134,136,141,143,147,149,"Statement",-12,23,31,33,38,46,49,50,51,52,56,57,58,"Type"],["openedBy",13,"(",25,"{",53,"["],["closedBy",14,")",26,"}",54,"]"]],propSources:[XO],skippedNodes:[0,1,2,153],repeatNodeCount:23,tokenData:":b~RvXY#iYZ#i]^#ipq#iqr#zrs$Xuv&Pvw&^wx&yxy(qyz(vz{({{|)T|})e}!O)j!O!P)u!P!Q+}!Q!R,y!R![-t![!]2^!]!^2k!^!_2p!_!`3]!`!a3e!c!}3x!}#O4j#P#Q4o#Q#R4t#R#S4|#S#T9X#T#o3x#o#p9q#p#q9v#q#r:W#r#s:]$g;'S3x;'S;=`4d<%lO3x~#nS$y~XY#iYZ#i]^#ipq#iU$PP%hQ!_!`$SS$XO!|S~$^W[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y<%lO$X~${O[~~%ORO;'S$X;'S;=`%X;=`O$X~%^X[~OY$XZr$Xrs$vs#O$X#O#P${#P;'S$X;'S;=`%y;=`<%l$X<%lO$X~%|P;=`<%l$X~&UP%l~!_!`&X~&^O#U~~&cR%j~vw&l!_!`&X#Q#R&q~&qO%p~~&vP%o~!_!`&X~'OWd~OY&yZw&ywx'hx#O&y#O#P'm#P;'S&y;'S;=`(k<%lO&y~'mOd~~'pRO;'S&y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~!_!`&X~3}V%O~!Q![3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~4gP;=`<%l3x~4oO!W~~4tO!V~~4yP%i~!_!`&X~5RV%O~!Q![5h!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~5o^aQ%O~!O!P*`!Q![5h!c!g3x!g!h6k!h!}3x#R#S4|#T#X3x#X#Y6k#Y#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~6pX%O~{|+T}!O+T!Q![7]!c!}3x#R#S8P#T#o3x$g;'S3x;'S;=`4d<%lO3x~7dXaQ%O~!Q![7]!c!}3x#R#S8P#T#]3x#]#^8k#^#o3x$g;'S3x;'S;=`4d<%lO3x~8UV%O~!Q![7]!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~8rVaQ%O~!Q![3x!c!}3x#R#S3x#T#o3x$g;'S3x;'S;=`4d<%lO3x~9[TO#S9X#S#T$v#T;'S9X;'S;=`9k<%lO9X~9nP;=`<%l9X~9vOj~~9{Q%`~!_!`&X#p#q:R~:WO%q~~:]Oi~~:bO{~",tokenizers:[aO,1,2,new Y("j~RQYZXz{^~^O$|~~aP!P!Qd~iO$}~~",25,181)],topRules:{SourceFile:[0,3]},dynamicPrecedences:{19:1,51:-1,55:2,69:-1,108:-1},specialized:[{term:184,get:Q=>nO[Q]||-1}],tokenPrec:5451}),oO=[X("func ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"declaration",type:"keyword"}),X("func (${receiver}) ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"method declaration",type:"keyword"}),X("var ${name} = ${value}",{label:"var",detail:"declaration",type:"keyword"}),X("type ${name} ${type}",{label:"type",detail:"declaration",type:"keyword"}),X("const ${name} = ${value}",{label:"const",detail:"declaration",type:"keyword"}),X("type ${name} = ${type}",{label:"type",detail:"alias declaration",type:"keyword"}),X("for ${init}; ${test}; ${update} {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for ${i} := range ${value} {\n ${}\n}",{label:"for",detail:"range",type:"keyword"}),X(`select { \${} }`,{label:"select",detail:"statement",type:"keyword"}),X("case ${}:\n${}",{label:"case",type:"keyword"}),X("switch ${} {\n ${}\n}",{label:"switch",detail:"statement",type:"keyword"}),X("switch ${}.(${type}) {\n ${}\n}",{label:"switch",detail:"type statement",type:"keyword"}),X("if ${} {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),X(`if \${} { \${} diff --git a/web/dist/index.html b/web/dist/index.html index 39a0b874..f1f1f460 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -6,7 +6,7 @@ LoLLMS WebUI - + diff --git a/web/src/views/DiscussionsView.vue b/web/src/views/DiscussionsView.vue index 00192630..14c1f76a 100644 --- a/web/src/views/DiscussionsView.vue +++ b/web/src/views/DiscussionsView.vue @@ -469,7 +469,8 @@ export default defineComponent({ const index = this.discussionArr.findIndex(m => m.id === msgObj.id); if (index !== -1) { const messageItem = this.discussionArr[index]; - messageItem.content = msgObj.content; messageItem.finished_generating_at = msgObj.finished_generating_at; messageItem.nb_tokens = msgObj.nb_tokens; messageItem.binding = msgObj.binding; + if (msgObj.content !== undefined) messageItem.content = msgObj.content; + messageItem.finished_generating_at = msgObj.finished_generating_at; messageItem.nb_tokens = msgObj.nb_tokens; messageItem.binding = msgObj.binding; messageItem.model = msgObj.model; messageItem.personality = msgObj.personality; messageItem.status_message = "Done"; this.$store.commit('setIsGenerating', false); this.setDiscussionLoading(this.currentDiscussion.id, false); this.extractHtml(); this.recoverFiles(); this.scrollToBottomMessages(); this.playChime();