import{s as Ve,B as ue,E as ce,p as Ie,j as Ee,G as De,e as m,t as q,k as z,c as v,a as y,b as G,d as h,o as F,A as de,f,i as pe,g as r,u as ae,D as Se,h as J,F as Te,n as He}from"./scheduler.DB3Sqaa-.js";import{S as Me,i as Be,f as me,b as oe,d as re,m as ne,t as X,a as $,e as ie,g as je,c as Ae}from"./index.CidI1d1E.js";import{t as fe}from"./Toaster.svelte_svelte_type_style_lang.C-7zrEBl.js";import{M as Le}from"./Modal.DcRcsIox.js";import{b as Ce,d as Oe,e as ze}from"./index.McBTOAZM.js";import{b as Fe,d as Ue,e as Ne}from"./index.DPxQAFah.js";import{S as Ye}from"./Spinner.zSvxKTtJ.js";import"./create.DJSy4-Dz.js";import{V as Re}from"./Heart.DnYgkWAI.js";function Ze(a){let e,t;return e=new Ye({props:{className:"size-5"}}),{c(){oe(e.$$.fragment)},l(l){re(e.$$.fragment,l)},m(l,c){ne(e,l,c),t=!0},p:He,i(l){t||(X(e.$$.fragment,l),t=!0)},o(l){$(e.$$.fragment,l),t=!1},d(l){ie(e,l)}}}function Pe(a){let e,t,l;function c(s){a[11](s)}let d={valvesSpec:a[3]};return a[4]!==void 0&&(d.valves=a[4]),e=new Re({props:d}),ue.push(()=>me(e,"valves",c)),{c(){oe(e.$$.fragment)},l(s){re(e.$$.fragment,s)},m(s,o){ne(e,s,o),l=!0},p(s,o){const u={};o&8&&(u.valvesSpec=s[3]),!t&&o&16&&(t=!0,u.valves=s[4],ce(()=>t=!1)),e.$set(u)},i(s){l||(X(e.$$.fragment,s),l=!0)},o(s){$(e.$$.fragment,s),l=!1},d(s){ie(e,s)}}}function ke(a){let e,t=``;return{c(){e=m("div"),e.innerHTML=t,this.h()},l(l){e=v(l,"DIV",{class:!0,"data-svelte-h":!0}),de(e)!=="svelte-1vuzrxa"&&(e.innerHTML=t),this.h()},h(){f(e,"class","ml-2 self-center")},m(l,c){pe(l,e,c)},d(l){l&&h(e)}}}function We(a){let e,t,l,c=a[5].t("Valves")+"",d,s,o,u='',M,p,_,n,w,x,V,U,B,b,i=a[5].t("Save")+"",D,S,O,L,H,Z;const K=[Pe,Ze],j=[];function A(g,I){return g[2]?1:0}x=A(a),V=j[x]=K[x](a);let k=a[1]&&ke();return{c(){e=m("div"),t=m("div"),l=m("div"),d=q(c),s=z(),o=m("button"),o.innerHTML=u,M=z(),p=m("div"),_=m("div"),n=m("form"),w=m("div"),V.c(),U=z(),B=m("div"),b=m("button"),D=q(i),S=z(),k&&k.c(),this.h()},l(g){e=v(g,"DIV",{});var I=y(e);t=v(I,"DIV",{class:!0});var C=y(t);l=v(C,"DIV",{class:!0});var Y=y(l);d=G(Y,c),Y.forEach(h),s=F(C),o=v(C,"BUTTON",{class:!0,"data-svelte-h":!0}),de(o)!=="svelte-745w2y"&&(o.innerHTML=u),C.forEach(h),M=F(I),p=v(I,"DIV",{class:!0});var N=y(p);_=v(N,"DIV",{class:!0});var P=y(_);n=v(P,"FORM",{class:!0});var R=y(n);w=v(R,"DIV",{class:!0});var Q=y(w);V.l(Q),Q.forEach(h),U=F(R),B=v(R,"DIV",{class:!0});var ee=y(B);b=v(ee,"BUTTON",{class:!0,type:!0});var E=y(b);D=G(E,i),S=F(E),k&&k.l(E),E.forEach(h),ee.forEach(h),R.forEach(h),P.forEach(h),N.forEach(h),I.forEach(h),this.h()},h(){f(l,"class","text-lg font-medium self-center"),f(o,"class","self-center"),f(t,"class","flex justify-between dark:text-gray-300 px-5 pt-4 pb-2"),f(w,"class","px-1"),f(b,"class",O="px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg flex flex-row space-x-1 items-center "+(a[1]?" cursor-not-allowed":"")),f(b,"type","submit"),b.disabled=a[1],f(B,"class","flex justify-end pt-3 text-sm font-medium"),f(n,"class","flex flex-col w-full"),f(_,"class","flex flex-col w-full sm:flex-row sm:justify-center sm:space-x-6"),f(p,"class","flex flex-col md:flex-row w-full px-5 pb-4 md:space-x-4 dark:text-gray-200")},m(g,I){pe(g,e,I),r(e,t),r(t,l),r(l,d),r(t,s),r(t,o),r(e,M),r(e,p),r(p,_),r(_,n),r(n,w),j[x].m(w,null),r(n,U),r(n,B),r(B,b),r(b,D),r(b,S),k&&k.m(b,null),L=!0,H||(Z=[ae(o,"click",a[10]),ae(n,"submit",Se(a[12]))],H=!0)},p(g,I){(!L||I&32)&&c!==(c=g[5].t("Valves")+"")&&J(d,c);let C=x;x=A(g),x===C?j[x].p(g,I):(je(),$(j[C],1,1,()=>{j[C]=null}),Ae(),V=j[x],V?V.p(g,I):(V=j[x]=K[x](g),V.c()),X(V,1),V.m(w,null)),(!L||I&32)&&i!==(i=g[5].t("Save")+"")&&J(D,i),g[1]?k||(k=ke(),k.c(),k.m(b,null)):k&&(k.d(1),k=null),(!L||I&2&&O!==(O="px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg flex flex-row space-x-1 items-center "+(g[1]?" cursor-not-allowed":"")))&&f(b,"class",O),(!L||I&2)&&(b.disabled=g[1])},i(g){L||(X(V),L=!0)},o(g){$(V),L=!1},d(g){g&&h(e),j[x].d(),k&&k.d(),H=!1,Te(Z)}}}function qe(a){let e,t,l;function c(s){a[13](s)}let d={size:"sm",$$slots:{default:[We]},$$scope:{ctx:a}};return a[0]!==void 0&&(d.show=a[0]),e=new Le({props:d}),ue.push(()=>me(e,"show",c)),{c(){oe(e.$$.fragment)},l(s){re(e.$$.fragment,s)},m(s,o){ne(e,s,o),l=!0},p(s,[o]){const u={};o&65599&&(u.$$scope={dirty:o,ctx:s}),!t&&o&1&&(t=!0,u.show=s[0],ce(()=>t=!1)),e.$set(u)},i(s){l||(X(e.$$.fragment,s),l=!0)},o(s){$(e.$$.fragment,s),l=!1},d(s){ie(e,s)}}}function Ge(a,e,t){let l;const c=Ie("i18n");Ee(a,c,i=>t(5,l=i));const d=De();let{show:s=!1}=e,{type:o="tool"}=e,{id:u=null}=e,M=!1,p=!1,_=null,n={};const w=async()=>{var i;if(t(1,M=!0),_){for(const S in _.properties)((i=_.properties[S])==null?void 0:i.type)==="array"&&t(4,n[S]=(n[S]??"").split(",").map(O=>O.trim()),n);let D=null;o==="tool"?D=await Ne(localStorage.token,u,n).catch(S=>{fe.error(S)}):o==="function"&&(D=await ze(localStorage.token,u,n).catch(S=>{fe.error(S)})),D&&(fe.success("Valves updated successfully"),d("save"))}t(1,M=!1)},x=async()=>{var i;if(t(2,p=!0),t(4,n={}),t(3,_=null),o==="tool"?(t(4,n=await Fe(localStorage.token,u)),t(3,_=await Ue(localStorage.token,u))):o==="function"&&(t(4,n=await Ce(localStorage.token,u)),t(3,_=await Oe(localStorage.token,u))),n||t(4,n={}),_)for(const D in _.properties)((i=_.properties[D])==null?void 0:i.type)==="array"&&t(4,n[D]=(n[D]??[]).join(","),n);t(2,p=!1)},V=()=>{t(0,s=!1)};function U(i){n=i,t(4,n)}const B=()=>{w()};function b(i){s=i,t(0,s)}return a.$$set=i=>{"show"in i&&t(0,s=i.show),"type"in i&&t(8,o=i.type),"id"in i&&t(9,u=i.id)},a.$$.update=()=>{a.$$.dirty&1&&s&&x()},[s,M,p,_,n,l,c,w,o,u,V,U,B,b]}class nt extends Me{constructor(e){super(),Be(this,e,Ge,qe,Ve,{show:0,type:8,id:9})}}function Je(a){let e,t,l,c=a[2].t("Show your support!")+"",d,s,o,u='',M,p,_,n,w,x,V=a[2].t("The developers behind this plugin are passionate volunteers from the community. If you find this plugin helpful, please consider contributing to its development.")+"",U,B,b,i=a[2].t("Your entire contribution will go directly to the plugin developer; Open WebUI does not take any percentage. However, the chosen funding platform might have its own fees.")+"",D,S,O,L,H,Z=a[2].t("Support this plugin:")+"",K,j,A,k=a[1].funding_url+"",g,I,C,Y,N,P=a[2].t("Done")+"",R,Q,ee;return{c(){e=m("div"),t=m("div"),l=m("div"),d=q(c),s=z(),o=m("button"),o.innerHTML=u,M=z(),p=m("div"),_=m("div"),n=m("form"),w=m("div"),x=m("div"),U=q(V),B=z(),b=m("div"),D=q(i),S=z(),O=m("hr"),L=z(),H=m("div"),K=q(Z),j=z(),A=m("a"),g=q(k),C=z(),Y=m("div"),N=m("button"),R=q(P),this.h()},l(E){e=v(E,"DIV",{});var T=y(e);t=v(T,"DIV",{class:!0});var te=y(t);l=v(te,"DIV",{class:!0});var ve=y(l);d=G(ve,c),ve.forEach(h),s=F(te),o=v(te,"BUTTON",{class:!0,"data-svelte-h":!0}),de(o)!=="svelte-745w2y"&&(o.innerHTML=u),te.forEach(h),M=F(T),p=v(T,"DIV",{class:!0});var he=y(p);_=v(he,"DIV",{class:!0});var _e=y(_);n=v(_e,"FORM",{class:!0});var se=y(n);w=v(se,"DIV",{class:!0});var W=y(w);x=v(W,"DIV",{class:!0});var ge=y(x);U=G(ge,V),ge.forEach(h),B=F(W),b=v(W,"DIV",{class:!0});var we=y(b);D=G(we,i),we.forEach(h),S=F(W),O=v(W,"HR",{class:!0}),L=F(W),H=v(W,"DIV",{class:!0});var le=y(H);K=G(le,Z),j=F(le),A=v(le,"A",{href:!0,target:!0,class:!0});var be=y(A);g=G(be,k),be.forEach(h),le.forEach(h),W.forEach(h),C=F(se),Y=v(se,"DIV",{class:!0});var ye=y(Y);N=v(ye,"BUTTON",{class:!0,type:!0});var xe=y(N);R=G(xe,P),xe.forEach(h),ye.forEach(h),se.forEach(h),_e.forEach(h),he.forEach(h),T.forEach(h),this.h()},h(){f(l,"class","text-lg font-medium self-center"),f(o,"class","self-center"),f(t,"class","flex justify-between dark:text-gray-300 px-5 pt-4 pb-2"),f(x,"class","my-2"),f(b,"class","my-2"),f(O,"class","dark:border-gray-800 my-3"),f(A,"href",I=a[1].funding_url),f(A,"target","_blank"),f(A,"class","underline text-blue-400 hover:text-blue-300"),f(H,"class","my-2"),f(w,"class","px-1 text-sm"),f(N,"class","px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg flex flex-row space-x-1 items-center"),f(N,"type","submit"),f(Y,"class","flex justify-end pt-3 text-sm font-medium"),f(n,"class","flex flex-col w-full"),f(_,"class","flex flex-col w-full sm:flex-row sm:justify-center sm:space-x-6"),f(p,"class","flex flex-col md:flex-row w-full px-5 pb-4 md:space-x-4 dark:text-gray-200")},m(E,T){pe(E,e,T),r(e,t),r(t,l),r(l,d),r(t,s),r(t,o),r(e,M),r(e,p),r(p,_),r(_,n),r(n,w),r(w,x),r(x,U),r(w,B),r(w,b),r(b,D),r(w,S),r(w,O),r(w,L),r(w,H),r(H,K),r(H,j),r(H,A),r(A,g),r(n,C),r(n,Y),r(Y,N),r(N,R),Q||(ee=[ae(o,"click",a[4]),ae(n,"submit",Se(a[5]))],Q=!0)},p(E,T){T&4&&c!==(c=E[2].t("Show your support!")+"")&&J(d,c),T&4&&V!==(V=E[2].t("The developers behind this plugin are passionate volunteers from the community. If you find this plugin helpful, please consider contributing to its development.")+"")&&J(U,V),T&4&&i!==(i=E[2].t("Your entire contribution will go directly to the plugin developer; Open WebUI does not take any percentage. However, the chosen funding platform might have its own fees.")+"")&&J(D,i),T&4&&Z!==(Z=E[2].t("Support this plugin:")+"")&&J(K,Z),T&2&&k!==(k=E[1].funding_url+"")&&J(g,k),T&2&&I!==(I=E[1].funding_url)&&f(A,"href",I),T&4&&P!==(P=E[2].t("Done")+"")&&J(R,P)},d(E){E&&h(e),Q=!1,Te(ee)}}}function Ke(a){let e,t,l;function c(s){a[6](s)}let d={size:"sm",$$slots:{default:[Je]},$$scope:{ctx:a}};return a[0]!==void 0&&(d.show=a[0]),e=new Le({props:d}),ue.push(()=>me(e,"show",c)),{c(){oe(e.$$.fragment)},l(s){re(e.$$.fragment,s)},m(s,o){ne(e,s,o),l=!0},p(s,[o]){const u={};o&263&&(u.$$scope={dirty:o,ctx:s}),!t&&o&1&&(t=!0,u.show=s[0],ce(()=>t=!1)),e.$set(u)},i(s){l||(X(e.$$.fragment,s),l=!0)},o(s){$(e.$$.fragment,s),l=!1},d(s){ie(e,s)}}}function Qe(a,e,t){let l;const c=Ie("i18n");Ee(a,c,p=>t(2,l=p)),De();let{show:d=!1}=e,{manifest:s={}}=e;const o=()=>{t(0,d=!1)},u=()=>{t(0,d=!1)};function M(p){d=p,t(0,d)}return a.$$set=p=>{"show"in p&&t(0,d=p.show),"manifest"in p&&t(1,s=p.manifest)},[d,s,l,c,o,u,M]}class it extends Me{constructor(e){super(),Be(this,e,Qe,Ke,Ve,{show:0,manifest:1})}}export{it as M,nt as V};
//# sourceMappingURL=ManifestModal.C5qQKGnc.js.map