2 lines
21 KiB
JavaScript
2 lines
21 KiB
JavaScript
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;l<t.length;l+=1)t[l]&&t[l].d(e)}function d(t){return document.createElement(t)}function j(t){return document.createTextNode(t)}function b(){return j(" ")}function Pt(){return j("")}function kt(t,e,l,n){return t.addEventListener(e,l,n),()=>t.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(;ee<te.length;){const e=te[ee];ee++,se(e),Ot(e.$$)}}catch(e){throw te.length=0,ee=0,e}for(se(null),te.length=0,ee=0;We.length;)We.pop()();for(let e=0;e<le.length;e+=1){const l=le[e];Le.has(l)||(Le.add(l),l())}le.length=0}while(te.length);for(;Xe.length;)Xe.pop()();Ae=!1,Le.clear(),se(t)}function Ot(t){if(t.fragment!==null){t.update(),re(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ne)}}function St(t){const e=[],l=[];le.forEach(n=>t.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<<e%31}function ze(t,e,l,n,i,c,s=null,r=[-1]){const f=oe;se(t);const o=t.$$={fragment:null,ctx:[],props:c,update:T,not_equal:i,bound:Qe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(f?f.$$.context:[])),callbacks:Qe(),dirty:r,skip_bound:!1,root:e.target||f.$$.root};s&&s(o.root);let h=!1;if(o.ctx=l?l(t,e.props||{},(_,u,...g)=>{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;o<s.length;o+=1)r[o]=st(xe(t,s,o));let f=t[3].length>0&&ot(t);return{c(){e=d("div"),l=d("span"),l.textContent="Requires",n=b(),i=d("div");for(let o=0;o<r.length;o+=1)r[o].c();c=b(),f&&f.c(),p(l,"class","section-title svelte-h3bonj"),p(i,"class","tags svelte-h3bonj"),p(e,"class","section svelte-h3bonj")},m(o,h){C(o,e,h),a(e,l),a(e,n),a(e,i);for(let _=0;_<r.length;_+=1)r[_]&&r[_].m(i,null);a(e,c),f&&f.m(e,null)},p(o,h){if(h&6){s=H(o[2].requires);let _;for(_=0;_<s.length;_+=1){const u=xe(o,s,_);r[_]?r[_].p(u,h):(r[_]=st(u),r[_].c(),r[_].m(i,null))}for(;_<r.length;_+=1)r[_].d(1);r.length=s.length}o[3].length>0?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;r<c.length;r+=1)s[r]=at(Ze(t,c,r));return{c(){e=d("div"),l=d("span"),l.textContent="Optional Requires",n=b(),i=d("div");for(let r=0;r<s.length;r+=1)s[r].c();p(l,"class","section-title svelte-h3bonj"),p(i,"class","tags svelte-h3bonj"),p(e,"class","section svelte-h3bonj")},m(r,f){C(r,e,f),a(e,l),a(e,n),a(e,i);for(let o=0;o<s.length;o+=1)s[o]&&s[o].m(i,null)},p(r,f){if(f&6){c=H(r[2].optionalRequires);let o;for(o=0;o<c.length;o+=1){const h=Ze(r,c,o);s[o]?s[o].p(h,f):(s[o]=at(h),s[o].c(),s[o].m(i,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=c.length}},d(r){r&&y(e),ne(s,r)}}}function It(t){let e;return{c(){e=d("span"),e.textContent="✗",p(e,"class","x svelte-h3bonj")},m(l,n){C(l,e,n)},d(l){l&&y(e)}}}function Vt(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 at(t){let e,l=t[15]+"",n,i,c;function s(o,h){return o[16]?Vt:It}let r=s(t),f=r(t);return{c(){e=d("span"),n=j(l),i=b(),f.c(),c=b(),p(e,"class","tag svelte-h3bonj"),S(e,"optional-ok",t[16]),S(e,"optional-missing",!t[16])},m(o,h){C(o,e,h),a(e,n),a(e,i),f.m(e,null),a(e,c)},p(o,h){h&4&&l!==(l=o[15]+"")&&P(n,l),r!==(r=s(o))&&(f.d(1),f=r(o),f&&(f.c(),f.m(e,c))),h&6&&S(e,"optional-ok",o[16]),h&6&&S(e,"optional-missing",!o[16])},d(o){o&&y(e),f.d()}}}function ct(t){let e,l,n,i,c=H(t[2].permissions),s=[];for(let r=0;r<c.length;r+=1)s[r]=ut(Ye(t,c,r));return{c(){e=d("div"),l=d("span"),l.textContent="Permissions",n=b(),i=d("div");for(let r=0;r<s.length;r+=1)s[r].c();p(l,"class","section-title svelte-h3bonj"),p(i,"class","tags svelte-h3bonj"),p(e,"class","section svelte-h3bonj")},m(r,f){C(r,e,f),a(e,l),a(e,n),a(e,i);for(let o=0;o<s.length;o+=1)s[o]&&s[o].m(i,null)},p(r,f){if(f&20){c=H(r[2].permissions);let o;for(o=0;o<c.length;o+=1){const h=Ye(r,c,o);s[o]?s[o].p(h,f):(s[o]=ut(h),s[o].c(),s[o].m(i,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=c.length}},d(r){r&&y(e),ne(s,r)}}}function ft(t){let e;return{c(){e=d("span"),e.textContent="⚠",p(e,"class","danger-icon svelte-h3bonj")},m(l,n){C(l,e,n)},d(l){l&&y(e)}}}function ut(t){let e,l=t[11]+"",n,i,c,s=t[12]&&ft();return{c(){e=d("span"),n=j(l),i=b(),s&&s.c(),c=b(),p(e,"class","tag svelte-h3bonj"),S(e,"dangerous",t[12])},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[11]+"")&&P(n,l),r[12]?s||(s=ft(),s.c(),s.m(e,c)):s&&(s.d(1),s=null),f&20&&S(e,"dangerous",r[12])},d(r){r&&y(e),s&&s.d()}}}function dt(t){let e,l=t[0].error+"",n;return{c(){e=d("div"),n=j(l),p(e,"class","error-box svelte-h3bonj")},m(i,c){C(i,e,c),a(e,n)},p(i,c){c&1&&l!==(l=i[0].error+"")&&P(n,l)},d(i){i&&y(e)}}}function Bt(t){let e,l,n,i,c,s,r=(t[2].id||"unknown")+"",f,o,h,_,u=(t[2].version||"?")+"",g,w,m,E=t[0].status+"",k,q,D,L,U,A,$,N,J=(t[2].name||"-")+"",we,Ve,W,ae,Be,ke,ce=(t[2].apiVersion||"-")+"",je,Ge,X,fe,Te,$e,ue=(t[2].source||"unknown")+"",ye,Fe,Y,de,He,pe,he=(t[0].rootPath||"-")+"",Ce,De,Z,_e,Ke,ie,Ue,qe,Pe,Re,z=t[2].description&&tt(t),x=H(t[2].provides||[]),M=[];for(let v=0;v<x.length;v+=1)M[v]=lt(et(t,x,v));let I=t[2].requires&&t[2].requires.length>0&&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;v<M.length;v+=1)M[v].c();Ue=b(),I&&I.c(),qe=b(),V&&V.c(),Pe=b(),B&&B.c(),Re=b(),G&&G.c(),p(i,"class","status-dot svelte-h3bonj"),ge(i,"background",t[5]),p(h,"class","version svelte-h3bonj"),p(n,"class","plugin-id svelte-h3bonj"),p(m,"class","status-badge svelte-h3bonj"),ge(m,"color",t[5]),p(l,"class","card-header svelte-h3bonj"),p(A,"class","label svelte-h3bonj"),p(U,"class","meta-row svelte-h3bonj"),p(ae,"class","label svelte-h3bonj"),p(W,"class","meta-row svelte-h3bonj"),p(fe,"class","label svelte-h3bonj"),p(X,"class","meta-row svelte-h3bonj"),p(de,"class","label svelte-h3bonj"),p(pe,"class","path svelte-h3bonj"),p(Y,"class","meta-row svelte-h3bonj"),p(L,"class","card-meta svelte-h3bonj"),p(_e,"class","section-title svelte-h3bonj"),p(ie,"class","tags svelte-h3bonj"),p(Z,"class","section svelte-h3bonj"),p(e,"class","plugin-card svelte-h3bonj"),S(e,"disabled",!t[0].enabled),S(e,"failed",t[0].status==="failed")},m(v,R){C(v,e,R),a(e,l),a(l,n),a(n,i),a(n,c),a(n,s),a(s,f),a(n,o),a(n,h),a(h,_),a(h,g),a(l,w),a(l,m),a(m,k),a(e,q),z&&z.m(e,null),a(e,D),a(e,L),a(L,U),a(U,A),a(U,$),a(U,N),a(N,we),a(L,Ve),a(L,W),a(W,ae),a(W,Be),a(W,ke),a(ke,je),a(L,Ge),a(L,X),a(X,fe),a(X,Te),a(X,$e),a($e,ye),a(L,Fe),a(L,Y),a(Y,de),a(Y,He),a(Y,pe),a(pe,Ce),a(e,De),a(e,Z),a(Z,_e),a(Z,Ke),a(Z,ie);for(let O=0;O<M.length;O+=1)M[O]&&M[O].m(ie,null);a(e,Ue),I&&I.m(e,null),a(e,qe),V&&V.m(e,null),a(e,Pe),B&&B.m(e,null),a(e,Re),G&&G.m(e,null)},p(v,[R]){if(R&32&&ge(i,"background",v[5]),R&4&&r!==(r=(v[2].id||"unknown")+"")&&P(f,r),R&4&&u!==(u=(v[2].version||"?")+"")&&P(g,u),R&1&&E!==(E=v[0].status+"")&&P(k,E),R&32&&ge(m,"color",v[5]),v[2].description?z?z.p(v,R):(z=tt(v),z.c(),z.m(e,D)):z&&(z.d(1),z=null),R&4&&J!==(J=(v[2].name||"-")+"")&&P(we,J),R&4&&ce!==(ce=(v[2].apiVersion||"-")+"")&&P(je,ce),R&4&&ue!==(ue=(v[2].source||"unknown")+"")&&P(ye,ue),R&1&&he!==(he=(v[0].rootPath||"-")+"")&&P(Ce,he),R&4){x=H(v[2].provides||[]);let O;for(O=0;O<x.length;O+=1){const Je=et(v,x,O);M[O]?M[O].p(Je,R):(M[O]=lt(Je),M[O].c(),M[O].m(ie,null))}for(;O<M.length;O+=1)M[O].d(1);M.length=x.length}v[2].requires&&v[2].requires.length>0?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;s<n.length;s+=1)i[s]=_t(ht(t,n,s));const c=s=>K(i[s],1,1,()=>{i[s]=null});return{c(){e=d("div");for(let s=0;s<i.length;s+=1)i[s].c();p(e,"class","plugin-list svelte-1lriwhd")},m(s,r){C(s,e,r);for(let f=0;f<i.length;f+=1)i[f]&&i[f].m(e,null);l=!0},p(s,r){if(r&7){n=H(s[0]);let f;for(f=0;f<n.length;f+=1){const o=ht(s,n,f);i[f]?(i[f].p(o,r),F(i[f],1)):(i[f]=_t(o),i[f].c(),F(i[f],1),i[f].m(e,null))}for(ve(),f=n.length;f<i.length;f+=1)c(f);be()}},i(s){if(!l){for(let r=0;r<n.length;r+=1)F(i[r]);l=!0}},o(s){i=i.filter(Boolean);for(let r=0;r<i.length;r+=1)K(i[r]);l=!1},d(s){s&&y(e),ne(i,s)}}}function Ut(t){let e;return{c(){e=d("div"),e.innerHTML='<p>No plugins discovered.</p> <p class="hint svelte-1lriwhd">Place plugins in <code class="svelte-1lriwhd">~/.config/verstak/plugins/</code> or <code class="svelte-1lriwhd">./plugins/</code></p>',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='<tr><th class="svelte-1lriwhd">Capability</th> <th class="svelte-1lriwhd">Provider</th> <th class="svelte-1lriwhd">Status</th></tr>',o=b(),h=d("tbody");for(let g=0;g<u.length;g+=1)u[g].c();p(l,"class","svelte-1lriwhd"),p(r,"class","svelte-1lriwhd"),p(e,"class","registry-section svelte-1lriwhd")},m(g,w){C(g,e,w),a(e,l),a(l,n),a(l,i),a(l,c),a(e,s),a(e,r),a(r,f),a(r,o),a(r,h);for(let m=0;m<u.length;m+=1)u[m]&&u[m].m(h,null)},p(g,w){if(w&64&&P(i,g[6]),w&2){_=H(g[1]);let m;for(m=0;m<_.length;m+=1){const E=pt(g,_,m);u[m]?u[m].p(E,w):(u[m]=mt(E),u[m].c(),u[m].m(h,null))}for(;m<u.length;m+=1)u[m].d(1);u.length=_.length}},d(g){g&&y(e),ne(u,g)}}}function mt(t){let e,l,n,i=t[10].name+"",c,s,r,f=t[10].pluginId+"",o,h,_,u,g=t[10].status+"",w,m,E;return{c(){e=d("tr"),l=d("td"),n=d("code"),c=j(i),s=b(),r=d("td"),o=j(f),h=b(),_=d("td"),u=d("span"),w=j(g),E=b(),p(n,"class","svelte-1lriwhd"),p(l,"class","svelte-1lriwhd"),p(r,"class","svelte-1lriwhd"),p(u,"class",m="status-"+t[10].status+" svelte-1lriwhd"),p(_,"class","svelte-1lriwhd")},m(k,q){C(k,e,q),a(e,l),a(l,n),a(n,c),a(e,s),a(e,r),a(r,o),a(e,h),a(e,_),a(_,u),a(u,w),a(e,E)},p(k,q){q&2&&i!==(i=k[10].name+"")&&P(c,i),q&2&&f!==(f=k[10].pluginId+"")&&P(o,f),q&2&&g!==(g=k[10].status+"")&&P(w,g),q&2&&m!==(m="status-"+k[10].status+" svelte-1lriwhd")&&p(u,"class",m)},d(k){k&&y(e)}}}function Jt(t){let e,l,n,i,c,s=t[3]?"⟳ Loading...":"⟳ Reload",r,f,o,h,_,u,g;const w=[Dt,Ht,Ft],m=[];function E(k,q){return k[3]?0:k[4]?1:2}return o=E(t),h=m[o]=w[o](t),{c(){e=d("div"),l=d("header"),n=d("h2"),n.textContent="Plugin Manager",i=b(),c=d("button"),r=j(s),f=b(),h.c(),p(n,"class","svelte-1lriwhd"),p(c,"class","reload-btn svelte-1lriwhd"),p(c,"type","button"),c.disabled=t[3],p(l,"class","svelte-1lriwhd"),p(e,"class","plugin-manager svelte-1lriwhd")},m(k,q){C(k,e,q),a(e,l),a(l,n),a(l,i),a(l,c),a(c,r),a(e,f),m[o].m(e,null),_=!0,u||(g=kt(c,"click",t[8]),u=!0)},p(k,[q]){(!_||q&8)&&s!==(s=k[3]?"⟳ Loading...":"⟳ Reload")&&P(r,s),(!_||q&8)&&(c.disabled=k[3]);let D=o;o=E(k),o===D?m[o].p(k,q):(ve(),K(m[D],1,1,()=>{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")});
|