var yt=Object.defineProperty;var Ct=(t,e,l)=>e in t?yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l;var Ee=(t,e,l)=>Ct(t,typeof e!="symbol"?e+"":e,l);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const s of c.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function l(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function n(i){if(i.ep)return;i.ep=!0;const c=l(i);fetch(i.href,c)}})();function T(){}function bt(t){return t()}function Qe(){return Object.create(null)}function re(t){t.forEach(bt)}function wt(t){return typeof t=="function"}function Oe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function qt(t){return Object.keys(t).length===0}function a(t,e){t.appendChild(e)}function C(t,e,l){t.insertBefore(e,l||null)}function y(t){t.parentNode&&t.parentNode.removeChild(t)}function ne(t,e){for(let l=0;lt.removeEventListener(e,l,n)}function p(t,e,l){l==null?t.removeAttribute(e):t.getAttribute(e)!==l&&t.setAttribute(e,l)}function Rt(t){return Array.from(t.childNodes)}function P(t,e){e=""+e,t.data!==e&&(t.data=e)}function ge(t,e,l,n){l==null?t.style.removeProperty(e):t.style.setProperty(e,l,"")}function S(t,e,l){t.classList.toggle(e,!!l)}let oe;function se(t){oe=t}function Et(){if(!oe)throw new Error("Function called outside component initialization");return oe}function Lt(t){Et().$$.on_mount.push(t)}const te=[],We=[];let le=[];const Xe=[],At=Promise.resolve();let Ae=!1;function Nt(){Ae||(Ae=!0,At.then(jt))}function Ne(t){le.push(t)}const Le=new Set;let ee=0;function jt(){if(ee!==0)return;const t=oe;do{try{for(;eet.indexOf(n)===-1?e.push(n):l.push(n)),l.forEach(n=>n()),le=e}const me=new Set;let Q;function ve(){Q={r:0,c:[],p:Q}}function be(){Q.r||re(Q.c),Q=Q.p}function F(t,e){t&&t.i&&(me.delete(t),t.i(e))}function K(t,e,l,n){if(t&&t.o){if(me.has(t))return;me.add(t),Q.c.push(()=>{me.delete(t),n&&(l&&t.d(1),n())}),t.o(e)}else n&&n()}function H(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function $t(t){t&&t.c()}function Se(t,e,l){const{fragment:n,after_update:i}=t.$$;n&&n.m(e,l),Ne(()=>{const c=t.$$.on_mount.map(bt).filter(wt);t.$$.on_destroy?t.$$.on_destroy.push(...c):re(c),t.$$.on_mount=[]}),i.forEach(Ne)}function Me(t,e){const l=t.$$;l.fragment!==null&&(St(l.after_update),re(l.on_destroy),l.fragment&&l.fragment.d(e),l.on_destroy=l.fragment=null,l.ctx=[])}function Mt(t,e){t.$$.dirty[0]===-1&&(te.push(t),Nt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const w=g.length?g[0]:u;return o.ctx&&i(o.ctx[_],o.ctx[_]=w)&&(!o.skip_bound&&o.bound[_]&&o.bound[_](w),h&&Mt(t,_)),u}):[],o.update(),h=!0,re(o.before_update),o.fragment=n?n(o.ctx):!1,e.target){if(e.hydrate){const _=Rt(e.target);o.fragment&&o.fragment.l(_),_.forEach(y)}else o.fragment&&o.fragment.c();e.intro&&F(t.$$.fragment),Se(t,e.target,e.anchor),jt()}se(f)}class Ie{constructor(){Ee(this,"$$");Ee(this,"$$set")}$destroy(){Me(this,1),this.$destroy=T}$on(e,l){if(!wt(l))return T;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(l),()=>{const i=n.indexOf(l);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!qt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const zt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(zt);function Ye(t,e,l){const n=t.slice();n[11]=e[l];const i=n[4].includes(n[11]);return n[12]=i,n}function Ze(t,e,l){const n=t.slice();n[15]=e[l];const i=n[1].some(function(...s){return t[8](n[15],...s)});return n[16]=i,n}function xe(t,e,l){const n=t.slice();n[19]=e[l];const i=n[1].some(function(...s){return t[7](n[19],...s)});return n[16]=i,n}function et(t,e,l){const n=t.slice();return n[22]=e[l],n}function tt(t){let e,l=t[2].description+"",n;return{c(){e=d("p"),n=j(l),p(e,"class","description svelte-h3bonj")},m(i,c){C(i,e,c),a(e,n)},p(i,c){c&4&&l!==(l=i[2].description+"")&&P(n,l)},d(i){i&&y(e)}}}function lt(t){let e,l=t[22]+"",n;return{c(){e=d("span"),n=j(l),p(e,"class","tag provides svelte-h3bonj")},m(i,c){C(i,e,c),a(e,n)},p(i,c){c&4&&l!==(l=i[22]+"")&&P(n,l)},d(i){i&&y(e)}}}function nt(t){let e,l,n,i,c,s=H(t[2].requires),r=[];for(let o=0;o0&&ot(t);return{c(){e=d("div"),l=d("span"),l.textContent="Requires",n=b(),i=d("div");for(let o=0;o0?f?f.p(o,h):(f=ot(o),f.c(),f.m(e,null)):f&&(f.d(1),f=null)},d(o){o&&y(e),ne(r,o),f&&f.d()}}}function it(t){let e;return{c(){e=d("span"),e.textContent="✓",p(e,"class","check svelte-h3bonj")},m(l,n){C(l,e,n)},d(l){l&&y(e)}}}function st(t){let e,l=t[19]+"",n,i,c,s=t[16]&&it();return{c(){e=d("span"),n=j(l),i=b(),s&&s.c(),c=b(),p(e,"class","tag svelte-h3bonj"),S(e,"required-ok",t[16]),S(e,"required-missing",!t[16])},m(r,f){C(r,e,f),a(e,n),a(e,i),s&&s.m(e,null),a(e,c)},p(r,f){f&4&&l!==(l=r[19]+"")&&P(n,l),r[16]?s||(s=it(),s.c(),s.m(e,c)):s&&(s.d(1),s=null),f&6&&S(e,"required-ok",r[16]),f&6&&S(e,"required-missing",!r[16])},d(r){r&&y(e),s&&s.d()}}}function ot(t){let e,l,n=t[3].join(", ")+"",i;return{c(){e=d("p"),l=j("⚠ Missing required capabilities: "),i=j(n),p(e,"class","warning svelte-h3bonj")},m(c,s){C(c,e,s),a(e,l),a(e,i)},p(c,s){s&8&&n!==(n=c[3].join(", ")+"")&&P(i,n)},d(c){c&&y(e)}}}function rt(t){let e,l,n,i,c=H(t[2].optionalRequires),s=[];for(let r=0;r0&&nt(t),V=t[2].optionalRequires&&t[2].optionalRequires.length>0&&rt(t),B=t[2].permissions&&t[2].permissions.length>0&&ct(t),G=t[0].error&&dt(t);return{c(){e=d("div"),l=d("div"),n=d("div"),i=d("span"),c=b(),s=d("strong"),f=j(r),o=b(),h=d("span"),_=j("v"),g=j(u),w=b(),m=d("span"),k=j(E),q=b(),z&&z.c(),D=b(),L=d("div"),U=d("div"),A=d("span"),A.textContent="Name:",$=b(),N=d("span"),we=j(J),Ve=b(),W=d("div"),ae=d("span"),ae.textContent="API Version:",Be=b(),ke=d("span"),je=j(ce),Ge=b(),X=d("div"),fe=d("span"),fe.textContent="Source:",Te=b(),$e=d("span"),ye=j(ue),Fe=b(),Y=d("div"),de=d("span"),de.textContent="Root:",He=b(),pe=d("span"),Ce=j(he),De=b(),Z=d("div"),_e=d("span"),_e.textContent="Provides",Ke=b(),ie=d("div");for(let v=0;v0?I?I.p(v,R):(I=nt(v),I.c(),I.m(e,qe)):I&&(I.d(1),I=null),v[2].optionalRequires&&v[2].optionalRequires.length>0?V?V.p(v,R):(V=rt(v),V.c(),V.m(e,Pe)):V&&(V.d(1),V=null),v[2].permissions&&v[2].permissions.length>0?B?B.p(v,R):(B=ct(v),B.c(),B.m(e,Re)):B&&(B.d(1),B=null),v[0].error?G?G.p(v,R):(G=dt(v),G.c(),G.m(e,null)):G&&(G.d(1),G=null),R&1&&S(e,"disabled",!v[0].enabled),R&1&&S(e,"failed",v[0].status==="failed")},i:T,o:T,d(v){v&&y(e),z&&z.d(),ne(M,v),I&&I.d(),V&&V.d(),B&&B.d(),G&&G.d()}}}function Gt(t,e,l){let n,i,c,s,{p:r={}}=e,{capabilities:f=[]}=e,{permissions:o=[]}=e;const h=(u,g)=>g.name===u,_=(u,g)=>g.name===u;return t.$$set=u=>{"p"in u&&l(0,r=u.p),"capabilities"in u&&l(1,f=u.capabilities),"permissions"in u&&l(6,o=u.permissions)},t.$$.update=()=>{t.$$.dirty&1&&l(2,n=r.manifest||{}),t.$$.dirty&1&&l(5,i={loaded:"#4ecca3",degraded:"#ffc857",disabled:"#a0a0b8",failed:"#e94560",incompatible:"#e94560","missing-required-capability":"#e94560",loading:"#ffc857",discovered:"#a0a0b8"}[r.status]||"#a0a0b8"),t.$$.dirty&68&&l(4,c=(n.permissions||[]).filter(u=>{let g=o.find(w=>w.name===u);return g&&g.dangerous})),t.$$.dirty&6&&l(3,s=(n.requires||[]).filter(u=>!f.some(g=>g.name===u))),t.$$.dirty&6&&(n.optionalRequires||[]).filter(u=>f.some(g=>g.name===u)),t.$$.dirty&6&&(n.optionalRequires||[]).filter(u=>!f.some(g=>g.name===u))},[r,f,n,s,c,i,o,h,_]}class Tt extends Ie{constructor(e){super(),ze(this,e,Gt,Bt,Oe,{p:0,capabilities:1,permissions:6})}}function pt(t,e,l){const n=t.slice();return n[10]=e[l],n}function ht(t,e,l){const n=t.slice();return n[13]=e[l],n}function Ft(t){let e,l,n,i,c,s,r,f,o,h,_,u,g,w,m,E,k,q;const D=[Ut,Kt],L=[];function U($,N){return $[0].length===0?0:1}w=U(t),m=L[w]=D[w](t);let A=t[1].length>0&>(t);return{c(){e=d("div"),l=d("span"),n=j(t[7]),i=j(" plugin(s) discovered"),c=b(),s=d("span"),r=j(t[6]),f=j(" capabilities registered"),o=b(),h=d("span"),_=j(t[5]),u=j(" permissions known"),g=b(),m.c(),E=b(),A&&A.c(),k=Pt(),p(l,"class","badge svelte-1lriwhd"),p(s,"class","badge svelte-1lriwhd"),p(h,"class","badge svelte-1lriwhd"),p(e,"class","summary svelte-1lriwhd")},m($,N){C($,e,N),a(e,l),a(l,n),a(l,i),a(e,c),a(e,s),a(s,r),a(s,f),a(e,o),a(e,h),a(h,_),a(h,u),C($,g,N),L[w].m($,N),C($,E,N),A&&A.m($,N),C($,k,N),q=!0},p($,N){(!q||N&128)&&P(n,$[7]),(!q||N&64)&&P(r,$[6]),(!q||N&32)&&P(_,$[5]);let J=w;w=U($),w===J?L[w].p($,N):(ve(),K(L[J],1,1,()=>{L[J]=null}),be(),m=L[w],m?m.p($,N):(m=L[w]=D[w]($),m.c()),F(m,1),m.m(E.parentNode,E)),$[1].length>0?A?A.p($,N):(A=gt($),A.c(),A.m(k.parentNode,k)):A&&(A.d(1),A=null)},i($){q||(F(m),q=!0)},o($){K(m),q=!1},d($){$&&(y(e),y(g),y(E),y(k)),L[w].d($),A&&A.d($)}}}function Ht(t){let e,l,n;return{c(){e=d("div"),l=j("Error: "),n=j(t[4]),p(e,"class","error svelte-1lriwhd")},m(i,c){C(i,e,c),a(e,l),a(e,n)},p(i,c){c&16&&P(n,i[4])},i:T,o:T,d(i){i&&y(e)}}}function Dt(t){let e;return{c(){e=d("div"),e.textContent="Scanning plugin directories...",p(e,"class","loading svelte-1lriwhd")},m(l,n){C(l,e,n)},p:T,i:T,o:T,d(l){l&&y(e)}}}function Kt(t){let e,l,n=H(t[0]),i=[];for(let s=0;sK(i[s],1,1,()=>{i[s]=null});return{c(){e=d("div");for(let s=0;sNo plugins discovered.

Place plugins in ~/.config/verstak/plugins/ or ./plugins/

',p(e,"class","empty svelte-1lriwhd")},m(l,n){C(l,e,n)},p:T,i:T,o:T,d(l){l&&y(e)}}}function _t(t){let e,l;return e=new Tt({props:{p:t[13],capabilities:t[1],permissions:t[2]}}),{c(){$t(e.$$.fragment)},m(n,i){Se(e,n,i),l=!0},p(n,i){const c={};i&1&&(c.p=n[13]),i&2&&(c.capabilities=n[1]),i&4&&(c.permissions=n[2]),e.$set(c)},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){K(e.$$.fragment,n),l=!1},d(n){Me(e,n)}}}function gt(t){let e,l,n,i,c,s,r,f,o,h,_=H(t[1]),u=[];for(let g=0;g<_.length;g+=1)u[g]=mt(pt(t,_,g));return{c(){e=d("details"),l=d("summary"),n=j("Capability Registry ("),i=j(t[6]),c=j(")"),s=b(),r=d("table"),f=d("thead"),f.innerHTML='Capability Provider Status',o=b(),h=d("tbody");for(let g=0;g{m[D]=null}),be(),h=m[o],h?h.p(k,q):(h=m[o]=w[o](k),h.c()),F(h,1),h.m(e,null))},i(k){_||(F(h),_=!0)},o(k){K(h),_=!1},d(k){k&&y(e),m[o].d(),u=!1,g()}}}function Qt(t,e,l){let n,i,c,s=[],r=[],f=[],o=!0,h="";async function _(){l(3,o=!0),l(4,h="");try{l(0,s=await window.go.api.App.GetPlugins()),l(1,r=await window.go.api.App.GetCapabilities()),l(2,f=await window.go.api.App.GetPermissions())}catch(g){l(4,h=String(g))}finally{l(3,o=!1)}}Lt(()=>{_()});async function u(){await window.go.api.App.ReloadPlugins(),await _()}return t.$$.update=()=>{t.$$.dirty&1&&l(7,n=s.length),t.$$.dirty&2&&l(6,i=r.length),t.$$.dirty&4&&l(5,c=f.length)},[s,r,f,o,h,c,i,n,u]}class Wt extends Ie{constructor(e){super(),ze(this,e,Qt,Jt,Oe,{})}}function vt(t){let e,l;return e=new Wt({}),{c(){$t(e.$$.fragment)},m(n,i){Se(e,n,i),l=!0},i(n){l||(F(e.$$.fragment,n),l=!0)},o(n){K(e.$$.fragment,n),l=!1},d(n){Me(e,n)}}}function Xt(t){let e,l,n,i,c,s,r,f,o,h,_,u=t[0]==="plugin-manager"&&vt();return{c(){e=d("main"),l=d("nav"),n=d("h1"),n.textContent="Verstak",i=b(),c=d("div"),s=d("button"),s.textContent="⚙ Plugin Manager",r=b(),f=d("section"),u&&u.c(),p(n,"class","svelte-rz1wkv"),p(s,"class","nav-item svelte-rz1wkv"),p(s,"type","button"),S(s,"active",t[0]==="plugin-manager"),p(c,"class","nav-items svelte-rz1wkv"),p(l,"class","svelte-rz1wkv"),p(f,"class","content svelte-rz1wkv"),p(e,"class","svelte-rz1wkv")},m(g,w){C(g,e,w),a(e,l),a(l,n),a(l,i),a(l,c),a(c,s),a(e,r),a(e,f),u&&u.m(f,null),o=!0,h||(_=kt(s,"click",t[1]),h=!0)},p(g,[w]){(!o||w&1)&&S(s,"active",g[0]==="plugin-manager"),g[0]==="plugin-manager"?u?w&1&&F(u,1):(u=vt(),u.c(),F(u,1),u.m(f,null)):u&&(ve(),K(u,1,1,()=>{u=null}),be())},i(g){o||(F(u),o=!0)},o(g){K(u),o=!1},d(g){g&&y(e),u&&u.d(),h=!1,_()}}}function Yt(t,e,l){let n="plugin-manager";return[n,()=>l(0,n="plugin-manager")]}class Zt extends Ie{constructor(e){super(),ze(this,e,Yt,Xt,Oe,{})}}new Zt({target:document.getElementById("app")});