File size: 3,344 Bytes
ce592f8
1
2
import{S as z,i as A,s as F,y as p,z as h,A as b,g as d,d as g,B as v,k,l as S,m as y,h as _,n as w,b as V,J as D,v as x,f as B,a1 as E,a5 as I,e as q,a3 as J}from"../chunks/index.c7ccf096.js";import{P as N}from"../chunks/Page.c565e4f4.js";import{q as T,S as j}from"../chunks/signalQueries.5c06f1c5.js";import{g as G}from"../chunks/settingsStore.6bcd798e.js";import{S as H,a as K}from"../chunks/SelectItem.854db37b.js";function C(c,n,s){const e=c.slice();return e[5]=n[s],e}function L(c){let n,s;return n=new H({props:{labelText:"Default embedding",selected:c[3].embedding,$$slots:{default:[O]},$$scope:{ctx:c}}}),n.$on("change",c[4]),{c(){p(n.$$.fragment)},l(e){h(n.$$.fragment,e)},m(e,t){b(n,e,t),s=!0},p(e,t){const a={};t&8&&(a.selected=e[3].embedding),t&260&&(a.$$scope={dirty:t,ctx:e}),n.$set(a)},i(e){s||(d(n.$$.fragment,e),s=!0)},o(e){g(n.$$.fragment,e),s=!1},d(e){v(n,e)}}}function M(c){let n,s;return n=new j({}),{c(){p(n.$$.fragment)},l(e){h(n.$$.fragment,e)},m(e,t){b(n,e,t),s=!0},p:E,i(e){s||(d(n.$$.fragment,e),s=!0)},o(e){g(n.$$.fragment,e),s=!1},d(e){v(n,e)}}}function P(c){let n,s;return n=new K({props:{value:c[5].name}}),{c(){p(n.$$.fragment)},l(e){h(n.$$.fragment,e)},m(e,t){b(n,e,t),s=!0},p(e,t){const a={};t&4&&(a.value=e[5].name),n.$set(a)},i(e){s||(d(n.$$.fragment,e),s=!0)},o(e){g(n.$$.fragment,e),s=!1},d(e){v(n,e)}}}function O(c){let n,s,e=c[2].data||[],t=[];for(let r=0;r<e.length;r+=1)t[r]=P(C(c,e,r));const a=r=>g(t[r],1,1,()=>{t[r]=null});return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=q()},l(r){for(let o=0;o<t.length;o+=1)t[o].l(r);n=q()},m(r,o){for(let l=0;l<t.length;l+=1)t[l]&&t[l].m(r,o);V(r,n,o),s=!0},p(r,o){if(o&4){e=r[2].data||[];let l;for(l=0;l<e.length;l+=1){const m=C(r,e,l);t[l]?(t[l].p(m,o),d(t[l],1)):(t[l]=P(m),t[l].c(),d(t[l],1),t[l].m(n.parentNode,n))}for(x(),l=e.length;l<t.length;l+=1)a(l);B()}},i(r){if(!s){for(let o=0;o<e.length;o+=1)d(t[o]);s=!0}},o(r){t=t.filter(Boolean);for(let o=0;o<t.length;o+=1)g(t[o]);s=!1},d(r){J(t,r),r&&_(n)}}}function Q(c){let n,s,e,t,a,r;const o=[M,L],l=[];function m(i,f){return i[2].isFetching?0:1}return t=m(c),a=l[t]=o[t](c),{c(){n=k("div"),s=k("div"),e=k("div"),a.c(),this.h()},l(i){n=S(i,"DIV",{class:!0});var f=y(n);s=S(f,"DIV",{class:!0});var u=y(s);e=S(u,"DIV",{class:!0});var $=y(e);a.l($),$.forEach(_),u.forEach(_),f.forEach(_),this.h()},h(){w(e,"class","w-60"),w(s,"class","lilac-page flex"),w(n,"class","lilac-container")},m(i,f){V(i,n,f),D(n,s),D(s,e),l[t].m(e,null),r=!0},p(i,f){let u=t;t=m(i),t===u?l[t].p(i,f):(x(),g(l[u],1,1,()=>{l[u]=null}),B(),a=l[t],a?a.p(i,f):(a=l[t]=o[t](i),a.c()),d(a,1),a.m(e,null))},i(i){r||(d(a),r=!0)},o(i){g(a),r=!1},d(i){i&&_(n),l[t].d()}}}function R(c){let n,s;return n=new N({props:{title:"Settings",$$slots:{default:[Q]},$$scope:{ctx:c}}}),{c(){p(n.$$.fragment)},l(e){h(n.$$.fragment,e)},m(e,t){b(n,e,t),s=!0},p(e,[t]){const a={};t&268&&(a.$$scope={dirty:t,ctx:e}),n.$set(a)},i(e){s||(d(n.$$.fragment,e),s=!0)},o(e){g(n.$$.fragment,e),s=!1},d(e){v(n,e)}}}function U(c,n,s){let e,t,a,r=E,o=()=>(r(),r=I(e,u=>s(2,a=u)),e),l,m=E,i=()=>(m(),m=I(t,u=>s(3,l=u)),t);c.$$.on_destroy.push(()=>r()),c.$$.on_destroy.push(()=>m());function f(u){const $=u.target.value;t.setEmbedding($)}return o(s(1,e=T())),i(s(0,t=G())),[t,e,a,l,f]}class te extends z{constructor(n){super(),A(this,n,U,R,F,{})}}export{te as component};