Fix tests

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2026-02-07 23:19:21 +02:00 committed by Gabriel
parent 04c370e9f3
commit 090fabda9d
144 changed files with 429 additions and 659 deletions

View file

@ -150,7 +150,7 @@ func (s *PoolsTestSuite) TestListAllPools() {
func (s *PoolsTestSuite) TestListAllPoolsDBFetchErr() {
s.Fixtures.SQLMock.
ExpectQuery(regexp.QuoteMeta("SELECT `pools`.`id`,`pools`.`created_at`,`pools`.`updated_at`,`pools`.`deleted_at`,`pools`.`provider_name`,`pools`.`runner_prefix`,`pools`.`max_runners`,`pools`.`min_idle_runners`,`pools`.`runner_bootstrap_timeout`,`pools`.`image`,`pools`.`flavor`,`pools`.`os_type`,`pools`.`os_arch`,`pools`.`enabled`,`pools`.`git_hub_runner_group`,`pools`.`repo_id`,`pools`.`org_id`,`pools`.`enterprise_id`,`pools`.`template_id`,`pools`.`priority` FROM `pools` WHERE `pools`.`deleted_at` IS NULL")).
ExpectQuery(regexp.QuoteMeta("SELECT `pools`.`id`,`pools`.`created_at`,`pools`.`updated_at`,`pools`.`deleted_at`,`pools`.`provider_name`,`pools`.`runner_prefix`,`pools`.`max_runners`,`pools`.`min_idle_runners`,`pools`.`runner_bootstrap_timeout`,`pools`.`image`,`pools`.`flavor`,`pools`.`os_type`,`pools`.`os_arch`,`pools`.`enabled`,`pools`.`git_hub_runner_group`,`pools`.`enable_shell`,`pools`.`repo_id`,`pools`.`org_id`,`pools`.`enterprise_id`,`pools`.`template_id`,`pools`.`priority` FROM `pools` WHERE `pools`.`deleted_at` IS NULL")).
WillReturnError(fmt.Errorf("mocked fetching all pools error"))
_, err := s.StoreSQLMocked.ListAllPools(s.adminCtx)

View file

@ -201,7 +201,7 @@ func (s *TemplatesTestSuite) TestListTemplatesWithNameFilter() {
func (s *TemplatesTestSuite) TestListTemplatesDBFetchErr() {
s.Fixtures.SQLMock.
ExpectQuery(regexp.QuoteMeta("SELECT `templates`.`id`,`templates`.`created_at`,`templates`.`updated_at`,`templates`.`deleted_at`,`templates`.`name`,`templates`.`user_id`,`templates`.`description`,`templates`.`os_type`,`templates`.`forge_type`,`templates`.`agent_mode` FROM `templates` WHERE `templates`.`deleted_at` IS NULL")).
ExpectQuery(regexp.QuoteMeta("SELECT `templates`.`id`,`templates`.`created_at`,`templates`.`updated_at`,`templates`.`deleted_at`,`templates`.`name`,`templates`.`user_id`,`templates`.`description`,`templates`.`os_type`,`templates`.`forge_type` FROM `templates` WHERE `templates`.`deleted_at` IS NULL")).
WillReturnError(fmt.Errorf("mocked fetching templates error"))
_, err := s.StoreSQLMocked.ListTemplates(s.adminCtx, nil, nil, nil)

View file

@ -166,12 +166,13 @@ func (s *GARMToolsTestSuite) TestCreateGARMToolSuccess() {
s.Equal(param.Description, tool.Description)
s.Equal(int64(len(content)), tool.Size)
// Verify tags
// Verify tags (should include origin=manual)
expectedTags := []string{
"category=garm-agent",
"os_type=linux",
"os_arch=amd64",
"version=v1.0.0",
"origin=manual",
}
s.ElementsMatch(expectedTags, tool.Tags)
}

View file

@ -173,31 +173,30 @@ func (r *Runner) getRunnerInstallTemplateContext(instance params.Instance, entit
return installRunnerParams, nil
}
// getAgentTool retrieves the GARM agent tool based on sync configuration.
// If sync is enabled, it tries to get tools from the object store first, then falls back to cached release URL.
// If sync is disabled, it gets tools directly from the cached release URL.
// getAgentTool retrieves the GARM agent tool for the given OS type and architecture.
// Priority:
// 1. Tools from object store (manual uploads or synced)
// 2. Tools from cached upstream release (GitHub release API data)
// Returns nil if no tools are available from any source.
func (r *Runner) getAgentTool(ctx context.Context, osType commonParams.OSType, osArch commonParams.OSArch) *params.GARMAgentTool {
ctrlInfo := cache.ControllerInfo()
switch {
case ctrlInfo.SyncGARMAgentTools:
// Sync enabled: try to get tools from GARM object store
agentTools, err := r.GetGARMTools(ctx, 0, 1)
if err != nil && !errors.Is(err, runnerErrors.ErrNotFound) {
slog.WarnContext(ctx, "failed to query garm agent tools", "error", err)
}
if agentTools.TotalCount > 0 {
return &agentTools.Results[0]
}
// No tools in object store, fall through to get from release URL
slog.WarnContext(ctx, "sync enabled but no tools found in object store, falling back to release URL")
fallthrough
default:
// Sync disabled OR fallback from sync: get tools from cached release URL
tool := ctrlInfo.GetCachedAgentTool(string(osType), string(osArch))
return tool
// Check object store first (for both manual uploads and synced tools)
agentTools, err := r.GetGARMTools(ctx, 0, 100)
if err != nil && !errors.Is(err, runnerErrors.ErrNotFound) {
slog.WarnContext(ctx, "failed to query garm agent tools", "error", err)
}
// Filter results to match the requested OS type and architecture
for _, tool := range agentTools.Results {
if tool.OSType == osType && tool.OSArch == osArch {
return &tool
}
}
// No tools in object store - fall back to cached upstream release data
tool := ctrlInfo.GetCachedAgentTool(string(osType), string(osArch))
return tool
}
func (r *Runner) GetInstanceMetadata(ctx context.Context) (params.InstanceMetadata, error) {

View file

@ -142,7 +142,7 @@ func (s *ObjectStoreTestSuite) TestCreateFileObjectWithGarmAgentTag() {
_, err := s.Runner.CreateFileObject(s.Fixtures.AdminContext, createParams, reader)
s.Require().NotNil(err)
s.Require().Contains(err.Error(), "cannot create garm-agent tools via object storage API")
s.Require().Contains(err.Error(), "GARM agent tools cannot be uploaded via the file objects endpoint")
}
func (s *ObjectStoreTestSuite) TestGetFileObject() {
@ -215,15 +215,11 @@ func (s *ObjectStoreTestSuite) TestDeleteFileObjectWithGarmAgentTag() {
fileObj, err := s.Fixtures.Store.CreateFileObject(s.Fixtures.AdminContext, param, bytes.NewReader(content))
s.Require().Nil(err)
// Try to delete via API
err = s.Runner.DeleteFileObject(s.Fixtures.AdminContext, fileObj.ID)
s.Require().NotNil(err)
s.Require().Contains(err.Error(), "cannot delete garm-agent tools via object storage API")
// Verify file still exists
_, err = s.Fixtures.Store.GetFileObject(s.Fixtures.AdminContext, fileObj.ID)
s.Require().Nil(err)
_, err = s.Fixtures.Store.GetFileObject(s.Fixtures.AdminContext, fileObj.ID)
s.Require().NotNil(err)
}
func (s *ObjectStoreTestSuite) TestListFileObjects() {
@ -500,15 +496,24 @@ func (s *ObjectStoreTestSuite) TestDeleteFileObjectsByTagsUnauthorized() {
}
func (s *ObjectStoreTestSuite) TestDeleteFileObjectsByTagsWithGarmAgentTag() {
// Try to delete with garm-agent tag
// Create a file with garm-agent tag via store
content := []byte("garm-agent tool for bulk delete")
param := params.CreateFileObjectParams{
Name: "garm-agent-bulk-delete-test.bin",
Size: int64(len(content)),
Tags: []string{"category=garm-agent", "test"},
}
_, err := s.Fixtures.Store.CreateFileObject(s.Fixtures.AdminContext, param, bytes.NewReader(content))
s.Require().Nil(err)
// Delete by tags should now succeed (only creation is restricted)
deletedCount, err := s.Runner.DeleteFileObjectsByTags(
s.Fixtures.AdminContext,
[]string{"category=garm-agent", "test"},
)
s.Require().NotNil(err)
s.Require().Contains(err.Error(), "cannot delete garm-agent tools via object storage API")
s.Require().Equal(int64(0), deletedCount)
s.Require().Nil(err)
s.Require().Equal(int64(1), deletedCount)
}
func (s *ObjectStoreTestSuite) TestDeleteFileObjectsByTagsNoMatches() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{p as r}from"./DGWAZRyz.js";import{s as t}from"./Dr-4DxOa.js";const e={get data(){return r.data},get error(){return r.error},get form(){return r.form},get params(){return r.params},get route(){return r.route},get state(){return r.state},get status(){return r.status},get url(){return r.url}};t.updated.check;const u=e;export{u as p};

View file

@ -0,0 +1 @@
import{y as l,z as u,A as m,E as _,B as p,C as h,D as v,F as b,G as y,H as E}from"./DUMcBckj.js";function g(s,i,d){l&&u();var r=s,a,n,e=null,t=null;function f(){n&&(E(n),n=null),e&&(e.lastChild.remove(),r.before(e),e=null),n=t,t=null}m(()=>{if(a!==(a=i())){var c=b();if(a){var o=r;c&&(e=document.createDocumentFragment(),e.append(o=p())),t=h(()=>d(o,a))}c?v.add_callback(f):f()}},_),l&&(r=y)}export{g as c};

View file

@ -1 +0,0 @@
import{s as t,p as r}from"./BSYpqPvJ.js";const e={get data(){return r.data},get error(){return r.error},get form(){return r.form},get params(){return r.params},get route(){return r.route},get state(){return r.state},get status(){return r.status},get url(){return r.url}};t.updated.check;const s=e;export{s as p};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
const w=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function x(t){const s=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${_(t).map(i=>{const o=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(i);if(o)return s.push({name:o[1],matcher:o[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const l=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(i);if(l)return s.push({name:l[1],matcher:l[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!i)return;const n=i.split(/\[(.+?)\](?!\])/);return"/"+n.map((e,r)=>{if(r%2){if(e.startsWith("x+"))return h(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith("u+"))return h(String.fromCharCode(...e.slice(2).split("-").map(g=>parseInt(g,16))));const c=w.exec(e),[,u,p,m,d]=c;return s.push({name:m,matcher:d,optional:!!u,rest:!!p,chained:p?r===1&&n[0]==="":!1}),p?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return h(e)}).join("")}).join("")}/?$`),params:s}}function $(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function _(t){return t.slice(1).split("/").filter($)}function j(t,s,f){const i={},o=t.slice(1),l=o.filter(a=>a!==void 0);let n=0;for(let a=0;a<s.length;a+=1){const e=s[a];let r=o[a-n];if(e.chained&&e.rest&&n&&(r=o.slice(a-n,a+1).filter(c=>c).join("/"),n=0),r===void 0)if(e.rest)r="";else continue;if(!e.matcher||f[e.matcher](r)){i[e.name]=r;const c=s[a+1],u=o[a+1];c&&!c.rest&&c.optional&&u&&e.chained&&(n=0),!c&&!u&&Object.keys(i).length===l.length&&(n=0);continue}if(e.optional&&e.chained){n++;continue}return}if(!n)return i}function h(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const b=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function W(t,s){const f=_(t),i=t!="/"&&t.endsWith("/");return"/"+f.map(o=>o.replace(b,(l,n,a,e)=>{const r=s[e];if(!r){if(n||a&&r!==void 0)return"";throw new Error(`Missing parameter '${e}' in route ${t}`)}if(r.startsWith("/")||r.endsWith("/"))throw new Error(`Parameter '${e}' in route ${t} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return r})).filter(Boolean).join("/")+(i?"/":"")}const v=globalThis.__sveltekit_1djifpb?.base??"/ui",k=globalThis.__sveltekit_1djifpb?.assets??v??"";export{k as a,v as b,j as e,x as p,W as r};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as u}from"./De-I_rkH.js";import{p as v,E as m,f as h,d as r,r as d,i as t,b as k,c as g}from"./BIqNNOMq.js";import{f as b}from"./CQh-7xkh.js";var w=h('<div class="fixed inset-0 bg-black/30 dark:bg-black/50 overflow-y-auto h-full w-full z-50 flex items-center justify-center p-4" role="dialog" aria-modal="true" tabindex="-1"><div class="relative mx-auto bg-white dark:bg-gray-800 rounded-lg shadow-lg" role="document"><!></div></div>');function M(s,i){v(i,!1);const l=m();function n(){l("close")}function c(o){o.stopPropagation()}function f(o){o.key==="Escape"&&l("close")}u();var a=w(),e=r(a),p=r(e);b(p,i,"default",{}),d(e),d(a),t("click",e,c),t("click",a,n),t("keydown",a,f),k(s,a),g()}export{M};

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as F}from"./De-I_rkH.js";import{p as q,l,k as u,m as c,q as d,g as t,h as B,f as b,d as m,v as G,s as L,r as g,b as _,c as T,u as D,t as H,e as N}from"./BIqNNOMq.js";import{p as v,i as V}from"./CfI2BFUj.js";import{c as j}from"./CQh-7xkh.js";import{B as z}from"./CwE4al8R.js";var A=b('<a target="_blank" rel="noopener noreferrer" class="text-sm text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300"> </a>'),E=b('<div class="flex items-center space-x-2"><!> <!></div>');function Q(h,n){q(n,!1);const r=c(),a=c(),f=c();let s=v(n,"item",8),x=v(n,"showUrl",8,!0);function k(e){switch(e?.toLowerCase()){case"github":return"gray";case"gitea":return"green";default:return"secondary"}}function w(e){switch(e?.toLowerCase()){case"github":return"GitHub";case"gitea":return"Gitea";default:return e||"Unknown"}}l(()=>d(s()),()=>{u(r,s()?.endpoint?.endpoint_type||"Unknown")}),l(()=>d(s()),()=>{u(a,s()?.endpoint?.base_url)}),l(()=>t(r),()=>{u(f,k(t(r)))}),B(),F();var i=E(),p=m(i);{let e=G(()=>(t(r),D(()=>w(t(r)))));z(p,{get variant(){return t(f)},get text(){return t(e)}})}var y=L(p,2);{var U=e=>{var o=A(),C=m(o,!0);g(o),H(()=>{j(o,"href",t(a)),N(C,t(a))}),_(e,o)};V(y,e=>{x()&&t(a)&&e(U)})}g(i),_(h,i),T()}export{Q as F};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as ae}from"./De-I_rkH.js";import{p as se,E as re,l as M,q as ie,k as r,g as t,m as k,h as le,f as p,d as v,s as A,r as f,b as l,c as oe,A as T,a as B,z as q,D as V,t as E,e as F,u as ne}from"./BIqNNOMq.js";import{p as N,i as m}from"./CfI2BFUj.js";import{g as h,B as G}from"./CQh-7xkh.js";import{t as y}from"./DgRPqjXE.js";import{e as de}from"./BZiHL9L3.js";var ce=p('<div class="flex items-center"><div class="animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600 mr-2"></div> <span class="text-sm text-gray-500 dark:text-gray-400">Checking...</span></div>'),ve=p('<div class="ml-4 text-xs text-gray-500 dark:text-gray-400"> </div>'),fe=p('<div class="flex items-center"><svg class="w-4 h-4 text-green-500 mr-2" fill="currentColor" viewBox="0 0 20 20"><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"></path></svg> <span class="text-sm text-green-700 dark:text-green-300">Webhook installed</span></div> <!>',1),he=p('<div class="flex items-center"><svg class="w-4 h-4 text-gray-400 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm0-2a6 6 0 100-12 6 6 0 000 12zm0-10a1 1 0 011 1v3a1 1 0 01-2 0V7a1 1 0 011-1z" clip-rule="evenodd"></path></svg> <span class="text-sm text-gray-500 dark:text-gray-400">No webhook installed</span></div>'),ue=p('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center justify-between"><div><h3 class="text-lg font-medium text-gray-900 dark:text-white">Webhook Status</h3> <div class="mt-1 flex items-center"><!></div></div> <div class="flex space-x-2"><!></div></div></div></div>');function _e(H,g){se(g,!1);const x=k();let u=N(g,"entityType",8),s=N(g,"entityId",8),R=N(g,"entityName",8),i=k(null),o=k(!1),b=k(!0);const O=re();async function _(){if(s())try{r(b,!0),u()==="repository"?r(i,await h.getRepositoryWebhookInfo(s())):r(i,await h.getOrganizationWebhookInfo(s()))}catch(e){e&&typeof e=="object"&&"response"in e&&e.response?.status===404?r(i,null):(console.warn("Failed to check webhook status:",e),r(i,null))}finally{r(b,!1)}}async function J(){if(s())try{r(o,!0),u()==="repository"?await h.installRepositoryWebhook(s()):await h.installOrganizationWebhook(s()),y.success("Webhook Installed",`Webhook for ${u()} ${R()} has been installed successfully.`),await _(),O("webhookStatusChanged",{installed:!0})}catch(e){y.error("Webhook Installation Failed",e instanceof Error?e.message:"Failed to install webhook.")}finally{r(o,!1)}}async function K(){if(s())try{r(o,!0),u()==="repository"?await h.uninstallRepositoryWebhook(s()):await h.uninstallOrganizationWebhook(s()),y.success("Webhook Uninstalled",`Webhook for ${u()} ${R()} has been uninstalled successfully.`),await _(),O("webhookStatusChanged",{installed:!1})}catch(e){y.error("Webhook Uninstall Failed",de(e))}finally{r(o,!1)}}M(()=>ie(s()),()=>{s()&&_()}),M(()=>t(i),()=>{r(x,t(i)&&t(i).active)}),le(),ae();var w=ue(),P=v(w),j=v(P),W=v(j),D=A(v(W),2),Q=v(D);{var X=e=>{var d=ce();l(e,d)},Y=e=>{var d=T(),z=B(d);{var I=a=>{var n=fe(),C=A(B(n),2);{var c=U=>{var $=ve(),te=v($);f($),E(()=>F(te,`URL: ${t(i),ne(()=>t(i).url||"N/A")??""}`)),l(U,$)};m(C,U=>{t(i)&&U(c)})}l(a,n)},S=a=>{var n=he();l(a,n)};m(z,a=>{t(x)?a(I):a(S,!1)},!0)}l(e,d)};m(Q,e=>{t(b)?e(X):e(Y,!1)})}f(D),f(W);var L=A(W,2),Z=v(L);{var ee=e=>{var d=T(),z=B(d);{var I=a=>{G(a,{variant:"danger",size:"sm",get disabled(){return t(o)},$$events:{click:K},children:(n,C)=>{q();var c=V();E(()=>F(c,t(o)?"Uninstalling...":"Uninstall")),l(n,c)},$$slots:{default:!0}})},S=a=>{G(a,{variant:"primary",size:"sm",get disabled(){return t(o)},$$events:{click:J},children:(n,C)=>{q();var c=V();E(()=>F(c,t(o)?"Installing...":"Install Webhook")),l(n,c)},$$slots:{default:!0}})};m(z,a=>{t(x)?a(I):a(S,!1)})}l(e,d)};m(Z,e=>{t(b)||e(ee)})}f(L),f(j),f(P),f(w),l(H,w),oe()}export{_e as W};

View file

@ -1,4 +1,4 @@
import{d as o}from"./CQh-7xkh.js";function l(r){if(!r)return"N/A";try{return(typeof r=="string"?new Date(r):r).toLocaleString()}catch{return"Invalid Date"}}function f(r,e="w-4 h-4"){return r==="gitea"?`<svg class="${e}" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 640 640"><path d="m395.9 484.2-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8 17.2 8.3 27.1 13 27.1 13l-.1-109.2 16.7-.1.1 117.1s57.4 24.2 83.1 40.1c3.7 2.3 10.2 6.8 12.9 14.4 2.1 6.1 2 13.1-1 19.3l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12" style="fill:#fff"/><path d="M622.7 149.8c-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.3.3-26.5.6-39.6.7v117.2c-5.5-2.6-11.1-5.3-16.6-7.9 0-36.4-.1-109.2-.1-109.2-29 .4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5c-9.8-.6-22.5-2.1-39 1.5-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6M125.6 353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1s7.1 59.4 15.7 94.2c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1m300.3 107.6s-6.1 14.5-19.6 15.4c-5.8.4-10.3-1.2-10.3-1.2s-.3-.1-5.3-2.1l-112.9-55s-10.9-5.7-12.8-15.6c-2.2-8.1 2.7-18.1 2.7-18.1L322 273s4.8-9.7 12.2-13c.6-.3 2.3-1 4.5-1.5 8.1-2.1 18 2.8 18 2.8L467.4 315s12.6 5.7 15.3 16.2c1.9 7.4-.5 14-1.8 17.2-6.3 15.4-55 113.1-55 113.1" style="fill:#609926"/><path d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8s2 16.3 9.1 20c7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3s17.4 1.7 22.5-5.3c5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8z" style="fill:#609926"/></svg>`:r==="github"?`<div class="inline-flex ${e}"><svg class="${e} dark:hidden" width="98" height="96" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 96"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg><svg class="${e} hidden dark:block" width="98" height="96" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 96"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#fff"/></svg></div>`:`<svg class="${e} text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
import{d as o}from"./By1mMPic.js";function l(r){if(!r)return"N/A";try{return(typeof r=="string"?new Date(r):r).toLocaleString()}catch{return"Invalid Date"}}function f(r,e="w-4 h-4"){return r==="gitea"?`<svg class="${e}" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 640 640"><path d="m395.9 484.2-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8 17.2 8.3 27.1 13 27.1 13l-.1-109.2 16.7-.1.1 117.1s57.4 24.2 83.1 40.1c3.7 2.3 10.2 6.8 12.9 14.4 2.1 6.1 2 13.1-1 19.3l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12" style="fill:#fff"/><path d="M622.7 149.8c-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.3.3-26.5.6-39.6.7v117.2c-5.5-2.6-11.1-5.3-16.6-7.9 0-36.4-.1-109.2-.1-109.2-29 .4-89.2-2.2-89.2-2.2s-141.4-7.1-156.8-8.5c-9.8-.6-22.5-2.1-39 1.5-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6M125.6 353.9c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1s7.1 59.4 15.7 94.2c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1m300.3 107.6s-6.1 14.5-19.6 15.4c-5.8.4-10.3-1.2-10.3-1.2s-.3-.1-5.3-2.1l-112.9-55s-10.9-5.7-12.8-15.6c-2.2-8.1 2.7-18.1 2.7-18.1L322 273s4.8-9.7 12.2-13c.6-.3 2.3-1 4.5-1.5 8.1-2.1 18 2.8 18 2.8L467.4 315s12.6 5.7 15.3 16.2c1.9 7.4-.5 14-1.8 17.2-6.3 15.4-55 113.1-55 113.1" style="fill:#609926"/><path d="M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8s2 16.3 9.1 20c7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3s17.4 1.7 22.5-5.3c5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8z" style="fill:#609926"/></svg>`:r==="github"?`<div class="inline-flex ${e}"><svg class="${e} dark:hidden" width="98" height="96" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 96"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg><svg class="${e} hidden dark:block" width="98" height="96" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 96"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#fff"/></svg></div>`:`<svg class="${e} text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<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" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>`}function d(r,e){if(r.repo_name)return r.repo_name;if(r.org_name)return r.org_name;if(r.enterprise_name)return r.enterprise_name;if(r.repo_id&&!r.repo_name&&e?.repositories){const n=e.repositories.find(t=>t.id===r.repo_id);return n?`${n.owner}/${n.name}`:"Unknown Entity"}if(r.org_id&&!r.org_name&&e?.organizations){const n=e.organizations.find(t=>t.id===r.org_id);return n&&n.name?n.name:"Unknown Entity"}if(r.enterprise_id&&!r.enterprise_name&&e?.enterprises){const n=e.enterprises.find(t=>t.id===r.enterprise_id);return n&&n.name?n.name:"Unknown Entity"}return"Unknown Entity"}function p(r){return r.repo_id?"repository":r.org_id?"organization":r.enterprise_id?"enterprise":"unknown"}function g(r){return r.repo_id?o(`/repositories/${r.repo_id}`):r.org_id?o(`/organizations/${r.org_id}`):r.enterprise_id?o(`/enterprises/${r.enterprise_id}`):"#"}function w(r){r&&(r.scrollTop=r.scrollHeight)}function m(r){return{newPerPage:r,newCurrentPage:1}}function v(r){return r.pool_manager_status?.running?{text:"Running",variant:"success"}:{text:"Stopped",variant:"error"}}function _(r){switch(r.toLowerCase()){case"error":return{text:"Error",variant:"error"};case"warning":return{text:"Warning",variant:"warning"};case"info":return{text:"Info",variant:"info"};default:return{text:r,variant:"info"}}}function i(r,e,n){if(!e.trim())return r;const t=e.toLowerCase();return r.filter(s=>typeof n=="function"?n(s).toLowerCase().includes(t):n.some(a=>s[a]?.toString().toLowerCase().includes(t)))}function h(r,e){return i(r,e,["name","owner"])}function x(r,e){return i(r,e,["name"])}function k(r,e){return i(r,e,n=>[n.name||"",n.description||"",n.endpoint?.name||""].join(" "))}function E(r,e){return i(r,e,["name","description","base_url","api_base_url"])}function L(r,e,n){return r.slice((e-1)*n,e*n)}export{E as a,l as b,m as c,_ as d,d as e,k as f,f as g,i as h,p as i,g as j,v as k,x as l,h as m,L as p,w as s};

View file

@ -0,0 +1 @@
import{f as j,t as $,a as n,s as v}from"./o8CdT7B0.js";import{i as J}from"./ChJfoPF0.js";import{p as K,v as O,c as e,r as t,s as i,n as D,t as h,g as Q,i as R,a as S}from"./DUMcBckj.js";import{p as l,i as T}from"./i7pKks78.js";import{B as L,s as M}from"./By1mMPic.js";import{M as U}from"./bEwPjd5X.js";var V=j('<p class="mt-1 font-medium text-gray-900 dark:text-white"> </p>'),W=j('<div class="max-w-xl w-full p-6"><div><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"></path></svg></div> <div class="text-center"><h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white mb-2"> </h3> <div class="text-sm text-gray-500 dark:text-gray-400"><p> </p> <!></div></div> <div class="mt-6 flex justify-end space-x-3"><!> <!></div></div>');function se(B,a){K(a,!1);let C=l(a,"title",8),P=l(a,"message",8),_=l(a,"itemName",8,""),c=l(a,"loading",8,!1),N=l(a,"confirmLabel",8,"Delete"),m=l(a,"danger",8,!0);const f=O();function q(){f("confirm")}J(),U(B,{$$events:{close:()=>f("close")},children:(z,X)=>{var u=W(),d=e(u),E=e(d);t(d);var x=i(d,2),g=e(x),A=e(g,!0);t(g);var k=i(g,2),p=e(k),F=e(p,!0);t(p);var G=i(p,2);{var H=r=>{var s=V(),o=e(s,!0);t(s),h(()=>v(o,_())),n(r,s)};T(G,r=>{_()&&r(H)})}t(k),t(x);var b=i(x,2),w=e(b);L(w,{variant:"secondary",get disabled(){return c()},$$events:{click:()=>f("close")},children:(r,s)=>{D();var o=$("Cancel");n(r,o)},$$slots:{default:!0}});var I=i(w,2);{let r=R(()=>m()?"danger":"primary");L(I,{get variant(){return Q(r)},get disabled(){return c()},get loading(){return c()},$$events:{click:q},children:(s,o)=>{D();var y=$();h(()=>v(y,N())),n(s,y)},$$slots:{default:!0}})}t(b),t(u),h(()=>{M(d,1,`mx-auto flex items-center justify-center h-12 w-12 rounded-full ${m()?"bg-red-100 dark:bg-red-900":"bg-yellow-100 dark:bg-yellow-900"} mb-4`),M(E,0,`h-6 w-6 ${m()?"text-red-600 dark:text-red-400":"text-yellow-600 dark:text-yellow-400"}`),v(A,C()),v(F,P())}),n(z,u)},$$slots:{default:!0}}),S()}export{se as D};

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
import{F as u}from"./BIqNNOMq.js";function c(){const{subscribe:s,set:i,update:o}=u([]),n={subscribe:s,add:e=>{const t=Math.random().toString(36).substr(2,9),r={...e,id:t,duration:e.duration??5e3};return o(a=>[...a,r]),r.duration&&r.duration>0&&setTimeout(()=>{o(a=>a.filter(d=>d.id!==t))},r.duration),t},remove:e=>{o(t=>t.filter(r=>r.id!==e))},clear:()=>{i([])},success:(e,t="",r)=>n.add({type:"success",title:e,message:t,duration:r}),error:(e,t="",r)=>n.add({type:"error",title:e,message:t,duration:r}),info:(e,t="",r)=>n.add({type:"info",title:e,message:t,duration:r}),warning:(e,t="",r)=>n.add({type:"warning",title:e,message:t,duration:r})};return n}const p=c();export{p as t};
import{w as u}from"./DUMcBckj.js";function c(){const{subscribe:s,set:i,update:o}=u([]),n={subscribe:s,add:e=>{const t=Math.random().toString(36).substr(2,9),r={...e,id:t,duration:e.duration??5e3};return o(a=>[...a,r]),r.duration&&r.duration>0&&setTimeout(()=>{o(a=>a.filter(d=>d.id!==t))},r.duration),t},remove:e=>{o(t=>t.filter(r=>r.id!==e))},clear:()=>{i([])},success:(e,t="",r)=>n.add({type:"success",title:e,message:t,duration:r}),error:(e,t="",r)=>n.add({type:"error",title:e,message:t,duration:r}),info:(e,t="",r)=>n.add({type:"info",title:e,message:t,duration:r}),warning:(e,t="",r)=>n.add({type:"warning",title:e,message:t,duration:r})};return n}const p=c();export{p as t};

View file

@ -0,0 +1 @@
import{f as D,e as B,a as E}from"./o8CdT7B0.js";import{i as P}from"./ChJfoPF0.js";import{p as S,v as T,l as t,h as s,g as e,m as o,b as q,t as F,a as G,u as I,c as _,d as a,r as z}from"./DUMcBckj.js";import{j as J,h as K,s as N,k as O}from"./By1mMPic.js";import{l as j,p as l}from"./i7pKks78.js";var Q=D('<button><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><!></svg></button>');function Z(M,i){const C=j(i,["children","$$slots","$$events","$$legacy"]),H=j(C,["action","disabled","title","ariaLabel","size"]);S(i,!1);const u=o(),h=o(),k=o(),p=o(),f=o(),v=o(),n=o(),m=o(),x=o(),L=T();let r=l(i,"action",8,"edit"),b=l(i,"disabled",8,!1),w=l(i,"title",8,""),y=l(i,"ariaLabel",8,""),c=l(i,"size",8,"md");function A(){b()||L("click")}t(()=>{},()=>{a(u,"transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-900 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50")}),t(()=>s(c()),()=>{a(h,{sm:"p-1",md:"p-2"}[c()])}),t(()=>s(r()),()=>{a(k,{edit:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 focus:ring-indigo-500",delete:"text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300 focus:ring-red-500",view:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 focus:ring-gray-500",add:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500",copy:"text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 focus:ring-blue-500",download:"text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 focus:ring-blue-500",shell:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500"}[r()])}),t(()=>s(c()),()=>{a(p,c()==="sm"?"h-4 w-4":"h-5 w-5")}),t(()=>(e(u),e(h),e(k)),()=>{a(f,[e(u),e(h),e(k)].join(" "))}),t(()=>{},()=>{a(v,{edit:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />',delete:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />',view:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />',add:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',copy:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />',download:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />',shell:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2z" />'})}),t(()=>{},()=>{a(n,{edit:"Edit",delete:"Delete",view:"View",add:"Add",copy:"Clone",download:"Download",shell:"Shell"})}),t(()=>(s(w()),e(n),s(r())),()=>{a(m,w()||e(n)[r()])}),t(()=>(s(y()),e(n),s(r())),()=>{a(x,y()||`${e(n)[r()]} item`)}),q(),P();var d=Q();J(d,()=>({type:"button",class:e(f),disabled:b(),title:e(m),"aria-label":e(x),...H}));var g=_(d),V=_(g);K(V,()=>(e(v),s(r()),I(()=>e(v)[r()])),!0),z(g),z(d),F(()=>N(g,0,O(e(p)))),B("click",d,A),E(M,d),G()}export{Z as A};

View file

@ -0,0 +1 @@
import{f as _,a as h,s as x}from"./o8CdT7B0.js";import{i as u}from"./ChJfoPF0.js";import{p as g,t as k,a as w,s as y,c as o,u as m,h as e,r}from"./DUMcBckj.js";import{h as z}from"./By1mMPic.js";import{p as d}from"./i7pKks78.js";import{g as l}from"./BPOuWaSt.js";var E=_('<div class="flex items-center"><div class="flex-shrink-0 mr-2"><!></div> <div class="text-sm text-gray-900 dark:text-white"> </div></div>');function j(v,i){g(i,!1);let t=d(i,"item",8),s=d(i,"iconSize",8,"w-5 h-5");u();var a=E(),n=o(a),f=o(n);z(f,()=>(e(l),e(t()),e(s()),m(()=>l(t()?.endpoint?.endpoint_type||t()?.endpoint_type||"unknown",s())))),r(n);var p=y(n,2),c=o(p,!0);r(p),r(a),k(()=>x(c,(e(t()),m(()=>t()?.endpoint?.name||t()?.endpoint_name||t()?.endpoint_type||"Unknown")))),h(v,a),w()}export{j as E};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{f as b,a as r,s as k,c as B,t as T}from"./o8CdT7B0.js";import{i as U}from"./ChJfoPF0.js";import{p as V,v as W,t as H,a as X,c as i,r as o,s as y,u as g,f as L,h as z,n as Y}from"./DUMcBckj.js";import{p as v,i as l}from"./i7pKks78.js";import{e as Z,f as D,B as $}from"./By1mMPic.js";var tt=b('<div class="mt-4 sm:mt-0 flex items-center space-x-4"><!></div>'),at=b('<div class="mt-4 sm:mt-0 flex items-center space-x-3"><!> <!></div>'),et=b('<div class="sm:flex sm:items-center sm:justify-between"><div><h1 class="text-2xl font-bold text-gray-900 dark:text-white"> </h1> <p class="mt-2 text-sm text-gray-700 dark:text-gray-300"> </p></div> <!></div>');function ct(E,t){const d=Z(t);V(t,!1);const M=W();let q=v(t,"title",8),C=v(t,"description",8),n=v(t,"actionLabel",8,null),m=v(t,"showAction",8,!0);function F(){M("action")}U();var f=et(),_=i(f),x=i(_),G=i(x,!0);o(x);var w=y(x,2),I=i(w,!0);o(w),o(_);var J=y(_,2);{var K=e=>{var s=tt(),h=i(s);D(h,t,"actions",{}),o(s),r(e,s)},N=e=>{var s=B(),h=L(s);{var O=p=>{var u=at(),A=i(u);{var Q=a=>{var c=B(),P=L(c);D(P,t,"secondary-actions",{}),r(a,c)};l(A,a=>{g(()=>d["secondary-actions"])&&a(Q)})}var R=y(A,2);{var S=a=>{$(a,{variant:"primary",icon:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',$$events:{click:F},children:(c,P)=>{Y();var j=T();H(()=>k(j,n())),r(c,j)},$$slots:{default:!0}})};l(R,a=>{m()&&n()&&a(S)})}o(u),r(p,u)};l(h,p=>{z(m()),z(n()),g(()=>m()&&n()||d["secondary-actions"])&&p(O)},!0)}r(e,s)};l(J,e=>{g(()=>d.actions)?e(K):e(N,!1)})}o(f),H(()=>{k(G,q()),k(I,C())}),r(E,f),X()}export{ct as P};

View file

@ -0,0 +1 @@
import{aa as k,u as o,a8 as h,y as t,D as f,ab as m}from"./DUMcBckj.js";import{l as _}from"./o8CdT7B0.js";function E(e,a,c=a){var v=k(),d=new WeakSet;_(e,"input",r=>{var l=r?e.defaultValue:e.value;if(l=n(e)?s(l):l,c(l),f!==null&&d.add(f),v&&l!==(l=a())){var b=e.selectionStart,u=e.selectionEnd;e.value=l??"",u!==null&&(e.selectionStart=b,e.selectionEnd=Math.min(u,e.value.length))}}),(t&&e.defaultValue!==e.value||o(a)==null&&e.value)&&(c(n(e)?s(e.value):e.value),f!==null&&d.add(f)),h(()=>{var r=a();if(e===document.activeElement){var l=m??f;if(d.has(l))return}n(e)&&r===s(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function S(e,a,c=a){_(e,"change",v=>{var d=v?e.defaultChecked:e.checked;c(d)}),(t&&e.defaultChecked!==e.checked||o(a)==null)&&c(e.checked),h(()=>{var v=a();e.checked=!!v})}function n(e){var a=e.type;return a==="number"||a==="range"}function s(e){return e===""?null:+e}export{S as a,E as b};

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
import{F as l}from"./BIqNNOMq.js";function c(){const{subscribe:a,set:s,update:r}=l(!1);return{subscribe:a,init:()=>{const t=localStorage.getItem("theme");let e=!1;t==="dark"?e=!0:t==="light"?e=!1:e=window.matchMedia("(prefers-color-scheme: dark)").matches,s(e),o(e)},toggle:()=>r(t=>{const e=!t;return localStorage.setItem("theme",e?"dark":"light"),o(e),e}),set:t=>{localStorage.setItem("theme",t?"dark":"light"),o(t),s(t)}}}function o(a){a?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}const d=c();export{d as t};
import{w as l}from"./DUMcBckj.js";function c(){const{subscribe:a,set:s,update:r}=l(!1);return{subscribe:a,init:()=>{const t=localStorage.getItem("theme");let e=!1;t==="dark"?e=!0:t==="light"?e=!1:e=window.matchMedia("(prefers-color-scheme: dark)").matches,s(e),o(e)},toggle:()=>r(t=>{const e=!t;return localStorage.setItem("theme",e?"dark":"light"),o(e),e}),set:t=>{localStorage.setItem("theme",t?"dark":"light"),o(t),s(t)}}}function o(a){a?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}const d=c();export{d as t};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as Z}from"./De-I_rkH.js";import{p as ee,o as te,B as ne,l as T,h as re,f as x,a as ae,t as j,b as k,c as se,s as b,d as i,k as a,m as v,r as l,q as c,u as f,g as r,e as B,i as $}from"./BIqNNOMq.js";import{p as w,i as L}from"./CfI2BFUj.js";import{c as D,s as oe,d,i as ie}from"./CQh-7xkh.js";import{b as le}from"./BLHP-Xk3.js";var ce=x('<div class="flex-shrink-0"><svg role="img" aria-label="Has description" class="w-4 h-4 text-gray-400 dark:text-gray-500 cursor-help" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div>'),de=x('<div class="text-sm text-gray-500 dark:text-gray-400 truncate"> </div>'),ve=x('<div class="fixed z-50 w-64 pointer-events-none"><div class="bg-gray-900 dark:bg-gray-700 text-white text-xs rounded-md px-3 py-2 shadow-lg"><div class="font-semibold mb-1">Description:</div> <div class="whitespace-pre-wrap break-words max-h-32 overflow-y-auto"> </div></div></div>'),ue=x('<div class="w-full min-w-0 text-sm font-medium"><div class="flex items-center gap-1.5"><a> </a> <!></div> <!></div> <!>',1);function ge(N,u){ee(u,!1);const y=v(),C=v();let t=w(u,"item",8),s=w(u,"entityType",8,"repository"),O=w(u,"showOwner",8,!1),R=w(u,"showId",8,!1),Y=w(u,"fontMono",8,!1),h=v(null),_=v(!1),H=v(0),U=v(0),E=v(!1);function p(){if(r(h)){const e=r(h).getBoundingClientRect();a(H,e.left),window.innerHeight-e.bottom<150?(a(E,!0),a(U,e.top)):(a(E,!1),a(U,e.bottom+4))}}function q(){a(_,!0),p()}function A(){a(_,!1)}te(()=>{window.addEventListener("scroll",p,!0),window.addEventListener("resize",p)}),ne(()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)});function P(){if(!t())return"Unknown";switch(s()){case"repository":return O()?`${t().owner||"Unknown"}/${t().name||"Unknown"}`:t().name||"Unknown";case"organization":case"enterprise":return t().name||"Unknown";case"pool":return R()?t().id||"Unknown":t().name||"Unknown";case"scaleset":return t().name||"Unknown";case"instance":return t().name||"Unknown";case"template":return t().name||"Unknown";case"object":return t().name||"Unknown";default:return t().name||t().id||"Unknown"}}function X(){if(!t())return"#";let e;switch(s()){case"instance":e=t().name;break;default:e=t().id||t().name;break}if(!e)return"#";switch(s()){case"repository":return d(`/repositories/${e}`);case"organization":return d(`/organizations/${e}`);case"enterprise":return d(`/enterprises/${e}`);case"pool":return d(`/pools/${e}`);case"scaleset":return d(`/scalesets/${e}`);case"instance":return d(`/instances/${encodeURIComponent(e)}`);case"template":return d(`/templates/${e}`);case"object":return d(`/objects/${e}`);default:return"#"}}T(()=>{},()=>{a(y,P())}),T(()=>{},()=>{a(C,X())}),re(),Z();var I=ue(),z=ae(I),M=i(z),m=i(M),F=i(m,!0);l(m);var G=b(m,2);{var J=e=>{var n=ce(),o=i(n);le(o,g=>a(h,g),()=>r(h)),l(n),$("mouseenter",o,q),$("mouseleave",o,A),k(e,n)};L(G,e=>{c(s()),c(t()),f(()=>s()==="object"&&t()?.description)&&e(J)})}l(M);var K=b(M,2);{var Q=e=>{var n=de(),o=i(n,!0);l(n),j(()=>B(o,(c(t()),f(()=>t().provider_id)))),k(e,n)};L(K,e=>{c(s()),c(t()),f(()=>s()==="instance"&&t()?.provider_id)&&e(Q)})}l(z);var S=b(z,2);{var V=e=>{var n=ve(),o=i(n),g=b(i(o),2),W=i(g,!0);l(g),l(o),l(n),j(()=>{ie(n,`left: ${r(H)??""}px; top: ${r(U)??""}px; transform: translateY(${r(E)?"-100%":"0"});`),B(W,(c(t()),f(()=>t().description)))}),k(e,n)};L(S,e=>{c(s()),c(t()),r(_),f(()=>s()==="object"&&t()?.description&&r(_))&&e(V)})}j(()=>{D(m,"href",r(C)),oe(m,1,`truncate text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 ${Y()?"font-mono":""}`),D(m,"title",r(y)),B(F,r(y))}),k(N,I),se()}export{ge as E};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import"./De-I_rkH.js";import{f as l,s as h,d as n,r as f,t as N,e as w,b as r,A as x,a as y}from"./BIqNNOMq.js";import{p,i as b}from"./CfI2BFUj.js";import{s as O}from"./CQh-7xkh.js";var P=l('<div class="absolute top-full left-1/2 transform -translate-x-1/2 border-4 border-transparent border-t-gray-900"></div>'),Q=l('<div class="absolute bottom-full left-1/2 transform -translate-x-1/2 border-4 border-transparent border-b-gray-900"></div>'),R=l('<div class="absolute right-full top-1/2 transform -translate-y-1/2 border-4 border-transparent border-l-gray-900"></div>'),S=l('<div class="absolute left-full top-1/2 transform -translate-y-1/2 border-4 border-transparent border-r-gray-900"></div>'),U=l('<div class="relative group"><svg class="w-3 h-3 text-gray-400 cursor-help" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <div><div class="font-semibold mb-1"> </div> <div class="text-gray-300"> </div> <!></div></div>');function $(k,s){let z=p(s,"title",8),M=p(s,"content",8),t=p(s,"position",8,"top"),T=p(s,"width",8,"w-80");var m=U(),u=h(n(m),2),_=n(u),j=n(_,!0);f(_);var c=h(_,2),A=n(c,!0);f(c);var B=h(c,2);{var C=a=>{var i=P();r(a,i)},q=a=>{var i=x(),D=y(i);{var E=o=>{var v=Q();r(o,v)},F=o=>{var v=x(),G=y(v);{var H=e=>{var d=R();r(e,d)},I=e=>{var d=x(),J=y(d);{var K=g=>{var L=S();r(g,L)};b(J,g=>{t()==="right"&&g(K)},!0)}r(e,d)};b(G,e=>{t()==="left"?e(H):e(I,!1)},!0)}r(o,v)};b(D,o=>{t()==="bottom"?o(E):o(F,!1)},!0)}r(a,i)};b(B,a=>{t()==="top"?a(C):a(q,!1)})}f(u),f(m),N(()=>{O(u,1,`absolute ${t()==="top"?"bottom-full":t()==="bottom"?"top-full":t()==="left"?"right-full top-1/2 -translate-y-1/2":"left-full top-1/2 -translate-y-1/2"} left-1/2 transform -translate-x-1/2 ${t()==="top"?"mb-2":t()==="bottom"?"mt-2":"mx-2"} ${T()??""} p-3 bg-gray-900 text-white text-xs rounded-lg shadow-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50`),w(j,z()),w(A,M())}),r(k,m)}export{$ as T};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import"./De-I_rkH.js";import{f as k,d as a,s as m,r as i,t as g,e as f,b as v,z as p,D as z}from"./BIqNNOMq.js";import{p as t,i as u}from"./CfI2BFUj.js";import{s as Y,h as Z,B as H}from"./CQh-7xkh.js";var $=k('<div class="flex-shrink-0"><!></div>'),ee=k('<div class="mt-4 sm:mt-0 flex space-x-3"><!> <!></div>'),te=k('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="sm:flex sm:items-center sm:justify-between"><div class="flex items-center space-x-3"><!> <div><h1> </h1> <p class="text-sm text-gray-500 dark:text-gray-400"> </p></div></div> <!></div></div></div>');function se(j,e){let E=t(e,"title",8),M=t(e,"subtitle",8),D=t(e,"forgeIcon",8,""),h=t(e,"onEdit",8,null),x=t(e,"onDelete",8,null),B=t(e,"editLabel",8,"Edit"),C=t(e,"deleteLabel",8,"Delete"),P=t(e,"editVariant",8,"secondary"),A=t(e,"deleteVariant",8,"danger"),q=t(e,"editDisabled",8,!1),F=t(e,"deleteDisabled",8,!1),G=t(e,"editIcon",8,"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'/>"),J=t(e,"deleteIcon",8,"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'/>"),K=t(e,"titleClass",8,"");var _=te(),y=a(_),w=a(y),b=a(w),I=a(b);{var N=l=>{var d=$(),c=a(d);Z(c,D),i(d),v(l,d)};u(I,l=>{D()&&l(N)})}var L=m(I,2),o=a(L),O=a(o,!0);i(o);var V=m(o,2),Q=a(V,!0);i(V),i(L),i(b);var R=m(b,2);{var S=l=>{var d=ee(),c=a(d);{var T=r=>{H(r,{get variant(){return P()},size:"md",get disabled(){return q()},get icon(){return G()},$$events:{click(...s){h()?.apply(this,s)}},children:(s,X)=>{p();var n=z();g(()=>f(n,B())),v(s,n)},$$slots:{default:!0}})};u(c,r=>{h()&&r(T)})}var U=m(c,2);{var W=r=>{H(r,{get variant(){return A()},size:"md",get disabled(){return F()},get icon(){return J()},$$events:{click(...s){x()?.apply(this,s)}},children:(s,X)=>{p();var n=z();g(()=>f(n,C())),v(s,n)},$$slots:{default:!0}})};u(U,r=>{x()&&r(W)})}i(d),v(l,d)};u(R,l=>{(h()||x())&&l(S)})}i(w),i(y),i(_),g(()=>{Y(o,1,`text-2xl font-bold text-gray-900 dark:text-white ${K()??""}`),f(O,E()),f(Q,M())}),v(j,_)}export{se as D};

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
const w=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function x(t){const s=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${_(t).map(a=>{const i=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(i)return s.push({name:i[1],matcher:i[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const c=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(c)return s.push({name:c[1],matcher:c[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const n=a.split(/\[(.+?)\](?!\])/);return"/"+n.map((e,u)=>{if(u%2){if(e.startsWith("x+"))return h(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith("u+"))return h(String.fromCharCode(...e.slice(2).split("-").map(g=>parseInt(g,16))));const o=w.exec(e),[,l,p,m,d]=o;return s.push({name:m,matcher:d,optional:!!l,rest:!!p,chained:p?u===1&&n[0]==="":!1}),p?"([^]*?)":l?"([^/]*)?":"([^/]+?)"}return h(e)}).join("")}).join("")}/?$`),params:s}}function $(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function _(t){return t.slice(1).split("/").filter($)}function k(t,s,f){const a={},i=t.slice(1),c=i.filter(r=>r!==void 0);let n=0;for(let r=0;r<s.length;r+=1){const e=s[r];let u=i[r-n];if(e.chained&&e.rest&&n&&(u=i.slice(r-n,r+1).filter(o=>o).join("/"),n=0),u===void 0){e.rest&&(a[e.name]="");continue}if(!e.matcher||f[e.matcher](u)){a[e.name]=u;const o=s[r+1],l=i[r+1];o&&!o.rest&&o.optional&&l&&e.chained&&(n=0),!o&&!l&&Object.keys(a).length===c.length&&(n=0);continue}if(e.optional&&e.chained){n++;continue}return}if(!n)return a}function h(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}const v=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function j(t,s){return"/"+_(t).map(a=>a.replace(v,(i,c,n,r)=>{const e=s[r];if(!e){if(c||n&&e!==void 0)return"";throw new Error(`Missing parameter '${r}' in route ${t}`)}if(e.startsWith("/")||e.endsWith("/"))throw new Error(`Parameter '${r}' in route ${t} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return e})).filter(Boolean).join("/")}const b=globalThis.__sveltekit_kn00vz?.base??"/ui",C=globalThis.__sveltekit_kn00vz?.assets??b;export{C as a,b,k as e,x as p,j as r};

View file

@ -0,0 +1 @@
import{f as l,s as w,a as r,c as h}from"./o8CdT7B0.js";import"./ChJfoPF0.js";import{s as x,c as n,r as f,t as N,f as y}from"./DUMcBckj.js";import{p as m,i as p}from"./i7pKks78.js";import{s as O}from"./By1mMPic.js";var P=l('<div class="absolute top-full left-1/2 transform -translate-x-1/2 border-4 border-transparent border-t-gray-900"></div>'),Q=l('<div class="absolute bottom-full left-1/2 transform -translate-x-1/2 border-4 border-transparent border-b-gray-900"></div>'),R=l('<div class="absolute right-full top-1/2 transform -translate-y-1/2 border-4 border-transparent border-l-gray-900"></div>'),S=l('<div class="absolute left-full top-1/2 transform -translate-y-1/2 border-4 border-transparent border-r-gray-900"></div>'),U=l('<div class="relative group"><svg class="w-3 h-3 text-gray-400 cursor-help" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <div><div class="font-semibold mb-1"> </div> <div class="text-gray-300"> </div> <!></div></div>');function $(k,s){let z=m(s,"title",8),M=m(s,"content",8),t=m(s,"position",8,"top"),T=m(s,"width",8,"w-80");var b=U(),u=x(n(b),2),c=n(u),j=n(c,!0);f(c);var _=x(c,2),B=n(_,!0);f(_);var C=x(_,2);{var q=a=>{var i=P();r(a,i)},A=a=>{var i=h(),D=y(i);{var E=o=>{var v=Q();r(o,v)},F=o=>{var v=h(),G=y(v);{var H=e=>{var d=R();r(e,d)},I=e=>{var d=h(),J=y(d);{var K=g=>{var L=S();r(g,L)};p(J,g=>{t()==="right"&&g(K)},!0)}r(e,d)};p(G,e=>{t()==="left"?e(H):e(I,!1)},!0)}r(o,v)};p(D,o=>{t()==="bottom"?o(E):o(F,!1)},!0)}r(a,i)};p(C,a=>{t()==="top"?a(q):a(A,!1)})}f(u),f(b),N(()=>{O(u,1,`absolute ${t()==="top"?"bottom-full":t()==="bottom"?"top-full":t()==="left"?"right-full top-1/2 -translate-y-1/2":"left-full top-1/2 -translate-y-1/2"} left-1/2 transform -translate-x-1/2 ${t()==="top"?"mb-2":t()==="bottom"?"mt-2":"mx-2"} ${T()??""} p-3 bg-gray-900 text-white text-xs rounded-lg shadow-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50`),w(j,z()),w(B,M())}),r(k,b)}export{$ as T};

View file

@ -1 +0,0 @@
import{J as Y,H as T,I as C,K as F,T as j,U as G,V as H,R as $,W as x,L as q,M as A,N as z,at as J,O as Z,a3 as Q,Q as V,P as W,au as D,m as X,av as k,k as U,G as ee,g as P,aw as re,ax as ne,ay as w,az as se,aA as M,ar as ae,v as ie,aB as te,ac as R,aC as ue,_ as fe,aD as le,u as oe,aE as ce,aF as de,aG as _e,aH as N,aI as L,aJ as pe,aK as ve,ai as B,aL as K,aM as m}from"./BIqNNOMq.js";function Ie(e,r,s=!1){T&&C();var n=e,a=null,i=null,l=J,d=s?F:0,p=!1;const S=(o,u=!0)=>{p=!0,_(u,o)};var f=null;function I(){f!==null&&(f.lastChild.remove(),n.before(f),f=null);var o=l?a:i,u=l?i:a;o&&Q(o),u&&V(u,()=>{l?i=null:a=null})}const _=(o,u)=>{if(l===(l=o))return;let g=!1;if(T){const E=j(n)===G;!!l===E&&(n=H(),$(n),x(!1),g=!0)}var b=Z(),c=n;if(b&&(f=document.createDocumentFragment(),f.append(c=q())),l?a??=u&&A(()=>u(c)):i??=u&&A(()=>u(c)),b){var h=z,t=l?a:i,v=l?i:a;t&&h.skipped_effects.delete(t),v&&h.skipped_effects.add(v),h.add_callback(I)}else I();g&&x(!0)};Y(()=>{p=!1,r(S),p||_(null,null)},d),T&&(n=W)}let O=!1,y=Symbol();function ge(e,r,s){const n=s[r]??={store:null,source:X(void 0),unsubscribe:D};if(n.store!==e&&!(y in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=D;else{var a=!0;n.unsubscribe=k(e,i=>{a?n.source.v=i:U(n.source,i)}),a=!1}return e&&y in s?ee(e):P(n.source)}function Ee(){const e={};function r(){re(()=>{for(var s in e)e[s].unsubscribe();ne(e,y,{enumerable:!1,value:!0})})}return[e,r]}function be(e){var r=O;try{return O=!1,[e(),O]}finally{O=r}}const he={get(e,r){if(!e.exclude.includes(r))return P(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){if(!(r in e.special)){var n=R;try{L(e.parent_effect),e.special[r]=Pe({get[r](){return e.props[r]}},r,M)}finally{L(n)}}return e.special[r](s),N(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),N(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Oe(e,r){return new Proxy({props:e,exclude:r,special:{},version:fe(0),parent_effect:R},he)}const me={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(m(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let a=e.props[n];m(a)&&(a=a());const i=w(a,r);if(i&&i.set)return i.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(m(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const a=w(n,r);return a&&!a.configurable&&(a.configurable=!0),a}}},has(e,r){if(r===B||r===K)return!1;for(let s of e.props)if(m(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(m(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function Te(...e){return new Proxy({props:e},me)}function Pe(e,r,s,n){var a=!ce||(s&de)!==0,i=(s&le)!==0,l=(s&pe)!==0,d=n,p=!0,S=()=>(p&&(p=!1,d=l?oe(n):n),d),f;if(i){var I=B in e||K in e;f=w(e,r)?.set??(I&&r in e?t=>e[r]=t:void 0)}var _,o=!1;i?[_,o]=be(()=>e[r]):_=e[r],_===void 0&&n!==void 0&&(_=S(),f&&(a&&se(),f(_)));var u;if(a?u=()=>{var t=e[r];return t===void 0?S():(p=!0,t)}:u=()=>{var t=e[r];return t!==void 0&&(d=void 0),t===void 0?d:t},a&&(s&M)===0)return u;if(f){var g=e.$$legacy;return function(t,v){return arguments.length>0?((!a||!v||g||o)&&f(v?u():t),t):u()}}var b=!1,c=((s&_e)!==0?ae:ie)(()=>(b=!1,u()));i&&P(c);var h=R;return function(t,v){if(arguments.length>0){const E=v?P(c):a&&i?te(t):t;return U(c,E),b=!0,d!==void 0&&(d=E),t}return ve&&b||(h.f&ue)!==0?c.v:P(c)}}export{ge as a,Te as b,Ie as i,Oe as l,Pe as p,Ee as s};

View file

@ -0,0 +1 @@
import{ac as g,ad as d,ae as l,u as m,af as b,ag as i,g as p,h,ah as v,ai as k}from"./DUMcBckj.js";function x(t=!1){const a=g,e=a.l.u;if(!e)return;let o=()=>h(a.s);if(t){let n=0,s={};const _=v(()=>{let c=!1;const r=a.s;for(const f in r)r[f]!==s[f]&&(s[f]=r[f],c=!0);return c&&n++,n});o=()=>p(_)}e.b.length&&d(()=>{u(a,o),i(e.b)}),l(()=>{const n=m(()=>e.m.map(b));return()=>{for(const s of n)typeof s=="function"&&s()}}),e.a.length&&l(()=>{u(a,o),i(e.a)})}function u(t,a){if(t.l.s)for(const e of t.l.s)p(e);a()}k();export{x as i};

View file

@ -0,0 +1 @@
import{f as j,s as G,e as g,a as S}from"./o8CdT7B0.js";import{i as D}from"./ChJfoPF0.js";import{p as E,v as H,c as t,r,s as u,u as p,h as m,n as f,t as I,a as q}from"./DUMcBckj.js";import{h as y,s as h}from"./By1mMPic.js";import{p as v}from"./i7pKks78.js";import{g as o}from"./BPOuWaSt.js";var z=j('<fieldset><legend class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"> </legend> <div class="grid grid-cols-2 gap-4"><button type="button"><!> <span class="mt-2 text-sm font-medium text-gray-900 dark:text-white">GitHub</span></button> <button type="button"><!> <span class="mt-2 text-sm font-medium text-gray-900 dark:text-white">Gitea</span></button></div></fieldset>');function M(x,s){E(s,!1);const k=H();let i=v(s,"selectedForgeType",12,""),_=v(s,"label",8,"Select Forge Type");function n(c){i(c),k("select",c)}D();var l=z(),d=t(l),F=t(d,!0);r(d);var b=u(d,2),e=t(b),w=t(e);y(w,()=>(m(o),p(()=>o("github","w-8 h-8")))),f(2),r(e);var a=u(e,2),T=t(a);y(T,()=>(m(o),p(()=>o("gitea","w-8 h-8")))),f(2),r(a),r(b),r(l),I(()=>{G(F,_()),h(e,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${i()==="github"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),h(a,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${i()==="gitea"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`)}),g("click",e,()=>n("github")),g("click",a,()=>n("gitea")),S(x,l),q()}export{M as F};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{f as p,a as l,c as T,t as D,s as B}from"./o8CdT7B0.js";import{i as ae}from"./ChJfoPF0.js";import{p as se,v as re,l as V,h as ie,d as r,g as t,m as y,b as le,c as v,s as F,r as f,a as oe,f as N,n as q,t as R,u as ne}from"./DUMcBckj.js";import{p as A,i as m}from"./i7pKks78.js";import{g as h,B as G}from"./By1mMPic.js";import{t as k}from"./Bbk4dQfI.js";import{e as de}from"./BZiHL9L3.js";var ce=p('<div class="flex items-center"><div class="animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600 mr-2"></div> <span class="text-sm text-gray-500 dark:text-gray-400">Checking...</span></div>'),ve=p('<div class="ml-4 text-xs text-gray-500 dark:text-gray-400"> </div>'),fe=p('<div class="flex items-center"><svg class="w-4 h-4 text-green-500 mr-2" fill="currentColor" viewBox="0 0 20 20"><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"></path></svg> <span class="text-sm text-green-700 dark:text-green-300">Webhook installed</span></div> <!>',1),he=p('<div class="flex items-center"><svg class="w-4 h-4 text-gray-400 mr-2" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm0-2a6 6 0 100-12 6 6 0 000 12zm0-10a1 1 0 011 1v3a1 1 0 01-2 0V7a1 1 0 011-1z" clip-rule="evenodd"></path></svg> <span class="text-sm text-gray-500 dark:text-gray-400">No webhook installed</span></div>'),ue=p('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center justify-between"><div><h3 class="text-lg font-medium text-gray-900 dark:text-white">Webhook Status</h3> <div class="mt-1 flex items-center"><!></div></div> <div class="flex space-x-2"><!></div></div></div></div>');function _e(H,g){se(g,!1);const x=y();let u=A(g,"entityType",8),s=A(g,"entityId",8),E=A(g,"entityName",8),i=y(null),o=y(!1),b=y(!0);const O=re();async function _(){if(s())try{r(b,!0),u()==="repository"?r(i,await h.getRepositoryWebhookInfo(s())):r(i,await h.getOrganizationWebhookInfo(s()))}catch(e){e&&typeof e=="object"&&"response"in e&&e.response?.status===404?r(i,null):(console.warn("Failed to check webhook status:",e),r(i,null))}finally{r(b,!1)}}async function J(){if(s())try{r(o,!0),u()==="repository"?await h.installRepositoryWebhook(s()):await h.installOrganizationWebhook(s()),k.success("Webhook Installed",`Webhook for ${u()} ${E()} has been installed successfully.`),await _(),O("webhookStatusChanged",{installed:!0})}catch(e){k.error("Webhook Installation Failed",e instanceof Error?e.message:"Failed to install webhook.")}finally{r(o,!1)}}async function K(){if(s())try{r(o,!0),u()==="repository"?await h.uninstallRepositoryWebhook(s()):await h.uninstallOrganizationWebhook(s()),k.success("Webhook Uninstalled",`Webhook for ${u()} ${E()} has been uninstalled successfully.`),await _(),O("webhookStatusChanged",{installed:!1})}catch(e){k.error("Webhook Uninstall Failed",de(e))}finally{r(o,!1)}}V(()=>ie(s()),()=>{s()&&_()}),V(()=>t(i),()=>{r(x,t(i)&&t(i).active)}),le(),ae();var w=ue(),P=v(w),j=v(P),W=v(j),L=F(v(W),2),Q=v(L);{var X=e=>{var d=ce();l(e,d)},Y=e=>{var d=T(),I=N(d);{var z=a=>{var n=fe(),C=F(N(n),2);{var c=U=>{var $=ve(),te=v($);f($),R(()=>B(te,`URL: ${t(i),ne(()=>t(i).url||"N/A")??""}`)),l(U,$)};m(C,U=>{t(i)&&U(c)})}l(a,n)},S=a=>{var n=he();l(a,n)};m(I,a=>{t(x)?a(z):a(S,!1)},!0)}l(e,d)};m(Q,e=>{t(b)?e(X):e(Y,!1)})}f(L),f(W);var M=F(W,2),Z=v(M);{var ee=e=>{var d=T(),I=N(d);{var z=a=>{G(a,{variant:"danger",size:"sm",get disabled(){return t(o)},$$events:{click:K},children:(n,C)=>{q();var c=D();R(()=>B(c,t(o)?"Uninstalling...":"Uninstall")),l(n,c)},$$slots:{default:!0}})},S=a=>{G(a,{variant:"primary",size:"sm",get disabled(){return t(o)},$$events:{click:J},children:(n,C)=>{q();var c=D();R(()=>B(c,t(o)?"Installing...":"Install Webhook")),l(n,c)},$$slots:{default:!0}})};m(I,a=>{t(x)?a(z):a(S,!1)})}l(e,d)};m(Z,e=>{t(b)||e(ee)})}f(M),f(j),f(P),f(w),l(H,w),oe()}export{_e as W};

View file

@ -0,0 +1 @@
import{f as D,s as P,a as I}from"./o8CdT7B0.js";import{i as w}from"./ChJfoPF0.js";import{p as S,c as s,r as n,s as u,u as l,h as i,t as N,a as A}from"./DUMcBckj.js";import{d as f,c as F}from"./By1mMPic.js";import{p as d}from"./i7pKks78.js";import{D as E,G,A as j}from"./feAEhHKM.js";import{E as L}from"./D8XSG0sn.js";import{S as g}from"./QVHDSiOj.js";var M=D('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center justify-between mb-4"><h2 class="text-lg font-medium text-gray-900 dark:text-white"> </h2> <a class="text-sm text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300">View all instances</a></div> <!></div></div>');function O(y,a){S(a,!1);let e=d(a,"instances",8),h=d(a,"entityType",8),v=d(a,"onDeleteInstance",8);const b=[{key:"name",title:"Name",cellComponent:L,cellProps:{entityType:"instance",nameField:"name"}},{key:"status",title:"Status",cellComponent:g,cellProps:{statusType:"instance",statusField:"status"}},{key:"runner_status",title:"Runner Status",cellComponent:g,cellProps:{statusType:"instance",statusField:"runner_status"}},{key:"created",title:"Created",cellComponent:G,cellProps:{field:"created_at",type:"date"}},{key:"actions",title:"Actions",align:"right",cellComponent:j,cellProps:{actions:[{type:"delete",label:"Delete",title:"Delete instance",ariaLabel:"Delete instance",action:"delete"}]}}],x={entityType:"instance",primaryText:{field:"name",isClickable:!0,href:"/instances/{name}"},secondaryText:{field:"provider_id"},badges:[{type:"status",field:"status"}],actions:[{type:"delete",handler:t=>m(t)}]};function m(t){v()(t)}function C(t){m(t.detail.item)}w();var r=M(),p=s(r),o=s(p),c=s(o),T=s(c);n(c);var _=u(c,2);n(o);var k=u(o,2);E(k,{get columns(){return b},get data(){return e()},loading:!1,error:"",searchTerm:"",showSearch:!1,showPagination:!1,currentPage:1,get perPage(){return i(e()),l(()=>e().length)},totalPages:1,get totalItems(){return i(e()),l(()=>e().length)},itemName:"instances",emptyTitle:"No instances running",get emptyMessage(){return`No instances running for this ${h()??""}.`},emptyIconType:"cog",get mobileCardConfig(){return x},$$events:{delete:C}}),n(p),n(r),N(t=>{P(T,`Instances (${i(e()),l(()=>e().length)??""})`),F(_,"href",t)},[()=>(i(f),l(()=>f("/instances")))]),I(y,r),A()}export{O as I};

View file

@ -0,0 +1 @@
import{f as k,s as m,a as v,t as p}from"./o8CdT7B0.js";import"./ChJfoPF0.js";import{c as a,s as f,r as i,t as g,n as H}from"./DUMcBckj.js";import{p as t,i as u}from"./i7pKks78.js";import{s as Y,h as Z,B as j}from"./By1mMPic.js";var $=k('<div class="flex-shrink-0"><!></div>'),ee=k('<div class="mt-4 sm:mt-0 flex space-x-3"><!> <!></div>'),te=k('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="sm:flex sm:items-center sm:justify-between"><div class="flex items-center space-x-3"><!> <div><h1> </h1> <p class="text-sm text-gray-500 dark:text-gray-400"> </p></div></div> <!></div></div></div>');function se(z,e){let E=t(e,"title",8),M=t(e,"subtitle",8),y=t(e,"forgeIcon",8,""),h=t(e,"onEdit",8,null),x=t(e,"onDelete",8,null),B=t(e,"editLabel",8,"Edit"),C=t(e,"deleteLabel",8,"Delete"),P=t(e,"editVariant",8,"secondary"),A=t(e,"deleteVariant",8,"danger"),q=t(e,"editDisabled",8,!1),F=t(e,"deleteDisabled",8,!1),G=t(e,"editIcon",8,"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'/>"),J=t(e,"deleteIcon",8,"<path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'/>"),K=t(e,"titleClass",8,"");var _=te(),D=a(_),w=a(D),b=a(w),I=a(b);{var N=l=>{var r=$(),c=a(r);Z(c,y),i(r),v(l,r)};u(I,l=>{y()&&l(N)})}var L=f(I,2),o=a(L),O=a(o,!0);i(o);var V=f(o,2),Q=a(V,!0);i(V),i(L),i(b);var R=f(b,2);{var S=l=>{var r=ee(),c=a(r);{var T=d=>{j(d,{get variant(){return P()},size:"md",get disabled(){return q()},get icon(){return G()},$$events:{click(...s){h()?.apply(this,s)}},children:(s,X)=>{H();var n=p();g(()=>m(n,B())),v(s,n)},$$slots:{default:!0}})};u(c,d=>{h()&&d(T)})}var U=f(c,2);{var W=d=>{j(d,{get variant(){return A()},size:"md",get disabled(){return F()},get icon(){return J()},$$events:{click(...s){x()?.apply(this,s)}},children:(s,X)=>{H();var n=p();g(()=>m(n,C())),v(s,n)},$$slots:{default:!0}})};u(U,d=>{x()&&d(W)})}i(r),v(l,r)};u(R,l=>{(h()||x())&&l(S)})}i(w),i(D),i(_),g(()=>{Y(o,1,`text-2xl font-bold text-gray-900 dark:text-white ${K()??""}`),m(O,E()),m(Q,M())}),v(z,_)}export{se as D};

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as T}from"./De-I_rkH.js";import{p as U,E as V,f as g,t as z,b as r,c as W,d as i,r as o,s as k,u as y,e as b,A as B,a as D,q as E,z as X,D as Y}from"./BIqNNOMq.js";import{p as v,i as d}from"./CfI2BFUj.js";import{e as Z,f as H,B as $}from"./CQh-7xkh.js";var tt=g('<div class="mt-4 sm:mt-0 flex items-center space-x-4"><!></div>'),at=g('<div class="mt-4 sm:mt-0 flex items-center space-x-3"><!> <!></div>'),et=g('<div class="sm:flex sm:items-center sm:justify-between"><div><h1 class="text-2xl font-bold text-gray-900 dark:text-white"> </h1> <p class="mt-2 text-sm text-gray-700 dark:text-gray-300"> </p></div> <!></div>');function ct(L,t){const l=Z(t);U(t,!1);const q=V();let M=v(t,"title",8),C=v(t,"description",8),n=v(t,"actionLabel",8,null),m=v(t,"showAction",8,!0);function F(){q("action")}T();var f=et(),_=i(f),x=i(_),G=i(x,!0);o(x);var w=k(x,2),I=i(w,!0);o(w),o(_);var J=k(_,2);{var K=e=>{var s=tt(),h=i(s);H(h,t,"actions",{}),o(s),r(e,s)},N=e=>{var s=B(),h=D(s);{var O=p=>{var u=at(),A=i(u);{var Q=a=>{var c=B(),P=D(c);H(P,t,"secondary-actions",{}),r(a,c)};d(A,a=>{y(()=>l["secondary-actions"])&&a(Q)})}var R=k(A,2);{var S=a=>{$(a,{variant:"primary",icon:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',$$events:{click:F},children:(c,P)=>{X();var j=Y();z(()=>b(j,n())),r(c,j)},$$slots:{default:!0}})};d(R,a=>{m()&&n()&&a(S)})}o(u),r(p,u)};d(h,p=>{E(m()),E(n()),y(()=>m()&&n()||l["secondary-actions"])&&p(O)},!0)}r(e,s)};d(J,e=>{y(()=>l.actions)?e(K):e(N,!1)})}o(f),z(()=>{b(G,M()),b(I,C())}),r(L,f),W()}export{ct as P};

View file

@ -1 +1 @@
import{s as e}from"./BSYpqPvJ.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
import{s as e}from"./Dr-4DxOa.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as y}from"./De-I_rkH.js";import{p,l as u,q as g,h as c,f,t as m,b as w,c as _,k as v,m as h,d as z,r as B,g as j,e as q}from"./BIqNNOMq.js";import{s as V,k as A}from"./CQh-7xkh.js";import{p as t}from"./CfI2BFUj.js";var C=f("<span> </span>");function I(d,e){p(e,!1);const l=h();let a=t(e,"variant",8,"gray"),n=t(e,"size",8,"sm"),i=t(e,"text",8),s=t(e,"ring",8,!1);const o={success:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",error:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",warning:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",info:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",gray:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",blue:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",green:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",red:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",yellow:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",purple:"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200"},b={success:"ring-green-600/20 dark:ring-green-400/30",error:"ring-red-600/20 dark:ring-red-400/30",warning:"ring-yellow-600/20 dark:ring-yellow-400/30",info:"ring-blue-600/20 dark:ring-blue-400/30",gray:"ring-gray-500/20 dark:ring-gray-400/30",blue:"ring-blue-600/20 dark:ring-blue-400/30",green:"ring-green-600/20 dark:ring-green-400/30",red:"ring-red-600/20 dark:ring-red-400/30",yellow:"ring-yellow-600/20 dark:ring-yellow-400/30",secondary:"ring-gray-500/20 dark:ring-gray-400/30",purple:"ring-purple-600/20 dark:ring-purple-400/30"},k={sm:"px-2 py-1 text-xs",md:"px-2.5 py-0.5 text-xs"};u(()=>(g(a()),g(n()),g(s())),()=>{v(l,["inline-flex items-center rounded-full font-semibold",o[a()],k[n()],s()?`ring-1 ring-inset ${b[a()]}`:""].filter(Boolean).join(" "))}),c(),y();var r=C(),x=z(r,!0);B(r),m(()=>{V(r,1,A(j(l))),q(x,i())}),w(d,r),_()}export{I as B};

View file

@ -1 +0,0 @@
import{F as m}from"./BIqNNOMq.js";import{g as s}from"./CQh-7xkh.js";const z=!0,I=z,_=()=>window.location.port==="5173",b={isAuthenticated:!1,user:null,loading:!0,needsInitialization:!1},o=m(b);function f(t,a,e=7){const i=new Date;i.setTime(i.getTime()+e*24*60*60*1e3),document.cookie=`${t}=${a};expires=${i.toUTCString()};path=/;SameSite=Lax`}function d(t){const a=t+"=",e=document.cookie.split(";");for(let i=0;i<e.length;i++){let n=e[i];for(;n.charAt(0)===" ";)n=n.substring(1,n.length);if(n.indexOf(a)===0)return n.substring(a.length,n.length)}return null}function g(t){document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/`}const c={async login(t,a){try{o.update(i=>({...i,loading:!0}));const e=await s.login({username:t,password:a});I&&(f("garm_token",e.token),f("garm_user",t)),s.setToken(e.token),o.set({isAuthenticated:!0,user:t,loading:!1,needsInitialization:!1})}catch(e){throw o.update(i=>({...i,loading:!1})),e}},logout(){g("garm_token"),g("garm_user"),o.set({isAuthenticated:!1,user:null,loading:!1,needsInitialization:!1})},async init(){try{o.update(e=>({...e,loading:!0})),await c.checkInitializationStatus();const t=d("garm_token"),a=d("garm_user");if(t&&a&&(s.setToken(t),await c.checkAuth())){o.set({isAuthenticated:!0,user:a,loading:!1,needsInitialization:!1});return}o.update(e=>({...e,loading:!1,needsInitialization:!1}))}catch{o.update(a=>({...a,loading:!1}))}},async checkInitializationStatus(){try{const t={Accept:"application/json"},a=d("garm_token"),e=_();e&&a&&(t.Authorization=`Bearer ${a}`);const i=await fetch("/api/v1/login",{method:"GET",headers:t,credentials:e?"omit":"include"});if(!i.ok){if(i.status===409&&(await i.json()).error==="init_required")throw o.update(l=>({...l,needsInitialization:!0,loading:!1})),new Error("Initialization required");return}return}catch(t){if(t instanceof Error&&t.message==="Initialization required")throw t;return}},async checkAuth(){try{return await c.checkInitializationStatus(),await s.getControllerInfo(),!0}catch(t){return t instanceof Error&&t.message==="Initialization required"?!1:t?.response?.status===409&&t?.response?.data?.error==="init_required"?(o.update(a=>({...a,needsInitialization:!0,loading:!1})),!1):(c.logout(),!1)}},async initialize(t,a,e,i,n){try{o.update(u=>({...u,loading:!0}));const l=await s.firstRun({username:t,email:a,password:e,full_name:i||t});await c.login(t,e);const r=window.location.origin,h=n?.metadataUrl||`${r}/api/v1/metadata`,p=n?.callbackUrl||`${r}/api/v1/callbacks`,k=n?.webhookUrl||`${r}/webhooks`,w=n?.agentUrl||`${r}/agent`;await s.updateController({metadata_url:h,callback_url:p,webhook_url:k,agent_url:w}),o.update(u=>({...u,needsInitialization:!1}))}catch(l){throw o.update(r=>({...r,loading:!1})),l}}};export{o as a,c as b};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as j}from"./De-I_rkH.js";import{p as E,E as G,f as S,d as t,r,s as g,u,q as p,z as m,t as q,e as z,i as f,b as D,c as H}from"./BIqNNOMq.js";import{h as y,s as h}from"./CQh-7xkh.js";import{p as v}from"./CfI2BFUj.js";import{g as o}from"./B7If18kh.js";var I=S('<fieldset><legend class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"> </legend> <div class="grid grid-cols-2 gap-4"><button type="button"><!> <span class="mt-2 text-sm font-medium text-gray-900 dark:text-white">GitHub</span></button> <button type="button"><!> <span class="mt-2 text-sm font-medium text-gray-900 dark:text-white">Gitea</span></button></div></fieldset>');function M(x,s){E(s,!1);const k=G();let i=v(s,"selectedForgeType",12,""),_=v(s,"label",8,"Select Forge Type");function n(c){i(c),k("select",c)}j();var d=I(),l=t(d),F=t(l,!0);r(l);var b=g(l,2),e=t(b),w=t(e);y(w,()=>(p(o),u(()=>o("github","w-8 h-8")))),m(2),r(e);var a=g(e,2),T=t(a);y(T,()=>(p(o),u(()=>o("gitea","w-8 h-8")))),m(2),r(a),r(b),r(d),q(()=>{z(F,_()),h(e,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${i()==="github"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`),h(a,1,`flex flex-col items-center justify-center p-6 border-2 rounded-lg transition-colors cursor-pointer ${i()==="gitea"?"border-blue-500 bg-blue-50 dark:bg-blue-900":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500"}`)}),f("click",e,()=>n("github")),f("click",a,()=>n("gitea")),D(x,d),H()}export{M as F};

View file

@ -0,0 +1 @@
import{f as k,a as p,s as u}from"./o8CdT7B0.js";import{i as c}from"./ChJfoPF0.js";import{p as f,l as m,h as g,b as w,t as _,a as v,d as h,m as z,c as B,r as j,g as V}from"./DUMcBckj.js";import{s as q,k as A}from"./By1mMPic.js";import{p as a}from"./i7pKks78.js";var C=k("<span> </span>");function I(d,e){f(e,!1);const l=z();let t=a(e,"variant",8,"gray"),n=a(e,"size",8,"sm"),i=a(e,"text",8),s=a(e,"ring",8,!1);const o={success:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",error:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",warning:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",info:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",gray:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",blue:"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200",green:"bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200",red:"bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200",yellow:"bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200",secondary:"bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",purple:"bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200"},b={success:"ring-green-600/20 dark:ring-green-400/30",error:"ring-red-600/20 dark:ring-red-400/30",warning:"ring-yellow-600/20 dark:ring-yellow-400/30",info:"ring-blue-600/20 dark:ring-blue-400/30",gray:"ring-gray-500/20 dark:ring-gray-400/30",blue:"ring-blue-600/20 dark:ring-blue-400/30",green:"ring-green-600/20 dark:ring-green-400/30",red:"ring-red-600/20 dark:ring-red-400/30",yellow:"ring-yellow-600/20 dark:ring-yellow-400/30",secondary:"ring-gray-500/20 dark:ring-gray-400/30",purple:"ring-purple-600/20 dark:ring-purple-400/30"},x={sm:"px-2 py-1 text-xs",md:"px-2.5 py-0.5 text-xs"};m(()=>(g(t()),g(n()),g(s())),()=>{h(l,["inline-flex items-center rounded-full font-semibold",o[t()],x[n()],s()?`ring-1 ring-inset ${b[t()]}`:""].filter(Boolean).join(" "))}),w(),c();var r=C(),y=B(r,!0);j(r),_(()=>{q(r,1,A(V(l))),u(y,i())}),p(d,r),v()}export{I as B};

View file

@ -1 +0,0 @@
import{H as l,I as u,J as m,K as _,L as p,M as h,N as v,O as b,P as g,Q as x}from"./BIqNNOMq.js";function E(s,i,d){l&&u();var r=s,a,n,e=null,t=null;function f(){n&&(x(n),n=null),e&&(e.lastChild.remove(),r.before(e),e=null),n=t,t=null}m(()=>{if(a!==(a=i())){var c=b();if(a){var o=r;c&&(e=document.createDocumentFragment(),e.append(o=p())),t=h(()=>d(o,a))}c?v.add_callback(f):f()}},_),l&&(r=g)}export{E as c};

View file

@ -0,0 +1 @@
import{f as x,a as b,s as j,e as T}from"./o8CdT7B0.js";import{i as Z}from"./ChJfoPF0.js";import{p as ee,o as te,q as ne,l as $,b as re,f as ae,t as L,a as se,s as k,c as i,d as a,m as v,r as l,h as c,u as p,g as r}from"./DUMcBckj.js";import{p as w,i as B}from"./i7pKks78.js";import{c as D,s as oe,d,i as ie}from"./By1mMPic.js";import{b as le}from"./DwF0DbKK.js";var ce=x('<div class="flex-shrink-0"><svg role="img" aria-label="Has description" class="w-4 h-4 text-gray-400 dark:text-gray-500 cursor-help" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div>'),de=x('<div class="text-sm text-gray-500 dark:text-gray-400 truncate"> </div>'),ve=x('<div class="fixed z-50 w-64 pointer-events-none"><div class="bg-gray-900 dark:bg-gray-700 text-white text-xs rounded-md px-3 py-2 shadow-lg"><div class="font-semibold mb-1">Description:</div> <div class="whitespace-pre-wrap break-words max-h-32 overflow-y-auto"> </div></div></div>'),ue=x('<div class="w-full min-w-0 text-sm font-medium"><div class="flex items-center gap-1.5"><a> </a> <!></div> <!></div> <!>',1);function ge(N,u){ee(u,!1);const y=v(),C=v();let t=w(u,"item",8),s=w(u,"entityType",8,"repository"),O=w(u,"showOwner",8,!1),R=w(u,"showId",8,!1),Y=w(u,"fontMono",8,!1),h=v(null),_=v(!1),H=v(0),U=v(0),E=v(!1);function f(){if(r(h)){const e=r(h).getBoundingClientRect();a(H,e.left),window.innerHeight-e.bottom<150?(a(E,!0),a(U,e.top)):(a(E,!1),a(U,e.bottom+4))}}function q(){a(_,!0),f()}function A(){a(_,!1)}te(()=>{window.addEventListener("scroll",f,!0),window.addEventListener("resize",f)}),ne(()=>{window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)});function P(){if(!t())return"Unknown";switch(s()){case"repository":return O()?`${t().owner||"Unknown"}/${t().name||"Unknown"}`:t().name||"Unknown";case"organization":case"enterprise":return t().name||"Unknown";case"pool":return R()?t().id||"Unknown":t().name||"Unknown";case"scaleset":return t().name||"Unknown";case"instance":return t().name||"Unknown";case"template":return t().name||"Unknown";case"object":return t().name||"Unknown";default:return t().name||t().id||"Unknown"}}function X(){if(!t())return"#";let e;switch(s()){case"instance":e=t().name;break;default:e=t().id||t().name;break}if(!e)return"#";switch(s()){case"repository":return d(`/repositories/${e}`);case"organization":return d(`/organizations/${e}`);case"enterprise":return d(`/enterprises/${e}`);case"pool":return d(`/pools/${e}`);case"scaleset":return d(`/scalesets/${e}`);case"instance":return d(`/instances/${encodeURIComponent(e)}`);case"template":return d(`/templates/${e}`);case"object":return d(`/objects/${e}`);default:return"#"}}$(()=>{},()=>{a(y,P())}),$(()=>{},()=>{a(C,X())}),re(),Z();var I=ue(),z=ae(I),M=i(z),m=i(M),F=i(m,!0);l(m);var G=k(m,2);{var J=e=>{var n=ce(),o=i(n);le(o,g=>a(h,g),()=>r(h)),l(n),T("mouseenter",o,q),T("mouseleave",o,A),b(e,n)};B(G,e=>{c(s()),c(t()),p(()=>s()==="object"&&t()?.description)&&e(J)})}l(M);var K=k(M,2);{var Q=e=>{var n=de(),o=i(n,!0);l(n),L(()=>j(o,(c(t()),p(()=>t().provider_id)))),b(e,n)};B(K,e=>{c(s()),c(t()),p(()=>s()==="instance"&&t()?.provider_id)&&e(Q)})}l(z);var S=k(z,2);{var V=e=>{var n=ve(),o=i(n),g=k(i(o),2),W=i(g,!0);l(g),l(o),l(n),L(()=>{ie(n,`left: ${r(H)??""}px; top: ${r(U)??""}px; transform: translateY(${r(E)?"-100%":"0"});`),j(W,(c(t()),p(()=>t().description)))}),b(e,n)};B(S,e=>{c(s()),c(t()),r(_),p(()=>s()==="object"&&t()?.description&&r(_))&&e(V)})}L(()=>{D(m,"href",r(C)),oe(m,1,`truncate text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300 ${Y()?"font-mono":""}`),D(m,"title",r(y)),j(F,r(y))}),b(N,I),se()}export{ge as E};

View file

@ -1 +0,0 @@
import{L as G,J as re,R as X,H as D,S as ne,I as fe,g as Q,v as le,T as ie,U as se,V as W,W as g,P as O,X as ue,Y as te,M as J,O as ve,N as de,Z,m as _e,_ as z,a0 as K,a1 as oe,a2 as V,a3 as $,Q as ce,a4 as Y,a5 as he,a6 as B,a7 as k,a8 as Ee,a9 as me,aa as pe,ab as Te,ac as Ae,ad as y,ae as Ie,af as Ne}from"./BIqNNOMq.js";function Me(i,r){return r}function we(i,r,e){for(var u=i.items,v=[],d=r.length,s=0;s<d;s++)me(r[s].e,v,!0);var h=d>0&&v.length===0&&e!==null;if(h){var T=e.parentNode;pe(T),T.append(e),u.clear(),w(i,r[0].prev,r[d-1].next)}Te(v,()=>{for(var p=0;p<d;p++){var o=r[p];h||(u.delete(o.k),w(i,o.prev,o.next)),k(o.e,!h)}})}function Se(i,r,e,u,v,d=null){var s=i,h={flags:r,items:new Map,first:null},T=(r&y)!==0;if(T){var p=i;s=D?X(ne(p)):p.appendChild(G())}D&&fe();var o=null,C=!1,A=new Map,M=le(()=>{var _=e();return oe(_)?_:_==null?[]:K(_)}),n,t;function l(){xe(t,n,h,A,s,v,r,u,e),d!==null&&(n.length===0?o?$(o):o=J(()=>d(s)):o!==null&&ce(o,()=>{o=null}))}re(()=>{t??=Ae,n=Q(M);var _=n.length;if(C&&_===0)return;C=_===0;let m=!1;if(D){var I=ie(s)===se;I!==(_===0)&&(s=W(),X(s),g(!1),m=!0)}if(D){for(var x=null,c,a=0;a<_;a++){if(O.nodeType===ue&&O.data===te){s=O,m=!0,g(!1);break}var f=n[a],E=u(f,a);c=P(O,h,x,null,f,E,a,v,r,e),h.items.set(E,c),x=c}_>0&&X(W())}if(D)_===0&&d&&(o=J(()=>d(s)));else if(ve()){var H=new Set,b=de;for(a=0;a<_;a+=1){f=n[a],E=u(f,a);var S=h.items.get(E)??A.get(E);S?(r&(Y|V))!==0&&j(S,f,a,r):(c=P(null,h,null,null,f,E,a,v,r,e,!0),A.set(E,c)),H.add(E)}for(const[N,L]of h.items)H.has(N)||b.skipped_effects.add(L.e);b.add_callback(l)}else l();m&&g(!0),Q(M)}),D&&(s=O)}function xe(i,r,e,u,v,d,s,h,T){var p=(s&Ne)!==0,o=(s&(Y|V))!==0,C=r.length,A=e.items,M=e.first,n=M,t,l=null,_,m=[],I=[],x,c,a,f;if(p)for(f=0;f<C;f+=1)x=r[f],c=h(x,f),a=A.get(c),a!==void 0&&(a.a?.measure(),(_??=new Set).add(a));for(f=0;f<C;f+=1){if(x=r[f],c=h(x,f),a=A.get(c),a===void 0){var E=u.get(c);if(E!==void 0){u.delete(c),A.set(c,E);var H=l?l.next:n;w(e,l,E),w(e,E,H),F(E,H,v),l=E}else{var b=n?n.e.nodes_start:v;l=P(b,e,l,l===null?e.first:l.next,x,c,f,d,s,T)}A.set(c,l),m=[],I=[],n=l.next;continue}if(o&&j(a,x,f,s),(a.e.f&B)!==0&&($(a.e),p&&(a.a?.unfix(),(_??=new Set).delete(a))),a!==n){if(t!==void 0&&t.has(a)){if(m.length<I.length){var S=I[0],N;l=S.prev;var L=m[0],q=m[m.length-1];for(N=0;N<m.length;N+=1)F(m[N],S,v);for(N=0;N<I.length;N+=1)t.delete(I[N]);w(e,L.prev,q.next),w(e,l,L),w(e,q,S),n=S,l=q,f-=1,m=[],I=[]}else t.delete(a),F(a,n,v),w(e,a.prev,a.next),w(e,a,l===null?e.first:l.next),w(e,l,a),l=a;continue}for(m=[],I=[];n!==null&&n.k!==c;)(n.e.f&B)===0&&(t??=new Set).add(n),I.push(n),n=n.next;if(n===null)continue;a=n}m.push(a),l=a,n=a.next}if(n!==null||t!==void 0){for(var R=t===void 0?[]:K(t);n!==null;)(n.e.f&B)===0&&R.push(n),n=n.next;var U=R.length;if(U>0){var ee=(s&y)!==0&&C===0?v:null;if(p){for(f=0;f<U;f+=1)R[f].a?.measure();for(f=0;f<U;f+=1)R[f].a?.fix()}we(e,R,ee)}}p&&Ie(()=>{if(_!==void 0)for(a of _)a.a?.apply()}),i.first=e.first&&e.first.e,i.last=l&&l.e;for(var ae of u.values())k(ae.e);u.clear()}function j(i,r,e,u){(u&Y)!==0&&Z(i.v,r),(u&V)!==0?Z(i.i,e):i.i=e}function P(i,r,e,u,v,d,s,h,T,p,o){var C=(T&Y)!==0,A=(T&he)===0,M=C?A?_e(v,!1,!1):z(v):v,n=(T&V)===0?s:z(s),t={i:n,v:M,k:d,a:null,e:null,prev:e,next:u};try{if(i===null){var l=document.createDocumentFragment();l.append(i=G())}return t.e=J(()=>h(i,M,n,p),D),t.e.prev=e&&e.e,t.e.next=u&&u.e,e===null?o||(r.first=t):(e.next=t,e.e.next=t.e),u!==null&&(u.prev=t,u.e.prev=t.e),t}finally{}}function F(i,r,e){for(var u=i.next?i.next.e.nodes_start:e,v=r?r.e.nodes_start:e,d=i.e.nodes_start;d!==null&&d!==u;){var s=Ee(d);v.before(d),d=s}}function w(i,r,e){r===null?i.first=e:(r.next=e,r.e.next=e&&e.e),e!==null&&(e.prev=r,e.e.prev=r&&r.e)}export{Se as e,Me as i};

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as D}from"./De-I_rkH.js";import{p as P,f as I,d as s,r as n,s as u,u as l,q as i,t as w,e as S,b as N,c as A}from"./BIqNNOMq.js";import{d as f,c as F}from"./CQh-7xkh.js";import{p as d}from"./CfI2BFUj.js";import{D as E,G,A as j}from"./BjNB1vhO.js";import{E as q}from"./C6HeU_02.js";import{S as g}from"./DCu5KXBe.js";var L=I('<div class="bg-white dark:bg-gray-800 shadow rounded-lg"><div class="px-4 py-5 sm:p-6"><div class="flex items-center justify-between mb-4"><h2 class="text-lg font-medium text-gray-900 dark:text-white"> </h2> <a class="text-sm text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300">View all instances</a></div> <!></div></div>');function O(y,a){P(a,!1);let e=d(a,"instances",8),h=d(a,"entityType",8),v=d(a,"onDeleteInstance",8);const b=[{key:"name",title:"Name",cellComponent:q,cellProps:{entityType:"instance",nameField:"name"}},{key:"status",title:"Status",cellComponent:g,cellProps:{statusType:"instance",statusField:"status"}},{key:"runner_status",title:"Runner Status",cellComponent:g,cellProps:{statusType:"instance",statusField:"runner_status"}},{key:"created",title:"Created",cellComponent:G,cellProps:{field:"created_at",type:"date"}},{key:"actions",title:"Actions",align:"right",cellComponent:j,cellProps:{actions:[{type:"delete",label:"Delete",title:"Delete instance",ariaLabel:"Delete instance",action:"delete"}]}}],x={entityType:"instance",primaryText:{field:"name",isClickable:!0,href:"/instances/{name}"},secondaryText:{field:"provider_id"},badges:[{type:"status",field:"status"}],actions:[{type:"delete",handler:t=>m(t)}]};function m(t){v()(t)}function C(t){m(t.detail.item)}D();var r=L(),p=s(r),o=s(p),c=s(o),T=s(c);n(c);var _=u(c,2);n(o);var k=u(o,2);E(k,{get columns(){return b},get data(){return e()},loading:!1,error:"",searchTerm:"",showSearch:!1,showPagination:!1,currentPage:1,get perPage(){return i(e()),l(()=>e().length)},totalPages:1,get totalItems(){return i(e()),l(()=>e().length)},itemName:"instances",emptyTitle:"No instances running",get emptyMessage(){return`No instances running for this ${h()??""}.`},emptyIconType:"cog",get mobileCardConfig(){return x},$$events:{delete:C}}),n(p),n(r),w(t=>{S(T,`Instances (${i(e()),l(()=>e().length)??""})`),F(_,"href",t)},[()=>(i(f),l(()=>f("/instances")))]),N(y,r),A()}export{O as I};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{B as W,A as re,I as F,y as S,J as ne,z as fe,g as J,i as ie,K as le,L as se,M as K,N as U,G as O,O as ue,P as te,C as z,F as ve,D as de,Q as P,m as _e,R as Q,S as Z,T as oe,U as V,V as $,H as ce,W as Y,X as he,Y as X,Z as y,_ as Ee,a0 as me,a1 as pe,a2 as Te,a3 as Ae,a4 as k,a5 as Ie,a6 as Ce}from"./DUMcBckj.js";function Me(l,r){return r}function Ne(l,r,e){for(var u=l.items,v=[],d=r.length,s=0;s<d;s++)me(r[s].e,v,!0);var h=d>0&&v.length===0&&e!==null;if(h){var T=e.parentNode;pe(T),T.append(e),u.clear(),N(l,r[0].prev,r[d-1].next)}Te(v,()=>{for(var p=0;p<d;p++){var o=r[p];h||(u.delete(o.k),N(l,o.prev,o.next)),y(o.e,!h)}})}function De(l,r,e,u,v,d=null){var s=l,h={flags:r,items:new Map,first:null},T=(r&k)!==0;if(T){var p=l;s=S?F(ne(p)):p.appendChild(W())}S&&fe();var o=null,x=!1,A=new Map,M=ie(()=>{var _=e();return oe(_)?_:_==null?[]:Z(_)}),n,t;function i(){we(t,n,h,A,s,v,r,u,e),d!==null&&(n.length===0?o?$(o):o=z(()=>d(s)):o!==null&&ce(o,()=>{o=null}))}re(()=>{t??=Ae,n=J(M);var _=n.length;if(x&&_===0)return;x=_===0;let m=!1;if(S){var I=le(s)===se;I!==(_===0)&&(s=K(),F(s),U(!1),m=!0)}if(S){for(var w=null,c,a=0;a<_;a++){if(O.nodeType===ue&&O.data===te){s=O,m=!0,U(!1);break}var f=n[a],E=u(f,a);c=G(O,h,w,null,f,E,a,v,r,e),h.items.set(E,c),w=c}_>0&&F(K())}if(S)_===0&&d&&(o=z(()=>d(s)));else if(ve()){var H=new Set,L=de;for(a=0;a<_;a+=1){f=n[a],E=u(f,a);var D=h.items.get(E)??A.get(E);D?(r&(Y|V))!==0&&j(D,f,a,r):(c=G(null,h,null,null,f,E,a,v,r,e,!0),A.set(E,c)),H.add(E)}for(const[C,b]of h.items)H.has(C)||L.skipped_effects.add(b.e);L.add_callback(i)}else i();m&&U(!0),J(M)}),S&&(s=O)}function we(l,r,e,u,v,d,s,h,T){var p=(s&Ce)!==0,o=(s&(Y|V))!==0,x=r.length,A=e.items,M=e.first,n=M,t,i=null,_,m=[],I=[],w,c,a,f;if(p)for(f=0;f<x;f+=1)w=r[f],c=h(w,f),a=A.get(c),a!==void 0&&(a.a?.measure(),(_??=new Set).add(a));for(f=0;f<x;f+=1){if(w=r[f],c=h(w,f),a=A.get(c),a===void 0){var E=u.get(c);if(E!==void 0){u.delete(c),A.set(c,E);var H=i?i.next:n;N(e,i,E),N(e,E,H),g(E,H,v),i=E}else{var L=n?n.e.nodes_start:v;i=G(L,e,i,i===null?e.first:i.next,w,c,f,d,s,T)}A.set(c,i),m=[],I=[],n=i.next;continue}if(o&&j(a,w,f,s),(a.e.f&X)!==0&&($(a.e),p&&(a.a?.unfix(),(_??=new Set).delete(a))),a!==n){if(t!==void 0&&t.has(a)){if(m.length<I.length){var D=I[0],C;i=D.prev;var b=m[0],q=m[m.length-1];for(C=0;C<m.length;C+=1)g(m[C],D,v);for(C=0;C<I.length;C+=1)t.delete(I[C]);N(e,b.prev,q.next),N(e,i,b),N(e,q,D),n=D,i=q,f-=1,m=[],I=[]}else t.delete(a),g(a,n,v),N(e,a.prev,a.next),N(e,a,i===null?e.first:i.next),N(e,i,a),i=a;continue}for(m=[],I=[];n!==null&&n.k!==c;)(n.e.f&X)===0&&(t??=new Set).add(n),I.push(n),n=n.next;if(n===null)continue;a=n}m.push(a),i=a,n=a.next}if(n!==null||t!==void 0){for(var R=t===void 0?[]:Z(t);n!==null;)(n.e.f&X)===0&&R.push(n),n=n.next;var B=R.length;if(B>0){var ee=(s&k)!==0&&x===0?v:null;if(p){for(f=0;f<B;f+=1)R[f].a?.measure();for(f=0;f<B;f+=1)R[f].a?.fix()}Ne(e,R,ee)}}p&&Ie(()=>{if(_!==void 0)for(a of _)a.a?.apply()}),l.first=e.first&&e.first.e,l.last=i&&i.e;for(var ae of u.values())y(ae.e);u.clear()}function j(l,r,e,u){(u&Y)!==0&&P(l.v,r),(u&V)!==0?P(l.i,e):l.i=e}function G(l,r,e,u,v,d,s,h,T,p,o){var x=(T&Y)!==0,A=(T&he)===0,M=x?A?_e(v,!1,!1):Q(v):v,n=(T&V)===0?s:Q(s),t={i:n,v:M,k:d,a:null,e:null,prev:e,next:u};try{if(l===null){var i=document.createDocumentFragment();i.append(l=W())}return t.e=z(()=>h(l,M,n,p),S),t.e.prev=e&&e.e,t.e.next=u&&u.e,e===null?o||(r.first=t):(e.next=t,e.e.next=t.e),u!==null&&(u.prev=t,u.e.prev=t.e),t}finally{}}function g(l,r,e){for(var u=l.next?l.next.e.nodes_start:e,v=r?r.e.nodes_start:e,d=l.e.nodes_start;d!==null&&d!==u;){var s=Ee(d);v.before(d),d=s}}function N(l,r,e){r===null?l.first=e:(r.next=e,r.e.next=e&&e.e),e!==null&&(e.prev=r,e.e.prev=r&&r.e)}export{De as e,Me as i};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as S}from"./De-I_rkH.js";import{p as C,l as w,q as n,g as t,m as y,h as L,A,a as B,b as V,c as E,k as _,u as f}from"./BIqNNOMq.js";import{k as F}from"./BjNB1vhO.js";import{p as g}from"./CfI2BFUj.js";import{B as G}from"./CwE4al8R.js";import{k as x}from"./B7If18kh.js";import{f as q}from"./ow_oMtSd.js";function J(v,u){C(u,!1);const s=y(),c=y();let e=g(u,"item",8),k=g(u,"statusType",8,"entity"),r=g(u,"statusField",8,"status");w(()=>(n(e()),n(r())),()=>{_(s,e()?.[r()]||"unknown")}),w(()=>(n(e()),n(k()),t(s),n(r())),()=>{_(c,(()=>{if(!e())return{variant:"error",text:"Unknown"};switch(k()){case"entity":return x(e());case"instance":let a="secondary";switch(t(s).toLowerCase()){case"running":a="success";break;case"stopped":a="info";break;case"creating":case"pending_create":a="warning";break;case"deleting":case"pending_delete":case"pending_force_delete":a="warning";break;case"error":case"deleted":a="error";break;case"active":case"online":a="success";break;case"idle":a="info";break;case"pending":case"installing":a="warning";break;case"failed":case"terminated":case"offline":a="error";break;case"unknown":default:a="secondary";break}return{variant:a,text:q(t(s))};case"enabled":return{variant:e().enabled?"success":"error",text:e().enabled?"Enabled":"Disabled"};case"os_type":const T=(t(s)||"").toLowerCase();let i="secondary",o=t(s)||"Unknown";switch(T){case"linux":i="success",o="Linux";break;case"windows":i="blue",o="Windows";break;case"macos":case"darwin":i="purple",o="macOS";break;default:i="gray",o=t(s)||"Unknown";break}return{variant:i,text:o};case"forge_type":const U=(t(s)||"").toLowerCase();let l="secondary",d=t(s)||"Unknown";switch(U){case"github":l="gray",d="GitHub";break;case"gitea":l="green",d="Gitea";break;default:l="secondary",d=t(s)||"Unknown";break}return{variant:l,text:d};case"custom":const p=e()[r()]||"Unknown";if(r()==="auth-type"){const b=p==="pat"||!p?"pat":"app";return{variant:b==="pat"?"success":"info",text:b==="pat"?"PAT":"App"}}return{variant:"info",text:p};default:return x(e())}})())}),L(),S();var m=A(),h=B(m);F(h,()=>(n(e()),n(r()),f(()=>`${e()?.name||"item"}-${e()?.[r()]||"status"}-${e()?.updated_at||"time"}`)),a=>{G(a,{get variant(){return t(c),f(()=>t(c).variant)},get text(){return t(c),f(()=>t(c).text)}})}),V(v,m),E()}export{J as S};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as _}from"./De-I_rkH.js";import{p as h,f as x,t as u,b as g,c as k,s as w,d as o,u as d,q as e,r,e as y}from"./BIqNNOMq.js";import{h as b}from"./CQh-7xkh.js";import{p as m}from"./CfI2BFUj.js";import{g as l}from"./B7If18kh.js";var z=x('<div class="flex items-center"><div class="flex-shrink-0 mr-2"><!></div> <div class="text-sm text-gray-900 dark:text-white"> </div></div>');function U(v,i){h(i,!1);let t=m(i,"item",8),s=m(i,"iconSize",8,"w-5 h-5");_();var a=z(),n=o(a),f=o(n);b(f,()=>(e(l),e(t()),e(s()),d(()=>l(t()?.endpoint?.endpoint_type||t()?.endpoint_type||"unknown",s())))),r(n);var p=w(n,2),c=o(p,!0);r(p),r(a),u(()=>y(c,(e(t()),d(()=>t()?.endpoint?.name||t()?.endpoint_name||t()?.endpoint_type||"Unknown")))),g(v,a),k()}export{U as E};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as _}from"./De-I_rkH.js";import{p as k,f as E,t as C,u as i,q as t,e as f,b as P,c as j,s as q,d as l,r as o}from"./BIqNNOMq.js";import{c as z}from"./CQh-7xkh.js";import{p as n}from"./CfI2BFUj.js";import{j as x,e as c,i as u}from"./B7If18kh.js";var N=E('<div class="flex flex-col"><a class="text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300"> </a> <span class="text-xs text-gray-500 dark:text-gray-400 capitalize"> </span></div>');function F(d,r){k(r,!1);let e=n(r,"item",8),m=n(r,"eagerCache",8,null);_();var s=N(),a=l(s),v=l(a,!0);o(a);var p=q(a,2),g=l(p,!0);o(p),o(s),C((h,b,y)=>{z(a,"href",h),f(v,b),f(g,y)},[()=>(t(x),t(e()),i(()=>x(e()))),()=>(t(c),t(e()),t(m()),i(()=>c(e(),m()))),()=>(t(u),t(e()),i(()=>u(e())))]),P(d,s),j()}export{F as P};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{f as b,s as f,a as k}from"./o8CdT7B0.js";import{i as E}from"./ChJfoPF0.js";import{p as C,t as P,u as i,h as t,a as j,s as z,c as l,r as o}from"./DUMcBckj.js";import{c as N}from"./By1mMPic.js";import{p as n}from"./i7pKks78.js";import{j as x,e as c,i as u}from"./BPOuWaSt.js";var T=b('<div class="flex flex-col"><a class="text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300"> </a> <span class="text-xs text-gray-500 dark:text-gray-400 capitalize"> </span></div>');function F(d,r){C(r,!1);let e=n(r,"item",8),m=n(r,"eagerCache",8,null);E();var s=T(),a=l(s),v=l(a,!0);o(a);var p=z(a,2),h=l(p,!0);o(p),o(s),P((g,y,_)=>{N(a,"href",g),f(v,y),f(h,_)},[()=>(t(x),t(e()),i(()=>x(e()))),()=>(t(c),t(e()),t(m()),i(()=>c(e(),m()))),()=>(t(u),t(e()),i(()=>u(e())))]),k(d,s),j()}export{F as P};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
import{F as C}from"./BIqNNOMq.js";function x(){const{subscribe:E,set:L,update:s}=C({connected:!1,connecting:!1,error:null,lastEvent:null});let e=null,b=0,W=50,k=1e3,f=1e3,m=3e4,d=null,r=[],i=!1;const l=new Map;function N(){const t=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.host;return`${t}//${n}/api/v1/ws/events`}function u(){if(!(e&&(e.readyState===WebSocket.CONNECTING||e.readyState===WebSocket.OPEN))){i=!1,s(t=>({...t,connecting:!0,error:null}));try{const t=N();e=new WebSocket(t);const n=setTimeout(()=>{e&&e.readyState===WebSocket.CONNECTING&&e.close()},1e4);e.onopen=()=>{clearTimeout(n),b=0,f=k,s(a=>({...a,connected:!0,connecting:!1,error:null})),r.length>0&&g(r)},e.onmessage=a=>{try{const c=JSON.parse(a.data);s(o=>({...o,lastEvent:c})),(l.get(c["entity-type"])||[]).forEach(o=>{try{o(c)}catch(w){console.error("[WebSocket] Error in event callback:",w)}})}catch(c){console.error("[WebSocket] Error parsing message:",c)}},e.onclose=a=>{clearTimeout(n);const c=a.code===1e3&&i,S=a.code!==1e3?`Connection closed: ${a.reason||"Unknown reason"}`:null;s(o=>({...o,connected:!1,connecting:!1,error:S})),c||h()},e.onerror=a=>{clearTimeout(n),s(c=>({...c,connected:!1,connecting:!1,error:"WebSocket connection error"})),i||h()}}catch(t){s(n=>({...n,connected:!1,connecting:!1,error:t instanceof Error?t.message:"Failed to connect"}))}}}function M(){}function F(){}function h(){if(i)return;d&&clearTimeout(d),b++,b>W&&(b=1,f=k);const t=Math.min(f,m);d=window.setTimeout(()=>{if(!i){u();const n=Math.random()*1e3;f=Math.min(f*1.5+n,m)}},t)}function g(t){if(e&&e.readyState===WebSocket.OPEN){const n={"send-everything":!1,filters:t};e.send(JSON.stringify(n)),r=[...t]}}function y(){i=!0,d&&(clearTimeout(d),d=null),e&&(e.close(1e3,"Manual disconnect"),e=null),l.clear(),r=[],s(t=>({...t,connected:!1,connecting:!1,error:null,lastEvent:null}))}function O(){navigator.onLine&&!i&&setTimeout(()=>{(!e||e.readyState===WebSocket.CLOSED||e.readyState===WebSocket.CLOSING)&&(b=0,f=k,u())},2e3)}typeof window<"u"&&(window.addEventListener("online",O),window.addEventListener("offline",()=>{s(t=>({...t,error:"Network offline"}))}),setInterval(()=>{i||(!e||e.readyState===WebSocket.CLOSED||e.readyState===WebSocket.CLOSING)&&u()},1e4));function v(t,n,a){l.has(t)||l.set(t,[]),l.get(t).push(a);const c=r.findIndex(o=>o["entity-type"]===t),S={"entity-type":t,operations:n};if(c>=0){const o=r[c].operations;S.operations=Array.from(new Set([...o,...n])),r[c]=S}else r.push(S);return e&&e.readyState===WebSocket.OPEN&&g(r),(!e||e.readyState===WebSocket.CLOSED||e.readyState===WebSocket.CLOSING)&&u(),()=>{const o=l.get(t);if(o){const w=o.indexOf(a);if(w>-1&&o.splice(w,1),o.length===0){l.delete(t);const p=r.findIndex(I=>I["entity-type"]===t);p>-1&&(r.splice(p,1),e&&e.readyState===WebSocket.OPEN&&g(r))}}}}return typeof window<"u"&&u(),{subscribe:E,connect:u,disconnect:y,subscribeToEntity:v}}const D=x();export{D as w};
import{w as C}from"./DUMcBckj.js";function x(){const{subscribe:E,set:L,update:s}=C({connected:!1,connecting:!1,error:null,lastEvent:null});let e=null,w=0,W=50,k=1e3,f=1e3,m=3e4,d=null,r=[],i=!1;const l=new Map;function N(){const t=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.host;return`${t}//${n}/api/v1/ws/events`}function u(){if(!(e&&(e.readyState===WebSocket.CONNECTING||e.readyState===WebSocket.OPEN))){i=!1,s(t=>({...t,connecting:!0,error:null}));try{const t=N();e=new WebSocket(t);const n=setTimeout(()=>{e&&e.readyState===WebSocket.CONNECTING&&e.close()},1e4);e.onopen=()=>{clearTimeout(n),w=0,f=k,s(a=>({...a,connected:!0,connecting:!1,error:null})),r.length>0&&g(r)},e.onmessage=a=>{try{const c=JSON.parse(a.data);s(o=>({...o,lastEvent:c})),(l.get(c["entity-type"])||[]).forEach(o=>{try{o(c)}catch(b){console.error("[WebSocket] Error in event callback:",b)}})}catch(c){console.error("[WebSocket] Error parsing message:",c)}},e.onclose=a=>{clearTimeout(n);const c=a.code===1e3&&i,S=a.code!==1e3?`Connection closed: ${a.reason||"Unknown reason"}`:null;s(o=>({...o,connected:!1,connecting:!1,error:S})),c||h()},e.onerror=a=>{clearTimeout(n),s(c=>({...c,connected:!1,connecting:!1,error:"WebSocket connection error"})),i||h()}}catch(t){s(n=>({...n,connected:!1,connecting:!1,error:t instanceof Error?t.message:"Failed to connect"}))}}}function M(){}function T(){}function h(){if(i)return;d&&clearTimeout(d),w++,w>W&&(w=1,f=k);const t=Math.min(f,m);d=window.setTimeout(()=>{if(!i){u();const n=Math.random()*1e3;f=Math.min(f*1.5+n,m)}},t)}function g(t){if(e&&e.readyState===WebSocket.OPEN){const n={"send-everything":!1,filters:t};e.send(JSON.stringify(n)),r=[...t]}}function y(){i=!0,d&&(clearTimeout(d),d=null),e&&(e.close(1e3,"Manual disconnect"),e=null),l.clear(),r=[],s(t=>({...t,connected:!1,connecting:!1,error:null,lastEvent:null}))}function O(){navigator.onLine&&!i&&setTimeout(()=>{(!e||e.readyState===WebSocket.CLOSED||e.readyState===WebSocket.CLOSING)&&(w=0,f=k,u())},2e3)}typeof window<"u"&&(window.addEventListener("online",O),window.addEventListener("offline",()=>{s(t=>({...t,error:"Network offline"}))}),setInterval(()=>{i||(!e||e.readyState===WebSocket.CLOSED||e.readyState===WebSocket.CLOSING)&&u()},1e4));function v(t,n,a){l.has(t)||l.set(t,[]),l.get(t).push(a);const c=r.findIndex(o=>o["entity-type"]===t),S={"entity-type":t,operations:n};if(c>=0){const o=r[c].operations;S.operations=Array.from(new Set([...o,...n])),r[c]=S}else r.push(S);return e&&e.readyState===WebSocket.OPEN&&g(r),(!e||e.readyState===WebSocket.CLOSED||e.readyState===WebSocket.CLOSING)&&u(),()=>{const o=l.get(t);if(o){const b=o.indexOf(a);if(b>-1&&o.splice(b,1),o.length===0){l.delete(t);const p=r.findIndex(I=>I["entity-type"]===t);p>-1&&(r.splice(p,1),e&&e.readyState===WebSocket.OPEN&&g(r))}}}}return typeof window<"u"&&u(),{subscribe:E,connect:u,disconnect:y,subscribeToEntity:v}}const F=x();export{F as w};

View file

@ -0,0 +1 @@
import{f as b,a as m,s as F}from"./o8CdT7B0.js";import{i as B}from"./ChJfoPF0.js";import{p as G,l,d as u,m as c,h as d,g as t,b as L,c as g,i as T,s as q,r as _,a as D,u as H,t as N}from"./DUMcBckj.js";import{p as v,i as V}from"./i7pKks78.js";import{c as j}from"./By1mMPic.js";import{B as z}from"./D3LjnYSP.js";var A=b('<a target="_blank" rel="noopener noreferrer" class="text-sm text-blue-600 dark:text-blue-400 hover:text-blue-500 dark:hover:text-blue-300"> </a>'),E=b('<div class="flex items-center space-x-2"><!> <!></div>');function Q(h,n){G(n,!1);const a=c(),r=c(),f=c();let s=v(n,"item",8),x=v(n,"showUrl",8,!0);function w(e){switch(e?.toLowerCase()){case"github":return"gray";case"gitea":return"green";default:return"secondary"}}function k(e){switch(e?.toLowerCase()){case"github":return"GitHub";case"gitea":return"Gitea";default:return e||"Unknown"}}l(()=>d(s()),()=>{u(a,s()?.endpoint?.endpoint_type||"Unknown")}),l(()=>d(s()),()=>{u(r,s()?.endpoint?.base_url)}),l(()=>t(a),()=>{u(f,w(t(a)))}),L(),B();var i=E(),p=g(i);{let e=T(()=>(t(a),H(()=>k(t(a)))));z(p,{get variant(){return t(f)},get text(){return t(e)}})}var y=q(p,2);{var U=e=>{var o=A(),C=g(o,!0);_(o),N(()=>{j(o,"href",t(r)),F(C,t(r))}),m(e,o)};V(y,e=>{x()&&t(r)&&e(U)})}_(i),m(h,i),D()}export{Q as F};

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as J}from"./De-I_rkH.js";import{p as K,E as O,f as j,d as e,r as t,s as i,z as $,D,b as n,t as h,e as v,g as Q,v as R,c as S}from"./BIqNNOMq.js";import{p as l,i as T}from"./CfI2BFUj.js";import{B as L,s as M}from"./CQh-7xkh.js";import{M as U}from"./BFX8vI-4.js";var V=j('<p class="mt-1 font-medium text-gray-900 dark:text-white"> </p>'),W=j('<div class="max-w-xl w-full p-6"><div><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"></path></svg></div> <div class="text-center"><h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white mb-2"> </h3> <div class="text-sm text-gray-500 dark:text-gray-400"><p> </p> <!></div></div> <div class="mt-6 flex justify-end space-x-3"><!> <!></div></div>');function se(B,a){K(a,!1);let C=l(a,"title",8),P=l(a,"message",8),_=l(a,"itemName",8,""),c=l(a,"loading",8,!1),z=l(a,"confirmLabel",8,"Delete"),m=l(a,"danger",8,!0);const f=O();function E(){f("confirm")}J(),U(B,{$$events:{close:()=>f("close")},children:(N,X)=>{var u=W(),d=e(u),q=e(d);t(d);var x=i(d,2),g=e(x),A=e(g,!0);t(g);var k=i(g,2),p=e(k),F=e(p,!0);t(p);var G=i(p,2);{var H=r=>{var s=V(),o=e(s,!0);t(s),h(()=>v(o,_())),n(r,s)};T(G,r=>{_()&&r(H)})}t(k),t(x);var b=i(x,2),w=e(b);L(w,{variant:"secondary",get disabled(){return c()},$$events:{click:()=>f("close")},children:(r,s)=>{$();var o=D("Cancel");n(r,o)},$$slots:{default:!0}});var I=i(w,2);{let r=R(()=>m()?"danger":"primary");L(I,{get variant(){return Q(r)},get disabled(){return c()},get loading(){return c()},$$events:{click:E},children:(s,o)=>{$();var y=D();h(()=>v(y,z())),n(s,y)},$$slots:{default:!0}})}t(b),t(u),h(()=>{M(d,1,`mx-auto flex items-center justify-center h-12 w-12 rounded-full ${m()?"bg-red-100 dark:bg-red-900":"bg-yellow-100 dark:bg-yellow-900"} mb-4`),M(q,0,`h-6 w-6 ${m()?"text-red-600 dark:text-red-400":"text-yellow-600 dark:text-yellow-400"}`),v(A,C()),v(F,P())}),n(N,u)},$$slots:{default:!0}}),S()}export{se as D};

View file

@ -1 +0,0 @@
import"./DsnmJJEf.js";import{i as D}from"./De-I_rkH.js";import{p as E,E as B,l as t,q as s,g as e,m as o,h as P,f as S,t as T,i as q,b as F,c as G,u as I,d as _,k as a,r as z}from"./BIqNNOMq.js";import{j as J,h as K,s as N,k as O}from"./CQh-7xkh.js";import{l as j,p as l}from"./CfI2BFUj.js";var Q=S('<button><svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><!></svg></button>');function Z(M,i){const C=j(i,["children","$$slots","$$events","$$legacy"]),H=j(C,["action","disabled","title","ariaLabel","size"]);E(i,!1);const u=o(),h=o(),k=o(),p=o(),f=o(),v=o(),n=o(),m=o(),x=o(),L=B();let r=l(i,"action",8,"edit"),b=l(i,"disabled",8,!1),w=l(i,"title",8,""),y=l(i,"ariaLabel",8,""),c=l(i,"size",8,"md");function A(){b()||L("click")}t(()=>{},()=>{a(u,"transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 dark:focus:ring-offset-gray-900 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50")}),t(()=>s(c()),()=>{a(h,{sm:"p-1",md:"p-2"}[c()])}),t(()=>s(r()),()=>{a(k,{edit:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 focus:ring-indigo-500",delete:"text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300 focus:ring-red-500",view:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-300 focus:ring-gray-500",add:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500",copy:"text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 focus:ring-blue-500",download:"text-blue-600 dark:text-blue-400 hover:text-blue-900 dark:hover:text-blue-300 focus:ring-blue-500",shell:"text-green-600 dark:text-green-400 hover:text-green-900 dark:hover:text-green-300 focus:ring-green-500"}[r()])}),t(()=>s(c()),()=>{a(p,c()==="sm"?"h-4 w-4":"h-5 w-5")}),t(()=>(e(u),e(h),e(k)),()=>{a(f,[e(u),e(h),e(k)].join(" "))}),t(()=>{},()=>{a(v,{edit:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />',delete:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />',view:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />',add:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />',copy:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />',download:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />',shell:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2z" />'})}),t(()=>{},()=>{a(n,{edit:"Edit",delete:"Delete",view:"View",add:"Add",copy:"Clone",download:"Download",shell:"Shell"})}),t(()=>(s(w()),e(n),s(r())),()=>{a(m,w()||e(n)[r()])}),t(()=>(s(y()),e(n),s(r())),()=>{a(x,y()||`${e(n)[r()]} item`)}),P(),D();var d=Q();J(d,()=>({type:"button",class:e(f),disabled:b(),title:e(m),"aria-label":e(x),...H}));var g=_(d),V=_(g);K(V,()=>(e(v),s(r()),I(()=>e(v)[r()])),!0),z(g),z(d),T(()=>N(g,0,O(e(p)))),q("click",d,A),F(M,d),G()}export{Z as A};

View file

@ -1 +0,0 @@
import{am as g,an as d,ao as c,u as m,ap as b,aq as i,g as p,q as v,ar as h,as as k}from"./BIqNNOMq.js";function q(n=!1){const s=g,e=s.l.u;if(!e)return;let f=()=>v(s.s);if(n){let t=0,a={};const _=h(()=>{let l=!1;const r=s.s;for(const o in r)r[o]!==a[o]&&(a[o]=r[o],l=!0);return l&&t++,t});f=()=>p(_)}e.b.length&&d(()=>{u(s,f),i(e.b)}),c(()=>{const t=m(()=>e.m.map(b));return()=>{for(const a of t)typeof a=="function"&&a()}}),e.a.length&&c(()=>{u(s,f),i(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}k();export{q as i};

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");

View file

@ -1 +1 @@
import{ag as h,ah as t,u as b,ae as k,ai as S}from"./BIqNNOMq.js";function u(r,a){return r===a||r?.[S]===a}function d(r={},a,f,T){return h(()=>{var i,s;return t(()=>{i=s,s=[],b(()=>{r!==f(...s)&&(a(r,...s),i&&u(f(...i),r)&&a(null,...i))})}),()=>{k(()=>{s&&u(f(...s),r)&&a(null,...s)})}}),r}export{d as b};
import{a7 as t,a8 as b,u as h,a5 as k,a9 as S}from"./DUMcBckj.js";function u(r,a){return r===a||r?.[S]===a}function d(r={},a,f,T){return t(()=>{var i,s;return b(()=>{i=s,s=[],h(()=>{r!==f(...s)&&(a(r,...s),i&&u(f(...i),r)&&a(null,...i))})}),()=>{k(()=>{s&&u(f(...s),r)&&a(null,...s)})}}),r}export{d as b};

View file

@ -0,0 +1 @@
import{w as m}from"./DUMcBckj.js";import{g as s}from"./By1mMPic.js";const z=!0,I=()=>window.location.port==="5173",_={isAuthenticated:!1,user:null,loading:!0,needsInitialization:!1},o=m(_);function f(t,a,e=7){const i=new Date;i.setTime(i.getTime()+e*24*60*60*1e3),document.cookie=`${t}=${a};expires=${i.toUTCString()};path=/;SameSite=Lax`}function d(t){const a=t+"=",e=document.cookie.split(";");for(let i=0;i<e.length;i++){let n=e[i];for(;n.charAt(0)===" ";)n=n.substring(1,n.length);if(n.indexOf(a)===0)return n.substring(a.length,n.length)}return null}function g(t){document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/`}const c={async login(t,a){try{o.update(i=>({...i,loading:!0}));const e=await s.login({username:t,password:a});z&&(f("garm_token",e.token),f("garm_user",t)),s.setToken(e.token),o.set({isAuthenticated:!0,user:t,loading:!1,needsInitialization:!1})}catch(e){throw o.update(i=>({...i,loading:!1})),e}},logout(){g("garm_token"),g("garm_user"),o.set({isAuthenticated:!1,user:null,loading:!1,needsInitialization:!1})},async init(){try{o.update(e=>({...e,loading:!0})),await c.checkInitializationStatus();const t=d("garm_token"),a=d("garm_user");if(t&&a&&(s.setToken(t),await c.checkAuth())){o.set({isAuthenticated:!0,user:a,loading:!1,needsInitialization:!1});return}o.update(e=>({...e,loading:!1,needsInitialization:!1}))}catch{o.update(a=>({...a,loading:!1}))}},async checkInitializationStatus(){try{const t={Accept:"application/json"},a=d("garm_token"),e=I();e&&a&&(t.Authorization=`Bearer ${a}`);const i=await fetch("/api/v1/login",{method:"GET",headers:t,credentials:e?"omit":"include"});if(!i.ok){if(i.status===409&&(await i.json()).error==="init_required")throw o.update(l=>({...l,needsInitialization:!0,loading:!1})),new Error("Initialization required");return}return}catch(t){if(t instanceof Error&&t.message==="Initialization required")throw t;return}},async checkAuth(){try{return await c.checkInitializationStatus(),await s.getControllerInfo(),!0}catch(t){return t instanceof Error&&t.message==="Initialization required"?!1:t?.response?.status===409&&t?.response?.data?.error==="init_required"?(o.update(a=>({...a,needsInitialization:!0,loading:!1})),!1):(c.logout(),!1)}},async initialize(t,a,e,i,n){try{o.update(u=>({...u,loading:!0}));const l=await s.firstRun({username:t,email:a,password:e,full_name:i||t});await c.login(t,e);const r=window.location.origin,h=n?.metadataUrl||`${r}/api/v1/metadata`,p=n?.callbackUrl||`${r}/api/v1/callbacks`,k=n?.webhookUrl||`${r}/webhooks`,w=n?.agentUrl||`${r}/agent`;await s.updateController({metadata_url:h,callback_url:p,webhook_url:k,agent_url:w}),o.update(u=>({...u,needsInitialization:!1}))}catch(l){throw o.update(r=>({...r,loading:!1})),l}}};export{o as a,c as b};

View file

@ -1 +0,0 @@
import{aj as b,ak as o,u as h,ah as _,H as t,N as f,al as m}from"./BIqNNOMq.js";function y(e,a,c=a){var v=b(),d=new WeakSet;o(e,"input",r=>{var l=r?e.defaultValue:e.value;if(l=n(e)?s(l):l,c(l),f!==null&&d.add(f),v&&l!==(l=a())){var k=e.selectionStart,u=e.selectionEnd;e.value=l??"",u!==null&&(e.selectionStart=k,e.selectionEnd=Math.min(u,e.value.length))}}),(t&&e.defaultValue!==e.value||h(a)==null&&e.value)&&(c(n(e)?s(e.value):e.value),f!==null&&d.add(f)),_(()=>{var r=a();if(e===document.activeElement){var l=m??f;if(d.has(l))return}n(e)&&r===s(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function E(e,a,c=a){o(e,"change",v=>{var d=v?e.defaultChecked:e.checked;c(d)}),(t&&e.defaultChecked!==e.checked||h(a)==null)&&c(e.checked),_(()=>{var v=a();e.checked=!!v})}function n(e){var a=e.type;return a==="number"||a==="range"}function s(e){return e===""?null:+e}export{E as a,y as b};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{c as S,a as C}from"./o8CdT7B0.js";import{i as L}from"./ChJfoPF0.js";import{p as B,l as w,h as n,g as t,m as y,b as V,f as A,a as E,d as _,u as f}from"./DUMcBckj.js";import{k as F}from"./feAEhHKM.js";import{p as m}from"./i7pKks78.js";import{B as G}from"./D3LjnYSP.js";import{k as x}from"./BPOuWaSt.js";import{f as D}from"./ow_oMtSd.js";function J(v,u){B(u,!1);const s=y(),c=y();let e=m(u,"item",8),g=m(u,"statusType",8,"entity"),r=m(u,"statusField",8,"status");w(()=>(n(e()),n(r())),()=>{_(s,e()?.[r()]||"unknown")}),w(()=>(n(e()),n(g()),t(s),n(r())),()=>{_(c,(()=>{if(!e())return{variant:"error",text:"Unknown"};switch(g()){case"entity":return x(e());case"instance":let a="secondary";switch(t(s).toLowerCase()){case"running":a="success";break;case"stopped":a="info";break;case"creating":case"pending_create":a="warning";break;case"deleting":case"pending_delete":case"pending_force_delete":a="warning";break;case"error":case"deleted":a="error";break;case"active":case"online":a="success";break;case"idle":a="info";break;case"pending":case"installing":a="warning";break;case"failed":case"terminated":case"offline":a="error";break;case"unknown":default:a="secondary";break}return{variant:a,text:D(t(s))};case"enabled":return{variant:e().enabled?"success":"error",text:e().enabled?"Enabled":"Disabled"};case"os_type":const T=(t(s)||"").toLowerCase();let i="secondary",o=t(s)||"Unknown";switch(T){case"linux":i="success",o="Linux";break;case"windows":i="blue",o="Windows";break;case"macos":case"darwin":i="purple",o="macOS";break;default:i="gray",o=t(s)||"Unknown";break}return{variant:i,text:o};case"forge_type":const U=(t(s)||"").toLowerCase();let d="secondary",l=t(s)||"Unknown";switch(U){case"github":d="gray",l="GitHub";break;case"gitea":d="green",l="Gitea";break;default:d="secondary",l=t(s)||"Unknown";break}return{variant:d,text:l};case"custom":const p=e()[r()]||"Unknown";if(r()==="auth-type"){const b=p==="pat"||!p?"pat":"app";return{variant:b==="pat"?"success":"info",text:b==="pat"?"PAT":"App"}}return{variant:"info",text:p};default:return x(e())}})())}),V(),L();var k=S(),h=A(k);F(h,()=>(n(e()),n(r()),f(()=>`${e()?.name||"item"}-${e()?.[r()]||"status"}-${e()?.updated_at||"time"}`)),a=>{G(a,{get variant(){return t(c),f(()=>t(c).variant)},get text(){return t(c),f(()=>t(c).text)}})}),C(v,k),E()}export{J as S};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{f as v,e as t,a as m}from"./o8CdT7B0.js";import{i as u}from"./ChJfoPF0.js";import{p as h,v as k,c as r,r as s,a as g}from"./DUMcBckj.js";import{f as b}from"./By1mMPic.js";var w=v('<div class="fixed inset-0 bg-black/30 dark:bg-black/50 overflow-y-auto h-full w-full z-50 flex items-center justify-center p-4" role="dialog" aria-modal="true" tabindex="-1"><div class="relative mx-auto bg-white dark:bg-gray-800 rounded-lg shadow-lg" role="document"><!></div></div>');function M(d,i){h(i,!1);const l=k();function n(){l("close")}function c(o){o.stopPropagation()}function f(o){o.key==="Escape"&&l("close")}u();var a=w(),e=r(a),p=r(e);b(p,i,"default",{}),s(e),s(a),t("click",e,c),t("click",a,n),t("keydown",a,f),m(d,a),g()}export{M};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{A as Y,y as w,z as j,E as F,K,L as q,M as z,I as $,N as R,B as G,C as T,D as H,aj as Z,F as V,V as J,H as Q,G as W,ak as D,m as X,al as k,d as B,x as ee,g as S,am as re,an as ne,ao as x,ap as se,aq as U,ah as ae,i as ie,ar as te,a3 as O,as as ue,R as fe,at as le,u as oe,au as ce,av as de,aw as _e,ax as N,ay as L,az as pe,aA as ve,a9 as C,aB as M,aC as m}from"./DUMcBckj.js";function Ie(e,r,s=!1){w&&j();var n=e,a=null,i=null,l=Z,d=s?F:0,p=!1;const P=(o,u=!0)=>{p=!0,_(u,o)};var f=null;function I(){f!==null&&(f.lastChild.remove(),n.before(f),f=null);var o=l?a:i,u=l?i:a;o&&J(o),u&&Q(u,()=>{l?i=null:a=null})}const _=(o,u)=>{if(l===(l=o))return;let g=!1;if(w){const E=K(n)===q;!!l===E&&(n=z(),$(n),R(!1),g=!0)}var b=V(),c=n;if(b&&(f=document.createDocumentFragment(),f.append(c=G())),l?a??=u&&T(()=>u(c)):i??=u&&T(()=>u(c)),b){var h=H,t=l?a:i,v=l?i:a;t&&h.skipped_effects.delete(t),v&&h.skipped_effects.add(v),h.add_callback(I)}else I();g&&R(!0)};Y(()=>{p=!1,r(P),p||_(null,null)},d),w&&(n=W)}let y=!1,A=Symbol();function ge(e,r,s){const n=s[r]??={store:null,source:X(void 0),unsubscribe:D};if(n.store!==e&&!(A in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=D;else{var a=!0;n.unsubscribe=k(e,i=>{a?n.source.v=i:B(n.source,i)}),a=!1}return e&&A in s?ee(e):S(n.source)}function Ee(){const e={};function r(){re(()=>{for(var s in e)e[s].unsubscribe();ne(e,A,{enumerable:!1,value:!0})})}return[e,r]}function be(e){var r=y;try{return y=!1,[e(),y]}finally{y=r}}const he={get(e,r){if(!e.exclude.includes(r))return S(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){if(!(r in e.special)){var n=O;try{L(e.parent_effect),e.special[r]=Se({get[r](){return e.props[r]}},r,U)}finally{L(n)}}return e.special[r](s),N(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),N(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function ye(e,r){return new Proxy({props:e,exclude:r,special:{},version:fe(0),parent_effect:O},he)}const me={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(m(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let a=e.props[n];m(a)&&(a=a());const i=x(a,r);if(i&&i.set)return i.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(m(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const a=x(n,r);return a&&!a.configurable&&(a.configurable=!0),a}}},has(e,r){if(r===C||r===M)return!1;for(let s of e.props)if(m(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(m(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function we(...e){return new Proxy({props:e},me)}function Se(e,r,s,n){var a=!ce||(s&de)!==0,i=(s&le)!==0,l=(s&pe)!==0,d=n,p=!0,P=()=>(p&&(p=!1,d=l?oe(n):n),d),f;if(i){var I=C in e||M in e;f=x(e,r)?.set??(I&&r in e?t=>e[r]=t:void 0)}var _,o=!1;i?[_,o]=be(()=>e[r]):_=e[r],_===void 0&&n!==void 0&&(_=P(),f&&(a&&se(),f(_)));var u;if(a?u=()=>{var t=e[r];return t===void 0?P():(p=!0,t)}:u=()=>{var t=e[r];return t!==void 0&&(d=void 0),t===void 0?d:t},a&&(s&U)===0)return u;if(f){var g=e.$$legacy;return function(t,v){return arguments.length>0?((!a||!v||g||o)&&f(v?u():t),t):u()}}var b=!1,c=((s&_e)!==0?ae:ie)(()=>(b=!1,u()));i&&S(c);var h=O;return function(t,v){if(arguments.length>0){const E=v?S(c):a&&i?te(t):t;return B(c,E),b=!0,d!==void 0&&(d=E),t}return ve&&b||(h.f&ue)!==0?c.v:S(c)}}export{ge as a,we as b,Ie as i,ye as l,Se as p,Ee as s};

View file

@ -0,0 +1,2 @@
import{a5 as F,y as p,J as m,a1 as H,aH as A,ay as M,a3 as O,aI as W,am as K,an as Q,T as X,B as N,A as Z,aJ as ee,O as P,aK as B,_ as C,N as w,I as L,G as u,aL as te,aM as $,aN as re,aO as ae,z as j,aP as D,aQ as k,P as ne,aR as oe,aS as ie,S as se,aT as ue,C as le,p as de,ac as ce,a as fe}from"./DUMcBckj.js";function Ne(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const _e=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Le(e){return _e.includes(e)}const ve={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Oe(e){return e=e.toLowerCase(),ve[e]??e}const pe=["touchstart","touchmove"];function he(e){return pe.includes(e)}function Se(e,t){if(t){const r=document.body;e.autofocus=!0,F(()=>{document.activeElement===r&&e.focus()})}}function Ae(e){p&&m(e)!==null&&H(e)}let V=!1;function me(){V||(V=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function q(e){var t=W,r=O;A(null),M(null);try{return e()}finally{A(t),M(r)}}function Me(e,t,r,i=r){e.addEventListener(t,()=>q(r));const n=e.__on_r;n?e.__on_r=()=>{n(),i(!0)}:e.__on_r=()=>i(!0),me()}const G=new Set,I=new Set;function ye(e,t,r,i={}){function n(a){if(i.capture||b.call(t,a),!a.cancelBubble)return q(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?F(()=>{t.addEventListener(e,n,i)}):t.addEventListener(e,n,i),n}function ke(e,t,r,i,n){var a={capture:i,passive:n},o=ye(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&K(()=>{t.removeEventListener(e,o,a)})}function Pe(e){for(var t=0;t<e.length;t++)G.add(e[t]);for(var r of I)r(e)}let x=null;function b(e){var t=this,r=t.ownerDocument,i=e.type,n=e.composedPath?.()||[],a=n[0]||e.target;x=e;var o=0,c=x===e&&e.__root;if(c){var d=n.indexOf(c);if(d!==-1&&(t===document||t===window)){e.__root=t;return}var f=n.indexOf(t);if(f===-1)return;d<=f&&(o=d)}if(a=n[o]||e.target,a!==t){Q(e,"currentTarget",{configurable:!0,get(){return a||r}});var T=W,_=O;A(null),M(null);try{for(var s,l=[];a!==null;){var g=a.assignedSlot||a.parentNode||a.host||null;try{var y=a["__"+i];if(y!=null&&(!a.disabled||e.target===a))if(X(y)){var[z,...J]=y;z.apply(a,[e,...J])}else y.call(a,e)}catch(S){s?l.push(S):s=S}if(e.cancelBubble||g===t||g===null)break;a=g}if(s){for(let S of l)queueMicrotask(()=>{throw S});throw s}}finally{e.__root=t,delete e.currentTarget,A(T),M(_)}}}let v;function ge(){v=void 0}function Ce(e){let t=null,r=p;var i;if(p){for(t=u,v===void 0&&(v=m(document.head));v!==null&&(v.nodeType!==P||v.data!==B);)v=C(v);v===null?w(!1):v=L(C(v))}p||(i=document.head.appendChild(N()));try{Z(()=>e(i),ee)}finally{r&&(w(!0),v=u,L(t))}}function U(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function h(e,t){var r=O;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function De(e,t){var r=(t&$)!==0,i=(t&re)!==0,n,a=!e.startsWith("<!>");return()=>{if(p)return h(u,null),u;n===void 0&&(n=U(a?e:"<!>"+e),r||(n=m(n)));var o=i||te?document.importNode(n,!0):n.cloneNode(!0);if(r){var c=m(o),d=o.lastChild;h(c,d)}else h(o,o);return o}}function Ee(e,t,r="svg"){var i=!e.startsWith("<!>"),n=(t&$)!==0,a=`<${r}>${i?e:"<!>"+e}</${r}>`,o;return()=>{if(p)return h(u,null),u;if(!o){var c=U(a),d=m(c);if(n)for(o=document.createDocumentFragment();m(d);)o.appendChild(m(d));else o=m(d)}var f=o.cloneNode(!0);if(n){var T=m(f),_=f.lastChild;h(T,_)}else h(f,f);return f}}function Ie(e,t){return Ee(e,t,"svg")}function Re(e=""){if(!p){var t=N(e+"");return h(t,t),t}var r=u;return r.nodeType!==ae&&(r.before(r=N()),L(r)),h(r,r),r}function Ve(){if(p)return h(u,null),u;var e=document.createDocumentFragment(),t=document.createComment(""),r=N();return e.append(t,r),h(t,r),e}function xe(e,t){if(p){O.nodes_end=u,j();return}e!==null&&e.before(t)}function Fe(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function we(e,t){return Y(e,t)}function He(e,t){D(),t.intro=t.intro??!1;const r=t.target,i=p,n=u;try{for(var a=m(r);a&&(a.nodeType!==P||a.data!==B);)a=C(a);if(!a)throw k;w(!0),L(a),j();const o=Y(e,{...t,anchor:a});if(u===null||u.nodeType!==P||u.data!==ne)throw oe(),k;return w(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
`).some(c=>c.startsWith("https://svelte.dev/e/")))throw o;return o!==k&&console.warn("Failed to hydrate: ",o),t.recover===!1&&ie(),D(),H(r),w(!1),we(e,t)}finally{w(i),L(n),ge()}}const E=new Map;function Y(e,{target:t,anchor:r,props:i={},events:n,context:a,intro:o=!0}){D();var c=new Set,d=_=>{for(var s=0;s<_.length;s++){var l=_[s];if(!c.has(l)){c.add(l);var g=he(l);t.addEventListener(l,b,{passive:g});var y=E.get(l);y===void 0?(document.addEventListener(l,b,{passive:g}),E.set(l,1)):E.set(l,y+1)}}};d(se(G)),I.add(d);var f=void 0,T=ue(()=>{var _=r??t.appendChild(N());return le(()=>{if(a){de({});var s=ce;s.c=a}n&&(i.$$events=n),p&&h(_,null),f=e(_,i)||{},p&&(O.nodes_end=u),a&&fe()}),()=>{for(var s of c){t.removeEventListener(s,b);var l=E.get(s);--l===0?(document.removeEventListener(s,b),E.delete(s)):E.set(s,l)}I.delete(d),_!==r&&_.parentNode?.removeChild(_)}});return R.set(f,T),f}let R=new WeakMap;function We(e,t){const r=R.get(e);return r?(R.delete(e),r(t)):Promise.resolve()}const Te="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Te);export{xe as a,Ie as b,Ve as c,He as d,ke as e,De as f,h as g,Ce as h,U as i,Ne as j,ye as k,Me as l,we as m,Pe as n,Se as o,Oe as p,me as q,Ae as r,Fe as s,Re as t,We as u,Le as v};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
import{l as o,a as r}from"../chunks/BSYpqPvJ.js";export{o as load_css,r as start};

View file

@ -0,0 +1 @@
import{a as r}from"../chunks/Dr-4DxOa.js";import{w as t}from"../chunks/DGWAZRyz.js";export{t as load_css,r as start};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{f as h,a as c,s}from"../chunks/o8CdT7B0.js";import{i as l}from"../chunks/ChJfoPF0.js";import{p as v,f as u,t as _,a as g,c as e,r as o,s as x}from"../chunks/DUMcBckj.js";import{p}from"../chunks/8ZmDn8ti.js";var d=h("<h1> </h1> <p> </p>",1);function q(m,f){v(f,!1),l();var a=d(),r=u(a),i=e(r,!0);o(r);var t=x(r,2),n=e(t,!0);o(t),_(()=>{s(i,p.status),s(n,p.error?.message)}),c(m,a),g()}export{q as component};

View file

@ -1 +0,0 @@
import"../chunks/DsnmJJEf.js";import{i as h}from"../chunks/De-I_rkH.js";import{p as c,f as l,a as v,t as u,b as _,c as d,d as s,r as e,s as g,e as p}from"../chunks/BIqNNOMq.js";import{p as o}from"../chunks/B-zJt1QP.js";var x=l("<h1> </h1> <p> </p>",1);function q(i,m){c(m,!1),h();var t=x(),r=v(t),f=s(r,!0);e(r);var a=g(r,2),n=s(a,!0);e(a),u(()=>{p(f,o.status),p(n,o.error?.message)}),_(i,t),d()}export{q as component};

View file

@ -0,0 +1 @@
import{f as K,h as Z,e as _,a as k,t as ee,s as j}from"../chunks/o8CdT7B0.js";import{i as ae}from"../chunks/ChJfoPF0.js";import{p as re,o as te,l as se,b as de,t as w,g as a,a as oe,$ as ie,s as d,m as f,c as r,u as q,h as D,d as i,r as t,n as I}from"../chunks/DUMcBckj.js";import{i as le,s as ne,a as ce}from"../chunks/i7pKks78.js";import{B as me,d as l,c as T,r as U}from"../chunks/By1mMPic.js";import{b as C}from"../chunks/BtzOUN4g.js";import{p as ue}from"../chunks/CdEA5IGF.js";import{g as H}from"../chunks/Dr-4DxOa.js";import{a as pe,b as ve}from"../chunks/Dz-vWGor.js";import{e as fe}from"../chunks/BZiHL9L3.js";var ge=K('<div class="rounded-md bg-red-50 dark:bg-red-900 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor"><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"></path></svg></div> <div class="ml-3"><p class="text-sm font-medium text-red-800 dark:text-red-200"> </p></div></div></div>'),he=K('<div class="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8"><div class="max-w-md w-full space-y-8"><div><div class="mx-auto h-48 w-auto flex justify-center"><img alt="GARM" class="h-48 w-auto dark:hidden"/> <img alt="GARM" class="h-48 w-auto hidden dark:block"/></div> <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white">Sign in to GARM</h2> <p class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">GitHub Actions Runner Manager</p></div> <form class="mt-8 space-y-6"><div class="rounded-md shadow-sm -space-y-px"><div><label for="username" class="sr-only">Username</label> <input id="username" name="username" type="text" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-t-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" placeholder="Username"/></div> <div><label for="password" class="sr-only">Password</label> <input id="password" name="password" type="password" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-b-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" placeholder="Password"/></div></div> <!> <div><!></div></form></div></div>');function Se(W,F){re(F,!1);const[J,N]=ne(),$=()=>ce(pe,"$authStore",J);let m=f(""),u=f(""),o=f(!1),n=f("");te(()=>{O()});function O(){const e=localStorage.getItem("theme");let s=!1;e==="dark"?s=!0:e==="light"?s=!1:s=window.matchMedia("(prefers-color-scheme: dark)").matches,s?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}async function M(){if(!a(m)||!a(u)){i(n,"Please enter both username and password");return}i(o,!0),i(n,"");try{await ve.login(a(m),a(u)),H(l("/"))}catch(e){i(n,fe(e))}finally{i(o,!1)}}function L(e){e.key==="Enter"&&M()}se(()=>($(),l),()=>{$().isAuthenticated&&H(l("/"))}),de(),ae();var g=he();Z(e=>{ie.title="Login - GARM"});var A=r(g),h=r(A),S=r(h),z=r(S),Q=d(z,2);t(S),I(4),t(h);var b=d(h,2),x=r(b),y=r(x),p=d(r(y),2);U(p),t(y);var P=d(y,2),v=d(r(P),2);U(v),t(P),t(x);var G=d(x,2);{var V=e=>{var s=ge(),c=r(s),E=d(r(c),2),B=r(E),Y=r(B,!0);t(B),t(E),t(c),t(s),w(()=>j(Y,a(n))),k(e,s)};le(G,e=>{a(n)&&e(V)})}var R=d(G,2),X=r(R);me(X,{type:"submit",variant:"primary",size:"md",fullWidth:!0,get disabled(){return a(o)},get loading(){return a(o)},children:(e,s)=>{I();var c=ee();w(()=>j(c,a(o)?"Signing in...":"Sign in")),k(e,c)},$$slots:{default:!0}}),t(R),t(b),t(A),t(g),w((e,s)=>{T(z,"src",e),T(Q,"src",s),p.disabled=a(o),v.disabled=a(o)},[()=>(D(l),q(()=>l("/assets/garm-light.svg"))),()=>(D(l),q(()=>l("/assets/garm-dark.svg")))]),C(p,()=>a(m),e=>i(m,e)),_("keypress",p,L),C(v,()=>a(u),e=>i(u,e)),_("keypress",v,L),_("submit",b,ue(M)),k(W,g),oe(),N()}export{Se as component};

View file

@ -1 +0,0 @@
import"../chunks/DsnmJJEf.js";import{i as Z}from"../chunks/De-I_rkH.js";import{p as ee,o as ae,l as re,h as te,f as K,j as se,t as _,g as a,i as k,b as w,c as de,$ as oe,s as d,D as ie,m as f,d as r,u as q,q as B,k as i,r as t,z as D,e as I}from"../chunks/BIqNNOMq.js";import{i as le,s as ne,a as ce}from"../chunks/CfI2BFUj.js";import{B as me,d as l,c as T,r as U}from"../chunks/CQh-7xkh.js";import{b as C}from"../chunks/Gs5uNKRr.js";import{p as ue}from"../chunks/CdEA5IGF.js";import{g as H}from"../chunks/BSYpqPvJ.js";import{a as pe,b as ve}from"../chunks/Cx8owuas.js";import{e as fe}from"../chunks/BZiHL9L3.js";var ge=K('<div class="rounded-md bg-red-50 dark:bg-red-900 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor"><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"></path></svg></div> <div class="ml-3"><p class="text-sm font-medium text-red-800 dark:text-red-200"> </p></div></div></div>'),he=K('<div class="min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8"><div class="max-w-md w-full space-y-8"><div><div class="mx-auto h-48 w-auto flex justify-center"><img alt="GARM" class="h-48 w-auto dark:hidden"/> <img alt="GARM" class="h-48 w-auto hidden dark:block"/></div> <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white">Sign in to GARM</h2> <p class="mt-2 text-center text-sm text-gray-600 dark:text-gray-400">GitHub Actions Runner Manager</p></div> <form class="mt-8 space-y-6"><div class="rounded-md shadow-sm -space-y-px"><div><label for="username" class="sr-only">Username</label> <input id="username" name="username" type="text" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-t-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" placeholder="Username"/></div> <div><label for="password" class="sr-only">Password</label> <input id="password" name="password" type="password" required class="appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-b-md focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" placeholder="Password"/></div></div> <!> <div><!></div></form></div></div>');function Ae(W,F){ee(F,!1);const[J,N]=ne(),$=()=>ce(pe,"$authStore",J);let m=f(""),u=f(""),o=f(!1),n=f("");ae(()=>{O()});function O(){const e=localStorage.getItem("theme");let s=!1;e==="dark"?s=!0:e==="light"?s=!1:s=window.matchMedia("(prefers-color-scheme: dark)").matches,s?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}async function M(){if(!a(m)||!a(u)){i(n,"Please enter both username and password");return}i(o,!0),i(n,"");try{await ve.login(a(m),a(u)),H(l("/"))}catch(e){i(n,fe(e))}finally{i(o,!1)}}function L(e){e.key==="Enter"&&M()}re(()=>($(),l),()=>{$().isAuthenticated&&H(l("/"))}),te(),Z();var g=he();se(e=>{oe.title="Login - GARM"});var z=r(g),h=r(z),A=r(h),S=r(A),Q=d(S,2);t(A),D(4),t(h);var b=d(h,2),x=r(b),y=r(x),p=d(r(y),2);U(p),t(y);var P=d(y,2),v=d(r(P),2);U(v),t(P),t(x);var G=d(x,2);{var V=e=>{var s=ge(),c=r(s),E=d(r(c),2),j=r(E),Y=r(j,!0);t(j),t(E),t(c),t(s),_(()=>I(Y,a(n))),w(e,s)};le(G,e=>{a(n)&&e(V)})}var R=d(G,2),X=r(R);me(X,{type:"submit",variant:"primary",size:"md",fullWidth:!0,get disabled(){return a(o)},get loading(){return a(o)},children:(e,s)=>{D();var c=ie();_(()=>I(c,a(o)?"Signing in...":"Sign in")),w(e,c)},$$slots:{default:!0}}),t(R),t(b),t(z),t(g),_((e,s)=>{T(S,"src",e),T(Q,"src",s),p.disabled=a(o),v.disabled=a(o)},[()=>(B(l),q(()=>l("/assets/garm-light.svg"))),()=>(B(l),q(()=>l("/assets/garm-dark.svg")))]),C(p,()=>a(m),e=>i(m,e)),k("keypress",p,L),C(v,()=>a(u),e=>i(u,e)),k("keypress",v,L),k("submit",b,ue(M)),w(W,g),de(),N()}export{Ae as component};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more