diff --git a/cmd/ecs-agent/agent.go b/cmd/ecs-agent/agent.go index a7c63b569..80d55caeb 100644 --- a/cmd/ecs-agent/agent.go +++ b/cmd/ecs-agent/agent.go @@ -100,7 +100,7 @@ func New(cfg config) (*Agent, error) { runner = rt } - cp, err := newGatewayControlPlane(cfg) + cp, err := newGatewayControlPlane(cfg, creds) if err != nil { return nil, fmt.Errorf("build gateway control-plane: %w", err) } diff --git a/cmd/ecs-agent/config.go b/cmd/ecs-agent/config.go index c919354e5..6147a02a2 100644 --- a/cmd/ecs-agent/config.go +++ b/cmd/ecs-agent/config.go @@ -20,8 +20,9 @@ const ( // config holds the static settings the agent reads at boot. Cluster identity // (account ID, instance ID) is discovered at runtime from IMDS, not configured; // only the cluster *name* the instance was launched into is static. AccessKey / -// SecretKey are the instance's seeded IAM credentials used to SigV4-sign gateway -// calls — the agent never holds a NATS token. +// SecretKey are legacy seeded creds, optional now that the agent SigV4-signs +// gateway calls with instance-role credentials from IMDS; the agent never holds +// a NATS token. type config struct { GatewayURL string GatewayCA string diff --git a/cmd/ecs-agent/controlplane.go b/cmd/ecs-agent/controlplane.go index b1178325d..46b7c564b 100644 --- a/cmd/ecs-agent/controlplane.go +++ b/cmd/ecs-agent/controlplane.go @@ -1,6 +1,7 @@ package main import ( + "context" "encoding/json" "fmt" "time" @@ -8,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" + "github.com/mulgadc/spinifex/cmd/ecs-agent/credentials" "github.com/mulgadc/spinifex/internal/ecsgw" handlers_ecs "github.com/mulgadc/spinifex/spinifex/handlers/ecs" "github.com/mulgadc/spinifex/spinifex/handlers/ecs/bus" @@ -39,15 +41,28 @@ var _ controlPlane = (*gatewayControlPlane)(nil) // timeout to leave room for a future server-side long-poll. const pollTimeout = 30 * time.Second -// newGatewayControlPlane builds the SigV4 client from seeded creds + pinned CA. -func newGatewayControlPlane(cfg config) (*gatewayControlPlane, error) { - client, err := ecsgw.New(cfg.GatewayURL, cfg.GatewayCA, cfg.AccessKey, cfg.SecretKey, cfg.Region, pollTimeout) +// newGatewayControlPlane builds the SigV4 client signing with the instance-role +// credentials from IMDS (fetched per call so rotation is transparent) + pinned CA. +func newGatewayControlPlane(cfg config, creds credentials.CredentialsProvider) (*gatewayControlPlane, error) { + client, err := ecsgw.New(cfg.GatewayURL, cfg.GatewayCA, credentialsFunc(creds), cfg.Region, pollTimeout) if err != nil { return nil, err } return &gatewayControlPlane{client: client}, nil } +// credentialsFunc adapts the agent's IMDS CredentialsProvider to the ecsgw +// per-call credentials hook. +func credentialsFunc(p credentials.CredentialsProvider) ecsgw.CredentialsFunc { + return func(ctx context.Context) (string, string, string, error) { + c, err := p.Retrieve(ctx) + if err != nil { + return "", "", "", err + } + return c.AccessKeyID, c.SecretAccessKey, c.SessionToken, nil + } +} + func (g *gatewayControlPlane) Register(id identity) error { in := &ecs.RegisterContainerInstanceInput{ Cluster: aws.String(id.ClusterName), diff --git a/internal/ecsgw/client.go b/internal/ecsgw/client.go index 51e9fee12..f6c393b85 100644 --- a/internal/ecsgw/client.go +++ b/internal/ecsgw/client.go @@ -1,15 +1,15 @@ // Package ecsgw is the on-VM SigV4 client the ecs-agent uses to reach the AWS // gateway over HTTPS instead of connecting to NATS directly. It signs requests -// for service "ecs" with the instance's seeded IAM credentials, keeping the NATS -// bus host-internal (the gateway relays agent calls onto ecs.bus.* host-side). +// for service "ecs" with the instance's IMDS instance-role credentials (fetched +// fresh per call so rotation is transparent), keeping the NATS bus host-internal +// (the gateway relays agent calls onto ecs.bus.* host-side). package ecsgw import ( "bytes" - "crypto/sha256" + "context" "crypto/tls" "crypto/x509" - "encoding/hex" "fmt" "io" "net/http" @@ -17,7 +17,9 @@ import ( "strings" "time" - "github.com/mulgadc/predastore/auth" + "github.com/aws/aws-sdk-go/aws/credentials" + v4 "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/mulgadc/spinifex/internal/tlsconfig" ) @@ -26,26 +28,31 @@ import ( // suffix); this one mirrors the AWS JSON 1.1 convention. const targetPrefix = "AmazonEC2ContainerServiceV20141113." +// CredentialsFunc yields the current SigV4 credentials. It is called once per +// request so a provider backed by IMDS can rotate instance-role creds (and their +// session token) transparently. Must be safe for concurrent use. +type CredentialsFunc func(ctx context.Context) (accessKey, secretKey, sessionToken string, err error) + // Client posts SigV4-signed AWS JSON 1.1 requests to the gateway for service // "ecs". One client is reused for register/heartbeat/state/poll. type Client struct { baseURL string - accessKey string - secretKey string + creds CredentialsFunc region string httpClient *http.Client } // New builds a client. caPath optionally pins the gateway TLS CA; empty relies on -// the system trust store. region defaults to us-east-1 when empty (SigV4 requires -// a non-empty region). timeout bounds a single call — callers needing a long-poll -// pass a larger value than the default register/heartbeat timeout. -func New(baseURL, caPath, accessKey, secretKey, region string, timeout time.Duration) (*Client, error) { +// the system trust store. creds supplies the per-call instance-role credentials. +// region defaults to us-east-1 when empty (SigV4 requires a non-empty region). +// timeout bounds a single call — callers needing a long-poll pass a larger value +// than the default register/heartbeat timeout. +func New(baseURL, caPath string, creds CredentialsFunc, region string, timeout time.Duration) (*Client, error) { if baseURL == "" { return nil, fmt.Errorf("ecsgw: baseURL is required") } - if accessKey == "" || secretKey == "" { - return nil, fmt.Errorf("ecsgw: access key and secret key are required") + if creds == nil { + return nil, fmt.Errorf("ecsgw: credentials func is required") } if region == "" { region = "us-east-1" @@ -71,10 +78,9 @@ func New(baseURL, caPath, accessKey, secretKey, region string, timeout time.Dura } return &Client{ - baseURL: strings.TrimRight(baseURL, "/"), - accessKey: accessKey, - secretKey: secretKey, - region: region, + baseURL: strings.TrimRight(baseURL, "/"), + creds: creds, + region: region, httpClient: &http.Client{ Timeout: timeout, Transport: &http.Transport{TLSClientConfig: tlsCfg, MaxIdleConns: 2, IdleConnTimeout: 30 * time.Second}, @@ -83,8 +89,9 @@ func New(baseURL, caPath, accessKey, secretKey, region string, timeout time.Dura } // Call SigV4-signs and POSTs body under X-Amz-Target "" to the -// gateway root, returning the 2xx response body. Errors carry the gateway status -// and body. No retry; callers wrap as needed. +// gateway root, returning the 2xx response body. Credentials are fetched per call +// and the v4 signer emits X-Amz-Security-Token for instance-role (temporary) +// creds, so the gateway's ASIA path verifies them. No retry; callers wrap. func (c *Client) Call(action string, body []byte) ([]byte, error) { req, err := http.NewRequest(http.MethodPost, c.baseURL+"/", bytes.NewReader(body)) if err != nil { @@ -93,8 +100,12 @@ func (c *Client) Call(action string, body []byte) ([]byte, error) { req.Header.Set("Content-Type", "application/x-amz-json-1.1") req.Header.Set("X-Amz-Target", targetPrefix+action) - sum := sha256.Sum256(body) - if err := auth.SignReq(req, c.accessKey, c.secretKey, hex.EncodeToString(sum[:]), "ecs", c.region); err != nil { + akid, secret, token, err := c.creds(req.Context()) + if err != nil { + return nil, fmt.Errorf("retrieve credentials: %w", err) + } + signer := v4.NewSigner(credentials.NewStaticCredentials(akid, secret, token)) + if _, err := signer.Sign(req, bytes.NewReader(body), "ecs", c.region, time.Now()); err != nil { return nil, fmt.Errorf("sign request: %w", err) } diff --git a/internal/ecsgw/client_test.go b/internal/ecsgw/client_test.go index 793b15340..d74184d51 100644 --- a/internal/ecsgw/client_test.go +++ b/internal/ecsgw/client_test.go @@ -1,6 +1,7 @@ package ecsgw import ( + "context" "io" "net/http" "net/http/httptest" @@ -9,9 +10,15 @@ import ( "time" ) +// testCreds returns a fixed temporary credential set (with a session token, as +// IMDS instance-role creds carry). +func testCreds(context.Context) (string, string, string, error) { + return "ASIATEST", "secret", "session-token-xyz", nil +} + func newTestClient(t *testing.T, srv *httptest.Server) *Client { t.Helper() - c, err := New(srv.URL, "", "AKIDTEST", "secret", "ap-southeast-2", time.Second) + c, err := New(srv.URL, "", testCreds, "ap-southeast-2", time.Second) if err != nil { t.Fatalf("New: %v", err) } @@ -22,10 +29,11 @@ func newTestClient(t *testing.T, srv *httptest.Server) *Client { // Call signs for service "ecs", sets the X-Amz-Target action, and returns the // 2xx body. func TestClient_CallSignsAndTargets(t *testing.T) { - var gotTarget, gotAuth, gotBody string + var gotTarget, gotAuth, gotBody, gotToken string srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { gotTarget = r.Header.Get("X-Amz-Target") gotAuth = r.Header.Get("Authorization") + gotToken = r.Header.Get("X-Amz-Security-Token") b, _ := io.ReadAll(r.Body) gotBody = string(b) _, _ = w.Write([]byte(`{"ok":true}`)) @@ -49,6 +57,9 @@ func TestClient_CallSignsAndTargets(t *testing.T) { if !strings.Contains(gotAuth, "AWS4-HMAC-SHA256") || !strings.Contains(gotAuth, "/ecs/aws4_request") { t.Errorf("auth header not SigV4 for ecs: %q", gotAuth) } + if gotToken != "session-token-xyz" { + t.Errorf("X-Amz-Security-Token = %q, want the IMDS session token", gotToken) + } } // A non-2xx gateway response surfaces as an error carrying status + body. @@ -67,10 +78,10 @@ func TestClient_CallErrorStatus(t *testing.T) { } func TestNew_Validation(t *testing.T) { - if _, err := New("", "", "a", "b", "r", 0); err == nil { + if _, err := New("", "", testCreds, "r", 0); err == nil { t.Error("want error for empty baseURL") } - if _, err := New("https://gw:9999", "", "", "b", "r", 0); err == nil { - t.Error("want error for empty access key") + if _, err := New("https://gw:9999", "", nil, "r", 0); err == nil { + t.Error("want error for nil credentials func") } } diff --git a/spinifex/daemon/daemon.go b/spinifex/daemon/daemon.go index 30fc588b3..69e0435fd 100644 --- a/spinifex/daemon/daemon.go +++ b/spinifex/daemon/daemon.go @@ -979,6 +979,7 @@ func (d *Daemon) subscribeAll() error { natsSub{"ecs.ListServices", d.handleECSListServices, "spinifex-workers"}, natsSub{"ecs.SubmitTaskStateChange", d.handleECSSubmitTaskStateChange, "spinifex-workers"}, natsSub{"ecs.PollAssignments", d.handleECSPollAssignments, "spinifex-workers"}, + natsSub{"ecs.ProvisionCapacity", d.handleECSProvisionCapacity, "spinifex-workers"}, ) } @@ -1416,7 +1417,7 @@ func (d *Daemon) startCluster() error { // scheduler goroutine that owns the Layer-2 bus subscriptions and heartbeat // reaper. The scheduler is disabled (handlers still serve) when JetStream is // unavailable. - d.ecsService = handlers_ecs.NewService(d.natsConn, d.config.Region, d.clusterConfig.AWS.InternalSuffix) + d.ecsService = handlers_ecs.NewService(d.natsConn, d.config.Region, d.clusterConfig.AWS.InternalSuffix).WithDeps(d.buildECSServiceDeps()) if js, jsErr := d.natsConn.JetStream(); jsErr != nil { slog.Warn("ECS scheduler disabled: JetStream unavailable", "err", jsErr) } else if _, lbErr := handlers_ecs.InitLeaderBucket(js); lbErr != nil { diff --git a/spinifex/daemon/daemon_handlers_ecs.go b/spinifex/daemon/daemon_handlers_ecs.go index 557328958..9f59d0ebc 100644 --- a/spinifex/daemon/daemon_handlers_ecs.go +++ b/spinifex/daemon/daemon_handlers_ecs.go @@ -111,3 +111,9 @@ func (d *Daemon) handleECSListTasks(msg *nats.Msg) { func (d *Daemon) handleECSPollAssignments(msg *nats.Msg) { handleNATSRequest(msg, d.ecsService.PollAssignments) } + +// --- Capacity --- + +func (d *Daemon) handleECSProvisionCapacity(msg *nats.Msg) { + handleNATSRequest(msg, d.ecsService.ProvisionCapacity) +} diff --git a/spinifex/daemon/ecs_deps.go b/spinifex/daemon/ecs_deps.go new file mode 100644 index 000000000..daea71bfc --- /dev/null +++ b/spinifex/daemon/ecs_deps.go @@ -0,0 +1,56 @@ +package daemon + +import ( + "log/slog" + "os" + "path/filepath" + + handlers_ecs "github.com/mulgadc/spinifex/spinifex/handlers/ecs" + handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" +) + +// buildECSServiceDeps assembles the ECS service Deps for ProvisionCapacity: the +// gateway endpoint/CA seeded into container-instance user-data, the image +// resolver, the customer RunInstances path, and (when the master key loads) a +// KV-backed IAM service for the ecsInstanceRole instance profile. +func (d *Daemon) buildECSServiceDeps() handlers_ecs.Deps { + gatewayCA := "" + if d.config.NATS.CACert != "" { + if caBytes, readErr := os.ReadFile(d.config.NATS.CACert); readErr == nil { + gatewayCA = string(caBytes) + } else { + slog.Warn("ECS: read gateway CACert failed; container instances will not verify the gateway over TLS", + "path", d.config.NATS.CACert, "err", readErr) + } + } + + deps := handlers_ecs.Deps{ + GatewayBaseURL: d.resolveGatewayBaseURL(), + GatewayCACert: gatewayCA, + Images: d.imageService, + RunInstances: d.RunWorkerInstance, + } + + // A KV-backed IAM service (sharing the gateway's buckets over NATS) lets ECS + // find-or-create the ecsInstanceRole instance profile container instances + // expose over IMDS. Only wired when the master key is present; without it + // capacity provisioning is disabled. + masterKey, err := handlers_iam.LoadMasterKey(filepath.Join(filepath.Dir(d.configPath), "master.key")) + if err != nil || masterKey == nil { + slog.Warn("ECS: LoadMasterKey failed; capacity provisioning disabled until the master key is provisioned", + "err", err) + return deps + } + + clusterSize := 1 + if d.clusterConfig != nil { + clusterSize = len(d.clusterConfig.Nodes) + } + if iamSvc, iamErr := handlers_iam.NewIAMServiceImpl(d.natsConn, masterKey, clusterSize); iamErr != nil { + slog.Warn("ECS: IAM service init failed; capacity provisioning disabled", "err", iamErr) + } else { + deps.IAM = iamSvc + } + + return deps +} diff --git a/spinifex/gateway/ecs/actions.go b/spinifex/gateway/ecs/actions.go index 0743c09bf..61960ad5e 100644 --- a/spinifex/gateway/ecs/actions.go +++ b/spinifex/gateway/ecs/actions.go @@ -94,6 +94,16 @@ func RegisterContainerInstance(nc *nats.Conn, accountID string, body []byte) (an return handlers_ecs.NewNATSECSService(nc).RegisterContainerInstance(input, accountID) } +// ProvisionCapacity launches container-instance EC2 capacity into a cluster. +// Input/output are the custom handlers_ecs types, not aws-sdk-go ecs shapes. +func ProvisionCapacity(nc *nats.Conn, accountID string, body []byte) (any, error) { + input := new(handlers_ecs.ProvisionCapacityInput) + if err := unmarshalIfBody(body, input); err != nil { + return nil, err + } + return handlers_ecs.NewNATSECSService(nc).ProvisionCapacity(input, accountID) +} + func DeregisterContainerInstance(nc *nats.Conn, accountID string, body []byte) (any, error) { input := new(ecs.DeregisterContainerInstanceInput) if err := unmarshalIfBody(body, input); err != nil { diff --git a/spinifex/gateway/ecs/handler.go b/spinifex/gateway/ecs/handler.go index fda5cad14..8411e1e52 100644 --- a/spinifex/gateway/ecs/handler.go +++ b/spinifex/gateway/ecs/handler.go @@ -80,6 +80,7 @@ var Actions = map[string]Handler{ // Container instance. "RegisterContainerInstance": RegisterContainerInstance, "DeregisterContainerInstance": DeregisterContainerInstance, + "ProvisionCapacity": ProvisionCapacity, "DescribeContainerInstances": DescribeContainerInstances, "ListContainerInstances": ListContainerInstances, "UpdateContainerInstancesState": UpdateContainerInstancesState, diff --git a/spinifex/gateway/ecs/handler_test.go b/spinifex/gateway/ecs/handler_test.go index 89895409e..aa3b92a38 100644 --- a/spinifex/gateway/ecs/handler_test.go +++ b/spinifex/gateway/ecs/handler_test.go @@ -25,8 +25,8 @@ var wiredActions = map[string]bool{ "RegisterTaskDefinition": true, "DeregisterTaskDefinition": true, "DescribeTaskDefinition": true, "ListTaskDefinitions": true, "RegisterContainerInstance": true, "DeregisterContainerInstance": true, - "UpdateContainerInstancesState": true, - "DescribeContainerInstances": true, "ListContainerInstances": true, + "UpdateContainerInstancesState": true, "ProvisionCapacity": true, + "DescribeContainerInstances": true, "ListContainerInstances": true, "RunTask": true, "StartTask": true, "StopTask": true, "DescribeTasks": true, "ListTasks": true, "CreateService": true, "UpdateService": true, "DeleteService": true, "DescribeServices": true, "ListServices": true, diff --git a/spinifex/handlers/ecs/capacity.go b/spinifex/handlers/ecs/capacity.go new file mode 100644 index 000000000..fa486a284 --- /dev/null +++ b/spinifex/handlers/ecs/capacity.go @@ -0,0 +1,168 @@ +package handlers_ecs + +import ( + "errors" + "fmt" + "log/slog" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/mulgadc/spinifex/spinifex/awserrors" + "github.com/mulgadc/spinifex/spinifex/tags" +) + +const ( + // defaultCapacityInstanceType is the EC2 type used when the caller omits one. + defaultCapacityInstanceType = "t3.small" + + // maxCapacityCount caps the instances a single ProvisionCapacity launches. + maxCapacityCount = 10 + + // ecsClusterTagKey associates a container instance with its cluster while + // keeping the instance customer-owned (no system ManagedBy tag). + ecsClusterTagKey = "spinifex:ecs-cluster" +) + +// ErrECSNodeAMINotFound is returned when no spinifex-ecs-node AMI resolves for +// the account. Callers translate it to the AWS shape at the service boundary. +var ErrECSNodeAMINotFound = errors.New("ecs: spinifex-ecs-node AMI not found") + +// ProvisionCapacityInput requests N container instances into a cluster. +type ProvisionCapacityInput struct { + Cluster string + InstanceType string + Count int + SubnetID string + SecurityGroupID string + KeyName string +} + +// ProvisionCapacityOutput returns the launched instance IDs. +type ProvisionCapacityOutput struct { + InstanceIDs []string +} + +// ProvisionCapacity launches container instances into a cluster: it ensures the +// ECS instance role/profile, resolves the spinifex-ecs-node AMI, renders +// keyless user-data (IMDS instance-role creds), and launches via the customer +// RunInstances path with the profile attached and a cluster-association tag. +func (s *Service) ProvisionCapacity(input *ProvisionCapacityInput, accountID string) (*ProvisionCapacityOutput, error) { + if input == nil { + return nil, errors.New(awserrors.ErrorInvalidParameterValue) + } + if input.Cluster == "" || input.SubnetID == "" || input.SecurityGroupID == "" { + return nil, errors.New(awserrors.ErrorInvalidParameterValue) + } + instanceType := input.InstanceType + if instanceType == "" { + instanceType = defaultCapacityInstanceType + } + count := input.Count + if count <= 0 { + count = 1 + } + if count > maxCapacityCount { + count = maxCapacityCount + } + + if s.deps.IAM == nil { + return nil, errors.New("ecs: capacity provisioning requires the IAM service (master key not provisioned)") + } + if s.deps.Images == nil { + return nil, errors.New("ecs: capacity provisioning requires an image resolver") + } + if s.deps.RunInstances == nil { + return nil, errors.New("ecs: capacity provisioning requires a RunInstances launcher") + } + + profileARN, err := s.ensureECSInstanceProfile(accountID) + if err != nil { + return nil, fmt.Errorf("ensure ECS instance profile: %w", err) + } + + amiID, err := lookupECSNodeAMI(s.deps.Images, accountID) + if err != nil { + return nil, err + } + + cluster := clusterShortName(input.Cluster) + userData := buildContainerInstanceUserData(containerInstanceUserDataInput{ + GatewayURL: s.deps.GatewayBaseURL, + GatewayCACert: s.deps.GatewayCACert, + Region: s.region, + ClusterName: cluster, + }) + + runInput := &ec2.RunInstancesInput{ + ImageId: aws.String(amiID), + InstanceType: aws.String(instanceType), + MinCount: aws.Int64(int64(count)), + MaxCount: aws.Int64(int64(count)), + SubnetId: aws.String(input.SubnetID), + SecurityGroupIds: aws.StringSlice([]string{input.SecurityGroupID}), + UserData: aws.String(userData), + IamInstanceProfile: &ec2.IamInstanceProfileSpecification{Arn: aws.String(profileARN)}, + TagSpecifications: []*ec2.TagSpecification{{ + ResourceType: aws.String("instance"), + Tags: []*ec2.Tag{ + {Key: aws.String("Name"), Value: aws.String("ecs-node-" + cluster)}, + {Key: aws.String(ecsClusterTagKey), Value: aws.String(cluster)}, + }, + }}, + } + if input.KeyName != "" { + runInput.KeyName = aws.String(input.KeyName) + } + + res, err := s.deps.RunInstances(runInput, accountID) + if err != nil { + return nil, err + } + + out := &ProvisionCapacityOutput{} + for _, inst := range res.Instances { + if id := aws.StringValue(inst.InstanceId); id != "" { + out.InstanceIDs = append(out.InstanceIDs, id) + } + } + return out, nil +} + +// lookupECSNodeAMI resolves the spinifex-ecs-node AMI by the +// spinifex:managed-by=ecs tag rather than a brittle exact name. The newest +// matching image (by CreationDate) wins. +func lookupECSNodeAMI(amiSvc ecsImageResolver, accountID string) (string, error) { + out, err := amiSvc.DescribeImages(&ec2.DescribeImagesInput{ + Filters: []*ec2.Filter{ + {Name: aws.String("tag:" + tags.ManagedByKey), Values: aws.StringSlice([]string{tags.ManagedByECS})}, + }, + }, accountID) + if err != nil { + return "", fmt.Errorf("describe ecs AMI (tag:%s=%s): %w", tags.ManagedByKey, tags.ManagedByECS, err) + } + + var ( + newestID string + newestCreated string + matches int + ) + for _, img := range out.Images { + if img == nil || img.ImageId == nil || *img.ImageId == "" { + continue + } + matches++ + // CreationDate is a fixed-width RFC3339 timestamp, so lexicographic + // comparison orders it correctly without parsing. + if created := aws.StringValue(img.CreationDate); newestID == "" || created > newestCreated { + newestID, newestCreated = *img.ImageId, created + } + } + if newestID == "" { + return "", fmt.Errorf("%w (tag:%s=%s, account %s)", ErrECSNodeAMINotFound, tags.ManagedByKey, tags.ManagedByECS, accountID) + } + if matches > 1 { + slog.Warn("ecs: multiple AMIs match managed-by=ecs; using newest", + "count", matches, "imageId", newestID, "created", newestCreated) + } + return newestID, nil +} diff --git a/spinifex/handlers/ecs/capacity_test.go b/spinifex/handlers/ecs/capacity_test.go new file mode 100644 index 000000000..b487b2392 --- /dev/null +++ b/spinifex/handlers/ecs/capacity_test.go @@ -0,0 +1,161 @@ +package handlers_ecs + +import ( + "errors" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/aws/aws-sdk-go/service/iam" + "github.com/mulgadc/spinifex/spinifex/awserrors" + "github.com/mulgadc/spinifex/spinifex/tags" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// stubImages returns a single spinifex-ecs-node AMI; nil images yields none. +type stubImages struct { + images []*ec2.Image +} + +func (s *stubImages) DescribeImages(_ *ec2.DescribeImagesInput, _ string) (*ec2.DescribeImagesOutput, error) { + return &ec2.DescribeImagesOutput{Images: s.images}, nil +} + +// stubIAM converges to find-or-create: Get* report NoSuchEntity, Create* succeed. +type stubIAM struct{} + +var ( + _ ecsIAM = stubIAM{} + _ ecsImageResolver = (*stubImages)(nil) +) + +func (stubIAM) GetRole(_ string, _ *iam.GetRoleInput) (*iam.GetRoleOutput, error) { + return nil, errors.New(awserrors.ErrorIAMNoSuchEntity) +} + +func (stubIAM) CreateRole(_ string, _ *iam.CreateRoleInput) (*iam.CreateRoleOutput, error) { + return &iam.CreateRoleOutput{Role: &iam.Role{RoleName: aws.String(ecsInstanceRoleName)}}, nil +} + +func (stubIAM) CreatePolicy(accountID string, _ *iam.CreatePolicyInput) (*iam.CreatePolicyOutput, error) { + arn := "arn:aws:iam::" + accountID + ":policy/" + ecsInstanceRolePolicyName + return &iam.CreatePolicyOutput{Policy: &iam.Policy{Arn: aws.String(arn)}}, nil +} + +func (stubIAM) AttachRolePolicy(_ string, _ *iam.AttachRolePolicyInput) (*iam.AttachRolePolicyOutput, error) { + return &iam.AttachRolePolicyOutput{}, nil +} + +func (stubIAM) GetInstanceProfile(_ string, _ *iam.GetInstanceProfileInput) (*iam.GetInstanceProfileOutput, error) { + return nil, errors.New(awserrors.ErrorIAMNoSuchEntity) +} + +func (stubIAM) CreateInstanceProfile(accountID string, _ *iam.CreateInstanceProfileInput) (*iam.CreateInstanceProfileOutput, error) { + arn := "arn:aws:iam::" + accountID + ":instance-profile/" + ecsInstanceRoleName + return &iam.CreateInstanceProfileOutput{InstanceProfile: &iam.InstanceProfile{Arn: aws.String(arn)}}, nil +} + +func (stubIAM) AddRoleToInstanceProfile(_ string, _ *iam.AddRoleToInstanceProfileInput) (*iam.AddRoleToInstanceProfileOutput, error) { + return &iam.AddRoleToInstanceProfileOutput{}, nil +} + +func ecsNodeImage() []*ec2.Image { + return []*ec2.Image{{ + ImageId: aws.String("ami-ecs"), + CreationDate: aws.String("2026-01-01T00:00:00.000Z"), + Tags: []*ec2.Tag{ + {Key: aws.String(tags.ManagedByKey), Value: aws.String(tags.ManagedByECS)}, + }, + }} +} + +func TestProvisionCapacity_BuildsRunInstancesInput(t *testing.T) { + var captured *ec2.RunInstancesInput + svc := NewService(nil, testRegion, "internal").WithDeps(Deps{ + GatewayBaseURL: "https://10.0.0.1:9999", + GatewayCACert: "-----BEGIN CERTIFICATE-----\nx\n-----END CERTIFICATE-----", + IAM: stubIAM{}, + Images: &stubImages{images: ecsNodeImage()}, + RunInstances: func(in *ec2.RunInstancesInput, _ string) (*ec2.Reservation, error) { + captured = in + return &ec2.Reservation{Instances: []*ec2.Instance{{InstanceId: aws.String("i-123")}}}, nil + }, + }) + + out, err := svc.ProvisionCapacity(&ProvisionCapacityInput{ + Cluster: "web", + InstanceType: "t3.medium", + Count: 2, + SubnetID: "subnet-1", + SecurityGroupID: "sg-1", + KeyName: "kp-1", + }, testAccountID) + require.NoError(t, err) + assert.Equal(t, []string{"i-123"}, out.InstanceIDs) + + require.NotNil(t, captured) + assert.Equal(t, "ami-ecs", aws.StringValue(captured.ImageId)) + assert.Equal(t, "t3.medium", aws.StringValue(captured.InstanceType)) + assert.Equal(t, int64(2), aws.Int64Value(captured.MinCount)) + assert.Equal(t, int64(2), aws.Int64Value(captured.MaxCount)) + assert.Equal(t, "subnet-1", aws.StringValue(captured.SubnetId)) + assert.Equal(t, []string{"sg-1"}, aws.StringValueSlice(captured.SecurityGroupIds)) + assert.Equal(t, "kp-1", aws.StringValue(captured.KeyName)) + + require.NotNil(t, captured.IamInstanceProfile) + assert.NotEmpty(t, aws.StringValue(captured.IamInstanceProfile.Arn)) + + require.NotNil(t, captured.UserData) + assert.Contains(t, aws.StringValue(captured.UserData), "ECS_CLUSTER=web") + assert.NotContains(t, aws.StringValue(captured.UserData), "ECS_ACCESS_KEY") +} + +func TestProvisionCapacity_DefaultsAndCount(t *testing.T) { + var captured *ec2.RunInstancesInput + svc := NewService(nil, testRegion, "internal").WithDeps(Deps{ + IAM: stubIAM{}, + Images: &stubImages{images: ecsNodeImage()}, + RunInstances: func(in *ec2.RunInstancesInput, _ string) (*ec2.Reservation, error) { + captured = in + return &ec2.Reservation{Instances: []*ec2.Instance{{InstanceId: aws.String("i-1")}}}, nil + }, + }) + + _, err := svc.ProvisionCapacity(&ProvisionCapacityInput{ + Cluster: "web", + SubnetID: "subnet-1", + SecurityGroupID: "sg-1", + }, testAccountID) + require.NoError(t, err) + require.NotNil(t, captured) + assert.Equal(t, defaultCapacityInstanceType, aws.StringValue(captured.InstanceType)) + assert.Equal(t, int64(1), aws.Int64Value(captured.MinCount)) + assert.Nil(t, captured.KeyName) +} + +func TestProvisionCapacity_MissingRequired(t *testing.T) { + svc := NewService(nil, testRegion, "internal").WithDeps(Deps{ + IAM: stubIAM{}, Images: &stubImages{images: ecsNodeImage()}, + RunInstances: func(*ec2.RunInstancesInput, string) (*ec2.Reservation, error) { return nil, nil }, + }) + _, err := svc.ProvisionCapacity(&ProvisionCapacityInput{Cluster: "web"}, testAccountID) + require.Error(t, err) + assert.Equal(t, awserrors.ErrorInvalidParameterValue, err.Error()) +} + +func TestProvisionCapacity_AMINotFound(t *testing.T) { + svc := NewService(nil, testRegion, "internal").WithDeps(Deps{ + IAM: stubIAM{}, + Images: &stubImages{images: nil}, + RunInstances: func(*ec2.RunInstancesInput, string) (*ec2.Reservation, error) { + t.Fatal("RunInstances must not be called when no AMI resolves") + return nil, nil + }, + }) + _, err := svc.ProvisionCapacity(&ProvisionCapacityInput{ + Cluster: "web", SubnetID: "subnet-1", SecurityGroupID: "sg-1", + }, testAccountID) + require.Error(t, err) + assert.ErrorIs(t, err, ErrECSNodeAMINotFound) +} diff --git a/spinifex/handlers/ecs/eip_test.go b/spinifex/handlers/ecs/eip_test.go new file mode 100644 index 000000000..40fe56093 --- /dev/null +++ b/spinifex/handlers/ecs/eip_test.go @@ -0,0 +1,101 @@ +package handlers_ecs + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// stubEIPs records auto-EIP calls so the RUNNING/STOPPED hooks can be asserted +// without a live ec2 EIP daemon. +type stubEIPs struct { + allocated []string // eniIDs associated + released []string // allocation IDs released + publicIP string + allocID string + allocErr error + releaseErr error +} + +func (e *stubEIPs) AllocateAndAssociate(_, eniID string) (string, string, error) { + if e.allocErr != nil { + return "", "", e.allocErr + } + e.allocated = append(e.allocated, eniID) + return e.publicIP, e.allocID, nil +} + +func (e *stubEIPs) Release(_, allocationID string) error { + e.released = append(e.released, allocationID) + return e.releaseErr +} + +func TestAssignTaskPublicIP_EnabledAssociatesAndPersists(t *testing.T) { + svc, _, kv := serviceTestRig(t) + eips := &stubEIPs{publicIP: "192.0.2.50", allocID: "eipalloc-1"} + svc.eips = eips + + require.NoError(t, putJSON(kv, ServiceKey("web", "web"), &ServiceRecord{ + Name: "web", Cluster: "web", AssignPublicIP: "ENABLED", + })) + task := &TaskRecord{ + TaskID: "t-1", Cluster: "web", Group: serviceTaskGroup("web"), + ENIID: "eni-1", ENIPrivateIP: "172.31.0.8", + } + require.NoError(t, putJSON(kv, TaskKey("web", "t-1"), task)) + + svc.assignTaskPublicIP(kv, testAccountID, task) + + assert.Equal(t, []string{"eni-1"}, eips.allocated) + assert.Equal(t, "192.0.2.50", task.ENIPublicIP) + assert.Equal(t, "eipalloc-1", task.ENIEIPAllocationID) + + var persisted TaskRecord + found, err := getJSON(kv, TaskKey("web", "t-1"), &persisted) + require.NoError(t, err) + require.True(t, found) + assert.Equal(t, "192.0.2.50", persisted.ENIPublicIP) +} + +func TestAssignTaskPublicIP_DisabledNoOp(t *testing.T) { + svc, _, kv := serviceTestRig(t) + eips := &stubEIPs{publicIP: "192.0.2.50", allocID: "eipalloc-1"} + svc.eips = eips + + require.NoError(t, putJSON(kv, ServiceKey("web", "web"), &ServiceRecord{ + Name: "web", Cluster: "web", // AssignPublicIP unset + })) + task := &TaskRecord{ + TaskID: "t-2", Cluster: "web", Group: serviceTaskGroup("web"), ENIID: "eni-2", + } + + svc.assignTaskPublicIP(kv, testAccountID, task) + + assert.Empty(t, eips.allocated) + assert.Empty(t, task.ENIPublicIP) +} + +func TestReleaseTaskPublicIP_ReleasesAndClears(t *testing.T) { + svc, _, _ := serviceTestRig(t) + eips := &stubEIPs{} + svc.eips = eips + + task := &TaskRecord{TaskID: "t-3", Cluster: "web", ENIPublicIP: "192.0.2.50", ENIEIPAllocationID: "eipalloc-9"} + svc.releaseTaskPublicIP(testAccountID, task) + + assert.Equal(t, []string{"eipalloc-9"}, eips.released) + assert.Empty(t, task.ENIPublicIP) + assert.Empty(t, task.ENIEIPAllocationID) +} + +func TestReleaseTaskPublicIP_NoAllocationNoOp(t *testing.T) { + svc, _, _ := serviceTestRig(t) + eips := &stubEIPs{} + svc.eips = eips + + task := &TaskRecord{TaskID: "t-4", Cluster: "web"} + svc.releaseTaskPublicIP(testAccountID, task) + + assert.Empty(t, eips.released) +} diff --git a/spinifex/handlers/ecs/instancerole.go b/spinifex/handlers/ecs/instancerole.go new file mode 100644 index 000000000..b82321a08 --- /dev/null +++ b/spinifex/handlers/ecs/instancerole.go @@ -0,0 +1,147 @@ +package handlers_ecs + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iam" + "github.com/mulgadc/spinifex/spinifex/awserrors" +) + +const ( + // ecsInstanceRoleName is the role + instance-profile name AWS uses for ECS + // container instances. The agent draws its creds from this role over IMDS. + ecsInstanceRoleName = "ecsInstanceRole" + + // ecsInstanceRolePolicyName is the customer-managed policy granting ecs:* so + // the gateway's assumed-role ECS authz (checkPolicy) admits the agent. + ecsInstanceRolePolicyName = "ecsInstanceRolePolicy" + + // ecsAssumeRolePolicy is the EC2 trust the STS AssumeRoleForInstance path + // whitelists; it must match exactly for IMDS role-cred vending to admit it. + ecsAssumeRolePolicy = `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]}` + + // ecsInstanceRolePolicyDoc grants the container-instance agent the ECS + // control-plane actions the gateway enforces for assumed-role principals. + ecsInstanceRolePolicyDoc = `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"ecs:*","Resource":"*"}]}` +) + +// ensureECSInstanceProfile find-or-creates the ecsInstanceRole, its ecs:* policy +// attachment, and the matching instance profile, returning the profile ARN. +// Every step is idempotent so concurrent ProvisionCapacity calls converge. +func (s *Service) ensureECSInstanceProfile(accountID string) (string, error) { + if err := s.ensureECSRole(accountID); err != nil { + return "", err + } + if err := s.ensureECSRolePolicy(accountID); err != nil { + return "", err + } + return s.ensureECSInstanceProfileBinding(accountID) +} + +// ensureECSRole find-or-creates ecsInstanceRole with the EC2 trust policy, +// converging on a racing creator via re-GetRole. +func (s *Service) ensureECSRole(accountID string) error { + _, err := s.deps.IAM.GetRole(accountID, &iam.GetRoleInput{RoleName: aws.String(ecsInstanceRoleName)}) + if err == nil { + return nil + } + if err.Error() != awserrors.ErrorIAMNoSuchEntity { + return fmt.Errorf("get role %q: %w", ecsInstanceRoleName, err) + } + + _, err = s.deps.IAM.CreateRole(accountID, &iam.CreateRoleInput{ + RoleName: aws.String(ecsInstanceRoleName), + AssumeRolePolicyDocument: aws.String(ecsAssumeRolePolicy), + }) + if err == nil { + return nil + } + if err.Error() != awserrors.ErrorIAMEntityAlreadyExists { + return fmt.Errorf("create role %q: %w", ecsInstanceRoleName, err) + } + // A racing call created it first; re-read to converge. + if _, gerr := s.deps.IAM.GetRole(accountID, &iam.GetRoleInput{RoleName: aws.String(ecsInstanceRoleName)}); gerr != nil { + return fmt.Errorf("re-get role %q: %w", ecsInstanceRoleName, gerr) + } + return nil +} + +// ensureECSRolePolicy creates the ecs:* policy (resolving an existing one on a +// race) and attaches it to the role; an already-attached policy is success. +func (s *Service) ensureECSRolePolicy(accountID string) error { + policyARN := fmt.Sprintf("arn:aws:iam::%s:policy/%s", accountID, ecsInstanceRolePolicyName) + + out, err := s.deps.IAM.CreatePolicy(accountID, &iam.CreatePolicyInput{ + PolicyName: aws.String(ecsInstanceRolePolicyName), + PolicyDocument: aws.String(ecsInstanceRolePolicyDoc), + }) + switch { + case err == nil: + if out != nil && out.Policy != nil { + policyARN = aws.StringValue(out.Policy.Arn) + } + case err.Error() == awserrors.ErrorIAMEntityAlreadyExists: + // Policy already exists; the account ARN form is deterministic. + default: + return fmt.Errorf("create policy %q: %w", ecsInstanceRolePolicyName, err) + } + + _, err = s.deps.IAM.AttachRolePolicy(accountID, &iam.AttachRolePolicyInput{ + RoleName: aws.String(ecsInstanceRoleName), + PolicyArn: aws.String(policyARN), + }) + if err != nil && err.Error() != awserrors.ErrorIAMEntityAlreadyExists { + return fmt.Errorf("attach policy %q to role %q: %w", policyARN, ecsInstanceRoleName, err) + } + return nil +} + +// ensureECSInstanceProfileBinding guarantees the ecsInstanceRole instance +// profile exists and carries the role, returning its ARN. Mirrors the EKS +// node-profile ensure path; idempotent under concurrent launches. +func (s *Service) ensureECSInstanceProfileBinding(accountID string) (string, error) { + out, err := s.deps.IAM.GetInstanceProfile(accountID, &iam.GetInstanceProfileInput{ + InstanceProfileName: aws.String(ecsInstanceRoleName), + }) + if err == nil { + return s.attachECSRoleToProfile(accountID, aws.StringValue(out.InstanceProfile.Arn), len(out.InstanceProfile.Roles) > 0) + } + if err.Error() != awserrors.ErrorIAMNoSuchEntity { + return "", fmt.Errorf("get instance profile %q: %w", ecsInstanceRoleName, err) + } + + created, err := s.deps.IAM.CreateInstanceProfile(accountID, &iam.CreateInstanceProfileInput{ + InstanceProfileName: aws.String(ecsInstanceRoleName), + }) + if err != nil { + if err.Error() != awserrors.ErrorIAMEntityAlreadyExists { + return "", fmt.Errorf("create instance profile %q: %w", ecsInstanceRoleName, err) + } + got, gerr := s.deps.IAM.GetInstanceProfile(accountID, &iam.GetInstanceProfileInput{ + InstanceProfileName: aws.String(ecsInstanceRoleName), + }) + if gerr != nil { + return "", fmt.Errorf("re-get instance profile %q: %w", ecsInstanceRoleName, gerr) + } + return s.attachECSRoleToProfile(accountID, aws.StringValue(got.InstanceProfile.Arn), len(got.InstanceProfile.Roles) > 0) + } + return s.attachECSRoleToProfile(accountID, aws.StringValue(created.InstanceProfile.Arn), false) +} + +// attachECSRoleToProfile adds the role to the profile unless already attached, +// returning the profile ARN. A LimitExceeded error means a racing launch +// attached it first and is treated as success. +func (s *Service) attachECSRoleToProfile(accountID, profileARN string, alreadyAttached bool) (string, error) { + if alreadyAttached { + return profileARN, nil + } + _, err := s.deps.IAM.AddRoleToInstanceProfile(accountID, &iam.AddRoleToInstanceProfileInput{ + InstanceProfileName: aws.String(ecsInstanceRoleName), + RoleName: aws.String(ecsInstanceRoleName), + }) + if err != nil && err.Error() != awserrors.ErrorIAMLimitExceeded { + return "", fmt.Errorf("add role to instance profile %q: %w", ecsInstanceRoleName, err) + } + return profileARN, nil +} diff --git a/spinifex/handlers/ecs/instances.go b/spinifex/handlers/ecs/instances.go index f42cead93..792dc044c 100644 --- a/spinifex/handlers/ecs/instances.go +++ b/spinifex/handlers/ecs/instances.go @@ -2,6 +2,7 @@ package handlers_ecs import ( "encoding/json" + "log/slog" "slices" "time" @@ -225,17 +226,23 @@ func (s *Service) recordTaskState(msg *bus.TaskState) error { return err } - // Register the task's ELBv2 targets on the transition into RUNNING (Q8). + // Register ELBv2 targets and assign a public IP on the transition into + // RUNNING (Q8). assignTaskPublicIP persists the EIP onto the task itself. if msg.LastStatus == TaskStatusRunning && prev != TaskStatusRunning { s.registerServiceTargets(kv, msg.AccountID, &task) + s.assignTaskPublicIP(kv, msg.AccountID, &task) } - // Deregister targets, release capacity + reclaim the task ENI once, on the - // transition into STOPPED. + // Deregister targets, release the public IP, release capacity + reclaim the + // task ENI once, on the transition into STOPPED. if msg.LastStatus == TaskStatusStopped && prev != TaskStatusStopped { s.deregisterServiceTargets(kv, msg.AccountID, &task) + s.releaseTaskPublicIP(msg.AccountID, &task) s.reclaimAssignInbox(kv, msg.ClusterName, task.ContainerInstanceID, msg.TaskID) s.reclaimTaskENI(msg.AccountID, &task) + if perr := putJSON(kv, TaskKey(msg.ClusterName, msg.TaskID), &task); perr != nil { + slog.Error("ECS task STOPPED: persist after EIP release failed", "task", msg.TaskID, "err", perr) + } return s.releaseReservation(kv, msg.ClusterName, task.ContainerInstanceID, msg.TaskID, task.ReservedCPU, task.ReservedMemoryMiB) } return nil diff --git a/spinifex/handlers/ecs/records.go b/spinifex/handlers/ecs/records.go index 1ebe44cda..4fa579f1b 100644 --- a/spinifex/handlers/ecs/records.go +++ b/spinifex/handlers/ecs/records.go @@ -186,14 +186,19 @@ type TaskRecord struct { NetworkMode string `json:"networkMode,omitempty"` // ENI* hold the per-task elastic network interface for awsvpc mode, allocated // by the scheduler at placement and reclaimed at STOPPED. Empty otherwise. - ENIID string `json:"eniId,omitempty"` - ENIAttachmentID string `json:"eniAttachmentId,omitempty"` - ENIPrivateIP string `json:"eniPrivateIp,omitempty"` - ENIMacAddress string `json:"eniMac,omitempty"` - ENISubnetID string `json:"eniSubnetId,omitempty"` - CreatedAt time.Time `json:"createdAt"` - StartedAt time.Time `json:"startedAt,omitzero"` - StoppedAt time.Time `json:"stoppedAt,omitzero"` + ENIID string `json:"eniId,omitempty"` + ENIAttachmentID string `json:"eniAttachmentId,omitempty"` + ENIPrivateIP string `json:"eniPrivateIp,omitempty"` + ENIMacAddress string `json:"eniMac,omitempty"` + ENISubnetID string `json:"eniSubnetId,omitempty"` + // ENIPublicIP / ENIEIPAllocationID hold the auto-assigned Elastic IP for an + // awsvpc task whose service has AssignPublicIp=ENABLED. Set on the RUNNING + // transition and released on STOPPED. Empty otherwise. + ENIPublicIP string `json:"eniPublicIp,omitempty"` + ENIEIPAllocationID string `json:"eniEipAllocationId,omitempty"` + CreatedAt time.Time `json:"createdAt"` + StartedAt time.Time `json:"startedAt,omitzero"` + StoppedAt time.Time `json:"stoppedAt,omitzero"` } // LoadBalancerTarget is one ELBv2 target-group attachment on a service. On task diff --git a/spinifex/handlers/ecs/service.go b/spinifex/handlers/ecs/service.go index 1b0b6b981..e299721c6 100644 --- a/spinifex/handlers/ecs/service.go +++ b/spinifex/handlers/ecs/service.go @@ -10,7 +10,9 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ecs" + "github.com/aws/aws-sdk-go/service/iam" "github.com/mulgadc/spinifex/spinifex/awserrors" "github.com/nats-io/nats.go" ) @@ -51,6 +53,40 @@ type ECSService interface { // PollAssignments drains an instance's task-assignment inbox (agent → gateway). PollAssignments(input *PollAssignmentsInput, accountID string) (*PollAssignmentsOutput, error) + + // ProvisionCapacity launches container-instance EC2 capacity into a cluster. + ProvisionCapacity(input *ProvisionCapacityInput, accountID string) (*ProvisionCapacityOutput, error) +} + +// ecsImageResolver is the narrow AMI surface for resolving the spinifex-ecs-node +// AMI by tag. +type ecsImageResolver interface { + DescribeImages(input *ec2.DescribeImagesInput, accountID string) (*ec2.DescribeImagesOutput, error) +} + +// ecsIAM is the narrow IAM surface ProvisionCapacity needs to find-or-create the +// ecsInstanceRole, its ecs:* policy, and the instance profile workers expose +// over IMDS. Method signatures match the daemon IAM service implementation. +type ecsIAM interface { + GetRole(accountID string, input *iam.GetRoleInput) (*iam.GetRoleOutput, error) + CreateRole(accountID string, input *iam.CreateRoleInput) (*iam.CreateRoleOutput, error) + CreatePolicy(accountID string, input *iam.CreatePolicyInput) (*iam.CreatePolicyOutput, error) + AttachRolePolicy(accountID string, input *iam.AttachRolePolicyInput) (*iam.AttachRolePolicyOutput, error) + GetInstanceProfile(accountID string, input *iam.GetInstanceProfileInput) (*iam.GetInstanceProfileOutput, error) + CreateInstanceProfile(accountID string, input *iam.CreateInstanceProfileInput) (*iam.CreateInstanceProfileOutput, error) + AddRoleToInstanceProfile(accountID string, input *iam.AddRoleToInstanceProfileInput) (*iam.AddRoleToInstanceProfileOutput, error) +} + +// Deps are the collaborators ProvisionCapacity needs: the gateway endpoint/CA to +// seed the agent's config, the IAM service to back the instance profile, the +// image resolver for the AMI, and the customer RunInstances path. Nil deps +// disable capacity provisioning; the wired actions stay usable. +type Deps struct { + GatewayBaseURL string + GatewayCACert string + IAM ecsIAM + Images ecsImageResolver + RunInstances func(*ec2.RunInstancesInput, string) (*ec2.Reservation, error) } // Service is the daemon-side ECS control-plane implementation, backed by the @@ -66,15 +102,29 @@ type Service struct { // targets registers/deregisters service tasks with ELBv2 target groups. // Defaults to the NATS-backed registrar; tests substitute a stub. targets targetRegistrar + // eips allocates/associates and releases an Elastic IP for awsvpc tasks whose + // service has AssignPublicIp=ENABLED. Defaults to the NATS-backed manager; + // tests substitute a stub. + eips eipManager + // deps carries the collaborators ProvisionCapacity needs (gateway endpoint/CA, + // IAM service, image resolver, customer RunInstances path). Wired via WithDeps. + deps Deps } var _ ECSService = (*Service)(nil) +// WithDeps attaches the ProvisionCapacity collaborators and returns the Service +// for chaining. Non-breaking: NewService stays usable without deps. +func (s *Service) WithDeps(d Deps) *Service { + s.deps = d + return s +} + // NewService constructs a Service bound to a NATS connection. region scopes the // ARNs it mints; suffix is the AWS-parity internal DNS suffix (reserved for ECR // endpoint composition). func NewService(nc *nats.Conn, region, suffix string) *Service { - return &Service{nc: nc, region: region, suffix: suffix, eni: newNATSENIController(nc), targets: newNATSTargetRegistrar(nc)} + return &Service{nc: nc, region: region, suffix: suffix, eni: newNATSENIController(nc), targets: newNATSTargetRegistrar(nc), eips: newNATSEIPManager(nc)} } // defaultCluster is the implicit cluster name when a request omits one. @@ -257,9 +307,28 @@ func (r *ClusterRecord) toAWS() *ecs.Cluster { ClusterName: aws.String(r.Name), ClusterArn: aws.String(r.ARN), Status: aws.String(r.Status), + Tags: tagsToAWS(r.Tags), } } +// tagsToAWS converts a stored tag map into the AWS list form with a stable +// key order so Describe output is deterministic. +func tagsToAWS(tags map[string]string) []*ecs.Tag { + if len(tags) == 0 { + return nil + } + keys := make([]string, 0, len(tags)) + for k := range tags { + keys = append(keys, k) + } + sort.Strings(keys) + out := make([]*ecs.Tag, 0, len(keys)) + for _, k := range keys { + out = append(out, &ecs.Tag{Key: aws.String(k), Value: aws.String(tags[k])}) + } + return out +} + // --- Task definition --- // RegisterTaskDefinition stores a new revision of a family, bumping latest-rev. diff --git a/spinifex/handlers/ecs/service_nats.go b/spinifex/handlers/ecs/service_nats.go index feee9b3bb..3201b2564 100644 --- a/spinifex/handlers/ecs/service_nats.go +++ b/spinifex/handlers/ecs/service_nats.go @@ -132,3 +132,9 @@ func (s *NATSECSService) ListServices(input *ecs.ListServicesInput, accountID st func (s *NATSECSService) PollAssignments(input *PollAssignmentsInput, accountID string) (*PollAssignmentsOutput, error) { return utils.NATSRequest[PollAssignmentsOutput](s.natsConn, "ecs.PollAssignments", input, defaultTimeout, accountID) } + +// --- Capacity --- + +func (s *NATSECSService) ProvisionCapacity(input *ProvisionCapacityInput, accountID string) (*ProvisionCapacityOutput, error) { + return utils.NATSRequest[ProvisionCapacityOutput](s.natsConn, "ecs.ProvisionCapacity", input, defaultTimeout, accountID) +} diff --git a/spinifex/handlers/ecs/service_test.go b/spinifex/handlers/ecs/service_test.go index e6f39d7bc..479c85b78 100644 --- a/spinifex/handlers/ecs/service_test.go +++ b/spinifex/handlers/ecs/service_test.go @@ -52,6 +52,32 @@ func TestService_DescribeClusters_DefaultAndMissing(t *testing.T) { assert.Empty(t, miss.Clusters) } +func TestService_DescribeClusters_ReturnsTags(t *testing.T) { + svc, _ := newTestService(t) + _, err := svc.CreateCluster(&ecs.CreateClusterInput{ + ClusterName: aws.String("web"), + Tags: []*ecs.Tag{ + {Key: aws.String("team"), Value: aws.String("infra")}, + {Key: aws.String("env"), Value: aws.String("prod")}, + }, + }, testAccountID) + require.NoError(t, err) + + out, err := svc.DescribeClusters(&ecs.DescribeClustersInput{ + Clusters: []*string{aws.String("web")}, + }, testAccountID) + require.NoError(t, err) + require.Len(t, out.Clusters, 1) + + tags := out.Clusters[0].Tags + require.Len(t, tags, 2) + // Stable key order: sorted ascending. + assert.Equal(t, "env", aws.StringValue(tags[0].Key)) + assert.Equal(t, "prod", aws.StringValue(tags[0].Value)) + assert.Equal(t, "team", aws.StringValue(tags[1].Key)) + assert.Equal(t, "infra", aws.StringValue(tags[1].Value)) +} + func registerTaskDef(t *testing.T, svc *Service, family string, cpu, mem int) *ecs.RegisterTaskDefinitionOutput { t.Helper() out, err := svc.RegisterTaskDefinition(&ecs.RegisterTaskDefinitionInput{ diff --git a/spinifex/handlers/ecs/services.go b/spinifex/handlers/ecs/services.go index 1d386fa5d..1637bd15d 100644 --- a/spinifex/handlers/ecs/services.go +++ b/spinifex/handlers/ecs/services.go @@ -7,10 +7,12 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ecs" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/google/uuid" "github.com/mulgadc/spinifex/spinifex/awserrors" + handlers_ec2_eip "github.com/mulgadc/spinifex/spinifex/handlers/ec2/eip" handlers_elbv2 "github.com/mulgadc/spinifex/spinifex/handlers/elbv2" "github.com/nats-io/nats.go" ) @@ -51,6 +53,68 @@ func (r *natsTargetRegistrar) Deregister(accountID, tgARN, ip string, port int) return err } +// eipManager gives an awsvpc task a public endpoint by allocating an Elastic IP +// and associating it with the task ENI, and releases it on STOPPED. The +// scheduler is the single writer, mirroring targetRegistrar. +type eipManager interface { + AllocateAndAssociate(accountID, eniID string) (publicIP, allocationID string, err error) + Release(accountID, allocationID string) error +} + +// natsEIPManager drives the existing ec2 EIP NATS handlers; no new surface is +// added for ECS. +type natsEIPManager struct { + nc *nats.Conn +} + +var _ eipManager = (*natsEIPManager)(nil) + +func newNATSEIPManager(nc *nats.Conn) *natsEIPManager { + return &natsEIPManager{nc: nc} +} + +func (m *natsEIPManager) AllocateAndAssociate(accountID, eniID string) (string, string, error) { + svc := handlers_ec2_eip.NewNATSEIPService(m.nc) + alloc, err := svc.AllocateAddress(&ec2.AllocateAddressInput{Domain: aws.String("vpc")}, accountID) + if err != nil { + return "", "", err + } + publicIP, allocationID := aws.StringValue(alloc.PublicIp), aws.StringValue(alloc.AllocationId) + if _, err = svc.AssociateAddress(&ec2.AssociateAddressInput{ + AllocationId: alloc.AllocationId, + NetworkInterfaceId: aws.String(eniID), + }, accountID); err != nil { + // Release the orphaned allocation so a failed associate leaks nothing. + if _, rerr := svc.ReleaseAddress(&ec2.ReleaseAddressInput{AllocationId: alloc.AllocationId}, accountID); rerr != nil { + slog.Error("ECS auto-EIP: release after failed associate", "alloc", allocationID, "err", rerr) + } + return "", "", err + } + return publicIP, allocationID, nil +} + +func (m *natsEIPManager) Release(accountID, allocationID string) error { + svc := handlers_ec2_eip.NewNATSEIPService(m.nc) + // Disassociate first (VPC EIPs cannot be released while associated); the + // association ID is resolved from the allocation. + desc, err := svc.DescribeAddresses(&ec2.DescribeAddressesInput{ + AllocationIds: []*string{aws.String(allocationID)}, + }, accountID) + if err == nil { + for _, addr := range desc.Addresses { + if addr.AssociationId != nil && *addr.AssociationId != "" { + if _, derr := svc.DisassociateAddress(&ec2.DisassociateAddressInput{ + AssociationId: addr.AssociationId, + }, accountID); derr != nil { + slog.Error("ECS auto-EIP: disassociate failed", "alloc", allocationID, "err", derr) + } + } + } + } + _, err = svc.ReleaseAddress(&ec2.ReleaseAddressInput{AllocationId: aws.String(allocationID)}, accountID) + return err +} + // --- Service API --- // CreateService persists a REPLICA service and reconciles up to desiredCount. diff --git a/spinifex/handlers/ecs/services_eip_nats_test.go b/spinifex/handlers/ecs/services_eip_nats_test.go new file mode 100644 index 000000000..d2e954a25 --- /dev/null +++ b/spinifex/handlers/ecs/services_eip_nats_test.go @@ -0,0 +1,120 @@ +package handlers_ecs + +import ( + "encoding/json" + "sync" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/mulgadc/spinifex/spinifex/testutil" + "github.com/mulgadc/spinifex/spinifex/utils" + "github.com/nats-io/nats.go" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// fakeEIPBackend answers the ec2 EIP NATS subjects with canned responses so the +// real natsEIPManager (the ec2-EIP NATS client) can be driven end to end. +type fakeEIPBackend struct { + mu sync.Mutex + associateFails bool + associatedENI string + disassociated string + releasedAlloc string +} + +const ( + fakeAllocID = "eipalloc-test1" + fakePublicIP = "203.0.113.7" + fakeAssocID = "eipassoc-test1" +) + +func (b *fakeEIPBackend) register(t *testing.T, nc *nats.Conn) { + t.Helper() + reply := func(msg *nats.Msg, out any) { data, _ := json.Marshal(out); _ = msg.Respond(data) } + handlers := map[string]func(*nats.Msg){ + "ec2.AllocateAddress": func(msg *nats.Msg) { + reply(msg, &ec2.AllocateAddressOutput{ + AllocationId: aws.String(fakeAllocID), PublicIp: aws.String(fakePublicIP), Domain: aws.String("vpc"), + }) + }, + "ec2.AssociateAddress": func(msg *nats.Msg) { + var in ec2.AssociateAddressInput + _ = json.Unmarshal(msg.Data, &in) + if b.associateFails { + _ = msg.Respond(utils.GenerateErrorPayload("InvalidParameterValue")) + return + } + b.mu.Lock() + b.associatedENI = aws.StringValue(in.NetworkInterfaceId) + b.mu.Unlock() + reply(msg, &ec2.AssociateAddressOutput{AssociationId: aws.String(fakeAssocID)}) + }, + "ec2.DescribeAddresses": func(msg *nats.Msg) { + reply(msg, &ec2.DescribeAddressesOutput{Addresses: []*ec2.Address{ + {AllocationId: aws.String(fakeAllocID), AssociationId: aws.String(fakeAssocID)}, + }}) + }, + "ec2.DisassociateAddress": func(msg *nats.Msg) { + var in ec2.DisassociateAddressInput + _ = json.Unmarshal(msg.Data, &in) + b.mu.Lock() + b.disassociated = aws.StringValue(in.AssociationId) + b.mu.Unlock() + reply(msg, &ec2.DisassociateAddressOutput{}) + }, + "ec2.ReleaseAddress": func(msg *nats.Msg) { + var in ec2.ReleaseAddressInput + _ = json.Unmarshal(msg.Data, &in) + b.mu.Lock() + b.releasedAlloc = aws.StringValue(in.AllocationId) + b.mu.Unlock() + reply(msg, &ec2.ReleaseAddressOutput{}) + }, + } + for subj, h := range handlers { + sub, err := nc.Subscribe(subj, h) + require.NoError(t, err) + t.Cleanup(func() { _ = sub.Unsubscribe() }) + } +} + +func TestNATSEIPManager_AllocateAndAssociate(t *testing.T) { + _, nc := testutil.StartTestNATS(t) + backend := &fakeEIPBackend{} + backend.register(t, nc) + + pub, alloc, err := newNATSEIPManager(nc).AllocateAndAssociate(testAccountID, "eni-target") + require.NoError(t, err) + assert.Equal(t, fakePublicIP, pub) + assert.Equal(t, fakeAllocID, alloc) + backend.mu.Lock() + defer backend.mu.Unlock() + assert.Equal(t, "eni-target", backend.associatedENI) +} + +// A failed AssociateAddress must release the orphaned allocation so nothing leaks. +func TestNATSEIPManager_AssociateFailureReleasesAllocation(t *testing.T) { + _, nc := testutil.StartTestNATS(t) + backend := &fakeEIPBackend{associateFails: true} + backend.register(t, nc) + + _, _, err := newNATSEIPManager(nc).AllocateAndAssociate(testAccountID, "eni-target") + require.Error(t, err) + backend.mu.Lock() + defer backend.mu.Unlock() + assert.Equal(t, fakeAllocID, backend.releasedAlloc, "orphaned allocation should be released") +} + +func TestNATSEIPManager_ReleaseDisassociatesThenReleases(t *testing.T) { + _, nc := testutil.StartTestNATS(t) + backend := &fakeEIPBackend{} + backend.register(t, nc) + + require.NoError(t, newNATSEIPManager(nc).Release(testAccountID, fakeAllocID)) + backend.mu.Lock() + defer backend.mu.Unlock() + assert.Equal(t, fakeAssocID, backend.disassociated) + assert.Equal(t, fakeAllocID, backend.releasedAlloc) +} diff --git a/spinifex/handlers/ecs/task_stop.go b/spinifex/handlers/ecs/task_stop.go index c3d280ada..2b94f886e 100644 --- a/spinifex/handlers/ecs/task_stop.go +++ b/spinifex/handlers/ecs/task_stop.go @@ -4,6 +4,7 @@ import ( "encoding/json" "errors" "log/slog" + "strings" "time" "github.com/aws/aws-sdk-go/aws" @@ -150,6 +151,9 @@ func (s *Service) forceStopTask(kv nats.KeyValue, accountID string, task *TaskRe task.DesiredStatus = TaskStatusStopped task.StoppedReason = reason task.StoppedAt = now + // Release the auto-assigned EIP before persisting so the cleared public IP + // lands in this single write. + s.releaseTaskPublicIP(accountID, task) if perr := putJSON(kv, TaskKey(task.Cluster, task.TaskID), task); perr != nil { slog.Error("ECS forceStopTask: persist failed", "task", task.TaskID, "err", perr) return @@ -209,3 +213,47 @@ func (s *Service) applyServiceTargets(kv nats.KeyValue, accountID string, task * } } } + +// assignTaskPublicIP allocates + associates an Elastic IP to a service task's +// ENI when the owning service has AssignPublicIp=ENABLED, then persists the +// public IP onto the task. No-op for non-service or non-awsvpc tasks, or when an +// EIP is already assigned. Best-effort: a failure logs and leaves the task with +// only its private endpoint. +func (s *Service) assignTaskPublicIP(kv nats.KeyValue, accountID string, task *TaskRecord) { + if s.eips == nil || task.ENIID == "" || task.ENIPublicIP != "" { + return + } + name := serviceNameFromGroup(task.Group) + if name == "" { + return + } + var svc ServiceRecord + found, err := getJSON(kv, ServiceKey(task.Cluster, name), &svc) + if err != nil || !found || !strings.EqualFold(svc.AssignPublicIP, "ENABLED") { + return + } + publicIP, allocID, err := s.eips.AllocateAndAssociate(accountID, task.ENIID) + if err != nil { + slog.Error("ECS auto-EIP assign failed", "task", task.TaskID, "eni", task.ENIID, "err", err) + return + } + task.ENIPublicIP = publicIP + task.ENIEIPAllocationID = allocID + if perr := putJSON(kv, TaskKey(task.Cluster, task.TaskID), task); perr != nil { + slog.Error("ECS auto-EIP: persist public IP failed", "task", task.TaskID, "err", perr) + } +} + +// releaseTaskPublicIP disassociates + releases a task's auto-assigned Elastic IP +// and clears the record. No-op when no EIP was assigned. The cleared record is +// reflected back into task; callers on the STOPPED path persist it. +func (s *Service) releaseTaskPublicIP(accountID string, task *TaskRecord) { + if s.eips == nil || task.ENIEIPAllocationID == "" { + return + } + if err := s.eips.Release(accountID, task.ENIEIPAllocationID); err != nil { + slog.Error("ECS auto-EIP release failed", "task", task.TaskID, "alloc", task.ENIEIPAllocationID, "err", err) + } + task.ENIPublicIP = "" + task.ENIEIPAllocationID = "" +} diff --git a/spinifex/handlers/ecs/tasks.go b/spinifex/handlers/ecs/tasks.go index 9ab0131f2..5cf56877c 100644 --- a/spinifex/handlers/ecs/tasks.go +++ b/spinifex/handlers/ecs/tasks.go @@ -280,7 +280,7 @@ func (s *Service) taskToAWS(accountID string, r *TaskRecord) *ecs.Task { t.StoppedReason = aws.String(r.StoppedReason) } if r.ENIID != "" { - t.Attachments = append(t.Attachments, &ecs.Attachment{ + att := &ecs.Attachment{ Id: aws.String(r.ENIAttachmentID), Type: aws.String("ElasticNetworkInterface"), Status: aws.String(r.LastStatus), @@ -290,7 +290,12 @@ func (s *Service) taskToAWS(accountID string, r *TaskRecord) *ecs.Task { {Name: aws.String("macAddress"), Value: aws.String(r.ENIMacAddress)}, {Name: aws.String("subnetId"), Value: aws.String(r.ENISubnetID)}, }, - }) + } + if r.ENIPublicIP != "" { + att.Details = append(att.Details, + &ecs.KeyValuePair{Name: aws.String("publicIPv4Address"), Value: aws.String(r.ENIPublicIP)}) + } + t.Attachments = append(t.Attachments, att) } for _, c := range r.Containers { ctr := &ecs.Container{Name: aws.String(c.Name), LastStatus: aws.String(c.Status)} diff --git a/spinifex/handlers/ecs/userdata.go b/spinifex/handlers/ecs/userdata.go new file mode 100644 index 000000000..2d8597395 --- /dev/null +++ b/spinifex/handlers/ecs/userdata.go @@ -0,0 +1,58 @@ +package handlers_ecs + +import ( + "fmt" + "strings" +) + +// ecsGatewayCAPath is the on-VM gateway CA PEM path the agent verifies TLS against. +const ecsGatewayCAPath = "/etc/spinifex-ecs/gateway-ca.pem" + +// containerInstanceUserDataInput carries the control-plane endpoint a container +// instance needs to register. No credentials: the agent draws auto-rotating +// instance-role creds from IMDS, matching AWS ecsInstanceRole. +type containerInstanceUserDataInput struct { + GatewayURL string + GatewayCACert string + Region string + ClusterName string +} + +// containerInstanceUserDataFile is one cloud-config write_files entry. +type containerInstanceUserDataFile struct { + Path string + Perms string + Body string +} + +// buildContainerInstanceUserData renders the #cloud-config for an ECS +// container-instance VM. It seeds only the agent's control-plane config + the +// gateway TLS CA; credentials come from IMDS, so no keys are written. +func buildContainerInstanceUserData(in containerInstanceUserDataInput) string { + agentBody := strings.Join([]string{ + "ECS_GATEWAY_URL=" + in.GatewayURL, + "ECS_GATEWAY_CA=" + ecsGatewayCAPath, + "ECS_REGION=" + in.Region, + "ECS_CLUSTER=" + in.ClusterName, + }, "\n") + + files := []containerInstanceUserDataFile{ + {Path: "/etc/spinifex-ecs/agent.env", Perms: "0600", Body: agentBody}, + {Path: ecsGatewayCAPath, Perms: "0644", Body: strings.TrimRight(in.GatewayCACert, "\n")}, + } + + var buf strings.Builder + buf.WriteString("#cloud-config\n") + buf.WriteString("write_files:\n") + for _, f := range files { + fmt.Fprintf(&buf, " - path: %s\n", f.Path) + fmt.Fprintf(&buf, " permissions: '%s'\n", f.Perms) + buf.WriteString(" content: |\n") + for line := range strings.SplitSeq(f.Body, "\n") { + buf.WriteString(" ") + buf.WriteString(line) + buf.WriteString("\n") + } + } + return buf.String() +} diff --git a/spinifex/handlers/ecs/userdata_test.go b/spinifex/handlers/ecs/userdata_test.go new file mode 100644 index 000000000..48ff021c2 --- /dev/null +++ b/spinifex/handlers/ecs/userdata_test.go @@ -0,0 +1,32 @@ +package handlers_ecs + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestBuildContainerInstanceUserData(t *testing.T) { + const caPEM = "-----BEGIN CERTIFICATE-----\nMIIBfakefakefake\n-----END CERTIFICATE-----" + udata := buildContainerInstanceUserData(containerInstanceUserDataInput{ + GatewayURL: "https://10.0.0.1:9999", + GatewayCACert: caPEM, + Region: "ap-southeast-2", + ClusterName: "web", + }) + + assert.Contains(t, udata, "#cloud-config") + assert.Contains(t, udata, "ECS_GATEWAY_URL=https://10.0.0.1:9999") + assert.Contains(t, udata, "ECS_GATEWAY_CA="+ecsGatewayCAPath) + assert.Contains(t, udata, "ECS_REGION=ap-southeast-2") + assert.Contains(t, udata, "ECS_CLUSTER=web") + + // The CA PEM is written inline under the gateway-ca.pem file. + assert.Contains(t, udata, "path: "+ecsGatewayCAPath) + assert.Contains(t, udata, "-----BEGIN CERTIFICATE-----") + assert.Contains(t, udata, "-----END CERTIFICATE-----") + + // No credentials ever touch the instance; the agent uses IMDS role creds. + assert.NotContains(t, udata, "ECS_ACCESS_KEY") + assert.NotContains(t, udata, "ECS_SECRET_KEY") +} diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_.js b/spinifex/services/spinifexui/frontend/dist/assets/_.js index 0b93dbc74..e70afd106 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{It as i,Rt as a,Wt as o,zt as s}from"./auth.js";import{t as c}from"./back-link.js";import{n as l,r as u,t as d}from"./upload-button.js";import{r as f}from"./s3.js";import{St as p,w as m}from"./index.js";import{t as h}from"./error-banner.js";var g=t(),_=e();function v(){let e=(0,g.c)(24),{bucket:t,_splat:v}=m.useParams(),y=a(v??``),{data:b}=n(p(t,y)),x=f(),S;e[0]===b.Contents?S=e[1]:(S=b.Contents??[],e[0]=b.Contents,e[1]=S);let C=S,w;e[2]===b.CommonPrefixes?w=e[3]:(w=b.CommonPrefixes??[],e[2]=b.CommonPrefixes,e[3]=w);let T=w,E=y.split(`/`).filter(Boolean),D=[{name:t,path:`/s3/ls/${t}`},...E.map((e,n)=>({name:e,path:`/s3/ls/${t}/${`${E.slice(0,n+1).join(`/`)}/`}`}))],O=E.length>1?`/s3/ls/${t}/${E.slice(0,-1).join(`/`)}/`:`/s3/ls/${t}`,k;e[4]===O?k=e[5]:(k=(0,_.jsx)(c,{to:O,children:`Back`}),e[4]=O,e[5]=k);let A;e[6]!==t||e[7]!==y||e[8]!==x.isPending||e[9]!==x.mutateAsync?(A=(0,_.jsx)(d,{bucket:t,isPending:x.isPending,onUpload:x.mutateAsync,prefix:y}),e[6]=t,e[7]=y,e[8]=x.isPending,e[9]=x.mutateAsync,e[10]=A):A=e[10];let j;e[11]===x.error?j=e[12]:(j=x.error&&(0,_.jsx)(h,{error:x.error,msg:`Failed to upload object`}),e[11]=x.error,e[12]=j);let M;e[13]!==t||e[14]!==T||e[15]!==y?(M=T.length>0&&(0,_.jsxs)(`div`,{className:`mb-6`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,_.jsx)(`div`,{className:`space-y-2`,children:T.map(e=>e.Prefix?(0,_.jsx)(u,{bucketName:t,folderName:o(s(e.Prefix,y)),fullPrefix:i(e.Prefix,y)},e.Prefix):null)})]}),e[13]=t,e[14]=T,e[15]=y,e[16]=M):M=e[16];let N;e[17]!==t||e[18]!==C||e[19]!==y?(N=C.length>0&&(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),C.map(e=>e.Key?(0,_.jsx)(l,{bucketName:t,displayName:s(e.Key,y),fullKey:i(e.Key,y),object:e},e.Key):null)]}),e[17]=t,e[18]=C,e[19]=y,e[20]=N):N=e[20];let P;return e[21]!==T.length||e[22]!==C.length?(P=C.length===0&&T.length===0&&(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this folder.`}),e[21]=T.length,e[22]=C.length,e[23]=P):P=e[23],(0,_.jsxs)(_.Fragment,{children:[k,(0,_.jsx)(`div`,{className:`mb-6`,children:(0,_.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,_.jsx)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:D.map((e,t)=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t>0&&(0,_.jsx)(`span`,{children:`/`}),t===D.length-1?(0,_.jsx)(`span`,{className:`text-foreground`,children:e.name}):(0,_.jsx)(r,{className:`hover:text-foreground`,to:e.path,children:e.name})]},e.path))}),A]})}),j,M,N,P]})}export{v as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{It as i,Rt as a,Wt as o,zt as s}from"./auth.js";import{t as c}from"./back-link.js";import{n as l,r as u,t as d}from"./upload-button.js";import{r as f}from"./s3.js";import{E as p,wt as m}from"./index.js";import{t as h}from"./error-banner.js";var g=t(),_=e();function v(){let e=(0,g.c)(24),{bucket:t,_splat:v}=p.useParams(),y=a(v??``),{data:b}=n(m(t,y)),x=f(),S;e[0]===b.Contents?S=e[1]:(S=b.Contents??[],e[0]=b.Contents,e[1]=S);let C=S,w;e[2]===b.CommonPrefixes?w=e[3]:(w=b.CommonPrefixes??[],e[2]=b.CommonPrefixes,e[3]=w);let T=w,E=y.split(`/`).filter(Boolean),D=[{name:t,path:`/s3/ls/${t}`},...E.map((e,n)=>({name:e,path:`/s3/ls/${t}/${`${E.slice(0,n+1).join(`/`)}/`}`}))],O=E.length>1?`/s3/ls/${t}/${E.slice(0,-1).join(`/`)}/`:`/s3/ls/${t}`,k;e[4]===O?k=e[5]:(k=(0,_.jsx)(c,{to:O,children:`Back`}),e[4]=O,e[5]=k);let A;e[6]!==t||e[7]!==y||e[8]!==x.isPending||e[9]!==x.mutateAsync?(A=(0,_.jsx)(d,{bucket:t,isPending:x.isPending,onUpload:x.mutateAsync,prefix:y}),e[6]=t,e[7]=y,e[8]=x.isPending,e[9]=x.mutateAsync,e[10]=A):A=e[10];let j;e[11]===x.error?j=e[12]:(j=x.error&&(0,_.jsx)(h,{error:x.error,msg:`Failed to upload object`}),e[11]=x.error,e[12]=j);let M;e[13]!==t||e[14]!==T||e[15]!==y?(M=T.length>0&&(0,_.jsxs)(`div`,{className:`mb-6`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,_.jsx)(`div`,{className:`space-y-2`,children:T.map(e=>e.Prefix?(0,_.jsx)(u,{bucketName:t,folderName:o(s(e.Prefix,y)),fullPrefix:i(e.Prefix,y)},e.Prefix):null)})]}),e[13]=t,e[14]=T,e[15]=y,e[16]=M):M=e[16];let N;e[17]!==t||e[18]!==C||e[19]!==y?(N=C.length>0&&(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),C.map(e=>e.Key?(0,_.jsx)(l,{bucketName:t,displayName:s(e.Key,y),fullKey:i(e.Key,y),object:e},e.Key):null)]}),e[17]=t,e[18]=C,e[19]=y,e[20]=N):N=e[20];let P;return e[21]!==T.length||e[22]!==C.length?(P=C.length===0&&T.length===0&&(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this folder.`}),e[21]=T.length,e[22]=C.length,e[23]=P):P=e[23],(0,_.jsxs)(_.Fragment,{children:[k,(0,_.jsx)(`div`,{className:`mb-6`,children:(0,_.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,_.jsx)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:D.map((e,t)=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t>0&&(0,_.jsx)(`span`,{children:`/`}),t===D.length-1?(0,_.jsx)(`span`,{className:`text-foreground`,children:e.name}):(0,_.jsx)(r,{className:`hover:text-foreground`,to:e.path,children:e.name})]},e.path))}),A]})}),j,M,N,P]})}export{v as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_auth.js b/spinifex/services/spinifexui/frontend/dist/assets/_auth.js index af4fc8d15..f3bd88793 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_auth.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_auth.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{ni as a}from"./awsClient.js";import{Ut as o}from"./auth.js";import{t as s}from"./chevron-down.js";import{t as c}from"./chevron-right.js";import{$t as l,Br as u,Ct as d,Gr as f,Gt as p,Hr as m,It as h,Mt as g,Pt as _,Rr as v,Rt as y,Tt as b,Ur as x,Vr as S,Wr as C,Zt as w,qr as T,tn as E,zr as D}from"./index.js";import{t as O}from"./page-heading.js";import{t as k}from"./state-badge.js";import{r as A,t as ee}from"./admin.js";import{t as te}from"./badge.js";import{a as j,i as M,n as N,o as ne,r as P,t as F}from"./card.js";var I=T(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),L=T(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),R=T(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),re=T(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),z=r(),B=t(n(),1),V=e(),H=[{name:`Air-gap Support`,key:`airgap`},{name:`NVIDIA Bluefield DPU`,key:`bluefield`},{name:`NVIDIA MIG Support`,key:`mig`}];function U(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function W(){let e=(0,z.c)(110),{isAdmin:t,version:n,license:r}=E(),[a,o]=(0,B.useState)(!1),l;e[0]===t?l=e[1]:(l={...ee,enabled:t},e[0]=t,e[1]=l);let{data:d}=i(l),f;e[2]===t?f=e[3]:(f={...A,enabled:t},e[2]=t,e[3]=f);let{data:p}=i(f);if(!t||!n)return null;let m,h,g,_,v,y,b,x,S,C,w,T,D,O,k,M,N,I,L;if(e[4]!==r||e[5]!==d?.cluster_mode||e[6]!==d?.nodes||e[7]!==n.arch||e[8]!==n.commit||e[9]!==n.os||e[10]!==n.version||e[11]!==p?.vms){_=d?.nodes??[];let t;e[31]===p?.vms?t=e[32]:(t=p?.vms??[],e[31]=p?.vms,e[32]=t);let i=t,a=d?.cluster_mode??`single-node`;g=r===`open-source`;let o=_[0]?.region??null,s=_.reduce(se,0),c=_.reduce(oe,0),l=_.reduce(ae,0),f=_.reduce(ie,0);w=`mb-6 space-y-4`,x=`grid grid-cols-1 gap-4 md:grid-cols-3`;let E;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,V.jsx)(j,{className:`pb-2`,children:(0,V.jsxs)(ne,{className:`flex items-center gap-2 text-sm`,children:[(0,V.jsx)(re,{className:`size-3.5`}),`Spinifex Info`]})}),e[33]=E):E=e[33];let A;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Version`}),e[34]=A):A=e[34];let ee;e[35]===n.version?ee=e[36]:(ee=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[A,(0,V.jsx)(`span`,{className:`font-mono`,children:n.version})]}),e[35]=n.version,e[36]=ee);let R;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Commit`}),e[37]=R):R=e[37];let z;e[38]===n.commit?z=e[39]:(z=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[R,(0,V.jsx)(`span`,{className:`font-mono`,children:n.commit})]}),e[38]=n.commit,e[39]=z);let B;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Platform`}),e[40]=B):B=e[40];let H;e[41]!==n.arch||e[42]!==n.os?(H=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[B,(0,V.jsxs)(`span`,{children:[n.os,`/`,n.arch]})]}),e[41]=n.arch,e[42]=n.os,e[43]=H):H=e[43],S=(0,V.jsxs)(F,{children:[E,(0,V.jsxs)(P,{className:`space-y-1 text-xs`,children:[ee,z,H,o&&(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Region`}),(0,V.jsx)(`span`,{children:o})]})]})]});let U;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,V.jsx)(j,{className:`pb-2`,children:(0,V.jsx)(ne,{className:`text-sm`,children:`License & Support`})}),e[44]=U):U=e[44];let W;e[45]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`License`}),e[45]=W):W=e[45];let ce=g?`secondary`:`default`,G=g?`Open Source (AGPLv3)`:`Commercial`,K;e[46]!==ce||e[47]!==G?(K=(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[W,(0,V.jsx)(te,{variant:ce,children:G})]}),e[46]=ce,e[47]=G,e[48]=K):K=e[48];let q;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Support`}),e[49]=q):q=e[49];let J=g?`Community`:`Standard`,Y;e[50]===J?Y=e[51]:(Y=(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[q,(0,V.jsx)(`span`,{children:J})]}),e[50]=J,e[51]=Y);let X;e[52]===g?X=e[53]:(X=g&&(0,V.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-2 block text-xs font-medium text-primary hover:underline`,children:`Upgrade to Commercial →`}),e[52]=g,e[53]=X),e[54]!==K||e[55]!==Y||e[56]!==X?(C=(0,V.jsxs)(F,{children:[U,(0,V.jsxs)(P,{className:`space-y-2 text-xs`,children:[K,Y,X]})]}),e[54]=K,e[55]=Y,e[56]=X,e[57]=C):C=e[57],h=F,e[58]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,V.jsx)(j,{className:`pb-2`,children:(0,V.jsxs)(ne,{className:`flex items-center gap-2 text-sm`,children:[(0,V.jsx)(u,{className:`size-3.5`}),`Cluster Status`]})}),e[58]=b):b=e[58],m=P,N=`space-y-2 text-xs`,e[59]===a?I=e[60]:(I=(0,V.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,V.jsx)(te,{variant:`outline`,children:a})}),e[59]=a,e[60]=I);let Z;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Nodes`}),e[61]=Z):Z=e[61],L=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[Z,(0,V.jsx)(`span`,{children:_.length})]});let Q;e[62]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Instances`}),e[62]=Q):Q=e[62],e[63]===i.length?v=e[64]:(v=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[Q,(0,V.jsx)(`span`,{children:i.length})]}),e[63]=i.length,e[64]=v);let $;e[65]===Symbol.for(`react.memo_cache_sentinel`)?($=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`vCPU`}),e[65]=$):$=e[65],y=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[$,(0,V.jsxs)(`span`,{children:[c,` / `,s]})]}),k=`flex justify-between`,e[66]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Memory`}),e[66]=M):M=e[66],T=f.toFixed(1),D=` / `,O=l.toFixed(1),e[4]=r,e[5]=d?.cluster_mode,e[6]=d?.nodes,e[7]=n.arch,e[8]=n.commit,e[9]=n.os,e[10]=n.version,e[11]=p?.vms,e[12]=m,e[13]=h,e[14]=g,e[15]=_,e[16]=v,e[17]=y,e[18]=b,e[19]=x,e[20]=S,e[21]=C,e[22]=w,e[23]=T,e[24]=D,e[25]=O,e[26]=k,e[27]=M,e[28]=N,e[29]=I,e[30]=L}else m=e[12],h=e[13],g=e[14],_=e[15],v=e[16],y=e[17],b=e[18],x=e[19],S=e[20],C=e[21],w=e[22],T=e[23],D=e[24],O=e[25],k=e[26],M=e[27],N=e[28],I=e[29],L=e[30];let U;e[67]!==T||e[68]!==D||e[69]!==O?(U=(0,V.jsxs)(`span`,{children:[T,D,O,` GB`]}),e[67]=T,e[68]=D,e[69]=O,e[70]=U):U=e[70];let W;e[71]!==U||e[72]!==k||e[73]!==M?(W=(0,V.jsxs)(`div`,{className:k,children:[M,U]}),e[71]=U,e[72]=k,e[73]=M,e[74]=W):W=e[74];let G;e[75]!==m||e[76]!==v||e[77]!==y||e[78]!==W||e[79]!==N||e[80]!==I||e[81]!==L?(G=(0,V.jsxs)(m,{className:N,children:[I,L,v,y,W]}),e[75]=m,e[76]=v,e[77]=y,e[78]=W,e[79]=N,e[80]=I,e[81]=L,e[82]=G):G=e[82];let K;e[83]!==h||e[84]!==b||e[85]!==G?(K=(0,V.jsxs)(h,{children:[b,G]}),e[83]=h,e[84]=b,e[85]=G,e[86]=K):K=e[86];let q;e[87]!==x||e[88]!==S||e[89]!==C||e[90]!==K?(q=(0,V.jsxs)(`div`,{className:x,children:[S,C,K]}),e[87]=x,e[88]=S,e[89]=C,e[90]=K,e[91]=q):q=e[91];let J;e[92]!==_||e[93]!==a?(J=_.length>0&&(0,V.jsxs)(F,{children:[(0,V.jsx)(j,{className:`pb-0`,children:(0,V.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 text-sm font-medium`,onClick:()=>o(!a),children:[a?(0,V.jsx)(s,{className:`size-3.5`}):(0,V.jsx)(c,{className:`size-3.5`}),`Nodes (`,_.length,`)`]})}),a&&(0,V.jsx)(P,{className:`pt-2`,children:(0,V.jsx)(ce,{nodes:_})})]}),e[92]=_,e[93]=a,e[94]=J):J=e[94];let Y;e[95]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,V.jsx)(j,{className:`pb-2`,children:(0,V.jsx)(ne,{className:`text-sm`,children:`Commercial Add-ons`})}),e[95]=Y):Y=e[95];let X;e[96]===g?X=e[97]:(X=H.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,V.jsx)(`span`,{className:g?`text-muted-foreground`:void 0,children:e.name}),g?(0,V.jsx)(R,{className:`size-3 text-muted-foreground`}):(0,V.jsx)(te,{variant:`outline`,className:`text-[0.625rem]`,children:`Active`})]},e.key)),e[96]=g,e[97]=X);let Z;e[98]===X?Z=e[99]:(Z=(0,V.jsx)(`div`,{className:`space-y-2`,children:X}),e[98]=X,e[99]=Z);let Q;e[100]===g?Q=e[101]:(Q=g&&(0,V.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-3 block text-xs font-medium text-primary hover:underline`,children:`Learn more about commercial features →`}),e[100]=g,e[101]=Q);let $;e[102]!==Z||e[103]!==Q?($=(0,V.jsxs)(F,{children:[Y,(0,V.jsxs)(P,{children:[Z,Q]})]}),e[102]=Z,e[103]=Q,e[104]=$):$=e[104];let le;return e[105]!==w||e[106]!==q||e[107]!==J||e[108]!==$?(le=(0,V.jsxs)(`div`,{className:w,children:[q,J,$]}),e[105]=w,e[106]=q,e[107]=J,e[108]=$,e[109]=le):le=e[109],le}function ie(e,t){return e+t.alloc_mem_gb}function ae(e,t){return e+t.total_mem_gb}function oe(e,t){return e+t.alloc_vcpu}function se(e,t){return e+t.total_vcpu}function ce(e){let t=(0,z.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,V.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(G),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,V.jsx)(`div`,{className:`overflow-x-auto`,children:(0,V.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,V.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function G(e){return(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,V.jsx)(te,{variant:e.status===`Ready`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,V.jsxs)(`div`,{className:`flex gap-1`,children:[e.nats_role&&(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[`nats:`,e.nats_role]}),e.predastore_role&&(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[`ps:`,e.predastore_role]})]})}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:U(e.uptime)}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,V.jsx)(`td`,{className:`py-1.5`,children:(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.services.length})})]},e.node)}var K=5;function q(){let e=(0,z.c)(11),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(O,{title:`Dashboard`}),n=(0,V.jsx)(W,{}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(J,{}),children:(0,V.jsx)(Q,{})}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(J,{}),children:(0,V.jsx)(me,{})}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(J,{}),children:(0,V.jsx)(ye,{})}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(J,{}),children:(0,V.jsx)(xe,{})}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(J,{}),children:(0,V.jsx)(Ce,{})}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(J,{}),children:(0,V.jsx)(Te,{})}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(J,{}),children:(0,V.jsx)(De,{})}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(J,{}),children:(0,V.jsx)(je,{})}),e[9]=u):u=e[9];let d;return e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,V.jsxs)(V.Fragment,{children:[t,n,(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[r,i,a,o,s,c,l,u,(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(J,{}),children:(0,V.jsx)(ke,{})})]})]}),e[10]=d):d=e[10],d}function J(){let e=(0,z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(j,{children:(0,V.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded bg-muted`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsxs)(F,{children:[t,(0,V.jsx)(P,{children:(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`div`,{className:`h-3 w-48 animate-pulse rounded bg-muted`}),(0,V.jsx)(`div`,{className:`h-3 w-36 animate-pulse rounded bg-muted`})]})})]}),e[1]=n):n=e[1],n}function Y(e){let t=(0,z.c)(16),{title:n,icon:r,count:i,to:o,children:s}=e,c;t[0]!==r||t[1]!==n?(c=(0,V.jsxs)(ne,{className:`flex items-center gap-2`,children:[r,n]}),t[0]=r,t[1]=n,t[2]=c):c=t[2];let l;t[3]===i?l=t[4]:(l=(0,V.jsx)(N,{children:(0,V.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-0.5 text-xs font-semibold tabular-nums`,children:i})}),t[3]=i,t[4]=l);let u;t[5]!==c||t[6]!==l?(u=(0,V.jsxs)(j,{children:[c,l]}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]===s?d=t[9]:(d=(0,V.jsx)(P,{children:s}),t[8]=s,t[9]=d);let f;t[10]===o?f=t[11]:(f=(0,V.jsx)(M,{children:(0,V.jsx)(a,{to:o,className:`text-xs font-medium text-primary hover:underline`,children:`View all →`})}),t[10]=o,t[11]=f);let p;return t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,V.jsxs)(F,{children:[u,d,f]}),t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function X(e){let t=(0,z.c)(2),{total:n}=e;if(n<=K)return null;let r=n-K,i;return t[0]===r?i=t[1]:(i=(0,V.jsxs)(`p`,{className:`mt-1 text-[0.625rem] text-muted-foreground`,children:[`+`,r,` more`]}),t[0]=r,t[1]=i),i}function Z(e){let t=(0,z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,V.jsx)(`div`,{className:`flex items-center justify-between py-0.5 text-xs`,children:n}),t[0]=n,t[1]=r),r}function Q(){let e=(0,z.c)(16),{data:t}=i(g),n,r,a,o,s;if(e[0]!==t?.Reservations){let i=t?.Reservations?.flatMap(pe)??[];n=i.filter(fe),a=i.filter(de),o=i.filter(ue),r=i.filter(le),s=[...a,...r].slice(0,K),e[0]=t?.Reservations,e[1]=n,e[2]=r,e[3]=a,e[4]=o,e[5]=s}else n=e[1],r=e[2],a=e[3],o=e[4],s=e[5];let c=s,l;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,V.jsx)(C,{className:`size-3.5`}),e[6]=l):l=e[6];let u;e[7]!==n.length||e[8]!==c||e[9]!==r||e[10]!==a||e[11]!==o?(u=n.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`mb-2 flex gap-3 text-[0.625rem] text-muted-foreground`,children:[(0,V.jsxs)(`span`,{children:[a.length,` running`]}),(0,V.jsxs)(`span`,{children:[o.length,` stopped`]})]}),(0,V.jsx)(`div`,{className:`space-y-0.5`,children:c.map($)}),(0,V.jsx)(X,{total:a.length+r.length})]}),e[7]=n.length,e[8]=c,e[9]=r,e[10]=a,e[11]=o,e[12]=u):u=e[12];let d;return e[13]!==n.length||e[14]!==u?(d=(0,V.jsx)(Y,{title:`Instances`,icon:l,count:n.length,to:`/ec2/describe-instances`,children:u}),e[13]=n.length,e[14]=u,e[15]=d):d=e[15],d}function $(e){return(0,V.jsxs)(Z,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.InstanceId}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.InstanceType})]},e.InstanceId)}function le(e){return e.State?.Name===`pending`}function ue(e){return e.State?.Name===`stopped`}function de(e){return e.State?.Name===`running`}function fe(e){return e.State?.Name!==`terminated`}function pe(e){return e.Instances??[]}function me(){let e=(0,z.c)(3),{data:t}=i(w),n;if(e[0]!==t?.Volumes){let r=t?.Volumes??[],i=r.reduce(ve,0),a=r.filter(_e),o=r.filter(ge),s=r.slice(0,K),c;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(I,{className:`size-3.5`}),e[2]=c):c=e[2],n=(0,V.jsx)(Y,{title:`Volumes`,icon:c,count:r.length,to:`/ec2/describe-volumes`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No volumes`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`mb-2 flex gap-3 text-[0.625rem] text-muted-foreground`,children:[(0,V.jsxs)(`span`,{children:[i,` GiB total`]}),(0,V.jsxs)(`span`,{children:[a.length,` in-use`]}),(0,V.jsxs)(`span`,{children:[o.length,` available`]})]}),(0,V.jsx)(`div`,{className:`space-y-0.5`,children:s.map(he)}),(0,V.jsx)(X,{total:r.length})]})}),e[0]=t?.Volumes,e[1]=n}else n=e[1];return n}function he(e){return(0,V.jsxs)(Z,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.VolumeId}),(0,V.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.Size,` GiB`]}),(0,V.jsx)(k,{state:e.State})]})]},e.VolumeId)}function ge(e){return e.State===`available`}function _e(e){return e.State===`in-use`}function ve(e,t){return e+(t.Size??0)}function ye(){let e=(0,z.c)(3),{data:t}=i(l),n;if(e[0]!==t?.Vpcs){let r=t?.Vpcs??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(m,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,V.jsx)(Y,{title:`VPCs`,icon:a,count:r.length,to:`/ec2/describe-vpcs`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No VPCs`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(be),(0,V.jsx)(X,{total:r.length})]})}),e[0]=t?.Vpcs,e[1]=n}else n=e[1];return n}function be(e){let t=o(e.Tags);return(0,V.jsxs)(Z,{children:[(0,V.jsxs)(`span`,{className:`font-mono`,children:[e.VpcId,t&&(0,V.jsxs)(`span`,{className:`ml-1 font-sans text-muted-foreground`,children:[`(`,t,`)`]})]}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.CidrBlock})]},e.VpcId)}function xe(){let e=(0,z.c)(3),{data:t}=i(h),n;if(e[0]!==t?.KeyPairs){let r=t?.KeyPairs??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(x,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,V.jsx)(Y,{title:`Key Pairs`,icon:a,count:r.length,to:`/ec2/describe-key-pairs`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No key pairs`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Se),(0,V.jsx)(X,{total:r.length})]})}),e[0]=t?.KeyPairs,e[1]=n}else n=e[1];return n}function Se(e){return(0,V.jsx)(Z,{children:(0,V.jsx)(`span`,{className:`font-mono`,children:e.KeyName})},e.KeyPairId)}function Ce(){let e=(0,z.c)(3),{data:t}=i(d),n;if(e[0]!==t?.Buckets){let r=t?.Buckets??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(L,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,V.jsx)(Y,{title:`S3 Buckets`,icon:a,count:r.length,to:`/s3/ls`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No buckets`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(we),(0,V.jsx)(X,{total:r.length})]})}),e[0]=t?.Buckets,e[1]=n}else n=e[1];return n}function we(e){return(0,V.jsx)(Z,{children:(0,V.jsx)(`span`,{className:`font-mono`,children:e.Name})},e.Name)}function Te(){let e=(0,z.c)(3),{data:t}=i(p),n;if(e[0]!==t?.SecurityGroups){let r=t?.SecurityGroups??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(D,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,V.jsx)(Y,{title:`Security Groups`,icon:a,count:r.length,to:`/ec2/describe-security-groups`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Ee),(0,V.jsx)(X,{total:r.length})]})}),e[0]=t?.SecurityGroups,e[1]=n}else n=e[1];return n}function Ee(e){return(0,V.jsxs)(Z,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.GroupName}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.VpcId})]},e.GroupId)}function De(){let e=(0,z.c)(3),{data:t}=i(y),n;if(e[0]!==t?.NatGateways){let r=t?.NatGateways??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(v,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,V.jsx)(Y,{title:`NAT Gateways`,icon:a,count:r.length,to:`/ec2/describe-nat-gateways`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No NAT gateways`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Oe),(0,V.jsx)(X,{total:r.length})]})}),e[0]=t?.NatGateways,e[1]=n}else n=e[1];return n}function Oe(e){return(0,V.jsxs)(Z,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.NatGatewayId}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.State})]},e.NatGatewayId)}function ke(){let e=(0,z.c)(3),{data:t}=i(_),n;if(e[0]!==t?.InternetGateways){let r=t?.InternetGateways??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(S,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,V.jsx)(Y,{title:`Internet Gateways`,icon:a,count:r.length,to:`/ec2/describe-internet-gateways`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No internet gateways`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Ae),(0,V.jsx)(X,{total:r.length})]})}),e[0]=t?.InternetGateways,e[1]=n}else n=e[1];return n}function Ae(e){return(0,V.jsxs)(Z,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.InternetGatewayId}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.Attachments?.[0]?.VpcId?`attached`:`detached`})]},e.InternetGatewayId)}function je(){let e=(0,z.c)(3),{data:t}=i(b),n;if(e[0]!==t?.Addresses){let r=t?.Addresses??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(f,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,V.jsx)(Y,{title:`Elastic IPs`,icon:a,count:r.length,to:`/ec2/describe-addresses`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No Elastic IPs`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Me),(0,V.jsx)(X,{total:r.length})]})}),e[0]=t?.Addresses,e[1]=n}else n=e[1];return n}function Me(e){return(0,V.jsxs)(Z,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.PublicIp}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.AssociationId?`associated`:`available`})]},e.AllocationId)}export{q as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{ni as a}from"./awsClient.js";import{Ut as o}from"./auth.js";import{t as s}from"./chevron-down.js";import{t as c}from"./chevron-right.js";import{$t as l,Br as u,Bt as d,Dt as f,Gr as p,Hr as ee,It as m,Kr as h,Pt as g,Rt as _,Tt as v,Ur as y,Vr as b,Wr as x,Yr as S,qr as C,qt as w,rn as T,tn as E}from"./index.js";import{t as D}from"./page-heading.js";import{t as O}from"./state-badge.js";import{r as k,t as A}from"./admin.js";import{t as te}from"./badge.js";import{a as j,i as M,n as N,o as P,r as F,t as I}from"./card.js";var L=S(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),R=S(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),z=S(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),ne=S(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),B=r(),V=t(n(),1),H=e(),re=[{name:`Air-gap Support`,key:`airgap`},{name:`NVIDIA Bluefield DPU`,key:`bluefield`},{name:`NVIDIA MIG Support`,key:`mig`}];function U(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function W(){let e=(0,B.c)(110),{isAdmin:t,version:n,license:r}=T(),[a,o]=(0,V.useState)(!1),l;e[0]===t?l=e[1]:(l={...A,enabled:t},e[0]=t,e[1]=l);let{data:u}=i(l),d;e[2]===t?d=e[3]:(d={...k,enabled:t},e[2]=t,e[3]=d);let{data:f}=i(d);if(!t||!n)return null;let p,m,h,g,_,v,y,b,x,S,C,w,E,D,O,M,N,L,R;if(e[4]!==r||e[5]!==u?.cluster_mode||e[6]!==u?.nodes||e[7]!==n.arch||e[8]!==n.commit||e[9]!==n.os||e[10]!==n.version||e[11]!==f?.vms){g=u?.nodes??[];let t;e[31]===f?.vms?t=e[32]:(t=f?.vms??[],e[31]=f?.vms,e[32]=t);let i=t,a=u?.cluster_mode??`single-node`;h=r===`open-source`;let o=g[0]?.region??null,s=g.reduce(se,0),c=g.reduce(oe,0),l=g.reduce(ae,0),d=g.reduce(ie,0);C=`mb-6 space-y-4`,b=`grid grid-cols-1 gap-4 md:grid-cols-3`;let T;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,H.jsx)(j,{className:`pb-2`,children:(0,H.jsxs)(P,{className:`flex items-center gap-2 text-sm`,children:[(0,H.jsx)(ne,{className:`size-3.5`}),`Spinifex Info`]})}),e[33]=T):T=e[33];let k;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`Version`}),e[34]=k):k=e[34];let A;e[35]===n.version?A=e[36]:(A=(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[k,(0,H.jsx)(`span`,{className:`font-mono`,children:n.version})]}),e[35]=n.version,e[36]=A);let z;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`Commit`}),e[37]=z):z=e[37];let B;e[38]===n.commit?B=e[39]:(B=(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[z,(0,H.jsx)(`span`,{className:`font-mono`,children:n.commit})]}),e[38]=n.commit,e[39]=B);let V;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`Platform`}),e[40]=V):V=e[40];let re;e[41]!==n.arch||e[42]!==n.os?(re=(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[V,(0,H.jsxs)(`span`,{children:[n.os,`/`,n.arch]})]}),e[41]=n.arch,e[42]=n.os,e[43]=re):re=e[43],x=(0,H.jsxs)(I,{children:[T,(0,H.jsxs)(F,{className:`space-y-1 text-xs`,children:[A,B,re,o&&(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`Region`}),(0,H.jsx)(`span`,{children:o})]})]})]});let U;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,H.jsx)(j,{className:`pb-2`,children:(0,H.jsx)(P,{className:`text-sm`,children:`License & Support`})}),e[44]=U):U=e[44];let W;e[45]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`License`}),e[45]=W):W=e[45];let ce=h?`secondary`:`default`,G=h?`Open Source (AGPLv3)`:`Commercial`,K;e[46]!==ce||e[47]!==G?(K=(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[W,(0,H.jsx)(te,{variant:ce,children:G})]}),e[46]=ce,e[47]=G,e[48]=K):K=e[48];let q;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`Support`}),e[49]=q):q=e[49];let J=h?`Community`:`Standard`,Y;e[50]===J?Y=e[51]:(Y=(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[q,(0,H.jsx)(`span`,{children:J})]}),e[50]=J,e[51]=Y);let X;e[52]===h?X=e[53]:(X=h&&(0,H.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-2 block text-xs font-medium text-primary hover:underline`,children:`Upgrade to Commercial →`}),e[52]=h,e[53]=X),e[54]!==K||e[55]!==Y||e[56]!==X?(S=(0,H.jsxs)(I,{children:[U,(0,H.jsxs)(F,{className:`space-y-2 text-xs`,children:[K,Y,X]})]}),e[54]=K,e[55]=Y,e[56]=X,e[57]=S):S=e[57],m=I,e[58]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,H.jsx)(j,{className:`pb-2`,children:(0,H.jsxs)(P,{className:`flex items-center gap-2 text-sm`,children:[(0,H.jsx)(ee,{className:`size-3.5`}),`Cluster Status`]})}),e[58]=y):y=e[58],p=F,N=`space-y-2 text-xs`,e[59]===a?L=e[60]:(L=(0,H.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,H.jsx)(te,{variant:`outline`,children:a})}),e[59]=a,e[60]=L);let Z;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`Nodes`}),e[61]=Z):Z=e[61],R=(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[Z,(0,H.jsx)(`span`,{children:g.length})]});let Q;e[62]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`Instances`}),e[62]=Q):Q=e[62],e[63]===i.length?_=e[64]:(_=(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[Q,(0,H.jsx)(`span`,{children:i.length})]}),e[63]=i.length,e[64]=_);let $;e[65]===Symbol.for(`react.memo_cache_sentinel`)?($=(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`vCPU`}),e[65]=$):$=e[65],v=(0,H.jsxs)(`div`,{className:`flex justify-between`,children:[$,(0,H.jsxs)(`span`,{children:[c,` / `,s]})]}),O=`flex justify-between`,e[66]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:`Memory`}),e[66]=M):M=e[66],w=d.toFixed(1),E=` / `,D=l.toFixed(1),e[4]=r,e[5]=u?.cluster_mode,e[6]=u?.nodes,e[7]=n.arch,e[8]=n.commit,e[9]=n.os,e[10]=n.version,e[11]=f?.vms,e[12]=p,e[13]=m,e[14]=h,e[15]=g,e[16]=_,e[17]=v,e[18]=y,e[19]=b,e[20]=x,e[21]=S,e[22]=C,e[23]=w,e[24]=E,e[25]=D,e[26]=O,e[27]=M,e[28]=N,e[29]=L,e[30]=R}else p=e[12],m=e[13],h=e[14],g=e[15],_=e[16],v=e[17],y=e[18],b=e[19],x=e[20],S=e[21],C=e[22],w=e[23],E=e[24],D=e[25],O=e[26],M=e[27],N=e[28],L=e[29],R=e[30];let U;e[67]!==w||e[68]!==E||e[69]!==D?(U=(0,H.jsxs)(`span`,{children:[w,E,D,` GB`]}),e[67]=w,e[68]=E,e[69]=D,e[70]=U):U=e[70];let W;e[71]!==U||e[72]!==O||e[73]!==M?(W=(0,H.jsxs)(`div`,{className:O,children:[M,U]}),e[71]=U,e[72]=O,e[73]=M,e[74]=W):W=e[74];let G;e[75]!==p||e[76]!==_||e[77]!==v||e[78]!==W||e[79]!==N||e[80]!==L||e[81]!==R?(G=(0,H.jsxs)(p,{className:N,children:[L,R,_,v,W]}),e[75]=p,e[76]=_,e[77]=v,e[78]=W,e[79]=N,e[80]=L,e[81]=R,e[82]=G):G=e[82];let K;e[83]!==m||e[84]!==y||e[85]!==G?(K=(0,H.jsxs)(m,{children:[y,G]}),e[83]=m,e[84]=y,e[85]=G,e[86]=K):K=e[86];let q;e[87]!==b||e[88]!==x||e[89]!==S||e[90]!==K?(q=(0,H.jsxs)(`div`,{className:b,children:[x,S,K]}),e[87]=b,e[88]=x,e[89]=S,e[90]=K,e[91]=q):q=e[91];let J;e[92]!==g||e[93]!==a?(J=g.length>0&&(0,H.jsxs)(I,{children:[(0,H.jsx)(j,{className:`pb-0`,children:(0,H.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 text-sm font-medium`,onClick:()=>o(!a),children:[a?(0,H.jsx)(s,{className:`size-3.5`}):(0,H.jsx)(c,{className:`size-3.5`}),`Nodes (`,g.length,`)`]})}),a&&(0,H.jsx)(F,{className:`pt-2`,children:(0,H.jsx)(ce,{nodes:g})})]}),e[92]=g,e[93]=a,e[94]=J):J=e[94];let Y;e[95]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,H.jsx)(j,{className:`pb-2`,children:(0,H.jsx)(P,{className:`text-sm`,children:`Commercial Add-ons`})}),e[95]=Y):Y=e[95];let X;e[96]===h?X=e[97]:(X=re.map(e=>(0,H.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,H.jsx)(`span`,{className:h?`text-muted-foreground`:void 0,children:e.name}),h?(0,H.jsx)(z,{className:`size-3 text-muted-foreground`}):(0,H.jsx)(te,{variant:`outline`,className:`text-[0.625rem]`,children:`Active`})]},e.key)),e[96]=h,e[97]=X);let Z;e[98]===X?Z=e[99]:(Z=(0,H.jsx)(`div`,{className:`space-y-2`,children:X}),e[98]=X,e[99]=Z);let Q;e[100]===h?Q=e[101]:(Q=h&&(0,H.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-3 block text-xs font-medium text-primary hover:underline`,children:`Learn more about commercial features →`}),e[100]=h,e[101]=Q);let $;e[102]!==Z||e[103]!==Q?($=(0,H.jsxs)(I,{children:[Y,(0,H.jsxs)(F,{children:[Z,Q]})]}),e[102]=Z,e[103]=Q,e[104]=$):$=e[104];let le;return e[105]!==C||e[106]!==q||e[107]!==J||e[108]!==$?(le=(0,H.jsxs)(`div`,{className:C,children:[q,J,$]}),e[105]=C,e[106]=q,e[107]=J,e[108]=$,e[109]=le):le=e[109],le}function ie(e,t){return e+t.alloc_mem_gb}function ae(e,t){return e+t.total_mem_gb}function oe(e,t){return e+t.alloc_vcpu}function se(e,t){return e+t.total_vcpu}function ce(e){let t=(0,B.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,H.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,H.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,H.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,H.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,H.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,H.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,H.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,H.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,H.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(G),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,H.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function G(e){return(0,H.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,H.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,H.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,H.jsx)(te,{variant:e.status===`Ready`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,H.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,H.jsxs)(`div`,{className:`flex gap-1`,children:[e.nats_role&&(0,H.jsxs)(`span`,{className:`text-muted-foreground`,children:[`nats:`,e.nats_role]}),e.predastore_role&&(0,H.jsxs)(`span`,{className:`text-muted-foreground`,children:[`ps:`,e.predastore_role]})]})}),(0,H.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,H.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,H.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,H.jsx)(`td`,{className:`py-1.5 pr-4`,children:U(e.uptime)}),(0,H.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,H.jsx)(`td`,{className:`py-1.5`,children:(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:e.services.length})})]},e.node)}var K=5;function q(){let e=(0,B.c)(11),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,H.jsx)(D,{title:`Dashboard`}),n=(0,H.jsx)(W,{}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(J,{}),children:(0,H.jsx)(Q,{})}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(J,{}),children:(0,H.jsx)(me,{})}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(J,{}),children:(0,H.jsx)(ye,{})}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(J,{}),children:(0,H.jsx)(xe,{})}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(J,{}),children:(0,H.jsx)(Ce,{})}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(J,{}),children:(0,H.jsx)(Te,{})}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(J,{}),children:(0,H.jsx)(De,{})}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(J,{}),children:(0,H.jsx)(je,{})}),e[9]=u):u=e[9];let d;return e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,H.jsxs)(H.Fragment,{children:[t,n,(0,H.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[r,i,a,o,s,c,l,u,(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(J,{}),children:(0,H.jsx)(ke,{})})]})]}),e[10]=d):d=e[10],d}function J(){let e=(0,B.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,H.jsx)(j,{children:(0,H.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded bg-muted`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,H.jsxs)(I,{children:[t,(0,H.jsx)(F,{children:(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`div`,{className:`h-3 w-48 animate-pulse rounded bg-muted`}),(0,H.jsx)(`div`,{className:`h-3 w-36 animate-pulse rounded bg-muted`})]})})]}),e[1]=n):n=e[1],n}function Y(e){let t=(0,B.c)(16),{title:n,icon:r,count:i,to:o,children:s}=e,c;t[0]!==r||t[1]!==n?(c=(0,H.jsxs)(P,{className:`flex items-center gap-2`,children:[r,n]}),t[0]=r,t[1]=n,t[2]=c):c=t[2];let l;t[3]===i?l=t[4]:(l=(0,H.jsx)(N,{children:(0,H.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-0.5 text-xs font-semibold tabular-nums`,children:i})}),t[3]=i,t[4]=l);let u;t[5]!==c||t[6]!==l?(u=(0,H.jsxs)(j,{children:[c,l]}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]===s?d=t[9]:(d=(0,H.jsx)(F,{children:s}),t[8]=s,t[9]=d);let f;t[10]===o?f=t[11]:(f=(0,H.jsx)(M,{children:(0,H.jsx)(a,{to:o,className:`text-xs font-medium text-primary hover:underline`,children:`View all →`})}),t[10]=o,t[11]=f);let p;return t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,H.jsxs)(I,{children:[u,d,f]}),t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function X(e){let t=(0,B.c)(2),{total:n}=e;if(n<=K)return null;let r=n-K,i;return t[0]===r?i=t[1]:(i=(0,H.jsxs)(`p`,{className:`mt-1 text-[0.625rem] text-muted-foreground`,children:[`+`,r,` more`]}),t[0]=r,t[1]=i),i}function Z(e){let t=(0,B.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,H.jsx)(`div`,{className:`flex items-center justify-between py-0.5 text-xs`,children:n}),t[0]=n,t[1]=r),r}function Q(){let e=(0,B.c)(16),{data:t}=i(g),n,r,a,o,s;if(e[0]!==t?.Reservations){let i=t?.Reservations?.flatMap(pe)??[];n=i.filter(fe),a=i.filter(de),o=i.filter(ue),r=i.filter(le),s=[...a,...r].slice(0,K),e[0]=t?.Reservations,e[1]=n,e[2]=r,e[3]=a,e[4]=o,e[5]=s}else n=e[1],r=e[2],a=e[3],o=e[4],s=e[5];let c=s,l;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,H.jsx)(h,{className:`size-3.5`}),e[6]=l):l=e[6];let u;e[7]!==n.length||e[8]!==c||e[9]!==r||e[10]!==a||e[11]!==o?(u=n.length===0?(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`mb-2 flex gap-3 text-[0.625rem] text-muted-foreground`,children:[(0,H.jsxs)(`span`,{children:[a.length,` running`]}),(0,H.jsxs)(`span`,{children:[o.length,` stopped`]})]}),(0,H.jsx)(`div`,{className:`space-y-0.5`,children:c.map($)}),(0,H.jsx)(X,{total:a.length+r.length})]}),e[7]=n.length,e[8]=c,e[9]=r,e[10]=a,e[11]=o,e[12]=u):u=e[12];let d;return e[13]!==n.length||e[14]!==u?(d=(0,H.jsx)(Y,{title:`Instances`,icon:l,count:n.length,to:`/ec2/describe-instances`,children:u}),e[13]=n.length,e[14]=u,e[15]=d):d=e[15],d}function $(e){return(0,H.jsxs)(Z,{children:[(0,H.jsx)(`span`,{className:`font-mono`,children:e.InstanceId}),(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:e.InstanceType})]},e.InstanceId)}function le(e){return e.State?.Name===`pending`}function ue(e){return e.State?.Name===`stopped`}function de(e){return e.State?.Name===`running`}function fe(e){return e.State?.Name!==`terminated`}function pe(e){return e.Instances??[]}function me(){let e=(0,B.c)(3),{data:t}=i(l),n;if(e[0]!==t?.Volumes){let r=t?.Volumes??[],i=r.reduce(ve,0),a=r.filter(_e),o=r.filter(ge),s=r.slice(0,K),c;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,H.jsx)(L,{className:`size-3.5`}),e[2]=c):c=e[2],n=(0,H.jsx)(Y,{title:`Volumes`,icon:c,count:r.length,to:`/ec2/describe-volumes`,children:r.length===0?(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No volumes`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`mb-2 flex gap-3 text-[0.625rem] text-muted-foreground`,children:[(0,H.jsxs)(`span`,{children:[i,` GiB total`]}),(0,H.jsxs)(`span`,{children:[a.length,` in-use`]}),(0,H.jsxs)(`span`,{children:[o.length,` available`]})]}),(0,H.jsx)(`div`,{className:`space-y-0.5`,children:s.map(he)}),(0,H.jsx)(X,{total:r.length})]})}),e[0]=t?.Volumes,e[1]=n}else n=e[1];return n}function he(e){return(0,H.jsxs)(Z,{children:[(0,H.jsx)(`span`,{className:`font-mono`,children:e.VolumeId}),(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,H.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.Size,` GiB`]}),(0,H.jsx)(O,{state:e.State})]})]},e.VolumeId)}function ge(e){return e.State===`available`}function _e(e){return e.State===`in-use`}function ve(e,t){return e+(t.Size??0)}function ye(){let e=(0,B.c)(3),{data:t}=i(E),n;if(e[0]!==t?.Vpcs){let r=t?.Vpcs??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(x,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,H.jsx)(Y,{title:`VPCs`,icon:a,count:r.length,to:`/ec2/describe-vpcs`,children:r.length===0?(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No VPCs`}):(0,H.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(be),(0,H.jsx)(X,{total:r.length})]})}),e[0]=t?.Vpcs,e[1]=n}else n=e[1];return n}function be(e){let t=o(e.Tags);return(0,H.jsxs)(Z,{children:[(0,H.jsxs)(`span`,{className:`font-mono`,children:[e.VpcId,t&&(0,H.jsxs)(`span`,{className:`ml-1 font-sans text-muted-foreground`,children:[`(`,t,`)`]})]}),(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:e.CidrBlock})]},e.VpcId)}function xe(){let e=(0,B.c)(3),{data:t}=i(_),n;if(e[0]!==t?.KeyPairs){let r=t?.KeyPairs??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(p,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,H.jsx)(Y,{title:`Key Pairs`,icon:a,count:r.length,to:`/ec2/describe-key-pairs`,children:r.length===0?(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No key pairs`}):(0,H.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Se),(0,H.jsx)(X,{total:r.length})]})}),e[0]=t?.KeyPairs,e[1]=n}else n=e[1];return n}function Se(e){return(0,H.jsx)(Z,{children:(0,H.jsx)(`span`,{className:`font-mono`,children:e.KeyName})},e.KeyPairId)}function Ce(){let e=(0,B.c)(3),{data:t}=i(v),n;if(e[0]!==t?.Buckets){let r=t?.Buckets??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(R,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,H.jsx)(Y,{title:`S3 Buckets`,icon:a,count:r.length,to:`/s3/ls`,children:r.length===0?(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No buckets`}):(0,H.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(we),(0,H.jsx)(X,{total:r.length})]})}),e[0]=t?.Buckets,e[1]=n}else n=e[1];return n}function we(e){return(0,H.jsx)(Z,{children:(0,H.jsx)(`span`,{className:`font-mono`,children:e.Name})},e.Name)}function Te(){let e=(0,B.c)(3),{data:t}=i(w),n;if(e[0]!==t?.SecurityGroups){let r=t?.SecurityGroups??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(b,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,H.jsx)(Y,{title:`Security Groups`,icon:a,count:r.length,to:`/ec2/describe-security-groups`,children:r.length===0?(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups`}):(0,H.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Ee),(0,H.jsx)(X,{total:r.length})]})}),e[0]=t?.SecurityGroups,e[1]=n}else n=e[1];return n}function Ee(e){return(0,H.jsxs)(Z,{children:[(0,H.jsx)(`span`,{className:`font-mono`,children:e.GroupName}),(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:e.VpcId})]},e.GroupId)}function De(){let e=(0,B.c)(3),{data:t}=i(d),n;if(e[0]!==t?.NatGateways){let r=t?.NatGateways??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(u,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,H.jsx)(Y,{title:`NAT Gateways`,icon:a,count:r.length,to:`/ec2/describe-nat-gateways`,children:r.length===0?(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No NAT gateways`}):(0,H.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Oe),(0,H.jsx)(X,{total:r.length})]})}),e[0]=t?.NatGateways,e[1]=n}else n=e[1];return n}function Oe(e){return(0,H.jsxs)(Z,{children:[(0,H.jsx)(`span`,{className:`font-mono`,children:e.NatGatewayId}),(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:e.State})]},e.NatGatewayId)}function ke(){let e=(0,B.c)(3),{data:t}=i(m),n;if(e[0]!==t?.InternetGateways){let r=t?.InternetGateways??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(y,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,H.jsx)(Y,{title:`Internet Gateways`,icon:a,count:r.length,to:`/ec2/describe-internet-gateways`,children:r.length===0?(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No internet gateways`}):(0,H.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Ae),(0,H.jsx)(X,{total:r.length})]})}),e[0]=t?.InternetGateways,e[1]=n}else n=e[1];return n}function Ae(e){return(0,H.jsxs)(Z,{children:[(0,H.jsx)(`span`,{className:`font-mono`,children:e.InternetGatewayId}),(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:e.Attachments?.[0]?.VpcId?`attached`:`detached`})]},e.InternetGatewayId)}function je(){let e=(0,B.c)(3),{data:t}=i(f),n;if(e[0]!==t?.Addresses){let r=t?.Addresses??[],i=r.slice(0,K),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,H.jsx)(C,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,H.jsx)(Y,{title:`Elastic IPs`,icon:a,count:r.length,to:`/ec2/describe-addresses`,children:r.length===0?(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No Elastic IPs`}):(0,H.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Me),(0,H.jsx)(X,{total:r.length})]})}),e[0]=t?.Addresses,e[1]=n}else n=e[1];return n}function Me(e){return(0,H.jsxs)(Z,{children:[(0,H.jsx)(`span`,{className:`font-mono`,children:e.PublicIp}),(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:e.AssociationId?`associated`:`available`})]},e.AllocationId)}export{q as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_bucket.js b/spinifex/services/spinifexui/frontend/dist/assets/_bucket.js index 2073f455b..e8fb700e7 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_bucket.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_bucket.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{Wt as r}from"./auth.js";import{t as i}from"./back-link.js";import{n as a,r as o,t as s}from"./upload-button.js";import{r as c}from"./s3.js";import{St as l,z as u}from"./index.js";import{t as d}from"./error-banner.js";import{t as f}from"./page-heading.js";var p=t(),m=e();function h(){let e=(0,p.c)(31),{bucket:t}=u.useParams(),h;e[0]===t?h=e[1]:(h=l(t),e[0]=t,e[1]=h);let{data:g}=n(h),_=c(),v;e[2]===g.Contents?v=e[3]:(v=g.Contents??[],e[2]=g.Contents,e[3]=v);let y=v,b;e[4]===g.CommonPrefixes?b=e[5]:(b=g.CommonPrefixes??[],e[4]=g.CommonPrefixes,e[5]=b);let x=b,S;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,m.jsx)(i,{to:`/s3/ls`,children:`Back to buckets`}),e[6]=S):S=e[6];let C;e[7]!==t||e[8]!==_.isPending||e[9]!==_.mutateAsync?(C=(0,m.jsx)(s,{bucket:t,isPending:_.isPending,onUpload:_.mutateAsync}),e[7]=t,e[8]=_.isPending,e[9]=_.mutateAsync,e[10]=C):C=e[10];let w;e[11]!==t||e[12]!==C?(w=(0,m.jsx)(f,{actions:C,title:t}),e[11]=t,e[12]=C,e[13]=w):w=e[13];let T;e[14]===_.error?T=e[15]:(T=_.error&&(0,m.jsx)(d,{error:_.error,msg:`Failed to upload object`}),e[14]=_.error,e[15]=T);let E;e[16]!==t||e[17]!==x?(E=x.length>0&&(0,m.jsxs)(`div`,{className:`mb-6`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,m.jsx)(`div`,{className:`space-y-2`,children:x.map(e=>e.Prefix?(0,m.jsx)(o,{bucketName:t,folderName:r(e.Prefix),fullPrefix:e.Prefix},e.Prefix):null)})]}),e[16]=t,e[17]=x,e[18]=E):E=e[18];let D;e[19]!==t||e[20]!==y?(D=y.length>0&&(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),y.map(e=>e.Key?(0,m.jsx)(a,{bucketName:t,displayName:e.Key,fullKey:e.Key,object:e},e.Key):null)]}),e[19]=t,e[20]=y,e[21]=D):D=e[21];let O;e[22]!==x.length||e[23]!==y.length?(O=y.length===0&&x.length===0&&(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this bucket.`}),e[22]=x.length,e[23]=y.length,e[24]=O):O=e[24];let k;return e[25]!==w||e[26]!==T||e[27]!==E||e[28]!==D||e[29]!==O?(k=(0,m.jsxs)(m.Fragment,{children:[S,w,T,E,D,O]}),e[25]=w,e[26]=T,e[27]=E,e[28]=D,e[29]=O,e[30]=k):k=e[30],k}export{h as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{Wt as r}from"./auth.js";import{t as i}from"./back-link.js";import{n as a,r as o,t as s}from"./upload-button.js";import{r as c}from"./s3.js";import{V as l,wt as u}from"./index.js";import{t as d}from"./error-banner.js";import{t as f}from"./page-heading.js";var p=t(),m=e();function h(){let e=(0,p.c)(31),{bucket:t}=l.useParams(),h;e[0]===t?h=e[1]:(h=u(t),e[0]=t,e[1]=h);let{data:g}=n(h),_=c(),v;e[2]===g.Contents?v=e[3]:(v=g.Contents??[],e[2]=g.Contents,e[3]=v);let y=v,b;e[4]===g.CommonPrefixes?b=e[5]:(b=g.CommonPrefixes??[],e[4]=g.CommonPrefixes,e[5]=b);let x=b,S;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,m.jsx)(i,{to:`/s3/ls`,children:`Back to buckets`}),e[6]=S):S=e[6];let C;e[7]!==t||e[8]!==_.isPending||e[9]!==_.mutateAsync?(C=(0,m.jsx)(s,{bucket:t,isPending:_.isPending,onUpload:_.mutateAsync}),e[7]=t,e[8]=_.isPending,e[9]=_.mutateAsync,e[10]=C):C=e[10];let w;e[11]!==t||e[12]!==C?(w=(0,m.jsx)(f,{actions:C,title:t}),e[11]=t,e[12]=C,e[13]=w):w=e[13];let T;e[14]===_.error?T=e[15]:(T=_.error&&(0,m.jsx)(d,{error:_.error,msg:`Failed to upload object`}),e[14]=_.error,e[15]=T);let E;e[16]!==t||e[17]!==x?(E=x.length>0&&(0,m.jsxs)(`div`,{className:`mb-6`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,m.jsx)(`div`,{className:`space-y-2`,children:x.map(e=>e.Prefix?(0,m.jsx)(o,{bucketName:t,folderName:r(e.Prefix),fullPrefix:e.Prefix},e.Prefix):null)})]}),e[16]=t,e[17]=x,e[18]=E):E=e[18];let D;e[19]!==t||e[20]!==y?(D=y.length>0&&(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),y.map(e=>e.Key?(0,m.jsx)(a,{bucketName:t,displayName:e.Key,fullKey:e.Key,object:e},e.Key):null)]}),e[19]=t,e[20]=y,e[21]=D):D=e[21];let O;e[22]!==x.length||e[23]!==y.length?(O=y.length===0&&x.length===0&&(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this bucket.`}),e[22]=x.length,e[23]=y.length,e[24]=O):O=e[24];let k;return e[25]!==w||e[26]!==T||e[27]!==E||e[28]!==D||e[29]!==O?(k=(0,m.jsxs)(m.Fragment,{children:[S,w,T,E,D,O]}),e[25]=w,e[26]=T,e[27]=E,e[28]=D,e[29]=O,e[30]=k):k=e[30],k}export{h as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName.js b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName.js index 924e6f79b..bc8bb8970 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{ni as a}from"./awsClient.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{a as l,c as u,i as d,l as f,r as p}from"./ecs.js";import{Xr as m,at as h,ct as g,it as _,nt as v,st as y,v as b}from"./index.js";import{t as x}from"./error-banner.js";import{t as S}from"./page-heading.js";import{t as C}from"./delete-confirmation-dialog.js";import{n as w,t as T}from"./detail-row.js";import{t as E}from"./state-badge.js";import{i as D,n as O,r as k,t as A}from"./tabs.js";var j=r(),ee=t(n(),1),M=e(),N={drain:`Drain`,activate:`Activate`,deregister:`Deregister`},P={drain:`Draining force-stops the service-owned tasks on this instance so it can be retired.`,activate:`This returns the instance to ACTIVE so the scheduler can place tasks on it again.`,deregister:`This force-removes the container instance record. Any tasks it still holds are stopped.`};function F(e){let t=(0,j.c)(32),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=_(n),t[0]=n,t[1]=r);let{data:a}=i(r),o=f(),s=d(),[l,u]=(0,ee.useState)(null),p;t[2]!==n||t[3]!==s||t[4]!==l||t[5]!==o?(p=function(){if(!l)return;let e=()=>u(null);if(l.action===`deregister`){s.mutate({cluster:n,containerInstance:l.arn},{onSuccess:e});return}o.mutate({cluster:n,containerInstance:l.arn,status:l.action===`drain`?`DRAINING`:`ACTIVE`},{onSuccess:e})},t[2]=n,t[3]=s,t[4]=l,t[5]=o,t[6]=p):p=t[6];let m=p,h=o.isError||s.isError,g=o.error??s.error,v=o.isPending||s.isPending;if(a.length===0){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`No container instances found.`}),t[7]=e):e=t[7],e}let y;t[8]!==g||t[9]!==h?(y=h&&(0,M.jsx)(x,{error:g instanceof Error?g:void 0,msg:`Container instance action failed.`}),t[8]=g,t[9]=h,t[10]=y):y=t[10];let b,S,w,T;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`EC2 Instance`}),S=(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),w=(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),T=(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),t[11]=b,t[12]=S,t[13]=w,t[14]=T):(b=t[11],S=t[12],w=t[13],T=t[14]);let D;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[b,S,w,T,(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,M.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),t[15]=D):D=t[15];let O;if(t[16]!==a){let e;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>{let t=e.containerInstanceArn??``,n=e.status===`DRAINING`;return(0,M.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,M.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.ec2InstanceId}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:(0,M.jsx)(E,{state:e.status})}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:e.runningTasksCount??0}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingTasksCount??0}),(0,M.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,M.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,M.jsx)(c,{"aria-label":n?`Activate container instance`:`Drain container instance`,onClick:()=>u({arn:t,action:n?`activate`:`drain`}),size:`sm`,variant:`outline`,children:n?`Activate`:`Drain`}),(0,M.jsx)(c,{onClick:()=>u({arn:t,action:`deregister`}),size:`sm`,variant:`destructive`,children:`Deregister`})]})})]},t)},t[18]=e):e=t[18],O=a.map(e),t[16]=a,t[17]=O}else O=t[17];let k;t[19]===O?k=t[20]:(k=(0,M.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,M.jsxs)(`table`,{className:`w-full text-sm`,children:[D,(0,M.jsx)(`tbody`,{children:O})]})}),t[19]=O,t[20]=k);let A=l?N[l.action]:`Confirm`,F=l?P[l.action]:``,I;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>!e&&u(null),t[21]=I):I=t[21];let L=l!==null,R;t[22]!==m||t[23]!==v||t[24]!==A||t[25]!==F||t[26]!==L?(R=(0,M.jsx)(C,{confirmLabel:A,description:F,isPending:v,onConfirm:m,onOpenChange:I,open:L,title:`Container instance`}),t[22]=m,t[23]=v,t[24]=A,t[25]=F,t[26]=L,t[27]=R):R=t[27];let z;return t[28]!==k||t[29]!==R||t[30]!==y?(z=(0,M.jsxs)(M.Fragment,{children:[y,k,R]}),t[28]=k,t[29]=R,t[30]=y,t[31]=z):z=t[31],z}function I(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function L(e){let t=(0,j.c)(12),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=h(n),t[0]=n,t[1]=r);let{data:o}=i(r),s;t[2]===n?s=t[3]:(s={cluster:n},t[2]=n,t[3]=s);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,M.jsx)(c,{size:`sm`,children:`Create service`}),t[4]=l):l=t[4];let u;t[5]===s?u=t[6]:(u=(0,M.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,M.jsx)(a,{search:s,to:`/ecs/create-service`,children:l})}),t[5]=s,t[6]=u);let d;t[7]===o?d=t[8]:(d=o.length===0?(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`No services found.`}):(0,M.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,M.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task Definition`})]})}),(0,M.jsx)(`tbody`,{children:o.map(R)})]})}),t[7]=o,t[8]=d);let f;return t[9]!==u||t[10]!==d?(f=(0,M.jsxs)(M.Fragment,{children:[u,d]}),t[9]=u,t[10]=d,t[11]=f):f=t[11],f}function R(e){return(0,M.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,M.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:e.serviceName}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:(0,M.jsx)(E,{state:e.status})}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredCount??0}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:e.runningCount??0}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingCount??0}),(0,M.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:I(e.taskDefinition)})]},e.serviceArn??e.serviceName)}function z(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function te(e){let t=(0,j.c)(24),{clusterName:n}=e,{data:r}=i(y),o=l(),[s,u]=(0,ee.useState)(null),d;t[0]!==o||t[1]!==s?(d=function(){s&&o.mutate(s,{onSuccess:()=>u(null)})},t[0]=o,t[1]=s,t[2]=d):d=t[2];let f=d,p;t[3]===n?p=t[4]:(p={cluster:n},t[3]=n,t[4]=p);let m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,M.jsx)(c,{size:`sm`,children:`Register task definition`}),t[5]=m):m=t[5];let h;t[6]===p?h=t[7]:(h=(0,M.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,M.jsx)(a,{search:p,to:`/ecs/register-task-definition`,children:m})}),t[6]=p,t[7]=h);let g;t[8]!==o.error||t[9]!==o.isError?(g=o.isError&&(0,M.jsx)(x,{error:o.error instanceof Error?o.error:void 0,msg:`Failed to deregister task definition.`}),t[8]=o.error,t[9]=o.isError,t[10]=g):g=t[10];let _;t[11]===r?_=t[12]:(_=r.length===0?(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`No task definitions found.`}):(0,M.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,M.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Family : Revision`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,M.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,M.jsx)(`tbody`,{children:r.map(e=>{let t=z(e);return(0,M.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,M.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t}),(0,M.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,M.jsx)(c,{onClick:()=>u(t),size:`sm`,variant:`destructive`,children:`Deregister`})})]},e)})})]})}),t[11]=r,t[12]=_);let v=`This marks task definition "${s}" INACTIVE. Existing tasks keep running; no new tasks can use it.`,b;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>!e&&u(null),t[13]=b):b=t[13];let S=s!==null,w;t[14]!==o.isPending||t[15]!==f||t[16]!==v||t[17]!==S?(w=(0,M.jsx)(C,{confirmLabel:`Deregister`,description:v,isPending:o.isPending,onConfirm:f,onOpenChange:b,open:S,pendingLabel:`Deregistering…`,title:`Deregister task definition`}),t[14]=o.isPending,t[15]=f,t[16]=v,t[17]=S,t[18]=w):w=t[18];let T;return t[19]!==w||t[20]!==h||t[21]!==g||t[22]!==_?(T=(0,M.jsxs)(M.Fragment,{children:[h,g,_,w]}),t[19]=w,t[20]=h,t[21]=g,t[22]=_,t[23]=T):T=t[23],T}function B(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function ne(e){let t=(0,j.c)(26),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=g(n),t[0]=n,t[1]=r);let{data:o}=i(r),s=u(),[l,d]=(0,ee.useState)(null),f;t[2]!==n||t[3]!==l||t[4]!==s?(f=function(){l&&s.mutate({cluster:n,task:l},{onSuccess:()=>d(null)})},t[2]=n,t[3]=l,t[4]=s,t[5]=f):f=t[5];let p=f,m;t[6]===n?m=t[7]:(m={cluster:n},t[6]=n,t[7]=m);let h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,M.jsx)(c,{size:`sm`,children:`Run task`}),t[8]=h):h=t[8];let _;t[9]===m?_=t[10]:(_=(0,M.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,M.jsx)(a,{search:m,to:`/ecs/run-task`,children:h})}),t[9]=m,t[10]=_);let v;t[11]!==s.error||t[12]!==s.isError?(v=s.isError&&(0,M.jsx)(x,{error:s.error instanceof Error?s.error:void 0,msg:`Failed to stop task.`}),t[11]=s.error,t[12]=s.isError,t[13]=v):v=t[13];let y;t[14]===o?y=t[15]:(y=o.length===0?(0,M.jsx)(`p`,{className:`text-muted-foreground`,children:`No tasks found.`}):(0,M.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,M.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Last Status`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired Status`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Group`}),(0,M.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,M.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,M.jsx)(`tbody`,{children:o.map(e=>{let t=B(e.taskArn),n=e.lastStatus!==`STOPPED`;return(0,M.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,M.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:(0,M.jsx)(E,{state:e.lastStatus})}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredStatus}),(0,M.jsx)(`td`,{className:`px-4 py-2`,children:e.group}),(0,M.jsx)(`td`,{className:`px-4 py-2 text-right`,children:n&&(0,M.jsx)(c,{onClick:()=>d(e.taskArn??t),size:`sm`,variant:`destructive`,children:`Stop`})})]},t)})})]})}),t[14]=o,t[15]=y);let b;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>!e&&d(null),t[16]=b):b=t[16];let S=l!==null,w;t[17]!==p||t[18]!==s.isPending||t[19]!==S?(w=(0,M.jsx)(C,{confirmLabel:`Stop task`,description:`This stops the task and releases its ENI and reserved capacity.`,isPending:s.isPending,onConfirm:p,onOpenChange:b,open:S,pendingLabel:`Stopping…`,title:`Stop task`}),t[17]=p,t[18]=s.isPending,t[19]=S,t[20]=w):w=t[20];let T;return t[21]!==w||t[22]!==_||t[23]!==v||t[24]!==y?(T=(0,M.jsxs)(M.Fragment,{children:[_,v,y,w]}),t[21]=w,t[22]=_,t[23]=v,t[24]=y,t[25]=T):T=t[25],T}function re(e){let t=(0,j.c)(62),{clusterName:n}=e,r=m(),[a,l]=(0,ee.useState)(!1),u;t[0]===n?u=t[1]:(u=v(n),t[0]=n,t[1]=u);let{data:d}=i(u),f=p(),h;t[2]!==n||t[3]!==f||t[4]!==r?(h=function(){f.mutate(n,{onSuccess:()=>{r({to:`/ecs/list-clusters`})}})},t[2]=n,t[3]=f,t[4]=r,t[5]=h):h=t[5];let g=h,_;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,M.jsx)(o,{to:`/ecs/list-clusters`,children:`Clusters`}),t[6]=_):_=t[6];let y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>l(!0),t[7]=y):y=t[7];let b;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,M.jsxs)(c,{onClick:y,size:`sm`,variant:`destructive`,children:[(0,M.jsx)(s,{className:`size-4`}),`Delete`]}),t[8]=b):b=t[8];let N=d?.status,P;t[9]===N?P=t[10]:(P=(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[b,(0,M.jsx)(E,{state:N})]}),t[9]=N,t[10]=P);let I;t[11]!==n||t[12]!==P?(I=(0,M.jsx)(S,{actions:P,subtitle:`Cluster Details`,title:n}),t[11]=n,t[12]=P,t[13]=I):I=t[13];let R;t[14]!==f.error||t[15]!==f.isError?(R=f.isError&&(0,M.jsx)(x,{error:f.error instanceof Error?f.error:void 0,msg:`Failed to delete cluster.`}),t[14]=f.error,t[15]=f.isError,t[16]=R):R=t[16];let z;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,M.jsxs)(O,{children:[(0,M.jsx)(D,{value:`overview`,children:`Overview`}),(0,M.jsx)(D,{value:`services`,children:`Services`}),(0,M.jsx)(D,{value:`tasks`,children:`Tasks`}),(0,M.jsx)(D,{value:`task-definitions`,children:`Task Definitions`}),(0,M.jsx)(D,{value:`instances`,children:`Container Instances`})]}),t[17]=z):z=t[17];let B;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,M.jsx)(w.Header,{children:`Cluster`}),t[18]=B):B=t[18];let re=d?.clusterArn,V;t[19]===re?V=t[20]:(V=(0,M.jsx)(T,{label:`ARN`,value:re}),t[19]=re,t[20]=V);let ie=d?.status,H;t[21]===ie?H=t[22]:(H=(0,M.jsx)(T,{label:`Status`,value:ie}),t[21]=ie,t[22]=H);let ae=String(d?.activeServicesCount??0),U;t[23]===ae?U=t[24]:(U=(0,M.jsx)(T,{label:`Active services`,value:ae}),t[23]=ae,t[24]=U);let oe=String(d?.runningTasksCount??0),W;t[25]===oe?W=t[26]:(W=(0,M.jsx)(T,{label:`Running tasks`,value:oe}),t[25]=oe,t[26]=W);let se=String(d?.pendingTasksCount??0),G;t[27]===se?G=t[28]:(G=(0,M.jsx)(T,{label:`Pending tasks`,value:se}),t[27]=se,t[28]=G);let ce=String(d?.registeredContainerInstancesCount??0),K;t[29]===ce?K=t[30]:(K=(0,M.jsx)(T,{label:`Registered instances`,value:ce}),t[29]=ce,t[30]=K);let q;t[31]!==V||t[32]!==H||t[33]!==U||t[34]!==W||t[35]!==G||t[36]!==K?(q=(0,M.jsx)(k,{value:`overview`,children:(0,M.jsxs)(w,{children:[B,(0,M.jsxs)(w.Content,{children:[V,H,U,W,G,K]})]})}),t[31]=V,t[32]=H,t[33]=U,t[34]=W,t[35]=G,t[36]=K,t[37]=q):q=t[37];let J;t[38]===n?J=t[39]:(J=(0,M.jsx)(k,{value:`services`,children:(0,M.jsx)(L,{clusterName:n})}),t[38]=n,t[39]=J);let Y;t[40]===n?Y=t[41]:(Y=(0,M.jsx)(k,{value:`tasks`,children:(0,M.jsx)(ne,{clusterName:n})}),t[40]=n,t[41]=Y);let X;t[42]===n?X=t[43]:(X=(0,M.jsx)(k,{value:`task-definitions`,children:(0,M.jsx)(te,{clusterName:n})}),t[42]=n,t[43]=X);let Z;t[44]===n?Z=t[45]:(Z=(0,M.jsx)(k,{value:`instances`,children:(0,M.jsx)(F,{clusterName:n})}),t[44]=n,t[45]=Z);let Q;t[46]!==q||t[47]!==J||t[48]!==Y||t[49]!==X||t[50]!==Z?(Q=(0,M.jsxs)(A,{defaultValue:`overview`,children:[z,q,J,Y,X,Z]}),t[46]=q,t[47]=J,t[48]=Y,t[49]=X,t[50]=Z,t[51]=Q):Q=t[51];let le=`This permanently deletes cluster "${n}" and force-stops every task it holds. This cannot be undone.`,$;t[52]!==f.isPending||t[53]!==g||t[54]!==a||t[55]!==le?($=(0,M.jsx)(C,{description:le,isPending:f.isPending,onConfirm:g,onOpenChange:l,open:a,title:`Delete cluster`}),t[52]=f.isPending,t[53]=g,t[54]=a,t[55]=le,t[56]=$):$=t[56];let ue;return t[57]!==Q||t[58]!==$||t[59]!==I||t[60]!==R?(ue=(0,M.jsxs)(M.Fragment,{children:[_,I,R,Q,$]}),t[57]=Q,t[58]=$,t[59]=I,t[60]=R,t[61]=ue):ue=t[61],ue}function V(){let e=(0,j.c)(2),{clusterName:t}=b.useParams(),n;return e[0]===t?n=e[1]:(n=(0,M.jsx)(re,{clusterName:t}),e[0]=t,e[1]=n),n}export{V as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{ni as o}from"./awsClient.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{i as u,l as d,o as f,r as p,u as m}from"./ecs.js";import{Qr as h,Rt as g,Zt as _,b as v,it as y,nr as b,ot as x,qt as S,st as C,ut as w}from"./index.js";import{t as ee}from"./error-banner.js";import{t as T}from"./page-heading.js";import{a as E,t as D}from"./field.js";import{a as O,i as k,l as A,n as j,o as M,r as N,s as P,t as F}from"./alert-dialog.js";import{t as I}from"./delete-confirmation-dialog.js";import{n as L,t as R}from"./detail-row.js";import{t as z}from"./state-badge.js";import{i as B,n as te,r as ne,t as re}from"./tabs.js";var V=r(),H=t(n(),1),U=e(),W=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function G({clusterName:e,open:t,onOpenChange:n}){let r=f(),{data:a}=i(_),{data:o}=i(S),{data:s}=i(g),c=a?.Subnets??[],l=o?.SecurityGroups??[],u=s?.KeyPairs??[],[d,p]=(0,H.useState)(`t3.small`),[m,h]=(0,H.useState)(1),[v,y]=(0,H.useState)(``),[x,C]=(0,H.useState)(``),[w,T]=(0,H.useState)(``);function I(e){e||(p(`t3.small`),h(1),y(``),C(``),T(``),r.reset()),n(e)}async function L(){try{await r.mutateAsync({Cluster:e,InstanceType:d||void 0,Count:m,SubnetID:v,SecurityGroupID:x,KeyName:w||void 0}),I(!1)}catch{}}let R=r.isPending||v===``||x===``;return(0,U.jsx)(F,{onOpenChange:I,open:t,children:(0,U.jsxs)(k,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,U.jsxs)(P,{children:[(0,U.jsx)(A,{children:`Provision EC2 capacity`}),(0,U.jsxs)(O,{children:[`Launch container instances into cluster “`,e,`”. They register automatically once booted.`]})]}),(0,U.jsxs)(`div`,{className:`space-y-4`,children:[(0,U.jsxs)(D,{children:[(0,U.jsx)(E,{children:(0,U.jsx)(`label`,{htmlFor:`provision-instance-type`,children:`Instance type`})}),(0,U.jsx)(b,{id:`provision-instance-type`,onChange:e=>p(e.target.value),placeholder:`t3.small`,value:d})]}),(0,U.jsxs)(D,{children:[(0,U.jsx)(E,{children:(0,U.jsx)(`label`,{htmlFor:`provision-count`,children:`Count`})}),(0,U.jsx)(b,{id:`provision-count`,max:10,min:1,onChange:e=>h(Number(e.target.value)),type:`number`,value:m})]}),(0,U.jsxs)(D,{children:[(0,U.jsx)(E,{children:(0,U.jsx)(`label`,{htmlFor:`provision-subnet`,children:`Subnet`})}),(0,U.jsxs)(`select`,{className:W,id:`provision-subnet`,onChange:e=>y(e.target.value),value:v,children:[(0,U.jsx)(`option`,{value:``,children:`Select a subnet`}),c.map(e=>(0,U.jsxs)(`option`,{value:e.SubnetId??``,children:[e.SubnetId,` (`,e.CidrBlock,e.AvailabilityZone?`, ${e.AvailabilityZone}`:``,`)`]},e.SubnetId))]})]}),(0,U.jsxs)(D,{children:[(0,U.jsx)(E,{children:(0,U.jsx)(`label`,{htmlFor:`provision-sg`,children:`Security group`})}),(0,U.jsxs)(`select`,{className:W,id:`provision-sg`,onChange:e=>C(e.target.value),value:x,children:[(0,U.jsx)(`option`,{value:``,children:`Select a security group`}),l.map(e=>(0,U.jsxs)(`option`,{value:e.GroupId??``,children:[e.GroupId,` (`,e.GroupName,`)`]},e.GroupId))]})]}),(0,U.jsxs)(D,{children:[(0,U.jsx)(E,{children:(0,U.jsx)(`label`,{htmlFor:`provision-key`,children:`Key pair`})}),(0,U.jsxs)(`select`,{className:W,id:`provision-key`,onChange:e=>T(e.target.value),value:w,children:[(0,U.jsx)(`option`,{value:``,children:`None`}),u.map(e=>(0,U.jsx)(`option`,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId))]})]})]}),r.error&&(0,U.jsx)(ee,{error:r.error instanceof Error?r.error:void 0,msg:`Failed to provision capacity.`}),(0,U.jsxs)(M,{children:[(0,U.jsx)(N,{children:`Cancel`}),(0,U.jsx)(j,{disabled:R,onClick:e=>{e.preventDefault(),L()},children:r.isPending?`Provisioning…`:`Provision`})]})]})})}var K={drain:`Drain`,activate:`Activate`,deregister:`Deregister`},q={drain:`Draining force-stops the service-owned tasks on this instance so it can be retired.`,activate:`This returns the instance to ACTIVE so the scheduler can place tasks on it again.`,deregister:`This force-removes the container instance record. Any tasks it still holds are stopped.`};function ie(e){let t=(0,V.c)(28),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=x(n),t[0]=n,t[1]=r);let{data:i}=a(r),o=m(),s=u(),[c,d]=(0,H.useState)(null),[f,p]=(0,H.useState)(!1),h;t[2]!==n||t[3]!==s||t[4]!==c||t[5]!==o?(h=function(){if(!c)return;let e=()=>d(null);if(c.action===`deregister`){s.mutate({cluster:n,containerInstance:c.arn},{onSuccess:e});return}o.mutate({cluster:n,containerInstance:c.arn,status:c.action===`drain`?`DRAINING`:`ACTIVE`},{onSuccess:e})},t[2]=n,t[3]=s,t[4]=c,t[5]=o,t[6]=h):h=t[6];let g=h,_=o.isError||s.isError,v=o.error??s.error,y=o.isPending||s.isPending,b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,U.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,U.jsx)(l,{onClick:()=>p(!0),size:`sm`,children:`Provision EC2 capacity`})}),t[7]=b):b=t[7];let S;t[8]!==v||t[9]!==_?(S=_&&(0,U.jsx)(ee,{error:v instanceof Error?v:void 0,msg:`Container instance action failed.`}),t[8]=v,t[9]=_,t[10]=S):S=t[10];let C;t[11]===i?C=t[12]:(C=i.length===0?(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:`No container instances found.`}):(0,U.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`EC2 Instance`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,U.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,U.jsx)(`tbody`,{children:i.map(e=>{let t=e.containerInstanceArn??``,n=e.status===`DRAINING`;return(0,U.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,U.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.ec2InstanceId}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:(0,U.jsx)(z,{state:e.status})}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:e.runningTasksCount??0}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingTasksCount??0}),(0,U.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,U.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,U.jsx)(l,{"aria-label":n?`Activate container instance`:`Drain container instance`,onClick:()=>d({arn:t,action:n?`activate`:`drain`}),size:`sm`,variant:`outline`,children:n?`Activate`:`Drain`}),(0,U.jsx)(l,{onClick:()=>d({arn:t,action:`deregister`}),size:`sm`,variant:`destructive`,children:`Deregister`})]})})]},t)})})]})}),t[11]=i,t[12]=C);let w;t[13]!==n||t[14]!==f?(w=(0,U.jsx)(G,{clusterName:n,onOpenChange:p,open:f}),t[13]=n,t[14]=f,t[15]=w):w=t[15];let T=c?K[c.action]:`Confirm`,E=c?q[c.action]:``,D;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>!e&&d(null),t[16]=D):D=t[16];let O=c!==null,k;t[17]!==g||t[18]!==y||t[19]!==O||t[20]!==T||t[21]!==E?(k=(0,U.jsx)(I,{confirmLabel:T,description:E,isPending:y,onConfirm:g,onOpenChange:D,open:O,title:`Container instance`}),t[17]=g,t[18]=y,t[19]=O,t[20]=T,t[21]=E,t[22]=k):k=t[22];let A;return t[23]!==k||t[24]!==S||t[25]!==C||t[26]!==w?(A=(0,U.jsxs)(U.Fragment,{children:[b,S,C,w,k]}),t[23]=k,t[24]=S,t[25]=C,t[26]=w,t[27]=A):A=t[27],A}function J(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function ae(e){let t=(0,V.c)(13),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=C(n),t[0]=n,t[1]=r);let{data:i}=a(r),s;t[2]===n?s=t[3]:(s={cluster:n},t[2]=n,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,U.jsx)(l,{size:`sm`,children:`Create service`}),t[4]=c):c=t[4];let u;t[5]===s?u=t[6]:(u=(0,U.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,U.jsx)(o,{search:s,to:`/ecs/create-service`,children:c})}),t[5]=s,t[6]=u);let d;t[7]!==n||t[8]!==i?(d=i.length===0?(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:`No services found.`}):(0,U.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task Definition`})]})}),(0,U.jsx)(`tbody`,{children:i.map(e=>(0,U.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,U.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,U.jsx)(o,{className:`underline`,params:{clusterName:n,serviceName:e.serviceName??``},to:`/ecs/list-clusters/$clusterName/services/$serviceName`,children:e.serviceName})}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:(0,U.jsx)(z,{state:e.status})}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredCount??0}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:e.runningCount??0}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingCount??0}),(0,U.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:J(e.taskDefinition)})]},e.serviceArn??e.serviceName))})]})}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let f;return t[10]!==u||t[11]!==d?(f=(0,U.jsxs)(U.Fragment,{children:[u,d]}),t[10]=u,t[11]=d,t[12]=f):f=t[12],f}function Y(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function oe(e){let t=(0,V.c)(27),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=w(n),t[0]=n,t[1]=r);let{data:i}=a(r),s=d(),[c,u]=(0,H.useState)(null),f;t[2]!==n||t[3]!==c||t[4]!==s?(f=function(){c&&s.mutate({cluster:n,task:c},{onSuccess:()=>u(null)})},t[2]=n,t[3]=c,t[4]=s,t[5]=f):f=t[5];let p=f,m;t[6]===n?m=t[7]:(m={cluster:n},t[6]=n,t[7]=m);let h;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,U.jsx)(l,{size:`sm`,children:`Run task`}),t[8]=h):h=t[8];let g;t[9]===m?g=t[10]:(g=(0,U.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,U.jsx)(o,{search:m,to:`/ecs/run-task`,children:h})}),t[9]=m,t[10]=g);let _;t[11]!==s.error||t[12]!==s.isError?(_=s.isError&&(0,U.jsx)(ee,{error:s.error instanceof Error?s.error:void 0,msg:`Failed to stop task.`}),t[11]=s.error,t[12]=s.isError,t[13]=_):_=t[13];let v;t[14]!==n||t[15]!==i?(v=i.length===0?(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:`No tasks found.`}):(0,U.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Last Status`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired Status`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Group`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,U.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,U.jsx)(`tbody`,{children:i.map(e=>{let t=Y(e.taskArn),r=e.lastStatus!==`STOPPED`;return(0,U.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,U.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,U.jsx)(o,{className:`underline`,params:{clusterName:n,taskId:t},to:`/ecs/list-clusters/$clusterName/tasks/$taskId`,children:t})}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:(0,U.jsx)(z,{state:e.lastStatus})}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredStatus}),(0,U.jsx)(`td`,{className:`px-4 py-2`,children:e.group}),(0,U.jsx)(`td`,{className:`px-4 py-2 text-right`,children:r&&(0,U.jsx)(l,{onClick:()=>u(e.taskArn??t),size:`sm`,variant:`destructive`,children:`Stop`})})]},t)})})]})}),t[14]=n,t[15]=i,t[16]=v):v=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>!e&&u(null),t[17]=y):y=t[17];let b=c!==null,x;t[18]!==p||t[19]!==s.isPending||t[20]!==b?(x=(0,U.jsx)(I,{confirmLabel:`Stop task`,description:`This stops the task and releases its ENI and reserved capacity.`,isPending:s.isPending,onConfirm:p,onOpenChange:y,open:b,pendingLabel:`Stopping…`,title:`Stop task`}),t[18]=p,t[19]=s.isPending,t[20]=b,t[21]=x):x=t[21];let S;return t[22]!==x||t[23]!==g||t[24]!==_||t[25]!==v?(S=(0,U.jsxs)(U.Fragment,{children:[g,_,v,x]}),t[22]=x,t[23]=g,t[24]=_,t[25]=v,t[26]=S):S=t[26],S}function X(e){let t=(0,V.c)(70),{clusterName:n}=e,r=h(),[i,o]=(0,H.useState)(!1),u;t[0]===n?u=t[1]:(u=y(n),t[0]=n,t[1]=u);let{data:d}=a(u),f=p(),m;t[2]!==n||t[3]!==f||t[4]!==r?(m=function(){f.mutate(n,{onSuccess:()=>{r({to:`/ecs/list-clusters`})}})},t[2]=n,t[3]=f,t[4]=r,t[5]=m):m=t[5];let g=m;if(!d){let e;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,U.jsx)(s,{to:`/ecs/list-clusters`,children:`Clusters`}),t[6]=e):e=t[6];let r;t[7]===n?r=t[8]:(r=(0,U.jsx)(T,{subtitle:`Cluster Details`,title:n}),t[7]=n,t[8]=r);let i;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:`Cluster not found.`}),t[9]=i):i=t[9];let a;return t[10]===r?a=t[11]:(a=(0,U.jsxs)(U.Fragment,{children:[e,r,i]}),t[10]=r,t[11]=a),a}let _;t[12]===d.tags?_=t[13]:(_=d.tags??[],t[12]=d.tags,t[13]=_);let v=_,b;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,U.jsx)(s,{to:`/ecs/list-clusters`,children:`Clusters`}),t[14]=b):b=t[14];let x;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(x=()=>o(!0),t[15]=x):x=t[15];let S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,U.jsxs)(l,{onClick:x,size:`sm`,variant:`destructive`,children:[(0,U.jsx)(c,{className:`size-4`}),`Delete`]}),t[16]=S):S=t[16];let C;t[17]===d.status?C=t[18]:(C=(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[S,(0,U.jsx)(z,{state:d.status})]}),t[17]=d.status,t[18]=C);let w;t[19]!==n||t[20]!==C?(w=(0,U.jsx)(T,{actions:C,subtitle:`Cluster Details`,title:n}),t[19]=n,t[20]=C,t[21]=w):w=t[21];let E;t[22]!==f.error||t[23]!==f.isError?(E=f.isError&&(0,U.jsx)(ee,{error:f.error instanceof Error?f.error:void 0,msg:`Failed to delete cluster.`}),t[22]=f.error,t[23]=f.isError,t[24]=E):E=t[24];let D;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,U.jsx)(L.Header,{children:`Overview`}),t[25]=D):D=t[25];let O;t[26]===d.clusterArn?O=t[27]:(O=(0,U.jsx)(R,{label:`ARN`,value:d.clusterArn}),t[26]=d.clusterArn,t[27]=O);let k;t[28]===d.status?k=t[29]:(k=(0,U.jsx)(R,{label:`Status`,value:d.status}),t[28]=d.status,t[29]=k);let A=String(d.activeServicesCount??0),j;t[30]===A?j=t[31]:(j=(0,U.jsx)(R,{label:`Active services`,value:A}),t[30]=A,t[31]=j);let M=String(d.runningTasksCount??0),N;t[32]===M?N=t[33]:(N=(0,U.jsx)(R,{label:`Running tasks`,value:M}),t[32]=M,t[33]=N);let P=String(d.pendingTasksCount??0),F;t[34]===P?F=t[35]:(F=(0,U.jsx)(R,{label:`Pending tasks`,value:P}),t[34]=P,t[35]=F);let W=String(d.registeredContainerInstancesCount??0),G;t[36]===W?G=t[37]:(G=(0,U.jsx)(R,{label:`Registered instances`,value:W}),t[36]=W,t[37]=G);let K;t[38]!==O||t[39]!==k||t[40]!==j||t[41]!==N||t[42]!==F||t[43]!==G?(K=(0,U.jsxs)(L,{children:[D,(0,U.jsxs)(L.Content,{children:[O,k,j,N,F,G]})]}),t[38]=O,t[39]=k,t[40]=j,t[41]=N,t[42]=F,t[43]=G,t[44]=K):K=t[44];let q;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,U.jsxs)(te,{children:[(0,U.jsx)(B,{value:`services`,children:`Services`}),(0,U.jsx)(B,{value:`tasks`,children:`Tasks`}),(0,U.jsx)(B,{value:`infrastructure`,children:`Infrastructure`}),(0,U.jsx)(B,{value:`tags`,children:`Tags`})]}),t[45]=q):q=t[45];let J;t[46]===n?J=t[47]:(J=(0,U.jsx)(ne,{value:`services`,children:(0,U.jsx)(ae,{clusterName:n})}),t[46]=n,t[47]=J);let Y;t[48]===n?Y=t[49]:(Y=(0,U.jsx)(ne,{value:`tasks`,children:(0,U.jsx)(oe,{clusterName:n})}),t[48]=n,t[49]=Y);let X;t[50]===n?X=t[51]:(X=(0,U.jsx)(ne,{value:`infrastructure`,children:(0,U.jsx)(ie,{clusterName:n})}),t[50]=n,t[51]=X);let Z;t[52]===v?Z=t[53]:(Z=(0,U.jsx)(ne,{value:`tags`,children:v.length===0?(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:`No tags.`}):(0,U.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Key`}),(0,U.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Value`})]})}),(0,U.jsx)(`tbody`,{children:v.map(se)})]})})}),t[52]=v,t[53]=Z);let Q;t[54]!==J||t[55]!==Y||t[56]!==X||t[57]!==Z?(Q=(0,U.jsxs)(re,{className:`mt-6`,defaultValue:`services`,children:[q,J,Y,X,Z]}),t[54]=J,t[55]=Y,t[56]=X,t[57]=Z,t[58]=Q):Q=t[58];let ce=`This permanently deletes cluster "${n}" and force-stops every task it holds. This cannot be undone.`,$;t[59]!==f.isPending||t[60]!==g||t[61]!==i||t[62]!==ce?($=(0,U.jsx)(I,{description:ce,isPending:f.isPending,onConfirm:g,onOpenChange:o,open:i,title:`Delete cluster`}),t[59]=f.isPending,t[60]=g,t[61]=i,t[62]=ce,t[63]=$):$=t[63];let le;return t[64]!==K||t[65]!==Q||t[66]!==$||t[67]!==w||t[68]!==E?(le=(0,U.jsxs)(U.Fragment,{children:[b,w,E,K,Q,$]}),t[64]=K,t[65]=Q,t[66]=$,t[67]=w,t[68]=E,t[69]=le):le=t[69],le}function se(e){return(0,U.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,U.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.key}),(0,U.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.value})]},e.key)}function Z(){let e=(0,V.c)(2),{clusterName:t}=v.useParams(),n;return e[0]===t?n=e[1]:(n=(0,U.jsx)(X,{clusterName:t}),e[0]=t,e[1]=n),n}export{Z as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName2.js b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName2.js index d32b7b270..9c6023aaa 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName2.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{ni as o}from"./awsClient.js";import{Bt as s}from"./auth.js";import{t as c}from"./back-link.js";import{t as l}from"./cli-command-panel.js";import{t as u}from"./trash-2.js";import{t as d}from"./button.js";import{C as f,S as p,T as m,_ as h,b as g,c as _,f as v,h as y,i as b,l as x,m as S,n as C,p as w,r as T,s as E,u as D,v as O,w as k,x as A,y as j}from"./eks.js";import{A as M,F as N,L as P,M as F,N as I,P as L,R,Xr as z,Yt as B,er as V,j as H,k as U,qr as W,y as ee,yt as G}from"./index.js";import{i as te,n as ne,t as re}from"./zod.js";import{t as ie}from"./error-banner.js";import{t as ae}from"./page-heading.js";import{a as K,r as q,t as J}from"./field.js";import{i as oe,l as se,n as ce,o as le,r as ue,s as de,t as fe}from"./alert-dialog.js";import{t as pe}from"./delete-confirmation-dialog.js";import{n as Y,t as X}from"./detail-row.js";import{i as me,n as he,r as ge,t as _e}from"./tabs.js";import{t as ve}from"./badge.js";import{t as ye}from"./json-editor.js";var be=W(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),xe=W(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Z=r(),Q=t(n(),1),$=e();function Se(e){return e?.split(`/`).pop()??e??``}function Ce(e){let t=(0,Z.c)(55),{clusterName:n,principalArn:r,onDelete:a}=e,o;t[0]!==n||t[1]!==r?(o=M(n,r),t[0]=n,t[1]=r,t[2]=o):o=t[2];let{data:s}=i(o),c;t[3]!==n||t[4]!==r?(c=L(n,r),t[3]=n,t[4]=r,t[5]=c):c=t[5];let{data:l}=i(c),f=w(),m=p(),[h,g]=(0,Q.useState)(C[0].arn),_=s?.accessEntry,v;t[6]===l?.associatedAccessPolicies?v=t[7]:(v=l?.associatedAccessPolicies??[],t[6]=l?.associatedAccessPolicies,t[7]=v);let y=v,b;t[8]===r?b=t[9]:(b=(0,$.jsx)(`span`,{className:`truncate font-mono text-xs`,children:r}),t[8]=r,t[9]=b);let x;t[10]!==a||t[11]!==r?(x=()=>a(r),t[10]=a,t[11]=r,t[12]=x):x=t[12];let S;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(u,{className:`size-4`}),t[13]=S):S=t[13];let T;t[14]===x?T=t[15]:(T=(0,$.jsx)(d,{onClick:x,size:`icon`,variant:`ghost`,children:S}),t[14]=x,t[15]=T);let E;t[16]!==b||t[17]!==T?(E=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[b,T]})}),t[16]=b,t[17]=T,t[18]=E):E=t[18];let D=_?.type,O;t[19]===D?O=t[20]:(O=(0,$.jsx)(X,{label:`Type`,value:D}),t[19]=D,t[20]=O);let k;t[21]===_?k=t[22]:(k=_?.kubernetesGroups?.length?_.kubernetesGroups.join(`, `):`—`,t[21]=_,t[22]=k);let A;t[23]===k?A=t[24]:(A=(0,$.jsx)(X,{label:`Kubernetes groups`,value:k}),t[23]=k,t[24]=A);let j;t[25]!==y||t[26]!==n||t[27]!==m||t[28]!==r?(j=y.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:y.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{children:Se(e.policyArn)}),(0,$.jsx)(d,{onClick:()=>m.mutate({clusterName:n,principalArn:r,policyArn:e.policyArn??``}),size:`sm`,variant:`ghost`,children:`Remove`})]},e.policyArn))}):`—`,t[25]=y,t[26]=n,t[27]=m,t[28]=r,t[29]=j):j=t[29];let N;t[30]===j?N=t[31]:(N=(0,$.jsx)(X,{label:`Access policies`,value:j}),t[30]=j,t[31]=N);let P;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>g(e.target.value),t[32]=P):P=t[32];let F;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(F=C.map(we),t[33]=F):F=t[33];let I;t[34]===h?I=t[35]:(I=(0,$.jsx)(`select`,{"aria-label":`Access policy`,className:`h-7 flex-1 rounded-md border border-input bg-input/20 px-2 text-sm`,onChange:P,value:h,children:F}),t[34]=h,t[35]=I);let R;t[36]!==f||t[37]!==n||t[38]!==h||t[39]!==r?(R=()=>f.mutate({clusterName:n,principalArn:r,policyArn:h,accessScopeType:`cluster`}),t[36]=f,t[37]=n,t[38]=h,t[39]=r,t[40]=R):R=t[40];let z;t[41]!==f.isPending||t[42]!==R?(z=(0,$.jsx)(d,{disabled:f.isPending,onClick:R,size:`sm`,children:`Associate`}),t[41]=f.isPending,t[42]=R,t[43]=z):z=t[43];let B;t[44]!==I||t[45]!==z?(B=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 pt-2`,children:[I,z]}),t[44]=I,t[45]=z,t[46]=B):B=t[46];let V;t[47]!==O||t[48]!==A||t[49]!==N||t[50]!==B?(V=(0,$.jsxs)(Y.Content,{children:[O,A,N,B]}),t[47]=O,t[48]=A,t[49]=N,t[50]=B,t[51]=V):V=t[51];let H;return t[52]!==V||t[53]!==E?(H=(0,$.jsxs)(Y,{children:[E,V]}),t[52]=V,t[53]=E,t[54]=H):H=t[54],H}function we(e){return(0,$.jsx)(`option`,{value:e.arn,children:e.name},e.arn)}function Te(e){let t=(0,Z.c)(41),{clusterName:n,open:r,onOpenChange:i}=e,a=S(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:re(x),defaultValues:{principalArn:``,kubernetesGroups:``}},t[0]=o):o=t[0];let{formState:s,handleSubmit:c,register:l,reset:u}=te(o),{errors:d}=s,f;t[1]!==n||t[2]!==a||t[3]!==i||t[4]!==u?(f=async e=>{await a.mutateAsync({clusterName:n,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups.split(`,`).map(Ee).filter(Boolean)}),u(),i(!1)},t[1]=n,t[2]=a,t[3]=i,t[4]=u,t[5]=f):f=t[5];let p=f,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(de,{children:(0,$.jsx)(se,{children:`Add access entry`})}),t[6]=m):m=t[6];let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ae-principal`,children:`IAM principal ARN`})}),t[7]=h):h=t[7];let g=!!d.principalArn,_;t[8]===l?_=t[9]:(_=l(`principalArn`),t[8]=l,t[9]=_);let v;t[10]!==g||t[11]!==_?(v=(0,$.jsx)(V,{"aria-invalid":g,id:`ae-principal`,placeholder:`arn:aws:iam::000000000000:role/my-role`,..._}),t[10]=g,t[11]=_,t[12]=v):v=t[12];let y;t[13]===d.principalArn?y=t[14]:(y=(0,$.jsx)(q,{errors:[d.principalArn]}),t[13]=d.principalArn,t[14]=y);let b;t[15]!==v||t[16]!==y?(b=(0,$.jsxs)(J,{children:[h,v,y]}),t[15]=v,t[16]=y,t[17]=b):b=t[17];let C;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ae-groups`,children:`Kubernetes groups`})}),t[18]=C):C=t[18];let w;t[19]===l?w=t[20]:(w=l(`kubernetesGroups`),t[19]=l,t[20]=w);let T;t[21]===w?T=t[22]:(T=(0,$.jsxs)(J,{children:[C,(0,$.jsx)(V,{id:`ae-groups`,placeholder:`system:masters`,...w})]}),t[21]=w,t[22]=T);let E;t[23]!==b||t[24]!==T?(E=(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-access-entry-form`,children:[b,T]}),t[23]=b,t[24]=T,t[25]=E):E=t[25];let D;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(ue,{children:`Cancel`}),t[26]=D):D=t[26];let O;t[27]!==c||t[28]!==p?(O=e=>{e.preventDefault(),c(p)()},t[27]=c,t[28]=p,t[29]=O):O=t[29];let k=a.isPending?`Creating…`:`Create`,A;t[30]!==a.isPending||t[31]!==O||t[32]!==k?(A=(0,$.jsxs)(le,{children:[D,(0,$.jsx)(ce,{disabled:a.isPending,onClick:O,children:k})]}),t[30]=a.isPending,t[31]=O,t[32]=k,t[33]=A):A=t[33];let j;t[34]!==E||t[35]!==A?(j=(0,$.jsxs)(oe,{children:[m,E,A]}),t[34]=E,t[35]=A,t[36]=j):j=t[36];let M;return t[37]!==i||t[38]!==r||t[39]!==j?(M=(0,$.jsx)(fe,{onOpenChange:i,open:r,children:j}),t[37]=i,t[38]=r,t[39]=j,t[40]=M):M=t[40],M}function Ee(e){return e.trim()}function De(e){let t=(0,Z.c)(25),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=U(n),t[0]=n,t[1]=r);let{data:i}=a(r),o=O(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(),f;t[2]===i.accessEntries?f=t[3]:(f=i.accessEntries??[],t[2]=i.accessEntries,t[3]=f);let p=f,m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(d,{onClick:()=>c(!0),size:`sm`,children:`Add access entry`})}),t[4]=m):m=t[4];let h;t[5]!==n||t[6]!==p?(h=p.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:p.map(e=>(0,$.jsx)(Ce,{clusterName:n,onDelete:u,principalArn:e},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No access entries.`}),t[5]=n,t[6]=p,t[7]=h):h=t[7];let g;t[8]!==n||t[9]!==s?(g=(0,$.jsx)(Te,{clusterName:n,onOpenChange:c,open:s}),t[8]=n,t[9]=s,t[10]=g):g=t[10];let _=`Delete access entry for "${l??``}"?`,v;t[11]!==n||t[12]!==o||t[13]!==l?(v=()=>{l&&o.mutate({clusterName:n,principalArn:l},{onSuccess:()=>u(void 0)})},t[11]=n,t[12]=o,t[13]=l,t[14]=v):v=t[14];let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>!e&&u(void 0),t[15]=y):y=t[15];let b=l!==void 0,x;t[16]!==o.isPending||t[17]!==_||t[18]!==v||t[19]!==b?(x=(0,$.jsx)(pe,{description:_,isPending:o.isPending,onConfirm:v,onOpenChange:y,open:b,title:`Delete access entry`}),t[16]=o.isPending,t[17]=_,t[18]=v,t[19]=b,t[20]=x):x=t[20];let S;return t[21]!==x||t[22]!==h||t[23]!==g?(S=(0,$.jsxs)($.Fragment,{children:[m,h,g,x]}),t[21]=x,t[22]=h,t[23]=g,t[24]=S):S=t[24],S}var Oe=new Set([`CREATING`,`UPDATING`,`DELETING`]),ke=5e3,Ae=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function je({clusterName:e,catalog:t,installed:n,open:r,onOpenChange:i}){let a=y(),o=t.filter(e=>!n.includes(e.addonName??``)),{control:s,formState:{errors:c},handleSubmit:l,register:u,reset:d,setValue:f,watch:p}=te({resolver:re(D),defaultValues:{addonName:``,addonVersion:``,serviceAccountRoleArn:``,configurationValues:``}}),m=p(`addonName`),h=p(`addonVersion`),g=t.find(e=>e.addonName===m)?.addonVersions??[],_=g.find(e=>e.addonVersion===h)?.requiresIamPermissions??!1,v=e=>{let n=t.find(t=>t.addonName===e)?.addonVersions?.[0]?.addonVersion??``;f(`addonName`,e,{shouldValidate:!0}),f(`addonVersion`,n,{shouldValidate:!0})},b=async t=>{await a.mutateAsync({clusterName:e,addonName:t.addonName,addonVersion:t.addonVersion||void 0,serviceAccountRoleArn:t.serviceAccountRoleArn.trim()||void 0,configurationValues:t.configurationValues.trim()||void 0}),d(),i(!1)};return(0,$.jsx)(fe,{onOpenChange:i,open:r,children:(0,$.jsxs)(oe,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,$.jsx)(de,{children:(0,$.jsx)(se,{children:`Add add-on`})}),(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-addon-form`,children:[(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`addon-name`,children:`Add-on`})}),(0,$.jsxs)(`select`,{"aria-invalid":!!c.addonName,className:Ae,id:`addon-name`,onChange:e=>v(e.target.value),value:m,children:[(0,$.jsx)(`option`,{value:``,children:`Select add-on`}),o.map(e=>(0,$.jsx)(`option`,{value:e.addonName??``,children:e.addonName},e.addonName))]}),(0,$.jsx)(q,{errors:[c.addonName]})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`addon-version`,children:`Version`})}),(0,$.jsx)(`select`,{"aria-invalid":!!c.addonVersion,className:Ae,disabled:g.length===0,id:`addon-version`,onChange:e=>f(`addonVersion`,e.target.value,{shouldValidate:!0}),value:h,children:g.map((e,t)=>(0,$.jsxs)(`option`,{value:e.addonVersion??``,children:[e.addonVersion,t===0?` (latest)`:``]},e.addonVersion))}),(0,$.jsx)(q,{errors:[c.addonVersion]})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`addon-role`,children:`Service account IAM role ARN`})}),(0,$.jsx)(V,{id:`addon-role`,placeholder:`arn:aws:iam::…:role/…`,...u(`serviceAccountRoleArn`)}),_&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This add-on needs IAM permissions — provide an IRSA role ARN.`})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`addon-config`,children:`Configuration values (JSON)`})}),(0,$.jsx)(ne,{control:s,name:`configurationValues`,render:({field:{onBlur:e,onChange:t,ref:n,value:r}})=>(0,$.jsx)(ye,{error:!!c.configurationValues,id:`addon-config`,onBlur:e,onChange:t,placeholder:`{"replicaCount": 2}`,ref:n,rows:4,value:r})}),(0,$.jsx)(q,{errors:[c.configurationValues]})]})]}),(0,$.jsxs)(le,{children:[(0,$.jsx)(ue,{children:`Cancel`}),(0,$.jsx)(ce,{disabled:a.isPending,onClick:e=>{e.preventDefault(),l(b)()},children:a.isPending?`Adding…`:`Add`})]})]})})}function Me(e){let t=(0,Z.c)(54),{clusterName:n,addonName:r,current:i,versions:a,open:o,onOpenChange:s}=e,c=k(),[l,u]=(0,Q.useState)(i.addonVersion??``),[d,f]=(0,Q.useState)(i.serviceAccountRoleArn??``),[p,m]=(0,Q.useState)(i.configurationValues??``),[h,g]=(0,Q.useState)(),_,v;t[0]!==i.addonVersion||t[1]!==i.configurationValues||t[2]!==i.serviceAccountRoleArn||t[3]!==o?(_=()=>{o&&(u(i.addonVersion??``),f(i.serviceAccountRoleArn??``),m(i.configurationValues??``),g(void 0))},v=[o,i.addonVersion,i.serviceAccountRoleArn,i.configurationValues],t[0]=i.addonVersion,t[1]=i.configurationValues,t[2]=i.serviceAccountRoleArn,t[3]=o,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,Q.useEffect)(_,v);let y;t[6]!==r||t[7]!==n||t[8]!==p||t[9]!==s||t[10]!==d||t[11]!==c||t[12]!==l?(y=()=>{let e=E.safeParse(p);if(!e.success){g(e.error.issues[0]?.message??`Configuration must be valid JSON`);return}g(void 0),c.mutate({clusterName:n,addonName:r,addonVersion:l||void 0,serviceAccountRoleArn:d.trim()||void 0,configurationValues:p.trim()||void 0},{onSuccess:()=>s(!1)})},t[6]=r,t[7]=n,t[8]=p,t[9]=s,t[10]=d,t[11]=c,t[12]=l,t[13]=y):y=t[13];let b=y,x;t[14]===r?x=t[15]:(x=(0,$.jsx)(de,{children:(0,$.jsxs)(se,{children:[`Update `,r]})}),t[14]=r,t[15]=x);let S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-version`,children:`Version`})}),t[16]=S):S=t[16];let C=a.length===0,w;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>u(e.target.value),t[17]=w):w=t[17];let T;t[18]===a?T=t[19]:(T=a.map(Ne),t[18]=a,t[19]=T);let D;t[20]!==C||t[21]!==T||t[22]!==l?(D=(0,$.jsxs)(J,{children:[S,(0,$.jsx)(`select`,{className:Ae,disabled:C,id:`update-addon-version`,onChange:w,value:l,children:T})]}),t[20]=C,t[21]=T,t[22]=l,t[23]=D):D=t[23];let O;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-role`,children:`Service account IAM role ARN`})}),t[24]=O):O=t[24];let A;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>f(e.target.value),t[25]=A):A=t[25];let j;t[26]===d?j=t[27]:(j=(0,$.jsxs)(J,{children:[O,(0,$.jsx)(V,{id:`update-addon-role`,onChange:A,placeholder:`arn:aws:iam::…:role/…`,value:d})]}),t[26]=d,t[27]=j);let M;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-config`,children:`Configuration values (JSON)`})}),t[28]=M):M=t[28];let N=!!h,P;t[29]!==p||t[30]!==N?(P=(0,$.jsxs)(J,{children:[M,(0,$.jsx)(ye,{error:N,id:`update-addon-config`,onChange:m,rows:4,value:p})]}),t[29]=p,t[30]=N,t[31]=P):P=t[31];let F;t[32]!==j||t[33]!==P||t[34]!==D?(F=(0,$.jsxs)(`div`,{className:`space-y-4`,children:[D,j,P]}),t[32]=j,t[33]=P,t[34]=D,t[35]=F):F=t[35];let I;t[36]===h?I=t[37]:(I=h&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:h}),t[36]=h,t[37]=I);let L;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(ue,{children:`Cancel`}),t[38]=L):L=t[38];let R;t[39]===b?R=t[40]:(R=e=>{e.preventDefault(),b()},t[39]=b,t[40]=R);let z=c.isPending?`Updating…`:`Update`,B;t[41]!==R||t[42]!==z||t[43]!==c.isPending?(B=(0,$.jsxs)(le,{children:[L,(0,$.jsx)(ce,{disabled:c.isPending,onClick:R,children:z})]}),t[41]=R,t[42]=z,t[43]=c.isPending,t[44]=B):B=t[44];let H;t[45]!==F||t[46]!==I||t[47]!==B||t[48]!==x?(H=(0,$.jsxs)(oe,{className:`max-h-[85vh] overflow-y-auto`,children:[x,F,I,B]}),t[45]=F,t[46]=I,t[47]=B,t[48]=x,t[49]=H):H=t[49];let U;return t[50]!==s||t[51]!==o||t[52]!==H?(U=(0,$.jsx)(fe,{onOpenChange:s,open:o,children:H}),t[50]=s,t[51]=o,t[52]=H,t[53]=U):U=t[53],U}function Ne(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function Pe(e){let t=(0,Z.c)(53),{clusterName:n,addonName:r,catalog:a,onDelete:o}=e,s;t[0]!==r||t[1]!==n?(s=H(n,r),t[0]=r,t[1]=n,t[2]=s):s=t[2];let c;t[3]===s?c=t[4]:(c={...s,refetchInterval:Ie},t[3]=s,t[4]=c);let{data:l}=i(c),[f,p]=(0,Q.useState)(!1),m=l?.addon,h=m?.health?.issues?.[0]?.message,g;t[5]!==r||t[6]!==a?(g=a.find(e=>e.addonName===r)?.addonVersions?.map(Fe).filter(Boolean)??[],t[5]=r,t[6]=a,t[7]=g):g=t[7];let v=g,y;t[8]===r?y=t[9]:(y=(0,$.jsx)(`span`,{children:r}),t[8]=r,t[9]=y);let b=m?.status,x;t[10]===b?x=t[11]:(x=_(b),t[10]=b,t[11]=x);let S=m?.status??`UNKNOWN`,C;t[12]!==x||t[13]!==S?(C=(0,$.jsx)(ve,{variant:x,children:S}),t[12]=x,t[13]=S,t[14]=C):C=t[14];let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>p(!0),t[15]=w):w=t[15];let T;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(d,{"aria-label":`Update add-on`,onClick:w,size:`icon`,variant:`ghost`,children:(0,$.jsx)(be,{className:`size-4`})}),t[16]=T):T=t[16];let E;t[17]!==r||t[18]!==o?(E=()=>o(r),t[17]=r,t[18]=o,t[19]=E):E=t[19];let D;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(u,{className:`size-4`}),t[20]=D):D=t[20];let O;t[21]===E?O=t[22]:(O=(0,$.jsx)(d,{"aria-label":`Remove add-on`,onClick:E,size:`icon`,variant:`ghost`,children:D}),t[21]=E,t[22]=O);let k;t[23]!==O||t[24]!==C?(k=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[C,T,O]}),t[23]=O,t[24]=C,t[25]=k):k=t[25];let A;t[26]!==k||t[27]!==y?(A=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[y,k]})}),t[26]=k,t[27]=y,t[28]=A):A=t[28];let j=m?.addonVersion,M;t[29]===j?M=t[30]:(M=(0,$.jsx)(X,{label:`Version`,value:j}),t[29]=j,t[30]=M);let N=m?.serviceAccountRoleArn,P;t[31]===N?P=t[32]:(P=(0,$.jsx)(X,{label:`IRSA role`,value:N}),t[31]=N,t[32]=P);let F;t[33]===h?F=t[34]:(F=h&&(0,$.jsx)(X,{label:`Issue`,value:(0,$.jsx)(`span`,{className:`text-destructive`,children:h})}),t[33]=h,t[34]=F);let I;t[35]!==M||t[36]!==P||t[37]!==F?(I=(0,$.jsxs)(Y.Content,{children:[M,P,F]}),t[35]=M,t[36]=P,t[37]=F,t[38]=I):I=t[38];let L=m?.addonVersion,R=m?.serviceAccountRoleArn,z=m?.configurationValues,B;t[39]!==L||t[40]!==R||t[41]!==z?(B={addonVersion:L,serviceAccountRoleArn:R,configurationValues:z},t[39]=L,t[40]=R,t[41]=z,t[42]=B):B=t[42];let V;t[43]!==r||t[44]!==n||t[45]!==f||t[46]!==B||t[47]!==v?(V=(0,$.jsx)(Me,{addonName:r,clusterName:n,current:B,onOpenChange:p,open:f,versions:v}),t[43]=r,t[44]=n,t[45]=f,t[46]=B,t[47]=v,t[48]=V):V=t[48];let U;return t[49]!==A||t[50]!==I||t[51]!==V?(U=(0,$.jsxs)(Y,{children:[A,I,V]}),t[49]=A,t[50]=I,t[51]=V,t[52]=U):U=t[52],U}function Fe(e){return e.addonVersion??``}function Ie(e){return Oe.has(e.state.data?.addon?.status??``)?ke:!1}function Le(e){let t=(0,Z.c)(31),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=I(n),t[0]=n,t[1]=r);let{data:o}=a(r),{data:s}=i(F),c=j(),[l,u]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(),m;t[2]===o.addons?m=t[3]:(m=o.addons??[],t[2]=o.addons,t[3]=m);let h=m,g;t[4]===s?.addons?g=t[5]:(g=s?.addons??[],t[4]=s?.addons,t[5]=g);let _=g,v;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Add-on manifests are staged; activation completes when the cluster reports the workload ready.`}),t[6]=v):v=t[6];let y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-4`,children:[v,(0,$.jsx)(d,{onClick:()=>u(!0),size:`sm`,children:`Add add-on`})]}),t[7]=y):y=t[7];let b;t[8]!==h||t[9]!==_||t[10]!==n?(b=h.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:h.map(e=>(0,$.jsx)(Pe,{addonName:e,catalog:_,clusterName:n,onDelete:p},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No add-ons installed.`}),t[8]=h,t[9]=_,t[10]=n,t[11]=b):b=t[11];let x;t[12]!==h||t[13]!==_||t[14]!==n||t[15]!==l?(x=(0,$.jsx)(je,{catalog:_,clusterName:n,installed:h,onOpenChange:u,open:l}),t[12]=h,t[13]=_,t[14]=n,t[15]=l,t[16]=x):x=t[16];let S=`Remove add-on "${f??``}" from the cluster?`,C;t[17]!==n||t[18]!==c||t[19]!==f?(C=()=>{f&&c.mutate({clusterName:n,addonName:f},{onSuccess:()=>p(void 0)})},t[17]=n,t[18]=c,t[19]=f,t[20]=C):C=t[20];let w;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>!e&&p(void 0),t[21]=w):w=t[21];let T=f!==void 0,E;t[22]!==c.isPending||t[23]!==T||t[24]!==S||t[25]!==C?(E=(0,$.jsx)(pe,{confirmLabel:`Remove`,description:S,isPending:c.isPending,onConfirm:C,onOpenChange:w,open:T,pendingLabel:`Removing…`,title:`Remove add-on`}),t[22]=c.isPending,t[23]=T,t[24]=S,t[25]=C,t[26]=E):E=t[26];let D;return t[27]!==E||t[28]!==b||t[29]!==x?(D=(0,$.jsxs)($.Fragment,{children:[y,b,x,E]}),t[27]=E,t[28]=b,t[29]=x,t[30]=D):D=t[30],D}function Re(e){let t=(0,Z.c)(6),{to:n,id:r}=e,i;t[0]===r?i=t[1]:(i={id:r},t[0]=r,t[1]=i);let a;return t[2]!==r||t[3]!==i||t[4]!==n?(a=(0,$.jsx)(o,{className:`font-mono text-primary underline-offset-2 hover:underline`,params:i,to:n,children:r}),t[2]=r,t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function ze(e){let t=(0,Z.c)(45),{cluster:n}=e,r=n?.resourcesVpcConfig,i;t[0]===r?.subnetIds?i=t[1]:(i=r?.subnetIds??[],t[0]=r?.subnetIds,t[1]=i);let a=i,o;t[2]===r?.securityGroupIds?o=t[3]:(o=r?.securityGroupIds??[],t[2]=r?.securityGroupIds,t[3]=o);let s=o,c;t[4]===r?.publicAccessCidrs?c=t[5]:(c=r?.publicAccessCidrs??[],t[4]=r?.publicAccessCidrs,t[5]=c);let l=c,u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Y.Header,{children:`VPC`}),t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=r?.vpcId?(0,$.jsx)(Re,{id:r.vpcId,to:`/ec2/describe-vpcs/$id`}):void 0,t[7]=r,t[8]=d);let f;t[9]===d?f=t[10]:(f=(0,$.jsx)(X,{label:`VPC`,value:d}),t[9]=d,t[10]=f);let p=n?.endpoint,m;t[11]===p?m=t[12]:(m=(0,$.jsx)(X,{label:`API server endpoint`,value:p}),t[11]=p,t[12]=m);let h=r?.endpointPublicAccess?`Enabled`:`Disabled`,g;t[13]===h?g=t[14]:(g=(0,$.jsx)(X,{label:`Public access`,value:h}),t[13]=h,t[14]=g);let _=r?.endpointPrivateAccess?`Enabled`:`Disabled`,v;t[15]===_?v=t[16]:(v=(0,$.jsx)(X,{label:`Private access`,value:_}),t[15]=_,t[16]=v);let y;t[17]!==l||t[18]!==r?.endpointPublicAccess?(y=r?.endpointPublicAccess&&(0,$.jsx)(X,{label:`Public access CIDRs`,value:l.length>0?(0,$.jsx)(`div`,{className:`space-y-1 font-mono text-xs`,children:l.map(He)}):`Any (0.0.0.0/0)`}),t[17]=l,t[18]=r?.endpointPublicAccess,t[19]=y):y=t[19];let b;t[20]!==g||t[21]!==v||t[22]!==y||t[23]!==f||t[24]!==m?(b=(0,$.jsxs)(Y,{children:[u,(0,$.jsxs)(Y.Content,{children:[f,m,g,v,y]})]}),t[20]=g,t[21]=v,t[22]=y,t[23]=f,t[24]=m,t[25]=b):b=t[25];let x;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(Y.Header,{children:`Subnets`}),t[26]=x):x=t[26];let S;t[27]===a?S=t[28]:(S=(0,$.jsxs)(Y,{children:[x,(0,$.jsx)(Y.Content,{children:a.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:a.map(Ve)}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets.`})})]}),t[27]=a,t[28]=S);let C;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(Y.Header,{children:`Security groups`}),t[29]=C):C=t[29];let w;t[30]===r?w=t[31]:(w=r?.clusterSecurityGroupId?(0,$.jsx)(Re,{id:r.clusterSecurityGroupId,to:`/ec2/describe-security-groups/$id`}):void 0,t[30]=r,t[31]=w);let T;t[32]===w?T=t[33]:(T=(0,$.jsx)(X,{label:`Cluster security group`,value:w}),t[32]=w,t[33]=T);let E;t[34]===s?E=t[35]:(E=s.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:s.map(Be)}):`—`,t[34]=s,t[35]=E);let D;t[36]===E?D=t[37]:(D=(0,$.jsx)(X,{label:`Additional security groups`,value:E}),t[36]=E,t[37]=D);let O;t[38]!==T||t[39]!==D?(O=(0,$.jsxs)(Y,{children:[C,(0,$.jsxs)(Y.Content,{children:[T,D]})]}),t[38]=T,t[39]=D,t[40]=O):O=t[40];let k;return t[41]!==b||t[42]!==S||t[43]!==O?(k=(0,$.jsxs)($.Fragment,{children:[b,S,O]}),t[41]=b,t[42]=S,t[43]=O,t[44]=k):k=t[44],k}function Be(e){return(0,$.jsx)(Re,{id:e,to:`/ec2/describe-security-groups/$id`},e)}function Ve(e){return(0,$.jsx)(Re,{id:e,to:`/ec2/describe-subnets/$id`},e)}function He(e){return(0,$.jsx)(`div`,{children:e},e)}function Ue(e){let t=(0,Z.c)(50),{clusterName:n,nodegroupName:r,current:i,open:a,onOpenChange:o}=e,s=f(),[c,l]=(0,Q.useState)(i.minSize??0),[u,d]=(0,Q.useState)(i.desiredSize??0),[p,m]=(0,Q.useState)(i.maxSize??0),[h,g]=(0,Q.useState)(),_,v;t[0]!==i.desiredSize||t[1]!==i.maxSize||t[2]!==i.minSize||t[3]!==a?(_=()=>{a&&(l(i.minSize??0),d(i.desiredSize??0),m(i.maxSize??0),g(void 0))},v=[a,i.minSize,i.desiredSize,i.maxSize],t[0]=i.desiredSize,t[1]=i.maxSize,t[2]=i.minSize,t[3]=a,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,Q.useEffect)(_,v);let y;t[6]!==n||t[7]!==u||t[8]!==p||t[9]!==c||t[10]!==r||t[11]!==o||t[12]!==s?(y=()=>{if(!(c<=u&&u<=p)){g(`Sizes must satisfy min ≤ desired ≤ max`);return}s.mutate({clusterName:n,nodegroupName:r,minSize:c,desiredSize:u,maxSize:p},{onSuccess:()=>o(!1)})},t[6]=n,t[7]=u,t[8]=p,t[9]=c,t[10]=r,t[11]=o,t[12]=s,t[13]=y):y=t[13];let b=y,x;t[14]===r?x=t[15]:(x=(0,$.jsx)(de,{children:(0,$.jsxs)(se,{children:[`Scale `,r]})}),t[14]=r,t[15]=x);let S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`scale-min`,children:`Min`})}),t[16]=S):S=t[16];let C;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>l(Number(e.target.value)),t[17]=C):C=t[17];let w;t[18]===c?w=t[19]:(w=(0,$.jsxs)(J,{children:[S,(0,$.jsx)(V,{id:`scale-min`,onChange:C,type:`number`,value:c})]}),t[18]=c,t[19]=w);let T;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`scale-desired`,children:`Desired`})}),t[20]=T):T=t[20];let E;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>d(Number(e.target.value)),t[21]=E):E=t[21];let D;t[22]===u?D=t[23]:(D=(0,$.jsxs)(J,{children:[T,(0,$.jsx)(V,{id:`scale-desired`,onChange:E,type:`number`,value:u})]}),t[22]=u,t[23]=D);let O;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`scale-max`,children:`Max`})}),t[24]=O):O=t[24];let k;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(k=e=>m(Number(e.target.value)),t[25]=k):k=t[25];let A;t[26]===p?A=t[27]:(A=(0,$.jsxs)(J,{children:[O,(0,$.jsx)(V,{id:`scale-max`,onChange:k,type:`number`,value:p})]}),t[26]=p,t[27]=A);let j;t[28]!==D||t[29]!==A||t[30]!==w?(j=(0,$.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[w,D,A]}),t[28]=D,t[29]=A,t[30]=w,t[31]=j):j=t[31];let M;t[32]===h?M=t[33]:(M=h&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:h}),t[32]=h,t[33]=M);let N;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(ue,{children:`Cancel`}),t[34]=N):N=t[34];let P;t[35]===b?P=t[36]:(P=e=>{e.preventDefault(),b()},t[35]=b,t[36]=P);let F=s.isPending?`Scaling…`:`Scale`,I;t[37]!==s.isPending||t[38]!==P||t[39]!==F?(I=(0,$.jsxs)(le,{children:[N,(0,$.jsx)(ce,{disabled:s.isPending,onClick:P,children:F})]}),t[37]=s.isPending,t[38]=P,t[39]=F,t[40]=I):I=t[40];let L;t[41]!==j||t[42]!==M||t[43]!==I||t[44]!==x?(L=(0,$.jsxs)(oe,{children:[x,j,M,I]}),t[41]=j,t[42]=M,t[43]=I,t[44]=x,t[45]=L):L=t[45];let R;return t[46]!==o||t[47]!==a||t[48]!==L?(R=(0,$.jsx)(fe,{onOpenChange:o,open:a,children:L}),t[46]=o,t[47]=a,t[48]=L,t[49]=R):R=t[49],R}function We(e){let t=(0,Z.c)(64),{clusterName:n,clusterVersion:r,nodegroupName:a,onDelete:o}=e,s;t[0]!==n||t[1]!==a?(s=P(n,a),t[0]=n,t[1]=a,t[2]=s):s=t[2];let{data:c}=i(s),l=m(),f=c?.nodegroup,p=f?.scalingConfig,[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(!1),y=!!r&&!!f?.version&&f.version!==r,b;t[3]===a?b=t[4]:(b=(0,$.jsx)(`span`,{children:a}),t[3]=a,t[4]=b);let x;t[5]===y?x=t[6]:(x=y&&(0,$.jsx)(d,{"aria-label":`Update node group version`,onClick:()=>v(!0),size:`icon`,variant:`ghost`,children:(0,$.jsx)(be,{className:`size-4`})}),t[5]=y,t[6]=x);let S;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>g(!0),t[7]=S):S=t[7];let C;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(d,{"aria-label":`Scale node group`,onClick:S,size:`icon`,variant:`ghost`,children:(0,$.jsx)(xe,{className:`size-4`})}),t[8]=C):C=t[8];let w;t[9]!==a||t[10]!==o?(w=()=>o(a),t[9]=a,t[10]=o,t[11]=w):w=t[11];let T;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(u,{className:`size-4`}),t[12]=T):T=t[12];let E;t[13]===w?E=t[14]:(E=(0,$.jsx)(d,{"aria-label":`Delete node group`,onClick:w,size:`icon`,variant:`ghost`,children:T}),t[13]=w,t[14]=E);let D;t[15]!==x||t[16]!==E?(D=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[x,C,E]}),t[15]=x,t[16]=E,t[17]=D):D=t[17];let O;t[18]!==b||t[19]!==D?(O=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[b,D]})}),t[18]=b,t[19]=D,t[20]=O):O=t[20];let k=f?.status,A;t[21]===k?A=t[22]:(A=(0,$.jsx)(X,{label:`Status`,value:k}),t[21]=k,t[22]=A);let j=y?`${f?.version} (cluster on ${r})`:f?.version,M;t[23]===j?M=t[24]:(M=(0,$.jsx)(X,{label:`Kubernetes version`,value:j}),t[23]=j,t[24]=M);let N;t[25]===f?.instanceTypes?N=t[26]:(N=f?.instanceTypes?.join(`, `),t[25]=f?.instanceTypes,t[26]=N);let F;t[27]===N?F=t[28]:(F=(0,$.jsx)(X,{label:`Instance types`,value:N}),t[27]=N,t[28]=F);let I=f?.amiType,L;t[29]===I?L=t[30]:(L=(0,$.jsx)(X,{label:`AMI type`,value:I}),t[29]=I,t[30]=L);let R=f?.capacityType,z;t[31]===R?z=t[32]:(z=(0,$.jsx)(X,{label:`Capacity type`,value:R}),t[31]=R,t[32]=z);let B=p?`${p.minSize} / ${p.desiredSize} / ${p.maxSize}`:void 0,V;t[33]===B?V=t[34]:(V=(0,$.jsx)(X,{label:`Scaling (min / desired / max)`,value:B}),t[33]=B,t[34]=V);let H;t[35]!==A||t[36]!==M||t[37]!==F||t[38]!==L||t[39]!==z||t[40]!==V?(H=(0,$.jsxs)(Y.Content,{children:[A,M,F,L,z,V]}),t[35]=A,t[36]=M,t[37]=F,t[38]=L,t[39]=z,t[40]=V,t[41]=H):H=t[41];let U;t[42]===p?U=t[43]:(U=p??{},t[42]=p,t[43]=U);let W;t[44]!==n||t[45]!==a||t[46]!==h||t[47]!==U?(W=(0,$.jsx)(Ue,{clusterName:n,current:U,nodegroupName:a,onOpenChange:g,open:h}),t[44]=n,t[45]=a,t[46]=h,t[47]=U,t[48]=W):W=t[48];let ee=`Update node group "${a}" from ${f?.version} to ${r}? Nodes are replaced in a rolling update.`,G;t[49]!==n||t[50]!==r||t[51]!==a||t[52]!==l?(G=()=>l.mutate({clusterName:n,nodegroupName:a,version:r},{onSuccess:()=>v(!1)}),t[49]=n,t[50]=r,t[51]=a,t[52]=l,t[53]=G):G=t[53];let te;t[54]!==_||t[55]!==ee||t[56]!==G||t[57]!==l.isPending?(te=(0,$.jsx)(pe,{confirmLabel:`Update`,description:ee,isPending:l.isPending,onConfirm:G,onOpenChange:v,open:_,title:`Update node group version`}),t[54]=_,t[55]=ee,t[56]=G,t[57]=l.isPending,t[58]=te):te=t[58];let ne;return t[59]!==O||t[60]!==H||t[61]!==W||t[62]!==te?(ne=(0,$.jsxs)(Y,{children:[O,H,W,te]}),t[59]=O,t[60]=H,t[61]=W,t[62]=te,t[63]=ne):ne=t[63],ne}function Ge({clusterName:e,vpcId:t,open:n,onOpenChange:r}){let{data:a}=i(G),{data:o}=i(B),s=h(),c=a?.Roles??[],l=(o?.Subnets??[]).filter(e=>e.VpcId===t),{formState:{errors:u},handleSubmit:d,register:f,reset:p,setValue:m,watch:g}=te({resolver:re(v),defaultValues:{nodegroupName:``,nodeRole:``,subnetIds:[],instanceTypes:`t3.medium`,amiType:`AL2_x86_64`,capacityType:`ON_DEMAND`,diskSize:20,minSize:1,desiredSize:2,maxSize:3}}),_=g(`subnetIds`),y=e=>{m(`subnetIds`,_.includes(e)?_.filter(t=>t!==e):[..._,e],{shouldValidate:!0})},x=async t=>{await s.mutateAsync({clusterName:e,nodegroupName:t.nodegroupName,nodeRole:t.nodeRole,subnetIds:t.subnetIds,instanceTypes:t.instanceTypes.split(`,`).map(e=>e.trim()).filter(Boolean),amiType:t.amiType,capacityType:t.capacityType,diskSize:t.diskSize,minSize:t.minSize,desiredSize:t.desiredSize,maxSize:t.maxSize}),p(),r(!1)};return(0,$.jsx)(fe,{onOpenChange:r,open:n,children:(0,$.jsxs)(oe,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,$.jsx)(de,{children:(0,$.jsx)(se,{children:`Add node group`})}),(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-nodegroup-form`,children:[(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ng-name`,children:`Name`})}),(0,$.jsx)(V,{"aria-invalid":!!u.nodegroupName,id:`ng-name`,placeholder:`my-nodegroup`,...f(`nodegroupName`)}),(0,$.jsx)(q,{errors:[u.nodegroupName]})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ng-role`,children:`Node IAM role`})}),(0,$.jsxs)(`select`,{"aria-invalid":!!u.nodeRole,className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-role`,...f(`nodeRole`),children:[(0,$.jsx)(`option`,{value:``,children:`Select role`}),c.map(e=>(0,$.jsx)(`option`,{value:e.Arn??``,children:e.RoleName},e.Arn))]}),(0,$.jsx)(q,{errors:[u.nodeRole]})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:`Subnets`}),l.length===0?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the cluster VPC.`}):(0,$.jsx)(`div`,{className:`space-y-1`,children:l.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,$.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:_.includes(e.SubnetId??``),onChange:()=>y(e.SubnetId??``),type:`checkbox`}),(0,$.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` · `,e.CidrBlock]})]},e.SubnetId))}),(0,$.jsx)(q,{errors:[u.subnetIds]})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ng-instance-types`,children:`Instance types`})}),(0,$.jsx)(V,{id:`ng-instance-types`,placeholder:`t3.medium, t3.large`,...f(`instanceTypes`)}),(0,$.jsx)(q,{errors:[u.instanceTypes]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ng-ami`,children:`AMI type`})}),(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-ami`,...f(`amiType`),children:T.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ng-capacity`,children:`Capacity type`})}),(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-capacity`,...f(`capacityType`),children:b.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-4 gap-3`,children:[(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ng-disk`,children:`Disk (GB)`})}),(0,$.jsx)(V,{id:`ng-disk`,type:`number`,...f(`diskSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ng-min`,children:`Min`})}),(0,$.jsx)(V,{id:`ng-min`,type:`number`,...f(`minSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ng-desired`,children:`Desired`})}),(0,$.jsx)(V,{id:`ng-desired`,type:`number`,...f(`desiredSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(J,{children:[(0,$.jsx)(K,{children:(0,$.jsx)(`label`,{htmlFor:`ng-max`,children:`Max`})}),(0,$.jsx)(V,{id:`ng-max`,type:`number`,...f(`maxSize`,{valueAsNumber:!0})})]})]}),(0,$.jsx)(q,{errors:[u.desiredSize]})]}),(0,$.jsxs)(le,{children:[(0,$.jsx)(ue,{children:`Cancel`}),(0,$.jsx)(ce,{disabled:s.isPending,onClick:e=>{e.preventDefault(),d(x)()},children:s.isPending?`Creating…`:`Create`})]})]})})}function Ke(e){let t=(0,Z.c)(27),{clusterName:n,clusterVersion:r,vpcId:i}=e,o;t[0]===n?o=t[1]:(o=R(n),t[0]=n,t[1]=o);let{data:s}=a(o),c=A(),[l,u]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(),m;t[2]===s.nodegroups?m=t[3]:(m=s.nodegroups??[],t[2]=s.nodegroups,t[3]=m);let h=m,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(d,{onClick:()=>u(!0),size:`sm`,children:`Add node group`})}),t[4]=g):g=t[4];let _;t[5]!==n||t[6]!==r||t[7]!==h?(_=h.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:h.map(e=>(0,$.jsx)(We,{clusterName:n,clusterVersion:r,nodegroupName:e,onDelete:p},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No node groups.`}),t[5]=n,t[6]=r,t[7]=h,t[8]=_):_=t[8];let v;t[9]!==n||t[10]!==l||t[11]!==i?(v=(0,$.jsx)(Ge,{clusterName:n,onOpenChange:u,open:l,vpcId:i}),t[9]=n,t[10]=l,t[11]=i,t[12]=v):v=t[12];let y=`Delete node group "${f??``}"? This terminates its nodes.`,b;t[13]!==n||t[14]!==c||t[15]!==f?(b=()=>{f&&c.mutate({clusterName:n,nodegroupName:f},{onSuccess:()=>p(void 0)})},t[13]=n,t[14]=c,t[15]=f,t[16]=b):b=t[16];let x;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>!e&&p(void 0),t[17]=x):x=t[17];let S=f!==void 0,C;t[18]!==c.isPending||t[19]!==y||t[20]!==b||t[21]!==S?(C=(0,$.jsx)(pe,{description:y,isPending:c.isPending,onConfirm:b,onOpenChange:x,open:S,title:`Delete node group`}),t[18]=c.isPending,t[19]=y,t[20]=b,t[21]=S,t[22]=C):C=t[22];let w;return t[23]!==C||t[24]!==_||t[25]!==v?(w=(0,$.jsxs)($.Fragment,{children:[g,_,v,C]}),t[23]=C,t[24]=_,t[25]=v,t[26]=w):w=t[26],w}var qe=`ap-southeast-2`;function Je(e){switch(e??``){case`ACTIVE`:return`default`;case`FAILED`:return`destructive`;default:return`secondary`}}function Ye(e){let t=(0,Z.c)(89),{clusterName:n}=e,r=z(),[i,o]=(0,Q.useState)(!1),f;t[0]===n?f=t[1]:(f=N(n),t[0]=n,t[1]=f);let{data:p}=a(f),m=g(),h=p.cluster,_;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_={type:`bin`,value:`aws eks update-kubeconfig`},t[2]=_):_=t[2];let v;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(v={type:`flag`,value:` --name `},t[3]=v):v=t[3];let y;t[4]===n?y=t[5]:(y={type:`value`,value:n},t[4]=n,t[5]=y);let b;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(b={type:`flag`,value:` --region `},t[6]=b):b=t[6];let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x={type:`value`,value:qe},t[7]=x):x=t[7];let S;t[8]===y?S=t[9]:(S={label:`Configure kubectl`,parts:[_,v,y,b,x]},t[8]=y,t[9]=S);let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C={label:`Verify access`,parts:[{type:`bin`,value:`kubectl get nodes`}]},t[10]=C):C=t[10];let w;t[11]===S?w=t[12]:(w=[S,C],t[11]=S,t[12]=w);let T=w,E;t[13]!==n||t[14]!==m||t[15]!==r?(E=function(){m.mutate(n,{onSuccess:()=>{r({to:`/eks/list-clusters`})}})},t[13]=n,t[14]=m,t[15]=r,t[16]=E):E=t[16];let D=E,O;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(c,{to:`/eks/list-clusters`,children:`Clusters`}),t[17]=O):O=t[17];let k;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>o(!0),t[18]=k):k=t[18];let A;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsxs)(d,{onClick:k,size:`sm`,variant:`destructive`,children:[(0,$.jsx)(u,{className:`size-4`}),`Delete`]}),t[19]=A):A=t[19];let j=h?.status,M;t[20]===j?M=t[21]:(M=Je(j),t[20]=j,t[21]=M);let P=h?.status??`UNKNOWN`,F;t[22]!==M||t[23]!==P?(F=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[A,(0,$.jsx)(ve,{variant:M,children:P})]}),t[22]=M,t[23]=P,t[24]=F):F=t[24];let I;t[25]!==n||t[26]!==F?(I=(0,$.jsx)(ae,{actions:F,subtitle:`Cluster Details`,title:n}),t[25]=n,t[26]=F,t[27]=I):I=t[27];let L;t[28]!==m.error||t[29]!==m.isError?(L=m.isError&&(0,$.jsx)(ie,{error:m.error instanceof Error?m.error:void 0,msg:`Failed to delete cluster.`}),t[28]=m.error,t[29]=m.isError,t[30]=L):L=t[30];let R;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsxs)(he,{children:[(0,$.jsx)(me,{value:`overview`,children:`Overview`}),(0,$.jsx)(me,{value:`compute`,children:`Compute`}),(0,$.jsx)(me,{value:`addons`,children:`Add-ons`}),(0,$.jsx)(me,{value:`access`,children:`Access`}),(0,$.jsx)(me,{value:`networking`,children:`Networking`}),(0,$.jsx)(me,{value:`connect`,children:`Connect`})]}),t[31]=R):R=t[31];let B;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsx)(Y.Header,{children:`Cluster`}),t[32]=B):B=t[32];let V=h?.arn,H;t[33]===V?H=t[34]:(H=(0,$.jsx)(X,{label:`ARN`,value:V}),t[33]=V,t[34]=H);let U=h?.status,W;t[35]===U?W=t[36]:(W=(0,$.jsx)(X,{label:`Status`,value:U}),t[35]=U,t[36]=W);let ee=h?.version,G;t[37]===ee?G=t[38]:(G=(0,$.jsx)(X,{label:`Kubernetes version`,value:ee}),t[37]=ee,t[38]=G);let te=h?.platformVersion,ne;t[39]===te?ne=t[40]:(ne=(0,$.jsx)(X,{label:`Platform version`,value:te}),t[39]=te,t[40]=ne);let re=h?.endpoint,K;t[41]===re?K=t[42]:(K=(0,$.jsx)(X,{label:`Endpoint`,value:re}),t[41]=re,t[42]=K);let q=h?.identity?.oidc?.issuer,J;t[43]===q?J=t[44]:(J=(0,$.jsx)(X,{label:`OIDC issuer`,value:q}),t[43]=q,t[44]=J);let oe=h?.resourcesVpcConfig?.vpcId,se;t[45]===oe?se=t[46]:(se=(0,$.jsx)(X,{label:`VPC`,value:oe}),t[45]=oe,t[46]=se);let ce=h?.createdAt,le;t[47]===ce?le=t[48]:(le=s(ce),t[47]=ce,t[48]=le);let ue;t[49]===le?ue=t[50]:(ue=(0,$.jsx)(X,{label:`Created at`,value:le}),t[49]=le,t[50]=ue);let de;t[51]!==H||t[52]!==W||t[53]!==G||t[54]!==ne||t[55]!==K||t[56]!==J||t[57]!==se||t[58]!==ue?(de=(0,$.jsx)(ge,{value:`overview`,children:(0,$.jsxs)(Y,{children:[B,(0,$.jsxs)(Y.Content,{children:[H,W,G,ne,K,J,se,ue]})]})}),t[51]=H,t[52]=W,t[53]=G,t[54]=ne,t[55]=K,t[56]=J,t[57]=se,t[58]=ue,t[59]=de):de=t[59];let fe=h?.version,ye=h?.resourcesVpcConfig?.vpcId,be;t[60]!==n||t[61]!==fe||t[62]!==ye?(be=(0,$.jsx)(ge,{value:`compute`,children:(0,$.jsx)(Ke,{clusterName:n,clusterVersion:fe,vpcId:ye})}),t[60]=n,t[61]=fe,t[62]=ye,t[63]=be):be=t[63];let xe;t[64]===n?xe=t[65]:(xe=(0,$.jsx)(ge,{value:`addons`,children:(0,$.jsx)(Le,{clusterName:n})}),t[64]=n,t[65]=xe);let Se;t[66]===n?Se=t[67]:(Se=(0,$.jsx)(ge,{value:`access`,children:(0,$.jsx)(De,{clusterName:n})}),t[66]=n,t[67]=Se);let Ce;t[68]===h?Ce=t[69]:(Ce=(0,$.jsx)(ge,{value:`networking`,children:(0,$.jsx)(ze,{cluster:h})}),t[68]=h,t[69]=Ce);let we;t[70]===T?we=t[71]:(we=(0,$.jsx)(ge,{value:`connect`,children:(0,$.jsx)(l,{commands:T})}),t[70]=T,t[71]=we);let Te;t[72]!==de||t[73]!==be||t[74]!==xe||t[75]!==Se||t[76]!==Ce||t[77]!==we?(Te=(0,$.jsxs)(_e,{defaultValue:`overview`,children:[R,de,be,xe,Se,Ce,we]}),t[72]=de,t[73]=be,t[74]=xe,t[75]=Se,t[76]=Ce,t[77]=we,t[78]=Te):Te=t[78];let Ee=`This permanently deletes cluster "${n}" and its control plane. This cannot be undone.`,Oe;t[79]!==m.isPending||t[80]!==D||t[81]!==i||t[82]!==Ee?(Oe=(0,$.jsx)(pe,{description:Ee,isPending:m.isPending,onConfirm:D,onOpenChange:o,open:i,title:`Delete cluster`}),t[79]=m.isPending,t[80]=D,t[81]=i,t[82]=Ee,t[83]=Oe):Oe=t[83];let ke;return t[84]!==I||t[85]!==L||t[86]!==Te||t[87]!==Oe?(ke=(0,$.jsxs)($.Fragment,{children:[O,I,L,Te,Oe]}),t[84]=I,t[85]=L,t[86]=Te,t[87]=Oe,t[88]=ke):ke=t[88],ke}function Xe(){let e=(0,Z.c)(2),{clusterName:t}=ee.useParams(),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(Ye,{clusterName:t}),e[0]=t,e[1]=n),n}export{Xe as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{ni as o}from"./awsClient.js";import{Bt as s}from"./auth.js";import{t as c}from"./back-link.js";import{t as l}from"./cli-command-panel.js";import{t as u}from"./trash-2.js";import{t as d}from"./button.js";import{C as f,S as p,T as m,_ as h,b as g,c as _,f as v,h as y,i as b,l as x,m as S,n as C,p as w,r as T,s as E,u as D,v as O,w as k,x as A,y as j}from"./eks.js";import{B as M,F as N,I as P,L as F,M as I,N as L,P as R,Qr as z,Yr as B,Zt as V,j as H,nr as U,x as ee,xt as te,z as ne}from"./index.js";import{i as W,n as re,t as ie}from"./zod.js";import{t as ae}from"./error-banner.js";import{t as oe}from"./page-heading.js";import{a as G,r as K,t as q}from"./field.js";import{i as se,l as ce,n as le,o as ue,r as J,s as de,t as fe}from"./alert-dialog.js";import{t as pe}from"./delete-confirmation-dialog.js";import{n as Y,t as X}from"./detail-row.js";import{i as me,n as he,r as ge,t as _e}from"./tabs.js";import{t as ve}from"./badge.js";import{t as ye}from"./json-editor.js";var be=B(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),xe=B(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Z=r(),Q=t(n(),1),$=e();function Se(e){return e?.split(`/`).pop()??e??``}function Ce(e){let t=(0,Z.c)(55),{clusterName:n,principalArn:r,onDelete:a}=e,o;t[0]!==n||t[1]!==r?(o=I(n,r),t[0]=n,t[1]=r,t[2]=o):o=t[2];let{data:s}=i(o),c;t[3]!==n||t[4]!==r?(c=P(n,r),t[3]=n,t[4]=r,t[5]=c):c=t[5];let{data:l}=i(c),f=w(),m=p(),[h,g]=(0,Q.useState)(C[0].arn),_=s?.accessEntry,v;t[6]===l?.associatedAccessPolicies?v=t[7]:(v=l?.associatedAccessPolicies??[],t[6]=l?.associatedAccessPolicies,t[7]=v);let y=v,b;t[8]===r?b=t[9]:(b=(0,$.jsx)(`span`,{className:`truncate font-mono text-xs`,children:r}),t[8]=r,t[9]=b);let x;t[10]!==a||t[11]!==r?(x=()=>a(r),t[10]=a,t[11]=r,t[12]=x):x=t[12];let S;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(u,{className:`size-4`}),t[13]=S):S=t[13];let T;t[14]===x?T=t[15]:(T=(0,$.jsx)(d,{onClick:x,size:`icon`,variant:`ghost`,children:S}),t[14]=x,t[15]=T);let E;t[16]!==b||t[17]!==T?(E=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[b,T]})}),t[16]=b,t[17]=T,t[18]=E):E=t[18];let D=_?.type,O;t[19]===D?O=t[20]:(O=(0,$.jsx)(X,{label:`Type`,value:D}),t[19]=D,t[20]=O);let k;t[21]===_?k=t[22]:(k=_?.kubernetesGroups?.length?_.kubernetesGroups.join(`, `):`—`,t[21]=_,t[22]=k);let A;t[23]===k?A=t[24]:(A=(0,$.jsx)(X,{label:`Kubernetes groups`,value:k}),t[23]=k,t[24]=A);let j;t[25]!==y||t[26]!==n||t[27]!==m||t[28]!==r?(j=y.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:y.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{children:Se(e.policyArn)}),(0,$.jsx)(d,{onClick:()=>m.mutate({clusterName:n,principalArn:r,policyArn:e.policyArn??``}),size:`sm`,variant:`ghost`,children:`Remove`})]},e.policyArn))}):`—`,t[25]=y,t[26]=n,t[27]=m,t[28]=r,t[29]=j):j=t[29];let M;t[30]===j?M=t[31]:(M=(0,$.jsx)(X,{label:`Access policies`,value:j}),t[30]=j,t[31]=M);let N;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>g(e.target.value),t[32]=N):N=t[32];let F;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(F=C.map(we),t[33]=F):F=t[33];let L;t[34]===h?L=t[35]:(L=(0,$.jsx)(`select`,{"aria-label":`Access policy`,className:`h-7 flex-1 rounded-md border border-input bg-input/20 px-2 text-sm`,onChange:N,value:h,children:F}),t[34]=h,t[35]=L);let R;t[36]!==f||t[37]!==n||t[38]!==h||t[39]!==r?(R=()=>f.mutate({clusterName:n,principalArn:r,policyArn:h,accessScopeType:`cluster`}),t[36]=f,t[37]=n,t[38]=h,t[39]=r,t[40]=R):R=t[40];let z;t[41]!==f.isPending||t[42]!==R?(z=(0,$.jsx)(d,{disabled:f.isPending,onClick:R,size:`sm`,children:`Associate`}),t[41]=f.isPending,t[42]=R,t[43]=z):z=t[43];let B;t[44]!==L||t[45]!==z?(B=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 pt-2`,children:[L,z]}),t[44]=L,t[45]=z,t[46]=B):B=t[46];let V;t[47]!==O||t[48]!==A||t[49]!==M||t[50]!==B?(V=(0,$.jsxs)(Y.Content,{children:[O,A,M,B]}),t[47]=O,t[48]=A,t[49]=M,t[50]=B,t[51]=V):V=t[51];let H;return t[52]!==V||t[53]!==E?(H=(0,$.jsxs)(Y,{children:[E,V]}),t[52]=V,t[53]=E,t[54]=H):H=t[54],H}function we(e){return(0,$.jsx)(`option`,{value:e.arn,children:e.name},e.arn)}function Te(e){let t=(0,Z.c)(41),{clusterName:n,open:r,onOpenChange:i}=e,a=S(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:ie(x),defaultValues:{principalArn:``,kubernetesGroups:``}},t[0]=o):o=t[0];let{formState:s,handleSubmit:c,register:l,reset:u}=W(o),{errors:d}=s,f;t[1]!==n||t[2]!==a||t[3]!==i||t[4]!==u?(f=async e=>{await a.mutateAsync({clusterName:n,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups.split(`,`).map(Ee).filter(Boolean)}),u(),i(!1)},t[1]=n,t[2]=a,t[3]=i,t[4]=u,t[5]=f):f=t[5];let p=f,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(de,{children:(0,$.jsx)(ce,{children:`Add access entry`})}),t[6]=m):m=t[6];let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ae-principal`,children:`IAM principal ARN`})}),t[7]=h):h=t[7];let g=!!d.principalArn,_;t[8]===l?_=t[9]:(_=l(`principalArn`),t[8]=l,t[9]=_);let v;t[10]!==g||t[11]!==_?(v=(0,$.jsx)(U,{"aria-invalid":g,id:`ae-principal`,placeholder:`arn:aws:iam::000000000000:role/my-role`,..._}),t[10]=g,t[11]=_,t[12]=v):v=t[12];let y;t[13]===d.principalArn?y=t[14]:(y=(0,$.jsx)(K,{errors:[d.principalArn]}),t[13]=d.principalArn,t[14]=y);let b;t[15]!==v||t[16]!==y?(b=(0,$.jsxs)(q,{children:[h,v,y]}),t[15]=v,t[16]=y,t[17]=b):b=t[17];let C;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ae-groups`,children:`Kubernetes groups`})}),t[18]=C):C=t[18];let w;t[19]===l?w=t[20]:(w=l(`kubernetesGroups`),t[19]=l,t[20]=w);let T;t[21]===w?T=t[22]:(T=(0,$.jsxs)(q,{children:[C,(0,$.jsx)(U,{id:`ae-groups`,placeholder:`system:masters`,...w})]}),t[21]=w,t[22]=T);let E;t[23]!==b||t[24]!==T?(E=(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-access-entry-form`,children:[b,T]}),t[23]=b,t[24]=T,t[25]=E):E=t[25];let D;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(J,{children:`Cancel`}),t[26]=D):D=t[26];let O;t[27]!==c||t[28]!==p?(O=e=>{e.preventDefault(),c(p)()},t[27]=c,t[28]=p,t[29]=O):O=t[29];let k=a.isPending?`Creating…`:`Create`,A;t[30]!==a.isPending||t[31]!==O||t[32]!==k?(A=(0,$.jsxs)(ue,{children:[D,(0,$.jsx)(le,{disabled:a.isPending,onClick:O,children:k})]}),t[30]=a.isPending,t[31]=O,t[32]=k,t[33]=A):A=t[33];let j;t[34]!==E||t[35]!==A?(j=(0,$.jsxs)(se,{children:[m,E,A]}),t[34]=E,t[35]=A,t[36]=j):j=t[36];let M;return t[37]!==i||t[38]!==r||t[39]!==j?(M=(0,$.jsx)(fe,{onOpenChange:i,open:r,children:j}),t[37]=i,t[38]=r,t[39]=j,t[40]=M):M=t[40],M}function Ee(e){return e.trim()}function De(e){let t=(0,Z.c)(25),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=H(n),t[0]=n,t[1]=r);let{data:i}=a(r),o=O(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(),f;t[2]===i.accessEntries?f=t[3]:(f=i.accessEntries??[],t[2]=i.accessEntries,t[3]=f);let p=f,m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(d,{onClick:()=>c(!0),size:`sm`,children:`Add access entry`})}),t[4]=m):m=t[4];let h;t[5]!==n||t[6]!==p?(h=p.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:p.map(e=>(0,$.jsx)(Ce,{clusterName:n,onDelete:u,principalArn:e},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No access entries.`}),t[5]=n,t[6]=p,t[7]=h):h=t[7];let g;t[8]!==n||t[9]!==s?(g=(0,$.jsx)(Te,{clusterName:n,onOpenChange:c,open:s}),t[8]=n,t[9]=s,t[10]=g):g=t[10];let _=`Delete access entry for "${l??``}"?`,v;t[11]!==n||t[12]!==o||t[13]!==l?(v=()=>{l&&o.mutate({clusterName:n,principalArn:l},{onSuccess:()=>u(void 0)})},t[11]=n,t[12]=o,t[13]=l,t[14]=v):v=t[14];let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>!e&&u(void 0),t[15]=y):y=t[15];let b=l!==void 0,x;t[16]!==o.isPending||t[17]!==_||t[18]!==v||t[19]!==b?(x=(0,$.jsx)(pe,{description:_,isPending:o.isPending,onConfirm:v,onOpenChange:y,open:b,title:`Delete access entry`}),t[16]=o.isPending,t[17]=_,t[18]=v,t[19]=b,t[20]=x):x=t[20];let S;return t[21]!==x||t[22]!==h||t[23]!==g?(S=(0,$.jsxs)($.Fragment,{children:[m,h,g,x]}),t[21]=x,t[22]=h,t[23]=g,t[24]=S):S=t[24],S}var Oe=new Set([`CREATING`,`UPDATING`,`DELETING`]),ke=5e3,Ae=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function je({clusterName:e,catalog:t,installed:n,open:r,onOpenChange:i}){let a=y(),o=t.filter(e=>!n.includes(e.addonName??``)),{control:s,formState:{errors:c},handleSubmit:l,register:u,reset:d,setValue:f,watch:p}=W({resolver:ie(D),defaultValues:{addonName:``,addonVersion:``,serviceAccountRoleArn:``,configurationValues:``}}),m=p(`addonName`),h=p(`addonVersion`),g=t.find(e=>e.addonName===m)?.addonVersions??[],_=g.find(e=>e.addonVersion===h)?.requiresIamPermissions??!1,v=e=>{let n=t.find(t=>t.addonName===e)?.addonVersions?.[0]?.addonVersion??``;f(`addonName`,e,{shouldValidate:!0}),f(`addonVersion`,n,{shouldValidate:!0})},b=async t=>{await a.mutateAsync({clusterName:e,addonName:t.addonName,addonVersion:t.addonVersion||void 0,serviceAccountRoleArn:t.serviceAccountRoleArn.trim()||void 0,configurationValues:t.configurationValues.trim()||void 0}),d(),i(!1)};return(0,$.jsx)(fe,{onOpenChange:i,open:r,children:(0,$.jsxs)(se,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,$.jsx)(de,{children:(0,$.jsx)(ce,{children:`Add add-on`})}),(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-addon-form`,children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`addon-name`,children:`Add-on`})}),(0,$.jsxs)(`select`,{"aria-invalid":!!c.addonName,className:Ae,id:`addon-name`,onChange:e=>v(e.target.value),value:m,children:[(0,$.jsx)(`option`,{value:``,children:`Select add-on`}),o.map(e=>(0,$.jsx)(`option`,{value:e.addonName??``,children:e.addonName},e.addonName))]}),(0,$.jsx)(K,{errors:[c.addonName]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`addon-version`,children:`Version`})}),(0,$.jsx)(`select`,{"aria-invalid":!!c.addonVersion,className:Ae,disabled:g.length===0,id:`addon-version`,onChange:e=>f(`addonVersion`,e.target.value,{shouldValidate:!0}),value:h,children:g.map((e,t)=>(0,$.jsxs)(`option`,{value:e.addonVersion??``,children:[e.addonVersion,t===0?` (latest)`:``]},e.addonVersion))}),(0,$.jsx)(K,{errors:[c.addonVersion]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`addon-role`,children:`Service account IAM role ARN`})}),(0,$.jsx)(U,{id:`addon-role`,placeholder:`arn:aws:iam::…:role/…`,...u(`serviceAccountRoleArn`)}),_&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This add-on needs IAM permissions — provide an IRSA role ARN.`})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`addon-config`,children:`Configuration values (JSON)`})}),(0,$.jsx)(re,{control:s,name:`configurationValues`,render:({field:{onBlur:e,onChange:t,ref:n,value:r}})=>(0,$.jsx)(ye,{error:!!c.configurationValues,id:`addon-config`,onBlur:e,onChange:t,placeholder:`{"replicaCount": 2}`,ref:n,rows:4,value:r})}),(0,$.jsx)(K,{errors:[c.configurationValues]})]})]}),(0,$.jsxs)(ue,{children:[(0,$.jsx)(J,{children:`Cancel`}),(0,$.jsx)(le,{disabled:a.isPending,onClick:e=>{e.preventDefault(),l(b)()},children:a.isPending?`Adding…`:`Add`})]})]})})}function Me(e){let t=(0,Z.c)(54),{clusterName:n,addonName:r,current:i,versions:a,open:o,onOpenChange:s}=e,c=k(),[l,u]=(0,Q.useState)(i.addonVersion??``),[d,f]=(0,Q.useState)(i.serviceAccountRoleArn??``),[p,m]=(0,Q.useState)(i.configurationValues??``),[h,g]=(0,Q.useState)(),_,v;t[0]!==i.addonVersion||t[1]!==i.configurationValues||t[2]!==i.serviceAccountRoleArn||t[3]!==o?(_=()=>{o&&(u(i.addonVersion??``),f(i.serviceAccountRoleArn??``),m(i.configurationValues??``),g(void 0))},v=[o,i.addonVersion,i.serviceAccountRoleArn,i.configurationValues],t[0]=i.addonVersion,t[1]=i.configurationValues,t[2]=i.serviceAccountRoleArn,t[3]=o,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,Q.useEffect)(_,v);let y;t[6]!==r||t[7]!==n||t[8]!==p||t[9]!==s||t[10]!==d||t[11]!==c||t[12]!==l?(y=()=>{let e=E.safeParse(p);if(!e.success){g(e.error.issues[0]?.message??`Configuration must be valid JSON`);return}g(void 0),c.mutate({clusterName:n,addonName:r,addonVersion:l||void 0,serviceAccountRoleArn:d.trim()||void 0,configurationValues:p.trim()||void 0},{onSuccess:()=>s(!1)})},t[6]=r,t[7]=n,t[8]=p,t[9]=s,t[10]=d,t[11]=c,t[12]=l,t[13]=y):y=t[13];let b=y,x;t[14]===r?x=t[15]:(x=(0,$.jsx)(de,{children:(0,$.jsxs)(ce,{children:[`Update `,r]})}),t[14]=r,t[15]=x);let S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-version`,children:`Version`})}),t[16]=S):S=t[16];let C=a.length===0,w;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>u(e.target.value),t[17]=w):w=t[17];let T;t[18]===a?T=t[19]:(T=a.map(Ne),t[18]=a,t[19]=T);let D;t[20]!==C||t[21]!==T||t[22]!==l?(D=(0,$.jsxs)(q,{children:[S,(0,$.jsx)(`select`,{className:Ae,disabled:C,id:`update-addon-version`,onChange:w,value:l,children:T})]}),t[20]=C,t[21]=T,t[22]=l,t[23]=D):D=t[23];let O;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-role`,children:`Service account IAM role ARN`})}),t[24]=O):O=t[24];let A;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>f(e.target.value),t[25]=A):A=t[25];let j;t[26]===d?j=t[27]:(j=(0,$.jsxs)(q,{children:[O,(0,$.jsx)(U,{id:`update-addon-role`,onChange:A,placeholder:`arn:aws:iam::…:role/…`,value:d})]}),t[26]=d,t[27]=j);let M;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-config`,children:`Configuration values (JSON)`})}),t[28]=M):M=t[28];let N=!!h,P;t[29]!==p||t[30]!==N?(P=(0,$.jsxs)(q,{children:[M,(0,$.jsx)(ye,{error:N,id:`update-addon-config`,onChange:m,rows:4,value:p})]}),t[29]=p,t[30]=N,t[31]=P):P=t[31];let F;t[32]!==j||t[33]!==P||t[34]!==D?(F=(0,$.jsxs)(`div`,{className:`space-y-4`,children:[D,j,P]}),t[32]=j,t[33]=P,t[34]=D,t[35]=F):F=t[35];let I;t[36]===h?I=t[37]:(I=h&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:h}),t[36]=h,t[37]=I);let L;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(J,{children:`Cancel`}),t[38]=L):L=t[38];let R;t[39]===b?R=t[40]:(R=e=>{e.preventDefault(),b()},t[39]=b,t[40]=R);let z=c.isPending?`Updating…`:`Update`,B;t[41]!==R||t[42]!==z||t[43]!==c.isPending?(B=(0,$.jsxs)(ue,{children:[L,(0,$.jsx)(le,{disabled:c.isPending,onClick:R,children:z})]}),t[41]=R,t[42]=z,t[43]=c.isPending,t[44]=B):B=t[44];let V;t[45]!==F||t[46]!==I||t[47]!==B||t[48]!==x?(V=(0,$.jsxs)(se,{className:`max-h-[85vh] overflow-y-auto`,children:[x,F,I,B]}),t[45]=F,t[46]=I,t[47]=B,t[48]=x,t[49]=V):V=t[49];let H;return t[50]!==s||t[51]!==o||t[52]!==V?(H=(0,$.jsx)(fe,{onOpenChange:s,open:o,children:V}),t[50]=s,t[51]=o,t[52]=V,t[53]=H):H=t[53],H}function Ne(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function Pe(e){let t=(0,Z.c)(53),{clusterName:n,addonName:r,catalog:a,onDelete:o}=e,s;t[0]!==r||t[1]!==n?(s=L(n,r),t[0]=r,t[1]=n,t[2]=s):s=t[2];let c;t[3]===s?c=t[4]:(c={...s,refetchInterval:Ie},t[3]=s,t[4]=c);let{data:l}=i(c),[f,p]=(0,Q.useState)(!1),m=l?.addon,h=m?.health?.issues?.[0]?.message,g;t[5]!==r||t[6]!==a?(g=a.find(e=>e.addonName===r)?.addonVersions?.map(Fe).filter(Boolean)??[],t[5]=r,t[6]=a,t[7]=g):g=t[7];let v=g,y;t[8]===r?y=t[9]:(y=(0,$.jsx)(`span`,{children:r}),t[8]=r,t[9]=y);let b=m?.status,x;t[10]===b?x=t[11]:(x=_(b),t[10]=b,t[11]=x);let S=m?.status??`UNKNOWN`,C;t[12]!==x||t[13]!==S?(C=(0,$.jsx)(ve,{variant:x,children:S}),t[12]=x,t[13]=S,t[14]=C):C=t[14];let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>p(!0),t[15]=w):w=t[15];let T;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(d,{"aria-label":`Update add-on`,onClick:w,size:`icon`,variant:`ghost`,children:(0,$.jsx)(be,{className:`size-4`})}),t[16]=T):T=t[16];let E;t[17]!==r||t[18]!==o?(E=()=>o(r),t[17]=r,t[18]=o,t[19]=E):E=t[19];let D;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(u,{className:`size-4`}),t[20]=D):D=t[20];let O;t[21]===E?O=t[22]:(O=(0,$.jsx)(d,{"aria-label":`Remove add-on`,onClick:E,size:`icon`,variant:`ghost`,children:D}),t[21]=E,t[22]=O);let k;t[23]!==O||t[24]!==C?(k=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[C,T,O]}),t[23]=O,t[24]=C,t[25]=k):k=t[25];let A;t[26]!==k||t[27]!==y?(A=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[y,k]})}),t[26]=k,t[27]=y,t[28]=A):A=t[28];let j=m?.addonVersion,M;t[29]===j?M=t[30]:(M=(0,$.jsx)(X,{label:`Version`,value:j}),t[29]=j,t[30]=M);let N=m?.serviceAccountRoleArn,P;t[31]===N?P=t[32]:(P=(0,$.jsx)(X,{label:`IRSA role`,value:N}),t[31]=N,t[32]=P);let F;t[33]===h?F=t[34]:(F=h&&(0,$.jsx)(X,{label:`Issue`,value:(0,$.jsx)(`span`,{className:`text-destructive`,children:h})}),t[33]=h,t[34]=F);let I;t[35]!==M||t[36]!==P||t[37]!==F?(I=(0,$.jsxs)(Y.Content,{children:[M,P,F]}),t[35]=M,t[36]=P,t[37]=F,t[38]=I):I=t[38];let R=m?.addonVersion,z=m?.serviceAccountRoleArn,B=m?.configurationValues,V;t[39]!==R||t[40]!==z||t[41]!==B?(V={addonVersion:R,serviceAccountRoleArn:z,configurationValues:B},t[39]=R,t[40]=z,t[41]=B,t[42]=V):V=t[42];let H;t[43]!==r||t[44]!==n||t[45]!==f||t[46]!==V||t[47]!==v?(H=(0,$.jsx)(Me,{addonName:r,clusterName:n,current:V,onOpenChange:p,open:f,versions:v}),t[43]=r,t[44]=n,t[45]=f,t[46]=V,t[47]=v,t[48]=H):H=t[48];let U;return t[49]!==A||t[50]!==I||t[51]!==H?(U=(0,$.jsxs)(Y,{children:[A,I,H]}),t[49]=A,t[50]=I,t[51]=H,t[52]=U):U=t[52],U}function Fe(e){return e.addonVersion??``}function Ie(e){return Oe.has(e.state.data?.addon?.status??``)?ke:!1}function Le(e){let t=(0,Z.c)(31),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=N(n),t[0]=n,t[1]=r);let{data:o}=a(r),{data:s}=i(R),c=j(),[l,u]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(),m;t[2]===o.addons?m=t[3]:(m=o.addons??[],t[2]=o.addons,t[3]=m);let h=m,g;t[4]===s?.addons?g=t[5]:(g=s?.addons??[],t[4]=s?.addons,t[5]=g);let _=g,v;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Add-on manifests are staged; activation completes when the cluster reports the workload ready.`}),t[6]=v):v=t[6];let y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-4`,children:[v,(0,$.jsx)(d,{onClick:()=>u(!0),size:`sm`,children:`Add add-on`})]}),t[7]=y):y=t[7];let b;t[8]!==h||t[9]!==_||t[10]!==n?(b=h.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:h.map(e=>(0,$.jsx)(Pe,{addonName:e,catalog:_,clusterName:n,onDelete:p},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No add-ons installed.`}),t[8]=h,t[9]=_,t[10]=n,t[11]=b):b=t[11];let x;t[12]!==h||t[13]!==_||t[14]!==n||t[15]!==l?(x=(0,$.jsx)(je,{catalog:_,clusterName:n,installed:h,onOpenChange:u,open:l}),t[12]=h,t[13]=_,t[14]=n,t[15]=l,t[16]=x):x=t[16];let S=`Remove add-on "${f??``}" from the cluster?`,C;t[17]!==n||t[18]!==c||t[19]!==f?(C=()=>{f&&c.mutate({clusterName:n,addonName:f},{onSuccess:()=>p(void 0)})},t[17]=n,t[18]=c,t[19]=f,t[20]=C):C=t[20];let w;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>!e&&p(void 0),t[21]=w):w=t[21];let T=f!==void 0,E;t[22]!==c.isPending||t[23]!==T||t[24]!==S||t[25]!==C?(E=(0,$.jsx)(pe,{confirmLabel:`Remove`,description:S,isPending:c.isPending,onConfirm:C,onOpenChange:w,open:T,pendingLabel:`Removing…`,title:`Remove add-on`}),t[22]=c.isPending,t[23]=T,t[24]=S,t[25]=C,t[26]=E):E=t[26];let D;return t[27]!==E||t[28]!==b||t[29]!==x?(D=(0,$.jsxs)($.Fragment,{children:[y,b,x,E]}),t[27]=E,t[28]=b,t[29]=x,t[30]=D):D=t[30],D}function Re(e){let t=(0,Z.c)(6),{to:n,id:r}=e,i;t[0]===r?i=t[1]:(i={id:r},t[0]=r,t[1]=i);let a;return t[2]!==r||t[3]!==i||t[4]!==n?(a=(0,$.jsx)(o,{className:`font-mono text-primary underline-offset-2 hover:underline`,params:i,to:n,children:r}),t[2]=r,t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function ze(e){let t=(0,Z.c)(45),{cluster:n}=e,r=n?.resourcesVpcConfig,i;t[0]===r?.subnetIds?i=t[1]:(i=r?.subnetIds??[],t[0]=r?.subnetIds,t[1]=i);let a=i,o;t[2]===r?.securityGroupIds?o=t[3]:(o=r?.securityGroupIds??[],t[2]=r?.securityGroupIds,t[3]=o);let s=o,c;t[4]===r?.publicAccessCidrs?c=t[5]:(c=r?.publicAccessCidrs??[],t[4]=r?.publicAccessCidrs,t[5]=c);let l=c,u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Y.Header,{children:`VPC`}),t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=r?.vpcId?(0,$.jsx)(Re,{id:r.vpcId,to:`/ec2/describe-vpcs/$id`}):void 0,t[7]=r,t[8]=d);let f;t[9]===d?f=t[10]:(f=(0,$.jsx)(X,{label:`VPC`,value:d}),t[9]=d,t[10]=f);let p=n?.endpoint,m;t[11]===p?m=t[12]:(m=(0,$.jsx)(X,{label:`API server endpoint`,value:p}),t[11]=p,t[12]=m);let h=r?.endpointPublicAccess?`Enabled`:`Disabled`,g;t[13]===h?g=t[14]:(g=(0,$.jsx)(X,{label:`Public access`,value:h}),t[13]=h,t[14]=g);let _=r?.endpointPrivateAccess?`Enabled`:`Disabled`,v;t[15]===_?v=t[16]:(v=(0,$.jsx)(X,{label:`Private access`,value:_}),t[15]=_,t[16]=v);let y;t[17]!==l||t[18]!==r?.endpointPublicAccess?(y=r?.endpointPublicAccess&&(0,$.jsx)(X,{label:`Public access CIDRs`,value:l.length>0?(0,$.jsx)(`div`,{className:`space-y-1 font-mono text-xs`,children:l.map(He)}):`Any (0.0.0.0/0)`}),t[17]=l,t[18]=r?.endpointPublicAccess,t[19]=y):y=t[19];let b;t[20]!==g||t[21]!==v||t[22]!==y||t[23]!==f||t[24]!==m?(b=(0,$.jsxs)(Y,{children:[u,(0,$.jsxs)(Y.Content,{children:[f,m,g,v,y]})]}),t[20]=g,t[21]=v,t[22]=y,t[23]=f,t[24]=m,t[25]=b):b=t[25];let x;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(Y.Header,{children:`Subnets`}),t[26]=x):x=t[26];let S;t[27]===a?S=t[28]:(S=(0,$.jsxs)(Y,{children:[x,(0,$.jsx)(Y.Content,{children:a.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:a.map(Ve)}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets.`})})]}),t[27]=a,t[28]=S);let C;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(Y.Header,{children:`Security groups`}),t[29]=C):C=t[29];let w;t[30]===r?w=t[31]:(w=r?.clusterSecurityGroupId?(0,$.jsx)(Re,{id:r.clusterSecurityGroupId,to:`/ec2/describe-security-groups/$id`}):void 0,t[30]=r,t[31]=w);let T;t[32]===w?T=t[33]:(T=(0,$.jsx)(X,{label:`Cluster security group`,value:w}),t[32]=w,t[33]=T);let E;t[34]===s?E=t[35]:(E=s.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:s.map(Be)}):`—`,t[34]=s,t[35]=E);let D;t[36]===E?D=t[37]:(D=(0,$.jsx)(X,{label:`Additional security groups`,value:E}),t[36]=E,t[37]=D);let O;t[38]!==T||t[39]!==D?(O=(0,$.jsxs)(Y,{children:[C,(0,$.jsxs)(Y.Content,{children:[T,D]})]}),t[38]=T,t[39]=D,t[40]=O):O=t[40];let k;return t[41]!==b||t[42]!==S||t[43]!==O?(k=(0,$.jsxs)($.Fragment,{children:[b,S,O]}),t[41]=b,t[42]=S,t[43]=O,t[44]=k):k=t[44],k}function Be(e){return(0,$.jsx)(Re,{id:e,to:`/ec2/describe-security-groups/$id`},e)}function Ve(e){return(0,$.jsx)(Re,{id:e,to:`/ec2/describe-subnets/$id`},e)}function He(e){return(0,$.jsx)(`div`,{children:e},e)}function Ue(e){let t=(0,Z.c)(50),{clusterName:n,nodegroupName:r,current:i,open:a,onOpenChange:o}=e,s=f(),[c,l]=(0,Q.useState)(i.minSize??0),[u,d]=(0,Q.useState)(i.desiredSize??0),[p,m]=(0,Q.useState)(i.maxSize??0),[h,g]=(0,Q.useState)(),_,v;t[0]!==i.desiredSize||t[1]!==i.maxSize||t[2]!==i.minSize||t[3]!==a?(_=()=>{a&&(l(i.minSize??0),d(i.desiredSize??0),m(i.maxSize??0),g(void 0))},v=[a,i.minSize,i.desiredSize,i.maxSize],t[0]=i.desiredSize,t[1]=i.maxSize,t[2]=i.minSize,t[3]=a,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,Q.useEffect)(_,v);let y;t[6]!==n||t[7]!==u||t[8]!==p||t[9]!==c||t[10]!==r||t[11]!==o||t[12]!==s?(y=()=>{if(!(c<=u&&u<=p)){g(`Sizes must satisfy min ≤ desired ≤ max`);return}s.mutate({clusterName:n,nodegroupName:r,minSize:c,desiredSize:u,maxSize:p},{onSuccess:()=>o(!1)})},t[6]=n,t[7]=u,t[8]=p,t[9]=c,t[10]=r,t[11]=o,t[12]=s,t[13]=y):y=t[13];let b=y,x;t[14]===r?x=t[15]:(x=(0,$.jsx)(de,{children:(0,$.jsxs)(ce,{children:[`Scale `,r]})}),t[14]=r,t[15]=x);let S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`scale-min`,children:`Min`})}),t[16]=S):S=t[16];let C;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>l(Number(e.target.value)),t[17]=C):C=t[17];let w;t[18]===c?w=t[19]:(w=(0,$.jsxs)(q,{children:[S,(0,$.jsx)(U,{id:`scale-min`,onChange:C,type:`number`,value:c})]}),t[18]=c,t[19]=w);let T;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`scale-desired`,children:`Desired`})}),t[20]=T):T=t[20];let E;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>d(Number(e.target.value)),t[21]=E):E=t[21];let D;t[22]===u?D=t[23]:(D=(0,$.jsxs)(q,{children:[T,(0,$.jsx)(U,{id:`scale-desired`,onChange:E,type:`number`,value:u})]}),t[22]=u,t[23]=D);let O;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`scale-max`,children:`Max`})}),t[24]=O):O=t[24];let k;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(k=e=>m(Number(e.target.value)),t[25]=k):k=t[25];let A;t[26]===p?A=t[27]:(A=(0,$.jsxs)(q,{children:[O,(0,$.jsx)(U,{id:`scale-max`,onChange:k,type:`number`,value:p})]}),t[26]=p,t[27]=A);let j;t[28]!==D||t[29]!==A||t[30]!==w?(j=(0,$.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[w,D,A]}),t[28]=D,t[29]=A,t[30]=w,t[31]=j):j=t[31];let M;t[32]===h?M=t[33]:(M=h&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:h}),t[32]=h,t[33]=M);let N;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(J,{children:`Cancel`}),t[34]=N):N=t[34];let P;t[35]===b?P=t[36]:(P=e=>{e.preventDefault(),b()},t[35]=b,t[36]=P);let F=s.isPending?`Scaling…`:`Scale`,I;t[37]!==s.isPending||t[38]!==P||t[39]!==F?(I=(0,$.jsxs)(ue,{children:[N,(0,$.jsx)(le,{disabled:s.isPending,onClick:P,children:F})]}),t[37]=s.isPending,t[38]=P,t[39]=F,t[40]=I):I=t[40];let L;t[41]!==j||t[42]!==M||t[43]!==I||t[44]!==x?(L=(0,$.jsxs)(se,{children:[x,j,M,I]}),t[41]=j,t[42]=M,t[43]=I,t[44]=x,t[45]=L):L=t[45];let R;return t[46]!==o||t[47]!==a||t[48]!==L?(R=(0,$.jsx)(fe,{onOpenChange:o,open:a,children:L}),t[46]=o,t[47]=a,t[48]=L,t[49]=R):R=t[49],R}function We(e){let t=(0,Z.c)(64),{clusterName:n,clusterVersion:r,nodegroupName:a,onDelete:o}=e,s;t[0]!==n||t[1]!==a?(s=ne(n,a),t[0]=n,t[1]=a,t[2]=s):s=t[2];let{data:c}=i(s),l=m(),f=c?.nodegroup,p=f?.scalingConfig,[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(!1),y=!!r&&!!f?.version&&f.version!==r,b;t[3]===a?b=t[4]:(b=(0,$.jsx)(`span`,{children:a}),t[3]=a,t[4]=b);let x;t[5]===y?x=t[6]:(x=y&&(0,$.jsx)(d,{"aria-label":`Update node group version`,onClick:()=>v(!0),size:`icon`,variant:`ghost`,children:(0,$.jsx)(be,{className:`size-4`})}),t[5]=y,t[6]=x);let S;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>g(!0),t[7]=S):S=t[7];let C;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(d,{"aria-label":`Scale node group`,onClick:S,size:`icon`,variant:`ghost`,children:(0,$.jsx)(xe,{className:`size-4`})}),t[8]=C):C=t[8];let w;t[9]!==a||t[10]!==o?(w=()=>o(a),t[9]=a,t[10]=o,t[11]=w):w=t[11];let T;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(u,{className:`size-4`}),t[12]=T):T=t[12];let E;t[13]===w?E=t[14]:(E=(0,$.jsx)(d,{"aria-label":`Delete node group`,onClick:w,size:`icon`,variant:`ghost`,children:T}),t[13]=w,t[14]=E);let D;t[15]!==x||t[16]!==E?(D=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[x,C,E]}),t[15]=x,t[16]=E,t[17]=D):D=t[17];let O;t[18]!==b||t[19]!==D?(O=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[b,D]})}),t[18]=b,t[19]=D,t[20]=O):O=t[20];let k=f?.status,A;t[21]===k?A=t[22]:(A=(0,$.jsx)(X,{label:`Status`,value:k}),t[21]=k,t[22]=A);let j=y?`${f?.version} (cluster on ${r})`:f?.version,M;t[23]===j?M=t[24]:(M=(0,$.jsx)(X,{label:`Kubernetes version`,value:j}),t[23]=j,t[24]=M);let N;t[25]===f?.instanceTypes?N=t[26]:(N=f?.instanceTypes?.join(`, `),t[25]=f?.instanceTypes,t[26]=N);let P;t[27]===N?P=t[28]:(P=(0,$.jsx)(X,{label:`Instance types`,value:N}),t[27]=N,t[28]=P);let F=f?.amiType,I;t[29]===F?I=t[30]:(I=(0,$.jsx)(X,{label:`AMI type`,value:F}),t[29]=F,t[30]=I);let L=f?.capacityType,R;t[31]===L?R=t[32]:(R=(0,$.jsx)(X,{label:`Capacity type`,value:L}),t[31]=L,t[32]=R);let z=p?`${p.minSize} / ${p.desiredSize} / ${p.maxSize}`:void 0,B;t[33]===z?B=t[34]:(B=(0,$.jsx)(X,{label:`Scaling (min / desired / max)`,value:z}),t[33]=z,t[34]=B);let V;t[35]!==A||t[36]!==M||t[37]!==P||t[38]!==I||t[39]!==R||t[40]!==B?(V=(0,$.jsxs)(Y.Content,{children:[A,M,P,I,R,B]}),t[35]=A,t[36]=M,t[37]=P,t[38]=I,t[39]=R,t[40]=B,t[41]=V):V=t[41];let H;t[42]===p?H=t[43]:(H=p??{},t[42]=p,t[43]=H);let U;t[44]!==n||t[45]!==a||t[46]!==h||t[47]!==H?(U=(0,$.jsx)(Ue,{clusterName:n,current:H,nodegroupName:a,onOpenChange:g,open:h}),t[44]=n,t[45]=a,t[46]=h,t[47]=H,t[48]=U):U=t[48];let ee=`Update node group "${a}" from ${f?.version} to ${r}? Nodes are replaced in a rolling update.`,te;t[49]!==n||t[50]!==r||t[51]!==a||t[52]!==l?(te=()=>l.mutate({clusterName:n,nodegroupName:a,version:r},{onSuccess:()=>v(!1)}),t[49]=n,t[50]=r,t[51]=a,t[52]=l,t[53]=te):te=t[53];let W;t[54]!==_||t[55]!==ee||t[56]!==te||t[57]!==l.isPending?(W=(0,$.jsx)(pe,{confirmLabel:`Update`,description:ee,isPending:l.isPending,onConfirm:te,onOpenChange:v,open:_,title:`Update node group version`}),t[54]=_,t[55]=ee,t[56]=te,t[57]=l.isPending,t[58]=W):W=t[58];let re;return t[59]!==O||t[60]!==V||t[61]!==U||t[62]!==W?(re=(0,$.jsxs)(Y,{children:[O,V,U,W]}),t[59]=O,t[60]=V,t[61]=U,t[62]=W,t[63]=re):re=t[63],re}function Ge({clusterName:e,vpcId:t,open:n,onOpenChange:r}){let{data:a}=i(te),{data:o}=i(V),s=h(),c=a?.Roles??[],l=(o?.Subnets??[]).filter(e=>e.VpcId===t),{formState:{errors:u},handleSubmit:d,register:f,reset:p,setValue:m,watch:g}=W({resolver:ie(v),defaultValues:{nodegroupName:``,nodeRole:``,subnetIds:[],instanceTypes:`t3.medium`,amiType:`AL2_x86_64`,capacityType:`ON_DEMAND`,diskSize:20,minSize:1,desiredSize:2,maxSize:3}}),_=g(`subnetIds`),y=e=>{m(`subnetIds`,_.includes(e)?_.filter(t=>t!==e):[..._,e],{shouldValidate:!0})},x=async t=>{await s.mutateAsync({clusterName:e,nodegroupName:t.nodegroupName,nodeRole:t.nodeRole,subnetIds:t.subnetIds,instanceTypes:t.instanceTypes.split(`,`).map(e=>e.trim()).filter(Boolean),amiType:t.amiType,capacityType:t.capacityType,diskSize:t.diskSize,minSize:t.minSize,desiredSize:t.desiredSize,maxSize:t.maxSize}),p(),r(!1)};return(0,$.jsx)(fe,{onOpenChange:r,open:n,children:(0,$.jsxs)(se,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,$.jsx)(de,{children:(0,$.jsx)(ce,{children:`Add node group`})}),(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-nodegroup-form`,children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-name`,children:`Name`})}),(0,$.jsx)(U,{"aria-invalid":!!u.nodegroupName,id:`ng-name`,placeholder:`my-nodegroup`,...f(`nodegroupName`)}),(0,$.jsx)(K,{errors:[u.nodegroupName]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-role`,children:`Node IAM role`})}),(0,$.jsxs)(`select`,{"aria-invalid":!!u.nodeRole,className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-role`,...f(`nodeRole`),children:[(0,$.jsx)(`option`,{value:``,children:`Select role`}),c.map(e=>(0,$.jsx)(`option`,{value:e.Arn??``,children:e.RoleName},e.Arn))]}),(0,$.jsx)(K,{errors:[u.nodeRole]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:`Subnets`}),l.length===0?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the cluster VPC.`}):(0,$.jsx)(`div`,{className:`space-y-1`,children:l.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,$.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:_.includes(e.SubnetId??``),onChange:()=>y(e.SubnetId??``),type:`checkbox`}),(0,$.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` · `,e.CidrBlock]})]},e.SubnetId))}),(0,$.jsx)(K,{errors:[u.subnetIds]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-instance-types`,children:`Instance types`})}),(0,$.jsx)(U,{id:`ng-instance-types`,placeholder:`t3.medium, t3.large`,...f(`instanceTypes`)}),(0,$.jsx)(K,{errors:[u.instanceTypes]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-ami`,children:`AMI type`})}),(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-ami`,...f(`amiType`),children:T.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-capacity`,children:`Capacity type`})}),(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-capacity`,...f(`capacityType`),children:b.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-4 gap-3`,children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-disk`,children:`Disk (GB)`})}),(0,$.jsx)(U,{id:`ng-disk`,type:`number`,...f(`diskSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-min`,children:`Min`})}),(0,$.jsx)(U,{id:`ng-min`,type:`number`,...f(`minSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-desired`,children:`Desired`})}),(0,$.jsx)(U,{id:`ng-desired`,type:`number`,...f(`desiredSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-max`,children:`Max`})}),(0,$.jsx)(U,{id:`ng-max`,type:`number`,...f(`maxSize`,{valueAsNumber:!0})})]})]}),(0,$.jsx)(K,{errors:[u.desiredSize]})]}),(0,$.jsxs)(ue,{children:[(0,$.jsx)(J,{children:`Cancel`}),(0,$.jsx)(le,{disabled:s.isPending,onClick:e=>{e.preventDefault(),d(x)()},children:s.isPending?`Creating…`:`Create`})]})]})})}function Ke(e){let t=(0,Z.c)(27),{clusterName:n,clusterVersion:r,vpcId:i}=e,o;t[0]===n?o=t[1]:(o=M(n),t[0]=n,t[1]=o);let{data:s}=a(o),c=A(),[l,u]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(),m;t[2]===s.nodegroups?m=t[3]:(m=s.nodegroups??[],t[2]=s.nodegroups,t[3]=m);let h=m,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(d,{onClick:()=>u(!0),size:`sm`,children:`Add node group`})}),t[4]=g):g=t[4];let _;t[5]!==n||t[6]!==r||t[7]!==h?(_=h.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:h.map(e=>(0,$.jsx)(We,{clusterName:n,clusterVersion:r,nodegroupName:e,onDelete:p},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No node groups.`}),t[5]=n,t[6]=r,t[7]=h,t[8]=_):_=t[8];let v;t[9]!==n||t[10]!==l||t[11]!==i?(v=(0,$.jsx)(Ge,{clusterName:n,onOpenChange:u,open:l,vpcId:i}),t[9]=n,t[10]=l,t[11]=i,t[12]=v):v=t[12];let y=`Delete node group "${f??``}"? This terminates its nodes.`,b;t[13]!==n||t[14]!==c||t[15]!==f?(b=()=>{f&&c.mutate({clusterName:n,nodegroupName:f},{onSuccess:()=>p(void 0)})},t[13]=n,t[14]=c,t[15]=f,t[16]=b):b=t[16];let x;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>!e&&p(void 0),t[17]=x):x=t[17];let S=f!==void 0,C;t[18]!==c.isPending||t[19]!==y||t[20]!==b||t[21]!==S?(C=(0,$.jsx)(pe,{description:y,isPending:c.isPending,onConfirm:b,onOpenChange:x,open:S,title:`Delete node group`}),t[18]=c.isPending,t[19]=y,t[20]=b,t[21]=S,t[22]=C):C=t[22];let w;return t[23]!==C||t[24]!==_||t[25]!==v?(w=(0,$.jsxs)($.Fragment,{children:[g,_,v,C]}),t[23]=C,t[24]=_,t[25]=v,t[26]=w):w=t[26],w}var qe=`ap-southeast-2`;function Je(e){switch(e??``){case`ACTIVE`:return`default`;case`FAILED`:return`destructive`;default:return`secondary`}}function Ye(e){let t=(0,Z.c)(89),{clusterName:n}=e,r=z(),[i,o]=(0,Q.useState)(!1),f;t[0]===n?f=t[1]:(f=F(n),t[0]=n,t[1]=f);let{data:p}=a(f),m=g(),h=p.cluster,_;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_={type:`bin`,value:`aws eks update-kubeconfig`},t[2]=_):_=t[2];let v;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(v={type:`flag`,value:` --name `},t[3]=v):v=t[3];let y;t[4]===n?y=t[5]:(y={type:`value`,value:n},t[4]=n,t[5]=y);let b;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(b={type:`flag`,value:` --region `},t[6]=b):b=t[6];let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x={type:`value`,value:qe},t[7]=x):x=t[7];let S;t[8]===y?S=t[9]:(S={label:`Configure kubectl`,parts:[_,v,y,b,x]},t[8]=y,t[9]=S);let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C={label:`Verify access`,parts:[{type:`bin`,value:`kubectl get nodes`}]},t[10]=C):C=t[10];let w;t[11]===S?w=t[12]:(w=[S,C],t[11]=S,t[12]=w);let T=w,E;t[13]!==n||t[14]!==m||t[15]!==r?(E=function(){m.mutate(n,{onSuccess:()=>{r({to:`/eks/list-clusters`})}})},t[13]=n,t[14]=m,t[15]=r,t[16]=E):E=t[16];let D=E,O;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(c,{to:`/eks/list-clusters`,children:`Clusters`}),t[17]=O):O=t[17];let k;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>o(!0),t[18]=k):k=t[18];let A;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsxs)(d,{onClick:k,size:`sm`,variant:`destructive`,children:[(0,$.jsx)(u,{className:`size-4`}),`Delete`]}),t[19]=A):A=t[19];let j=h?.status,M;t[20]===j?M=t[21]:(M=Je(j),t[20]=j,t[21]=M);let N=h?.status??`UNKNOWN`,P;t[22]!==M||t[23]!==N?(P=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[A,(0,$.jsx)(ve,{variant:M,children:N})]}),t[22]=M,t[23]=N,t[24]=P):P=t[24];let I;t[25]!==n||t[26]!==P?(I=(0,$.jsx)(oe,{actions:P,subtitle:`Cluster Details`,title:n}),t[25]=n,t[26]=P,t[27]=I):I=t[27];let L;t[28]!==m.error||t[29]!==m.isError?(L=m.isError&&(0,$.jsx)(ae,{error:m.error instanceof Error?m.error:void 0,msg:`Failed to delete cluster.`}),t[28]=m.error,t[29]=m.isError,t[30]=L):L=t[30];let R;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsxs)(he,{children:[(0,$.jsx)(me,{value:`overview`,children:`Overview`}),(0,$.jsx)(me,{value:`compute`,children:`Compute`}),(0,$.jsx)(me,{value:`addons`,children:`Add-ons`}),(0,$.jsx)(me,{value:`access`,children:`Access`}),(0,$.jsx)(me,{value:`networking`,children:`Networking`}),(0,$.jsx)(me,{value:`connect`,children:`Connect`})]}),t[31]=R):R=t[31];let B;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsx)(Y.Header,{children:`Cluster`}),t[32]=B):B=t[32];let V=h?.arn,H;t[33]===V?H=t[34]:(H=(0,$.jsx)(X,{label:`ARN`,value:V}),t[33]=V,t[34]=H);let U=h?.status,ee;t[35]===U?ee=t[36]:(ee=(0,$.jsx)(X,{label:`Status`,value:U}),t[35]=U,t[36]=ee);let te=h?.version,ne;t[37]===te?ne=t[38]:(ne=(0,$.jsx)(X,{label:`Kubernetes version`,value:te}),t[37]=te,t[38]=ne);let W=h?.platformVersion,re;t[39]===W?re=t[40]:(re=(0,$.jsx)(X,{label:`Platform version`,value:W}),t[39]=W,t[40]=re);let ie=h?.endpoint,G;t[41]===ie?G=t[42]:(G=(0,$.jsx)(X,{label:`Endpoint`,value:ie}),t[41]=ie,t[42]=G);let K=h?.identity?.oidc?.issuer,q;t[43]===K?q=t[44]:(q=(0,$.jsx)(X,{label:`OIDC issuer`,value:K}),t[43]=K,t[44]=q);let se=h?.resourcesVpcConfig?.vpcId,ce;t[45]===se?ce=t[46]:(ce=(0,$.jsx)(X,{label:`VPC`,value:se}),t[45]=se,t[46]=ce);let le=h?.createdAt,ue;t[47]===le?ue=t[48]:(ue=s(le),t[47]=le,t[48]=ue);let J;t[49]===ue?J=t[50]:(J=(0,$.jsx)(X,{label:`Created at`,value:ue}),t[49]=ue,t[50]=J);let de;t[51]!==H||t[52]!==ee||t[53]!==ne||t[54]!==re||t[55]!==G||t[56]!==q||t[57]!==ce||t[58]!==J?(de=(0,$.jsx)(ge,{value:`overview`,children:(0,$.jsxs)(Y,{children:[B,(0,$.jsxs)(Y.Content,{children:[H,ee,ne,re,G,q,ce,J]})]})}),t[51]=H,t[52]=ee,t[53]=ne,t[54]=re,t[55]=G,t[56]=q,t[57]=ce,t[58]=J,t[59]=de):de=t[59];let fe=h?.version,ye=h?.resourcesVpcConfig?.vpcId,be;t[60]!==n||t[61]!==fe||t[62]!==ye?(be=(0,$.jsx)(ge,{value:`compute`,children:(0,$.jsx)(Ke,{clusterName:n,clusterVersion:fe,vpcId:ye})}),t[60]=n,t[61]=fe,t[62]=ye,t[63]=be):be=t[63];let xe;t[64]===n?xe=t[65]:(xe=(0,$.jsx)(ge,{value:`addons`,children:(0,$.jsx)(Le,{clusterName:n})}),t[64]=n,t[65]=xe);let Se;t[66]===n?Se=t[67]:(Se=(0,$.jsx)(ge,{value:`access`,children:(0,$.jsx)(De,{clusterName:n})}),t[66]=n,t[67]=Se);let Ce;t[68]===h?Ce=t[69]:(Ce=(0,$.jsx)(ge,{value:`networking`,children:(0,$.jsx)(ze,{cluster:h})}),t[68]=h,t[69]=Ce);let we;t[70]===T?we=t[71]:(we=(0,$.jsx)(ge,{value:`connect`,children:(0,$.jsx)(l,{commands:T})}),t[70]=T,t[71]=we);let Te;t[72]!==de||t[73]!==be||t[74]!==xe||t[75]!==Se||t[76]!==Ce||t[77]!==we?(Te=(0,$.jsxs)(_e,{defaultValue:`overview`,children:[R,de,be,xe,Se,Ce,we]}),t[72]=de,t[73]=be,t[74]=xe,t[75]=Se,t[76]=Ce,t[77]=we,t[78]=Te):Te=t[78];let Ee=`This permanently deletes cluster "${n}" and its control plane. This cannot be undone.`,Oe;t[79]!==m.isPending||t[80]!==D||t[81]!==i||t[82]!==Ee?(Oe=(0,$.jsx)(pe,{description:Ee,isPending:m.isPending,onConfirm:D,onOpenChange:o,open:i,title:`Delete cluster`}),t[79]=m.isPending,t[80]=D,t[81]=i,t[82]=Ee,t[83]=Oe):Oe=t[83];let ke;return t[84]!==I||t[85]!==L||t[86]!==Te||t[87]!==Oe?(ke=(0,$.jsxs)($.Fragment,{children:[O,I,L,Te,Oe]}),t[84]=I,t[85]=L,t[86]=Te,t[87]=Oe,t[88]=ke):ke=t[88],ke}function Xe(){let e=(0,Z.c)(2),{clusterName:t}=ee.useParams(),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(Ye,{clusterName:t}),e[0]=t,e[1]=n),n}export{Xe as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id.js b/spinifex/services/spinifexui/frontend/dist/assets/_id.js index b11830338..fadb2062a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Ut as i}from"./auth.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as c,s as l,t as u}from"./select.js";import{t as d}from"./trash-2.js";import{t as f}from"./button.js";import{G as p,L as m,n as h}from"./ec2.js";import{Mt as g,Xr as _,t as v,wt as y}from"./index.js";import{t as b}from"./error-banner.js";import{t as x}from"./page-heading.js";import{t as S}from"./delete-confirmation-dialog.js";import{n as C,t as w}from"./detail-row.js";var T=t(n()),E=e();function D(){let{id:e}=v.useParams(),t=_(),{data:n}=r(y(e)),{data:D}=r(g),O=h(),k=m(),A=p(),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(``),F=n.Addresses?.[0],I=D.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.State?.Name===`running`||e.State?.Name===`stopped`)??[],L=async()=>{try{await A.mutateAsync(e),t({to:`/ec2/describe-addresses`})}finally{M(!1)}},R=async()=>{N&&await O.mutateAsync({allocationId:e,instanceId:N})},z=async()=>{F?.AssociationId&&await k.mutateAsync(F.AssociationId)};if(!F?.AllocationId)return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(a,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`Elastic IP not found.`})]});let B=!!F.AssociationId,V=i(F.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(a,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(b,{error:A.error??O.error??k.error??void 0,msg:`Elastic IP action failed`}),(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsx)(x,{actions:(0,E.jsxs)(f,{disabled:B||A.isPending,onClick:()=>M(!0),size:`sm`,variant:`destructive`,children:[(0,E.jsx)(d,{className:`size-4`}),`Release`]}),subtitle:`Elastic IP Details`,title:V?`${F.AllocationId} (${V})`:F.AllocationId}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Elastic IP Information`}),(0,E.jsxs)(C.Content,{children:[(0,E.jsx)(w,{label:`Allocation ID`,value:F.AllocationId}),(0,E.jsx)(w,{label:`Public IP`,value:F.PublicIp}),(0,E.jsx)(w,{label:`Domain`,value:F.Domain}),(0,E.jsx)(w,{label:`Association ID`,value:F.AssociationId??`—`}),(0,E.jsx)(w,{label:`Instance ID`,value:F.InstanceId??`—`}),(0,E.jsx)(w,{label:`Private IP`,value:F.PrivateIpAddress??`—`})]})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Association`}),(0,E.jsx)(C.Content,{children:B?(0,E.jsx)(f,{disabled:k.isPending,onClick:z,size:`sm`,variant:`outline`,children:`Disassociate`}):(0,E.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,E.jsx)(`div`,{className:`flex-1`,children:(0,E.jsxs)(u,{onValueChange:e=>P(e??``),value:N,children:[(0,E.jsx)(l,{className:`w-full`,children:(0,E.jsx)(o,{placeholder:`Select an instance`})}),(0,E.jsx)(c,{children:I.map(e=>{let t=i(e.Tags);return(0,E.jsx)(s,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(f,{disabled:!N||O.isPending,onClick:R,size:`sm`,children:`Associate`})]})})]})]}),(0,E.jsx)(S,{description:`Are you sure you want to release the Elastic IP "${F.AllocationId}" (${F.PublicIp})? This action cannot be undone.`,isPending:A.isPending,onConfirm:L,onOpenChange:M,open:j,title:`Release Elastic IP`})]})}export{D as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Ut as i}from"./auth.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as c,s as l,t as u}from"./select.js";import{t as d}from"./trash-2.js";import{t as f}from"./button.js";import{G as p,L as m,n as h}from"./ec2.js";import{Et as g,Pt as _,Qr as v,r as y}from"./index.js";import{t as b}from"./error-banner.js";import{t as x}from"./page-heading.js";import{t as S}from"./delete-confirmation-dialog.js";import{n as C,t as w}from"./detail-row.js";var T=t(n()),E=e();function D(){let{id:e}=y.useParams(),t=v(),{data:n}=r(g(e)),{data:D}=r(_),O=h(),k=m(),A=p(),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(``),F=n.Addresses?.[0],I=D.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.State?.Name===`running`||e.State?.Name===`stopped`)??[],L=async()=>{try{await A.mutateAsync(e),t({to:`/ec2/describe-addresses`})}finally{M(!1)}},R=async()=>{N&&await O.mutateAsync({allocationId:e,instanceId:N})},z=async()=>{F?.AssociationId&&await k.mutateAsync(F.AssociationId)};if(!F?.AllocationId)return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(a,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`Elastic IP not found.`})]});let B=!!F.AssociationId,V=i(F.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(a,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(b,{error:A.error??O.error??k.error??void 0,msg:`Elastic IP action failed`}),(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsx)(x,{actions:(0,E.jsxs)(f,{disabled:B||A.isPending,onClick:()=>M(!0),size:`sm`,variant:`destructive`,children:[(0,E.jsx)(d,{className:`size-4`}),`Release`]}),subtitle:`Elastic IP Details`,title:V?`${F.AllocationId} (${V})`:F.AllocationId}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Elastic IP Information`}),(0,E.jsxs)(C.Content,{children:[(0,E.jsx)(w,{label:`Allocation ID`,value:F.AllocationId}),(0,E.jsx)(w,{label:`Public IP`,value:F.PublicIp}),(0,E.jsx)(w,{label:`Domain`,value:F.Domain}),(0,E.jsx)(w,{label:`Association ID`,value:F.AssociationId??`—`}),(0,E.jsx)(w,{label:`Instance ID`,value:F.InstanceId??`—`}),(0,E.jsx)(w,{label:`Private IP`,value:F.PrivateIpAddress??`—`})]})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Association`}),(0,E.jsx)(C.Content,{children:B?(0,E.jsx)(f,{disabled:k.isPending,onClick:z,size:`sm`,variant:`outline`,children:`Disassociate`}):(0,E.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,E.jsx)(`div`,{className:`flex-1`,children:(0,E.jsxs)(u,{onValueChange:e=>P(e??``),value:N,children:[(0,E.jsx)(l,{className:`w-full`,children:(0,E.jsx)(o,{placeholder:`Select an instance`})}),(0,E.jsx)(c,{children:I.map(e=>{let t=i(e.Tags);return(0,E.jsx)(s,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(f,{disabled:!N||O.isPending,onClick:R,size:`sm`,children:`Associate`})]})})]})]}),(0,E.jsx)(S,{description:`Are you sure you want to release the Elastic IP "${F.AllocationId}" (${F.PublicIp})? This action cannot be undone.`,isPending:A.isPending,onConfirm:L,onOpenChange:M,open:j,title:`Release Elastic IP`})]})}export{D as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id10.js b/spinifex/services/spinifexui/frontend/dist/assets/_id10.js index 5ce4bb6c6..800480b3a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id10.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id10.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as c,s as l,t as u}from"./select.js";import{t as d}from"./plus.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{A as m,K as h,c as g,q as _,s as v}from"./ec2.js";import{Lr as y,Wt as b,Xr as x,er as S,u as C}from"./index.js";import{i as w,n as T,t as E}from"./zod.js";import{t as D}from"./error-banner.js";import{t as O}from"./page-heading.js";import{a as k,r as A,t as j}from"./field.js";import{y as M}from"./ec22.js";import{i as N,l as P,n as F,o as I,r as L,s as R,t as z}from"./alert-dialog.js";import{t as B}from"./delete-confirmation-dialog.js";import{n as V,t as H}from"./detail-row.js";var U=t(n()),W=e();function G(e){if(!e||e===`-1`)return`All traffic`;let t=e.toUpperCase();return t===`TCP`||t===`UDP`||t===`ICMP`?t:e}function K(e,t,n){return!n||n===`-1`||e===void 0||t===void 0||e===-1&&t===-1?`All`:e===t?e.toString():`${e}-${t}`}function q({open:e,onOpenChange:t,direction:n,groupId:r}){let i=g(),a=v(),d=n===`ingress`?i:a,{control:f,handleSubmit:p,register:m,reset:h,watch:_,formState:{errors:y}}=w({resolver:E(M),defaultValues:{ipProtocol:`tcp`,fromPort:0,toPort:0,cidrIp:`0.0.0.0/0`}}),b=_(`ipProtocol`),x=b===`-1`||b===`icmp`;return(0,W.jsx)(z,{onOpenChange:t,open:e,children:(0,W.jsxs)(N,{children:[(0,W.jsx)(R,{children:(0,W.jsxs)(P,{children:[`Add `,n===`ingress`?`Inbound`:`Outbound`,` Rule`]})}),d.error&&(0,W.jsx)(D,{error:d.error,msg:`Failed to add rule`}),(0,W.jsxs)(`form`,{className:`space-y-4`,id:`add-rule-form`,onSubmit:p(async e=>{let n={groupId:r,ipProtocol:e.ipProtocol,fromPort:x?-1:e.fromPort,toPort:x?-1:e.toPort,cidrIp:e.cidrIp};await d.mutateAsync(n),h(),t(!1)}),children:[(0,W.jsxs)(j,{children:[(0,W.jsx)(k,{children:(0,W.jsx)(`label`,{htmlFor:`ipProtocol`,children:`Protocol`})}),(0,W.jsx)(T,{control:f,name:`ipProtocol`,render:({field:e})=>(0,W.jsxs)(u,{onValueChange:t=>e.onChange(t),value:e.value,children:[(0,W.jsx)(l,{className:`w-full`,id:`ipProtocol`,children:(0,W.jsx)(o,{})}),(0,W.jsxs)(c,{children:[(0,W.jsx)(s,{value:`tcp`,children:`TCP`}),(0,W.jsx)(s,{value:`udp`,children:`UDP`}),(0,W.jsx)(s,{value:`icmp`,children:`ICMP`}),(0,W.jsx)(s,{value:`-1`,children:`All traffic (-1)`})]})]})}),(0,W.jsx)(A,{errors:[y.ipProtocol]})]}),(0,W.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,W.jsxs)(j,{children:[(0,W.jsx)(k,{children:(0,W.jsx)(`label`,{htmlFor:`fromPort`,children:`From Port`})}),(0,W.jsx)(S,{"aria-invalid":!!y.fromPort,disabled:x,id:`fromPort`,type:`number`,...m(`fromPort`,{valueAsNumber:!0})}),(0,W.jsx)(A,{errors:[y.fromPort]})]}),(0,W.jsxs)(j,{children:[(0,W.jsx)(k,{children:(0,W.jsx)(`label`,{htmlFor:`toPort`,children:`To Port`})}),(0,W.jsx)(S,{"aria-invalid":!!y.toPort,disabled:x,id:`toPort`,type:`number`,...m(`toPort`,{valueAsNumber:!0})}),(0,W.jsx)(A,{errors:[y.toPort]})]})]}),(0,W.jsxs)(j,{children:[(0,W.jsx)(k,{children:(0,W.jsxs)(`label`,{htmlFor:`cidrIp`,children:[n===`ingress`?`Source`:`Destination`,` CIDR`]})}),(0,W.jsx)(S,{"aria-invalid":!!y.cidrIp,id:`cidrIp`,placeholder:`0.0.0.0/0`,...m(`cidrIp`)}),(0,W.jsx)(A,{errors:[y.cidrIp]})]})]}),(0,W.jsxs)(I,{children:[(0,W.jsx)(L,{onClick:()=>{h(),d.reset()},children:`Cancel`}),(0,W.jsx)(F,{disabled:d.isPending,form:`add-rule-form`,type:`submit`,children:d.isPending?`Adding…`:`Add Rule`})]})]})})}function J(e){return[...(e.IpRanges??[]).map(e=>({kind:`cidr`,value:e.CidrIp??``})),...(e.UserIdGroupPairs??[]).map(e=>({kind:`group`,value:e.GroupId??``}))]}function Y({rule:e,source:t,groupId:n,direction:r}){let i=_(),a=h(),o=r===`ingress`?i:a,s=async()=>{try{await o.mutateAsync({groupId:n,ipProtocol:e.IpProtocol??`-1`,fromPort:e.FromPort??-1,toPort:e.ToPort??-1,...t.kind===`group`?{sourceGroupId:t.value}:{cidrIp:t.value}})}catch{}},c=t.kind===`group`&&t.value===n?`${t.value} (this security group)`:t.value;return(0,W.jsxs)(`div`,{className:`space-y-0`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between border-b px-4 py-3 last:border-b-0`,children:[(0,W.jsxs)(`div`,{className:`grid flex-1 grid-cols-3 gap-4 text-sm`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`Protocol: `}),G(e.IpProtocol)]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`Port Range: `}),K(e.FromPort,e.ToPort,e.IpProtocol)]}),(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`span`,{className:`text-muted-foreground`,children:[r===`ingress`?`Source`:`Destination`,`:`,` `]}),c]})]}),(0,W.jsx)(p,{disabled:o.isPending,onClick:s,size:`icon-xs`,variant:`ghost`,children:(0,W.jsx)(y,{className:`size-3`})})]}),o.error&&(0,W.jsx)(`div`,{className:`px-4 pb-2`,children:(0,W.jsx)(D,{error:o.error,msg:`Failed to remove rule`})})]})}function X(){let{id:e}=C.useParams(),t=x(),{data:n}=r(b(e)),o=n.SecurityGroups?.[0],s=m(),[c,l]=(0,U.useState)(!1),[u,h]=(0,U.useState)(!1),[g,_]=(0,U.useState)(!1),v=async()=>{try{await s.mutateAsync(e),t({to:`/ec2/describe-security-groups`})}finally{l(!1)}};if(!o?.GroupId)return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(a,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Security group not found.`})]});let y=o.IpPermissions??[],S=o.IpPermissionsEgress??[];return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(a,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),s.error&&(0,W.jsx)(D,{error:s.error,msg:`Failed to delete security group`}),(0,W.jsxs)(`div`,{className:`space-y-6`,children:[(0,W.jsx)(O,{actions:(0,W.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,W.jsxs)(p,{onClick:()=>l(!0),size:`sm`,variant:`destructive`,children:[(0,W.jsx)(f,{className:`size-4`}),`Delete`]})}),subtitle:`Security Group Details`,title:o.GroupName?`${o.GroupId} (${o.GroupName})`:o.GroupId}),(0,W.jsxs)(V,{children:[(0,W.jsx)(V.Header,{children:`Security Group Information`}),(0,W.jsxs)(V.Content,{children:[(0,W.jsx)(H,{label:`Group ID`,value:o.GroupId}),(0,W.jsx)(H,{label:`Group Name`,value:o.GroupName}),(0,W.jsx)(H,{label:`Description`,value:o.Description}),(0,W.jsx)(H,{label:`VPC ID`,value:o.VpcId?(0,W.jsx)(i,{className:`text-primary hover:underline`,params:{id:o.VpcId},to:`/ec2/describe-vpcs/$id`,children:o.VpcId}):`—`}),(0,W.jsx)(H,{label:`Owner ID`,value:o.OwnerId})]})]}),(0,W.jsxs)(V,{children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,W.jsxs)(`h2`,{className:`font-semibold`,children:[`Inbound Rules (`,y.length,`)`]}),(0,W.jsxs)(p,{onClick:()=>h(!0),size:`sm`,variant:`outline`,children:[(0,W.jsx)(d,{className:`size-4`}),`Add Rule`]})]}),y.length>0?(0,W.jsx)(`div`,{children:y.flatMap(e=>J(e).map(t=>(0,W.jsx)(Y,{direction:`ingress`,groupId:o.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,W.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No inbound rules.`})]}),(0,W.jsxs)(V,{children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,W.jsxs)(`h2`,{className:`font-semibold`,children:[`Outbound Rules (`,S.length,`)`]}),(0,W.jsxs)(p,{onClick:()=>_(!0),size:`sm`,variant:`outline`,children:[(0,W.jsx)(d,{className:`size-4`}),`Add Rule`]})]}),S.length>0?(0,W.jsx)(`div`,{children:S.flatMap(e=>J(e).map(t=>(0,W.jsx)(Y,{direction:`egress`,groupId:o.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,W.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No outbound rules.`})]})]}),(0,W.jsx)(B,{description:`Are you sure you want to delete the security group "${o.GroupId}"? This action cannot be undone.`,isPending:s.isPending,onConfirm:v,onOpenChange:l,open:c,title:`Delete Security Group`}),(0,W.jsx)(q,{direction:`ingress`,groupId:o.GroupId,onOpenChange:h,open:u}),(0,W.jsx)(q,{direction:`egress`,groupId:o.GroupId,onOpenChange:_,open:g})]})}export{X as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as c,s as l,t as u}from"./select.js";import{t as d}from"./plus.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{A as m,K as h,c as g,q as _,s as v}from"./ec2.js";import{Kt as y,Qr as b,f as x,nr as S,zr as C}from"./index.js";import{i as w,n as T,t as E}from"./zod.js";import{t as D}from"./error-banner.js";import{t as O}from"./page-heading.js";import{a as k,r as A,t as j}from"./field.js";import{y as M}from"./ec22.js";import{i as N,l as P,n as F,o as I,r as L,s as R,t as z}from"./alert-dialog.js";import{t as B}from"./delete-confirmation-dialog.js";import{n as V,t as H}from"./detail-row.js";var U=t(n()),W=e();function G(e){if(!e||e===`-1`)return`All traffic`;let t=e.toUpperCase();return t===`TCP`||t===`UDP`||t===`ICMP`?t:e}function K(e,t,n){return!n||n===`-1`||e===void 0||t===void 0||e===-1&&t===-1?`All`:e===t?e.toString():`${e}-${t}`}function q({open:e,onOpenChange:t,direction:n,groupId:r}){let i=g(),a=v(),d=n===`ingress`?i:a,{control:f,handleSubmit:p,register:m,reset:h,watch:_,formState:{errors:y}}=w({resolver:E(M),defaultValues:{ipProtocol:`tcp`,fromPort:0,toPort:0,cidrIp:`0.0.0.0/0`}}),b=_(`ipProtocol`),x=b===`-1`||b===`icmp`;return(0,W.jsx)(z,{onOpenChange:t,open:e,children:(0,W.jsxs)(N,{children:[(0,W.jsx)(R,{children:(0,W.jsxs)(P,{children:[`Add `,n===`ingress`?`Inbound`:`Outbound`,` Rule`]})}),d.error&&(0,W.jsx)(D,{error:d.error,msg:`Failed to add rule`}),(0,W.jsxs)(`form`,{className:`space-y-4`,id:`add-rule-form`,onSubmit:p(async e=>{let n={groupId:r,ipProtocol:e.ipProtocol,fromPort:x?-1:e.fromPort,toPort:x?-1:e.toPort,cidrIp:e.cidrIp};await d.mutateAsync(n),h(),t(!1)}),children:[(0,W.jsxs)(j,{children:[(0,W.jsx)(k,{children:(0,W.jsx)(`label`,{htmlFor:`ipProtocol`,children:`Protocol`})}),(0,W.jsx)(T,{control:f,name:`ipProtocol`,render:({field:e})=>(0,W.jsxs)(u,{onValueChange:t=>e.onChange(t),value:e.value,children:[(0,W.jsx)(l,{className:`w-full`,id:`ipProtocol`,children:(0,W.jsx)(o,{})}),(0,W.jsxs)(c,{children:[(0,W.jsx)(s,{value:`tcp`,children:`TCP`}),(0,W.jsx)(s,{value:`udp`,children:`UDP`}),(0,W.jsx)(s,{value:`icmp`,children:`ICMP`}),(0,W.jsx)(s,{value:`-1`,children:`All traffic (-1)`})]})]})}),(0,W.jsx)(A,{errors:[y.ipProtocol]})]}),(0,W.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,W.jsxs)(j,{children:[(0,W.jsx)(k,{children:(0,W.jsx)(`label`,{htmlFor:`fromPort`,children:`From Port`})}),(0,W.jsx)(S,{"aria-invalid":!!y.fromPort,disabled:x,id:`fromPort`,type:`number`,...m(`fromPort`,{valueAsNumber:!0})}),(0,W.jsx)(A,{errors:[y.fromPort]})]}),(0,W.jsxs)(j,{children:[(0,W.jsx)(k,{children:(0,W.jsx)(`label`,{htmlFor:`toPort`,children:`To Port`})}),(0,W.jsx)(S,{"aria-invalid":!!y.toPort,disabled:x,id:`toPort`,type:`number`,...m(`toPort`,{valueAsNumber:!0})}),(0,W.jsx)(A,{errors:[y.toPort]})]})]}),(0,W.jsxs)(j,{children:[(0,W.jsx)(k,{children:(0,W.jsxs)(`label`,{htmlFor:`cidrIp`,children:[n===`ingress`?`Source`:`Destination`,` CIDR`]})}),(0,W.jsx)(S,{"aria-invalid":!!y.cidrIp,id:`cidrIp`,placeholder:`0.0.0.0/0`,...m(`cidrIp`)}),(0,W.jsx)(A,{errors:[y.cidrIp]})]})]}),(0,W.jsxs)(I,{children:[(0,W.jsx)(L,{onClick:()=>{h(),d.reset()},children:`Cancel`}),(0,W.jsx)(F,{disabled:d.isPending,form:`add-rule-form`,type:`submit`,children:d.isPending?`Adding…`:`Add Rule`})]})]})})}function J(e){return[...(e.IpRanges??[]).map(e=>({kind:`cidr`,value:e.CidrIp??``})),...(e.UserIdGroupPairs??[]).map(e=>({kind:`group`,value:e.GroupId??``}))]}function Y({rule:e,source:t,groupId:n,direction:r}){let i=_(),a=h(),o=r===`ingress`?i:a,s=async()=>{try{await o.mutateAsync({groupId:n,ipProtocol:e.IpProtocol??`-1`,fromPort:e.FromPort??-1,toPort:e.ToPort??-1,...t.kind===`group`?{sourceGroupId:t.value}:{cidrIp:t.value}})}catch{}},c=t.kind===`group`&&t.value===n?`${t.value} (this security group)`:t.value;return(0,W.jsxs)(`div`,{className:`space-y-0`,children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between border-b px-4 py-3 last:border-b-0`,children:[(0,W.jsxs)(`div`,{className:`grid flex-1 grid-cols-3 gap-4 text-sm`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`Protocol: `}),G(e.IpProtocol)]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:`Port Range: `}),K(e.FromPort,e.ToPort,e.IpProtocol)]}),(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`span`,{className:`text-muted-foreground`,children:[r===`ingress`?`Source`:`Destination`,`:`,` `]}),c]})]}),(0,W.jsx)(p,{disabled:o.isPending,onClick:s,size:`icon-xs`,variant:`ghost`,children:(0,W.jsx)(C,{className:`size-3`})})]}),o.error&&(0,W.jsx)(`div`,{className:`px-4 pb-2`,children:(0,W.jsx)(D,{error:o.error,msg:`Failed to remove rule`})})]})}function X(){let{id:e}=x.useParams(),t=b(),{data:n}=r(y(e)),o=n.SecurityGroups?.[0],s=m(),[c,l]=(0,U.useState)(!1),[u,h]=(0,U.useState)(!1),[g,_]=(0,U.useState)(!1),v=async()=>{try{await s.mutateAsync(e),t({to:`/ec2/describe-security-groups`})}finally{l(!1)}};if(!o?.GroupId)return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(a,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Security group not found.`})]});let S=o.IpPermissions??[],C=o.IpPermissionsEgress??[];return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(a,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),s.error&&(0,W.jsx)(D,{error:s.error,msg:`Failed to delete security group`}),(0,W.jsxs)(`div`,{className:`space-y-6`,children:[(0,W.jsx)(O,{actions:(0,W.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,W.jsxs)(p,{onClick:()=>l(!0),size:`sm`,variant:`destructive`,children:[(0,W.jsx)(f,{className:`size-4`}),`Delete`]})}),subtitle:`Security Group Details`,title:o.GroupName?`${o.GroupId} (${o.GroupName})`:o.GroupId}),(0,W.jsxs)(V,{children:[(0,W.jsx)(V.Header,{children:`Security Group Information`}),(0,W.jsxs)(V.Content,{children:[(0,W.jsx)(H,{label:`Group ID`,value:o.GroupId}),(0,W.jsx)(H,{label:`Group Name`,value:o.GroupName}),(0,W.jsx)(H,{label:`Description`,value:o.Description}),(0,W.jsx)(H,{label:`VPC ID`,value:o.VpcId?(0,W.jsx)(i,{className:`text-primary hover:underline`,params:{id:o.VpcId},to:`/ec2/describe-vpcs/$id`,children:o.VpcId}):`—`}),(0,W.jsx)(H,{label:`Owner ID`,value:o.OwnerId})]})]}),(0,W.jsxs)(V,{children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,W.jsxs)(`h2`,{className:`font-semibold`,children:[`Inbound Rules (`,S.length,`)`]}),(0,W.jsxs)(p,{onClick:()=>h(!0),size:`sm`,variant:`outline`,children:[(0,W.jsx)(d,{className:`size-4`}),`Add Rule`]})]}),S.length>0?(0,W.jsx)(`div`,{children:S.flatMap(e=>J(e).map(t=>(0,W.jsx)(Y,{direction:`ingress`,groupId:o.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,W.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No inbound rules.`})]}),(0,W.jsxs)(V,{children:[(0,W.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,W.jsxs)(`h2`,{className:`font-semibold`,children:[`Outbound Rules (`,C.length,`)`]}),(0,W.jsxs)(p,{onClick:()=>_(!0),size:`sm`,variant:`outline`,children:[(0,W.jsx)(d,{className:`size-4`}),`Add Rule`]})]}),C.length>0?(0,W.jsx)(`div`,{children:C.flatMap(e=>J(e).map(t=>(0,W.jsx)(Y,{direction:`egress`,groupId:o.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,W.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No outbound rules.`})]})]}),(0,W.jsx)(B,{description:`Are you sure you want to delete the security group "${o.GroupId}"? This action cannot be undone.`,isPending:s.isPending,onConfirm:v,onOpenChange:l,open:c,title:`Delete Security Group`}),(0,W.jsx)(q,{direction:`ingress`,groupId:o.GroupId,onOpenChange:h,open:u}),(0,W.jsx)(q,{direction:`egress`,groupId:o.GroupId,onOpenChange:_,open:g})]})}export{X as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id11.js b/spinifex/services/spinifexui/frontend/dist/assets/_id11.js index ea341dff1..0fd8ec8d4 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id11.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id11.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Bt as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./copy.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{j as u,l as d}from"./ec2.js";import{Kt as f,Vt as p,Xr as m,d as h,er as g}from"./index.js";import{t as _}from"./error-banner.js";import{t as v}from"./page-heading.js";import{a as y,t as b}from"./field.js";import{a as x,i as S,l as C,n as w,o as T,r as E,s as D,t as O}from"./alert-dialog.js";import{t as k}from"./delete-confirmation-dialog.js";import{n as A,t as j}from"./detail-row.js";import{t as M}from"./state-badge.js";var N=t(n()),P=e();function F(){let{id:e}=h.useParams(),t=m(),{data:n}=r(f(e)),{data:F}=r(p),I=n.Snapshots?.[0],L=u(),R=d(),[z,B]=(0,N.useState)(!1),[V,H]=(0,N.useState)(!1),[U,W]=(0,N.useState)(``),G=F.Regions?.[0]?.RegionName??`ap-southeast-2`,K=I?.State===`completed`,q=async()=>{try{await L.mutateAsync(e),t({to:`/ec2/describe-snapshots`})}finally{B(!1)}},J=async()=>{try{await R.mutateAsync({sourceSnapshotId:e,sourceRegion:G,description:U||void 0}),H(!1),W(``)}catch{}};if(!I?.SnapshotId)return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(o,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`Snapshot not found.`})]});let Y=a(I.StartTime);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(o,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L.error&&(0,P.jsx)(_,{error:L.error,msg:`Failed to delete snapshot`}),R.error&&(0,P.jsx)(_,{error:R.error,msg:`Failed to copy snapshot`}),(0,P.jsxs)(`div`,{className:`space-y-6`,children:[(0,P.jsx)(v,{actions:(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsxs)(l,{disabled:!K,onClick:()=>B(!0),size:`sm`,variant:`destructive`,children:[(0,P.jsx)(c,{className:`size-4`}),`Delete`]}),(0,P.jsxs)(l,{disabled:!K,onClick:()=>H(!0),size:`sm`,variant:`outline`,children:[(0,P.jsx)(s,{className:`size-4`}),`Copy Snapshot`]}),(0,P.jsx)(M,{state:I.State})]}),subtitle:`Snapshot Details`,title:I.SnapshotId}),(0,P.jsxs)(A,{children:[(0,P.jsx)(A.Header,{children:`Snapshot Information`}),(0,P.jsxs)(A.Content,{children:[(0,P.jsx)(j,{label:`Snapshot ID`,value:I.SnapshotId}),(0,P.jsx)(j,{label:`Volume ID`,value:I.VolumeId?(0,P.jsx)(i,{className:`text-primary hover:underline`,params:{id:I.VolumeId},to:`/ec2/describe-volumes/$id`,children:I.VolumeId}):void 0}),(0,P.jsx)(j,{label:`Volume Size`,value:`${I.VolumeSize} GiB`}),(0,P.jsx)(j,{label:`State`,value:I.State}),(0,P.jsx)(j,{label:`Description`,value:I.Description}),(0,P.jsx)(j,{label:`Progress`,value:I.Progress}),(0,P.jsx)(j,{label:`Start Time`,value:Y}),(0,P.jsx)(j,{label:`Owner ID`,value:I.OwnerId}),(0,P.jsx)(j,{label:`Encrypted`,value:I.Encrypted?`Yes`:`No`})]})]})]}),(0,P.jsx)(k,{description:`Are you sure you want to delete the snapshot "${I.SnapshotId}"? This action cannot be undone.`,isPending:L.isPending,onConfirm:q,onOpenChange:B,open:z,title:`Delete Snapshot`}),(0,P.jsx)(O,{onOpenChange:H,open:V,children:(0,P.jsxs)(S,{children:[(0,P.jsxs)(D,{children:[(0,P.jsx)(C,{children:`Copy Snapshot`}),(0,P.jsx)(x,{children:`Create a copy of this snapshot in the current region.`})]}),(0,P.jsxs)(b,{children:[(0,P.jsx)(y,{children:(0,P.jsx)(`label`,{htmlFor:`copyDescription`,children:`Description (optional)`})}),(0,P.jsx)(g,{id:`copyDescription`,onChange:e=>W(e.target.value),placeholder:`Description for the snapshot copy`,value:U})]}),(0,P.jsxs)(T,{children:[(0,P.jsx)(E,{children:`Cancel`}),(0,P.jsx)(w,{disabled:R.isPending,onClick:J,children:R.isPending?`Copying…`:`Copy Snapshot`})]})]})})]})}export{F as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Bt as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./copy.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{j as u,l as d}from"./ec2.js";import{Jt as f,Qr as p,Ut as m,nr as h,p as g}from"./index.js";import{t as _}from"./error-banner.js";import{t as v}from"./page-heading.js";import{a as y,t as b}from"./field.js";import{a as x,i as S,l as C,n as w,o as T,r as E,s as D,t as O}from"./alert-dialog.js";import{t as k}from"./delete-confirmation-dialog.js";import{n as A,t as j}from"./detail-row.js";import{t as M}from"./state-badge.js";var N=t(n()),P=e();function F(){let{id:e}=g.useParams(),t=p(),{data:n}=r(f(e)),{data:F}=r(m),I=n.Snapshots?.[0],L=u(),R=d(),[z,B]=(0,N.useState)(!1),[V,H]=(0,N.useState)(!1),[U,W]=(0,N.useState)(``),G=F.Regions?.[0]?.RegionName??`ap-southeast-2`,K=I?.State===`completed`,q=async()=>{try{await L.mutateAsync(e),t({to:`/ec2/describe-snapshots`})}finally{B(!1)}},J=async()=>{try{await R.mutateAsync({sourceSnapshotId:e,sourceRegion:G,description:U||void 0}),H(!1),W(``)}catch{}};if(!I?.SnapshotId)return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(o,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`Snapshot not found.`})]});let Y=a(I.StartTime);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(o,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L.error&&(0,P.jsx)(_,{error:L.error,msg:`Failed to delete snapshot`}),R.error&&(0,P.jsx)(_,{error:R.error,msg:`Failed to copy snapshot`}),(0,P.jsxs)(`div`,{className:`space-y-6`,children:[(0,P.jsx)(v,{actions:(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsxs)(l,{disabled:!K,onClick:()=>B(!0),size:`sm`,variant:`destructive`,children:[(0,P.jsx)(c,{className:`size-4`}),`Delete`]}),(0,P.jsxs)(l,{disabled:!K,onClick:()=>H(!0),size:`sm`,variant:`outline`,children:[(0,P.jsx)(s,{className:`size-4`}),`Copy Snapshot`]}),(0,P.jsx)(M,{state:I.State})]}),subtitle:`Snapshot Details`,title:I.SnapshotId}),(0,P.jsxs)(A,{children:[(0,P.jsx)(A.Header,{children:`Snapshot Information`}),(0,P.jsxs)(A.Content,{children:[(0,P.jsx)(j,{label:`Snapshot ID`,value:I.SnapshotId}),(0,P.jsx)(j,{label:`Volume ID`,value:I.VolumeId?(0,P.jsx)(i,{className:`text-primary hover:underline`,params:{id:I.VolumeId},to:`/ec2/describe-volumes/$id`,children:I.VolumeId}):void 0}),(0,P.jsx)(j,{label:`Volume Size`,value:`${I.VolumeSize} GiB`}),(0,P.jsx)(j,{label:`State`,value:I.State}),(0,P.jsx)(j,{label:`Description`,value:I.Description}),(0,P.jsx)(j,{label:`Progress`,value:I.Progress}),(0,P.jsx)(j,{label:`Start Time`,value:Y}),(0,P.jsx)(j,{label:`Owner ID`,value:I.OwnerId}),(0,P.jsx)(j,{label:`Encrypted`,value:I.Encrypted?`Yes`:`No`})]})]})]}),(0,P.jsx)(k,{description:`Are you sure you want to delete the snapshot "${I.SnapshotId}"? This action cannot be undone.`,isPending:L.isPending,onConfirm:q,onOpenChange:B,open:z,title:`Delete Snapshot`}),(0,P.jsx)(O,{onOpenChange:H,open:V,children:(0,P.jsxs)(S,{children:[(0,P.jsxs)(D,{children:[(0,P.jsx)(C,{children:`Copy Snapshot`}),(0,P.jsx)(x,{children:`Create a copy of this snapshot in the current region.`})]}),(0,P.jsxs)(b,{children:[(0,P.jsx)(y,{children:(0,P.jsx)(`label`,{htmlFor:`copyDescription`,children:`Description (optional)`})}),(0,P.jsx)(h,{id:`copyDescription`,onChange:e=>W(e.target.value),placeholder:`Description for the snapshot copy`,value:U})]}),(0,P.jsxs)(T,{children:[(0,P.jsx)(E,{children:`Cancel`}),(0,P.jsx)(w,{disabled:R.isPending,onClick:J,children:R.isPending?`Copying…`:`Copy Snapshot`})]})]})})]})}export{F as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id12.js b/spinifex/services/spinifexui/frontend/dist/assets/_id12.js index 461a07b7a..8c38cd4cd 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id12.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id12.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{M as l}from"./ec2.js";import{Jt as u,Xr as d,f}from"./index.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=d(),{data:n}=r(u(e)),x=n.Subnets?.[0],S=l(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(e),t({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=a(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(p,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(c,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:x.State})]}),subtitle:`Subnet Details`,title:E?`${x.SubnetId} (${E})`:x.SubnetId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Subnet Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Subnet ID`,value:x.SubnetId}),(0,b.jsx)(_,{label:`VPC ID`,value:x.VpcId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:x.VpcId},to:`/ec2/describe-vpcs/$id`,children:x.VpcId}):`—`}),(0,b.jsx)(_,{label:`State`,value:x.State}),(0,b.jsx)(_,{label:`CIDR Block`,value:x.CidrBlock}),(0,b.jsx)(_,{label:`Availability Zone`,value:x.AvailabilityZone}),(0,b.jsx)(_,{label:`Available IP Count`,value:x.AvailableIpAddressCount?.toString()}),(0,b.jsx)(_,{label:`Map Public IP on Launch`,value:x.MapPublicIpOnLaunch?`Yes`:`No`}),(0,b.jsx)(_,{label:`Default for AZ`,value:x.DefaultForAz?`Yes`:`No`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the subnet "${x.SubnetId}"? This action cannot be undone.`,isPending:S.isPending,onConfirm:T,onOpenChange:w,open:C,title:`Delete Subnet`})]})}export{x as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{M as l}from"./ec2.js";import{Qr as u,Xt as d,m as f}from"./index.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=u(),{data:n}=r(d(e)),x=n.Subnets?.[0],S=l(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(e),t({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=a(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(p,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(c,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:x.State})]}),subtitle:`Subnet Details`,title:E?`${x.SubnetId} (${E})`:x.SubnetId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Subnet Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Subnet ID`,value:x.SubnetId}),(0,b.jsx)(_,{label:`VPC ID`,value:x.VpcId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:x.VpcId},to:`/ec2/describe-vpcs/$id`,children:x.VpcId}):`—`}),(0,b.jsx)(_,{label:`State`,value:x.State}),(0,b.jsx)(_,{label:`CIDR Block`,value:x.CidrBlock}),(0,b.jsx)(_,{label:`Availability Zone`,value:x.AvailabilityZone}),(0,b.jsx)(_,{label:`Available IP Count`,value:x.AvailableIpAddressCount?.toString()}),(0,b.jsx)(_,{label:`Map Public IP on Launch`,value:x.MapPublicIpOnLaunch?`Yes`:`No`}),(0,b.jsx)(_,{label:`Default for AZ`,value:x.DefaultForAz?`Yes`:`No`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the subnet "${x.SubnetId}"? This action cannot be undone.`,isPending:S.isPending,onConfirm:T,onOpenChange:w,open:C,title:`Delete Subnet`})]})}export{x as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id13.js b/spinifex/services/spinifexui/frontend/dist/assets/_id13.js index 85df5babb..0f9cd1157 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id13.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id13.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{Lt as o,Ut as s}from"./auth.js";import{t as c}from"./back-link.js";import{t as l}from"./trash-2.js";import{t as u}from"./button.js";import{_ as d,c as f,l as p,m,p as h}from"./elbv2.js";import{$ as g,Mt as _,X as v,Xr as y,Y as b,Z as x,er as S,p as C}from"./index.js";import{t as w}from"./error-banner.js";import{t as T}from"./page-heading.js";import{a as E,i as D,l as O,n as k,o as A,r as j,s as M,t as N}from"./alert-dialog.js";import{t as P}from"./delete-confirmation-dialog.js";import{n as F,t as I}from"./detail-row.js";import{i as L,n as R,t as z}from"./tags-editor.js";import{i as B,n as V,r as H,t as U}from"./tabs.js";var W=r(),G=t(n(),1),K=e();function q(e){let t=e.trim();if(t===``)return;let n=Number(t);if(!(!Number.isInteger(n)||n<1||n>65535))return n}function J(e){let t=(0,W.c)(36),{open:n,onOpenChange:r,instances:i,defaultPort:a,isPending:o,onConfirm:c}=e,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={},t[0]=l):l=t[0];let[u,d]=(0,G.useState)(l),[f,p]=(0,G.useState)(),m,h;t[1]===n?(m=t[2],h=t[3]):(m=()=>{n||(d({}),p(void 0))},h=[n],t[1]=n,t[2]=m,t[3]=h),(0,G.useEffect)(m,h);let g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{d(t=>{let n=t[e];return n?.checked?{...t,[e]:{...n,checked:!1}}:{...t,[e]:{checked:!0,port:n?.port??``}}})},t[4]=g):g=t[4];let _=g,v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=(e,t)=>{d(n=>({...n,[e]:{checked:n[e]?.checked??!0,port:t}}))},t[5]=v):v=t[5];let y=v,b;t[6]!==c||t[7]!==u?(b=()=>{let e=Object.entries(u).filter(Y);if(e.length===0){p(`Select at least one instance.`);return}let t=[];for(let[n,r]of e){if(r.port.trim()===``){t.push({id:n});continue}let e=q(r.port);if(e===void 0){p(`Port for ${n} must be an integer between 1 and 65535.`);return}t.push({id:n,port:e})}p(void 0),c(t)},t[6]=c,t[7]=u,t[8]=b):b=t[8];let x=b,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsx)(O,{children:`Register targets`}),t[9]=C):C=t[9];let w;t[10]===a?w=t[11]:(w=(0,K.jsxs)(M,{children:[C,(0,K.jsxs)(E,{children:[`Select instances to register. Leave port blank to use the target group port (`,a,`).`]})]}),t[10]=a,t[11]=w);let T;t[12]!==a||t[13]!==i||t[14]!==u?(T=i.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances available in this VPC.`}):(0,K.jsx)(`div`,{className:`max-h-72 space-y-1 overflow-y-auto`,children:i.map(e=>{let t=e.InstanceId??``,n=u[t],r=n?.checked??!1,i=s(e.Tags);return(0,K.jsxs)(`div`,{className:`flex items-center gap-2 rounded px-1 py-1 text-xs hover:bg-accent`,children:[(0,K.jsx)(`input`,{"aria-label":`Register target ${t}`,checked:r,id:`register-target-${t}`,onChange:()=>_(t),type:`checkbox`}),(0,K.jsxs)(`label`,{className:`flex flex-1 items-center gap-2`,htmlFor:`register-target-${t}`,children:[(0,K.jsx)(`span`,{className:`font-mono`,children:t}),i&&(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,i,`)`]}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.State?.Name??``})]}),r&&(0,K.jsx)(S,{"aria-label":`Port override for ${t}`,className:`w-24`,onChange:e=>y(t,e.target.value),placeholder:String(a),value:n?.port??``})]},t)})}),t[12]=a,t[13]=i,t[14]=u,t[15]=T):T=t[15];let P;t[16]===f?P=t[17]:(P=f&&(0,K.jsx)(`p`,{className:`text-xs text-destructive`,role:`alert`,children:f}),t[16]=f,t[17]=P);let F;t[18]===o?F=t[19]:(F=(0,K.jsx)(j,{disabled:o,children:`Cancel`}),t[18]=o,t[19]=F);let I=o?`Registering…`:`Register`,L;t[20]!==x||t[21]!==o||t[22]!==I?(L=(0,K.jsx)(k,{disabled:o,onClick:x,children:I}),t[20]=x,t[21]=o,t[22]=I,t[23]=L):L=t[23];let R;t[24]!==F||t[25]!==L?(R=(0,K.jsxs)(A,{children:[F,L]}),t[24]=F,t[25]=L,t[26]=R):R=t[26];let z;t[27]!==P||t[28]!==R||t[29]!==w||t[30]!==T?(z=(0,K.jsxs)(D,{className:`sm:max-w-lg`,children:[w,T,P,R]}),t[27]=P,t[28]=R,t[29]=w,t[30]=T,t[31]=z):z=t[31];let B;return t[32]!==r||t[33]!==n||t[34]!==z?(B=(0,K.jsx)(N,{onOpenChange:r,open:n,children:z}),t[32]=r,t[33]=n,t[34]=z,t[35]=B):B=t[35],B}function Y(e){let[,t]=e;return t.checked&&t!==void 0}var X=5e3,Z=new Set([`healthy`]),Q=new Set([`unhealthy`,`unavailable`]),$=new Set([`initial`,`draining`]);function ee(e){return e&&Z.has(e)?`bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100`:e&&Q.has(e)?`bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-100`:e&&$.has(e)?`bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100`:`bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100`}function te(e){return`${e.Id??``}:${e.Port??``}`}function ne({targetGroupArn:e,vpcId:t,defaultPort:n,isActive:r}){let{data:s}=a(_),{data:c,isLoading:d,error:f}=i({...g(e),refetchInterval:r?X:!1,refetchIntervalInBackground:!1}),h=m(),v=p(),[y,b]=(0,G.useState)(!1),[x,S]=(0,G.useState)(),C=(s.Reservations?.flatMap(e=>e.Instances??[])??[]).filter(e=>e.VpcId===t&&e.State?.Name!==`terminated`),T=c?.TargetHealthDescriptions??[];return(0,K.jsxs)(`div`,{className:`space-y-3`,children:[h.error&&(0,K.jsx)(w,{error:h.error,msg:`Failed to register targets`}),v.error&&(0,K.jsx)(w,{error:v.error,msg:`Failed to deregister target`}),f&&(0,K.jsx)(w,{error:f,msg:`Failed to load target health`}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:d?`Loading target health…`:`${T.length} target${T.length===1?``:`s`}`}),(0,K.jsx)(u,{onClick:()=>b(!0),size:`sm`,children:`Register targets`})]}),T.length===0?(0,K.jsx)(`p`,{className:`text-muted-foreground`,children:`No targets registered.`}):(0,K.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,K.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`AZ`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Reason`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Description`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,K.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,K.jsx)(`tbody`,{children:T.map(e=>{let t=e.Target??{Id:``},n=e.TargetHealth?.State;return(0,K.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,K.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t.Id??``}),(0,K.jsx)(`td`,{className:`px-4 py-2`,children:t.Port??``}),(0,K.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:t.AvailabilityZone??``}),(0,K.jsx)(`td`,{className:`px-4 py-2`,children:(0,K.jsx)(`span`,{className:o(`rounded-full px-2 py-0.5 text-xs`,ee(n)),children:n??`unknown`})}),(0,K.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:e.TargetHealth?.Reason??``}),(0,K.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:e.TargetHealth?.Description??``}),(0,K.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,K.jsx)(u,{"aria-label":`Deregister ${t.Id}`,onClick:()=>S(t),size:`sm`,variant:`ghost`,children:(0,K.jsx)(l,{className:`size-4`})})})]},te(t))})})]})}),(0,K.jsx)(J,{defaultPort:n,instances:C,isPending:h.isPending,onConfirm:async t=>{try{await h.mutateAsync({targetGroupArn:e,targets:t}),b(!1)}catch{}},onOpenChange:b,open:y}),(0,K.jsx)(P,{description:x?`Deregister ${x.Id}${x.Port?`:${x.Port}`:``} from this target group?`:``,isPending:v.isPending,onConfirm:async()=>{if(x?.Id)try{await v.mutateAsync({targetGroupArn:e,targets:[{id:x.Id,port:x.Port}]})}finally{S(void 0)}},onOpenChange:e=>!e&&S(void 0),open:x!==void 0,title:`Deregister target`})]})}function re({arn:e}){let t=y(),{data:n}=a(x(e)),{data:r}=a(v(e)),{data:i}=a(b([e])),o=f(),s=h(),p=d(),[m,g]=(0,G.useState)(!1),[_,S]=(0,G.useState)(`overview`),C=n.TargetGroups?.[0];if(!C?.TargetGroupArn)return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(c,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,K.jsx)(`p`,{className:`text-muted-foreground`,children:`Target group not found.`})]});let E=async()=>{try{await o.mutateAsync(e),t({to:`/ec2/describe-target-groups`})}finally{g(!1)}},D=r.Attributes??[],O=i?.TagDescriptions?.find(t=>t.ResourceArn===e)?.Tags??[];return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(c,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),o.error&&(0,K.jsx)(w,{error:o.error,msg:`Failed to delete target group`}),(0,K.jsxs)(`div`,{className:`space-y-6`,children:[(0,K.jsx)(T,{actions:(0,K.jsxs)(u,{onClick:()=>g(!0),size:`sm`,variant:`destructive`,children:[(0,K.jsx)(l,{className:`size-4`}),`Delete`]}),subtitle:`Target Group Details`,title:C.TargetGroupName??C.TargetGroupArn}),(0,K.jsxs)(U,{onValueChange:S,value:_,children:[(0,K.jsxs)(V,{children:[(0,K.jsx)(B,{value:`overview`,children:`Overview`}),(0,K.jsx)(B,{value:`targets`,children:`Targets`}),(0,K.jsx)(B,{value:`health-checks`,children:`Health checks`}),(0,K.jsx)(B,{value:`attributes`,children:`Attributes`}),(0,K.jsx)(B,{value:`tags`,children:`Tags`})]}),(0,K.jsx)(H,{value:`overview`,children:(0,K.jsxs)(F,{children:[(0,K.jsx)(F.Header,{children:`Target group`}),(0,K.jsxs)(F.Content,{children:[(0,K.jsx)(I,{label:`ARN`,value:C.TargetGroupArn}),(0,K.jsx)(I,{label:`Protocol`,value:C.Protocol}),(0,K.jsx)(I,{label:`Port`,value:C.Port?.toString()}),(0,K.jsx)(I,{label:`VPC`,value:C.VpcId}),(0,K.jsx)(I,{label:`Target type`,value:C.TargetType}),(0,K.jsx)(I,{label:`Protocol version`,value:C.ProtocolVersion}),(0,K.jsx)(I,{label:`IP address type`,value:C.IpAddressType})]})]})}),(0,K.jsx)(H,{value:`targets`,children:(0,K.jsx)(ne,{defaultPort:C.Port??80,isActive:_===`targets`,targetGroupArn:C.TargetGroupArn,vpcId:C.VpcId})}),(0,K.jsxs)(H,{value:`health-checks`,children:[(0,K.jsx)(`p`,{className:`mb-3 text-sm text-muted-foreground`,children:`Health-check settings are set at creation time. Editing lands in a future slice (mulga-948).`}),(0,K.jsxs)(F,{children:[(0,K.jsx)(F.Header,{children:`Health check`}),(0,K.jsxs)(F.Content,{children:[(0,K.jsx)(I,{label:`Enabled`,value:C.HealthCheckEnabled===void 0?void 0:String(C.HealthCheckEnabled)}),(0,K.jsx)(I,{label:`Protocol`,value:C.HealthCheckProtocol}),(0,K.jsx)(I,{label:`Path`,value:C.HealthCheckPath}),(0,K.jsx)(I,{label:`Port`,value:C.HealthCheckPort}),(0,K.jsx)(I,{label:`Interval (s)`,value:C.HealthCheckIntervalSeconds?.toString()}),(0,K.jsx)(I,{label:`Timeout (s)`,value:C.HealthCheckTimeoutSeconds?.toString()}),(0,K.jsx)(I,{label:`Healthy threshold`,value:C.HealthyThresholdCount?.toString()}),(0,K.jsx)(I,{label:`Unhealthy threshold`,value:C.UnhealthyThresholdCount?.toString()}),(0,K.jsx)(I,{label:`Matcher (HTTP codes)`,value:C.Matcher?.HttpCode??C.Matcher?.GrpcCode})]})]})]}),(0,K.jsx)(H,{value:`attributes`,children:(0,K.jsx)(R,{attributes:D,error:s.error,isPending:s.isPending,isSuccess:s.isSuccess,onSubmit:t=>{s.mutate({targetGroupArn:e,attributes:t})},specs:L})}),(0,K.jsx)(H,{value:`tags`,children:(0,K.jsx)(z,{error:p.error,isPending:p.isPending,isSuccess:p.isSuccess,onSubmit:t=>p.mutate({resourceArn:e,tags:t,initialKeys:O.map(e=>e.Key??``).filter(e=>e.length>0)}),tags:O})})]})]}),(0,K.jsx)(P,{description:`Are you sure you want to delete target group "${C.TargetGroupName??C.TargetGroupArn}"? This action cannot be undone.`,isPending:o.isPending,onConfirm:E,onOpenChange:g,open:m,title:`Delete Target Group`})]})}function ie(){let e=(0,W.c)(2),{id:t}=C.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,K.jsx)(re,{arn:n}),e[0]=n,e[1]=r),r}export{ie as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{Lt as o,Ut as s}from"./auth.js";import{t as c}from"./back-link.js";import{t as l}from"./trash-2.js";import{t as u}from"./button.js";import{_ as d,c as f,l as p,m,p as h}from"./elbv2.js";import{$ as g,Pt as _,Q as v,Qr as y,Z as b,h as x,nr as S,tt as C}from"./index.js";import{t as w}from"./error-banner.js";import{t as T}from"./page-heading.js";import{a as E,i as D,l as O,n as k,o as A,r as j,s as M,t as N}from"./alert-dialog.js";import{t as P}from"./delete-confirmation-dialog.js";import{n as F,t as I}from"./detail-row.js";import{i as L,n as R,t as z}from"./tags-editor.js";import{i as B,n as V,r as H,t as U}from"./tabs.js";var W=r(),G=t(n(),1),K=e();function q(e){let t=e.trim();if(t===``)return;let n=Number(t);if(!(!Number.isInteger(n)||n<1||n>65535))return n}function J(e){let t=(0,W.c)(36),{open:n,onOpenChange:r,instances:i,defaultPort:a,isPending:o,onConfirm:c}=e,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={},t[0]=l):l=t[0];let[u,d]=(0,G.useState)(l),[f,p]=(0,G.useState)(),m,h;t[1]===n?(m=t[2],h=t[3]):(m=()=>{n||(d({}),p(void 0))},h=[n],t[1]=n,t[2]=m,t[3]=h),(0,G.useEffect)(m,h);let g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{d(t=>{let n=t[e];return n?.checked?{...t,[e]:{...n,checked:!1}}:{...t,[e]:{checked:!0,port:n?.port??``}}})},t[4]=g):g=t[4];let _=g,v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=(e,t)=>{d(n=>({...n,[e]:{checked:n[e]?.checked??!0,port:t}}))},t[5]=v):v=t[5];let y=v,b;t[6]!==c||t[7]!==u?(b=()=>{let e=Object.entries(u).filter(Y);if(e.length===0){p(`Select at least one instance.`);return}let t=[];for(let[n,r]of e){if(r.port.trim()===``){t.push({id:n});continue}let e=q(r.port);if(e===void 0){p(`Port for ${n} must be an integer between 1 and 65535.`);return}t.push({id:n,port:e})}p(void 0),c(t)},t[6]=c,t[7]=u,t[8]=b):b=t[8];let x=b,C;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,K.jsx)(O,{children:`Register targets`}),t[9]=C):C=t[9];let w;t[10]===a?w=t[11]:(w=(0,K.jsxs)(M,{children:[C,(0,K.jsxs)(E,{children:[`Select instances to register. Leave port blank to use the target group port (`,a,`).`]})]}),t[10]=a,t[11]=w);let T;t[12]!==a||t[13]!==i||t[14]!==u?(T=i.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances available in this VPC.`}):(0,K.jsx)(`div`,{className:`max-h-72 space-y-1 overflow-y-auto`,children:i.map(e=>{let t=e.InstanceId??``,n=u[t],r=n?.checked??!1,i=s(e.Tags);return(0,K.jsxs)(`div`,{className:`flex items-center gap-2 rounded px-1 py-1 text-xs hover:bg-accent`,children:[(0,K.jsx)(`input`,{"aria-label":`Register target ${t}`,checked:r,id:`register-target-${t}`,onChange:()=>_(t),type:`checkbox`}),(0,K.jsxs)(`label`,{className:`flex flex-1 items-center gap-2`,htmlFor:`register-target-${t}`,children:[(0,K.jsx)(`span`,{className:`font-mono`,children:t}),i&&(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,i,`)`]}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.State?.Name??``})]}),r&&(0,K.jsx)(S,{"aria-label":`Port override for ${t}`,className:`w-24`,onChange:e=>y(t,e.target.value),placeholder:String(a),value:n?.port??``})]},t)})}),t[12]=a,t[13]=i,t[14]=u,t[15]=T):T=t[15];let P;t[16]===f?P=t[17]:(P=f&&(0,K.jsx)(`p`,{className:`text-xs text-destructive`,role:`alert`,children:f}),t[16]=f,t[17]=P);let F;t[18]===o?F=t[19]:(F=(0,K.jsx)(j,{disabled:o,children:`Cancel`}),t[18]=o,t[19]=F);let I=o?`Registering…`:`Register`,L;t[20]!==x||t[21]!==o||t[22]!==I?(L=(0,K.jsx)(k,{disabled:o,onClick:x,children:I}),t[20]=x,t[21]=o,t[22]=I,t[23]=L):L=t[23];let R;t[24]!==F||t[25]!==L?(R=(0,K.jsxs)(A,{children:[F,L]}),t[24]=F,t[25]=L,t[26]=R):R=t[26];let z;t[27]!==P||t[28]!==R||t[29]!==w||t[30]!==T?(z=(0,K.jsxs)(D,{className:`sm:max-w-lg`,children:[w,T,P,R]}),t[27]=P,t[28]=R,t[29]=w,t[30]=T,t[31]=z):z=t[31];let B;return t[32]!==r||t[33]!==n||t[34]!==z?(B=(0,K.jsx)(N,{onOpenChange:r,open:n,children:z}),t[32]=r,t[33]=n,t[34]=z,t[35]=B):B=t[35],B}function Y(e){let[,t]=e;return t.checked&&t!==void 0}var X=5e3,Z=new Set([`healthy`]),Q=new Set([`unhealthy`,`unavailable`]),$=new Set([`initial`,`draining`]);function ee(e){return e&&Z.has(e)?`bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100`:e&&Q.has(e)?`bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-100`:e&&$.has(e)?`bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100`:`bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100`}function te(e){return`${e.Id??``}:${e.Port??``}`}function ne({targetGroupArn:e,vpcId:t,defaultPort:n,isActive:r}){let{data:s}=a(_),{data:c,isLoading:d,error:f}=i({...C(e),refetchInterval:r?X:!1,refetchIntervalInBackground:!1}),h=m(),g=p(),[v,y]=(0,G.useState)(!1),[b,x]=(0,G.useState)(),S=(s.Reservations?.flatMap(e=>e.Instances??[])??[]).filter(e=>e.VpcId===t&&e.State?.Name!==`terminated`),T=c?.TargetHealthDescriptions??[];return(0,K.jsxs)(`div`,{className:`space-y-3`,children:[h.error&&(0,K.jsx)(w,{error:h.error,msg:`Failed to register targets`}),g.error&&(0,K.jsx)(w,{error:g.error,msg:`Failed to deregister target`}),f&&(0,K.jsx)(w,{error:f,msg:`Failed to load target health`}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:d?`Loading target health…`:`${T.length} target${T.length===1?``:`s`}`}),(0,K.jsx)(u,{onClick:()=>y(!0),size:`sm`,children:`Register targets`})]}),T.length===0?(0,K.jsx)(`p`,{className:`text-muted-foreground`,children:`No targets registered.`}):(0,K.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,K.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`AZ`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Reason`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Description`}),(0,K.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,K.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,K.jsx)(`tbody`,{children:T.map(e=>{let t=e.Target??{Id:``},n=e.TargetHealth?.State;return(0,K.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,K.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t.Id??``}),(0,K.jsx)(`td`,{className:`px-4 py-2`,children:t.Port??``}),(0,K.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:t.AvailabilityZone??``}),(0,K.jsx)(`td`,{className:`px-4 py-2`,children:(0,K.jsx)(`span`,{className:o(`rounded-full px-2 py-0.5 text-xs`,ee(n)),children:n??`unknown`})}),(0,K.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:e.TargetHealth?.Reason??``}),(0,K.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:e.TargetHealth?.Description??``}),(0,K.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,K.jsx)(u,{"aria-label":`Deregister ${t.Id}`,onClick:()=>x(t),size:`sm`,variant:`ghost`,children:(0,K.jsx)(l,{className:`size-4`})})})]},te(t))})})]})}),(0,K.jsx)(J,{defaultPort:n,instances:S,isPending:h.isPending,onConfirm:async t=>{try{await h.mutateAsync({targetGroupArn:e,targets:t}),y(!1)}catch{}},onOpenChange:y,open:v}),(0,K.jsx)(P,{description:b?`Deregister ${b.Id}${b.Port?`:${b.Port}`:``} from this target group?`:``,isPending:g.isPending,onConfirm:async()=>{if(b?.Id)try{await g.mutateAsync({targetGroupArn:e,targets:[{id:b.Id,port:b.Port}]})}finally{x(void 0)}},onOpenChange:e=>!e&&x(void 0),open:b!==void 0,title:`Deregister target`})]})}function re({arn:e}){let t=y(),{data:n}=a(g(e)),{data:r}=a(v(e)),{data:i}=a(b([e])),o=f(),s=h(),p=d(),[m,_]=(0,G.useState)(!1),[x,S]=(0,G.useState)(`overview`),C=n.TargetGroups?.[0];if(!C?.TargetGroupArn)return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(c,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,K.jsx)(`p`,{className:`text-muted-foreground`,children:`Target group not found.`})]});let E=async()=>{try{await o.mutateAsync(e),t({to:`/ec2/describe-target-groups`})}finally{_(!1)}},D=r.Attributes??[],O=i?.TagDescriptions?.find(t=>t.ResourceArn===e)?.Tags??[];return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(c,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),o.error&&(0,K.jsx)(w,{error:o.error,msg:`Failed to delete target group`}),(0,K.jsxs)(`div`,{className:`space-y-6`,children:[(0,K.jsx)(T,{actions:(0,K.jsxs)(u,{onClick:()=>_(!0),size:`sm`,variant:`destructive`,children:[(0,K.jsx)(l,{className:`size-4`}),`Delete`]}),subtitle:`Target Group Details`,title:C.TargetGroupName??C.TargetGroupArn}),(0,K.jsxs)(U,{onValueChange:S,value:x,children:[(0,K.jsxs)(V,{children:[(0,K.jsx)(B,{value:`overview`,children:`Overview`}),(0,K.jsx)(B,{value:`targets`,children:`Targets`}),(0,K.jsx)(B,{value:`health-checks`,children:`Health checks`}),(0,K.jsx)(B,{value:`attributes`,children:`Attributes`}),(0,K.jsx)(B,{value:`tags`,children:`Tags`})]}),(0,K.jsx)(H,{value:`overview`,children:(0,K.jsxs)(F,{children:[(0,K.jsx)(F.Header,{children:`Target group`}),(0,K.jsxs)(F.Content,{children:[(0,K.jsx)(I,{label:`ARN`,value:C.TargetGroupArn}),(0,K.jsx)(I,{label:`Protocol`,value:C.Protocol}),(0,K.jsx)(I,{label:`Port`,value:C.Port?.toString()}),(0,K.jsx)(I,{label:`VPC`,value:C.VpcId}),(0,K.jsx)(I,{label:`Target type`,value:C.TargetType}),(0,K.jsx)(I,{label:`Protocol version`,value:C.ProtocolVersion}),(0,K.jsx)(I,{label:`IP address type`,value:C.IpAddressType})]})]})}),(0,K.jsx)(H,{value:`targets`,children:(0,K.jsx)(ne,{defaultPort:C.Port??80,isActive:x===`targets`,targetGroupArn:C.TargetGroupArn,vpcId:C.VpcId})}),(0,K.jsxs)(H,{value:`health-checks`,children:[(0,K.jsx)(`p`,{className:`mb-3 text-sm text-muted-foreground`,children:`Health-check settings are set at creation time. Editing lands in a future slice (mulga-948).`}),(0,K.jsxs)(F,{children:[(0,K.jsx)(F.Header,{children:`Health check`}),(0,K.jsxs)(F.Content,{children:[(0,K.jsx)(I,{label:`Enabled`,value:C.HealthCheckEnabled===void 0?void 0:String(C.HealthCheckEnabled)}),(0,K.jsx)(I,{label:`Protocol`,value:C.HealthCheckProtocol}),(0,K.jsx)(I,{label:`Path`,value:C.HealthCheckPath}),(0,K.jsx)(I,{label:`Port`,value:C.HealthCheckPort}),(0,K.jsx)(I,{label:`Interval (s)`,value:C.HealthCheckIntervalSeconds?.toString()}),(0,K.jsx)(I,{label:`Timeout (s)`,value:C.HealthCheckTimeoutSeconds?.toString()}),(0,K.jsx)(I,{label:`Healthy threshold`,value:C.HealthyThresholdCount?.toString()}),(0,K.jsx)(I,{label:`Unhealthy threshold`,value:C.UnhealthyThresholdCount?.toString()}),(0,K.jsx)(I,{label:`Matcher (HTTP codes)`,value:C.Matcher?.HttpCode??C.Matcher?.GrpcCode})]})]})]}),(0,K.jsx)(H,{value:`attributes`,children:(0,K.jsx)(R,{attributes:D,error:s.error,isPending:s.isPending,isSuccess:s.isSuccess,onSubmit:t=>{s.mutate({targetGroupArn:e,attributes:t})},specs:L})}),(0,K.jsx)(H,{value:`tags`,children:(0,K.jsx)(z,{error:p.error,isPending:p.isPending,isSuccess:p.isSuccess,onSubmit:t=>p.mutate({resourceArn:e,tags:t,initialKeys:O.map(e=>e.Key??``).filter(e=>e.length>0)}),tags:O})})]})]}),(0,K.jsx)(P,{description:`Are you sure you want to delete target group "${C.TargetGroupName??C.TargetGroupArn}"? This action cannot be undone.`,isPending:o.isPending,onConfirm:E,onOpenChange:_,open:m,title:`Delete Target Group`})]})}function ie(){let e=(0,W.c)(2),{id:t}=x.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,K.jsx)(re,{arn:n}),e[0]=n,e[1]=r),r}export{ie as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id14.js b/spinifex/services/spinifexui/frontend/dist/assets/_id14.js index d0441d81e..a7b09e7f3 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id14.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id14.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Bt as a,Ut as o}from"./auth.js";import{t as s}from"./back-link.js";import{c,i as l,n as u,s as d,t as ee}from"./select.js";import{t as f}from"./trash-2.js";import{n as p,t as m}from"./button.js";import{I as h,N as g,o as _}from"./ec2.js";import{Kr as v,Mt as y,Xr as te,Xt as ne,er as re,m as b,qr as x}from"./index.js";import{t as S}from"./error-banner.js";import{t as ie}from"./page-heading.js";import{a as C,t as w}from"./field.js";import{a as T,i as E,l as D,n as O,o as k,r as A,s as j,t as M}from"./alert-dialog.js";import{t as ae}from"./delete-confirmation-dialog.js";import{n as N,t as P}from"./detail-row.js";import{t as F}from"./state-badge.js";var I=x(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),L=x(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),R=t(n()),z=e();function B(){let{id:e}=b.useParams(),t=te(),{data:n}=r(ne(e)),{data:x}=r(y),B=n.Volumes?.[0],V=g(),H=_(),U=h(),[W,G]=(0,R.useState)(null),[K,q]=(0,R.useState)(``),[J,Y]=(0,R.useState)(``),[X,Z]=(0,R.useState)(!1),oe=x.Reservations?.flatMap(e=>e.Instances?.filter(e=>e.State?.Name===`running`)??[])??[],Q=B?.State===`available`&&(!B.Attachments||B.Attachments.length===0),$=()=>G(null);return B?.VolumeId?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(s,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),V.error&&(0,z.jsx)(S,{error:V.error,msg:`Failed to delete volume`}),H.error&&(0,z.jsx)(S,{error:H.error,msg:`Failed to attach volume`}),U.error&&(0,z.jsx)(S,{error:U.error,msg:`Failed to detach volume`}),(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsx)(ie,{actions:(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsxs)(m,{disabled:!Q,onClick:()=>G(`delete`),size:`sm`,variant:`destructive`,children:[(0,z.jsx)(f,{className:`size-4`}),`Delete`]}),Q?(0,z.jsx)(i,{className:p({variant:`outline`}),params:{id:B.VolumeId},to:`/ec2/modify-volume/$id`,children:`Resize Volume`}):(0,z.jsx)(m,{disabled:!0,variant:`outline`,children:`Resize Volume`}),Q?(0,z.jsxs)(m,{onClick:()=>G(`attach`),size:`sm`,variant:`outline`,children:[(0,z.jsx)(L,{className:`size-4`}),`Attach`]}):null,B.Attachments&&B.Attachments.length>0?(0,z.jsxs)(m,{onClick:()=>G(`detach`),size:`sm`,variant:`outline`,children:[(0,z.jsx)(I,{className:`size-4`}),`Detach`]}):null,(0,z.jsxs)(i,{className:p({variant:`outline`,size:`sm`}),search:{volumeId:B.VolumeId},to:`/ec2/create-snapshot`,children:[(0,z.jsx)(v,{className:`size-4`}),`Create Snapshot`]}),(0,z.jsx)(F,{state:B.State})]}),subtitle:`Volume Details`,title:B.VolumeId}),(0,z.jsxs)(N,{children:[(0,z.jsx)(N.Header,{children:`Volume Information`}),(0,z.jsxs)(N.Content,{children:[(0,z.jsx)(P,{label:`Volume ID`,value:B.VolumeId}),(0,z.jsx)(P,{label:`Size`,value:`${B.Size} GiB`}),(0,z.jsx)(P,{label:`Volume Type`,value:B.VolumeType}),(0,z.jsx)(P,{label:`State`,value:B.State}),(0,z.jsx)(P,{label:`Availability Zone`,value:B.AvailabilityZone}),(0,z.jsx)(P,{label:`Create Time`,value:a(B.CreateTime)}),(0,z.jsx)(P,{label:`Encrypted`,value:B.Encrypted?`Yes`:`No`}),(0,z.jsx)(P,{label:`KMS Key ID`,value:B.KmsKeyId})]})]}),B.Attachments&&B.Attachments.length>0&&(0,z.jsxs)(N,{children:[(0,z.jsx)(N.Header,{children:`Attachments`}),B.Attachments.map(e=>(0,z.jsxs)(N.Content,{children:[(0,z.jsx)(P,{label:`Instance ID`,value:e.InstanceId?(0,z.jsx)(i,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,z.jsx)(P,{label:`Device`,value:e.Device}),(0,z.jsx)(P,{label:`Status`,value:e.State}),(0,z.jsx)(P,{label:`Attach Time`,value:a(e.AttachTime)}),(0,z.jsx)(P,{label:`Delete on Termination`,value:e.DeleteOnTermination?`Yes`:`No`})]},e.InstanceId))]})]}),(0,z.jsx)(ae,{description:`Are you sure you want to delete the volume "${B.VolumeId}"? This action cannot be undone.`,isPending:V.isPending,onConfirm:async()=>{try{await V.mutateAsync(e),t({to:`/ec2/describe-volumes`})}finally{$()}},onOpenChange:e=>{e||$()},open:W===`delete`,title:`Delete Volume`}),(0,z.jsx)(M,{onOpenChange:e=>{e||($(),q(``),Y(``))},open:W===`attach`,children:(0,z.jsxs)(E,{children:[(0,z.jsxs)(j,{children:[(0,z.jsx)(D,{children:`Attach Volume`}),(0,z.jsx)(T,{children:`Attach this volume to a running instance.`})]}),(0,z.jsxs)(w,{children:[(0,z.jsx)(C,{children:(0,z.jsx)(`label`,{htmlFor:`attachInstance`,children:`Instance`})}),(0,z.jsxs)(ee,{onValueChange:e=>q(e??``),value:K,children:[(0,z.jsx)(d,{className:`w-full`,id:`attachInstance`,children:(0,z.jsx)(c,{placeholder:`Select an instance`})}),(0,z.jsx)(u,{children:oe.map(e=>{let t=o(e.Tags);return(0,z.jsxs)(l,{value:e.InstanceId??``,children:[e.InstanceId,t?` (${t})`:``]},e.InstanceId)})})]})]}),(0,z.jsxs)(w,{children:[(0,z.jsx)(C,{children:(0,z.jsx)(`label`,{htmlFor:`attachDevice`,children:`Device (optional)`})}),(0,z.jsx)(re,{id:`attachDevice`,onChange:e=>Y(e.target.value),placeholder:`/dev/sdf`,value:J})]}),(0,z.jsxs)(k,{children:[(0,z.jsx)(A,{children:`Cancel`}),(0,z.jsx)(O,{disabled:H.isPending||!K,onClick:async()=>{try{await H.mutateAsync({volumeId:e,instanceId:K,device:J||void 0}),$(),q(``),Y(``)}catch{}},children:H.isPending?`Attaching…`:`Attach`})]})]})}),(0,z.jsx)(M,{onOpenChange:e=>{e||($(),Z(!1))},open:W===`detach`,children:(0,z.jsxs)(E,{children:[(0,z.jsxs)(j,{children:[(0,z.jsx)(D,{children:`Detach Volume`}),(0,z.jsxs)(T,{children:[`Are you sure you want to detach the volume "`,B.VolumeId,`" from instance "`,B.Attachments?.[0]?.InstanceId,`"?`]})]}),(0,z.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,z.jsx)(`input`,{"aria-label":`Force detach`,checked:X,onChange:e=>Z(e.target.checked),type:`checkbox`}),`Force detach`]}),(0,z.jsxs)(k,{children:[(0,z.jsx)(A,{children:`Cancel`}),(0,z.jsx)(O,{disabled:U.isPending,onClick:async()=>{let t=B?.Attachments?.[0]?.InstanceId;try{await U.mutateAsync({volumeId:e,instanceId:t??void 0,force:X||void 0}),$(),Z(!1)}catch{}},children:U.isPending?`Detaching…`:`Detach`})]})]})})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(s,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]})}export{B as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Bt as a,Ut as o}from"./auth.js";import{t as s}from"./back-link.js";import{c,i as l,n as ee,s as u,t as te}from"./select.js";import{t as d}from"./trash-2.js";import{n as f,t as p}from"./button.js";import{I as m,N as h,o as g}from"./ec2.js";import{Jr as _,Pt as v,Qr as ne,Qt as re,Yr as y,g as b,nr as x}from"./index.js";import{t as S}from"./error-banner.js";import{t as ie}from"./page-heading.js";import{a as C,t as w}from"./field.js";import{a as T,i as E,l as D,n as O,o as k,r as A,s as j,t as M}from"./alert-dialog.js";import{t as ae}from"./delete-confirmation-dialog.js";import{n as N,t as P}from"./detail-row.js";import{t as F}from"./state-badge.js";var I=y(`link-2-off`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`,key:`10o201`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`,key:`1d3206`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`,key:`rvw6j4`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}]]),L=y(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),R=t(n()),z=e();function B(){let{id:e}=b.useParams(),t=ne(),{data:n}=r(re(e)),{data:y}=r(v),B=n.Volumes?.[0],V=h(),H=g(),U=m(),[W,G]=(0,R.useState)(null),[K,q]=(0,R.useState)(``),[J,Y]=(0,R.useState)(``),[X,Z]=(0,R.useState)(!1),oe=y.Reservations?.flatMap(e=>e.Instances?.filter(e=>e.State?.Name===`running`)??[])??[],Q=B?.State===`available`&&(!B.Attachments||B.Attachments.length===0),$=()=>G(null);return B?.VolumeId?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(s,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),V.error&&(0,z.jsx)(S,{error:V.error,msg:`Failed to delete volume`}),H.error&&(0,z.jsx)(S,{error:H.error,msg:`Failed to attach volume`}),U.error&&(0,z.jsx)(S,{error:U.error,msg:`Failed to detach volume`}),(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsx)(ie,{actions:(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsxs)(p,{disabled:!Q,onClick:()=>G(`delete`),size:`sm`,variant:`destructive`,children:[(0,z.jsx)(d,{className:`size-4`}),`Delete`]}),Q?(0,z.jsx)(i,{className:f({variant:`outline`}),params:{id:B.VolumeId},to:`/ec2/modify-volume/$id`,children:`Resize Volume`}):(0,z.jsx)(p,{disabled:!0,variant:`outline`,children:`Resize Volume`}),Q?(0,z.jsxs)(p,{onClick:()=>G(`attach`),size:`sm`,variant:`outline`,children:[(0,z.jsx)(L,{className:`size-4`}),`Attach`]}):null,B.Attachments&&B.Attachments.length>0?(0,z.jsxs)(p,{onClick:()=>G(`detach`),size:`sm`,variant:`outline`,children:[(0,z.jsx)(I,{className:`size-4`}),`Detach`]}):null,(0,z.jsxs)(i,{className:f({variant:`outline`,size:`sm`}),search:{volumeId:B.VolumeId},to:`/ec2/create-snapshot`,children:[(0,z.jsx)(_,{className:`size-4`}),`Create Snapshot`]}),(0,z.jsx)(F,{state:B.State})]}),subtitle:`Volume Details`,title:B.VolumeId}),(0,z.jsxs)(N,{children:[(0,z.jsx)(N.Header,{children:`Volume Information`}),(0,z.jsxs)(N.Content,{children:[(0,z.jsx)(P,{label:`Volume ID`,value:B.VolumeId}),(0,z.jsx)(P,{label:`Size`,value:`${B.Size} GiB`}),(0,z.jsx)(P,{label:`Volume Type`,value:B.VolumeType}),(0,z.jsx)(P,{label:`State`,value:B.State}),(0,z.jsx)(P,{label:`Availability Zone`,value:B.AvailabilityZone}),(0,z.jsx)(P,{label:`Create Time`,value:a(B.CreateTime)}),(0,z.jsx)(P,{label:`Encrypted`,value:B.Encrypted?`Yes`:`No`}),(0,z.jsx)(P,{label:`KMS Key ID`,value:B.KmsKeyId})]})]}),B.Attachments&&B.Attachments.length>0&&(0,z.jsxs)(N,{children:[(0,z.jsx)(N.Header,{children:`Attachments`}),B.Attachments.map(e=>(0,z.jsxs)(N.Content,{children:[(0,z.jsx)(P,{label:`Instance ID`,value:e.InstanceId?(0,z.jsx)(i,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,z.jsx)(P,{label:`Device`,value:e.Device}),(0,z.jsx)(P,{label:`Status`,value:e.State}),(0,z.jsx)(P,{label:`Attach Time`,value:a(e.AttachTime)}),(0,z.jsx)(P,{label:`Delete on Termination`,value:e.DeleteOnTermination?`Yes`:`No`})]},e.InstanceId))]})]}),(0,z.jsx)(ae,{description:`Are you sure you want to delete the volume "${B.VolumeId}"? This action cannot be undone.`,isPending:V.isPending,onConfirm:async()=>{try{await V.mutateAsync(e),t({to:`/ec2/describe-volumes`})}finally{$()}},onOpenChange:e=>{e||$()},open:W===`delete`,title:`Delete Volume`}),(0,z.jsx)(M,{onOpenChange:e=>{e||($(),q(``),Y(``))},open:W===`attach`,children:(0,z.jsxs)(E,{children:[(0,z.jsxs)(j,{children:[(0,z.jsx)(D,{children:`Attach Volume`}),(0,z.jsx)(T,{children:`Attach this volume to a running instance.`})]}),(0,z.jsxs)(w,{children:[(0,z.jsx)(C,{children:(0,z.jsx)(`label`,{htmlFor:`attachInstance`,children:`Instance`})}),(0,z.jsxs)(te,{onValueChange:e=>q(e??``),value:K,children:[(0,z.jsx)(u,{className:`w-full`,id:`attachInstance`,children:(0,z.jsx)(c,{placeholder:`Select an instance`})}),(0,z.jsx)(ee,{children:oe.map(e=>{let t=o(e.Tags);return(0,z.jsxs)(l,{value:e.InstanceId??``,children:[e.InstanceId,t?` (${t})`:``]},e.InstanceId)})})]})]}),(0,z.jsxs)(w,{children:[(0,z.jsx)(C,{children:(0,z.jsx)(`label`,{htmlFor:`attachDevice`,children:`Device (optional)`})}),(0,z.jsx)(x,{id:`attachDevice`,onChange:e=>Y(e.target.value),placeholder:`/dev/sdf`,value:J})]}),(0,z.jsxs)(k,{children:[(0,z.jsx)(A,{children:`Cancel`}),(0,z.jsx)(O,{disabled:H.isPending||!K,onClick:async()=>{try{await H.mutateAsync({volumeId:e,instanceId:K,device:J||void 0}),$(),q(``),Y(``)}catch{}},children:H.isPending?`Attaching…`:`Attach`})]})]})}),(0,z.jsx)(M,{onOpenChange:e=>{e||($(),Z(!1))},open:W===`detach`,children:(0,z.jsxs)(E,{children:[(0,z.jsxs)(j,{children:[(0,z.jsx)(D,{children:`Detach Volume`}),(0,z.jsxs)(T,{children:[`Are you sure you want to detach the volume "`,B.VolumeId,`" from instance "`,B.Attachments?.[0]?.InstanceId,`"?`]})]}),(0,z.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,z.jsx)(`input`,{"aria-label":`Force detach`,checked:X,onChange:e=>Z(e.target.checked),type:`checkbox`}),`Force detach`]}),(0,z.jsxs)(k,{children:[(0,z.jsx)(A,{children:`Cancel`}),(0,z.jsx)(O,{disabled:U.isPending,onClick:async()=>{let t=B?.Attachments?.[0]?.InstanceId;try{await U.mutateAsync({volumeId:e,instanceId:t??void 0,force:X||void 0}),$(),Z(!1)}catch{}},children:U.isPending?`Detaching…`:`Detach`})]})]})})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(s,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]})}export{B as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id15.js b/spinifex/services/spinifexui/frontend/dist/assets/_id15.js index 6ebeca59b..152c0ea9a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id15.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id15.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./back-link.js";import{U as i}from"./ec2.js";import{Xr as a,Xt as o,er as s,h as c}from"./index.js";import{i as l,t as u}from"./zod.js";import{t as d}from"./error-banner.js";import{t as f}from"./form-actions.js";import{t as p}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{_}from"./ec22.js";var v=t(),y=e();function b(){let e=(0,v.c)(53),{id:t}=c.useParams(),b=a(),x;e[0]===t?x=e[1]:(x=o(t),e[0]=t,e[1]=x);let{data:S}=n(x),C=S.Volumes?.[0],w=C?.VolumeId,T=i(),E=C?.Size??1,D;e[2]===E?D=e[3]:(D=u(_.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),e[2]=E,e[3]=D);let O;e[4]===E?O=e[5]:(O={size:E},e[4]=E,e[5]=O);let k;e[6]!==D||e[7]!==O?(k={resolver:D,defaultValues:O},e[6]=D,e[7]=O,e[8]=k):k=e[8];let{handleSubmit:A,register:j,formState:M}=l(k),{errors:N,isSubmitting:P}=M;if(!w){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(r,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,y.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]}),e[9]=t):t=e[9],t}let F;e[10]!==T||e[11]!==b||e[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},e[10]=T,e[11]=b,e[12]=w,e[13]=F):F=e[13];let I=F,L,R;e[14]===w?(L=e[15],R=e[16]):(L=(0,y.jsx)(r,{params:{id:w},to:`/ec2/describe-volumes/$id`,children:`Back to volume`}),R=(0,y.jsx)(p,{subtitle:w,title:`Resize Volume`}),e[14]=w,e[15]=L,e[16]=R);let z;e[17]===T.error?z=e[18]:(z=T.error&&(0,y.jsx)(d,{error:T.error,msg:`Failed to resize volume`}),e[17]=T.error,e[18]=z);let B;e[19]!==A||e[20]!==I?(B=A(I),e[19]=A,e[20]=I,e[21]=B):B=e[21];let V;e[22]===E?V=e[23]:(V=(0,y.jsx)(`div`,{className:`space-y-2`,children:(0,y.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Current size: `,E,` GiB`]})}),e[22]=E,e[23]=V);let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),e[24]=H):H=e[24];let U=!!N.size,W=E+1,G;e[25]===j?G=e[26]:(G=j(`size`,{valueAsNumber:!0}),e[25]=j,e[26]=G);let K;e[27]!==U||e[28]!==W||e[29]!==G?(K=(0,y.jsx)(s,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),e[27]=U,e[28]=W,e[29]=G,e[30]=K):K=e[30];let q;e[31]===N.size?q=e[32]:(q=(0,y.jsx)(h,{errors:[N.size]}),e[31]=N.size,e[32]=q);let J;e[33]!==K||e[34]!==q?(J=(0,y.jsxs)(g,{children:[H,K,q]}),e[33]=K,e[34]=q,e[35]=J):J=e[35];let Y;e[36]!==b||e[37]!==w?(Y=async()=>await b({to:`/ec2/describe-volumes/$id`,params:{id:w}}),e[36]=b,e[37]=w,e[38]=Y):Y=e[38];let X;e[39]!==P||e[40]!==T.isPending||e[41]!==Y?(X=(0,y.jsx)(f,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),e[39]=P,e[40]=T.isPending,e[41]=Y,e[42]=X):X=e[42];let Z;e[43]!==V||e[44]!==J||e[45]!==X||e[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),e[43]=V,e[44]=J,e[45]=X,e[46]=B,e[47]=Z):Z=e[47];let Q;return e[48]!==Z||e[49]!==L||e[50]!==R||e[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),e[48]=Z,e[49]=L,e[50]=R,e[51]=z,e[52]=Q):Q=e[52],Q}export{b as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./back-link.js";import{U as i}from"./ec2.js";import{Qr as a,Qt as o,_ as s,nr as c}from"./index.js";import{i as l,t as u}from"./zod.js";import{t as d}from"./error-banner.js";import{t as f}from"./form-actions.js";import{t as p}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{_}from"./ec22.js";var v=t(),y=e();function b(){let e=(0,v.c)(53),{id:t}=s.useParams(),b=a(),x;e[0]===t?x=e[1]:(x=o(t),e[0]=t,e[1]=x);let{data:S}=n(x),C=S.Volumes?.[0],w=C?.VolumeId,T=i(),E=C?.Size??1,D;e[2]===E?D=e[3]:(D=u(_.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),e[2]=E,e[3]=D);let O;e[4]===E?O=e[5]:(O={size:E},e[4]=E,e[5]=O);let k;e[6]!==D||e[7]!==O?(k={resolver:D,defaultValues:O},e[6]=D,e[7]=O,e[8]=k):k=e[8];let{handleSubmit:A,register:j,formState:M}=l(k),{errors:N,isSubmitting:P}=M;if(!w){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(r,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,y.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]}),e[9]=t):t=e[9],t}let F;e[10]!==T||e[11]!==b||e[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},e[10]=T,e[11]=b,e[12]=w,e[13]=F):F=e[13];let I=F,L,R;e[14]===w?(L=e[15],R=e[16]):(L=(0,y.jsx)(r,{params:{id:w},to:`/ec2/describe-volumes/$id`,children:`Back to volume`}),R=(0,y.jsx)(p,{subtitle:w,title:`Resize Volume`}),e[14]=w,e[15]=L,e[16]=R);let z;e[17]===T.error?z=e[18]:(z=T.error&&(0,y.jsx)(d,{error:T.error,msg:`Failed to resize volume`}),e[17]=T.error,e[18]=z);let B;e[19]!==A||e[20]!==I?(B=A(I),e[19]=A,e[20]=I,e[21]=B):B=e[21];let V;e[22]===E?V=e[23]:(V=(0,y.jsx)(`div`,{className:`space-y-2`,children:(0,y.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Current size: `,E,` GiB`]})}),e[22]=E,e[23]=V);let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),e[24]=H):H=e[24];let U=!!N.size,W=E+1,G;e[25]===j?G=e[26]:(G=j(`size`,{valueAsNumber:!0}),e[25]=j,e[26]=G);let K;e[27]!==U||e[28]!==W||e[29]!==G?(K=(0,y.jsx)(c,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),e[27]=U,e[28]=W,e[29]=G,e[30]=K):K=e[30];let q;e[31]===N.size?q=e[32]:(q=(0,y.jsx)(h,{errors:[N.size]}),e[31]=N.size,e[32]=q);let J;e[33]!==K||e[34]!==q?(J=(0,y.jsxs)(g,{children:[H,K,q]}),e[33]=K,e[34]=q,e[35]=J):J=e[35];let Y;e[36]!==b||e[37]!==w?(Y=async()=>await b({to:`/ec2/describe-volumes/$id`,params:{id:w}}),e[36]=b,e[37]=w,e[38]=Y):Y=e[38];let X;e[39]!==P||e[40]!==T.isPending||e[41]!==Y?(X=(0,y.jsx)(f,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),e[39]=P,e[40]=T.isPending,e[41]=Y,e[42]=X):X=e[42];let Z;e[43]!==V||e[44]!==J||e[45]!==X||e[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),e[43]=V,e[44]=J,e[45]=X,e[46]=B,e[47]=Z):Z=e[47];let Q;return e[48]!==Z||e[49]!==L||e[50]!==R||e[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),e[48]=Z,e[49]=L,e[50]=R,e[51]=z,e[52]=Q):Q=e[52],Q}export{b as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id16.js b/spinifex/services/spinifexui/frontend/dist/assets/_id16.js index 52ec2cd78..abda6ad88 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id16.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id16.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{P as l}from"./ec2.js";import{Qt as u,Xr as d,Yt as f,g as p}from"./index.js";import{t as m}from"./error-banner.js";import{t as h}from"./page-heading.js";import{t as g}from"./delete-confirmation-dialog.js";import{n as _,t as v}from"./detail-row.js";import{t as y}from"./state-badge.js";var b=t(n()),x=e();function S(){let{id:e}=p.useParams(),t=d(),{data:n}=r(u(e)),{data:S}=r(f),C=n.Vpcs?.[0],w=l(),[T,E]=(0,b.useState)(!1),D=S.Subnets?.filter(t=>t.VpcId===e)??[],O=async()=>{try{await w.mutateAsync(e),t({to:`/ec2/describe-vpcs`})}finally{E(!1)}};if(!C?.VpcId)return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=a(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(m,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsxs)(c,{onClick:()=>E(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(s,{className:`size-4`}),`Delete`]}),(0,x.jsx)(y,{state:C.State})]}),subtitle:`VPC Details`,title:k?`${C.VpcId} (${k})`:C.VpcId}),(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`VPC Information`}),(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`VPC ID`,value:C.VpcId}),(0,x.jsx)(v,{label:`State`,value:C.State}),(0,x.jsx)(v,{label:`CIDR Block`,value:C.CidrBlock}),(0,x.jsx)(v,{label:`Is Default`,value:C.IsDefault?`Yes`:`No`}),(0,x.jsx)(v,{label:`DHCP Options ID`,value:C.DhcpOptionsId}),(0,x.jsx)(v,{label:`Instance Tenancy`,value:C.InstanceTenancy}),(0,x.jsx)(v,{label:`Owner ID`,value:C.OwnerId})]})]}),D.length>0&&(0,x.jsxs)(_,{children:[(0,x.jsxs)(_.Header,{children:[`Subnets (`,D.length,`)`]}),D.map(e=>e.SubnetId?(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`Subnet ID`,value:(0,x.jsx)(i,{className:`text-primary hover:underline`,params:{id:e.SubnetId},to:`/ec2/describe-subnets/$id`,children:e.SubnetId})}),(0,x.jsx)(v,{label:`CIDR Block`,value:e.CidrBlock}),(0,x.jsx)(v,{label:`Availability Zone`,value:e.AvailabilityZone}),(0,x.jsx)(v,{label:`State`,value:e.State})]},e.SubnetId):null)]})]}),(0,x.jsx)(g,{description:`Are you sure you want to delete the VPC "${C.VpcId}"? This action cannot be undone. The VPC must have no associated subnets or internet gateways.`,isPending:w.isPending,onConfirm:O,onOpenChange:E,open:T,title:`Delete VPC`})]})}export{S as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{P as l}from"./ec2.js";import{Qr as u,Zt as d,en as f,v as p}from"./index.js";import{t as m}from"./error-banner.js";import{t as h}from"./page-heading.js";import{t as g}from"./delete-confirmation-dialog.js";import{n as _,t as v}from"./detail-row.js";import{t as y}from"./state-badge.js";var b=t(n()),x=e();function S(){let{id:e}=p.useParams(),t=u(),{data:n}=r(f(e)),{data:S}=r(d),C=n.Vpcs?.[0],w=l(),[T,E]=(0,b.useState)(!1),D=S.Subnets?.filter(t=>t.VpcId===e)??[],O=async()=>{try{await w.mutateAsync(e),t({to:`/ec2/describe-vpcs`})}finally{E(!1)}};if(!C?.VpcId)return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=a(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(m,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsxs)(c,{onClick:()=>E(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(s,{className:`size-4`}),`Delete`]}),(0,x.jsx)(y,{state:C.State})]}),subtitle:`VPC Details`,title:k?`${C.VpcId} (${k})`:C.VpcId}),(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`VPC Information`}),(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`VPC ID`,value:C.VpcId}),(0,x.jsx)(v,{label:`State`,value:C.State}),(0,x.jsx)(v,{label:`CIDR Block`,value:C.CidrBlock}),(0,x.jsx)(v,{label:`Is Default`,value:C.IsDefault?`Yes`:`No`}),(0,x.jsx)(v,{label:`DHCP Options ID`,value:C.DhcpOptionsId}),(0,x.jsx)(v,{label:`Instance Tenancy`,value:C.InstanceTenancy}),(0,x.jsx)(v,{label:`Owner ID`,value:C.OwnerId})]})]}),D.length>0&&(0,x.jsxs)(_,{children:[(0,x.jsxs)(_.Header,{children:[`Subnets (`,D.length,`)`]}),D.map(e=>e.SubnetId?(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`Subnet ID`,value:(0,x.jsx)(i,{className:`text-primary hover:underline`,params:{id:e.SubnetId},to:`/ec2/describe-subnets/$id`,children:e.SubnetId})}),(0,x.jsx)(v,{label:`CIDR Block`,value:e.CidrBlock}),(0,x.jsx)(v,{label:`Availability Zone`,value:e.AvailabilityZone}),(0,x.jsx)(v,{label:`State`,value:e.State})]},e.SubnetId):null)]})]}),(0,x.jsx)(g,{description:`Are you sure you want to delete the VPC "${C.VpcId}"? This action cannot be undone. The VPC must have no associated subnets or internet gateways.`,isPending:w.isPending,onConfirm:O,onOpenChange:E,open:T,title:`Delete VPC`})]})}export{S as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id17.js b/spinifex/services/spinifexui/frontend/dist/assets/_id17.js index 30d4ca853..aa45cf5d8 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id17.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id17.js @@ -1,4 +1,4 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{ni as a}from"./awsClient.js";import{Bt as o,Vt as s}from"./auth.js";import{t as c}from"./button.js";import{a as l,c as u,l as d,o as f,r as p,s as m,t as h}from"./ecr.js";import{D as g,E as _,O as v,T as y,_ as b}from"./index.js";import{t as x}from"./page-heading.js";import{a as S,i as C,l as w,n as T,o as E,r as D,s as O,t as k}from"./alert-dialog.js";import{i as A,n as j,r as M,t as N}from"./tabs.js";import{t as P}from"./badge.js";import{n as F}from"./json.js";import{t as ee}from"./json-editor.js";var I=r(),L=t(n(),1),R=e(),z=`{ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{ni as a}from"./awsClient.js";import{Bt as o,Vt as s}from"./auth.js";import{t as c}from"./button.js";import{a as l,c as u,l as d,o as f,r as p,s as m,t as h}from"./ecr.js";import{A as g,D as _,O as v,k as y,y as b}from"./index.js";import{t as x}from"./page-heading.js";import{a as S,i as C,l as w,n as T,o as E,r as D,s as O,t as k}from"./alert-dialog.js";import{i as A,n as j,r as M,t as N}from"./tabs.js";import{t as P}from"./badge.js";import{n as F}from"./json.js";import{t as ee}from"./json-editor.js";var I=r(),L=t(n(),1),R=e(),z=`{ "rules": [ { "rulePriority": 1, @@ -12,6 +12,6 @@ import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}fro "action": { "type": "expire" } } ] -}`;function B(e){let t=(0,I.c)(57),{repositoryName:n}=e,r;t[0]===n?r=t[1]:(r=y(n),t[0]=n,t[1]=r);let{data:a}=i(r),o=u(),s=p(),l=f(),[d,m]=(0,L.useState)(a??``),h,g;t[2]===a?(h=t[3],g=t[4]):(h=()=>{m(a??``)},g=[a],t[2]=a,t[3]=h,t[4]=g),(0,L.useEffect)(h,g);let _;t[5]!==d||t[6]!==o||t[7]!==n?(_=async function(){try{await o.mutateAsync({repositoryName:n,lifecyclePolicyText:d})}catch{}},t[5]=d,t[6]=o,t[7]=n,t[8]=_):_=t[8];let v=_,b;t[9]!==s||t[10]!==n?(b=async function(){try{await s.mutateAsync(n)}catch{}},t[9]=s,t[10]=n,t[11]=b):b=t[11];let x=b,S;t[12]!==l||t[13]!==n?(S=async function(){try{await l.mutateAsync(n)}catch{}},t[12]=l,t[13]=n,t[14]=S):S=t[14];let C=S,w;t[15]===d?w=t[16]:(w=d.trim(),t[15]=d,t[16]=w);let T=w,E;t[17]!==d||t[18]!==T.length?(E=T.length>0&&!F(d),t[17]=d,t[18]=T.length,t[19]=E):E=t[19];let D=E,O=o.error??s.error??l.error,k;t[20]===l.data?.previewResults?k=t[21]:(k=l.data?.previewResults??[],t[20]=l.data?.previewResults,t[21]=k);let A=k,j;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,R.jsx)(`h2`,{className:`text-sm font-medium`,children:`Lifecycle policy`}),t[22]=j):j=t[22];let M=s.isPending||!a,N=s.isPending?`Deleting…`:`Delete`,P;t[23]!==x||t[24]!==M||t[25]!==N?(P=(0,R.jsx)(c,{disabled:M,onClick:x,size:`sm`,variant:`destructive`,children:N}),t[23]=x,t[24]=M,t[25]=N,t[26]=P):P=t[26];let B=l.isPending||!a,te=l.isPending?`Previewing…`:`Preview`,H;t[27]!==C||t[28]!==B||t[29]!==te?(H=(0,R.jsx)(c,{disabled:B,onClick:C,size:`sm`,variant:`outline`,children:te}),t[27]=C,t[28]=B,t[29]=te,t[30]=H):H=t[30];let U=o.isPending||T.length===0||D,W=o.isPending?`Saving…`:`Save`,G;t[31]!==v||t[32]!==U||t[33]!==W?(G=(0,R.jsx)(c,{disabled:U,onClick:v,size:`sm`,children:W}),t[31]=v,t[32]=U,t[33]=W,t[34]=G):G=t[34];let K;t[35]!==P||t[36]!==H||t[37]!==G?(K=(0,R.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[j,(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[P,H,G]})]}),t[35]=P,t[36]=H,t[37]=G,t[38]=K):K=t[38];let q;t[39]!==d||t[40]!==D?(q=(0,R.jsx)(ee,{className:`text-xs`,error:D,onChange:m,placeholder:z,rows:14,value:d}),t[39]=d,t[40]=D,t[41]=q):q=t[41];let J;t[42]===D?J=t[43]:(J=D&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:`Lifecycle policy must be valid JSON.`}),t[42]=D,t[43]=J);let Y;t[44]===O?Y=t[45]:(Y=O&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:O.message}),t[44]=O,t[45]=Y);let X;t[46]!==K||t[47]!==q||t[48]!==J||t[49]!==Y?(X=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[K,q,J,Y]}),t[46]=K,t[47]=q,t[48]=J,t[49]=Y,t[50]=X):X=t[50];let Z;t[51]!==l.isSuccess||t[52]!==A?(Z=l.isSuccess&&(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[(0,R.jsxs)(`h3`,{className:`mb-2 text-sm font-medium`,children:[`Preview: `,A.length,` image`,A.length===1?``:`s`,` would expire`]}),A.length>0?(0,R.jsx)(`div`,{className:`overflow-x-auto rounded-lg border`,children:(0,R.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Tags`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Digest`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pushed`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Rule`})]})}),(0,R.jsx)(`tbody`,{children:A.map(V)})]})}):(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:`No images match this policy.`})]}),t[51]=l.isSuccess,t[52]=A,t[53]=Z):Z=t[53];let Q;return t[54]!==X||t[55]!==Z?(Q=(0,R.jsxs)(`div`,{className:`space-y-4`,children:[X,Z]}),t[54]=X,t[55]=Z,t[56]=Q):Q=t[56],Q}function V(e){return(0,R.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,R.jsx)(`td`,{className:`px-4 py-2`,children:e.imageTags&&e.imageTags.length>0?e.imageTags.join(`, `):``}),(0,R.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:[e.imageDigest?.slice(0,19),`…`]}),(0,R.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:o(e.imagePushedAt)}),(0,R.jsx)(`td`,{className:`px-4 py-2`,children:e.appliedRulePriority})]},e.imageDigest)}function te(e){let t=(0,I.c)(41),{repositoryName:n}=e,r;t[0]===n?r=t[1]:(r=v(n),t[0]=n,t[1]=r);let{data:a}=i(r),o=d(),s=l(),[u,f]=(0,L.useState)(a??``),p,m;t[2]===a?(p=t[3],m=t[4]):(p=()=>{f(a??``)},m=[a],t[2]=a,t[3]=p,t[4]=m),(0,L.useEffect)(p,m);let h;t[5]!==u||t[6]!==n||t[7]!==o?(h=async function(){try{await o.mutateAsync({repositoryName:n,policyText:u})}catch{}},t[5]=u,t[6]=n,t[7]=o,t[8]=h):h=t[8];let g=h,_;t[9]!==s||t[10]!==n?(_=async function(){try{await s.mutateAsync(n)}catch{}},t[9]=s,t[10]=n,t[11]=_):_=t[11];let y=_,b;t[12]===u?b=t[13]:(b=u.trim(),t[12]=u,t[13]=b);let x=b,S;t[14]!==u||t[15]!==x.length?(S=x.length>0&&!F(u),t[14]=u,t[15]=x.length,t[16]=S):S=t[16];let C=S,w=o.error??s.error,T;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,R.jsx)(`h2`,{className:`text-sm font-medium`,children:`Repository policy`}),t[17]=T):T=t[17];let E=s.isPending||!a,D=s.isPending?`Deleting…`:`Delete`,O;t[18]!==y||t[19]!==D||t[20]!==E?(O=(0,R.jsx)(c,{disabled:E,onClick:y,size:`sm`,variant:`destructive`,children:D}),t[18]=y,t[19]=D,t[20]=E,t[21]=O):O=t[21];let k=o.isPending||x.length===0||C,A=o.isPending?`Saving…`:`Save`,j;t[22]!==g||t[23]!==k||t[24]!==A?(j=(0,R.jsx)(c,{disabled:k,onClick:g,size:`sm`,children:A}),t[22]=g,t[23]=k,t[24]=A,t[25]=j):j=t[25];let M;t[26]!==O||t[27]!==j?(M=(0,R.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[T,(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[O,j]})]}),t[26]=O,t[27]=j,t[28]=M):M=t[28];let N;t[29]!==u||t[30]!==C?(N=(0,R.jsx)(ee,{className:`text-xs`,error:C,onChange:f,placeholder:`No policy attached. Paste an IAM policy document to set one.`,rows:10,value:u}),t[29]=u,t[30]=C,t[31]=N):N=t[31];let P;t[32]===C?P=t[33]:(P=C&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:`Policy must be valid JSON.`}),t[32]=C,t[33]=P);let z;t[34]===w?z=t[35]:(z=w&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:w.message}),t[34]=w,t[35]=z);let B;return t[36]!==M||t[37]!==N||t[38]!==P||t[39]!==z?(B=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[M,N,P,z]}),t[36]=M,t[37]=N,t[38]=P,t[39]=z,t[40]=B):B=t[40],B}var H=`ap-southeast-2`;function U(e){if(!e)return``;let t=e.indexOf(`/`);return t===-1?e:e.slice(0,t)}function W(e){let t=(0,I.c)(18),{repositoryName:n,repositoryUri:r}=e,[i,a]=(0,L.useState)(!1),o;t[0]===r?o=t[1]:(o=U(r),t[0]=r,t[1]=o);let s=o,l=r??`${s}/${n}`,u=`aws ecr get-login-password --region ${H} | docker login --username AWS --password-stdin ${s}`,d=`docker build -t ${n} .`,f=`docker tag ${n}:latest ${l}:latest`,p=`docker push ${l}:latest`,m;t[2]!==u||t[3]!==d||t[4]!==f||t[5]!==p?(m=[u,d,f,p],t[2]=u,t[3]=d,t[4]=f,t[5]=p,t[6]=m):m=t[6];let h=m,g;t[7]===h?g=t[8]:(g=async function(){await navigator.clipboard.writeText(h.join(` +}`;function B(e){let t=(0,I.c)(57),{repositoryName:n}=e,r;t[0]===n?r=t[1]:(r=_(n),t[0]=n,t[1]=r);let{data:a}=i(r),o=u(),s=p(),l=f(),[d,m]=(0,L.useState)(a??``),h,g;t[2]===a?(h=t[3],g=t[4]):(h=()=>{m(a??``)},g=[a],t[2]=a,t[3]=h,t[4]=g),(0,L.useEffect)(h,g);let v;t[5]!==d||t[6]!==o||t[7]!==n?(v=async function(){try{await o.mutateAsync({repositoryName:n,lifecyclePolicyText:d})}catch{}},t[5]=d,t[6]=o,t[7]=n,t[8]=v):v=t[8];let y=v,b;t[9]!==s||t[10]!==n?(b=async function(){try{await s.mutateAsync(n)}catch{}},t[9]=s,t[10]=n,t[11]=b):b=t[11];let x=b,S;t[12]!==l||t[13]!==n?(S=async function(){try{await l.mutateAsync(n)}catch{}},t[12]=l,t[13]=n,t[14]=S):S=t[14];let C=S,w;t[15]===d?w=t[16]:(w=d.trim(),t[15]=d,t[16]=w);let T=w,E;t[17]!==d||t[18]!==T.length?(E=T.length>0&&!F(d),t[17]=d,t[18]=T.length,t[19]=E):E=t[19];let D=E,O=o.error??s.error??l.error,k;t[20]===l.data?.previewResults?k=t[21]:(k=l.data?.previewResults??[],t[20]=l.data?.previewResults,t[21]=k);let A=k,j;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,R.jsx)(`h2`,{className:`text-sm font-medium`,children:`Lifecycle policy`}),t[22]=j):j=t[22];let M=s.isPending||!a,N=s.isPending?`Deleting…`:`Delete`,P;t[23]!==x||t[24]!==M||t[25]!==N?(P=(0,R.jsx)(c,{disabled:M,onClick:x,size:`sm`,variant:`destructive`,children:N}),t[23]=x,t[24]=M,t[25]=N,t[26]=P):P=t[26];let B=l.isPending||!a,te=l.isPending?`Previewing…`:`Preview`,H;t[27]!==C||t[28]!==B||t[29]!==te?(H=(0,R.jsx)(c,{disabled:B,onClick:C,size:`sm`,variant:`outline`,children:te}),t[27]=C,t[28]=B,t[29]=te,t[30]=H):H=t[30];let U=o.isPending||T.length===0||D,W=o.isPending?`Saving…`:`Save`,G;t[31]!==y||t[32]!==U||t[33]!==W?(G=(0,R.jsx)(c,{disabled:U,onClick:y,size:`sm`,children:W}),t[31]=y,t[32]=U,t[33]=W,t[34]=G):G=t[34];let K;t[35]!==P||t[36]!==H||t[37]!==G?(K=(0,R.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[j,(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[P,H,G]})]}),t[35]=P,t[36]=H,t[37]=G,t[38]=K):K=t[38];let q;t[39]!==d||t[40]!==D?(q=(0,R.jsx)(ee,{className:`text-xs`,error:D,onChange:m,placeholder:z,rows:14,value:d}),t[39]=d,t[40]=D,t[41]=q):q=t[41];let J;t[42]===D?J=t[43]:(J=D&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:`Lifecycle policy must be valid JSON.`}),t[42]=D,t[43]=J);let Y;t[44]===O?Y=t[45]:(Y=O&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:O.message}),t[44]=O,t[45]=Y);let X;t[46]!==K||t[47]!==q||t[48]!==J||t[49]!==Y?(X=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[K,q,J,Y]}),t[46]=K,t[47]=q,t[48]=J,t[49]=Y,t[50]=X):X=t[50];let Z;t[51]!==l.isSuccess||t[52]!==A?(Z=l.isSuccess&&(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[(0,R.jsxs)(`h3`,{className:`mb-2 text-sm font-medium`,children:[`Preview: `,A.length,` image`,A.length===1?``:`s`,` would expire`]}),A.length>0?(0,R.jsx)(`div`,{className:`overflow-x-auto rounded-lg border`,children:(0,R.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Tags`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Digest`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pushed`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Rule`})]})}),(0,R.jsx)(`tbody`,{children:A.map(V)})]})}):(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:`No images match this policy.`})]}),t[51]=l.isSuccess,t[52]=A,t[53]=Z):Z=t[53];let Q;return t[54]!==X||t[55]!==Z?(Q=(0,R.jsxs)(`div`,{className:`space-y-4`,children:[X,Z]}),t[54]=X,t[55]=Z,t[56]=Q):Q=t[56],Q}function V(e){return(0,R.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,R.jsx)(`td`,{className:`px-4 py-2`,children:e.imageTags&&e.imageTags.length>0?e.imageTags.join(`, `):``}),(0,R.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:[e.imageDigest?.slice(0,19),`…`]}),(0,R.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:o(e.imagePushedAt)}),(0,R.jsx)(`td`,{className:`px-4 py-2`,children:e.appliedRulePriority})]},e.imageDigest)}function te(e){let t=(0,I.c)(41),{repositoryName:n}=e,r;t[0]===n?r=t[1]:(r=g(n),t[0]=n,t[1]=r);let{data:a}=i(r),o=d(),s=l(),[u,f]=(0,L.useState)(a??``),p,m;t[2]===a?(p=t[3],m=t[4]):(p=()=>{f(a??``)},m=[a],t[2]=a,t[3]=p,t[4]=m),(0,L.useEffect)(p,m);let h;t[5]!==u||t[6]!==n||t[7]!==o?(h=async function(){try{await o.mutateAsync({repositoryName:n,policyText:u})}catch{}},t[5]=u,t[6]=n,t[7]=o,t[8]=h):h=t[8];let _=h,v;t[9]!==s||t[10]!==n?(v=async function(){try{await s.mutateAsync(n)}catch{}},t[9]=s,t[10]=n,t[11]=v):v=t[11];let y=v,b;t[12]===u?b=t[13]:(b=u.trim(),t[12]=u,t[13]=b);let x=b,S;t[14]!==u||t[15]!==x.length?(S=x.length>0&&!F(u),t[14]=u,t[15]=x.length,t[16]=S):S=t[16];let C=S,w=o.error??s.error,T;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,R.jsx)(`h2`,{className:`text-sm font-medium`,children:`Repository policy`}),t[17]=T):T=t[17];let E=s.isPending||!a,D=s.isPending?`Deleting…`:`Delete`,O;t[18]!==y||t[19]!==D||t[20]!==E?(O=(0,R.jsx)(c,{disabled:E,onClick:y,size:`sm`,variant:`destructive`,children:D}),t[18]=y,t[19]=D,t[20]=E,t[21]=O):O=t[21];let k=o.isPending||x.length===0||C,A=o.isPending?`Saving…`:`Save`,j;t[22]!==_||t[23]!==k||t[24]!==A?(j=(0,R.jsx)(c,{disabled:k,onClick:_,size:`sm`,children:A}),t[22]=_,t[23]=k,t[24]=A,t[25]=j):j=t[25];let M;t[26]!==O||t[27]!==j?(M=(0,R.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[T,(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[O,j]})]}),t[26]=O,t[27]=j,t[28]=M):M=t[28];let N;t[29]!==u||t[30]!==C?(N=(0,R.jsx)(ee,{className:`text-xs`,error:C,onChange:f,placeholder:`No policy attached. Paste an IAM policy document to set one.`,rows:10,value:u}),t[29]=u,t[30]=C,t[31]=N):N=t[31];let P;t[32]===C?P=t[33]:(P=C&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:`Policy must be valid JSON.`}),t[32]=C,t[33]=P);let z;t[34]===w?z=t[35]:(z=w&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:w.message}),t[34]=w,t[35]=z);let B;return t[36]!==M||t[37]!==N||t[38]!==P||t[39]!==z?(B=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[M,N,P,z]}),t[36]=M,t[37]=N,t[38]=P,t[39]=z,t[40]=B):B=t[40],B}var H=`ap-southeast-2`;function U(e){if(!e)return``;let t=e.indexOf(`/`);return t===-1?e:e.slice(0,t)}function W(e){let t=(0,I.c)(18),{repositoryName:n,repositoryUri:r}=e,[i,a]=(0,L.useState)(!1),o;t[0]===r?o=t[1]:(o=U(r),t[0]=r,t[1]=o);let s=o,l=r??`${s}/${n}`,u=`aws ecr get-login-password --region ${H} | docker login --username AWS --password-stdin ${s}`,d=`docker build -t ${n} .`,f=`docker tag ${n}:latest ${l}:latest`,p=`docker push ${l}:latest`,m;t[2]!==u||t[3]!==d||t[4]!==f||t[5]!==p?(m=[u,d,f,p],t[2]=u,t[3]=d,t[4]=f,t[5]=p,t[6]=m):m=t[6];let h=m,g;t[7]===h?g=t[8]:(g=async function(){await navigator.clipboard.writeText(h.join(` `)),a(!0),setTimeout(()=>a(!1),2e3)},t[7]=h,t[8]=g);let _=g,v;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,R.jsx)(`h2`,{className:`text-sm font-medium`,children:`Push commands`}),t[9]=v):v=t[9];let y=i?`Copied`:`Copy`,b;t[10]!==_||t[11]!==y?(b=(0,R.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[v,(0,R.jsx)(c,{onClick:_,size:`sm`,variant:`outline`,children:y})]}),t[10]=_,t[11]=y,t[12]=b):b=t[12];let x=h.join(` -`),S;t[13]===x?S=t[14]:(S=(0,R.jsx)(`pre`,{className:`overflow-x-auto rounded bg-muted p-3 font-mono text-xs`,children:x}),t[13]=x,t[14]=S);let C;return t[15]!==b||t[16]!==S?(C=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[b,S]}),t[15]=b,t[16]=S,t[17]=C):C=t[17],C}function G(e){let t=(0,I.c)(31),{repositoryName:n,repositoryUri:r,imageTagMutability:i}=e,a=m(),o=i===`IMMUTABLE`,s=o?`MUTABLE`:`IMMUTABLE`,l=o?`Make mutable`:`Make immutable`,u;t[0]!==s||t[1]!==a||t[2]!==n?(u=async function(){try{await a.mutateAsync({repositoryName:n,imageTagMutability:s})}catch{}},t[0]=s,t[1]=a,t[2]=n,t[3]=u):u=t[3];let d=u,f;t[4]!==n||t[5]!==r?(f=(0,R.jsx)(W,{repositoryName:n,repositoryUri:r}),t[4]=n,t[5]=r,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,R.jsx)(`h2`,{className:`text-sm font-medium`,children:`Tag immutability`}),t[7]=p):p=t[7];let h=o?`Tags cannot be overwritten to point at a different image.`:`Tags can be overwritten by a new push.`,g;t[8]===h?g=t[9]:(g=(0,R.jsxs)(`div`,{children:[p,(0,R.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:h})]}),t[8]=h,t[9]=g);let _=o?`default`:`outline`,v=o?`Immutable`:`Mutable`,y;t[10]!==_||t[11]!==v?(y=(0,R.jsx)(P,{variant:_,children:v}),t[10]=_,t[11]=v,t[12]=y):y=t[12];let b;t[13]!==g||t[14]!==y?(b=(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[g,y]}),t[13]=g,t[14]=y,t[15]=b):b=t[15];let x;t[16]===a.error?x=t[17]:(x=a.error&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:a.error.message}),t[16]=a.error,t[17]=x);let S;t[18]===d?S=t[19]:(S=()=>void d(),t[18]=d,t[19]=S);let C=a.isPending?`Saving…`:l,w;t[20]!==a.isPending||t[21]!==S||t[22]!==C?(w=(0,R.jsx)(c,{className:`mt-3`,disabled:a.isPending,onClick:S,size:`sm`,variant:`outline`,children:C}),t[20]=a.isPending,t[21]=S,t[22]=C,t[23]=w):w=t[23];let T;t[24]!==x||t[25]!==w||t[26]!==b?(T=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[b,x,w]}),t[24]=x,t[25]=w,t[26]=b,t[27]=T):T=t[27];let E;return t[28]!==T||t[29]!==f?(E=(0,R.jsxs)(`div`,{className:`space-y-6`,children:[f,T]}),t[28]=T,t[29]=f,t[30]=E):E=t[30],E}function K(){let e=(0,I.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[(0,R.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:`Image scanning`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Vulnerability scanning is not supported by this registry. Pushed images are stored and served without scan findings.`})]}),e[0]=t):t=e[0],t}function q(e){let t=(0,I.c)(57),{repositoryName:n}=e,{data:r}=i(_),l;t[0]===n?l=t[1]:(l=g(n),t[0]=n,t[1]=l);let{data:u}=i(l),d=h(),[f,p]=(0,L.useState)(null),m;t[2]===r.repositories?m=t[3]:(m=r.repositories??[],t[2]=r.repositories,t[3]=m);let v;if(t[4]!==n||t[5]!==m){let e;t[7]===n?e=t[8]:(e=e=>e.repositoryName===n,t[7]=n,t[8]=e),v=m.find(e),t[4]=n,t[5]=m,t[6]=v}else v=t[6];let y=v,b;t[9]===u.imageDetails?b=t[10]:(b=u.imageDetails??[],t[9]=u.imageDetails,t[10]=b);let P=b,F;t[11]!==d||t[12]!==f||t[13]!==n?(F=async function(){if(f)try{await d.mutateAsync({repositoryName:n,imageIds:[{imageDigest:f}]}),p(null)}catch{}},t[11]=d,t[12]=f,t[13]=n,t[14]=F):F=t[14];let ee=F,z=y?.repositoryUri,V;t[15]!==n||t[16]!==z?(V=(0,R.jsx)(x,{subtitle:z,title:n}),t[15]=n,t[16]=z,t[17]=V):V=t[17];let H;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,R.jsx)(`div`,{className:`mb-4`,children:(0,R.jsx)(a,{className:`text-sm text-primary hover:underline`,to:`/ecr/list-repositories`,children:`← Back to repositories`})}),t[18]=H):H=t[18];let U;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,R.jsxs)(j,{children:[(0,R.jsx)(A,{value:`summary`,children:`Summary`}),(0,R.jsx)(A,{value:`images`,children:`Images`}),(0,R.jsx)(A,{value:`lifecycle`,children:`Lifecycle`}),(0,R.jsx)(A,{value:`scan`,children:`Scan`}),(0,R.jsx)(A,{value:`permissions`,children:`Permissions`})]}),t[19]=U):U=t[19];let W=y?.imageTagMutability,q=y?.repositoryUri,J;t[20]!==n||t[21]!==W||t[22]!==q?(J=(0,R.jsx)(M,{value:`summary`,children:(0,R.jsx)(G,{imageTagMutability:W,repositoryName:n,repositoryUri:q})}),t[20]=n,t[21]=W,t[22]=q,t[23]=J):J=t[23];let Y;t[24]===P?Y=t[25]:(Y=(0,R.jsx)(M,{value:`images`,children:P.length>0?(0,R.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,R.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Tags`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Digest`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Size`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pushed`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,R.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,R.jsx)(`tbody`,{children:P.map(e=>{if(!e.imageDigest)return null;let t=e.imageDigest;return(0,R.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,R.jsx)(`td`,{className:`px-4 py-2`,children:e.imageTags&&e.imageTags.length>0?e.imageTags.join(`, `):``}),(0,R.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:[t.slice(0,19),`…`]}),(0,R.jsx)(`td`,{className:`px-4 py-2`,children:s(e.imageSizeInBytes??0)}),(0,R.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:o(e.imagePushedAt)}),(0,R.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,R.jsx)(c,{onClick:()=>p(t),size:`sm`,variant:`destructive`,children:`Delete`})})]},t)})})]})}):(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:`No images pushed yet.`})}),t[24]=P,t[25]=Y);let X;t[26]===n?X=t[27]:(X=(0,R.jsx)(M,{value:`lifecycle`,children:(0,R.jsx)(B,{repositoryName:n})}),t[26]=n,t[27]=X);let Z;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,R.jsx)(M,{value:`scan`,children:(0,R.jsx)(K,{})}),t[28]=Z):Z=t[28];let Q;t[29]===n?Q=t[30]:(Q=(0,R.jsx)(M,{value:`permissions`,children:(0,R.jsx)(te,{repositoryName:n})}),t[29]=n,t[30]=Q);let $;t[31]!==J||t[32]!==Y||t[33]!==X||t[34]!==Q?($=(0,R.jsxs)(N,{defaultValue:`summary`,children:[U,J,Y,X,Z,Q]}),t[31]=J,t[32]=Y,t[33]=X,t[34]=Q,t[35]=$):$=t[35];let ne;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ne=e=>!e&&p(null),t[36]=ne):ne=t[36];let re=f!==null,ie;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,R.jsxs)(O,{children:[(0,R.jsx)(w,{children:`Delete image?`}),(0,R.jsx)(S,{children:`This permanently deletes the image manifest and any tags pointing at it. This cannot be undone.`})]}),t[37]=ie):ie=t[37];let ae;t[38]===d.error?ae=t[39]:(ae=d.error&&(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:d.error.message}),t[38]=d.error,t[39]=ae);let oe;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,R.jsx)(D,{children:`Cancel`}),t[40]=oe):oe=t[40];let se;t[41]===ee?se=t[42]:(se=e=>{e.preventDefault(),ee()},t[41]=ee,t[42]=se);let ce=d.isPending?`Deleting…`:`Delete`,le;t[43]!==d.isPending||t[44]!==se||t[45]!==ce?(le=(0,R.jsxs)(E,{children:[oe,(0,R.jsx)(T,{disabled:d.isPending,onClick:se,children:ce})]}),t[43]=d.isPending,t[44]=se,t[45]=ce,t[46]=le):le=t[46];let ue;t[47]!==ae||t[48]!==le?(ue=(0,R.jsxs)(C,{children:[ie,ae,le]}),t[47]=ae,t[48]=le,t[49]=ue):ue=t[49];let de;t[50]!==re||t[51]!==ue?(de=(0,R.jsx)(k,{onOpenChange:ne,open:re,children:ue}),t[50]=re,t[51]=ue,t[52]=de):de=t[52];let fe;return t[53]!==$||t[54]!==de||t[55]!==V?(fe=(0,R.jsxs)(R.Fragment,{children:[V,H,$,de]}),t[53]=$,t[54]=de,t[55]=V,t[56]=fe):fe=t[56],fe}function J(){let e=(0,I.c)(2),{id:t}=b.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,R.jsx)(q,{repositoryName:n}),e[0]=n,e[1]=r),r}export{J as component}; \ No newline at end of file +`),S;t[13]===x?S=t[14]:(S=(0,R.jsx)(`pre`,{className:`overflow-x-auto rounded bg-muted p-3 font-mono text-xs`,children:x}),t[13]=x,t[14]=S);let C;return t[15]!==b||t[16]!==S?(C=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[b,S]}),t[15]=b,t[16]=S,t[17]=C):C=t[17],C}function G(e){let t=(0,I.c)(31),{repositoryName:n,repositoryUri:r,imageTagMutability:i}=e,a=m(),o=i===`IMMUTABLE`,s=o?`MUTABLE`:`IMMUTABLE`,l=o?`Make mutable`:`Make immutable`,u;t[0]!==s||t[1]!==a||t[2]!==n?(u=async function(){try{await a.mutateAsync({repositoryName:n,imageTagMutability:s})}catch{}},t[0]=s,t[1]=a,t[2]=n,t[3]=u):u=t[3];let d=u,f;t[4]!==n||t[5]!==r?(f=(0,R.jsx)(W,{repositoryName:n,repositoryUri:r}),t[4]=n,t[5]=r,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,R.jsx)(`h2`,{className:`text-sm font-medium`,children:`Tag immutability`}),t[7]=p):p=t[7];let h=o?`Tags cannot be overwritten to point at a different image.`:`Tags can be overwritten by a new push.`,g;t[8]===h?g=t[9]:(g=(0,R.jsxs)(`div`,{children:[p,(0,R.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:h})]}),t[8]=h,t[9]=g);let _=o?`default`:`outline`,v=o?`Immutable`:`Mutable`,y;t[10]!==_||t[11]!==v?(y=(0,R.jsx)(P,{variant:_,children:v}),t[10]=_,t[11]=v,t[12]=y):y=t[12];let b;t[13]!==g||t[14]!==y?(b=(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[g,y]}),t[13]=g,t[14]=y,t[15]=b):b=t[15];let x;t[16]===a.error?x=t[17]:(x=a.error&&(0,R.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:a.error.message}),t[16]=a.error,t[17]=x);let S;t[18]===d?S=t[19]:(S=()=>void d(),t[18]=d,t[19]=S);let C=a.isPending?`Saving…`:l,w;t[20]!==a.isPending||t[21]!==S||t[22]!==C?(w=(0,R.jsx)(c,{className:`mt-3`,disabled:a.isPending,onClick:S,size:`sm`,variant:`outline`,children:C}),t[20]=a.isPending,t[21]=S,t[22]=C,t[23]=w):w=t[23];let T;t[24]!==x||t[25]!==w||t[26]!==b?(T=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[b,x,w]}),t[24]=x,t[25]=w,t[26]=b,t[27]=T):T=t[27];let E;return t[28]!==T||t[29]!==f?(E=(0,R.jsxs)(`div`,{className:`space-y-6`,children:[f,T]}),t[28]=T,t[29]=f,t[30]=E):E=t[30],E}function K(){let e=(0,I.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,R.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[(0,R.jsx)(`h2`,{className:`mb-2 text-sm font-medium`,children:`Image scanning`}),(0,R.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Vulnerability scanning is not supported by this registry. Pushed images are stored and served without scan findings.`})]}),e[0]=t):t=e[0],t}function q(e){let t=(0,I.c)(57),{repositoryName:n}=e,{data:r}=i(v),l;t[0]===n?l=t[1]:(l=y(n),t[0]=n,t[1]=l);let{data:u}=i(l),d=h(),[f,p]=(0,L.useState)(null),m;t[2]===r.repositories?m=t[3]:(m=r.repositories??[],t[2]=r.repositories,t[3]=m);let g;if(t[4]!==n||t[5]!==m){let e;t[7]===n?e=t[8]:(e=e=>e.repositoryName===n,t[7]=n,t[8]=e),g=m.find(e),t[4]=n,t[5]=m,t[6]=g}else g=t[6];let _=g,b;t[9]===u.imageDetails?b=t[10]:(b=u.imageDetails??[],t[9]=u.imageDetails,t[10]=b);let P=b,F;t[11]!==d||t[12]!==f||t[13]!==n?(F=async function(){if(f)try{await d.mutateAsync({repositoryName:n,imageIds:[{imageDigest:f}]}),p(null)}catch{}},t[11]=d,t[12]=f,t[13]=n,t[14]=F):F=t[14];let ee=F,z=_?.repositoryUri,V;t[15]!==n||t[16]!==z?(V=(0,R.jsx)(x,{subtitle:z,title:n}),t[15]=n,t[16]=z,t[17]=V):V=t[17];let H;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,R.jsx)(`div`,{className:`mb-4`,children:(0,R.jsx)(a,{className:`text-sm text-primary hover:underline`,to:`/ecr/list-repositories`,children:`← Back to repositories`})}),t[18]=H):H=t[18];let U;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,R.jsxs)(j,{children:[(0,R.jsx)(A,{value:`summary`,children:`Summary`}),(0,R.jsx)(A,{value:`images`,children:`Images`}),(0,R.jsx)(A,{value:`lifecycle`,children:`Lifecycle`}),(0,R.jsx)(A,{value:`scan`,children:`Scan`}),(0,R.jsx)(A,{value:`permissions`,children:`Permissions`})]}),t[19]=U):U=t[19];let W=_?.imageTagMutability,q=_?.repositoryUri,J;t[20]!==n||t[21]!==W||t[22]!==q?(J=(0,R.jsx)(M,{value:`summary`,children:(0,R.jsx)(G,{imageTagMutability:W,repositoryName:n,repositoryUri:q})}),t[20]=n,t[21]=W,t[22]=q,t[23]=J):J=t[23];let Y;t[24]===P?Y=t[25]:(Y=(0,R.jsx)(M,{value:`images`,children:P.length>0?(0,R.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,R.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Tags`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Digest`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Size`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pushed`}),(0,R.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,R.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,R.jsx)(`tbody`,{children:P.map(e=>{if(!e.imageDigest)return null;let t=e.imageDigest;return(0,R.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,R.jsx)(`td`,{className:`px-4 py-2`,children:e.imageTags&&e.imageTags.length>0?e.imageTags.join(`, `):``}),(0,R.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:[t.slice(0,19),`…`]}),(0,R.jsx)(`td`,{className:`px-4 py-2`,children:s(e.imageSizeInBytes??0)}),(0,R.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:o(e.imagePushedAt)}),(0,R.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,R.jsx)(c,{onClick:()=>p(t),size:`sm`,variant:`destructive`,children:`Delete`})})]},t)})})]})}):(0,R.jsx)(`p`,{className:`text-muted-foreground`,children:`No images pushed yet.`})}),t[24]=P,t[25]=Y);let X;t[26]===n?X=t[27]:(X=(0,R.jsx)(M,{value:`lifecycle`,children:(0,R.jsx)(B,{repositoryName:n})}),t[26]=n,t[27]=X);let Z;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,R.jsx)(M,{value:`scan`,children:(0,R.jsx)(K,{})}),t[28]=Z):Z=t[28];let Q;t[29]===n?Q=t[30]:(Q=(0,R.jsx)(M,{value:`permissions`,children:(0,R.jsx)(te,{repositoryName:n})}),t[29]=n,t[30]=Q);let $;t[31]!==J||t[32]!==Y||t[33]!==X||t[34]!==Q?($=(0,R.jsxs)(N,{defaultValue:`summary`,children:[U,J,Y,X,Z,Q]}),t[31]=J,t[32]=Y,t[33]=X,t[34]=Q,t[35]=$):$=t[35];let ne;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ne=e=>!e&&p(null),t[36]=ne):ne=t[36];let re=f!==null,ie;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,R.jsxs)(O,{children:[(0,R.jsx)(w,{children:`Delete image?`}),(0,R.jsx)(S,{children:`This permanently deletes the image manifest and any tags pointing at it. This cannot be undone.`})]}),t[37]=ie):ie=t[37];let ae;t[38]===d.error?ae=t[39]:(ae=d.error&&(0,R.jsx)(`p`,{className:`text-sm text-destructive`,children:d.error.message}),t[38]=d.error,t[39]=ae);let oe;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,R.jsx)(D,{children:`Cancel`}),t[40]=oe):oe=t[40];let se;t[41]===ee?se=t[42]:(se=e=>{e.preventDefault(),ee()},t[41]=ee,t[42]=se);let ce=d.isPending?`Deleting…`:`Delete`,le;t[43]!==d.isPending||t[44]!==se||t[45]!==ce?(le=(0,R.jsxs)(E,{children:[oe,(0,R.jsx)(T,{disabled:d.isPending,onClick:se,children:ce})]}),t[43]=d.isPending,t[44]=se,t[45]=ce,t[46]=le):le=t[46];let ue;t[47]!==ae||t[48]!==le?(ue=(0,R.jsxs)(C,{children:[ie,ae,le]}),t[47]=ae,t[48]=le,t[49]=ue):ue=t[49];let de;t[50]!==re||t[51]!==ue?(de=(0,R.jsx)(k,{onOpenChange:ne,open:re,children:ue}),t[50]=re,t[51]=ue,t[52]=de):de=t[52];let fe;return t[53]!==$||t[54]!==de||t[55]!==V?(fe=(0,R.jsxs)(R.Fragment,{children:[V,H,$,de]}),t[53]=$,t[54]=de,t[55]=V,t[56]=fe):fe=t[56],fe}function J(){let e=(0,I.c)(2),{id:t}=b.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,R.jsx)(q,{repositoryName:n}),e[0]=n,e[1]=r),r}export{J as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id2.js b/spinifex/services/spinifexui/frontend/dist/assets/_id2.js index 71d929da7..c7099547e 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id2.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./back-link.js";import{Ot as i,n as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{n as c}from"./system-managed.js";import{t as l}from"./ami-details.js";var u=t(),d=e();function f(){let e=(0,u.c)(14),{id:t}=a.useParams(),f;e[0]===t?f=e[1]:(f=i(t),e[0]=t,e[1]=f);let{data:p}=n(f),m=p?.Images?.[0];if(!m?.ImageId||c(m)){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r,{to:`/ec2/describe-images`,children:`Back to images`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]}),e[2]=t):t=e[2],t}let h;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(r,{to:`/ec2/describe-images`,children:`Back to images`}),e[3]=h):h=e[3];let g;e[4]===m.State?g=e[5]:(g=(0,d.jsx)(s,{state:m.State}),e[4]=m.State,e[5]=g);let _;e[6]!==m.ImageId||e[7]!==g?(_=(0,d.jsx)(o,{actions:g,subtitle:`Image Details`,title:m.ImageId}),e[6]=m.ImageId,e[7]=g,e[8]=_):_=e[8];let v;e[9]===m?v=e[10]:(v=(0,d.jsx)(l,{image:m,showExtendedDetails:!0}),e[9]=m,e[10]=v);let y;return e[11]!==_||e[12]!==v?(y=(0,d.jsxs)(d.Fragment,{children:[h,(0,d.jsxs)(`div`,{className:`space-y-6`,children:[_,v]})]}),e[11]=_,e[12]=v,e[13]=y):y=e[13],y}export{f as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./back-link.js";import{At as i,i as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{r as c}from"./system-managed.js";import{t as l}from"./ami-details.js";var u=t(),d=e();function f(){let e=(0,u.c)(14),{id:t}=a.useParams(),f;e[0]===t?f=e[1]:(f=i(t),e[0]=t,e[1]=f);let{data:p}=n(f),m=p?.Images?.[0];if(!m?.ImageId||c(m)){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r,{to:`/ec2/describe-images`,children:`Back to images`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]}),e[2]=t):t=e[2],t}let h;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(r,{to:`/ec2/describe-images`,children:`Back to images`}),e[3]=h):h=e[3];let g;e[4]===m.State?g=e[5]:(g=(0,d.jsx)(s,{state:m.State}),e[4]=m.State,e[5]=g);let _;e[6]!==m.ImageId||e[7]!==g?(_=(0,d.jsx)(o,{actions:g,subtitle:`Image Details`,title:m.ImageId}),e[6]=m.ImageId,e[7]=g,e[8]=_):_=e[8];let v;e[9]===m?v=e[10]:(v=(0,d.jsx)(l,{image:m,showExtendedDetails:!0}),e[9]=m,e[10]=v);let y;return e[11]!==_||e[12]!==v?(y=(0,d.jsxs)(d.Fragment,{children:[h,(0,d.jsxs)(`div`,{className:`space-y-6`,children:[_,v]})]}),e[11]=_,e[12]=v,e[13]=y):y=e[13],y}export{f as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id3.js b/spinifex/services/spinifexui/frontend/dist/assets/_id3.js index bdc874c4d..da2422bf8 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id3.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id3.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{ni as o}from"./awsClient.js";import{Bt as s,Ht as c}from"./auth.js";import{t as l}from"./back-link.js";import{c as u,i as d,n as f,s as p,t as m}from"./select.js";import{t as h}from"./rotate-cw.js";import{t as g}from"./trash-2.js";import{t as _}from"./button.js";import{B as v,H as y,J as b,R as x,W as S,X as C,Y as w,r as T,u as E}from"./ec2.js";import{At as D,Dt as O,Ot as k,er as A,jt as j,mt as ee,qr as M,r as te,tn as ne}from"./index.js";import{t as N}from"./error-banner.js";import{t as re}from"./page-heading.js";import{a as P,t as F}from"./field.js";import{a as I,i as L,l as R,n as z,o as B,r as V,s as H,t as U}from"./alert-dialog.js";import{t as W}from"./delete-confirmation-dialog.js";import{n as G,t as K}from"./detail-row.js";import{t as ie}from"./state-badge.js";import{t as ae}from"./ami-details.js";import{r as oe}from"./admin.js";import{t as q}from"./textarea.js";var se=M(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),ce=M(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),J=M(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),le=M(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),ue=M(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Y=t(n(),1),X=e();function de({instanceId:e,open:t,onOpenChange:n}){let r=E(),[i,a]=(0,Y.useState)(``),[o,s]=(0,Y.useState)(``),[c,l]=(0,Y.useState)(null);function u(e){e||(a(``),s(``),l(null)),n(e)}async function d(){try{l((await r.mutateAsync({instanceId:e,name:i,description:o||void 0})).ImageId??null),a(``),s(``)}catch{}}return(0,X.jsx)(U,{onOpenChange:u,open:t,children:(0,X.jsxs)(L,{children:[(0,X.jsxs)(H,{children:[(0,X.jsx)(R,{children:c?`Image Created`:`Create Image (AMI)`}),(0,X.jsx)(I,{children:c?`Image "${c}" was created successfully.`:`Create an AMI from instance "${e}".`})]}),!c&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(F,{children:[(0,X.jsx)(P,{children:(0,X.jsx)(`label`,{htmlFor:`imageName`,children:`Name`})}),(0,X.jsx)(A,{id:`imageName`,onChange:e=>a(e.target.value),placeholder:`my-image`,value:i})]}),(0,X.jsxs)(F,{children:[(0,X.jsx)(P,{children:(0,X.jsx)(`label`,{htmlFor:`imageDescription`,children:`Description`})}),(0,X.jsx)(q,{id:`imageDescription`,onChange:e=>s(e.target.value),placeholder:`Optional description`,rows:2,value:o})]})]}),(0,X.jsxs)(B,{children:[(0,X.jsx)(V,{children:c?`Close`:`Cancel`}),!c&&(0,X.jsx)(z,{disabled:r.isPending||!i.trim(),onClick:d,children:r.isPending?`Creating…`:`Create Image`})]})]})})}var Z=r();function fe(e){let t=(0,Z.c)(31),{instanceId:n}=e,r;t[0]===n?r=t[1]:(r=O(n),t[0]=n,t[1]=r);let{data:a}=i(r),{data:s}=i(ee),c=T(),l=x(),[d,h]=(0,Y.useState)(``),g;t[2]===a?.IamInstanceProfileAssociations?g=t[3]:(g=a?.IamInstanceProfileAssociations?.find(Q),t[2]=a?.IamInstanceProfileAssociations,t[3]=g);let v=g,y;t[4]===s?.InstanceProfiles?y=t[5]:(y=s?.InstanceProfiles??[],t[4]=s?.InstanceProfiles,t[5]=y);let b=y,S;t[6]!==c||t[7]!==n||t[8]!==d?(S=async()=>{d&&(await c.mutateAsync({instanceId:n,instanceProfileName:d}),h(``))},t[6]=c,t[7]=n,t[8]=d,t[9]=S):S=t[9];let C=S,w;t[10]!==v||t[11]!==l||t[12]!==n?(w=async()=>{v?.AssociationId&&await l.mutateAsync({associationId:v.AssociationId,instanceId:n})},t[10]=v,t[11]=l,t[12]=n,t[13]=w):w=t[13];let E=w,D;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,X.jsx)(G.Header,{children:`IAM Role`}),t[14]=D):D=t[14];let k;t[15]===c.error?k=t[16]:(k=c.error&&(0,X.jsx)(`div`,{className:`col-span-2`,children:(0,X.jsx)(N,{error:c.error,msg:`Failed to associate instance profile`})}),t[15]=c.error,t[16]=k);let A;t[17]===l.error?A=t[18]:(A=l.error&&(0,X.jsx)(`div`,{className:`col-span-2`,children:(0,X.jsx)(N,{error:l.error,msg:`Failed to disassociate instance profile`})}),t[17]=l.error,t[18]=A);let j;t[19]!==c.isPending||t[20]!==v||t[21]!==l.isPending||t[22]!==C||t[23]!==E||t[24]!==b||t[25]!==d?(j=v?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(K,{label:`Instance Profile ARN`,value:v.IamInstanceProfile?.Arn}),(0,X.jsx)(K,{label:`State`,value:(0,X.jsx)(ie,{state:v.State})}),(0,X.jsx)(`div`,{className:`col-span-2 flex justify-end`,children:(0,X.jsx)(_,{disabled:l.isPending,onClick:E,size:`sm`,variant:`destructive`,children:l.isPending?`Detaching…`:`Detach`})})]}):(0,X.jsxs)(`div`,{className:`col-span-2 space-y-3`,children:[(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No instance profile is associated. Associate one to flow role credentials to this instance via IMDS.`}),b.length>0?(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsxs)(m,{onValueChange:e=>h(e??``),value:d,children:[(0,X.jsx)(p,{className:`w-full`,children:(0,X.jsx)(u,{placeholder:`Select an instance profile`})}),(0,X.jsx)(f,{children:b.map(pe)})]}),(0,X.jsx)(_,{disabled:!d||c.isPending,onClick:C,size:`sm`,children:c.isPending?`Associating…`:`Associate`})]}):(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No instance profiles exist.`,` `,(0,X.jsx)(o,{className:`text-primary hover:underline`,to:`/iam/create-instance-profile`,children:`Create one`}),` `,`first.`]})]}),t[19]=c.isPending,t[20]=v,t[21]=l.isPending,t[22]=C,t[23]=E,t[24]=b,t[25]=d,t[26]=j):j=t[26];let M;return t[27]!==k||t[28]!==A||t[29]!==j?(M=(0,X.jsxs)(G,{children:[D,(0,X.jsxs)(G.Content,{children:[k,A,j]})]}),t[27]=k,t[28]=A,t[29]=j,t[30]=M):M=t[30],M}function pe(e){return(0,X.jsx)(d,{value:e.InstanceProfileName??``,children:e.InstanceProfileName},e.InstanceProfileName)}function Q(e){return e.State===`associating`||e.State===`associated`}var $=new Set([`pending`,`stopping`,`shutting-down`,`terminated`]);function me(e){let t=(0,Z.c)(43),{instanceId:n,state:r}=e,i=b(),a=w(),o=S(),s=C(),[c,l]=(0,Y.useState)(!1),u=$.has(r??``),d;t[0]!==n||t[1]!==s?(d=()=>{s.mutate(n,{onSettled:()=>l(!1)})},t[0]=n,t[1]=s,t[2]=d):d=t[2];let f=d;if(u&&r!==`terminated`){let e;return t[3]===r?e=t[4]:(e=(0,X.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,X.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Instance is `,r,`. Actions will be available once the operation completes.`]})}),t[3]=r,t[4]=e),e}if(r===`terminated`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,X.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`This instance has been terminated and cannot be managed.`})}),t[5]=e):e=t[5],e}let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsx)(`h2`,{className:`mb-4 font-semibold`,children:`Instance Actions`}),t[6]=p):p=t[6];let m;t[7]===i.error?m=t[8]:(m=i.error&&(0,X.jsx)(N,{error:i.error,msg:`Failed to start instance`}),t[7]=i.error,t[8]=m);let v;t[9]===a.error?v=t[10]:(v=a.error&&(0,X.jsx)(N,{error:a.error,msg:`Failed to stop instance`}),t[9]=a.error,t[10]=v);let y;t[11]===o.error?y=t[12]:(y=o.error&&(0,X.jsx)(N,{error:o.error,msg:`Failed to reboot instance`}),t[11]=o.error,t[12]=y);let x;t[13]===s.error?x=t[14]:(x=s.error&&(0,X.jsx)(N,{error:s.error,msg:`Failed to terminate instance`}),t[13]=s.error,t[14]=x);let T;t[15]!==n||t[16]!==i||t[17]!==r?(T=r===`stopped`&&(0,X.jsxs)(_,{disabled:i.isPending,onClick:()=>i.mutate(n),size:`sm`,variant:`default`,children:[(0,X.jsx)(J,{className:`size-4`}),i.isPending?`Starting`:`Start`]}),t[15]=n,t[16]=i,t[17]=r,t[18]=T):T=t[18];let E;t[19]!==n||t[20]!==o||t[21]!==r||t[22]!==a?(E=r===`running`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(_,{disabled:a.isPending,onClick:()=>a.mutate(n),size:`sm`,variant:`outline`,children:[(0,X.jsx)(ce,{className:`size-4`}),a.isPending?`Stopping`:`Stop`]}),(0,X.jsxs)(_,{disabled:o.isPending,onClick:()=>o.mutate(n),size:`sm`,variant:`outline`,children:[(0,X.jsx)(h,{className:`size-4`}),o.isPending?`Rebooting`:`Reboot`]})]}),t[19]=n,t[20]=o,t[21]=r,t[22]=a,t[23]=E):E=t[23];let D;t[24]!==r||t[25]!==s.isPending?(D=(r===`stopped`||r===`running`)&&(0,X.jsxs)(_,{disabled:s.isPending,onClick:()=>l(!0),size:`sm`,variant:`destructive`,children:[(0,X.jsx)(g,{className:`size-4`}),s.isPending?`Terminating`:`Terminate`]}),t[24]=r,t[25]=s.isPending,t[26]=D):D=t[26];let O;t[27]!==T||t[28]!==E||t[29]!==D?(O=(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[T,E,D]}),t[27]=T,t[28]=E,t[29]=D,t[30]=O):O=t[30];let k=`Are you sure you want to terminate the instance "${n}"? This action cannot be undone.`,A;t[31]!==f||t[32]!==c||t[33]!==k||t[34]!==s.isPending?(A=(0,X.jsx)(W,{confirmLabel:`Terminate`,description:k,isPending:s.isPending,onConfirm:f,onOpenChange:l,open:c,pendingLabel:`Terminating…`,title:`Terminate Instance`}),t[31]=f,t[32]=c,t[33]=k,t[34]=s.isPending,t[35]=A):A=t[35];let j;return t[36]!==O||t[37]!==A||t[38]!==m||t[39]!==v||t[40]!==y||t[41]!==x?(j=(0,X.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[p,m,v,y,x,O,A]}),t[36]=O,t[37]=A,t[38]=m,t[39]=v,t[40]=y,t[41]=x,t[42]=j):j=t[42],j}function he(){let{id:e}=te.useParams(),{isAdmin:t}=ne(),{data:n}=a(D(e)),r=n.Reservations?.[0]?.Instances?.[0],{data:h}=a(k(r?.ImageId)),g=h?.Images?.[0],{data:b}=a(j),{data:x}=i({...oe,enabled:t,refetchInterval:5e3}),S=x?.vms?.find(t=>t.instance_id===e),C=y(),w=v(),[T,E]=(0,Y.useState)(!1),[O,A]=(0,Y.useState)(``),[ee,M]=(0,Y.useState)(!1),[W,q]=(0,Y.useState)(null),[ce,J]=(0,Y.useState)(!1),Z=[...new Set(b.InstanceTypes?.flatMap(e=>e.InstanceType?[e.InstanceType]:[]))].toSorted();if(!r?.InstanceId)return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(l,{to:`/ec2/describe-instances`,children:`Back to instances`}),(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance not found.`})]});let pe=s(r.LaunchTime),Q=r.State?.Name===`running`,$=r.State?.Name===`stopped`;async function he(){try{await C.mutateAsync({instanceId:e,instanceType:O}),E(!1),A(``)}catch{}}async function ge(){try{let t=await w.mutateAsync(e);q(t.Output?atob(t.Output):`(no output)`),M(!0)}catch{}}return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(l,{to:`/ec2/describe-instances`,children:`Back to instances`}),C.error&&(0,X.jsx)(N,{error:C.error,msg:`Failed to modify instance`}),w.error&&(0,X.jsx)(N,{error:w.error,msg:`Failed to get console output`}),(0,X.jsxs)(`div`,{className:`space-y-6`,children:[(0,X.jsx)(re,{actions:(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Q&&(0,X.jsxs)(_,{disabled:w.isPending,onClick:ge,size:`sm`,variant:`outline`,children:[(0,X.jsx)(ue,{className:`size-4`}),w.isPending?`Fetching…`:`View Console`]}),(Q||$)&&(0,X.jsxs)(_,{onClick:()=>J(!0),size:`sm`,variant:`outline`,children:[(0,X.jsx)(se,{className:`size-4`}),`Create Image`]}),$&&(0,X.jsxs)(_,{onClick:()=>{A(r.InstanceType??``),E(!0)},size:`sm`,variant:`outline`,children:[(0,X.jsx)(le,{className:`size-4`}),`Modify Instance`]}),(0,X.jsx)(ie,{state:r.State?.Name})]}),subtitle:`Instance Details`,title:r.InstanceId}),(0,X.jsx)(me,{instanceId:r.InstanceId,state:r.State?.Name}),ee&&W!==null&&(0,X.jsxs)(G,{children:[(0,X.jsx)(G.Header,{children:(0,X.jsxs)(`div`,{className:`flex items-center justify-between`,children:[`Console Output`,(0,X.jsx)(_,{onClick:()=>{M(!1),q(null)},size:`sm`,variant:`ghost`,children:`Hide`})]})}),(0,X.jsx)(`div`,{className:`p-4`,children:(0,X.jsx)(`pre`,{className:`max-h-96 overflow-y-auto rounded bg-muted p-3 font-mono text-xs whitespace-pre-wrap`,children:W})})]}),(0,X.jsxs)(G,{children:[(0,X.jsx)(G.Header,{children:`Instance Information`}),(0,X.jsxs)(G.Content,{children:[(0,X.jsx)(K,{label:`Instance ID`,value:r.InstanceId}),(0,X.jsx)(K,{label:`Instance Type`,value:r.InstanceType}),(0,X.jsx)(K,{label:`Instance State`,value:r.State?.Name}),(0,X.jsx)(K,{label:`State Code`,value:r.State?.Code?.toString()}),(0,X.jsx)(K,{label:`Launch Time`,value:pe}),(0,X.jsx)(K,{label:`Availability Zone`,value:r.Placement?.AvailabilityZone}),(0,X.jsx)(K,{label:`Placement Group`,value:r.Placement?.GroupName?(0,X.jsx)(o,{className:`text-primary hover:underline`,to:`/ec2/describe-placement-groups`,children:r.Placement.GroupName}):void 0})]})]}),(r.PrivateIpAddress||r.PublicIpAddress||r.VpcId||r.SubnetId||r.SecurityGroups&&r.SecurityGroups.length>0)&&(0,X.jsxs)(G,{children:[(0,X.jsx)(G.Header,{children:`Network & Security`}),(0,X.jsxs)(G.Content,{children:[(0,X.jsx)(K,{label:`Private IP Address`,value:r.PrivateIpAddress}),(0,X.jsx)(K,{label:`Public IP Address`,value:r.PublicIpAddress}),(0,X.jsx)(K,{label:`Private DNS`,value:r.PrivateDnsName}),(0,X.jsx)(K,{label:`Public DNS`,value:r.PublicDnsName}),(0,X.jsx)(K,{label:`VPC ID`,value:r.VpcId?(0,X.jsx)(o,{className:`text-primary hover:underline`,params:{id:r.VpcId},to:`/ec2/describe-vpcs/$id`,children:r.VpcId}):void 0}),(0,X.jsx)(K,{label:`Subnet ID`,value:r.SubnetId?(0,X.jsx)(o,{className:`text-primary hover:underline`,params:{id:r.SubnetId},to:`/ec2/describe-subnets/$id`,children:r.SubnetId}):void 0}),(0,X.jsx)(K,{label:`Key Name`,value:r.KeyName}),(0,X.jsx)(K,{label:`Security Groups`,value:r.SecurityGroups?.map(e=>e.GroupName).join(`, `)})]})]}),(0,X.jsx)(fe,{instanceId:r.InstanceId}),t&&S?.gpu&&(0,X.jsxs)(G,{children:[(0,X.jsx)(G.Header,{children:`GPU`}),(0,X.jsxs)(G.Content,{children:[(0,X.jsx)(K,{label:`Model`,value:S.gpu.model}),(0,X.jsx)(K,{label:`VRAM`,value:c(S.gpu.vram_mib)}),(0,X.jsx)(K,{label:`Attachment`,value:S.gpu.profile?`MIG slice`:`PCIe passthrough`}),S.gpu.profile&&(0,X.jsx)(K,{label:`Profile`,value:S.gpu.profile}),S.gpu.mdev_path&&(0,X.jsx)(K,{label:`Mdev path`,value:S.gpu.mdev_path}),S.gpu.pci_address&&(0,X.jsx)(K,{label:`PCI address`,value:S.gpu.pci_address})]})]}),r.BlockDeviceMappings&&r.BlockDeviceMappings.length>0&&(0,X.jsxs)(G,{children:[(0,X.jsx)(G.Header,{children:`Block Device Mappings`}),r.BlockDeviceMappings.map(e=>(0,X.jsxs)(G.Content,{children:[(0,X.jsx)(K,{label:`Device Name`,value:e.DeviceName}),(0,X.jsx)(K,{label:`Volume ID`,value:e.Ebs?.VolumeId?(0,X.jsx)(o,{className:`text-primary hover:underline`,params:{id:e.Ebs.VolumeId},to:`/ec2/describe-volumes/$id`,children:e.Ebs.VolumeId}):void 0}),(0,X.jsx)(K,{label:`Status`,value:e.Ebs?.Status}),(0,X.jsx)(K,{label:`Attach Time`,value:s(e.Ebs?.AttachTime)}),(0,X.jsx)(K,{label:`Delete on Termination`,value:e.Ebs?.DeleteOnTermination?`Yes`:`No`})]},e.DeviceName))]}),g&&(0,X.jsx)(ae,{image:g})]}),(0,X.jsx)(U,{onOpenChange:e=>{e||(E(!1),A(``))},open:T,children:(0,X.jsxs)(L,{children:[(0,X.jsxs)(H,{children:[(0,X.jsx)(R,{children:`Modify Instance`}),(0,X.jsxs)(I,{children:[`Select a new instance type for "`,r.InstanceId,`". The instance must be stopped to modify its attributes.`]})]}),(0,X.jsxs)(F,{children:[(0,X.jsx)(P,{children:(0,X.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,X.jsxs)(m,{onValueChange:e=>A(e??``),value:O,children:[(0,X.jsx)(p,{className:`w-full`,id:`instanceType`,children:(0,X.jsx)(u,{})}),(0,X.jsx)(f,{children:Z.map(e=>(0,X.jsx)(d,{value:e,children:e},e))})]})]}),(0,X.jsxs)(B,{children:[(0,X.jsx)(V,{children:`Cancel`}),(0,X.jsx)(z,{disabled:C.isPending||!O||O===r.InstanceType,onClick:he,children:C.isPending?`Saving…`:`Save Changes`})]})]})}),(0,X.jsx)(de,{instanceId:r.InstanceId,onOpenChange:J,open:ce})]})}export{he as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{ni as o}from"./awsClient.js";import{Bt as s,Ht as c}from"./auth.js";import{t as l}from"./back-link.js";import{c as u,i as d,n as f,s as p,t as m}from"./select.js";import{t as h}from"./rotate-cw.js";import{t as g}from"./trash-2.js";import{t as _}from"./button.js";import{B as v,H as y,J as b,R as x,W as S,X as C,Y as w,r as T,u as E}from"./ec2.js";import{At as D,Mt as O,Nt as k,Yr as A,a as j,gt as M,kt as N,nr as P,rn as ee}from"./index.js";import{t as F}from"./error-banner.js";import{t as te}from"./page-heading.js";import{a as I,t as L}from"./field.js";import{a as R,i as z,l as B,n as V,o as ne,r as re,s as ie,t as ae}from"./alert-dialog.js";import{t as H}from"./delete-confirmation-dialog.js";import{n as U,t as W}from"./detail-row.js";import{t as G}from"./state-badge.js";import{t as oe}from"./ami-details.js";import{r as se}from"./admin.js";import{t as K}from"./textarea.js";var ce=A(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),q=A(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),J=A(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),le=A(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),ue=A(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Y=t(n(),1),X=e();function de({instanceId:e,open:t,onOpenChange:n}){let r=E(),[i,a]=(0,Y.useState)(``),[o,s]=(0,Y.useState)(``),[c,l]=(0,Y.useState)(null);function u(e){e||(a(``),s(``),l(null)),n(e)}async function d(){try{l((await r.mutateAsync({instanceId:e,name:i,description:o||void 0})).ImageId??null),a(``),s(``)}catch{}}return(0,X.jsx)(ae,{onOpenChange:u,open:t,children:(0,X.jsxs)(z,{children:[(0,X.jsxs)(ie,{children:[(0,X.jsx)(B,{children:c?`Image Created`:`Create Image (AMI)`}),(0,X.jsx)(R,{children:c?`Image "${c}" was created successfully.`:`Create an AMI from instance "${e}".`})]}),!c&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(L,{children:[(0,X.jsx)(I,{children:(0,X.jsx)(`label`,{htmlFor:`imageName`,children:`Name`})}),(0,X.jsx)(P,{id:`imageName`,onChange:e=>a(e.target.value),placeholder:`my-image`,value:i})]}),(0,X.jsxs)(L,{children:[(0,X.jsx)(I,{children:(0,X.jsx)(`label`,{htmlFor:`imageDescription`,children:`Description`})}),(0,X.jsx)(K,{id:`imageDescription`,onChange:e=>s(e.target.value),placeholder:`Optional description`,rows:2,value:o})]})]}),(0,X.jsxs)(ne,{children:[(0,X.jsx)(re,{children:c?`Close`:`Cancel`}),!c&&(0,X.jsx)(V,{disabled:r.isPending||!i.trim(),onClick:d,children:r.isPending?`Creating…`:`Create Image`})]})]})})}var Z=r();function fe(e){let t=(0,Z.c)(31),{instanceId:n}=e,r;t[0]===n?r=t[1]:(r=N(n),t[0]=n,t[1]=r);let{data:a}=i(r),{data:s}=i(M),c=T(),l=x(),[d,h]=(0,Y.useState)(``),g;t[2]===a?.IamInstanceProfileAssociations?g=t[3]:(g=a?.IamInstanceProfileAssociations?.find(Q),t[2]=a?.IamInstanceProfileAssociations,t[3]=g);let v=g,y;t[4]===s?.InstanceProfiles?y=t[5]:(y=s?.InstanceProfiles??[],t[4]=s?.InstanceProfiles,t[5]=y);let b=y,S;t[6]!==c||t[7]!==n||t[8]!==d?(S=async()=>{d&&(await c.mutateAsync({instanceId:n,instanceProfileName:d}),h(``))},t[6]=c,t[7]=n,t[8]=d,t[9]=S):S=t[9];let C=S,w;t[10]!==v||t[11]!==l||t[12]!==n?(w=async()=>{v?.AssociationId&&await l.mutateAsync({associationId:v.AssociationId,instanceId:n})},t[10]=v,t[11]=l,t[12]=n,t[13]=w):w=t[13];let E=w,D;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,X.jsx)(U.Header,{children:`IAM Role`}),t[14]=D):D=t[14];let O;t[15]===c.error?O=t[16]:(O=c.error&&(0,X.jsx)(`div`,{className:`col-span-2`,children:(0,X.jsx)(F,{error:c.error,msg:`Failed to associate instance profile`})}),t[15]=c.error,t[16]=O);let k;t[17]===l.error?k=t[18]:(k=l.error&&(0,X.jsx)(`div`,{className:`col-span-2`,children:(0,X.jsx)(F,{error:l.error,msg:`Failed to disassociate instance profile`})}),t[17]=l.error,t[18]=k);let A;t[19]!==c.isPending||t[20]!==v||t[21]!==l.isPending||t[22]!==C||t[23]!==E||t[24]!==b||t[25]!==d?(A=v?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(W,{label:`Instance Profile ARN`,value:v.IamInstanceProfile?.Arn}),(0,X.jsx)(W,{label:`State`,value:(0,X.jsx)(G,{state:v.State})}),(0,X.jsx)(`div`,{className:`col-span-2 flex justify-end`,children:(0,X.jsx)(_,{disabled:l.isPending,onClick:E,size:`sm`,variant:`destructive`,children:l.isPending?`Detaching…`:`Detach`})})]}):(0,X.jsxs)(`div`,{className:`col-span-2 space-y-3`,children:[(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No instance profile is associated. Associate one to flow role credentials to this instance via IMDS.`}),b.length>0?(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsxs)(m,{onValueChange:e=>h(e??``),value:d,children:[(0,X.jsx)(p,{className:`w-full`,children:(0,X.jsx)(u,{placeholder:`Select an instance profile`})}),(0,X.jsx)(f,{children:b.map(pe)})]}),(0,X.jsx)(_,{disabled:!d||c.isPending,onClick:C,size:`sm`,children:c.isPending?`Associating…`:`Associate`})]}):(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No instance profiles exist.`,` `,(0,X.jsx)(o,{className:`text-primary hover:underline`,to:`/iam/create-instance-profile`,children:`Create one`}),` `,`first.`]})]}),t[19]=c.isPending,t[20]=v,t[21]=l.isPending,t[22]=C,t[23]=E,t[24]=b,t[25]=d,t[26]=A):A=t[26];let j;return t[27]!==O||t[28]!==k||t[29]!==A?(j=(0,X.jsxs)(U,{children:[D,(0,X.jsxs)(U.Content,{children:[O,k,A]})]}),t[27]=O,t[28]=k,t[29]=A,t[30]=j):j=t[30],j}function pe(e){return(0,X.jsx)(d,{value:e.InstanceProfileName??``,children:e.InstanceProfileName},e.InstanceProfileName)}function Q(e){return e.State===`associating`||e.State===`associated`}var $=new Set([`pending`,`stopping`,`shutting-down`,`terminated`]);function me(e){let t=(0,Z.c)(43),{instanceId:n,state:r}=e,i=b(),a=w(),o=S(),s=C(),[c,l]=(0,Y.useState)(!1),u=$.has(r??``),d;t[0]!==n||t[1]!==s?(d=()=>{s.mutate(n,{onSettled:()=>l(!1)})},t[0]=n,t[1]=s,t[2]=d):d=t[2];let f=d;if(u&&r!==`terminated`){let e;return t[3]===r?e=t[4]:(e=(0,X.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,X.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Instance is `,r,`. Actions will be available once the operation completes.`]})}),t[3]=r,t[4]=e),e}if(r===`terminated`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,X.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`This instance has been terminated and cannot be managed.`})}),t[5]=e):e=t[5],e}let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsx)(`h2`,{className:`mb-4 font-semibold`,children:`Instance Actions`}),t[6]=p):p=t[6];let m;t[7]===i.error?m=t[8]:(m=i.error&&(0,X.jsx)(F,{error:i.error,msg:`Failed to start instance`}),t[7]=i.error,t[8]=m);let v;t[9]===a.error?v=t[10]:(v=a.error&&(0,X.jsx)(F,{error:a.error,msg:`Failed to stop instance`}),t[9]=a.error,t[10]=v);let y;t[11]===o.error?y=t[12]:(y=o.error&&(0,X.jsx)(F,{error:o.error,msg:`Failed to reboot instance`}),t[11]=o.error,t[12]=y);let x;t[13]===s.error?x=t[14]:(x=s.error&&(0,X.jsx)(F,{error:s.error,msg:`Failed to terminate instance`}),t[13]=s.error,t[14]=x);let T;t[15]!==n||t[16]!==i||t[17]!==r?(T=r===`stopped`&&(0,X.jsxs)(_,{disabled:i.isPending,onClick:()=>i.mutate(n),size:`sm`,variant:`default`,children:[(0,X.jsx)(J,{className:`size-4`}),i.isPending?`Starting`:`Start`]}),t[15]=n,t[16]=i,t[17]=r,t[18]=T):T=t[18];let E;t[19]!==n||t[20]!==o||t[21]!==r||t[22]!==a?(E=r===`running`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(_,{disabled:a.isPending,onClick:()=>a.mutate(n),size:`sm`,variant:`outline`,children:[(0,X.jsx)(q,{className:`size-4`}),a.isPending?`Stopping`:`Stop`]}),(0,X.jsxs)(_,{disabled:o.isPending,onClick:()=>o.mutate(n),size:`sm`,variant:`outline`,children:[(0,X.jsx)(h,{className:`size-4`}),o.isPending?`Rebooting`:`Reboot`]})]}),t[19]=n,t[20]=o,t[21]=r,t[22]=a,t[23]=E):E=t[23];let D;t[24]!==r||t[25]!==s.isPending?(D=(r===`stopped`||r===`running`)&&(0,X.jsxs)(_,{disabled:s.isPending,onClick:()=>l(!0),size:`sm`,variant:`destructive`,children:[(0,X.jsx)(g,{className:`size-4`}),s.isPending?`Terminating`:`Terminate`]}),t[24]=r,t[25]=s.isPending,t[26]=D):D=t[26];let O;t[27]!==T||t[28]!==E||t[29]!==D?(O=(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[T,E,D]}),t[27]=T,t[28]=E,t[29]=D,t[30]=O):O=t[30];let k=`Are you sure you want to terminate the instance "${n}"? This action cannot be undone.`,A;t[31]!==f||t[32]!==c||t[33]!==k||t[34]!==s.isPending?(A=(0,X.jsx)(H,{confirmLabel:`Terminate`,description:k,isPending:s.isPending,onConfirm:f,onOpenChange:l,open:c,pendingLabel:`Terminating…`,title:`Terminate Instance`}),t[31]=f,t[32]=c,t[33]=k,t[34]=s.isPending,t[35]=A):A=t[35];let j;return t[36]!==O||t[37]!==A||t[38]!==m||t[39]!==v||t[40]!==y||t[41]!==x?(j=(0,X.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[p,m,v,y,x,O,A]}),t[36]=O,t[37]=A,t[38]=m,t[39]=v,t[40]=y,t[41]=x,t[42]=j):j=t[42],j}function he(){let{id:e}=j.useParams(),{isAdmin:t}=ee(),{data:n}=a(O(e)),r=n.Reservations?.[0]?.Instances?.[0],{data:h}=a(D(r?.ImageId)),g=h?.Images?.[0],{data:b}=a(k),{data:x}=i({...se,enabled:t,refetchInterval:5e3}),S=x?.vms?.find(t=>t.instance_id===e),C=y(),w=v(),[T,E]=(0,Y.useState)(!1),[A,M]=(0,Y.useState)(``),[N,P]=(0,Y.useState)(!1),[H,K]=(0,Y.useState)(null),[q,J]=(0,Y.useState)(!1),Z=[...new Set(b.InstanceTypes?.flatMap(e=>e.InstanceType?[e.InstanceType]:[]))].toSorted();if(!r?.InstanceId)return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(l,{to:`/ec2/describe-instances`,children:`Back to instances`}),(0,X.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance not found.`})]});let pe=s(r.LaunchTime),Q=r.State?.Name===`running`,$=r.State?.Name===`stopped`;async function he(){try{await C.mutateAsync({instanceId:e,instanceType:A}),E(!1),M(``)}catch{}}async function ge(){try{let t=await w.mutateAsync(e);K(t.Output?atob(t.Output):`(no output)`),P(!0)}catch{}}return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(l,{to:`/ec2/describe-instances`,children:`Back to instances`}),C.error&&(0,X.jsx)(F,{error:C.error,msg:`Failed to modify instance`}),w.error&&(0,X.jsx)(F,{error:w.error,msg:`Failed to get console output`}),(0,X.jsxs)(`div`,{className:`space-y-6`,children:[(0,X.jsx)(te,{actions:(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Q&&(0,X.jsxs)(_,{disabled:w.isPending,onClick:ge,size:`sm`,variant:`outline`,children:[(0,X.jsx)(ue,{className:`size-4`}),w.isPending?`Fetching…`:`View Console`]}),(Q||$)&&(0,X.jsxs)(_,{onClick:()=>J(!0),size:`sm`,variant:`outline`,children:[(0,X.jsx)(ce,{className:`size-4`}),`Create Image`]}),$&&(0,X.jsxs)(_,{onClick:()=>{M(r.InstanceType??``),E(!0)},size:`sm`,variant:`outline`,children:[(0,X.jsx)(le,{className:`size-4`}),`Modify Instance`]}),(0,X.jsx)(G,{state:r.State?.Name})]}),subtitle:`Instance Details`,title:r.InstanceId}),(0,X.jsx)(me,{instanceId:r.InstanceId,state:r.State?.Name}),N&&H!==null&&(0,X.jsxs)(U,{children:[(0,X.jsx)(U.Header,{children:(0,X.jsxs)(`div`,{className:`flex items-center justify-between`,children:[`Console Output`,(0,X.jsx)(_,{onClick:()=>{P(!1),K(null)},size:`sm`,variant:`ghost`,children:`Hide`})]})}),(0,X.jsx)(`div`,{className:`p-4`,children:(0,X.jsx)(`pre`,{className:`max-h-96 overflow-y-auto rounded bg-muted p-3 font-mono text-xs whitespace-pre-wrap`,children:H})})]}),(0,X.jsxs)(U,{children:[(0,X.jsx)(U.Header,{children:`Instance Information`}),(0,X.jsxs)(U.Content,{children:[(0,X.jsx)(W,{label:`Instance ID`,value:r.InstanceId}),(0,X.jsx)(W,{label:`Instance Type`,value:r.InstanceType}),(0,X.jsx)(W,{label:`Instance State`,value:r.State?.Name}),(0,X.jsx)(W,{label:`State Code`,value:r.State?.Code?.toString()}),(0,X.jsx)(W,{label:`Launch Time`,value:pe}),(0,X.jsx)(W,{label:`Availability Zone`,value:r.Placement?.AvailabilityZone}),(0,X.jsx)(W,{label:`Placement Group`,value:r.Placement?.GroupName?(0,X.jsx)(o,{className:`text-primary hover:underline`,to:`/ec2/describe-placement-groups`,children:r.Placement.GroupName}):void 0})]})]}),(r.PrivateIpAddress||r.PublicIpAddress||r.VpcId||r.SubnetId||r.SecurityGroups&&r.SecurityGroups.length>0)&&(0,X.jsxs)(U,{children:[(0,X.jsx)(U.Header,{children:`Network & Security`}),(0,X.jsxs)(U.Content,{children:[(0,X.jsx)(W,{label:`Private IP Address`,value:r.PrivateIpAddress}),(0,X.jsx)(W,{label:`Public IP Address`,value:r.PublicIpAddress}),(0,X.jsx)(W,{label:`Private DNS`,value:r.PrivateDnsName}),(0,X.jsx)(W,{label:`Public DNS`,value:r.PublicDnsName}),(0,X.jsx)(W,{label:`VPC ID`,value:r.VpcId?(0,X.jsx)(o,{className:`text-primary hover:underline`,params:{id:r.VpcId},to:`/ec2/describe-vpcs/$id`,children:r.VpcId}):void 0}),(0,X.jsx)(W,{label:`Subnet ID`,value:r.SubnetId?(0,X.jsx)(o,{className:`text-primary hover:underline`,params:{id:r.SubnetId},to:`/ec2/describe-subnets/$id`,children:r.SubnetId}):void 0}),(0,X.jsx)(W,{label:`Key Name`,value:r.KeyName}),(0,X.jsx)(W,{label:`Security Groups`,value:r.SecurityGroups?.map(e=>e.GroupName).join(`, `)})]})]}),(0,X.jsx)(fe,{instanceId:r.InstanceId}),t&&S?.gpu&&(0,X.jsxs)(U,{children:[(0,X.jsx)(U.Header,{children:`GPU`}),(0,X.jsxs)(U.Content,{children:[(0,X.jsx)(W,{label:`Model`,value:S.gpu.model}),(0,X.jsx)(W,{label:`VRAM`,value:c(S.gpu.vram_mib)}),(0,X.jsx)(W,{label:`Attachment`,value:S.gpu.profile?`MIG slice`:`PCIe passthrough`}),S.gpu.profile&&(0,X.jsx)(W,{label:`Profile`,value:S.gpu.profile}),S.gpu.mdev_path&&(0,X.jsx)(W,{label:`Mdev path`,value:S.gpu.mdev_path}),S.gpu.pci_address&&(0,X.jsx)(W,{label:`PCI address`,value:S.gpu.pci_address})]})]}),r.BlockDeviceMappings&&r.BlockDeviceMappings.length>0&&(0,X.jsxs)(U,{children:[(0,X.jsx)(U.Header,{children:`Block Device Mappings`}),r.BlockDeviceMappings.map(e=>(0,X.jsxs)(U.Content,{children:[(0,X.jsx)(W,{label:`Device Name`,value:e.DeviceName}),(0,X.jsx)(W,{label:`Volume ID`,value:e.Ebs?.VolumeId?(0,X.jsx)(o,{className:`text-primary hover:underline`,params:{id:e.Ebs.VolumeId},to:`/ec2/describe-volumes/$id`,children:e.Ebs.VolumeId}):void 0}),(0,X.jsx)(W,{label:`Status`,value:e.Ebs?.Status}),(0,X.jsx)(W,{label:`Attach Time`,value:s(e.Ebs?.AttachTime)}),(0,X.jsx)(W,{label:`Delete on Termination`,value:e.Ebs?.DeleteOnTermination?`Yes`:`No`})]},e.DeviceName))]}),g&&(0,X.jsx)(oe,{image:g})]}),(0,X.jsx)(ae,{onOpenChange:e=>{e||(E(!1),M(``))},open:T,children:(0,X.jsxs)(z,{children:[(0,X.jsxs)(ie,{children:[(0,X.jsx)(B,{children:`Modify Instance`}),(0,X.jsxs)(R,{children:[`Select a new instance type for "`,r.InstanceId,`". The instance must be stopped to modify its attributes.`]})]}),(0,X.jsxs)(L,{children:[(0,X.jsx)(I,{children:(0,X.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,X.jsxs)(m,{onValueChange:e=>M(e??``),value:A,children:[(0,X.jsx)(p,{className:`w-full`,id:`instanceType`,children:(0,X.jsx)(u,{})}),(0,X.jsx)(f,{children:Z.map(e=>(0,X.jsx)(d,{value:e,children:e},e))})]})]}),(0,X.jsxs)(ne,{children:[(0,X.jsx)(re,{children:`Cancel`}),(0,X.jsx)(V,{disabled:C.isPending||!A||A===r.InstanceType,onClick:he,children:C.isPending?`Saving…`:`Save Changes`})]})]})}),(0,X.jsx)(de,{instanceId:r.InstanceId,onOpenChange:J,open:q})]})}export{he as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id4.js b/spinifex/services/spinifexui/frontend/dist/assets/_id4.js index 74a75ec31..12b08c9b1 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id4.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id4.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{F as m,a as h,w as g}from"./ec2.js";import{$t as _,Nt as v,Xr as y,i as b}from"./index.js";import{t as x}from"./error-banner.js";import{t as S}from"./page-heading.js";import{t as C}from"./delete-confirmation-dialog.js";import{n as w,t as T}from"./detail-row.js";var E=t(n()),D=e();function O(){let{id:e}=b.useParams(),t=y(),{data:n}=r(v(e)),{data:O}=r(_),k=h(),A=m(),j=g(),[M,N]=(0,E.useState)(!1),[P,F]=(0,E.useState)(``),I=n.InternetGateways?.[0],L=O.Vpcs??[],R=async()=>{try{await j.mutateAsync(e),t({to:`/ec2/describe-internet-gateways`})}finally{N(!1)}},z=async()=>{P&&await k.mutateAsync({internetGatewayId:e,vpcId:P})},B=async t=>{await A.mutateAsync({internetGatewayId:e,vpcId:t})};if(!I?.InternetGatewayId)return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(o,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`Internet Gateway not found.`})]});let V=I.Attachments?.[0],H=!!V?.VpcId,U=a(I.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(o,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(x,{error:j.error??k.error??A.error??void 0,msg:`Internet Gateway action failed`}),(0,D.jsxs)(`div`,{className:`space-y-6`,children:[(0,D.jsx)(S,{actions:(0,D.jsxs)(p,{disabled:H||j.isPending,onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,D.jsx)(f,{className:`size-4`}),`Delete`]}),subtitle:`Internet Gateway Details`,title:U?`${I.InternetGatewayId} (${U})`:I.InternetGatewayId}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`Internet Gateway Information`}),(0,D.jsxs)(w.Content,{children:[(0,D.jsx)(T,{label:`Internet Gateway ID`,value:I.InternetGatewayId}),(0,D.jsx)(T,{label:`Owner ID`,value:I.OwnerId??`—`}),(0,D.jsx)(T,{label:`State`,value:V?.State??`detached`})]})]}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`VPC Attachment`}),(0,D.jsx)(w.Content,{children:H?(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(i,{className:`text-primary hover:underline`,params:{id:V.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:V.VpcId}),(0,D.jsx)(p,{disabled:A.isPending,onClick:async()=>await B(V.VpcId??``),size:`sm`,variant:`outline`,children:`Detach`})]}):(0,D.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,D.jsx)(`div`,{className:`flex-1`,children:(0,D.jsxs)(d,{onValueChange:e=>F(e??``),value:P,children:[(0,D.jsx)(u,{className:`w-full`,children:(0,D.jsx)(s,{placeholder:`Select a VPC`})}),(0,D.jsx)(l,{children:L.map(e=>{let t=a(e.Tags);return(0,D.jsx)(c,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(p,{disabled:!P||k.isPending,onClick:z,size:`sm`,children:`Attach`})]})})]})]}),(0,D.jsx)(C,{description:`Are you sure you want to delete the Internet Gateway "${I.InternetGatewayId}"? This action cannot be undone.`,isPending:j.isPending,onConfirm:R,onOpenChange:N,open:M,title:`Delete Internet Gateway`})]})}export{O as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{F as m,a as h,w as g}from"./ec2.js";import{Ft as _,Qr as v,o as y,tn as b}from"./index.js";import{t as x}from"./error-banner.js";import{t as S}from"./page-heading.js";import{t as C}from"./delete-confirmation-dialog.js";import{n as w,t as T}from"./detail-row.js";var E=t(n()),D=e();function O(){let{id:e}=y.useParams(),t=v(),{data:n}=r(_(e)),{data:O}=r(b),k=h(),A=m(),j=g(),[M,N]=(0,E.useState)(!1),[P,F]=(0,E.useState)(``),I=n.InternetGateways?.[0],L=O.Vpcs??[],R=async()=>{try{await j.mutateAsync(e),t({to:`/ec2/describe-internet-gateways`})}finally{N(!1)}},z=async()=>{P&&await k.mutateAsync({internetGatewayId:e,vpcId:P})},B=async t=>{await A.mutateAsync({internetGatewayId:e,vpcId:t})};if(!I?.InternetGatewayId)return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(o,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`Internet Gateway not found.`})]});let V=I.Attachments?.[0],H=!!V?.VpcId,U=a(I.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(o,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(x,{error:j.error??k.error??A.error??void 0,msg:`Internet Gateway action failed`}),(0,D.jsxs)(`div`,{className:`space-y-6`,children:[(0,D.jsx)(S,{actions:(0,D.jsxs)(p,{disabled:H||j.isPending,onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,D.jsx)(f,{className:`size-4`}),`Delete`]}),subtitle:`Internet Gateway Details`,title:U?`${I.InternetGatewayId} (${U})`:I.InternetGatewayId}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`Internet Gateway Information`}),(0,D.jsxs)(w.Content,{children:[(0,D.jsx)(T,{label:`Internet Gateway ID`,value:I.InternetGatewayId}),(0,D.jsx)(T,{label:`Owner ID`,value:I.OwnerId??`—`}),(0,D.jsx)(T,{label:`State`,value:V?.State??`detached`})]})]}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`VPC Attachment`}),(0,D.jsx)(w.Content,{children:H?(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(i,{className:`text-primary hover:underline`,params:{id:V.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:V.VpcId}),(0,D.jsx)(p,{disabled:A.isPending,onClick:async()=>await B(V.VpcId??``),size:`sm`,variant:`outline`,children:`Detach`})]}):(0,D.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,D.jsx)(`div`,{className:`flex-1`,children:(0,D.jsxs)(d,{onValueChange:e=>F(e??``),value:P,children:[(0,D.jsx)(u,{className:`w-full`,children:(0,D.jsx)(s,{placeholder:`Select a VPC`})}),(0,D.jsx)(l,{children:L.map(e=>{let t=a(e.Tags);return(0,D.jsx)(c,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(p,{disabled:!P||k.isPending,onClick:z,size:`sm`,children:`Attach`})]})})]})]}),(0,D.jsx)(C,{description:`Are you sure you want to delete the Internet Gateway "${I.InternetGatewayId}"? This action cannot be undone.`,isPending:j.isPending,onConfirm:R,onOpenChange:N,open:M,title:`Delete Internet Gateway`})]})}export{O as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id5.js b/spinifex/services/spinifexui/frontend/dist/assets/_id5.js index 372b245e3..8cbc72109 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id5.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id5.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Bt as i}from"./auth.js";import{t as a}from"./back-link.js";import{t as o}from"./trash-2.js";import{t as s}from"./button.js";import{T as c}from"./ec2.js";import{Ft as l,Xr as u,a as d}from"./index.js";import{t as f}from"./error-banner.js";import{t as p}from"./page-heading.js";import{t as m}from"./delete-confirmation-dialog.js";import{n as h,t as g}from"./detail-row.js";var _=t(n()),v=e();function y(){let{id:e}=d.useParams(),t=u(),{data:n}=r(l(e)),y=n.KeyPairs?.[0],b=c(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(a,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=i(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(a,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(f,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(p,{actions:(0,v.jsxs)(s,{onClick:()=>S(!0),size:`sm`,variant:`destructive`,children:[(0,v.jsx)(o,{className:`size-4`}),`Delete`]}),subtitle:`Key Pair Details`,title:y.KeyName??``}),(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Key Pair Information`}),(0,v.jsxs)(h.Content,{children:[(0,v.jsx)(g,{label:`Key Pair ID`,value:y.KeyPairId}),(0,v.jsx)(g,{label:`Key Name`,value:y.KeyName}),(0,v.jsx)(g,{label:`Key Type`,value:y.KeyType}),(0,v.jsx)(g,{label:`Key Fingerprint`,value:y.KeyFingerprint}),(0,v.jsx)(g,{label:`Creation Date`,value:w})]})]}),y.Tags&&y.Tags.length>0&&(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Tags`}),(0,v.jsx)(h.Content,{children:y.Tags.map(e=>(0,v.jsx)(g,{label:e.Key??``,value:e.Value},e.Key))})]})]}),(0,v.jsx)(m,{description:`Are you sure you want to delete the key pair "${y.KeyName}"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.`,isPending:b.isPending,onConfirm:C,onOpenChange:S,open:x,title:`Delete Key Pair`})]})}export{y as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Bt as i}from"./auth.js";import{t as a}from"./back-link.js";import{t as o}from"./trash-2.js";import{t as s}from"./button.js";import{T as c}from"./ec2.js";import{Lt as l,Qr as u,s as d}from"./index.js";import{t as f}from"./error-banner.js";import{t as p}from"./page-heading.js";import{t as m}from"./delete-confirmation-dialog.js";import{n as h,t as g}from"./detail-row.js";var _=t(n()),v=e();function y(){let{id:e}=d.useParams(),t=u(),{data:n}=r(l(e)),y=n.KeyPairs?.[0],b=c(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(a,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=i(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(a,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(f,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(p,{actions:(0,v.jsxs)(s,{onClick:()=>S(!0),size:`sm`,variant:`destructive`,children:[(0,v.jsx)(o,{className:`size-4`}),`Delete`]}),subtitle:`Key Pair Details`,title:y.KeyName??``}),(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Key Pair Information`}),(0,v.jsxs)(h.Content,{children:[(0,v.jsx)(g,{label:`Key Pair ID`,value:y.KeyPairId}),(0,v.jsx)(g,{label:`Key Name`,value:y.KeyName}),(0,v.jsx)(g,{label:`Key Type`,value:y.KeyType}),(0,v.jsx)(g,{label:`Key Fingerprint`,value:y.KeyFingerprint}),(0,v.jsx)(g,{label:`Creation Date`,value:w})]})]}),y.Tags&&y.Tags.length>0&&(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Tags`}),(0,v.jsx)(h.Content,{children:y.Tags.map(e=>(0,v.jsx)(g,{label:e.Key??``,value:e.Value},e.Key))})]})]}),(0,v.jsx)(m,{description:`Are you sure you want to delete the key pair "${y.KeyName}"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.`,isPending:b.isPending,onConfirm:C,onOpenChange:S,open:x,title:`Delete Key Pair`})]})}export{y as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id6.js b/spinifex/services/spinifexui/frontend/dist/assets/_id6.js index 7b58f8d8f..4f5a64108 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id6.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id6.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{Bt as a,Ut as o}from"./auth.js";import{t as s}from"./back-link.js";import{c,i as l,n as u,s as d,t as f}from"./select.js";import{t as p}from"./trash-2.js";import{t as m}from"./button.js";import{t as h}from"./certificate-import-dialog.js";import{_ as g,a as _,d as v,f as y,g as b,h as x,o as S,r as C,s as w,t as T,u as E}from"./elbv2.js";import{B as D,G as O,Gt as k,J as A,K as j,Q as M,U as N,W as P,Xr as F,Y as I,Yt as ee,er as te,o as L,qr as R}from"./index.js";import{a as ne,i as z,n as re,r as B,t as V}from"./zod.js";import{t as H}from"./error-banner.js";import{t as U}from"./page-heading.js";import{a as W,r as ie,t as G}from"./field.js";import{a as K,i as q,l as J,n as Y,o as ae,r as oe,s as se,t as ce}from"./alert-dialog.js";import{t as le}from"./delete-confirmation-dialog.js";import{n as X,t as Z}from"./detail-row.js";import{t as ue}from"./state-badge.js";import{c as de,i as fe,n as pe,o as me,s as he,t as ge}from"./elbv22.js";import{n as _e,r as ve,t as ye}from"./tags-editor.js";import{i as be,n as xe,r as Se,t as Ce}from"./tabs.js";var we=R(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Te=r(),Q=t(n(),1),$=e(),Ee=80,De=443;function Oe(e){let t=e.CertificateArn?.split(`/`).pop()??e.CertificateArn??``;return e.DomainName?`${e.DomainName} · ${t}`:t}function ke(e){let t=(0,Te.c)(59),{form:n,protocols:r,targetGroups:i,certificates:a,sslPolicies:o}=e,s;t[0]===a?s=t[1]:(s=a===void 0?[]:a,t[0]=a,t[1]=s);let l=s,p;t[2]===o?p=t[3]:(p=o===void 0?[]:o,t[2]=o,t[3]=p);let g=p,{control:_,register:v,getValues:y,setValue:b,formState:x}=n,{errors:S}=x,[C,w]=(0,Q.useState)(!1),T;t[4]===_?T=t[5]:(T={control:_,name:`protocol`},t[4]=_,t[5]=T);let E=ne(T),D=E===`HTTPS`,O;t[6]===E?O=t[7]:(O=he(E),t[6]=E,t[7]=O);let k=O,A;t[8]!==y||t[9]!==b?(A=e=>{if(!e)return;let t=y(`port`);he(e)?(t===Ee&&b(`port`,De),e===`HTTPS`?y(`sslPolicy`)||b(`sslPolicy`,ge):b(`sslPolicy`,void 0)):(t===De&&b(`port`,Ee),b(`certificateArn`,void 0),b(`sslPolicy`,void 0))},t[8]=y,t[9]=b,t[10]=A):A=t[10];let j=A,M;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),t[11]=M):M=t[11];let N;t[12]!==j||t[13]!==r?(N=e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:e=>{t.onChange(e),j(e)},value:t.value,children:[(0,$.jsx)(d,{className:`w-full`,id:`listener-protocol`,children:(0,$.jsx)(c,{})}),(0,$.jsx)(u,{children:r.map(Ne)})]})},t[12]=j,t[13]=r,t[14]=N):N=t[14];let P;t[15]!==_||t[16]!==N?(P=(0,$.jsxs)(G,{children:[M,(0,$.jsx)(re,{control:_,name:`protocol`,render:N})]}),t[15]=_,t[16]=N,t[17]=P):P=t[17];let F;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),t[18]=F):F=t[18];let I=!!S.port,ee=k?`443`:`80`,L;t[19]===v?L=t[20]:(L=v(`port`,{valueAsNumber:!0}),t[19]=v,t[20]=L);let R;t[21]!==I||t[22]!==ee||t[23]!==L?(R=(0,$.jsx)(te,{"aria-invalid":I,id:`listener-port`,inputMode:`numeric`,placeholder:ee,type:`number`,...L}),t[21]=I,t[22]=ee,t[23]=L,t[24]=R):R=t[24];let z;t[25]===S.port?z=t[26]:(z=(0,$.jsx)(ie,{errors:[S.port]}),t[25]=S.port,t[26]=z);let B;t[27]!==R||t[28]!==z?(B=(0,$.jsxs)(G,{children:[F,R,z]}),t[27]=R,t[28]=z,t[29]=B):B=t[29];let V;t[30]!==l||t[31]!==_||t[32]!==S.certificateArn||t[33]!==C||t[34]!==D||t[35]!==k||t[36]!==b||t[37]!==g?(V=k&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,$.jsx)(re,{control:_,name:`certificateArn`,render:e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:t.onChange,value:t.value??``,children:[(0,$.jsx)(d,{"aria-invalid":!!S.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,$.jsx)(c,{placeholder:`Select certificate`})}),(0,$.jsx)(u,{children:l.map(Me)})]})}}),(0,$.jsx)(ie,{errors:[S.certificateArn]}),(0,$.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[l.length===0&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,$.jsx)(m,{className:`ml-auto`,onClick:()=>w(!0),size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),D&&(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,$.jsx)(re,{control:_,name:`sslPolicy`,render:e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:t.onChange,value:t.value??`ELBSecurityPolicy-2016-08`,children:[(0,$.jsx)(d,{className:`w-full`,id:`listener-ssl-policy`,children:(0,$.jsx)(c,{})}),(0,$.jsx)(u,{children:g.map(je)})]})}})]}),(0,$.jsx)(h,{onImported:e=>b(`certificateArn`,e,{shouldValidate:!0}),onOpenChange:w,open:C})]}),t[30]=l,t[31]=_,t[32]=S.certificateArn,t[33]=C,t[34]=D,t[35]=k,t[36]=b,t[37]=g,t[38]=V):V=t[38];let H;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-default-tg`,children:`Default target group`})}),t[39]=H):H=t[39];let U;t[40]!==S.defaultTargetGroupArn||t[41]!==i?(U=e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:t.onChange,value:t.value??``,children:[(0,$.jsx)(d,{"aria-invalid":!!S.defaultTargetGroupArn,className:`w-full`,id:`listener-default-tg`,children:(0,$.jsx)(c,{placeholder:`Select target group`})}),(0,$.jsx)(u,{children:i.map(Ae)})]})},t[40]=S.defaultTargetGroupArn,t[41]=i,t[42]=U):U=t[42];let K;t[43]!==_||t[44]!==U?(K=(0,$.jsx)(re,{control:_,name:`defaultTargetGroupArn`,render:U}),t[43]=_,t[44]=U,t[45]=K):K=t[45];let q;t[46]===S.defaultTargetGroupArn?q=t[47]:(q=(0,$.jsx)(ie,{errors:[S.defaultTargetGroupArn]}),t[46]=S.defaultTargetGroupArn,t[47]=q);let J;t[48]===i.length?J=t[49]:(J=i.length===0&&(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups available in this VPC. Create one first.`}),t[48]=i.length,t[49]=J);let Y;t[50]!==K||t[51]!==q||t[52]!==J?(Y=(0,$.jsxs)(G,{children:[H,K,q,J]}),t[50]=K,t[51]=q,t[52]=J,t[53]=Y):Y=t[53];let ae;return t[54]!==P||t[55]!==B||t[56]!==V||t[57]!==Y?(ae=(0,$.jsxs)($.Fragment,{children:[P,B,V,Y]}),t[54]=P,t[55]=B,t[56]=V,t[57]=Y,t[58]=ae):ae=t[58],ae}function Ae(e){return(0,$.jsxs)(l,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function je(e){return(0,$.jsx)(l,{value:e.Name??``,children:e.Name},e.Name)}function Me(e){return(0,$.jsx)(l,{value:e.CertificateArn??``,children:Oe(e)},e.CertificateArn)}function Ne(e){return(0,$.jsx)(l,{value:e,children:e},e)}function Pe({listenerArn:e,targetGroups:t}){let{data:n}=i(N(e)),r=C(),a=y(),o=w(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(),[d,f]=(0,Q.useState)(),h=n.Rules??[],g=new Map;for(let e of t)e.TargetGroupArn&&e.TargetGroupName&&g.set(e.TargetGroupArn,e.TargetGroupName);return(0,$.jsxs)(`div`,{className:`space-y-3`,children:[r.error&&(0,$.jsx)(H,{error:r.error,msg:`Failed to create rule`}),a.error&&(0,$.jsx)(H,{error:a.error,msg:`Failed to modify rule`}),o.error&&(0,$.jsx)(H,{error:o.error,msg:`Failed to delete rule`}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[h.length,` rule`,h.length===1?``:`s`,` (including default)`]}),(0,$.jsx)(m,{onClick:()=>c(!0),size:`sm`,children:`Add rule`})]}),(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,$.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Priority`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Conditions`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Forward to`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(`tbody`,{children:h.map(e=>(0,$.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Priority}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:Fe(e.Conditions,e.IsDefault===!0)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:Le(e,g)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-right`,children:e.IsDefault===!0?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Edit via listener`}):(0,$.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,$.jsx)(m,{"aria-label":`Edit rule ${e.Priority}`,onClick:()=>u(e),size:`sm`,variant:`ghost`,children:(0,$.jsx)(we,{className:`size-4`})}),(0,$.jsx)(m,{"aria-label":`Delete rule ${e.Priority}`,onClick:()=>f(e),size:`sm`,variant:`ghost`,children:(0,$.jsx)(p,{className:`size-4`})})]})})]},e.RuleArn??e.Priority??`default`))})]})}),(0,$.jsx)(ze,{isPending:r.isPending,mode:`add`,onOpenChange:c,onSubmit:async t=>{try{await r.mutateAsync({listenerArn:e,priority:t.priority,conditions:t.conditions.map(Re),forwardTargetGroupArn:t.forwardTargetGroupArn}),c(!1)}catch{}},open:s,targetGroups:t}),(0,$.jsx)(ze,{initialRule:l,isPending:a.isPending,mode:`edit`,onOpenChange:e=>!e&&u(void 0),onSubmit:async t=>{if(l?.RuleArn)try{await a.mutateAsync({ruleArn:l.RuleArn,listenerArn:e,conditions:t.conditions.map(Re),forwardTargetGroupArn:t.forwardTargetGroupArn}),u(void 0)}catch{}},open:l!==void 0,targetGroups:t}),(0,$.jsx)(le,{description:d?`Delete rule with priority ${d.Priority}? This cannot be undone.`:``,isPending:o.isPending,onConfirm:async()=>{if(d?.RuleArn)try{await o.mutateAsync({ruleArn:d.RuleArn,listenerArn:e})}finally{f(void 0)}},onOpenChange:e=>!e&&f(void 0),open:d!==void 0,title:`Delete rule`})]})}function Fe(e,t){return t?`default`:!e||e.length===0?`—`:e.map(e=>{let t=Ie(e);return`${e.Field}: ${t.join(`, `)}`}).join(` AND `)}function Ie(e){if(e.Field===void 0)return e.Values??[];switch(e.Field){case`host-header`:return e.HostHeaderConfig?.Values??e.Values??[];case`path-pattern`:return e.PathPatternConfig?.Values??e.Values??[];case`http-header`:{let t=e.HttpHeaderConfig?.HttpHeaderName??`?`;return(e.HttpHeaderConfig?.Values??[]).map(e=>`${t}=${e}`)}case`http-request-method`:return e.HttpRequestMethodConfig?.Values??[];case`source-ip`:return e.SourceIpConfig?.Values??[];case`query-string`:return(e.QueryStringConfig?.Values??[]).map(e=>e.Key?`${e.Key}=${e.Value??``}`:e.Value??``);default:return e.Values??[]}}function Le(e,t){let n=e.Actions?.[0];return n?n.Type===`forward`&&n.TargetGroupArn?t.get(n.TargetGroupArn)??n.TargetGroupArn:n.Type??`—`:`—`}function Re(e){let t=e.rawValues.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0);return e.field===`query-string`?{field:e.field,values:[],queryStringPairs:t.map(e=>{let t=e.indexOf(`=`);return t===-1?{value:e}:{key:e.slice(0,t),value:e.slice(t+1)}})}:{field:e.field,values:t,httpHeaderName:e.httpHeaderName}}function ze({open:e,onOpenChange:t,onSubmit:n,isPending:r,targetGroups:i,mode:a,initialRule:o}){let s=[{field:`path-pattern`,rawValues:``}],p=z({resolver:V(fe),defaultValues:{priority:1,conditions:s,forwardTargetGroupArn:``}}),{fields:h,append:g,remove:_}=B({control:p.control,name:`conditions`});(0,Q.useEffect)(()=>{if(a===`add`){e||p.reset({priority:1,conditions:s,forwardTargetGroupArn:``});return}if(!o)return;let t=Number(o.Priority??1),n=o.Conditions?.map(e=>We(e))??s;p.reset({priority:Number.isFinite(t)?t:1,conditions:n.length>0?n:s,forwardTargetGroupArn:o.Actions?.[0]?.TargetGroupArn??``})},[o,e,a]);let v=p.handleSubmit(n);return(0,$.jsx)(ce,{onOpenChange:t,open:e,children:(0,$.jsxs)(q,{className:`grid-cols-[minmax(0,1fr)]`,style:{maxWidth:`40rem`,width:`calc(100vw - 2rem)`},children:[(0,$.jsxs)(se,{children:[(0,$.jsx)(J,{children:a===`add`?`Add rule`:`Edit rule`}),(0,$.jsx)(K,{children:`Routing rules match incoming requests and forward them to a target group. Rules evaluate in priority order; the listener default applies when no rule matches.`})]}),(0,$.jsxs)(`form`,{className:`min-w-0 space-y-4`,onSubmit:e=>{e.preventDefault(),v()},children:[(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`rule-priority`,children:`Priority`})}),(0,$.jsx)(te,{"aria-invalid":!!p.formState.errors.priority,id:`rule-priority`,inputMode:`numeric`,type:`number`,...p.register(`priority`,{valueAsNumber:!0})}),(0,$.jsx)(ie,{errors:[p.formState.errors.priority]})]}),(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsx)(W,{children:`Conditions`}),(0,$.jsx)(m,{disabled:h.length>=5,onClick:()=>g({field:`path-pattern`,rawValues:``}),size:`sm`,type:`button`,variant:`outline`,children:`Add condition`})]}),h.map((e,t)=>(0,$.jsx)(Be,{form:p,index:t,onRemove:h.length>1?()=>_(t):void 0},e.id))]}),(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`rule-forward-tg`,children:`Forward to target group`})}),(0,$.jsx)(re,{control:p.control,name:`forwardTargetGroupArn`,render:({field:e})=>(0,$.jsxs)(f,{onValueChange:e.onChange,value:e.value??``,children:[(0,$.jsx)(d,{"aria-invalid":!!p.formState.errors.forwardTargetGroupArn,className:`w-full`,id:`rule-forward-tg`,children:(0,$.jsx)(c,{placeholder:`Select target group`})}),(0,$.jsx)(u,{children:i.map(e=>(0,$.jsxs)(l,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn))})]})}),(0,$.jsx)(ie,{errors:[p.formState.errors.forwardTargetGroupArn]})]})]}),(0,$.jsxs)(ae,{children:[(0,$.jsx)(oe,{disabled:r,children:`Cancel`}),(0,$.jsx)(Y,{disabled:r,onClick:v,children:Ge(a,r)})]})]})})}function Be(e){let t=(0,Te.c)(54),{form:n,index:r,onRemove:i}=e,a,o,s,h,g,_,v,y,b,x;if(t[0]!==n||t[1]!==r||t[2]!==i){let e=n.watch(`conditions.${r}.field`);s=n.formState.errors.conditions?.[r],y=`space-y-2 rounded-md border p-3`;let S=`rule-cond-${r}-field`,C;t[13]===S?C=t[14]:(C=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:S,children:`Type`})}),t[13]=S,t[14]=C);let w=`conditions.${r}.field`,T;t[15]===r?T=t[16]:(T=e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:t.onChange,value:t.value,children:[(0,$.jsx)(d,{className:`w-full`,id:`rule-cond-${r}-field`,children:(0,$.jsx)(c,{})}),(0,$.jsxs)(u,{children:[(0,$.jsx)(l,{value:`path-pattern`,children:`Path pattern`}),(0,$.jsx)(l,{value:`host-header`,children:`Host header`}),(0,$.jsx)(l,{value:`http-header`,children:`HTTP header`}),(0,$.jsx)(l,{value:`http-request-method`,children:`HTTP method`}),(0,$.jsx)(l,{value:`source-ip`,children:`Source IP CIDR`}),(0,$.jsx)(l,{value:`query-string`,children:`Query string`})]})]})},t[15]=r,t[16]=T);let E;t[17]!==n.control||t[18]!==w||t[19]!==T?(E=(0,$.jsx)(re,{control:n.control,name:w,render:T}),t[17]=n.control,t[18]=w,t[19]=T,t[20]=E):E=t[20];let D;t[21]!==E||t[22]!==C?(D=(0,$.jsxs)(`div`,{className:`flex-1`,children:[C,E]}),t[21]=E,t[22]=C,t[23]=D):D=t[23];let O;t[24]!==r||t[25]!==i?(O=i&&(0,$.jsx)(m,{"aria-label":`Remove condition ${r+1}`,className:`self-end`,onClick:i,size:`sm`,type:`button`,variant:`ghost`,children:(0,$.jsx)(p,{className:`size-4`})}),t[24]=r,t[25]=i,t[26]=O):O=t[26],t[27]!==D||t[28]!==O?(b=(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[D,O]}),t[27]=D,t[28]=O,t[29]=b):b=t[29],x=e===`http-header`&&(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`rule-cond-${r}-hdr-name`,children:`Header name`})}),(0,$.jsx)(te,{"aria-invalid":!!s?.httpHeaderName,id:`rule-cond-${r}-hdr-name`,placeholder:`X-Tenant`,...n.register(`conditions.${r}.httpHeaderName`)}),(0,$.jsx)(ie,{errors:[s?.httpHeaderName]})]}),o=G;let k=`rule-cond-${r}-values`,A;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`(comma or newline separated, max 5)`}),t[30]=A):A=t[30],t[31]===k?v=t[32]:(v=(0,$.jsx)(W,{children:(0,$.jsxs)(`label`,{htmlFor:k,children:[`Values`,` `,A]})}),t[31]=k,t[32]=v),a=te,h=!!s?.rawValues,g=`rule-cond-${r}-values`,_=Ve(e),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=h,t[7]=g,t[8]=_,t[9]=v,t[10]=y,t[11]=b,t[12]=x}else a=t[3],o=t[4],s=t[5],h=t[6],g=t[7],_=t[8],v=t[9],y=t[10],b=t[11],x=t[12];let S;t[33]!==n||t[34]!==r?(S=n.register(`conditions.${r}.rawValues`),t[33]=n,t[34]=r,t[35]=S):S=t[35];let C;t[36]!==a||t[37]!==h||t[38]!==g||t[39]!==_||t[40]!==S?(C=(0,$.jsx)(a,{"aria-invalid":h,id:g,placeholder:_,...S}),t[36]=a,t[37]=h,t[38]=g,t[39]=_,t[40]=S,t[41]=C):C=t[41];let w=s?.rawValues,T;t[42]===w?T=t[43]:(T=(0,$.jsx)(ie,{errors:[w]}),t[42]=w,t[43]=T);let E;t[44]!==o||t[45]!==T||t[46]!==v||t[47]!==C?(E=(0,$.jsxs)(o,{children:[v,C,T]}),t[44]=o,t[45]=T,t[46]=v,t[47]=C,t[48]=E):E=t[48];let D;return t[49]!==E||t[50]!==y||t[51]!==b||t[52]!==x?(D=(0,$.jsxs)(`div`,{className:y,children:[b,x,E]}),t[49]=E,t[50]=y,t[51]=b,t[52]=x,t[53]=D):D=t[53],D}function Ve(e){switch(e){case`path-pattern`:return`/api/*`;case`host-header`:return`*.example.com`;case`http-header`:return`acme`;case`http-request-method`:return`GET, POST`;case`source-ip`:return`10.0.0.0/8`;case`query-string`:return`key=value`;default:return``}}var He=new Set([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]);function Ue(e){return e!==void 0&&He.has(e)}function We(e){let t=Ie(e);return{field:Ue(e.Field)?e.Field:`path-pattern`,httpHeaderName:e.HttpHeaderConfig?.HttpHeaderName,rawValues:t.join(`, `)}}function Ge(e,t){return t?e===`add`?`Adding…`:`Saving…`:e===`add`?`Add rule`:`Save changes`}function Ke(e){return{protocol:me(e),port:80,defaultTargetGroupArn:``}}function qe(e){if(e.Protocol!==`HTTPS`)return`—`;let t=e.Certificates?.[0]?.CertificateArn?.split(`/`).pop(),n=e.SslPolicy;return t&&n?`${n} · ${t}`:n??t??`—`}function Je({loadBalancerArn:e,vpcId:t,lbType:n}){let r=de(n),{data:a}=i(P(e)),{data:o}=i(M),{data:s}=i(D),{data:c}=i(A),l=T(),u=_(),d=E(),[f,h]=(0,Q.useState)(!1),[g,v]=(0,Q.useState)(),[y,b]=(0,Q.useState)(),[x,S]=(0,Q.useState)(),C=a.Listeners??[],w=o.TargetGroups??[],O=w.filter(e=>e.VpcId===t),k=s.CertificateSummaryList??[],j=c.SslPolicies??[],N=new Map;for(let e of w)e.TargetGroupArn&&e.TargetGroupName&&N.set(e.TargetGroupArn,e.TargetGroupName);let F=e=>{let t=e.DefaultActions?.[0];if(!t)return`—`;if(t.Type===`forward`&&t.TargetGroupArn){let e=N.get(t.TargetGroupArn);return e?`forward → ${e}`:`forward → ${t.TargetGroupArn}`}return t.Type??`—`};return(0,$.jsxs)(`div`,{className:`space-y-3`,children:[l.error&&(0,$.jsx)(H,{error:l.error,msg:`Failed to create listener`}),d.error&&(0,$.jsx)(H,{error:d.error,msg:`Failed to modify listener`}),u.error&&(0,$.jsx)(H,{error:u.error,msg:`Failed to delete listener`}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[C.length,` listener`,C.length===1?``:`s`]}),(0,$.jsx)(m,{onClick:()=>h(!0),size:`sm`,children:`Add listener`})]}),C.length===0?(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No listeners configured.`}):(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,$.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`TLS`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Default action`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Listener ARN`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(`tbody`,{children:C.map(e=>{let t=e.ListenerArn??``,n=x===t;return(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol}),(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Port}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:qe(e)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:F(e)}),(0,$.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,$.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,$.jsx)(m,{"aria-label":`${n?`Hide`:`Show`} rules for listener ${e.Protocol}:${e.Port}`,onClick:()=>S(n?void 0:t),size:`sm`,variant:`ghost`,children:n?`Hide rules`:`Rules`}),(0,$.jsx)(m,{"aria-label":`Edit listener ${e.Protocol}:${e.Port}`,onClick:()=>v(e),size:`sm`,variant:`ghost`,children:(0,$.jsx)(we,{className:`size-4`})}),(0,$.jsx)(m,{"aria-label":`Delete listener ${e.Protocol}:${e.Port}`,onClick:()=>b(e),size:`sm`,variant:`ghost`,children:(0,$.jsx)(p,{className:`size-4`})})]})})]}),n&&t&&(0,$.jsx)(`tr`,{className:`border-b bg-muted/30 last:border-0`,children:(0,$.jsx)(`td`,{className:`px-4 py-3`,colSpan:6,children:(0,$.jsx)(Pe,{listenerArn:t,targetGroups:O})})})]},t)})})]})}),(0,$.jsx)(Ye,{certificates:k,isPending:l.isPending,lbType:n,onOpenChange:h,onSubmit:async t=>{try{await l.mutateAsync({loadBalancerArn:e,protocol:t.protocol,port:t.port,defaultTargetGroupArn:t.defaultTargetGroupArn,certificateArn:t.certificateArn,sslPolicy:t.sslPolicy}),h(!1)}catch{}},open:f,protocols:r,sslPolicies:j,targetGroups:O}),(0,$.jsx)(Xe,{certificates:k,isPending:d.isPending,listener:g,onOpenChange:e=>!e&&v(void 0),onSubmit:async t=>{if(g?.ListenerArn)try{await d.mutateAsync({listenerArn:g.ListenerArn,loadBalancerArn:e,protocol:t.protocol,port:t.port,defaultTargetGroupArn:t.defaultTargetGroupArn,certificateArn:t.certificateArn,sslPolicy:t.sslPolicy}),v(void 0)}catch{}},protocols:r,sslPolicies:j,targetGroups:O}),(0,$.jsx)(le,{description:y?`Delete listener ${y.Protocol}:${y.Port}? This cannot be undone.`:``,isPending:u.isPending,onConfirm:async()=>{if(y?.ListenerArn)try{await u.mutateAsync(y.ListenerArn)}finally{b(void 0)}},onOpenChange:e=>!e&&b(void 0),open:y!==void 0,title:`Delete listener`})]})}function Ye(e){let t=(0,Te.c)(42),{open:n,onOpenChange:r,lbType:i,protocols:a,targetGroups:o,certificates:s,sslPolicies:c,isPending:l,onSubmit:u}=e,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=V(pe),t[0]=d):d=t[0];let f;t[1]===i?f=t[2]:(f=Ke(i),t[1]=i,t[2]=f);let p;t[3]===f?p=t[4]:(p={resolver:d,defaultValues:f},t[3]=f,t[4]=p);let m=z(p),h,g;t[5]!==m||t[6]!==i||t[7]!==n?(h=()=>{n||m.reset(Ke(i))},g=[n,m,i],t[5]=m,t[6]=i,t[7]=n,t[8]=h,t[9]=g):(h=t[8],g=t[9]),(0,Q.useEffect)(h,g);let _;t[10]!==m||t[11]!==u?(_=m.handleSubmit(u),t[10]=m,t[11]=u,t[12]=_):_=t[12];let v=_,y;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(y={maxWidth:`32rem`,width:`calc(100vw - 2rem)`},t[13]=y):y=t[13];let b;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsxs)(se,{children:[(0,$.jsx)(J,{children:`Add listener`}),(0,$.jsx)(K,{children:`Listeners forward incoming traffic to a default target group.`})]}),t[14]=b):b=t[14];let x;t[15]===v?x=t[16]:(x=e=>{e.preventDefault(),v()},t[15]=v,t[16]=x);let S;t[17]!==s||t[18]!==m||t[19]!==a||t[20]!==c||t[21]!==o?(S=(0,$.jsx)(ke,{certificates:s,form:m,protocols:a,sslPolicies:c,targetGroups:o}),t[17]=s,t[18]=m,t[19]=a,t[20]=c,t[21]=o,t[22]=S):S=t[22];let C;t[23]!==S||t[24]!==x?(C=(0,$.jsx)(`form`,{className:`min-w-0 space-y-4`,onSubmit:x,children:S}),t[23]=S,t[24]=x,t[25]=C):C=t[25];let w;t[26]===l?w=t[27]:(w=(0,$.jsx)(oe,{disabled:l,children:`Cancel`}),t[26]=l,t[27]=w);let T=l?`Adding…`:`Add listener`,E;t[28]!==v||t[29]!==l||t[30]!==T?(E=(0,$.jsx)(Y,{disabled:l,onClick:v,children:T}),t[28]=v,t[29]=l,t[30]=T,t[31]=E):E=t[31];let D;t[32]!==w||t[33]!==E?(D=(0,$.jsxs)(ae,{children:[w,E]}),t[32]=w,t[33]=E,t[34]=D):D=t[34];let O;t[35]!==C||t[36]!==D?(O=(0,$.jsxs)(q,{className:`grid-cols-[minmax(0,1fr)]`,style:y,children:[b,C,D]}),t[35]=C,t[36]=D,t[37]=O):O=t[37];let k;return t[38]!==r||t[39]!==n||t[40]!==O?(k=(0,$.jsx)(ce,{onOpenChange:r,open:n,children:O}),t[38]=r,t[39]=n,t[40]=O,t[41]=k):k=t[41],k}function Xe(e){let t=(0,Te.c)(38),{listener:n,onOpenChange:r,protocols:i,targetGroups:a,certificates:o,sslPolicies:s,isPending:c,onSubmit:l}=e,u=n!==void 0,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={resolver:V(pe),defaultValues:{protocol:`HTTP`,port:80,defaultTargetGroupArn:``}},t[0]=d):d=t[0];let f=z(d),p,m;t[1]!==f||t[2]!==n||t[3]!==i?(p=()=>{if(!n)return;let e=i.find(e=>e===n.Protocol)??i[0]??`HTTP`,t=he(e);f.reset({protocol:e,port:n.Port??80,defaultTargetGroupArn:n.DefaultActions?.[0]?.TargetGroupArn??``,certificateArn:t?n.Certificates?.[0]?.CertificateArn:void 0,sslPolicy:e===`HTTPS`?n.SslPolicy:void 0})},m=[n,f,i],t[1]=f,t[2]=n,t[3]=i,t[4]=p,t[5]=m):(p=t[4],m=t[5]),(0,Q.useEffect)(p,m);let h;t[6]!==f||t[7]!==l?(h=f.handleSubmit(l),t[6]=f,t[7]=l,t[8]=h):h=t[8];let g=h,_;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_={maxWidth:`32rem`,width:`calc(100vw - 2rem)`},t[9]=_):_=t[9];let v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsxs)(se,{children:[(0,$.jsx)(J,{children:`Edit listener`}),(0,$.jsx)(K,{children:`Update port, protocol, or default target group. Changes apply without dropping the listener.`})]}),t[10]=v):v=t[10];let y;t[11]===g?y=t[12]:(y=e=>{e.preventDefault(),g()},t[11]=g,t[12]=y);let b;t[13]!==o||t[14]!==f||t[15]!==i||t[16]!==s||t[17]!==a?(b=(0,$.jsx)(ke,{certificates:o,form:f,protocols:i,sslPolicies:s,targetGroups:a}),t[13]=o,t[14]=f,t[15]=i,t[16]=s,t[17]=a,t[18]=b):b=t[18];let x;t[19]!==y||t[20]!==b?(x=(0,$.jsx)(`form`,{className:`min-w-0 space-y-4`,onSubmit:y,children:b}),t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;t[22]===c?S=t[23]:(S=(0,$.jsx)(oe,{disabled:c,children:`Cancel`}),t[22]=c,t[23]=S);let C=c?`Saving…`:`Save changes`,w;t[24]!==g||t[25]!==c||t[26]!==C?(w=(0,$.jsx)(Y,{disabled:c,onClick:g,children:C}),t[24]=g,t[25]=c,t[26]=C,t[27]=w):w=t[27];let T;t[28]!==S||t[29]!==w?(T=(0,$.jsxs)(ae,{children:[S,w]}),t[28]=S,t[29]=w,t[30]=T):T=t[30];let E;t[31]!==T||t[32]!==x?(E=(0,$.jsxs)(q,{className:`grid-cols-[minmax(0,1fr)]`,style:_,children:[v,x,T]}),t[31]=T,t[32]=x,t[33]=E):E=t[33];let D;return t[34]!==r||t[35]!==u||t[36]!==E?(D=(0,$.jsx)(ce,{onOpenChange:r,open:u,children:E}),t[34]=r,t[35]=u,t[36]=E,t[37]=D):D=t[37],D}function Ze(e,t){if(e.length!==t.length)return!1;let n=new Set(t);return e.every(e=>n.has(e))}function Qe(e){let t=(0,Te.c)(46),{available:n,current:r,onSubmit:i,isPending:a,error:o,isSuccess:s}=e,c;t[0]===r?c=t[1]:(c=[...r],t[0]=r,t[1]=c);let l=c,[u,d]=(0,Q.useState)(l),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{d(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},t[2]=f):f=t[2];let p=f,h;t[3]===l?h=t[4]:(h=()=>d(l),t[3]=l,t[4]=h);let g=h,_;t[5]!==l||t[6]!==u?(_=Ze(u,l),t[5]=l,t[6]=u,t[7]=_):_=t[7];let v=!_,y=u.length===0,b;t[8]!==v||t[9]!==y||t[10]!==i||t[11]!==u?(b=e=>{e.preventDefault(),!(!v||y)&&i(u)},t[8]=v,t[9]=y,t[10]=i,t[11]=u,t[12]=b):b=t[12];let x;t[13]===o?x=t[14]:(x=o&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:o.message||`Failed to update security groups`}),t[13]=o,t[14]=x);let S;t[15]!==v||t[16]!==s?(S=s&&!v&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Security groups updated.`}),t[15]=v,t[16]=s,t[17]=S):S=t[17];let C;t[18]!==n||t[19]!==u?(C=n.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No security groups in this VPC.`}):n.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:u.includes(e.GroupId??``),onChange:()=>p(e.GroupId??``),type:`checkbox`}),(0,$.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId)),t[18]=n,t[19]=u,t[20]=C):C=t[20];let w;t[21]===y?w=t[22]:(w=y&&(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:`At least one security group is required.`}),t[21]=y,t[22]=w);let T;t[23]!==C||t[24]!==w?(T=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 p-4`,children:[C,w]}),t[23]=C,t[24]=w,t[25]=T):T=t[25];let E=v?`Unsaved changes`:`No changes`,D;t[26]===E?D=t[27]:(D=(0,$.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:E}),t[26]=E,t[27]=D);let O=a||!v,k;t[28]!==g||t[29]!==O?(k=(0,$.jsx)(m,{disabled:O,onClick:g,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[28]=g,t[29]=O,t[30]=k):k=t[30];let A=a||!v||y,j=a?`Saving…`:`Save changes`,M;t[31]!==A||t[32]!==j?(M=(0,$.jsx)(m,{disabled:A,size:`sm`,type:`submit`,children:j}),t[31]=A,t[32]=j,t[33]=M):M=t[33];let N;t[34]!==D||t[35]!==k||t[36]!==M?(N=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[D,k,M]}),t[34]=D,t[35]=k,t[36]=M,t[37]=N):N=t[37];let P;t[38]!==T||t[39]!==N?(P=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[T,N]}),t[38]=T,t[39]=N,t[40]=P):P=t[40];let F;return t[41]!==P||t[42]!==b||t[43]!==x||t[44]!==S?(F=(0,$.jsxs)(`form`,{onSubmit:b,children:[x,S,P]}),t[41]=P,t[42]=b,t[43]=x,t[44]=S,t[45]=F):F=t[45],F}function $e(e,t){if(e.length!==t.length)return!1;let n=new Set(t);return e.every(e=>n.has(e))}function et(e){let t=o(e.Tags),n=e.AvailabilityZone?` · ${e.AvailabilityZone}`:``,r=e.CidrBlock?` (${e.CidrBlock})`:``;return`${e.SubnetId}${t?` — ${t}`:``}${r}${n}`}function tt(e){let t=(0,Te.c)(47),{available:n,current:r,onSubmit:i,isPending:a,error:o,isSuccess:s}=e,c;t[0]===r?c=t[1]:(c=[...r],t[0]=r,t[1]=c);let l=c,[u,d]=(0,Q.useState)(l),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{d(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},t[2]=f):f=t[2];let p=f,h;t[3]===l?h=t[4]:(h=()=>d(l),t[3]=l,t[4]=h);let g=h,_;t[5]!==l||t[6]!==u?(_=$e(u,l),t[5]=l,t[6]=u,t[7]=_):_=t[7];let v=!_,y=u.length===0,b;t[8]!==v||t[9]!==y||t[10]!==i||t[11]!==u?(b=e=>{e.preventDefault(),!(!v||y)&&i(u)},t[8]=v,t[9]=y,t[10]=i,t[11]=u,t[12]=b):b=t[12];let x;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-amber-500 bg-amber-500/10 p-3 text-sm text-amber-700 dark:text-amber-400`,role:`note`,children:`Applying a subnet change re-homes the load balancer by relaunching its underlying system VM. Expect a brief data-plane interruption while it restarts.`}),t[13]=x):x=t[13];let S;t[14]===o?S=t[15]:(S=o&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:o.message||`Failed to update subnets`}),t[14]=o,t[15]=S);let C;t[16]!==v||t[17]!==s?(C=s&&!v&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Subnets updated.`}),t[16]=v,t[17]=s,t[18]=C):C=t[18];let w;t[19]!==n||t[20]!==u?(w=n.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No subnets in this VPC.`}):n.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:u.includes(e.SubnetId??``),onChange:()=>p(e.SubnetId??``),type:`checkbox`}),(0,$.jsx)(`span`,{className:`font-mono`,children:et(e)})]},e.SubnetId)),t[19]=n,t[20]=u,t[21]=w):w=t[21];let T;t[22]===y?T=t[23]:(T=y&&(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:`At least one subnet is required.`}),t[22]=y,t[23]=T);let E;t[24]!==T||t[25]!==w?(E=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 p-4`,children:[w,T]}),t[24]=T,t[25]=w,t[26]=E):E=t[26];let D=v?`Unsaved changes`:`No changes`,O;t[27]===D?O=t[28]:(O=(0,$.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:D}),t[27]=D,t[28]=O);let k=a||!v,A;t[29]!==g||t[30]!==k?(A=(0,$.jsx)(m,{disabled:k,onClick:g,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[29]=g,t[30]=k,t[31]=A):A=t[31];let j=a||!v||y,M=a?`Saving…`:`Save changes`,N;t[32]!==j||t[33]!==M?(N=(0,$.jsx)(m,{disabled:j,size:`sm`,type:`submit`,children:M}),t[32]=j,t[33]=M,t[34]=N):N=t[34];let P;t[35]!==O||t[36]!==A||t[37]!==N?(P=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[O,A,N]}),t[35]=O,t[36]=A,t[37]=N,t[38]=P):P=t[38];let F;t[39]!==E||t[40]!==P?(F=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[E,P]}),t[39]=E,t[40]=P,t[41]=F):F=t[41];let I;return t[42]!==F||t[43]!==b||t[44]!==S||t[45]!==C?(I=(0,$.jsxs)(`form`,{onSubmit:b,children:[x,S,C,F]}),t[42]=F,t[43]=b,t[44]=S,t[45]=C,t[46]=I):I=t[46],I}function nt({arn:e}){let t=F(),{data:n}=i(j(e)),{data:r}=i(O(e)),{data:c}=i(I([e])),{data:l}=i(ee),{data:u}=i(k),d=S(),f=v(),h=g(),_=x(),y=b(),[C,w]=(0,Q.useState)(!1),T=n.LoadBalancers?.[0];if(!T?.LoadBalancerArn)return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`Load balancer not found.`})]});let E=async()=>{try{await d.mutateAsync(e),t({to:`/ec2/describe-load-balancers`})}finally{w(!1)}},D=l.Subnets??[],A=e=>{let t=D.find(t=>t.SubnetId===e);if(!t)return e;let n=o(t.Tags),r=t.CidrBlock?` (${t.CidrBlock})`:``;return n?`${e} — ${n}${r}`:`${e}${r}`},M=r.Attributes??[],N=c?.TagDescriptions?.find(t=>t.ResourceArn===e)?.Tags??[],P=(T.SecurityGroups??[]).filter(e=>e!==void 0),te=(u.SecurityGroups??[]).filter(e=>e.VpcId===T.VpcId),L=D.filter(e=>e.VpcId===T.VpcId),R=(T.AvailabilityZones??[]).map(e=>e.SubnetId).filter(e=>e!==void 0),ne=T.Type===`network`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),d.error&&(0,$.jsx)(H,{error:d.error,msg:`Failed to delete load balancer`}),(0,$.jsxs)(`div`,{className:`space-y-6`,children:[(0,$.jsx)(U,{actions:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(m,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,$.jsx)(p,{className:`size-4`}),`Delete`]}),(0,$.jsx)(ue,{state:T.State?.Code})]}),subtitle:`Load Balancer Details`,title:T.LoadBalancerName??T.LoadBalancerArn}),(0,$.jsxs)(Ce,{defaultValue:`overview`,children:[(0,$.jsxs)(xe,{children:[(0,$.jsx)(be,{value:`overview`,children:`Overview`}),(0,$.jsx)(be,{value:`listeners`,children:`Listeners`}),(0,$.jsx)(be,{value:`subnets`,children:`Subnets`}),!ne&&(0,$.jsx)(be,{value:`security-groups`,children:`Security groups`}),(0,$.jsx)(be,{value:`attributes`,children:`Attributes`}),(0,$.jsx)(be,{value:`tags`,children:`Tags`})]}),(0,$.jsxs)(Se,{value:`overview`,children:[(0,$.jsxs)(X,{children:[(0,$.jsx)(X.Header,{children:`Load balancer`}),(0,$.jsxs)(X.Content,{children:[(0,$.jsx)(Z,{label:`ARN`,value:T.LoadBalancerArn}),(0,$.jsx)(Z,{label:`DNS name`,value:T.DNSName}),(0,$.jsx)(Z,{label:`State`,value:T.State?.Reason?`${T.State.Code} — ${T.State.Reason}`:T.State?.Code}),(0,$.jsx)(Z,{label:`Type`,value:T.Type}),(0,$.jsx)(Z,{label:`Scheme`,value:T.Scheme}),(0,$.jsx)(Z,{label:`IP address type`,value:T.IpAddressType}),(0,$.jsx)(Z,{label:`VPC`,value:T.VpcId}),(0,$.jsx)(Z,{label:`Created at`,value:a(T.CreatedTime)})]})]}),(0,$.jsxs)(X,{children:[(0,$.jsx)(X.Header,{children:`Availability zones`}),(0,$.jsx)(X.Content,{children:(T.AvailabilityZones??[]).map(e=>(0,$.jsx)(Z,{label:e.ZoneName??`—`,value:e.SubnetId?A(e.SubnetId):void 0},`${e.ZoneName}-${e.SubnetId}`))})]}),(T.SecurityGroups??[]).length>0&&(0,$.jsxs)(X,{children:[(0,$.jsx)(X.Header,{children:`Security groups`}),(0,$.jsx)(X.Content,{children:(T.SecurityGroups??[]).map(e=>(0,$.jsx)(Z,{label:`Security group`,value:e},e))})]})]}),(0,$.jsx)(Se,{value:`listeners`,children:(0,$.jsx)(Je,{lbType:ne?`network`:`application`,loadBalancerArn:e,vpcId:T.VpcId})}),(0,$.jsx)(Se,{value:`subnets`,children:(0,$.jsx)(tt,{available:L,current:R,error:y.error,isPending:y.isPending,isSuccess:y.isSuccess,onSubmit:t=>y.mutate({loadBalancerArn:e,subnetIds:t})})}),!ne&&(0,$.jsx)(Se,{value:`security-groups`,children:(0,$.jsx)(Qe,{available:te,current:P,error:_.error,isPending:_.isPending,isSuccess:_.isSuccess,onSubmit:t=>_.mutate({loadBalancerArn:e,securityGroupIds:t})})}),(0,$.jsx)(Se,{value:`attributes`,children:(0,$.jsx)(_e,{attributes:M,error:f.error,isPending:f.isPending,isSuccess:f.isSuccess,onSubmit:t=>{f.mutate({loadBalancerArn:e,attributes:t})},specs:ve})}),(0,$.jsx)(Se,{value:`tags`,children:(0,$.jsx)(ye,{error:h.error,isPending:h.isPending,isSuccess:h.isSuccess,onSubmit:t=>h.mutate({resourceArn:e,tags:t,initialKeys:N.map(e=>e.Key??``).filter(e=>e.length>0)}),tags:N})})]})]}),(0,$.jsx)(le,{description:`Are you sure you want to delete load balancer "${T.LoadBalancerName??T.LoadBalancerArn}"? This action cannot be undone.`,isPending:d.isPending,onConfirm:E,onOpenChange:w,open:C,title:`Delete load balancer`})]})}function rt(){let e=(0,Te.c)(2),{id:t}=L.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,$.jsx)(nt,{arn:n}),e[0]=n,e[1]=r),r}export{rt as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{Bt as a,Ut as o}from"./auth.js";import{t as s}from"./back-link.js";import{c,i as l,n as u,s as d,t as f}from"./select.js";import{t as p}from"./trash-2.js";import{t as m}from"./button.js";import{t as h}from"./certificate-import-dialog.js";import{_ as g,a as _,d as v,f as y,g as b,h as x,o as S,r as C,s as w,t as T,u as E}from"./elbv2.js";import{G as D,H as O,J as k,K as A,Qr as j,X as M,Yr as N,Z as P,Zt as F,c as I,et as ee,nr as te,q as L,qt as R}from"./index.js";import{a as ne,i as z,n as re,r as B,t as V}from"./zod.js";import{t as H}from"./error-banner.js";import{t as U}from"./page-heading.js";import{a as W,r as ie,t as G}from"./field.js";import{a as K,i as q,l as J,n as Y,o as ae,r as oe,s as se,t as ce}from"./alert-dialog.js";import{t as le}from"./delete-confirmation-dialog.js";import{n as X,t as Z}from"./detail-row.js";import{t as ue}from"./state-badge.js";import{c as de,i as fe,n as pe,o as me,s as he,t as ge}from"./elbv22.js";import{n as _e,r as ve,t as ye}from"./tags-editor.js";import{i as be,n as xe,r as Se,t as Ce}from"./tabs.js";var we=N(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Te=r(),Q=t(n(),1),$=e(),Ee=80,De=443;function Oe(e){let t=e.CertificateArn?.split(`/`).pop()??e.CertificateArn??``;return e.DomainName?`${e.DomainName} · ${t}`:t}function ke(e){let t=(0,Te.c)(59),{form:n,protocols:r,targetGroups:i,certificates:a,sslPolicies:o}=e,s;t[0]===a?s=t[1]:(s=a===void 0?[]:a,t[0]=a,t[1]=s);let l=s,p;t[2]===o?p=t[3]:(p=o===void 0?[]:o,t[2]=o,t[3]=p);let g=p,{control:_,register:v,getValues:y,setValue:b,formState:x}=n,{errors:S}=x,[C,w]=(0,Q.useState)(!1),T;t[4]===_?T=t[5]:(T={control:_,name:`protocol`},t[4]=_,t[5]=T);let E=ne(T),D=E===`HTTPS`,O;t[6]===E?O=t[7]:(O=he(E),t[6]=E,t[7]=O);let k=O,A;t[8]!==y||t[9]!==b?(A=e=>{if(!e)return;let t=y(`port`);he(e)?(t===Ee&&b(`port`,De),e===`HTTPS`?y(`sslPolicy`)||b(`sslPolicy`,ge):b(`sslPolicy`,void 0)):(t===De&&b(`port`,Ee),b(`certificateArn`,void 0),b(`sslPolicy`,void 0))},t[8]=y,t[9]=b,t[10]=A):A=t[10];let j=A,M;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),t[11]=M):M=t[11];let N;t[12]!==j||t[13]!==r?(N=e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:e=>{t.onChange(e),j(e)},value:t.value,children:[(0,$.jsx)(d,{className:`w-full`,id:`listener-protocol`,children:(0,$.jsx)(c,{})}),(0,$.jsx)(u,{children:r.map(Ne)})]})},t[12]=j,t[13]=r,t[14]=N):N=t[14];let P;t[15]!==_||t[16]!==N?(P=(0,$.jsxs)(G,{children:[M,(0,$.jsx)(re,{control:_,name:`protocol`,render:N})]}),t[15]=_,t[16]=N,t[17]=P):P=t[17];let F;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),t[18]=F):F=t[18];let I=!!S.port,ee=k?`443`:`80`,L;t[19]===v?L=t[20]:(L=v(`port`,{valueAsNumber:!0}),t[19]=v,t[20]=L);let R;t[21]!==I||t[22]!==ee||t[23]!==L?(R=(0,$.jsx)(te,{"aria-invalid":I,id:`listener-port`,inputMode:`numeric`,placeholder:ee,type:`number`,...L}),t[21]=I,t[22]=ee,t[23]=L,t[24]=R):R=t[24];let z;t[25]===S.port?z=t[26]:(z=(0,$.jsx)(ie,{errors:[S.port]}),t[25]=S.port,t[26]=z);let B;t[27]!==R||t[28]!==z?(B=(0,$.jsxs)(G,{children:[F,R,z]}),t[27]=R,t[28]=z,t[29]=B):B=t[29];let V;t[30]!==l||t[31]!==_||t[32]!==S.certificateArn||t[33]!==C||t[34]!==D||t[35]!==k||t[36]!==b||t[37]!==g?(V=k&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,$.jsx)(re,{control:_,name:`certificateArn`,render:e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:t.onChange,value:t.value??``,children:[(0,$.jsx)(d,{"aria-invalid":!!S.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,$.jsx)(c,{placeholder:`Select certificate`})}),(0,$.jsx)(u,{children:l.map(Me)})]})}}),(0,$.jsx)(ie,{errors:[S.certificateArn]}),(0,$.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[l.length===0&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,$.jsx)(m,{className:`ml-auto`,onClick:()=>w(!0),size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),D&&(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,$.jsx)(re,{control:_,name:`sslPolicy`,render:e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:t.onChange,value:t.value??`ELBSecurityPolicy-2016-08`,children:[(0,$.jsx)(d,{className:`w-full`,id:`listener-ssl-policy`,children:(0,$.jsx)(c,{})}),(0,$.jsx)(u,{children:g.map(je)})]})}})]}),(0,$.jsx)(h,{onImported:e=>b(`certificateArn`,e,{shouldValidate:!0}),onOpenChange:w,open:C})]}),t[30]=l,t[31]=_,t[32]=S.certificateArn,t[33]=C,t[34]=D,t[35]=k,t[36]=b,t[37]=g,t[38]=V):V=t[38];let H;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`listener-default-tg`,children:`Default target group`})}),t[39]=H):H=t[39];let U;t[40]!==S.defaultTargetGroupArn||t[41]!==i?(U=e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:t.onChange,value:t.value??``,children:[(0,$.jsx)(d,{"aria-invalid":!!S.defaultTargetGroupArn,className:`w-full`,id:`listener-default-tg`,children:(0,$.jsx)(c,{placeholder:`Select target group`})}),(0,$.jsx)(u,{children:i.map(Ae)})]})},t[40]=S.defaultTargetGroupArn,t[41]=i,t[42]=U):U=t[42];let K;t[43]!==_||t[44]!==U?(K=(0,$.jsx)(re,{control:_,name:`defaultTargetGroupArn`,render:U}),t[43]=_,t[44]=U,t[45]=K):K=t[45];let q;t[46]===S.defaultTargetGroupArn?q=t[47]:(q=(0,$.jsx)(ie,{errors:[S.defaultTargetGroupArn]}),t[46]=S.defaultTargetGroupArn,t[47]=q);let J;t[48]===i.length?J=t[49]:(J=i.length===0&&(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups available in this VPC. Create one first.`}),t[48]=i.length,t[49]=J);let Y;t[50]!==K||t[51]!==q||t[52]!==J?(Y=(0,$.jsxs)(G,{children:[H,K,q,J]}),t[50]=K,t[51]=q,t[52]=J,t[53]=Y):Y=t[53];let ae;return t[54]!==P||t[55]!==B||t[56]!==V||t[57]!==Y?(ae=(0,$.jsxs)($.Fragment,{children:[P,B,V,Y]}),t[54]=P,t[55]=B,t[56]=V,t[57]=Y,t[58]=ae):ae=t[58],ae}function Ae(e){return(0,$.jsxs)(l,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function je(e){return(0,$.jsx)(l,{value:e.Name??``,children:e.Name},e.Name)}function Me(e){return(0,$.jsx)(l,{value:e.CertificateArn??``,children:Oe(e)},e.CertificateArn)}function Ne(e){return(0,$.jsx)(l,{value:e,children:e},e)}function Pe({listenerArn:e,targetGroups:t}){let{data:n}=i(D(e)),r=C(),a=y(),o=w(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(),[d,f]=(0,Q.useState)(),h=n.Rules??[],g=new Map;for(let e of t)e.TargetGroupArn&&e.TargetGroupName&&g.set(e.TargetGroupArn,e.TargetGroupName);return(0,$.jsxs)(`div`,{className:`space-y-3`,children:[r.error&&(0,$.jsx)(H,{error:r.error,msg:`Failed to create rule`}),a.error&&(0,$.jsx)(H,{error:a.error,msg:`Failed to modify rule`}),o.error&&(0,$.jsx)(H,{error:o.error,msg:`Failed to delete rule`}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[h.length,` rule`,h.length===1?``:`s`,` (including default)`]}),(0,$.jsx)(m,{onClick:()=>c(!0),size:`sm`,children:`Add rule`})]}),(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,$.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Priority`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Conditions`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Forward to`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(`tbody`,{children:h.map(e=>(0,$.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Priority}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:Fe(e.Conditions,e.IsDefault===!0)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:Le(e,g)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-right`,children:e.IsDefault===!0?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Edit via listener`}):(0,$.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,$.jsx)(m,{"aria-label":`Edit rule ${e.Priority}`,onClick:()=>u(e),size:`sm`,variant:`ghost`,children:(0,$.jsx)(we,{className:`size-4`})}),(0,$.jsx)(m,{"aria-label":`Delete rule ${e.Priority}`,onClick:()=>f(e),size:`sm`,variant:`ghost`,children:(0,$.jsx)(p,{className:`size-4`})})]})})]},e.RuleArn??e.Priority??`default`))})]})}),(0,$.jsx)(ze,{isPending:r.isPending,mode:`add`,onOpenChange:c,onSubmit:async t=>{try{await r.mutateAsync({listenerArn:e,priority:t.priority,conditions:t.conditions.map(Re),forwardTargetGroupArn:t.forwardTargetGroupArn}),c(!1)}catch{}},open:s,targetGroups:t}),(0,$.jsx)(ze,{initialRule:l,isPending:a.isPending,mode:`edit`,onOpenChange:e=>!e&&u(void 0),onSubmit:async t=>{if(l?.RuleArn)try{await a.mutateAsync({ruleArn:l.RuleArn,listenerArn:e,conditions:t.conditions.map(Re),forwardTargetGroupArn:t.forwardTargetGroupArn}),u(void 0)}catch{}},open:l!==void 0,targetGroups:t}),(0,$.jsx)(le,{description:d?`Delete rule with priority ${d.Priority}? This cannot be undone.`:``,isPending:o.isPending,onConfirm:async()=>{if(d?.RuleArn)try{await o.mutateAsync({ruleArn:d.RuleArn,listenerArn:e})}finally{f(void 0)}},onOpenChange:e=>!e&&f(void 0),open:d!==void 0,title:`Delete rule`})]})}function Fe(e,t){return t?`default`:!e||e.length===0?`—`:e.map(e=>{let t=Ie(e);return`${e.Field}: ${t.join(`, `)}`}).join(` AND `)}function Ie(e){if(e.Field===void 0)return e.Values??[];switch(e.Field){case`host-header`:return e.HostHeaderConfig?.Values??e.Values??[];case`path-pattern`:return e.PathPatternConfig?.Values??e.Values??[];case`http-header`:{let t=e.HttpHeaderConfig?.HttpHeaderName??`?`;return(e.HttpHeaderConfig?.Values??[]).map(e=>`${t}=${e}`)}case`http-request-method`:return e.HttpRequestMethodConfig?.Values??[];case`source-ip`:return e.SourceIpConfig?.Values??[];case`query-string`:return(e.QueryStringConfig?.Values??[]).map(e=>e.Key?`${e.Key}=${e.Value??``}`:e.Value??``);default:return e.Values??[]}}function Le(e,t){let n=e.Actions?.[0];return n?n.Type===`forward`&&n.TargetGroupArn?t.get(n.TargetGroupArn)??n.TargetGroupArn:n.Type??`—`:`—`}function Re(e){let t=e.rawValues.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0);return e.field===`query-string`?{field:e.field,values:[],queryStringPairs:t.map(e=>{let t=e.indexOf(`=`);return t===-1?{value:e}:{key:e.slice(0,t),value:e.slice(t+1)}})}:{field:e.field,values:t,httpHeaderName:e.httpHeaderName}}function ze({open:e,onOpenChange:t,onSubmit:n,isPending:r,targetGroups:i,mode:a,initialRule:o}){let s=[{field:`path-pattern`,rawValues:``}],p=z({resolver:V(fe),defaultValues:{priority:1,conditions:s,forwardTargetGroupArn:``}}),{fields:h,append:g,remove:_}=B({control:p.control,name:`conditions`});(0,Q.useEffect)(()=>{if(a===`add`){e||p.reset({priority:1,conditions:s,forwardTargetGroupArn:``});return}if(!o)return;let t=Number(o.Priority??1),n=o.Conditions?.map(e=>We(e))??s;p.reset({priority:Number.isFinite(t)?t:1,conditions:n.length>0?n:s,forwardTargetGroupArn:o.Actions?.[0]?.TargetGroupArn??``})},[o,e,a]);let v=p.handleSubmit(n);return(0,$.jsx)(ce,{onOpenChange:t,open:e,children:(0,$.jsxs)(q,{className:`grid-cols-[minmax(0,1fr)]`,style:{maxWidth:`40rem`,width:`calc(100vw - 2rem)`},children:[(0,$.jsxs)(se,{children:[(0,$.jsx)(J,{children:a===`add`?`Add rule`:`Edit rule`}),(0,$.jsx)(K,{children:`Routing rules match incoming requests and forward them to a target group. Rules evaluate in priority order; the listener default applies when no rule matches.`})]}),(0,$.jsxs)(`form`,{className:`min-w-0 space-y-4`,onSubmit:e=>{e.preventDefault(),v()},children:[(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`rule-priority`,children:`Priority`})}),(0,$.jsx)(te,{"aria-invalid":!!p.formState.errors.priority,id:`rule-priority`,inputMode:`numeric`,type:`number`,...p.register(`priority`,{valueAsNumber:!0})}),(0,$.jsx)(ie,{errors:[p.formState.errors.priority]})]}),(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsx)(W,{children:`Conditions`}),(0,$.jsx)(m,{disabled:h.length>=5,onClick:()=>g({field:`path-pattern`,rawValues:``}),size:`sm`,type:`button`,variant:`outline`,children:`Add condition`})]}),h.map((e,t)=>(0,$.jsx)(Be,{form:p,index:t,onRemove:h.length>1?()=>_(t):void 0},e.id))]}),(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`rule-forward-tg`,children:`Forward to target group`})}),(0,$.jsx)(re,{control:p.control,name:`forwardTargetGroupArn`,render:({field:e})=>(0,$.jsxs)(f,{onValueChange:e.onChange,value:e.value??``,children:[(0,$.jsx)(d,{"aria-invalid":!!p.formState.errors.forwardTargetGroupArn,className:`w-full`,id:`rule-forward-tg`,children:(0,$.jsx)(c,{placeholder:`Select target group`})}),(0,$.jsx)(u,{children:i.map(e=>(0,$.jsxs)(l,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn))})]})}),(0,$.jsx)(ie,{errors:[p.formState.errors.forwardTargetGroupArn]})]})]}),(0,$.jsxs)(ae,{children:[(0,$.jsx)(oe,{disabled:r,children:`Cancel`}),(0,$.jsx)(Y,{disabled:r,onClick:v,children:Ge(a,r)})]})]})})}function Be(e){let t=(0,Te.c)(54),{form:n,index:r,onRemove:i}=e,a,o,s,h,g,_,v,y,b,x;if(t[0]!==n||t[1]!==r||t[2]!==i){let e=n.watch(`conditions.${r}.field`);s=n.formState.errors.conditions?.[r],y=`space-y-2 rounded-md border p-3`;let S=`rule-cond-${r}-field`,C;t[13]===S?C=t[14]:(C=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:S,children:`Type`})}),t[13]=S,t[14]=C);let w=`conditions.${r}.field`,T;t[15]===r?T=t[16]:(T=e=>{let{field:t}=e;return(0,$.jsxs)(f,{onValueChange:t.onChange,value:t.value,children:[(0,$.jsx)(d,{className:`w-full`,id:`rule-cond-${r}-field`,children:(0,$.jsx)(c,{})}),(0,$.jsxs)(u,{children:[(0,$.jsx)(l,{value:`path-pattern`,children:`Path pattern`}),(0,$.jsx)(l,{value:`host-header`,children:`Host header`}),(0,$.jsx)(l,{value:`http-header`,children:`HTTP header`}),(0,$.jsx)(l,{value:`http-request-method`,children:`HTTP method`}),(0,$.jsx)(l,{value:`source-ip`,children:`Source IP CIDR`}),(0,$.jsx)(l,{value:`query-string`,children:`Query string`})]})]})},t[15]=r,t[16]=T);let E;t[17]!==n.control||t[18]!==w||t[19]!==T?(E=(0,$.jsx)(re,{control:n.control,name:w,render:T}),t[17]=n.control,t[18]=w,t[19]=T,t[20]=E):E=t[20];let D;t[21]!==E||t[22]!==C?(D=(0,$.jsxs)(`div`,{className:`flex-1`,children:[C,E]}),t[21]=E,t[22]=C,t[23]=D):D=t[23];let O;t[24]!==r||t[25]!==i?(O=i&&(0,$.jsx)(m,{"aria-label":`Remove condition ${r+1}`,className:`self-end`,onClick:i,size:`sm`,type:`button`,variant:`ghost`,children:(0,$.jsx)(p,{className:`size-4`})}),t[24]=r,t[25]=i,t[26]=O):O=t[26],t[27]!==D||t[28]!==O?(b=(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[D,O]}),t[27]=D,t[28]=O,t[29]=b):b=t[29],x=e===`http-header`&&(0,$.jsxs)(G,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`rule-cond-${r}-hdr-name`,children:`Header name`})}),(0,$.jsx)(te,{"aria-invalid":!!s?.httpHeaderName,id:`rule-cond-${r}-hdr-name`,placeholder:`X-Tenant`,...n.register(`conditions.${r}.httpHeaderName`)}),(0,$.jsx)(ie,{errors:[s?.httpHeaderName]})]}),o=G;let k=`rule-cond-${r}-values`,A;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`(comma or newline separated, max 5)`}),t[30]=A):A=t[30],t[31]===k?v=t[32]:(v=(0,$.jsx)(W,{children:(0,$.jsxs)(`label`,{htmlFor:k,children:[`Values`,` `,A]})}),t[31]=k,t[32]=v),a=te,h=!!s?.rawValues,g=`rule-cond-${r}-values`,_=Ve(e),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=h,t[7]=g,t[8]=_,t[9]=v,t[10]=y,t[11]=b,t[12]=x}else a=t[3],o=t[4],s=t[5],h=t[6],g=t[7],_=t[8],v=t[9],y=t[10],b=t[11],x=t[12];let S;t[33]!==n||t[34]!==r?(S=n.register(`conditions.${r}.rawValues`),t[33]=n,t[34]=r,t[35]=S):S=t[35];let C;t[36]!==a||t[37]!==h||t[38]!==g||t[39]!==_||t[40]!==S?(C=(0,$.jsx)(a,{"aria-invalid":h,id:g,placeholder:_,...S}),t[36]=a,t[37]=h,t[38]=g,t[39]=_,t[40]=S,t[41]=C):C=t[41];let w=s?.rawValues,T;t[42]===w?T=t[43]:(T=(0,$.jsx)(ie,{errors:[w]}),t[42]=w,t[43]=T);let E;t[44]!==o||t[45]!==T||t[46]!==v||t[47]!==C?(E=(0,$.jsxs)(o,{children:[v,C,T]}),t[44]=o,t[45]=T,t[46]=v,t[47]=C,t[48]=E):E=t[48];let D;return t[49]!==E||t[50]!==y||t[51]!==b||t[52]!==x?(D=(0,$.jsxs)(`div`,{className:y,children:[b,x,E]}),t[49]=E,t[50]=y,t[51]=b,t[52]=x,t[53]=D):D=t[53],D}function Ve(e){switch(e){case`path-pattern`:return`/api/*`;case`host-header`:return`*.example.com`;case`http-header`:return`acme`;case`http-request-method`:return`GET, POST`;case`source-ip`:return`10.0.0.0/8`;case`query-string`:return`key=value`;default:return``}}var He=new Set([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]);function Ue(e){return e!==void 0&&He.has(e)}function We(e){let t=Ie(e);return{field:Ue(e.Field)?e.Field:`path-pattern`,httpHeaderName:e.HttpHeaderConfig?.HttpHeaderName,rawValues:t.join(`, `)}}function Ge(e,t){return t?e===`add`?`Adding…`:`Saving…`:e===`add`?`Add rule`:`Save changes`}function Ke(e){return{protocol:me(e),port:80,defaultTargetGroupArn:``}}function qe(e){if(e.Protocol!==`HTTPS`)return`—`;let t=e.Certificates?.[0]?.CertificateArn?.split(`/`).pop(),n=e.SslPolicy;return t&&n?`${n} · ${t}`:n??t??`—`}function Je({loadBalancerArn:e,vpcId:t,lbType:n}){let r=de(n),{data:a}=i(A(e)),{data:o}=i(ee),{data:s}=i(O),{data:c}=i(M),l=T(),u=_(),d=E(),[f,h]=(0,Q.useState)(!1),[g,v]=(0,Q.useState)(),[y,b]=(0,Q.useState)(),[x,S]=(0,Q.useState)(),C=a.Listeners??[],w=o.TargetGroups??[],D=w.filter(e=>e.VpcId===t),k=s.CertificateSummaryList??[],j=c.SslPolicies??[],N=new Map;for(let e of w)e.TargetGroupArn&&e.TargetGroupName&&N.set(e.TargetGroupArn,e.TargetGroupName);let P=e=>{let t=e.DefaultActions?.[0];if(!t)return`—`;if(t.Type===`forward`&&t.TargetGroupArn){let e=N.get(t.TargetGroupArn);return e?`forward → ${e}`:`forward → ${t.TargetGroupArn}`}return t.Type??`—`};return(0,$.jsxs)(`div`,{className:`space-y-3`,children:[l.error&&(0,$.jsx)(H,{error:l.error,msg:`Failed to create listener`}),d.error&&(0,$.jsx)(H,{error:d.error,msg:`Failed to modify listener`}),u.error&&(0,$.jsx)(H,{error:u.error,msg:`Failed to delete listener`}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[C.length,` listener`,C.length===1?``:`s`]}),(0,$.jsx)(m,{onClick:()=>h(!0),size:`sm`,children:`Add listener`})]}),C.length===0?(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No listeners configured.`}):(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,$.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`TLS`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Default action`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Listener ARN`}),(0,$.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,$.jsx)(`tbody`,{children:C.map(e=>{let t=e.ListenerArn??``,n=x===t;return(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol}),(0,$.jsx)(`td`,{className:`px-4 py-2`,children:e.Port}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:qe(e)}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:P(e)}),(0,$.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t}),(0,$.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,$.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,$.jsx)(m,{"aria-label":`${n?`Hide`:`Show`} rules for listener ${e.Protocol}:${e.Port}`,onClick:()=>S(n?void 0:t),size:`sm`,variant:`ghost`,children:n?`Hide rules`:`Rules`}),(0,$.jsx)(m,{"aria-label":`Edit listener ${e.Protocol}:${e.Port}`,onClick:()=>v(e),size:`sm`,variant:`ghost`,children:(0,$.jsx)(we,{className:`size-4`})}),(0,$.jsx)(m,{"aria-label":`Delete listener ${e.Protocol}:${e.Port}`,onClick:()=>b(e),size:`sm`,variant:`ghost`,children:(0,$.jsx)(p,{className:`size-4`})})]})})]}),n&&t&&(0,$.jsx)(`tr`,{className:`border-b bg-muted/30 last:border-0`,children:(0,$.jsx)(`td`,{className:`px-4 py-3`,colSpan:6,children:(0,$.jsx)(Pe,{listenerArn:t,targetGroups:D})})})]},t)})})]})}),(0,$.jsx)(Ye,{certificates:k,isPending:l.isPending,lbType:n,onOpenChange:h,onSubmit:async t=>{try{await l.mutateAsync({loadBalancerArn:e,protocol:t.protocol,port:t.port,defaultTargetGroupArn:t.defaultTargetGroupArn,certificateArn:t.certificateArn,sslPolicy:t.sslPolicy}),h(!1)}catch{}},open:f,protocols:r,sslPolicies:j,targetGroups:D}),(0,$.jsx)(Xe,{certificates:k,isPending:d.isPending,listener:g,onOpenChange:e=>!e&&v(void 0),onSubmit:async t=>{if(g?.ListenerArn)try{await d.mutateAsync({listenerArn:g.ListenerArn,loadBalancerArn:e,protocol:t.protocol,port:t.port,defaultTargetGroupArn:t.defaultTargetGroupArn,certificateArn:t.certificateArn,sslPolicy:t.sslPolicy}),v(void 0)}catch{}},protocols:r,sslPolicies:j,targetGroups:D}),(0,$.jsx)(le,{description:y?`Delete listener ${y.Protocol}:${y.Port}? This cannot be undone.`:``,isPending:u.isPending,onConfirm:async()=>{if(y?.ListenerArn)try{await u.mutateAsync(y.ListenerArn)}finally{b(void 0)}},onOpenChange:e=>!e&&b(void 0),open:y!==void 0,title:`Delete listener`})]})}function Ye(e){let t=(0,Te.c)(42),{open:n,onOpenChange:r,lbType:i,protocols:a,targetGroups:o,certificates:s,sslPolicies:c,isPending:l,onSubmit:u}=e,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=V(pe),t[0]=d):d=t[0];let f;t[1]===i?f=t[2]:(f=Ke(i),t[1]=i,t[2]=f);let p;t[3]===f?p=t[4]:(p={resolver:d,defaultValues:f},t[3]=f,t[4]=p);let m=z(p),h,g;t[5]!==m||t[6]!==i||t[7]!==n?(h=()=>{n||m.reset(Ke(i))},g=[n,m,i],t[5]=m,t[6]=i,t[7]=n,t[8]=h,t[9]=g):(h=t[8],g=t[9]),(0,Q.useEffect)(h,g);let _;t[10]!==m||t[11]!==u?(_=m.handleSubmit(u),t[10]=m,t[11]=u,t[12]=_):_=t[12];let v=_,y;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(y={maxWidth:`32rem`,width:`calc(100vw - 2rem)`},t[13]=y):y=t[13];let b;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsxs)(se,{children:[(0,$.jsx)(J,{children:`Add listener`}),(0,$.jsx)(K,{children:`Listeners forward incoming traffic to a default target group.`})]}),t[14]=b):b=t[14];let x;t[15]===v?x=t[16]:(x=e=>{e.preventDefault(),v()},t[15]=v,t[16]=x);let S;t[17]!==s||t[18]!==m||t[19]!==a||t[20]!==c||t[21]!==o?(S=(0,$.jsx)(ke,{certificates:s,form:m,protocols:a,sslPolicies:c,targetGroups:o}),t[17]=s,t[18]=m,t[19]=a,t[20]=c,t[21]=o,t[22]=S):S=t[22];let C;t[23]!==S||t[24]!==x?(C=(0,$.jsx)(`form`,{className:`min-w-0 space-y-4`,onSubmit:x,children:S}),t[23]=S,t[24]=x,t[25]=C):C=t[25];let w;t[26]===l?w=t[27]:(w=(0,$.jsx)(oe,{disabled:l,children:`Cancel`}),t[26]=l,t[27]=w);let T=l?`Adding…`:`Add listener`,E;t[28]!==v||t[29]!==l||t[30]!==T?(E=(0,$.jsx)(Y,{disabled:l,onClick:v,children:T}),t[28]=v,t[29]=l,t[30]=T,t[31]=E):E=t[31];let D;t[32]!==w||t[33]!==E?(D=(0,$.jsxs)(ae,{children:[w,E]}),t[32]=w,t[33]=E,t[34]=D):D=t[34];let O;t[35]!==C||t[36]!==D?(O=(0,$.jsxs)(q,{className:`grid-cols-[minmax(0,1fr)]`,style:y,children:[b,C,D]}),t[35]=C,t[36]=D,t[37]=O):O=t[37];let k;return t[38]!==r||t[39]!==n||t[40]!==O?(k=(0,$.jsx)(ce,{onOpenChange:r,open:n,children:O}),t[38]=r,t[39]=n,t[40]=O,t[41]=k):k=t[41],k}function Xe(e){let t=(0,Te.c)(38),{listener:n,onOpenChange:r,protocols:i,targetGroups:a,certificates:o,sslPolicies:s,isPending:c,onSubmit:l}=e,u=n!==void 0,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={resolver:V(pe),defaultValues:{protocol:`HTTP`,port:80,defaultTargetGroupArn:``}},t[0]=d):d=t[0];let f=z(d),p,m;t[1]!==f||t[2]!==n||t[3]!==i?(p=()=>{if(!n)return;let e=i.find(e=>e===n.Protocol)??i[0]??`HTTP`,t=he(e);f.reset({protocol:e,port:n.Port??80,defaultTargetGroupArn:n.DefaultActions?.[0]?.TargetGroupArn??``,certificateArn:t?n.Certificates?.[0]?.CertificateArn:void 0,sslPolicy:e===`HTTPS`?n.SslPolicy:void 0})},m=[n,f,i],t[1]=f,t[2]=n,t[3]=i,t[4]=p,t[5]=m):(p=t[4],m=t[5]),(0,Q.useEffect)(p,m);let h;t[6]!==f||t[7]!==l?(h=f.handleSubmit(l),t[6]=f,t[7]=l,t[8]=h):h=t[8];let g=h,_;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_={maxWidth:`32rem`,width:`calc(100vw - 2rem)`},t[9]=_):_=t[9];let v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsxs)(se,{children:[(0,$.jsx)(J,{children:`Edit listener`}),(0,$.jsx)(K,{children:`Update port, protocol, or default target group. Changes apply without dropping the listener.`})]}),t[10]=v):v=t[10];let y;t[11]===g?y=t[12]:(y=e=>{e.preventDefault(),g()},t[11]=g,t[12]=y);let b;t[13]!==o||t[14]!==f||t[15]!==i||t[16]!==s||t[17]!==a?(b=(0,$.jsx)(ke,{certificates:o,form:f,protocols:i,sslPolicies:s,targetGroups:a}),t[13]=o,t[14]=f,t[15]=i,t[16]=s,t[17]=a,t[18]=b):b=t[18];let x;t[19]!==y||t[20]!==b?(x=(0,$.jsx)(`form`,{className:`min-w-0 space-y-4`,onSubmit:y,children:b}),t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;t[22]===c?S=t[23]:(S=(0,$.jsx)(oe,{disabled:c,children:`Cancel`}),t[22]=c,t[23]=S);let C=c?`Saving…`:`Save changes`,w;t[24]!==g||t[25]!==c||t[26]!==C?(w=(0,$.jsx)(Y,{disabled:c,onClick:g,children:C}),t[24]=g,t[25]=c,t[26]=C,t[27]=w):w=t[27];let T;t[28]!==S||t[29]!==w?(T=(0,$.jsxs)(ae,{children:[S,w]}),t[28]=S,t[29]=w,t[30]=T):T=t[30];let E;t[31]!==T||t[32]!==x?(E=(0,$.jsxs)(q,{className:`grid-cols-[minmax(0,1fr)]`,style:_,children:[v,x,T]}),t[31]=T,t[32]=x,t[33]=E):E=t[33];let D;return t[34]!==r||t[35]!==u||t[36]!==E?(D=(0,$.jsx)(ce,{onOpenChange:r,open:u,children:E}),t[34]=r,t[35]=u,t[36]=E,t[37]=D):D=t[37],D}function Ze(e,t){if(e.length!==t.length)return!1;let n=new Set(t);return e.every(e=>n.has(e))}function Qe(e){let t=(0,Te.c)(46),{available:n,current:r,onSubmit:i,isPending:a,error:o,isSuccess:s}=e,c;t[0]===r?c=t[1]:(c=[...r],t[0]=r,t[1]=c);let l=c,[u,d]=(0,Q.useState)(l),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{d(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},t[2]=f):f=t[2];let p=f,h;t[3]===l?h=t[4]:(h=()=>d(l),t[3]=l,t[4]=h);let g=h,_;t[5]!==l||t[6]!==u?(_=Ze(u,l),t[5]=l,t[6]=u,t[7]=_):_=t[7];let v=!_,y=u.length===0,b;t[8]!==v||t[9]!==y||t[10]!==i||t[11]!==u?(b=e=>{e.preventDefault(),!(!v||y)&&i(u)},t[8]=v,t[9]=y,t[10]=i,t[11]=u,t[12]=b):b=t[12];let x;t[13]===o?x=t[14]:(x=o&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:o.message||`Failed to update security groups`}),t[13]=o,t[14]=x);let S;t[15]!==v||t[16]!==s?(S=s&&!v&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Security groups updated.`}),t[15]=v,t[16]=s,t[17]=S):S=t[17];let C;t[18]!==n||t[19]!==u?(C=n.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No security groups in this VPC.`}):n.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:u.includes(e.GroupId??``),onChange:()=>p(e.GroupId??``),type:`checkbox`}),(0,$.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId)),t[18]=n,t[19]=u,t[20]=C):C=t[20];let w;t[21]===y?w=t[22]:(w=y&&(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:`At least one security group is required.`}),t[21]=y,t[22]=w);let T;t[23]!==C||t[24]!==w?(T=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 p-4`,children:[C,w]}),t[23]=C,t[24]=w,t[25]=T):T=t[25];let E=v?`Unsaved changes`:`No changes`,D;t[26]===E?D=t[27]:(D=(0,$.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:E}),t[26]=E,t[27]=D);let O=a||!v,k;t[28]!==g||t[29]!==O?(k=(0,$.jsx)(m,{disabled:O,onClick:g,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[28]=g,t[29]=O,t[30]=k):k=t[30];let A=a||!v||y,j=a?`Saving…`:`Save changes`,M;t[31]!==A||t[32]!==j?(M=(0,$.jsx)(m,{disabled:A,size:`sm`,type:`submit`,children:j}),t[31]=A,t[32]=j,t[33]=M):M=t[33];let N;t[34]!==D||t[35]!==k||t[36]!==M?(N=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[D,k,M]}),t[34]=D,t[35]=k,t[36]=M,t[37]=N):N=t[37];let P;t[38]!==T||t[39]!==N?(P=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[T,N]}),t[38]=T,t[39]=N,t[40]=P):P=t[40];let F;return t[41]!==P||t[42]!==b||t[43]!==x||t[44]!==S?(F=(0,$.jsxs)(`form`,{onSubmit:b,children:[x,S,P]}),t[41]=P,t[42]=b,t[43]=x,t[44]=S,t[45]=F):F=t[45],F}function $e(e,t){if(e.length!==t.length)return!1;let n=new Set(t);return e.every(e=>n.has(e))}function et(e){let t=o(e.Tags),n=e.AvailabilityZone?` · ${e.AvailabilityZone}`:``,r=e.CidrBlock?` (${e.CidrBlock})`:``;return`${e.SubnetId}${t?` — ${t}`:``}${r}${n}`}function tt(e){let t=(0,Te.c)(47),{available:n,current:r,onSubmit:i,isPending:a,error:o,isSuccess:s}=e,c;t[0]===r?c=t[1]:(c=[...r],t[0]=r,t[1]=c);let l=c,[u,d]=(0,Q.useState)(l),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{d(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},t[2]=f):f=t[2];let p=f,h;t[3]===l?h=t[4]:(h=()=>d(l),t[3]=l,t[4]=h);let g=h,_;t[5]!==l||t[6]!==u?(_=$e(u,l),t[5]=l,t[6]=u,t[7]=_):_=t[7];let v=!_,y=u.length===0,b;t[8]!==v||t[9]!==y||t[10]!==i||t[11]!==u?(b=e=>{e.preventDefault(),!(!v||y)&&i(u)},t[8]=v,t[9]=y,t[10]=i,t[11]=u,t[12]=b):b=t[12];let x;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-amber-500 bg-amber-500/10 p-3 text-sm text-amber-700 dark:text-amber-400`,role:`note`,children:`Applying a subnet change re-homes the load balancer by relaunching its underlying system VM. Expect a brief data-plane interruption while it restarts.`}),t[13]=x):x=t[13];let S;t[14]===o?S=t[15]:(S=o&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:o.message||`Failed to update subnets`}),t[14]=o,t[15]=S);let C;t[16]!==v||t[17]!==s?(C=s&&!v&&(0,$.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Subnets updated.`}),t[16]=v,t[17]=s,t[18]=C):C=t[18];let w;t[19]!==n||t[20]!==u?(w=n.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No subnets in this VPC.`}):n.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:u.includes(e.SubnetId??``),onChange:()=>p(e.SubnetId??``),type:`checkbox`}),(0,$.jsx)(`span`,{className:`font-mono`,children:et(e)})]},e.SubnetId)),t[19]=n,t[20]=u,t[21]=w):w=t[21];let T;t[22]===y?T=t[23]:(T=y&&(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:`At least one subnet is required.`}),t[22]=y,t[23]=T);let E;t[24]!==T||t[25]!==w?(E=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 p-4`,children:[w,T]}),t[24]=T,t[25]=w,t[26]=E):E=t[26];let D=v?`Unsaved changes`:`No changes`,O;t[27]===D?O=t[28]:(O=(0,$.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:D}),t[27]=D,t[28]=O);let k=a||!v,A;t[29]!==g||t[30]!==k?(A=(0,$.jsx)(m,{disabled:k,onClick:g,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[29]=g,t[30]=k,t[31]=A):A=t[31];let j=a||!v||y,M=a?`Saving…`:`Save changes`,N;t[32]!==j||t[33]!==M?(N=(0,$.jsx)(m,{disabled:j,size:`sm`,type:`submit`,children:M}),t[32]=j,t[33]=M,t[34]=N):N=t[34];let P;t[35]!==O||t[36]!==A||t[37]!==N?(P=(0,$.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[O,A,N]}),t[35]=O,t[36]=A,t[37]=N,t[38]=P):P=t[38];let F;t[39]!==E||t[40]!==P?(F=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[E,P]}),t[39]=E,t[40]=P,t[41]=F):F=t[41];let I;return t[42]!==F||t[43]!==b||t[44]!==S||t[45]!==C?(I=(0,$.jsxs)(`form`,{onSubmit:b,children:[x,S,C,F]}),t[42]=F,t[43]=b,t[44]=S,t[45]=C,t[46]=I):I=t[46],I}function nt({arn:e}){let t=j(),{data:n}=i(k(e)),{data:r}=i(L(e)),{data:c}=i(P([e])),{data:l}=i(F),{data:u}=i(R),d=S(),f=v(),h=g(),_=x(),y=b(),[C,w]=(0,Q.useState)(!1),T=n.LoadBalancers?.[0];if(!T?.LoadBalancerArn)return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`Load balancer not found.`})]});let E=async()=>{try{await d.mutateAsync(e),t({to:`/ec2/describe-load-balancers`})}finally{w(!1)}},D=l.Subnets??[],O=e=>{let t=D.find(t=>t.SubnetId===e);if(!t)return e;let n=o(t.Tags),r=t.CidrBlock?` (${t.CidrBlock})`:``;return n?`${e} — ${n}${r}`:`${e}${r}`},A=r.Attributes??[],M=c?.TagDescriptions?.find(t=>t.ResourceArn===e)?.Tags??[],N=(T.SecurityGroups??[]).filter(e=>e!==void 0),I=(u.SecurityGroups??[]).filter(e=>e.VpcId===T.VpcId),ee=D.filter(e=>e.VpcId===T.VpcId),te=(T.AvailabilityZones??[]).map(e=>e.SubnetId).filter(e=>e!==void 0),ne=T.Type===`network`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),d.error&&(0,$.jsx)(H,{error:d.error,msg:`Failed to delete load balancer`}),(0,$.jsxs)(`div`,{className:`space-y-6`,children:[(0,$.jsx)(U,{actions:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(m,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,$.jsx)(p,{className:`size-4`}),`Delete`]}),(0,$.jsx)(ue,{state:T.State?.Code})]}),subtitle:`Load Balancer Details`,title:T.LoadBalancerName??T.LoadBalancerArn}),(0,$.jsxs)(Ce,{defaultValue:`overview`,children:[(0,$.jsxs)(xe,{children:[(0,$.jsx)(be,{value:`overview`,children:`Overview`}),(0,$.jsx)(be,{value:`listeners`,children:`Listeners`}),(0,$.jsx)(be,{value:`subnets`,children:`Subnets`}),!ne&&(0,$.jsx)(be,{value:`security-groups`,children:`Security groups`}),(0,$.jsx)(be,{value:`attributes`,children:`Attributes`}),(0,$.jsx)(be,{value:`tags`,children:`Tags`})]}),(0,$.jsxs)(Se,{value:`overview`,children:[(0,$.jsxs)(X,{children:[(0,$.jsx)(X.Header,{children:`Load balancer`}),(0,$.jsxs)(X.Content,{children:[(0,$.jsx)(Z,{label:`ARN`,value:T.LoadBalancerArn}),(0,$.jsx)(Z,{label:`DNS name`,value:T.DNSName}),(0,$.jsx)(Z,{label:`State`,value:T.State?.Reason?`${T.State.Code} — ${T.State.Reason}`:T.State?.Code}),(0,$.jsx)(Z,{label:`Type`,value:T.Type}),(0,$.jsx)(Z,{label:`Scheme`,value:T.Scheme}),(0,$.jsx)(Z,{label:`IP address type`,value:T.IpAddressType}),(0,$.jsx)(Z,{label:`VPC`,value:T.VpcId}),(0,$.jsx)(Z,{label:`Created at`,value:a(T.CreatedTime)})]})]}),(0,$.jsxs)(X,{children:[(0,$.jsx)(X.Header,{children:`Availability zones`}),(0,$.jsx)(X.Content,{children:(T.AvailabilityZones??[]).map(e=>(0,$.jsx)(Z,{label:e.ZoneName??`—`,value:e.SubnetId?O(e.SubnetId):void 0},`${e.ZoneName}-${e.SubnetId}`))})]}),(T.SecurityGroups??[]).length>0&&(0,$.jsxs)(X,{children:[(0,$.jsx)(X.Header,{children:`Security groups`}),(0,$.jsx)(X.Content,{children:(T.SecurityGroups??[]).map(e=>(0,$.jsx)(Z,{label:`Security group`,value:e},e))})]})]}),(0,$.jsx)(Se,{value:`listeners`,children:(0,$.jsx)(Je,{lbType:ne?`network`:`application`,loadBalancerArn:e,vpcId:T.VpcId})}),(0,$.jsx)(Se,{value:`subnets`,children:(0,$.jsx)(tt,{available:ee,current:te,error:y.error,isPending:y.isPending,isSuccess:y.isSuccess,onSubmit:t=>y.mutate({loadBalancerArn:e,subnetIds:t})})}),!ne&&(0,$.jsx)(Se,{value:`security-groups`,children:(0,$.jsx)(Qe,{available:I,current:N,error:_.error,isPending:_.isPending,isSuccess:_.isSuccess,onSubmit:t=>_.mutate({loadBalancerArn:e,securityGroupIds:t})})}),(0,$.jsx)(Se,{value:`attributes`,children:(0,$.jsx)(_e,{attributes:A,error:f.error,isPending:f.isPending,isSuccess:f.isSuccess,onSubmit:t=>{f.mutate({loadBalancerArn:e,attributes:t})},specs:ve})}),(0,$.jsx)(Se,{value:`tags`,children:(0,$.jsx)(ye,{error:h.error,isPending:h.isPending,isSuccess:h.isSuccess,onSubmit:t=>h.mutate({resourceArn:e,tags:t,initialKeys:M.map(e=>e.Key??``).filter(e=>e.length>0)}),tags:M})})]})]}),(0,$.jsx)(le,{description:`Are you sure you want to delete load balancer "${T.LoadBalancerName??T.LoadBalancerArn}"? This action cannot be undone.`,isPending:d.isPending,onConfirm:E,onOpenChange:w,open:C,title:`Delete load balancer`})]})}function rt(){let e=(0,Te.c)(2),{id:t}=I.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,$.jsx)(nt,{arn:n}),e[0]=n,e[1]=r),r}export{rt as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id7.js b/spinifex/services/spinifexui/frontend/dist/assets/_id7.js index 272e217d6..078b4c36a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id7.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id7.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{E as l}from"./ec2.js";import{Lt as u,Xr as d,s as f}from"./index.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=d(),{data:n}=r(u(e)),x=l(),[S,C]=(0,y.useState)(!1),w=n.NatGateways?.[0],T=async()=>{try{await x.mutateAsync(e),t({to:`/ec2/describe-nat-gateways`})}finally{C(!1)}};if(!w?.NatGatewayId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`NAT Gateway not found.`})]});let E=a(w.Tags),D=w.NatGatewayAddresses?.[0];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),x.error&&(0,b.jsx)(p,{error:x.error,msg:`Failed to delete NAT Gateway`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(c,{disabled:x.isPending,onClick:()=>C(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:w.State})]}),subtitle:`NAT Gateway Details`,title:E?`${w.NatGatewayId} (${E})`:w.NatGatewayId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`NAT Gateway Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`NAT Gateway ID`,value:w.NatGatewayId}),(0,b.jsx)(_,{label:`State`,value:w.State}),(0,b.jsx)(_,{label:`Connectivity`,value:w.ConnectivityType}),(0,b.jsx)(_,{label:`Subnet ID`,value:w.SubnetId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:w.SubnetId},to:`/ec2/describe-subnets/$id`,children:w.SubnetId}):`—`}),(0,b.jsx)(_,{label:`VPC ID`,value:w.VpcId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:w.VpcId},to:`/ec2/describe-vpcs/$id`,children:w.VpcId}):`—`}),(0,b.jsx)(_,{label:`Public IP`,value:D?.PublicIp??`—`}),(0,b.jsx)(_,{label:`Allocation ID`,value:D?.AllocationId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:D.AllocationId},to:`/ec2/describe-addresses/$id`,children:D.AllocationId}):`—`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the NAT Gateway "${w.NatGatewayId}"? This action cannot be undone. The associated Elastic IP is not released.`,isPending:x.isPending,onConfirm:T,onOpenChange:C,open:S,title:`Delete NAT Gateway`})]})}export{x as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{E as l}from"./ec2.js";import{Qr as u,l as d,zt as f}from"./index.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=t(n()),b=e();function x(){let{id:e}=d.useParams(),t=u(),{data:n}=r(f(e)),x=l(),[S,C]=(0,y.useState)(!1),w=n.NatGateways?.[0],T=async()=>{try{await x.mutateAsync(e),t({to:`/ec2/describe-nat-gateways`})}finally{C(!1)}};if(!w?.NatGatewayId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`NAT Gateway not found.`})]});let E=a(w.Tags),D=w.NatGatewayAddresses?.[0];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),x.error&&(0,b.jsx)(p,{error:x.error,msg:`Failed to delete NAT Gateway`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(c,{disabled:x.isPending,onClick:()=>C(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:w.State})]}),subtitle:`NAT Gateway Details`,title:E?`${w.NatGatewayId} (${E})`:w.NatGatewayId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`NAT Gateway Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`NAT Gateway ID`,value:w.NatGatewayId}),(0,b.jsx)(_,{label:`State`,value:w.State}),(0,b.jsx)(_,{label:`Connectivity`,value:w.ConnectivityType}),(0,b.jsx)(_,{label:`Subnet ID`,value:w.SubnetId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:w.SubnetId},to:`/ec2/describe-subnets/$id`,children:w.SubnetId}):`—`}),(0,b.jsx)(_,{label:`VPC ID`,value:w.VpcId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:w.VpcId},to:`/ec2/describe-vpcs/$id`,children:w.VpcId}):`—`}),(0,b.jsx)(_,{label:`Public IP`,value:D?.PublicIp??`—`}),(0,b.jsx)(_,{label:`Allocation ID`,value:D?.AllocationId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:D.AllocationId},to:`/ec2/describe-addresses/$id`,children:D.AllocationId}):`—`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the NAT Gateway "${w.NatGatewayId}"? This action cannot be undone. The associated Elastic IP is not released.`,isPending:x.isPending,onConfirm:T,onOpenChange:C,open:S,title:`Delete NAT Gateway`})]})}export{x as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id8.js b/spinifex/services/spinifexui/frontend/dist/assets/_id8.js index c2d1a3c07..88487eb38 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id8.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id8.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{t as a}from"./back-link.js";import{t as o}from"./trash-2.js";import{t as s}from"./button.js";import{D as c}from"./ec2.js";import{Mt as l,Xr as u,c as d,zt as f}from"./index.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=t(n()),b=e();function x(){let{id:e}=d.useParams(),t=u(),{data:n}=r(f(e)),{data:x}=r(l),S=c(),[C,w]=(0,y.useState)(!1),T=n.PlacementGroups?.[0],E=x.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.Placement?.GroupName===T?.GroupName)??[];return T?.GroupId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(p,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(s,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(o,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:T.State})]}),subtitle:`Placement Group Details`,title:T.GroupName??T.GroupId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Placement Group Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Group ID`,value:T.GroupId}),(0,b.jsx)(_,{label:`Group Name`,value:T.GroupName}),(0,b.jsx)(_,{label:`Strategy`,value:T.Strategy}),(0,b.jsx)(_,{label:`State`,value:T.State}),(0,b.jsx)(_,{label:`Spread Level`,value:T.SpreadLevel})]})]}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Instances`}),E.length>0?E.map(e=>(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Instance ID`,value:e.InstanceId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,b.jsx)(_,{label:`State`,value:e.State?.Name}),(0,b.jsx)(_,{label:`Instance Type`,value:e.InstanceType}),(0,b.jsx)(_,{label:`Availability Zone`,value:e.Placement?.AvailabilityZone})]},e.InstanceId)):(0,b.jsx)(g.Content,{children:(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances in this placement group.`})})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the placement group "${T.GroupName}"? The group must have no running instances.`,isPending:S.isPending,onConfirm:async()=>{if(T?.GroupName)try{await S.mutateAsync(T.GroupName),t({to:`/ec2/describe-placement-groups`})}finally{w(!1)}},onOpenChange:w,open:C,title:`Delete Placement Group`})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Placement group not found.`})]})}export{x as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{t as a}from"./back-link.js";import{t as o}from"./trash-2.js";import{t as s}from"./button.js";import{D as c}from"./ec2.js";import{Pt as l,Qr as u,Vt as d,u as f}from"./index.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=t(n()),b=e();function x(){let{id:e}=f.useParams(),t=u(),{data:n}=r(d(e)),{data:x}=r(l),S=c(),[C,w]=(0,y.useState)(!1),T=n.PlacementGroups?.[0],E=x.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.Placement?.GroupName===T?.GroupName)??[];return T?.GroupId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(p,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(s,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(o,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:T.State})]}),subtitle:`Placement Group Details`,title:T.GroupName??T.GroupId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Placement Group Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Group ID`,value:T.GroupId}),(0,b.jsx)(_,{label:`Group Name`,value:T.GroupName}),(0,b.jsx)(_,{label:`Strategy`,value:T.Strategy}),(0,b.jsx)(_,{label:`State`,value:T.State}),(0,b.jsx)(_,{label:`Spread Level`,value:T.SpreadLevel})]})]}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Instances`}),E.length>0?E.map(e=>(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Instance ID`,value:e.InstanceId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,b.jsx)(_,{label:`State`,value:e.State?.Name}),(0,b.jsx)(_,{label:`Instance Type`,value:e.InstanceType}),(0,b.jsx)(_,{label:`Availability Zone`,value:e.Placement?.AvailabilityZone})]},e.InstanceId)):(0,b.jsx)(g.Content,{children:(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances in this placement group.`})})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the placement group "${T.GroupName}"? The group must have no running instances.`,isPending:S.isPending,onConfirm:async()=>{if(T?.GroupName)try{await S.mutateAsync(T.GroupName),t({to:`/ec2/describe-placement-groups`})}finally{w(!1)}},onOpenChange:w,open:C,title:`Delete Placement Group`})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Placement group not found.`})]})}export{x as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id9.js b/spinifex/services/spinifexui/frontend/dist/assets/_id9.js index 35af77fd1..c55a7e6e3 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id9.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id9.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{O as m,g as h,i as ee,k as te,z as ne}from"./ec2.js";import{Ht as re,Pt as g,Rt as ie,Xr as _,Yt as v,er as y,l as ae}from"./index.js";import{a as oe,i as b,n as x,t as S}from"./zod.js";import{t as C}from"./error-banner.js";import{t as w}from"./page-heading.js";import{a as T,r as E,t as D}from"./field.js";import{l as O,r as k}from"./ec22.js";import{t as A}from"./delete-confirmation-dialog.js";import{n as j,t as M}from"./detail-row.js";import{t as se}from"./badge.js";var N=t(n()),P=e();function F(e){return e.GatewayId??e.NatGatewayId??e.NetworkInterfaceId??e.InstanceId??e.VpcPeeringConnectionId??`—`}function I(){let{id:e}=ae.useParams(),t=_(),{data:n}=r(re(e)),{data:I}=r(g),{data:L}=r(ie),{data:R}=r(v),z=te(),B=h(),V=m(),H=ee(),U=ne(),[W,G]=(0,N.useState)(!1),K=n.RouteTables?.[0],q=b({resolver:S(O),defaultValues:{destinationCidrBlock:`0.0.0.0/0`,targetType:`igw`,targetId:``}}),ce=oe({control:q.control,name:`targetType`}),J=b({resolver:S(k),defaultValues:{subnetId:``}});if(!K?.RouteTableId)return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(o,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`Route Table not found.`})]});let Y=K.RouteTableId,X=a(K.Tags),Z=K.Associations?.some(e=>e.Main)??!1,Q=K.Routes??[],$=(K.Associations??[]).filter(e=>e.SubnetId),le=(I.InternetGateways??[]).filter(e=>e.Attachments?.some(e=>e.VpcId===K.VpcId)),ue=(L.NatGateways??[]).filter(e=>e.VpcId===K.VpcId&&e.State===`available`),de=new Set($.map(e=>e.SubnetId)),fe=(R.Subnets??[]).filter(e=>e.VpcId===K.VpcId&&!de.has(e.SubnetId)),pe=async()=>{try{await z.mutateAsync(Y),t({to:`/ec2/describe-route-tables`})}finally{G(!1)}},me=async e=>{await B.mutateAsync({routeTableId:Y,destinationCidrBlock:e.destinationCidrBlock,gatewayId:e.targetType===`igw`?e.targetId:void 0,natGatewayId:e.targetType===`nat`?e.targetId:void 0}),q.reset({destinationCidrBlock:`0.0.0.0/0`,targetType:`igw`,targetId:``})},he=async e=>{await H.mutateAsync({routeTableId:Y,subnetId:e.subnetId}),J.reset({subnetId:``})};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(o,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z.error&&(0,P.jsx)(C,{error:z.error,msg:`Failed to delete Route Table`}),(0,P.jsxs)(`div`,{className:`space-y-6`,children:[(0,P.jsx)(w,{actions:(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsxs)(p,{disabled:Z||z.isPending,onClick:()=>G(!0),size:`sm`,variant:`destructive`,children:[(0,P.jsx)(f,{className:`size-4`}),`Delete`]}),Z&&(0,P.jsx)(se,{variant:`secondary`,children:`Main`})]}),subtitle:`Route Table Details`,title:X?`${K.RouteTableId} (${X})`:K.RouteTableId}),(0,P.jsxs)(j,{children:[(0,P.jsx)(j.Header,{children:`Route Table Information`}),(0,P.jsxs)(j.Content,{children:[(0,P.jsx)(M,{label:`Route Table ID`,value:K.RouteTableId}),(0,P.jsx)(M,{label:`Main`,value:Z?`Yes`:`No`}),(0,P.jsx)(M,{label:`VPC ID`,value:K.VpcId?(0,P.jsx)(i,{className:`text-primary hover:underline`,params:{id:K.VpcId},to:`/ec2/describe-vpcs/$id`,children:K.VpcId}):`—`}),(0,P.jsx)(M,{label:`Owner ID`,value:K.OwnerId??`—`})]})]}),(0,P.jsxs)(j,{children:[(0,P.jsx)(j.Header,{children:`Routes`}),(0,P.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,P.jsx)(`div`,{className:`overflow-x-auto rounded-md border`,children:(0,P.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,P.jsx)(`thead`,{className:`bg-muted/50 text-left text-muted-foreground`,children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{className:`p-2 font-medium`,children:`Destination`}),(0,P.jsx)(`th`,{className:`p-2 font-medium`,children:`Target`}),(0,P.jsx)(`th`,{className:`p-2 font-medium`,children:`Status`}),(0,P.jsx)(`th`,{className:`p-2`,children:(0,P.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,P.jsx)(`tbody`,{children:Q.length>0?Q.map(e=>{let t=e.DestinationCidrBlock??e.DestinationPrefixListId??`—`,n=e.GatewayId===`local`,r=e.DestinationCidrBlock;return(0,P.jsxs)(`tr`,{className:`border-t`,children:[(0,P.jsx)(`td`,{className:`p-2 font-mono`,children:t}),(0,P.jsx)(`td`,{className:`p-2 font-mono`,children:F(e)}),(0,P.jsx)(`td`,{className:`p-2`,children:e.State??`—`}),(0,P.jsx)(`td`,{className:`p-2 text-right`,children:!n&&r&&(0,P.jsx)(p,{disabled:V.isPending,onClick:async()=>await V.mutateAsync({routeTableId:Y,destinationCidrBlock:r}),size:`sm`,variant:`ghost`,children:(0,P.jsx)(f,{className:`size-4`})})})]},t)}):(0,P.jsx)(`tr`,{children:(0,P.jsx)(`td`,{className:`p-2 text-muted-foreground`,colSpan:4,children:`No routes.`})})})]})}),(B.error??V.error)&&(0,P.jsx)(C,{error:B.error??V.error??void 0,msg:`Failed to update route`}),(0,P.jsxs)(`form`,{className:`grid items-end gap-3 sm:grid-cols-[1fr_1fr_1fr_auto]`,onSubmit:q.handleSubmit(me),children:[(0,P.jsxs)(D,{children:[(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`destinationCidrBlock`,children:`Destination`})}),(0,P.jsx)(y,{id:`destinationCidrBlock`,placeholder:`0.0.0.0/0`,...q.register(`destinationCidrBlock`)}),(0,P.jsx)(E,{errors:[q.formState.errors.destinationCidrBlock]})]}),(0,P.jsxs)(D,{children:[(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`targetType`,children:`Target type`})}),(0,P.jsx)(x,{control:q.control,name:`targetType`,render:({field:e})=>(0,P.jsxs)(d,{onValueChange:t=>{e.onChange(t),q.setValue(`targetId`,``)},value:e.value,children:[(0,P.jsx)(u,{className:`w-full`,id:`targetType`,children:(0,P.jsx)(s,{})}),(0,P.jsxs)(l,{children:[(0,P.jsx)(c,{value:`igw`,children:`Internet Gateway`}),(0,P.jsx)(c,{value:`nat`,children:`NAT Gateway`})]})]})})]}),(0,P.jsxs)(D,{children:[(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`targetId`,children:`Target`})}),(0,P.jsx)(x,{control:q.control,name:`targetId`,render:({field:e})=>(0,P.jsxs)(d,{onValueChange:t=>e.onChange(t),value:e.value??``,children:[(0,P.jsx)(u,{"aria-invalid":!!q.formState.errors.targetId,className:`w-full`,id:`targetId`,children:(0,P.jsx)(s,{placeholder:`Select target`})}),(0,P.jsx)(l,{children:ce===`igw`?le.map(e=>(0,P.jsx)(c,{value:e.InternetGatewayId??``,children:e.InternetGatewayId},e.InternetGatewayId)):ue.map(e=>(0,P.jsx)(c,{value:e.NatGatewayId??``,children:e.NatGatewayId},e.NatGatewayId))})]})}),(0,P.jsx)(E,{errors:[q.formState.errors.targetId]})]}),(0,P.jsx)(p,{disabled:B.isPending,size:`sm`,type:`submit`,children:`Add route`})]})]})]}),(0,P.jsxs)(j,{children:[(0,P.jsx)(j.Header,{children:`Subnet Associations`}),(0,P.jsxs)(`div`,{className:`space-y-4 p-4`,children:[$.length>0?(0,P.jsx)(`ul`,{className:`space-y-2`,children:$.map(e=>{let t=e.RouteTableAssociationId;return(0,P.jsxs)(`li`,{className:`flex items-center justify-between rounded-md border p-2 text-sm`,children:[(0,P.jsx)(i,{className:`font-mono text-primary hover:underline`,params:{id:e.SubnetId??``},to:`/ec2/describe-subnets/$id`,children:e.SubnetId}),(0,P.jsx)(p,{disabled:!t||U.isPending,onClick:async()=>{t&&await U.mutateAsync(t)},size:`sm`,variant:`ghost`,children:(0,P.jsx)(f,{className:`size-4`})})]},t)})}):(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No subnet associations.`}),(H.error??U.error)&&(0,P.jsx)(C,{error:H.error??U.error??void 0,msg:`Failed to update association`}),(0,P.jsxs)(`form`,{className:`grid items-end gap-3 sm:grid-cols-[1fr_auto]`,onSubmit:J.handleSubmit(he),children:[(0,P.jsxs)(D,{children:[(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`subnetId`,children:`Associate subnet`})}),(0,P.jsx)(x,{control:J.control,name:`subnetId`,render:({field:e})=>(0,P.jsxs)(d,{onValueChange:t=>e.onChange(t),value:e.value??``,children:[(0,P.jsx)(u,{"aria-invalid":!!J.formState.errors.subnetId,className:`w-full`,id:`subnetId`,children:(0,P.jsx)(s,{placeholder:`Select a subnet`})}),(0,P.jsx)(l,{children:fe.map(e=>{let t=a(e.Tags);return(0,P.jsx)(c,{value:e.SubnetId??``,children:t?`${e.SubnetId} (${t})`:`${e.SubnetId} (${e.CidrBlock})`},e.SubnetId)})})]})}),(0,P.jsx)(E,{errors:[J.formState.errors.subnetId]})]}),(0,P.jsx)(p,{disabled:H.isPending,size:`sm`,type:`submit`,children:`Associate`})]})]})]})]}),(0,P.jsx)(A,{description:`Are you sure you want to delete the Route Table "${K.RouteTableId}"? This action cannot be undone.`,isPending:z.isPending,onConfirm:pe,onOpenChange:G,open:W,title:`Delete Route Table`})]})}export{I as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{O as m,g as h,i as ee,k as te,z as ne}from"./ec2.js";import{Bt as re,It as g,Qr as ie,Wt as _,Zt as v,d as y,nr as ae}from"./index.js";import{a as oe,i as b,n as x,t as S}from"./zod.js";import{t as C}from"./error-banner.js";import{t as w}from"./page-heading.js";import{a as T,r as E,t as D}from"./field.js";import{l as O,r as k}from"./ec22.js";import{t as A}from"./delete-confirmation-dialog.js";import{n as j,t as M}from"./detail-row.js";import{t as se}from"./badge.js";var N=t(n()),P=e();function F(e){return e.GatewayId??e.NatGatewayId??e.NetworkInterfaceId??e.InstanceId??e.VpcPeeringConnectionId??`—`}function I(){let{id:e}=y.useParams(),t=ie(),{data:n}=r(_(e)),{data:I}=r(g),{data:L}=r(re),{data:R}=r(v),z=te(),B=h(),V=m(),H=ee(),U=ne(),[W,G]=(0,N.useState)(!1),K=n.RouteTables?.[0],q=b({resolver:S(O),defaultValues:{destinationCidrBlock:`0.0.0.0/0`,targetType:`igw`,targetId:``}}),ce=oe({control:q.control,name:`targetType`}),J=b({resolver:S(k),defaultValues:{subnetId:``}});if(!K?.RouteTableId)return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(o,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`Route Table not found.`})]});let Y=K.RouteTableId,X=a(K.Tags),Z=K.Associations?.some(e=>e.Main)??!1,Q=K.Routes??[],$=(K.Associations??[]).filter(e=>e.SubnetId),le=(I.InternetGateways??[]).filter(e=>e.Attachments?.some(e=>e.VpcId===K.VpcId)),ue=(L.NatGateways??[]).filter(e=>e.VpcId===K.VpcId&&e.State===`available`),de=new Set($.map(e=>e.SubnetId)),fe=(R.Subnets??[]).filter(e=>e.VpcId===K.VpcId&&!de.has(e.SubnetId)),pe=async()=>{try{await z.mutateAsync(Y),t({to:`/ec2/describe-route-tables`})}finally{G(!1)}},me=async e=>{await B.mutateAsync({routeTableId:Y,destinationCidrBlock:e.destinationCidrBlock,gatewayId:e.targetType===`igw`?e.targetId:void 0,natGatewayId:e.targetType===`nat`?e.targetId:void 0}),q.reset({destinationCidrBlock:`0.0.0.0/0`,targetType:`igw`,targetId:``})},he=async e=>{await H.mutateAsync({routeTableId:Y,subnetId:e.subnetId}),J.reset({subnetId:``})};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(o,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z.error&&(0,P.jsx)(C,{error:z.error,msg:`Failed to delete Route Table`}),(0,P.jsxs)(`div`,{className:`space-y-6`,children:[(0,P.jsx)(w,{actions:(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsxs)(p,{disabled:Z||z.isPending,onClick:()=>G(!0),size:`sm`,variant:`destructive`,children:[(0,P.jsx)(f,{className:`size-4`}),`Delete`]}),Z&&(0,P.jsx)(se,{variant:`secondary`,children:`Main`})]}),subtitle:`Route Table Details`,title:X?`${K.RouteTableId} (${X})`:K.RouteTableId}),(0,P.jsxs)(j,{children:[(0,P.jsx)(j.Header,{children:`Route Table Information`}),(0,P.jsxs)(j.Content,{children:[(0,P.jsx)(M,{label:`Route Table ID`,value:K.RouteTableId}),(0,P.jsx)(M,{label:`Main`,value:Z?`Yes`:`No`}),(0,P.jsx)(M,{label:`VPC ID`,value:K.VpcId?(0,P.jsx)(i,{className:`text-primary hover:underline`,params:{id:K.VpcId},to:`/ec2/describe-vpcs/$id`,children:K.VpcId}):`—`}),(0,P.jsx)(M,{label:`Owner ID`,value:K.OwnerId??`—`})]})]}),(0,P.jsxs)(j,{children:[(0,P.jsx)(j.Header,{children:`Routes`}),(0,P.jsxs)(`div`,{className:`space-y-4 p-4`,children:[(0,P.jsx)(`div`,{className:`overflow-x-auto rounded-md border`,children:(0,P.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,P.jsx)(`thead`,{className:`bg-muted/50 text-left text-muted-foreground`,children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{className:`p-2 font-medium`,children:`Destination`}),(0,P.jsx)(`th`,{className:`p-2 font-medium`,children:`Target`}),(0,P.jsx)(`th`,{className:`p-2 font-medium`,children:`Status`}),(0,P.jsx)(`th`,{className:`p-2`,children:(0,P.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,P.jsx)(`tbody`,{children:Q.length>0?Q.map(e=>{let t=e.DestinationCidrBlock??e.DestinationPrefixListId??`—`,n=e.GatewayId===`local`,r=e.DestinationCidrBlock;return(0,P.jsxs)(`tr`,{className:`border-t`,children:[(0,P.jsx)(`td`,{className:`p-2 font-mono`,children:t}),(0,P.jsx)(`td`,{className:`p-2 font-mono`,children:F(e)}),(0,P.jsx)(`td`,{className:`p-2`,children:e.State??`—`}),(0,P.jsx)(`td`,{className:`p-2 text-right`,children:!n&&r&&(0,P.jsx)(p,{disabled:V.isPending,onClick:async()=>await V.mutateAsync({routeTableId:Y,destinationCidrBlock:r}),size:`sm`,variant:`ghost`,children:(0,P.jsx)(f,{className:`size-4`})})})]},t)}):(0,P.jsx)(`tr`,{children:(0,P.jsx)(`td`,{className:`p-2 text-muted-foreground`,colSpan:4,children:`No routes.`})})})]})}),(B.error??V.error)&&(0,P.jsx)(C,{error:B.error??V.error??void 0,msg:`Failed to update route`}),(0,P.jsxs)(`form`,{className:`grid items-end gap-3 sm:grid-cols-[1fr_1fr_1fr_auto]`,onSubmit:q.handleSubmit(me),children:[(0,P.jsxs)(D,{children:[(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`destinationCidrBlock`,children:`Destination`})}),(0,P.jsx)(ae,{id:`destinationCidrBlock`,placeholder:`0.0.0.0/0`,...q.register(`destinationCidrBlock`)}),(0,P.jsx)(E,{errors:[q.formState.errors.destinationCidrBlock]})]}),(0,P.jsxs)(D,{children:[(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`targetType`,children:`Target type`})}),(0,P.jsx)(x,{control:q.control,name:`targetType`,render:({field:e})=>(0,P.jsxs)(d,{onValueChange:t=>{e.onChange(t),q.setValue(`targetId`,``)},value:e.value,children:[(0,P.jsx)(u,{className:`w-full`,id:`targetType`,children:(0,P.jsx)(s,{})}),(0,P.jsxs)(l,{children:[(0,P.jsx)(c,{value:`igw`,children:`Internet Gateway`}),(0,P.jsx)(c,{value:`nat`,children:`NAT Gateway`})]})]})})]}),(0,P.jsxs)(D,{children:[(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`targetId`,children:`Target`})}),(0,P.jsx)(x,{control:q.control,name:`targetId`,render:({field:e})=>(0,P.jsxs)(d,{onValueChange:t=>e.onChange(t),value:e.value??``,children:[(0,P.jsx)(u,{"aria-invalid":!!q.formState.errors.targetId,className:`w-full`,id:`targetId`,children:(0,P.jsx)(s,{placeholder:`Select target`})}),(0,P.jsx)(l,{children:ce===`igw`?le.map(e=>(0,P.jsx)(c,{value:e.InternetGatewayId??``,children:e.InternetGatewayId},e.InternetGatewayId)):ue.map(e=>(0,P.jsx)(c,{value:e.NatGatewayId??``,children:e.NatGatewayId},e.NatGatewayId))})]})}),(0,P.jsx)(E,{errors:[q.formState.errors.targetId]})]}),(0,P.jsx)(p,{disabled:B.isPending,size:`sm`,type:`submit`,children:`Add route`})]})]})]}),(0,P.jsxs)(j,{children:[(0,P.jsx)(j.Header,{children:`Subnet Associations`}),(0,P.jsxs)(`div`,{className:`space-y-4 p-4`,children:[$.length>0?(0,P.jsx)(`ul`,{className:`space-y-2`,children:$.map(e=>{let t=e.RouteTableAssociationId;return(0,P.jsxs)(`li`,{className:`flex items-center justify-between rounded-md border p-2 text-sm`,children:[(0,P.jsx)(i,{className:`font-mono text-primary hover:underline`,params:{id:e.SubnetId??``},to:`/ec2/describe-subnets/$id`,children:e.SubnetId}),(0,P.jsx)(p,{disabled:!t||U.isPending,onClick:async()=>{t&&await U.mutateAsync(t)},size:`sm`,variant:`ghost`,children:(0,P.jsx)(f,{className:`size-4`})})]},t)})}):(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No subnet associations.`}),(H.error??U.error)&&(0,P.jsx)(C,{error:H.error??U.error??void 0,msg:`Failed to update association`}),(0,P.jsxs)(`form`,{className:`grid items-end gap-3 sm:grid-cols-[1fr_auto]`,onSubmit:J.handleSubmit(he),children:[(0,P.jsxs)(D,{children:[(0,P.jsx)(T,{children:(0,P.jsx)(`label`,{htmlFor:`subnetId`,children:`Associate subnet`})}),(0,P.jsx)(x,{control:J.control,name:`subnetId`,render:({field:e})=>(0,P.jsxs)(d,{onValueChange:t=>e.onChange(t),value:e.value??``,children:[(0,P.jsx)(u,{"aria-invalid":!!J.formState.errors.subnetId,className:`w-full`,id:`subnetId`,children:(0,P.jsx)(s,{placeholder:`Select a subnet`})}),(0,P.jsx)(l,{children:fe.map(e=>{let t=a(e.Tags);return(0,P.jsx)(c,{value:e.SubnetId??``,children:t?`${e.SubnetId} (${t})`:`${e.SubnetId} (${e.CidrBlock})`},e.SubnetId)})})]})}),(0,P.jsx)(E,{errors:[J.formState.errors.subnetId]})]}),(0,P.jsx)(p,{disabled:H.isPending,size:`sm`,type:`submit`,children:`Associate`})]})]})]})]}),(0,P.jsx)(A,{description:`Are you sure you want to delete the Route Table "${K.RouteTableId}"? This action cannot be undone.`,isPending:z.isPending,onConfirm:pe,onOpenChange:G,open:W,title:`Delete Route Table`})]})}export{I as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_instanceProfileName.js b/spinifex/services/spinifexui/frontend/dist/assets/_instanceProfileName.js index 6b25ac138..2ff52e874 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_instanceProfileName.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_instanceProfileName.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Bt as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{g as l,t as u,u as d}from"./iam.js";import{Xr as f,b as p,ft as m,yt as h}from"./index.js";import{t as g}from"./error-banner.js";import{t as _}from"./page-heading.js";import{t as v}from"./delete-confirmation-dialog.js";import{n as y,t as b}from"./detail-row.js";var x=t(n()),S=e();function C(){let{instanceProfileName:e}=p.useParams(),t=f(),{data:n}=r(m(e)),{data:C}=r(h),w=d(),T=u(),E=l(),[D,O]=(0,x.useState)(!1),[k,A]=(0,x.useState)(!1),[j,M]=(0,x.useState)(null),N=n.InstanceProfile,P=N?.Roles??[],F=C.Roles??[],I=new Set(P.map(e=>e.RoleName)),L=F.filter(e=>e.RoleName&&!I.has(e.RoleName)),R=async()=>{try{await w.mutateAsync(e),t({to:`/iam/list-instance-profiles`})}finally{O(!1)}},z=async t=>{await T.mutateAsync({instanceProfileName:e,roleName:t}),A(!1)},B=async t=>{M(t);try{await E.mutateAsync({instanceProfileName:e,roleName:t})}finally{M(null)}};return N?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(o,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),w.error&&(0,S.jsx)(g,{error:w.error,msg:`Failed to delete instance profile`}),T.error&&(0,S.jsx)(g,{error:T.error,msg:`Failed to add role`}),E.error&&(0,S.jsx)(g,{error:E.error,msg:`Failed to remove role`}),(0,S.jsxs)(`div`,{className:`space-y-6`,children:[(0,S.jsx)(_,{actions:(0,S.jsxs)(c,{onClick:()=>O(!0),size:`sm`,variant:`destructive`,children:[(0,S.jsx)(s,{className:`size-4`}),`Delete`]}),subtitle:`Instance Profile Details`,title:N.InstanceProfileName??``}),(0,S.jsxs)(y,{children:[(0,S.jsx)(y.Header,{children:`Instance Profile Information`}),(0,S.jsxs)(y.Content,{children:[(0,S.jsx)(b,{label:`Name`,value:N.InstanceProfileName}),(0,S.jsx)(b,{label:`ID`,value:N.InstanceProfileId}),(0,S.jsx)(b,{label:`ARN`,value:N.Arn}),(0,S.jsx)(b,{label:`Path`,value:N.Path}),(0,S.jsx)(b,{label:`Created`,value:a(N.CreateDate)})]})]}),(0,S.jsxs)(y,{children:[(0,S.jsx)(y.Header,{children:(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(`span`,{children:`Roles`}),(0,S.jsx)(c,{onClick:()=>A(!k),size:`sm`,children:`Add Role`})]})}),(0,S.jsxs)(y.Content,{children:[k&&L.length>0&&(0,S.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,S.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a role to add:`}),(0,S.jsx)(`div`,{className:`space-y-1`,children:L.map(e=>(0,S.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:T.isPending,onClick:()=>{e.RoleName&&z(e.RoleName)},type:`button`,children:[(0,S.jsx)(`span`,{children:e.RoleName}),(0,S.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.RoleName))})]}),k&&L.length===0&&(0,S.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No roles available to add.`}),P.length>0?(0,S.jsx)(`div`,{className:`col-span-2 space-y-3`,children:P.map(e=>(0,S.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,S.jsx)(i,{className:`text-sm font-medium text-primary hover:underline`,params:{roleName:e.RoleName??``},to:`/iam/list-roles/$roleName`,children:e.RoleName}),(0,S.jsx)(c,{disabled:j===e.RoleName,onClick:()=>{e.RoleName&&B(e.RoleName)},size:`sm`,variant:`outline`,children:`Remove`})]},e.RoleName))}):(0,S.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No roles in this instance profile.`})]})]})]}),(0,S.jsx)(v,{description:`Are you sure you want to delete the instance profile "${e}"? This action cannot be undone. You must remove all roles first.`,isPending:w.isPending,onConfirm:R,onOpenChange:O,open:D,title:`Delete Instance Profile`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(o,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),(0,S.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance profile not found.`})]})}export{C as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Bt as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{g as l,t as u,u as d}from"./iam.js";import{Qr as f,S as p,mt as m,xt as h}from"./index.js";import{t as g}from"./error-banner.js";import{t as _}from"./page-heading.js";import{t as v}from"./delete-confirmation-dialog.js";import{n as y,t as b}from"./detail-row.js";var x=t(n()),S=e();function C(){let{instanceProfileName:e}=p.useParams(),t=f(),{data:n}=r(m(e)),{data:C}=r(h),w=d(),T=u(),E=l(),[D,O]=(0,x.useState)(!1),[k,A]=(0,x.useState)(!1),[j,M]=(0,x.useState)(null),N=n.InstanceProfile,P=N?.Roles??[],F=C.Roles??[],I=new Set(P.map(e=>e.RoleName)),L=F.filter(e=>e.RoleName&&!I.has(e.RoleName)),R=async()=>{try{await w.mutateAsync(e),t({to:`/iam/list-instance-profiles`})}finally{O(!1)}},z=async t=>{await T.mutateAsync({instanceProfileName:e,roleName:t}),A(!1)},B=async t=>{M(t);try{await E.mutateAsync({instanceProfileName:e,roleName:t})}finally{M(null)}};return N?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(o,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),w.error&&(0,S.jsx)(g,{error:w.error,msg:`Failed to delete instance profile`}),T.error&&(0,S.jsx)(g,{error:T.error,msg:`Failed to add role`}),E.error&&(0,S.jsx)(g,{error:E.error,msg:`Failed to remove role`}),(0,S.jsxs)(`div`,{className:`space-y-6`,children:[(0,S.jsx)(_,{actions:(0,S.jsxs)(c,{onClick:()=>O(!0),size:`sm`,variant:`destructive`,children:[(0,S.jsx)(s,{className:`size-4`}),`Delete`]}),subtitle:`Instance Profile Details`,title:N.InstanceProfileName??``}),(0,S.jsxs)(y,{children:[(0,S.jsx)(y.Header,{children:`Instance Profile Information`}),(0,S.jsxs)(y.Content,{children:[(0,S.jsx)(b,{label:`Name`,value:N.InstanceProfileName}),(0,S.jsx)(b,{label:`ID`,value:N.InstanceProfileId}),(0,S.jsx)(b,{label:`ARN`,value:N.Arn}),(0,S.jsx)(b,{label:`Path`,value:N.Path}),(0,S.jsx)(b,{label:`Created`,value:a(N.CreateDate)})]})]}),(0,S.jsxs)(y,{children:[(0,S.jsx)(y.Header,{children:(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(`span`,{children:`Roles`}),(0,S.jsx)(c,{onClick:()=>A(!k),size:`sm`,children:`Add Role`})]})}),(0,S.jsxs)(y.Content,{children:[k&&L.length>0&&(0,S.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,S.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a role to add:`}),(0,S.jsx)(`div`,{className:`space-y-1`,children:L.map(e=>(0,S.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:T.isPending,onClick:()=>{e.RoleName&&z(e.RoleName)},type:`button`,children:[(0,S.jsx)(`span`,{children:e.RoleName}),(0,S.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.RoleName))})]}),k&&L.length===0&&(0,S.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No roles available to add.`}),P.length>0?(0,S.jsx)(`div`,{className:`col-span-2 space-y-3`,children:P.map(e=>(0,S.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,S.jsx)(i,{className:`text-sm font-medium text-primary hover:underline`,params:{roleName:e.RoleName??``},to:`/iam/list-roles/$roleName`,children:e.RoleName}),(0,S.jsx)(c,{disabled:j===e.RoleName,onClick:()=>{e.RoleName&&B(e.RoleName)},size:`sm`,variant:`outline`,children:`Remove`})]},e.RoleName))}):(0,S.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No roles in this instance profile.`})]})]})]}),(0,S.jsx)(v,{description:`Are you sure you want to delete the instance profile "${e}"? This action cannot be undone. You must remove all roles first.`,isPending:w.isPending,onConfirm:R,onOpenChange:O,open:D,title:`Delete Instance Profile`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(o,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),(0,S.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance profile not found.`})]})}export{C as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_policyArn.js b/spinifex/services/spinifexui/frontend/dist/assets/_policyArn.js index a7c96ac2f..bc8946e17 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_policyArn.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_policyArn.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Bt as i}from"./auth.js";import{t as a}from"./back-link.js";import{t as o}from"./trash-2.js";import{t as s}from"./button.js";import{d as c}from"./iam.js";import{Xr as l,_t as u,gt as d,x as f}from"./index.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./policy-document-viewer.js";var y=t(n()),b=e();function x(){let{policyArn:e}=f.useParams(),t=decodeURIComponent(e),n=l(),{data:x}=r(d(t)),S=x.Policy,C=c(),[w,T]=(0,y.useState)(!1),{data:E}=r(u(t,S?.DefaultVersionId??`v1`)),D=E?.PolicyVersion?.Document?decodeURIComponent(E.PolicyVersion.Document):null;return S?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,b.jsx)(p,{error:C.error,msg:`Failed to delete policy`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(s,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(o,{className:`size-4`}),`Delete`]}),subtitle:`Policy Details`,title:S.PolicyName??``}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Policy Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Policy Name`,value:S.PolicyName}),(0,b.jsx)(_,{label:`Policy ID`,value:S.PolicyId}),(0,b.jsx)(_,{label:`ARN`,value:S.Arn}),(0,b.jsx)(_,{label:`Path`,value:S.Path}),(0,b.jsx)(_,{label:`Description`,value:S.Description??`-`}),(0,b.jsx)(_,{label:`Created`,value:i(S.CreateDate)})]})]}),D&&(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Policy Document`}),(0,b.jsx)(`div`,{className:`p-4`,children:(0,b.jsx)(v,{document:D})})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the policy "${S.PolicyName}"? This action cannot be undone.`,isPending:C.isPending,onConfirm:async()=>{try{await C.mutateAsync(t),n({to:`/iam/list-policies`})}finally{T(!1)}},onOpenChange:T,open:w,title:`Delete Policy`})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a,{to:`/iam/list-policies`,children:`Back to policies`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{x as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Bt as i}from"./auth.js";import{t as a}from"./back-link.js";import{t as o}from"./trash-2.js";import{t as s}from"./button.js";import{d as c}from"./iam.js";import{C as l,Qr as u,vt as d,yt as f}from"./index.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./policy-document-viewer.js";var y=t(n()),b=e();function x(){let{policyArn:e}=l.useParams(),t=decodeURIComponent(e),n=u(),{data:x}=r(d(t)),S=x.Policy,C=c(),[w,T]=(0,y.useState)(!1),{data:E}=r(f(t,S?.DefaultVersionId??`v1`)),D=E?.PolicyVersion?.Document?decodeURIComponent(E.PolicyVersion.Document):null;return S?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,b.jsx)(p,{error:C.error,msg:`Failed to delete policy`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(s,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(o,{className:`size-4`}),`Delete`]}),subtitle:`Policy Details`,title:S.PolicyName??``}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Policy Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Policy Name`,value:S.PolicyName}),(0,b.jsx)(_,{label:`Policy ID`,value:S.PolicyId}),(0,b.jsx)(_,{label:`ARN`,value:S.Arn}),(0,b.jsx)(_,{label:`Path`,value:S.Path}),(0,b.jsx)(_,{label:`Description`,value:S.Description??`-`}),(0,b.jsx)(_,{label:`Created`,value:i(S.CreateDate)})]})]}),D&&(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Policy Document`}),(0,b.jsx)(`div`,{className:`p-4`,children:(0,b.jsx)(v,{document:D})})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the policy "${S.PolicyName}"? This action cannot be undone.`,isPending:C.isPending,onConfirm:async()=>{try{await C.mutateAsync(t),n({to:`/iam/list-policies`})}finally{T(!1)}},onOpenChange:T,open:w,title:`Delete Policy`})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(a,{to:`/iam/list-policies`,children:`Back to policies`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{x as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_roleName.js b/spinifex/services/spinifexui/frontend/dist/assets/_roleName.js index 5ba21e0a3..e1222cebf 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_roleName.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_roleName.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Bt as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{f as l,m as u,n as d}from"./iam.js";import{S as f,Xr as p,ht as m,pt as h,ut as g,vt as _}from"./index.js";import{t as v}from"./error-banner.js";import{t as y}from"./page-heading.js";import{t as b}from"./delete-confirmation-dialog.js";import{n as x,t as S}from"./detail-row.js";import{t as C}from"./policy-document-viewer.js";var w=t(n()),T=e();function E(){let{roleName:e}=f.useParams(),t=p(),{data:n}=r(_(e)),{data:E}=r(g(e)),{data:D}=r(h(e)),{data:O}=r(m),k=l(),A=d(),j=u(),[M,N]=(0,w.useState)(!1),[P,F]=(0,w.useState)(!1),[I,L]=(0,w.useState)(null),R=n.Role,z=E.AttachedPolicies??[],B=D.InstanceProfiles??[],V=O.Policies??[],H=new Set(z.map(e=>e.PolicyArn)),U=V.filter(e=>e.Arn&&!H.has(e.Arn)),W=R?.AssumeRolePolicyDocument?decodeURIComponent(R.AssumeRolePolicyDocument):null,G=async()=>{try{await k.mutateAsync(e),t({to:`/iam/list-roles`})}finally{N(!1)}},K=async t=>{await A.mutateAsync({roleName:e,policyArn:t}),F(!1)},q=async t=>{L(t);try{await j.mutateAsync({roleName:e,policyArn:t})}finally{L(null)}};return R?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(o,{to:`/iam/list-roles`,children:`Back to roles`}),k.error&&(0,T.jsx)(v,{error:k.error,msg:`Failed to delete role`}),A.error&&(0,T.jsx)(v,{error:A.error,msg:`Failed to attach policy`}),j.error&&(0,T.jsx)(v,{error:j.error,msg:`Failed to detach policy`}),(0,T.jsxs)(`div`,{className:`space-y-6`,children:[(0,T.jsx)(y,{actions:(0,T.jsxs)(c,{onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,T.jsx)(s,{className:`size-4`}),`Delete`]}),subtitle:`Role Details`,title:R.RoleName??``}),(0,T.jsxs)(x,{children:[(0,T.jsx)(x.Header,{children:`Role Information`}),(0,T.jsxs)(x.Content,{children:[(0,T.jsx)(S,{label:`Role Name`,value:R.RoleName}),(0,T.jsx)(S,{label:`Role ID`,value:R.RoleId}),(0,T.jsx)(S,{label:`ARN`,value:R.Arn}),(0,T.jsx)(S,{label:`Path`,value:R.Path}),(0,T.jsx)(S,{label:`Description`,value:R.Description??`-`}),(0,T.jsx)(S,{label:`Created`,value:a(R.CreateDate)})]})]}),W&&(0,T.jsxs)(x,{children:[(0,T.jsx)(x.Header,{children:`Trust Policy`}),(0,T.jsx)(`div`,{className:`p-4`,children:(0,T.jsx)(C,{document:W})})]}),(0,T.jsxs)(x,{children:[(0,T.jsx)(x.Header,{children:(0,T.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,T.jsx)(`span`,{children:`Attached Policies`}),(0,T.jsx)(c,{onClick:()=>F(!P),size:`sm`,children:`Attach Policy`})]})}),(0,T.jsxs)(x.Content,{children:[P&&U.length>0&&(0,T.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a policy to attach:`}),(0,T.jsx)(`div`,{className:`space-y-1`,children:U.map(e=>(0,T.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:A.isPending,onClick:()=>{e.Arn&&K(e.Arn)},type:`button`,children:[(0,T.jsx)(`span`,{children:e.PolicyName}),(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.Arn))})]}),P&&U.length===0&&(0,T.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No policies available to attach.`}),z.length>0?(0,T.jsx)(`div`,{className:`col-span-2 space-y-3`,children:z.map(e=>(0,T.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,T.jsxs)(`div`,{className:`space-y-1`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium`,children:e.PolicyName}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.PolicyArn})]}),(0,T.jsx)(c,{disabled:I===e.PolicyArn,onClick:()=>{e.PolicyArn&&q(e.PolicyArn)},size:`sm`,variant:`outline`,children:`Detach`})]},e.PolicyArn))}):(0,T.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No attached policies.`})]})]}),(0,T.jsxs)(x,{children:[(0,T.jsx)(x.Header,{children:`Instance Profiles`}),(0,T.jsx)(x.Content,{children:B.length>0?(0,T.jsx)(`div`,{className:`col-span-2 space-y-3`,children:B.map(e=>(0,T.jsxs)(i,{className:`flex items-center justify-between rounded-md border p-3 transition-colors hover:bg-accent`,params:{instanceProfileName:e.InstanceProfileName??``},to:`/iam/list-instance-profiles/$instanceProfileName`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium`,children:e.InstanceProfileName}),(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.InstanceProfileName))}):(0,T.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`This role is not in any instance profile.`})})]})]}),(0,T.jsx)(b,{description:`Are you sure you want to delete the role "${e}"? This action cannot be undone. You must detach all policies and remove it from all instance profiles first.`,isPending:k.isPending,onConfirm:G,onOpenChange:N,open:M,title:`Delete Role`})]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(o,{to:`/iam/list-roles`,children:`Back to roles`}),(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:`Role not found.`})]})}export{E as component}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{Bt as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{f as l,m as u,n as d}from"./iam.js";import{Qr as f,_t as p,bt as m,ft as h,ht as g,w as _}from"./index.js";import{t as v}from"./error-banner.js";import{t as y}from"./page-heading.js";import{t as b}from"./delete-confirmation-dialog.js";import{n as x,t as S}from"./detail-row.js";import{t as C}from"./policy-document-viewer.js";var w=t(n()),T=e();function E(){let{roleName:e}=_.useParams(),t=f(),{data:n}=r(m(e)),{data:E}=r(h(e)),{data:D}=r(g(e)),{data:O}=r(p),k=l(),A=d(),j=u(),[M,N]=(0,w.useState)(!1),[P,F]=(0,w.useState)(!1),[I,L]=(0,w.useState)(null),R=n.Role,z=E.AttachedPolicies??[],B=D.InstanceProfiles??[],V=O.Policies??[],H=new Set(z.map(e=>e.PolicyArn)),U=V.filter(e=>e.Arn&&!H.has(e.Arn)),W=R?.AssumeRolePolicyDocument?decodeURIComponent(R.AssumeRolePolicyDocument):null,G=async()=>{try{await k.mutateAsync(e),t({to:`/iam/list-roles`})}finally{N(!1)}},K=async t=>{await A.mutateAsync({roleName:e,policyArn:t}),F(!1)},q=async t=>{L(t);try{await j.mutateAsync({roleName:e,policyArn:t})}finally{L(null)}};return R?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(o,{to:`/iam/list-roles`,children:`Back to roles`}),k.error&&(0,T.jsx)(v,{error:k.error,msg:`Failed to delete role`}),A.error&&(0,T.jsx)(v,{error:A.error,msg:`Failed to attach policy`}),j.error&&(0,T.jsx)(v,{error:j.error,msg:`Failed to detach policy`}),(0,T.jsxs)(`div`,{className:`space-y-6`,children:[(0,T.jsx)(y,{actions:(0,T.jsxs)(c,{onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,T.jsx)(s,{className:`size-4`}),`Delete`]}),subtitle:`Role Details`,title:R.RoleName??``}),(0,T.jsxs)(x,{children:[(0,T.jsx)(x.Header,{children:`Role Information`}),(0,T.jsxs)(x.Content,{children:[(0,T.jsx)(S,{label:`Role Name`,value:R.RoleName}),(0,T.jsx)(S,{label:`Role ID`,value:R.RoleId}),(0,T.jsx)(S,{label:`ARN`,value:R.Arn}),(0,T.jsx)(S,{label:`Path`,value:R.Path}),(0,T.jsx)(S,{label:`Description`,value:R.Description??`-`}),(0,T.jsx)(S,{label:`Created`,value:a(R.CreateDate)})]})]}),W&&(0,T.jsxs)(x,{children:[(0,T.jsx)(x.Header,{children:`Trust Policy`}),(0,T.jsx)(`div`,{className:`p-4`,children:(0,T.jsx)(C,{document:W})})]}),(0,T.jsxs)(x,{children:[(0,T.jsx)(x.Header,{children:(0,T.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,T.jsx)(`span`,{children:`Attached Policies`}),(0,T.jsx)(c,{onClick:()=>F(!P),size:`sm`,children:`Attach Policy`})]})}),(0,T.jsxs)(x.Content,{children:[P&&U.length>0&&(0,T.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a policy to attach:`}),(0,T.jsx)(`div`,{className:`space-y-1`,children:U.map(e=>(0,T.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:A.isPending,onClick:()=>{e.Arn&&K(e.Arn)},type:`button`,children:[(0,T.jsx)(`span`,{children:e.PolicyName}),(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.Arn))})]}),P&&U.length===0&&(0,T.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No policies available to attach.`}),z.length>0?(0,T.jsx)(`div`,{className:`col-span-2 space-y-3`,children:z.map(e=>(0,T.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,T.jsxs)(`div`,{className:`space-y-1`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium`,children:e.PolicyName}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.PolicyArn})]}),(0,T.jsx)(c,{disabled:I===e.PolicyArn,onClick:()=>{e.PolicyArn&&q(e.PolicyArn)},size:`sm`,variant:`outline`,children:`Detach`})]},e.PolicyArn))}):(0,T.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No attached policies.`})]})]}),(0,T.jsxs)(x,{children:[(0,T.jsx)(x.Header,{children:`Instance Profiles`}),(0,T.jsx)(x.Content,{children:B.length>0?(0,T.jsx)(`div`,{className:`col-span-2 space-y-3`,children:B.map(e=>(0,T.jsxs)(i,{className:`flex items-center justify-between rounded-md border p-3 transition-colors hover:bg-accent`,params:{instanceProfileName:e.InstanceProfileName??``},to:`/iam/list-instance-profiles/$instanceProfileName`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium`,children:e.InstanceProfileName}),(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.InstanceProfileName))}):(0,T.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`This role is not in any instance profile.`})})]})]}),(0,T.jsx)(b,{description:`Are you sure you want to delete the role "${e}"? This action cannot be undone. You must detach all policies and remove it from all instance profiles first.`,isPending:k.isPending,onConfirm:G,onOpenChange:N,open:M,title:`Delete Role`})]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(o,{to:`/iam/list-roles`,children:`Back to roles`}),(0,T.jsx)(`p`,{className:`text-muted-foreground`,children:`Role not found.`})]})}export{E as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_serviceName.js b/spinifex/services/spinifexui/frontend/dist/assets/_serviceName.js new file mode 100644 index 000000000..0b8d0a056 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/dist/assets/_serviceName.js @@ -0,0 +1 @@ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./back-link.js";import{st as a,t as o,ut as s}from"./index.js";import{t as c}from"./page-heading.js";import{n as l,t as u}from"./detail-row.js";import{t as d}from"./state-badge.js";var f=t(),p=e();function m(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function h(e,t){return(e.attachments??[]).find(e=>e.type===`ElasticNetworkInterface`)?.details?.find(e=>e.name===t)?.value}function g(e){let t=(0,f.c)(69),{clusterName:o,serviceName:g}=e,b;t[0]===o?b=t[1]:(b=a(o),t[0]=o,t[1]=b);let{data:x}=n(b),S;t[2]===o?S=t[3]:(S=s(o),t[2]=o,t[3]=S);let{data:C}=n(S),w,T,E,D,O,k,A,j,M,N;if(t[4]!==o||t[5]!==g||t[6]!==x||t[7]!==C){E=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[18]===g?e=t[19]:(e=e=>e.serviceName===g,t[18]=g,t[19]=e);let n=x.find(e);if(!n){let e;t[20]===o?e=t[21]:(e={clusterName:o},t[20]=o,t[21]=e);let n;t[22]!==o||t[23]!==e?(n=(0,p.jsx)(i,{params:e,to:`/ecs/list-clusters/$clusterName`,children:o}),t[22]=o,t[23]=e,t[24]=n):n=t[24];let r;t[25]===g?r=t[26]:(r=(0,p.jsx)(c,{subtitle:`Service Details`,title:g}),t[25]=g,t[26]=r);let a;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`Service not found.`}),t[27]=a):a=t[27];let s;t[28]!==n||t[29]!==r?(s=(0,p.jsxs)(p.Fragment,{children:[n,r,a]}),t[28]=n,t[29]=r,t[30]=s):s=t[30],E=s;break bb0}let a=n.loadBalancers??[],s;t[31]===g?s=t[32]:(s=e=>e.group===`service:${g}`,t[31]=g,t[32]=s);let f=C.filter(s),b=n.deployments??[],S=n.events??[],P;t[33]===o?P=t[34]:(P={clusterName:o},t[33]=o,t[34]=P),t[35]!==o||t[36]!==P?(A=(0,p.jsx)(i,{params:P,to:`/ecs/list-clusters/$clusterName`,children:o}),t[35]=o,t[36]=P,t[37]=A):A=t[37],j=(0,p.jsx)(c,{actions:(0,p.jsx)(d,{state:n.status}),subtitle:`Service Details`,title:g});let F;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,p.jsx)(l.Header,{children:`Configuration`}),t[38]=F):F=t[38];let I=String(n.desiredCount??0),L;t[39]===I?L=t[40]:(L=(0,p.jsx)(u,{label:`Desired count`,value:I}),t[39]=I,t[40]=L);let R=String(n.runningCount??0),z;t[41]===R?z=t[42]:(z=(0,p.jsx)(u,{label:`Running count`,value:R}),t[41]=R,t[42]=z);let B=String(n.pendingCount??0),V;t[43]===B?V=t[44]:(V=(0,p.jsx)(u,{label:`Pending count`,value:B}),t[43]=B,t[44]=V);let H=(0,p.jsxs)(l.Content,{children:[(0,p.jsx)(u,{label:`Status`,value:(0,p.jsx)(d,{state:n.status})}),L,z,V,(0,p.jsx)(u,{label:`Task definition`,value:m(n.taskDefinition)}),(0,p.jsx)(u,{label:`Launch type`,value:n.launchType}),(0,p.jsx)(u,{label:`Scheduling strategy`,value:n.schedulingStrategy})]});t[45]===H?M=t[46]:(M=(0,p.jsxs)(l,{children:[F,H]}),t[45]=H,t[46]=M);let U;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Load balancers`}),t[47]=U):U=t[47];let W=a.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`None`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Group`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Container`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`})]})}),(0,p.jsx)(`tbody`,{children:a.map(y)})]})});t[48]===W?N=t[49]:(N=(0,p.jsxs)(`div`,{className:`mt-6`,children:[U,W]}),t[48]=W,t[49]=N);let G;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Tasks`}),t[50]=G):G=t[50];let K=f.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`No tasks found.`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Last Status`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Private IP`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Public IP`})]})}),(0,p.jsx)(`tbody`,{children:f.map(e=>{let t=m(e.taskArn);return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,p.jsx)(r,{className:`underline`,params:{clusterName:o,taskId:t},to:`/ecs/list-clusters/$clusterName/tasks/$taskId`,children:t})}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:(0,p.jsx)(d,{state:e.lastStatus})}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:h(e,`privateIPv4Address`)??`—`}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:h(e,`publicIPv4Address`)??`—`})]},t)})})]})});t[51]===K?w=t[52]:(w=(0,p.jsxs)(`div`,{className:`mt-6`,children:[G,K]}),t[51]=K,t[52]=w);let q;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Deployments`}),t[53]=q):q=t[53];let J=b.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`None`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task Definition`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`})]})}),(0,p.jsx)(`tbody`,{children:b.map(v)})]})});t[54]===J?T=t[55]:(T=(0,p.jsxs)(`div`,{className:`mt-6`,children:[q,J]}),t[54]=J,t[55]=T),D=`mt-6`,t[56]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,p.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Events`}),t[56]=O):O=t[56],k=S.length===0?(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:`None`}):(0,p.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,p.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Time`}),(0,p.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Message`})]})}),(0,p.jsx)(`tbody`,{children:S.map(_)})]})})}t[4]=o,t[5]=g,t[6]=x,t[7]=C,t[8]=w,t[9]=T,t[10]=E,t[11]=D,t[12]=O,t[13]=k,t[14]=A,t[15]=j,t[16]=M,t[17]=N}else w=t[8],T=t[9],E=t[10],D=t[11],O=t[12],k=t[13],A=t[14],j=t[15],M=t[16],N=t[17];if(E!==Symbol.for(`react.early_return_sentinel`))return E;let P;t[57]!==D||t[58]!==O||t[59]!==k?(P=(0,p.jsxs)(`div`,{className:D,children:[O,k]}),t[57]=D,t[58]=O,t[59]=k,t[60]=P):P=t[60];let F;return t[61]!==w||t[62]!==T||t[63]!==P||t[64]!==A||t[65]!==j||t[66]!==M||t[67]!==N?(F=(0,p.jsxs)(p.Fragment,{children:[A,j,M,N,w,T,P]}),t[61]=w,t[62]=T,t[63]=P,t[64]=A,t[65]=j,t[66]=M,t[67]=N,t[68]=F):F=t[68],F}function _(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.createdAt?new Date(e.createdAt).toISOString():``}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.message})]},e.id)}function v(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.status}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:m(e.taskDefinition)}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredCount??0}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.runningCount??0}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingCount??0})]},e.id)}function y(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:m(e.targetGroupArn)}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.containerName}),(0,p.jsx)(`td`,{className:`px-4 py-2`,children:e.containerPort})]},`${e.targetGroupArn??``}-${e.containerName??``}-${e.containerPort??``}`)}function b(){let e=(0,f.c)(3),{clusterName:t,serviceName:n}=o.useParams(),r;return e[0]!==t||e[1]!==n?(r=(0,p.jsx)(g,{clusterName:t,serviceName:n}),e[0]=t,e[1]=n,e[2]=r):r=e[2],r}export{b as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_taskId.js b/spinifex/services/spinifexui/frontend/dist/assets/_taskId.js new file mode 100644 index 000000000..3e380bcba --- /dev/null +++ b/spinifex/services/spinifexui/frontend/dist/assets/_taskId.js @@ -0,0 +1 @@ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./back-link.js";import{n as i,ut as a}from"./index.js";import{t as o}from"./page-heading.js";import{n as s,t as c}from"./detail-row.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function p(e,t){return e?.details?.find(e=>e.name===t)?.value}function m(e){return e?new Date(e).toISOString():``}function h(e){let t=(0,u.c)(48),{clusterName:i,taskId:h}=e,v;t[0]===i?v=t[1]:(v=a(i),t[0]=i,t[1]=v);let{data:y}=n(v),b,x,S,C,w,T,E,D;if(t[2]!==i||t[3]!==h||t[4]!==y){D=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[13]===h?e=t[14]:(e=e=>(e.taskArn??``).endsWith(h),t[13]=h,t[14]=e);let n=y.find(e);if(!n){let e;t[15]===i?e=t[16]:(e={clusterName:i},t[15]=i,t[16]=e);let n;t[17]!==i||t[18]!==e?(n=(0,d.jsx)(r,{params:e,to:`/ecs/list-clusters/$clusterName`,children:i}),t[17]=i,t[18]=e,t[19]=n):n=t[19];let a;t[20]===h?a=t[21]:(a=(0,d.jsx)(o,{subtitle:`Task Details`,title:h}),t[20]=h,t[21]=a);let s;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Task not found.`}),t[22]=s):s=t[22];let c;t[23]!==n||t[24]!==a?(c=(0,d.jsxs)(d.Fragment,{children:[n,a,s]}),t[23]=n,t[24]=a,t[25]=c):c=t[25],D=c;break bb0}let a=(n.attachments??[]).find(_),u=n.containers??[],v;t[26]===i?v=t[27]:(v={clusterName:i},t[26]=i,t[27]=v),t[28]!==i||t[29]!==v?(C=(0,d.jsx)(r,{params:v,to:`/ecs/list-clusters/$clusterName`,children:i}),t[28]=i,t[29]=v,t[30]=C):C=t[30],w=(0,d.jsx)(o,{actions:(0,d.jsx)(l,{state:n.lastStatus}),subtitle:`Task Details`,title:f(n.taskArn)});let O;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,d.jsx)(s.Header,{children:`Configuration`}),t[31]=O):O=t[31];let k=(0,d.jsxs)(s.Content,{children:[(0,d.jsx)(c,{label:`Task ID`,value:f(n.taskArn)}),(0,d.jsx)(c,{label:`Last status`,value:(0,d.jsx)(l,{state:n.lastStatus})}),(0,d.jsx)(c,{label:`Desired status`,value:n.desiredStatus}),(0,d.jsx)(c,{label:`Task definition`,value:f(n.taskDefinitionArn)}),(0,d.jsx)(c,{label:`Launch type`,value:n.launchType}),(0,d.jsx)(c,{label:`Container instance`,value:f(n.containerInstanceArn)}),(0,d.jsx)(c,{label:`Created at`,value:m(n.createdAt)}),(0,d.jsx)(c,{label:`Started at`,value:m(n.startedAt)}),(0,d.jsx)(c,{label:`Stopped at`,value:m(n.stoppedAt)}),n.stoppedReason?(0,d.jsx)(c,{label:`Stopped reason`,value:n.stoppedReason}):null]});t[32]===k?T=t[33]:(T=(0,d.jsxs)(s,{children:[O,k]}),t[32]=k,t[33]=T);let A;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,d.jsx)(s.Header,{children:`Networking`}),t[34]=A):A=t[34];let j=a?(0,d.jsxs)(s.Content,{children:[(0,d.jsx)(c,{label:`ENI ID`,value:p(a,`networkInterfaceId`)}),(0,d.jsx)(c,{label:`Private IP`,value:p(a,`privateIPv4Address`)}),(0,d.jsx)(c,{label:`Public IP`,value:p(a,`publicIPv4Address`)}),(0,d.jsx)(c,{label:`Subnet`,value:p(a,`subnetId`)}),(0,d.jsx)(c,{label:`MAC`,value:p(a,`macAddress`)})]}):(0,d.jsx)(`div`,{className:`p-4`,children:(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Network mode does not assign an ENI.`})});t[35]===j?E=t[36]:(E=(0,d.jsx)(`div`,{className:`mt-6`,children:(0,d.jsxs)(s,{children:[A,j]})}),t[35]=j,t[36]=E),b=`mt-6`,t[37]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,d.jsx)(`h2`,{className:`mb-2 font-semibold`,children:`Containers`}),t[37]=x):x=t[37],S=u.length===0?(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No containers.`}):(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Image`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Exit Code / Reason`})]})}),(0,d.jsx)(`tbody`,{children:u.map(g)})]})})}t[2]=i,t[3]=h,t[4]=y,t[5]=b,t[6]=x,t[7]=S,t[8]=C,t[9]=w,t[10]=T,t[11]=E,t[12]=D}else b=t[5],x=t[6],S=t[7],C=t[8],w=t[9],T=t[10],E=t[11],D=t[12];if(D!==Symbol.for(`react.early_return_sentinel`))return D;let O;t[38]!==b||t[39]!==x||t[40]!==S?(O=(0,d.jsxs)(`div`,{className:b,children:[x,S]}),t[38]=b,t[39]=x,t[40]=S,t[41]=O):O=t[41];let k;return t[42]!==O||t[43]!==C||t[44]!==w||t[45]!==T||t[46]!==E?(k=(0,d.jsxs)(d.Fragment,{children:[C,w,T,E,O]}),t[42]=O,t[43]=C,t[44]=w,t[45]=T,t[46]=E,t[47]=k):k=t[47],k}function g(e){return(0,d.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:e.name}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.image}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.lastStatus})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.healthStatus}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.exitCode===void 0?e.reason??``:String(e.exitCode)})]},e.name??e.containerArn)}function _(e){return e.type===`ElasticNetworkInterface`}function v(){let e=(0,u.c)(3),{clusterName:t,taskId:n}=i.useParams(),r;return e[0]!==t||e[1]!==n?(r=(0,d.jsx)(h,{clusterName:t,taskId:n}),e[0]=t,e[1]=n,e[2]=r):r=e[2],r}export{v as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_userName.js b/spinifex/services/spinifexui/frontend/dist/assets/_userName.js index 88dc8245c..1e3f3a9c9 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_userName.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_userName.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{Bt as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./check.js";import{t as c}from"./trash-2.js";import{t as l}from"./triangle-alert.js";import{t as u}from"./button.js";import{_ as d,h as f,i as p,l as m,p as h,r as g}from"./iam.js";import{C as _,Xr as v,bt as y,dt as b,ht as x,lt as S}from"./index.js";import{t as C}from"./use-copy-to-clipboard.js";import{t as w}from"./error-banner.js";import{t as T}from"./page-heading.js";import{a as E,c as D,i as O,l as k,o as A,r as j,s as M,t as N}from"./alert-dialog.js";import{t as P}from"./delete-confirmation-dialog.js";import{n as F,t as I}from"./detail-row.js";import{t as L}from"./state-badge.js";var R=t(n()),z=r(),B=e();function V(e){let t=(0,z.c)(27),{onClose:n,accessKeyId:r,secretAccessKey:i}=e,{copied:a,copy:o}=C(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,B.jsxs)(M,{children:[(0,B.jsx)(D,{children:(0,B.jsx)(l,{className:`text-destructive`})}),(0,B.jsx)(k,{children:`Save Your Access Key`}),(0,B.jsx)(E,{children:`This is your only chance to view the secret access key. Please copy it now. You won't be able to retrieve it again.`})]}),t[0]=c):c=t[0];let d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,B.jsx)(`span`,{className:`text-muted-foreground`,children:`Access Key ID: `}),t[1]=d):d=t[1];let f;t[2]===r?f=t[3]:(f=(0,B.jsxs)(`div`,{children:[d,r]}),t[2]=r,t[3]=f);let p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,B.jsx)(`span`,{className:`text-muted-foreground`,children:`Secret Access Key: `}),t[4]=p):p=t[4];let m;t[5]===i?m=t[6]:(m=(0,B.jsxs)(`div`,{children:[p,i]}),t[5]=i,t[6]=m);let h;t[7]!==f||t[8]!==m?(h=(0,B.jsxs)(`div`,{className:`space-y-2 rounded-md border p-4 font-mono text-sm`,children:[f,m]}),t[7]=f,t[8]=m,t[9]=h):h=t[9];let g;t[10]!==r||t[11]!==o||t[12]!==i?(g=async()=>await o(`Access Key ID: ${r}\nSecret Access Key: ${i}`),t[10]=r,t[11]=o,t[12]=i,t[13]=g):g=t[13];let _;t[14]===a?_=t[15]:(_=a?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(s,{className:`mr-2 size-4`}),`Copied!`]}):`Copy to Clipboard`,t[14]=a,t[15]=_);let v;t[16]!==g||t[17]!==_?(v=(0,B.jsx)(u,{className:`w-full`,onClick:g,type:`button`,variant:`outline`,children:_}),t[16]=g,t[17]=_,t[18]=v):v=t[18];let y;t[19]!==h||t[20]!==v?(y=(0,B.jsxs)(`div`,{className:`space-y-3`,children:[h,v]}),t[19]=h,t[20]=v,t[21]=y):y=t[21];let b;t[22]===n?b=t[23]:(b=(0,B.jsx)(A,{children:(0,B.jsx)(j,{onClick:n,children:`Close and Continue`})}),t[22]=n,t[23]=b);let x;return t[24]!==y||t[25]!==b?(x=(0,B.jsx)(N,{open:!0,children:(0,B.jsxs)(O,{className:`max-w-2xl`,children:[c,y,b]})}),t[24]=y,t[25]=b,t[26]=x):x=t[26],x}function H(){let{userName:e}=_.useParams(),t=v(),{data:n}=i(y(e)),{data:r}=i(S(e)),{data:s}=i(b(e)),{data:l}=i(x),C=h(),E=p(),D=m(),O=d(),k=g(),A=f(),[j,M]=(0,R.useState)(!1),[N,z]=(0,R.useState)(null),[H,U]=(0,R.useState)(!1),[W,G]=(0,R.useState)(null),[K,q]=(0,R.useState)(null),J=n.User,Y=r.AccessKeyMetadata??[],X=s.AttachedPolicies??[],Z=l.Policies??[],Q=new Set(X.map(e=>e.PolicyArn)),$=Z.filter(e=>e.Arn&&!Q.has(e.Arn)),ee=async()=>{try{await C.mutateAsync(e),t({to:`/iam/list-users`})}finally{M(!1)}},te=async()=>{let t=await E.mutateAsync(e);t.AccessKey&&z({accessKeyId:t.AccessKey.AccessKeyId??``,secretAccessKey:t.AccessKey.SecretAccessKey??``})},ne=async t=>{if(t.AccessKeyId){G(t.AccessKeyId);try{await O.mutateAsync({userName:e,accessKeyId:t.AccessKeyId,status:t.Status===`Active`?`Inactive`:`Active`})}finally{G(null)}}},re=async t=>{G(t);try{await D.mutateAsync({userName:e,accessKeyId:t})}finally{G(null)}},ie=async t=>{await k.mutateAsync({userName:e,policyArn:t}),U(!1)},ae=async t=>{q(t);try{await A.mutateAsync({userName:e,policyArn:t})}finally{q(null)}};return J?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(o,{to:`/iam/list-users`,children:`Back to users`}),C.error&&(0,B.jsx)(w,{error:C.error,msg:`Failed to delete user`}),E.error&&(0,B.jsx)(w,{error:E.error,msg:`Failed to create access key`}),D.error&&(0,B.jsx)(w,{error:D.error,msg:`Failed to delete access key`}),k.error&&(0,B.jsx)(w,{error:k.error,msg:`Failed to attach policy`}),A.error&&(0,B.jsx)(w,{error:A.error,msg:`Failed to detach policy`}),(0,B.jsxs)(`div`,{className:`space-y-6`,children:[(0,B.jsx)(T,{actions:(0,B.jsxs)(u,{onClick:()=>M(!0),size:`sm`,variant:`destructive`,children:[(0,B.jsx)(c,{className:`size-4`}),`Delete`]}),subtitle:`User Details`,title:J.UserName??``}),(0,B.jsxs)(F,{children:[(0,B.jsx)(F.Header,{children:`User Information`}),(0,B.jsxs)(F.Content,{children:[(0,B.jsx)(I,{label:`User Name`,value:J.UserName}),(0,B.jsx)(I,{label:`User ID`,value:J.UserId}),(0,B.jsx)(I,{label:`ARN`,value:J.Arn}),(0,B.jsx)(I,{label:`Path`,value:J.Path}),(0,B.jsx)(I,{label:`Created`,value:a(J.CreateDate)})]})]}),(0,B.jsxs)(F,{children:[(0,B.jsx)(F.Header,{children:(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(`span`,{children:`Access Keys`}),(0,B.jsx)(u,{disabled:E.isPending,onClick:te,size:`sm`,children:E.isPending?`Creating...`:`Create Access Key`})]})}),(0,B.jsx)(F.Content,{children:Y.length>0?(0,B.jsx)(`div`,{className:`col-span-2 space-y-3`,children:Y.map(e=>(0,B.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,B.jsxs)(`div`,{className:`space-y-1`,children:[(0,B.jsx)(`p`,{className:`font-mono text-sm`,children:e.AccessKeyId}),(0,B.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Created `,a(e.CreateDate)]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(L,{state:e.Status}),(0,B.jsx)(u,{disabled:W===e.AccessKeyId,onClick:async()=>await ne(e),size:`sm`,variant:`outline`,children:e.Status===`Active`?`Deactivate`:`Activate`}),(0,B.jsx)(u,{disabled:W===e.AccessKeyId,onClick:()=>{e.AccessKeyId&&re(e.AccessKeyId)},size:`sm`,variant:`destructive`,children:`Delete`})]})]},e.AccessKeyId))}):(0,B.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No access keys.`})})]}),(0,B.jsxs)(F,{children:[(0,B.jsx)(F.Header,{children:(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(`span`,{children:`Attached Policies`}),(0,B.jsx)(u,{onClick:()=>U(!H),size:`sm`,children:`Attach Policy`})]})}),(0,B.jsxs)(F.Content,{children:[H&&$.length>0&&(0,B.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a policy to attach:`}),(0,B.jsx)(`div`,{className:`space-y-1`,children:$.map(e=>(0,B.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:k.isPending,onClick:()=>{e.Arn&&ie(e.Arn)},type:`button`,children:[(0,B.jsx)(`span`,{children:e.PolicyName}),(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.Arn))})]}),H&&$.length===0&&(0,B.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No policies available to attach.`}),X.length>0?(0,B.jsx)(`div`,{className:`col-span-2 space-y-3`,children:X.map(e=>(0,B.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,B.jsxs)(`div`,{className:`space-y-1`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium`,children:e.PolicyName}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.PolicyArn})]}),(0,B.jsx)(u,{disabled:K===e.PolicyArn,onClick:()=>{e.PolicyArn&&ae(e.PolicyArn)},size:`sm`,variant:`outline`,children:`Detach`})]},e.PolicyArn))}):(0,B.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No attached policies.`})]})]})]}),(0,B.jsx)(P,{description:`Are you sure you want to delete the user "${e}"? This action cannot be undone. You must detach all policies and delete all access keys first.`,isPending:C.isPending,onConfirm:ee,onOpenChange:M,open:j,title:`Delete User`}),N&&(0,B.jsx)(V,{accessKeyId:N.accessKeyId,onClose:()=>z(null),secretAccessKey:N.secretAccessKey})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(o,{to:`/iam/list-users`,children:`Back to users`}),(0,B.jsx)(`p`,{className:`text-muted-foreground`,children:`User not found.`})]})}export{H as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{Bt as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./check.js";import{t as c}from"./trash-2.js";import{t as l}from"./triangle-alert.js";import{t as u}from"./button.js";import{_ as d,h as f,i as p,l as m,p as h,r as g}from"./iam.js";import{Qr as _,St as v,T as y,_t as b,dt as x,pt as S}from"./index.js";import{t as C}from"./use-copy-to-clipboard.js";import{t as w}from"./error-banner.js";import{t as T}from"./page-heading.js";import{a as E,c as D,i as O,l as k,o as A,r as j,s as M,t as N}from"./alert-dialog.js";import{t as P}from"./delete-confirmation-dialog.js";import{n as F,t as I}from"./detail-row.js";import{t as L}from"./state-badge.js";var R=t(n()),z=r(),B=e();function V(e){let t=(0,z.c)(27),{onClose:n,accessKeyId:r,secretAccessKey:i}=e,{copied:a,copy:o}=C(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,B.jsxs)(M,{children:[(0,B.jsx)(D,{children:(0,B.jsx)(l,{className:`text-destructive`})}),(0,B.jsx)(k,{children:`Save Your Access Key`}),(0,B.jsx)(E,{children:`This is your only chance to view the secret access key. Please copy it now. You won't be able to retrieve it again.`})]}),t[0]=c):c=t[0];let d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,B.jsx)(`span`,{className:`text-muted-foreground`,children:`Access Key ID: `}),t[1]=d):d=t[1];let f;t[2]===r?f=t[3]:(f=(0,B.jsxs)(`div`,{children:[d,r]}),t[2]=r,t[3]=f);let p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,B.jsx)(`span`,{className:`text-muted-foreground`,children:`Secret Access Key: `}),t[4]=p):p=t[4];let m;t[5]===i?m=t[6]:(m=(0,B.jsxs)(`div`,{children:[p,i]}),t[5]=i,t[6]=m);let h;t[7]!==f||t[8]!==m?(h=(0,B.jsxs)(`div`,{className:`space-y-2 rounded-md border p-4 font-mono text-sm`,children:[f,m]}),t[7]=f,t[8]=m,t[9]=h):h=t[9];let g;t[10]!==r||t[11]!==o||t[12]!==i?(g=async()=>await o(`Access Key ID: ${r}\nSecret Access Key: ${i}`),t[10]=r,t[11]=o,t[12]=i,t[13]=g):g=t[13];let _;t[14]===a?_=t[15]:(_=a?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(s,{className:`mr-2 size-4`}),`Copied!`]}):`Copy to Clipboard`,t[14]=a,t[15]=_);let v;t[16]!==g||t[17]!==_?(v=(0,B.jsx)(u,{className:`w-full`,onClick:g,type:`button`,variant:`outline`,children:_}),t[16]=g,t[17]=_,t[18]=v):v=t[18];let y;t[19]!==h||t[20]!==v?(y=(0,B.jsxs)(`div`,{className:`space-y-3`,children:[h,v]}),t[19]=h,t[20]=v,t[21]=y):y=t[21];let b;t[22]===n?b=t[23]:(b=(0,B.jsx)(A,{children:(0,B.jsx)(j,{onClick:n,children:`Close and Continue`})}),t[22]=n,t[23]=b);let x;return t[24]!==y||t[25]!==b?(x=(0,B.jsx)(N,{open:!0,children:(0,B.jsxs)(O,{className:`max-w-2xl`,children:[c,y,b]})}),t[24]=y,t[25]=b,t[26]=x):x=t[26],x}function H(){let{userName:e}=y.useParams(),t=_(),{data:n}=i(v(e)),{data:r}=i(x(e)),{data:s}=i(S(e)),{data:l}=i(b),C=h(),E=p(),D=m(),O=d(),k=g(),A=f(),[j,M]=(0,R.useState)(!1),[N,z]=(0,R.useState)(null),[H,U]=(0,R.useState)(!1),[W,G]=(0,R.useState)(null),[K,q]=(0,R.useState)(null),J=n.User,Y=r.AccessKeyMetadata??[],X=s.AttachedPolicies??[],Z=l.Policies??[],Q=new Set(X.map(e=>e.PolicyArn)),$=Z.filter(e=>e.Arn&&!Q.has(e.Arn)),ee=async()=>{try{await C.mutateAsync(e),t({to:`/iam/list-users`})}finally{M(!1)}},te=async()=>{let t=await E.mutateAsync(e);t.AccessKey&&z({accessKeyId:t.AccessKey.AccessKeyId??``,secretAccessKey:t.AccessKey.SecretAccessKey??``})},ne=async t=>{if(t.AccessKeyId){G(t.AccessKeyId);try{await O.mutateAsync({userName:e,accessKeyId:t.AccessKeyId,status:t.Status===`Active`?`Inactive`:`Active`})}finally{G(null)}}},re=async t=>{G(t);try{await D.mutateAsync({userName:e,accessKeyId:t})}finally{G(null)}},ie=async t=>{await k.mutateAsync({userName:e,policyArn:t}),U(!1)},ae=async t=>{q(t);try{await A.mutateAsync({userName:e,policyArn:t})}finally{q(null)}};return J?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(o,{to:`/iam/list-users`,children:`Back to users`}),C.error&&(0,B.jsx)(w,{error:C.error,msg:`Failed to delete user`}),E.error&&(0,B.jsx)(w,{error:E.error,msg:`Failed to create access key`}),D.error&&(0,B.jsx)(w,{error:D.error,msg:`Failed to delete access key`}),k.error&&(0,B.jsx)(w,{error:k.error,msg:`Failed to attach policy`}),A.error&&(0,B.jsx)(w,{error:A.error,msg:`Failed to detach policy`}),(0,B.jsxs)(`div`,{className:`space-y-6`,children:[(0,B.jsx)(T,{actions:(0,B.jsxs)(u,{onClick:()=>M(!0),size:`sm`,variant:`destructive`,children:[(0,B.jsx)(c,{className:`size-4`}),`Delete`]}),subtitle:`User Details`,title:J.UserName??``}),(0,B.jsxs)(F,{children:[(0,B.jsx)(F.Header,{children:`User Information`}),(0,B.jsxs)(F.Content,{children:[(0,B.jsx)(I,{label:`User Name`,value:J.UserName}),(0,B.jsx)(I,{label:`User ID`,value:J.UserId}),(0,B.jsx)(I,{label:`ARN`,value:J.Arn}),(0,B.jsx)(I,{label:`Path`,value:J.Path}),(0,B.jsx)(I,{label:`Created`,value:a(J.CreateDate)})]})]}),(0,B.jsxs)(F,{children:[(0,B.jsx)(F.Header,{children:(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(`span`,{children:`Access Keys`}),(0,B.jsx)(u,{disabled:E.isPending,onClick:te,size:`sm`,children:E.isPending?`Creating...`:`Create Access Key`})]})}),(0,B.jsx)(F.Content,{children:Y.length>0?(0,B.jsx)(`div`,{className:`col-span-2 space-y-3`,children:Y.map(e=>(0,B.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,B.jsxs)(`div`,{className:`space-y-1`,children:[(0,B.jsx)(`p`,{className:`font-mono text-sm`,children:e.AccessKeyId}),(0,B.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Created `,a(e.CreateDate)]})]}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(L,{state:e.Status}),(0,B.jsx)(u,{disabled:W===e.AccessKeyId,onClick:async()=>await ne(e),size:`sm`,variant:`outline`,children:e.Status===`Active`?`Deactivate`:`Activate`}),(0,B.jsx)(u,{disabled:W===e.AccessKeyId,onClick:()=>{e.AccessKeyId&&re(e.AccessKeyId)},size:`sm`,variant:`destructive`,children:`Delete`})]})]},e.AccessKeyId))}):(0,B.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No access keys.`})})]}),(0,B.jsxs)(F,{children:[(0,B.jsx)(F.Header,{children:(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsx)(`span`,{children:`Attached Policies`}),(0,B.jsx)(u,{onClick:()=>U(!H),size:`sm`,children:`Attach Policy`})]})}),(0,B.jsxs)(F.Content,{children:[H&&$.length>0&&(0,B.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a policy to attach:`}),(0,B.jsx)(`div`,{className:`space-y-1`,children:$.map(e=>(0,B.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:k.isPending,onClick:()=>{e.Arn&&ie(e.Arn)},type:`button`,children:[(0,B.jsx)(`span`,{children:e.PolicyName}),(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.Arn))})]}),H&&$.length===0&&(0,B.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No policies available to attach.`}),X.length>0?(0,B.jsx)(`div`,{className:`col-span-2 space-y-3`,children:X.map(e=>(0,B.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,B.jsxs)(`div`,{className:`space-y-1`,children:[(0,B.jsx)(`p`,{className:`text-sm font-medium`,children:e.PolicyName}),(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.PolicyArn})]}),(0,B.jsx)(u,{disabled:K===e.PolicyArn,onClick:()=>{e.PolicyArn&&ae(e.PolicyArn)},size:`sm`,variant:`outline`,children:`Detach`})]},e.PolicyArn))}):(0,B.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No attached policies.`})]})]})]}),(0,B.jsx)(P,{description:`Are you sure you want to delete the user "${e}"? This action cannot be undone. You must detach all policies and delete all access keys first.`,isPending:C.isPending,onConfirm:ee,onOpenChange:M,open:j,title:`Delete User`}),N&&(0,B.jsx)(V,{accessKeyId:N.accessKeyId,onClose:()=>z(null),secretAccessKey:N.secretAccessKey})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(o,{to:`/iam/list-users`,children:`Back to users`}),(0,B.jsx)(`p`,{className:`text-muted-foreground`,children:`User not found.`})]})}export{H as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/admin.js b/spinifex/services/spinifexui/frontend/dist/assets/admin.js index e83950f61..563a9a733 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/admin.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/admin.js @@ -1 +1 @@ -import{t as e}from"./queryOptions.js";import{r as t}from"./auth.js";import{rn as n}from"./index.js";var r=e({queryKey:[`admin`,`nodes`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetNodes`,credentials:e})},staleTime:1e4}),i=e({queryKey:[`admin`,`vms`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetVMs`,credentials:e})},staleTime:1e4}),a=e({queryKey:[`admin`,`storageStatus`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetStorageStatus`,credentials:e})},staleTime:1e4});export{a as n,i as r,r as t}; \ No newline at end of file +import{t as e}from"./queryOptions.js";import{r as t}from"./auth.js";import{an as n}from"./index.js";var r=e({queryKey:[`admin`,`nodes`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetNodes`,credentials:e})},staleTime:1e4}),i=e({queryKey:[`admin`,`vms`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetVMs`,credentials:e})},staleTime:1e4}),a=e({queryKey:[`admin`,`storageStatus`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetStorageStatus`,credentials:e})},staleTime:1e4});export{a as n,i as r,r as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/alert-dialog.js b/spinifex/services/spinifexui/frontend/dist/assets/alert-dialog.js index 46c897646..ee8ac6806 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/alert-dialog.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/alert-dialog.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{Lt as n}from"./auth.js";import{t as r}from"./button.js";import{Jn as i,Yn as a,cn as o,dn as s,ln as c,mn as l,qn as u}from"./index.js";function d(e){return c(e,`alert-dialog`)}var f=t(),p=e();function m(e){let t=(0,f.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,p.jsx)(d,{"data-slot":`alert-dialog`,...n}),t[2]=n,t[3]=r),r}function h(e){let t=(0,f.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,p.jsx)(s,{"data-slot":`alert-dialog-portal`,...n}),t[2]=n,t[3]=r),r}function g(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let o;t[3]===r?o=t[4]:(o=n(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:animate-out data-open:animate-in fixed inset-0 isolate z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs`,r),t[3]=r,t[4]=o);let s;return t[5]!==i||t[6]!==o?(s=(0,p.jsx)(a,{className:o,"data-slot":`alert-dialog-overlay`,...i}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s}function _(e){let t=(0,f.c)(11),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({className:r,size:a,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let o=a===void 0?`default`:a,s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,p.jsx)(g,{}),t[4]=s):s=t[4];let c;t[5]===r?c=t[6]:(c=n(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 group/alert-dialog-content data-closed:animate-out data-open:animate-in fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-background p-4 ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm`,r),t[5]=r,t[6]=c);let u;return t[7]!==i||t[8]!==o||t[9]!==c?(u=(0,p.jsxs)(h,{children:[s,(0,p.jsx)(l,{className:c,"data-size":o,"data-slot":`alert-dialog-content`,...i})]}),t[7]=i,t[8]=o,t[9]=c,t[10]=u):u=t[10],u}function v(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,p.jsx)(`div`,{className:a,"data-slot":`alert-dialog-header`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function y(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,p.jsx)(`div`,{className:a,"data-slot":`alert-dialog-footer`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function b(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`mb-2 inline-flex size-8 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-4`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,p.jsx)(`div`,{className:a,"data-slot":`alert-dialog-media`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function x(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,r),t[3]=r,t[4]=a);let s;return t[5]!==i||t[6]!==a?(s=(0,p.jsx)(o,{className:a,"data-slot":`alert-dialog-title`,...i}),t[5]=i,t[6]=a,t[7]=s):s=t[7],s}function S(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`text-xs/relaxed text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,p.jsx)(u,{className:a,"data-slot":`alert-dialog-description`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function C(e){let t=(0,f.c)(8),i,a;t[0]===e?(i=t[1],a=t[2]):({className:i,...a}=e,t[0]=e,t[1]=i,t[2]=a);let o;t[3]===i?o=t[4]:(o=n(i),t[3]=i,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,p.jsx)(r,{className:o,"data-slot":`alert-dialog-action`,...a}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function w(e){let t=(0,f.c)(14),a,o,s,c;t[0]===e?(a=t[1],o=t[2],s=t[3],c=t[4]):({className:a,variant:s,size:c,...o}=e,t[0]=e,t[1]=a,t[2]=o,t[3]=s,t[4]=c);let l=s===void 0?`outline`:s,u=c===void 0?`default`:c,d;t[5]===a?d=t[6]:(d=n(a),t[5]=a,t[6]=d);let m;t[7]!==u||t[8]!==l?(m=(0,p.jsx)(r,{size:u,variant:l}),t[7]=u,t[8]=l,t[9]=m):m=t[9];let h;return t[10]!==o||t[11]!==d||t[12]!==m?(h=(0,p.jsx)(i,{className:d,"data-slot":`alert-dialog-cancel`,render:m,...o}),t[10]=o,t[11]=d,t[12]=m,t[13]=h):h=t[13],h}export{S as a,b as c,_ as i,x as l,C as n,y as o,w as r,v as s,m as t}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{Lt as n}from"./auth.js";import{t as r}from"./button.js";import{Xn as i,Yn as a,Zn as o,dn as s,gn as c,pn as l,un as u}from"./index.js";function d(e){return s(e,`alert-dialog`)}var f=t(),p=e();function m(e){let t=(0,f.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,p.jsx)(d,{"data-slot":`alert-dialog`,...n}),t[2]=n,t[3]=r),r}function h(e){let t=(0,f.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,p.jsx)(l,{"data-slot":`alert-dialog-portal`,...n}),t[2]=n,t[3]=r),r}function g(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:animate-out data-open:animate-in fixed inset-0 isolate z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs`,r),t[3]=r,t[4]=a);let s;return t[5]!==i||t[6]!==a?(s=(0,p.jsx)(o,{className:a,"data-slot":`alert-dialog-overlay`,...i}),t[5]=i,t[6]=a,t[7]=s):s=t[7],s}function _(e){let t=(0,f.c)(11),r,i,a;t[0]===e?(r=t[1],i=t[2],a=t[3]):({className:r,size:a,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a);let o=a===void 0?`default`:a,s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,p.jsx)(g,{}),t[4]=s):s=t[4];let l;t[5]===r?l=t[6]:(l=n(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 group/alert-dialog-content data-closed:animate-out data-open:animate-in fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-background p-4 ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm`,r),t[5]=r,t[6]=l);let u;return t[7]!==i||t[8]!==o||t[9]!==l?(u=(0,p.jsxs)(h,{children:[s,(0,p.jsx)(c,{className:l,"data-size":o,"data-slot":`alert-dialog-content`,...i})]}),t[7]=i,t[8]=o,t[9]=l,t[10]=u):u=t[10],u}function v(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,p.jsx)(`div`,{className:a,"data-slot":`alert-dialog-header`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function y(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,p.jsx)(`div`,{className:a,"data-slot":`alert-dialog-footer`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function b(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`mb-2 inline-flex size-8 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-4`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,p.jsx)(`div`,{className:a,"data-slot":`alert-dialog-media`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function x(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let a;t[3]===r?a=t[4]:(a=n(`text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,r),t[3]=r,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,p.jsx)(u,{className:a,"data-slot":`alert-dialog-title`,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function S(e){let t=(0,f.c)(8),r,i;t[0]===e?(r=t[1],i=t[2]):({className:r,...i}=e,t[0]=e,t[1]=r,t[2]=i);let o;t[3]===r?o=t[4]:(o=n(`text-xs/relaxed text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,r),t[3]=r,t[4]=o);let s;return t[5]!==i||t[6]!==o?(s=(0,p.jsx)(a,{className:o,"data-slot":`alert-dialog-description`,...i}),t[5]=i,t[6]=o,t[7]=s):s=t[7],s}function C(e){let t=(0,f.c)(8),i,a;t[0]===e?(i=t[1],a=t[2]):({className:i,...a}=e,t[0]=e,t[1]=i,t[2]=a);let o;t[3]===i?o=t[4]:(o=n(i),t[3]=i,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,p.jsx)(r,{className:o,"data-slot":`alert-dialog-action`,...a}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function w(e){let t=(0,f.c)(14),a,o,s,c;t[0]===e?(a=t[1],o=t[2],s=t[3],c=t[4]):({className:a,variant:s,size:c,...o}=e,t[0]=e,t[1]=a,t[2]=o,t[3]=s,t[4]=c);let l=s===void 0?`outline`:s,u=c===void 0?`default`:c,d;t[5]===a?d=t[6]:(d=n(a),t[5]=a,t[6]=d);let m;t[7]!==u||t[8]!==l?(m=(0,p.jsx)(r,{size:u,variant:l}),t[7]=u,t[8]=l,t[9]=m):m=t[9];let h;return t[10]!==o||t[11]!==d||t[12]!==m?(h=(0,p.jsx)(i,{className:d,"data-slot":`alert-dialog-cancel`,render:m,...o}),t[10]=o,t[11]=d,t[12]=m,t[13]=h):h=t[13],h}export{S as a,b as c,_ as i,x as l,C as n,y as o,w as r,v as s,m as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/allocate-address.js b/spinifex/services/spinifexui/frontend/dist/assets/allocate-address.js index 3419f1b8a..705173d15 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/allocate-address.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/allocate-address.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{t as i}from"./ec2.js";import{Xr as a,er as o}from"./index.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{n as h}from"./ec22.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=a(),v=i(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=c(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=s(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).AllocationId;t(n?{to:`/ec2/describe-addresses/$id`,params:{id:n}}:{to:`/ec2/describe-addresses`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(n,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(f,{title:`Allocate Elastic IP`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(u,{error:v.error,msg:`Failed to allocate Elastic IP`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(o,{id:`name`,placeholder:`my-elastic-ip`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(r,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>await t({to:`/ec2/describe-addresses`}),e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(d,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Allocating…`,submitLabel:`Allocate`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 allocate-address`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{t as i}from"./ec2.js";import{Qr as a,nr as o}from"./index.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{n as h}from"./ec22.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=a(),v=i(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=c(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=s(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).AllocationId;t(n?{to:`/ec2/describe-addresses/$id`,params:{id:n}}:{to:`/ec2/describe-addresses`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(n,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(f,{title:`Allocate Elastic IP`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(u,{error:v.error,msg:`Failed to allocate Elastic IP`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(o,{id:`name`,placeholder:`my-elastic-ip`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(r,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>await t({to:`/ec2/describe-addresses`}),e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(d,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Allocating…`,submitLabel:`Allocate`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 allocate-address`},{type:`flag`,value:` \\ --domain`},{type:`value`,value:` vpc`}];return e.trim()&&t.push({type:`flag`,value:` \\ --tag-specifications`},{type:`value`,value:` 'ResourceType=elastic-ip,Tags=[{Key=Name,Value=${e.trim()}}]'`}),[{label:`Allocate Elastic IP`,parts:t}]}export{v as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/back-link.js b/spinifex/services/spinifexui/frontend/dist/assets/back-link.js index 6279315ab..b40ac94d4 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/back-link.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/back-link.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{ni as n}from"./awsClient.js";import{qr as r}from"./index.js";var i=r(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),a=t(),o=e();function s(e){let t=(0,a.c)(7),r,s;t[0]===e?(r=t[1],s=t[2]):({children:r,...s}=e,t[0]=e,t[1]=r,t[2]=s);let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,o.jsx)(i,{className:`size-4`}),t[3]=c):c=t[3];let l;return t[4]!==r||t[5]!==s?(l=(0,o.jsxs)(n,{className:`mb-6 inline-flex items-center gap-2 text-sm`,...s,children:[c,r]}),t[4]=r,t[5]=s,t[6]=l):l=t[6],l}export{s as t}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{ni as n}from"./awsClient.js";import{Yr as r}from"./index.js";var i=r(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),a=t(),o=e();function s(e){let t=(0,a.c)(7),r,s;t[0]===e?(r=t[1],s=t[2]):({children:r,...s}=e,t[0]=e,t[1]=r,t[2]=s);let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,o.jsx)(i,{className:`size-4`}),t[3]=c):c=t[3];let l;return t[4]!==r||t[5]!==s?(l=(0,o.jsxs)(n,{className:`mb-6 inline-flex items-center gap-2 text-sm`,...s,children:[c,r]}),t[4]=r,t[5]=s,t[6]=l):l=t[6],l}export{s as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/badge.js b/spinifex/services/spinifexui/frontend/dist/assets/badge.js index 7914ee8aa..bc4ab9f22 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/badge.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/badge.js @@ -1 +1 @@ -import{t as e}from"./compiler-runtime.js";import{f as t,t as n}from"./dist.js";import{Lt as r}from"./auth.js";import{Jr as i}from"./index.js";var a=e(),o=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s(e){let n=(0,a.c)(13),s,c,l,u,d;if(n[0]!==e){let{className:a,variant:f,render:p,...m}=e;s=p,d=f===void 0?`default`:f,u=i,c=`span`,l=t({className:r(o({className:a,variant:d}))},m),n[0]=e,n[1]=s,n[2]=c,n[3]=l,n[4]=u,n[5]=d}else s=n[1],c=n[2],l=n[3],u=n[4],d=n[5];let f;n[6]===d?f=n[7]:(f={slot:`badge`,variant:d},n[6]=d,n[7]=f);let p;return n[8]!==s||n[9]!==c||n[10]!==l||n[11]!==f?(p={defaultTagName:c,props:l,render:s,state:f},n[8]=s,n[9]=c,n[10]=l,n[11]=f,n[12]=p):p=n[12],u(p)}export{s as t}; \ No newline at end of file +import{t as e}from"./compiler-runtime.js";import{f as t,t as n}from"./dist.js";import{Lt as r}from"./auth.js";import{Xr as i}from"./index.js";var a=e(),o=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s(e){let n=(0,a.c)(13),s,c,l,u,d;if(n[0]!==e){let{className:a,variant:f,render:p,...m}=e;s=p,d=f===void 0?`default`:f,u=i,c=`span`,l=t({className:r(o({className:a,variant:d}))},m),n[0]=e,n[1]=s,n[2]=c,n[3]=l,n[4]=u,n[5]=d}else s=n[1],c=n[2],l=n[3],u=n[4],d=n[5];let f;n[6]===d?f=n[7]:(f={slot:`badge`,variant:d},n[6]=d,n[7]=f);let p;return n[8]!==s||n[9]!==c||n[10]!==l||n[11]!==f?(p={defaultTagName:c,props:l,render:s,state:f},n[8]=s,n[9]=c,n[10]=l,n[11]=f,n[12]=p):p=n[12],u(p)}export{s as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/certificate-import-dialog.js b/spinifex/services/spinifexui/frontend/dist/assets/certificate-import-dialog.js index c748e12b9..bd0fd3a59 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/certificate-import-dialog.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/certificate-import-dialog.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useMutation.js";import{$r as a,n as o,ti as s}from"./awsClient.js";import{St as c,ut as l}from"./auth.js";import{Zr as u}from"./index.js";import{t as d}from"./error-banner.js";import{a as f,t as p}from"./field.js";import{a as m,i as ee,l as te,n as h,o as g,r as _,s as v,t as y}from"./alert-dialog.js";import{t as b}from"./textarea.js";var x=class extends c.classBuilder().ep(s).m(function(e,t,n,r){return[l(n,e.getEndpointParameterInstructions())]}).s(`CertificateManager`,`ImportCertificate`,{}).n(`ACMClient`,`ImportCertificateCommand`).sc(a).build(){},S=t(n(),1),C=r(),w=new TextEncoder;function T(){let e=(0,C.c)(2),t=u(),n;return e[0]===t?n=e[1]:(n={mutationFn:E,onSuccess:()=>{t.invalidateQueries({queryKey:[`acm`,`certificates`]})}},e[0]=t,e[1]=n),i(n)}async function E(e){let t=new x({Certificate:w.encode(e.certificate),PrivateKey:w.encode(e.privateKey),CertificateChain:e.certificateChain&&e.certificateChain.length>0?w.encode(e.certificateChain):void 0});return await o().send(t)}var D=e();function O(e){let t=(0,C.c)(54),{open:n,onOpenChange:r,onImported:i}=e,[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(``),x=T(),w;t[0]===x?w=t[1]:(w=()=>{o(``),c(``),u(``),x.reset()},t[0]=x,t[1]=w);let E=w,O;t[2]!==r||t[3]!==E?(O=e=>{e||E(),r(e)},t[2]=r,t[3]=E,t[4]=O):O=t[4];let k=O,A;t[5]!==a||t[6]!==s?(A=a.trim().length>0&&s.trim().length>0,t[5]=a,t[6]=s,t[7]=A):A=t[7];let j=A,M;t[8]!==j||t[9]!==a||t[10]!==l||t[11]!==x||t[12]!==i||t[13]!==r||t[14]!==s||t[15]!==E?(M=async()=>{if(j)try{let e=await x.mutateAsync({certificate:a,privateKey:s,certificateChain:l});e.CertificateArn&&i(e.CertificateArn),E(),r(!1)}catch{}},t[8]=j,t[9]=a,t[10]=l,t[11]=x,t[12]=i,t[13]=r,t[14]=s,t[15]=E,t[16]=M):M=t[16];let N=M,P;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(P={maxWidth:`36rem`,width:`calc(100vw - 2rem)`},t[17]=P):P=t[17];let F;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,D.jsxs)(v,{children:[(0,D.jsx)(te,{children:`Import certificate`}),(0,D.jsx)(m,{children:`Paste a PEM-encoded certificate and its private key. The optional chain is appended for intermediate CAs.`})]}),t[18]=F):F=t[18];let I;t[19]===x.error?I=t[20]:(I=x.error&&(0,D.jsx)(d,{error:x.error,msg:`Failed to import certificate`}),t[19]=x.error,t[20]=I);let L;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-body`,children:`Certificate body`})}),t[21]=L):L=t[21];let R;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>o(e.target.value),t[22]=R):R=t[22];let z;t[23]===a?z=t[24]:(z=(0,D.jsxs)(p,{children:[L,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-body`,onChange:R,placeholder:`-----BEGIN CERTIFICATE-----`,rows:5,value:a})]}),t[23]=a,t[24]=z);let B;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-key`,children:`Private key`})}),t[25]=B):B=t[25];let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>c(e.target.value),t[26]=V):V=t[26];let H;t[27]===s?H=t[28]:(H=(0,D.jsxs)(p,{children:[B,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-key`,onChange:V,placeholder:`-----BEGIN PRIVATE KEY-----`,rows:5,value:s})]}),t[27]=s,t[28]=H);let U;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-chain`,children:`Certificate chain (optional)`})}),t[29]=U):U=t[29];let W;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>u(e.target.value),t[30]=W):W=t[30];let G;t[31]===l?G=t[32]:(G=(0,D.jsxs)(p,{children:[U,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-chain`,onChange:W,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:l})]}),t[31]=l,t[32]=G);let K;t[33]!==z||t[34]!==H||t[35]!==G?(K=(0,D.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[z,H,G]}),t[33]=z,t[34]=H,t[35]=G,t[36]=K):K=t[36];let q;t[37]===x.isPending?q=t[38]:(q=(0,D.jsx)(_,{disabled:x.isPending,children:`Cancel`}),t[37]=x.isPending,t[38]=q);let J=!j||x.isPending,Y=x.isPending?`Importing…`:`Import`,X;t[39]!==N||t[40]!==J||t[41]!==Y?(X=(0,D.jsx)(h,{disabled:J,onClick:N,children:Y}),t[39]=N,t[40]=J,t[41]=Y,t[42]=X):X=t[42];let Z;t[43]!==q||t[44]!==X?(Z=(0,D.jsxs)(g,{children:[q,X]}),t[43]=q,t[44]=X,t[45]=Z):Z=t[45];let Q;t[46]!==K||t[47]!==Z||t[48]!==I?(Q=(0,D.jsxs)(ee,{className:`grid-cols-[minmax(0,1fr)]`,style:P,children:[F,I,K,Z]}),t[46]=K,t[47]=Z,t[48]=I,t[49]=Q):Q=t[49];let $;return t[50]!==k||t[51]!==n||t[52]!==Q?($=(0,D.jsx)(y,{onOpenChange:k,open:n,children:Q}),t[50]=k,t[51]=n,t[52]=Q,t[53]=$):$=t[53],$}export{O as t}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useMutation.js";import{$r as a,n as o,ti as s}from"./awsClient.js";import{St as c,ut as l}from"./auth.js";import{$r as u}from"./index.js";import{t as d}from"./error-banner.js";import{a as f,t as p}from"./field.js";import{a as m,i as ee,l as te,n as h,o as g,r as _,s as v,t as y}from"./alert-dialog.js";import{t as b}from"./textarea.js";var x=class extends c.classBuilder().ep(s).m(function(e,t,n,r){return[l(n,e.getEndpointParameterInstructions())]}).s(`CertificateManager`,`ImportCertificate`,{}).n(`ACMClient`,`ImportCertificateCommand`).sc(a).build(){},S=t(n(),1),C=r(),w=new TextEncoder;function T(){let e=(0,C.c)(2),t=u(),n;return e[0]===t?n=e[1]:(n={mutationFn:E,onSuccess:()=>{t.invalidateQueries({queryKey:[`acm`,`certificates`]})}},e[0]=t,e[1]=n),i(n)}async function E(e){let t=new x({Certificate:w.encode(e.certificate),PrivateKey:w.encode(e.privateKey),CertificateChain:e.certificateChain&&e.certificateChain.length>0?w.encode(e.certificateChain):void 0});return await o().send(t)}var D=e();function O(e){let t=(0,C.c)(54),{open:n,onOpenChange:r,onImported:i}=e,[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(``),x=T(),w;t[0]===x?w=t[1]:(w=()=>{o(``),c(``),u(``),x.reset()},t[0]=x,t[1]=w);let E=w,O;t[2]!==r||t[3]!==E?(O=e=>{e||E(),r(e)},t[2]=r,t[3]=E,t[4]=O):O=t[4];let k=O,A;t[5]!==a||t[6]!==s?(A=a.trim().length>0&&s.trim().length>0,t[5]=a,t[6]=s,t[7]=A):A=t[7];let j=A,M;t[8]!==j||t[9]!==a||t[10]!==l||t[11]!==x||t[12]!==i||t[13]!==r||t[14]!==s||t[15]!==E?(M=async()=>{if(j)try{let e=await x.mutateAsync({certificate:a,privateKey:s,certificateChain:l});e.CertificateArn&&i(e.CertificateArn),E(),r(!1)}catch{}},t[8]=j,t[9]=a,t[10]=l,t[11]=x,t[12]=i,t[13]=r,t[14]=s,t[15]=E,t[16]=M):M=t[16];let N=M,P;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(P={maxWidth:`36rem`,width:`calc(100vw - 2rem)`},t[17]=P):P=t[17];let F;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,D.jsxs)(v,{children:[(0,D.jsx)(te,{children:`Import certificate`}),(0,D.jsx)(m,{children:`Paste a PEM-encoded certificate and its private key. The optional chain is appended for intermediate CAs.`})]}),t[18]=F):F=t[18];let I;t[19]===x.error?I=t[20]:(I=x.error&&(0,D.jsx)(d,{error:x.error,msg:`Failed to import certificate`}),t[19]=x.error,t[20]=I);let L;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-body`,children:`Certificate body`})}),t[21]=L):L=t[21];let R;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>o(e.target.value),t[22]=R):R=t[22];let z;t[23]===a?z=t[24]:(z=(0,D.jsxs)(p,{children:[L,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-body`,onChange:R,placeholder:`-----BEGIN CERTIFICATE-----`,rows:5,value:a})]}),t[23]=a,t[24]=z);let B;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-key`,children:`Private key`})}),t[25]=B):B=t[25];let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>c(e.target.value),t[26]=V):V=t[26];let H;t[27]===s?H=t[28]:(H=(0,D.jsxs)(p,{children:[B,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-key`,onChange:V,placeholder:`-----BEGIN PRIVATE KEY-----`,rows:5,value:s})]}),t[27]=s,t[28]=H);let U;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-chain`,children:`Certificate chain (optional)`})}),t[29]=U):U=t[29];let W;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>u(e.target.value),t[30]=W):W=t[30];let G;t[31]===l?G=t[32]:(G=(0,D.jsxs)(p,{children:[U,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-chain`,onChange:W,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:l})]}),t[31]=l,t[32]=G);let K;t[33]!==z||t[34]!==H||t[35]!==G?(K=(0,D.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[z,H,G]}),t[33]=z,t[34]=H,t[35]=G,t[36]=K):K=t[36];let q;t[37]===x.isPending?q=t[38]:(q=(0,D.jsx)(_,{disabled:x.isPending,children:`Cancel`}),t[37]=x.isPending,t[38]=q);let J=!j||x.isPending,Y=x.isPending?`Importing…`:`Import`,X;t[39]!==N||t[40]!==J||t[41]!==Y?(X=(0,D.jsx)(h,{disabled:J,onClick:N,children:Y}),t[39]=N,t[40]=J,t[41]=Y,t[42]=X):X=t[42];let Z;t[43]!==q||t[44]!==X?(Z=(0,D.jsxs)(g,{children:[q,X]}),t[43]=q,t[44]=X,t[45]=Z):Z=t[45];let Q;t[46]!==K||t[47]!==Z||t[48]!==I?(Q=(0,D.jsxs)(ee,{className:`grid-cols-[minmax(0,1fr)]`,style:P,children:[F,I,K,Z]}),t[46]=K,t[47]=Z,t[48]=I,t[49]=Q):Q=t[49];let $;return t[50]!==k||t[51]!==n||t[52]!==Q?($=(0,D.jsx)(y,{onOpenChange:k,open:n,children:Q}),t[50]=k,t[51]=n,t[52]=Q,t[53]=$):$=t[53],$}export{O as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/check.js b/spinifex/services/spinifexui/frontend/dist/assets/check.js index 024ed837e..350032fb7 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/check.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/check.js @@ -1 +1 @@ -import{qr as e}from"./index.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t}; \ No newline at end of file +import{Yr as e}from"./index.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/chevron-down.js b/spinifex/services/spinifexui/frontend/dist/assets/chevron-down.js index c4ccd8213..2113ea584 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/chevron-down.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/chevron-down.js @@ -1 +1 @@ -import{qr as e}from"./index.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t}; \ No newline at end of file +import{Yr as e}from"./index.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/chevron-right.js b/spinifex/services/spinifexui/frontend/dist/assets/chevron-right.js index a3eada01b..02a177639 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/chevron-right.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/chevron-right.js @@ -1 +1 @@ -import{qr as e}from"./index.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t}; \ No newline at end of file +import{Yr as e}from"./index.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/cli-command-panel.js b/spinifex/services/spinifexui/frontend/dist/assets/cli-command-panel.js index b1a1d9c3a..01d239fb5 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/cli-command-panel.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/cli-command-panel.js @@ -1,3 +1,3 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{Lt as i}from"./auth.js";import{t as a}from"./check.js";import{t as o}from"./chevron-down.js";import{t as s}from"./copy.js";import{t as c}from"./button.js";import{qr as l}from"./index.js";import{t as u}from"./use-copy-to-clipboard.js";var d=l(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),f=r(),p=t(n(),1),m=e(),h={bin:`text-tactical-cyan font-semibold`,flag:`text-tactical-amber`,value:`text-foreground`,comment:`text-muted-foreground italic`,variable:`text-tactical-green font-semibold`};function g(e){return e.map(e=>e.parts.map(e=>e.value).join(``)).join(` +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{Lt as i}from"./auth.js";import{t as a}from"./check.js";import{t as o}from"./chevron-down.js";import{t as s}from"./copy.js";import{t as c}from"./button.js";import{Yr as l}from"./index.js";import{t as u}from"./use-copy-to-clipboard.js";var d=l(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),f=r(),p=t(n(),1),m=e(),h={bin:`text-tactical-cyan font-semibold`,flag:`text-tactical-amber`,value:`text-foreground`,comment:`text-muted-foreground italic`,variable:`text-tactical-green font-semibold`};function g(e){return e.map(e=>e.parts.map(e=>e.value).join(``)).join(` `)}function _(e){let t=(0,f.c)(18),{commands:n}=e,[r,l]=(0,p.useState)(!1),{copied:h,copy:_}=u();if(n.length===0)return null;let b;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>l(y),t[0]=b):b=t[0];let x,S;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,m.jsx)(d,{className:`size-3.5`}),S=(0,m.jsx)(`span`,{children:`AWS CLI`}),t[1]=x,t[2]=S):(x=t[1],S=t[2]);let C=r&&`rotate-180`,w;t[3]===C?w=t[4]:(w=i(`ml-auto size-3.5 transition-transform`,C),t[3]=C,t[4]=w);let T;t[5]===w?T=t[6]:(T=(0,m.jsx)(o,{className:w}),t[5]=w,t[6]=T);let E;t[7]!==r||t[8]!==T?(E=(0,m.jsxs)(`button`,{type:`button`,onClick:b,className:`flex w-full items-center gap-2 px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":r,children:[x,S,T]}),t[7]=r,t[8]=T,t[9]=E):E=t[9];let D;t[10]!==n||t[11]!==h||t[12]!==_||t[13]!==r?(D=r&&(0,m.jsxs)(`div`,{className:`border-t border-border`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-3 py-1.5`,children:[(0,m.jsx)(`span`,{className:`text-[0.625rem] text-muted-foreground`,children:n.length>1?`${n.length} commands`:`command`}),(0,m.jsxs)(c,{type:`button`,variant:`ghost`,size:`xs`,onClick:async()=>await _(g(n)),children:[h?(0,m.jsx)(a,{className:`size-2.5`}):(0,m.jsx)(s,{className:`size-2.5`}),h?`Copied`:`Copy`]})]}),(0,m.jsx)(`div`,{className:`overflow-x-auto p-3`,children:n.map((e,t)=>(0,m.jsxs)(`div`,{children:[n.length>1&&(0,m.jsx)(`div`,{className:`mb-1 text-[0.625rem] font-medium text-muted-foreground`,children:e.label}),(0,m.jsx)(`pre`,{className:`font-mono text-xs/relaxed`,children:(0,m.jsx)(`code`,{children:e.parts.map(v)})}),t{let t=!a,n=h(m,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return T.useMemo(()=>({disabled:i,handleTrigger:v,mounted:s,open:a,panelId:_,setMounted:c,setOpen:o,setPanelIdState:g,transitionStatus:l}),[i,v,s,a,_,c,o,g,l])}var D=T.createContext(void 0);function O(){let e=T.useContext(D);if(e===void 0)throw Error(s(15));return e}var k=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=S.startingStyle]=`startingStyle`,e[e.endingStyle=S.endingStyle]=`endingStyle`,e}({}),A=function(e){return e.panelOpen=`data-panel-open`,e}({}),j={[k.open]:``},M={[k.closed]:``},N={open(e){return e?{[A.panelOpen]:``}:null}},P={open(e){return e?j:M},...w},F=e(),I=T.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:o=!1,onOpenChange:s,open:c,style:l,...u}=e,f=d(s),p=E({open:c,defaultOpen:i,onOpenChange:f,disabled:o}),m=T.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),h=T.useMemo(()=>({...p,onOpenChange:f,state:m}),[p,f,m]),g=a(`div`,e,{state:m,ref:t,props:u,stateAttributesMapping:P});return(0,F.jsx)(D.Provider,{value:h,children:g})}),L={...N,...w},R=T.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:o,disabled:s}=O(),{className:c,disabled:l=s,render:d,nativeButton:f=!0,style:p,...m}=e,{getButtonProps:h,buttonRef:g}=u({disabled:l,focusableWhenDisabled:!0,native:f});return a(`button`,e,{state:o,ref:[t,g],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},m,h],stateAttributesMapping:L})}),z={height:void 0,width:void 0};function B(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:a,mounted:o,onOpenChange:s,open:c,setMounted:u,setOpen:f,transitionStatus:m}=e,x=T.useRef(null),S=T.useRef(null),[C,w]=T.useState(z),E=T.useRef(z),D=T.useRef(!1),O=T.useRef(c),A=T.useRef(!1),[j,M]=T.useState(!1),N=T.useRef(null),P=i(t,x),F=g({mounted:o,open:c}),I=v(x,!1,!1),L=!c&&!o,R=j?`idle`:m,B=c&&(O.current||A.current),U=!c&&o&&S.current===`css-animation`&&C.height===void 0&&C.width===void 0?E.current:C,K=n&&L&&S.current!==`css-animation`,q=d((e,t=!0)=>{t&&(E.current=e),w(e)}),J=d(()=>{N.current?.(),N.current=null}),Y=d(e=>{J(),N.current=()=>{N.current=null,e()}}),X=d(()=>{c&&o&&S.current===`css-animation`&&(A.current=!0)});l(()=>{!j||m===`starting`||M(!1)},[j,m]),T.useEffect(()=>()=>{X(),J()},[X,J]),l(()=>{let e=x.current;if(!e)return;!c&&N.current&&J();let t=H(e,B);if(S.current=t,c&&m===`idle`&&O.current&&t===`css-animation`){E.current=V(e);return}if(c&&m===`starting`){let n=D.current;if(D.current=!1,t===`none`){q(V(e)),M(!0);return}if(t===`css-transition`){let t=G(e);return q(V(e)),n?(Y(W(e,`transition-duration`,`0s`)),M(!0),t):t}if(t===`css-animation`){if(q(V(e)),!n){W(e,`animation-name`,`none`)();return}let t=W(e,`animation-name`,`none`),r=W(e,`animation-duration`,`0s`);t(),Y(r),M(!0);return}}if(!c&&o&&(m===`idle`||m===`starting`)){if(O.current=!1,A.current=!1,t===`none`){q(z,!1),u(!1);return}q(V(e));return}if(m!==`ending`)return;if(t===`none`){u(!1);return}let n=V(e);if(!((n.height??0)>0||(n.width??0)>0)){u(!1);return}q(n),t===`css-animation`&&W(e,`animation-name`,`none`)()},[o,c,J,q,u,Y,B,m]),b({enabled:c&&o&&R===`idle`,open:!0,ref:x,onComplete(){c&&q(z,!1)}}),T.useEffect(()=>{if(c||!o||R!==`ending`||!x.current)return;let e=new AbortController,t=-1;function n(){F.current.open||(u(!1),q(z,!1))}return t=y.request(()=>{e.signal.aborted||I(n,e.signal)}),()=>{y.cancel(t),e.abort()}},[F,o,c,R,I,q,u]),l(()=>{let e=x.current;!e||!n||!L||e.setAttribute(`hidden`,`until-found`)},[L,n]),T.useEffect(function(){let e=x.current;if(!e)return;function t(e){let t=h(p,e);s(!0,t),!t.isCanceled&&(D.current=!0,f(!0))}return _(e,`beforematch`,t)},[s,f]);let Z=a||n||o||c;return{height:U.height,props:{...K?{[k.startingStyle]:``}:void 0,hidden:L,id:r},ref:P,shouldPreventOpenAnimation:B,shouldRender:Z,transitionStatus:R,width:U.width}}function V(e){return{height:e.scrollHeight,width:e.scrollWidth}}function H(e,t=!1){let n=c(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&U(n.animationDuration),i=U(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function U(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function W(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function G(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=y.request(n);return()=>{y.cancel(r),n()}}var K=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),q=T.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:s,id:c,style:u,...d}=e,{mounted:f,onOpenChange:p,open:m,panelId:h,setMounted:g,setPanelIdState:_,setOpen:v,state:y,transitionStatus:b}=O(),x=r??!1,S=i??!1;l(()=>{if(c)return _(c),()=>{_(void 0)}},[c,_]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:D,transitionStatus:k,width:A}=B({externalRef:t,hiddenUntilFound:x,id:h,keepMounted:S,mounted:f,onOpenChange:p,open:m,setMounted:g,setOpen:v,transitionStatus:b}),j={...y,transitionStatus:k},M=o(u,j),N=a(`div`,{...e,style:void 0},{state:j,ref:T,props:[w,{style:{[K.collapsiblePanelHeight]:C===void 0?`auto`:`${C}px`,[K.collapsiblePanelWidth]:A===void 0?`auto`:`${A}px`}},d,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:P});return D?N:null}),J=r();function Y(e){let t=(0,J.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,F.jsx)(I,{"data-slot":`collapsible`,...n}),t[2]=n,t[3]=r),r}function X(e){let t=(0,J.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,F.jsx)(R,{"data-slot":`collapsible-trigger`,...n}),t[2]=n,t[3]=r),r}function Z(e){let t=(0,J.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,F.jsx)(q,{"data-slot":`collapsible-content`,...n}),t[2]=n,t[3]=r),r}export{Z as n,X as r,Y as t}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{c as i,n as a,r as o,u as s}from"./dist.js";import{_ as c,o as l,r as u,s as d}from"./button.js";import{S as f,f as p,g as m,t as h}from"./createBaseUIEventDetails.js";import{Jn as g,ar as _,cr as v,ir as y,lr as b,or as x,qn as S,sr as C,ur as w}from"./index.js";var T=t(n(),1);function E(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,[a,o]=y({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=_(a,!0,!0),u=f(),[p,g]=T.useState(),v=p??u,b=d(e=>{let t=!a,n=h(m,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return T.useMemo(()=>({disabled:i,handleTrigger:b,mounted:s,open:a,panelId:v,setMounted:c,setOpen:o,setPanelIdState:g,transitionStatus:l}),[i,b,s,a,v,c,o,g,l])}var D=T.createContext(void 0);function O(){let e=T.useContext(D);if(e===void 0)throw Error(s(15));return e}var k=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=v.startingStyle]=`startingStyle`,e[e.endingStyle=v.endingStyle]=`endingStyle`,e}({}),A=function(e){return e.panelOpen=`data-panel-open`,e}({}),j={[k.open]:``},M={[k.closed]:``},N={open(e){return e?{[A.panelOpen]:``}:null}},P={open(e){return e?j:M},...b},F=e(),I=T.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:o=!1,onOpenChange:s,open:c,style:l,...u}=e,f=d(s),p=E({open:c,defaultOpen:i,onOpenChange:f,disabled:o}),m=T.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),h=T.useMemo(()=>({...p,onOpenChange:f,state:m}),[p,f,m]),g=a(`div`,e,{state:m,ref:t,props:u,stateAttributesMapping:P});return(0,F.jsx)(D.Provider,{value:h,children:g})}),L={...N,...b},R=T.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:o,disabled:s}=O(),{className:c,disabled:l=s,render:d,nativeButton:f=!0,style:p,...m}=e,{getButtonProps:h,buttonRef:g}=u({disabled:l,focusableWhenDisabled:!0,native:f});return a(`button`,e,{state:o,ref:[t,g],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},m,h],stateAttributesMapping:L})}),z={height:void 0,width:void 0};function B(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:a,mounted:o,onOpenChange:s,open:c,setMounted:u,setOpen:f,transitionStatus:m}=e,_=T.useRef(null),v=T.useRef(null),[y,b]=T.useState(z),E=T.useRef(z),D=T.useRef(!1),O=T.useRef(c),A=T.useRef(!1),[j,M]=T.useState(!1),N=T.useRef(null),P=i(t,_),F=S({mounted:o,open:c}),I=C(_,!1,!1),L=!c&&!o,R=j?`idle`:m,B=c&&(O.current||A.current),U=!c&&o&&v.current===`css-animation`&&y.height===void 0&&y.width===void 0?E.current:y,K=n&&L&&v.current!==`css-animation`,q=d((e,t=!0)=>{t&&(E.current=e),b(e)}),J=d(()=>{N.current?.(),N.current=null}),Y=d(e=>{J(),N.current=()=>{N.current=null,e()}}),X=d(()=>{c&&o&&v.current===`css-animation`&&(A.current=!0)});l(()=>{!j||m===`starting`||M(!1)},[j,m]),T.useEffect(()=>()=>{X(),J()},[X,J]),l(()=>{let e=_.current;if(!e)return;!c&&N.current&&J();let t=H(e,B);if(v.current=t,c&&m===`idle`&&O.current&&t===`css-animation`){E.current=V(e);return}if(c&&m===`starting`){let n=D.current;if(D.current=!1,t===`none`){q(V(e)),M(!0);return}if(t===`css-transition`){let t=G(e);return q(V(e)),n?(Y(W(e,`transition-duration`,`0s`)),M(!0),t):t}if(t===`css-animation`){if(q(V(e)),!n){W(e,`animation-name`,`none`)();return}let t=W(e,`animation-name`,`none`),r=W(e,`animation-duration`,`0s`);t(),Y(r),M(!0);return}}if(!c&&o&&(m===`idle`||m===`starting`)){if(O.current=!1,A.current=!1,t===`none`){q(z,!1),u(!1);return}q(V(e));return}if(m!==`ending`)return;if(t===`none`){u(!1);return}let n=V(e);if(!((n.height??0)>0||(n.width??0)>0)){u(!1);return}q(n),t===`css-animation`&&W(e,`animation-name`,`none`)()},[o,c,J,q,u,Y,B,m]),x({enabled:c&&o&&R===`idle`,open:!0,ref:_,onComplete(){c&&q(z,!1)}}),T.useEffect(()=>{if(c||!o||R!==`ending`||!_.current)return;let e=new AbortController,t=-1;function n(){F.current.open||(u(!1),q(z,!1))}return t=w.request(()=>{e.signal.aborted||I(n,e.signal)}),()=>{w.cancel(t),e.abort()}},[F,o,c,R,I,q,u]),l(()=>{let e=_.current;!e||!n||!L||e.setAttribute(`hidden`,`until-found`)},[L,n]),T.useEffect(function(){let e=_.current;if(!e)return;function t(e){let t=h(p,e);s(!0,t),!t.isCanceled&&(D.current=!0,f(!0))}return g(e,`beforematch`,t)},[s,f]);let Z=a||n||o||c;return{height:U.height,props:{...K?{[k.startingStyle]:``}:void 0,hidden:L,id:r},ref:P,shouldPreventOpenAnimation:B,shouldRender:Z,transitionStatus:R,width:U.width}}function V(e){return{height:e.scrollHeight,width:e.scrollWidth}}function H(e,t=!1){let n=c(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&U(n.animationDuration),i=U(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function U(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function W(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function G(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=w.request(n);return()=>{w.cancel(r),n()}}var K=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),q=T.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:s,id:c,style:u,...d}=e,{mounted:f,onOpenChange:p,open:m,panelId:h,setMounted:g,setPanelIdState:_,setOpen:v,state:y,transitionStatus:b}=O(),x=r??!1,S=i??!1;l(()=>{if(c)return _(c),()=>{_(void 0)}},[c,_]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:D,transitionStatus:k,width:A}=B({externalRef:t,hiddenUntilFound:x,id:h,keepMounted:S,mounted:f,onOpenChange:p,open:m,setMounted:g,setOpen:v,transitionStatus:b}),j={...y,transitionStatus:k},M=o(u,j),N=a(`div`,{...e,style:void 0},{state:j,ref:T,props:[w,{style:{[K.collapsiblePanelHeight]:C===void 0?`auto`:`${C}px`,[K.collapsiblePanelWidth]:A===void 0?`auto`:`${A}px`}},d,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:P});return D?N:null}),J=r();function Y(e){let t=(0,J.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,F.jsx)(I,{"data-slot":`collapsible`,...n}),t[2]=n,t[3]=r),r}function X(e){let t=(0,J.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,F.jsx)(R,{"data-slot":`collapsible-trigger`,...n}),t[2]=n,t[3]=r),r}function Z(e){let t=(0,J.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,F.jsx)(q,{"data-slot":`collapsible-content`,...n}),t[2]=n,t[3]=r),r}export{Z as n,X as r,Y as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/copy.js b/spinifex/services/spinifexui/frontend/dist/assets/copy.js index b92f047ef..54cd16fca 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/copy.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/copy.js @@ -1 +1 @@ -import{qr as e}from"./index.js";var t=e(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);export{t}; \ No newline at end of file +import{Yr as e}from"./index.js";var t=e(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);export{t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-bucket.js b/spinifex/services/spinifexui/frontend/dist/assets/create-bucket.js index dc4b8a7b5..02f2aed54 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-bucket.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-bucket.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{f as n,u as r}from"./auth.js";import{t as i}from"./back-link.js";import{t as a}from"./cli-command-panel.js";import{t as o}from"./s3.js";import{Xr as s,er as c}from"./index.js";import{a as l,i as u,t as d}from"./zod.js";import{t as f}from"./error-banner.js";import{t as p}from"./form-actions.js";import{t as m}from"./page-heading.js";import{a as h,r as g,t as _}from"./field.js";var v=t(),y=r({bucketName:n().min(3,`Bucket name must be at least 3 characters`).max(63,`Bucket name must be at most 63 characters`).regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,`Must start and end with a lowercase letter or number`).regex(/^[a-z0-9.-]+$/,`Only lowercase letters, numbers, hyphens, and periods allowed`).refine(e=>!e.includes(`..`),`Must not contain consecutive periods`).refine(e=>!(e.includes(`.-`)||e.includes(`-.`)),`Must not contain adjacent period and hyphen`)}),b=e();function x(){let e=(0,v.c)(44),t=s(),n=o(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={resolver:d(y)},e[0]=r):r=e[0];let{handleSubmit:x,register:C,control:w,formState:T}=u(r),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=l(O),A;e[3]===k?A=e[4]:(A=e=>e?k[e]:void 0,e[3]=k,e[4]=A);let j=A,M;e[5]!==n||e[6]!==t?(M=async e=>{await n.mutateAsync(e),t({to:`/s3/ls`})},e[5]=n,e[6]=t,e[7]=M):M=e[7];let N=M,P,F;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(i,{to:`/s3/ls`,children:`Back to buckets`}),F=(0,b.jsx)(m,{title:`Create Bucket`}),e[8]=P,e[9]=F):(P=e[8],F=e[9]);let I;e[10]===n.error?I=e[11]:(I=n.error&&(0,b.jsx)(f,{error:n.error,msg:`Failed to create bucket`}),e[10]=n.error,e[11]=I);let L;e[12]!==x||e[13]!==N?(L=x(N),e[12]=x,e[13]=N,e[14]=L):L=e[14];let R;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),e[15]=R):R=e[15];let z=!!E.bucketName,B;e[16]===C?B=e[17]:(B=C(`bucketName`),e[16]=C,e[17]=B);let V;e[18]!==z||e[19]!==B?(V=(0,b.jsx)(c,{"aria-invalid":z,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...B}),e[18]=z,e[19]=B,e[20]=V):V=e[20];let H;e[21]===E.bucketName?H=e[22]:(H=(0,b.jsx)(g,{errors:[E.bucketName]}),e[21]=E.bucketName,e[22]=H);let U;e[23]!==V||e[24]!==H?(U=(0,b.jsxs)(_,{children:[R,V,H]}),e[23]=V,e[24]=H,e[25]=U):U=e[25];let W;e[26]===j?W=e[27]:(W=S(j),e[26]=j,e[27]=W);let G;e[28]===W?G=e[29]:(G=(0,b.jsx)(a,{commands:W}),e[28]=W,e[29]=G);let K;e[30]===t?K=e[31]:(K=async()=>await t({to:`/s3/ls`}),e[30]=t,e[31]=K);let q;e[32]!==n.isPending||e[33]!==D||e[34]!==K?(q=(0,b.jsx)(p,{isPending:n.isPending,isSubmitting:D,onCancel:K,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),e[32]=n.isPending,e[33]=D,e[34]=K,e[35]=q):q=e[35];let J;e[36]!==U||e[37]!==G||e[38]!==q||e[39]!==L?(J=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[U,G,q]}),e[36]=U,e[37]=G,e[38]=q,e[39]=L,e[40]=J):J=e[40];let Y;return e[41]!==J||e[42]!==I?(Y=(0,b.jsxs)(b.Fragment,{children:[P,F,I,J]}),e[41]=J,e[42]=I,e[43]=Y):Y=e[43],Y}function S(e){let t=e(`bucketName`);return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(typeof t==`string`?t:``)||``}`}]}]}export{x as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{f as n,u as r}from"./auth.js";import{t as i}from"./back-link.js";import{t as a}from"./cli-command-panel.js";import{t as o}from"./s3.js";import{Qr as s,nr as c}from"./index.js";import{a as l,i as u,t as d}from"./zod.js";import{t as f}from"./error-banner.js";import{t as p}from"./form-actions.js";import{t as m}from"./page-heading.js";import{a as h,r as g,t as _}from"./field.js";var v=t(),y=r({bucketName:n().min(3,`Bucket name must be at least 3 characters`).max(63,`Bucket name must be at most 63 characters`).regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,`Must start and end with a lowercase letter or number`).regex(/^[a-z0-9.-]+$/,`Only lowercase letters, numbers, hyphens, and periods allowed`).refine(e=>!e.includes(`..`),`Must not contain consecutive periods`).refine(e=>!(e.includes(`.-`)||e.includes(`-.`)),`Must not contain adjacent period and hyphen`)}),b=e();function x(){let e=(0,v.c)(44),t=s(),n=o(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={resolver:d(y)},e[0]=r):r=e[0];let{handleSubmit:x,register:C,control:w,formState:T}=u(r),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=l(O),A;e[3]===k?A=e[4]:(A=e=>e?k[e]:void 0,e[3]=k,e[4]=A);let j=A,M;e[5]!==n||e[6]!==t?(M=async e=>{await n.mutateAsync(e),t({to:`/s3/ls`})},e[5]=n,e[6]=t,e[7]=M):M=e[7];let N=M,P,F;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(i,{to:`/s3/ls`,children:`Back to buckets`}),F=(0,b.jsx)(m,{title:`Create Bucket`}),e[8]=P,e[9]=F):(P=e[8],F=e[9]);let I;e[10]===n.error?I=e[11]:(I=n.error&&(0,b.jsx)(f,{error:n.error,msg:`Failed to create bucket`}),e[10]=n.error,e[11]=I);let L;e[12]!==x||e[13]!==N?(L=x(N),e[12]=x,e[13]=N,e[14]=L):L=e[14];let R;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),e[15]=R):R=e[15];let z=!!E.bucketName,B;e[16]===C?B=e[17]:(B=C(`bucketName`),e[16]=C,e[17]=B);let V;e[18]!==z||e[19]!==B?(V=(0,b.jsx)(c,{"aria-invalid":z,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...B}),e[18]=z,e[19]=B,e[20]=V):V=e[20];let H;e[21]===E.bucketName?H=e[22]:(H=(0,b.jsx)(g,{errors:[E.bucketName]}),e[21]=E.bucketName,e[22]=H);let U;e[23]!==V||e[24]!==H?(U=(0,b.jsxs)(_,{children:[R,V,H]}),e[23]=V,e[24]=H,e[25]=U):U=e[25];let W;e[26]===j?W=e[27]:(W=S(j),e[26]=j,e[27]=W);let G;e[28]===W?G=e[29]:(G=(0,b.jsx)(a,{commands:W}),e[28]=W,e[29]=G);let K;e[30]===t?K=e[31]:(K=async()=>await t({to:`/s3/ls`}),e[30]=t,e[31]=K);let q;e[32]!==n.isPending||e[33]!==D||e[34]!==K?(q=(0,b.jsx)(p,{isPending:n.isPending,isSubmitting:D,onCancel:K,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),e[32]=n.isPending,e[33]=D,e[34]=K,e[35]=q):q=e[35];let J;e[36]!==U||e[37]!==G||e[38]!==q||e[39]!==L?(J=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[U,G,q]}),e[36]=U,e[37]=G,e[38]=q,e[39]=L,e[40]=J):J=e[40];let Y;return e[41]!==J||e[42]!==I?(Y=(0,b.jsxs)(b.Fragment,{children:[P,F,I,J]}),e[41]=J,e[42]=I,e[43]=Y):Y=e[43],Y}function S(e){let t=e(`bucketName`);return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(typeof t==`string`?t:``)||``}`}]}]}export{x as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js b/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js index 7f0374306..d318b4625 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./check.js";import{c,i as l,n as u,s as d,t as f}from"./select.js";import{t as p}from"./copy.js";import{t as m}from"./rotate-cw.js";import{t as h}from"./triangle-alert.js";import{t as g}from"./button.js";import{a as _,d as v,g as y,o as b,t as x}from"./eks.js";import{n as S,s as C}from"./iam.js";import{$t as w,Xr as T,Yt as E,Zr as D,er as O,kt as k,yt as A}from"./index.js";import{i as ee,n as j,t as te}from"./zod.js";import{t as M}from"./use-copy-to-clipboard.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as N}from"./page-heading.js";import{a as P,r as F,t as I}from"./field.js";import{a as L,i as R,l as z,n as B,o as V,r as H,s as U,t as W}from"./alert-dialog.js";import{t as ie}from"./system-managed.js";import{t as G}from"./policy-document-viewer.js";var K=t(n(),1),q=e();function J(e){return`${e.trim()||`cluster`}-eks-cluster-role`}function ae({clusterName:e,open:t,onOpenChange:n,onCreated:r}){let i=C(),a=S(),[o,s]=(0,K.useState)(J(e)),[c,l]=(0,K.useState)(null);(0,K.useEffect)(()=>{t&&(s(J(e)),l(null))},[t,e]);let u=i.isPending||a.isPending;function d(e){e||l(null),n(e)}async function f(){l(null);let e=o.trim();try{let t=await i.mutateAsync({roleName:e,assumeRolePolicyDocument:_});await a.mutateAsync({roleName:e,policyArn:x});let o=t.Role?.Arn;if(!o){l(`Role was created but no ARN was returned.`);return}r(o),n(!1)}catch(e){l(e instanceof Error?e.message:`Failed to create role.`)}}return(0,q.jsx)(W,{onOpenChange:d,open:t,children:(0,q.jsxs)(R,{className:`max-w-lg sm:max-w-lg`,children:[(0,q.jsxs)(U,{children:[(0,q.jsx)(z,{children:`Create cluster IAM role`}),(0,q.jsx)(L,{children:`Creates an IAM role trusted by the EKS control plane and attaches the AmazonEKSClusterPolicy managed policy.`})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`eks-role-name`,children:`Role name`})}),(0,q.jsx)(O,{id:`eks-role-name`,onChange:e=>s(e.target.value),placeholder:`my-cluster-eks-cluster-role`,value:o})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Trust policy (JSON)`}),(0,q.jsx)(G,{document:_})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Attached managed policy`}),(0,q.jsx)(`code`,{className:`block rounded-md border bg-muted p-2 font-mono text-sm break-all`,children:x}),(0,q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Grants the EKS control plane the permissions it needs to manage the cluster.`})]}),c&&(0,q.jsx)(`p`,{className:`text-sm text-destructive`,children:c}),(0,q.jsxs)(V,{children:[(0,q.jsx)(H,{children:`Cancel`}),(0,q.jsx)(B,{disabled:u||!o.trim(),onClick:f,children:u?`Creating…`:`Create role`})]})]})})}var Y=r(),X=`spx admin images import --name spinifex-eks-node`;function oe(e){let t=(0,Y.c)(21),{isRechecking:n,onRecheck:r}=e,{copied:i,copy:a}=M(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(h,{className:`mt-0.5 size-5 shrink-0 text-tactical-amber`}),t[0]=o):o=t[0];let c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,q.jsxs)(`div`,{className:`space-y-1`,children:[(0,q.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`EKS system image not found`}),(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`EKS clusters boot a Spinifex-managed node image (K3s) that is not shipped with the platform. Import it before creating a cluster.`})]}),t[1]=c):c=t[1];let l,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,q.jsx)(`span`,{className:`text-muted-foreground select-none`,children:`$`}),u=(0,q.jsx)(`span`,{className:`flex-1 text-foreground`,children:X}),t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;t[4]===a?d=t[5]:(d=()=>void a(X),t[4]=a,t[5]=d);let f;t[6]===i?f=t[7]:(f=i?(0,q.jsx)(s,{className:`size-3.5 text-tactical-green`}):(0,q.jsx)(p,{className:`size-3.5`}),t[6]=i,t[7]=f);let _;t[8]!==d||t[9]!==f?(_=(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded border border-border bg-background px-3 py-2 font-mono text-xs`,children:[l,u,(0,q.jsx)(`button`,{"aria-label":`Copy command`,className:`text-muted-foreground transition-colors hover:text-foreground`,onClick:d,type:`button`,children:f})]}),t[8]=d,t[9]=f,t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Run from any authenticated spx CLI host. The command downloads and registers the published node image, then click Recheck.`}),t[11]=v):v=t[11];let y=n?`size-4 animate-spin`:`size-4`,b;t[12]===y?b=t[13]:(b=(0,q.jsx)(m,{className:y}),t[12]=y,t[13]=b);let x;t[14]!==n||t[15]!==r||t[16]!==b?(x=(0,q.jsxs)(g,{disabled:n,onClick:r,size:`sm`,variant:`outline`,children:[b,`Recheck`]}),t[14]=n,t[15]=r,t[16]=b,t[17]=x):x=t[17];let S;return t[18]!==x||t[19]!==_?(S=(0,q.jsx)(`div`,{className:`max-w-2xl rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-6`,children:(0,q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,(0,q.jsxs)(`div`,{className:`space-y-4`,children:[c,_,v,x]})]})}),t[18]=x,t[19]=_,t[20]=S):S=t[20],S}function se(e){let t=a(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function Z(e){let t=a(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function Q(){let e=T(),t=D(),[n,r]=(0,K.useState)(!1),[a,s]=(0,K.useState)(!1),{data:p}=i(w),{data:m}=i(E),{data:h}=i(A),{data:_}=i(k),x=y(),S=(_.Images??[]).some(ie),C=async()=>{r(!0);try{await t.invalidateQueries({queryKey:k.queryKey})}finally{r(!1)}},M=p.Vpcs??[],L=m.Subnets??[],R=h.Roles??[],{control:z,formState:{errors:B,isSubmitting:V},handleSubmit:H,register:U,setValue:W,watch:G}=ee({resolver:te(v),defaultValues:{name:``,version:b[0],roleArn:``,vpcId:``,subnetIds:[],bootstrapClusterCreatorAdminPermissions:!0,endpointPublicAccess:!0,endpointPrivateAccess:!1,publicAccessCidrs:[`0.0.0.0/0`]}}),J=G(`vpcId`),Y=G(`subnetIds`),X=G(`endpointPublicAccess`),Q=G(`publicAccessCidrs`),$=L.filter(e=>e.VpcId===J),ce=(e=``)=>{W(`vpcId`,e??``,{shouldValidate:!0}),W(`subnetIds`,[])},le=e=>{W(`subnetIds`,Y.includes(e)?Y.filter(t=>t!==e):[...Y,e],{shouldValidate:!0})},ue=(e,t)=>{let n=[...Q];n[e]=t,W(`publicAccessCidrs`,n,{shouldValidate:!0})},de=()=>W(`publicAccessCidrs`,[...Q,``],{shouldValidate:!0}),fe=e=>W(`publicAccessCidrs`,Q.filter((t,n)=>n!==e),{shouldValidate:!0}),pe=G(`name`),me=async e=>{await t.invalidateQueries({queryKey:A.queryKey}),W(`roleArn`,e,{shouldValidate:!0})};return S?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(o,{to:`/eks/list-clusters`,children:`Clusters`}),(0,q.jsx)(N,{subtitle:`EKS`,title:`Create Cluster`}),x.error&&(0,q.jsx)(ne,{error:x.error,msg:`Failed to create cluster`}),(0,q.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:H(async t=>{await x.mutateAsync(t),await e({to:`/eks/list-clusters/$clusterName`,params:{clusterName:t.name}})}),children:[(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-name`,children:`Name`})}),(0,q.jsx)(O,{"aria-invalid":!!B.name,id:`cluster-name`,placeholder:`my-cluster`,...U(`name`)}),(0,q.jsx)(F,{errors:[B.name]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-version`,children:`Kubernetes version`})}),(0,q.jsx)(j,{control:z,name:`version`,render:({field:e})=>(0,q.jsxs)(f,{onValueChange:e.onChange,value:e.value,children:[(0,q.jsx)(d,{className:`w-full`,id:`cluster-version`,children:(0,q.jsx)(c,{placeholder:`Select version`})}),(0,q.jsx)(u,{children:b.map(e=>(0,q.jsx)(l,{value:e,children:e},e))})]})}),(0,q.jsx)(F,{errors:[B.version]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-role`,children:`Cluster IAM role`})}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(j,{control:z,name:`roleArn`,render:({field:e})=>(0,q.jsxs)(f,{onValueChange:e.onChange,value:e.value,children:[(0,q.jsx)(d,{"aria-invalid":!!B.roleArn,className:`w-full`,id:`cluster-role`,children:(0,q.jsx)(c,{placeholder:`Select role`})}),(0,q.jsx)(u,{children:R.map(e=>(0,q.jsx)(l,{value:e.Arn??``,children:e.RoleName},e.Arn))})]})}),(0,q.jsx)(g,{onClick:()=>s(!0),type:`button`,variant:`outline`,children:`Create role`})]}),(0,q.jsx)(F,{errors:[B.roleArn]})]}),(0,q.jsx)(ae,{clusterName:pe,onCreated:me,onOpenChange:s,open:a}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-vpc`,children:`VPC`})}),(0,q.jsx)(j,{control:z,name:`vpcId`,render:({field:e})=>(0,q.jsxs)(f,{onValueChange:e=>ce(e),value:e.value,children:[(0,q.jsx)(d,{"aria-invalid":!!B.vpcId,className:`w-full`,id:`cluster-vpc`,children:(0,q.jsx)(c,{placeholder:`Select VPC`})}),(0,q.jsx)(u,{children:M.map(e=>(0,q.jsx)(l,{value:e.VpcId??``,children:se(e)},e.VpcId))})]})}),(0,q.jsx)(F,{errors:[B.vpcId]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Subnets (select at least 1)`}),$.length===0?(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,q.jsx)(`div`,{className:`space-y-1`,children:$.map(e=>(0,q.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Subnet ${Z(e)}`,checked:Y.includes(e.SubnetId??``),onChange:()=>le(e.SubnetId??``),type:`checkbox`}),(0,q.jsx)(`span`,{className:`font-mono`,children:Z(e)})]},e.SubnetId))}),(0,q.jsx)(F,{errors:[B.subnetIds]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Endpoint access`}),(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Public access exposes the API server on an internet-facing endpoint; private access keeps it reachable only from within the VPC. At least one must be enabled.`}),(0,q.jsx)(j,{control:z,name:`endpointPublicAccess`,render:({field:e})=>(0,q.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Enable public access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Public`]})}),(0,q.jsx)(j,{control:z,name:`endpointPrivateAccess`,render:({field:e})=>(0,q.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Enable private access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Private`]})}),(0,q.jsx)(F,{errors:[B.endpointPublicAccess]}),X&&(0,q.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Public access source ranges (CIDR). Defaults to`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:`0.0.0.0/0`}),`.`]}),Q.map((e,t)=>(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(O,{"aria-label":`Public access CIDR ${t+1}`,className:`font-mono`,onChange:e=>ue(t,e.target.value),placeholder:`203.0.113.0/24`,value:e}),(0,q.jsx)(g,{onClick:()=>fe(t),size:`sm`,type:`button`,variant:`ghost`,children:`Remove`})]},t)),(0,q.jsx)(g,{onClick:de,size:`sm`,type:`button`,variant:`outline`,children:`Add CIDR`}),(0,q.jsx)(F,{errors:[B.publicAccessCidrs]})]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Access`}),(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Authentication mode is `,(0,q.jsx)(`span`,{className:`font-mono`,children:`API`}),` (IAM access entries). The legacy aws-auth ConfigMap is not supported.`]}),(0,q.jsx)(j,{control:z,name:`bootstrapClusterCreatorAdminPermissions`,render:({field:e})=>(0,q.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Grant the cluster creator admin permissions`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Grant the cluster creator admin permissions`]})})]}),(0,q.jsx)(re,{isPending:x.isPending,isSubmitting:V,onCancel:async()=>await e({to:`/eks/list-clusters`}),pendingLabel:`Creating…`,submitLabel:`Create Cluster`})]})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(o,{to:`/eks/list-clusters`,children:`Clusters`}),(0,q.jsx)(N,{subtitle:`EKS`,title:`Create Cluster`}),(0,q.jsx)(oe,{isRechecking:n,onRecheck:C})]})}var $=Q;export{$ as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{Ut as a}from"./auth.js";import{t as o}from"./back-link.js";import{t as s}from"./check.js";import{c,i as l,n as u,s as d,t as f}from"./select.js";import{t as p}from"./copy.js";import{t as m}from"./rotate-cw.js";import{t as h}from"./triangle-alert.js";import{t as g}from"./button.js";import{a as _,d as v,g as y,o as b,t as x}from"./eks.js";import{n as S,s as C}from"./iam.js";import{$r as w,Qr as T,Zt as E,jt as D,nr as O,tn as k,xt as A}from"./index.js";import{i as ee,n as j,t as te}from"./zod.js";import{t as M}from"./use-copy-to-clipboard.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as N}from"./page-heading.js";import{a as P,r as F,t as I}from"./field.js";import{a as L,i as R,l as z,n as B,o as V,r as H,s as U,t as W}from"./alert-dialog.js";import{n as ie}from"./system-managed.js";import{t as G}from"./policy-document-viewer.js";var K=t(n(),1),q=e();function J(e){return`${e.trim()||`cluster`}-eks-cluster-role`}function ae({clusterName:e,open:t,onOpenChange:n,onCreated:r}){let i=C(),a=S(),[o,s]=(0,K.useState)(J(e)),[c,l]=(0,K.useState)(null);(0,K.useEffect)(()=>{t&&(s(J(e)),l(null))},[t,e]);let u=i.isPending||a.isPending;function d(e){e||l(null),n(e)}async function f(){l(null);let e=o.trim();try{let t=await i.mutateAsync({roleName:e,assumeRolePolicyDocument:_});await a.mutateAsync({roleName:e,policyArn:x});let o=t.Role?.Arn;if(!o){l(`Role was created but no ARN was returned.`);return}r(o),n(!1)}catch(e){l(e instanceof Error?e.message:`Failed to create role.`)}}return(0,q.jsx)(W,{onOpenChange:d,open:t,children:(0,q.jsxs)(R,{className:`max-w-lg sm:max-w-lg`,children:[(0,q.jsxs)(U,{children:[(0,q.jsx)(z,{children:`Create cluster IAM role`}),(0,q.jsx)(L,{children:`Creates an IAM role trusted by the EKS control plane and attaches the AmazonEKSClusterPolicy managed policy.`})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`eks-role-name`,children:`Role name`})}),(0,q.jsx)(O,{id:`eks-role-name`,onChange:e=>s(e.target.value),placeholder:`my-cluster-eks-cluster-role`,value:o})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Trust policy (JSON)`}),(0,q.jsx)(G,{document:_})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Attached managed policy`}),(0,q.jsx)(`code`,{className:`block rounded-md border bg-muted p-2 font-mono text-sm break-all`,children:x}),(0,q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Grants the EKS control plane the permissions it needs to manage the cluster.`})]}),c&&(0,q.jsx)(`p`,{className:`text-sm text-destructive`,children:c}),(0,q.jsxs)(V,{children:[(0,q.jsx)(H,{children:`Cancel`}),(0,q.jsx)(B,{disabled:u||!o.trim(),onClick:f,children:u?`Creating…`:`Create role`})]})]})})}var Y=r(),X=`spx admin images import --name spinifex-eks-node`;function oe(e){let t=(0,Y.c)(21),{isRechecking:n,onRecheck:r}=e,{copied:i,copy:a}=M(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(h,{className:`mt-0.5 size-5 shrink-0 text-tactical-amber`}),t[0]=o):o=t[0];let c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,q.jsxs)(`div`,{className:`space-y-1`,children:[(0,q.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`EKS system image not found`}),(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`EKS clusters boot a Spinifex-managed node image (K3s) that is not shipped with the platform. Import it before creating a cluster.`})]}),t[1]=c):c=t[1];let l,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,q.jsx)(`span`,{className:`text-muted-foreground select-none`,children:`$`}),u=(0,q.jsx)(`span`,{className:`flex-1 text-foreground`,children:X}),t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;t[4]===a?d=t[5]:(d=()=>void a(X),t[4]=a,t[5]=d);let f;t[6]===i?f=t[7]:(f=i?(0,q.jsx)(s,{className:`size-3.5 text-tactical-green`}):(0,q.jsx)(p,{className:`size-3.5`}),t[6]=i,t[7]=f);let _;t[8]!==d||t[9]!==f?(_=(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded border border-border bg-background px-3 py-2 font-mono text-xs`,children:[l,u,(0,q.jsx)(`button`,{"aria-label":`Copy command`,className:`text-muted-foreground transition-colors hover:text-foreground`,onClick:d,type:`button`,children:f})]}),t[8]=d,t[9]=f,t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Run from any authenticated spx CLI host. The command downloads and registers the published node image, then click Recheck.`}),t[11]=v):v=t[11];let y=n?`size-4 animate-spin`:`size-4`,b;t[12]===y?b=t[13]:(b=(0,q.jsx)(m,{className:y}),t[12]=y,t[13]=b);let x;t[14]!==n||t[15]!==r||t[16]!==b?(x=(0,q.jsxs)(g,{disabled:n,onClick:r,size:`sm`,variant:`outline`,children:[b,`Recheck`]}),t[14]=n,t[15]=r,t[16]=b,t[17]=x):x=t[17];let S;return t[18]!==x||t[19]!==_?(S=(0,q.jsx)(`div`,{className:`max-w-2xl rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-6`,children:(0,q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,(0,q.jsxs)(`div`,{className:`space-y-4`,children:[c,_,v,x]})]})}),t[18]=x,t[19]=_,t[20]=S):S=t[20],S}function se(e){let t=a(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function Z(e){let t=a(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function Q(){let e=T(),t=w(),[n,r]=(0,K.useState)(!1),[a,s]=(0,K.useState)(!1),{data:p}=i(k),{data:m}=i(E),{data:h}=i(A),{data:_}=i(D),x=y(),S=(_.Images??[]).some(ie),C=async()=>{r(!0);try{await t.invalidateQueries({queryKey:D.queryKey})}finally{r(!1)}},M=p.Vpcs??[],L=m.Subnets??[],R=h.Roles??[],{control:z,formState:{errors:B,isSubmitting:V},handleSubmit:H,register:U,setValue:W,watch:G}=ee({resolver:te(v),defaultValues:{name:``,version:b[0],roleArn:``,vpcId:``,subnetIds:[],bootstrapClusterCreatorAdminPermissions:!0,endpointPublicAccess:!0,endpointPrivateAccess:!1,publicAccessCidrs:[`0.0.0.0/0`]}}),J=G(`vpcId`),Y=G(`subnetIds`),X=G(`endpointPublicAccess`),Q=G(`publicAccessCidrs`),$=L.filter(e=>e.VpcId===J),ce=(e=``)=>{W(`vpcId`,e??``,{shouldValidate:!0}),W(`subnetIds`,[])},le=e=>{W(`subnetIds`,Y.includes(e)?Y.filter(t=>t!==e):[...Y,e],{shouldValidate:!0})},ue=(e,t)=>{let n=[...Q];n[e]=t,W(`publicAccessCidrs`,n,{shouldValidate:!0})},de=()=>W(`publicAccessCidrs`,[...Q,``],{shouldValidate:!0}),fe=e=>W(`publicAccessCidrs`,Q.filter((t,n)=>n!==e),{shouldValidate:!0}),pe=G(`name`),me=async e=>{await t.invalidateQueries({queryKey:A.queryKey}),W(`roleArn`,e,{shouldValidate:!0})};return S?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(o,{to:`/eks/list-clusters`,children:`Clusters`}),(0,q.jsx)(N,{subtitle:`EKS`,title:`Create Cluster`}),x.error&&(0,q.jsx)(ne,{error:x.error,msg:`Failed to create cluster`}),(0,q.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:H(async t=>{await x.mutateAsync(t),await e({to:`/eks/list-clusters/$clusterName`,params:{clusterName:t.name}})}),children:[(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-name`,children:`Name`})}),(0,q.jsx)(O,{"aria-invalid":!!B.name,id:`cluster-name`,placeholder:`my-cluster`,...U(`name`)}),(0,q.jsx)(F,{errors:[B.name]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-version`,children:`Kubernetes version`})}),(0,q.jsx)(j,{control:z,name:`version`,render:({field:e})=>(0,q.jsxs)(f,{onValueChange:e.onChange,value:e.value,children:[(0,q.jsx)(d,{className:`w-full`,id:`cluster-version`,children:(0,q.jsx)(c,{placeholder:`Select version`})}),(0,q.jsx)(u,{children:b.map(e=>(0,q.jsx)(l,{value:e,children:e},e))})]})}),(0,q.jsx)(F,{errors:[B.version]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-role`,children:`Cluster IAM role`})}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(j,{control:z,name:`roleArn`,render:({field:e})=>(0,q.jsxs)(f,{onValueChange:e.onChange,value:e.value,children:[(0,q.jsx)(d,{"aria-invalid":!!B.roleArn,className:`w-full`,id:`cluster-role`,children:(0,q.jsx)(c,{placeholder:`Select role`})}),(0,q.jsx)(u,{children:R.map(e=>(0,q.jsx)(l,{value:e.Arn??``,children:e.RoleName},e.Arn))})]})}),(0,q.jsx)(g,{onClick:()=>s(!0),type:`button`,variant:`outline`,children:`Create role`})]}),(0,q.jsx)(F,{errors:[B.roleArn]})]}),(0,q.jsx)(ae,{clusterName:pe,onCreated:me,onOpenChange:s,open:a}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-vpc`,children:`VPC`})}),(0,q.jsx)(j,{control:z,name:`vpcId`,render:({field:e})=>(0,q.jsxs)(f,{onValueChange:e=>ce(e),value:e.value,children:[(0,q.jsx)(d,{"aria-invalid":!!B.vpcId,className:`w-full`,id:`cluster-vpc`,children:(0,q.jsx)(c,{placeholder:`Select VPC`})}),(0,q.jsx)(u,{children:M.map(e=>(0,q.jsx)(l,{value:e.VpcId??``,children:se(e)},e.VpcId))})]})}),(0,q.jsx)(F,{errors:[B.vpcId]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Subnets (select at least 1)`}),$.length===0?(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,q.jsx)(`div`,{className:`space-y-1`,children:$.map(e=>(0,q.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Subnet ${Z(e)}`,checked:Y.includes(e.SubnetId??``),onChange:()=>le(e.SubnetId??``),type:`checkbox`}),(0,q.jsx)(`span`,{className:`font-mono`,children:Z(e)})]},e.SubnetId))}),(0,q.jsx)(F,{errors:[B.subnetIds]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Endpoint access`}),(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Public access exposes the API server on an internet-facing endpoint; private access keeps it reachable only from within the VPC. At least one must be enabled.`}),(0,q.jsx)(j,{control:z,name:`endpointPublicAccess`,render:({field:e})=>(0,q.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Enable public access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Public`]})}),(0,q.jsx)(j,{control:z,name:`endpointPrivateAccess`,render:({field:e})=>(0,q.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Enable private access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Private`]})}),(0,q.jsx)(F,{errors:[B.endpointPublicAccess]}),X&&(0,q.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Public access source ranges (CIDR). Defaults to`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:`0.0.0.0/0`}),`.`]}),Q.map((e,t)=>(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(O,{"aria-label":`Public access CIDR ${t+1}`,className:`font-mono`,onChange:e=>ue(t,e.target.value),placeholder:`203.0.113.0/24`,value:e}),(0,q.jsx)(g,{onClick:()=>fe(t),size:`sm`,type:`button`,variant:`ghost`,children:`Remove`})]},t)),(0,q.jsx)(g,{onClick:de,size:`sm`,type:`button`,variant:`outline`,children:`Add CIDR`}),(0,q.jsx)(F,{errors:[B.publicAccessCidrs]})]})]}),(0,q.jsxs)(I,{children:[(0,q.jsx)(P,{children:`Access`}),(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Authentication mode is `,(0,q.jsx)(`span`,{className:`font-mono`,children:`API`}),` (IAM access entries). The legacy aws-auth ConfigMap is not supported.`]}),(0,q.jsx)(j,{control:z,name:`bootstrapClusterCreatorAdminPermissions`,render:({field:e})=>(0,q.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Grant the cluster creator admin permissions`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Grant the cluster creator admin permissions`]})})]}),(0,q.jsx)(re,{isPending:x.isPending,isSubmitting:V,onCancel:async()=>await e({to:`/eks/list-clusters`}),pendingLabel:`Creating…`,submitLabel:`Create Cluster`})]})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(o,{to:`/eks/list-clusters`,children:`Clusters`}),(0,q.jsx)(N,{subtitle:`EKS`,title:`Create Cluster`}),(0,q.jsx)(oe,{isRechecking:n,onRecheck:C})]})}var $=Q;export{$ as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-instance-profile.js b/spinifex/services/spinifexui/frontend/dist/assets/create-instance-profile.js index e5070f7a5..b78e75366 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-instance-profile.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-instance-profile.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{a as i}from"./iam.js";import{Xr as a,er as o}from"./index.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{n as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=a(),y=i(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=c(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=s(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-instance-profiles`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(n,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),P=(0,v.jsx)(f,{title:`Create Instance Profile`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create instance profile`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`instanceProfileName`,children:`Instance Profile Name`})}),e[15]=L):L=e[15];let R=!!T.instanceProfileName,z;e[16]===S?z=e[17]:(z=S(`instanceProfileName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(o,{"aria-invalid":R,id:`instanceProfileName`,placeholder:`my-instance-profile...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.instanceProfileName?V=e[22]:(V=(0,v.jsx)(m,{errors:[T.instanceProfileName]}),e[21]=T.instanceProfileName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(h,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(o,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(m,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(h,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(r,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-instance-profiles`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Instance Profile`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`instanceProfileName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-instance-profile`},{type:`flag`,value:` --instance-profile-name`},{type:`value`,value:` ${n||``}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create Instance Profile`,parts:a}]}export{y as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{a as i}from"./iam.js";import{Qr as a,nr as o}from"./index.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{n as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=a(),y=i(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=c(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=s(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-instance-profiles`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(n,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),P=(0,v.jsx)(f,{title:`Create Instance Profile`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create instance profile`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`instanceProfileName`,children:`Instance Profile Name`})}),e[15]=L):L=e[15];let R=!!T.instanceProfileName,z;e[16]===S?z=e[17]:(z=S(`instanceProfileName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(o,{"aria-invalid":R,id:`instanceProfileName`,placeholder:`my-instance-profile...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.instanceProfileName?V=e[22]:(V=(0,v.jsx)(m,{errors:[T.instanceProfileName]}),e[21]=T.instanceProfileName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(h,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(o,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(m,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(h,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(r,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-instance-profiles`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Instance Profile`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`instanceProfileName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-instance-profile`},{type:`flag`,value:` --instance-profile-name`},{type:`value`,value:` ${n||``}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create Instance Profile`,parts:a}]}export{y as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-internet-gateway.js b/spinifex/services/spinifexui/frontend/dist/assets/create-internet-gateway.js index 19f3401bd..0ab69660e 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-internet-gateway.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-internet-gateway.js @@ -1,2 +1,2 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{f as i}from"./ec2.js";import{Xr as a,er as o}from"./index.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{a as h}from"./ec22.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=a(),v=i(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=c(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=s(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).InternetGateway?.InternetGatewayId;t(n?{to:`/ec2/describe-internet-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-internet-gateways`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(n,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),j=(0,_.jsx)(f,{title:`Create Internet Gateway`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(u,{error:v.error,msg:`Failed to create Internet Gateway`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(o,{id:`name`,placeholder:`my-internet-gateway`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(r,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>await t({to:`/ec2/describe-internet-gateways`}),e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(d,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Creating…`,submitLabel:`Create`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-internet-gateway`}];return e.trim()&&t.push({type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{f as i}from"./ec2.js";import{Qr as a,nr as o}from"./index.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{a as h}from"./ec22.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=a(),v=i(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=c(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=s(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).InternetGateway?.InternetGatewayId;t(n?{to:`/ec2/describe-internet-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-internet-gateways`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(n,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),j=(0,_.jsx)(f,{title:`Create Internet Gateway`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(u,{error:v.error,msg:`Failed to create Internet Gateway`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(p,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(m,{children:[P,(0,_.jsx)(o,{id:`name`,placeholder:`my-internet-gateway`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(r,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>await t({to:`/ec2/describe-internet-gateways`}),e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(d,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Creating…`,submitLabel:`Create`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-internet-gateway`}];return e.trim()&&t.push({type:`flag`,value:` \\ --tag-specifications`},{type:`value`,value:` 'ResourceType=internet-gateway,Tags=[{Key=Name,Value=${e.trim()}}]'`}),[{label:`Create Internet Gateway`,parts:t}]}export{v as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-key-pair.js b/spinifex/services/spinifexui/frontend/dist/assets/create-key-pair.js index d93072783..bf066f070 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-key-pair.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-key-pair.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./back-link.js";import{t as a}from"./check.js";import{t as o}from"./download.js";import{t as s}from"./cli-command-panel.js";import{t as c}from"./triangle-alert.js";import{t as l}from"./button.js";import{p as u}from"./ec2.js";import{Xr as d,er as f}from"./index.js";import{a as p,i as m,t as h}from"./zod.js";import{t as g}from"./use-copy-to-clipboard.js";import{t as _}from"./error-banner.js";import{t as v}from"./form-actions.js";import{t as y}from"./page-heading.js";import{a as b,r as x,t as S}from"./field.js";import{o as C}from"./ec22.js";import{a as ee,c as w,i as T,l as E,o as D,r as O,s as k,t as A}from"./alert-dialog.js";var j=t(n()),M=r(),N=e();function P(e){let t=(0,M.c)(38),{open:n,keyName:r,keyMaterial:i}=e,s=d(),{copied:u,copy:f}=g(),p;t[0]!==i||t[1]!==r?(p=()=>{let e=new Blob([i],{type:`text/plain`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${r}.pem`,n.click(),URL.revokeObjectURL(t)},t[0]=i,t[1]=r,t[2]=p):p=t[2];let m=p,h;t[3]===s?h=t[4]:(h=()=>{s({to:`/ec2/describe-key-pairs`})},t[3]=s,t[4]=h);let _=h,v,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,N.jsx)(w,{children:(0,N.jsx)(c,{className:`text-destructive`})}),y=(0,N.jsx)(E,{children:`Save Your Private Key`}),t[5]=v,t[6]=y):(v=t[5],y=t[6]);let b;t[7]===r?b=t[8]:(b=(0,N.jsxs)(k,{children:[v,y,(0,N.jsxs)(ee,{children:[`This is your only chance to save the private key file for`,` `,(0,N.jsx)(`strong`,{children:r}),`. Please download or copy it now. You won't be able to retrieve it again.`]})]}),t[7]=r,t[8]=b);let x=`Private key material for ${r}`,S;t[9]!==i||t[10]!==x?(S=(0,N.jsx)(`textarea`,{"aria-label":x,className:`w-full resize-none overflow-y-auto rounded-md border border-input bg-input/20 px-2 py-2 font-mono text-xs`,readOnly:!0,rows:4,value:i}),t[9]=i,t[10]=x,t[11]=S):S=t[11];let C;t[12]!==f||t[13]!==i?(C=async()=>await f(i),t[12]=f,t[13]=i,t[14]=C):C=t[14];let j;t[15]===u?j=t[16]:(j=u?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(a,{className:`mr-2 size-4`}),`Copied!`]}):`Copy to Clipboard`,t[15]=u,t[16]=j);let P;t[17]!==C||t[18]!==j?(P=(0,N.jsx)(l,{className:`flex-1`,onClick:C,type:`button`,variant:`outline`,children:j}),t[17]=C,t[18]=j,t[19]=P):P=t[19];let F;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,N.jsx)(o,{className:`mr-2 size-4`}),t[20]=F):F=t[20];let I;t[21]===m?I=t[22]:(I=(0,N.jsxs)(l,{className:`flex-1`,onClick:m,type:`button`,variant:`outline`,children:[F,`Download .pem File`]}),t[21]=m,t[22]=I);let L;t[23]!==P||t[24]!==I?(L=(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[P,I]}),t[23]=P,t[24]=I,t[25]=L):L=t[25];let R;t[26]!==L||t[27]!==S?(R=(0,N.jsxs)(`div`,{className:`space-y-3`,children:[S,L]}),t[26]=L,t[27]=S,t[28]=R):R=t[28];let z;t[29]===_?z=t[30]:(z=(0,N.jsx)(D,{children:(0,N.jsx)(O,{onClick:_,children:`Close and Continue`})}),t[29]=_,t[30]=z);let B;t[31]!==R||t[32]!==z||t[33]!==b?(B=(0,N.jsxs)(T,{className:`max-w-2xl`,children:[b,R,z]}),t[31]=R,t[32]=z,t[33]=b,t[34]=B):B=t[34];let V;return t[35]!==n||t[36]!==B?(V=(0,N.jsx)(A,{open:n,children:B}),t[35]=n,t[36]=B,t[37]=V):V=t[37],V}function F(){let e=(0,M.c)(46),t=d(),n=u(),[r,a]=(0,j.useState)(null),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:h(C)},e[0]=o):o=e[0];let{handleSubmit:c,register:l,control:g,formState:ee}=m(o),{errors:w,isSubmitting:T}=ee,E;e[1]===g?E=e[2]:(E={control:g},e[1]=g,e[2]=E);let D=p(E),O;e[3]===D?O=e[4]:(O=e=>e?D[e]:void 0,e[3]=D,e[4]=O);let k=O,A;e[5]===n?A=e[6]:(A=async e=>{let t=await n.mutateAsync(e);t.KeyMaterial&&a({keyName:e.keyName,material:t.KeyMaterial})},e[5]=n,e[6]=A);let F=A,L,R;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,N.jsx)(i,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),R=(0,N.jsx)(y,{title:`Create Key Pair`}),e[7]=L,e[8]=R):(L=e[7],R=e[8]);let z;e[9]===n.error?z=e[10]:(z=n.error&&(0,N.jsx)(_,{error:n.error,msg:`Failed to create key pair`}),e[9]=n.error,e[10]=z);let B;e[11]!==c||e[12]!==F?(B=c(F),e[11]=c,e[12]=F,e[13]=B):B=e[13];let V;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,N.jsx)(b,{children:(0,N.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[14]=V):V=e[14];let H=!!w.keyName,U;e[15]===l?U=e[16]:(U=l(`keyName`),e[15]=l,e[16]=U);let W;e[17]!==H||e[18]!==U?(W=(0,N.jsx)(f,{"aria-invalid":H,id:`keyName`,placeholder:`my-key-pair…`,...U}),e[17]=H,e[18]=U,e[19]=W):W=e[19];let G;e[20]===w.keyName?G=e[21]:(G=(0,N.jsx)(x,{errors:[w.keyName]}),e[20]=w.keyName,e[21]=G);let K;e[22]!==W||e[23]!==G?(K=(0,N.jsxs)(S,{children:[V,W,G]}),e[22]=W,e[23]=G,e[24]=K):K=e[24];let q;e[25]===k?q=e[26]:(q=I(k),e[25]=k,e[26]=q);let J;e[27]===q?J=e[28]:(J=(0,N.jsx)(s,{commands:q}),e[27]=q,e[28]=J);let Y;e[29]===t?Y=e[30]:(Y=async()=>await t({to:`/ec2/describe-key-pairs`}),e[29]=t,e[30]=Y);let X;e[31]!==n.isPending||e[32]!==T||e[33]!==Y?(X=(0,N.jsx)(v,{isPending:n.isPending,isSubmitting:T,onCancel:Y,pendingLabel:`Creating…`,submitLabel:`Create Key Pair`}),e[31]=n.isPending,e[32]=T,e[33]=Y,e[34]=X):X=e[34];let Z;e[35]!==K||e[36]!==J||e[37]!==X||e[38]!==B?(Z=(0,N.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[K,J,X]}),e[35]=K,e[36]=J,e[37]=X,e[38]=B,e[39]=Z):Z=e[39];let Q;e[40]===r?Q=e[41]:(Q=r&&(0,N.jsx)(P,{keyMaterial:r.material,keyName:r.keyName,open:!!r}),e[40]=r,e[41]=Q);let $;return e[42]!==Z||e[43]!==Q||e[44]!==z?($=(0,N.jsxs)(N.Fragment,{children:[L,R,z,Z,Q]}),e[42]=Z,e[43]=Q,e[44]=z,e[45]=$):$=e[45],$}function I(e){let t=e(`keyName`);return[{label:`Create Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-key-pair`},{type:`flag`,value:` --key-name`},{type:`value`,value:` ${(typeof t==`string`?t:``)||``}`}]}]}export{F as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./back-link.js";import{t as a}from"./check.js";import{t as o}from"./download.js";import{t as s}from"./cli-command-panel.js";import{t as c}from"./triangle-alert.js";import{t as l}from"./button.js";import{p as u}from"./ec2.js";import{Qr as d,nr as f}from"./index.js";import{a as p,i as m,t as h}from"./zod.js";import{t as g}from"./use-copy-to-clipboard.js";import{t as _}from"./error-banner.js";import{t as v}from"./form-actions.js";import{t as y}from"./page-heading.js";import{a as b,r as x,t as S}from"./field.js";import{o as C}from"./ec22.js";import{a as ee,c as w,i as T,l as E,o as D,r as O,s as k,t as A}from"./alert-dialog.js";var j=t(n()),M=r(),N=e();function P(e){let t=(0,M.c)(38),{open:n,keyName:r,keyMaterial:i}=e,s=d(),{copied:u,copy:f}=g(),p;t[0]!==i||t[1]!==r?(p=()=>{let e=new Blob([i],{type:`text/plain`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${r}.pem`,n.click(),URL.revokeObjectURL(t)},t[0]=i,t[1]=r,t[2]=p):p=t[2];let m=p,h;t[3]===s?h=t[4]:(h=()=>{s({to:`/ec2/describe-key-pairs`})},t[3]=s,t[4]=h);let _=h,v,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,N.jsx)(w,{children:(0,N.jsx)(c,{className:`text-destructive`})}),y=(0,N.jsx)(E,{children:`Save Your Private Key`}),t[5]=v,t[6]=y):(v=t[5],y=t[6]);let b;t[7]===r?b=t[8]:(b=(0,N.jsxs)(k,{children:[v,y,(0,N.jsxs)(ee,{children:[`This is your only chance to save the private key file for`,` `,(0,N.jsx)(`strong`,{children:r}),`. Please download or copy it now. You won't be able to retrieve it again.`]})]}),t[7]=r,t[8]=b);let x=`Private key material for ${r}`,S;t[9]!==i||t[10]!==x?(S=(0,N.jsx)(`textarea`,{"aria-label":x,className:`w-full resize-none overflow-y-auto rounded-md border border-input bg-input/20 px-2 py-2 font-mono text-xs`,readOnly:!0,rows:4,value:i}),t[9]=i,t[10]=x,t[11]=S):S=t[11];let C;t[12]!==f||t[13]!==i?(C=async()=>await f(i),t[12]=f,t[13]=i,t[14]=C):C=t[14];let j;t[15]===u?j=t[16]:(j=u?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(a,{className:`mr-2 size-4`}),`Copied!`]}):`Copy to Clipboard`,t[15]=u,t[16]=j);let P;t[17]!==C||t[18]!==j?(P=(0,N.jsx)(l,{className:`flex-1`,onClick:C,type:`button`,variant:`outline`,children:j}),t[17]=C,t[18]=j,t[19]=P):P=t[19];let F;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,N.jsx)(o,{className:`mr-2 size-4`}),t[20]=F):F=t[20];let I;t[21]===m?I=t[22]:(I=(0,N.jsxs)(l,{className:`flex-1`,onClick:m,type:`button`,variant:`outline`,children:[F,`Download .pem File`]}),t[21]=m,t[22]=I);let L;t[23]!==P||t[24]!==I?(L=(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[P,I]}),t[23]=P,t[24]=I,t[25]=L):L=t[25];let R;t[26]!==L||t[27]!==S?(R=(0,N.jsxs)(`div`,{className:`space-y-3`,children:[S,L]}),t[26]=L,t[27]=S,t[28]=R):R=t[28];let z;t[29]===_?z=t[30]:(z=(0,N.jsx)(D,{children:(0,N.jsx)(O,{onClick:_,children:`Close and Continue`})}),t[29]=_,t[30]=z);let B;t[31]!==R||t[32]!==z||t[33]!==b?(B=(0,N.jsxs)(T,{className:`max-w-2xl`,children:[b,R,z]}),t[31]=R,t[32]=z,t[33]=b,t[34]=B):B=t[34];let V;return t[35]!==n||t[36]!==B?(V=(0,N.jsx)(A,{open:n,children:B}),t[35]=n,t[36]=B,t[37]=V):V=t[37],V}function F(){let e=(0,M.c)(46),t=d(),n=u(),[r,a]=(0,j.useState)(null),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:h(C)},e[0]=o):o=e[0];let{handleSubmit:c,register:l,control:g,formState:ee}=m(o),{errors:w,isSubmitting:T}=ee,E;e[1]===g?E=e[2]:(E={control:g},e[1]=g,e[2]=E);let D=p(E),O;e[3]===D?O=e[4]:(O=e=>e?D[e]:void 0,e[3]=D,e[4]=O);let k=O,A;e[5]===n?A=e[6]:(A=async e=>{let t=await n.mutateAsync(e);t.KeyMaterial&&a({keyName:e.keyName,material:t.KeyMaterial})},e[5]=n,e[6]=A);let F=A,L,R;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,N.jsx)(i,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),R=(0,N.jsx)(y,{title:`Create Key Pair`}),e[7]=L,e[8]=R):(L=e[7],R=e[8]);let z;e[9]===n.error?z=e[10]:(z=n.error&&(0,N.jsx)(_,{error:n.error,msg:`Failed to create key pair`}),e[9]=n.error,e[10]=z);let B;e[11]!==c||e[12]!==F?(B=c(F),e[11]=c,e[12]=F,e[13]=B):B=e[13];let V;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,N.jsx)(b,{children:(0,N.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[14]=V):V=e[14];let H=!!w.keyName,U;e[15]===l?U=e[16]:(U=l(`keyName`),e[15]=l,e[16]=U);let W;e[17]!==H||e[18]!==U?(W=(0,N.jsx)(f,{"aria-invalid":H,id:`keyName`,placeholder:`my-key-pair…`,...U}),e[17]=H,e[18]=U,e[19]=W):W=e[19];let G;e[20]===w.keyName?G=e[21]:(G=(0,N.jsx)(x,{errors:[w.keyName]}),e[20]=w.keyName,e[21]=G);let K;e[22]!==W||e[23]!==G?(K=(0,N.jsxs)(S,{children:[V,W,G]}),e[22]=W,e[23]=G,e[24]=K):K=e[24];let q;e[25]===k?q=e[26]:(q=I(k),e[25]=k,e[26]=q);let J;e[27]===q?J=e[28]:(J=(0,N.jsx)(s,{commands:q}),e[27]=q,e[28]=J);let Y;e[29]===t?Y=e[30]:(Y=async()=>await t({to:`/ec2/describe-key-pairs`}),e[29]=t,e[30]=Y);let X;e[31]!==n.isPending||e[32]!==T||e[33]!==Y?(X=(0,N.jsx)(v,{isPending:n.isPending,isSubmitting:T,onCancel:Y,pendingLabel:`Creating…`,submitLabel:`Create Key Pair`}),e[31]=n.isPending,e[32]=T,e[33]=Y,e[34]=X):X=e[34];let Z;e[35]!==K||e[36]!==J||e[37]!==X||e[38]!==B?(Z=(0,N.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[K,J,X]}),e[35]=K,e[36]=J,e[37]=X,e[38]=B,e[39]=Z):Z=e[39];let Q;e[40]===r?Q=e[41]:(Q=r&&(0,N.jsx)(P,{keyMaterial:r.material,keyName:r.keyName,open:!!r}),e[40]=r,e[41]=Q);let $;return e[42]!==Z||e[43]!==Q||e[44]!==z?($=(0,N.jsxs)(N.Fragment,{children:[L,R,z,Z,Q]}),e[42]=Z,e[43]=Q,e[44]=z,e[45]=$):$=e[45],$}function I(e){let t=e(`keyName`);return[{label:`Create Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-key-pair`},{type:`flag`,value:` --key-name`},{type:`value`,value:` ${(typeof t==`string`?t:``)||``}`}]}]}export{F as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-load-balancer.js b/spinifex/services/spinifexui/frontend/dist/assets/create-load-balancer.js index 245b061b8..359b9836f 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-load-balancer.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-load-balancer.js @@ -1,4 +1,4 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Ut as i}from"./auth.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as c,s as l,t as u}from"./select.js";import{t as d}from"./plus.js";import{t as f}from"./cli-command-panel.js";import{t as p}from"./trash-2.js";import{t as m}from"./button.js";import{t as h}from"./certificate-import-dialog.js";import{n as g}from"./elbv2.js";import{$t as _,B as v,Gt as y,J as b,Q as x,Xr as ee,Yt as te,er as S}from"./index.js";import{i as C,n as w,t as T}from"./zod.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as ie}from"./page-heading.js";import{a as E,r as D,t as O}from"./field.js";import{t as ae}from"./target-group-form.js";import{a as oe,c as se,o as ce,r as le,s as k,t as ue}from"./elbv22.js";var A=t(n(),1),j=e();function de(e){let t=i(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function M(e){let t=i(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function fe(e){return e===`TLS`||e===`TCP`?`TCP`:e===`UDP`?`UDP`:e===`TCP_UDP`?`TCP_UDP`:`HTTP`}function pe(e){let t=new Map;for(let n of e){let e=n.AvailabilityZone??`unknown`,r=t.get(e)??[];r.push(n),t.set(e,r)}return[...t.entries()].toSorted((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>({az:e,subnets:t}))}function N(){let e=ee(),{data:t}=r(_),{data:n}=r(te),{data:i}=r(y),{data:N}=r(x),{data:P}=r(v),{data:he}=r(b),F=g(),[I,L]=(0,A.useState)(null),[ge,R]=(0,A.useState)(!1),z=t.Vpcs??[],_e=n.Subnets??[],ve=i.SecurityGroups??[],ye=N.TargetGroups??[],B=P.CertificateSummaryList??[],be=he.SslPolicies??[],xe=C({resolver:T(le),defaultValues:{name:``,type:`application`,scheme:`internet-facing`,vpcId:z[0]?.VpcId??``,subnetIds:[],securityGroupIds:[],tags:[],listener:{protocol:`HTTP`,port:80,targetGroupMode:`new`,existingTargetGroupArn:``,certificateArn:void 0,sslPolicy:void 0}}}),V=C({resolver:T(oe),defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:z[0]?.VpcId??``,healthCheck:{protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tags:[]}}),{handleSubmit:Se,register:H,watch:U,control:W,setValue:G,getValues:K,formState:{errors:q,isSubmitting:Ce}}=xe,J=U(`vpcId`),we=U(`subnetIds`),Te=U(`securityGroupIds`),Y=U(`type`),X=U(`listener.protocol`),Z=U(`listener.targetGroupMode`),Ee=U(`tags`),Q=Y===`network`,De=k(X),Oe=se(Y),ke=Q?[`TCP`,`UDP`,`TLS`,`TCP_UDP`]:[`HTTP`,`HTTPS`],Ae=_e.filter(e=>e.VpcId===J),je=ve.filter(e=>e.VpcId===J),Me=ye.filter(e=>e.VpcId===J),Ne=e=>{let t=fe(e);V.setValue(`protocol`,t),V.setValue(`healthCheck.protocol`,t===`HTTP`?`HTTP`:`TCP`)},Pe=e=>{G(`type`,e);let t=ce(e);G(`listener.protocol`,t),G(`listener.port`,80),G(`listener.certificateArn`,void 0),G(`listener.sslPolicy`,void 0),e===`network`&&G(`securityGroupIds`,[]),Ne(t)},Fe=e=>{G(`listener.protocol`,e);let t=K(`listener.port`);k(e)?(t===80&&G(`listener.port`,443),e===`HTTPS`&&!K(`listener.sslPolicy`)&&G(`listener.sslPolicy`,ue)):(t===443&&G(`listener.port`,80),G(`listener.certificateArn`,void 0),G(`listener.sslPolicy`,void 0)),Ne(e)},Ie=(e=``)=>{let t=e??``;G(`vpcId`,t,{shouldValidate:!0}),G(`subnetIds`,[],{shouldValidate:!0}),G(`securityGroupIds`,[]),G(`listener.existingTargetGroupArn`,``),V.setValue(`vpcId`,t)},Le=e=>{let t=K(`subnetIds`);G(`subnetIds`,t.includes(e)?t.filter(t=>t!==e):[...t,e],{shouldValidate:!0})},Re=e=>{let t=K(`securityGroupIds`);G(`securityGroupIds`,t.includes(e)?t.filter(t=>t!==e):[...t,e])},ze=async t=>{L(null);let n;if(t.listener.targetGroupMode===`new`){if(!await V.trigger())return;n=V.getValues()}let r=await F.mutateAsync({lb:{name:t.name,type:t.type,scheme:t.scheme,vpcId:t.vpcId,subnetIds:t.subnetIds,securityGroupIds:t.securityGroupIds,tags:t.tags},listener:{protocol:t.listener.protocol,port:t.listener.port,targetGroupMode:t.listener.targetGroupMode,existingTargetGroupArn:t.listener.existingTargetGroupArn,certificateArn:t.listener.certificateArn,sslPolicy:t.listener.sslPolicy,newTargetGroup:n}});L(r),!r.error&&r.loadBalancerArn&&e({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(r.loadBalancerArn)}})},$=pe(Ae);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(a,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),(0,j.jsx)(ie,{title:`Create Load Balancer`}),F.error&&(0,j.jsx)(ne,{error:F.error,msg:`Failed to create load balancer`}),I?.error&&(0,j.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,j.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,I.failedStep]}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:I.error.message}),I.created.length>0&&(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources (clean up manually if needed):`}),(0,j.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:I.created.map((e,t)=>(0,j.jsxs)(`li`,{children:[e.type,`: `,e.id??`(created)`]},t))})]})]}),(0,j.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:Se(ze),children:[(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`lb-name`,children:`Name`})}),(0,j.jsx)(S,{"aria-invalid":!!q.name,id:`lb-name`,placeholder:`my-load-balancer`,...H(`name`)}),(0,j.jsx)(D,{errors:[q.name]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Type`}),(0,j.jsx)(w,{control:W,name:`type`,render:({field:e})=>(0,j.jsxs)(`div`,{className:`flex gap-4`,children:[(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Application Load Balancer`,checked:e.value===`application`,name:`lb-type`,onChange:()=>Pe(`application`),type:`radio`}),`Application (ALB)`]}),(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Network Load Balancer`,checked:e.value===`network`,name:`lb-type`,onChange:()=>Pe(`network`),type:`radio`}),`Network (NLB)`]})]})})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Scheme`}),(0,j.jsx)(w,{control:W,name:`scheme`,render:({field:e})=>(0,j.jsxs)(`div`,{className:`flex gap-4`,children:[(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Internet-facing`,checked:e.value===`internet-facing`,name:`scheme`,onChange:()=>e.onChange(`internet-facing`),type:`radio`}),`Internet-facing`]}),(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Internal`,checked:e.value===`internal`,name:`scheme`,onChange:()=>e.onChange(`internal`),type:`radio`}),`Internal`]})]})})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`lb-vpc`,children:`VPC`})}),(0,j.jsx)(w,{control:W,name:`vpcId`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e=>Ie(e),value:e.value??``,children:[(0,j.jsx)(l,{"aria-invalid":!!q.vpcId,className:`w-full`,id:`lb-vpc`,children:(0,j.jsx)(o,{placeholder:`Select VPC`})}),(0,j.jsx)(c,{children:z.map(e=>(0,j.jsx)(s,{value:e.VpcId??``,children:de(e)},e.VpcId))})]})}),(0,j.jsx)(D,{errors:[q.vpcId]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Subnets (select at least 1)`}),$.length===0?(0,j.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,j.jsx)(`div`,{className:`space-y-3`,children:$.map(e=>(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.az}),(0,j.jsx)(`div`,{className:`space-y-1`,children:e.subnets.map(e=>(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Subnet ${M(e)}`,checked:we.includes(e.SubnetId??``),onChange:()=>Le(e.SubnetId??``),type:`checkbox`}),(0,j.jsx)(`span`,{className:`font-mono`,children:M(e)})]},e.SubnetId))})]},e.az))}),(0,j.jsx)(D,{errors:[q.subnetIds]})]}),!Q&&(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Security groups`}),je.length===0?(0,j.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the selected VPC.`}):(0,j.jsx)(`div`,{className:`space-y-1`,children:je.map(e=>(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:Te.includes(e.GroupId??``),onChange:()=>Re(e.GroupId??``),type:`checkbox`}),(0,j.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Tags`}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[Ee.map((e,t)=>(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(S,{placeholder:`Key`,...H(`tags.${t}.key`)}),(0,j.jsx)(S,{placeholder:`Value`,...H(`tags.${t}.value`)}),(0,j.jsx)(m,{onClick:()=>G(`tags`,K(`tags`).filter((e,n)=>n!==t)),size:`icon`,type:`button`,variant:`ghost`,children:(0,j.jsx)(p,{className:`size-3.5`})})]},t)),(0,j.jsxs)(m,{onClick:()=>G(`tags`,[...K(`tags`),{key:``,value:``}]),size:`sm`,type:`button`,variant:`outline`,children:[(0,j.jsx)(d,{className:`size-3.5`}),`Add tag`]})]})]}),(0,j.jsxs)(`div`,{className:`space-y-4 rounded-md border bg-card p-4`,children:[(0,j.jsx)(`h2`,{className:`text-sm font-semibold`,children:`First listener & default target group`}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),(0,j.jsx)(w,{control:W,name:`listener.protocol`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e=>{e&&Fe(e)},value:e.value,children:[(0,j.jsx)(l,{className:`w-full`,id:`listener-protocol`,children:(0,j.jsx)(o,{})}),(0,j.jsx)(c,{children:Oe.map(e=>(0,j.jsx)(s,{value:e,children:e},e))})]})})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),(0,j.jsx)(S,{"aria-invalid":!!q.listener?.port,id:`listener-port`,inputMode:`numeric`,type:`number`,...H(`listener.port`,{valueAsNumber:!0})}),(0,j.jsx)(D,{errors:[q.listener?.port]})]}),De&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,j.jsx)(w,{control:W,name:`listener.certificateArn`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e.onChange,value:e.value??``,children:[(0,j.jsx)(l,{"aria-invalid":!!q.listener?.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,j.jsx)(o,{placeholder:`Select certificate`})}),(0,j.jsx)(c,{children:B.map(e=>(0,j.jsx)(s,{value:e.CertificateArn??``,children:e.DomainName??e.CertificateArn?.split(`/`).pop()},e.CertificateArn))})]})}),(0,j.jsx)(D,{errors:[q.listener?.certificateArn]}),(0,j.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[B.length===0&&(0,j.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,j.jsx)(m,{className:`ml-auto`,onClick:()=>R(!0),size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),X===`HTTPS`&&(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,j.jsx)(w,{control:W,name:`listener.sslPolicy`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e.onChange,value:e.value??`ELBSecurityPolicy-2016-08`,children:[(0,j.jsx)(l,{className:`w-full`,id:`listener-ssl-policy`,children:(0,j.jsx)(o,{})}),(0,j.jsx)(c,{children:be.map(e=>(0,j.jsx)(s,{value:e.Name??``,children:e.Name},e.Name))})]})})]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Default target group`}),(0,j.jsx)(w,{control:W,name:`listener.targetGroupMode`,render:({field:e})=>(0,j.jsxs)(`div`,{className:`flex gap-4`,children:[(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Create new target group`,checked:e.value===`new`,name:`tg-mode`,onChange:()=>e.onChange(`new`),type:`radio`}),`Create new`]}),(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Use existing target group`,checked:e.value===`existing`,name:`tg-mode`,onChange:()=>e.onChange(`existing`),type:`radio`}),`Use existing`]})]})})]}),Z===`existing`&&(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`tg-existing`,children:`Target group`})}),(0,j.jsx)(w,{control:W,name:`listener.existingTargetGroupArn`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e.onChange,value:e.value??``,children:[(0,j.jsx)(l,{"aria-invalid":!!q.listener?.existingTargetGroupArn,className:`w-full`,id:`tg-existing`,children:(0,j.jsx)(o,{placeholder:`Select target group`})}),(0,j.jsx)(c,{children:Me.map(e=>(0,j.jsxs)(s,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn))})]})}),(0,j.jsx)(D,{errors:[q.listener?.existingTargetGroupArn]}),Me.length===0&&(0,j.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups in this VPC. Choose “Create new” instead.`})]}),Z===`new`&&(0,j.jsx)(`div`,{className:`space-y-4 border-l-2 border-muted pl-4`,children:(0,j.jsx)(ae,{allowedProtocols:ke,form:V,vpcs:z})})]}),(0,j.jsx)(h,{onImported:e=>G(`listener.certificateArn`,e,{shouldValidate:!0}),onOpenChange:R,open:ge}),(0,j.jsx)(f,{commands:me(U,V.watch)}),(0,j.jsx)(re,{isPending:F.isPending,isSubmitting:Ce,onCancel:async()=>await e({to:`/ec2/describe-load-balancers`}),pendingLabel:`Creating…`,submitLabel:`Create Load Balancer`})]})]})}function me(e,t){let n=t=>{let n=e(t);return typeof n==`string`?n:``},r=t=>{let n=e(t);return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]},i=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},a=n(`name`)||``,o=n(`type`)||`application`,s=n(`scheme`)||`internet-facing`,c=r(`subnetIds`),l=r(`securityGroupIds`),u=n(`listener.protocol`)||`HTTP`,d=i(`listener.port`)??80,f=n(`listener.certificateArn`),p=n(`listener.sslPolicy`),m=n(`listener.targetGroupMode`),h=n(`listener.existingTargetGroupArn`),g=[],_={type:`comment`,value:o===`network`?`# Create NLB with listener and default target group +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Ut as i}from"./auth.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as c,s as l,t as u}from"./select.js";import{t as d}from"./plus.js";import{t as f}from"./cli-command-panel.js";import{t as p}from"./trash-2.js";import{t as m}from"./button.js";import{t as h}from"./certificate-import-dialog.js";import{n as g}from"./elbv2.js";import{H as _,Qr as v,X as y,Zt as b,et as x,nr as S,qt as ee,tn as te}from"./index.js";import{i as C,n as w,t as T}from"./zod.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as ie}from"./page-heading.js";import{a as E,r as D,t as O}from"./field.js";import{t as ae}from"./target-group-form.js";import{a as oe,c as se,o as ce,r as le,s as k,t as ue}from"./elbv22.js";var A=t(n(),1),j=e();function de(e){let t=i(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function M(e){let t=i(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function fe(e){return e===`TLS`||e===`TCP`?`TCP`:e===`UDP`?`UDP`:e===`TCP_UDP`?`TCP_UDP`:`HTTP`}function pe(e){let t=new Map;for(let n of e){let e=n.AvailabilityZone??`unknown`,r=t.get(e)??[];r.push(n),t.set(e,r)}return[...t.entries()].toSorted((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>({az:e,subnets:t}))}function N(){let e=v(),{data:t}=r(te),{data:n}=r(b),{data:i}=r(ee),{data:N}=r(x),{data:P}=r(_),{data:he}=r(y),F=g(),[I,L]=(0,A.useState)(null),[ge,R]=(0,A.useState)(!1),z=t.Vpcs??[],_e=n.Subnets??[],ve=i.SecurityGroups??[],ye=N.TargetGroups??[],B=P.CertificateSummaryList??[],be=he.SslPolicies??[],xe=C({resolver:T(le),defaultValues:{name:``,type:`application`,scheme:`internet-facing`,vpcId:z[0]?.VpcId??``,subnetIds:[],securityGroupIds:[],tags:[],listener:{protocol:`HTTP`,port:80,targetGroupMode:`new`,existingTargetGroupArn:``,certificateArn:void 0,sslPolicy:void 0}}}),V=C({resolver:T(oe),defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:z[0]?.VpcId??``,healthCheck:{protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tags:[]}}),{handleSubmit:Se,register:H,watch:U,control:W,setValue:G,getValues:K,formState:{errors:q,isSubmitting:Ce}}=xe,J=U(`vpcId`),we=U(`subnetIds`),Te=U(`securityGroupIds`),Y=U(`type`),X=U(`listener.protocol`),Z=U(`listener.targetGroupMode`),Ee=U(`tags`),Q=Y===`network`,De=k(X),Oe=se(Y),ke=Q?[`TCP`,`UDP`,`TLS`,`TCP_UDP`]:[`HTTP`,`HTTPS`],Ae=_e.filter(e=>e.VpcId===J),je=ve.filter(e=>e.VpcId===J),Me=ye.filter(e=>e.VpcId===J),Ne=e=>{let t=fe(e);V.setValue(`protocol`,t),V.setValue(`healthCheck.protocol`,t===`HTTP`?`HTTP`:`TCP`)},Pe=e=>{G(`type`,e);let t=ce(e);G(`listener.protocol`,t),G(`listener.port`,80),G(`listener.certificateArn`,void 0),G(`listener.sslPolicy`,void 0),e===`network`&&G(`securityGroupIds`,[]),Ne(t)},Fe=e=>{G(`listener.protocol`,e);let t=K(`listener.port`);k(e)?(t===80&&G(`listener.port`,443),e===`HTTPS`&&!K(`listener.sslPolicy`)&&G(`listener.sslPolicy`,ue)):(t===443&&G(`listener.port`,80),G(`listener.certificateArn`,void 0),G(`listener.sslPolicy`,void 0)),Ne(e)},Ie=(e=``)=>{let t=e??``;G(`vpcId`,t,{shouldValidate:!0}),G(`subnetIds`,[],{shouldValidate:!0}),G(`securityGroupIds`,[]),G(`listener.existingTargetGroupArn`,``),V.setValue(`vpcId`,t)},Le=e=>{let t=K(`subnetIds`);G(`subnetIds`,t.includes(e)?t.filter(t=>t!==e):[...t,e],{shouldValidate:!0})},Re=e=>{let t=K(`securityGroupIds`);G(`securityGroupIds`,t.includes(e)?t.filter(t=>t!==e):[...t,e])},ze=async t=>{L(null);let n;if(t.listener.targetGroupMode===`new`){if(!await V.trigger())return;n=V.getValues()}let r=await F.mutateAsync({lb:{name:t.name,type:t.type,scheme:t.scheme,vpcId:t.vpcId,subnetIds:t.subnetIds,securityGroupIds:t.securityGroupIds,tags:t.tags},listener:{protocol:t.listener.protocol,port:t.listener.port,targetGroupMode:t.listener.targetGroupMode,existingTargetGroupArn:t.listener.existingTargetGroupArn,certificateArn:t.listener.certificateArn,sslPolicy:t.listener.sslPolicy,newTargetGroup:n}});L(r),!r.error&&r.loadBalancerArn&&e({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(r.loadBalancerArn)}})},$=pe(Ae);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(a,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),(0,j.jsx)(ie,{title:`Create Load Balancer`}),F.error&&(0,j.jsx)(ne,{error:F.error,msg:`Failed to create load balancer`}),I?.error&&(0,j.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,j.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,I.failedStep]}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:I.error.message}),I.created.length>0&&(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources (clean up manually if needed):`}),(0,j.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:I.created.map((e,t)=>(0,j.jsxs)(`li`,{children:[e.type,`: `,e.id??`(created)`]},t))})]})]}),(0,j.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:Se(ze),children:[(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`lb-name`,children:`Name`})}),(0,j.jsx)(S,{"aria-invalid":!!q.name,id:`lb-name`,placeholder:`my-load-balancer`,...H(`name`)}),(0,j.jsx)(D,{errors:[q.name]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Type`}),(0,j.jsx)(w,{control:W,name:`type`,render:({field:e})=>(0,j.jsxs)(`div`,{className:`flex gap-4`,children:[(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Application Load Balancer`,checked:e.value===`application`,name:`lb-type`,onChange:()=>Pe(`application`),type:`radio`}),`Application (ALB)`]}),(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Network Load Balancer`,checked:e.value===`network`,name:`lb-type`,onChange:()=>Pe(`network`),type:`radio`}),`Network (NLB)`]})]})})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Scheme`}),(0,j.jsx)(w,{control:W,name:`scheme`,render:({field:e})=>(0,j.jsxs)(`div`,{className:`flex gap-4`,children:[(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Internet-facing`,checked:e.value===`internet-facing`,name:`scheme`,onChange:()=>e.onChange(`internet-facing`),type:`radio`}),`Internet-facing`]}),(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Internal`,checked:e.value===`internal`,name:`scheme`,onChange:()=>e.onChange(`internal`),type:`radio`}),`Internal`]})]})})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`lb-vpc`,children:`VPC`})}),(0,j.jsx)(w,{control:W,name:`vpcId`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e=>Ie(e),value:e.value??``,children:[(0,j.jsx)(l,{"aria-invalid":!!q.vpcId,className:`w-full`,id:`lb-vpc`,children:(0,j.jsx)(o,{placeholder:`Select VPC`})}),(0,j.jsx)(c,{children:z.map(e=>(0,j.jsx)(s,{value:e.VpcId??``,children:de(e)},e.VpcId))})]})}),(0,j.jsx)(D,{errors:[q.vpcId]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Subnets (select at least 1)`}),$.length===0?(0,j.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,j.jsx)(`div`,{className:`space-y-3`,children:$.map(e=>(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.az}),(0,j.jsx)(`div`,{className:`space-y-1`,children:e.subnets.map(e=>(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Subnet ${M(e)}`,checked:we.includes(e.SubnetId??``),onChange:()=>Le(e.SubnetId??``),type:`checkbox`}),(0,j.jsx)(`span`,{className:`font-mono`,children:M(e)})]},e.SubnetId))})]},e.az))}),(0,j.jsx)(D,{errors:[q.subnetIds]})]}),!Q&&(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Security groups`}),je.length===0?(0,j.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the selected VPC.`}):(0,j.jsx)(`div`,{className:`space-y-1`,children:je.map(e=>(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:Te.includes(e.GroupId??``),onChange:()=>Re(e.GroupId??``),type:`checkbox`}),(0,j.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Tags`}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[Ee.map((e,t)=>(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(S,{placeholder:`Key`,...H(`tags.${t}.key`)}),(0,j.jsx)(S,{placeholder:`Value`,...H(`tags.${t}.value`)}),(0,j.jsx)(m,{onClick:()=>G(`tags`,K(`tags`).filter((e,n)=>n!==t)),size:`icon`,type:`button`,variant:`ghost`,children:(0,j.jsx)(p,{className:`size-3.5`})})]},t)),(0,j.jsxs)(m,{onClick:()=>G(`tags`,[...K(`tags`),{key:``,value:``}]),size:`sm`,type:`button`,variant:`outline`,children:[(0,j.jsx)(d,{className:`size-3.5`}),`Add tag`]})]})]}),(0,j.jsxs)(`div`,{className:`space-y-4 rounded-md border bg-card p-4`,children:[(0,j.jsx)(`h2`,{className:`text-sm font-semibold`,children:`First listener & default target group`}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),(0,j.jsx)(w,{control:W,name:`listener.protocol`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e=>{e&&Fe(e)},value:e.value,children:[(0,j.jsx)(l,{className:`w-full`,id:`listener-protocol`,children:(0,j.jsx)(o,{})}),(0,j.jsx)(c,{children:Oe.map(e=>(0,j.jsx)(s,{value:e,children:e},e))})]})})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),(0,j.jsx)(S,{"aria-invalid":!!q.listener?.port,id:`listener-port`,inputMode:`numeric`,type:`number`,...H(`listener.port`,{valueAsNumber:!0})}),(0,j.jsx)(D,{errors:[q.listener?.port]})]}),De&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,j.jsx)(w,{control:W,name:`listener.certificateArn`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e.onChange,value:e.value??``,children:[(0,j.jsx)(l,{"aria-invalid":!!q.listener?.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,j.jsx)(o,{placeholder:`Select certificate`})}),(0,j.jsx)(c,{children:B.map(e=>(0,j.jsx)(s,{value:e.CertificateArn??``,children:e.DomainName??e.CertificateArn?.split(`/`).pop()},e.CertificateArn))})]})}),(0,j.jsx)(D,{errors:[q.listener?.certificateArn]}),(0,j.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[B.length===0&&(0,j.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,j.jsx)(m,{className:`ml-auto`,onClick:()=>R(!0),size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),X===`HTTPS`&&(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,j.jsx)(w,{control:W,name:`listener.sslPolicy`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e.onChange,value:e.value??`ELBSecurityPolicy-2016-08`,children:[(0,j.jsx)(l,{className:`w-full`,id:`listener-ssl-policy`,children:(0,j.jsx)(o,{})}),(0,j.jsx)(c,{children:be.map(e=>(0,j.jsx)(s,{value:e.Name??``,children:e.Name},e.Name))})]})})]})]}),(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:`Default target group`}),(0,j.jsx)(w,{control:W,name:`listener.targetGroupMode`,render:({field:e})=>(0,j.jsxs)(`div`,{className:`flex gap-4`,children:[(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Create new target group`,checked:e.value===`new`,name:`tg-mode`,onChange:()=>e.onChange(`new`),type:`radio`}),`Create new`]}),(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Use existing target group`,checked:e.value===`existing`,name:`tg-mode`,onChange:()=>e.onChange(`existing`),type:`radio`}),`Use existing`]})]})})]}),Z===`existing`&&(0,j.jsxs)(O,{children:[(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`tg-existing`,children:`Target group`})}),(0,j.jsx)(w,{control:W,name:`listener.existingTargetGroupArn`,render:({field:e})=>(0,j.jsxs)(u,{onValueChange:e.onChange,value:e.value??``,children:[(0,j.jsx)(l,{"aria-invalid":!!q.listener?.existingTargetGroupArn,className:`w-full`,id:`tg-existing`,children:(0,j.jsx)(o,{placeholder:`Select target group`})}),(0,j.jsx)(c,{children:Me.map(e=>(0,j.jsxs)(s,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn))})]})}),(0,j.jsx)(D,{errors:[q.listener?.existingTargetGroupArn]}),Me.length===0&&(0,j.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups in this VPC. Choose “Create new” instead.`})]}),Z===`new`&&(0,j.jsx)(`div`,{className:`space-y-4 border-l-2 border-muted pl-4`,children:(0,j.jsx)(ae,{allowedProtocols:ke,form:V,vpcs:z})})]}),(0,j.jsx)(h,{onImported:e=>G(`listener.certificateArn`,e,{shouldValidate:!0}),onOpenChange:R,open:ge}),(0,j.jsx)(f,{commands:me(U,V.watch)}),(0,j.jsx)(re,{isPending:F.isPending,isSubmitting:Ce,onCancel:async()=>await e({to:`/ec2/describe-load-balancers`}),pendingLabel:`Creating…`,submitLabel:`Create Load Balancer`})]})]})}function me(e,t){let n=t=>{let n=e(t);return typeof n==`string`?n:``},r=t=>{let n=e(t);return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]},i=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},a=n(`name`)||``,o=n(`type`)||`application`,s=n(`scheme`)||`internet-facing`,c=r(`subnetIds`),l=r(`securityGroupIds`),u=n(`listener.protocol`)||`HTTP`,d=i(`listener.port`)??80,f=n(`listener.certificateArn`),p=n(`listener.sslPolicy`),m=n(`listener.targetGroupMode`),h=n(`listener.existingTargetGroupArn`),g=[],_={type:`comment`,value:o===`network`?`# Create NLB with listener and default target group `:`# Create ALB with listener and default target group diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-nat-gateway.js b/spinifex/services/spinifexui/frontend/dist/assets/create-nat-gateway.js index b0b8c46b3..05eb25b82 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-nat-gateway.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-nat-gateway.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as ee,s as c,t as te}from"./select.js";import{t as ne}from"./cli-command-panel.js";import{m as re}from"./ec2.js";import{Tt as ie,Xr as ae,Yt as oe,er as se}from"./index.js";import{a as ce,i as le,n as ue,t as de}from"./zod.js";import{t as fe}from"./error-banner.js";import{t as pe}from"./form-actions.js";import{t as me}from"./page-heading.js";import{a as l,r as he,t as u}from"./field.js";import{s as ge}from"./ec22.js";var _e=t(),d=e();function f(){let e=(0,_e.c)(70),t=ae(),{data:i}=n(oe),{data:s}=n(ie),f=re(),p;e[0]===i.Subnets?p=e[1]:(p=i.Subnets??[],e[0]=i.Subnets,e[1]=p);let m=p,h;e[2]===m?h=e[3]:(h=m.filter(xe),e[2]=m,e[3]=h);let Ce=h,g=Ce.length>0?Ce:m,_;e[4]===s.Addresses?_=e[5]:(_=s.Addresses??[],e[4]=s.Addresses,e[5]=_);let v;e[6]===_?v=e[7]:(v=_.filter(be),e[6]=_,e[7]=v);let y=v,b;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:de(ge),defaultValues:{subnetId:``,allocationId:``,name:``}},e[8]=b):b=e[8];let{control:x,handleSubmit:S,register:C,formState:we}=le(b),{errors:w,isSubmitting:T}=we,E;e[9]===x?E=e[10]:(E={control:x},e[9]=x,e[10]=E);let D=ce(E),O;e[11]===D?O=e[12]:(O=e=>e?D[e]:void 0,e[11]=D,e[12]=O);let k=O,A;e[13]!==f||e[14]!==t?(A=async e=>{let n=(await f.mutateAsync({subnetId:e.subnetId,allocationId:e.allocationId,name:e.name?.trim()??void 0})).NatGateway?.NatGatewayId;t(n?{to:`/ec2/describe-nat-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-nat-gateways`})},e[13]=f,e[14]=t,e[15]=A):A=e[15];let j=A,M,N;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,d.jsx)(a,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),M=(0,d.jsx)(me,{title:`Create NAT Gateway`}),e[16]=M,e[17]=N):(M=e[16],N=e[17]);let P;e[18]===f.error?P=e[19]:(P=f.error&&(0,d.jsx)(fe,{error:f.error,msg:`Failed to create NAT Gateway`}),e[18]=f.error,e[19]=P);let F;e[20]!==S||e[21]!==j?(F=S(j),e[20]=S,e[21]=j,e[22]=F):F=e[22];let I;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[23]=I):I=e[23];let L;e[24]===C?L=e[25]:(L=C(`name`),e[24]=C,e[25]=L);let R;e[26]===L?R=e[27]:(R=(0,d.jsxs)(u,{children:[I,(0,d.jsx)(se,{id:`name`,placeholder:`my-nat-gateway`,...L})]}),e[26]=L,e[27]=R);let z;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`subnetId`,children:`Public subnet`})}),e[28]=z):z=e[28];let B;e[29]!==w.subnetId||e[30]!==g?(B=e=>{let{field:t}=e;return(0,d.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,d.jsx)(c,{"aria-invalid":!!w.subnetId,className:`w-full`,id:`subnetId`,children:(0,d.jsx)(o,{placeholder:`Select a public subnet`})}),(0,d.jsx)(ee,{children:g.map(ye)})]})},e[29]=w.subnetId,e[30]=g,e[31]=B):B=e[31];let V;e[32]!==x||e[33]!==B?(V=(0,d.jsx)(ue,{control:x,name:`subnetId`,render:B}),e[32]=x,e[33]=B,e[34]=V):V=e[34];let H;e[35]===w.subnetId?H=e[36]:(H=(0,d.jsx)(he,{errors:[w.subnetId]}),e[35]=w.subnetId,e[36]=H);let U;e[37]!==V||e[38]!==H?(U=(0,d.jsxs)(u,{children:[z,V,H]}),e[37]=V,e[38]=H,e[39]=U):U=e[39];let W;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`allocationId`,children:`Elastic IP`})}),e[40]=W):W=e[40];let G;e[41]!==y||e[42]!==x||e[43]!==w.allocationId?(G=y.length>0?(0,d.jsx)(ue,{control:x,name:`allocationId`,render:e=>{let{field:t}=e;return(0,d.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,d.jsx)(c,{"aria-invalid":!!w.allocationId,className:`w-full`,id:`allocationId`,children:(0,d.jsx)(o,{placeholder:`Select an Elastic IP`})}),(0,d.jsx)(ee,{children:y.map(ve)})]})}}):(0,d.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No available Elastic IPs.`,` `,(0,d.jsx)(r,{className:`text-primary hover:underline`,to:`/ec2/allocate-address`,children:`Allocate one`}),` `,`first.`]}),e[41]=y,e[42]=x,e[43]=w.allocationId,e[44]=G):G=e[44];let K;e[45]===w.allocationId?K=e[46]:(K=(0,d.jsx)(he,{errors:[w.allocationId]}),e[45]=w.allocationId,e[46]=K);let q;e[47]!==G||e[48]!==K?(q=(0,d.jsxs)(u,{children:[W,G,K]}),e[47]=G,e[48]=K,e[49]=q):q=e[49];let J;e[50]===k?J=e[51]:(J=Se(k),e[50]=k,e[51]=J);let Y;e[52]===J?Y=e[53]:(Y=(0,d.jsx)(ne,{commands:J}),e[52]=J,e[53]=Y);let X;e[54]===t?X=e[55]:(X=async()=>await t({to:`/ec2/describe-nat-gateways`}),e[54]=t,e[55]=X);let Z;e[56]!==f.isPending||e[57]!==T||e[58]!==X?(Z=(0,d.jsx)(pe,{isPending:f.isPending,isSubmitting:T,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create NAT Gateway`}),e[56]=f.isPending,e[57]=T,e[58]=X,e[59]=Z):Z=e[59];let Q;e[60]!==F||e[61]!==R||e[62]!==U||e[63]!==q||e[64]!==Y||e[65]!==Z?(Q=(0,d.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[R,U,q,Y,Z]}),e[60]=F,e[61]=R,e[62]=U,e[63]=q,e[64]=Y,e[65]=Z,e[66]=Q):Q=e[66];let $;return e[67]!==P||e[68]!==Q?($=(0,d.jsxs)(d.Fragment,{children:[N,M,P,Q]}),e[67]=P,e[68]=Q,e[69]=$):$=e[69],$}function ve(e){return(0,d.jsx)(s,{value:e.AllocationId??``,children:`${e.AllocationId} (${e.PublicIp})`},e.AllocationId)}function ye(e){let t=i(e.Tags);return(0,d.jsx)(s,{value:e.SubnetId??``,children:t?`${e.SubnetId} (${t})`:`${e.SubnetId} (${e.CidrBlock})`},e.SubnetId)}function be(e){return!e.AssociationId}function xe(e){return e.MapPublicIpOnLaunch}function Se(e){let t=e(`subnetId`),n=typeof t==`string`?t:``,r=e(`allocationId`),i=typeof r==`string`?r:``,a=e(`name`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-nat-gateway`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as ee,s as c,t as te}from"./select.js";import{t as ne}from"./cli-command-panel.js";import{m as re}from"./ec2.js";import{Dt as ie,Qr as ae,Zt as oe,nr as se}from"./index.js";import{a as ce,i as le,n as ue,t as de}from"./zod.js";import{t as fe}from"./error-banner.js";import{t as pe}from"./form-actions.js";import{t as me}from"./page-heading.js";import{a as l,r as he,t as u}from"./field.js";import{s as ge}from"./ec22.js";var _e=t(),d=e();function f(){let e=(0,_e.c)(70),t=ae(),{data:i}=n(oe),{data:s}=n(ie),f=re(),p;e[0]===i.Subnets?p=e[1]:(p=i.Subnets??[],e[0]=i.Subnets,e[1]=p);let m=p,h;e[2]===m?h=e[3]:(h=m.filter(xe),e[2]=m,e[3]=h);let Ce=h,g=Ce.length>0?Ce:m,_;e[4]===s.Addresses?_=e[5]:(_=s.Addresses??[],e[4]=s.Addresses,e[5]=_);let v;e[6]===_?v=e[7]:(v=_.filter(be),e[6]=_,e[7]=v);let y=v,b;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:de(ge),defaultValues:{subnetId:``,allocationId:``,name:``}},e[8]=b):b=e[8];let{control:x,handleSubmit:S,register:C,formState:we}=le(b),{errors:w,isSubmitting:T}=we,E;e[9]===x?E=e[10]:(E={control:x},e[9]=x,e[10]=E);let D=ce(E),O;e[11]===D?O=e[12]:(O=e=>e?D[e]:void 0,e[11]=D,e[12]=O);let k=O,A;e[13]!==f||e[14]!==t?(A=async e=>{let n=(await f.mutateAsync({subnetId:e.subnetId,allocationId:e.allocationId,name:e.name?.trim()??void 0})).NatGateway?.NatGatewayId;t(n?{to:`/ec2/describe-nat-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-nat-gateways`})},e[13]=f,e[14]=t,e[15]=A):A=e[15];let j=A,M,N;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,d.jsx)(a,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),M=(0,d.jsx)(me,{title:`Create NAT Gateway`}),e[16]=M,e[17]=N):(M=e[16],N=e[17]);let P;e[18]===f.error?P=e[19]:(P=f.error&&(0,d.jsx)(fe,{error:f.error,msg:`Failed to create NAT Gateway`}),e[18]=f.error,e[19]=P);let F;e[20]!==S||e[21]!==j?(F=S(j),e[20]=S,e[21]=j,e[22]=F):F=e[22];let I;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[23]=I):I=e[23];let L;e[24]===C?L=e[25]:(L=C(`name`),e[24]=C,e[25]=L);let R;e[26]===L?R=e[27]:(R=(0,d.jsxs)(u,{children:[I,(0,d.jsx)(se,{id:`name`,placeholder:`my-nat-gateway`,...L})]}),e[26]=L,e[27]=R);let z;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`subnetId`,children:`Public subnet`})}),e[28]=z):z=e[28];let B;e[29]!==w.subnetId||e[30]!==g?(B=e=>{let{field:t}=e;return(0,d.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,d.jsx)(c,{"aria-invalid":!!w.subnetId,className:`w-full`,id:`subnetId`,children:(0,d.jsx)(o,{placeholder:`Select a public subnet`})}),(0,d.jsx)(ee,{children:g.map(ye)})]})},e[29]=w.subnetId,e[30]=g,e[31]=B):B=e[31];let V;e[32]!==x||e[33]!==B?(V=(0,d.jsx)(ue,{control:x,name:`subnetId`,render:B}),e[32]=x,e[33]=B,e[34]=V):V=e[34];let H;e[35]===w.subnetId?H=e[36]:(H=(0,d.jsx)(he,{errors:[w.subnetId]}),e[35]=w.subnetId,e[36]=H);let U;e[37]!==V||e[38]!==H?(U=(0,d.jsxs)(u,{children:[z,V,H]}),e[37]=V,e[38]=H,e[39]=U):U=e[39];let W;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`allocationId`,children:`Elastic IP`})}),e[40]=W):W=e[40];let G;e[41]!==y||e[42]!==x||e[43]!==w.allocationId?(G=y.length>0?(0,d.jsx)(ue,{control:x,name:`allocationId`,render:e=>{let{field:t}=e;return(0,d.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,d.jsx)(c,{"aria-invalid":!!w.allocationId,className:`w-full`,id:`allocationId`,children:(0,d.jsx)(o,{placeholder:`Select an Elastic IP`})}),(0,d.jsx)(ee,{children:y.map(ve)})]})}}):(0,d.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No available Elastic IPs.`,` `,(0,d.jsx)(r,{className:`text-primary hover:underline`,to:`/ec2/allocate-address`,children:`Allocate one`}),` `,`first.`]}),e[41]=y,e[42]=x,e[43]=w.allocationId,e[44]=G):G=e[44];let K;e[45]===w.allocationId?K=e[46]:(K=(0,d.jsx)(he,{errors:[w.allocationId]}),e[45]=w.allocationId,e[46]=K);let q;e[47]!==G||e[48]!==K?(q=(0,d.jsxs)(u,{children:[W,G,K]}),e[47]=G,e[48]=K,e[49]=q):q=e[49];let J;e[50]===k?J=e[51]:(J=Se(k),e[50]=k,e[51]=J);let Y;e[52]===J?Y=e[53]:(Y=(0,d.jsx)(ne,{commands:J}),e[52]=J,e[53]=Y);let X;e[54]===t?X=e[55]:(X=async()=>await t({to:`/ec2/describe-nat-gateways`}),e[54]=t,e[55]=X);let Z;e[56]!==f.isPending||e[57]!==T||e[58]!==X?(Z=(0,d.jsx)(pe,{isPending:f.isPending,isSubmitting:T,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create NAT Gateway`}),e[56]=f.isPending,e[57]=T,e[58]=X,e[59]=Z):Z=e[59];let Q;e[60]!==F||e[61]!==R||e[62]!==U||e[63]!==q||e[64]!==Y||e[65]!==Z?(Q=(0,d.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[R,U,q,Y,Z]}),e[60]=F,e[61]=R,e[62]=U,e[63]=q,e[64]=Y,e[65]=Z,e[66]=Q):Q=e[66];let $;return e[67]!==P||e[68]!==Q?($=(0,d.jsxs)(d.Fragment,{children:[N,M,P,Q]}),e[67]=P,e[68]=Q,e[69]=$):$=e[69],$}function ve(e){return(0,d.jsx)(s,{value:e.AllocationId??``,children:`${e.AllocationId} (${e.PublicIp})`},e.AllocationId)}function ye(e){let t=i(e.Tags);return(0,d.jsx)(s,{value:e.SubnetId??``,children:t?`${e.SubnetId} (${t})`:`${e.SubnetId} (${e.CidrBlock})`},e.SubnetId)}function be(e){return!e.AssociationId}function xe(e){return e.MapPublicIpOnLaunch}function Se(e){let t=e(`subnetId`),n=typeof t==`string`?t:``,r=e(`allocationId`),i=typeof r==`string`?r:``,a=e(`name`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-nat-gateway`},{type:`flag`,value:` \\ --subnet-id`},{type:`value`,value:` ${n||``}`},{type:`flag`,value:` \\ --allocation-id`},{type:`value`,value:` ${i||``}`}];return o.trim()&&s.push({type:`flag`,value:` \\ --tag-specifications`},{type:`value`,value:` 'ResourceType=natgateway,Tags=[{Key=Name,Value=${o.trim()}}]'`}),[{label:`Create NAT Gateway`,parts:s}]}export{f as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-placement-group.js b/spinifex/services/spinifexui/frontend/dist/assets/create-placement-group.js index 2a57f80a6..ae3036599 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-placement-group.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-placement-group.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as ee,t as o}from"./select.js";import{t as te}from"./cli-command-panel.js";import{h as ne}from"./ec2.js";import{Xr as s,er as c}from"./index.js";import{a as l,i as u,n as d,t as f}from"./zod.js";import{t as p}from"./error-banner.js";import{t as m}from"./form-actions.js";import{t as h}from"./page-heading.js";import{a as g,r as _,t as v}from"./field.js";import{c as re}from"./ec22.js";var ie=t(),y=e();function b(){let e=(0,ie.c)(56),t=s(),b=ne(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:f(re),defaultValues:{groupName:``,strategy:`spread`}},e[0]=x):x=e[0];let{control:S,handleSubmit:C,register:w,formState:oe}=u(x),{errors:T,isSubmitting:E}=oe,D;e[1]===S?D=e[2]:(D={control:S},e[1]=S,e[2]=D);let O=l(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==b||e[6]!==t?(j=async e=>{t({to:`/ec2/describe-placement-groups/$id`,params:{id:(await b.mutateAsync(e)).PlacementGroup?.GroupId??``}})},e[5]=b,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,y.jsx)(h,{title:`Create Placement Group`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===b.error?F=e[11]:(F=b.error&&(0,y.jsx)(p,{error:b.error,msg:`Failed to create placement group`}),e[10]=b.error,e[11]=F);let I;e[12]!==C||e[13]!==M?(I=C(M),e[12]=C,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,y.jsx)(g,{children:(0,y.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[15]=L):L=e[15];let R=!!T.groupName,z;e[16]===w?z=e[17]:(z=w(`groupName`),e[16]=w,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,y.jsx)(c,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.groupName?V=e[22]:(V=(0,y.jsx)(_,{errors:[T.groupName]}),e[21]=T.groupName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,y.jsxs)(v,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,y.jsx)(g,{children:(0,y.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),e[26]=U):U=e[26];let W;e[27]===T.strategy?W=e[28]:(W=e=>{let{field:t}=e;return(0,y.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(ee,{"aria-invalid":!!T.strategy,className:`w-full`,id:`strategy`,children:(0,y.jsx)(r,{})}),(0,y.jsxs)(a,{children:[(0,y.jsx)(i,{value:`spread`,children:`spread`}),(0,y.jsx)(i,{value:`cluster`,children:`cluster`})]})]})},e[27]=T.strategy,e[28]=W);let G;e[29]!==S||e[30]!==W?(G=(0,y.jsx)(d,{control:S,name:`strategy`,render:W}),e[29]=S,e[30]=W,e[31]=G):G=e[31];let K;e[32]===T.strategy?K=e[33]:(K=(0,y.jsx)(_,{errors:[T.strategy]}),e[32]=T.strategy,e[33]=K);let q;e[34]!==G||e[35]!==K?(q=(0,y.jsxs)(v,{children:[U,G,K]}),e[34]=G,e[35]=K,e[36]=q):q=e[36];let J;e[37]===A?J=e[38]:(J=ae(A),e[37]=A,e[38]=J);let Y;e[39]===J?Y=e[40]:(Y=(0,y.jsx)(te,{commands:J}),e[39]=J,e[40]=Y);let X;e[41]===t?X=e[42]:(X=async()=>await t({to:`/ec2/describe-placement-groups`}),e[41]=t,e[42]=X);let Z;e[43]!==b.isPending||e[44]!==E||e[45]!==X?(Z=(0,y.jsx)(m,{isPending:b.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),e[43]=b.isPending,e[44]=E,e[45]=X,e[46]=Z):Z=e[46];let Q;e[47]!==H||e[48]!==q||e[49]!==Y||e[50]!==Z||e[51]!==I?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[47]=H,e[48]=q,e[49]=Y,e[50]=Z,e[51]=I,e[52]=Q):Q=e[52];let $;return e[53]!==Q||e[54]!==F?($=(0,y.jsxs)(y.Fragment,{children:[N,P,F,Q]}),e[53]=Q,e[54]=F,e[55]=$):$=e[55],$}function x(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ae(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`strategy`),i=typeof r==`string`?r:``;return[{label:`Create Placement Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-placement-group`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as ee,t as o}from"./select.js";import{t as te}from"./cli-command-panel.js";import{h as ne}from"./ec2.js";import{Qr as s,nr as c}from"./index.js";import{a as l,i as u,n as d,t as f}from"./zod.js";import{t as p}from"./error-banner.js";import{t as m}from"./form-actions.js";import{t as h}from"./page-heading.js";import{a as g,r as _,t as v}from"./field.js";import{c as re}from"./ec22.js";var ie=t(),y=e();function b(){let e=(0,ie.c)(56),t=s(),b=ne(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:f(re),defaultValues:{groupName:``,strategy:`spread`}},e[0]=x):x=e[0];let{control:S,handleSubmit:C,register:w,formState:oe}=u(x),{errors:T,isSubmitting:E}=oe,D;e[1]===S?D=e[2]:(D={control:S},e[1]=S,e[2]=D);let O=l(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==b||e[6]!==t?(j=async e=>{t({to:`/ec2/describe-placement-groups/$id`,params:{id:(await b.mutateAsync(e)).PlacementGroup?.GroupId??``}})},e[5]=b,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,y.jsx)(h,{title:`Create Placement Group`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===b.error?F=e[11]:(F=b.error&&(0,y.jsx)(p,{error:b.error,msg:`Failed to create placement group`}),e[10]=b.error,e[11]=F);let I;e[12]!==C||e[13]!==M?(I=C(M),e[12]=C,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,y.jsx)(g,{children:(0,y.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[15]=L):L=e[15];let R=!!T.groupName,z;e[16]===w?z=e[17]:(z=w(`groupName`),e[16]=w,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,y.jsx)(c,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.groupName?V=e[22]:(V=(0,y.jsx)(_,{errors:[T.groupName]}),e[21]=T.groupName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,y.jsxs)(v,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,y.jsx)(g,{children:(0,y.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),e[26]=U):U=e[26];let W;e[27]===T.strategy?W=e[28]:(W=e=>{let{field:t}=e;return(0,y.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(ee,{"aria-invalid":!!T.strategy,className:`w-full`,id:`strategy`,children:(0,y.jsx)(r,{})}),(0,y.jsxs)(a,{children:[(0,y.jsx)(i,{value:`spread`,children:`spread`}),(0,y.jsx)(i,{value:`cluster`,children:`cluster`})]})]})},e[27]=T.strategy,e[28]=W);let G;e[29]!==S||e[30]!==W?(G=(0,y.jsx)(d,{control:S,name:`strategy`,render:W}),e[29]=S,e[30]=W,e[31]=G):G=e[31];let K;e[32]===T.strategy?K=e[33]:(K=(0,y.jsx)(_,{errors:[T.strategy]}),e[32]=T.strategy,e[33]=K);let q;e[34]!==G||e[35]!==K?(q=(0,y.jsxs)(v,{children:[U,G,K]}),e[34]=G,e[35]=K,e[36]=q):q=e[36];let J;e[37]===A?J=e[38]:(J=ae(A),e[37]=A,e[38]=J);let Y;e[39]===J?Y=e[40]:(Y=(0,y.jsx)(te,{commands:J}),e[39]=J,e[40]=Y);let X;e[41]===t?X=e[42]:(X=async()=>await t({to:`/ec2/describe-placement-groups`}),e[41]=t,e[42]=X);let Z;e[43]!==b.isPending||e[44]!==E||e[45]!==X?(Z=(0,y.jsx)(m,{isPending:b.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),e[43]=b.isPending,e[44]=E,e[45]=X,e[46]=Z):Z=e[46];let Q;e[47]!==H||e[48]!==q||e[49]!==Y||e[50]!==Z||e[51]!==I?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[47]=H,e[48]=q,e[49]=Y,e[50]=Z,e[51]=I,e[52]=Q):Q=e[52];let $;return e[53]!==Q||e[54]!==F?($=(0,y.jsxs)(y.Fragment,{children:[N,P,F,Q]}),e[53]=Q,e[54]=F,e[55]=$):$=e[55],$}function x(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ae(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`strategy`),i=typeof r==`string`?r:``;return[{label:`Create Placement Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-placement-group`},{type:`flag`,value:` \\ --group-name`},{type:`value`,value:` ${n?x(n):``}`},{type:`flag`,value:` \\ --strategy`},{type:`value`,value:` ${i||`spread`}`}]}]}export{b as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-policy.js b/spinifex/services/spinifexui/frontend/dist/assets/create-policy.js index e1bf3254c..b30796d4f 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-policy.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-policy.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{o as i}from"./iam.js";import{Xr as a,er as o}from"./index.js";import{a as s,i as c,n as ee,t as te}from"./zod.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as ie}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{t as ae}from"./json-editor.js";import{r as oe}from"./iam2.js";var se=t(),f=e(),p=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function m(){let e=(0,se.c)(67),t=a(),m=i(),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g={resolver:te(oe),defaultValues:{policyDocument:p}},e[0]=g):g=e[0];let{handleSubmit:_,register:v,control:y,formState:ce}=c(g),{errors:b,isSubmitting:x}=ce,S;e[1]===y?S=e[2]:(S={control:y},e[1]=y,e[2]=S);let C=s(S),w;e[3]===C?w=e[4]:(w=e=>e?C[e]:void 0,e[3]=C,e[4]=w);let T=w,E;e[5]!==m||e[6]!==t?(E=async e=>{await m.mutateAsync(e),t({to:`/iam/list-policies`})},e[5]=m,e[6]=t,e[7]=E):E=e[7];let D=E,O,k;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,f.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),k=(0,f.jsx)(ie,{title:`Create Policy`}),e[8]=O,e[9]=k):(O=e[8],k=e[9]);let A;e[10]===m.error?A=e[11]:(A=m.error&&(0,f.jsx)(ne,{error:m.error,msg:`Failed to create policy`}),e[10]=m.error,e[11]=A);let j;e[12]!==_||e[13]!==D?(j=_(D),e[12]=_,e[13]=D,e[14]=j):j=e[14];let M;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),e[15]=M):M=e[15];let N=!!b.policyName,P;e[16]===v?P=e[17]:(P=v(`policyName`),e[16]=v,e[17]=P);let F;e[18]!==N||e[19]!==P?(F=(0,f.jsx)(o,{"aria-invalid":N,id:`policyName`,placeholder:`my-policy...`,...P}),e[18]=N,e[19]=P,e[20]=F):F=e[20];let I;e[21]===b.policyName?I=e[22]:(I=(0,f.jsx)(u,{errors:[b.policyName]}),e[21]=b.policyName,e[22]=I);let L;e[23]!==F||e[24]!==I?(L=(0,f.jsxs)(d,{children:[M,F,I]}),e[23]=F,e[24]=I,e[25]=L):L=e[25];let R;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[26]=R):R=e[26];let z;e[27]===v?z=e[28]:(z=v(`description`),e[27]=v,e[28]=z);let B;e[29]===z?B=e[30]:(B=(0,f.jsx)(o,{id:`description`,placeholder:`A brief description of this policy...`,...z}),e[29]=z,e[30]=B);let V;e[31]===b.description?V=e[32]:(V=(0,f.jsx)(u,{errors:[b.description]}),e[31]=b.description,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,f.jsxs)(d,{children:[R,B,V]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),e[36]=U):U=e[36];let W;e[37]===b.policyDocument?W=e[38]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,f.jsx)(ae,{error:!!b.policyDocument,id:`policyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[37]=b.policyDocument,e[38]=W);let G;e[39]!==y||e[40]!==W?(G=(0,f.jsx)(ee,{control:y,name:`policyDocument`,render:W}),e[39]=y,e[40]=W,e[41]=G):G=e[41];let K;e[42]===b.policyDocument?K=e[43]:(K=(0,f.jsx)(u,{errors:[b.policyDocument]}),e[42]=b.policyDocument,e[43]=K);let q;e[44]!==G||e[45]!==K?(q=(0,f.jsxs)(d,{children:[U,G,K]}),e[44]=G,e[45]=K,e[46]=q):q=e[46];let J;e[47]===T?J=e[48]:(J=h(T),e[47]=T,e[48]=J);let Y;e[49]===J?Y=e[50]:(Y=(0,f.jsx)(r,{commands:J}),e[49]=J,e[50]=Y);let X;e[51]===t?X=e[52]:(X=async()=>await t({to:`/iam/list-policies`}),e[51]=t,e[52]=X);let Z;e[53]!==m.isPending||e[54]!==x||e[55]!==X?(Z=(0,f.jsx)(re,{isPending:m.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),e[53]=m.isPending,e[54]=x,e[55]=X,e[56]=Z):Z=e[56];let Q;e[57]!==L||e[58]!==H||e[59]!==q||e[60]!==Y||e[61]!==Z||e[62]!==j?(Q=(0,f.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[57]=L,e[58]=H,e[59]=q,e[60]=Y,e[61]=Z,e[62]=j,e[63]=Q):Q=e[63];let $;return e[64]!==Q||e[65]!==A?($=(0,f.jsxs)(f.Fragment,{children:[O,k,A,Q]}),e[64]=Q,e[65]=A,e[66]=$):$=e[66],$}function h(e){let t=e(`policyName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`policyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{o as i}from"./iam.js";import{Qr as a,nr as o}from"./index.js";import{a as s,i as c,n as ee,t as te}from"./zod.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as ie}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{t as ae}from"./json-editor.js";import{r as oe}from"./iam2.js";var se=t(),f=e(),p=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function m(){let e=(0,se.c)(67),t=a(),m=i(),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g={resolver:te(oe),defaultValues:{policyDocument:p}},e[0]=g):g=e[0];let{handleSubmit:_,register:v,control:y,formState:ce}=c(g),{errors:b,isSubmitting:x}=ce,S;e[1]===y?S=e[2]:(S={control:y},e[1]=y,e[2]=S);let C=s(S),w;e[3]===C?w=e[4]:(w=e=>e?C[e]:void 0,e[3]=C,e[4]=w);let T=w,E;e[5]!==m||e[6]!==t?(E=async e=>{await m.mutateAsync(e),t({to:`/iam/list-policies`})},e[5]=m,e[6]=t,e[7]=E):E=e[7];let D=E,O,k;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,f.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),k=(0,f.jsx)(ie,{title:`Create Policy`}),e[8]=O,e[9]=k):(O=e[8],k=e[9]);let A;e[10]===m.error?A=e[11]:(A=m.error&&(0,f.jsx)(ne,{error:m.error,msg:`Failed to create policy`}),e[10]=m.error,e[11]=A);let j;e[12]!==_||e[13]!==D?(j=_(D),e[12]=_,e[13]=D,e[14]=j):j=e[14];let M;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),e[15]=M):M=e[15];let N=!!b.policyName,P;e[16]===v?P=e[17]:(P=v(`policyName`),e[16]=v,e[17]=P);let F;e[18]!==N||e[19]!==P?(F=(0,f.jsx)(o,{"aria-invalid":N,id:`policyName`,placeholder:`my-policy...`,...P}),e[18]=N,e[19]=P,e[20]=F):F=e[20];let I;e[21]===b.policyName?I=e[22]:(I=(0,f.jsx)(u,{errors:[b.policyName]}),e[21]=b.policyName,e[22]=I);let L;e[23]!==F||e[24]!==I?(L=(0,f.jsxs)(d,{children:[M,F,I]}),e[23]=F,e[24]=I,e[25]=L):L=e[25];let R;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[26]=R):R=e[26];let z;e[27]===v?z=e[28]:(z=v(`description`),e[27]=v,e[28]=z);let B;e[29]===z?B=e[30]:(B=(0,f.jsx)(o,{id:`description`,placeholder:`A brief description of this policy...`,...z}),e[29]=z,e[30]=B);let V;e[31]===b.description?V=e[32]:(V=(0,f.jsx)(u,{errors:[b.description]}),e[31]=b.description,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,f.jsxs)(d,{children:[R,B,V]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),e[36]=U):U=e[36];let W;e[37]===b.policyDocument?W=e[38]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,f.jsx)(ae,{error:!!b.policyDocument,id:`policyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[37]=b.policyDocument,e[38]=W);let G;e[39]!==y||e[40]!==W?(G=(0,f.jsx)(ee,{control:y,name:`policyDocument`,render:W}),e[39]=y,e[40]=W,e[41]=G):G=e[41];let K;e[42]===b.policyDocument?K=e[43]:(K=(0,f.jsx)(u,{errors:[b.policyDocument]}),e[42]=b.policyDocument,e[43]=K);let q;e[44]!==G||e[45]!==K?(q=(0,f.jsxs)(d,{children:[U,G,K]}),e[44]=G,e[45]=K,e[46]=q):q=e[46];let J;e[47]===T?J=e[48]:(J=h(T),e[47]=T,e[48]=J);let Y;e[49]===J?Y=e[50]:(Y=(0,f.jsx)(r,{commands:J}),e[49]=J,e[50]=Y);let X;e[51]===t?X=e[52]:(X=async()=>await t({to:`/iam/list-policies`}),e[51]=t,e[52]=X);let Z;e[53]!==m.isPending||e[54]!==x||e[55]!==X?(Z=(0,f.jsx)(re,{isPending:m.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),e[53]=m.isPending,e[54]=x,e[55]=X,e[56]=Z):Z=e[56];let Q;e[57]!==L||e[58]!==H||e[59]!==q||e[60]!==Y||e[61]!==Z||e[62]!==j?(Q=(0,f.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[57]=L,e[58]=H,e[59]=q,e[60]=Y,e[61]=Z,e[62]=j,e[63]=Q):Q=e[63];let $;return e[64]!==Q||e[65]!==A?($=(0,f.jsxs)(f.Fragment,{children:[O,k,A,Q]}),e[64]=Q,e[65]=A,e[66]=$):$=e[66],$}function h(e){let t=e(`policyName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`policyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\ --policy-name`},{type:`value`,value:` ${n||``}`}];return i&&s.push({type:`flag`,value:` \\ --description`},{type:`value`,value:` "${i}"`}),s.push({type:`flag`,value:` \\ --policy-document`},{type:`value`,value:` '${o||``}'`}),[{label:`Create Policy`,parts:s}]}export{m as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-role.js b/spinifex/services/spinifexui/frontend/dist/assets/create-role.js index 84336c204..733a2af32 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-role.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-role.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{s as i}from"./iam.js";import{Xr as a,er as o}from"./index.js";import{a as s,i as c,n as ee,t as te}from"./zod.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as ie}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{t as ae}from"./json-editor.js";import{i as oe,t as se}from"./iam2.js";var f=t(),p=e();function m(){let e=(0,f.c)(67),t=a(),m=i(),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g={resolver:te(oe),defaultValues:{assumeRolePolicyDocument:se}},e[0]=g):g=e[0];let{handleSubmit:_,register:v,control:y,formState:ce}=c(g),{errors:b,isSubmitting:x}=ce,S;e[1]===y?S=e[2]:(S={control:y},e[1]=y,e[2]=S);let C=s(S),w;e[3]===C?w=e[4]:(w=e=>e?C[e]:void 0,e[3]=C,e[4]=w);let T=w,E;e[5]!==m||e[6]!==t?(E=async e=>{await m.mutateAsync(e),t({to:`/iam/list-roles`})},e[5]=m,e[6]=t,e[7]=E):E=e[7];let D=E,O,k;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,p.jsx)(n,{to:`/iam/list-roles`,children:`Back to roles`}),k=(0,p.jsx)(ie,{title:`Create Role`}),e[8]=O,e[9]=k):(O=e[8],k=e[9]);let A;e[10]===m.error?A=e[11]:(A=m.error&&(0,p.jsx)(ne,{error:m.error,msg:`Failed to create role`}),e[10]=m.error,e[11]=A);let j;e[12]!==_||e[13]!==D?(j=_(D),e[12]=_,e[13]=D,e[14]=j):j=e[14];let M;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`roleName`,children:`Role Name`})}),e[15]=M):M=e[15];let N=!!b.roleName,P;e[16]===v?P=e[17]:(P=v(`roleName`),e[16]=v,e[17]=P);let F;e[18]!==N||e[19]!==P?(F=(0,p.jsx)(o,{"aria-invalid":N,id:`roleName`,placeholder:`my-role...`,...P}),e[18]=N,e[19]=P,e[20]=F):F=e[20];let I;e[21]===b.roleName?I=e[22]:(I=(0,p.jsx)(u,{errors:[b.roleName]}),e[21]=b.roleName,e[22]=I);let L;e[23]!==F||e[24]!==I?(L=(0,p.jsxs)(d,{children:[M,F,I]}),e[23]=F,e[24]=I,e[25]=L):L=e[25];let R;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[26]=R):R=e[26];let z;e[27]===v?z=e[28]:(z=v(`description`),e[27]=v,e[28]=z);let B;e[29]===z?B=e[30]:(B=(0,p.jsx)(o,{id:`description`,placeholder:`A brief description of this role...`,...z}),e[29]=z,e[30]=B);let V;e[31]===b.description?V=e[32]:(V=(0,p.jsx)(u,{errors:[b.description]}),e[31]=b.description,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,p.jsxs)(d,{children:[R,B,V]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`assumeRolePolicyDocument`,children:`Trust Policy (JSON)`})}),e[36]=U):U=e[36];let W;e[37]===b.assumeRolePolicyDocument?W=e[38]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,p.jsx)(ae,{error:!!b.assumeRolePolicyDocument,id:`assumeRolePolicyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[37]=b.assumeRolePolicyDocument,e[38]=W);let G;e[39]!==y||e[40]!==W?(G=(0,p.jsx)(ee,{control:y,name:`assumeRolePolicyDocument`,render:W}),e[39]=y,e[40]=W,e[41]=G):G=e[41];let K;e[42]===b.assumeRolePolicyDocument?K=e[43]:(K=(0,p.jsx)(u,{errors:[b.assumeRolePolicyDocument]}),e[42]=b.assumeRolePolicyDocument,e[43]=K);let q;e[44]!==G||e[45]!==K?(q=(0,p.jsxs)(d,{children:[U,G,K]}),e[44]=G,e[45]=K,e[46]=q):q=e[46];let J;e[47]===T?J=e[48]:(J=h(T),e[47]=T,e[48]=J);let Y;e[49]===J?Y=e[50]:(Y=(0,p.jsx)(r,{commands:J}),e[49]=J,e[50]=Y);let X;e[51]===t?X=e[52]:(X=async()=>await t({to:`/iam/list-roles`}),e[51]=t,e[52]=X);let Z;e[53]!==m.isPending||e[54]!==x||e[55]!==X?(Z=(0,p.jsx)(re,{isPending:m.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Role`}),e[53]=m.isPending,e[54]=x,e[55]=X,e[56]=Z):Z=e[56];let Q;e[57]!==L||e[58]!==H||e[59]!==q||e[60]!==Y||e[61]!==Z||e[62]!==j?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[57]=L,e[58]=H,e[59]=q,e[60]=Y,e[61]=Z,e[62]=j,e[63]=Q):Q=e[63];let $;return e[64]!==Q||e[65]!==A?($=(0,p.jsxs)(p.Fragment,{children:[O,k,A,Q]}),e[64]=Q,e[65]=A,e[66]=$):$=e[66],$}function h(e){let t=e(`roleName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`assumeRolePolicyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-role`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{s as i}from"./iam.js";import{Qr as a,nr as o}from"./index.js";import{a as s,i as c,n as ee,t as te}from"./zod.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as ie}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{t as ae}from"./json-editor.js";import{i as oe,t as se}from"./iam2.js";var f=t(),p=e();function m(){let e=(0,f.c)(67),t=a(),m=i(),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g={resolver:te(oe),defaultValues:{assumeRolePolicyDocument:se}},e[0]=g):g=e[0];let{handleSubmit:_,register:v,control:y,formState:ce}=c(g),{errors:b,isSubmitting:x}=ce,S;e[1]===y?S=e[2]:(S={control:y},e[1]=y,e[2]=S);let C=s(S),w;e[3]===C?w=e[4]:(w=e=>e?C[e]:void 0,e[3]=C,e[4]=w);let T=w,E;e[5]!==m||e[6]!==t?(E=async e=>{await m.mutateAsync(e),t({to:`/iam/list-roles`})},e[5]=m,e[6]=t,e[7]=E):E=e[7];let D=E,O,k;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,p.jsx)(n,{to:`/iam/list-roles`,children:`Back to roles`}),k=(0,p.jsx)(ie,{title:`Create Role`}),e[8]=O,e[9]=k):(O=e[8],k=e[9]);let A;e[10]===m.error?A=e[11]:(A=m.error&&(0,p.jsx)(ne,{error:m.error,msg:`Failed to create role`}),e[10]=m.error,e[11]=A);let j;e[12]!==_||e[13]!==D?(j=_(D),e[12]=_,e[13]=D,e[14]=j):j=e[14];let M;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`roleName`,children:`Role Name`})}),e[15]=M):M=e[15];let N=!!b.roleName,P;e[16]===v?P=e[17]:(P=v(`roleName`),e[16]=v,e[17]=P);let F;e[18]!==N||e[19]!==P?(F=(0,p.jsx)(o,{"aria-invalid":N,id:`roleName`,placeholder:`my-role...`,...P}),e[18]=N,e[19]=P,e[20]=F):F=e[20];let I;e[21]===b.roleName?I=e[22]:(I=(0,p.jsx)(u,{errors:[b.roleName]}),e[21]=b.roleName,e[22]=I);let L;e[23]!==F||e[24]!==I?(L=(0,p.jsxs)(d,{children:[M,F,I]}),e[23]=F,e[24]=I,e[25]=L):L=e[25];let R;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[26]=R):R=e[26];let z;e[27]===v?z=e[28]:(z=v(`description`),e[27]=v,e[28]=z);let B;e[29]===z?B=e[30]:(B=(0,p.jsx)(o,{id:`description`,placeholder:`A brief description of this role...`,...z}),e[29]=z,e[30]=B);let V;e[31]===b.description?V=e[32]:(V=(0,p.jsx)(u,{errors:[b.description]}),e[31]=b.description,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,p.jsxs)(d,{children:[R,B,V]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`assumeRolePolicyDocument`,children:`Trust Policy (JSON)`})}),e[36]=U):U=e[36];let W;e[37]===b.assumeRolePolicyDocument?W=e[38]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,p.jsx)(ae,{error:!!b.assumeRolePolicyDocument,id:`assumeRolePolicyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[37]=b.assumeRolePolicyDocument,e[38]=W);let G;e[39]!==y||e[40]!==W?(G=(0,p.jsx)(ee,{control:y,name:`assumeRolePolicyDocument`,render:W}),e[39]=y,e[40]=W,e[41]=G):G=e[41];let K;e[42]===b.assumeRolePolicyDocument?K=e[43]:(K=(0,p.jsx)(u,{errors:[b.assumeRolePolicyDocument]}),e[42]=b.assumeRolePolicyDocument,e[43]=K);let q;e[44]!==G||e[45]!==K?(q=(0,p.jsxs)(d,{children:[U,G,K]}),e[44]=G,e[45]=K,e[46]=q):q=e[46];let J;e[47]===T?J=e[48]:(J=h(T),e[47]=T,e[48]=J);let Y;e[49]===J?Y=e[50]:(Y=(0,p.jsx)(r,{commands:J}),e[49]=J,e[50]=Y);let X;e[51]===t?X=e[52]:(X=async()=>await t({to:`/iam/list-roles`}),e[51]=t,e[52]=X);let Z;e[53]!==m.isPending||e[54]!==x||e[55]!==X?(Z=(0,p.jsx)(re,{isPending:m.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Role`}),e[53]=m.isPending,e[54]=x,e[55]=X,e[56]=Z):Z=e[56];let Q;e[57]!==L||e[58]!==H||e[59]!==q||e[60]!==Y||e[61]!==Z||e[62]!==j?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[57]=L,e[58]=H,e[59]=q,e[60]=Y,e[61]=Z,e[62]=j,e[63]=Q):Q=e[63];let $;return e[64]!==Q||e[65]!==A?($=(0,p.jsxs)(p.Fragment,{children:[O,k,A,Q]}),e[64]=Q,e[65]=A,e[66]=$):$=e[66],$}function h(e){let t=e(`roleName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`assumeRolePolicyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-role`},{type:`flag`,value:` \\ --role-name`},{type:`value`,value:` ${n||``}`}];return i&&s.push({type:`flag`,value:` \\ --description`},{type:`value`,value:` "${i}"`}),s.push({type:`flag`,value:` \\ --assume-role-policy-document`},{type:`value`,value:` '${o||``}'`}),[{label:`Create Role`,parts:s}]}export{m as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-route-table.js b/spinifex/services/spinifexui/frontend/dist/assets/create-route-table.js index 7eff7cd6b..e83f98360 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-route-table.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-route-table.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{Ut as r}from"./auth.js";import{t as i}from"./back-link.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{_ as u}from"./ec2.js";import{$t as d,Xr as f,er as p}from"./index.js";import{i as m,n as h,t as g}from"./zod.js";import{t as _}from"./error-banner.js";import{t as v}from"./form-actions.js";import{t as y}from"./page-heading.js";import{a as b,r as x,t as S}from"./field.js";import{u as C}from"./ec22.js";var w=t(),T=e();function E(){let e=(0,w.c)(44),t=f(),{data:r}=n(d),o=u(),E;e[0]===r.Vpcs?E=e[1]:(E=r.Vpcs??[],e[0]=r.Vpcs,e[1]=E);let O=E,k;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:g(C),defaultValues:{vpcId:``,name:``}},e[2]=k):k=e[2];let{control:A,handleSubmit:j,register:M,formState:N}=m(k),{errors:P,isSubmitting:F}=N,I;e[3]!==o||e[4]!==t?(I=async e=>{let n=(await o.mutateAsync({vpcId:e.vpcId,name:e.name?.trim()?e.name.trim():void 0})).RouteTable?.RouteTableId;t(n?{to:`/ec2/describe-route-tables/$id`,params:{id:n}}:{to:`/ec2/describe-route-tables`})},e[3]=o,e[4]=t,e[5]=I):I=e[5];let L=I,R,z;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(i,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(y,{title:`Create Route Table`}),e[6]=R,e[7]=z):(R=e[6],z=e[7]);let B;e[8]===o.error?B=e[9]:(B=o.error&&(0,T.jsx)(_,{error:o.error,msg:`Failed to create Route Table`}),e[8]=o.error,e[9]=B);let V;e[10]!==j||e[11]!==L?(V=j(L),e[10]=j,e[11]=L,e[12]=V):V=e[12];let H;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,T.jsx)(b,{children:(0,T.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=H):H=e[13];let U;e[14]===M?U=e[15]:(U=M(`name`),e[14]=M,e[15]=U);let W;e[16]===U?W=e[17]:(W=(0,T.jsxs)(S,{children:[H,(0,T.jsx)(p,{id:`name`,placeholder:`my-route-table`,...U})]}),e[16]=U,e[17]=W);let G;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,T.jsx)(b,{children:(0,T.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[18]=G):G=e[18];let K;e[19]!==P.vpcId||e[20]!==O?(K=e=>{let{field:t}=e;return(0,T.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,T.jsx)(c,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(a,{placeholder:`Select a VPC`})}),(0,T.jsx)(s,{children:O.map(D)})]})},e[19]=P.vpcId,e[20]=O,e[21]=K):K=e[21];let q;e[22]!==A||e[23]!==K?(q=(0,T.jsx)(h,{control:A,name:`vpcId`,render:K}),e[22]=A,e[23]=K,e[24]=q):q=e[24];let J;e[25]===P.vpcId?J=e[26]:(J=(0,T.jsx)(x,{errors:[P.vpcId]}),e[25]=P.vpcId,e[26]=J);let Y;e[27]!==q||e[28]!==J?(Y=(0,T.jsxs)(S,{children:[G,q,J]}),e[27]=q,e[28]=J,e[29]=Y):Y=e[29];let X;e[30]===t?X=e[31]:(X=async()=>await t({to:`/ec2/describe-route-tables`}),e[30]=t,e[31]=X);let Z;e[32]!==o.isPending||e[33]!==F||e[34]!==X?(Z=(0,T.jsx)(v,{isPending:o.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),e[32]=o.isPending,e[33]=F,e[34]=X,e[35]=Z):Z=e[35];let Q;e[36]!==W||e[37]!==Y||e[38]!==Z||e[39]!==V?(Q=(0,T.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:V,children:[W,Y,Z]}),e[36]=W,e[37]=Y,e[38]=Z,e[39]=V,e[40]=Q):Q=e[40];let $;return e[41]!==Q||e[42]!==B?($=(0,T.jsxs)(T.Fragment,{children:[R,z,B,Q]}),e[41]=Q,e[42]=B,e[43]=$):$=e[43],$}function D(e){let t=r(e.Tags);return(0,T.jsx)(o,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{E as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{Ut as r}from"./auth.js";import{t as i}from"./back-link.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{_ as u}from"./ec2.js";import{Qr as d,nr as f,tn as p}from"./index.js";import{i as m,n as h,t as g}from"./zod.js";import{t as _}from"./error-banner.js";import{t as v}from"./form-actions.js";import{t as y}from"./page-heading.js";import{a as b,r as x,t as S}from"./field.js";import{u as C}from"./ec22.js";var w=t(),T=e();function E(){let e=(0,w.c)(44),t=d(),{data:r}=n(p),o=u(),E;e[0]===r.Vpcs?E=e[1]:(E=r.Vpcs??[],e[0]=r.Vpcs,e[1]=E);let O=E,k;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:g(C),defaultValues:{vpcId:``,name:``}},e[2]=k):k=e[2];let{control:A,handleSubmit:j,register:M,formState:N}=m(k),{errors:P,isSubmitting:F}=N,I;e[3]!==o||e[4]!==t?(I=async e=>{let n=(await o.mutateAsync({vpcId:e.vpcId,name:e.name?.trim()?e.name.trim():void 0})).RouteTable?.RouteTableId;t(n?{to:`/ec2/describe-route-tables/$id`,params:{id:n}}:{to:`/ec2/describe-route-tables`})},e[3]=o,e[4]=t,e[5]=I):I=e[5];let L=I,R,z;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(i,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(y,{title:`Create Route Table`}),e[6]=R,e[7]=z):(R=e[6],z=e[7]);let B;e[8]===o.error?B=e[9]:(B=o.error&&(0,T.jsx)(_,{error:o.error,msg:`Failed to create Route Table`}),e[8]=o.error,e[9]=B);let V;e[10]!==j||e[11]!==L?(V=j(L),e[10]=j,e[11]=L,e[12]=V):V=e[12];let H;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,T.jsx)(b,{children:(0,T.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=H):H=e[13];let U;e[14]===M?U=e[15]:(U=M(`name`),e[14]=M,e[15]=U);let W;e[16]===U?W=e[17]:(W=(0,T.jsxs)(S,{children:[H,(0,T.jsx)(f,{id:`name`,placeholder:`my-route-table`,...U})]}),e[16]=U,e[17]=W);let G;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,T.jsx)(b,{children:(0,T.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[18]=G):G=e[18];let K;e[19]!==P.vpcId||e[20]!==O?(K=e=>{let{field:t}=e;return(0,T.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,T.jsx)(c,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(a,{placeholder:`Select a VPC`})}),(0,T.jsx)(s,{children:O.map(D)})]})},e[19]=P.vpcId,e[20]=O,e[21]=K):K=e[21];let q;e[22]!==A||e[23]!==K?(q=(0,T.jsx)(h,{control:A,name:`vpcId`,render:K}),e[22]=A,e[23]=K,e[24]=q):q=e[24];let J;e[25]===P.vpcId?J=e[26]:(J=(0,T.jsx)(x,{errors:[P.vpcId]}),e[25]=P.vpcId,e[26]=J);let Y;e[27]!==q||e[28]!==J?(Y=(0,T.jsxs)(S,{children:[G,q,J]}),e[27]=q,e[28]=J,e[29]=Y):Y=e[29];let X;e[30]===t?X=e[31]:(X=async()=>await t({to:`/ec2/describe-route-tables`}),e[30]=t,e[31]=X);let Z;e[32]!==o.isPending||e[33]!==F||e[34]!==X?(Z=(0,T.jsx)(v,{isPending:o.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),e[32]=o.isPending,e[33]=F,e[34]=X,e[35]=Z):Z=e[35];let Q;e[36]!==W||e[37]!==Y||e[38]!==Z||e[39]!==V?(Q=(0,T.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:V,children:[W,Y,Z]}),e[36]=W,e[37]=Y,e[38]=Z,e[39]=V,e[40]=Q):Q=e[40];let $;return e[41]!==Q||e[42]!==B?($=(0,T.jsxs)(T.Fragment,{children:[R,z,B,Q]}),e[41]=Q,e[42]=B,e[43]=$):$=e[43],$}function D(e){let t=r(e.Tags);return(0,T.jsx)(o,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{E as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-security-group.js b/spinifex/services/spinifexui/frontend/dist/assets/create-security-group.js index 2e59ee564..c2c82a281 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-security-group.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-security-group.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{Ut as r}from"./auth.js";import{t as ee}from"./back-link.js";import{c as i,i as a,n as o,s as te,t as ne}from"./select.js";import{t as re}from"./cli-command-panel.js";import{v as ie}from"./ec2.js";import{$t as ae,Xr as oe,er as se}from"./index.js";import{a as ce,i as le,n as ue,t as de}from"./zod.js";import{t as fe}from"./error-banner.js";import{t as pe}from"./form-actions.js";import{t as me}from"./page-heading.js";import{a as s,r as c,t as l}from"./field.js";import{d as he}from"./ec22.js";var ge=t(),u=e();function d(){let e=(0,ge.c)(73),t=oe(),{data:r}=n(ae),a=ie(),d;e[0]===r.Vpcs?d=e[1]:(d=r.Vpcs??[],e[0]=r.Vpcs,e[1]=d);let f=d,p;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=de(he),e[2]=p):p=e[2];let m=f[0]?.VpcId??``,h;e[3]===m?h=e[4]:(h={resolver:p,defaultValues:{groupName:``,description:``,vpcId:m}},e[3]=m,e[4]=h);let{control:g,handleSubmit:_,register:v,formState:ye}=le(h),{errors:y,isSubmitting:b}=ye,x;e[5]===g?x=e[6]:(x={control:g},e[5]=g,e[6]=x);let S=ce(x),C;e[7]===S?C=e[8]:(C=e=>e?S[e]:void 0,e[7]=S,e[8]=C);let w=C,T;e[9]!==a||e[10]!==t?(T=async e=>{let n=(await a.mutateAsync(e)).GroupId;t(n?{to:`/ec2/describe-security-groups/$id`,params:{id:n}}:{to:`/ec2/describe-security-groups`})},e[9]=a,e[10]=t,e[11]=T):T=e[11];let E=T,D,O;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,u.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,u.jsx)(me,{title:`Create Security Group`}),e[12]=D,e[13]=O):(D=e[12],O=e[13]);let k;e[14]===a.error?k=e[15]:(k=a.error&&(0,u.jsx)(fe,{error:a.error,msg:`Failed to create security group`}),e[14]=a.error,e[15]=k);let A;e[16]!==_||e[17]!==E?(A=_(E),e[16]=_,e[17]=E,e[18]=A):A=e[18];let j;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,u.jsx)(s,{children:(0,u.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[19]=j):j=e[19];let M=!!y.groupName,N;e[20]===v?N=e[21]:(N=v(`groupName`),e[20]=v,e[21]=N);let P;e[22]!==M||e[23]!==N?(P=(0,u.jsx)(se,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),e[22]=M,e[23]=N,e[24]=P):P=e[24];let F;e[25]===y.groupName?F=e[26]:(F=(0,u.jsx)(c,{errors:[y.groupName]}),e[25]=y.groupName,e[26]=F);let I;e[27]!==P||e[28]!==F?(I=(0,u.jsxs)(l,{children:[j,P,F]}),e[27]=P,e[28]=F,e[29]=I):I=e[29];let L;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,u.jsx)(s,{children:(0,u.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),e[30]=L):L=e[30];let R=!!y.description,z;e[31]===v?z=e[32]:(z=v(`description`),e[31]=v,e[32]=z);let B;e[33]!==R||e[34]!==z?(B=(0,u.jsx)(se,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),e[33]=R,e[34]=z,e[35]=B):B=e[35];let V;e[36]===y.description?V=e[37]:(V=(0,u.jsx)(c,{errors:[y.description]}),e[36]=y.description,e[37]=V);let H;e[38]!==B||e[39]!==V?(H=(0,u.jsxs)(l,{children:[L,B,V]}),e[38]=B,e[39]=V,e[40]=H):H=e[40];let U;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,u.jsx)(s,{children:(0,u.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[41]=U):U=e[41];let W;e[42]!==y.vpcId||e[43]!==f?(W=e=>{let{field:t}=e;return(0,u.jsxs)(ne,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,u.jsx)(te,{"aria-invalid":!!y.vpcId,className:`w-full`,id:`vpcId`,children:(0,u.jsx)(i,{})}),(0,u.jsx)(o,{children:f.map(_e)})]})},e[42]=y.vpcId,e[43]=f,e[44]=W):W=e[44];let G;e[45]!==g||e[46]!==W?(G=(0,u.jsx)(ue,{control:g,name:`vpcId`,render:W}),e[45]=g,e[46]=W,e[47]=G):G=e[47];let K;e[48]===y.vpcId?K=e[49]:(K=(0,u.jsx)(c,{errors:[y.vpcId]}),e[48]=y.vpcId,e[49]=K);let q;e[50]!==G||e[51]!==K?(q=(0,u.jsxs)(l,{children:[U,G,K]}),e[50]=G,e[51]=K,e[52]=q):q=e[52];let J;e[53]===w?J=e[54]:(J=ve(w),e[53]=w,e[54]=J);let Y;e[55]===J?Y=e[56]:(Y=(0,u.jsx)(re,{commands:J}),e[55]=J,e[56]=Y);let X;e[57]===t?X=e[58]:(X=async()=>await t({to:`/ec2/describe-security-groups`}),e[57]=t,e[58]=X);let Z;e[59]!==a.isPending||e[60]!==b||e[61]!==X?(Z=(0,u.jsx)(pe,{isPending:a.isPending,isSubmitting:b,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),e[59]=a.isPending,e[60]=b,e[61]=X,e[62]=Z):Z=e[62];let Q;e[63]!==A||e[64]!==I||e[65]!==H||e[66]!==q||e[67]!==Y||e[68]!==Z?(Q=(0,u.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),e[63]=A,e[64]=I,e[65]=H,e[66]=q,e[67]=Y,e[68]=Z,e[69]=Q):Q=e[69];let $;return e[70]!==k||e[71]!==Q?($=(0,u.jsxs)(u.Fragment,{children:[D,O,k,Q]}),e[70]=k,e[71]=Q,e[72]=$):$=e[72],$}function _e(e){let t=r(e.Tags);return(0,u.jsx)(a,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function ve(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`description`),ee=typeof r==`string`?r:``,i=e(`vpcId`),a=typeof i==`string`?i:``,o=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{Ut as r}from"./auth.js";import{t as ee}from"./back-link.js";import{c as i,i as a,n as o,s as te,t as ne}from"./select.js";import{t as re}from"./cli-command-panel.js";import{v as ie}from"./ec2.js";import{Qr as ae,nr as oe,tn as se}from"./index.js";import{a as ce,i as le,n as ue,t as de}from"./zod.js";import{t as fe}from"./error-banner.js";import{t as pe}from"./form-actions.js";import{t as me}from"./page-heading.js";import{a as s,r as c,t as l}from"./field.js";import{d as he}from"./ec22.js";var ge=t(),u=e();function d(){let e=(0,ge.c)(73),t=ae(),{data:r}=n(se),a=ie(),d;e[0]===r.Vpcs?d=e[1]:(d=r.Vpcs??[],e[0]=r.Vpcs,e[1]=d);let f=d,p;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=de(he),e[2]=p):p=e[2];let m=f[0]?.VpcId??``,h;e[3]===m?h=e[4]:(h={resolver:p,defaultValues:{groupName:``,description:``,vpcId:m}},e[3]=m,e[4]=h);let{control:g,handleSubmit:_,register:v,formState:ye}=le(h),{errors:y,isSubmitting:b}=ye,x;e[5]===g?x=e[6]:(x={control:g},e[5]=g,e[6]=x);let S=ce(x),C;e[7]===S?C=e[8]:(C=e=>e?S[e]:void 0,e[7]=S,e[8]=C);let w=C,T;e[9]!==a||e[10]!==t?(T=async e=>{let n=(await a.mutateAsync(e)).GroupId;t(n?{to:`/ec2/describe-security-groups/$id`,params:{id:n}}:{to:`/ec2/describe-security-groups`})},e[9]=a,e[10]=t,e[11]=T):T=e[11];let E=T,D,O;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,u.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,u.jsx)(me,{title:`Create Security Group`}),e[12]=D,e[13]=O):(D=e[12],O=e[13]);let k;e[14]===a.error?k=e[15]:(k=a.error&&(0,u.jsx)(fe,{error:a.error,msg:`Failed to create security group`}),e[14]=a.error,e[15]=k);let A;e[16]!==_||e[17]!==E?(A=_(E),e[16]=_,e[17]=E,e[18]=A):A=e[18];let j;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,u.jsx)(s,{children:(0,u.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[19]=j):j=e[19];let M=!!y.groupName,N;e[20]===v?N=e[21]:(N=v(`groupName`),e[20]=v,e[21]=N);let P;e[22]!==M||e[23]!==N?(P=(0,u.jsx)(oe,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),e[22]=M,e[23]=N,e[24]=P):P=e[24];let F;e[25]===y.groupName?F=e[26]:(F=(0,u.jsx)(c,{errors:[y.groupName]}),e[25]=y.groupName,e[26]=F);let I;e[27]!==P||e[28]!==F?(I=(0,u.jsxs)(l,{children:[j,P,F]}),e[27]=P,e[28]=F,e[29]=I):I=e[29];let L;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,u.jsx)(s,{children:(0,u.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),e[30]=L):L=e[30];let R=!!y.description,z;e[31]===v?z=e[32]:(z=v(`description`),e[31]=v,e[32]=z);let B;e[33]!==R||e[34]!==z?(B=(0,u.jsx)(oe,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),e[33]=R,e[34]=z,e[35]=B):B=e[35];let V;e[36]===y.description?V=e[37]:(V=(0,u.jsx)(c,{errors:[y.description]}),e[36]=y.description,e[37]=V);let H;e[38]!==B||e[39]!==V?(H=(0,u.jsxs)(l,{children:[L,B,V]}),e[38]=B,e[39]=V,e[40]=H):H=e[40];let U;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,u.jsx)(s,{children:(0,u.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[41]=U):U=e[41];let W;e[42]!==y.vpcId||e[43]!==f?(W=e=>{let{field:t}=e;return(0,u.jsxs)(ne,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,u.jsx)(te,{"aria-invalid":!!y.vpcId,className:`w-full`,id:`vpcId`,children:(0,u.jsx)(i,{})}),(0,u.jsx)(o,{children:f.map(_e)})]})},e[42]=y.vpcId,e[43]=f,e[44]=W):W=e[44];let G;e[45]!==g||e[46]!==W?(G=(0,u.jsx)(ue,{control:g,name:`vpcId`,render:W}),e[45]=g,e[46]=W,e[47]=G):G=e[47];let K;e[48]===y.vpcId?K=e[49]:(K=(0,u.jsx)(c,{errors:[y.vpcId]}),e[48]=y.vpcId,e[49]=K);let q;e[50]!==G||e[51]!==K?(q=(0,u.jsxs)(l,{children:[U,G,K]}),e[50]=G,e[51]=K,e[52]=q):q=e[52];let J;e[53]===w?J=e[54]:(J=ve(w),e[53]=w,e[54]=J);let Y;e[55]===J?Y=e[56]:(Y=(0,u.jsx)(re,{commands:J}),e[55]=J,e[56]=Y);let X;e[57]===t?X=e[58]:(X=async()=>await t({to:`/ec2/describe-security-groups`}),e[57]=t,e[58]=X);let Z;e[59]!==a.isPending||e[60]!==b||e[61]!==X?(Z=(0,u.jsx)(pe,{isPending:a.isPending,isSubmitting:b,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),e[59]=a.isPending,e[60]=b,e[61]=X,e[62]=Z):Z=e[62];let Q;e[63]!==A||e[64]!==I||e[65]!==H||e[66]!==q||e[67]!==Y||e[68]!==Z?(Q=(0,u.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),e[63]=A,e[64]=I,e[65]=H,e[66]=q,e[67]=Y,e[68]=Z,e[69]=Q):Q=e[69];let $;return e[70]!==k||e[71]!==Q?($=(0,u.jsxs)(u.Fragment,{children:[D,O,k,Q]}),e[70]=k,e[71]=Q,e[72]=$):$=e[72],$}function _e(e){let t=r(e.Tags);return(0,u.jsx)(a,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function ve(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`description`),ee=typeof r==`string`?r:``,i=e(`vpcId`),a=typeof i==`string`?i:``,o=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\ --group-name`},{type:`value`,value:` ${n||``}`},{type:`flag`,value:` \\ --description`},{type:`value`,value:` "${ee||``}"`}];return a&&o.push({type:`flag`,value:` \\ --vpc-id`},{type:`value`,value:` ${a}`}),[{label:`Create Security Group`,parts:o}]}export{d as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-service.js b/spinifex/services/spinifexui/frontend/dist/assets/create-service.js index e2243fbe3..d6d5f91c9 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-service.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-service.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./back-link.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{n as u}from"./ecs.js";import{Gt as d,H as f,Q as p,Xr as m,Yt as h,er as g,ot as _,st as v}from"./index.js";import{i as y,n as b,t as x}from"./zod.js";import{t as S}from"./error-banner.js";import{t as C}from"./form-actions.js";import{t as w}from"./page-heading.js";import{a as T,r as E,t as D}from"./field.js";import{n as O}from"./ecs2.js";var k=t(),A=e();function j(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function M({cluster:e}){let t=m(),f=u(),{data:k}=r(v),{data:M}=r(h),{data:N}=r(d),{data:P}=r(p),F=M.Subnets??[],I=N.SecurityGroups??[],L=P.TargetGroups??[],{control:R,handleSubmit:z,register:B,watch:V,setValue:H,getValues:U,formState:{errors:W,isSubmitting:G}}=y({resolver:x(O),defaultValues:{cluster:e,serviceName:``,taskDefinition:``,desiredCount:1,subnets:[],securityGroups:[],assignPublicIp:!1,targetGroupArn:``,loadBalancerContainerName:``,loadBalancerContainerPort:``}}),{data:K}=n(_(V(`taskDefinition`))),q=K?.networkMode===`awsvpc`,J=V(`subnets`),Y=V(`securityGroups`),X=(e,t)=>{let n=U(e);H(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})};function Z(){t({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:e}})}async function Q(e){await f.mutateAsync({...e,awsvpc:q}),Z()}let $=q&&J.length===0;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(i,{params:{clusterName:e},to:`/ecs/list-clusters/$clusterName`,children:e}),(0,A.jsx)(w,{subtitle:`Cluster: ${e}`,title:`Create Service`}),f.isError&&(0,A.jsx)(S,{error:f.error instanceof Error?f.error:void 0,msg:`Failed to create service.`}),(0,A.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:z(Q),children:[(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`serviceName`,children:`Service name`})}),(0,A.jsx)(g,{id:`serviceName`,placeholder:`api`,...B(`serviceName`)}),(0,A.jsx)(E,{errors:[W.serviceName]})]}),(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),(0,A.jsx)(b,{control:R,name:`taskDefinition`,render:({field:e})=>(0,A.jsxs)(l,{onValueChange:e.onChange,value:e.value,children:[(0,A.jsx)(c,{className:`w-full`,id:`taskDefinition`,children:(0,A.jsx)(a,{placeholder:`Select a task definition`})}),(0,A.jsx)(s,{children:k.map(e=>{let t=j(e);return(0,A.jsx)(o,{value:t,children:t},e)})})]})}),(0,A.jsx)(E,{errors:[W.taskDefinition]})]}),(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`desiredCount`,children:`Desired count`})}),(0,A.jsx)(g,{id:`desiredCount`,type:`number`,...B(`desiredCount`,{valueAsNumber:!0})}),(0,A.jsx)(E,{errors:[W.desiredCount]})]}),q&&(0,A.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,A.jsx)(`div`,{className:`mt-2 space-y-1`,children:F.map(e=>(0,A.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,A.jsx)(`input`,{checked:J.includes(e.SubnetId??``),onChange:()=>X(`subnets`,e.SubnetId??``),type:`checkbox`}),(0,A.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,A.jsx)(`div`,{className:`mt-2 space-y-1`,children:I.map(e=>(0,A.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,A.jsx)(`input`,{checked:Y.includes(e.GroupId??``),onChange:()=>X(`securityGroups`,e.GroupId??``),type:`checkbox`}),(0,A.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,A.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,A.jsx)(`input`,{type:`checkbox`,...B(`assignPublicIp`)}),(0,A.jsx)(`span`,{children:`Assign public IP`})]})]}),(0,A.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,A.jsx)(`h2`,{className:`font-semibold`,children:`Load balancer (optional)`}),(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`targetGroupArn`,children:`Target group`})}),(0,A.jsx)(b,{control:R,name:`targetGroupArn`,render:({field:e})=>(0,A.jsxs)(l,{onValueChange:t=>e.onChange(t===`none`?``:t),value:e.value===``?`none`:e.value,children:[(0,A.jsx)(c,{className:`w-full`,id:`targetGroupArn`,children:(0,A.jsx)(a,{})}),(0,A.jsxs)(s,{children:[(0,A.jsx)(o,{value:`none`,children:`none`}),L.map(e=>(0,A.jsx)(o,{value:e.TargetGroupArn??``,children:e.TargetGroupName},e.TargetGroupArn))]})]})})]}),(0,A.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`lbContainerName`,children:`Container name`})}),(0,A.jsx)(g,{id:`lbContainerName`,placeholder:`app`,...B(`loadBalancerContainerName`)})]}),(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`lbContainerPort`,children:`Container port`})}),(0,A.jsx)(g,{id:`lbContainerPort`,placeholder:`80`,type:`number`,...B(`loadBalancerContainerPort`)})]})]})]}),(0,A.jsx)(C,{isPending:f.isPending||$,isSubmitting:G,onCancel:Z,pendingLabel:`Creating…`,submitLabel:`Create Service`})]})]})}function N(){let e=(0,k.c)(2),{cluster:t}=f.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,A.jsx)(M,{cluster:t}),e[0]=t,e[1]=n),n}export{N as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./back-link.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{n as u}from"./ecs.js";import{Qr as d,W as f,Zt as p,ct as m,et as h,lt as g,nr as _,qt as v}from"./index.js";import{i as y,n as b,t as x}from"./zod.js";import{t as S}from"./error-banner.js";import{t as C}from"./form-actions.js";import{t as w}from"./page-heading.js";import{a as T,r as E,t as D}from"./field.js";import{n as O}from"./ecs2.js";var k=t(),A=e();function j(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function M({cluster:e}){let t=d(),f=u(),{data:k}=r(g),{data:M}=r(p),{data:N}=r(v),{data:P}=r(h),F=M.Subnets??[],I=N.SecurityGroups??[],L=P.TargetGroups??[],{control:R,handleSubmit:z,register:B,watch:V,setValue:H,getValues:U,formState:{errors:W,isSubmitting:G}}=y({resolver:x(O),defaultValues:{cluster:e,serviceName:``,taskDefinition:``,desiredCount:1,subnets:[],securityGroups:[],assignPublicIp:!1,targetGroupArn:``,loadBalancerContainerName:``,loadBalancerContainerPort:``}}),{data:K}=n(m(V(`taskDefinition`))),q=K?.networkMode===`awsvpc`,J=V(`subnets`),Y=V(`securityGroups`),X=(e,t)=>{let n=U(e);H(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})};function Z(){t({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:e}})}async function Q(e){await f.mutateAsync({...e,awsvpc:q}),Z()}let $=q&&J.length===0;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(i,{params:{clusterName:e},to:`/ecs/list-clusters/$clusterName`,children:e}),(0,A.jsx)(w,{subtitle:`Cluster: ${e}`,title:`Create Service`}),f.isError&&(0,A.jsx)(S,{error:f.error instanceof Error?f.error:void 0,msg:`Failed to create service.`}),(0,A.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:z(Q),children:[(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`serviceName`,children:`Service name`})}),(0,A.jsx)(_,{id:`serviceName`,placeholder:`api`,...B(`serviceName`)}),(0,A.jsx)(E,{errors:[W.serviceName]})]}),(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),(0,A.jsx)(b,{control:R,name:`taskDefinition`,render:({field:e})=>(0,A.jsxs)(l,{onValueChange:e.onChange,value:e.value,children:[(0,A.jsx)(c,{className:`w-full`,id:`taskDefinition`,children:(0,A.jsx)(a,{placeholder:`Select a task definition`})}),(0,A.jsx)(s,{children:k.map(e=>{let t=j(e);return(0,A.jsx)(o,{value:t,children:t},e)})})]})}),(0,A.jsx)(E,{errors:[W.taskDefinition]})]}),(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`desiredCount`,children:`Desired count`})}),(0,A.jsx)(_,{id:`desiredCount`,type:`number`,...B(`desiredCount`,{valueAsNumber:!0})}),(0,A.jsx)(E,{errors:[W.desiredCount]})]}),q&&(0,A.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,A.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,A.jsx)(`div`,{className:`mt-2 space-y-1`,children:F.map(e=>(0,A.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,A.jsx)(`input`,{checked:J.includes(e.SubnetId??``),onChange:()=>X(`subnets`,e.SubnetId??``),type:`checkbox`}),(0,A.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,A.jsx)(`div`,{className:`mt-2 space-y-1`,children:I.map(e=>(0,A.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,A.jsx)(`input`,{checked:Y.includes(e.GroupId??``),onChange:()=>X(`securityGroups`,e.GroupId??``),type:`checkbox`}),(0,A.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,A.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,A.jsx)(`input`,{type:`checkbox`,...B(`assignPublicIp`)}),(0,A.jsx)(`span`,{children:`Assign public IP`})]})]}),(0,A.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,A.jsx)(`h2`,{className:`font-semibold`,children:`Load balancer (optional)`}),(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`targetGroupArn`,children:`Target group`})}),(0,A.jsx)(b,{control:R,name:`targetGroupArn`,render:({field:e})=>(0,A.jsxs)(l,{onValueChange:t=>e.onChange(t===`none`?``:t),value:e.value===``?`none`:e.value,children:[(0,A.jsx)(c,{className:`w-full`,id:`targetGroupArn`,children:(0,A.jsx)(a,{})}),(0,A.jsxs)(s,{children:[(0,A.jsx)(o,{value:`none`,children:`none`}),L.map(e=>(0,A.jsx)(o,{value:e.TargetGroupArn??``,children:e.TargetGroupName},e.TargetGroupArn))]})]})})]}),(0,A.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`lbContainerName`,children:`Container name`})}),(0,A.jsx)(_,{id:`lbContainerName`,placeholder:`app`,...B(`loadBalancerContainerName`)})]}),(0,A.jsxs)(D,{children:[(0,A.jsx)(T,{children:(0,A.jsx)(`label`,{htmlFor:`lbContainerPort`,children:`Container port`})}),(0,A.jsx)(_,{id:`lbContainerPort`,placeholder:`80`,type:`number`,...B(`loadBalancerContainerPort`)})]})]})]}),(0,A.jsx)(C,{isPending:f.isPending||$,isSubmitting:G,onCancel:Z,pendingLabel:`Creating…`,submitLabel:`Create Service`})]})]})}function N(){let e=(0,k.c)(2),{cluster:t}=f.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,A.jsx)(M,{cluster:t}),e[0]=t,e[1]=n),n}export{N as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-snapshot.js b/spinifex/services/spinifexui/frontend/dist/assets/create-snapshot.js index d2dd54047..d407daafb 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-snapshot.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-snapshot.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./back-link.js";import{c as i,i as a,n as o,s,t as c}from"./select.js";import{t as l}from"./cli-command-panel.js";import{y as ee}from"./ec2.js";import{V as te,Xr as u,Zt as ne}from"./index.js";import{a as re,i as ie,n as ae,t as oe}from"./zod.js";import{t as se}from"./error-banner.js";import{t as ce}from"./form-actions.js";import{t as le}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{f as m}from"./ec22.js";import{t as ue}from"./textarea.js";var h=t(),g=e();function _(){let e=(0,h.c)(55),t=u(),{data:a}=n(ne),_=ee(),v;e[0]===a.Volumes?v=e[1]:(v=a.Volumes??[],e[0]=a.Volumes,e[1]=v);let y=v,{volumeId:b}=te.useSearch(),x=b??y[0]?.VolumeId??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=oe(m),e[2]=S):S=e[2];let C;e[3]===x?C=e[4]:(C={resolver:S,defaultValues:{volumeId:x,description:``}},e[3]=x,e[4]=C);let{control:w,handleSubmit:T,register:E,formState:D}=ie(C),{errors:O,isSubmitting:k}=D,A;e[5]===w?A=e[6]:(A={control:w},e[5]=w,e[6]=A);let j=re(A),M;e[7]===j?M=e[8]:(M=e=>e?j[e]:void 0,e[7]=j,e[8]=M);let N=M,P;e[9]!==_||e[10]!==t?(P=async e=>{await _.mutateAsync(e),t({to:`/ec2/describe-snapshots`})},e[9]=_,e[10]=t,e[11]=P):P=e[11];let F=P,I,L;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(r,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,g.jsx)(le,{title:`Create Snapshot`}),e[12]=I,e[13]=L):(I=e[12],L=e[13]);let R;e[14]===_.error?R=e[15]:(R=_.error&&(0,g.jsx)(se,{error:_.error,msg:`Failed to create snapshot`}),e[14]=_.error,e[15]=R);let z;e[16]!==T||e[17]!==F?(z=T(F),e[16]=T,e[17]=F,e[18]=z):z=e[18];let B;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),e[19]=B):B=e[19];let V;e[20]!==O.volumeId||e[21]!==y?(V=e=>{let{field:t}=e;return(0,g.jsxs)(c,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,g.jsx)(s,{"aria-invalid":!!O.volumeId,className:`w-full`,id:`volumeId`,children:(0,g.jsx)(i,{})}),(0,g.jsx)(o,{children:y.map(de)})]})},e[20]=O.volumeId,e[21]=y,e[22]=V):V=e[22];let H;e[23]!==w||e[24]!==V?(H=(0,g.jsx)(ae,{control:w,name:`volumeId`,render:V}),e[23]=w,e[24]=V,e[25]=H):H=e[25];let U;e[26]===O.volumeId?U=e[27]:(U=(0,g.jsx)(f,{errors:[O.volumeId]}),e[26]=O.volumeId,e[27]=U);let W;e[28]!==H||e[29]!==U?(W=(0,g.jsxs)(p,{children:[B,H,U]}),e[28]=H,e[29]=U,e[30]=W):W=e[30];let G;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[31]=G):G=e[31];let K;e[32]===E?K=e[33]:(K=E(`description`),e[32]=E,e[33]=K);let q;e[34]===K?q=e[35]:(q=(0,g.jsxs)(p,{children:[G,(0,g.jsx)(ue,{id:`description`,placeholder:`Snapshot description`,...K})]}),e[34]=K,e[35]=q);let J;e[36]===N?J=e[37]:(J=fe(N),e[36]=N,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,g.jsx)(l,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/ec2/describe-snapshots`}),e[40]=t,e[41]=X);let Z;e[42]!==_.isPending||e[43]!==k||e[44]!==X?(Z=(0,g.jsx)(ce,{isPending:_.isPending,isSubmitting:k,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),e[42]=_.isPending,e[43]=k,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==z||e[47]!==W||e[48]!==q||e[49]!==Y||e[50]!==Z?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),e[46]=z,e[47]=W,e[48]=q,e[49]=Y,e[50]=Z,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==R?($=(0,g.jsxs)(g.Fragment,{children:[I,L,R,Q]}),e[52]=Q,e[53]=R,e[54]=$):$=e[54],$}function de(e){return(0,g.jsxs)(a,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function fe(e){let t=e(`volumeId`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./back-link.js";import{c as i,i as a,n as o,s,t as c}from"./select.js";import{t as l}from"./cli-command-panel.js";import{y as ee}from"./ec2.js";import{$t as te,Qr as u,U as ne}from"./index.js";import{a as re,i as ie,n as ae,t as oe}from"./zod.js";import{t as se}from"./error-banner.js";import{t as ce}from"./form-actions.js";import{t as le}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{f as m}from"./ec22.js";import{t as ue}from"./textarea.js";var h=t(),g=e();function _(){let e=(0,h.c)(55),t=u(),{data:a}=n(te),_=ee(),v;e[0]===a.Volumes?v=e[1]:(v=a.Volumes??[],e[0]=a.Volumes,e[1]=v);let y=v,{volumeId:b}=ne.useSearch(),x=b??y[0]?.VolumeId??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=oe(m),e[2]=S):S=e[2];let C;e[3]===x?C=e[4]:(C={resolver:S,defaultValues:{volumeId:x,description:``}},e[3]=x,e[4]=C);let{control:w,handleSubmit:T,register:E,formState:D}=ie(C),{errors:O,isSubmitting:k}=D,A;e[5]===w?A=e[6]:(A={control:w},e[5]=w,e[6]=A);let j=re(A),M;e[7]===j?M=e[8]:(M=e=>e?j[e]:void 0,e[7]=j,e[8]=M);let N=M,P;e[9]!==_||e[10]!==t?(P=async e=>{await _.mutateAsync(e),t({to:`/ec2/describe-snapshots`})},e[9]=_,e[10]=t,e[11]=P):P=e[11];let F=P,I,L;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(r,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,g.jsx)(le,{title:`Create Snapshot`}),e[12]=I,e[13]=L):(I=e[12],L=e[13]);let R;e[14]===_.error?R=e[15]:(R=_.error&&(0,g.jsx)(se,{error:_.error,msg:`Failed to create snapshot`}),e[14]=_.error,e[15]=R);let z;e[16]!==T||e[17]!==F?(z=T(F),e[16]=T,e[17]=F,e[18]=z):z=e[18];let B;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),e[19]=B):B=e[19];let V;e[20]!==O.volumeId||e[21]!==y?(V=e=>{let{field:t}=e;return(0,g.jsxs)(c,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,g.jsx)(s,{"aria-invalid":!!O.volumeId,className:`w-full`,id:`volumeId`,children:(0,g.jsx)(i,{})}),(0,g.jsx)(o,{children:y.map(de)})]})},e[20]=O.volumeId,e[21]=y,e[22]=V):V=e[22];let H;e[23]!==w||e[24]!==V?(H=(0,g.jsx)(ae,{control:w,name:`volumeId`,render:V}),e[23]=w,e[24]=V,e[25]=H):H=e[25];let U;e[26]===O.volumeId?U=e[27]:(U=(0,g.jsx)(f,{errors:[O.volumeId]}),e[26]=O.volumeId,e[27]=U);let W;e[28]!==H||e[29]!==U?(W=(0,g.jsxs)(p,{children:[B,H,U]}),e[28]=H,e[29]=U,e[30]=W):W=e[30];let G;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[31]=G):G=e[31];let K;e[32]===E?K=e[33]:(K=E(`description`),e[32]=E,e[33]=K);let q;e[34]===K?q=e[35]:(q=(0,g.jsxs)(p,{children:[G,(0,g.jsx)(ue,{id:`description`,placeholder:`Snapshot description`,...K})]}),e[34]=K,e[35]=q);let J;e[36]===N?J=e[37]:(J=fe(N),e[36]=N,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,g.jsx)(l,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/ec2/describe-snapshots`}),e[40]=t,e[41]=X);let Z;e[42]!==_.isPending||e[43]!==k||e[44]!==X?(Z=(0,g.jsx)(ce,{isPending:_.isPending,isSubmitting:k,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),e[42]=_.isPending,e[43]=k,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==z||e[47]!==W||e[48]!==q||e[49]!==Y||e[50]!==Z?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),e[46]=z,e[47]=W,e[48]=q,e[49]=Y,e[50]=Z,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==R?($=(0,g.jsxs)(g.Fragment,{children:[I,L,R,Q]}),e[52]=Q,e[53]=R,e[54]=$):$=e[54],$}function de(e){return(0,g.jsxs)(a,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function fe(e){let t=e(`volumeId`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\ --volume-id`},{type:`value`,value:` ${n||``}`}];return i&&a.push({type:`flag`,value:` \\ --description`},{type:`value`,value:` "${i}"`}),[{label:`Create Snapshot`,parts:a}]}export{_ as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-subnet.js b/spinifex/services/spinifexui/frontend/dist/assets/create-subnet.js index a0b25577b..48028fc90 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-subnet.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-subnet.js @@ -1,4 +1,4 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{Ut as r}from"./auth.js";import{t as ee}from"./back-link.js";import{c as i,i as a,n as o,s,t as te}from"./select.js";import{t as ne}from"./cli-command-panel.js";import{b as re}from"./ec2.js";import{$t as ie,Et as ae,Xr as oe,er as se}from"./index.js";import{a as ce,i as le,n as ue,t as de}from"./zod.js";import{t as fe}from"./error-banner.js";import{t as pe}from"./form-actions.js";import{t as me}from"./page-heading.js";import{a as c,r as he,t as l}from"./field.js";import{p as ge}from"./ec22.js";var _e=t(),u=e();function d(){let e=(0,_e.c)(74),t=oe(),{data:r}=n(ie),{data:d}=n(ae),f=re(),p;e[0]===r.Vpcs?p=e[1]:(p=r.Vpcs??[],e[0]=r.Vpcs,e[1]=p);let m=p,h;e[2]===d.AvailabilityZones?h=e[3]:(h=d.AvailabilityZones??[],e[2]=d.AvailabilityZones,e[3]=h);let g=h,_;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=de(ge),e[4]=_):_=e[4];let v=m[0]?.VpcId??``,y;e[5]===v?y=e[6]:(y={resolver:_,defaultValues:{vpcId:v,cidrBlock:`10.0.1.0/24`,availabilityZone:void 0,mapPublicIpOnLaunch:!1}},e[5]=v,e[6]=y);let{control:b,handleSubmit:x,register:S,formState:Se}=le(y),{errors:C,isSubmitting:w}=Se,T;e[7]===b?T=e[8]:(T={control:b},e[7]=b,e[8]=T);let E=ce(T),D;e[9]===E?D=e[10]:(D=e=>e?E[e]:void 0,e[9]=E,e[10]=D);let Ce=D,O;e[11]!==f||e[12]!==t?(O=async e=>{let n=(await f.mutateAsync(e)).Subnet?.SubnetId;t(n?{to:`/ec2/describe-subnets/$id`,params:{id:n}}:{to:`/ec2/describe-subnets`})},e[11]=f,e[12]=t,e[13]=O):O=e[13];let we=O,k,A;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,u.jsx)(ee,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),k=(0,u.jsx)(me,{title:`Create Subnet`}),e[14]=k,e[15]=A):(k=e[14],A=e[15]);let j;e[16]===f.error?j=e[17]:(j=f.error&&(0,u.jsx)(fe,{error:f.error,msg:`Failed to create subnet`}),e[16]=f.error,e[17]=j);let M;e[18]!==x||e[19]!==we?(M=x(we),e[18]=x,e[19]=we,e[20]=M):M=e[20];let N;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[21]=N):N=e[21];let P;e[22]!==C.vpcId||e[23]!==m?(P=e=>{let{field:t}=e;return(0,u.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,u.jsx)(s,{"aria-invalid":!!C.vpcId,className:`w-full`,id:`vpcId`,children:(0,u.jsx)(i,{})}),(0,u.jsx)(o,{children:m.map(be)})]})},e[22]=C.vpcId,e[23]=m,e[24]=P):P=e[24];let F;e[25]!==b||e[26]!==P?(F=(0,u.jsx)(ue,{control:b,name:`vpcId`,render:P}),e[25]=b,e[26]=P,e[27]=F):F=e[27];let I;e[28]===C.vpcId?I=e[29]:(I=(0,u.jsx)(he,{errors:[C.vpcId]}),e[28]=C.vpcId,e[29]=I);let L;e[30]!==F||e[31]!==I?(L=(0,u.jsxs)(l,{children:[N,F,I]}),e[30]=F,e[31]=I,e[32]=L):L=e[32];let R;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`cidrBlock`,children:`CIDR Block`})}),e[33]=R):R=e[33];let Te=!!C.cidrBlock,z;e[34]===S?z=e[35]:(z=S(`cidrBlock`),e[34]=S,e[35]=z);let B;e[36]!==Te||e[37]!==z?(B=(0,u.jsx)(se,{"aria-invalid":Te,id:`cidrBlock`,placeholder:`10.0.1.0/24`,...z}),e[36]=Te,e[37]=z,e[38]=B):B=e[38];let V;e[39]===C.cidrBlock?V=e[40]:(V=(0,u.jsx)(he,{errors:[C.cidrBlock]}),e[39]=C.cidrBlock,e[40]=V);let H;e[41]!==B||e[42]!==V?(H=(0,u.jsxs)(l,{children:[R,B,V]}),e[41]=B,e[42]=V,e[43]=H):H=e[43];let U;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone (optional)`})}),e[44]=U):U=e[44];let W;e[45]===g?W=e[46]:(W=e=>{let{field:t}=e;return(0,u.jsxs)(te,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,u.jsx)(s,{className:`w-full`,id:`availabilityZone`,children:(0,u.jsx)(i,{})}),(0,u.jsxs)(o,{children:[(0,u.jsx)(a,{value:`none`,children:`none`}),g.map(ye)]})]})},e[45]=g,e[46]=W);let G;e[47]!==b||e[48]!==W?(G=(0,u.jsxs)(l,{children:[U,(0,u.jsx)(ue,{control:b,name:`availabilityZone`,render:W})]}),e[47]=b,e[48]=W,e[49]=G):G=e[49];let K;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,u.jsx)(c,{children:`Auto-assign public IPv4`}),e[50]=K):K=e[50];let q;e[51]===b?q=e[52]:(q=(0,u.jsxs)(l,{children:[K,(0,u.jsx)(ue,{control:b,name:`mapPublicIpOnLaunch`,render:ve})]}),e[51]=b,e[52]=q);let J;e[53]===Ce?J=e[54]:(J=xe(Ce),e[53]=Ce,e[54]=J);let Y;e[55]===J?Y=e[56]:(Y=(0,u.jsx)(ne,{commands:J}),e[55]=J,e[56]=Y);let X;e[57]===t?X=e[58]:(X=async()=>await t({to:`/ec2/describe-subnets`}),e[57]=t,e[58]=X);let Z;e[59]!==f.isPending||e[60]!==w||e[61]!==X?(Z=(0,u.jsx)(pe,{isPending:f.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Subnet`}),e[59]=f.isPending,e[60]=w,e[61]=X,e[62]=Z):Z=e[62];let Q;e[63]!==M||e[64]!==L||e[65]!==H||e[66]!==G||e[67]!==q||e[68]!==Y||e[69]!==Z?(Q=(0,u.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:M,children:[L,H,G,q,Y,Z]}),e[63]=M,e[64]=L,e[65]=H,e[66]=G,e[67]=q,e[68]=Y,e[69]=Z,e[70]=Q):Q=e[70];let $;return e[71]!==j||e[72]!==Q?($=(0,u.jsxs)(u.Fragment,{children:[A,k,j,Q]}),e[71]=j,e[72]=Q,e[73]=$):$=e[73],$}function ve(e){let{field:t}=e;return(0,u.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,u.jsx)(`input`,{"aria-label":`Enable auto-assign public IPv4 address`,checked:t.value??!1,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Enable auto-assign public IPv4 address`]})}function ye(e){return(0,u.jsx)(a,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function be(e){let t=r(e.Tags);return(0,u.jsx)(a,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function xe(e){let t=e(`vpcId`),n=typeof t==`string`?t:``,r=e(`cidrBlock`),ee=typeof r==`string`?r:``,i=e(`availabilityZone`),a=typeof i==`string`?i:``,o=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-subnet`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{Ut as r}from"./auth.js";import{t as ee}from"./back-link.js";import{c as i,i as a,n as o,s,t as te}from"./select.js";import{t as ne}from"./cli-command-panel.js";import{b as re}from"./ec2.js";import{Ot as ie,Qr as ae,nr as oe,tn as se}from"./index.js";import{a as ce,i as le,n as ue,t as de}from"./zod.js";import{t as fe}from"./error-banner.js";import{t as pe}from"./form-actions.js";import{t as me}from"./page-heading.js";import{a as c,r as he,t as l}from"./field.js";import{p as ge}from"./ec22.js";var _e=t(),u=e();function d(){let e=(0,_e.c)(74),t=ae(),{data:r}=n(se),{data:d}=n(ie),f=re(),p;e[0]===r.Vpcs?p=e[1]:(p=r.Vpcs??[],e[0]=r.Vpcs,e[1]=p);let m=p,h;e[2]===d.AvailabilityZones?h=e[3]:(h=d.AvailabilityZones??[],e[2]=d.AvailabilityZones,e[3]=h);let g=h,_;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=de(ge),e[4]=_):_=e[4];let v=m[0]?.VpcId??``,y;e[5]===v?y=e[6]:(y={resolver:_,defaultValues:{vpcId:v,cidrBlock:`10.0.1.0/24`,availabilityZone:void 0,mapPublicIpOnLaunch:!1}},e[5]=v,e[6]=y);let{control:b,handleSubmit:x,register:S,formState:Se}=le(y),{errors:C,isSubmitting:w}=Se,T;e[7]===b?T=e[8]:(T={control:b},e[7]=b,e[8]=T);let E=ce(T),D;e[9]===E?D=e[10]:(D=e=>e?E[e]:void 0,e[9]=E,e[10]=D);let Ce=D,O;e[11]!==f||e[12]!==t?(O=async e=>{let n=(await f.mutateAsync(e)).Subnet?.SubnetId;t(n?{to:`/ec2/describe-subnets/$id`,params:{id:n}}:{to:`/ec2/describe-subnets`})},e[11]=f,e[12]=t,e[13]=O):O=e[13];let we=O,k,A;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,u.jsx)(ee,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),k=(0,u.jsx)(me,{title:`Create Subnet`}),e[14]=k,e[15]=A):(k=e[14],A=e[15]);let j;e[16]===f.error?j=e[17]:(j=f.error&&(0,u.jsx)(fe,{error:f.error,msg:`Failed to create subnet`}),e[16]=f.error,e[17]=j);let M;e[18]!==x||e[19]!==we?(M=x(we),e[18]=x,e[19]=we,e[20]=M):M=e[20];let N;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[21]=N):N=e[21];let P;e[22]!==C.vpcId||e[23]!==m?(P=e=>{let{field:t}=e;return(0,u.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,u.jsx)(s,{"aria-invalid":!!C.vpcId,className:`w-full`,id:`vpcId`,children:(0,u.jsx)(i,{})}),(0,u.jsx)(o,{children:m.map(be)})]})},e[22]=C.vpcId,e[23]=m,e[24]=P):P=e[24];let F;e[25]!==b||e[26]!==P?(F=(0,u.jsx)(ue,{control:b,name:`vpcId`,render:P}),e[25]=b,e[26]=P,e[27]=F):F=e[27];let I;e[28]===C.vpcId?I=e[29]:(I=(0,u.jsx)(he,{errors:[C.vpcId]}),e[28]=C.vpcId,e[29]=I);let L;e[30]!==F||e[31]!==I?(L=(0,u.jsxs)(l,{children:[N,F,I]}),e[30]=F,e[31]=I,e[32]=L):L=e[32];let R;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`cidrBlock`,children:`CIDR Block`})}),e[33]=R):R=e[33];let Te=!!C.cidrBlock,z;e[34]===S?z=e[35]:(z=S(`cidrBlock`),e[34]=S,e[35]=z);let B;e[36]!==Te||e[37]!==z?(B=(0,u.jsx)(oe,{"aria-invalid":Te,id:`cidrBlock`,placeholder:`10.0.1.0/24`,...z}),e[36]=Te,e[37]=z,e[38]=B):B=e[38];let V;e[39]===C.cidrBlock?V=e[40]:(V=(0,u.jsx)(he,{errors:[C.cidrBlock]}),e[39]=C.cidrBlock,e[40]=V);let H;e[41]!==B||e[42]!==V?(H=(0,u.jsxs)(l,{children:[R,B,V]}),e[41]=B,e[42]=V,e[43]=H):H=e[43];let U;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone (optional)`})}),e[44]=U):U=e[44];let W;e[45]===g?W=e[46]:(W=e=>{let{field:t}=e;return(0,u.jsxs)(te,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,u.jsx)(s,{className:`w-full`,id:`availabilityZone`,children:(0,u.jsx)(i,{})}),(0,u.jsxs)(o,{children:[(0,u.jsx)(a,{value:`none`,children:`none`}),g.map(ye)]})]})},e[45]=g,e[46]=W);let G;e[47]!==b||e[48]!==W?(G=(0,u.jsxs)(l,{children:[U,(0,u.jsx)(ue,{control:b,name:`availabilityZone`,render:W})]}),e[47]=b,e[48]=W,e[49]=G):G=e[49];let K;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,u.jsx)(c,{children:`Auto-assign public IPv4`}),e[50]=K):K=e[50];let q;e[51]===b?q=e[52]:(q=(0,u.jsxs)(l,{children:[K,(0,u.jsx)(ue,{control:b,name:`mapPublicIpOnLaunch`,render:ve})]}),e[51]=b,e[52]=q);let J;e[53]===Ce?J=e[54]:(J=xe(Ce),e[53]=Ce,e[54]=J);let Y;e[55]===J?Y=e[56]:(Y=(0,u.jsx)(ne,{commands:J}),e[55]=J,e[56]=Y);let X;e[57]===t?X=e[58]:(X=async()=>await t({to:`/ec2/describe-subnets`}),e[57]=t,e[58]=X);let Z;e[59]!==f.isPending||e[60]!==w||e[61]!==X?(Z=(0,u.jsx)(pe,{isPending:f.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Subnet`}),e[59]=f.isPending,e[60]=w,e[61]=X,e[62]=Z):Z=e[62];let Q;e[63]!==M||e[64]!==L||e[65]!==H||e[66]!==G||e[67]!==q||e[68]!==Y||e[69]!==Z?(Q=(0,u.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:M,children:[L,H,G,q,Y,Z]}),e[63]=M,e[64]=L,e[65]=H,e[66]=G,e[67]=q,e[68]=Y,e[69]=Z,e[70]=Q):Q=e[70];let $;return e[71]!==j||e[72]!==Q?($=(0,u.jsxs)(u.Fragment,{children:[A,k,j,Q]}),e[71]=j,e[72]=Q,e[73]=$):$=e[73],$}function ve(e){let{field:t}=e;return(0,u.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,u.jsx)(`input`,{"aria-label":`Enable auto-assign public IPv4 address`,checked:t.value??!1,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Enable auto-assign public IPv4 address`]})}function ye(e){return(0,u.jsx)(a,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function be(e){let t=r(e.Tags);return(0,u.jsx)(a,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function xe(e){let t=e(`vpcId`),n=typeof t==`string`?t:``,r=e(`cidrBlock`),ee=typeof r==`string`?r:``,i=e(`availabilityZone`),a=typeof i==`string`?i:``,o=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-subnet`},{type:`flag`,value:` \\ --vpc-id`},{type:`value`,value:` ${n||``}`},{type:`flag`,value:` \\ --cidr-block`},{type:`value`,value:` ${ee||``}`}];a&&o.push({type:`flag`,value:` \\ --availability-zone`},{type:`value`,value:` ${a}`});let s=[{label:`Create Subnet`,parts:o}];return e(`mapPublicIpOnLaunch`)===!0&&s.push({label:`Enable auto-assign public IPv4`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 modify-subnet-attribute`},{type:`flag`,value:` \\ diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-target-group.js b/spinifex/services/spinifexui/frontend/dist/assets/create-target-group.js index c0c94dcc1..7f77db3b9 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-target-group.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-target-group.js @@ -1,4 +1,4 @@ -import{n as e}from"./compiler-runtime.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{i}from"./elbv2.js";import{$t as a,Xr as o}from"./index.js";import{i as s,t as c}from"./zod.js";import{t as l}from"./error-banner.js";import{t as u}from"./form-actions.js";import{t as d}from"./page-heading.js";import{t as f}from"./target-group-form.js";import{a as p}from"./elbv22.js";var m=e();function h(){let e=o(),{data:h}=t(a),_=i(),v=h.Vpcs??[],y=s({resolver:c(p),defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:v[0]?.VpcId??``,healthCheck:{protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tags:[]}}),{handleSubmit:b,watch:x,formState:{isSubmitting:S}}=y;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(n,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,m.jsx)(d,{title:`Create Target Group`}),_.error&&(0,m.jsx)(l,{error:_.error,msg:`Failed to create target group`}),(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:b(async t=>{try{let n=(await _.mutateAsync(t)).TargetGroups?.[0]?.TargetGroupArn;e(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}}),children:[(0,m.jsx)(f,{form:y,vpcs:v}),(0,m.jsx)(r,{commands:g(x)}),(0,m.jsx)(u,{isPending:_.isPending,isSubmitting:S,onCancel:async()=>await e({to:`/ec2/describe-target-groups`}),pendingLabel:`Creating…`,submitLabel:`Create Target Group`})]})]})}function g(e){let t=t=>{let n=e(t);return typeof n==`string`?n:``},n=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},r=t(`name`),i=t(`protocol`)||`HTTP`,a=n(`port`),o=t(`vpcId`),s=t(`healthCheck.protocol`)||`HTTP`,c=t(`healthCheck.path`)||`/`,l=t(`healthCheck.port`)||`traffic-port`,u=n(`healthCheck.intervalSeconds`),d=n(`healthCheck.timeoutSeconds`),f=n(`healthCheck.healthyThresholdCount`),p=n(`healthCheck.unhealthyThresholdCount`),m=t(`healthCheck.matcher`)||`200`,h=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ +import{n as e}from"./compiler-runtime.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{i}from"./elbv2.js";import{Qr as a,tn as o}from"./index.js";import{i as s,t as c}from"./zod.js";import{t as l}from"./error-banner.js";import{t as u}from"./form-actions.js";import{t as d}from"./page-heading.js";import{t as f}from"./target-group-form.js";import{a as p}from"./elbv22.js";var m=e();function h(){let e=a(),{data:h}=t(o),_=i(),v=h.Vpcs??[],y=s({resolver:c(p),defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:v[0]?.VpcId??``,healthCheck:{protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tags:[]}}),{handleSubmit:b,watch:x,formState:{isSubmitting:S}}=y;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(n,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,m.jsx)(d,{title:`Create Target Group`}),_.error&&(0,m.jsx)(l,{error:_.error,msg:`Failed to create target group`}),(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:b(async t=>{try{let n=(await _.mutateAsync(t)).TargetGroups?.[0]?.TargetGroupArn;e(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}}),children:[(0,m.jsx)(f,{form:y,vpcs:v}),(0,m.jsx)(r,{commands:g(x)}),(0,m.jsx)(u,{isPending:_.isPending,isSubmitting:S,onCancel:async()=>await e({to:`/ec2/describe-target-groups`}),pendingLabel:`Creating…`,submitLabel:`Create Target Group`})]})]})}function g(e){let t=t=>{let n=e(t);return typeof n==`string`?n:``},n=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},r=t(`name`),i=t(`protocol`)||`HTTP`,a=n(`port`),o=t(`vpcId`),s=t(`healthCheck.protocol`)||`HTTP`,c=t(`healthCheck.path`)||`/`,l=t(`healthCheck.port`)||`traffic-port`,u=n(`healthCheck.intervalSeconds`),d=n(`healthCheck.timeoutSeconds`),f=n(`healthCheck.healthyThresholdCount`),p=n(`healthCheck.unhealthyThresholdCount`),m=t(`healthCheck.matcher`)||`200`,h=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ --name`},{type:`value`,value:` ${r||``}`},{type:`flag`,value:` \\ --protocol`},{type:`value`,value:` ${i}`},{type:`flag`,value:` \\ --port`},{type:`value`,value:` ${a??80}`},{type:`flag`,value:` \\ diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-user.js b/spinifex/services/spinifexui/frontend/dist/assets/create-user.js index 4e46192b8..b5b347836 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-user.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-user.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{c as i}from"./iam.js";import{Xr as a,er as o}from"./index.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{a as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=a(),y=i(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=c(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=s(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-users`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(n,{to:`/iam/list-users`,children:`Back to users`}),P=(0,v.jsx)(f,{title:`Create User`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create user`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),e[15]=L):L=e[15];let R=!!T.userName,z;e[16]===S?z=e[17]:(z=S(`userName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(o,{"aria-invalid":R,id:`userName`,placeholder:`my-user...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.userName?V=e[22]:(V=(0,v.jsx)(m,{errors:[T.userName]}),e[21]=T.userName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(h,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(o,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(m,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(h,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(r,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-users`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create User`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`userName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${n||``}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create User`,parts:a}]}export{y as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{c as i}from"./iam.js";import{Qr as a,nr as o}from"./index.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{a as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=a(),y=i(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=c(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=s(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-users`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(n,{to:`/iam/list-users`,children:`Back to users`}),P=(0,v.jsx)(f,{title:`Create User`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create user`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),e[15]=L):L=e[15];let R=!!T.userName,z;e[16]===S?z=e[17]:(z=S(`userName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(o,{"aria-invalid":R,id:`userName`,placeholder:`my-user...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.userName?V=e[22]:(V=(0,v.jsx)(m,{errors:[T.userName]}),e[21]=T.userName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(h,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(o,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(m,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(h,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(r,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-users`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create User`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`userName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${n||``}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create User`,parts:a}]}export{y as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-volume.js b/spinifex/services/spinifexui/frontend/dist/assets/create-volume.js index c2aa9ace5..7b9c1325c 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-volume.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-volume.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./back-link.js";import{c as i,i as a,n as o,s,t as c}from"./select.js";import{t as l}from"./cli-command-panel.js";import{x as u}from"./ec2.js";import{Et as d,Xr as ee,er as te}from"./index.js";import{i as ne,n as re,t as ie}from"./zod.js";import{t as ae}from"./error-banner.js";import{t as oe}from"./form-actions.js";import{t as se}from"./page-heading.js";import{a as f,r as p,t as m}from"./field.js";import{m as h}from"./ec22.js";var g=t(),_=e();function v(){let e=(0,g.c)(57),t=ee(),{data:a}=n(d),v=u(),y;e[0]===a.AvailabilityZones?y=e[1]:(y=a.AvailabilityZones??[],e[0]=a.AvailabilityZones,e[1]=y);let b=y,x=b[0]?.ZoneName??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=ie(h),e[2]=S):S=e[2];let C;e[3]===x?C=e[4]:(C={resolver:S,defaultValues:{size:1,availabilityZone:x}},e[3]=x,e[4]=C);let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=ne(C),{errors:k,isSubmitting:A}=O,j;e[5]!==v||e[6]!==t?(j=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-volumes`})},e[5]=v,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(r,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,_.jsx)(se,{title:`Create Volume`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===v.error?F=e[11]:(F=v.error&&(0,_.jsx)(ae,{error:v.error,msg:`Failed to create volume`}),e[10]=v.error,e[11]=F);let I;e[12]!==T||e[13]!==M?(I=T(M),e[12]=T,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),e[15]=L):L=e[15];let R=!!k.size,z;e[16]===E?z=e[17]:(z=E(`size`,{valueAsNumber:!0}),e[16]=E,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,_.jsx)(te,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===k.size?V=e[22]:(V=(0,_.jsx)(p,{errors:[k.size]}),e[21]=k.size,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,_.jsxs)(m,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),e[26]=U):U=e[26];let W;e[27]!==b||e[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,_.jsxs)(c,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,_.jsx)(s,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,_.jsx)(i,{})}),(0,_.jsx)(o,{children:b.map(ce)})]})},e[27]=b,e[28]=k.availabilityZone,e[29]=W):W=e[29];let G;e[30]!==w||e[31]!==W?(G=(0,_.jsx)(re,{control:w,name:`availabilityZone`,render:W}),e[30]=w,e[31]=W,e[32]=G):G=e[32];let K;e[33]===k.availabilityZone?K=e[34]:(K=(0,_.jsx)(p,{errors:[k.availabilityZone]}),e[33]=k.availabilityZone,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,_.jsxs)(m,{children:[U,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===D?J=e[39]:(J=le(D),e[38]=D,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,_.jsx)(l,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>await t({to:`/ec2/describe-volumes`}),e[42]=t,e[43]=X);let Z;e[44]!==v.isPending||e[45]!==A||e[46]!==X?(Z=(0,_.jsx)(oe,{isPending:v.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),e[44]=v.isPending,e[45]=A,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==H||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==I?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[48]=H,e[49]=q,e[50]=Y,e[51]=Z,e[52]=I,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==F?($=(0,_.jsxs)(_.Fragment,{children:[N,P,F,Q]}),e[54]=Q,e[55]=F,e[56]=$):$=e[56],$}function ce(e){return(0,_.jsx)(a,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function le(e){let t=e(`size`),n=typeof t==`number`?t:0,r=e(`availabilityZone`),i=typeof r==`string`?r:``;return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./back-link.js";import{c as i,i as a,n as o,s,t as c}from"./select.js";import{t as l}from"./cli-command-panel.js";import{x as u}from"./ec2.js";import{Ot as d,Qr as ee,nr as te}from"./index.js";import{i as ne,n as re,t as ie}from"./zod.js";import{t as ae}from"./error-banner.js";import{t as oe}from"./form-actions.js";import{t as se}from"./page-heading.js";import{a as f,r as p,t as m}from"./field.js";import{m as h}from"./ec22.js";var g=t(),_=e();function v(){let e=(0,g.c)(57),t=ee(),{data:a}=n(d),v=u(),y;e[0]===a.AvailabilityZones?y=e[1]:(y=a.AvailabilityZones??[],e[0]=a.AvailabilityZones,e[1]=y);let b=y,x=b[0]?.ZoneName??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=ie(h),e[2]=S):S=e[2];let C;e[3]===x?C=e[4]:(C={resolver:S,defaultValues:{size:1,availabilityZone:x}},e[3]=x,e[4]=C);let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=ne(C),{errors:k,isSubmitting:A}=O,j;e[5]!==v||e[6]!==t?(j=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-volumes`})},e[5]=v,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(r,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,_.jsx)(se,{title:`Create Volume`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===v.error?F=e[11]:(F=v.error&&(0,_.jsx)(ae,{error:v.error,msg:`Failed to create volume`}),e[10]=v.error,e[11]=F);let I;e[12]!==T||e[13]!==M?(I=T(M),e[12]=T,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),e[15]=L):L=e[15];let R=!!k.size,z;e[16]===E?z=e[17]:(z=E(`size`,{valueAsNumber:!0}),e[16]=E,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,_.jsx)(te,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===k.size?V=e[22]:(V=(0,_.jsx)(p,{errors:[k.size]}),e[21]=k.size,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,_.jsxs)(m,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(f,{children:(0,_.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),e[26]=U):U=e[26];let W;e[27]!==b||e[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,_.jsxs)(c,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,_.jsx)(s,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,_.jsx)(i,{})}),(0,_.jsx)(o,{children:b.map(ce)})]})},e[27]=b,e[28]=k.availabilityZone,e[29]=W):W=e[29];let G;e[30]!==w||e[31]!==W?(G=(0,_.jsx)(re,{control:w,name:`availabilityZone`,render:W}),e[30]=w,e[31]=W,e[32]=G):G=e[32];let K;e[33]===k.availabilityZone?K=e[34]:(K=(0,_.jsx)(p,{errors:[k.availabilityZone]}),e[33]=k.availabilityZone,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,_.jsxs)(m,{children:[U,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===D?J=e[39]:(J=le(D),e[38]=D,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,_.jsx)(l,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>await t({to:`/ec2/describe-volumes`}),e[42]=t,e[43]=X);let Z;e[44]!==v.isPending||e[45]!==A||e[46]!==X?(Z=(0,_.jsx)(oe,{isPending:v.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),e[44]=v.isPending,e[45]=A,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==H||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==I?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[48]=H,e[49]=q,e[50]=Y,e[51]=Z,e[52]=I,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==F?($=(0,_.jsxs)(_.Fragment,{children:[N,P,F,Q]}),e[54]=Q,e[55]=F,e[56]=$):$=e[56],$}function ce(e){return(0,_.jsx)(a,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function le(e){let t=e(`size`),n=typeof t==`number`?t:0,r=e(`availabilityZone`),i=typeof r==`string`?r:``;return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\ --size`},{type:`value`,value:` ${n||1}`},{type:`flag`,value:` \\ --availability-zone`},{type:`value`,value:` ${i||``}`}]}]}export{v as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-vpc.js b/spinifex/services/spinifexui/frontend/dist/assets/create-vpc.js index 84e23c13f..398bd2695 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-vpc.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-vpc.js @@ -1,4 +1,4 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./back-link.js";import{t as a}from"./chevron-down.js";import{t as o}from"./chevron-right.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./cli-command-panel.js";import{t as p}from"./button.js";import{C as m,S as h}from"./ec2.js";import{Xr as g,er as _}from"./index.js";import{i as v,n as y,t as b}from"./zod.js";import{t as x}from"./error-banner.js";import{t as S}from"./form-actions.js";import{t as C}from"./page-heading.js";import{a as w,r as T,t as E}from"./field.js";import{t as D}from"./subnet-calculator.js";import{h as O}from"./ec22.js";var k=r(),A=t(n(),1),j=e();function M(e){let t=(0,k.c)(18),{form:n,type:r,count:i,defaults:s}=e,[c,l]=(0,A.useState)(!1),u=r===`public`?`publicSubnetCidrs`:`privateSubnetCidrs`;if(i===0)return null;let d;t[0]===c?d=t[1]:(d=()=>l(!c),t[0]=c,t[1]=d);let f;t[2]===c?f=t[3]:(f=c?(0,j.jsx)(a,{className:`size-3`}):(0,j.jsx)(o,{className:`size-3`}),t[2]=c,t[3]=f);let m;t[4]!==d||t[5]!==f||t[6]!==r?(m=(0,j.jsxs)(p,{className:`gap-1 px-0 text-xs text-muted-foreground`,onClick:d,type:`button`,variant:`link`,children:[f,`Customize `,r,` subnet CIDR blocks`]}),t[4]=d,t[5]=f,t[6]=r,t[7]=m):m=t[7];let h;t[8]!==i||t[9]!==s||t[10]!==c||t[11]!==u||t[12]!==n||t[13]!==r?(h=c&&(0,j.jsx)(`div`,{className:`mt-2 space-y-2`,children:Array.from({length:i},(e,t)=>(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`w-32 text-xs text-muted-foreground`,children:[r===`public`?`Public`:`Private`,` subnet `,t+1]}),(0,j.jsx)(_,{defaultValue:s[t],placeholder:s[t],...n.register(`${u}.${t}`)})]},t))}),t[8]=i,t[9]=s,t[10]=c,t[11]=u,t[12]=n,t[13]=r,t[14]=h):h=t[14];let g;return t[15]!==m||t[16]!==h?(g=(0,j.jsxs)(`div`,{className:`mt-2`,children:[m,h]}),t[15]=m,t[16]=h,t[17]=g):g=t[17],g}function N(e){let t=(0,k.c)(8),{label:n,cidr:r,variant:i}=e,a=`rounded-md border px-3 py-2 text-xs ${i===`public`?`border-emerald-500/30 bg-emerald-500/10`:`border-blue-500/30 bg-blue-500/10`}`,o;t[0]===n?o=t[1]:(o=(0,j.jsx)(`div`,{className:`font-medium`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,j.jsx)(`div`,{className:`text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;return t[4]!==a||t[5]!==o||t[6]!==s?(c=(0,j.jsxs)(`div`,{className:a,children:[o,s]}),t[4]=a,t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function P(e){let t=(0,k.c)(14),{mode:n,vpcCidr:r,publicSubnets:i,privateSubnets:a,hasIgw:o}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,j.jsx)(`h3`,{className:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`,children:`Preview`}),t[0]=s):s=t[0];let c;t[1]===r?c=t[2]:(c=(0,j.jsxs)(`div`,{className:`mb-3 text-xs font-medium`,children:[`VPC `,(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,r,`)`]})]}),t[1]=r,t[2]=c);let l;t[3]!==o||t[4]!==n||t[5]!==a||t[6]!==i?(l=n===`vpc-and-more`&&(0,j.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Subnets`}),i.map(I),a.map(F),i.length===0&&a.length===0&&(0,j.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`No subnets`})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Route Tables`}),i.length>0&&(0,j.jsxs)(`div`,{className:`rounded-md border border-foreground/10 bg-background px-3 py-2 text-xs`,children:[(0,j.jsx)(`div`,{className:`font-medium`,children:`Public Route Table`}),(0,j.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`0.0.0.0/0 → IGW`}),(0,j.jsx)(`div`,{className:`text-muted-foreground`,children:`local`})]}),a.length>0&&(0,j.jsxs)(`div`,{className:`rounded-md border border-foreground/10 bg-background px-3 py-2 text-xs`,children:[(0,j.jsx)(`div`,{className:`font-medium`,children:`Private Route Table`}),(0,j.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`local`})]})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Network Connections`}),o&&(0,j.jsxs)(`div`,{className:`rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs`,children:[(0,j.jsx)(`div`,{className:`font-medium`,children:`Internet Gateway`}),(0,j.jsx)(`div`,{className:`text-muted-foreground`,children:`Attached to VPC`})]}),!o&&(0,j.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`No internet gateway`})]})]}),t[3]=o,t[4]=n,t[5]=a,t[6]=i,t[7]=l):l=t[7];let u;t[8]===n?u=t[9]:(u=n===`vpc-only`&&(0,j.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`VPC only — no additional resources will be created.`}),t[8]=n,t[9]=u);let d;return t[10]!==c||t[11]!==l||t[12]!==u?(d=(0,j.jsxs)(`div`,{className:`rounded-lg border bg-muted/30 p-4`,children:[s,(0,j.jsxs)(`div`,{className:`rounded-lg border-2 border-dashed border-foreground/20 p-4`,children:[c,l,u]})]}),t[10]=c,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function F(e){return(0,j.jsx)(N,{cidr:e.cidr,label:e.label,variant:`private`},e.cidr)}function I(e){return(0,j.jsx)(N,{cidr:e.cidr,label:e.label,variant:`public`},e.cidr)}var L=[0,1],R=[0,1,2];function z(){let e=g(),t=h(),n=m(),[r,a]=(0,A.useState)(null),o=v({resolver:b(O),defaultValues:{mode:`vpc-only`,namePrefix:``,autoGenerateNames:!0,cidrBlock:`10.0.0.0/16`,tenancy:`default`,natGateway:`none`,publicSubnetCount:1,privateSubnetCount:1,publicSubnetCidrs:[],privateSubnetCidrs:[],tags:[]}}),{handleSubmit:k,register:N,watch:F,control:I,formState:{errors:z,isSubmitting:V}}=o,H=F(`mode`),U=F(`cidrBlock`),W=F(`publicSubnetCount`),G=F(`privateSubnetCount`),K=D(U||`10.0.0.0/16`,H===`vpc-and-more`?W:0,H===`vpc-and-more`?G:0),[q,J]=(0,A.useState)(``),Y=async r=>{if(a(null),r.mode===`vpc-only`){let n=r.autoGenerateNames&&r.namePrefix?`${r.namePrefix}-vpc`:r.namePrefix,i=(await t.mutateAsync({cidrBlock:r.cidrBlock,name:n||void 0})).Vpc?.VpcId;e(i?{to:`/ec2/describe-vpcs/$id`,params:{id:i}}:{to:`/ec2/describe-vpcs`});return}J(`Creating VPC and resources...`);let i=await n.mutateAsync(r);a(i),!i.error&&i.vpcId&&e({to:`/ec2/describe-vpcs/$id`,params:{id:i.vpcId}}),J(``)},X=t.error??n.error,Z=t.isPending||n.isPending;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(i,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,j.jsx)(C,{title:`Create VPC`}),X&&(0,j.jsx)(x,{error:X,msg:`Failed to create VPC`}),r?.error&&(0,j.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,j.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,r.failedStep]}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:r.error.message}),r.created.length>0&&(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources:`}),(0,j.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:r.created.map((e,t)=>(0,j.jsxs)(`li`,{children:[e.type,`: `,e.id]},t))})]})]}),q&&(0,j.jsx)(`div`,{className:`mb-4 max-w-4xl text-sm text-muted-foreground`,children:q}),(0,j.jsxs)(`div`,{className:`flex max-w-6xl gap-8`,children:[(0,j.jsxs)(`form`,{className:`min-w-0 flex-1 space-y-6`,onSubmit:k(Y),children:[(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`Resources to create`}),(0,j.jsx)(y,{control:I,name:`mode`,render:({field:e})=>(0,j.jsxs)(`div`,{className:`flex gap-4`,children:[(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`VPC only`,checked:e.value===`vpc-only`,name:`mode`,onChange:()=>e.onChange(`vpc-only`),type:`radio`}),`VPC only`]}),(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`VPC and more`,checked:e.value===`vpc-and-more`,name:`mode`,onChange:()=>e.onChange(`vpc-and-more`),type:`radio`}),`VPC and more`]})]})})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:(0,j.jsx)(`label`,{htmlFor:`namePrefix`,children:`Name tag auto-generation`})}),(0,j.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,j.jsx)(_,{id:`namePrefix`,placeholder:`project`,...N(`namePrefix`)}),(0,j.jsx)(y,{control:I,name:`autoGenerateNames`,render:({field:e})=>(0,j.jsxs)(`label`,{className:`flex shrink-0 items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Auto-generate name tags`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Auto-generate`]})})]})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:(0,j.jsx)(`label`,{htmlFor:`cidrBlock`,children:`IPv4 CIDR block`})}),(0,j.jsx)(_,{"aria-invalid":!!z.cidrBlock,id:`cidrBlock`,placeholder:`10.0.0.0/16`,...N(`cidrBlock`)}),(0,j.jsx)(T,{errors:[z.cidrBlock]})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`Tenancy`}),(0,j.jsx)(y,{control:I,name:`tenancy`,render:({field:e})=>(0,j.jsxs)(d,{onValueChange:e.onChange,value:e.value,children:[(0,j.jsx)(u,{id:`tenancy`,children:(0,j.jsx)(s,{})}),(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{value:`default`,children:`default`}),(0,j.jsx)(c,{value:`dedicated`,children:`dedicated`})]})]})})]}),H===`vpc-and-more`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`Number of public subnets`}),(0,j.jsx)(y,{control:I,name:`publicSubnetCount`,render:({field:e})=>(0,j.jsx)(`div`,{className:`flex gap-1`,children:L.map(t=>(0,j.jsx)(p,{onClick:()=>e.onChange(t),size:`sm`,type:`button`,variant:e.value===t?`default`:`outline`,children:t},t))})}),(0,j.jsx)(M,{count:W,defaults:K.publicSubnets.map(e=>e.cidr),form:o,type:`public`})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`Number of private subnets`}),(0,j.jsx)(y,{control:I,name:`privateSubnetCount`,render:({field:e})=>(0,j.jsx)(`div`,{className:`flex gap-1`,children:R.map(t=>(0,j.jsx)(p,{onClick:()=>e.onChange(t),size:`sm`,type:`button`,variant:e.value===t?`default`:`outline`,children:t},t))})}),(0,j.jsx)(M,{count:G,defaults:K.privateSubnets.map(e=>e.cidr),form:o,type:`private`})]}),W>0&&G>0&&(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`NAT gateways`}),(0,j.jsx)(y,{control:I,name:`natGateway`,render:({field:e})=>(0,j.jsxs)(d,{onValueChange:e.onChange,value:e.value??`none`,children:[(0,j.jsx)(u,{id:`natGateway`,children:(0,j.jsx)(s,{})}),(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{value:`none`,children:`None`}),(0,j.jsx)(c,{value:`single`,children:`In 1 AZ`})]})]})}),(0,j.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Creates an Elastic IP + NAT gateway in the public subnet and routes private subnet egress (0.0.0.0/0) through it.`})]})]}),(0,j.jsx)(f,{commands:B(F,K)}),(0,j.jsx)(S,{isPending:Z,isSubmitting:V,onCancel:async()=>await e({to:`/ec2/describe-vpcs`}),pendingLabel:`Creating…`,submitLabel:`Create VPC`})]}),(0,j.jsx)(`div`,{className:`hidden min-w-0 flex-1 lg:block`,children:(0,j.jsx)(P,{hasIgw:H===`vpc-and-more`&&W>0,mode:H,privateSubnets:K.privateSubnets,publicSubnets:K.publicSubnets,vpcCidr:U||`10.0.0.0/16`})})]})]})}function B(e,t){let n=e(`mode`),r=typeof n==`string`?n:``,i=e(`cidrBlock`),a=typeof i==`string`?i:``,o=e(`tenancy`),s=typeof o==`string`?o:``,c=e(`natGateway`),l=typeof c==`string`?c:``;if(r===`vpc-only`){let e=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-vpc`},{type:`flag`,value:` \\ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./back-link.js";import{t as a}from"./chevron-down.js";import{t as o}from"./chevron-right.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./cli-command-panel.js";import{t as p}from"./button.js";import{C as m,S as h}from"./ec2.js";import{Qr as g,nr as _}from"./index.js";import{i as v,n as y,t as b}from"./zod.js";import{t as x}from"./error-banner.js";import{t as S}from"./form-actions.js";import{t as C}from"./page-heading.js";import{a as w,r as T,t as E}from"./field.js";import{t as D}from"./subnet-calculator.js";import{h as O}from"./ec22.js";var k=r(),A=t(n(),1),j=e();function M(e){let t=(0,k.c)(18),{form:n,type:r,count:i,defaults:s}=e,[c,l]=(0,A.useState)(!1),u=r===`public`?`publicSubnetCidrs`:`privateSubnetCidrs`;if(i===0)return null;let d;t[0]===c?d=t[1]:(d=()=>l(!c),t[0]=c,t[1]=d);let f;t[2]===c?f=t[3]:(f=c?(0,j.jsx)(a,{className:`size-3`}):(0,j.jsx)(o,{className:`size-3`}),t[2]=c,t[3]=f);let m;t[4]!==d||t[5]!==f||t[6]!==r?(m=(0,j.jsxs)(p,{className:`gap-1 px-0 text-xs text-muted-foreground`,onClick:d,type:`button`,variant:`link`,children:[f,`Customize `,r,` subnet CIDR blocks`]}),t[4]=d,t[5]=f,t[6]=r,t[7]=m):m=t[7];let h;t[8]!==i||t[9]!==s||t[10]!==c||t[11]!==u||t[12]!==n||t[13]!==r?(h=c&&(0,j.jsx)(`div`,{className:`mt-2 space-y-2`,children:Array.from({length:i},(e,t)=>(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`w-32 text-xs text-muted-foreground`,children:[r===`public`?`Public`:`Private`,` subnet `,t+1]}),(0,j.jsx)(_,{defaultValue:s[t],placeholder:s[t],...n.register(`${u}.${t}`)})]},t))}),t[8]=i,t[9]=s,t[10]=c,t[11]=u,t[12]=n,t[13]=r,t[14]=h):h=t[14];let g;return t[15]!==m||t[16]!==h?(g=(0,j.jsxs)(`div`,{className:`mt-2`,children:[m,h]}),t[15]=m,t[16]=h,t[17]=g):g=t[17],g}function N(e){let t=(0,k.c)(8),{label:n,cidr:r,variant:i}=e,a=`rounded-md border px-3 py-2 text-xs ${i===`public`?`border-emerald-500/30 bg-emerald-500/10`:`border-blue-500/30 bg-blue-500/10`}`,o;t[0]===n?o=t[1]:(o=(0,j.jsx)(`div`,{className:`font-medium`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,j.jsx)(`div`,{className:`text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;return t[4]!==a||t[5]!==o||t[6]!==s?(c=(0,j.jsxs)(`div`,{className:a,children:[o,s]}),t[4]=a,t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function P(e){let t=(0,k.c)(14),{mode:n,vpcCidr:r,publicSubnets:i,privateSubnets:a,hasIgw:o}=e,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,j.jsx)(`h3`,{className:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`,children:`Preview`}),t[0]=s):s=t[0];let c;t[1]===r?c=t[2]:(c=(0,j.jsxs)(`div`,{className:`mb-3 text-xs font-medium`,children:[`VPC `,(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,r,`)`]})]}),t[1]=r,t[2]=c);let l;t[3]!==o||t[4]!==n||t[5]!==a||t[6]!==i?(l=n===`vpc-and-more`&&(0,j.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Subnets`}),i.map(I),a.map(F),i.length===0&&a.length===0&&(0,j.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`No subnets`})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Route Tables`}),i.length>0&&(0,j.jsxs)(`div`,{className:`rounded-md border border-foreground/10 bg-background px-3 py-2 text-xs`,children:[(0,j.jsx)(`div`,{className:`font-medium`,children:`Public Route Table`}),(0,j.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`0.0.0.0/0 → IGW`}),(0,j.jsx)(`div`,{className:`text-muted-foreground`,children:`local`})]}),a.length>0&&(0,j.jsxs)(`div`,{className:`rounded-md border border-foreground/10 bg-background px-3 py-2 text-xs`,children:[(0,j.jsx)(`div`,{className:`font-medium`,children:`Private Route Table`}),(0,j.jsx)(`div`,{className:`mt-1 text-muted-foreground`,children:`local`})]})]}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Network Connections`}),o&&(0,j.jsxs)(`div`,{className:`rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs`,children:[(0,j.jsx)(`div`,{className:`font-medium`,children:`Internet Gateway`}),(0,j.jsx)(`div`,{className:`text-muted-foreground`,children:`Attached to VPC`})]}),!o&&(0,j.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`No internet gateway`})]})]}),t[3]=o,t[4]=n,t[5]=a,t[6]=i,t[7]=l):l=t[7];let u;t[8]===n?u=t[9]:(u=n===`vpc-only`&&(0,j.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`VPC only — no additional resources will be created.`}),t[8]=n,t[9]=u);let d;return t[10]!==c||t[11]!==l||t[12]!==u?(d=(0,j.jsxs)(`div`,{className:`rounded-lg border bg-muted/30 p-4`,children:[s,(0,j.jsxs)(`div`,{className:`rounded-lg border-2 border-dashed border-foreground/20 p-4`,children:[c,l,u]})]}),t[10]=c,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function F(e){return(0,j.jsx)(N,{cidr:e.cidr,label:e.label,variant:`private`},e.cidr)}function I(e){return(0,j.jsx)(N,{cidr:e.cidr,label:e.label,variant:`public`},e.cidr)}var L=[0,1],R=[0,1,2];function z(){let e=g(),t=h(),n=m(),[r,a]=(0,A.useState)(null),o=v({resolver:b(O),defaultValues:{mode:`vpc-only`,namePrefix:``,autoGenerateNames:!0,cidrBlock:`10.0.0.0/16`,tenancy:`default`,natGateway:`none`,publicSubnetCount:1,privateSubnetCount:1,publicSubnetCidrs:[],privateSubnetCidrs:[],tags:[]}}),{handleSubmit:k,register:N,watch:F,control:I,formState:{errors:z,isSubmitting:V}}=o,H=F(`mode`),U=F(`cidrBlock`),W=F(`publicSubnetCount`),G=F(`privateSubnetCount`),K=D(U||`10.0.0.0/16`,H===`vpc-and-more`?W:0,H===`vpc-and-more`?G:0),[q,J]=(0,A.useState)(``),Y=async r=>{if(a(null),r.mode===`vpc-only`){let n=r.autoGenerateNames&&r.namePrefix?`${r.namePrefix}-vpc`:r.namePrefix,i=(await t.mutateAsync({cidrBlock:r.cidrBlock,name:n||void 0})).Vpc?.VpcId;e(i?{to:`/ec2/describe-vpcs/$id`,params:{id:i}}:{to:`/ec2/describe-vpcs`});return}J(`Creating VPC and resources...`);let i=await n.mutateAsync(r);a(i),!i.error&&i.vpcId&&e({to:`/ec2/describe-vpcs/$id`,params:{id:i.vpcId}}),J(``)},X=t.error??n.error,Z=t.isPending||n.isPending;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(i,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,j.jsx)(C,{title:`Create VPC`}),X&&(0,j.jsx)(x,{error:X,msg:`Failed to create VPC`}),r?.error&&(0,j.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,j.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,r.failedStep]}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:r.error.message}),r.created.length>0&&(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources:`}),(0,j.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:r.created.map((e,t)=>(0,j.jsxs)(`li`,{children:[e.type,`: `,e.id]},t))})]})]}),q&&(0,j.jsx)(`div`,{className:`mb-4 max-w-4xl text-sm text-muted-foreground`,children:q}),(0,j.jsxs)(`div`,{className:`flex max-w-6xl gap-8`,children:[(0,j.jsxs)(`form`,{className:`min-w-0 flex-1 space-y-6`,onSubmit:k(Y),children:[(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`Resources to create`}),(0,j.jsx)(y,{control:I,name:`mode`,render:({field:e})=>(0,j.jsxs)(`div`,{className:`flex gap-4`,children:[(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`VPC only`,checked:e.value===`vpc-only`,name:`mode`,onChange:()=>e.onChange(`vpc-only`),type:`radio`}),`VPC only`]}),(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`VPC and more`,checked:e.value===`vpc-and-more`,name:`mode`,onChange:()=>e.onChange(`vpc-and-more`),type:`radio`}),`VPC and more`]})]})})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:(0,j.jsx)(`label`,{htmlFor:`namePrefix`,children:`Name tag auto-generation`})}),(0,j.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,j.jsx)(_,{id:`namePrefix`,placeholder:`project`,...N(`namePrefix`)}),(0,j.jsx)(y,{control:I,name:`autoGenerateNames`,render:({field:e})=>(0,j.jsxs)(`label`,{className:`flex shrink-0 items-center gap-2 text-xs`,children:[(0,j.jsx)(`input`,{"aria-label":`Auto-generate name tags`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Auto-generate`]})})]})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:(0,j.jsx)(`label`,{htmlFor:`cidrBlock`,children:`IPv4 CIDR block`})}),(0,j.jsx)(_,{"aria-invalid":!!z.cidrBlock,id:`cidrBlock`,placeholder:`10.0.0.0/16`,...N(`cidrBlock`)}),(0,j.jsx)(T,{errors:[z.cidrBlock]})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`Tenancy`}),(0,j.jsx)(y,{control:I,name:`tenancy`,render:({field:e})=>(0,j.jsxs)(d,{onValueChange:e.onChange,value:e.value,children:[(0,j.jsx)(u,{id:`tenancy`,children:(0,j.jsx)(s,{})}),(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{value:`default`,children:`default`}),(0,j.jsx)(c,{value:`dedicated`,children:`dedicated`})]})]})})]}),H===`vpc-and-more`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`Number of public subnets`}),(0,j.jsx)(y,{control:I,name:`publicSubnetCount`,render:({field:e})=>(0,j.jsx)(`div`,{className:`flex gap-1`,children:L.map(t=>(0,j.jsx)(p,{onClick:()=>e.onChange(t),size:`sm`,type:`button`,variant:e.value===t?`default`:`outline`,children:t},t))})}),(0,j.jsx)(M,{count:W,defaults:K.publicSubnets.map(e=>e.cidr),form:o,type:`public`})]}),(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`Number of private subnets`}),(0,j.jsx)(y,{control:I,name:`privateSubnetCount`,render:({field:e})=>(0,j.jsx)(`div`,{className:`flex gap-1`,children:R.map(t=>(0,j.jsx)(p,{onClick:()=>e.onChange(t),size:`sm`,type:`button`,variant:e.value===t?`default`:`outline`,children:t},t))})}),(0,j.jsx)(M,{count:G,defaults:K.privateSubnets.map(e=>e.cidr),form:o,type:`private`})]}),W>0&&G>0&&(0,j.jsxs)(E,{children:[(0,j.jsx)(w,{children:`NAT gateways`}),(0,j.jsx)(y,{control:I,name:`natGateway`,render:({field:e})=>(0,j.jsxs)(d,{onValueChange:e.onChange,value:e.value??`none`,children:[(0,j.jsx)(u,{id:`natGateway`,children:(0,j.jsx)(s,{})}),(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{value:`none`,children:`None`}),(0,j.jsx)(c,{value:`single`,children:`In 1 AZ`})]})]})}),(0,j.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Creates an Elastic IP + NAT gateway in the public subnet and routes private subnet egress (0.0.0.0/0) through it.`})]})]}),(0,j.jsx)(f,{commands:B(F,K)}),(0,j.jsx)(S,{isPending:Z,isSubmitting:V,onCancel:async()=>await e({to:`/ec2/describe-vpcs`}),pendingLabel:`Creating…`,submitLabel:`Create VPC`})]}),(0,j.jsx)(`div`,{className:`hidden min-w-0 flex-1 lg:block`,children:(0,j.jsx)(P,{hasIgw:H===`vpc-and-more`&&W>0,mode:H,privateSubnets:K.privateSubnets,publicSubnets:K.publicSubnets,vpcCidr:U||`10.0.0.0/16`})})]})]})}function B(e,t){let n=e(`mode`),r=typeof n==`string`?n:``,i=e(`cidrBlock`),a=typeof i==`string`?i:``,o=e(`tenancy`),s=typeof o==`string`?o:``,c=e(`natGateway`),l=typeof c==`string`?c:``;if(r===`vpc-only`){let e=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-vpc`},{type:`flag`,value:` \\ --cidr-block`},{type:`value`,value:` ${a||`10.0.0.0/16`}`}];return s&&s!=="default"&&e.push({type:`flag`,value:` \\ --instance-tenancy`},{type:`value`,value:` ${s}`}),[{label:`Create VPC`,parts:e}]}let u=[],d=[...t.publicSubnets.map((e,t)=>({...e,name:`PUBLIC_SUBNET_${t+1}`})),...t.privateSubnets.map((e,t)=>({...e,name:`PRIVATE_SUBNET_${t+1}`}))];u.push({label:`Create VPC`,parts:[{type:`comment`,value:`# Create VPC with subnets, internet gateway, and routing diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-addresses.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-addresses.js index 48846d327..7d4070239 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-addresses.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-addresses.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{Tt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(o),i;e[0]===t.Addresses?i=e[1]:(i=t.Addresses??[],e[0]=t.Addresses,e[1]=i);let c=i,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/ec2/allocate-address`,children:(0,u.jsx)(a,{children:`Allocate Elastic IP`})}),title:`Elastic IPs`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No Elastic IPs found.`})]}),e[3]=c,e[4]=p),p}function f(e){if(!e.AllocationId)return null;let t=i(e.Tags),n=e.AssociationId?`${e.PublicIp} • associated`:`${e.PublicIp} • available`;return(0,u.jsx)(c,{params:{id:e.AllocationId},subtitle:n,title:t?`${e.AllocationId} (${t})`:e.AllocationId??``,to:`/ec2/describe-addresses/$id`},e.AllocationId)}export{d as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{Dt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(o),i;e[0]===t.Addresses?i=e[1]:(i=t.Addresses??[],e[0]=t.Addresses,e[1]=i);let c=i,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/ec2/allocate-address`,children:(0,u.jsx)(a,{children:`Allocate Elastic IP`})}),title:`Elastic IPs`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No Elastic IPs found.`})]}),e[3]=c,e[4]=p),p}function f(e){if(!e.AllocationId)return null;let t=i(e.Tags),n=e.AssociationId?`${e.PublicIp} • associated`:`${e.PublicIp} • available`;return(0,u.jsx)(c,{params:{id:e.AllocationId},subtitle:n,title:t?`${e.AllocationId} (${t})`:e.AllocationId??``,to:`/ec2/describe-addresses/$id`},e.AllocationId)}export{d as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-images.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-images.js index 4a683da1a..ad0c43ad9 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-images.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-images.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{kt as r}from"./index.js";import{t as i}from"./page-heading.js";import{t as a}from"./list-card.js";import{t as o}from"./state-badge.js";import{n as s}from"./system-managed.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(r),a;if(e[0]!==t.Images){let n=(t.Images??[]).filter(f),r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(i,{title:`Images`}),e[2]=r):r=e[2],a=(0,l.jsxs)(l.Fragment,{children:[r,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),e[0]=t.Images,e[1]=a}else a=e[1];return a}function d(e){return e.ImageId?(0,l.jsx)(a,{badge:(0,l.jsx)(o,{state:e.State}),params:{id:e.ImageId},subtitle:e.ImageId??``,title:e.Name??e.ImageId??``,to:`/ec2/describe-images/$id`},e.ImageId):null}function f(e){return!s(e)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{jt as r}from"./index.js";import{t as i}from"./page-heading.js";import{t as a}from"./list-card.js";import{t as o}from"./state-badge.js";import{r as s}from"./system-managed.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(r),a;if(e[0]!==t.Images){let n=(t.Images??[]).filter(f),r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(i,{title:`Images`}),e[2]=r):r=e[2],a=(0,l.jsxs)(l.Fragment,{children:[r,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),e[0]=t.Images,e[1]=a}else a=e[1];return a}function d(e){return e.ImageId?(0,l.jsx)(a,{badge:(0,l.jsx)(o,{state:e.State}),params:{id:e.ImageId},subtitle:e.ImageId??``,title:e.Name??e.ImageId??``,to:`/ec2/describe-images/$id`},e.ImageId):null}function f(e){return!s(e)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-instances.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-instances.js index 3efb6ef8c..1de0753cc 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-instances.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-instances.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{Mt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let e=(0,l.c)(3),{data:t}=n(a),s;if(e[0]!==t.Reservations){let n=(t.Reservations?.flatMap(h)??[]).toSorted(m),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/run-instances`,children:(0,u.jsx)(i,{children:`Run Instances`})}),title:`Instances`}),e[2]=a):a=e[2],s=(0,u.jsxs)(u.Fragment,{children:[a,n.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:n.map(p)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances found.`})]}),e[0]=t.Reservations,e[1]=s}else s=e[1];return s}function p(e){return e.InstanceId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType}`,title:e.InstanceId,to:`/ec2/describe-instances/$id`},e.InstanceId):null}function m(e,t){let n=d[e.State?.Name??``]??6,r=d[t.State?.Name??``]??6;return n===r?(e.InstanceId??``).localeCompare(t.InstanceId??``):n-r}function h(e){return e.Instances??[]}export{f as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{Pt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let e=(0,l.c)(3),{data:t}=n(a),s;if(e[0]!==t.Reservations){let n=(t.Reservations?.flatMap(h)??[]).toSorted(m),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/run-instances`,children:(0,u.jsx)(i,{children:`Run Instances`})}),title:`Instances`}),e[2]=a):a=e[2],s=(0,u.jsxs)(u.Fragment,{children:[a,n.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:n.map(p)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances found.`})]}),e[0]=t.Reservations,e[1]=s}else s=e[1];return s}function p(e){return e.InstanceId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType}`,title:e.InstanceId,to:`/ec2/describe-instances/$id`},e.InstanceId):null}function m(e,t){let n=d[e.State?.Name??``]??6,r=d[t.State?.Name??``]??6;return n===r?(e.InstanceId??``).localeCompare(t.InstanceId??``):n-r}function h(e){return e.Instances??[]}export{f as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-internet-gateways.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-internet-gateways.js index 1ed2f2761..6ebe6d90f 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-internet-gateways.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-internet-gateways.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{Pt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(o),i;e[0]===t.InternetGateways?i=e[1]:(i=t.InternetGateways??[],e[0]=t.InternetGateways,e[1]=i);let c=i,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/ec2/create-internet-gateway`,children:(0,u.jsx)(a,{children:`Create Internet Gateway`})}),title:`Internet Gateways`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No Internet Gateways found.`})]}),e[3]=c,e[4]=p),p}function f(e){if(!e.InternetGatewayId)return null;let t=i(e.Tags),n=e.Attachments?.[0]?.VpcId;return(0,u.jsx)(c,{params:{id:e.InternetGatewayId},subtitle:n?`attached to ${n}`:`detached`,title:t?`${e.InternetGatewayId} (${t})`:e.InternetGatewayId,to:`/ec2/describe-internet-gateways/$id`},e.InternetGatewayId)}export{d as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{It as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(o),i;e[0]===t.InternetGateways?i=e[1]:(i=t.InternetGateways??[],e[0]=t.InternetGateways,e[1]=i);let c=i,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/ec2/create-internet-gateway`,children:(0,u.jsx)(a,{children:`Create Internet Gateway`})}),title:`Internet Gateways`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No Internet Gateways found.`})]}),e[3]=c,e[4]=p),p}function f(e){if(!e.InternetGatewayId)return null;let t=i(e.Tags),n=e.Attachments?.[0]?.VpcId;return(0,u.jsx)(c,{params:{id:e.InternetGatewayId},subtitle:n?`attached to ${n}`:`detached`,title:t?`${e.InternetGatewayId} (${t})`:e.InternetGatewayId,to:`/ec2/describe-internet-gateways/$id`},e.InternetGatewayId)}export{d as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-key-pairs.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-key-pairs.js index bf41fe87a..83c2e56a4 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-key-pairs.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-key-pairs.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{It as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(4),{data:t}=n(a),s;if(e[0]!==t.KeyPairs){let n=(t.KeyPairs??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(r,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(i,{variant:`outline`,children:`Import Key Pair`})}),e[2]=a):a=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(o,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[a,(0,l.jsx)(r,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(i,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),e[3]=c):c=e[3],s=(0,l.jsxs)(l.Fragment,{children:[c,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),e[0]=t.KeyPairs,e[1]=s}else s=e[1];return s}function d(e){return e.KeyPairId?(0,l.jsx)(s,{params:{id:e.KeyPairId},subtitle:e.KeyPairId??``,title:e.KeyName??``,to:`/ec2/describe-key-pairs/$id`},e.KeyPairId):null}function f(e,t){let n=e.KeyName?.toLowerCase()??``,r=t.KeyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{Rt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(4),{data:t}=n(a),s;if(e[0]!==t.KeyPairs){let n=(t.KeyPairs??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(r,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(i,{variant:`outline`,children:`Import Key Pair`})}),e[2]=a):a=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(o,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[a,(0,l.jsx)(r,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(i,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),e[3]=c):c=e[3],s=(0,l.jsxs)(l.Fragment,{children:[c,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),e[0]=t.KeyPairs,e[1]=s}else s=e[1];return s}function d(e){return e.KeyPairId?(0,l.jsx)(s,{params:{id:e.KeyPairId},subtitle:e.KeyPairId??``,title:e.KeyName??``,to:`/ec2/describe-key-pairs/$id`},e.KeyPairId):null}function f(e,t){let n=e.KeyName?.toLowerCase()??``,r=t.KeyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-load-balancers.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-load-balancers.js index 1d9f054e0..b5634c9f4 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-load-balancers.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-load-balancers.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Bt as i}from"./auth.js";import{t as a}from"./button.js";import{Xr as o,q as s}from"./index.js";import{t as c}from"./page-heading.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(10),t=o(),{data:f}=n(s),m;e[0]===f.LoadBalancers?m=e[1]:(m=f.LoadBalancers??[],e[0]=f.LoadBalancers,e[1]=m);let h=m,g;e[2]===t?g=e[3]:(g=(0,d.jsx)(c,{actions:(0,d.jsx)(a,{onClick:async()=>await t({to:`/ec2/create-load-balancer`}),children:`Create Load Balancer`}),title:`Load Balancers`}),e[2]=t,e[3]=g);let _;e[4]!==h||e[5]!==t?(_=h.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DNS Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`State`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Scheme`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`})]})}),(0,d.jsx)(`tbody`,{children:h.map(e=>{if(!e.LoadBalancerArn)return null;let n=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(n)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(r,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(n)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??n})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:i(e.CreatedTime)})]},n)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),e[4]=h,e[5]=t,e[6]=_):_=e[6];let v;return e[7]!==g||e[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),e[7]=g,e[8]=_,e[9]=v):v=e[9],v}function p(e){return e.stopPropagation()}var m=f;export{m as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Bt as i}from"./auth.js";import{t as a}from"./button.js";import{Qr as o,Y as s}from"./index.js";import{t as c}from"./page-heading.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(10),t=o(),{data:f}=n(s),m;e[0]===f.LoadBalancers?m=e[1]:(m=f.LoadBalancers??[],e[0]=f.LoadBalancers,e[1]=m);let h=m,g;e[2]===t?g=e[3]:(g=(0,d.jsx)(c,{actions:(0,d.jsx)(a,{onClick:async()=>await t({to:`/ec2/create-load-balancer`}),children:`Create Load Balancer`}),title:`Load Balancers`}),e[2]=t,e[3]=g);let _;e[4]!==h||e[5]!==t?(_=h.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DNS Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`State`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Scheme`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`})]})}),(0,d.jsx)(`tbody`,{children:h.map(e=>{if(!e.LoadBalancerArn)return null;let n=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(n)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(r,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(n)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??n})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:i(e.CreatedTime)})]},n)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),e[4]=h,e[5]=t,e[6]=_):_=e[6];let v;return e[7]!==g||e[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),e[7]=g,e[8]=_,e[9]=v):v=e[9],v}function p(e){return e.stopPropagation()}var m=f;export{m as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-nat-gateways.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-nat-gateways.js index cc271d0d9..2b9acd70a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-nat-gateways.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-nat-gateways.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{Rt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.NatGateways?i=e[1]:(i=t.NatGateways??[],e[0]=t.NatGateways,e[1]=i);let c=i,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-nat-gateway`,children:(0,d.jsx)(a,{children:`Create NAT Gateway`})}),title:`NAT Gateways`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No NAT Gateways found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.NatGatewayId)return null;let t=i(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.NatGatewayId},subtitle:e.SubnetId??``,title:t?`${e.NatGatewayId} (${t})`:e.NatGatewayId,to:`/ec2/describe-nat-gateways/$id`},e.NatGatewayId)}export{f as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{Bt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.NatGateways?i=e[1]:(i=t.NatGateways??[],e[0]=t.NatGateways,e[1]=i);let c=i,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-nat-gateway`,children:(0,d.jsx)(a,{children:`Create NAT Gateway`})}),title:`NAT Gateways`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No NAT Gateways found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.NatGatewayId)return null;let t=i(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.NatGatewayId},subtitle:e.SubnetId??``,title:t?`${e.NatGatewayId} (${t})`:e.NatGatewayId,to:`/ec2/describe-nat-gateways/$id`},e.NatGatewayId)}export{f as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-placement-groups.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-placement-groups.js index bf8620f22..a301faf56 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-placement-groups.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-placement-groups.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{Bt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.PlacementGroups?s=e[1]:(s=t.PlacementGroups??[],e[0]=t.PlacementGroups,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-placement-group`,children:(0,u.jsx)(i,{children:`Create Placement Group`})}),title:`Placement Groups`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No placement groups found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.GroupId},subtitle:`${e.Strategy} \u2022 ${e.GroupId}`,title:e.GroupName??e.GroupId,to:`/ec2/describe-placement-groups/$id`},e.GroupId):null}export{d as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{Ht as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.PlacementGroups?s=e[1]:(s=t.PlacementGroups??[],e[0]=t.PlacementGroups,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-placement-group`,children:(0,u.jsx)(i,{children:`Create Placement Group`})}),title:`Placement Groups`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No placement groups found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.GroupId},subtitle:`${e.Strategy} \u2022 ${e.GroupId}`,title:e.GroupName??e.GroupId,to:`/ec2/describe-placement-groups/$id`},e.GroupId):null}export{d as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-route-tables.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-route-tables.js index 7334a860c..a5efdc78d 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-route-tables.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-route-tables.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{Ut as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.RouteTables?i=e[1]:(i=t.RouteTables??[],e[0]=t.RouteTables,e[1]=i);let c=i,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-route-table`,children:(0,d.jsx)(a,{children:`Create Route Table`})}),title:`Route Tables`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No Route Tables found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.RouteTableId)return null;let t=i(e.Tags),n=e.Associations?.some(h)??!1,r=e.Associations?.filter(m).length??0;return(0,d.jsx)(c,{badge:n?(0,d.jsx)(l,{variant:`secondary`,children:`Main`}):null,params:{id:e.RouteTableId},subtitle:`${e.VpcId??``} · ${r} subnet${r===1?``:`s`}`,title:t?`${e.RouteTableId} (${t})`:e.RouteTableId,to:`/ec2/describe-route-tables/$id`},e.RouteTableId)}function m(e){return e.SubnetId}function h(e){return e.Main}export{f as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{Gt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.RouteTables?i=e[1]:(i=t.RouteTables??[],e[0]=t.RouteTables,e[1]=i);let c=i,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-route-table`,children:(0,d.jsx)(a,{children:`Create Route Table`})}),title:`Route Tables`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No Route Tables found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.RouteTableId)return null;let t=i(e.Tags),n=e.Associations?.some(h)??!1,r=e.Associations?.filter(m).length??0;return(0,d.jsx)(c,{badge:n?(0,d.jsx)(l,{variant:`secondary`,children:`Main`}):null,params:{id:e.RouteTableId},subtitle:`${e.VpcId??``} · ${r} subnet${r===1?``:`s`}`,title:t?`${e.RouteTableId} (${t})`:e.RouteTableId,to:`/ec2/describe-route-tables/$id`},e.RouteTableId)}function m(e){return e.SubnetId}function h(e){return e.Main}export{f as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-security-groups.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-security-groups.js index ca7acdd05..c6f5ee805 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-security-groups.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-security-groups.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{Gt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(a),s;e[0]===t.SecurityGroups?s=e[1]:(s=t.SecurityGroups??[],e[0]=t.SecurityGroups,e[1]=s);let u=s,f;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/ec2/create-security-group`,children:(0,l.jsx)(i,{children:`Create Security Group`})}),title:`Security Groups`}),e[2]=f):f=e[2];let p;return e[3]===u?p=e[4]:(p=(0,l.jsxs)(l.Fragment,{children:[f,u.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:u.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No security groups found.`})]}),e[3]=u,e[4]=p),p}function d(e){return e.GroupId?(0,l.jsx)(s,{params:{id:e.GroupId},subtitle:e.VpcId??``,title:e.GroupName?`${e.GroupId} (${e.GroupName})`:e.GroupId,to:`/ec2/describe-security-groups/$id`},e.GroupId):null}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{qt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(a),s;e[0]===t.SecurityGroups?s=e[1]:(s=t.SecurityGroups??[],e[0]=t.SecurityGroups,e[1]=s);let u=s,f;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/ec2/create-security-group`,children:(0,l.jsx)(i,{children:`Create Security Group`})}),title:`Security Groups`}),e[2]=f):f=e[2];let p;return e[3]===u?p=e[4]:(p=(0,l.jsxs)(l.Fragment,{children:[f,u.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:u.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No security groups found.`})]}),e[3]=u,e[4]=p),p}function d(e){return e.GroupId?(0,l.jsx)(s,{params:{id:e.GroupId},subtitle:e.VpcId??``,title:e.GroupName?`${e.GroupId} (${e.GroupName})`:e.GroupId,to:`/ec2/describe-security-groups/$id`},e.GroupId):null}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-snapshots.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-snapshots.js index dc4ede8a0..afbca384a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-snapshots.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-snapshots.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{qt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Snapshots?s=e[1]:(s=t.Snapshots??[],e[0]=t.Snapshots,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-snapshot`,children:(0,u.jsx)(i,{children:`Create Snapshot`})}),title:`Snapshots`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.SnapshotId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.SnapshotId},subtitle:`${e.VolumeSize} GiB \u2022 ${e.VolumeId}`,title:e.SnapshotId,to:`/ec2/describe-snapshots/$id`},e.SnapshotId):null}export{d as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{Yt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Snapshots?s=e[1]:(s=t.Snapshots??[],e[0]=t.Snapshots,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-snapshot`,children:(0,u.jsx)(i,{children:`Create Snapshot`})}),title:`Snapshots`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.SnapshotId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.SnapshotId},subtitle:`${e.VolumeSize} GiB \u2022 ${e.VolumeId}`,title:e.SnapshotId,to:`/ec2/describe-snapshots/$id`},e.SnapshotId):null}export{d as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-subnets.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-subnets.js index 599cd6b46..4047521c4 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-subnets.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-subnets.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{Yt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Subnets?i=e[1]:(i=t.Subnets??[],e[0]=t.Subnets,e[1]=i);let c=i,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-subnet`,children:(0,d.jsx)(a,{children:`Create Subnet`})}),title:`Subnets`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.SubnetId)return null;let t=i(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.SubnetId},subtitle:`${e.CidrBlock??``} \u2022 ${e.AvailabilityZone??``}`,title:t?`${e.SubnetId} (${t})`:e.SubnetId,to:`/ec2/describe-subnets/$id`},e.SubnetId)}export{f as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{Zt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Subnets?i=e[1]:(i=t.Subnets??[],e[0]=t.Subnets,e[1]=i);let c=i,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-subnet`,children:(0,d.jsx)(a,{children:`Create Subnet`})}),title:`Subnets`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.SubnetId)return null;let t=i(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.SubnetId},subtitle:`${e.CidrBlock??``} \u2022 ${e.AvailabilityZone??``}`,title:t?`${e.SubnetId} (${t})`:e.SubnetId,to:`/ec2/describe-subnets/$id`},e.SubnetId)}export{f as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-target-groups.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-target-groups.js index 90879175b..4ecaa4d65 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-target-groups.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-target-groups.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{t as a}from"./button.js";import{$ as o,Q as s,Xr as c}from"./index.js";import{t as l}from"./page-heading.js";var u=t(),d=e();function f(){let e=(0,u.c)(6),t=c(),{data:n}=r(s),o;e[0]===n.TargetGroups?o=e[1]:(o=n.TargetGroups??[],e[0]=n.TargetGroups,e[1]=o);let f=o,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(l,{actions:(0,d.jsx)(i,{to:`/ec2/create-target-group`,children:(0,d.jsx)(a,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==t||e[4]!==f?(g=(0,d.jsxs)(d.Fragment,{children:[h,f.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Targets`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`})]})}),(0,d.jsx)(`tbody`,{children:f.map(e=>{if(!e.TargetGroupArn)return null;let n=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(i,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(n)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??n})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Port??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.TargetType??``}),(0,d.jsx)(m,{arn:n})]},n)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=t,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(e){let t=(0,u.c)(13),{arn:r}=e,i;t[0]===r?i=t[1]:(i=o(r),t[0]=r,t[1]=i);let{data:a,isLoading:s}=n(i);if(s){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`})]}),t[2]=e):e=t[2],e}let c,l;if(t[3]!==a?.TargetHealthDescriptions){c=a?.TargetHealthDescriptions??[];let e={};for(let t of c){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}l=Object.entries(e).map(h).join(`, `)||`—`,t[3]=a?.TargetHealthDescriptions,t[4]=c,t[5]=l}else c=t[4],l=t[5];let f=l,p;t[6]===c.length?p=t[7]:(p=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:c.length}),t[6]=c.length,t[7]=p);let m;t[8]===f?m=t[9]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:f}),t[8]=f,t[9]=m);let g;return t[10]!==p||t[11]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[p,m]}),t[10]=p,t[11]=m,t[12]=g):g=t[12],g}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{t as r}from"./useSuspenseQuery.js";import{ni as i}from"./awsClient.js";import{t as a}from"./button.js";import{Qr as o,et as s,tt as c}from"./index.js";import{t as l}from"./page-heading.js";var u=t(),d=e();function f(){let e=(0,u.c)(6),t=o(),{data:n}=r(s),c;e[0]===n.TargetGroups?c=e[1]:(c=n.TargetGroups??[],e[0]=n.TargetGroups,e[1]=c);let f=c,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(l,{actions:(0,d.jsx)(i,{to:`/ec2/create-target-group`,children:(0,d.jsx)(a,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==t||e[4]!==f?(g=(0,d.jsxs)(d.Fragment,{children:[h,f.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Targets`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`})]})}),(0,d.jsx)(`tbody`,{children:f.map(e=>{if(!e.TargetGroupArn)return null;let n=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(i,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(n)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??n})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Port??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.TargetType??``}),(0,d.jsx)(m,{arn:n})]},n)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=t,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(e){let t=(0,u.c)(13),{arn:r}=e,i;t[0]===r?i=t[1]:(i=c(r),t[0]=r,t[1]=i);let{data:a,isLoading:o}=n(i);if(o){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`})]}),t[2]=e):e=t[2],e}let s,l;if(t[3]!==a?.TargetHealthDescriptions){s=a?.TargetHealthDescriptions??[];let e={};for(let t of s){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}l=Object.entries(e).map(h).join(`, `)||`—`,t[3]=a?.TargetHealthDescriptions,t[4]=s,t[5]=l}else s=t[4],l=t[5];let f=l,p;t[6]===s.length?p=t[7]:(p=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:s.length}),t[6]=s.length,t[7]=p);let m;t[8]===f?m=t[9]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:f}),t[8]=f,t[9]=m);let g;return t[10]!==p||t[11]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[p,m]}),t[10]=p,t[11]=m,t[12]=g):g=t[12],g}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-volumes.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-volumes.js index 214ddbba6..a43de799a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-volumes.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-volumes.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{Zt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Volumes?s=e[1]:(s=t.Volumes??[],e[0]=t.Volumes,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-volume`,children:(0,u.jsx)(i,{children:`Create Volume`})}),title:`Volumes`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No volumes found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.VolumeId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.VolumeId},subtitle:`${e.Size} GiB`,title:e.VolumeId,to:`/ec2/describe-volumes/$id`},e.VolumeId):null}export{d as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{$t as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Volumes?s=e[1]:(s=t.Volumes??[],e[0]=t.Volumes,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-volume`,children:(0,u.jsx)(i,{children:`Create Volume`})}),title:`Volumes`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No volumes found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.VolumeId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.VolumeId},subtitle:`${e.Size} GiB`,title:e.VolumeId,to:`/ec2/describe-volumes/$id`},e.VolumeId):null}export{d as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-vpcs.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-vpcs.js index 83166544b..4a2fc1910 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-vpcs.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-vpcs.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{$t as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Vpcs?i=e[1]:(i=t.Vpcs??[],e[0]=t.Vpcs,e[1]=i);let c=i,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-vpc`,children:(0,d.jsx)(a,{children:`Create VPC`})}),title:`VPCs`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No VPCs found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.VpcId)return null;let t=i(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??``,title:t?`${e.VpcId} (${t})`:e.VpcId,to:`/ec2/describe-vpcs/$id`},e.VpcId)}export{f as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Ut as i}from"./auth.js";import{t as a}from"./button.js";import{tn as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Vpcs?i=e[1]:(i=t.Vpcs??[],e[0]=t.Vpcs,e[1]=i);let c=i,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-vpc`,children:(0,d.jsx)(a,{children:`Create VPC`})}),title:`VPCs`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No VPCs found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.VpcId)return null;let t=i(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??``,title:t?`${e.VpcId} (${t})`:e.VpcId,to:`/ec2/describe-vpcs/$id`},e.VpcId)}export{f as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/download.js b/spinifex/services/spinifexui/frontend/dist/assets/download.js index f0175d974..92bb22ff9 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/download.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/download.js @@ -1 +1 @@ -import{qr as e}from"./index.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t}; \ No newline at end of file +import{Yr as e}from"./index.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/ec2.js b/spinifex/services/spinifexui/frontend/dist/assets/ec2.js index 9fec42faa..654d1b293 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/ec2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/ec2.js @@ -1 +1 @@ -import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{$n as n,Bn as r,Br as i,Fr as a,Gn as o,Gr as s,Hn as c,Hr as l,Ir as u,Jn as d,Jr as f,Kn as p,Kr as ee,Lr as m,Pr as te,Qn as ne,Qr as h,Rr as re,Un as ie,Ur as ae,Vn as oe,Vr as se,Wn as ce,Wr as le,Xn as ue,Xr as de,Yn as fe,Yr as pe,Zn as me,Zr as he,ar as ge,cr as _e,dr as ve,er as ye,fr as be,gr as xe,hr as Se,ir as g,lr as _,mr as v,nr as y,or as b,pr as x,qn as S,qr as C,r as w,rr as T,sr as E,tr as D,ur as O,zn as k,zr as A}from"./awsClient.js";import{At as j,D as Ce,Pt as M,St as N,Z as we,lt as Te,st as Ee,ut as P}from"./auth.js";import{It as F,Zr as I}from"./index.js";import{t as De}from"./subnet-calculator.js";var L=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AllocateAddress`,{}).n(`EC2Client`,`AllocateAddressCommand`).sc(k).build(){},Oe=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AssociateAddress`,{}).n(`EC2Client`,`AssociateAddressCommand`).sc(r).build(){},ke=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AssociateIamInstanceProfile`,{}).n(`EC2Client`,`AssociateIamInstanceProfileCommand`).sc(oe).build(){},R=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AssociateRouteTable`,{}).n(`EC2Client`,`AssociateRouteTableCommand`).sc(c).build(){},z=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AttachInternetGateway`,{}).n(`EC2Client`,`AttachInternetGatewayCommand`).sc(ie).build(){},Ae=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AttachVolume`,{}).n(`EC2Client`,`AttachVolumeCommand`).sc(ce).build(){},je=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AuthorizeSecurityGroupEgress`,{}).n(`EC2Client`,`AuthorizeSecurityGroupEgressCommand`).sc(o).build(){},B=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AuthorizeSecurityGroupIngress`,{}).n(`EC2Client`,`AuthorizeSecurityGroupIngressCommand`).sc(p).build(){};function Me(e){let{port:t,query:n}=e,{protocol:r,path:i,hostname:a}=e;r&&r.slice(-1)!==`:`&&(r+=`:`),t&&(a+=`:${t}`),i&&i.charAt(0)!==`/`&&(i=`/${i}`);let o=n?we(n):``;o&&o[0]!==`?`&&(o=`?${o}`);let s=``;(e.username!=null||e.password!=null)&&(s=`${e.username??``}:${e.password??``}@`);let c=``;return e.fragment&&(c=`#${e.fragment}`),`${r}//${s}${a}${i}${o}${c}`}var Ne=`2016-11-15`;function Pe(e){return(t,n)=>async n=>{let{input:r}=n;if(!r.PresignedUrl){let t=await e.region(),i=await Te(r,{getEndpointParameterInstructions(){return{UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}}},{...e,region:r.SourceRegion}),a=typeof e.endpoint==`function`?await e.endpoint():j(i),o=new M({...a,protocol:`https`,headers:{host:a.hostname},query:{...Object.entries(r).reduce((e,[t,n])=>(e[t]=String(n??``),e),{}),Action:`CopySnapshot`,Version:Ne,DestinationRegion:t}}),s=await new Ce({credentials:e.credentials,region:r.SourceRegion,service:`ec2`,sha256:e.sha256,uriEscapePath:e.signingEscapePath}).presign(o,{expiresIn:3600});if(n={...n,input:{...n.input,DestinationRegion:t,PresignedUrl:Me(s)}},M.isInstance(n.request)){let{request:e}=n;(e.body??``).includes(`DestinationRegion=`)||(e.body+=`&DestinationRegion=${t}`),(e.body??``).includes(`PresignedUrl=`)||(e.body+=`&PresignedUrl=${Ee(n.input.PresignedUrl)}`)}}return t(n)}}var Fe={step:`serialize`,tags:[`CROSS_REGION_PRESIGNED_URL`],name:`crossRegionPresignedUrlMiddleware`,override:!0,relation:`after`,toMiddleware:`endpointV2Middleware`},Ie=e=>({applyToStack:t=>{t.add(Pe(e),Fe)}}),Le=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions()),Ie(n)]}).s(`AmazonEC2`,`CopySnapshot`,{}).n(`EC2Client`,`CopySnapshotCommand`).sc(S).build(){},Re=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateImage`,{}).n(`EC2Client`,`CreateImageCommand`).sc(d).build(){},V=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateInternetGateway`,{}).n(`EC2Client`,`CreateInternetGatewayCommand`).sc(fe).build(){},ze=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateKeyPair`,{}).n(`EC2Client`,`CreateKeyPairCommand`).sc(ue).build(){},H=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateNatGateway`,{}).n(`EC2Client`,`CreateNatGatewayCommand`).sc(me).build(){},Be=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreatePlacementGroup`,{}).n(`EC2Client`,`CreatePlacementGroupCommand`).sc(ne).build(){},U=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateRoute`,{}).n(`EC2Client`,`CreateRouteCommand`).sc(n).build(){},W=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateRouteTable`,{}).n(`EC2Client`,`CreateRouteTableCommand`).sc(ye).build(){},G=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateSecurityGroup`,{}).n(`EC2Client`,`CreateSecurityGroupCommand`).sc(D).build(){},Ve=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateSnapshot`,{}).n(`EC2Client`,`CreateSnapshotCommand`).sc(y).build(){},K=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateSubnet`,{}).n(`EC2Client`,`CreateSubnetCommand`).sc(T).build(){},He=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateVolume`,{}).n(`EC2Client`,`CreateVolumeCommand`).sc(g).build(){},q=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateVpc`,{}).n(`EC2Client`,`CreateVpcCommand`).sc(ge).build(){},Ue=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteInternetGateway`,{}).n(`EC2Client`,`DeleteInternetGatewayCommand`).sc(b).build(){},We=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteKeyPair`,{}).n(`EC2Client`,`DeleteKeyPairCommand`).sc(E).build(){},Ge=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteNatGateway`,{}).n(`EC2Client`,`DeleteNatGatewayCommand`).sc(_e).build(){},Ke=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeletePlacementGroup`,{}).n(`EC2Client`,`DeletePlacementGroupCommand`).sc(_).build(){},qe=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteRoute`,{}).n(`EC2Client`,`DeleteRouteCommand`).sc(O).build(){},Je=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteRouteTable`,{}).n(`EC2Client`,`DeleteRouteTableCommand`).sc(ve).build(){},Ye=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteSecurityGroup`,{}).n(`EC2Client`,`DeleteSecurityGroupCommand`).sc(be).build(){},Xe=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteSnapshot`,{}).n(`EC2Client`,`DeleteSnapshotCommand`).sc(x).build(){},Ze=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteSubnet`,{}).n(`EC2Client`,`DeleteSubnetCommand`).sc(v).build(){},Qe=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteVolume`,{}).n(`EC2Client`,`DeleteVolumeCommand`).sc(Se).build(){},$e=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteVpc`,{}).n(`EC2Client`,`DeleteVpcCommand`).sc(xe).build(){},et=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DetachInternetGateway`,{}).n(`EC2Client`,`DetachInternetGatewayCommand`).sc(te).build(){},tt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DetachVolume`,{}).n(`EC2Client`,`DetachVolumeCommand`).sc(a).build(){},nt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DisassociateAddress`,{}).n(`EC2Client`,`DisassociateAddressCommand`).sc(u).build(){},rt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DisassociateIamInstanceProfile`,{}).n(`EC2Client`,`DisassociateIamInstanceProfileCommand`).sc(m).build(){},it=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DisassociateRouteTable`,{}).n(`EC2Client`,`DisassociateRouteTableCommand`).sc(re).build(){},at=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`GetConsoleOutput`,{}).n(`EC2Client`,`GetConsoleOutputCommand`).sc(A).build(){},ot=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ImportKeyPair`,{}).n(`EC2Client`,`ImportKeyPairCommand`).sc(i).build(){},st=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ModifyInstanceAttribute`,{}).n(`EC2Client`,`ModifyInstanceAttributeCommand`).sc(se).build(){},J=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ModifySubnetAttribute`,{}).n(`EC2Client`,`ModifySubnetAttributeCommand`).sc(l).build(){},ct=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ModifyVolume`,{}).n(`EC2Client`,`ModifyVolumeCommand`).sc(ae).build(){},lt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`RebootInstances`,{}).n(`EC2Client`,`RebootInstancesCommand`).sc(le).build(){},ut=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ReleaseAddress`,{}).n(`EC2Client`,`ReleaseAddressCommand`).sc(s).build(){},dt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`RevokeSecurityGroupEgress`,{}).n(`EC2Client`,`RevokeSecurityGroupEgressCommand`).sc(ee).build(){},ft=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`RevokeSecurityGroupIngress`,{}).n(`EC2Client`,`RevokeSecurityGroupIngressCommand`).sc(C).build(){},pt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`RunInstances`,{}).n(`EC2Client`,`RunInstancesCommand`).sc(f).build(){},mt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`StartInstances`,{}).n(`EC2Client`,`StartInstancesCommand`).sc(pe).build(){},ht=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`StopInstances`,{}).n(`EC2Client`,`StopInstancesCommand`).sc(de).build(){},gt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`TerminateInstances`,{}).n(`EC2Client`,`TerminateInstancesCommand`).sc(he).build(){},Y={capacity_block:`capacity-block`,capacity_manager_data_export:`capacity-manager-data-export`,capacity_reservation:`capacity-reservation`,capacity_reservation_cancellation_quote:`capacity-reservation-cancellation-quote`,capacity_reservation_fleet:`capacity-reservation-fleet`,carrier_gateway:`carrier-gateway`,client_vpn_endpoint:`client-vpn-endpoint`,coip_pool:`coip-pool`,customer_gateway:`customer-gateway`,declarative_policies_report:`declarative-policies-report`,dedicated_host:`dedicated-host`,dhcp_options:`dhcp-options`,egress_only_internet_gateway:`egress-only-internet-gateway`,elastic_gpu:`elastic-gpu`,elastic_ip:`elastic-ip`,export_image_task:`export-image-task`,export_instance_task:`export-instance-task`,fleet:`fleet`,fpga_image:`fpga-image`,host_reservation:`host-reservation`,image:`image`,image_usage_report:`image-usage-report`,import_image_task:`import-image-task`,import_snapshot_task:`import-snapshot-task`,instance:`instance`,instance_connect_endpoint:`instance-connect-endpoint`,instance_event_window:`instance-event-window`,internet_gateway:`internet-gateway`,ipam:`ipam`,ipam_external_resource_verification_token:`ipam-external-resource-verification-token`,ipam_policy:`ipam-policy`,ipam_pool:`ipam-pool`,ipam_pool_allocation:`ipam-pool-allocation`,ipam_prefix_list_resolver:`ipam-prefix-list-resolver`,ipam_prefix_list_resolver_target:`ipam-prefix-list-resolver-target`,ipam_resource_discovery:`ipam-resource-discovery`,ipam_resource_discovery_association:`ipam-resource-discovery-association`,ipam_scope:`ipam-scope`,ipv4pool_ec2:`ipv4pool-ec2`,ipv6pool_ec2:`ipv6pool-ec2`,key_pair:`key-pair`,launch_template:`launch-template`,local_gateway:`local-gateway`,local_gateway_route_table:`local-gateway-route-table`,local_gateway_route_table_virtual_interface_group_association:`local-gateway-route-table-virtual-interface-group-association`,local_gateway_route_table_vpc_association:`local-gateway-route-table-vpc-association`,local_gateway_virtual_interface:`local-gateway-virtual-interface`,local_gateway_virtual_interface_group:`local-gateway-virtual-interface-group`,mac_modification_task:`mac-modification-task`,natgateway:`natgateway`,network_acl:`network-acl`,network_insights_access_scope:`network-insights-access-scope`,network_insights_access_scope_analysis:`network-insights-access-scope-analysis`,network_insights_analysis:`network-insights-analysis`,network_insights_path:`network-insights-path`,network_interface:`network-interface`,outpost_lag:`outpost-lag`,placement_group:`placement-group`,prefix_list:`prefix-list`,replace_root_volume_task:`replace-root-volume-task`,reserved_instances:`reserved-instances`,route_server:`route-server`,route_server_endpoint:`route-server-endpoint`,route_server_peer:`route-server-peer`,route_table:`route-table`,secondary_interface:`secondary-interface`,secondary_network:`secondary-network`,secondary_subnet:`secondary-subnet`,security_group:`security-group`,security_group_rule:`security-group-rule`,service_link_virtual_interface:`service-link-virtual-interface`,snapshot:`snapshot`,spot_fleet_request:`spot-fleet-request`,spot_instances_request:`spot-instances-request`,subnet:`subnet`,subnet_cidr_reservation:`subnet-cidr-reservation`,traffic_mirror_filter:`traffic-mirror-filter`,traffic_mirror_filter_rule:`traffic-mirror-filter-rule`,traffic_mirror_session:`traffic-mirror-session`,traffic_mirror_target:`traffic-mirror-target`,transit_gateway:`transit-gateway`,transit_gateway_attachment:`transit-gateway-attachment`,transit_gateway_connect_peer:`transit-gateway-connect-peer`,transit_gateway_metering_policy:`transit-gateway-metering-policy`,transit_gateway_multicast_domain:`transit-gateway-multicast-domain`,transit_gateway_policy_table:`transit-gateway-policy-table`,transit_gateway_route_table:`transit-gateway-route-table`,transit_gateway_route_table_announcement:`transit-gateway-route-table-announcement`,verified_access_endpoint:`verified-access-endpoint`,verified_access_endpoint_target:`verified-access-endpoint-target`,verified_access_group:`verified-access-group`,verified_access_instance:`verified-access-instance`,verified_access_policy:`verified-access-policy`,verified_access_trust_provider:`verified-access-trust-provider`,volume:`volume`,vpc:`vpc`,vpc_block_public_access_exclusion:`vpc-block-public-access-exclusion`,vpc_encryption_control:`vpc-encryption-control`,vpc_endpoint:`vpc-endpoint`,vpc_endpoint_connection:`vpc-endpoint-connection`,vpc_endpoint_connection_device_type:`vpc-endpoint-connection-device-type`,vpc_endpoint_service:`vpc-endpoint-service`,vpc_endpoint_service_permission:`vpc-endpoint-service-permission`,vpc_flow_log:`vpc-flow-log`,vpc_peering_connection:`vpc-peering-connection`,vpn_concentrator:`vpn-concentrator`,vpn_connection:`vpn-connection`,vpn_connection_device_type:`vpn-connection-device-type`,vpn_gateway:`vpn-gateway`},X=e(),_t=/\s+/;function vt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:yt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function yt(e){let t=new mt({InstanceIds:[e]});return await w().send(t)}function bt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:xt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function xt(e){let t=new ht({InstanceIds:[e]});return await w().send(t)}function St(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Ct,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Ct(e){let t=new gt({InstanceIds:[e]});return await w().send(t)}function wt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Tt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Tt(e){let t=new lt({InstanceIds:[e]});return await w().send(t)}function Et(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Dt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=n,e[1]=r),t(r)}async function Dt(e){let t=w(),n=await Ot(t,e),r=new pt({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SubnetId:e.subnetId||void 0,SecurityGroupIds:n.length>0?n:void 0,Placement:e.placementGroupName?{GroupName:e.placementGroupName}:void 0,BlockDeviceMappings:kt(e)});return await t.send(r)}async function Ot(e,t){if(t.securityGroupMode!==`create`)return t.securityGroupIds??[];let n=(await e.send(new G({GroupName:t.newSgName,Description:t.newSgDescription||`Created by launch wizard`,VpcId:t.resolvedVpcId}))).GroupId;if(!n)throw Error(`Security group was created but no ID was returned`);let r=[...t.allowSsh?[22]:[],...t.allowHttp?[80]:[],...t.allowHttps?[443]:[]];if(r.length>0){let i=t.ruleSource===`custom`&&t.customCidr?t.customCidr:`0.0.0.0/0`;await e.send(new B({GroupId:n,IpPermissions:r.map(e=>({IpProtocol:`tcp`,FromPort:e,ToPort:e,IpRanges:[{CidrIp:i}]}))}))}return[n]}function kt(e){let{rootDeviceName:t,rootVolumeSize:n,rootVolumeType:r,rootDeleteOnTermination:i}=e;return n!==void 0||r!==void 0||i!==void 0?[{DeviceName:t,Ebs:{...n!==void 0&&{VolumeSize:n},...r!==void 0&&{VolumeType:r},...i!==void 0&&{DeleteOnTermination:i}}}]:void 0}function At(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:jt,onSuccess:()=>{n.invalidateQueries(F)}},e[0]=n,e[1]=r),t(r)}async function jt(e){let t=new ze({KeyName:e.keyName,KeyType:`rsa`}),n=await w().send(t);if(!n.KeyMaterial)throw Error(`Key pair was created but the API returned no private key. The key cannot be recovered — delete it and try again.`);return n}function Mt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Nt,onSuccess:()=>{n.invalidateQueries(F)}},e[0]=n,e[1]=r),t(r)}async function Nt(e){let t=e.publicKeyMaterial.trim().split(_t).slice(0,2).join(` `),n=new ot({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await w().send(n)}function Pt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Ft,onSuccess:()=>{n.invalidateQueries(F)}},e[0]=n,e[1]=r),t(r)}async function Ft(e){let t=new We({KeyPairId:e});return await w().send(t)}function It(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Lt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=n,e[1]=r),t(r)}async function Lt(e){let t=new He({Size:e.size,AvailabilityZone:e.availabilityZone,VolumeType:`gp3`});return await w().send(t)}function Rt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:zt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=n,e[1]=r),t(r)}async function zt(e){let t=new ct({VolumeId:e.volumeId,Size:e.size});return await w().send(t)}function Bt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Vt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=n,e[1]=r),t(r)}async function Vt(e){let t=new Qe({VolumeId:e});return await w().send(t)}function Ht(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Ut,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=n,e[1]=r),t(r)}async function Ut(e){let t=new Ve({VolumeId:e.volumeId,Description:e.description||void 0});return await w().send(t)}function Wt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Gt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=n,e[1]=r),t(r)}async function Gt(e){let t=new Xe({SnapshotId:e});return await w().send(t)}function Kt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:qt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=n,e[1]=r),t(r)}async function qt(e){let t=new Le({SourceSnapshotId:e.sourceSnapshotId,SourceRegion:e.sourceRegion,Description:e.description||void 0});return await w().send(t)}function Jt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Yt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Yt(e){let t=new Ae({VolumeId:e.volumeId,InstanceId:e.instanceId,Device:e.device||void 0});return await w().send(t)}function Xt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Zt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Zt(e){let t=new tt({VolumeId:e.volumeId,InstanceId:e.instanceId||void 0,Force:e.force});return await w().send(t)}function Qt(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:$t,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function $t(e){let{instanceId:t,...n}=e,r=new st({InstanceId:t,InstanceType:{Value:n.instanceType}});return await w().send(r)}function en(){let e=(0,X.c)(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={mutationFn:tn},e[0]=n):n=e[0],t(n)}async function tn(e){let t=new at({InstanceId:e});return await w().send(t)}function nn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:rn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=n,e[1]=r),t(r)}async function rn(e){let t=new Re({InstanceId:e.instanceId,Name:e.name,Description:e.description||void 0});return await w().send(t)}function an(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:on,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`vpcs`]})}},e[0]=n,e[1]=r),t(r)}async function on(e){let t=new q({CidrBlock:e.cidrBlock,TagSpecifications:e.name?[{ResourceType:`vpc`,Tags:[{Key:`Name`,Value:e.name}]}]:void 0});return await w().send(t)}function sn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:cn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`vpcs`]})}},e[0]=n,e[1]=r),t(r)}async function cn(e){let t=new $e({VpcId:e});return await w().send(t)}function ln(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:un,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`subnets`]})}},e[0]=n,e[1]=r),t(r)}async function un(e){let t=w(),n=await t.send(new K({VpcId:e.vpcId,CidrBlock:e.cidrBlock,AvailabilityZone:e.availabilityZone||void 0})),r=n.Subnet?.SubnetId;return e.mapPublicIpOnLaunch&&r&&await t.send(new J({SubnetId:r,MapPublicIpOnLaunch:{Value:!0}})),n}function dn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:fn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`subnets`]})}},e[0]=n,e[1]=r),t(r)}async function fn(e){let t=new Ze({SubnetId:e});return await w().send(t)}function pn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:mn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`placementGroups`]})}},e[0]=n,e[1]=r),t(r)}async function mn(e){let t=new Be({GroupName:e.groupName,Strategy:e.strategy});return await w().send(t)}function hn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:gn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`placementGroups`]})}},e[0]=n,e[1]=r),t(r)}async function gn(e){let t=new Ke({GroupName:e});return await w().send(t)}function _n(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:vn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=n,e[1]=r),t(r)}async function vn(e){let t=new G({GroupName:e.groupName,Description:e.description,VpcId:e.vpcId});return await w().send(t)}function yn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:bn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=n,e[1]=r),t(r)}async function bn(e){let t=new Ye({GroupId:e});return await w().send(t)}function xn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Sn,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=n,e[1]=r),t(r)}async function Sn(e){let t=new B({GroupId:e.groupId,IpPermissions:[{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,IpRanges:[{CidrIp:e.cidrIp}]}]});return await w().send(t)}function Cn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:wn,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=n,e[1]=r),t(r)}async function wn(e){let t=new je({GroupId:e.groupId,IpPermissions:[{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,IpRanges:[{CidrIp:e.cidrIp}]}]});return await w().send(t)}function Z(e){return{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,...e.sourceGroupId?{UserIdGroupPairs:[{GroupId:e.sourceGroupId}]}:{IpRanges:[{CidrIp:e.cidrIp??``}]}}}function Tn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:En,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=n,e[1]=r),t(r)}async function En(e){let t=new ft({GroupId:e.groupId,IpPermissions:[Z(e)]});return await w().send(t)}function Dn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:On,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=n,e[1]=r),t(r)}async function On(e){let t=new dt({GroupId:e.groupId,IpPermissions:[Z(e)]});return await w().send(t)}function kn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:An,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=n,e[1]=r),t(r)}async function An(e){let t=new V({TagSpecifications:$(Y.internet_gateway,e?.name,[])});return await w().send(t)}function jn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Mn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=n,e[1]=r),t(r)}async function Mn(e){let t=new Ue({InternetGatewayId:e});return await w().send(t)}function Nn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Pn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=n,e[1]=r),t(r)}async function Pn(e){let t=new z({InternetGatewayId:e.internetGatewayId,VpcId:e.vpcId});return await w().send(t)}function Fn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:In,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=n,e[1]=r),t(r)}async function In(e){let t=new et({InternetGatewayId:e.internetGatewayId,VpcId:e.vpcId});return await w().send(t)}function Ln(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Rn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=n,e[1]=r),t(r)}async function Rn(e){let t=new L({Domain:`vpc`,TagSpecifications:$(Y.elastic_ip,e?.name,[])});return await w().send(t)}function zn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Bn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=n,e[1]=r),t(r)}async function Bn(e){let t=new ut({AllocationId:e});return await w().send(t)}function Vn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Hn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`addresses`]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Hn(e){let t=new Oe({AllocationId:e.allocationId,InstanceId:e.instanceId,NetworkInterfaceId:e.networkInterfaceId});return await w().send(t)}function Un(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Wn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`addresses`]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Wn(e){let t=new nt({AssociationId:e});return await w().send(t)}function Gn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Kn,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`iam-instance-profile-associations`,t.instanceId]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Kn(e){let t=new ke({InstanceId:e.instanceId,IamInstanceProfile:{Name:e.instanceProfileName}});return await w().send(t)}function qn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Jn,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`iam-instance-profile-associations`,t.instanceId]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Jn(e){let t=new rt({AssociationId:e.associationId});return await w().send(t)}function Q(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Yn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`natGateways`]}),n.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=n,e[1]=r),t(r)}async function Yn(e){let t=new H({SubnetId:e.subnetId,AllocationId:e.allocationId,TagSpecifications:$(Y.natgateway,e.name,[])});return await w().send(t)}function Xn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:Zn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`natGateways`]})}},e[0]=n,e[1]=r),t(r)}async function Zn(e){let t=new Ge({NatGatewayId:e});return await w().send(t)}function Qn(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:$n,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function $n(e){let t=new W({VpcId:e.vpcId,TagSpecifications:$(Y.route_table,e.name,[])});return await w().send(t)}function er(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:tr,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function tr(e){let t=new Je({RouteTableId:e});return await w().send(t)}function nr(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:rr,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function rr(e){let t=new U({RouteTableId:e.routeTableId,DestinationCidrBlock:e.destinationCidrBlock,GatewayId:e.gatewayId,NatGatewayId:e.natGatewayId});return await w().send(t)}function ir(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:ar,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function ar(e){let t=new qe({RouteTableId:e.routeTableId,DestinationCidrBlock:e.destinationCidrBlock});return await w().send(t)}function or(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:sr,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function sr(e){let t=new R({RouteTableId:e.routeTableId,SubnetId:e.subnetId});return await w().send(t)}function cr(){let e=(0,X.c)(2),n=I(),r;return e[0]===n?r=e[1]:(r={mutationFn:lr,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function lr(e){let t=new it({AssociationId:e});return await w().send(t)}function ur(e,t){let n=[];return e&&n.push({Key:`Name`,Value:e}),n.push(...t),n}function $(e,t,n){let r=ur(t,n);if(r.length!==0)return[{ResourceType:e,Tags:r}]}function dr(){let e=I();return t({mutationFn:async e=>{let t=w(),n=[],r=e.autoGenerateNames?e.namePrefix:void 0,i=e.tags.map(e=>({Key:e.key,Value:e.value})),a=`creating VPC`;try{let o=r?`${r}-vpc`:e.namePrefix,s=e.tenancy,c=(await t.send(new q({CidrBlock:e.cidrBlock,InstanceTenancy:s,TagSpecifications:$(Y.vpc,o,i)}))).Vpc?.VpcId;if(!c)throw Error(`VPC was created but no VPC ID was returned by the API`);if(n.push({type:`VPC`,id:c}),e.mode===`vpc-only`)return{vpcId:c,created:n};let l=De(e.cidrBlock,e.publicSubnetCount,e.privateSubnetCount),u=e.publicSubnetCidrs.length>0?e.publicSubnetCidrs:l.publicSubnets.map(e=>e.cidr),d=e.privateSubnetCidrs.length>0?e.privateSubnetCidrs:l.privateSubnets.map(e=>e.cidr);a=`creating public subnets`;let f=await Promise.all(Array.from({length:e.publicSubnetCount},async(e,a)=>{let o=r?`${r}-subnet-public-${a+1}`:void 0,s=(await t.send(new K({VpcId:c,CidrBlock:u[a],TagSpecifications:$(Y.subnet,o,i)}))).Subnet?.SubnetId;if(!s)throw Error(`Public subnet ${a+1} was created but no subnet ID was returned`);return n.push({type:`Public Subnet`,id:s}),await t.send(new J({SubnetId:s,MapPublicIpOnLaunch:{Value:!0}})),s}));a=`creating private subnets`;let p=await Promise.all(Array.from({length:e.privateSubnetCount},async(e,a)=>{let o=r?`${r}-subnet-private-${a+1}`:void 0,s=(await t.send(new K({VpcId:c,CidrBlock:d[a],TagSpecifications:$(Y.subnet,o,i)}))).Subnet?.SubnetId;if(!s)throw Error(`Private subnet ${a+1} was created but no subnet ID was returned`);return n.push({type:`Private Subnet`,id:s}),s}));if(e.publicSubnetCount>0){a=`creating internet gateway`;let e=r?`${r}-igw`:void 0,o=(await t.send(new V({TagSpecifications:$(Y.internet_gateway,e,i)}))).InternetGateway?.InternetGatewayId;if(!o)throw Error(`Internet gateway was created but no ID was returned`);n.push({type:`Internet Gateway`,id:o}),a=`attaching internet gateway to VPC`,await t.send(new z({InternetGatewayId:o,VpcId:c})),a=`creating public route table`;let s=r?`${r}-rtb-public`:void 0,l=(await t.send(new W({VpcId:c,TagSpecifications:$(Y.route_table,s,i)}))).RouteTable?.RouteTableId;if(!l)throw Error(`Public route table was created but no ID was returned`);n.push({type:`Public Route Table`,id:l}),a=`creating default route to internet gateway`,await t.send(new U({RouteTableId:l,DestinationCidrBlock:`0.0.0.0/0`,GatewayId:o})),a=`associating public subnets with route table`,await Promise.all(f.map(async e=>await t.send(new R({RouteTableId:l,SubnetId:e}))))}if(e.privateSubnetCount>0){a=`creating private route table`;let o=r?`${r}-rtb-private`:void 0,s=(await t.send(new W({VpcId:c,TagSpecifications:$(Y.route_table,o,i)}))).RouteTable?.RouteTableId;if(!s)throw Error(`Private route table was created but no ID was returned`);if(n.push({type:`Private Route Table`,id:s}),a=`associating private subnets with route table`,await Promise.all(p.map(async e=>await t.send(new R({RouteTableId:s,SubnetId:e})))),e.natGateway===`single`&&f[0]){a=`allocating Elastic IP for NAT gateway`;let e=(await t.send(new L({Domain:`vpc`,TagSpecifications:$(Y.elastic_ip,r?`${r}-eip-nat`:void 0,i)}))).AllocationId;if(!e)throw Error(`Elastic IP was allocated but no allocation ID was returned`);n.push({type:`Elastic IP`,id:e}),a=`creating NAT gateway`;let o=(await t.send(new H({SubnetId:f[0],AllocationId:e,TagSpecifications:$(Y.natgateway,r?`${r}-nat`:void 0,i)}))).NatGateway?.NatGatewayId;if(!o)throw Error(`NAT gateway was created but no ID was returned`);n.push({type:`NAT Gateway`,id:o}),a=`creating default route to NAT gateway`,await t.send(new U({RouteTableId:s,DestinationCidrBlock:`0.0.0.0/0`,NatGatewayId:o}))}}return{vpcId:c,created:n}}catch(e){return{vpcId:n.find(e=>e.type===`VPC`)?.id,created:n,error:e instanceof Error?e:Error(String(e)),failedStep:`Failed while ${a}`}}},onSuccess:()=>{e.invalidateQueries({queryKey:[`ec2`,`vpcs`]}),e.invalidateQueries({queryKey:[`ec2`,`subnets`]}),e.invalidateQueries({queryKey:[`ec2`,`internetGateways`]}),e.invalidateQueries({queryKey:[`ec2`,`routeTables`]}),e.invalidateQueries({queryKey:[`ec2`,`natGateways`]}),e.invalidateQueries({queryKey:[`ec2`,`addresses`]})}})}export{yn as A,en as B,dr as C,hn as D,Xn as E,Fn as F,zn as G,Qt as H,Xt as I,vt as J,Dn as K,Un as L,dn as M,Bt as N,ir as O,sn as P,qn as R,an as S,Pt as T,Rt as U,Mt as V,wt as W,St as X,bt as Y,Qn as _,Nn as a,ln as b,xn as c,Et as d,kn as f,nr as g,pn as h,or as i,Wt as j,er as k,Kt as l,Q as m,Vn as n,Jt as o,At as p,Tn as q,Gn as r,Cn as s,Ln as t,nn as u,_n as v,jn as w,It as x,Ht as y,cr as z}; \ No newline at end of file +import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{$n as n,Bn as r,Br as i,Fr as a,Gn as o,Gr as s,Hn as c,Hr as l,Ir as u,Jn as d,Jr as f,Kn as p,Kr as ee,Lr as m,Pr as te,Qn as ne,Qr as h,Rr as re,Un as ie,Ur as ae,Vn as oe,Vr as se,Wn as ce,Wr as le,Xn as ue,Xr as de,Yn as fe,Yr as pe,Zn as me,Zr as he,ar as ge,cr as _e,dr as ve,er as ye,fr as be,gr as xe,hr as Se,ir as g,lr as _,mr as v,nr as y,or as b,pr as x,qn as S,qr as C,r as w,rr as T,sr as E,tr as D,ur as O,zn as k,zr as A}from"./awsClient.js";import{At as j,D as Ce,Pt as M,St as N,Z as we,lt as Te,st as Ee,ut as P}from"./auth.js";import{$r as F,Rt as I}from"./index.js";import{t as De}from"./subnet-calculator.js";var L=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AllocateAddress`,{}).n(`EC2Client`,`AllocateAddressCommand`).sc(k).build(){},Oe=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AssociateAddress`,{}).n(`EC2Client`,`AssociateAddressCommand`).sc(r).build(){},ke=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AssociateIamInstanceProfile`,{}).n(`EC2Client`,`AssociateIamInstanceProfileCommand`).sc(oe).build(){},R=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AssociateRouteTable`,{}).n(`EC2Client`,`AssociateRouteTableCommand`).sc(c).build(){},z=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AttachInternetGateway`,{}).n(`EC2Client`,`AttachInternetGatewayCommand`).sc(ie).build(){},Ae=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AttachVolume`,{}).n(`EC2Client`,`AttachVolumeCommand`).sc(ce).build(){},je=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AuthorizeSecurityGroupEgress`,{}).n(`EC2Client`,`AuthorizeSecurityGroupEgressCommand`).sc(o).build(){},B=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`AuthorizeSecurityGroupIngress`,{}).n(`EC2Client`,`AuthorizeSecurityGroupIngressCommand`).sc(p).build(){};function Me(e){let{port:t,query:n}=e,{protocol:r,path:i,hostname:a}=e;r&&r.slice(-1)!==`:`&&(r+=`:`),t&&(a+=`:${t}`),i&&i.charAt(0)!==`/`&&(i=`/${i}`);let o=n?we(n):``;o&&o[0]!==`?`&&(o=`?${o}`);let s=``;(e.username!=null||e.password!=null)&&(s=`${e.username??``}:${e.password??``}@`);let c=``;return e.fragment&&(c=`#${e.fragment}`),`${r}//${s}${a}${i}${o}${c}`}var Ne=`2016-11-15`;function Pe(e){return(t,n)=>async n=>{let{input:r}=n;if(!r.PresignedUrl){let t=await e.region(),i=await Te(r,{getEndpointParameterInstructions(){return{UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}}},{...e,region:r.SourceRegion}),a=typeof e.endpoint==`function`?await e.endpoint():j(i),o=new M({...a,protocol:`https`,headers:{host:a.hostname},query:{...Object.entries(r).reduce((e,[t,n])=>(e[t]=String(n??``),e),{}),Action:`CopySnapshot`,Version:Ne,DestinationRegion:t}}),s=await new Ce({credentials:e.credentials,region:r.SourceRegion,service:`ec2`,sha256:e.sha256,uriEscapePath:e.signingEscapePath}).presign(o,{expiresIn:3600});if(n={...n,input:{...n.input,DestinationRegion:t,PresignedUrl:Me(s)}},M.isInstance(n.request)){let{request:e}=n;(e.body??``).includes(`DestinationRegion=`)||(e.body+=`&DestinationRegion=${t}`),(e.body??``).includes(`PresignedUrl=`)||(e.body+=`&PresignedUrl=${Ee(n.input.PresignedUrl)}`)}}return t(n)}}var Fe={step:`serialize`,tags:[`CROSS_REGION_PRESIGNED_URL`],name:`crossRegionPresignedUrlMiddleware`,override:!0,relation:`after`,toMiddleware:`endpointV2Middleware`},Ie=e=>({applyToStack:t=>{t.add(Pe(e),Fe)}}),Le=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions()),Ie(n)]}).s(`AmazonEC2`,`CopySnapshot`,{}).n(`EC2Client`,`CopySnapshotCommand`).sc(S).build(){},Re=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateImage`,{}).n(`EC2Client`,`CreateImageCommand`).sc(d).build(){},V=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateInternetGateway`,{}).n(`EC2Client`,`CreateInternetGatewayCommand`).sc(fe).build(){},ze=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateKeyPair`,{}).n(`EC2Client`,`CreateKeyPairCommand`).sc(ue).build(){},H=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateNatGateway`,{}).n(`EC2Client`,`CreateNatGatewayCommand`).sc(me).build(){},Be=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreatePlacementGroup`,{}).n(`EC2Client`,`CreatePlacementGroupCommand`).sc(ne).build(){},U=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateRoute`,{}).n(`EC2Client`,`CreateRouteCommand`).sc(n).build(){},W=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateRouteTable`,{}).n(`EC2Client`,`CreateRouteTableCommand`).sc(ye).build(){},G=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateSecurityGroup`,{}).n(`EC2Client`,`CreateSecurityGroupCommand`).sc(D).build(){},Ve=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateSnapshot`,{}).n(`EC2Client`,`CreateSnapshotCommand`).sc(y).build(){},K=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateSubnet`,{}).n(`EC2Client`,`CreateSubnetCommand`).sc(T).build(){},He=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateVolume`,{}).n(`EC2Client`,`CreateVolumeCommand`).sc(g).build(){},q=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`CreateVpc`,{}).n(`EC2Client`,`CreateVpcCommand`).sc(ge).build(){},Ue=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteInternetGateway`,{}).n(`EC2Client`,`DeleteInternetGatewayCommand`).sc(b).build(){},We=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteKeyPair`,{}).n(`EC2Client`,`DeleteKeyPairCommand`).sc(E).build(){},Ge=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteNatGateway`,{}).n(`EC2Client`,`DeleteNatGatewayCommand`).sc(_e).build(){},Ke=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeletePlacementGroup`,{}).n(`EC2Client`,`DeletePlacementGroupCommand`).sc(_).build(){},qe=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteRoute`,{}).n(`EC2Client`,`DeleteRouteCommand`).sc(O).build(){},Je=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteRouteTable`,{}).n(`EC2Client`,`DeleteRouteTableCommand`).sc(ve).build(){},Ye=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteSecurityGroup`,{}).n(`EC2Client`,`DeleteSecurityGroupCommand`).sc(be).build(){},Xe=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteSnapshot`,{}).n(`EC2Client`,`DeleteSnapshotCommand`).sc(x).build(){},Ze=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteSubnet`,{}).n(`EC2Client`,`DeleteSubnetCommand`).sc(v).build(){},Qe=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteVolume`,{}).n(`EC2Client`,`DeleteVolumeCommand`).sc(Se).build(){},$e=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DeleteVpc`,{}).n(`EC2Client`,`DeleteVpcCommand`).sc(xe).build(){},et=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DetachInternetGateway`,{}).n(`EC2Client`,`DetachInternetGatewayCommand`).sc(te).build(){},tt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DetachVolume`,{}).n(`EC2Client`,`DetachVolumeCommand`).sc(a).build(){},nt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DisassociateAddress`,{}).n(`EC2Client`,`DisassociateAddressCommand`).sc(u).build(){},rt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DisassociateIamInstanceProfile`,{}).n(`EC2Client`,`DisassociateIamInstanceProfileCommand`).sc(m).build(){},it=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DisassociateRouteTable`,{}).n(`EC2Client`,`DisassociateRouteTableCommand`).sc(re).build(){},at=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`GetConsoleOutput`,{}).n(`EC2Client`,`GetConsoleOutputCommand`).sc(A).build(){},ot=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ImportKeyPair`,{}).n(`EC2Client`,`ImportKeyPairCommand`).sc(i).build(){},st=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ModifyInstanceAttribute`,{}).n(`EC2Client`,`ModifyInstanceAttributeCommand`).sc(se).build(){},J=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ModifySubnetAttribute`,{}).n(`EC2Client`,`ModifySubnetAttributeCommand`).sc(l).build(){},ct=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ModifyVolume`,{}).n(`EC2Client`,`ModifyVolumeCommand`).sc(ae).build(){},lt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`RebootInstances`,{}).n(`EC2Client`,`RebootInstancesCommand`).sc(le).build(){},ut=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`ReleaseAddress`,{}).n(`EC2Client`,`ReleaseAddressCommand`).sc(s).build(){},dt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`RevokeSecurityGroupEgress`,{}).n(`EC2Client`,`RevokeSecurityGroupEgressCommand`).sc(ee).build(){},ft=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`RevokeSecurityGroupIngress`,{}).n(`EC2Client`,`RevokeSecurityGroupIngressCommand`).sc(C).build(){},pt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`RunInstances`,{}).n(`EC2Client`,`RunInstancesCommand`).sc(f).build(){},mt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`StartInstances`,{}).n(`EC2Client`,`StartInstancesCommand`).sc(pe).build(){},ht=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`StopInstances`,{}).n(`EC2Client`,`StopInstancesCommand`).sc(de).build(){},gt=class extends N.classBuilder().ep(h).m(function(e,t,n,r){return[P(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`TerminateInstances`,{}).n(`EC2Client`,`TerminateInstancesCommand`).sc(he).build(){},Y={capacity_block:`capacity-block`,capacity_manager_data_export:`capacity-manager-data-export`,capacity_reservation:`capacity-reservation`,capacity_reservation_cancellation_quote:`capacity-reservation-cancellation-quote`,capacity_reservation_fleet:`capacity-reservation-fleet`,carrier_gateway:`carrier-gateway`,client_vpn_endpoint:`client-vpn-endpoint`,coip_pool:`coip-pool`,customer_gateway:`customer-gateway`,declarative_policies_report:`declarative-policies-report`,dedicated_host:`dedicated-host`,dhcp_options:`dhcp-options`,egress_only_internet_gateway:`egress-only-internet-gateway`,elastic_gpu:`elastic-gpu`,elastic_ip:`elastic-ip`,export_image_task:`export-image-task`,export_instance_task:`export-instance-task`,fleet:`fleet`,fpga_image:`fpga-image`,host_reservation:`host-reservation`,image:`image`,image_usage_report:`image-usage-report`,import_image_task:`import-image-task`,import_snapshot_task:`import-snapshot-task`,instance:`instance`,instance_connect_endpoint:`instance-connect-endpoint`,instance_event_window:`instance-event-window`,internet_gateway:`internet-gateway`,ipam:`ipam`,ipam_external_resource_verification_token:`ipam-external-resource-verification-token`,ipam_policy:`ipam-policy`,ipam_pool:`ipam-pool`,ipam_pool_allocation:`ipam-pool-allocation`,ipam_prefix_list_resolver:`ipam-prefix-list-resolver`,ipam_prefix_list_resolver_target:`ipam-prefix-list-resolver-target`,ipam_resource_discovery:`ipam-resource-discovery`,ipam_resource_discovery_association:`ipam-resource-discovery-association`,ipam_scope:`ipam-scope`,ipv4pool_ec2:`ipv4pool-ec2`,ipv6pool_ec2:`ipv6pool-ec2`,key_pair:`key-pair`,launch_template:`launch-template`,local_gateway:`local-gateway`,local_gateway_route_table:`local-gateway-route-table`,local_gateway_route_table_virtual_interface_group_association:`local-gateway-route-table-virtual-interface-group-association`,local_gateway_route_table_vpc_association:`local-gateway-route-table-vpc-association`,local_gateway_virtual_interface:`local-gateway-virtual-interface`,local_gateway_virtual_interface_group:`local-gateway-virtual-interface-group`,mac_modification_task:`mac-modification-task`,natgateway:`natgateway`,network_acl:`network-acl`,network_insights_access_scope:`network-insights-access-scope`,network_insights_access_scope_analysis:`network-insights-access-scope-analysis`,network_insights_analysis:`network-insights-analysis`,network_insights_path:`network-insights-path`,network_interface:`network-interface`,outpost_lag:`outpost-lag`,placement_group:`placement-group`,prefix_list:`prefix-list`,replace_root_volume_task:`replace-root-volume-task`,reserved_instances:`reserved-instances`,route_server:`route-server`,route_server_endpoint:`route-server-endpoint`,route_server_peer:`route-server-peer`,route_table:`route-table`,secondary_interface:`secondary-interface`,secondary_network:`secondary-network`,secondary_subnet:`secondary-subnet`,security_group:`security-group`,security_group_rule:`security-group-rule`,service_link_virtual_interface:`service-link-virtual-interface`,snapshot:`snapshot`,spot_fleet_request:`spot-fleet-request`,spot_instances_request:`spot-instances-request`,subnet:`subnet`,subnet_cidr_reservation:`subnet-cidr-reservation`,traffic_mirror_filter:`traffic-mirror-filter`,traffic_mirror_filter_rule:`traffic-mirror-filter-rule`,traffic_mirror_session:`traffic-mirror-session`,traffic_mirror_target:`traffic-mirror-target`,transit_gateway:`transit-gateway`,transit_gateway_attachment:`transit-gateway-attachment`,transit_gateway_connect_peer:`transit-gateway-connect-peer`,transit_gateway_metering_policy:`transit-gateway-metering-policy`,transit_gateway_multicast_domain:`transit-gateway-multicast-domain`,transit_gateway_policy_table:`transit-gateway-policy-table`,transit_gateway_route_table:`transit-gateway-route-table`,transit_gateway_route_table_announcement:`transit-gateway-route-table-announcement`,verified_access_endpoint:`verified-access-endpoint`,verified_access_endpoint_target:`verified-access-endpoint-target`,verified_access_group:`verified-access-group`,verified_access_instance:`verified-access-instance`,verified_access_policy:`verified-access-policy`,verified_access_trust_provider:`verified-access-trust-provider`,volume:`volume`,vpc:`vpc`,vpc_block_public_access_exclusion:`vpc-block-public-access-exclusion`,vpc_encryption_control:`vpc-encryption-control`,vpc_endpoint:`vpc-endpoint`,vpc_endpoint_connection:`vpc-endpoint-connection`,vpc_endpoint_connection_device_type:`vpc-endpoint-connection-device-type`,vpc_endpoint_service:`vpc-endpoint-service`,vpc_endpoint_service_permission:`vpc-endpoint-service-permission`,vpc_flow_log:`vpc-flow-log`,vpc_peering_connection:`vpc-peering-connection`,vpn_concentrator:`vpn-concentrator`,vpn_connection:`vpn-connection`,vpn_connection_device_type:`vpn-connection-device-type`,vpn_gateway:`vpn-gateway`},X=e(),_t=/\s+/;function vt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:yt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function yt(e){let t=new mt({InstanceIds:[e]});return await w().send(t)}function bt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:xt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function xt(e){let t=new ht({InstanceIds:[e]});return await w().send(t)}function St(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Ct,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Ct(e){let t=new gt({InstanceIds:[e]});return await w().send(t)}function wt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Tt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Tt(e){let t=new lt({InstanceIds:[e]});return await w().send(t)}function Et(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Dt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=n,e[1]=r),t(r)}async function Dt(e){let t=w(),n=await Ot(t,e),r=new pt({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SubnetId:e.subnetId||void 0,SecurityGroupIds:n.length>0?n:void 0,Placement:e.placementGroupName?{GroupName:e.placementGroupName}:void 0,BlockDeviceMappings:kt(e)});return await t.send(r)}async function Ot(e,t){if(t.securityGroupMode!==`create`)return t.securityGroupIds??[];let n=(await e.send(new G({GroupName:t.newSgName,Description:t.newSgDescription||`Created by launch wizard`,VpcId:t.resolvedVpcId}))).GroupId;if(!n)throw Error(`Security group was created but no ID was returned`);let r=[...t.allowSsh?[22]:[],...t.allowHttp?[80]:[],...t.allowHttps?[443]:[]];if(r.length>0){let i=t.ruleSource===`custom`&&t.customCidr?t.customCidr:`0.0.0.0/0`;await e.send(new B({GroupId:n,IpPermissions:r.map(e=>({IpProtocol:`tcp`,FromPort:e,ToPort:e,IpRanges:[{CidrIp:i}]}))}))}return[n]}function kt(e){let{rootDeviceName:t,rootVolumeSize:n,rootVolumeType:r,rootDeleteOnTermination:i}=e;return n!==void 0||r!==void 0||i!==void 0?[{DeviceName:t,Ebs:{...n!==void 0&&{VolumeSize:n},...r!==void 0&&{VolumeType:r},...i!==void 0&&{DeleteOnTermination:i}}}]:void 0}function At(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:jt,onSuccess:()=>{n.invalidateQueries(I)}},e[0]=n,e[1]=r),t(r)}async function jt(e){let t=new ze({KeyName:e.keyName,KeyType:`rsa`}),n=await w().send(t);if(!n.KeyMaterial)throw Error(`Key pair was created but the API returned no private key. The key cannot be recovered — delete it and try again.`);return n}function Mt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Nt,onSuccess:()=>{n.invalidateQueries(I)}},e[0]=n,e[1]=r),t(r)}async function Nt(e){let t=e.publicKeyMaterial.trim().split(_t).slice(0,2).join(` `),n=new ot({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await w().send(n)}function Pt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Ft,onSuccess:()=>{n.invalidateQueries(I)}},e[0]=n,e[1]=r),t(r)}async function Ft(e){let t=new We({KeyPairId:e});return await w().send(t)}function It(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Lt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=n,e[1]=r),t(r)}async function Lt(e){let t=new He({Size:e.size,AvailabilityZone:e.availabilityZone,VolumeType:`gp3`});return await w().send(t)}function Rt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:zt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=n,e[1]=r),t(r)}async function zt(e){let t=new ct({VolumeId:e.volumeId,Size:e.size});return await w().send(t)}function Bt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Vt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]})}},e[0]=n,e[1]=r),t(r)}async function Vt(e){let t=new Qe({VolumeId:e});return await w().send(t)}function Ht(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Ut,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=n,e[1]=r),t(r)}async function Ut(e){let t=new Ve({VolumeId:e.volumeId,Description:e.description||void 0});return await w().send(t)}function Wt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Gt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=n,e[1]=r),t(r)}async function Gt(e){let t=new Xe({SnapshotId:e});return await w().send(t)}function Kt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:qt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`snapshots`]})}},e[0]=n,e[1]=r),t(r)}async function qt(e){let t=new Le({SourceSnapshotId:e.sourceSnapshotId,SourceRegion:e.sourceRegion,Description:e.description||void 0});return await w().send(t)}function Jt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Yt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Yt(e){let t=new Ae({VolumeId:e.volumeId,InstanceId:e.instanceId,Device:e.device||void 0});return await w().send(t)}function Xt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Zt,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`volumes`]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Zt(e){let t=new tt({VolumeId:e.volumeId,InstanceId:e.instanceId||void 0,Force:e.force});return await w().send(t)}function Qt(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:$t,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function $t(e){let{instanceId:t,...n}=e,r=new st({InstanceId:t,InstanceType:{Value:n.instanceType}});return await w().send(r)}function en(){let e=(0,X.c)(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={mutationFn:tn},e[0]=n):n=e[0],t(n)}async function tn(e){let t=new at({InstanceId:e});return await w().send(t)}function nn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:rn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=n,e[1]=r),t(r)}async function rn(e){let t=new Re({InstanceId:e.instanceId,Name:e.name,Description:e.description||void 0});return await w().send(t)}function an(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:on,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`vpcs`]})}},e[0]=n,e[1]=r),t(r)}async function on(e){let t=new q({CidrBlock:e.cidrBlock,TagSpecifications:e.name?[{ResourceType:`vpc`,Tags:[{Key:`Name`,Value:e.name}]}]:void 0});return await w().send(t)}function sn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:cn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`vpcs`]})}},e[0]=n,e[1]=r),t(r)}async function cn(e){let t=new $e({VpcId:e});return await w().send(t)}function ln(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:un,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`subnets`]})}},e[0]=n,e[1]=r),t(r)}async function un(e){let t=w(),n=await t.send(new K({VpcId:e.vpcId,CidrBlock:e.cidrBlock,AvailabilityZone:e.availabilityZone||void 0})),r=n.Subnet?.SubnetId;return e.mapPublicIpOnLaunch&&r&&await t.send(new J({SubnetId:r,MapPublicIpOnLaunch:{Value:!0}})),n}function dn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:fn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`subnets`]})}},e[0]=n,e[1]=r),t(r)}async function fn(e){let t=new Ze({SubnetId:e});return await w().send(t)}function pn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:mn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`placementGroups`]})}},e[0]=n,e[1]=r),t(r)}async function mn(e){let t=new Be({GroupName:e.groupName,Strategy:e.strategy});return await w().send(t)}function hn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:gn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`placementGroups`]})}},e[0]=n,e[1]=r),t(r)}async function gn(e){let t=new Ke({GroupName:e});return await w().send(t)}function _n(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:vn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=n,e[1]=r),t(r)}async function vn(e){let t=new G({GroupName:e.groupName,Description:e.description,VpcId:e.vpcId});return await w().send(t)}function yn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:bn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]})}},e[0]=n,e[1]=r),t(r)}async function bn(e){let t=new Ye({GroupId:e});return await w().send(t)}function xn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Sn,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=n,e[1]=r),t(r)}async function Sn(e){let t=new B({GroupId:e.groupId,IpPermissions:[{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,IpRanges:[{CidrIp:e.cidrIp}]}]});return await w().send(t)}function Cn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:wn,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=n,e[1]=r),t(r)}async function wn(e){let t=new je({GroupId:e.groupId,IpPermissions:[{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,IpRanges:[{CidrIp:e.cidrIp}]}]});return await w().send(t)}function Z(e){return{IpProtocol:e.ipProtocol,FromPort:e.fromPort,ToPort:e.toPort,...e.sourceGroupId?{UserIdGroupPairs:[{GroupId:e.sourceGroupId}]}:{IpRanges:[{CidrIp:e.cidrIp??``}]}}}function Tn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:En,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=n,e[1]=r),t(r)}async function En(e){let t=new ft({GroupId:e.groupId,IpPermissions:[Z(e)]});return await w().send(t)}function Dn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:On,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`securityGroups`]}),n.invalidateQueries({queryKey:[`ec2`,`securityGroups`,t.groupId]})}},e[0]=n,e[1]=r),t(r)}async function On(e){let t=new dt({GroupId:e.groupId,IpPermissions:[Z(e)]});return await w().send(t)}function kn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:An,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=n,e[1]=r),t(r)}async function An(e){let t=new V({TagSpecifications:$(Y.internet_gateway,e?.name,[])});return await w().send(t)}function jn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Mn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=n,e[1]=r),t(r)}async function Mn(e){let t=new Ue({InternetGatewayId:e});return await w().send(t)}function Nn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Pn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=n,e[1]=r),t(r)}async function Pn(e){let t=new z({InternetGatewayId:e.internetGatewayId,VpcId:e.vpcId});return await w().send(t)}function Fn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:In,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`internetGateways`]})}},e[0]=n,e[1]=r),t(r)}async function In(e){let t=new et({InternetGatewayId:e.internetGatewayId,VpcId:e.vpcId});return await w().send(t)}function Ln(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Rn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=n,e[1]=r),t(r)}async function Rn(e){let t=new L({Domain:`vpc`,TagSpecifications:$(Y.elastic_ip,e?.name,[])});return await w().send(t)}function zn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Bn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=n,e[1]=r),t(r)}async function Bn(e){let t=new ut({AllocationId:e});return await w().send(t)}function Vn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Hn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`addresses`]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Hn(e){let t=new Oe({AllocationId:e.allocationId,InstanceId:e.instanceId,NetworkInterfaceId:e.networkInterfaceId});return await w().send(t)}function Un(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Wn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`addresses`]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Wn(e){let t=new nt({AssociationId:e});return await w().send(t)}function Gn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Kn,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`iam-instance-profile-associations`,t.instanceId]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Kn(e){let t=new ke({InstanceId:e.instanceId,IamInstanceProfile:{Name:e.instanceProfileName}});return await w().send(t)}function qn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Jn,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ec2`,`iam-instance-profile-associations`,t.instanceId]}),n.invalidateQueries({queryKey:[`ec2`,`instances`]})}},e[0]=n,e[1]=r),t(r)}async function Jn(e){let t=new rt({AssociationId:e.associationId});return await w().send(t)}function Q(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Yn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`natGateways`]}),n.invalidateQueries({queryKey:[`ec2`,`addresses`]})}},e[0]=n,e[1]=r),t(r)}async function Yn(e){let t=new H({SubnetId:e.subnetId,AllocationId:e.allocationId,TagSpecifications:$(Y.natgateway,e.name,[])});return await w().send(t)}function Xn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:Zn,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`natGateways`]})}},e[0]=n,e[1]=r),t(r)}async function Zn(e){let t=new Ge({NatGatewayId:e});return await w().send(t)}function Qn(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:$n,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function $n(e){let t=new W({VpcId:e.vpcId,TagSpecifications:$(Y.route_table,e.name,[])});return await w().send(t)}function er(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:tr,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function tr(e){let t=new Je({RouteTableId:e});return await w().send(t)}function nr(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:rr,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function rr(e){let t=new U({RouteTableId:e.routeTableId,DestinationCidrBlock:e.destinationCidrBlock,GatewayId:e.gatewayId,NatGatewayId:e.natGatewayId});return await w().send(t)}function ir(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:ar,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function ar(e){let t=new qe({RouteTableId:e.routeTableId,DestinationCidrBlock:e.destinationCidrBlock});return await w().send(t)}function or(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:sr,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function sr(e){let t=new R({RouteTableId:e.routeTableId,SubnetId:e.subnetId});return await w().send(t)}function cr(){let e=(0,X.c)(2),n=F(),r;return e[0]===n?r=e[1]:(r={mutationFn:lr,onSuccess:()=>{n.invalidateQueries({queryKey:[`ec2`,`routeTables`]})}},e[0]=n,e[1]=r),t(r)}async function lr(e){let t=new it({AssociationId:e});return await w().send(t)}function ur(e,t){let n=[];return e&&n.push({Key:`Name`,Value:e}),n.push(...t),n}function $(e,t,n){let r=ur(t,n);if(r.length!==0)return[{ResourceType:e,Tags:r}]}function dr(){let e=F();return t({mutationFn:async e=>{let t=w(),n=[],r=e.autoGenerateNames?e.namePrefix:void 0,i=e.tags.map(e=>({Key:e.key,Value:e.value})),a=`creating VPC`;try{let o=r?`${r}-vpc`:e.namePrefix,s=e.tenancy,c=(await t.send(new q({CidrBlock:e.cidrBlock,InstanceTenancy:s,TagSpecifications:$(Y.vpc,o,i)}))).Vpc?.VpcId;if(!c)throw Error(`VPC was created but no VPC ID was returned by the API`);if(n.push({type:`VPC`,id:c}),e.mode===`vpc-only`)return{vpcId:c,created:n};let l=De(e.cidrBlock,e.publicSubnetCount,e.privateSubnetCount),u=e.publicSubnetCidrs.length>0?e.publicSubnetCidrs:l.publicSubnets.map(e=>e.cidr),d=e.privateSubnetCidrs.length>0?e.privateSubnetCidrs:l.privateSubnets.map(e=>e.cidr);a=`creating public subnets`;let f=await Promise.all(Array.from({length:e.publicSubnetCount},async(e,a)=>{let o=r?`${r}-subnet-public-${a+1}`:void 0,s=(await t.send(new K({VpcId:c,CidrBlock:u[a],TagSpecifications:$(Y.subnet,o,i)}))).Subnet?.SubnetId;if(!s)throw Error(`Public subnet ${a+1} was created but no subnet ID was returned`);return n.push({type:`Public Subnet`,id:s}),await t.send(new J({SubnetId:s,MapPublicIpOnLaunch:{Value:!0}})),s}));a=`creating private subnets`;let p=await Promise.all(Array.from({length:e.privateSubnetCount},async(e,a)=>{let o=r?`${r}-subnet-private-${a+1}`:void 0,s=(await t.send(new K({VpcId:c,CidrBlock:d[a],TagSpecifications:$(Y.subnet,o,i)}))).Subnet?.SubnetId;if(!s)throw Error(`Private subnet ${a+1} was created but no subnet ID was returned`);return n.push({type:`Private Subnet`,id:s}),s}));if(e.publicSubnetCount>0){a=`creating internet gateway`;let e=r?`${r}-igw`:void 0,o=(await t.send(new V({TagSpecifications:$(Y.internet_gateway,e,i)}))).InternetGateway?.InternetGatewayId;if(!o)throw Error(`Internet gateway was created but no ID was returned`);n.push({type:`Internet Gateway`,id:o}),a=`attaching internet gateway to VPC`,await t.send(new z({InternetGatewayId:o,VpcId:c})),a=`creating public route table`;let s=r?`${r}-rtb-public`:void 0,l=(await t.send(new W({VpcId:c,TagSpecifications:$(Y.route_table,s,i)}))).RouteTable?.RouteTableId;if(!l)throw Error(`Public route table was created but no ID was returned`);n.push({type:`Public Route Table`,id:l}),a=`creating default route to internet gateway`,await t.send(new U({RouteTableId:l,DestinationCidrBlock:`0.0.0.0/0`,GatewayId:o})),a=`associating public subnets with route table`,await Promise.all(f.map(async e=>await t.send(new R({RouteTableId:l,SubnetId:e}))))}if(e.privateSubnetCount>0){a=`creating private route table`;let o=r?`${r}-rtb-private`:void 0,s=(await t.send(new W({VpcId:c,TagSpecifications:$(Y.route_table,o,i)}))).RouteTable?.RouteTableId;if(!s)throw Error(`Private route table was created but no ID was returned`);if(n.push({type:`Private Route Table`,id:s}),a=`associating private subnets with route table`,await Promise.all(p.map(async e=>await t.send(new R({RouteTableId:s,SubnetId:e})))),e.natGateway===`single`&&f[0]){a=`allocating Elastic IP for NAT gateway`;let e=(await t.send(new L({Domain:`vpc`,TagSpecifications:$(Y.elastic_ip,r?`${r}-eip-nat`:void 0,i)}))).AllocationId;if(!e)throw Error(`Elastic IP was allocated but no allocation ID was returned`);n.push({type:`Elastic IP`,id:e}),a=`creating NAT gateway`;let o=(await t.send(new H({SubnetId:f[0],AllocationId:e,TagSpecifications:$(Y.natgateway,r?`${r}-nat`:void 0,i)}))).NatGateway?.NatGatewayId;if(!o)throw Error(`NAT gateway was created but no ID was returned`);n.push({type:`NAT Gateway`,id:o}),a=`creating default route to NAT gateway`,await t.send(new U({RouteTableId:s,DestinationCidrBlock:`0.0.0.0/0`,NatGatewayId:o}))}}return{vpcId:c,created:n}}catch(e){return{vpcId:n.find(e=>e.type===`VPC`)?.id,created:n,error:e instanceof Error?e:Error(String(e)),failedStep:`Failed while ${a}`}}},onSuccess:()=>{e.invalidateQueries({queryKey:[`ec2`,`vpcs`]}),e.invalidateQueries({queryKey:[`ec2`,`subnets`]}),e.invalidateQueries({queryKey:[`ec2`,`internetGateways`]}),e.invalidateQueries({queryKey:[`ec2`,`routeTables`]}),e.invalidateQueries({queryKey:[`ec2`,`natGateways`]}),e.invalidateQueries({queryKey:[`ec2`,`addresses`]})}})}export{yn as A,en as B,dr as C,hn as D,Xn as E,Fn as F,zn as G,Qt as H,Xt as I,vt as J,Dn as K,Un as L,dn as M,Bt as N,ir as O,sn as P,qn as R,an as S,Pt as T,Rt as U,Mt as V,wt as W,St as X,bt as Y,Qn as _,Nn as a,ln as b,xn as c,Et as d,kn as f,nr as g,pn as h,or as i,Wt as j,er as k,Kt as l,Q as m,Vn as n,Jt as o,At as p,Tn as q,Gn as r,Cn as s,Ln as t,nn as u,_n as v,jn as w,It as x,Ht as y,cr as z}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/ecr.js b/spinifex/services/spinifexui/frontend/dist/assets/ecr.js index 3783cf86e..ce8e77663 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/ecr.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/ecr.js @@ -1 +1 @@ -import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{Cn as n,Dn as r,En as i,Fn as a,Nn as o,Pn as s,Rn as c,Tn as l,i as u,jn as d,wn as f}from"./awsClient.js";import{St as p,ut as m}from"./auth.js";import{Zr as h}from"./index.js";var g=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`BatchDeleteImage`,{}).n(`ECRClient`,`BatchDeleteImageCommand`).sc(n).build(){},_=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`CreateRepository`,{}).n(`ECRClient`,`CreateRepositoryCommand`).sc(f).build(){},v=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DeleteLifecyclePolicy`,{}).n(`ECRClient`,`DeleteLifecyclePolicyCommand`).sc(l).build(){},y=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DeleteRepository`,{}).n(`ECRClient`,`DeleteRepositoryCommand`).sc(i).build(){},b=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DeleteRepositoryPolicy`,{}).n(`ECRClient`,`DeleteRepositoryPolicyCommand`).sc(r).build(){},x=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`GetLifecyclePolicyPreview`,{}).n(`ECRClient`,`GetLifecyclePolicyPreviewCommand`).sc(d).build(){},S=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`PutImageTagMutability`,{}).n(`ECRClient`,`PutImageTagMutabilityCommand`).sc(o).build(){},C=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`PutLifecyclePolicy`,{}).n(`ECRClient`,`PutLifecyclePolicyCommand`).sc(s).build(){},w=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`SetRepositoryPolicy`,{}).n(`ECRClient`,`SetRepositoryPolicyCommand`).sc(a).build(){},T=e();function E(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),t(r)}async function D(e){let t=new _({repositoryName:e});return await u().send(t)}function O(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),t(r)}async function k(e){let t=new y({repositoryName:e,force:!0});return await u().send(t)}function A(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:j,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`images`]})}},e[0]=n,e[1]=r),t(r)}async function j(e){let t=new g({repositoryName:e.repositoryName,imageIds:e.imageIds});return await u().send(t)}function M(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:N,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`policy`]})}},e[0]=n,e[1]=r),t(r)}async function N(e){let t=new w({repositoryName:e.repositoryName,policyText:e.policyText});return await u().send(t)}function P(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),t(r)}async function F(e){let t=new S({repositoryName:e.repositoryName,imageTagMutability:e.imageTagMutability});return await u().send(t)}function I(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:L,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t,`policy`]})}},e[0]=n,e[1]=r),t(r)}async function L(e){let t=new b({repositoryName:e});return await u().send(t)}function R(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:z,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`lifecycle`]})}},e[0]=n,e[1]=r),t(r)}async function z(e){let t=new C({repositoryName:e.repositoryName,lifecyclePolicyText:e.lifecyclePolicyText});return await u().send(t)}function B(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:V,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t,`lifecycle`]})}},e[0]=n,e[1]=r),t(r)}async function V(e){let t=new v({repositoryName:e});return await u().send(t)}function H(){let e=(0,T.c)(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={mutationFn:U},e[0]=n):n=e[0],t(n)}async function U(e){let t=new x({repositoryName:e});return await u().send(t)}export{I as a,R as c,O as i,M as l,E as n,H as o,B as r,P as s,A as t}; \ No newline at end of file +import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{Cn as n,Dn as r,En as i,Fn as a,Nn as o,Pn as s,Rn as c,Tn as l,i as u,jn as d,wn as f}from"./awsClient.js";import{St as p,ut as m}from"./auth.js";import{$r as h}from"./index.js";var g=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`BatchDeleteImage`,{}).n(`ECRClient`,`BatchDeleteImageCommand`).sc(n).build(){},_=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`CreateRepository`,{}).n(`ECRClient`,`CreateRepositoryCommand`).sc(f).build(){},v=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DeleteLifecyclePolicy`,{}).n(`ECRClient`,`DeleteLifecyclePolicyCommand`).sc(l).build(){},y=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DeleteRepository`,{}).n(`ECRClient`,`DeleteRepositoryCommand`).sc(i).build(){},b=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DeleteRepositoryPolicy`,{}).n(`ECRClient`,`DeleteRepositoryPolicyCommand`).sc(r).build(){},x=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`GetLifecyclePolicyPreview`,{}).n(`ECRClient`,`GetLifecyclePolicyPreviewCommand`).sc(d).build(){},S=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`PutImageTagMutability`,{}).n(`ECRClient`,`PutImageTagMutabilityCommand`).sc(o).build(){},C=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`PutLifecyclePolicy`,{}).n(`ECRClient`,`PutLifecyclePolicyCommand`).sc(s).build(){},w=class extends p.classBuilder().ep(c).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`SetRepositoryPolicy`,{}).n(`ECRClient`,`SetRepositoryPolicyCommand`).sc(a).build(){},T=e();function E(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),t(r)}async function D(e){let t=new _({repositoryName:e});return await u().send(t)}function O(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),t(r)}async function k(e){let t=new y({repositoryName:e,force:!0});return await u().send(t)}function A(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:j,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`images`]})}},e[0]=n,e[1]=r),t(r)}async function j(e){let t=new g({repositoryName:e.repositoryName,imageIds:e.imageIds});return await u().send(t)}function M(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:N,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`policy`]})}},e[0]=n,e[1]=r),t(r)}async function N(e){let t=new w({repositoryName:e.repositoryName,policyText:e.policyText});return await u().send(t)}function P(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),t(r)}async function F(e){let t=new S({repositoryName:e.repositoryName,imageTagMutability:e.imageTagMutability});return await u().send(t)}function I(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:L,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t,`policy`]})}},e[0]=n,e[1]=r),t(r)}async function L(e){let t=new b({repositoryName:e});return await u().send(t)}function R(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:z,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`lifecycle`]})}},e[0]=n,e[1]=r),t(r)}async function z(e){let t=new C({repositoryName:e.repositoryName,lifecyclePolicyText:e.lifecyclePolicyText});return await u().send(t)}function B(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:V,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t,`lifecycle`]})}},e[0]=n,e[1]=r),t(r)}async function V(e){let t=new v({repositoryName:e});return await u().send(t)}function H(){let e=(0,T.c)(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={mutationFn:U},e[0]=n):n=e[0],t(n)}async function U(e){let t=new x({repositoryName:e});return await u().send(t)}export{I as a,R as c,O as i,M as l,E as n,H as o,B as r,P as s,A as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/ecs-section-nav.js b/spinifex/services/spinifexui/frontend/dist/assets/ecs-section-nav.js new file mode 100644 index 000000000..1e7ea6d67 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/dist/assets/ecs-section-nav.js @@ -0,0 +1 @@ +import{n as e,t}from"./compiler-runtime.js";import{ni as n}from"./awsClient.js";var r=t(),i=e(),a=`-mb-px border-b-2 px-3 py-2 text-sm font-medium transition-colors`,o={className:`border-primary text-foreground`},s={className:`border-transparent text-muted-foreground hover:text-foreground`};function c(){let e=(0,r.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{activeOptions:{exact:!1},activeProps:o,className:a,inactiveProps:s,to:`/ecs/list-clusters`,children:`Clusters`}),e[0]=t):t=e[0];let c;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,i.jsxs)(`nav`,{className:`mb-6 flex gap-1 border-b`,children:[t,(0,i.jsx)(n,{activeOptions:{exact:!1},activeProps:o,className:a,inactiveProps:s,to:`/ecs/task-definitions`,children:`Task definitions`})]}),e[1]=c):c=e[1],c}export{c as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/ecs.js b/spinifex/services/spinifexui/frontend/dist/assets/ecs.js index 8bf6198f2..c24cdc6aa 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/ecs.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/ecs.js @@ -1 +1 @@ -import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{Sn as n,a as r,an as i,bn as a,in as o,on as s,rn as c,sn as l,vn as u,xn as d,yn as f}from"./awsClient.js";import{St as p,ut as m}from"./auth.js";import{Zr as h}from"./index.js";var g=class extends p.classBuilder().ep(n).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`CreateCluster`,{}).n(`ECSClient`,`CreateClusterCommand`).sc(c).build(){},_=class extends p.classBuilder().ep(n).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`CreateService`,{}).n(`ECSClient`,`CreateServiceCommand`).sc(o).build(){},v=class extends p.classBuilder().ep(n).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DeleteCluster`,{}).n(`ECSClient`,`DeleteClusterCommand`).sc(i).build(){},y=class extends p.classBuilder().ep(n).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DeregisterContainerInstance`,{}).n(`ECSClient`,`DeregisterContainerInstanceCommand`).sc(s).build(){},b=class extends p.classBuilder().ep(n).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DeregisterTaskDefinition`,{}).n(`ECSClient`,`DeregisterTaskDefinitionCommand`).sc(l).build(){},x=class extends p.classBuilder().ep(n).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`RegisterTaskDefinition`,{}).n(`ECSClient`,`RegisterTaskDefinitionCommand`).sc(u).build(){},S=class extends p.classBuilder().ep(n).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`RunTask`,{}).n(`ECSClient`,`RunTaskCommand`).sc(f).build(){},C=class extends p.classBuilder().ep(n).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`StopTask`,{}).n(`ECSClient`,`StopTaskCommand`).sc(a).build(){},w=class extends p.classBuilder().ep(n).m(function(e,t,n,r){return[m(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`UpdateContainerInstancesState`,{}).n(`ECSClient`,`UpdateContainerInstancesStateCommand`).sc(d).build(){},T=e();function E(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function D(e){let t=new g({clusterName:e});return await r().send(t)}function O(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function k(e){let t=new v({cluster:e});return await r().send(t)}function A(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:j,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`tasks`]})}},e[0]=n,e[1]=r),t(r)}async function j(e){let t=new C({cluster:e.cluster,task:e.task});return await r().send(t)}function M(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:N,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecs`,`task-definitions`]})}},e[0]=n,e[1]=r),t(r)}async function N(e){let t=new b({taskDefinition:e});return await r().send(t)}function P(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:F,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`container-instances`]})}},e[0]=n,e[1]=r),t(r)}async function F(e){let t=new w({cluster:e.cluster,containerInstances:[e.containerInstance],status:e.status});return await r().send(t)}function I(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:L,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`container-instances`]})}},e[0]=n,e[1]=r),t(r)}async function L(e){let t=new y({cluster:e.cluster,containerInstance:e.containerInstance,force:!0});return await r().send(t)}function R(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:z,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecs`,`task-definitions`]})}},e[0]=n,e[1]=r),t(r)}async function z(e){let t={name:e.containerName,image:e.image,essential:e.essential,cpu:e.containerCpu?Number(e.containerCpu):void 0,memory:e.containerMemory?Number(e.containerMemory):void 0,portMappings:e.portMappings.length>0?e.portMappings.map(B):void 0},n=new x({family:e.family,networkMode:e.networkMode,cpu:e.cpu||void 0,memory:e.memory||void 0,containerDefinitions:[t]});return await r().send(n)}function B(e){return{containerPort:e.containerPort,hostPort:e.containerPort,protocol:e.protocol}}function V(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:H,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`tasks`]})}},e[0]=n,e[1]=r),t(r)}async function H(e){let t=new S({cluster:e.cluster,taskDefinition:e.taskDefinition,count:e.count,networkConfiguration:e.awsvpc?{awsvpcConfiguration:{subnets:e.subnets,securityGroups:e.securityGroups.length>0?e.securityGroups:void 0,assignPublicIp:e.assignPublicIp?`ENABLED`:`DISABLED`}}:void 0}),n=await r().send(t);if((n.tasks?.length??0)===0&&n.failures?.length){let e=n.failures[0];throw Error(`Task not placed: ${e?.reason??`unknown`}${e?.detail?` (${e.detail})`:``}`)}return n}function U(){let e=(0,T.c)(2),n=h(),r;return e[0]===n?r=e[1]:(r={mutationFn:W,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`services`]})}},e[0]=n,e[1]=r),t(r)}async function W(e){let t=new _({cluster:e.cluster,serviceName:e.serviceName,taskDefinition:e.taskDefinition,desiredCount:e.desiredCount,networkConfiguration:e.awsvpc?{awsvpcConfiguration:{subnets:e.subnets,securityGroups:e.securityGroups.length>0?e.securityGroups:void 0,assignPublicIp:e.assignPublicIp?`ENABLED`:`DISABLED`}}:void 0,loadBalancers:e.targetGroupArn?[{targetGroupArn:e.targetGroupArn,containerName:e.loadBalancerContainerName||void 0,containerPort:e.loadBalancerContainerPort?Number(e.loadBalancerContainerPort):void 0}]:void 0});return await r().send(t)}export{M as a,A as c,I as i,P as l,U as n,R as o,O as r,V as s,E as t}; \ No newline at end of file +import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{Sn as n,a as r,an as i,bn as a,in as o,on as s,rn as c,sn as l,vn as u,xn as d,yn as f}from"./awsClient.js";import{C as p,D as m,Pt as h,St as g,r as _,ut as v}from"./auth.js";import{$r as y,ot as b}from"./index.js";var x=class extends g.classBuilder().ep(n).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`CreateCluster`,{}).n(`ECSClient`,`CreateClusterCommand`).sc(c).build(){},S=class extends g.classBuilder().ep(n).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`CreateService`,{}).n(`ECSClient`,`CreateServiceCommand`).sc(o).build(){},C=class extends g.classBuilder().ep(n).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DeleteCluster`,{}).n(`ECSClient`,`DeleteClusterCommand`).sc(i).build(){},w=class extends g.classBuilder().ep(n).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DeregisterContainerInstance`,{}).n(`ECSClient`,`DeregisterContainerInstanceCommand`).sc(s).build(){},T=class extends g.classBuilder().ep(n).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DeregisterTaskDefinition`,{}).n(`ECSClient`,`DeregisterTaskDefinitionCommand`).sc(l).build(){},E=class extends g.classBuilder().ep(n).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`RegisterTaskDefinition`,{}).n(`ECSClient`,`RegisterTaskDefinitionCommand`).sc(u).build(){},D=class extends g.classBuilder().ep(n).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`RunTask`,{}).n(`ECSClient`,`RunTaskCommand`).sc(f).build(){},O=class extends g.classBuilder().ep(n).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`StopTask`,{}).n(`ECSClient`,`StopTaskCommand`).sc(a).build(){},k=class extends g.classBuilder().ep(n).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`UpdateContainerInstancesState`,{}).n(`ECSClient`,`UpdateContainerInstancesStateCommand`).sc(d).build(){},A=e(),j=`ap-southeast-2`,M=9999,N=`AmazonEC2ContainerServiceV20141113.ProvisionCapacity`;function P(e){try{let t=JSON.parse(e);if(t&&typeof t==`object`){if(`message`in t&&typeof t.message==`string`)return t.message;if(`Message`in t&&typeof t.Message==`string`)return t.Message}}catch{}return null}async function ee(e){let t=_();if(!t)throw Error(`Not authenticated`);let n=window.location.protocol.replace(`:`,``),r=JSON.stringify(e),i=new h({method:`POST`,protocol:n,hostname:`localhost`,port:M,path:`/`,headers:{host:`localhost:${M}`,"content-type":`application/x-amz-json-1.1`,"x-amz-target":N},body:r}),a=await new m({credentials:{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken},region:j,service:`ecs`,sha256:p}).sign(i),o={};for(let[e,t]of Object.entries(a.headers))typeof t==`string`&&(o[e]=t);let s=`${window.location.protocol}//${window.location.host}/proxy/awsgw/`,c=await fetch(s,{method:`POST`,headers:o,body:r});if(!c.ok){let e=await c.text().catch(()=>``),t=P(e)??e;throw Error(`ProvisionCapacity failed: ${c.status}${t?` - ${t}`:``}`)}return await c.json()}function F(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:I,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function I(e){let t=new x({clusterName:e});return await r().send(t)}function L(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:R,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function R(e){let t=new C({cluster:e});return await r().send(t)}function z(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:B,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`tasks`]})}},e[0]=n,e[1]=r),t(r)}async function B(e){let t=new O({cluster:e.cluster,task:e.task});return await r().send(t)}function V(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:H,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecs`,`task-definitions`]})}},e[0]=n,e[1]=r),t(r)}async function H(e){let t=new T({taskDefinition:e});return await r().send(t)}function U(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:W,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`container-instances`]})}},e[0]=n,e[1]=r),t(r)}async function W(e){let t=new k({cluster:e.cluster,containerInstances:[e.containerInstance],status:e.status});return await r().send(t)}function G(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:K,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`container-instances`]})}},e[0]=n,e[1]=r),t(r)}async function K(e){let t=new w({cluster:e.cluster,containerInstance:e.containerInstance,force:!0});return await r().send(t)}function q(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:J,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecs`,`task-definitions`]})}},e[0]=n,e[1]=r),t(r)}async function J(e){let t={name:e.containerName,image:e.image,essential:e.essential,cpu:e.containerCpu?Number(e.containerCpu):void 0,memory:e.containerMemory?Number(e.containerMemory):void 0,portMappings:e.portMappings.length>0?e.portMappings.map(Y):void 0},n=new E({family:e.family,networkMode:e.networkMode,cpu:e.cpu||void 0,memory:e.memory||void 0,containerDefinitions:[t]});return await r().send(n)}function Y(e){return{containerPort:e.containerPort,hostPort:e.containerPort,protocol:e.protocol}}function X(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:Z,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:b(t.Cluster).queryKey})}},e[0]=n,e[1]=r),t(r)}async function Z(e){return await ee(e)}function Q(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:$,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`tasks`]})}},e[0]=n,e[1]=r),t(r)}async function $(e){let t=new D({cluster:e.cluster,taskDefinition:e.taskDefinition,count:e.count,networkConfiguration:e.awsvpc?{awsvpcConfiguration:{subnets:e.subnets,securityGroups:e.securityGroups.length>0?e.securityGroups:void 0,assignPublicIp:e.assignPublicIp?`ENABLED`:`DISABLED`}}:void 0}),n=await r().send(t);if((n.tasks?.length??0)===0&&n.failures?.length){let e=n.failures[0];throw Error(`Task not placed: ${e?.reason??`unknown`}${e?.detail?` (${e.detail})`:``}`)}return n}function te(){let e=(0,A.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:ne,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecs`,`clusters`,t.cluster,`services`]})}},e[0]=n,e[1]=r),t(r)}async function ne(e){let t=new S({cluster:e.cluster,serviceName:e.serviceName,taskDefinition:e.taskDefinition,desiredCount:e.desiredCount,networkConfiguration:e.awsvpc?{awsvpcConfiguration:{subnets:e.subnets,securityGroups:e.securityGroups.length>0?e.securityGroups:void 0,assignPublicIp:e.assignPublicIp?`ENABLED`:`DISABLED`}}:void 0,loadBalancers:e.targetGroupArn?[{targetGroupArn:e.targetGroupArn,containerName:e.loadBalancerContainerName||void 0,containerPort:e.loadBalancerContainerPort?Number(e.loadBalancerContainerPort):void 0}]:void 0});return await r().send(t)}export{V as a,Q as c,G as i,z as l,te as n,X as o,L as r,q as s,F as t,U as u}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/eks.js b/spinifex/services/spinifexui/frontend/dist/assets/eks.js index 3e219e885..6faaed72d 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/eks.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/eks.js @@ -1 +1 @@ -import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{$t as n,Bt as r,Ft as i,It as a,Kt as ee,Lt as te,Mt as ne,Nt as re,Pt as o,Rt as s,en as c,nn as l,o as u,tn as d,zt as f}from"./awsClient.js";import{St as p,a as m,f as h,l as g,o as _,s as v,u as y,ut as b}from"./auth.js";import{Zr as x}from"./index.js";import{i as S}from"./subnet-calculator.js";import{r as C}from"./json.js";var w=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`AssociateAccessPolicy`,{}).n(`EKSClient`,`AssociateAccessPolicyCommand`).sc(ne).build(){},T=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateAccessEntry`,{}).n(`EKSClient`,`CreateAccessEntryCommand`).sc(re).build(){},E=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateAddon`,{}).n(`EKSClient`,`CreateAddonCommand`).sc(o).build(){},D=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateCluster`,{}).n(`EKSClient`,`CreateClusterCommand`).sc(i).build(){},O=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateNodegroup`,{}).n(`EKSClient`,`CreateNodegroupCommand`).sc(a).build(){},k=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteAccessEntry`,{}).n(`EKSClient`,`DeleteAccessEntryCommand`).sc(te).build(){},A=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteAddon`,{}).n(`EKSClient`,`DeleteAddonCommand`).sc(s).build(){},j=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteCluster`,{}).n(`EKSClient`,`DeleteClusterCommand`).sc(f).build(){},M=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteNodegroup`,{}).n(`EKSClient`,`DeleteNodegroupCommand`).sc(r).build(){},N=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DisassociateAccessPolicy`,{}).n(`EKSClient`,`DisassociateAccessPolicyCommand`).sc(ee).build(){},P=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateAddon`,{}).n(`EKSClient`,`UpdateAddonCommand`).sc(n).build(){},F=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateNodegroupConfig`,{}).n(`EKSClient`,`UpdateNodegroupConfigCommand`).sc(c).build(){},I=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateNodegroupVersion`,{}).n(`EKSClient`,`UpdateNodegroupVersionCommand`).sc(d).build(){},L=e();function R(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:z,onSuccess:()=>{n.invalidateQueries({queryKey:[`eks`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function z(e){let t=new D({name:e.name,version:e.version,roleArn:e.roleArn,resourcesVpcConfig:{subnetIds:e.subnetIds,endpointPublicAccess:e.endpointPublicAccess,endpointPrivateAccess:e.endpointPrivateAccess,publicAccessCidrs:e.endpointPublicAccess?e.publicAccessCidrs:void 0},accessConfig:{authenticationMode:`API`,bootstrapClusterCreatorAdminPermissions:e.bootstrapClusterCreatorAdminPermissions}});return await u().send(t)}function B(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:V,onSuccess:()=>{n.invalidateQueries({queryKey:[`eks`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function V(e){let t=new j({name:e});return await u().send(t)}function H(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:U,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function U(e){let t=new O({clusterName:e.clusterName,nodegroupName:e.nodegroupName,nodeRole:e.nodeRole,subnets:e.subnetIds,instanceTypes:e.instanceTypes,amiType:e.amiType,capacityType:e.capacityType,diskSize:e.diskSize,scalingConfig:{minSize:e.minSize,maxSize:e.maxSize,desiredSize:e.desiredSize}});return await u().send(t)}function W(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:ie,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function ie(e){let t=new F({clusterName:e.clusterName,nodegroupName:e.nodegroupName,scalingConfig:{minSize:e.minSize,maxSize:e.maxSize,desiredSize:e.desiredSize}});return await u().send(t)}function G(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:K,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function K(e){let t=new I({clusterName:e.clusterName,nodegroupName:e.nodegroupName,version:e.version});return await u().send(t)}function q(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:J,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function J(e){let t=new M({clusterName:e.clusterName,nodegroupName:e.nodegroupName});return await u().send(t)}function Y(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:ae,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function ae(e){let t=new E({clusterName:e.clusterName,addonName:e.addonName,addonVersion:e.addonVersion,serviceAccountRoleArn:e.serviceAccountRoleArn,configurationValues:e.configurationValues});return await u().send(t)}function oe(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:se,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function se(e){let t=new P({clusterName:e.clusterName,addonName:e.addonName,addonVersion:e.addonVersion,serviceAccountRoleArn:e.serviceAccountRoleArn,configurationValues:e.configurationValues});return await u().send(t)}function ce(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:le,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function le(e){let t=new A({clusterName:e.clusterName,addonName:e.addonName});return await u().send(t)}function ue(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:de,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`]})}},e[0]=n,e[1]=r),t(r)}async function de(e){let t=new T({clusterName:e.clusterName,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups,type:e.type});return await u().send(t)}function fe(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:pe,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`]})}},e[0]=n,e[1]=r),t(r)}async function pe(e){let t=new k({clusterName:e.clusterName,principalArn:e.principalArn});return await u().send(t)}function me(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:he,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`,t.principalArn,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function he(e){let t=new w({clusterName:e.clusterName,principalArn:e.principalArn,policyArn:e.policyArn,accessScope:{type:e.accessScopeType,namespaces:e.namespaces}});return await u().send(t)}function ge(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:_e,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`,t.principalArn,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function _e(e){let t=new N({clusterName:e.clusterName,principalArn:e.principalArn,policyArn:e.policyArn});return await u().send(t)}var ve=[`1.32`,`1.31`,`1.30`],ye=[{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy`,name:`AmazonEKSClusterAdminPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminPolicy`,name:`AmazonEKSAdminPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy`,name:`AmazonEKSEditPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy`,name:`AmazonEKSViewPolicy`}],X=[`AL2_x86_64`,`AL2_ARM_64`],Z=[`ON_DEMAND`,`SPOT`],be=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Principal:{Service:`eks.amazonaws.com`},Action:`sts:AssumeRole`}]},null,2),xe=`arn:aws:iam::aws:policy/AmazonEKSClusterPolicy`,Q=h().min(1,`Name is required`).max(100,`Name must be 100 characters or fewer`).regex(/^[0-9A-Za-z][A-Za-z0-9\-_]*$/,`Must start with a letter or digit and contain only letters, digits, hyphens, or underscores`),Se=y({name:Q,version:h().min(1,`Version is required`),roleArn:h().min(1,`Cluster IAM role is required`),vpcId:h().min(1,`VPC is required`),subnetIds:_(h()).min(1,`At least 1 subnet is required`),bootstrapClusterCreatorAdminPermissions:v(),endpointPublicAccess:v(),endpointPrivateAccess:v(),publicAccessCidrs:_(h())}).refine(e=>e.endpointPublicAccess||e.endpointPrivateAccess,{message:`Enable public access, private access, or both`,path:[`endpointPublicAccess`]}).refine(e=>!e.endpointPublicAccess||e.publicAccessCidrs.every(e=>S(e,0,32)),{message:`Each public access CIDR must be valid (e.g. 203.0.113.0/24)`,path:[`publicAccessCidrs`]}),Ce=y({nodegroupName:Q,nodeRole:h().min(1,`Node IAM role is required`),subnetIds:_(h()).min(1,`At least 1 subnet is required`),instanceTypes:h().min(1,`At least 1 instance type is required`),amiType:m(X),capacityType:m(Z),diskSize:g().int().min(1),minSize:g().int().min(0),desiredSize:g().int().min(0),maxSize:g().int().min(1)}).refine(e=>e.minSize<=e.desiredSize&&e.desiredSize<=e.maxSize,{message:`Sizes must satisfy min ≤ desired ≤ max`,path:[`desiredSize`]}),$=C({label:`Configuration`,allowEmpty:!0}),we=y({addonName:h().min(1,`Add-on is required`),addonVersion:h().min(1,`Version is required`),serviceAccountRoleArn:h(),configurationValues:$});function Te(e){switch(e??``){case`ACTIVE`:return`default`;case`CREATE_FAILED`:case`DELETE_FAILED`:case`UPDATE_FAILED`:case`DEGRADED`:return`destructive`;default:return`secondary`}}var Ee=y({principalArn:h().min(1,`Principal ARN is required`),kubernetesGroups:h()});export{W as C,ge as S,G as T,H as _,be as a,B as b,Te as c,Se as d,Ce as f,R as g,Y as h,Z as i,Ee as l,ue as m,ye as n,ve as o,me as p,X as r,$ as s,xe as t,we as u,fe as v,oe as w,q as x,ce as y}; \ No newline at end of file +import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{$t as n,Bt as r,Ft as i,It as a,Kt as ee,Lt as te,Mt as ne,Nt as re,Pt as o,Rt as s,en as c,nn as l,o as u,tn as d,zt as f}from"./awsClient.js";import{St as p,a as m,f as h,l as g,o as _,s as v,u as y,ut as b}from"./auth.js";import{$r as x}from"./index.js";import{i as S}from"./subnet-calculator.js";import{r as C}from"./json.js";var w=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`AssociateAccessPolicy`,{}).n(`EKSClient`,`AssociateAccessPolicyCommand`).sc(ne).build(){},T=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateAccessEntry`,{}).n(`EKSClient`,`CreateAccessEntryCommand`).sc(re).build(){},E=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateAddon`,{}).n(`EKSClient`,`CreateAddonCommand`).sc(o).build(){},D=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateCluster`,{}).n(`EKSClient`,`CreateClusterCommand`).sc(i).build(){},O=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateNodegroup`,{}).n(`EKSClient`,`CreateNodegroupCommand`).sc(a).build(){},k=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteAccessEntry`,{}).n(`EKSClient`,`DeleteAccessEntryCommand`).sc(te).build(){},A=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteAddon`,{}).n(`EKSClient`,`DeleteAddonCommand`).sc(s).build(){},j=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteCluster`,{}).n(`EKSClient`,`DeleteClusterCommand`).sc(f).build(){},M=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteNodegroup`,{}).n(`EKSClient`,`DeleteNodegroupCommand`).sc(r).build(){},N=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DisassociateAccessPolicy`,{}).n(`EKSClient`,`DisassociateAccessPolicyCommand`).sc(ee).build(){},P=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateAddon`,{}).n(`EKSClient`,`UpdateAddonCommand`).sc(n).build(){},F=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateNodegroupConfig`,{}).n(`EKSClient`,`UpdateNodegroupConfigCommand`).sc(c).build(){},I=class extends p.classBuilder().ep(l).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateNodegroupVersion`,{}).n(`EKSClient`,`UpdateNodegroupVersionCommand`).sc(d).build(){},L=e();function R(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:z,onSuccess:()=>{n.invalidateQueries({queryKey:[`eks`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function z(e){let t=new D({name:e.name,version:e.version,roleArn:e.roleArn,resourcesVpcConfig:{subnetIds:e.subnetIds,endpointPublicAccess:e.endpointPublicAccess,endpointPrivateAccess:e.endpointPrivateAccess,publicAccessCidrs:e.endpointPublicAccess?e.publicAccessCidrs:void 0},accessConfig:{authenticationMode:`API`,bootstrapClusterCreatorAdminPermissions:e.bootstrapClusterCreatorAdminPermissions}});return await u().send(t)}function B(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:V,onSuccess:()=>{n.invalidateQueries({queryKey:[`eks`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function V(e){let t=new j({name:e});return await u().send(t)}function H(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:U,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function U(e){let t=new O({clusterName:e.clusterName,nodegroupName:e.nodegroupName,nodeRole:e.nodeRole,subnets:e.subnetIds,instanceTypes:e.instanceTypes,amiType:e.amiType,capacityType:e.capacityType,diskSize:e.diskSize,scalingConfig:{minSize:e.minSize,maxSize:e.maxSize,desiredSize:e.desiredSize}});return await u().send(t)}function W(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:ie,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function ie(e){let t=new F({clusterName:e.clusterName,nodegroupName:e.nodegroupName,scalingConfig:{minSize:e.minSize,maxSize:e.maxSize,desiredSize:e.desiredSize}});return await u().send(t)}function G(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:K,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function K(e){let t=new I({clusterName:e.clusterName,nodegroupName:e.nodegroupName,version:e.version});return await u().send(t)}function q(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:J,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function J(e){let t=new M({clusterName:e.clusterName,nodegroupName:e.nodegroupName});return await u().send(t)}function Y(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:ae,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function ae(e){let t=new E({clusterName:e.clusterName,addonName:e.addonName,addonVersion:e.addonVersion,serviceAccountRoleArn:e.serviceAccountRoleArn,configurationValues:e.configurationValues});return await u().send(t)}function oe(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:se,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function se(e){let t=new P({clusterName:e.clusterName,addonName:e.addonName,addonVersion:e.addonVersion,serviceAccountRoleArn:e.serviceAccountRoleArn,configurationValues:e.configurationValues});return await u().send(t)}function ce(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:le,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function le(e){let t=new A({clusterName:e.clusterName,addonName:e.addonName});return await u().send(t)}function ue(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:de,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`]})}},e[0]=n,e[1]=r),t(r)}async function de(e){let t=new T({clusterName:e.clusterName,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups,type:e.type});return await u().send(t)}function fe(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:pe,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`]})}},e[0]=n,e[1]=r),t(r)}async function pe(e){let t=new k({clusterName:e.clusterName,principalArn:e.principalArn});return await u().send(t)}function me(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:he,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`,t.principalArn,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function he(e){let t=new w({clusterName:e.clusterName,principalArn:e.principalArn,policyArn:e.policyArn,accessScope:{type:e.accessScopeType,namespaces:e.namespaces}});return await u().send(t)}function ge(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:_e,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`,t.principalArn,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function _e(e){let t=new N({clusterName:e.clusterName,principalArn:e.principalArn,policyArn:e.policyArn});return await u().send(t)}var ve=[`1.32`,`1.31`,`1.30`],ye=[{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy`,name:`AmazonEKSClusterAdminPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminPolicy`,name:`AmazonEKSAdminPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy`,name:`AmazonEKSEditPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy`,name:`AmazonEKSViewPolicy`}],X=[`AL2_x86_64`,`AL2_ARM_64`],Z=[`ON_DEMAND`,`SPOT`],be=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Principal:{Service:`eks.amazonaws.com`},Action:`sts:AssumeRole`}]},null,2),xe=`arn:aws:iam::aws:policy/AmazonEKSClusterPolicy`,Q=h().min(1,`Name is required`).max(100,`Name must be 100 characters or fewer`).regex(/^[0-9A-Za-z][A-Za-z0-9\-_]*$/,`Must start with a letter or digit and contain only letters, digits, hyphens, or underscores`),Se=y({name:Q,version:h().min(1,`Version is required`),roleArn:h().min(1,`Cluster IAM role is required`),vpcId:h().min(1,`VPC is required`),subnetIds:_(h()).min(1,`At least 1 subnet is required`),bootstrapClusterCreatorAdminPermissions:v(),endpointPublicAccess:v(),endpointPrivateAccess:v(),publicAccessCidrs:_(h())}).refine(e=>e.endpointPublicAccess||e.endpointPrivateAccess,{message:`Enable public access, private access, or both`,path:[`endpointPublicAccess`]}).refine(e=>!e.endpointPublicAccess||e.publicAccessCidrs.every(e=>S(e,0,32)),{message:`Each public access CIDR must be valid (e.g. 203.0.113.0/24)`,path:[`publicAccessCidrs`]}),Ce=y({nodegroupName:Q,nodeRole:h().min(1,`Node IAM role is required`),subnetIds:_(h()).min(1,`At least 1 subnet is required`),instanceTypes:h().min(1,`At least 1 instance type is required`),amiType:m(X),capacityType:m(Z),diskSize:g().int().min(1),minSize:g().int().min(0),desiredSize:g().int().min(0),maxSize:g().int().min(1)}).refine(e=>e.minSize<=e.desiredSize&&e.desiredSize<=e.maxSize,{message:`Sizes must satisfy min ≤ desired ≤ max`,path:[`desiredSize`]}),$=C({label:`Configuration`,allowEmpty:!0}),we=y({addonName:h().min(1,`Add-on is required`),addonVersion:h().min(1,`Version is required`),serviceAccountRoleArn:h(),configurationValues:$});function Te(e){switch(e??``){case`ACTIVE`:return`default`;case`CREATE_FAILED`:case`DELETE_FAILED`:case`UPDATE_FAILED`:case`DEGRADED`:return`destructive`;default:return`secondary`}}var Ee=y({principalArn:h().min(1,`Principal ARN is required`),kubernetesGroups:h()});export{W as C,ge as S,G as T,H as _,be as a,B as b,Te as c,Se as d,Ce as f,R as g,Y as h,Z as i,Ee as l,ue as m,ye as n,ve as o,me as p,X as r,$ as s,xe as t,we as u,fe as v,oe as w,q as x,ce as y}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/elbv2.js b/spinifex/services/spinifexui/frontend/dist/assets/elbv2.js index c14744acf..34dafe265 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/elbv2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/elbv2.js @@ -1 +1 @@ -import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{At as n,Ct as r,Dt as i,Et as a,Ot as o,Tt as s,at as c,ct as ee,dt as l,ft as u,it as d,jt as f,kt as p,lt as m,ot as te,pt as ne,s as h,st as re,ut as ie,wt as g}from"./awsClient.js";import{St as _,ut as v}from"./auth.js";import{Zr as y}from"./index.js";var b=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`AddTags`,{}).n(`ElasticLoadBalancingV2Client`,`AddTagsCommand`).sc(d).build(){},x=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`CreateListener`,{}).n(`ElasticLoadBalancingV2Client`,`CreateListenerCommand`).sc(c).build(){},S=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`CreateLoadBalancer`,{}).n(`ElasticLoadBalancingV2Client`,`CreateLoadBalancerCommand`).sc(te).build(){},C=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`CreateRule`,{}).n(`ElasticLoadBalancingV2Client`,`CreateRuleCommand`).sc(re).build(){},w=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`CreateTargetGroup`,{}).n(`ElasticLoadBalancingV2Client`,`CreateTargetGroupCommand`).sc(ee).build(){},T=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeleteListener`,{}).n(`ElasticLoadBalancingV2Client`,`DeleteListenerCommand`).sc(m).build(){},E=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeleteLoadBalancer`,{}).n(`ElasticLoadBalancingV2Client`,`DeleteLoadBalancerCommand`).sc(ie).build(){},D=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeleteRule`,{}).n(`ElasticLoadBalancingV2Client`,`DeleteRuleCommand`).sc(l).build(){},O=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeleteTargetGroup`,{}).n(`ElasticLoadBalancingV2Client`,`DeleteTargetGroupCommand`).sc(u).build(){},k=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeregisterTargets`,{}).n(`ElasticLoadBalancingV2Client`,`DeregisterTargetsCommand`).sc(ne).build(){},A=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`ModifyListener`,{}).n(`ElasticLoadBalancingV2Client`,`ModifyListenerCommand`).sc(r).build(){},j=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`ModifyLoadBalancerAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`ModifyLoadBalancerAttributesCommand`).sc(g).build(){},M=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`ModifyRule`,{}).n(`ElasticLoadBalancingV2Client`,`ModifyRuleCommand`).sc(s).build(){},N=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`ModifyTargetGroupAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`ModifyTargetGroupAttributesCommand`).sc(a).build(){},P=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`RegisterTargets`,{}).n(`ElasticLoadBalancingV2Client`,`RegisterTargetsCommand`).sc(i).build(){},F=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`RemoveTags`,{}).n(`ElasticLoadBalancingV2Client`,`RemoveTagsCommand`).sc(o).build(){},I=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`SetSecurityGroups`,{}).n(`ElasticLoadBalancingV2Client`,`SetSecurityGroupsCommand`).sc(p).build(){},L=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`SetSubnets`,{}).n(`ElasticLoadBalancingV2Client`,`SetSubnetsCommand`).sc(n).build(){},R=e();function z(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:B,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`loadBalancers`]})}},e[0]=n,e[1]=r),t(r)}async function B(e){let t=new E({LoadBalancerArn:e});return await h().send(t)}function V(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:H,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`loadBalancers`,t.loadBalancerArn,`attributes`]})}},e[0]=n,e[1]=r),t(r)}async function H(e){let t=new j({LoadBalancerArn:e.loadBalancerArn,Attributes:e.attributes.map(U)});return await h().send(t)}function U(e){return{Key:e.key,Value:e.value}}function W(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:G,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`tags`]})}},e[0]=n,e[1]=r),t(r)}async function G(e){let t=new Set(e.tags.map(q)),n=e.initialKeys.filter(e=>!t.has(e)),r=h();e.tags.length>0&&await r.send(new b({ResourceArns:[e.resourceArn],Tags:e.tags.map(K)})),n.length>0&&await r.send(new F({ResourceArns:[e.resourceArn],TagKeys:n}))}function K(e){return{Key:e.key,Value:e.value}}function q(e){return e.key}function J(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:Y,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`loadBalancers`,t.loadBalancerArn]})}},e[0]=n,e[1]=r),t(r)}async function Y(e){let t=new I({LoadBalancerArn:e.loadBalancerArn,SecurityGroups:e.securityGroupIds});return await h().send(t)}function ae(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:oe,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`loadBalancers`,t.loadBalancerArn]})}},e[0]=n,e[1]=r),t(r)}async function oe(e){let t=new L({LoadBalancerArn:e.loadBalancerArn,Subnets:e.subnetIds});return await h().send(t)}function se(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:ce,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`]})}},e[0]=n,e[1]=r),t(r)}async function ce(e){let t=e.tags.filter(ue).map(le),n=e.healthCheck.protocol===`HTTP`,r=new w({Name:e.name,Protocol:e.protocol,Port:e.port,VpcId:e.vpcId,TargetType:`instance`,HealthCheckProtocol:e.healthCheck.protocol,HealthCheckPath:n?e.healthCheck.path:void 0,HealthCheckPort:e.healthCheck.port,HealthCheckIntervalSeconds:e.healthCheck.intervalSeconds,HealthCheckTimeoutSeconds:e.healthCheck.timeoutSeconds,HealthyThresholdCount:e.healthCheck.healthyThresholdCount,UnhealthyThresholdCount:e.healthCheck.unhealthyThresholdCount,Matcher:n?{HttpCode:e.healthCheck.matcher}:void 0,Tags:t.length>0?t:void 0});return await h().send(r)}function le(e){return{Key:e.key,Value:e.value}}function ue(e){return e.key.length>0}function de(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:fe,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`]})}},e[0]=n,e[1]=r),t(r)}async function fe(e){let t=new O({TargetGroupArn:e});return await h().send(t)}function pe(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:me,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`,t.targetGroupArn,`attributes`]})}},e[0]=n,e[1]=r),t(r)}async function me(e){let t=new N({TargetGroupArn:e.targetGroupArn,Attributes:e.attributes.map(he)});return await h().send(t)}function he(e){return{Key:e.key,Value:e.value}}function X(e,t,n){return!(e===`HTTPS`||e===`TLS`)||!t?{}:{Certificates:[{CertificateArn:t}],SslPolicy:e===`HTTPS`?n:void 0}}function ge(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:_e,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.loadBalancerArn]})}},e[0]=n,e[1]=r),t(r)}async function _e(e){let t=[{Type:`forward`,TargetGroupArn:e.defaultTargetGroupArn}],n=new x({LoadBalancerArn:e.loadBalancerArn,Protocol:e.protocol,Port:e.port,DefaultActions:t,...X(e.protocol,e.certificateArn,e.sslPolicy)});return await h().send(n)}function ve(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:ye,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`]})}},e[0]=n,e[1]=r),t(r)}async function ye(e){let t=new T({ListenerArn:e});return await h().send(t)}function be(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:xe,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.loadBalancerArn]})}},e[0]=n,e[1]=r),t(r)}async function xe(e){let t=[{Type:`forward`,TargetGroupArn:e.defaultTargetGroupArn}],n=new A({ListenerArn:e.listenerArn,Protocol:e.protocol,Port:e.port,DefaultActions:t,...X(e.protocol,e.certificateArn,e.sslPolicy)});return await h().send(n)}function Se(){let e=y();return t({mutationFn:async e=>{let t=h(),n=[],r=``;try{let i=e.listener.existingTargetGroupArn;if(e.listener.targetGroupMode===`new`){let a=e.listener.newTargetGroup;if(!a)throw Error(`internal error: new target group requested but no data supplied`);r=`creating target group`;let o=a.tags.filter(e=>e.key.length>0).map(e=>({Key:e.key,Value:e.value})),s=a.healthCheck.protocol===`HTTP`;if(i=(await t.send(new w({Name:a.name,Protocol:a.protocol,Port:a.port,VpcId:a.vpcId,TargetType:`instance`,HealthCheckProtocol:a.healthCheck.protocol,HealthCheckPath:s?a.healthCheck.path:void 0,HealthCheckPort:a.healthCheck.port,HealthCheckIntervalSeconds:a.healthCheck.intervalSeconds,HealthCheckTimeoutSeconds:a.healthCheck.timeoutSeconds,HealthyThresholdCount:a.healthCheck.healthyThresholdCount,UnhealthyThresholdCount:a.healthCheck.unhealthyThresholdCount,Matcher:s?{HttpCode:a.healthCheck.matcher}:void 0,Tags:o.length>0?o:void 0}))).TargetGroups?.[0]?.TargetGroupArn,!i)throw Error(`Target group was created but no ARN was returned by the API`);n.push({type:`Target Group`,id:i})}if(!i)throw Error(`Target group selection is required`);r=`creating load balancer`;let a=e.lb.tags.filter(e=>e.key.length>0).map(e=>({Key:e.key,Value:e.value})),o=(await t.send(new S({Name:e.lb.name,Scheme:e.lb.scheme,Type:e.lb.type,IpAddressType:`ipv4`,Subnets:e.lb.subnetIds,SecurityGroups:e.lb.securityGroupIds.length>0?e.lb.securityGroupIds:void 0,Tags:a.length>0?a:void 0}))).LoadBalancers?.[0]?.LoadBalancerArn;if(!o)throw Error(`Load balancer was created but no ARN was returned by the API`);return n.push({type:`Load Balancer`,id:o}),r=`creating listener`,await t.send(new x({LoadBalancerArn:o,Protocol:e.listener.protocol,Port:e.listener.port,DefaultActions:[{Type:`forward`,TargetGroupArn:i}],...X(e.listener.protocol,e.listener.certificateArn,e.listener.sslPolicy)})),n.push({type:`Listener`,id:void 0}),{loadBalancerArn:o,created:n}}catch(e){return{loadBalancerArn:void 0,created:n,error:e instanceof Error?e:Error(String(e)),failedStep:r}}},onSettled:()=>{e.invalidateQueries({queryKey:[`elbv2`]})}})}function Z(e){return e.map(e=>({Id:e.id,Port:e.port}))}function Ce(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:we,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`,t.targetGroupArn,`health`]})}},e[0]=n,e[1]=r),t(r)}async function we(e){let t=new P({TargetGroupArn:e.targetGroupArn,Targets:Z(e.targets)});return await h().send(t)}function Q(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:Te,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`,t.targetGroupArn,`health`]})}},e[0]=n,e[1]=r),t(r)}async function Te(e){let t=new k({TargetGroupArn:e.targetGroupArn,Targets:Z(e.targets)});return await h().send(t)}function $(e){return e.map(e=>{switch(e.field){case`host-header`:return{Field:e.field,HostHeaderConfig:{Values:e.values}};case`path-pattern`:return{Field:e.field,PathPatternConfig:{Values:e.values}};case`http-header`:return{Field:e.field,HttpHeaderConfig:{HttpHeaderName:e.httpHeaderName??``,Values:e.values}};case`http-request-method`:return{Field:e.field,HttpRequestMethodConfig:{Values:e.values}};case`source-ip`:return{Field:e.field,SourceIpConfig:{Values:e.values}};case`query-string`:return{Field:e.field,QueryStringConfig:{Values:(e.queryStringPairs??[]).map(e=>({Key:e.key&&e.key.length>0?e.key:void 0,Value:e.value}))}};default:return{Field:e.field,Values:e.values}}})}function Ee(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:De,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.listenerArn,`rules`]})}},e[0]=n,e[1]=r),t(r)}async function De(e){let t=[{Type:`forward`,TargetGroupArn:e.forwardTargetGroupArn}],n=new C({ListenerArn:e.listenerArn,Priority:e.priority,Conditions:$(e.conditions),Actions:t});return await h().send(n)}function Oe(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:ke,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.listenerArn,`rules`]})}},e[0]=n,e[1]=r),t(r)}async function ke(e){let t=new M({RuleArn:e.ruleArn,Conditions:e.conditions?$(e.conditions):void 0,Actions:e.forwardTargetGroupArn?[{Type:`forward`,TargetGroupArn:e.forwardTargetGroupArn}]:void 0});return await h().send(t)}function Ae(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:je,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.listenerArn,`rules`]})}},e[0]=n,e[1]=r),t(r)}async function je(e){let t=new D({RuleArn:e.ruleArn});return await h().send(t)}export{W as _,ve as a,de as c,V as d,Oe as f,ae as g,J as h,se as i,Q as l,Ce as m,Se as n,z as o,pe as p,Ee as r,Ae as s,ge as t,be as u}; \ No newline at end of file +import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{At as n,Ct as r,Dt as i,Et as a,Ot as o,Tt as s,at as c,ct as ee,dt as l,ft as u,it as d,jt as f,kt as p,lt as m,ot as te,pt as ne,s as h,st as re,ut as ie,wt as g}from"./awsClient.js";import{St as _,ut as v}from"./auth.js";import{$r as y}from"./index.js";var b=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`AddTags`,{}).n(`ElasticLoadBalancingV2Client`,`AddTagsCommand`).sc(d).build(){},x=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`CreateListener`,{}).n(`ElasticLoadBalancingV2Client`,`CreateListenerCommand`).sc(c).build(){},S=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`CreateLoadBalancer`,{}).n(`ElasticLoadBalancingV2Client`,`CreateLoadBalancerCommand`).sc(te).build(){},C=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`CreateRule`,{}).n(`ElasticLoadBalancingV2Client`,`CreateRuleCommand`).sc(re).build(){},w=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`CreateTargetGroup`,{}).n(`ElasticLoadBalancingV2Client`,`CreateTargetGroupCommand`).sc(ee).build(){},T=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeleteListener`,{}).n(`ElasticLoadBalancingV2Client`,`DeleteListenerCommand`).sc(m).build(){},E=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeleteLoadBalancer`,{}).n(`ElasticLoadBalancingV2Client`,`DeleteLoadBalancerCommand`).sc(ie).build(){},D=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeleteRule`,{}).n(`ElasticLoadBalancingV2Client`,`DeleteRuleCommand`).sc(l).build(){},O=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeleteTargetGroup`,{}).n(`ElasticLoadBalancingV2Client`,`DeleteTargetGroupCommand`).sc(u).build(){},k=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DeregisterTargets`,{}).n(`ElasticLoadBalancingV2Client`,`DeregisterTargetsCommand`).sc(ne).build(){},A=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`ModifyListener`,{}).n(`ElasticLoadBalancingV2Client`,`ModifyListenerCommand`).sc(r).build(){},j=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`ModifyLoadBalancerAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`ModifyLoadBalancerAttributesCommand`).sc(g).build(){},M=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`ModifyRule`,{}).n(`ElasticLoadBalancingV2Client`,`ModifyRuleCommand`).sc(s).build(){},N=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`ModifyTargetGroupAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`ModifyTargetGroupAttributesCommand`).sc(a).build(){},P=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`RegisterTargets`,{}).n(`ElasticLoadBalancingV2Client`,`RegisterTargetsCommand`).sc(i).build(){},F=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`RemoveTags`,{}).n(`ElasticLoadBalancingV2Client`,`RemoveTagsCommand`).sc(o).build(){},I=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`SetSecurityGroups`,{}).n(`ElasticLoadBalancingV2Client`,`SetSecurityGroupsCommand`).sc(p).build(){},L=class extends _.classBuilder().ep(f).m(function(e,t,n,r){return[v(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`SetSubnets`,{}).n(`ElasticLoadBalancingV2Client`,`SetSubnetsCommand`).sc(n).build(){},R=e();function z(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:B,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`loadBalancers`]})}},e[0]=n,e[1]=r),t(r)}async function B(e){let t=new E({LoadBalancerArn:e});return await h().send(t)}function V(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:H,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`loadBalancers`,t.loadBalancerArn,`attributes`]})}},e[0]=n,e[1]=r),t(r)}async function H(e){let t=new j({LoadBalancerArn:e.loadBalancerArn,Attributes:e.attributes.map(U)});return await h().send(t)}function U(e){return{Key:e.key,Value:e.value}}function W(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:G,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`tags`]})}},e[0]=n,e[1]=r),t(r)}async function G(e){let t=new Set(e.tags.map(q)),n=e.initialKeys.filter(e=>!t.has(e)),r=h();e.tags.length>0&&await r.send(new b({ResourceArns:[e.resourceArn],Tags:e.tags.map(K)})),n.length>0&&await r.send(new F({ResourceArns:[e.resourceArn],TagKeys:n}))}function K(e){return{Key:e.key,Value:e.value}}function q(e){return e.key}function J(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:Y,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`loadBalancers`,t.loadBalancerArn]})}},e[0]=n,e[1]=r),t(r)}async function Y(e){let t=new I({LoadBalancerArn:e.loadBalancerArn,SecurityGroups:e.securityGroupIds});return await h().send(t)}function ae(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:oe,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`loadBalancers`,t.loadBalancerArn]})}},e[0]=n,e[1]=r),t(r)}async function oe(e){let t=new L({LoadBalancerArn:e.loadBalancerArn,Subnets:e.subnetIds});return await h().send(t)}function se(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:ce,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`]})}},e[0]=n,e[1]=r),t(r)}async function ce(e){let t=e.tags.filter(ue).map(le),n=e.healthCheck.protocol===`HTTP`,r=new w({Name:e.name,Protocol:e.protocol,Port:e.port,VpcId:e.vpcId,TargetType:`instance`,HealthCheckProtocol:e.healthCheck.protocol,HealthCheckPath:n?e.healthCheck.path:void 0,HealthCheckPort:e.healthCheck.port,HealthCheckIntervalSeconds:e.healthCheck.intervalSeconds,HealthCheckTimeoutSeconds:e.healthCheck.timeoutSeconds,HealthyThresholdCount:e.healthCheck.healthyThresholdCount,UnhealthyThresholdCount:e.healthCheck.unhealthyThresholdCount,Matcher:n?{HttpCode:e.healthCheck.matcher}:void 0,Tags:t.length>0?t:void 0});return await h().send(r)}function le(e){return{Key:e.key,Value:e.value}}function ue(e){return e.key.length>0}function de(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:fe,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`]})}},e[0]=n,e[1]=r),t(r)}async function fe(e){let t=new O({TargetGroupArn:e});return await h().send(t)}function pe(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:me,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`,t.targetGroupArn,`attributes`]})}},e[0]=n,e[1]=r),t(r)}async function me(e){let t=new N({TargetGroupArn:e.targetGroupArn,Attributes:e.attributes.map(he)});return await h().send(t)}function he(e){return{Key:e.key,Value:e.value}}function X(e,t,n){return!(e===`HTTPS`||e===`TLS`)||!t?{}:{Certificates:[{CertificateArn:t}],SslPolicy:e===`HTTPS`?n:void 0}}function ge(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:_e,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.loadBalancerArn]})}},e[0]=n,e[1]=r),t(r)}async function _e(e){let t=[{Type:`forward`,TargetGroupArn:e.defaultTargetGroupArn}],n=new x({LoadBalancerArn:e.loadBalancerArn,Protocol:e.protocol,Port:e.port,DefaultActions:t,...X(e.protocol,e.certificateArn,e.sslPolicy)});return await h().send(n)}function ve(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:ye,onSuccess:()=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`]})}},e[0]=n,e[1]=r),t(r)}async function ye(e){let t=new T({ListenerArn:e});return await h().send(t)}function be(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:xe,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.loadBalancerArn]})}},e[0]=n,e[1]=r),t(r)}async function xe(e){let t=[{Type:`forward`,TargetGroupArn:e.defaultTargetGroupArn}],n=new A({ListenerArn:e.listenerArn,Protocol:e.protocol,Port:e.port,DefaultActions:t,...X(e.protocol,e.certificateArn,e.sslPolicy)});return await h().send(n)}function Se(){let e=y();return t({mutationFn:async e=>{let t=h(),n=[],r=``;try{let i=e.listener.existingTargetGroupArn;if(e.listener.targetGroupMode===`new`){let a=e.listener.newTargetGroup;if(!a)throw Error(`internal error: new target group requested but no data supplied`);r=`creating target group`;let o=a.tags.filter(e=>e.key.length>0).map(e=>({Key:e.key,Value:e.value})),s=a.healthCheck.protocol===`HTTP`;if(i=(await t.send(new w({Name:a.name,Protocol:a.protocol,Port:a.port,VpcId:a.vpcId,TargetType:`instance`,HealthCheckProtocol:a.healthCheck.protocol,HealthCheckPath:s?a.healthCheck.path:void 0,HealthCheckPort:a.healthCheck.port,HealthCheckIntervalSeconds:a.healthCheck.intervalSeconds,HealthCheckTimeoutSeconds:a.healthCheck.timeoutSeconds,HealthyThresholdCount:a.healthCheck.healthyThresholdCount,UnhealthyThresholdCount:a.healthCheck.unhealthyThresholdCount,Matcher:s?{HttpCode:a.healthCheck.matcher}:void 0,Tags:o.length>0?o:void 0}))).TargetGroups?.[0]?.TargetGroupArn,!i)throw Error(`Target group was created but no ARN was returned by the API`);n.push({type:`Target Group`,id:i})}if(!i)throw Error(`Target group selection is required`);r=`creating load balancer`;let a=e.lb.tags.filter(e=>e.key.length>0).map(e=>({Key:e.key,Value:e.value})),o=(await t.send(new S({Name:e.lb.name,Scheme:e.lb.scheme,Type:e.lb.type,IpAddressType:`ipv4`,Subnets:e.lb.subnetIds,SecurityGroups:e.lb.securityGroupIds.length>0?e.lb.securityGroupIds:void 0,Tags:a.length>0?a:void 0}))).LoadBalancers?.[0]?.LoadBalancerArn;if(!o)throw Error(`Load balancer was created but no ARN was returned by the API`);return n.push({type:`Load Balancer`,id:o}),r=`creating listener`,await t.send(new x({LoadBalancerArn:o,Protocol:e.listener.protocol,Port:e.listener.port,DefaultActions:[{Type:`forward`,TargetGroupArn:i}],...X(e.listener.protocol,e.listener.certificateArn,e.listener.sslPolicy)})),n.push({type:`Listener`,id:void 0}),{loadBalancerArn:o,created:n}}catch(e){return{loadBalancerArn:void 0,created:n,error:e instanceof Error?e:Error(String(e)),failedStep:r}}},onSettled:()=>{e.invalidateQueries({queryKey:[`elbv2`]})}})}function Z(e){return e.map(e=>({Id:e.id,Port:e.port}))}function Ce(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:we,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`,t.targetGroupArn,`health`]})}},e[0]=n,e[1]=r),t(r)}async function we(e){let t=new P({TargetGroupArn:e.targetGroupArn,Targets:Z(e.targets)});return await h().send(t)}function Q(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:Te,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`targetGroups`,t.targetGroupArn,`health`]})}},e[0]=n,e[1]=r),t(r)}async function Te(e){let t=new k({TargetGroupArn:e.targetGroupArn,Targets:Z(e.targets)});return await h().send(t)}function $(e){return e.map(e=>{switch(e.field){case`host-header`:return{Field:e.field,HostHeaderConfig:{Values:e.values}};case`path-pattern`:return{Field:e.field,PathPatternConfig:{Values:e.values}};case`http-header`:return{Field:e.field,HttpHeaderConfig:{HttpHeaderName:e.httpHeaderName??``,Values:e.values}};case`http-request-method`:return{Field:e.field,HttpRequestMethodConfig:{Values:e.values}};case`source-ip`:return{Field:e.field,SourceIpConfig:{Values:e.values}};case`query-string`:return{Field:e.field,QueryStringConfig:{Values:(e.queryStringPairs??[]).map(e=>({Key:e.key&&e.key.length>0?e.key:void 0,Value:e.value}))}};default:return{Field:e.field,Values:e.values}}})}function Ee(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:De,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.listenerArn,`rules`]})}},e[0]=n,e[1]=r),t(r)}async function De(e){let t=[{Type:`forward`,TargetGroupArn:e.forwardTargetGroupArn}],n=new C({ListenerArn:e.listenerArn,Priority:e.priority,Conditions:$(e.conditions),Actions:t});return await h().send(n)}function Oe(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:ke,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.listenerArn,`rules`]})}},e[0]=n,e[1]=r),t(r)}async function ke(e){let t=new M({RuleArn:e.ruleArn,Conditions:e.conditions?$(e.conditions):void 0,Actions:e.forwardTargetGroupArn?[{Type:`forward`,TargetGroupArn:e.forwardTargetGroupArn}]:void 0});return await h().send(t)}function Ae(){let e=(0,R.c)(2),n=y(),r;return e[0]===n?r=e[1]:(r={mutationFn:je,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`elbv2`,`listeners`,t.listenerArn,`rules`]})}},e[0]=n,e[1]=r),t(r)}async function je(e){let t=new D({RuleArn:e.ruleArn});return await h().send(t)}export{W as _,ve as a,de as c,V as d,Oe as f,ae as g,J as h,se as i,Q as l,Ce as m,Se as n,z as o,pe as p,Ee as r,Ae as s,ge as t,be as u}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/iam.js b/spinifex/services/spinifexui/frontend/dist/assets/iam.js index 883556d2d..2d5544c9c 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/iam.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/iam.js @@ -1 +1 @@ -import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{A as n,B as r,D as i,F as a,I as o,L as s,M as c,N as l,O as u,P as ee,R as d,V as f,c as p,j as m,k as h,nt as g,rt as _,tt as v,z as y}from"./awsClient.js";import{St as b,ut as x}from"./auth.js";import{Zr as S}from"./index.js";var C=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AddRoleToInstanceProfile`,{}).n(`IAMClient`,`AddRoleToInstanceProfileCommand`).sc(i).build(){},w=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachRolePolicy`,{}).n(`IAMClient`,`AttachRolePolicyCommand`).sc(u).build(){},T=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachUserPolicy`,{}).n(`IAMClient`,`AttachUserPolicyCommand`).sc(h).build(){},E=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateAccessKey`,{}).n(`IAMClient`,`CreateAccessKeyCommand`).sc(n).build(){},D=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateInstanceProfile`,{}).n(`IAMClient`,`CreateInstanceProfileCommand`).sc(m).build(){},O=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreatePolicy`,{}).n(`IAMClient`,`CreatePolicyCommand`).sc(c).build(){},k=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateRole`,{}).n(`IAMClient`,`CreateRoleCommand`).sc(l).build(){},A=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateUser`,{}).n(`IAMClient`,`CreateUserCommand`).sc(ee).build(){},j=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteAccessKey`,{}).n(`IAMClient`,`DeleteAccessKeyCommand`).sc(a).build(){},M=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteInstanceProfile`,{}).n(`IAMClient`,`DeleteInstanceProfileCommand`).sc(o).build(){},N=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeletePolicy`,{}).n(`IAMClient`,`DeletePolicyCommand`).sc(s).build(){},P=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteRole`,{}).n(`IAMClient`,`DeleteRoleCommand`).sc(d).build(){},F=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteUser`,{}).n(`IAMClient`,`DeleteUserCommand`).sc(y).build(){},I=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachRolePolicy`,{}).n(`IAMClient`,`DetachRolePolicyCommand`).sc(r).build(){},L=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachUserPolicy`,{}).n(`IAMClient`,`DetachUserPolicyCommand`).sc(f).build(){},R=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`RemoveRoleFromInstanceProfile`,{}).n(`IAMClient`,`RemoveRoleFromInstanceProfileCommand`).sc(v).build(){},z=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`UpdateAccessKey`,{}).n(`IAMClient`,`UpdateAccessKeyCommand`).sc(g).build(){},B=e();function V(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:H,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},e[0]=n,e[1]=r),t(r)}async function H(e){let t=new A({UserName:e.userName,Path:e.path||void 0});return await p().send(t)}function U(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:W,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},e[0]=n,e[1]=r),t(r)}async function W(e){let t=new F({UserName:e});return await p().send(t)}function G(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:K,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},e[0]=n,e[1]=r),t(r)}async function K(e){let t=new E({UserName:e});return await p().send(t)}function te(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:q,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},e[0]=n,e[1]=r),t(r)}async function q(e){let{userName:t,accessKeyId:n}=e,r=new j({UserName:t,AccessKeyId:n});return await p().send(r)}function J(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:Y,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},e[0]=n,e[1]=r),t(r)}async function Y(e){let{userName:t,accessKeyId:n,status:r}=e,i=new z({UserName:t,AccessKeyId:n,Status:r});return await p().send(i)}function X(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:Z,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function Z(e){let t=new O({PolicyName:e.policyName,Description:e.description||void 0,PolicyDocument:e.policyDocument});return await p().send(t)}function Q(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ne,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function ne(e){let t=new N({PolicyArn:e});return await p().send(t)}function re(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ie,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},e[0]=n,e[1]=r),t(r)}async function ie(e){let{userName:t,policyArn:n}=e,r=new T({UserName:t,PolicyArn:n});return await p().send(r)}function ae(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:oe,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},e[0]=n,e[1]=r),t(r)}async function oe(e){let{userName:t,policyArn:n}=e,r=new L({UserName:t,PolicyArn:n});return await p().send(r)}function se(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ce,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`roles`]})}},e[0]=n,e[1]=r),t(r)}async function ce(e){let t=new k({RoleName:e.roleName,Path:e.path||void 0,Description:e.description||void 0,AssumeRolePolicyDocument:e.assumeRolePolicyDocument});return await p().send(t)}function le(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ue,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`roles`]})}},e[0]=n,e[1]=r),t(r)}async function ue(e){let t=new P({RoleName:e});return await p().send(t)}function de(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:fe,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-role-policies`]})}},e[0]=n,e[1]=r),t(r)}async function fe(e){let{roleName:t,policyArn:n}=e,r=new w({RoleName:t,PolicyArn:n});return await p().send(r)}function pe(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:$,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-role-policies`]})}},e[0]=n,e[1]=r),t(r)}async function $(e){let{roleName:t,policyArn:n}=e,r=new I({RoleName:t,PolicyArn:n});return await p().send(r)}function me(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:he,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`instance-profiles`]})}},e[0]=n,e[1]=r),t(r)}async function he(e){let t=new D({InstanceProfileName:e.instanceProfileName,Path:e.path||void 0});return await p().send(t)}function ge(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:_e,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`instance-profiles`]})}},e[0]=n,e[1]=r),t(r)}async function _e(e){let t=new M({InstanceProfileName:e});return await p().send(t)}function ve(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ye,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`instance-profiles`]})}},e[0]=n,e[1]=r),t(r)}async function ye(e){let{instanceProfileName:t,roleName:n}=e,r=new C({InstanceProfileName:t,RoleName:n});return await p().send(r)}function be(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:xe,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`instance-profiles`]})}},e[0]=n,e[1]=r),t(r)}async function xe(e){let{instanceProfileName:t,roleName:n}=e,r=new R({InstanceProfileName:t,RoleName:n});return await p().send(r)}export{J as _,me as a,V as c,Q as d,le as f,be as g,ae as h,G as i,te as l,pe as m,de as n,X as o,U as p,re as r,se as s,ve as t,ge as u}; \ No newline at end of file +import{t as e}from"./compiler-runtime.js";import{t}from"./useMutation.js";import{A as n,B as r,D as i,F as a,I as o,L as s,M as c,N as l,O as u,P as ee,R as d,V as f,c as p,j as m,k as h,nt as g,rt as _,tt as v,z as y}from"./awsClient.js";import{St as b,ut as x}from"./auth.js";import{$r as S}from"./index.js";var C=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AddRoleToInstanceProfile`,{}).n(`IAMClient`,`AddRoleToInstanceProfileCommand`).sc(i).build(){},w=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachRolePolicy`,{}).n(`IAMClient`,`AttachRolePolicyCommand`).sc(u).build(){},T=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachUserPolicy`,{}).n(`IAMClient`,`AttachUserPolicyCommand`).sc(h).build(){},E=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateAccessKey`,{}).n(`IAMClient`,`CreateAccessKeyCommand`).sc(n).build(){},D=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateInstanceProfile`,{}).n(`IAMClient`,`CreateInstanceProfileCommand`).sc(m).build(){},O=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreatePolicy`,{}).n(`IAMClient`,`CreatePolicyCommand`).sc(c).build(){},k=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateRole`,{}).n(`IAMClient`,`CreateRoleCommand`).sc(l).build(){},A=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateUser`,{}).n(`IAMClient`,`CreateUserCommand`).sc(ee).build(){},j=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteAccessKey`,{}).n(`IAMClient`,`DeleteAccessKeyCommand`).sc(a).build(){},M=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteInstanceProfile`,{}).n(`IAMClient`,`DeleteInstanceProfileCommand`).sc(o).build(){},N=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeletePolicy`,{}).n(`IAMClient`,`DeletePolicyCommand`).sc(s).build(){},P=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteRole`,{}).n(`IAMClient`,`DeleteRoleCommand`).sc(d).build(){},F=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteUser`,{}).n(`IAMClient`,`DeleteUserCommand`).sc(y).build(){},I=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachRolePolicy`,{}).n(`IAMClient`,`DetachRolePolicyCommand`).sc(r).build(){},L=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachUserPolicy`,{}).n(`IAMClient`,`DetachUserPolicyCommand`).sc(f).build(){},R=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`RemoveRoleFromInstanceProfile`,{}).n(`IAMClient`,`RemoveRoleFromInstanceProfileCommand`).sc(v).build(){},z=class extends b.classBuilder().ep(_).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`UpdateAccessKey`,{}).n(`IAMClient`,`UpdateAccessKeyCommand`).sc(g).build(){},B=e();function V(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:H,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},e[0]=n,e[1]=r),t(r)}async function H(e){let t=new A({UserName:e.userName,Path:e.path||void 0});return await p().send(t)}function U(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:W,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},e[0]=n,e[1]=r),t(r)}async function W(e){let t=new F({UserName:e});return await p().send(t)}function G(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:K,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},e[0]=n,e[1]=r),t(r)}async function K(e){let t=new E({UserName:e});return await p().send(t)}function te(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:q,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},e[0]=n,e[1]=r),t(r)}async function q(e){let{userName:t,accessKeyId:n}=e,r=new j({UserName:t,AccessKeyId:n});return await p().send(r)}function J(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:Y,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},e[0]=n,e[1]=r),t(r)}async function Y(e){let{userName:t,accessKeyId:n,status:r}=e,i=new z({UserName:t,AccessKeyId:n,Status:r});return await p().send(i)}function X(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:Z,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function Z(e){let t=new O({PolicyName:e.policyName,Description:e.description||void 0,PolicyDocument:e.policyDocument});return await p().send(t)}function Q(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ne,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function ne(e){let t=new N({PolicyArn:e});return await p().send(t)}function re(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ie,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},e[0]=n,e[1]=r),t(r)}async function ie(e){let{userName:t,policyArn:n}=e,r=new T({UserName:t,PolicyArn:n});return await p().send(r)}function ae(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:oe,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},e[0]=n,e[1]=r),t(r)}async function oe(e){let{userName:t,policyArn:n}=e,r=new L({UserName:t,PolicyArn:n});return await p().send(r)}function se(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ce,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`roles`]})}},e[0]=n,e[1]=r),t(r)}async function ce(e){let t=new k({RoleName:e.roleName,Path:e.path||void 0,Description:e.description||void 0,AssumeRolePolicyDocument:e.assumeRolePolicyDocument});return await p().send(t)}function le(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ue,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`roles`]})}},e[0]=n,e[1]=r),t(r)}async function ue(e){let t=new P({RoleName:e});return await p().send(t)}function de(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:fe,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-role-policies`]})}},e[0]=n,e[1]=r),t(r)}async function fe(e){let{roleName:t,policyArn:n}=e,r=new w({RoleName:t,PolicyArn:n});return await p().send(r)}function pe(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:$,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-role-policies`]})}},e[0]=n,e[1]=r),t(r)}async function $(e){let{roleName:t,policyArn:n}=e,r=new I({RoleName:t,PolicyArn:n});return await p().send(r)}function me(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:he,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`instance-profiles`]})}},e[0]=n,e[1]=r),t(r)}async function he(e){let t=new D({InstanceProfileName:e.instanceProfileName,Path:e.path||void 0});return await p().send(t)}function ge(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:_e,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`instance-profiles`]})}},e[0]=n,e[1]=r),t(r)}async function _e(e){let t=new M({InstanceProfileName:e});return await p().send(t)}function ve(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ye,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`instance-profiles`]})}},e[0]=n,e[1]=r),t(r)}async function ye(e){let{instanceProfileName:t,roleName:n}=e,r=new C({InstanceProfileName:t,RoleName:n});return await p().send(r)}function be(){let e=(0,B.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:xe,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`instance-profiles`]})}},e[0]=n,e[1]=r),t(r)}async function xe(e){let{instanceProfileName:t,roleName:n}=e,r=new R({InstanceProfileName:t,RoleName:n});return await p().send(r)}export{J as _,me as a,V as c,Q as d,le as f,be as g,ae as h,G as i,te as l,pe as m,de as n,X as o,U as p,re as r,se as s,ve as t,ge as u}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/import-key-pair.js b/spinifex/services/spinifexui/frontend/dist/assets/import-key-pair.js index 6eb698dbb..681203fef 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/import-key-pair.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/import-key-pair.js @@ -1,3 +1,3 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{V as ee}from"./ec2.js";import{Xr as i,er as te}from"./index.js";import{a,i as o,t as s}from"./zod.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as c}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{g as f}from"./ec22.js";import{t as p}from"./textarea.js";var m=t(),h=e();function g(){let e=(0,m.c)(57),t=i(),g=ee(),v;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:s(f)},e[0]=v):v=e[0];let{handleSubmit:y,register:b,control:x,formState:S}=o(v),{errors:C,isSubmitting:w}=S,T;e[1]===x?T=e[2]:(T={control:x},e[1]=x,e[2]=T);let E=a(T),D;e[3]===E?D=e[4]:(D=e=>e?E[e]:void 0,e[3]=E,e[4]=D);let O=D,k;e[5]!==g||e[6]!==t?(k=async e=>{await g.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})},e[5]=g,e[6]=t,e[7]=k):k=e[7];let A=k,j,M;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,h.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,h.jsx)(c,{title:`Import Key Pair`}),e[8]=j,e[9]=M):(j=e[8],M=e[9]);let N;e[10]===g.error?N=e[11]:(N=g.error&&(0,h.jsx)(ne,{error:g.error,msg:`Failed to import key pair`}),e[10]=g.error,e[11]=N);let P;e[12]!==y||e[13]!==A?(P=y(A),e[12]=y,e[13]=A,e[14]=P):P=e[14];let F;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,h.jsx)(l,{children:(0,h.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[15]=F):F=e[15];let I=!!C.keyName,L;e[16]===b?L=e[17]:(L=b(`keyName`),e[16]=b,e[17]=L);let R;e[18]!==I||e[19]!==L?(R=(0,h.jsx)(te,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),e[18]=I,e[19]=L,e[20]=R):R=e[20];let z;e[21]===C.keyName?z=e[22]:(z=(0,h.jsx)(u,{errors:[C.keyName]}),e[21]=C.keyName,e[22]=z);let B;e[23]!==R||e[24]!==z?(B=(0,h.jsxs)(d,{children:[F,R,z]}),e[23]=R,e[24]=z,e[25]=B):B=e[25];let V,H;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,h.jsx)(l,{children:(0,h.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`publicKey-description`,children:`Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)`}),e[26]=V,e[27]=H):(V=e[26],H=e[27]);let U=!!C.publicKeyMaterial,W;e[28]===b?W=e[29]:(W=b(`publicKeyMaterial`),e[28]=b,e[29]=W);let G;e[30]!==U||e[31]!==W?(G=(0,h.jsx)(p,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),e[30]=U,e[31]=W,e[32]=G):G=e[32];let K;e[33]===C.publicKeyMaterial?K=e[34]:(K=(0,h.jsx)(u,{errors:[C.publicKeyMaterial]}),e[33]=C.publicKeyMaterial,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,h.jsxs)(d,{children:[V,H,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===O?J=e[39]:(J=_(O),e[38]=O,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,h.jsx)(r,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>await t({to:`/ec2/describe-key-pairs`}),e[42]=t,e[43]=X);let Z;e[44]!==g.isPending||e[45]!==w||e[46]!==X?(Z=(0,h.jsx)(re,{isPending:g.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),e[44]=g.isPending,e[45]=w,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==B||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==P?(Q=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),e[48]=B,e[49]=q,e[50]=Y,e[51]=Z,e[52]=P,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==N?($=(0,h.jsxs)(h.Fragment,{children:[j,M,N,Q]}),e[54]=Q,e[55]=N,e[56]=$):$=e[56],$}function _(e){let t=e(`keyName`);return[{label:`Import Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 import-key-pair`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{V as ee}from"./ec2.js";import{Qr as i,nr as te}from"./index.js";import{a,i as o,t as s}from"./zod.js";import{t as ne}from"./error-banner.js";import{t as re}from"./form-actions.js";import{t as c}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{g as f}from"./ec22.js";import{t as p}from"./textarea.js";var m=t(),h=e();function g(){let e=(0,m.c)(57),t=i(),g=ee(),v;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:s(f)},e[0]=v):v=e[0];let{handleSubmit:y,register:b,control:x,formState:S}=o(v),{errors:C,isSubmitting:w}=S,T;e[1]===x?T=e[2]:(T={control:x},e[1]=x,e[2]=T);let E=a(T),D;e[3]===E?D=e[4]:(D=e=>e?E[e]:void 0,e[3]=E,e[4]=D);let O=D,k;e[5]!==g||e[6]!==t?(k=async e=>{await g.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})},e[5]=g,e[6]=t,e[7]=k):k=e[7];let A=k,j,M;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,h.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,h.jsx)(c,{title:`Import Key Pair`}),e[8]=j,e[9]=M):(j=e[8],M=e[9]);let N;e[10]===g.error?N=e[11]:(N=g.error&&(0,h.jsx)(ne,{error:g.error,msg:`Failed to import key pair`}),e[10]=g.error,e[11]=N);let P;e[12]!==y||e[13]!==A?(P=y(A),e[12]=y,e[13]=A,e[14]=P):P=e[14];let F;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,h.jsx)(l,{children:(0,h.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[15]=F):F=e[15];let I=!!C.keyName,L;e[16]===b?L=e[17]:(L=b(`keyName`),e[16]=b,e[17]=L);let R;e[18]!==I||e[19]!==L?(R=(0,h.jsx)(te,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),e[18]=I,e[19]=L,e[20]=R):R=e[20];let z;e[21]===C.keyName?z=e[22]:(z=(0,h.jsx)(u,{errors:[C.keyName]}),e[21]=C.keyName,e[22]=z);let B;e[23]!==R||e[24]!==z?(B=(0,h.jsxs)(d,{children:[F,R,z]}),e[23]=R,e[24]=z,e[25]=B):B=e[25];let V,H;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,h.jsx)(l,{children:(0,h.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`publicKey-description`,children:`Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)`}),e[26]=V,e[27]=H):(V=e[26],H=e[27]);let U=!!C.publicKeyMaterial,W;e[28]===b?W=e[29]:(W=b(`publicKeyMaterial`),e[28]=b,e[29]=W);let G;e[30]!==U||e[31]!==W?(G=(0,h.jsx)(p,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),e[30]=U,e[31]=W,e[32]=G):G=e[32];let K;e[33]===C.publicKeyMaterial?K=e[34]:(K=(0,h.jsx)(u,{errors:[C.publicKeyMaterial]}),e[33]=C.publicKeyMaterial,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,h.jsxs)(d,{children:[V,H,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===O?J=e[39]:(J=_(O),e[38]=O,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,h.jsx)(r,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>await t({to:`/ec2/describe-key-pairs`}),e[42]=t,e[43]=X);let Z;e[44]!==g.isPending||e[45]!==w||e[46]!==X?(Z=(0,h.jsx)(re,{isPending:g.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),e[44]=g.isPending,e[45]=w,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==B||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==P?(Q=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),e[48]=B,e[49]=q,e[50]=Y,e[51]=Z,e[52]=P,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==N?($=(0,h.jsxs)(h.Fragment,{children:[j,M,N,Q]}),e[54]=Q,e[55]=N,e[56]=$):$=e[56],$}function _(e){let t=e(`keyName`);return[{label:`Import Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 import-key-pair`},{type:`flag`,value:` \\ --key-name`},{type:`value`,value:` ${(typeof t==`string`?t:``)||``}`},{type:`flag`,value:` \\ --public-key-material`},{type:`value`,value:` fileb://path/to/key.pub`}]}]}export{g as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/index.css b/spinifex/services/spinifexui/frontend/dist/assets/index.css index 4cb918916..00ba6ec25 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/index.css +++ b/spinifex/services/spinifexui/frontend/dist/assets/index.css @@ -1,2 +1,2 @@ /*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100:#ffe2e2;--color-red-800:#9f0712;--color-red-900:#82181a;--color-amber-400:#fcbb00;--color-amber-500:#f99c00;--color-amber-700:#b75000;--color-yellow-100:#fef9c2;--color-yellow-800:#874b00;--color-yellow-900:#733e0a;--color-green-100:#dcfce7;--color-green-600:#00a544;--color-green-800:#016630;--color-green-900:#0d542b;--color-emerald-400:#00d294;--color-emerald-500:#00bb7f;--color-emerald-700:#007956;--color-blue-500:#3080ff;--color-gray-100:#f3f4f6;--color-gray-800:#1e2939;--color-zinc-100:#f4f4f5;--color-zinc-400:#9f9fa9;--color-zinc-500:#71717b;--color-zinc-800:#27272a;--color-black:#000;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wider:.05em;--tracking-widest:.1em;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:calc(var(--radius) - 2px);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-foreground:var(--foreground)}@supports (color:lab(0% 0 0)){:root,:host{--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-800:lab(33.7174% 55.8993 41.0293);--color-red-900:lab(28.5139% 44.5539 29.0463);--color-amber-400:lab(80.1641% 16.6016 99.2089);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-amber-700:lab(47.2709% 42.9082 69.2966);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-800:lab(38.7484% 23.5833 51.4916);--color-yellow-900:lab(32.3865% 21.1273 38.5959);--color-green-100:lab(96.1861% -13.8464 6.52365);--color-green-600:lab(59.0978% -58.6621 41.2579);--color-green-800:lab(37.4616% -36.7971 22.9692);--color-green-900:lab(30.797% -29.6927 17.382);--color-emerald-400:lab(75.0771% -60.7313 19.4147);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-700:lab(44.4871% -41.0396 11.0361);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-gray-100:lab(96.1596% -.0823438 -1.13575);--color-gray-800:lab(16.1051% -1.18239 -11.7533);--color-zinc-100:lab(96.1634% .0993311 -.364041);--color-zinc-400:lab(65.6464% 1.53497 -5.42429);--color-zinc-500:lab(47.8878% 1.65477 -5.77283);--color-zinc-800:lab(15.7305% .613764 -2.16959)}}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}*{scrollbar-width:thin}html,body{overscroll-behavior:none}body{background-color:var(--background);width:100%;min-height:100svh;color:var(--foreground);font-family:var(--font-sans), sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.font-mono{font-family:var(--font-mono), monospace}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.\@container\/field-group{container:field-group/inline-size}.\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-4{top:calc(var(--spacing) * 4)}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.bottom-0{bottom:0}.left-0{left:0}.left-1\/2{left:50%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.order-first{order:-9999}.order-last{order:9999}.col-span-2{grid-column:span 2/span 2}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-0{margin-inline:0}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3\.5{margin-inline:calc(var(--spacing) * 3.5)}.mx-auto{margin-inline:auto}.-my-2{margin-block:calc(var(--spacing) * -2)}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-auto{margin-right:auto}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-1{margin-left:var(--spacing)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-\[1\.2rem\]{width:1.2rem;height:1.2rem}.size-full{width:100%;height:100%}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-\[calc\(--spacing\(4\.75\)\)\]{height:calc(calc(var(--spacing) * 4.75))}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-\(--available-height\){max-height:var(--available-height)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[85vh\]{max-height:85vh}.max-h-\[min\(calc\(--spacing\(72\)---spacing\(9\)\)\,calc\(var\(--available-height\)---spacing\(9\)\)\)\]{max-height:min(calc(calc(var(--spacing) * 72) - calc(var(--spacing) * 9)), calc(var(--available-height) - calc(var(--spacing) * 9)))}.min-h-0{min-height:0}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-svh{min-height:100svh}.w-\(--anchor-width\){width:var(--anchor-width)}.w-\(--sidebar-width\){width:var(--sidebar-width)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-48{width:calc(var(--spacing) * 48)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\(--available-width\){max-width:var(--available-width)}.max-w-\(--skeleton-width\){max-width:var(--skeleton-width)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-16{min-width:calc(var(--spacing) * 16)}.min-w-32{min-width:calc(var(--spacing) * 32)}.min-w-\[calc\(var\(--anchor-width\)\+--spacing\(7\)\)\]{min-width:calc(var(--anchor-width) + calc(var(--spacing) * 7))}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.origin-\(--transform-origin\){transform-origin:var(--transform-origin)}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-px{--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%-2px\)\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-none{translate:none}.scale-0{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)}.rotate-0{rotate:0deg}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scroll-my-1{scroll-margin-block:var(--spacing)}.scroll-py-1{scroll-padding-block:var(--spacing)}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr)}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-px{gap:1px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block:0}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.-space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[calc\(var\(--radius-sm\)\+2px\)\]{border-radius:calc(var(--radius-sm) + 2px)}.rounded-\[calc\(var\(--radius-sm\)-2px\)\]{border-radius:calc(var(--radius-sm) - 2px)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:calc(var(--radius) + 2px)}.rounded-md{border-radius:var(--radius)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:calc(var(--radius) + 2px);border-top-right-radius:calc(var(--radius) + 2px)}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:calc(var(--radius) + 2px);border-bottom-left-radius:calc(var(--radius) + 2px)}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-bs{border-block-start-style:var(--tw-border-style);border-block-start-width:1px}.border-be{border-block-end-style:var(--tw-border-style);border-block-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab, red, red)){.border-blue-500\/30{border-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.border-border{border-color:var(--border)}.border-destructive{border-color:var(--destructive)}.border-emerald-500{border-color:var(--color-emerald-500)}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-foreground\/10{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.border-foreground\/10{border-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.border-foreground\/20{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.border-foreground\/20{border-color:color-mix(in oklab, var(--foreground) 20%, transparent)}}.border-input{border-color:var(--input)}.border-muted{border-color:var(--muted)}.border-sidebar-border{border-color:var(--sidebar-border)}.border-tactical-amber\/40{border-color:var(--tactical-amber)}@supports (color:color-mix(in lab, red, red)){.border-tactical-amber\/40{border-color:color-mix(in oklab, var(--tactical-amber) 40%, transparent)}}.border-transparent{border-color:#0000}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-background{background-color:var(--background)}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.bg-black\/80{background-color:color-mix(in oklab, var(--color-black) 80%, transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-border,.bg-border\/50{background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.bg-border\/50{background-color:color-mix(in oklab, var(--border) 50%, transparent)}}.bg-card{background-color:var(--card)}.bg-destructive,.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-foreground{background-color:var(--foreground)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-green-100{background-color:var(--color-green-100)}.bg-input\/20{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.bg-input\/20{background-color:color-mix(in oklab, var(--input) 20%, transparent)}}.bg-muted{background-color:var(--muted)}.bg-muted-foreground\/10{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/10{background-color:color-mix(in oklab, var(--muted-foreground) 10%, transparent)}}.bg-muted\/20{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/20{background-color:color-mix(in oklab, var(--muted) 20%, transparent)}}.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/30{background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-red-100{background-color:var(--color-red-100)}.bg-secondary{background-color:var(--secondary)}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-border{background-color:var(--sidebar-border)}.bg-tactical-amber\/5{background-color:var(--tactical-amber)}@supports (color:color-mix(in lab, red, red)){.bg-tactical-amber\/5{background-color:color-mix(in oklab, var(--tactical-amber) 5%, transparent)}}.bg-transparent{background-color:#0000}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-zinc-100{background-color:var(--color-zinc-100)}.bg-clip-padding{background-clip:padding-box}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.fill-foreground{fill:var(--foreground)}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.pt-0{padding-top:0}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-0{padding-bottom:0}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-sm\/relaxed{font-size:var(--text-sm);line-height:var(--leading-relaxed)}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-xs\/relaxed{font-size:var(--text-xs);line-height:var(--leading-relaxed)}.text-\[0\.625rem\]{font-size:.625rem}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-500{color:var(--color-amber-500)}.text-amber-700{color:var(--color-amber-700)}.text-background{color:var(--background)}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-emerald-700{color:var(--color-emerald-700)}.text-foreground{color:var(--foreground)}.text-gray-800{color:var(--color-gray-800)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/70{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab, red, red)){.text-sidebar-foreground\/70{color:color-mix(in oklab, var(--sidebar-foreground) 70%, transparent)}}.text-tactical-amber{color:var(--tactical-amber)}.text-tactical-cyan{color:var(--tactical-cyan)}.text-tactical-green{color:var(--tactical-green)}.text-yellow-800{color:var(--color-yellow-800)}.text-zinc-500{color:var(--color-zinc-500)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-50{opacity:.5}.bg-blend-color{background-blend-mode:color}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-border)));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-background{--tw-ring-color:var(--background)}.ring-foreground\/10{--tw-ring-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.ring-foreground\/10{--tw-ring-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.ring-sidebar-ring{--tw-ring-color:var(--sidebar-ring)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[margin\,opacity\]{transition-property:margin,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}.group-focus-within\/menu-item\:opacity-100:is(:where(.group\/menu-item):focus-within *){opacity:1}@media (hover:hover){.group-hover\/menu-item\:opacity-100:is(:where(.group\/menu-item):hover *){opacity:1}}.group-focus\/dropdown-menu-item\:text-accent-foreground:is(:where(.group\/dropdown-menu-item):focus *){color:var(--accent-foreground)}.group-has-data-\[orientation\=horizontal\]\/field\:text-balance:is(:where(.group\/field):has([data-orientation=horizontal]) *){text-wrap:balance}.group-has-data-\[sidebar\=menu-action\]\/menu-item\:pr-8:is(:where(.group\/menu-item):has([data-sidebar=menu-action]) *){padding-right:calc(var(--spacing) * 8)}.group-has-data-\[size\=lg\]\/avatar-group\:size-10:is(:where(.group\/avatar-group):has([data-size=lg]) *){width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.group-has-data-\[size\=sm\]\/avatar-group\:size-6:is(:where(.group\/avatar-group):has([data-size=sm]) *){width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.group-has-data-\[slot\=combobox-clear\]\/input-group\:hidden:is(:where(.group\/input-group):has([data-slot=combobox-clear]) *){display:none}.group-has-\[\>input\]\/input-group\:pt-2:is(:where(.group\/input-group):has(>input) *){padding-top:calc(var(--spacing) * 2)}.group-has-\[\>input\]\/input-group\:pb-2:is(:where(.group\/input-group):has(>input) *){padding-bottom:calc(var(--spacing) * 2)}.group-data-empty\/combobox-content\:flex:is(:where(.group\/combobox-content)[data-empty] *){display:flex}.group-data-\[collapsible\=icon\]\:-mt-8:is(:where(.group)[data-collapsible=icon] *){margin-top:calc(var(--spacing) * -8)}.group-data-\[collapsible\=icon\]\:hidden:is(:where(.group)[data-collapsible=icon] *){display:none}.group-data-\[collapsible\=icon\]\:size-8\!:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--spacing) * 8)!important;height:calc(var(--spacing) * 8)!important}.group-data-\[collapsible\=icon\]\:w-\(--sidebar-width-icon\):is(:where(.group)[data-collapsible=icon] *){width:var(--sidebar-width-icon)}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)))}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\+2px\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)) + 2px)}.group-data-\[collapsible\=icon\]\:overflow-hidden:is(:where(.group)[data-collapsible=icon] *){overflow:hidden}.group-data-\[collapsible\=icon\]\:p-0\!:is(:where(.group)[data-collapsible=icon] *){padding:0!important}.group-data-\[collapsible\=icon\]\:p-2\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 2)!important}.group-data-\[collapsible\=icon\]\:opacity-0:is(:where(.group)[data-collapsible=icon] *){opacity:0}.group-data-\[collapsible\=offExamples\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offExamples] *){right:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offExamples\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offExamples] *){left:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offExamples\]\:w-0:is(:where(.group)[data-collapsible=offExamples] *){width:0}.group-data-\[collapsible\=offExamples\]\:translate-x-0:is(:where(.group)[data-collapsible=offExamples] *){--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *),.group-data-\[disabled\=true\]\/field\:opacity-50:is(:where(.group\/field)[data-disabled=true] *),.group-data-\[disabled\=true\]\/input-group\:opacity-50:is(:where(.group\/input-group)[data-disabled=true] *){opacity:.5}.group-data-\[panel-open\]\:rotate-180:is(:where(.group)[data-panel-open] *){rotate:180deg}.group-data-\[side\=left\]\:-right-4:is(:where(.group)[data-side=left] *){right:calc(var(--spacing) * -4)}.group-data-\[side\=left\]\:border-r:is(:where(.group)[data-side=left] *){border-right-style:var(--tw-border-style);border-right-width:1px}.group-data-\[side\=right\]\:left-0:is(:where(.group)[data-side=right] *){left:0}.group-data-\[side\=right\]\:rotate-180:is(:where(.group)[data-side=right] *){rotate:180deg}.group-data-\[side\=right\]\:border-l:is(:where(.group)[data-side=right] *){border-left-style:var(--tw-border-style);border-left-width:1px}.group-data-\[size\=default\]\/avatar\:size-2\.5:is(:where(.group\/avatar)[data-size=default] *){width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.group-data-\[size\=lg\]\/avatar\:size-3:is(:where(.group\/avatar)[data-size=lg] *){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.group-data-\[size\=sm\]\/alert-dialog-content\:grid:is(:where(.group\/alert-dialog-content)[data-size=sm] *){display:grid}.group-data-\[size\=sm\]\/alert-dialog-content\:grid-cols-2:is(:where(.group\/alert-dialog-content)[data-size=sm] *){grid-template-columns:repeat(2,minmax(0,1fr))}.group-data-\[size\=sm\]\/avatar\:size-2:is(:where(.group\/avatar)[data-size=sm] *){width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.group-data-\[size\=sm\]\/avatar\:text-xs:is(:where(.group\/avatar)[data-size=sm] *){font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.group-data-\[size\=sm\]\/card\:px-3:is(:where(.group\/card)[data-size=sm] *){padding-inline:calc(var(--spacing) * 3)}.group-data-\[variant\=floating\]\:rounded-lg:is(:where(.group)[data-variant=floating] *){border-radius:calc(var(--radius) + 2px)}.group-data-\[variant\=floating\]\:shadow-sm:is(:where(.group)[data-variant=floating] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=floating\]\:ring-1:is(:where(.group)[data-variant=floating] *){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=floating\]\:ring-sidebar-border:is(:where(.group)[data-variant=floating] *){--tw-ring-color:var(--sidebar-border)}.group-data-\[variant\=outline\]\/field-group\:-mb-2:is(:where(.group\/field-group)[data-variant=outline] *){margin-bottom:calc(var(--spacing) * -2)}@media (hover:hover){.peer-hover\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button):hover~*){color:var(--sidebar-accent-foreground)}}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.peer-data-active\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button)[data-active]~*){color:var(--sidebar-accent-foreground)}.peer-data-\[size\=default\]\/menu-button\:top-1\.5:is(:where(.peer\/menu-button)[data-size=default]~*){top:calc(var(--spacing) * 1.5)}.peer-data-\[size\=lg\]\/menu-button\:top-2\.5:is(:where(.peer\/menu-button)[data-size=lg]~*){top:calc(var(--spacing) * 2.5)}.peer-data-\[size\=sm\]\/menu-button\:top-1:is(:where(.peer\/menu-button)[data-size=sm]~*){top:var(--spacing)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-6::file-selector-button{height:calc(var(--spacing) * 6)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-xs\/relaxed::file-selector-button{font-size:var(--text-xs);line-height:var(--leading-relaxed)}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);inset:calc(var(--spacing) * -2)}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-y-0:after{content:var(--tw-content);inset-block:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:rounded-full:after{content:var(--tw-content);border-radius:3.40282e38px}.after\:border:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-border:after{content:var(--tw-content);border-color:var(--border)}.after\:mix-blend-darken:after{content:var(--tw-content);mix-blend-mode:darken}.group-data-\[collapsible\=offExamples\]\:after\:left-full:is(:where(.group)[data-collapsible=offExamples] *):after{content:var(--tw-content);left:100%}.last\:mt-0:last-child{margin-top:0}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.autofill\:\[-webkit-text-fill-color\:var\(--color-foreground\)\]:autofill{-webkit-text-fill-color:var(--color-foreground)}.autofill\:\[transition\:background-color_9999s_ease-in-out_0s\]:autofill{transition:background-color 9999s ease-in-out}.focus-within\:border-ring:focus-within{border-color:var(--ring)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-ring\/30:focus-within{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-within\:ring-ring\/30:focus-within{--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}@media (hover:hover){.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive\/20:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/20:hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.hover\:bg-input\/40:hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-input\/40:hover{background-color:color-mix(in oklab, var(--input) 40%, transparent)}}.hover\:bg-input\/50:hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-input\/50:hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.hover\:bg-muted:hover{background-color:var(--muted)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab, var(--primary) 80%, transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-accent)));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:group-data-\[collapsible\=offExamples\]\:bg-sidebar:hover:is(:where(.group)[data-collapsible=offExamples] *){background-color:var(--sidebar)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:var(--sidebar-border)}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus,:is(.focus\:\*\*\:text-accent-foreground:focus *),:is(.not-data-\[variant\=destructive\]\:focus\:\*\*\:text-accent-foreground:not([data-variant=destructive]):focus *){color:var(--accent-foreground)}.focus-visible\:border-destructive\/40:focus-visible{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:border-destructive\/40:focus-visible{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-2:focus-visible,.focus-visible\:ring-\[2px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:bg-sidebar-accent:active{background-color:var(--sidebar-accent)}.active\:text-sidebar-accent-foreground:active{color:var(--sidebar-accent-foreground)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}:where([data-side=left]) .in-data-\[side\=left\]\:cursor-w-resize{cursor:w-resize}:where([data-side=right]) .in-data-\[side\=right\]\:cursor-e-resize{cursor:e-resize}:where([data-slot=combobox-content]) .in-data-\[slot\=combobox-content\]\:focus-within\:border-inherit:focus-within{border-color:inherit}:where([data-slot=combobox-content]) .in-data-\[slot\=combobox-content\]\:focus-within\:ring-0:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-disabled\:pointer-events-none:has(:disabled){pointer-events:none}.has-disabled\:cursor-not-allowed:has(:disabled){cursor:not-allowed}.has-disabled\:opacity-50:has(:disabled){opacity:.5}.has-aria-invalid\:border-destructive:has([aria-invalid=true]){border-color:var(--destructive)}.has-aria-invalid\:ring-2:has([aria-invalid=true]){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-aria-invalid\:ring-destructive\/20:has([aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.has-aria-invalid\:ring-destructive\/20:has([aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.has-data-checked\:bg-primary\/5:has([data-checked]){background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.has-data-checked\:bg-primary\/5:has([data-checked]){background-color:color-mix(in oklab, var(--primary) 5%, transparent)}}.has-data-\[align\=block-end\]\:rounded-md:has([data-align=block-end]),.has-data-\[align\=block-start\]\:rounded-md:has([data-align=block-start]){border-radius:var(--radius)}.has-data-\[icon\=inline-end\]\:pr-1\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-end\]\:pr-2:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-start\]\:pl-1\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-start\]\:pl-2:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 2)}.has-data-\[slot\=alert-dialog-media\]\:grid-rows-\[auto_auto_1fr\]:has([data-slot=alert-dialog-media]){grid-template-rows:auto auto 1fr}.has-data-\[slot\=alert-dialog-media\]\:gap-x-4:has([data-slot=alert-dialog-media]){column-gap:calc(var(--spacing) * 4)}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-data-\[slot\=card-description\]\:grid-rows-\[auto_auto\]:has([data-slot=card-description]){grid-template-rows:auto auto}.has-data-\[slot\=combobox-chip\]\:px-1:has([data-slot=combobox-chip]){padding-inline:var(--spacing)}.has-data-\[slot\=combobox-chip-remove\]\:pr-0:has([data-slot=combobox-chip-remove]){padding-right:0}.has-data-\[variant\=inset\]\:bg-sidebar:has([data-variant=inset]){background-color:var(--sidebar)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:border-ring:has([data-slot=input-group-control]:focus-visible){border-color:var(--ring)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-2:has([data-slot=input-group-control]:focus-visible){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-ring\/30:has([data-slot=input-group-control]:focus-visible){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-ring\/30:has([data-slot=input-group-control]:focus-visible){--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:border-destructive:has([data-slot][aria-invalid=true]){border-color:var(--destructive)}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-2:has([data-slot][aria-invalid=true]){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/20:has([data-slot][aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/20:has([data-slot][aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.has-\[textarea\]\:rounded-md:has(:is(textarea)){border-radius:var(--radius)}.has-\[\>\[data-align\=block-end\]\]\:h-auto:has(>[data-align=block-end]){height:auto}.has-\[\>\[data-align\=block-end\]\]\:flex-col:has(>[data-align=block-end]){flex-direction:column}.has-\[\>\[data-align\=block-start\]\]\:h-auto:has(>[data-align=block-start]){height:auto}.has-\[\>\[data-align\=block-start\]\]\:flex-col:has(>[data-align=block-start]){flex-direction:column}.has-\[\>\[data-slot\=checkbox-group\]\]\:gap-3:has(>[data-slot=checkbox-group]){gap:calc(var(--spacing) * 3)}.has-\[\>\[data-slot\=field-content\]\]\:items-start:has(>[data-slot=field-content]){align-items:flex-start}.has-\[\>\[data-slot\=field\]\]\:w-full:has(>[data-slot=field]){width:100%}.has-\[\>\[data-slot\=field\]\]\:flex-col:has(>[data-slot=field]){flex-direction:column}.has-\[\>\[data-slot\=field\]\]\:rounded-md:has(>[data-slot=field]){border-radius:var(--radius)}.has-\[\>\[data-slot\=field\]\]\:border:has(>[data-slot=field]){border-style:var(--tw-border-style);border-width:1px}.has-\[\>\[data-slot\=radio-group\]\]\:gap-3:has(>[data-slot=radio-group]){gap:calc(var(--spacing) * 3)}.has-\[\>button\]\:mr-\[-0\.275rem\]:has(>button){margin-right:-.275rem}.has-\[\>button\]\:ml-\[-0\.275rem\]:has(>button){margin-left:-.275rem}.has-\[\>img\:first-child\]\:pt-0:has(>img:first-child){padding-top:0}.has-\[\>kbd\]\:mr-\[-0\.275rem\]:has(>kbd){margin-right:-.275rem}.has-\[\>kbd\]\:ml-\[-0\.275rem\]:has(>kbd){margin-left:-.275rem}.has-\[\>svg\]\:p-0:has(>svg){padding:0}.has-\[\>textarea\]\:h-auto:has(>textarea){height:auto}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-expanded\:bg-muted[aria-expanded=true]{background-color:var(--muted)}.aria-expanded\:bg-secondary[aria-expanded=true]{background-color:var(--secondary)}.aria-expanded\:text-foreground[aria-expanded=true]{color:var(--foreground)}.aria-expanded\:text-secondary-foreground[aria-expanded=true]{color:var(--secondary-foreground)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-2[aria-invalid=true],.aria-invalid\:ring-\[2px\][aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-active\:bg-sidebar-accent[data-active]{background-color:var(--sidebar-accent)}.data-active\:font-medium[data-active]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-active\:text-sidebar-accent-foreground[data-active]{color:var(--sidebar-accent-foreground)}.data-closed\:overflow-hidden[data-closed]{overflow:hidden}.data-disabled\:pointer-events-none[data-disabled]{pointer-events:none}.data-disabled\:opacity-50[data-disabled]{opacity:.5}.data-empty\:p-0[data-empty]{padding:0}.data-ending-style\:opacity-0[data-ending-style]{opacity:0}.data-highlighted\:bg-accent[data-highlighted]{background-color:var(--accent)}.data-highlighted\:text-accent-foreground[data-highlighted],:is(.not-data-\[variant\=destructive\]\:data-highlighted\:\*\*\:text-accent-foreground:not([data-variant=destructive])[data-highlighted] *){color:var(--accent-foreground)}.data-inset\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-open\:bg-accent[data-open]{background-color:var(--accent)}.data-open\:text-accent-foreground[data-open]{color:var(--accent-foreground)}.data-open\:opacity-100[data-open]{opacity:1}@media (hover:hover){.data-open\:hover\:bg-sidebar-accent[data-open]:hover{background-color:var(--sidebar-accent)}.data-open\:hover\:text-sidebar-accent-foreground[data-open]:hover{color:var(--sidebar-accent-foreground)}}.data-placeholder\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-pressed\:bg-transparent[data-pressed]{background-color:#0000}.data-selected\:border-primary[data-selected]{border-color:var(--primary)}.data-selected\:text-foreground[data-selected]{color:var(--foreground)}.data-starting-style\:opacity-0[data-starting-style]{opacity:0}.data-\[chips\=true\]\:min-w-\(--anchor-width\)[data-chips=true]{min-width:var(--anchor-width)}.data-\[invalid\=true\]\:text-destructive[data-invalid=true]{color:var(--destructive)}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[orientation\=vertical\]\:self-stretch[data-orientation=vertical]{align-self:stretch}.data-\[side\=bottom\]\:inset-x-0[data-side=bottom]{inset-inline:0}.data-\[side\=bottom\]\:top-1[data-side=bottom]{top:var(--spacing)}.data-\[side\=bottom\]\:bottom-0[data-side=bottom]{bottom:0}.data-\[side\=bottom\]\:h-auto[data-side=bottom]{height:auto}.data-\[side\=bottom\]\:border-t[data-side=bottom]{border-top-style:var(--tw-border-style);border-top-width:1px}.data-\[side\=left\]\:inset-y-0[data-side=left]{inset-block:0}.data-\[side\=left\]\:top-1\/2\![data-side=left]{top:50%!important}.data-\[side\=left\]\:-right-1[data-side=left]{right:calc(var(--spacing) * -1)}.data-\[side\=left\]\:left-0[data-side=left]{left:0}.data-\[side\=left\]\:h-full[data-side=left]{height:100%}.data-\[side\=left\]\:w-3\/4[data-side=left]{width:75%}.data-\[side\=left\]\:-translate-y-1\/2[data-side=left]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:border-r[data-side=left]{border-right-style:var(--tw-border-style);border-right-width:1px}.data-\[side\=right\]\:inset-y-0[data-side=right]{inset-block:0}.data-\[side\=right\]\:top-1\/2\![data-side=right]{top:50%!important}.data-\[side\=right\]\:right-0[data-side=right]{right:0}.data-\[side\=right\]\:-left-1[data-side=right]{left:calc(var(--spacing) * -1)}.data-\[side\=right\]\:h-full[data-side=right]{height:100%}.data-\[side\=right\]\:w-3\/4[data-side=right]{width:75%}.data-\[side\=right\]\:-translate-y-1\/2[data-side=right]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:border-l[data-side=right]{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[side\=top\]\:inset-x-0[data-side=top]{inset-inline:0}.data-\[side\=top\]\:top-0[data-side=top]{top:0}.data-\[side\=top\]\:-bottom-2\.5[data-side=top]{bottom:calc(var(--spacing) * -2.5)}.data-\[side\=top\]\:h-auto[data-side=top]{height:auto}.data-\[side\=top\]\:border-b[data-side=top]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.data-\[size\=default\]\:h-7[data-size=default]{height:calc(var(--spacing) * 7)}.data-\[size\=default\]\:max-w-xs[data-size=default]{max-width:var(--container-xs)}.data-\[size\=lg\]\:size-10[data-size=lg]{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.data-\[size\=md\]\:text-xs[data-size=md]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.data-\[size\=sm\]\:size-6[data-size=sm]{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.data-\[size\=sm\]\:h-6[data-size=sm]{height:calc(var(--spacing) * 6)}.data-\[size\=sm\]\:max-w-64[data-size=sm]{max-width:calc(var(--spacing) * 64)}.data-\[size\=sm\]\:gap-3[data-size=sm]{gap:calc(var(--spacing) * 3)}.data-\[size\=sm\]\:py-3[data-size=sm]{padding-block:calc(var(--spacing) * 3)}.data-\[size\=sm\]\:text-xs[data-size=sm]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}:is(.\*\:data-\[slot\=avatar\]\:ring-2>*)[data-slot=avatar]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}:is(.\*\:data-\[slot\=avatar\]\:ring-background>*)[data-slot=avatar]{--tw-ring-color:var(--background)}.data-\[slot\=checkbox-group\]\:gap-3[data-slot=checkbox-group]{gap:calc(var(--spacing) * 3)}:is(.\*\:data-\[slot\=field\]\:p-2>*)[data-slot=field]{padding:calc(var(--spacing) * 2)}:is(.\*\:data-\[slot\=field-group\]\:gap-4>*)[data-slot=field-group]{gap:calc(var(--spacing) * 4)}:is(.\*\:data-\[slot\=input-group\]\:m-1>*)[data-slot=input-group]{margin:var(--spacing)}:is(.\*\:data-\[slot\=input-group\]\:mb-0>*)[data-slot=input-group]{margin-bottom:0}:is(.\*\:data-\[slot\=input-group\]\:h-7>*)[data-slot=input-group]{height:calc(var(--spacing) * 7)}:is(.\*\:data-\[slot\=input-group\]\:border-none>*)[data-slot=input-group]{--tw-border-style:none;border-style:none}:is(.\*\:data-\[slot\=input-group\]\:bg-input\/20>*)[data-slot=input-group]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){:is(.\*\:data-\[slot\=input-group\]\:bg-input\/20>*)[data-slot=input-group]{background-color:color-mix(in oklab, var(--input) 20%, transparent)}}:is(.\*\:data-\[slot\=input-group\]\:shadow-none>*)[data-slot=input-group]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}:is(.\*\*\:data-\[slot\=kbd\]\:rounded-\[calc\(var\(--radius-sm\)-2px\)\] *)[data-slot=kbd]{border-radius:calc(var(--radius-sm) - 2px)}:is(.\*\*\:data-\[slot\=kbd\]\:rounded-md *)[data-slot=kbd]{border-radius:var(--radius)}:is(.\*\*\:data-\[slot\=kbd\]\:bg-muted-foreground\/10 *)[data-slot=kbd]{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){:is(.\*\*\:data-\[slot\=kbd\]\:bg-muted-foreground\/10 *)[data-slot=kbd]{background-color:color-mix(in oklab, var(--muted-foreground) 10%, transparent)}}:is(.\*\*\:data-\[slot\=kbd\]\:px-1 *)[data-slot=kbd]{padding-inline:var(--spacing)}:is(.\*\*\:data-\[slot\=kbd\]\:text-\[0\.625rem\] *)[data-slot=kbd]{font-size:.625rem}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-1\.5>*)[data-slot=select-value]{gap:calc(var(--spacing) * 1.5)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=label\]\:text-xs\/relaxed[data-variant=label]{font-size:var(--text-xs);line-height:var(--leading-relaxed)}.data-\[variant\=legend\]\:text-sm[data-variant=legend]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.nth-last-2\:-mt-1:nth-last-child(2){margin-top:calc(var(--spacing) * -1)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-backdrop-filter\:backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}}@media (width>=40rem){.sm\:flex{display:flex}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-\[1fr_1fr_1fr_auto\]{grid-template-columns:1fr 1fr 1fr auto}.sm\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:row-span-2:is(:where(.group\/alert-dialog-content)[data-size=default] *){grid-row:span 2/span 2}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:place-items-start:is(:where(.group\/alert-dialog-content)[data-size=default] *){place-items:start}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:text-left:is(:where(.group\/alert-dialog-content)[data-size=default] *){text-align:left}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:group-has-data-\[slot\=alert-dialog-media\]\/alert-dialog-content\:col-start-2:is(:where(.group\/alert-dialog-content)[data-size=default] *):is(:where(.group\/alert-dialog-content):has([data-slot=alert-dialog-media]) *){grid-column-start:2}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:has-data-\[slot\=alert-dialog-media\]\:grid-rows-\[auto_1fr\]:is(:where(.group\/alert-dialog-content)[data-size=default] *):has([data-slot=alert-dialog-media]){grid-template-rows:auto 1fr}.data-\[side\=left\]\:sm\:max-w-sm[data-side=left],.data-\[side\=right\]\:sm\:max-w-sm[data-side=right],.data-\[size\=default\]\:sm\:max-w-sm[data-size=default]{max-width:var(--container-sm)}}@media (width>=48rem){.md\:block{display:block}.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:text-xs\/relaxed{font-size:var(--text-xs);line-height:var(--leading-relaxed)}.md\:text-pretty{text-wrap:pretty}.md\:opacity-0{opacity:0}.md\:peer-data-\[variant\=inset\]\:m-2:is(:where(.peer)[data-variant=inset]~*){margin:calc(var(--spacing) * 2)}.md\:peer-data-\[variant\=inset\]\:ml-0:is(:where(.peer)[data-variant=inset]~*){margin-left:0}.md\:peer-data-\[variant\=inset\]\:rounded-xl:is(:where(.peer)[data-variant=inset]~*){border-radius:calc(var(--radius) + 4px)}.md\:peer-data-\[variant\=inset\]\:shadow-sm:is(:where(.peer)[data-variant=inset]~*){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.md\:peer-data-\[variant\=inset\]\:peer-data-\[state\=collapsed\]\:ml-2:is(:where(.peer)[data-variant=inset]~*):is(:where(.peer)[data-state=collapsed]~*){margin-left:calc(var(--spacing) * 2)}.md\:after\:hidden:after{content:var(--tw-content);display:none}}@media (width>=64rem){.lg\:block{display:block}}@media (width>=80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@container field-group (width>=28rem){.\@md\/field-group\:flex-row{flex-direction:row}.\@md\/field-group\:items-center{align-items:center}.\@md\/field-group\:has-\[\>\[data-slot\=field-content\]\]\:items-start:has(>[data-slot=field-content]){align-items:flex-start}}.dark\:scale-0:where(.dark,.dark *){--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.dark\:scale-100:where(.dark,.dark *){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.dark\:-rotate-90:where(.dark,.dark *){rotate:-90deg}.dark\:rotate-0:where(.dark,.dark *){rotate:0deg}.dark\:bg-destructive\/20:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/20:where(.dark,.dark *){background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.dark\:bg-gray-800:where(.dark,.dark *){background-color:var(--color-gray-800)}.dark\:bg-green-900:where(.dark,.dark *){background-color:var(--color-green-900)}.dark\:bg-input\/30:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:bg-muted\/30:where(.dark,.dark *){background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-muted\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.dark\:bg-popover:where(.dark,.dark *){background-color:var(--popover)}.dark\:bg-red-900:where(.dark,.dark *){background-color:var(--color-red-900)}.dark\:bg-transparent:where(.dark,.dark *){background-color:#0000}.dark\:bg-yellow-900:where(.dark,.dark *){background-color:var(--color-yellow-900)}.dark\:bg-zinc-800:where(.dark,.dark *){background-color:var(--color-zinc-800)}.dark\:text-amber-400:where(.dark,.dark *){color:var(--color-amber-400)}.dark\:text-emerald-400:where(.dark,.dark *){color:var(--color-emerald-400)}.dark\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\:text-green-100:where(.dark,.dark *){color:var(--color-green-100)}.dark\:text-red-100:where(.dark,.dark *){color:var(--color-red-100)}.dark\:text-yellow-100:where(.dark,.dark *){color:var(--color-yellow-100)}.dark\:text-zinc-400:where(.dark,.dark *){color:var(--color-zinc-400)}.dark\:invert:where(.dark,.dark *){--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.dark\:after\:mix-blend-lighten:where(.dark,.dark *):after{content:var(--tw-content);mix-blend-mode:lighten}@media (hover:hover){.dark\:hover\:bg-destructive\/30:where(.dark,.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-destructive\/30:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.dark\:hover\:bg-input\/50:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.dark\:hover\:bg-muted\/50:where(.dark,.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-muted\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}}.dark\:focus-visible\:ring-destructive\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:has-aria-invalid\:border-destructive\/50:where(.dark,.dark *):has([aria-invalid=true]){border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:has-aria-invalid\:border-destructive\/50:where(.dark,.dark *):has([aria-invalid=true]){border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.dark\:has-aria-invalid\:ring-destructive\/40:where(.dark,.dark *):has([aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:has-aria-invalid\:ring-destructive\/40:where(.dark,.dark *):has([aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:has-data-checked\:bg-primary\/10:where(.dark,.dark *):has([data-checked]){background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:has-data-checked\:bg-primary\/10:where(.dark,.dark *):has([data-checked]){background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.dark\:has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/40:where(.dark,.dark *):has([data-slot][aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/40:where(.dark,.dark *):has([data-slot][aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:border-destructive\/50:where(.dark,.dark *)[aria-invalid=true]{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:border-destructive\/50:where(.dark,.dark *)[aria-invalid=true]{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-2\.5 svg:not([class*=size-]){width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5 svg:not([class*=size-]){width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\.border-b\]\:pb-2.border-b{padding-bottom:calc(var(--spacing) * 2)}.\[\.border-b\]\:pb-4.border-b{padding-bottom:calc(var(--spacing) * 4)}.group-data-\[size\=sm\]\/card\:\[\.border-b\]\:pb-3:is(:where(.group\/card)[data-size=sm] *).border-b{padding-bottom:calc(var(--spacing) * 3)}.\[\.border-t\]\:pt-2.border-t{padding-top:calc(var(--spacing) * 2)}.\[\.border-t\]\:pt-4.border-t{padding-top:calc(var(--spacing) * 4)}.group-data-\[size\=sm\]\/card\:\[\.border-t\]\:pt-3:is(:where(.group\/card)[data-size=sm] *).border-t{padding-top:calc(var(--spacing) * 3)}:is(.\*\:\[a\]\:underline>*):is(a){text-decoration-line:underline}:is(.\*\:\[a\]\:underline-offset-3>*):is(a){text-underline-offset:3px}@media (hover:hover){.\[a\]\:hover\:bg-destructive\/20:is(a):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-destructive\/20:is(a):hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[a\]\:hover\:bg-muted:is(a):hover{background-color:var(--muted)}.\[a\]\:hover\:bg-primary\/80:is(a):hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-primary\/80:is(a):hover{background-color:color-mix(in oklab, var(--primary) 80%, transparent)}}.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.\[a\]\:hover\:text-muted-foreground:is(a):hover{color:var(--muted-foreground)}:is(.\*\:\[a\]\:hover\:text-foreground>*):is(a):hover{color:var(--foreground)}}:is(.\*\:\[img\:first-child\]\:rounded-t-lg>*):is(img:first-child){border-top-left-radius:calc(var(--radius) + 2px);border-top-right-radius:calc(var(--radius) + 2px)}:is(.\*\:\[img\:last-child\]\:rounded-b-lg>*):is(img:last-child){border-bottom-right-radius:calc(var(--radius) + 2px);border-bottom-left-radius:calc(var(--radius) + 2px)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)}:is(.\*\:\[svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4>*):is(svg:not([class*=size-])){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>\*\]\:w-full>*{width:100%}@container field-group (width>=28rem){.\@md\/field-group\:\[\&\>\*\]\:w-auto>*{width:auto}}.\[\&\>\.sr-only\]\:w-auto>.sr-only{width:auto}.\[\&\>\[data-slot\=field-label\]\]\:flex-auto>[data-slot=field-label]{flex:auto}@container field-group (width>=28rem){.\@md\/field-group\:\[\&\>\[data-slot\=field-label\]\]\:flex-auto>[data-slot=field-label]{flex:auto}}.has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content])>[role=checkbox],.has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content]) [role=radio]{margin-top:1px}@container field-group (width>=28rem){.\@md\/field-group\:has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content])>[role=checkbox],.\@md\/field-group\:has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content]) [role=radio]{margin-top:1px}}.\[\&\>a\]\:underline>a{text-decoration-line:underline}.\[\&\>a\]\:underline-offset-4>a{text-underline-offset:4px}.\[\&\>a\:hover\]\:text-primary>a:hover{color:var(--primary)}.\[\&\>button\]\:hidden>button{display:none}.has-\[\>\[data-align\=block-end\]\]\:\[\&\>input\]\:pt-3:has(>[data-align=block-end])>input{padding-top:calc(var(--spacing) * 3)}.has-\[\>\[data-align\=block-start\]\]\:\[\&\>input\]\:pb-3:has(>[data-align=block-start])>input{padding-bottom:calc(var(--spacing) * 3)}.has-\[\>\[data-align\=inline-end\]\]\:\[\&\>input\]\:pr-1\.5:has(>[data-align=inline-end])>input{padding-right:calc(var(--spacing) * 1.5)}.has-\[\>\[data-align\=inline-start\]\]\:\[\&\>input\]\:pl-1\.5:has(>[data-align=inline-start])>input{padding-left:calc(var(--spacing) * 1.5)}.\[\&\>span\:last-child\]\:truncate>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-2\.5\!>svg{width:calc(var(--spacing) * 2.5)!important;height:calc(var(--spacing) * 2.5)!important}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:var(--sidebar-accent-foreground)}.group-has-data-\[size\=lg\]\/avatar-group\:\[\&\>svg\]\:size-5:is(:where(.group\/avatar-group):has([data-size=lg]) *)>svg{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.group-has-data-\[size\=sm\]\/avatar-group\:\[\&\>svg\]\:size-3:is(:where(.group\/avatar-group):has([data-size=sm]) *)>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.group-data-\[size\=default\]\/avatar\:\[\&\>svg\]\:size-2:is(:where(.group\/avatar)[data-size=default] *)>svg,.group-data-\[size\=lg\]\/avatar\:\[\&\>svg\]\:size-2:is(:where(.group\/avatar)[data-size=lg] *)>svg{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.group-data-\[size\=sm\]\/avatar\:\[\&\>svg\]\:hidden:is(:where(.group\/avatar)[data-size=sm] *)>svg{display:none}.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3>svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5>svg:not([class*=size-]){width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}[data-side=left][data-collapsible=offExamples] .\[\[data-side\=left\]\[data-collapsible\=offExamples\]_\&\]\:-right-2{right:calc(var(--spacing) * -2)}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=right][data-collapsible=offExamples] .\[\[data-side\=right\]\[data-collapsible\=offExamples\]_\&\]\:-left-2{left:calc(var(--spacing) * -2)}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-variant=legend]+.\[\[data-variant\=legend\]\+\&\]\:-mt-1\.5{margin-top:calc(var(--spacing) * -1.5)}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--font-sans:"Geist Variable", sans-serif;--font-mono:"JetBrains Mono Variable", monospace;--background:#f4f1ec;--foreground:#1d2930;--card:#f9f8f6;--card-foreground:#1d2930;--popover:#fbfaf9;--popover-foreground:#1d2930;--primary:#305030;--primary-foreground:#f5f3ef;--secondary:#eae5d7;--secondary-foreground:#263740;--muted:#e9e7e2;--muted-foreground:#576b75;--accent:#e7e2da;--accent-foreground:#1d2930;--destructive:#c32222;--destructive-foreground:#fff;--border:#b6c9b6;--input:#dedbd3;--ring:#3e743e;--chart-1:#2e6b2e;--chart-2:#cfa117;--chart-3:#297aa3;--chart-4:#cc8c33;--chart-5:#b82e2e;--radius:.25rem;--sidebar:#f5f3f0;--sidebar-background:#f5f3f0;--sidebar-foreground:#263740;--sidebar-primary:#305030;--sidebar-primary-foreground:#f5f3ef;--sidebar-accent:#e7e2da;--sidebar-accent-foreground:#1d2930;--sidebar-border:#c4d4c4;--sidebar-ring:#3e743e;--tactical-amber:#c2940a;--tactical-amber-dim:#d6b85c;--tactical-green:#267326;--tactical-green-dim:#7ab87a;--tactical-cyan:#24868f;--tactical-cyan-dim:#5eb2ba;--tactical-red:#bd2828;--tactical-olive:#64783a;--scanline-opacity:.015}.dark{--background:#0d1012;--foreground:#e0ddd1;--card:#14181a;--card-foreground:#e0ddd1;--popover:#111517;--popover-foreground:#e0ddd1;--primary:#fa0;--primary-foreground:#0d1012;--secondary:#323922;--secondary-foreground:#c6d2ac;--muted:#202527;--muted-foreground:#819098;--accent:#292f32;--accent-foreground:#ebe8e0;--destructive:#c32222;--destructive-foreground:#fff;--border:#203c32;--input:#292f32;--ring:#ffbf00;--chart-1:#ffbf00;--chart-2:#22c38e;--chart-3:#1aa1e6;--chart-4:#86ac39;--chart-5:#d92626;--sidebar:#111517;--sidebar-background:#111517;--sidebar-foreground:#e0ddd1;--sidebar-primary:#ffbf00;--sidebar-primary-foreground:#0d1012;--sidebar-accent:#292f32;--sidebar-accent-foreground:#ebe8e0;--sidebar-border:#203c32;--sidebar-ring:#ffbf00;--tactical-amber:#ffbf00;--tactical-amber-dim:#a17d12;--tactical-green:#22c38e;--tactical-green-dim:#20604a;--tactical-cyan:#17bfcf;--tactical-cyan-dim:#196066;--tactical-red:#d92626;--tactical-olive:#576b2e;--scanline-opacity:.03}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100:#ffe2e2;--color-red-800:#9f0712;--color-red-900:#82181a;--color-amber-400:#fcbb00;--color-amber-500:#f99c00;--color-amber-700:#b75000;--color-yellow-100:#fef9c2;--color-yellow-800:#874b00;--color-yellow-900:#733e0a;--color-green-100:#dcfce7;--color-green-600:#00a544;--color-green-800:#016630;--color-green-900:#0d542b;--color-emerald-400:#00d294;--color-emerald-500:#00bb7f;--color-emerald-700:#007956;--color-blue-500:#3080ff;--color-gray-100:#f3f4f6;--color-gray-800:#1e2939;--color-zinc-100:#f4f4f5;--color-zinc-400:#9f9fa9;--color-zinc-500:#71717b;--color-zinc-800:#27272a;--color-black:#000;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wider:.05em;--tracking-widest:.1em;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:calc(var(--radius) - 2px);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-foreground:var(--foreground)}@supports (color:lab(0% 0 0)){:root,:host{--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-800:lab(33.7174% 55.8993 41.0293);--color-red-900:lab(28.5139% 44.5539 29.0463);--color-amber-400:lab(80.1641% 16.6016 99.2089);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-amber-700:lab(47.2709% 42.9082 69.2966);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-800:lab(38.7484% 23.5833 51.4916);--color-yellow-900:lab(32.3865% 21.1273 38.5959);--color-green-100:lab(96.1861% -13.8464 6.52365);--color-green-600:lab(59.0978% -58.6621 41.2579);--color-green-800:lab(37.4616% -36.7971 22.9692);--color-green-900:lab(30.797% -29.6927 17.382);--color-emerald-400:lab(75.0771% -60.7313 19.4147);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-700:lab(44.4871% -41.0396 11.0361);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-gray-100:lab(96.1596% -.0823438 -1.13575);--color-gray-800:lab(16.1051% -1.18239 -11.7533);--color-zinc-100:lab(96.1634% .0993311 -.364041);--color-zinc-400:lab(65.6464% 1.53497 -5.42429);--color-zinc-500:lab(47.8878% 1.65477 -5.77283);--color-zinc-800:lab(15.7305% .613764 -2.16959)}}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}*{scrollbar-width:thin}html,body{overscroll-behavior:none}body{background-color:var(--background);width:100%;min-height:100svh;color:var(--foreground);font-family:var(--font-sans), sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.font-mono{font-family:var(--font-mono), monospace}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.\@container\/field-group{container:field-group/inline-size}.\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-4{top:calc(var(--spacing) * 4)}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.bottom-0{bottom:0}.left-0{left:0}.left-1\/2{left:50%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.order-first{order:-9999}.order-last{order:9999}.col-span-2{grid-column:span 2/span 2}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-0{margin-inline:0}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3\.5{margin-inline:calc(var(--spacing) * 3.5)}.mx-auto{margin-inline:auto}.-my-2{margin-block:calc(var(--spacing) * -2)}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-auto{margin-right:auto}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.ml-1{margin-left:var(--spacing)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-\[1\.2rem\]{width:1.2rem;height:1.2rem}.size-full{width:100%;height:100%}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-\[calc\(--spacing\(4\.75\)\)\]{height:calc(calc(var(--spacing) * 4.75))}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-\(--available-height\){max-height:var(--available-height)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[85vh\]{max-height:85vh}.max-h-\[min\(calc\(--spacing\(72\)---spacing\(9\)\)\,calc\(var\(--available-height\)---spacing\(9\)\)\)\]{max-height:min(calc(calc(var(--spacing) * 72) - calc(var(--spacing) * 9)), calc(var(--available-height) - calc(var(--spacing) * 9)))}.min-h-0{min-height:0}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-svh{min-height:100svh}.w-\(--anchor-width\){width:var(--anchor-width)}.w-\(--sidebar-width\){width:var(--sidebar-width)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-48{width:calc(var(--spacing) * 48)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\(--available-width\){max-width:var(--available-width)}.max-w-\(--skeleton-width\){max-width:var(--skeleton-width)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-16{min-width:calc(var(--spacing) * 16)}.min-w-32{min-width:calc(var(--spacing) * 32)}.min-w-\[calc\(var\(--anchor-width\)\+--spacing\(7\)\)\]{min-width:calc(var(--anchor-width) + calc(var(--spacing) * 7))}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.origin-\(--transform-origin\){transform-origin:var(--transform-origin)}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-px{--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%-2px\)\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-none{translate:none}.scale-0{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)}.rotate-0{rotate:0deg}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.scroll-my-1{scroll-margin-block:var(--spacing)}.scroll-py-1{scroll-padding-block:var(--spacing)}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr)}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-px{gap:1px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block:0}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.-space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[calc\(var\(--radius-sm\)\+2px\)\]{border-radius:calc(var(--radius-sm) + 2px)}.rounded-\[calc\(var\(--radius-sm\)-2px\)\]{border-radius:calc(var(--radius-sm) - 2px)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:calc(var(--radius) + 2px)}.rounded-md{border-radius:var(--radius)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:calc(var(--radius) + 2px);border-top-right-radius:calc(var(--radius) + 2px)}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:calc(var(--radius) + 2px);border-bottom-left-radius:calc(var(--radius) + 2px)}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-bs{border-block-start-style:var(--tw-border-style);border-block-start-width:1px}.border-be{border-block-end-style:var(--tw-border-style);border-block-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab, red, red)){.border-blue-500\/30{border-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.border-border{border-color:var(--border)}.border-destructive{border-color:var(--destructive)}.border-emerald-500{border-color:var(--color-emerald-500)}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-foreground\/10{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.border-foreground\/10{border-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.border-foreground\/20{border-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.border-foreground\/20{border-color:color-mix(in oklab, var(--foreground) 20%, transparent)}}.border-input{border-color:var(--input)}.border-muted{border-color:var(--muted)}.border-primary{border-color:var(--primary)}.border-sidebar-border{border-color:var(--sidebar-border)}.border-tactical-amber\/40{border-color:var(--tactical-amber)}@supports (color:color-mix(in lab, red, red)){.border-tactical-amber\/40{border-color:color-mix(in oklab, var(--tactical-amber) 40%, transparent)}}.border-transparent{border-color:#0000}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-background{background-color:var(--background)}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.bg-black\/80{background-color:color-mix(in oklab, var(--color-black) 80%, transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-border,.bg-border\/50{background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.bg-border\/50{background-color:color-mix(in oklab, var(--border) 50%, transparent)}}.bg-card{background-color:var(--card)}.bg-destructive,.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-foreground{background-color:var(--foreground)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-green-100{background-color:var(--color-green-100)}.bg-input\/20{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.bg-input\/20{background-color:color-mix(in oklab, var(--input) 20%, transparent)}}.bg-muted{background-color:var(--muted)}.bg-muted-foreground\/10{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/10{background-color:color-mix(in oklab, var(--muted-foreground) 10%, transparent)}}.bg-muted\/20{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/20{background-color:color-mix(in oklab, var(--muted) 20%, transparent)}}.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/30{background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-red-100{background-color:var(--color-red-100)}.bg-secondary{background-color:var(--secondary)}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-border{background-color:var(--sidebar-border)}.bg-tactical-amber\/5{background-color:var(--tactical-amber)}@supports (color:color-mix(in lab, red, red)){.bg-tactical-amber\/5{background-color:color-mix(in oklab, var(--tactical-amber) 5%, transparent)}}.bg-transparent{background-color:#0000}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-zinc-100{background-color:var(--color-zinc-100)}.bg-clip-padding{background-clip:padding-box}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.fill-foreground{fill:var(--foreground)}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.pt-0{padding-top:0}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-0{padding-bottom:0}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-sm\/relaxed{font-size:var(--text-sm);line-height:var(--leading-relaxed)}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-xs\/relaxed{font-size:var(--text-xs);line-height:var(--leading-relaxed)}.text-\[0\.625rem\]{font-size:.625rem}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.text-wrap{text-wrap:wrap}.break-all{word-break:break-all}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-500{color:var(--color-amber-500)}.text-amber-700{color:var(--color-amber-700)}.text-background{color:var(--background)}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-emerald-700{color:var(--color-emerald-700)}.text-foreground{color:var(--foreground)}.text-gray-800{color:var(--color-gray-800)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-800{color:var(--color-red-800)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/70{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab, red, red)){.text-sidebar-foreground\/70{color:color-mix(in oklab, var(--sidebar-foreground) 70%, transparent)}}.text-tactical-amber{color:var(--tactical-amber)}.text-tactical-cyan{color:var(--tactical-cyan)}.text-tactical-green{color:var(--tactical-green)}.text-yellow-800{color:var(--color-yellow-800)}.text-zinc-500{color:var(--color-zinc-500)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-50{opacity:.5}.bg-blend-color{background-blend-mode:color}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-border)));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-background{--tw-ring-color:var(--background)}.ring-foreground\/10{--tw-ring-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.ring-foreground\/10{--tw-ring-color:color-mix(in oklab, var(--foreground) 10%, transparent)}}.ring-sidebar-ring{--tw-ring-color:var(--sidebar-ring)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[margin\,opacity\]{transition-property:margin,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}.group-focus-within\/menu-item\:opacity-100:is(:where(.group\/menu-item):focus-within *){opacity:1}@media (hover:hover){.group-hover\/menu-item\:opacity-100:is(:where(.group\/menu-item):hover *){opacity:1}}.group-focus\/dropdown-menu-item\:text-accent-foreground:is(:where(.group\/dropdown-menu-item):focus *){color:var(--accent-foreground)}.group-has-data-\[orientation\=horizontal\]\/field\:text-balance:is(:where(.group\/field):has([data-orientation=horizontal]) *){text-wrap:balance}.group-has-data-\[sidebar\=menu-action\]\/menu-item\:pr-8:is(:where(.group\/menu-item):has([data-sidebar=menu-action]) *){padding-right:calc(var(--spacing) * 8)}.group-has-data-\[size\=lg\]\/avatar-group\:size-10:is(:where(.group\/avatar-group):has([data-size=lg]) *){width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.group-has-data-\[size\=sm\]\/avatar-group\:size-6:is(:where(.group\/avatar-group):has([data-size=sm]) *){width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.group-has-data-\[slot\=combobox-clear\]\/input-group\:hidden:is(:where(.group\/input-group):has([data-slot=combobox-clear]) *){display:none}.group-has-\[\>input\]\/input-group\:pt-2:is(:where(.group\/input-group):has(>input) *){padding-top:calc(var(--spacing) * 2)}.group-has-\[\>input\]\/input-group\:pb-2:is(:where(.group\/input-group):has(>input) *){padding-bottom:calc(var(--spacing) * 2)}.group-data-empty\/combobox-content\:flex:is(:where(.group\/combobox-content)[data-empty] *){display:flex}.group-data-\[collapsible\=icon\]\:-mt-8:is(:where(.group)[data-collapsible=icon] *){margin-top:calc(var(--spacing) * -8)}.group-data-\[collapsible\=icon\]\:hidden:is(:where(.group)[data-collapsible=icon] *){display:none}.group-data-\[collapsible\=icon\]\:size-8\!:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--spacing) * 8)!important;height:calc(var(--spacing) * 8)!important}.group-data-\[collapsible\=icon\]\:w-\(--sidebar-width-icon\):is(:where(.group)[data-collapsible=icon] *){width:var(--sidebar-width-icon)}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)))}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\+2px\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)) + 2px)}.group-data-\[collapsible\=icon\]\:overflow-hidden:is(:where(.group)[data-collapsible=icon] *){overflow:hidden}.group-data-\[collapsible\=icon\]\:p-0\!:is(:where(.group)[data-collapsible=icon] *){padding:0!important}.group-data-\[collapsible\=icon\]\:p-2\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 2)!important}.group-data-\[collapsible\=icon\]\:opacity-0:is(:where(.group)[data-collapsible=icon] *){opacity:0}.group-data-\[collapsible\=offExamples\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offExamples] *){right:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offExamples\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offExamples] *){left:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offExamples\]\:w-0:is(:where(.group)[data-collapsible=offExamples] *){width:0}.group-data-\[collapsible\=offExamples\]\:translate-x-0:is(:where(.group)[data-collapsible=offExamples] *){--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *),.group-data-\[disabled\=true\]\/field\:opacity-50:is(:where(.group\/field)[data-disabled=true] *),.group-data-\[disabled\=true\]\/input-group\:opacity-50:is(:where(.group\/input-group)[data-disabled=true] *){opacity:.5}.group-data-\[panel-open\]\:rotate-180:is(:where(.group)[data-panel-open] *){rotate:180deg}.group-data-\[side\=left\]\:-right-4:is(:where(.group)[data-side=left] *){right:calc(var(--spacing) * -4)}.group-data-\[side\=left\]\:border-r:is(:where(.group)[data-side=left] *){border-right-style:var(--tw-border-style);border-right-width:1px}.group-data-\[side\=right\]\:left-0:is(:where(.group)[data-side=right] *){left:0}.group-data-\[side\=right\]\:rotate-180:is(:where(.group)[data-side=right] *){rotate:180deg}.group-data-\[side\=right\]\:border-l:is(:where(.group)[data-side=right] *){border-left-style:var(--tw-border-style);border-left-width:1px}.group-data-\[size\=default\]\/avatar\:size-2\.5:is(:where(.group\/avatar)[data-size=default] *){width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.group-data-\[size\=lg\]\/avatar\:size-3:is(:where(.group\/avatar)[data-size=lg] *){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.group-data-\[size\=sm\]\/alert-dialog-content\:grid:is(:where(.group\/alert-dialog-content)[data-size=sm] *){display:grid}.group-data-\[size\=sm\]\/alert-dialog-content\:grid-cols-2:is(:where(.group\/alert-dialog-content)[data-size=sm] *){grid-template-columns:repeat(2,minmax(0,1fr))}.group-data-\[size\=sm\]\/avatar\:size-2:is(:where(.group\/avatar)[data-size=sm] *){width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.group-data-\[size\=sm\]\/avatar\:text-xs:is(:where(.group\/avatar)[data-size=sm] *){font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.group-data-\[size\=sm\]\/card\:px-3:is(:where(.group\/card)[data-size=sm] *){padding-inline:calc(var(--spacing) * 3)}.group-data-\[variant\=floating\]\:rounded-lg:is(:where(.group)[data-variant=floating] *){border-radius:calc(var(--radius) + 2px)}.group-data-\[variant\=floating\]\:shadow-sm:is(:where(.group)[data-variant=floating] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=floating\]\:ring-1:is(:where(.group)[data-variant=floating] *){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=floating\]\:ring-sidebar-border:is(:where(.group)[data-variant=floating] *){--tw-ring-color:var(--sidebar-border)}.group-data-\[variant\=outline\]\/field-group\:-mb-2:is(:where(.group\/field-group)[data-variant=outline] *){margin-bottom:calc(var(--spacing) * -2)}@media (hover:hover){.peer-hover\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button):hover~*){color:var(--sidebar-accent-foreground)}}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.peer-data-active\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button)[data-active]~*){color:var(--sidebar-accent-foreground)}.peer-data-\[size\=default\]\/menu-button\:top-1\.5:is(:where(.peer\/menu-button)[data-size=default]~*){top:calc(var(--spacing) * 1.5)}.peer-data-\[size\=lg\]\/menu-button\:top-2\.5:is(:where(.peer\/menu-button)[data-size=lg]~*){top:calc(var(--spacing) * 2.5)}.peer-data-\[size\=sm\]\/menu-button\:top-1:is(:where(.peer\/menu-button)[data-size=sm]~*){top:var(--spacing)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-6::file-selector-button{height:calc(var(--spacing) * 6)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-xs\/relaxed::file-selector-button{font-size:var(--text-xs);line-height:var(--leading-relaxed)}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);inset:calc(var(--spacing) * -2)}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-y-0:after{content:var(--tw-content);inset-block:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:rounded-full:after{content:var(--tw-content);border-radius:3.40282e38px}.after\:border:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-border:after{content:var(--tw-content);border-color:var(--border)}.after\:mix-blend-darken:after{content:var(--tw-content);mix-blend-mode:darken}.group-data-\[collapsible\=offExamples\]\:after\:left-full:is(:where(.group)[data-collapsible=offExamples] *):after{content:var(--tw-content);left:100%}.last\:mt-0:last-child{margin-top:0}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.autofill\:\[-webkit-text-fill-color\:var\(--color-foreground\)\]:autofill{-webkit-text-fill-color:var(--color-foreground)}.autofill\:\[transition\:background-color_9999s_ease-in-out_0s\]:autofill{transition:background-color 9999s ease-in-out}.focus-within\:border-ring:focus-within{border-color:var(--ring)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\:ring-ring\/30:focus-within{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-within\:ring-ring\/30:focus-within{--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}@media (hover:hover){.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-destructive\/20:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/20:hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.hover\:bg-input\/40:hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-input\/40:hover{background-color:color-mix(in oklab, var(--input) 40%, transparent)}}.hover\:bg-input\/50:hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-input\/50:hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.hover\:bg-muted:hover{background-color:var(--muted)}.hover\:bg-primary\/80:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab, var(--primary) 80%, transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-accent)));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:group-data-\[collapsible\=offExamples\]\:bg-sidebar:hover:is(:where(.group)[data-collapsible=offExamples] *){background-color:var(--sidebar)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:var(--sidebar-border)}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus,:is(.focus\:\*\*\:text-accent-foreground:focus *),:is(.not-data-\[variant\=destructive\]\:focus\:\*\*\:text-accent-foreground:not([data-variant=destructive]):focus *){color:var(--accent-foreground)}.focus-visible\:border-destructive\/40:focus-visible{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:border-destructive\/40:focus-visible{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-2:focus-visible,.focus-visible\:ring-\[2px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:bg-sidebar-accent:active{background-color:var(--sidebar-accent)}.active\:text-sidebar-accent-foreground:active{color:var(--sidebar-accent-foreground)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}:where([data-side=left]) .in-data-\[side\=left\]\:cursor-w-resize{cursor:w-resize}:where([data-side=right]) .in-data-\[side\=right\]\:cursor-e-resize{cursor:e-resize}:where([data-slot=combobox-content]) .in-data-\[slot\=combobox-content\]\:focus-within\:border-inherit:focus-within{border-color:inherit}:where([data-slot=combobox-content]) .in-data-\[slot\=combobox-content\]\:focus-within\:ring-0:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-disabled\:pointer-events-none:has(:disabled){pointer-events:none}.has-disabled\:cursor-not-allowed:has(:disabled){cursor:not-allowed}.has-disabled\:opacity-50:has(:disabled){opacity:.5}.has-aria-invalid\:border-destructive:has([aria-invalid=true]){border-color:var(--destructive)}.has-aria-invalid\:ring-2:has([aria-invalid=true]){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-aria-invalid\:ring-destructive\/20:has([aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.has-aria-invalid\:ring-destructive\/20:has([aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.has-data-checked\:bg-primary\/5:has([data-checked]){background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.has-data-checked\:bg-primary\/5:has([data-checked]){background-color:color-mix(in oklab, var(--primary) 5%, transparent)}}.has-data-\[align\=block-end\]\:rounded-md:has([data-align=block-end]),.has-data-\[align\=block-start\]\:rounded-md:has([data-align=block-start]){border-radius:var(--radius)}.has-data-\[icon\=inline-end\]\:pr-1\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-end\]\:pr-2:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-start\]\:pl-1\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-start\]\:pl-2:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 2)}.has-data-\[slot\=alert-dialog-media\]\:grid-rows-\[auto_auto_1fr\]:has([data-slot=alert-dialog-media]){grid-template-rows:auto auto 1fr}.has-data-\[slot\=alert-dialog-media\]\:gap-x-4:has([data-slot=alert-dialog-media]){column-gap:calc(var(--spacing) * 4)}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-data-\[slot\=card-description\]\:grid-rows-\[auto_auto\]:has([data-slot=card-description]){grid-template-rows:auto auto}.has-data-\[slot\=combobox-chip\]\:px-1:has([data-slot=combobox-chip]){padding-inline:var(--spacing)}.has-data-\[slot\=combobox-chip-remove\]\:pr-0:has([data-slot=combobox-chip-remove]){padding-right:0}.has-data-\[variant\=inset\]\:bg-sidebar:has([data-variant=inset]){background-color:var(--sidebar)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:border-ring:has([data-slot=input-group-control]:focus-visible){border-color:var(--ring)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-2:has([data-slot=input-group-control]:focus-visible){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-ring\/30:has([data-slot=input-group-control]:focus-visible){--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.has-\[\[data-slot\=input-group-control\]\:focus-visible\]\:ring-ring\/30:has([data-slot=input-group-control]:focus-visible){--tw-ring-color:color-mix(in oklab, var(--ring) 30%, transparent)}}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:border-destructive:has([data-slot][aria-invalid=true]){border-color:var(--destructive)}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-2:has([data-slot][aria-invalid=true]){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/20:has([data-slot][aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/20:has([data-slot][aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.has-\[textarea\]\:rounded-md:has(:is(textarea)){border-radius:var(--radius)}.has-\[\>\[data-align\=block-end\]\]\:h-auto:has(>[data-align=block-end]){height:auto}.has-\[\>\[data-align\=block-end\]\]\:flex-col:has(>[data-align=block-end]){flex-direction:column}.has-\[\>\[data-align\=block-start\]\]\:h-auto:has(>[data-align=block-start]){height:auto}.has-\[\>\[data-align\=block-start\]\]\:flex-col:has(>[data-align=block-start]){flex-direction:column}.has-\[\>\[data-slot\=checkbox-group\]\]\:gap-3:has(>[data-slot=checkbox-group]){gap:calc(var(--spacing) * 3)}.has-\[\>\[data-slot\=field-content\]\]\:items-start:has(>[data-slot=field-content]){align-items:flex-start}.has-\[\>\[data-slot\=field\]\]\:w-full:has(>[data-slot=field]){width:100%}.has-\[\>\[data-slot\=field\]\]\:flex-col:has(>[data-slot=field]){flex-direction:column}.has-\[\>\[data-slot\=field\]\]\:rounded-md:has(>[data-slot=field]){border-radius:var(--radius)}.has-\[\>\[data-slot\=field\]\]\:border:has(>[data-slot=field]){border-style:var(--tw-border-style);border-width:1px}.has-\[\>\[data-slot\=radio-group\]\]\:gap-3:has(>[data-slot=radio-group]){gap:calc(var(--spacing) * 3)}.has-\[\>button\]\:mr-\[-0\.275rem\]:has(>button){margin-right:-.275rem}.has-\[\>button\]\:ml-\[-0\.275rem\]:has(>button){margin-left:-.275rem}.has-\[\>img\:first-child\]\:pt-0:has(>img:first-child){padding-top:0}.has-\[\>kbd\]\:mr-\[-0\.275rem\]:has(>kbd){margin-right:-.275rem}.has-\[\>kbd\]\:ml-\[-0\.275rem\]:has(>kbd){margin-left:-.275rem}.has-\[\>svg\]\:p-0:has(>svg){padding:0}.has-\[\>textarea\]\:h-auto:has(>textarea){height:auto}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-expanded\:bg-muted[aria-expanded=true]{background-color:var(--muted)}.aria-expanded\:bg-secondary[aria-expanded=true]{background-color:var(--secondary)}.aria-expanded\:text-foreground[aria-expanded=true]{color:var(--foreground)}.aria-expanded\:text-secondary-foreground[aria-expanded=true]{color:var(--secondary-foreground)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-2[aria-invalid=true],.aria-invalid\:ring-\[2px\][aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-active\:bg-sidebar-accent[data-active]{background-color:var(--sidebar-accent)}.data-active\:font-medium[data-active]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-active\:text-sidebar-accent-foreground[data-active]{color:var(--sidebar-accent-foreground)}.data-closed\:overflow-hidden[data-closed]{overflow:hidden}.data-disabled\:pointer-events-none[data-disabled]{pointer-events:none}.data-disabled\:opacity-50[data-disabled]{opacity:.5}.data-empty\:p-0[data-empty]{padding:0}.data-ending-style\:opacity-0[data-ending-style]{opacity:0}.data-highlighted\:bg-accent[data-highlighted]{background-color:var(--accent)}.data-highlighted\:text-accent-foreground[data-highlighted],:is(.not-data-\[variant\=destructive\]\:data-highlighted\:\*\*\:text-accent-foreground:not([data-variant=destructive])[data-highlighted] *){color:var(--accent-foreground)}.data-inset\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-open\:bg-accent[data-open]{background-color:var(--accent)}.data-open\:text-accent-foreground[data-open]{color:var(--accent-foreground)}.data-open\:opacity-100[data-open]{opacity:1}@media (hover:hover){.data-open\:hover\:bg-sidebar-accent[data-open]:hover{background-color:var(--sidebar-accent)}.data-open\:hover\:text-sidebar-accent-foreground[data-open]:hover{color:var(--sidebar-accent-foreground)}}.data-placeholder\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-pressed\:bg-transparent[data-pressed]{background-color:#0000}.data-selected\:border-primary[data-selected]{border-color:var(--primary)}.data-selected\:text-foreground[data-selected]{color:var(--foreground)}.data-starting-style\:opacity-0[data-starting-style]{opacity:0}.data-\[chips\=true\]\:min-w-\(--anchor-width\)[data-chips=true]{min-width:var(--anchor-width)}.data-\[invalid\=true\]\:text-destructive[data-invalid=true]{color:var(--destructive)}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[orientation\=vertical\]\:self-stretch[data-orientation=vertical]{align-self:stretch}.data-\[side\=bottom\]\:inset-x-0[data-side=bottom]{inset-inline:0}.data-\[side\=bottom\]\:top-1[data-side=bottom]{top:var(--spacing)}.data-\[side\=bottom\]\:bottom-0[data-side=bottom]{bottom:0}.data-\[side\=bottom\]\:h-auto[data-side=bottom]{height:auto}.data-\[side\=bottom\]\:border-t[data-side=bottom]{border-top-style:var(--tw-border-style);border-top-width:1px}.data-\[side\=left\]\:inset-y-0[data-side=left]{inset-block:0}.data-\[side\=left\]\:top-1\/2\![data-side=left]{top:50%!important}.data-\[side\=left\]\:-right-1[data-side=left]{right:calc(var(--spacing) * -1)}.data-\[side\=left\]\:left-0[data-side=left]{left:0}.data-\[side\=left\]\:h-full[data-side=left]{height:100%}.data-\[side\=left\]\:w-3\/4[data-side=left]{width:75%}.data-\[side\=left\]\:-translate-y-1\/2[data-side=left]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:border-r[data-side=left]{border-right-style:var(--tw-border-style);border-right-width:1px}.data-\[side\=right\]\:inset-y-0[data-side=right]{inset-block:0}.data-\[side\=right\]\:top-1\/2\![data-side=right]{top:50%!important}.data-\[side\=right\]\:right-0[data-side=right]{right:0}.data-\[side\=right\]\:-left-1[data-side=right]{left:calc(var(--spacing) * -1)}.data-\[side\=right\]\:h-full[data-side=right]{height:100%}.data-\[side\=right\]\:w-3\/4[data-side=right]{width:75%}.data-\[side\=right\]\:-translate-y-1\/2[data-side=right]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:border-l[data-side=right]{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[side\=top\]\:inset-x-0[data-side=top]{inset-inline:0}.data-\[side\=top\]\:top-0[data-side=top]{top:0}.data-\[side\=top\]\:-bottom-2\.5[data-side=top]{bottom:calc(var(--spacing) * -2.5)}.data-\[side\=top\]\:h-auto[data-side=top]{height:auto}.data-\[side\=top\]\:border-b[data-side=top]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.data-\[size\=default\]\:h-7[data-size=default]{height:calc(var(--spacing) * 7)}.data-\[size\=default\]\:max-w-xs[data-size=default]{max-width:var(--container-xs)}.data-\[size\=lg\]\:size-10[data-size=lg]{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.data-\[size\=md\]\:text-xs[data-size=md]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.data-\[size\=sm\]\:size-6[data-size=sm]{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.data-\[size\=sm\]\:h-6[data-size=sm]{height:calc(var(--spacing) * 6)}.data-\[size\=sm\]\:max-w-64[data-size=sm]{max-width:calc(var(--spacing) * 64)}.data-\[size\=sm\]\:gap-3[data-size=sm]{gap:calc(var(--spacing) * 3)}.data-\[size\=sm\]\:py-3[data-size=sm]{padding-block:calc(var(--spacing) * 3)}.data-\[size\=sm\]\:text-xs[data-size=sm]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}:is(.\*\:data-\[slot\=avatar\]\:ring-2>*)[data-slot=avatar]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}:is(.\*\:data-\[slot\=avatar\]\:ring-background>*)[data-slot=avatar]{--tw-ring-color:var(--background)}.data-\[slot\=checkbox-group\]\:gap-3[data-slot=checkbox-group]{gap:calc(var(--spacing) * 3)}:is(.\*\:data-\[slot\=field\]\:p-2>*)[data-slot=field]{padding:calc(var(--spacing) * 2)}:is(.\*\:data-\[slot\=field-group\]\:gap-4>*)[data-slot=field-group]{gap:calc(var(--spacing) * 4)}:is(.\*\:data-\[slot\=input-group\]\:m-1>*)[data-slot=input-group]{margin:var(--spacing)}:is(.\*\:data-\[slot\=input-group\]\:mb-0>*)[data-slot=input-group]{margin-bottom:0}:is(.\*\:data-\[slot\=input-group\]\:h-7>*)[data-slot=input-group]{height:calc(var(--spacing) * 7)}:is(.\*\:data-\[slot\=input-group\]\:border-none>*)[data-slot=input-group]{--tw-border-style:none;border-style:none}:is(.\*\:data-\[slot\=input-group\]\:bg-input\/20>*)[data-slot=input-group]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){:is(.\*\:data-\[slot\=input-group\]\:bg-input\/20>*)[data-slot=input-group]{background-color:color-mix(in oklab, var(--input) 20%, transparent)}}:is(.\*\:data-\[slot\=input-group\]\:shadow-none>*)[data-slot=input-group]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}:is(.\*\*\:data-\[slot\=kbd\]\:rounded-\[calc\(var\(--radius-sm\)-2px\)\] *)[data-slot=kbd]{border-radius:calc(var(--radius-sm) - 2px)}:is(.\*\*\:data-\[slot\=kbd\]\:rounded-md *)[data-slot=kbd]{border-radius:var(--radius)}:is(.\*\*\:data-\[slot\=kbd\]\:bg-muted-foreground\/10 *)[data-slot=kbd]{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){:is(.\*\*\:data-\[slot\=kbd\]\:bg-muted-foreground\/10 *)[data-slot=kbd]{background-color:color-mix(in oklab, var(--muted-foreground) 10%, transparent)}}:is(.\*\*\:data-\[slot\=kbd\]\:px-1 *)[data-slot=kbd]{padding-inline:var(--spacing)}:is(.\*\*\:data-\[slot\=kbd\]\:text-\[0\.625rem\] *)[data-slot=kbd]{font-size:.625rem}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-1\.5>*)[data-slot=select-value]{gap:calc(var(--spacing) * 1.5)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=label\]\:text-xs\/relaxed[data-variant=label]{font-size:var(--text-xs);line-height:var(--leading-relaxed)}.data-\[variant\=legend\]\:text-sm[data-variant=legend]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.nth-last-2\:-mt-1:nth-last-child(2){margin-top:calc(var(--spacing) * -1)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-backdrop-filter\:backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}}@media (width>=40rem){.sm\:flex{display:flex}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-\[1fr_1fr_1fr_auto\]{grid-template-columns:1fr 1fr 1fr auto}.sm\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:row-span-2:is(:where(.group\/alert-dialog-content)[data-size=default] *){grid-row:span 2/span 2}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:place-items-start:is(:where(.group\/alert-dialog-content)[data-size=default] *){place-items:start}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:text-left:is(:where(.group\/alert-dialog-content)[data-size=default] *){text-align:left}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:group-has-data-\[slot\=alert-dialog-media\]\/alert-dialog-content\:col-start-2:is(:where(.group\/alert-dialog-content)[data-size=default] *):is(:where(.group\/alert-dialog-content):has([data-slot=alert-dialog-media]) *){grid-column-start:2}.sm\:group-data-\[size\=default\]\/alert-dialog-content\:has-data-\[slot\=alert-dialog-media\]\:grid-rows-\[auto_1fr\]:is(:where(.group\/alert-dialog-content)[data-size=default] *):has([data-slot=alert-dialog-media]){grid-template-rows:auto 1fr}.data-\[side\=left\]\:sm\:max-w-sm[data-side=left],.data-\[side\=right\]\:sm\:max-w-sm[data-side=right],.data-\[size\=default\]\:sm\:max-w-sm[data-size=default]{max-width:var(--container-sm)}}@media (width>=48rem){.md\:block{display:block}.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:text-xs\/relaxed{font-size:var(--text-xs);line-height:var(--leading-relaxed)}.md\:text-pretty{text-wrap:pretty}.md\:opacity-0{opacity:0}.md\:peer-data-\[variant\=inset\]\:m-2:is(:where(.peer)[data-variant=inset]~*){margin:calc(var(--spacing) * 2)}.md\:peer-data-\[variant\=inset\]\:ml-0:is(:where(.peer)[data-variant=inset]~*){margin-left:0}.md\:peer-data-\[variant\=inset\]\:rounded-xl:is(:where(.peer)[data-variant=inset]~*){border-radius:calc(var(--radius) + 4px)}.md\:peer-data-\[variant\=inset\]\:shadow-sm:is(:where(.peer)[data-variant=inset]~*){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.md\:peer-data-\[variant\=inset\]\:peer-data-\[state\=collapsed\]\:ml-2:is(:where(.peer)[data-variant=inset]~*):is(:where(.peer)[data-state=collapsed]~*){margin-left:calc(var(--spacing) * 2)}.md\:after\:hidden:after{content:var(--tw-content);display:none}}@media (width>=64rem){.lg\:block{display:block}}@media (width>=80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@container field-group (width>=28rem){.\@md\/field-group\:flex-row{flex-direction:row}.\@md\/field-group\:items-center{align-items:center}.\@md\/field-group\:has-\[\>\[data-slot\=field-content\]\]\:items-start:has(>[data-slot=field-content]){align-items:flex-start}}.dark\:scale-0:where(.dark,.dark *){--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.dark\:scale-100:where(.dark,.dark *){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.dark\:-rotate-90:where(.dark,.dark *){rotate:-90deg}.dark\:rotate-0:where(.dark,.dark *){rotate:0deg}.dark\:bg-destructive\/20:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/20:where(.dark,.dark *){background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.dark\:bg-gray-800:where(.dark,.dark *){background-color:var(--color-gray-800)}.dark\:bg-green-900:where(.dark,.dark *){background-color:var(--color-green-900)}.dark\:bg-input\/30:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:bg-muted\/30:where(.dark,.dark *){background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-muted\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.dark\:bg-popover:where(.dark,.dark *){background-color:var(--popover)}.dark\:bg-red-900:where(.dark,.dark *){background-color:var(--color-red-900)}.dark\:bg-transparent:where(.dark,.dark *){background-color:#0000}.dark\:bg-yellow-900:where(.dark,.dark *){background-color:var(--color-yellow-900)}.dark\:bg-zinc-800:where(.dark,.dark *){background-color:var(--color-zinc-800)}.dark\:text-amber-400:where(.dark,.dark *){color:var(--color-amber-400)}.dark\:text-emerald-400:where(.dark,.dark *){color:var(--color-emerald-400)}.dark\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\:text-green-100:where(.dark,.dark *){color:var(--color-green-100)}.dark\:text-red-100:where(.dark,.dark *){color:var(--color-red-100)}.dark\:text-yellow-100:where(.dark,.dark *){color:var(--color-yellow-100)}.dark\:text-zinc-400:where(.dark,.dark *){color:var(--color-zinc-400)}.dark\:invert:where(.dark,.dark *){--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.dark\:after\:mix-blend-lighten:where(.dark,.dark *):after{content:var(--tw-content);mix-blend-mode:lighten}@media (hover:hover){.dark\:hover\:bg-destructive\/30:where(.dark,.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-destructive\/30:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.dark\:hover\:bg-input\/50:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.dark\:hover\:bg-muted\/50:where(.dark,.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-muted\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}}.dark\:focus-visible\:ring-destructive\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:has-aria-invalid\:border-destructive\/50:where(.dark,.dark *):has([aria-invalid=true]){border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:has-aria-invalid\:border-destructive\/50:where(.dark,.dark *):has([aria-invalid=true]){border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.dark\:has-aria-invalid\:ring-destructive\/40:where(.dark,.dark *):has([aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:has-aria-invalid\:ring-destructive\/40:where(.dark,.dark *):has([aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:has-data-checked\:bg-primary\/10:where(.dark,.dark *):has([data-checked]){background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:has-data-checked\:bg-primary\/10:where(.dark,.dark *):has([data-checked]){background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.dark\:has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/40:where(.dark,.dark *):has([data-slot][aria-invalid=true]){--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:has-\[\[data-slot\]\[aria-invalid\=true\]\]\:ring-destructive\/40:where(.dark,.dark *):has([data-slot][aria-invalid=true]){--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:border-destructive\/50:where(.dark,.dark *)[aria-invalid=true]{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:border-destructive\/50:where(.dark,.dark *)[aria-invalid=true]{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-2\.5 svg:not([class*=size-]){width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5 svg:not([class*=size-]){width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\.border-b\]\:pb-2.border-b{padding-bottom:calc(var(--spacing) * 2)}.\[\.border-b\]\:pb-4.border-b{padding-bottom:calc(var(--spacing) * 4)}.group-data-\[size\=sm\]\/card\:\[\.border-b\]\:pb-3:is(:where(.group\/card)[data-size=sm] *).border-b{padding-bottom:calc(var(--spacing) * 3)}.\[\.border-t\]\:pt-2.border-t{padding-top:calc(var(--spacing) * 2)}.\[\.border-t\]\:pt-4.border-t{padding-top:calc(var(--spacing) * 4)}.group-data-\[size\=sm\]\/card\:\[\.border-t\]\:pt-3:is(:where(.group\/card)[data-size=sm] *).border-t{padding-top:calc(var(--spacing) * 3)}:is(.\*\:\[a\]\:underline>*):is(a){text-decoration-line:underline}:is(.\*\:\[a\]\:underline-offset-3>*):is(a){text-underline-offset:3px}@media (hover:hover){.\[a\]\:hover\:bg-destructive\/20:is(a):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-destructive\/20:is(a):hover{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[a\]\:hover\:bg-muted:is(a):hover{background-color:var(--muted)}.\[a\]\:hover\:bg-primary\/80:is(a):hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-primary\/80:is(a):hover{background-color:color-mix(in oklab, var(--primary) 80%, transparent)}}.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.\[a\]\:hover\:text-muted-foreground:is(a):hover{color:var(--muted-foreground)}:is(.\*\:\[a\]\:hover\:text-foreground>*):is(a):hover{color:var(--foreground)}}:is(.\*\:\[img\:first-child\]\:rounded-t-lg>*):is(img:first-child){border-top-left-radius:calc(var(--radius) + 2px);border-top-right-radius:calc(var(--radius) + 2px)}:is(.\*\:\[img\:last-child\]\:rounded-b-lg>*):is(img:last-child){border-bottom-right-radius:calc(var(--radius) + 2px);border-bottom-left-radius:calc(var(--radius) + 2px)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)}:is(.\*\:\[svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4>*):is(svg:not([class*=size-])){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>\*\]\:w-full>*{width:100%}@container field-group (width>=28rem){.\@md\/field-group\:\[\&\>\*\]\:w-auto>*{width:auto}}.\[\&\>\.sr-only\]\:w-auto>.sr-only{width:auto}.\[\&\>\[data-slot\=field-label\]\]\:flex-auto>[data-slot=field-label]{flex:auto}@container field-group (width>=28rem){.\@md\/field-group\:\[\&\>\[data-slot\=field-label\]\]\:flex-auto>[data-slot=field-label]{flex:auto}}.has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content])>[role=checkbox],.has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content]) [role=radio]{margin-top:1px}@container field-group (width>=28rem){.\@md\/field-group\:has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content])>[role=checkbox],.\@md\/field-group\:has-\[\>\[data-slot\=field-content\]\]\:\[\&\>\[role\=checkbox\]\,\[role\=radio\]\]\:mt-px:has(>[data-slot=field-content]) [role=radio]{margin-top:1px}}.\[\&\>a\]\:underline>a{text-decoration-line:underline}.\[\&\>a\]\:underline-offset-4>a{text-underline-offset:4px}.\[\&\>a\:hover\]\:text-primary>a:hover{color:var(--primary)}.\[\&\>button\]\:hidden>button{display:none}.has-\[\>\[data-align\=block-end\]\]\:\[\&\>input\]\:pt-3:has(>[data-align=block-end])>input{padding-top:calc(var(--spacing) * 3)}.has-\[\>\[data-align\=block-start\]\]\:\[\&\>input\]\:pb-3:has(>[data-align=block-start])>input{padding-bottom:calc(var(--spacing) * 3)}.has-\[\>\[data-align\=inline-end\]\]\:\[\&\>input\]\:pr-1\.5:has(>[data-align=inline-end])>input{padding-right:calc(var(--spacing) * 1.5)}.has-\[\>\[data-align\=inline-start\]\]\:\[\&\>input\]\:pl-1\.5:has(>[data-align=inline-start])>input{padding-left:calc(var(--spacing) * 1.5)}.\[\&\>span\:last-child\]\:truncate>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-2\.5\!>svg{width:calc(var(--spacing) * 2.5)!important;height:calc(var(--spacing) * 2.5)!important}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:var(--sidebar-accent-foreground)}.group-has-data-\[size\=lg\]\/avatar-group\:\[\&\>svg\]\:size-5:is(:where(.group\/avatar-group):has([data-size=lg]) *)>svg{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.group-has-data-\[size\=sm\]\/avatar-group\:\[\&\>svg\]\:size-3:is(:where(.group\/avatar-group):has([data-size=sm]) *)>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.group-data-\[size\=default\]\/avatar\:\[\&\>svg\]\:size-2:is(:where(.group\/avatar)[data-size=default] *)>svg,.group-data-\[size\=lg\]\/avatar\:\[\&\>svg\]\:size-2:is(:where(.group\/avatar)[data-size=lg] *)>svg{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.group-data-\[size\=sm\]\/avatar\:\[\&\>svg\]\:hidden:is(:where(.group\/avatar)[data-size=sm] *)>svg{display:none}.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3>svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3\.5>svg:not([class*=size-]){width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}[data-side=left][data-collapsible=offExamples] .\[\[data-side\=left\]\[data-collapsible\=offExamples\]_\&\]\:-right-2{right:calc(var(--spacing) * -2)}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=right][data-collapsible=offExamples] .\[\[data-side\=right\]\[data-collapsible\=offExamples\]_\&\]\:-left-2{left:calc(var(--spacing) * -2)}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-variant=legend]+.\[\[data-variant\=legend\]\+\&\]\:-mt-1\.5{margin-top:calc(var(--spacing) * -1.5)}}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--font-sans:"Geist Variable", sans-serif;--font-mono:"JetBrains Mono Variable", monospace;--background:#f4f1ec;--foreground:#1d2930;--card:#f9f8f6;--card-foreground:#1d2930;--popover:#fbfaf9;--popover-foreground:#1d2930;--primary:#305030;--primary-foreground:#f5f3ef;--secondary:#eae5d7;--secondary-foreground:#263740;--muted:#e9e7e2;--muted-foreground:#576b75;--accent:#e7e2da;--accent-foreground:#1d2930;--destructive:#c32222;--destructive-foreground:#fff;--border:#b6c9b6;--input:#dedbd3;--ring:#3e743e;--chart-1:#2e6b2e;--chart-2:#cfa117;--chart-3:#297aa3;--chart-4:#cc8c33;--chart-5:#b82e2e;--radius:.25rem;--sidebar:#f5f3f0;--sidebar-background:#f5f3f0;--sidebar-foreground:#263740;--sidebar-primary:#305030;--sidebar-primary-foreground:#f5f3ef;--sidebar-accent:#e7e2da;--sidebar-accent-foreground:#1d2930;--sidebar-border:#c4d4c4;--sidebar-ring:#3e743e;--tactical-amber:#c2940a;--tactical-amber-dim:#d6b85c;--tactical-green:#267326;--tactical-green-dim:#7ab87a;--tactical-cyan:#24868f;--tactical-cyan-dim:#5eb2ba;--tactical-red:#bd2828;--tactical-olive:#64783a;--scanline-opacity:.015}.dark{--background:#0d1012;--foreground:#e0ddd1;--card:#14181a;--card-foreground:#e0ddd1;--popover:#111517;--popover-foreground:#e0ddd1;--primary:#fa0;--primary-foreground:#0d1012;--secondary:#323922;--secondary-foreground:#c6d2ac;--muted:#202527;--muted-foreground:#819098;--accent:#292f32;--accent-foreground:#ebe8e0;--destructive:#c32222;--destructive-foreground:#fff;--border:#203c32;--input:#292f32;--ring:#ffbf00;--chart-1:#ffbf00;--chart-2:#22c38e;--chart-3:#1aa1e6;--chart-4:#86ac39;--chart-5:#d92626;--sidebar:#111517;--sidebar-background:#111517;--sidebar-foreground:#e0ddd1;--sidebar-primary:#ffbf00;--sidebar-primary-foreground:#0d1012;--sidebar-accent:#292f32;--sidebar-accent-foreground:#ebe8e0;--sidebar-border:#203c32;--sidebar-ring:#ffbf00;--tactical-amber:#ffbf00;--tactical-amber-dim:#a17d12;--tactical-green:#22c38e;--tactical-green-dim:#20604a;--tactical-cyan:#17bfcf;--tactical-cyan-dim:#196066;--tactical-red:#d92626;--tactical-olive:#576b2e;--scanline-opacity:.03}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/spinifex/services/spinifexui/frontend/dist/assets/index.js b/spinifex/services/spinifexui/frontend/dist/assets/index.js index 92996efd3..bec4eee3c 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/index.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/index.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login.js","assets/compiler-runtime.js","assets/auth.js","assets/tslib.es6.js","assets/awsClient.js","assets/index.browser.js","assets/useStore.js","assets/button.js","assets/dist.js","assets/collapsible.js","assets/createBaseUIEventDetails.js","assets/zod.js","assets/card.js","assets/field.js","assets/route.js","assets/_auth.js","assets/useQuery.js","assets/useBaseQuery.js","assets/chevron-down.js","assets/chevron-right.js","assets/page-heading.js","assets/state-badge.js","assets/badge.js","assets/admin.js","assets/queryOptions.js","assets/nodes.js","assets/redirect.js","assets/service-metrics.js","assets/ls.js","assets/useSuspenseQuery.js","assets/list-card.js","assets/create-bucket.js","assets/s3.js","assets/useMutation.js","assets/back-link.js","assets/cli-command-panel.js","assets/check.js","assets/copy.js","assets/use-copy-to-clipboard.js","assets/error-banner.js","assets/form-actions.js","assets/create-user.js","assets/iam.js","assets/iam2.js","assets/json.js","assets/create-role.js","assets/json-editor.js","assets/textarea.js","assets/create-policy.js","assets/create-instance-profile.js","assets/create-cluster.js","assets/eks.js","assets/subnet-calculator.js","assets/alert-dialog.js","assets/select.js","assets/useCompositeListItem.js","assets/rotate-cw.js","assets/triangle-alert.js","assets/system-managed.js","assets/policy-document-viewer.js","assets/run-task.js","assets/ecs.js","assets/ecs2.js","assets/register-task-definition.js","assets/plus.js","assets/trash-2.js","assets/create-service.js","assets/create-vpc.js","assets/ec2.js","assets/ec22.js","assets/create-volume.js","assets/create-target-group.js","assets/elbv2.js","assets/target-group-form.js","assets/elbv22.js","assets/create-subnet.js","assets/create-snapshot.js","assets/create-security-group.js","assets/create-route-table.js","assets/create-placement-group.js","assets/create-nat-gateway.js","assets/create-load-balancer.js","assets/certificate-import-dialog.js","assets/import-key-pair.js","assets/create-key-pair.js","assets/download.js","assets/create-internet-gateway.js","assets/run-instances.js","assets/allocate-address.js","assets/route2.js","assets/_bucket.js","assets/upload-button.js","assets/delete-confirmation-dialog.js","assets/list-users.js","assets/list-roles.js","assets/list-policies.js","assets/list-instance-profiles.js","assets/list-clusters2.js","assets/list-clusters.js","assets/list-repositories.js","assets/ecr.js","assets/describe-vpcs.js","assets/describe-volumes.js","assets/describe-target-groups.js","assets/describe-subnets.js","assets/describe-snapshots.js","assets/describe-security-groups.js","assets/describe-route-tables.js","assets/describe-placement-groups.js","assets/describe-nat-gateways.js","assets/describe-load-balancers.js","assets/describe-key-pairs.js","assets/describe-internet-gateways.js","assets/describe-instances.js","assets/describe-images.js","assets/describe-addresses.js","assets/_.js","assets/_userName.js","assets/detail-row.js","assets/_roleName.js","assets/_policyArn.js","assets/_instanceProfileName.js","assets/_clusterName2.js","assets/tabs.js","assets/_clusterName.js","assets/_id17.js","assets/_id16.js","assets/_id15.js","assets/_id14.js","assets/_id13.js","assets/tags-editor.js","assets/_id12.js","assets/_id11.js","assets/_id10.js","assets/_id9.js","assets/_id8.js","assets/_id7.js","assets/_id6.js","assets/_id5.js","assets/_id4.js","assets/_id3.js","assets/ami-details.js","assets/_id2.js","assets/_id.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login.js","assets/compiler-runtime.js","assets/auth.js","assets/tslib.es6.js","assets/awsClient.js","assets/index.browser.js","assets/useStore.js","assets/button.js","assets/dist.js","assets/collapsible.js","assets/createBaseUIEventDetails.js","assets/zod.js","assets/card.js","assets/field.js","assets/route.js","assets/_auth.js","assets/useQuery.js","assets/useBaseQuery.js","assets/chevron-down.js","assets/chevron-right.js","assets/page-heading.js","assets/state-badge.js","assets/badge.js","assets/admin.js","assets/queryOptions.js","assets/nodes.js","assets/redirect.js","assets/service-metrics.js","assets/ls.js","assets/useSuspenseQuery.js","assets/list-card.js","assets/create-bucket.js","assets/s3.js","assets/useMutation.js","assets/back-link.js","assets/cli-command-panel.js","assets/check.js","assets/copy.js","assets/use-copy-to-clipboard.js","assets/error-banner.js","assets/form-actions.js","assets/create-user.js","assets/iam.js","assets/iam2.js","assets/json.js","assets/create-role.js","assets/json-editor.js","assets/textarea.js","assets/create-policy.js","assets/create-instance-profile.js","assets/create-cluster.js","assets/eks.js","assets/subnet-calculator.js","assets/alert-dialog.js","assets/select.js","assets/useCompositeListItem.js","assets/rotate-cw.js","assets/triangle-alert.js","assets/system-managed.js","assets/policy-document-viewer.js","assets/task-definitions.js","assets/ecs.js","assets/delete-confirmation-dialog.js","assets/ecs-section-nav.js","assets/run-task.js","assets/ecs2.js","assets/register-task-definition.js","assets/plus.js","assets/trash-2.js","assets/create-service.js","assets/create-vpc.js","assets/ec2.js","assets/ec22.js","assets/create-volume.js","assets/create-target-group.js","assets/elbv2.js","assets/target-group-form.js","assets/elbv22.js","assets/create-subnet.js","assets/create-snapshot.js","assets/create-security-group.js","assets/create-route-table.js","assets/create-placement-group.js","assets/create-nat-gateway.js","assets/create-load-balancer.js","assets/certificate-import-dialog.js","assets/import-key-pair.js","assets/create-key-pair.js","assets/download.js","assets/create-internet-gateway.js","assets/run-instances.js","assets/allocate-address.js","assets/route2.js","assets/_bucket.js","assets/upload-button.js","assets/list-users.js","assets/list-roles.js","assets/list-policies.js","assets/list-instance-profiles.js","assets/list-clusters2.js","assets/list-clusters.js","assets/list-repositories.js","assets/ecr.js","assets/describe-vpcs.js","assets/describe-volumes.js","assets/describe-target-groups.js","assets/describe-subnets.js","assets/describe-snapshots.js","assets/describe-security-groups.js","assets/describe-route-tables.js","assets/describe-placement-groups.js","assets/describe-nat-gateways.js","assets/describe-load-balancers.js","assets/describe-key-pairs.js","assets/describe-internet-gateways.js","assets/describe-instances.js","assets/describe-images.js","assets/describe-addresses.js","assets/_.js","assets/_userName.js","assets/detail-row.js","assets/_roleName.js","assets/_policyArn.js","assets/_instanceProfileName.js","assets/_clusterName2.js","assets/tabs.js","assets/_clusterName.js","assets/_id17.js","assets/_id16.js","assets/_id15.js","assets/_id14.js","assets/_id13.js","assets/tags-editor.js","assets/_id12.js","assets/_id11.js","assets/_id10.js","assets/_id9.js","assets/_id8.js","assets/_id7.js","assets/_id6.js","assets/_id5.js","assets/_id4.js","assets/_id3.js","assets/ami-details.js","assets/_id2.js","assets/_id.js","assets/_taskId.js","assets/_serviceName.js"])))=>i.map(i=>d[i]); import{i as e,n as t,o as n,r,t as i}from"./compiler-runtime.js";import{t as a}from"./queryOptions.js";import{A as o,B as s,C as c,D as l,E as u,F as d,G as f,I as p,L as m,M as h,N as g,O as _,P as v,R as y,S as b,T as x,V as S,W as C,_ as w,a as T,b as E,c as D,d as O,f as k,g as A,h as j,i as M,j as ee,k as N,l as P,m as te,n as ne,o as re,r as ie,s as ae,t as F,v as oe,w as se,x as I,y as ce,z as le}from"./useStore.js";import{i as ue,n as de,r as fe,t as pe}from"./matchContext.js";import{n as me,t as he}from"./redirect.js";import{$ as ge,An as _e,Ar as ve,Cr as ye,Dr as be,Er as xe,G as Se,Gt as Ce,H as we,Ht as Te,In as Ee,J as De,Jt as Oe,K as ke,Ln as Ae,Mn as je,Mr as Me,Nr as Ne,On as Pe,Or as Fe,Q as Ie,Qr as Le,Qt as Re,Rn as ze,S as Be,Sn as Ve,Sr as He,St as Ue,Tr as We,U as Ge,Ut as Ke,Vt as qe,W as Je,Wt as Ye,X as Xe,Xt as Ze,Y as Qe,Yt as $e,Z as et,Zt as tt,_ as nt,_n as rt,_r as it,_t as at,a as ot,br as st,bt as ct,c as lt,cn as ut,dn as dt,ei as ft,et as pt,fn as mt,g as ht,gn as gt,gt as _t,hn as vt,ht as yt,i as bt,jr as xt,jt as St,kn as Ct,kr as wt,l as Tt,ln as Et,mn as Dt,mt as Ot,n as kt,ni as L,nn as At,o as jt,pn as Mt,q as Nt,qt as Pt,r as Ft,ri as It,rt as Lt,s as Rt,t as zt,ti as Bt,un as Vt,vr as Ht,vt as Ut,wr as Wt,x as Gt,xr as Kt,xt as qt,yr as Jt,yt as Yt}from"./awsClient.js";import{a as Xt,c as Zt,f as Qt,l as $t,n as en,o as tn,s as nn,t as rn,u as an}from"./dist.js";import{$ as on,A as sn,B as cn,C as ln,Ct as un,D as dn,E as fn,Et as pn,F as mn,Ft as hn,G as gn,H as _n,I as vn,It as yn,J as bn,K as xn,L as Sn,Lt as Cn,M as wn,Mt as Tn,N as En,O as Dn,Ot as On,P as kn,Pt as An,Q as jn,R as Mn,Rt as Nn,S as Pn,St as R,T as Fn,U as In,W as Ln,X as Rn,Y as zn,_t as Bn,at as z,bt as Vn,dt as Hn,et as Un,ft as Wn,g as Gn,gt as Kn,ht as qn,j as Jn,jt as Yn,k as Xn,kt as Zn,mt as Qn,n as $n,pt as er,r as tr,ut as B,vt as nr,x as rr,xt as ir,yt as ar,z as or}from"./auth.js";import{C as sr,D as cr,E as lr,S as ur,T as dr,_ as fr,b as pr,d as mr,f as hr,g as gr,h as _r,l as vr,m as yr,n as br,o as V,p as xr,r as Sr,s as Cr,t as wr,u as Tr,v as Er,w as Dr,x as Or,y as H}from"./button.js";import{C as kr,S as Ar,a as jr,b as Mr,f as Nr,g as Pr,h as Fr,i as Ir,m as Lr,o as Rr,p as zr,r as Br,s as Vr,t as Hr,v as Ur,x as Wr,y as U}from"./createBaseUIEventDetails.js";import{F as Gr,I as Kr,N as qr,P as Jr,v as Yr}from"./tslib.es6.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Xr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Zr=new class extends Xr{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Qr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},$r=new class{#e=Qr;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function ei(e){setTimeout(e,0)}var ti=typeof window>`u`||`Deno`in globalThis;function ni(){}function ri(e,t){return typeof e==`function`?e(t):e}function ii(e){return typeof e==`number`&&e>=0&&e!==1/0}function ai(e,t){return Math.max(e+(t||0)-Date.now(),0)}function oi(e,t){return typeof e==`function`?e(t):e}function si(e,t){return typeof e==`function`?e(t):e}function ci(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ui(o,t.options))return!1}else if(!fi(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function li(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(di(t.options.mutationKey)!==di(a))return!1}else if(!fi(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ui(e,t){return(t?.queryKeyHashFn||di)(e)}function di(e){return JSON.stringify(e,(e,t)=>_i(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function fi(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>fi(e[n],t[n])):!1}var pi=Object.prototype.hasOwnProperty;function mi(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=gi(e)&&gi(t);if(!r&&!(_i(e)&&_i(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l{$r.setTimeout(t,e)})}function bi(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:mi(e,t)}function xi(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Si(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ci=Symbol();function wi(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ci?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ti(e,t){return typeof e==`function`?e(...t):!!e}function Ei(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Di=(()=>{let e=()=>ti;return{isServer(){return e()},setIsServer(t){e=t}}})();function Oi(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ki=ei;function Ai(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ki,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var ji=Ai(),Mi=new class extends Xr{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Ni(e){return Math.min(1e3*2**e,3e4)}function Pi(e){return(e??`online`)===`online`?Mi.isOnline():!0}var Fi=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Ii(e){let t=!1,n=0,r,i=Oi(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Fi(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Zr.isFocused()&&(e.networkMode===`always`||Mi.isOnline())&&e.canRun(),u=()=>Pi(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Di.isServer()?0:3),o=e.retryDelay??Ni,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&nl()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Li=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ii(this.gcTime)&&(this.#e=$r.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Di.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&($r.clearTimeout(this.#e),this.#e=void 0)}};function Ri(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Ei(e,()=>t.signal,()=>n=!0)},u=wi(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Si:xi;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Bi:zi,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:zi(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(ct.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function zi(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Bi(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Vi=class extends Li{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Wi(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Wi(this.options);e.data!==void 0&&(this.setState(Ui(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=bi(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(ni).catch(ni):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>si(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ci||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>oi(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!ai(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=wi(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Ri(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Ii({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Fi&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Fi){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Hi(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ui(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),ji.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Hi(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pi(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ui(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Wi(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Gi=class extends Li{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ki(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Ii({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),ji.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ki(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var qi=class extends Xr{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Gi({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ji(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ji(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ji(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Ji(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){ji.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>li(t,e))}findAll(e={}){return this.getAll().filter(t=>li(e,t))}notify(e){ji.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ji.batch(()=>Promise.all(e.map(e=>e.continue().catch(ni))))}};function Ji(e){return e.options.scope?.id}var Yi=class extends Xr{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??ui(r,t),a=this.get(i);return a||(a=new Vi({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){ji.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ci(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ci(e,t)):t}notify(e){ji.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ji.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ji.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Xi=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Yi,this.#t=e.mutationCache||new qi,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Zr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Mi.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(oi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=ri(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ji.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;ji.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return ji.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=ji.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(ni).catch(ni)}invalidateQueries(e,t={}){return ji.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=ji.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ni)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(ni)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(oi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ni).catch(ni)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ni).catch(ni)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Mi.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(di(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{fi(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(di(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{fi(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=ui(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Ci&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},W=n(r(),1),G=t(),Zi=W.createContext(void 0),Qi=e=>{let t=W.useContext(Zi);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},$i=({client:e,children:t})=>(W.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(Zi.Provider,{value:e,children:t}));function ea(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function ta(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function na(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=ta(r):Array.isArray(t)?t.push(ta(r)):n[e]=[t,ta(r)]}return n}var ra=aa(JSON.parse),ia=oa(JSON.stringify,JSON.parse);function aa(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=na(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function oa(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=ea(e,r);return t?`?${t}`:``}}var sa=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},ca=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),la=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),ua=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},da=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},fa=(e,t,n)=>{if(!(!he(n)&&!ue(n)))throw he(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:he(n)?`redirected`:ue(n)?`notFound`:r.status===`pending`?`success`:r.status,context:ua(e,t.index),isFetching:!1,error:n})),ue(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),he(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},pa=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},ma=(e,t,n)=>{let r=ua(e,n);e.updateMatch(t,e=>({...e,context:r}))},ha=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,fa(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,fa(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!he(n)&&!ue(n)&&(e.serialError??=n)},ga=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!la(e,t)&&(n.options.loader||n.options.beforeLoad||Da(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{sa(e)},i);r._nonReactive.pendingTimeout=t}},_a=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;ga(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&fa(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},va=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=_(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&ha(e,n,o),s&&ha(e,n,s),ga(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=_();let f={...ua(e,n,!1),...i.__routeContext},{search:p,params:h,cause:g}=i,v=la(e,t),y={search:p,abortController:c,params:h,preload:v,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:g,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(he(r)||ue(r))&&(u(),ha(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},x;try{if(x=r.options.beforeLoad(y),m(x))return u(),x.catch(t=>{ha(e,n,t)}).then(b)}catch(t){u(),ha(e,n,t)}b(x)},ya=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>va(e,n,t,i),s=()=>{if(pa(e,n))return;let t=_a(e,n,i);return m(t)?t.then(o):o()};return a()},ba=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},xa=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=ua(e,r),d=la(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Sa=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{Ea(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(xa(e,t,n,r,i)),l=!!s&&m(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;fa(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:ua(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:ua(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,ue(t)&&await i.options.notFoundComponent?.preload?.(),fa(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,fa(e,e.router.getMatch(n),t)}!he(o)&&!ue(o)&&await Ea(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:ua(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),fa(e,r,t)}},Ca=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(xa(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Sa(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){he(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Sa(e,t,i,n,d):ma(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(pa(e,i)){if(!e.router.getMatch(i))return e.matches[n];ma(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=la(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&fa(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=_(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function wa(e){let t=e,n=[];ca(t.router)&&sa(t);let r;for(let e=0;e({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await Ea(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Ea(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=ba(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=sa(t);if(m(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Ta(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Ea(e,t=Oa){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===Oa?(()=>{if(e._componentsPromise===void 0){let t=Ta(e,Oa);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Ta(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Da(e){for(let t of Oa)if(e.options[t]?.preload)return!0;return!1}var Oa=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function ka(e){return{input:({url:t})=>{for(let n of e)t=ja(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ma(e[n],t);return t}}}function Aa(e){let t=j(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=k([`/`,t,e.pathname]),e)}}function ja(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Ma(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Na(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>Pa(o,_.get())),x=r(()=>Pa(s,v.get())),S=r(()=>Pa(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=se(64);function O(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let k={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:O,setMatches:A,setPending:j,setCached:M};A(e.matches),a?.(k);function A(e){Fa(e,o,_,n,i)}function j(e){Fa(e,s,v,n,i)}function M(e){Fa(e,c,y,n,i)}return k}function Pa(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function Fa(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}l(n.get(),a)||n.set(a)})}var Ia=`__TSR_index`,La=`popstate`,Ra=`beforeunload`;function za(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Ua(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Ia];i=Ba(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Ia];i=Ba(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Ia]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Ba(e,t){t||={};let n=Wa();return{...t,key:n,__TSR_key:n,[Ia]:e}}function Va(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>Ua(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Wa();t.history.replaceState({[Ia]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=Ua(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[Ia]-l.state[Ia],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=za({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ra,S,{capture:!0}),t.removeEventListener(La,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Ra,S,{capture:!0}),t.addEventListener(La,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Ha(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function Ua(e,t){let n=Ha(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Wa();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[Ia]:0,key:a,__TSR_key:a}}}function Wa(){return(Math.random()+1).toString(36).substring(7)}function Ga(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var Ka=new WeakMap,qa=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=P(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Va()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=se(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Na(Xa(this.latestLocation),e),go(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=j(o);t&&t!==`/`&&e.push(Aa({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:ka(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=c(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&b(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:N(e).path,external:!1,searchStr:o,search:le(t?.search,i),hash:N(r.slice(1)).path,state:s(t?.state,a)}}let o=new URL(i,this.origin),c=ja(this.rewrite,o),l=this.options.parseSearch(c.search),u=this.options.stringifySearch(l);return c.search=u,{href:c.href.replace(c.origin,``),publicHref:i,pathname:N(c.pathname).path,external:!!this.rewrite&&c.origin!==this.origin,searchStr:u,search:le(t?.search,l),hash:N(c.hash.slice(1)).path,state:s(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>te({base:e,to:t.includes(`//`)?D(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Qa({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,c=Object.assign(Object.create(null),r.params),l=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=a?this.resolvePathWithBase(l,a):l,d=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,g(t.params,c)),f=this.routesByPath[w(u)],p;if(f)p=this.getRouteBranch(f);else if(u.includes(`$`))p=[];else{let e=this.getMatchedRoutes(u);p=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(p=[...p,this.options.notFoundRoute])}if(p.length&&v(d))for(let e of p){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(d,t(d))}catch{}}let m=e.leaveParams?u:N(O({path:u,params:d,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,h=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};p.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Za(t.options.validateSearch,{...e,...h}))}catch{}}),h=e}h=$a({search:h,dest:t,destRoutes:p,_includeValidateSearch:e._includeValidateSearch}),h=le(o,h);let _=this.options.stringifySearch(h),y=t.hash===!0?n.hash:t.hash?g(t.hash,n.hash):void 0,b=y?`#${y}`:``,x=t.state===!0?n.state:t.state?g(t.state,n.state):{};x=s(n.state,x);let S=`${m}${_}${b}`,C,T,E=!1;if(this.rewrite){let e=new URL(S,this.origin),t=Ma(this.rewrite,e);C=e.href.replace(e.origin,``),t.origin===this.origin?T=t.pathname+t.search+t.hash:(T=t.href,E=!0)}else C=ee(S),T=C;return{publicHref:T,href:C,pathname:m,search:h,searchStr:_,state:x,hash:y??``,external:E,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=ce(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,g(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=o(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=w(this.latestLocation.href)===w(n.href),s=this.commitLocationPromise;if(this.commitLocationPromise=_(()=>{s?.resolve(),s=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=Ua(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=ja(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(d(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?Ka.set(this.latestLocation,t):Ka.delete(this.latestLocation);let n=this.latestLocation,r=Ga(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await wa({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){he(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):ue(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Ga(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&d(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=Ea,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await wa({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(he(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});ue(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=I(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!o(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?o(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ia,parseSearch:e.parseSearch??ra,protocolAllowlist:e.protocolAllowlist??u}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=oe(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:w(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let c=o?to(this.options.notFoundMode,a):void 0,l=Array(a.length),u=new Map;for(let e of this.stores.matchStores.values())e.routeId&&u.set(e.routeId,e.get());for(let n=0;nthis.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:l,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return l}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=y(t),i={...e.search};for(let e of t)try{Object.assign(i,Za(e.options.validateSearch,i))}catch{}let a=y(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{no(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},Ja=class extends Error{},Ya=class extends Error{};function Xa(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Za(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Ja(`Async validation not supported`);if(n.issues)throw new Ja(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Qa({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=w(e),a,o=E(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function $a({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return eo(n)(e,t,r??!1)}function eo(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=Za(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=g(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function to(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return fe}function no(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}function ro(){try{return sessionStorage}catch{return}}var io=`tsr-scroll-restoration-v1_3`,ao=ro();function K(){try{return JSON.parse(ao?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function oo(){try{ao?.setItem(io,JSON.stringify(so))}catch{}}var so=K(),co=`data-scroll-restoration-id`,lo=e=>e.state.__TSR_key||e.href;function uo(e){let t=e.getAttribute(co);if(t)return`[${co}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var fo=!1,po=`window`;function mo(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function ho(e){let t=[];for(let n of e){if(n===po)continue;let e=mo(n);e&&t.push(e)}return t}function go(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||lo,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(fo||!r.restoring))if(e.target===document)o(po,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=so[e]||={};for(let[e,n]of a)e===po?t[po]=n:e.isConnected&&(t[uo(e)]=n)};n&&!r.restoration&&(r.restoration=!0,fo=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),oo()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=so[u];if(e){let t=so[l];for(let n in e){if(n===po){if(s)continue}else{let e=mo(n);if(!e||s&&o&&(c??=ho(o),c.includes(e)))continue}t||=so[l]={},t[n]??=e[n]}}}fo=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=Ka.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?so[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===po){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=mo(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=ho(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{fo=!1}}))}function _o(e,t){if(e)return typeof e==`string`?e:e[t]}function vo(e){return e?.scriptFormat??`module`}function yo(e,t,n){let r=bo(t),i=_o(n,`script`)??r.crossOrigin;return{...vo(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function bo(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function xo(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function So(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var Co=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=fe:this.parentRoute||x();let r=n?fe:t?.path;r&&r!==`/`&&(r=A(r));let i=t?.id||r,a=n?fe:k([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=k([`/`,a]));let o=a===`__root__`?`/`:k([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=w(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>me({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},wo=class extends Co{constructor(e){super(e)}};function To(e){let t=e.errorComponent??Do;return(0,G.jsx)(Eo,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?W.createElement(t,{error:n,reset:r}):e.children})}var Eo=class extends W.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Do({error:e}){let[t,n]=W.useState(!1);return(0,G.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,G.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,G.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,G.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,G.jsx)(`div`,{children:(0,G.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,G.jsx)(`code`,{children:e.message}):null})}):null]})}var Oo=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(Oo||{});function ko({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Ao(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var jo=[],Mo=0,{link:No,unlink:Po,propagate:Fo,checkDirty:Io,shallowPropagate:Lo}=ko({update(e){return e._update()},notify(e){jo[zo++]=e,e.flags&=~Oo.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Oo.Mutable|Oo.Dirty,Uo(e))}}),Ro=0,zo=0,Bo,Vo=0;function Ho(e){try{++Vo,e()}finally{--Vo||Wo()}}function Uo(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Po(n,e)}function Wo(){if(!(Vo>0)){for(;Ro{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Bo,o=t?.compare??Object.is;if(n)Bo=i,++Mo,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=Oo.Mutable|Oo.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Bo=a,n&&(i.flags&=~Oo.RecursedCheck),Uo(i)}}};return n?(i.flags=Oo.Mutable|Oo.Dirty,i.get=function(){let e=i.flags;if(e&Oo.Dirty||e&Oo.Pending&&Io(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Lo(e)}}else e&Oo.Pending&&(i.flags=e&~Oo.Pending);return Bo!==void 0&&No(i,Bo,Mo),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Fo(e),Lo(e),Wo())}},i}function Ko(e){let t=()=>{let t=Bo;Bo=n,++Mo,n.depsTail=void 0,n.flags=Oo.Watching|Oo.RecursedCheck;try{return e()}finally{Bo=t,n.flags&=~Oo.RecursedCheck,Uo(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Oo.Watching|Oo.RecursedCheck,notify(){let e=this.flags;e&Oo.Dirty||e&Oo.Pending&&Io(this.deps,this)?t():this.flags=Oo.Watching},stop(){this.flags=Oo.None,this.depsTail=void 0,Uo(this)}};return t(),n}var qo={get(){},subscribe(){return{unsubscribe(){}}}};function Jo(e,t){let n=W.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=s(n.current,i):i}}function Yo(e){let t=M(),n=W.useContext(e.from?pe:de),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),i=Jo(e,t),a=F(r??qo,e=>e?i(e):qo);if(a!==qo)return a;(e.shouldThrow??!0)&&x()}function Xo(e){return Yo({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Zo(e){let{select:t,...n}=e;return Yo({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Qo(e){return Yo({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function $o(e){return Yo({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function es(e){let t=M();return W.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function ts(e){return Yo({...e,select:t=>e.select?e.select(t.context):t.context})}var ns=class extends Co{constructor(e){super(e),this.useMatch=e=>Yo({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>ts({...e,from:this.id}),this.useSearch=e=>$o({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Qo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Zo({...e,from:this.id}),this.useLoaderData=e=>Xo({...e,from:this.id}),this.useNavigate=()=>es({from:this.fullPath}),this.Link=W.forwardRef((e,t)=>(0,G.jsx)(L,{ref:t,from:this.fullPath,...e}))}};function rs(e){return new ns(e)}function is(){return e=>os(e)}var as=class extends wo{constructor(e){super(e),this.useMatch=e=>Yo({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>ts({...e,from:this.id}),this.useSearch=e=>$o({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Qo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Zo({...e,from:this.id}),this.useLoaderData=e=>Xo({...e,from:this.id}),this.useNavigate=()=>es({from:this.fullPath}),this.Link=W.forwardRef((e,t)=>(0,G.jsx)(L,{ref:t,from:this.fullPath,...e}))}};function os(e){return new as(e)}function q(e){return new ss(e,{silent:!0}).createRoute}var ss=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=rs(e);return t.isRoot=!1,t},this.silent=t?.silent}};function J(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,p(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(S)S(o());else throw o();return W.createElement(r,e)};return s.preload=o,s}function cs(e){let t=M(),n=`not-found-${F(t.stores.location,e=>e.pathname)}-${F(t.stores.status,e=>e)}`;return(0,G.jsx)(To,{getResetKey:()=>n,onCatch:(t,n)=>{if(ue(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(ue(t))return e.fallback?.(t);throw t},children:e.children})}function ls(){return(0,G.jsx)(`p`,{children:`Not Found`})}function us(e){return(0,G.jsx)(G.Fragment,{children:e.children})}function ds(e,t,n){return t.options.notFoundComponent?(0,G.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,G.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,G.jsx)(ls,{})}var fs=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,ps=(e,t)=>e[0]===t[0]&&e[1]===t[1],ms=W.memo(function({matchId:e}){let t=M(),n=t.stores.matchStores.get(e);n||x();let r=F(t.stores.loadedAt,e=>e),i=F(n,e=>e,fs);return(0,G.jsx)(hs,{router:t,matchId:e,resetKey:r,matchState:W.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function hs({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,G.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?W.Suspense:us,f=s?To:us,p=l?cs:us;return(0,G.jsxs)(i.isRoot?i.options.shellComponent??us:us,{children:[(0,G.jsx)(de.Provider,{value:t,children:(0,G.jsx)(d,{fallback:o,children:(0,G.jsx)(f,{getResetKey:()=>n,errorComponent:s||Do,onCatch:(e,t)=>{if(ue(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,G.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return W.createElement(l,e)},children:u||r._displayPending?(0,G.jsx)(re,{fallback:o,children:(0,G.jsx)(_s,{matchId:t})}):(0,G.jsx)(_s,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(gs,{}),(e.options.scrollRestoration,null)]}):null]})}function gs(){let e=M(),t=W.useRef();return C(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...Ga(e.stores.location.get(),r??n)}),t.current=n},[F(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var _s=W.memo(function({matchId:e}){let t=M(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||x();let i=F(r,e=>e),a=i.routeId,o=t.routesById[a],s=W.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=W.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,G.jsx)(e,{},s):(0,G.jsx)(vs,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=_();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return ue(i.error)||x(),ds(t,o,i.error);if(i.status===`redirected`)throw he(i.error)||x(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),vs=W.memo(function(){let e=M(),t=W.useContext(de),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=F(a,e=>[e?.routeId,e?.globalNotFound??!1],ps),i=F(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,G.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||x(),ds(e,a,void 0);if(!i)return null;let s=(0,G.jsx)(ms,{matchId:i});return n===`__root__`?(0,G.jsx)(W.Suspense,{fallback:o,children:s}):s});function ys(){let e=M(),t=W.useRef({router:e,mounted:!1}),[n,r]=W.useState(!1),i=F(e.stores.isLoading,e=>e),a=F(e.stores.hasPending,e=>e),o=f(i),s=i||n||a,c=f(s),l=i||a,u=f(l);return e.startTransition=e=>{r(!0),W.startTransition(()=>{e(),r(!1)})},W.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return w(e.latestLocation.publicHref)!==w(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),C(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),C(()=>{o&&!i&&e.emit({type:`onLoad`,...Ga(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),C(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Ga(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),C(()=>{if(c&&!s){let t=Ga(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),Ho(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function bs(){let e=M(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,G.jsx)(t,{}):null,r=(0,G.jsxs)(typeof document<`u`&&e.ssr?us:W.Suspense,{fallback:n,children:[(0,G.jsx)(ys,{}),(0,G.jsx)(xs,{})]});return e.options.InnerWrap?(0,G.jsx)(e.options.InnerWrap,{children:r}):r}function xs(){let e=M(),t=F(e.stores.firstId,e=>e),n=F(e.stores.loadedAt,e=>e),r=t?(0,G.jsx)(ms,{matchId:t}):null;return(0,G.jsx)(de.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,G.jsx)(To,{getResetKey:()=>n,errorComponent:Do,onCatch:void 0,children:r})})}var Ss=e=>({createMutableStore:Go,createReadonlyStore:Go,batch:Ho}),Cs=e=>new ws(e),ws=class extends qa{constructor(e){super(e,Ss)}};function Ts({router:e,children:t,...n}){v(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,G.jsx)(T.Provider,{value:e,children:t});return e.options.Wrap?(0,G.jsx)(e.options.Wrap,{children:r}):r}function Es({router:e,...t}){return(0,G.jsx)(Ts,{router:e,...t,children:(0,G.jsx)(bs,{})})}function Ds(e){let t=M();return F(t.stores.location,Jo(e,t))}function Os(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function ks(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,G.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,G.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,G.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,G.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,G.jsx)(As,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function As({attrs:e,children:t,preventScriptHoist:n}){M();let r=ae(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(W.useEffect(()=>{if(!i){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();for(let e of document.querySelectorAll(`script[src]`))if(e.src===t)return;let n=document.createElement(`script`);return Os(n,e),document.head.appendChild(n),()=>n.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.querySelectorAll(`script:not([src])`)){if(!(e instanceof HTMLScriptElement))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,Os(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,G.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var js=e=>{let t=M(),n=t.options.ssr?.nonce,r=F(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),o),i=W.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:h(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),a=F(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),o),s=F(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=So(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:_o(e,`stylesheet`)??r.crossOrigin,suppressHydrationWarning:!0,nonce:n}})})}),i.inlineStyle&&a.push({tag:`style`,attrs:{...i.inlineStyle.attrs,nonce:n},children:i.inlineStyle.children,inlineCss:!0}),a):a},o),c=F(t.stores.matches,r=>{let i=[],a=t.ssr?.manifest;return a&&r.forEach(t=>{a.routes[t.routeId]?.preloads?.forEach(t=>{i.push({tag:`link`,attrs:{...yo(a,t,e),nonce:n}})})}),i},o),l=F(t.stores.matches,e=>e.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),o),u=F(t.stores.matches,e=>e.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),o),d=[];return xo(d,i),d.push(...c),xo(d,a),d.push(...s),xo(d,l),xo(d,u),d};function Ms(e){let t=js(e.assetCrossOrigin),n=M().options.ssr?.nonce;return(0,G.jsx)(G.Fragment,{children:t.map(e=>(0,W.createElement)(ks,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Ns=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ps=e(((e,t)=>{t.exports=Ns()})),Fs=e((e=>{var t=Ps(),n=r(),i=It();function a(e){var t=`https://react.dev/errors/`+e;if(1re||(e.current=ne[re],ne[re]=null,re--)}function F(e,t){re++,ne[re]=e.current,e.current=t}var oe=ie(null),se=ie(null),I=ie(null),ce=ie(null);function le(e,t){switch(F(I,t),F(se,e),F(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ud(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ud(t),e=Wd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ae(oe),F(oe,e)}function ue(){ae(oe),ae(se),ae(I)}function de(e){e.memoizedState!==null&&F(ce,e);var t=oe.current,n=Wd(t,e.type);t!==n&&(F(se,e),F(oe,n))}function fe(e){se.current===e&&(ae(oe),ae(se)),ce.current===e&&(ae(ce),ep._currentValue=te)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1)`:-1`)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ge(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Je(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.textContent,a=i.length;for(e=0;e=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=hn(),mn=pn=fn=null,Qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=V(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ft(e.document)}return t}function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Tr=ln&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,H=!1;function kr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;H||Er==null||Er!==Ft(r)||(r=Er,`selectionStart`in r&&wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Or&&br(Or,r)||(Or=r,r=Dd(Dr,`onSelect`),0>=o,i-=o,bi=1<<32-Le(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ki&&Si(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),ki&&Si(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ki&&Si(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),ki&&Si(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&xa(l)===r.type){n(e,r.sibling),c=i(r,o.props),Oa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=oi(o.type,o.key,o.props,null,e.mode,c),Oa(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ui(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=xa(o),b(e,r,o,c)}if(ee(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Da(o),c);if(o.$$typeof===x)return b(e,r,W(e,o),c);ka(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ea=0;var i=b(e,t,n,r);return Ta=null,i}catch(t){if(t===ha||t===_a)throw t;var a=ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ja=Aa(!0),Ma=Aa(!1),Na=!1;function Pa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ia(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Fl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=$r(e),Qr(e,null,n),t}return Yr(e,r,t,n),$r(e)}function Ra(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}function za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ba=!1;function Va(){if(Ba){var e=oa;if(e!==null)throw e}}function Ha(e,t,n,r){Ba=!1;var i=e.updateQueue;Na=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Ll&f)===f:(r&f)===f){f!==0&&f===aa&&(Ba=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Na=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ua(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Wa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=N.T,s={};N.T=s,Os(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ds(e,t,la(c,r),pu(e)):Ds(e,t,r,pu(e))}catch(n){Ds(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function _s(){}function vs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=ys(e).queue;gs(e,i,t,te,n===null?_s:function(){return bs(e),n(r)})}function ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bs(e){var t=ys(e);t.next===null&&(t=e.alternate.memoizedState),Ds(e,t.next.queue,{},pu())}function xs(){return Xi(ep)}function Ss(){return Eo().memoizedState}function Cs(){return Eo().memoizedState}function ws(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ia(n);var r=La(t,e,n);r!==null&&(hu(r,t,n),Ra(r,t,n)),t={cache:ta()},e.payload=t;return}t=t.return}}function Ts(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ks(e)?As(t,n):(n=Xr(e,t,n,r),n!==null&&(hu(n,e,r),js(n,t,r)))}function Es(e,t,n){Ds(e,t,n,pu())}function Ds(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ks(e))As(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,yr(s,o))return Yr(e,t,i,0),Il===null&&Jr(),!1}catch{}if(n=Xr(e,t,i,r),n!==null)return hu(n,e,r),js(n,t,r),!0}return!1}function Os(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ks(e)){if(t)throw Error(a(479))}else t=Xr(e,n,r,2),t!==null&&hu(t,e,2)}function ks(e){var t=e.alternate;return e===K||t!==null&&t===K}function As(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var Ms={readContext:Xi,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ms.useEffectEvent=go;var Ns={readContext:Xi,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:Xi,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ls.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){Ie(!0);try{n(t)}finally{Ie(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ts.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Es.bind(null,K,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ds,useDeferredValue:function(e,t){return ms(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=gs.bind(null,K,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=K,i=To();if(ki){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Il===null)throw Error(a(349));Ll&127||Io(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Il.identifierPrefix;if(ki){var n=xi,r=bi;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[ot]=t,o[st]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Id(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Dc(t)}}return Mc(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=I.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Di,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Ni(t,!0)}else e=Hd(e).createTextNode(r),e[ot]=t,t.stateNode=e}return Mc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[ot]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(no(t),t):(no(t),null);if(t.flags&128)throw Error(a(558))}return Mc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ii(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[ot]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),i=!1}else i=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(no(t),t):(no(t),null)}return no(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ac(t,t.updateQueue),Mc(t),null);case 4:return ue(),e===null&&Cd(t.stateNode.containerInfo),Mc(t),null;case 10:return Wi(t.type),Mc(t),null;case 19:if(ae(ro),r=t.memoizedState,r===null)return Mc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)jc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=io(e),o!==null){for(t.flags|=128,jc(r,!1),e=o.updateQueue,t.updateQueue=e,Ac(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ai(n,e),n=n.sibling;return F(ro,ro.current&1|2),ki&&Si(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>tu&&(t.flags|=128,i=!0,jc(r,!1),t.lanes=4194304)}else{if(!i)if(e=io(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Ac(t,e),jc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ki)return Mc(t),null}else 2*Te()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,jc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Mc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=ro.current,F(ro,i?n&1|2:n&1),ki&&Si(t,r.treeForkCount),e);case 22:case 23:return no(t),Ya(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mc(t),t.subtreeFlags&6&&(t.flags|=8192)):Mc(t),n=t.updateQueue,n!==null&&Ac(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ae(da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wi(ea),Mc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Pc(e,t){switch(Ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(ea),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(no(t),t.alternate===null)throw Error(a(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(no(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(ro),null;case 4:return ue(),null;case 10:return Wi(t.type),null;case 22:case 23:return no(t),Ya(),e!==null&&ae(da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wi(ea),null;case 25:return null;default:return null}}function Fc(e,t){switch(Ti(t),t.tag){case 3:Wi(ea),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&no(t);break;case 13:no(t);break;case 19:ae(ro);break;case 10:Wi(t.type);break;case 22:case 23:no(t),Ya(),e!==null&&ae(da);break;case 24:Wi(ea)}}function Ic(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Gu(t,t.return,e)}}function Lc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Rc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Wa(t,n)}catch(t){Gu(e,e.return,t)}}}function zc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function Bc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Gu(e,t,n)}}function Vc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Gu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Gu(e,t,n)}else n.current=null}function Hc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Gu(e,e.return,t)}}function Uc(e,t,n){try{var r=e.stateNode;Ld(r,e.type,n,t),r[st]=t}catch(t){Gu(e,e.return,t)}}function Wc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$d(e.type)||e.tag===4}function Gc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$d(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$t));else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Id(t,r,n),t[ot]=e,t[st]=n}catch(t){Gu(e,e.return,t)}}var Yc=!1,Xc=!1,Zc=!1,Qc=typeof WeakSet==`function`?WeakSet:Set,$c=null;function el(e,t){if(e=e.containerInfo,Bd=lp,e=Cr(e),wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Vd={focusedElem:e,selectionRange:n},lp=!1,$c=t;$c!==null;)if(t=$c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,$c=e;else for(;$c!==null;){switch(t=$c,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Id(o,r,n),o[ot]=e,yt(o),r=o;break a;case`link`:var s=Uf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=xr(s,h),v=xr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,N.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,Fl&6)throw Error(a(331));var c=Fl;if(Fl|=4,Al(o.current),Sl(o,o.current,s,n),Fl=c,ad(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{P.p=i,N.T=r,Vu(e,t)}}function Wu(e,t,n){t=fi(n,t),t=qs(e.stateNode,t,2),e=La(e,t,2),e!==null&&(Xe(e,2),id(e))}function Gu(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=fi(n,e),n=Js(2),r=La(t,n,2),r!==null&&(Ys(n,r,t,e),Xe(r,2),id(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Pl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Il===e&&(Ll&n)===n&&(Wl===4||Wl===3&&(Ll&62914560)===Ll&&300>Te()-$l?!(Fl&2)&&Su(e,0):ql|=n,Yl===Ll&&(Yl=0)),id(e)}function Ju(e,t){t===0&&(t=Je()),e=Zr(e,t),e!==null&&(Xe(e,t),id(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return xe(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=Ll,a=Ge(r,r===Il?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,ud(r,a));r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&qd()&&(e=rd);for(var t=Te(),n=null,r=Qu;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}iu!==0&&iu!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Rd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=Rt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),yt(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Rt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Rt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Rt(n.imageSizes)+`"]`)):i+=`[href="`+Rt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Rt(r)+`"][href="`+Rt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),yt(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=vt(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);yt(c),Id(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=vt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),yt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=vt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),yt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var i=(i=I.current)?vf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=vt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=vt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=vt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Mf(e){return`href="`+Rt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),yt(t),e.head.appendChild(t))}function If(e){return`[src="`+Rt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Rt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),Id(r,`style`,i),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Mf(n.href);var o=e.querySelector(Nf(i));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;r=Pf(n),(i=gf.get(i))&&Bf(r,i),o=(e.ownerDocument||e).createElement(`link`),yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(i=e.querySelector(Lf(o)))?(t.instance=i,yt(i),i):(r=n,(i=gf.get(o))&&(r=p({},n),Vf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),yt(i),Id(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,yt(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Fs()}))(),1),Ls=i(),Rs=(0,W.createContext)(void 0);function zs(e,t){try{let t=localStorage.getItem(e);if(t===`light`||t===`dark`||t===`system`)return t}catch{}return t}function Bs(e){let t=(0,Ls.c)(14),{children:n,defaultTheme:r,storageKey:i}=e,a=r===void 0?`dark`:r,o=i===void 0?`ui-theme`:i,s;t[0]!==a||t[1]!==o?(s=()=>zs(o,a),t[0]=a,t[1]=o,t[2]=s):s=t[2];let[c,l]=(0,W.useState)(s),u,d;t[3]===c?(u=t[4],d=t[5]):(u=()=>{let e=window.document.documentElement;if(e.classList.remove(`light`,`dark`),c===`system`){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;e.classList.add(t);return}e.classList.add(c)},d=[c],t[3]=c,t[4]=u,t[5]=d),(0,W.useEffect)(u,d);let f;t[6]===o?f=t[7]:(f=e=>{try{localStorage.setItem(o,e)}catch{}l(e)},t[6]=o,t[7]=f);let p;t[8]!==f||t[9]!==c?(p={theme:c,setTheme:f},t[8]=f,t[9]=c,t[10]=p):p=t[10];let m=p,h;return t[11]!==n||t[12]!==m?(h=(0,G.jsx)(Rs.Provider,{value:m,children:n}),t[11]=n,t[12]=m,t[13]=h):h=t[13],h}function Vs(){let e=(0,W.useContext)(Rs);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function Hs(e){return en(e.defaultTagName??`div`,e,e)}var Us=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ws=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Gs=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ks=e=>{let t=Gs(e);return t.charAt(0).toUpperCase()+t.slice(1)},qs={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Js=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ys=(0,W.createContext)({}),Xs=()=>(0,W.useContext)(Ys),Zs=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Xs()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...qs,width:t??l??qs.width,height:t??l??qs.height,stroke:e??f,strokeWidth:m,className:Us(`lucide`,p,i),...!a&&!Js(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Y=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(Zs,{ref:i,iconNode:t,className:Us(`lucide-${Ws(Ks(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ks(e),n},Qs=Y(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),$s=Y(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),ec=Y(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),tc=Y(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),nc=Y(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),rc=Y(`container`,[[`path`,{d:`M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z`,key:`1t2lqe`}],[`path`,{d:`M10 21.9V14L2.1 9.1`,key:`o7czzq`}],[`path`,{d:`m10 14 11.9-6.9`,key:`zm5e20`}],[`path`,{d:`M14 19.8v-8.1`,key:`159ecu`}],[`path`,{d:`M18 17.5V9.4`,key:`11uown`}]]),ic=Y(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),ac=Y(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),oc=Y(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),sc=Y(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),cc=Y(`id-card`,[[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`path`,{d:`M6.17 15a3 3 0 0 1 5.66 0`,key:`n6f512`}],[`circle`,{cx:`9`,cy:`11`,r:`2`,key:`yxgjnd`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]),lc=Y(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),uc=Y(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),dc=Y(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),fc=Y(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),pc=Y(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),mc=Y(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),hc=Y(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),gc=Y(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),_c=Y(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),vc=Y(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),yc=Y(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),bc=Y(`router`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,key:`w68u3i`}],[`path`,{d:`M6.01 18H6`,key:`19vcac`}],[`path`,{d:`M10.01 18H10`,key:`uamcmx`}],[`path`,{d:`M15 10v4`,key:`qjz1xs`}],[`path`,{d:`M17.84 7.17a4 4 0 0 0-5.66 0`,key:`1rif40`}],[`path`,{d:`M20.66 4.34a8 8 0 0 0-11.31 0`,key:`6a5xfq`}]]),xc=Y(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Sc=Y(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Cc=Y(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),wc=Y(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Tc=Y(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Ec=Y(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Dc=Y(`waypoints`,[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]),Oc=Y(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),kc=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),Ac={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jc={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Mc={disabled:!1,...jc},Nc={valid(e){return e===null?null:e?{[kc.valid]:``}:{[kc.invalid]:``}}},Pc={invalid:void 0,name:void 0,validityData:{state:Ac,errors:[],error:``,value:``,initialValue:null},setValidityData:tn,disabled:void 0,touched:jc.touched,setTouched:tn,dirty:jc.dirty,setDirty:tn,filled:jc.filled,setFilled:tn,focused:jc.focused,setFocused:tn,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Mc,markedDirtyRef:{current:!1},registerFieldControl:tn,validation:{getValidationProps:(e,t=Xt)=>t,inputRef:{current:null},registerInput:tn,commit:async()=>{},change:tn}},Fc=W.createContext(Pc);function Ic(e=!0){let t=W.useContext(Fc);if(t.setValidityData===tn&&!e)throw Error(an(28));return t}var Lc=W.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:tn,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function Rc(){return W.useContext(Lc)}var zc=W.createContext({controlId:void 0,registerControlId:tn,labelId:void 0,setLabelId:tn,messageIds:[],setMessageIds:tn,getDescriptionProps:e=>e});function Bc(){return W.useContext(zc)}function Vc(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=Bc(),o=Ar(t),s=n?i:void 0,c=$t(()=>Symbol(`labelable-control`)),l=W.useRef(!1),u=W.useRef(t!=null),d=Cr(()=>{!l.current||a===tn||(l.current=!1,a(c.current,void 0))});return V(()=>{if(a===tn)return;let e;if(n){let n=r?.current;e=H(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),W.useEffect(()=>d,[d]),i??o}function Hc(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Uc,platform:Wc,maxTouchPoints:Gc}=Hc(),Kc=Uc.toLowerCase(),qc=Wc.toLowerCase(),Jc=/^i(os$|p)/.test(qc)||qc===`macintel`&&Gc>1,Yc=`android`,Xc=qc===Yc||Kc.includes(Yc),Zc=!Jc&&qc.startsWith(`mac`);qc.startsWith(`win`),!Xc&&/^(linux|chrome os)/.test(qc);var Qc=Zc||Jc,$c=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!$c&&Kc.includes(`firefox`),!$c&&Kc.includes(`chrom`);var el=Qc,tl=/jsdom|happydom/.test(Kc),nl=`data-base-ui-focusable`,rl=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,il=`ArrowLeft`,al=`ArrowRight`,ol=`ArrowUp`,sl=`ArrowDown`;function cl(e,t){if(!H(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(U(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function ll(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function ul(e){return e.matches(`html,body`)}function dl(e){return pr(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function fl(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${rl}`)!=null}function pl(e){return e?e.getAttribute(`role`)===`combobox`&&dl(e):!1}function ml(e){if(!e||tl)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function hl(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function gl(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...gl(e,t.id,n)])}function _l(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function vl(e){e.preventDefault(),e.stopPropagation()}function yl(e){return`nativeEvent`in e}function bl(e){return e.pointerType===``&&e.isTrusted?!0:Xc&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function xl(e){return tl?!1:!Xc&&e.width===0&&e.height===0||Xc&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Sl(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Cl(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var wl=[`top`,`right`,`bottom`,`left`],Tl=Math.min,El=Math.max,Dl=Math.round,Ol=Math.floor,kl=e=>({x:e,y:e}),Al={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function jl(e,t,n){return El(e,Tl(t,n))}function Ml(e,t){return typeof e==`function`?e(t):e}function Nl(e){return e.split(`-`)[0]}function Pl(e){return e.split(`-`)[1]}function Fl(e){return e===`x`?`y`:`x`}function Il(e){return e===`y`?`height`:`width`}function X(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ll(e){return Fl(X(e))}function Rl(e,t,n){n===void 0&&(n=!1);let r=Pl(e),i=Ll(e),a=Il(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ql(o)),[o,ql(o)]}function zl(e){let t=ql(e);return[Bl(e),t,Bl(t)]}function Bl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Vl=[`left`,`right`],Hl=[`right`,`left`],Ul=[`top`,`bottom`],Wl=[`bottom`,`top`];function Gl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Hl:Vl:t?Vl:Hl;case`left`:case`right`:return t?Ul:Wl;default:return[]}}function Kl(e,t,n,r){let i=Pl(e),a=Gl(Nl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Bl)))),a}function ql(e){let t=Nl(e);return Al[t]+e.slice(t.length)}function Jl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Jl(e)}function Xl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Zl(e,t){return t<0||t>=e.length}function Ql(e,t){return eu(e.current,{disabledIndices:t})}function $l(e,t){return eu(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function eu(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&tu(e,a,r));return a}function tu(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?ru(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function nu(e){return e.visibility===`hidden`||e.visibility===`collapse`}function ru(e,t=e?vr(e):null){return!e||!e.isConnected||!t||nu(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var iu=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function au(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Dr(n)?n.host:null}function ou(e){for(let t of Array.from(e.children))if(xr(t)===`summary`)return t;return null}function su(e,t){let n=ou(t);return!!n&&(e===n||U(n,e))}function cu(e){let t=e?xr(e):``;return e!=null&&e.matches(iu)&&(t!==`summary`||e.parentElement!=null&&xr(e.parentElement)===`details`&&ou(e.parentElement)===e)&&(t!==`details`||ou(e)==null)&&(t!==`input`||e.type!==`hidden`)}function lu(e){if(!cu(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=au(t)){let n=t!==e,r=xr(t)===`slot`;if(t.hasAttribute(`inert`)||n&&xr(t)===`details`&&!t.open&&!su(e,t)||t.hasAttribute(`hidden`)||!r&&!uu(t,n))return!1}return!0}function uu(e,t){let n=vr(e);return t?n.display!==`none`:ru(e,n)}function du(e){let t=e.tabIndex;if(t<0){let t=xr(e);if(t===`details`||t===`audio`||t===`video`||pr(e)&&e.isContentEditable)return 0}return t}function fu(e){if(xr(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function pu(e,t){let n=fu(e);if(!n)return!0;let r=t.find(e=>{let t=fu(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=fu(e);return t?.name===n.name&&t.form===n.form})===n}function mu(e){if(pr(e)&&xr(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return pr(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function hu(e,t){mu(e).forEach(e=>{cu(e)&&t.push(e),hu(e,t)})}function gu(e,t,n){mu(e).forEach(e=>{pr(e)&&e.matches(t)&&n.push(e),gu(e,t,n)})}function _u(e){return lu(e)&&du(e)>=0}function vu(e){let t=[];return hu(e,t),t.filter(lu)}function yu(e){let t=vu(e);return t.filter(e=>du(e)>=0&&pu(e,t))}function bu(e,t){let n=yu(e),r=n.length;if(r===0)return;let i=Ur(Wr(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function xu(e){return bu(Wr(e).body,1)||e}function Su(e){return bu(Wr(e).body,-1)||e}function Cu(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!U(n,r)}function wu(e){yu(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Tu(e){let t=[];gu(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var Eu=[];function Du(e){W.useEffect(e,Eu)}var Ou=0,ku=class e{static create(){return new e}currentId=Ou;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ou,t()},e)}isStarted(){return this.currentId!==Ou}clear=()=>{this.currentId!==Ou&&(clearTimeout(this.currentId),this.currentId=Ou)};disposeEffect=()=>this.clear};function Au(){let e=$t(ku.create).current;return Du(e.disposeEffect),e}var ju=null;globalThis.requestAnimationFrame;var Mu=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},Nu=class e{static create(){return new e}static request(e){return Mu.request(e)}static cancel(e){return Mu.cancel(e)}currentId=ju;request(e){this.cancel(),this.currentId=Mu.request(()=>{this.currentId=ju,e()})}cancel=()=>{this.currentId!==ju&&(Mu.cancel(this.currentId),this.currentId=ju)};disposeEffect=()=>this.cancel};function Pu(){let e=$t(Nu.create).current;return Du(e.disposeEffect),e}function Fu(e){return e==null?e:`current`in e?e.current:e}var Iu=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),Lu={[Iu.startingStyle]:``},Ru={[Iu.endingStyle]:``},zu={transitionStatus(e){return e===`starting`?Lu:e===`ending`?Ru:null}},Bu=n(It(),1);function Vu(e,t=!1,n=!0){let r=Pu();return Cr((i,a=null)=>{r.cancel();let o=Fu(e);if(o==null)return;let s=o,c=()=>{Bu.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=Iu.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Hu(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=Cr(i),o=Vu(r,n,!1);W.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function Uu(e,t=!1,n=!1){let[r,i]=W.useState(e&&t?`idle`:void 0),[a,o]=W.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),V(()=>{if(!e&&a&&r!==`ending`&&n){let e=Nu.request(()=>{i(`ending`)});return()=>{Nu.cancel(e)}}},[e,a,r,n]),V(()=>{if(!e||t)return;let n=Nu.request(()=>{i(void 0)});return()=>{Nu.cancel(n)}},[t,e]),V(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=Nu.request(()=>{i(`idle`)});return()=>{Nu.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}function Wu({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=W.useRef(e!==void 0),[a,o]=W.useState(t);return[i?e:a,W.useCallback(e=>{i||o(e)},[])]}function Gu(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Ic(),s=W.useRef(null);s.current||=Symbol(),V(()=>{let c=s.current;if(!(!c||!i))return o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}),()=>{o(c,void 0)}},[e,i,r,t,a,o,n])}var Ku=W.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=Ic(),{clearErrors:C}=Rc(),w=h||s,T=m??a,E={...p,disabled:w},{labelId:D}=Bc(),O=Vc({id:i});V(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let k=W.useRef(null);V(()=>{u&&k.current===Ur(Wr(k.current))&&y(!0)},[u,y]);let[A]=Wu({controlled:o,default:l,name:`FieldControl`,state:`value`}),j=o!==void 0,M=j?A:void 0,ee=Cr(()=>S.inputRef.current?.value);return Gu(S.inputRef,O,M,ee,!w,a),en(`input`,e,{ref:[t,k],state:E,props:[{id:O,disabled:w,name:T,ref:S.inputRef,"aria-labelledby":D,autoFocus:u,...j?{value:M}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,Hr(Nr,e.nativeEvent)),_(t!==v.initialValue),b(t!==``),e.nativeEvent.defaultPrevented||(C(T),S.change(t))},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},f,e=>S.getValidationProps(w,e)],stateAttributesMapping:Nc})}),qu=W.forwardRef(function(e,t){return(0,G.jsx)(Ku,{ref:t,...e})});function Ju(e){let t=(0,Ls.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=Cn(`h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground autofill:[-webkit-text-fill-color:var(--color-foreground)] autofill:[transition:background-color_9999s_ease-in-out_0s] focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,G.jsx)(qu,{className:a,"data-slot":`input`,type:i,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}var Yu=W.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return en(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function Xu(e){let t=(0,Ls.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`horizontal`:i,o;t[4]===n?o=t[5]:(o=Cn(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,G.jsx)(Yu,{className:o,"data-slot":`separator`,orientation:a,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}var Zu=W.createContext(!1),Qu=W.createContext(void 0);function $u(e){let t=W.useContext(Qu);if(e===!1&&t===void 0)throw Error(an(27));return t}var ed=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Iu.startingStyle]=`startingStyle`,e[e.endingStyle=Iu.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),td=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),nd={[td.popupOpen]:``},rd={[td.popupOpen]:``,[td.pressed]:``},id={[ed.open]:``},ad={[ed.closed]:``},od={[ed.anchorHidden]:``},sd={open(e){return e?nd:null}},cd={open(e){return e?rd:null}},ld={open(e){return e?id:ad},anchorHidden(e){return e?od:null}},ud={...ld,...zu},dd=W.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=$u(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return en(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:ud,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),fd=W.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{store:c}=$u(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=Sr({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Hr(Br,e.nativeEvent))}return en(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),pd=W.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=$u(),c=Ar(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),en(`p`,e,{ref:t,props:[{id:c},o]})});function md(e,t){return t!=null&&!Sl(t)?0:typeof e==`function`?e():e}function hd(e,t,n){let r=md(e,n);return typeof r==`number`?r:r?.[t]}function gd(e){return typeof e==`function`?e():e}function _d(e,t){return t||e===`click`||e===`mousedown`}function vd(e){return e?.includes(`mouse`)&&e!==`mousedown`}var yd=W.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ku,currentIdRef:{current:null},currentContextRef:{current:null}});function bd(e,t){e.current=t.current}function xd(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=W.useRef(n),a=W.useRef(n),o=W.useRef(null),s=W.useRef(null),c=Au();return V(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:hd(i.current,`open`),close:hd(n,`close`)}},[n,o,i,a]),(0,G.jsx)(yd.Provider,{value:W.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function Sd(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=W.useContext(yd),[f,p]=W.useState(!1),m=W.useRef(n),h=W.useRef(!1);return V(()=>{m.current=n},[n]),V(()=>()=>{h.current=!0},[]),V(()=>{function e(){h.current||p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current,d.clear()}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{(m.current||a.current!==t)&&d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),V(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:hd(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Hr(Nr))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),V(()=>()=>{if(a.current===i){if(l.current=null,!m.current)return;a.current=null,bd(o,c),d.clear()}},[l,a,o,i,c,d]),W.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function Z(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cd(...e){return()=>{for(let t=0;t{t.current=t.next}};return t}var Ed={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Dd={...Ed,position:`fixed`,top:0,left:0},Od={...Ed,position:`absolute`},kd=W.forwardRef(function(e,t){let[n,r]=W.useState();V(()=>{el&&$c&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:Dd,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function Ad(e){return`data-base-ui-${e}`}var jd=0;function Md(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(jd);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),tn;let o=requestAnimationFrame(a);return jd=o,()=>{jd===o&&(cancelAnimationFrame(o),jd=0)}}var Nd={inert:new WeakMap,"aria-hidden":new WeakMap},Pd=`data-base-ui-inert`,Fd={inert:new WeakSet,"aria-hidden":new WeakSet},Id=new WeakMap,Ld=0;function Rd(e){return Fd[e]}function zd(e){return e?Dr(e)?e.host:zd(e.parentNode):null}var Bd=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=zd(t);return e.contains(n)?n:null}).filter(e=>e!=null),Vd=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Hd=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{xr(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Ud(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Bd(t,e),l=i?Hd(t,Vd(c),new Set(c)):[],u=[],d=[];if(a){let e=Nd[a],n=Rd(a);s=n,o=e;let r=Bd(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);Hd(t,Vd(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(Id.get(e)||0)+1;Id.set(e,t),d.push(e),t===1&&e.setAttribute(Pd,``)}),Ld+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(Id.get(e)||0)-1;Id.set(e,t),t||e.removeAttribute(Pd)}),--Ld,Ld||(Nd.inert=new WeakMap,Nd[`aria-hidden`]=new WeakMap,Fd.inert=new WeakSet,Fd[`aria-hidden`]=new WeakSet,Id=new WeakMap)}}function Wd(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=Wr(e[0]).body;return Ud(e,a,n,r,{mark:i})}var Gd={style:{transition:`none`}},Kd={fallbackAxisSide:`none`},qd={fallbackAxisSide:`end`},Jd={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Yd=W.createContext(null),Xd=()=>W.useContext(Yd),Zd=Ad(`portal`);function Qd(e={}){let{ref:t,container:n,componentProps:r=Xt,elementProps:i}=e,a=kr(),o=Xd()?.portalNode,[s,c]=W.useState(null),[l,u]=W.useState(null),d=Cr(e=>{e!==null&&u(e)}),f=W.useRef(null);V(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(ur(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=en(`div`,r,{ref:[t,d],props:[{id:a,[Zd]:``},i]});return{portalNode:l,portalSubtree:s&&p?Bu.createPortal(p,s):null}}var $d=W.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=Qd({container:o,ref:t,componentProps:e,elementProps:c}),d=W.useRef(null),f=W.useRef(null),p=W.useRef(null),m=W.useRef(null),[h,g]=W.useState(null),_=W.useRef(!1),v=h?.modal,y=h?.open,b=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;W.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&Cu(e)&&(e.type===`focusin`?_.current&&=(Tu(l),!1):(wu(l),_.current=!0))}return Cd(Z(l,`focusin`,e,!0),Z(l,`focusout`,e,!0))},[l,v]),V(()=>{!l||y!==!0||!_.current||(Tu(l),_.current=!1)},[y,l]);let x=W.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,G.jsxs)(W.Fragment,{children:[u,(0,G.jsxs)(Yd.Provider,{value:x,children:[b&&l&&(0,G.jsx)(kd,{"data-type":`outside`,ref:d,onFocus:e=>{Cu(e,l)?p.current?.focus():Su(h?h.domReference:null)?.focus()}}),b&&l&&(0,G.jsx)(`span`,{"aria-owns":l.id,style:Jd}),l&&Bu.createPortal(a,l),b&&l&&(0,G.jsx)(kd,{"data-type":`outside`,ref:f,onFocus:e=>{Cu(e,l)?m.current?.focus():(xu(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Hr(`focus-out`,e.nativeEvent)))}})]})]})});function ef(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var tf=W.createContext(null),nf=W.createContext(null),rf=()=>W.useContext(tf)?.id||null,af=e=>{let t=W.useContext(nf);return e??t};function of(e,t){let n=fr(Mr(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var sf=20,cf=[];function lf(){cf=cf.filter(e=>e.deref()?.isConnected)}function uf(e){lf(),e&&xr(e)!==`body`&&(cf.push(new WeakRef(e)),cf.length>sf&&(cf=cf.slice(-20)))}function df(){return lf(),cf[cf.length-1]?.deref()}function ff(e){return e?_u(e)?e:yu(e)[0]||e:null}function pf(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=vu(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return _u(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function mf(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=Cr(()=>b.current.floatingContext?.nodeId),S=i===!1,C=pl(_)&&S,w=wd(i),T=wd(a),E=wd(l),D=wd(g),O=af(p),k=Xd(),A=W.useRef(!1),j=W.useRef(!1),M=W.useRef(!1),ee=W.useRef(null),N=W.useRef(``),P=W.useRef(``),te=W.useRef(null),ne=W.useRef(null),re=Zt(te,f,k?.beforeInsideRef),ie=Zt(ne,k?.afterInsideRef),ae=Au(),F=Au(),oe=Pu(),se=k!=null,I=hl(v),ce=Cr((e=I)=>e?yu(e):[]),le=Cr(()=>m?.().filter(e=>e!=null)??[]);W.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&U(I,Ur(Wr(I)))&&ce().length===0&&!C&&vl(e)}return Z(Wr(I),`keydown`,e)},[r,I,s,C,ce]),W.useEffect(()=>{if(r||!g)return;let e=Wr(I);function t(){M.current=!1}function n(e){let t=Mr(e),n=le();M.current=!(U(v,t)||U(_,t)||U(k?.portalNode,t)||n.some(e=>e===t||U(e,t))),P.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(j.current=!0,F.start(0,()=>{j.current=!1}))}function i(){P.current=`keyboard`}return Cd(Z(e,`pointerdown`,n,!0),Z(e,`pointerup`,t,!0),Z(e,`pointercancel`,t,!0),Z(e,`keydown`,i,!0),t)},[r,v,_,I,g,k,F,le]),W.useEffect(()=>{if(r||!c)return;let e=Wr(I);function t(){j.current=!0,F.start(0,()=>{j.current=!1})}function n(e){let t=Mr(e);_u(t)&&(ee.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Mr(t);s&&n==null&&i!=null&&U(v,i)&&uf(i),queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=le(),f=n?.hasAttribute(Ad(`focus-guard`))&&[te.current,ne.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,Fu(d),Fu(u)].includes(n),p=!(U(_,n)||U(v,n)||U(n,v)||U(k?.portalNode,n)||l.some(e=>e===n||U(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>U(e,n))||f||O&&(gl(O.nodesRef.current,a).find(e=>U(e.context?.elements.floating,n)||U(e.context?.elements.domReference,n))||_l(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,hl(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&I&&pf(I),o&&r!==_&&!ru(i)&&Ur(e)===e.body){if(pr(I)&&(I.focus(),o===`popup`)){oe.request(()=>{I.focus()});return}let e=ce(),t=ee.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||I;pr(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!j.current&&(C||n!==df())&&(A.current=!0,h.setOpen(!1,Hr(Rr,t)))})}function a(){M.current||(b.current.insideReactTree=!0,ae.start(0,()=>{b.current.insideReactTree=!1}))}let l=pr(_)?_:null;if(!(!v&&!l))return Cd(l&&Z(l,`focusout`,i),l&&Z(l,`pointerdown`,t),v&&Z(v,`focusin`,n),v&&Z(v,`focusout`,i),v&&k&&Z(v,`focusout`,a,!0))},[r,_,v,I,s,O,k,h,c,o,ce,C,x,b,ae,F,oe,u,d,le]),W.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${Ad(`portal`)}]`)||[]),t=(O?_l(O.nodesRef.current,x()):[]).find(e=>pl(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Wd([v,...e,te.current,ne.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...le(),t,Fu(d),Fu(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=Wd([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,le]),V(()=>{if(!g||r||!pr(I))return;let e=Wr(I),t=Ur(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(E.current||``):n;if(r===void 0||r===!1||U(I,t))return;let i=null,a=()=>(i??=ce(I),i[0]||I),o;o=r===!0||r===null?a():Fu(r),o||=a();let s=U(I,Ur(e));Md(o,{preventScroll:o===I,shouldFocus(){if(!D.current)return!1;if(s)return!0;let t=Ur(e);return!(t!==o&&U(I,t))}})})},[r,g,I,ce,w,E,D]),V(()=>{if(r||!I)return;let e=Wr(I),t=Ur(e),n=E.current==null;uf(t);function i(e){if(e.open||(N.current=of(e.nativeEvent,P.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===`outside-press`)if(e.nested)A.current=!1;else if(bl(e.nativeEvent)||xl(e.nativeEvent))A.current=!1;else{let e=!1;Wr(I).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}y.on(`openchange`,i);function a(){let e=T.current,r=typeof e==`function`?e(N.current):e;if(r===void 0||r===!1)return null;r===null&&(r=!0);let i=_?.isConnected?_:null,a=t?.isConnected&&xr(t)!==`body`?t:null,o=n?a||i:i||a;return o||=df()||null,typeof r==`boolean`?o:Fu(r)||o||null}return()=>{y.off(`openchange`,i);let t=Ur(e),n=le(),r=U(v,t)||n.some(e=>e===t||U(e,t))||O&&gl(O.nodesRef.current,x(),!1).some(e=>U(e.context?.elements.floating,t)),o=T.current,s=a();queueMicrotask(()=>{let n=ff(s),i=typeof o!=`boolean`;o&&!A.current&&pr(n)&&(!(!i&&n!==t&&t!==e.body)||r)&&n.focus({preventScroll:!0}),A.current=!1})}},[r,v,I,T,E,y,O,_,x,le]),V(()=>{if(!$c||g||!v)return;let e=Ur(Wr(v));!pr(e)||!dl(e)||U(v,e)&&e.blur()},[g,v]),V(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),V(()=>{if(!(r||!I))return pf(I),()=>{queueMicrotask(lf)}},[r,I]);let ue=!r&&(s?!C:!0)&&(se||s);return(0,G.jsxs)(W.Fragment,{children:[ue&&(0,G.jsx)(kd,{"data-type":`inside`,ref:re,onFocus:e=>{if(s){let e=ce();Md(e[e.length-1])}else k?.portalNode&&(A.current=!1,Cu(e,k.portalNode)?xu(_)?.focus():Fu(d??k.beforeOutsideRef)?.focus())}}),n,ue&&(0,G.jsx)(kd,{"data-type":`inside`,ref:ie,onFocus:e=>{s?Md(ce()[0]):k?.portalNode&&(c&&(A.current=!0),Cu(e,k.portalNode)?Su(_)?.focus():Fu(u??k.afterOutsideRef)?.focus())}})]})}function hf(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function gf(e){return e!=null&&e.clientX!=null}function _f(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=W.useRef(!1),u=W.useRef(null),[d,f]=W.useState(),[p,m]=W.useState([]),h=Cr(e=>{i.set(`positionReference`,e)}),g=Cr((e,t,n)=>{l.current||c.current.openEvent&&!gf(c.current.openEvent)||i.set(`positionReference`,hf(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=Cr(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=Sl(d)?o:a;W.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=fr(o);function r(t){U(o,Mr(t))?e():g(t.clientX,t.clientY)}return!c.current.openEvent||gf(c.current.openEvent)?u.current=Z(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),W.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),W.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),W.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=W.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return W.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}function vf(){return!1}function yf(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function bf(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=vf,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:f}=l.context,p=af(c),m=Cr(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=Cr(()=>a),{escapeKey:v,outsidePress:y}=yf(s),b=W.useRef(!1),x=W.useRef(!1),S=W.useRef(!1),C=W.useRef(!1),w=W.useRef(``),T=W.useRef(null),E=Au(),D=Au(),O=Cr(()=>{D.clear(),f.current.insideReactTree=!1}),k=Cr(e=>{let t=f.current.floatingContext?.nodeId;return(p?gl(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),A=Cr(e=>ll(e,l.select(`floatingElement`))||ll(e,l.select(`domReferenceElement`))),j=Cr(e=>{o()&&l.setOpen(!1,Hr(Pr,e.nativeEvent))}),M=Cr(e=>{if(!u||!n||!r||e.key!==`Escape`||C.current||!v&&k(`__escapeKeyBubbles`))return;let t=Hr(jr,yl(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!v&&!t.isPropagationAllowed&&e.stopPropagation()}),ee=Cr(()=>{f.current.insideReactTree=!0,D.start(0,O)}),N=Cr(e=>{if(!u||!n||e.button!==0)return;let t=Mr(e.nativeEvent);U(l.select(`floatingElement`),t)&&(b.current||(b.current=!0,x.current=!1))}),P=Cr(e=>{!u||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});W.useEffect(()=>{if(!u||!n)return;f.current.__escapeKeyBubbles=v,f.current.__outsidePressBubbles=y;let e=new ku,t=new ku;function i(){e.clear(),C.current=!0}function a(){e.start($c?5:0,()=>{C.current=!1})}function o(){S.current=!0,t.start(0,()=>{S.current=!1})}function s(){b.current=!1,x.current=!1}function c(){let e=w.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function D(e){let t=f.current.floatingContext?.nodeId,n=p&&gl(p.nodesRef.current,t).some(t=>ll(e,t.context?.elements.floating));return A(e)||n}function j(e){if(m(e)){e.type!==`click`&&!A(e)&&(t.clear(),S.current=!1),O();return}if(f.current.insideReactTree){O();return}let n=Mr(e),r=`[${Ad(`inert`)}]`,i=H(n)?n.getRootNode():null,a=Array.from((Dr(i)?i:Wr(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>U(e,n))))return;let s=H(n)?n:null;for(;s&&!Or(s);){let e=gr(s);if(Or(e)||!H(e))break;s=e}if(!(a.length&&H(n)&&!ul(n)&&!U(n,l.select(`floatingElement`))&&a.every(e=>!U(s,e)))){if(pr(n)&&!(`touches`in e)){let t=Or(n),r=vr(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!D(e)){if(c()===`intentional`&&S.current){t.clear(),S.current=!1;return}typeof h==`function`&&!h(e)||k(`__outsidePressBubbles`)||(l.setOpen(!1,Hr(zr,e)),O())}}}function ee(e){c()!==`sloppy`||e.pointerType===`touch`||!l.select(`open`)||!n||A(e)||j(e)}function N(e){if(c()!==`sloppy`||!l.select(`open`)||!n||A(e))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function P(e,t){let n=Mr(e);if(!n)return;let r=Z(n,e.type,()=>{t(e),r()})}function te(e){w.current=`touch`,P(e,N)}function ne(e){E.clear(),e.type===`pointerdown`&&(w.current=e.pointerType),!(e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)&&P(e,e=>{e.type===`pointerdown`?ee(e):j(e)})}function re(e){if(!b.current)return;let n=x.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!D(e)){if(n){o();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,O())}}}function ie(e){if(c()!==`sloppy`||!T.current||A(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-T.current.startX),r=Math.abs(t.clientY-T.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(T.current.dismissOnTouchEnd=!0),i>10&&(j(e),E.clear(),T.current=null)}function ae(e){P(e,ie)}function F(e){c()!==`sloppy`||!T.current||A(e)||(T.current.dismissOnTouchEnd&&j(e),E.clear(),T.current=null)}function oe(e){P(e,F)}let se=Wr(d),I=Cd(r&&Cd(Z(se,`keydown`,M),Z(se,`compositionstart`,i),Z(se,`compositionend`,a)),g&&Cd(Z(se,`click`,ne,!0),Z(se,`pointerdown`,ne,!0),Z(se,`pointerup`,re,!0),Z(se,`pointercancel`,re,!0),Z(se,`mousedown`,ne,!0),Z(se,`mouseup`,re,!0),Z(se,`touchstart`,te,!0),Z(se,`touchmove`,ae,!0),Z(se,`touchend`,oe,!0)));return()=>{I(),e.clear(),t.clear(),s(),S.current=!1}},[f,d,r,g,h,u,n,v,y,M,O,_,k,A,p,l,E]),W.useEffect(O,[h,O]);let te=W.useMemo(()=>({onKeyDown:M,onPointerDown:j,onClick:j}),[M,j]),ne=W.useMemo(()=>({onKeyDown:M,onPointerDown:P,onMouseDown:P,onClickCapture:ee,onMouseDownCapture(e){ee(),N(e)},onPointerDownCapture(e){ee(),N(e)},onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[M,ee,N,P]);return W.useMemo(()=>n?{reference:te,floating:ne,trigger:te}:{},[n,te,ne])}function xf(e,t,n){let{reference:r,floating:i}=e,a=X(t),o=Ll(t),s=Il(o),c=Nl(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Pl(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Sf(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ml(t,e),p=Yl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Xl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Xl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Cf=50,wf=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Sf},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=xf(l,r,c),f=r,p=0,m={};for(let n=0;ne<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==X(t))||T.every(e=>X(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=X(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ef(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Df(e){return wl.some(t=>e[t]>=0)}var Of=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ml(e,t);switch(i){case`referenceHidden`:{let e=Ef(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Df(e)}}}case`escaped`:{let e=Ef(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Df(e)}}}default:return{}}}}},kf=new Set([`left`,`top`]);async function Af(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Nl(n),s=Pl(n),c=X(n)===`y`,l=kf.has(o)?-1:1,u=a&&c?-1:1,d=Ml(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var jf=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Af(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Mf=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ml(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=X(Nl(i)),p=Fl(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=jl(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=jl(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Nf=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ml(e,t),u={x:n,y:r},d=X(i),f=Fl(d),p=u[f],m=u[d],h=Ml(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=kf.has(Nl(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},Pf=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ml(e,t),u=await o.detectOverflow(t,l),d=Nl(i),f=Pl(i),p=X(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Tl(h-u[g],v),x=Tl(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=El(u.left,0),t=El(u.right,0),n=El(u.top,0),r=El(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:El(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:El(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Ff(e){let t=vr(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=pr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Dl(n)!==a||Dl(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function If(e){return H(e)?e:e.contextElement}function Lf(e){let t=If(e);if(!pr(t))return kl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ff(t),o=(a?Dl(n.width):n.width)/r,s=(a?Dl(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Rf=kl(0);function zf(e){let t=fr(e);return!cr()||!t.visualViewport?Rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fr(e)?!1:t}function Vf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=If(e),o=kl(1);t&&(r?H(r)&&(o=Lf(r)):o=Lf(e));let s=Bf(a,n,r)?zf(a):kl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=fr(a),t=r&&H(r)?fr(r):r,n=e,i=hr(n);for(;i&&r&&t!==n;){let e=Lf(i),t=i.getBoundingClientRect(),r=vr(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=fr(i),i=hr(n)}}return Xl({width:u,height:d,x:c,y:l})}function Hf(e,t){let n=yr(e).scrollLeft;return t?t.left+n:Vf(mr(e)).left+n}function Uf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Hf(e,n),y:n.top+t.scrollTop}}function Wf(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=mr(r),s=t?lr(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=kl(1),u=kl(0),d=pr(r);if((d||!d&&!a)&&((xr(r)!==`body`||sr(o))&&(c=yr(r)),d)){let e=Vf(r);l=Lf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Uf(o,c):kl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Gf(e){return Array.from(e.getClientRects())}function Kf(e){let t=mr(e),n=yr(e),r=e.ownerDocument.body,i=El(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=El(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Hf(e),s=-n.scrollTop;return vr(r).direction===`rtl`&&(o+=El(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var qf=25;function Jf(e,t){let n=fr(e),r=mr(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=cr();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Hf(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=qf&&(a-=o)}else l<=qf&&(a+=l);return{width:a,height:o,x:s,y:c}}function Yf(e,t){let n=Vf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=pr(e)?Lf(e):kl(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Xf(e,t,n){let r;if(t===`viewport`)r=Jf(e,n);else if(t===`document`)r=Kf(mr(e));else if(H(t))r=Yf(t,n);else{let n=zf(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Xl(r)}function Zf(e,t){let n=gr(e);return n===t||!H(n)||Or(n)?!1:vr(n).position===`fixed`||Zf(n,t)}function Qf(e,t){let n=t.get(e);if(n)return n;let r=_r(e,[],!1).filter(e=>H(e)&&xr(e)!==`body`),i=null,a=vr(e).position===`fixed`,o=a?gr(e):e;for(;H(o)&&!Or(o);){let t=vr(o),n=Er(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||sr(o)&&!n&&Zf(e,o))?r=r.filter(e=>e!==o):i=t,o=gr(o)}return t.set(e,r),r}function $f(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?lr(t)?[]:Qf(t,this._c):[].concat(n),r],o=Xf(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{o(!1,1e-7)},1e3)}n===1&&!cp(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function up(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=If(e),u=i||a?[...l?_r(l):[],...t?_r(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?lp(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Vf(e):null;c&&g();function g(){let t=Vf(e);h&&!cp(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var dp=jf,fp=Mf,pp=Tf,mp=Pf,hp=Of,gp=Nf,_p=(e,t,n)=>{let r=new Map,i={platform:sp,...n},a={...i.platform,_c:r};return wf(e,t,{...i,platform:a})},vp=typeof document<`u`?W.useLayoutEffect:function(){};function yp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!yp(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function bp(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xp(e,t){let n=bp(e);return Math.round(t*n)/n}function Sp(e){let t=W.useRef(e);return vp(()=>{t.current=e}),t}function Cp(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);yp(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=Sp(c),D=Sp(i),O=Sp(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),_p(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!yp(w.current,t)&&(w.current=t,Bu.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);vp(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);vp(()=>(A.current=!0,()=>{A.current=!1}),[]),vp(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=W.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=xp(M.floating,u.x),r=xp(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...bp(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var wp=(e,t)=>{let n=dp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tp=(e,t)=>{let n=fp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ep=(e,t)=>({fn:gp(e).fn,options:[e,t]}),Dp=(e,t)=>{let n=pp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Op=(e,t)=>{let n=mp(e);return{name:n.name,fn:n.fn,options:[e,t]}},kp=(e,t)=>{let n=hp(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ap(e){let t=W.useRef(!0);t.current&&(t.current=!1,e())}var Q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(an(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},jp=[],Mp=void 0;function Np(){return Mp}function Pp(e){jp.push(e)}function Fp(e){let t=(t,n)=>{let r=$t(Lp).current,i;try{Mp=r;for(let e of jp)e.before(r);i=e(t,n);for(let e of jp)e.after(r);r.didInitialize=!0}finally{Mp=void 0}return i};return t.displayName=e.displayName||e.name,t}function Ip(e){return W.forwardRef(Fp(e))}function Lp(){return{didInitialize:!1}}var Rp=ie(),zp=ne(),Bp=nn(19)?Up:Wp;function Vp(e,t,n,r,i){return Bp(e,t,n,r,i)}function Hp(e,t,n,r,i){let a=W.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Rp.useSyncExternalStore)(e.subscribe,a,a)}Pp({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Rp.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Up(e,t,n,r,i){let a=Np();if(!a)return Hp(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Wp(e,t,n,r,i){return(0,zp.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Gp=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Vp(this,e,t,n,r)}},Kp=class extends Gp{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){W.useDebugValue(e);let n=this;V(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;V(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;V(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){W.useDebugValue(e);let n=this,r=t!==void 0;V(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return W.useDebugValue(e),Vp(this,this.selectors[e],t,n,r)}useContextCallback(e,t){W.useDebugValue(e);let n=Cr(t??tn);this.context[e]=n}useStateSetter(e){let t=W.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},qp={open:Q(e=>e.open),transitionStatus:Q(e=>e.transitionStatus),domReferenceElement:Q(e=>e.domReferenceElement),referenceElement:Q(e=>e.positionReference??e.referenceElement),floatingElement:Q(e=>e.floatingElement),floatingId:Q(e=>e.floatingId)},Jp=class extends Kp{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:ef(),nested:n,triggerElements:i},qp),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Cl(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Yp(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=W.useRef(null);r===void 0&&f.current===null&&(f.current=new Jp({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),V(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};H(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}var Xp={tabIndex:-1,[nl]:``};function Zp(e){return t=>t===`touch`?e.current:!0}function Qp(e,t,n=!1){let r=kr(),i=rf()!=null,a=W.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return Yp({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function $p(e,t){let n=W.useRef(null),r=W.useRef(null);return W.useCallback(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function em(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let i=n?.id??null;(i||t)&&(e.activeTriggerId=i,e.activeTriggerElement=n??null)}function tm(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function nm(e,t,n,r={}){let i=n.reason,a=i===Fr,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=tm(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i={...r.extraState,open:t};o?i.instantType=`focus`:s?i.instantType=`dismiss`:a&&(i.instantType=void 0),em(i,t,n.trigger,c()),e.update(i)};a?Bu.flushSync(l):l()}function rm(e,t,n,r){Ap(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function im(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=$p(e,n),o=Cr(t=>{if(a(t),!t)return;let i=n.select(`open`),o=n.select(`activeTriggerId`);if(o===e){n.update({activeTriggerElement:t,...i?r:null});return}o==null&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return V(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function am(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState(`open`);V(()=>{if(!r){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,i={};e.state.triggerCount!==t&&(i.triggerCount=t);let a=e.select(`activeTriggerId`),o=null;if(a){let t=e.context.triggerElements.getById(a);t?t!==e.state.activeTriggerElement&&(i.activeTriggerElement=t):o=a}if(!o&&!a&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;i.activeTriggerId=e,i.activeTriggerElement=n}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),o&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===o&&!e.context.triggerElements.getById(o)){let t=Hr(Nr);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,e.useState(`triggerCount`),n])}function om(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Uu(e),o=t.useState(`preventUnmountingOnClose`),s=e?!1:o;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:s});let c=Cr(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Hu({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:a}}function sm(e,t){e.useSyncedValues(t),V(()=>()=>{e.update({activeTriggerProps:Xt,inactiveTriggerProps:Xt,popupProps:Xt})},[e])}function cm(e,t){V(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),V(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var lm=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function um(){return new Jp({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new lm,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function dm(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:um(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Xt,inactiveTriggerProps:Xt,popupProps:Xt}}function fm(e,t,n=!1){return new Jp({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var pm=Q(e=>e.triggerIdProp??e.activeTriggerId),mm=Q(e=>e.openProp??e.open),hm=Q(e=>(e.popupElement?.id??e.floatingId)||void 0);function gm(e,t){return t!==void 0&&mm(e)&&pm(e)===t}function _m(e,t){return gm(e,t)?!0:t!==void 0&&mm(e)&&pm(e)==null&&e.triggerCount===1}var vm={open:mm,mounted:Q(e=>e.mounted),transitionStatus:Q(e=>e.transitionStatus),floatingRootContext:Q(e=>e.floatingRootContext),triggerCount:Q(e=>e.triggerCount),preventUnmountingOnClose:Q(e=>e.preventUnmountingOnClose),payload:Q(e=>e.payload),activeTriggerId:pm,activeTriggerElement:Q(e=>e.mounted?e.activeTriggerElement:null),popupId:hm,isTriggerActive:Q((e,t)=>t!==void 0&&pm(e)===t),isOpenedByTrigger:Q((e,t)=>gm(e,t)),isMountedByTrigger:Q((e,t)=>t!==void 0&&pm(e)===t&&e.mounted),triggerProps:Q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:Q((e,t)=>_m(e,t)?hm(e):void 0),popupProps:Q(e=>e.popupProps),popupElement:Q(e=>e.popupElement),positionerElement:Q(e=>e.positionerElement)};function ym(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=kr(),a=rf()!=null,o=$t(()=>new Jp({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new lm,floatingId:i,syncOnly:!1,nested:a})).current;return V(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=H(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function bm(e={}){let{nodeId:t,externalTree:n}=e,r=ym(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=W.useState(null),[f,p]=W.useState(void 0),[m,h]=W.useState(void 0),g=W.useRef(null),_=af(n),v=W.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=Cp({...e,elements:{...v,...u&&{reference:u}}}),b=H(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=W.useCallback(e=>{let t=H(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=W.useCallback(e=>{(H(e)||e===null)&&(g.current=e,p(e)),(H(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!H(e))&&y.refs.setReference(e)},[y.refs,p]),w=W.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=W.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=W.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),D=W.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return V(()=>{s&&(g.current=s)},[s]),V(()=>{i.context.dataRef.current.floatingContext=D;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),W.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}var xm=Zc&&$c;function Sm(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=W.useRef(!1),c=W.useRef(null),l=W.useRef(!0),u=Au();W.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=fr(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&pr(e)&&e===Ur(Wr(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return Cd(Z(t,`blur`,r),xm&&Z(t,`keydown`,a,!0),xm&&Z(t,`pointerdown`,o,!0))},[i,n]),W.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);H(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=W.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=Mr(t.nativeEvent);if(H(a)){if(xm&&!t.relatedTarget){if(!l.current&&!dl(a))return}else if(!ml(a))return}let o=cl(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,Hr(Lr,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,Hr(Lr,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=H(n)&&n.hasAttribute(Ad(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=Ur(Wr(e));!n&&t===e||U(o.current.floatingContext?.refs.floating.current,t)||U(e,t)||a||cl(n??t,i.context.triggerElements)||i.setOpen(!1,Hr(Lr,r))})}}},[o,r,i,u]);return W.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var Cm=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new ku,this.restTimeout=new ku,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},wm=new WeakMap;function Tm(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&wm.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),wm.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Em(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=wm.get(n);a&&a!==e&&Tm(a),Tm(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,wm.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Dm(e){let t=e.context.dataRef.current,n=$t(()=>t.hoverInteractionState??Cm.create()).current;return t.hoverInteractionState||=n,Du(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Om(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=af(),d=rf(),f=Dm(a),p=Au(),m=Cr(()=>_d(l.current.openEvent?.type,f.interactedInside)),h=Cr(()=>vd(l.current.openEvent?.type)),g=Cr(()=>{Tm(f)});V(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),W.useEffect(()=>g,[g]),V(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&H(c)&&s){let e=c,t=s,n=Wr(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r;return Em(f,{scopeElement:f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),W.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&gl(u.nodesRef.current,d).length>0)}function t(e){let t=hd(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,Hr(Fr,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=Mr(e);if(!fl(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,v),g()}function _(n){if(e()&&u){u.events.on(`floating.closed`,v);return}if(cl(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&H(o)&&gl(u.nodesRef.current,r,!1).some(e=>U(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,Hr(Fr,t)),u.events.emit(`floating.closed`,t)})}let y=s;return Cd(y&&Z(y,`mouseenter`,c),y&&Z(y,`mouseleave`,_),y&&Z(y,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}var km={current:null};function Am(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=km,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=af(l),v=Dm(m),y=W.useRef(!1),b=wd(i),x=wd(r),S=wd(o),C=wd(n),w=wd(p),T=wd(f),E=Cr(()=>_d(h.current.openEvent?.type,v.interactedInside)),D=Cr(()=>w.current?.()!==!1),O=Cr((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!U(e,t);if(!H(n))return!1;let i=n;return r.hasMatchingElement(e=>U(e,i))&&(!e||!U(e,i))}),k=Cr(()=>{v.handler&&=(Wr(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=Cr(()=>{Tm(v)});return u&&(v.handleCloseOptions=b.current?.__options),W.useEffect(()=>k,[k]),W.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===Fr,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),W.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=hd(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,Hr(Fr,e)),_?.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,Hr(Fr,e)),_?.events.emit(`floating.closed`,e))}let t=c.current??(u?m.select(`domReferenceElement`):null);if(!H(t))return;function r(e){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Sl(v.pointerType))return;let t=gd(S.current),n=hd(x.current,`open`,v.pointerType),r=Mr(e),i=e.currentTarget??null,o=m.select(`domReferenceElement`),s=i;if(H(r)&&!m.context.triggerElements.hasElement(r)){for(let e of m.context.triggerElements.elements())if(U(e,r)){s=e;break}}H(i)&&H(o)&&!m.context.triggerElements.hasElement(i)&&U(i,o)&&(s=o);let c=s==null?!1:O(o,s,r),l=m.select(`open`),u=T.current?.()??m.select(`transitionStatus`)===`ending`,d=!l&&u&&y.current,f=!c&&H(s)&&H(o)&&U(o,s)&&d,p=t>0&&!n,h=c&&(l||d)||f,g=!l||c;if(h){D()&&m.setOpen(!0,Hr(Fr,e,s));return}p||(n?v.openChangeTimeout.start(n,()=>{g&&D()&&m.setOpen(!0,Hr(Fr,e,s))}):g&&D()&&m.setOpen(!0,Hr(Fr,e,s)))}function i(t){if(E()){A();return}k();let n=Wr(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let r=h.current.floatingContext??d?.();if(!cl(t.relatedTarget,m.context.triggerElements)){if(b.current&&r){m.select(`open`)||v.openChangeTimeout.clear();let i=c.current;v.handler=b.current({...r,tree:_,x:t.clientX,y:t.clientY,onClose(){A(),k(),C.current&&!E()&&i===m.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,v.handler),v.handler(t);return}(v.pointerType!==`touch`||!U(m.select(`floatingElement`),t.relatedTarget))&&e(t)}}return s?Cd(Z(t,`mousemove`,r,{once:!0}),Z(t,`mouseenter`,r),Z(t,`mouseleave`,i)):Cd(Z(t,`mouseenter`,r),Z(t,`mouseleave`,i))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),W.useMemo(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=m.select(`domReferenceElement`),i=m.select(`open`),o=O(r,n,e.target);if(a&&!Sl(v.pointerType))return;if(i&&o&&v.handleCloseOptions?.blockPointerEvents){let e=m.select(`floatingElement`);e&&Em(v,{scopeElement:v.handleCloseOptions?.getScope?.()??n.ownerDocument.body,referenceElement:n,floatingElement:e})}let s=gd(S.current);if(i&&!o||s===0||!o&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function c(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||o)&&D()&&m.setOpen(!0,Hr(Fr,t,n))}v.pointerType===`touch`?Bu.flushSync(()=>{c()}):o&&i?c():(v.restTimeoutPending=!0,v.restTimeout.start(s,c))}}},[n,v,E,O,a,m,S,D])}var jm=.1,Mm=jm*jm,Nm=.5;function Pm(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Fm(e,t,n,r,i,a,o,s,c,l){let u=!1;return Pm(e,t,n,r,i,a)&&(u=!u),Pm(e,t,i,a,o,s)&&(u=!u),Pm(e,t,o,s,c,l)&&(u=!u),Pm(e,t,c,l,n,r)&&(u=!u),u}function Im(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Lm(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Rm(e={}){let{blockPointerEvents:t=!1}=e,n=new ku,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Mm;return u=e,d=t,f=n,o0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Lm(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Lm(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Lm(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Lm(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Im(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Nm/2:Nm*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Nm+1,o=C||T?S.bottom-Nm:S.top,s=C?T?S.bottom-Nm:S.top:S.bottom-Nm;M=Fm(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Nm/2:Nm*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Nm,o=C||T?S.top+Nm:S.bottom,s=C?T?S.top+Nm:S.bottom:S.top+Nm;M=Fm(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Nm/2:Nm*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Nm+1,o=w||E?S.right-Nm:S.left,s=w?E?S.right-Nm:S.left:S.right-Nm;M=Fm(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Nm/2:Nm*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Nm,o=w||E?S.left+Nm:S.right,s=w?E?S.left+Nm:S.right:S.left+Nm;M=Fm(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var zm=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),Bm=function(e){return e[e.open=ed.open]=`open`,e[e.closed=ed.closed]=`closed`,e[e.startingStyle=ed.startingStyle]=`startingStyle`,e[e.endingStyle=ed.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),Vm=W.createContext(void 0);function Hm(){let e=W.useContext(Vm);if(e===void 0)throw Error(an(26));return e}var Um=`ArrowUp`,Wm=`ArrowDown`,Gm=`ArrowLeft`,Km=`ArrowRight`,qm=`Home`,Jm=new Set([Gm,Km]),Ym=new Set([Gm,Km,qm,`End`]),Xm=new Set([Um,Wm]),Zm=new Set([Um,Wm,qm,`End`]),Qm=new Set([...Jm,...Xm]),$m=new Set([...Qm,qm,`End`]),eh=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function th(e){return pr(e)&&e.tagName===`INPUT`}function nh(e){return!!(th(e)&&e.selectionStart!=null||pr(e)&&e.tagName===`TEXTAREA`)}function rh(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidthe.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLefte.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=ih(e,t,`top`),r=ah(e),i=ah(t);n-i.scrollMarginTope.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function ih(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function ah(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var oh={...ld,...zu,nestedDialogOpen(e){return e?{[Bm.nestedDialogOpen]:``}:null}},sh=W.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,{store:c}=$u(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`),C=s.id??S;Hm(),Hu({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let w=o===void 0?Zp(c.context.popupRef):o,T=g>0,E=c.useStateSetter(`popupElement`),D=en(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:T},props:[f,{id:C,"aria-labelledby":y??void 0,"aria-describedby":l??void 0,role:x,...Xp,hidden:!m,onKeyDown(e){$m.has(e.key)&&e.stopPropagation()},style:{[zm.nestedDialogs]:g}},s],ref:[t,c.context.popupRef,E],stateAttributesMapping:oh});return(0,G.jsx)(mf,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:w,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:D})});function ch(e){return nn(19)?e:e?`true`:void 0}var lh=W.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),uh=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=$u(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,G.jsx)(Vm.Provider,{value:n,children:(0,G.jsxs)($d,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(lh,{ref:i.context.internalBackdropRef,inert:ch(!s)}),e.children]})}):null}),dh={},fh={},ph=``;function mh(e){if(typeof document>`u`)return!1;let t=Wr(e);return fr(t).innerWidth-t.documentElement.clientWidth>0}function hh(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Wr(e),n=t.documentElement,r=t.body,i=sr(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function gh(e){let t=Wr(e),n=t.documentElement,r=t.body,i=sr(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function _h(e){let t=Wr(e),n=t.documentElement,r=t.body,i=fr(n),a=0,o=0,s=!1,c=Nu.create();if($c&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,dh={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ph=n.style.scrollBehavior,fh={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=sr(n)?n:r;if(s=hh(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,dh),Object.assign(r.style,fh),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=ph)}function d(){u(),c.request(l)}l();let f=Z(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var vh=new class{lockCount=0;restore=null;timeoutLock=ku.create();timeoutUnlock=ku.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Wr(e).documentElement,n=fr(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=tn;return}let r=Jc||!mh(e);this.restore=r?gh(e):_h(e)}};function yh(e=!0,t=null){V(()=>{if(e)return vh.acquire(t)},[e,t])}function bh(e){let{store:t,actionsRef:n}=e,r=t.useState(`open`);cm(t,r),am(t);let{forceUnmount:i}=om(r,t),a=W.useCallback(()=>{t.setOpen(!1,Hr(Vr))},[t]);W.useImperativeHandle(n,()=>({unmount:i,close:a}),[i,a])}function xh({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=W.useState(0),[u,d]=W.useState(0),f=c===0,p=bf(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0||`touches`in t&&t.touches.length!==1)return!1;let n=Mr(t);return f&&!i?a&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||U(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0:!1},escapeKey:f});return yh(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),e.useContextCallback(`onNestedDialogClose`,()=>{l(0),d(0)}),W.useEffect(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(c+1,u+ +!!n),t?.onNestedDialogClose&&!r&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&r&&t.onNestedDialogClose()}),[n,r,c,u,t]),sm(e,{activeTriggerProps:p.reference??Xt,inactiveTriggerProps:p.trigger??Xt,popupProps:p.floating??Xt,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var Sh={...vm,modal:Q(e=>e.modal),nested:Q(e=>e.nested),nestedOpenDialogCount:Q(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:Q(e=>e.nestedOpenDrawerCount),disablePointerDismissal:Q(e=>e.disablePointerDismissal),openMethod:Q(e=>e.openMethod),descriptionElementId:Q(e=>e.descriptionElementId),titleElementId:Q(e=>e.titleElementId),viewportElement:Q(e=>e.viewportElement),role:Q(e=>e.role)},Ch=class e extends Kp{constructor(e,t,n=!1){let r=new lm,i=wh(e);i.floatingRootContext=fm(r,t,n),super(i,{popupRef:W.createRef(),backdropRef:W.createRef(),internalBackdropRef:W.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Sh)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};em(n,e,t.trigger),this.update(n)};static useStore(t,n){return Qp(t,(t,r)=>new e(n,t,r),!0).store}};function wh(e={}){return{...dm(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Th(e,t=`dialog`){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=e,p=t===`drawer`,m=t===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=$u(!0),y={modal:h,disablePointerDismissal:g,nested:!!v,role:_},b=Ch.useStore(u?.store,{open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y});Ap(()=>{let e=r===void 0&&b.state.open===!1&&i===!0?{open:!0,activeTriggerId:f}:null;m?b.update(e?{...y,...e}:y):e&&b.update(e)}),b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);bh({store:b,actionsRef:l});let w=x||S,T=W.useMemo(()=>({store:b}),[b]);return(0,G.jsx)(Zu.Provider,{value:!1,children:(0,G.jsxs)(Qu.Provider,{value:T,children:[w&&(0,G.jsx)(xh,{store:b,parentContext:v?.store.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})})}function Eh(e){return Th(e,W.useContext(Zu)?`drawer`:`dialog`)}var Dh=W.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=$u(),c=Ar(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),en(`h2`,e,{ref:t,props:[{id:c},o]})});function Oh(e){let t=(0,Ls.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(Eh,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function kh(e){let t=(0,Ls.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(uh,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function Ah(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:animate-out data-open:animate-in fixed inset-0 z-50 bg-black/80 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(dd,{className:i,"data-slot":`sheet-overlay`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function jh(e){let t=(0,Ls.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,side:a,showCloseButton:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`right`:a,c=o===void 0?!0:o,l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,G.jsx)(Ah,{}),t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=Cn(`data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-closed:animate-out data-open:animate-in fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,r),t[7]=r,t[8]=u);let d;t[9]===c?d=t[10]:(d=c&&(0,G.jsxs)(fd,{"data-slot":`sheet-close`,render:(0,G.jsx)(wr,{className:`absolute top-4 right-4`,size:`icon-sm`,variant:`ghost`}),children:[(0,G.jsx)(Oc,{}),(0,G.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[9]=c,t[10]=d);let f;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==u||t[15]!==d?(f=(0,G.jsxs)(kh,{children:[l,(0,G.jsxs)(sh,{className:u,"data-side":s,"data-slot":`sheet-content`,...i,children:[n,d]})]}),t[11]=n,t[12]=i,t[13]=s,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function Mh(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`flex flex-col gap-1.5 p-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-slot":`sheet-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Nh(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`text-sm font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(Dh,{className:i,"data-slot":`sheet-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ph(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`text-xs/relaxed text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(pd,{className:i,"data-slot":`sheet-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Fh=W.createContext(void 0);function Ih(e){let t=W.useContext(Fh);if(t===void 0&&!e)throw Error(an(72));return t}var Lh={...vm,disabled:Q(e=>e.disabled),instantType:Q(e=>e.instantType),isInstantPhase:Q(e=>e.isInstantPhase),trackCursorAxis:Q(e=>e.trackCursorAxis),disableHoverablePopup:Q(e=>e.disableHoverablePopup),lastOpenChangeReason:Q(e=>e.openChangeReason),closeOnClick:Q(e=>e.closeOnClick),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport)},Rh=class e extends Kp{constructor(e,t,n=!1){let r=new lm,i={...zh(),...e};i.floatingRootContext=fm(r,t,n),super(i,{popupRef:W.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},Lh)}setOpen=(e,t)=>{nm(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Hr(Pr,e))}static useStore(t,n){return Qp(t,(t,r)=>new e(n,t,r)).store}};function zh(){return{...dm(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var Bh=Fp(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Rh.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});rm(p,r,n,d),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),p.useSyncedValue(`disabled`,t),am(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=om(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=W.useRef(null);V(()=>{m&&t&&p.setOpen(!1,Hr(Ir))},[m,t,p]),V(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),V(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]);let T=W.useCallback(()=>{p.setOpen(!1,Hr(Vr))},[p]);W.useImperativeHandle(o,()=>({unmount:y,close:T}),[y,T]);let E=h||_||!t&&a!==`none`;return(0,G.jsxs)(Fh.Provider,{value:p,children:[E&&(0,G.jsx)(Vh,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Vh({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=bf(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=_f(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n});return sm(e,{activeTriggerProps:W.useMemo(()=>Qt(a.reference,i.reference),[a.reference,i.reference]),inactiveTriggerProps:W.useMemo(()=>Qt(a.trigger,i.trigger),[a.trigger,i.trigger]),popupProps:W.useMemo(()=>Qt(Xp,a.floating,i.floating),[a.floating,i.floating])}),null}var Hh=W.createContext(void 0);function Uh(){return W.useContext(Hh)}var Wh=function(e){return e[e.popupOpen=td.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),Gh=`data-base-ui-tooltip-trigger`;function Kh(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;em.select(`transitionStatus`)===`ending`,shouldOpen(){return!N.current}}),F=Sm(v,{enabled:!A}).reference,oe=e=>{let t=N.current,n=Kh(e),r=ie(n),i=y.current,a=i&&n&&U(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,Hr(Fr,e));return}if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Sl(te.current)){let t=()=>{!N.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,Hr(Fr,e,i))},n=ne();n===0?(P.clear(),t()):P.start(n,t)}},se=m.useState(`triggerProps`,C);return en(`button`,e,{state:{open:_},ref:[t,S,y],props:[ae,F,C||M!==`none`?se:void 0,{onMouseOver(e){oe(e.nativeEvent)},onFocus(e){re(Kh(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){N.current=!1,P.clear(),te.current=void 0},onPointerEnter(e){te.current=e.pointerType},onPointerDown(e){te.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[Wh.triggerDisabled]:A?``:void 0,[Gh]:A?void 0:``},f],stateAttributesMapping:sd})}),Yh=W.createContext(void 0);function Xh(){let e=W.useContext(Yh);if(e===void 0)throw Error(an(70));return e}var Zh=W.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=Qd({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,G.jsxs)(W.Fragment,{children:[l,c&&Bu.createPortal(n,c)]})}),Qh=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Ih().useState(`mounted`)||n?(0,G.jsx)(Yh.Provider,{value:n,children:(0,G.jsx)(Zh,{ref:t,...r})}):null}),$h=W.createContext(void 0);function eg(){let e=W.useContext($h);if(e===void 0)throw Error(an(71));return e}var tg=W.createContext(void 0);function ng(){return W.useContext(tg)?.direction??`ltr`}var rg=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Ml(e,t)||{};if(l==null)return{};let f=Yl(u),p={x:n,y:r},m=Ll(i),h=Il(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=jl(k,j,A),ee=!c.arrow&&Pl(i)!=null&&j!==M&&a.reference[h]/2-(j({...rg(e),options:[e,t]}),ag=kp().fn,og={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await ag(e)).data?.referenceHidden||a}}}},sg={sideX:`left`,sideY:`top`},cg={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=fr(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:sg};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=Wr(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=Nl(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:sg.sideX,g=f===`top`?`bottom`:sg.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function lg(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function ug(e,t,n){let{rects:r,placement:i}=e;return{side:lg(t,Nl(i),n),align:Pl(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function dg(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=W.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=Cr(D),k=D?O:t,A=wd(t),j=wd(h),M=ng()===`rtl`,ee=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],N=a===`center`?ee:`${ee}-${a}`,P=c,te=+(r===`bottom`),ne=+(r===`top`),re=+(r===`right`),ie=+(r===`left`);typeof P==`number`?P={top:P+te,right:P+ie,bottom:P+ne,left:P+re}:P&&={top:(P.top||0)+te,right:(P.right||0)+ie,bottom:(P.bottom||0)+ne,left:(P.left||0)+re};let ae={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},F=W.useRef(null),oe=wd(i),se=wd(o),I=typeof i==`function`?0:i,ce=typeof o==`function`?0:o,le=[];f&&le.push(f),le.push(wp(e=>{let t=ug(e,r,M),n=typeof oe.current==`function`?oe.current(t):oe.current,i=typeof se.current==`function`?se.current(t):se.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[I,ce,M,r]));let ue=T===`none`&&w!==`shift`,de=!ue&&(l||_||w===`shift`),fe=w===`none`?null:Dp({...ae,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),pe=ue?null:Tp(e=>{let t=Wr(e.elements.floating).documentElement;return{...ae,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:de,limiter:l||_?void 0:Ep(e=>{if(!F.current)return{};let{width:t,height:n}=F.current.getBoundingClientRect(),r=X(Nl(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[ae,l,_,P,T]);w===`shift`||T===`shift`||a===`center`?le.push(pe,fe):le.push(fe,pe),le.push(Op({...ae,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=fr(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),ig(e=>({element:F.current||Wr(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=Nl(a),l=X(c),u=F.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(ug(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,de&&l===`y`&&b?S:x),{}}},og,y),V(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let me=W.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:he,elements:ge,x:_e,y:ve,middlewareData:ye,update:be,placement:xe,context:Se,isPositioned:Ce,floatingStyles:we}=bm({rootContext:m,open:p?h:void 0,placement:N,middleware:le,strategy:n,whileElementsMounted:p?void 0:(...e)=>up(...e,me),nodeId:v,externalTree:x}),{sideX:Te,sideY:Ee}=ye.adaptiveOrigin||sg,De=Ce?n:`fixed`,Oe=W.useMemo(()=>{let e=y?{position:De,[Te]:_e,[Ee]:ve}:{position:De,...we};return Ce||(e.opacity=0),e},[y,De,Te,_e,Ee,ve,we,Ce]),ke=W.useRef(null);V(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(fg(t)?t.current:t)||null;n!==ke.current&&(he.setPositionReference(n),ke.current=n)},[h,he,k,A]),W.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&fg(e)&&e.current!==ke.current&&(he.setPositionReference(e.current),ke.current=e.current)},[h,he,k,A]),W.useEffect(()=>{if(p&&h&&ge.reference&&ge.floating)return up(ge.reference,ge.floating,be,me)},[p,h,ge,be,me]);let Ae=Nl(xe),je=lg(r,Ae,M),Me=Pl(xe)||`center`,Ne=!!ye.hide?.referenceHidden;V(()=>{b&&h&&Ce&&C(Ae)},[b,h,Ce,Ae]);let Pe=W.useMemo(()=>({position:`absolute`,top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Fe=ye.arrow?.centerOffset!==0;return W.useMemo(()=>({positionerStyles:Oe,arrowStyles:Pe,arrowRef:F,arrowUncentered:Fe,side:je,align:Me,physicalSide:Ae,anchorHidden:Ne,refs:he,context:Se,isPositioned:Ce,update:be}),[Oe,Pe,F,Fe,je,Me,Ae,Ne,he,Se,Ce,be])}function fg(e){return e!=null&&`current`in e}function pg(e){return e===`starting`?Gd:Xt}function mg(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),en(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},pg(r),i],stateAttributesMapping:ld})}var hg=W.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=qd,style:g,..._}=e,v=Ih(),y=Xh(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=dg({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?cg:void 0}),O=mg(e,W.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,G.jsx)($h.Provider,{value:D,children:O})}),gg={...ld,...zu},_g=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Ih(),{side:s,align:c}=eg(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Hu({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Om(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return en(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[f,pg(d),a],stateAttributesMapping:gg})}),vg=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Ih(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=eg();return en(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:ld})}),yg=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=W.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=W.useMemo(()=>({open:t,close:n}),[t,n]);return(0,G.jsx)(Hh.Provider,{value:i,children:(0,G.jsx)(xd,{delay:a,timeoutMs:r,children:e.children})})};function bg(e){let t=(0,Ls.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,G.jsx)(yg,{"data-slot":`tooltip-provider`,delay:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function xg(e){let t=(0,Ls.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(bg,{children:(0,G.jsx)(Bh,{"data-slot":`tooltip`,...n})}),t[2]=n,t[3]=r),r}function Sg(e){let t=(0,Ls.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(Jh,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function Cg(e){let t=(0,Ls.c)(21),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,side:a,sideOffset:o,align:s,alignOffset:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`top`:a,u=o===void 0?4:o,d=s===void 0?`center`:s,f=c===void 0?0:c,p;t[8]===r?p=t[9]:(p=Cn(`data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-xs text-background **:data-[slot=kbd]:rounded-md`,r),t[8]=r,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,G.jsx)(vg,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`}),t[10]=m):m=t[10];let h;t[11]!==n||t[12]!==i||t[13]!==p?(h=(0,G.jsxs)(_g,{className:p,"data-slot":`tooltip-content`,...i,children:[n,m]}),t[11]=n,t[12]=i,t[13]=p,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==f||t[17]!==l||t[18]!==u||t[19]!==h?(g=(0,G.jsx)(Qh,{children:(0,G.jsx)(hg,{align:d,alignOffset:f,className:`isolate z-50`,side:l,sideOffset:u,children:h})}),t[15]=d,t[16]=f,t[17]=l,t[18]=u,t[19]=h,t[20]=g):g=t[20],g}var wg=window.matchMedia(`(max-width: 767px)`);function Tg(e){return wg.addEventListener(`change`,e),()=>wg.removeEventListener(`change`,e)}function Eg(){return wg.matches}function Dg(){return(0,W.useSyncExternalStore)(Tg,Eg)}var Og=`sidebar_state`,kg=3600*24*7,Ag=`12rem`,jg=`16rem`,Mg=`3rem`,Ng=`b`,Pg=W.createContext(null);function Fg(){let e=W.useContext(Pg);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Ig(e){let t=(0,Ls.c)(36),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({defaultOpen:c,open:i,onOpenChange:o,className:r,style:s,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=c===void 0?!0:c,u=Dg(),[d,f]=W.useState(!1),[p,m]=W.useState(l),h=i??p,g;t[8]!==h||t[9]!==o?(g=e=>{let t=typeof e==`function`?e(h):e;o?o(t):m(t),document.cookie=`${Og}=${t}; path=/; max-age=${kg}`},t[8]=h,t[9]=o,t[10]=g):g=t[10];let _=g,v;t[11]!==u||t[12]!==_?(v=()=>u?f(Rg):_(Lg),t[11]=u,t[12]=_,t[13]=v):v=t[13];let y=v,b,x;t[14]===y?(b=t[15],x=t[16]):(b=()=>{let e=e=>{e.key===Ng&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},x=[y],t[14]=y,t[15]=b,t[16]=x),W.useEffect(b,x);let S=h?`expanded`:`collapsed`,C;t[17]!==u||t[18]!==h||t[19]!==d||t[20]!==_||t[21]!==S||t[22]!==y?(C={state:S,open:h,setOpen:_,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:y},t[17]=u,t[18]=h,t[19]=d,t[20]=_,t[21]=S,t[22]=y,t[23]=C):C=t[23];let w=C,T;t[24]===r?T=t[25]:(T=Cn(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),t[24]=r,t[25]=T);let E;t[26]===s?E=t[27]:(E={"--sidebar-width":Ag,"--sidebar-width-icon":Mg,...s},t[26]=s,t[27]=E);let D=E,O;t[28]!==n||t[29]!==a||t[30]!==T||t[31]!==D?(O=(0,G.jsx)(`div`,{className:T,"data-slot":`sidebar-wrapper`,style:D,...a,children:n}),t[28]=n,t[29]=a,t[30]=T,t[31]=D,t[32]=O):O=t[32];let k;return t[33]!==w||t[34]!==O?(k=(0,G.jsx)(Pg.Provider,{value:w,children:O}),t[33]=w,t[34]=O,t[35]=k):k=t[35],k}function Lg(e){return!e}function Rg(e){return!e}function zg(e){let t=(0,Ls.c)(46),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({side:a,variant:o,collapsible:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`left`:a,l=o===void 0?`sidebar`:o,u=s===void 0?`offExamples`:s,{isMobile:d,state:f,openMobile:p,setOpenMobile:m}=Fg();if(u===`none`){let e;t[7]===r?e=t[8]:(e=Cn(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[7]=r,t[8]=e);let a;return t[9]!==n||t[10]!==i||t[11]!==e?(a=(0,G.jsx)(`div`,{className:e,"data-slot":`sidebar`,...i,children:n}),t[9]=n,t[10]=i,t[11]=e,t[12]=a):a=t[12],a}if(d){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e={"--sidebar-width":jg},t[13]=e):e=t[13];let r=e,a;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,G.jsxs)(Mh,{className:`sr-only`,children:[(0,G.jsx)(Nh,{children:`Sidebar`}),(0,G.jsx)(Ph,{children:`Displays the mobile sidebar.`})]}),t[14]=a):a=t[14];let o;t[15]===n?o=t[16]:(o=(0,G.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n}),t[15]=n,t[16]=o);let s;t[17]!==c||t[18]!==o?(s=(0,G.jsxs)(jh,{className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,"data-mobile":`true`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,side:c,style:r,children:[a,o]}),t[17]=c,t[18]=o,t[19]=s):s=t[19];let l;return t[20]!==p||t[21]!==i||t[22]!==m||t[23]!==s?(l=(0,G.jsx)(Oh,{onOpenChange:m,open:p,...i,children:s}),t[20]=p,t[21]=i,t[22]=m,t[23]=s,t[24]=l):l=t[24],l}let h=f===`collapsed`?u:``,g=l===`floating`||l===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,_;t[25]===g?_=t[26]:(_=Cn(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offExamples]:w-0`,`group-data-[side=right]:rotate-180`,g),t[25]=g,t[26]=_);let v;t[27]===_?v=t[28]:(v=(0,G.jsx)(`div`,{className:_,"data-slot":`sidebar-gap`}),t[27]=_,t[28]=v);let y=c===`left`?`left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]`,b=l===`floating`||l===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,x;t[29]!==r||t[30]!==y||t[31]!==b?(x=Cn(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,y,b,r),t[29]=r,t[30]=y,t[31]=b,t[32]=x):x=t[32];let S;t[33]===n?S=t[34]:(S=(0,G.jsx)(`div`,{className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,children:n}),t[33]=n,t[34]=S);let C;t[35]!==i||t[36]!==x||t[37]!==S?(C=(0,G.jsx)(`div`,{className:x,"data-slot":`sidebar-container`,...i,children:S}),t[35]=i,t[36]=x,t[37]=S,t[38]=C):C=t[38];let w;return t[39]!==c||t[40]!==f||t[41]!==C||t[42]!==h||t[43]!==v||t[44]!==l?(w=(0,G.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-collapsible":h,"data-side":c,"data-slot":`sidebar`,"data-state":f,"data-variant":l,children:[v,C]}),t[39]=c,t[40]=f,t[41]=C,t[42]=h,t[43]=v,t[44]=l,t[45]=w):w=t[45],w}function Bg(e){let t=(0,Ls.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{toggleSidebar:a}=Fg(),o;t[4]===n?o=t[5]:(o=Cn(n),t[4]=n,t[5]=o);let s;t[6]!==r||t[7]!==a?(s=e=>{r?.(e),a()},t[6]=r,t[7]=a,t[8]=s):s=t[8];let c,l;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(vc,{}),l=(0,G.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),t[9]=c,t[10]=l):(c=t[9],l=t[10]);let u;return t[11]!==i||t[12]!==o||t[13]!==s?(u=(0,G.jsxs)(wr,{className:o,"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,onClick:s,size:`icon-lg`,variant:`ghost`,...i,children:[c,l]}),t[11]=i,t[12]=o,t[13]=s,t[14]=u):u=t[14],u}function Vg(e){let t=(0,Ls.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{toggleSidebar:i}=Fg(),a;t[3]===n?a=t[4]:(a=Cn(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offExamples]:translate-x-0 group-data-[collapsible=offExamples]:after:left-full hover:group-data-[collapsible=offExamples]:bg-sidebar`,`[[data-side=left][data-collapsible=offExamples]_&]:-right-2`,`[[data-side=right][data-collapsible=offExamples]_&]:-left-2`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a||t[7]!==i?(o=(0,G.jsx)(`button`,{"aria-label":`Toggle Sidebar`,className:a,"data-sidebar":`rail`,"data-slot":`sidebar-rail`,onClick:i,tabIndex:-1,title:`Toggle Sidebar`,...r}),t[5]=r,t[6]=a,t[7]=i,t[8]=o):o=t[8],o}function Hg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-sidebar":`header`,"data-slot":`sidebar-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ug(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-sidebar":`footer`,"data-slot":`sidebar-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Wg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`mx-2 w-auto bg-sidebar-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(Xu,{className:i,"data-sidebar":`separator`,"data-slot":`sidebar-separator`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Gg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-sidebar":`content`,"data-slot":`sidebar-content`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Kg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`relative flex w-full min-w-0 flex-col px-2 py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-sidebar":`group`,"data-slot":`sidebar-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function qg(e){let t=(0,Ls.c)(10),n,r,i,a;if(t[0]!==e){let{className:o,render:s,...c}=e;n=s,a=Hs,r=`div`,i=Qt({className:Cn(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,o)},c),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o={slot:`sidebar-group-label`,sidebar:`group-label`},t[5]=o):o=t[5];let s;return t[6]!==n||t[7]!==r||t[8]!==i?(s={defaultTagName:r,props:i,render:n,state:o},t[6]=n,t[7]=r,t[8]=i,t[9]=s):s=t[9],a(s)}function Jg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`flex w-full min-w-0 flex-col gap-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`ul`,{className:i,"data-sidebar":`menu`,"data-slot":`sidebar-menu`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Yg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`li`,{className:i,"data-sidebar":`menu-item`,"data-slot":`sidebar-menu-item`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Xg=rn(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-xs`,sm:`h-7 text-xs`,lg:`h-12 text-xs group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Zg(e){let t=(0,Ls.c)(15),{render:n,isActive:r,variant:i,size:a,tooltip:o,className:s,...c}=e,l=r===void 0?!1:r,u=i===void 0?`default`:i,d=a===void 0?`default`:a,{isMobile:f,state:p}=Fg(),m=Qt({className:Cn(Xg({variant:u,size:d}),s)},c),h=o?Sg:n,g;t[0]!==l||t[1]!==d?(g={slot:`sidebar-menu-button`,sidebar:`menu-button`,size:d,active:l},t[0]=l,t[1]=d,t[2]=g):g=t[2];let _;t[3]!==m||t[4]!==h||t[5]!==g?(_={defaultTagName:`button`,props:m,render:h,state:g},t[3]=m,t[4]=h,t[5]=g,t[6]=_):_=t[6];let v=Hs(_);if(!o)return v;let y;t[7]===o?y=t[8]:(y=typeof o==`string`?{children:o}:o,t[7]=o,t[8]=y);let b=y,x=p!==`collapsed`||f,S;t[9]!==x||t[10]!==b?(S=(0,G.jsx)(Cg,{align:`center`,hidden:x,side:`right`,...b}),t[9]=x,t[10]=b,t[11]=S):S=t[11];let C;return t[12]!==v||t[13]!==S?(C=(0,G.jsxs)(xg,{children:[v,S]}),t[12]=v,t[13]=S,t[14]=C):C=t[14],C}var Qg=class{async sign(e,t,n){return e}},$g=`ref`,e_=-1,t_=!0,n_=`isSet`,r_=`PartitionResult`,i_=`booleanEquals`,a_=`stringEquals`,o_=`getAttr`,s_=`us-east-1`,c_=`sigv4`,l_=`sts`,u_=`https://sts.{Region}.{PartitionResult#dnsSuffix}`,d_={[$g]:`Endpoint`},f_={[$g]:`Region`},p_={[$g]:r_},m_={},h_=[f_],g_={conditions:[[n_,[d_]],[n_,h_],[`aws.partition`,h_,r_],[i_,[{[$g]:`UseFIPS`},t_]],[i_,[{[$g]:`UseDualStack`},t_]],[a_,[f_,`aws-global`]],[i_,[{[$g]:`UseGlobalEndpoint`},t_]],[a_,[f_,`eu-central-1`]],[i_,[{fn:o_,argv:[p_,`supportsDualStack`]},t_]],[i_,[{fn:o_,argv:[p_,`supportsFIPS`]},t_]],[a_,[f_,`ap-south-1`]],[a_,[f_,`eu-north-1`]],[a_,[f_,`eu-west-1`]],[a_,[f_,`eu-west-2`]],[a_,[f_,`eu-west-3`]],[a_,[f_,`sa-east-1`]],[a_,[f_,s_]],[a_,[f_,`us-east-2`]],[a_,[f_,`us-west-2`]],[a_,[f_,`us-west-1`]],[a_,[f_,`ca-central-1`]],[a_,[f_,`ap-southeast-1`]],[a_,[f_,`ap-northeast-1`]],[a_,[f_,`ap-southeast-2`]],[a_,[{fn:o_,argv:[p_,`name`]},`aws-us-gov`]]],results:[[e_],[`https://sts.amazonaws.com`,{authSchemes:[{name:c_,signingName:l_,signingRegion:s_}]}],[u_,{authSchemes:[{name:c_,signingName:l_,signingRegion:`{Region}`}]}],[e_,`Invalid Configuration: FIPS and custom endpoint are not supported`],[e_,`Invalid Configuration: Dualstack and custom endpoint are not supported`],[d_,m_],[`https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,m_],[e_,`FIPS and DualStack are enabled, but this partition does not support one or both`],[`https://sts.{Region}.amazonaws.com`,m_],[`https://sts-fips.{Region}.{PartitionResult#dnsSuffix}`,m_],[e_,`FIPS is enabled but this partition does not support FIPS`],[`https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}`,m_],[e_,`DualStack is enabled but this partition does not support DualStack`],[u_,m_],[e_,`Invalid Configuration: Missing Region`]]},__=2,v_=new Int32Array([-1,1,-1,0,30,3,1,4,100000014,2,5,100000014,3,25,6,4,24,7,5,100000001,8,6,9,100000013,7,100000001,10,10,100000001,11,11,100000001,12,12,100000001,13,13,100000001,14,14,100000001,15,15,100000001,16,16,100000001,17,17,100000001,18,18,100000001,19,19,100000001,20,20,100000001,21,21,100000001,22,22,100000001,23,23,100000001,100000002,8,100000011,100000012,4,28,26,9,27,100000010,24,100000008,100000009,8,29,100000007,9,100000006,100000007,3,100000003,31,4,100000004,100000005]),y_=qn.from(v_,__,g_.conditions,g_.results),b_=new Qn({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`]}),x_=(e,t={})=>b_.get(e,()=>Wn(y_,{endpointParams:e,logger:t.logger}));er.aws=mn;var S_=(e=>async(t,n,r)=>{if(!r)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let i=await e(t,n,r),a=hn(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);let o=await Kn(r,{getEndpointParameterInstructions:a},t);return Object.assign(i,o)})(async(e,t,n)=>({operation:hn(t).operation,region:await Tn(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}));function C_(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function w_(e){return{schemeId:`aws.auth#sigv4a`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function T_(e){return{schemeId:`smithy.api#noAuth`}}var E_=((e,t,n)=>r=>{let i=e(r).properties?.authSchemes;if(!i)return t(r);let a=[];for(let e of i){let{name:t,properties:o={},...s}=e,c=t.toLowerCase();t!==c&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${t}' to '${c}'`);let l;if(c===`sigv4a`){l=`aws.auth#sigv4a`;let e=i.find(e=>{let t=e.name.toLowerCase();return t!==`sigv4a`&&t.startsWith(`sigv4`)});if(Fn.sigv4aDependency()===`none`&&e)continue}else if(c.startsWith(`sigv4`))l=`aws.auth#sigv4`;else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${c}'`);let u=n[l];if(!u)throw Error(`Could not find HttpAuthOption create function for '${l}'`);let d=u(r);d.schemeId=l,d.signingProperties={...d.signingProperties||{},...s,...o},a.push(d)}return a})(x_,e=>{let t=[];switch(e.operation){case`AssumeRoleWithSAML`:t.push(T_(e)),t.push(w_(e));break;case`AssumeRoleWithWebIdentity`:t.push(T_(e)),t.push(w_(e));break;default:t.push(C_(e)),t.push(w_(e))}return t},{"aws.auth#sigv4":C_,"aws.auth#sigv4a":w_,"smithy.api#noAuth":T_}),D_=e=>{let t=Dn(fn(e));return Object.assign(t,{authSchemePreference:Tn(e.authSchemePreference??[])})},O_=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:`sts`}),k_={UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}},A_={name:`@aws-sdk/client-sts`,description:`AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native`,version:`3.1072.0`,scripts:{build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline`,"build:es":`premove dist-es && tsc -p tsconfig.es.json`,"build:include:deps":`yarn g:turbo run build -F="$npm_package_name"`,"build:types":`premove dist-types && tsc -p tsconfig.types.json`,"build:types:downlevel":`downlevel-dts dist-types dist-types/ts3.4`,clean:`premove dist-cjs dist-es dist-types`,"extract:docs":`api-extractor run --local`,"generate:client":`node ../../scripts/generate-clients/single-service`,test:`yarn g:vitest run --passWithNoTests`,"test:watch":`yarn g:vitest watch --passWithNoTests`,"test:integration":`yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts`,"test:integration:watch":`yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts`,"test:e2e":`yarn g:vitest run -c vitest.config.e2e.mts`,"test:e2e:watch":`yarn g:vitest watch -c vitest.config.e2e.mts`,"test:index":`tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs`},main:`./dist-cjs/index.js`,types:`./dist-types/index.d.ts`,module:`./dist-es/index.js`,sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":`5.2.0`,"@aws-crypto/sha256-js":`5.2.0`,"@aws-sdk/core":`^3.974.22`,"@aws-sdk/credential-provider-node":`^3.972.57`,"@aws-sdk/signature-v4-multi-region":`^3.996.35`,"@aws-sdk/types":`^3.973.13`,"@smithy/core":`^3.24.6`,"@smithy/fetch-http-handler":`^5.4.6`,"@smithy/node-http-handler":`^4.7.6`,"@smithy/types":`^4.14.3`,tslib:`^2.6.2`},devDependencies:{"@smithy/snapshot-testing":`^2.1.7`,"@tsconfig/node20":`20.1.8`,"@types/node":`^20.14.8`,concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`,vitest:`^4.0.17`},engines:{node:`>=20.0.0`},typesVersions:{"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},files:[`dist-*/**`],author:{name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/sdk-for-javascript/`},license:`Apache-2.0`,browser:{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.browser`},"react-native":{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.native`},homepage:`https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts`,repository:{type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`clients/client-sts`}},j_=class e extends ir{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},M_=class e extends j_{name=`ExpiredTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},N_=class e extends j_{name=`MalformedPolicyDocumentException`;$fault=`client`;constructor(t){super({name:`MalformedPolicyDocumentException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},P_=class e extends j_{name=`PackedPolicyTooLargeException`;$fault=`client`;constructor(t){super({name:`PackedPolicyTooLargeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},F_=class e extends j_{name=`RegionDisabledException`;$fault=`client`;constructor(t){super({name:`RegionDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},I_=class e extends j_{name=`IDPRejectedClaimException`;$fault=`client`;constructor(t){super({name:`IDPRejectedClaimException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},L_=class e extends j_{name=`InvalidIdentityTokenException`;$fault=`client`;constructor(t){super({name:`InvalidIdentityTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},R_=class e extends j_{name=`IDPCommunicationErrorException`;$fault=`client`;$retryable={};constructor(t){super({name:`IDPCommunicationErrorException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},z_=class e extends j_{name=`InvalidAuthorizationMessageException`;$fault=`client`;constructor(t){super({name:`InvalidAuthorizationMessageException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},B_=class e extends j_{name=`ExpiredTradeInTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTradeInTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},V_=class e extends j_{name=`JWTPayloadSizeExceededException`;$fault=`client`;constructor(t){super({name:`JWTPayloadSizeExceededException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},H_=class e extends j_{name=`OutboundWebIdentityFederationDisabledException`;$fault=`client`;constructor(t){super({name:`OutboundWebIdentityFederationDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},U_=class e extends j_{name=`SessionDurationEscalationException`;$fault=`client`;constructor(t){super({name:`SessionDurationEscalationException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},W_=`Arn`,G_=`AccessKeyId`,K_=`Account`,q_=`Credentials`,J_=`DurationSeconds`,Y_=`Expiration`,X_=`ExpiredTokenException`,Z_=`ExpiredTradeInTokenException`,Q_=`GetCallerIdentity`,$_=`GetCallerIdentityRequest`,ev=`GetCallerIdentityResponse`,tv=`GetSessionToken`,nv=`GetSessionTokenRequest`,rv=`GetSessionTokenResponse`,iv=`InvalidAuthorizationMessageException`,av=`IDPCommunicationErrorException`,ov=`IDPRejectedClaimException`,sv=`InvalidIdentityTokenException`,cv=`JWTPayloadSizeExceededException`,lv=`MalformedPolicyDocumentException`,uv=`OutboundWebIdentityFederationDisabledException`,dv=`PackedPolicyTooLargeException`,fv=`RegionDisabledException`,pv=`SecretAccessKey`,mv=`SessionDurationEscalationException`,hv=`SerialNumber`,gv=`SessionToken`,_v=`TokenCode`,vv=`UserId`,yv=`accessKeySecretType`,bv=`awsQueryError`,xv=`client`,Sv=`error`,Cv=`httpError`,wv=`message`,Tv=`smithy.ts.sdk.synthetic.com.amazonaws.sts`,Ev=`com.amazonaws.sts`,Dv=un.for(Tv),Ov=[-3,Tv,`STSServiceException`,0,[],[]];Dv.registerError(Ov,j_);var kv=un.for(Ev),Av=[-3,Ev,X_,{[bv]:[`ExpiredTokenException`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Av,M_);var jv=[-3,Ev,Z_,{[bv]:[`ExpiredTradeInTokenException`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(jv,B_);var Mv=[-3,Ev,av,{[bv]:[`IDPCommunicationError`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Mv,R_);var Nv=[-3,Ev,ov,{[bv]:[`IDPRejectedClaim`,403],[Sv]:xv,[Cv]:403},[wv],[0]];kv.registerError(Nv,I_);var Pv=[-3,Ev,iv,{[bv]:[`InvalidAuthorizationMessageException`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Pv,z_);var Fv=[-3,Ev,sv,{[bv]:[`InvalidIdentityToken`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Fv,L_);var Iv=[-3,Ev,cv,{[bv]:[`JWTPayloadSizeExceededException`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Iv,V_);var Lv=[-3,Ev,lv,{[bv]:[`MalformedPolicyDocument`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Lv,N_);var Rv=[-3,Ev,uv,{[bv]:[`OutboundWebIdentityFederationDisabledException`,403],[Sv]:xv,[Cv]:403},[wv],[0]];kv.registerError(Rv,H_);var zv=[-3,Ev,dv,{[bv]:[`PackedPolicyTooLarge`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(zv,P_);var Bv=[-3,Ev,fv,{[bv]:[`RegionDisabledException`,403],[Sv]:xv,[Cv]:403},[wv],[0]];kv.registerError(Bv,F_);var Vv=[-3,Ev,mv,{[bv]:[`SessionDurationEscalationException`,403],[Sv]:xv,[Cv]:403},[wv],[0]];kv.registerError(Vv,U_);var Hv=[Dv,kv],Uv=[0,Ev,yv,8,0],Wv=[3,Ev,q_,0,[G_,pv,gv,Y_],[0,[()=>Uv,0],0,4],4],Gv=[3,Ev,$_,0,[],[]],Kv=[3,Ev,ev,0,[vv,K_,W_],[0,0,0]],qv=[3,Ev,nv,0,[J_,hv,_v],[1,0,0]],Jv=[3,Ev,rv,0,[q_],[[()=>Wv,0]]],Yv=[9,Ev,Q_,0,()=>Gv,()=>Kv],Xv=[9,Ev,tv,0,()=>qv,()=>Jv],Zv=e=>({apiVersion:`2011-06-15`,base64Decoder:e?.base64Decoder??Kr,base64Encoder:e?.base64Encoder??Jr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??x_,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??E_,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new sn},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new Xn},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Qg}],logger:e?.logger??new Bn,protocol:e?.protocol??Gn,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sts`,errorTypeRegistries:Hv,xmlNamespace:`https://sts.amazonaws.com/doc/2011-06-15/`,version:`2011-06-15`,serviceTarget:`AWSSecurityTokenServiceV20110615`},serviceId:e?.serviceId??`STS`,signerConstructor:e?.signerConstructor??Fn,urlParser:e?.urlParser??Yn,utf8Decoder:e?.utf8Decoder??Gr,utf8Encoder:e?.utf8Encoder??qr}),Qv=e=>{let t=En(e),n=()=>t().then(Vn),r=Zv(e);return{...r,...e,runtime:`browser`,defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Yr,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(Error(`Credential is missing`))),defaultUserAgentProvider:e?.defaultUserAgentProvider??vn({serviceId:r.serviceId,clientVersion:A_.version}),maxAttempts:e?.maxAttempts??3,region:e?.region??Zn(`Region is missing`),requestHandler:Pn.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Rn),sha256:e?.sha256??ln,streamCollector:e?.streamCollector??rr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(!1)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(!1))}},$v=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},ey=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),ty=(e,t)=>{let n=Object.assign(Jn(e),nr(e),on(e),$v(e));return t.forEach(e=>e.configure(n)),Object.assign(e,wn(n),ar(n),Un(n),ey(n))},ny=class extends On{config;constructor(...[e]){let t=Qv(e||{});super(t),this.initConfig=t;let n=ty(D_(Hn(xn(kn(zn(Mn(O_(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(pn(this.config)),this.middlewareStack.use(Sn(this.config)),this.middlewareStack.use(bn(this.config)),this.middlewareStack.use(jn(this.config)),this.middlewareStack.use(gn(this.config)),this.middlewareStack.use(Ln(this.config)),this.middlewareStack.use(In(this.config)),this.middlewareStack.use(_n(this.config,{httpAuthSchemeParametersProvider:S_,identityProviderConfigProvider:async e=>new or({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(cn(this.config))}destroy(){super.destroy()}},ry=class extends R.classBuilder().ep(k_).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`GetCallerIdentity`,{}).n(`STSClient`,`GetCallerIdentityCommand`).sc(Yv).build(){},iy=class extends R.classBuilder().ep(k_).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`GetSessionToken`,{}).n(`STSClient`,`GetSessionTokenCommand`).sc(Xv).build(){},ay=`ap-southeast-2`,oy=9999,sy=class extends Error{status;constructor(e,t,n){super(e),this.name=t,this.status=n}};function cy(e,t){let n=`<${t}>`,r=``,i=e.indexOf(n);if(i===-1)return null;let a=e.indexOf(r,i+n.length);return a===-1?null:e.slice(i+n.length,a)}async function ly({action:e,credentials:t,service:n=`spinifex`}){let r=window.location.protocol.replace(`:`,``),i=`Action=${e}`,a=new An({method:`POST`,protocol:r,hostname:`localhost`,port:oy,path:`/`,headers:{host:`localhost:${oy}`,"content-type":`application/x-www-form-urlencoded`},body:i}),o=await new dn({credentials:{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken},region:ay,service:n,sha256:ln}).sign(a),s={};for(let[e,t]of Object.entries(o.headers))typeof t==`string`&&(s[e]=t);let c=`${window.location.protocol}//${window.location.host}/proxy/awsgw/`,l=await fetch(c,{method:`POST`,headers:s,body:i});if(!l.ok){let t=await l.text().catch(()=>``),n=cy(t,`Code`),r=cy(t,`Message`)??t;throw new sy(`${e} failed: ${l.status}${r?` - ${r}`:``}`,n??`SignedFetchError`,l.status)}return await l.json()}var uy=`ap-southeast-2`,dy=`${window.location.protocol}//localhost:9999`,fy=43200;function py(e){e.middlewareStack.add(e=>async t=>(An.isInstance(t.request)&&(t.request.hostname=window.location.hostname,t.request.port=Number(window.location.port)||443,t.request.path=`/proxy/awsgw${t.request.path}`),await e(t)),{step:`finalizeRequest`,name:`proxyRewrite`,override:!0})}function my(e){let t=new ny({endpoint:dy,region:uy,credentials:e});return py(t),t}function hy(){let e=tr();if(!e)throw Error(`AWS credentials not configured`);return my({accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,sessionToken:e.sessionToken})}async function gy(e){let t=(await my(e).send(new iy({DurationSeconds:fy}))).Credentials;if(!t?.AccessKeyId||!t.SecretAccessKey||!t.SessionToken||!t.Expiration)throw Error(`GetSessionToken returned incomplete credentials`);return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.SessionToken,expiration:t.Expiration.toISOString()}}var _y=`000000000001`;function vy(e){let t=e?.indexOf(`:user/`)??-1;return t===-1||e===void 0?null:e.slice(t+6)||null}var yy=(0,W.createContext)(void 0);function by({children:e}){let[t,n]=(0,W.useState)({isAdmin:!1,accountId:null,userName:null,version:null,license:null,loading:!0});return(0,W.useEffect)(()=>{async function e(){let e=tr();if(!e){n(e=>({...e,loading:!1}));return}try{let t=await hy().send(new ry({})),r=t.Account??null,i=r===_y,a=null;if(i)try{a=await ly({action:`GetVersion`,credentials:e})}catch{}n({isAdmin:i,accountId:r,userName:vy(t.Arn),version:a,license:a?.license??null,loading:!1})}catch{n(e=>({...e,loading:!1}))}}e()},[]),(0,G.jsx)(yy,{value:t,children:e})}function xy(){let e=(0,W.useContext)(yy);if(e===void 0)throw Error(`useAdmin must be used within an AdminProvider`);return e}var Sy=new Set([`InvalidClientTokenId`,`SignatureDoesNotMatch`,`AuthFailure`,`MissingAuthenticationToken`,`IncompleteSignature`,`UnrecognizedClientException`,`ExpiredToken`,`ExpiredTokenException`,`InvalidAccessKeyId`]);function Cy(e){if(typeof e!=`object`||!e||!(`name`in e))return!1;let{name:t}=e;return typeof t==`string`&&Sy.has(t)}var wy=class extends R.classBuilder().ep(Bt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`CertificateManager`,`ListCertificates`,{}).n(`ACMClient`,`ListCertificatesCommand`).sc(ft).build(){},Ty=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeAddresses`,{}).n(`EC2Client`,`DescribeAddressesCommand`).sc(it).build(){},Ey=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeAvailabilityZones`,{}).n(`EC2Client`,`DescribeAvailabilityZonesCommand`).sc(Ht).build(){},Dy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeIamInstanceProfileAssociations`,{}).n(`EC2Client`,`DescribeIamInstanceProfileAssociationsCommand`).sc(Jt).build(){},Oy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeImages`,{}).n(`EC2Client`,`DescribeImagesCommand`).sc(st).build(){},ky=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstances`,{}).n(`EC2Client`,`DescribeInstancesCommand`).sc(He).build(){},Ay=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstanceTypes`,{}).n(`EC2Client`,`DescribeInstanceTypesCommand`).sc(Kt).build(){},jy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInternetGateways`,{}).n(`EC2Client`,`DescribeInternetGatewaysCommand`).sc(ye).build(){},My=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeKeyPairs`,{}).n(`EC2Client`,`DescribeKeyPairsCommand`).sc(Wt).build(){},Ny=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeNatGateways`,{}).n(`EC2Client`,`DescribeNatGatewaysCommand`).sc(We).build(){},Py=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribePlacementGroups`,{}).n(`EC2Client`,`DescribePlacementGroupsCommand`).sc(xe).build(){},Fy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeRegions`,{}).n(`EC2Client`,`DescribeRegionsCommand`).sc(be).build(){},Iy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeRouteTables`,{}).n(`EC2Client`,`DescribeRouteTablesCommand`).sc(Fe).build(){},Ly=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSecurityGroups`,{}).n(`EC2Client`,`DescribeSecurityGroupsCommand`).sc(wt).build(){},Ry=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSnapshots`,{}).n(`EC2Client`,`DescribeSnapshotsCommand`).sc(ve).build(){},zy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSubnets`,{}).n(`EC2Client`,`DescribeSubnetsCommand`).sc(xt).build(){},By=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVolumes`,{}).n(`EC2Client`,`DescribeVolumesCommand`).sc(Me).build(){},Vy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVpcs`,{}).n(`EC2Client`,`DescribeVpcsCommand`).sc(Ne).build(){},Hy=class extends R.classBuilder().ep(ze).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DescribeImages`,{}).n(`ECRClient`,`DescribeImagesCommand`).sc(Pe).build(){},Uy=class extends R.classBuilder().ep(ze).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DescribeRepositories`,{}).n(`ECRClient`,`DescribeRepositoriesCommand`).sc(Ct).build(){},Wy=class extends R.classBuilder().ep(ze).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`GetLifecyclePolicy`,{}).n(`ECRClient`,`GetLifecyclePolicyCommand`).sc(_e).build(){},Gy=class extends R.classBuilder().ep(ze).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`GetRepositoryPolicy`,{}).n(`ECRClient`,`GetRepositoryPolicyCommand`).sc(je).build(){},Ky=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeClusters`,{}).n(`ECSClient`,`DescribeClustersCommand`).sc(ut).build(){},qy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeContainerInstances`,{}).n(`ECSClient`,`DescribeContainerInstancesCommand`).sc(Et).build(){},Jy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeServices`,{}).n(`ECSClient`,`DescribeServicesCommand`).sc(Vt).build(){},Yy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeTaskDefinition`,{}).n(`ECSClient`,`DescribeTaskDefinitionCommand`).sc(dt).build(){},Xy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeTasks`,{}).n(`ECSClient`,`DescribeTasksCommand`).sc(mt).build(){},Zy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListClusters`,{}).n(`ECSClient`,`ListClustersCommand`).sc(Mt).build(){},Qy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListContainerInstances`,{}).n(`ECSClient`,`ListContainerInstancesCommand`).sc(Dt).build(){},$y=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListServices`,{}).n(`ECSClient`,`ListServicesCommand`).sc(vt).build(){},eb=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListTaskDefinitions`,{}).n(`ECSClient`,`ListTaskDefinitionsCommand`).sc(gt).build(){},tb=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListTasks`,{}).n(`ECSClient`,`ListTasksCommand`).sc(rt).build(){},nb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAccessEntry`,{}).n(`EKSClient`,`DescribeAccessEntryCommand`).sc(qe).build(){},rb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAddon`,{}).n(`EKSClient`,`DescribeAddonCommand`).sc(Te).build(){},ib=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAddonVersions`,{}).n(`EKSClient`,`DescribeAddonVersionsCommand`).sc(Ke).build(){},ab=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeCluster`,{}).n(`EKSClient`,`DescribeClusterCommand`).sc(Ye).build(){},ob=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeNodegroup`,{}).n(`EKSClient`,`DescribeNodegroupCommand`).sc(Ce).build(){},sb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAccessEntries`,{}).n(`EKSClient`,`ListAccessEntriesCommand`).sc(Pt).build(){},cb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAccessPolicies`,{}).n(`EKSClient`,`ListAccessPoliciesCommand`).sc(Oe).build(){},lb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAddons`,{}).n(`EKSClient`,`ListAddonsCommand`).sc($e).build(){},ub=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAssociatedAccessPolicies`,{}).n(`EKSClient`,`ListAssociatedAccessPoliciesCommand`).sc(Ze).build(){},db=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListClusters`,{}).n(`EKSClient`,`ListClustersCommand`).sc(tt).build(){},fb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListNodegroups`,{}).n(`EKSClient`,`ListNodegroupsCommand`).sc(Re).build(){},pb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeListeners`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeListenersCommand`).sc(Ot).build(){},mb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeLoadBalancerAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeLoadBalancerAttributesCommand`).sc(yt).build(){},hb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeLoadBalancers`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeLoadBalancersCommand`).sc(_t).build(){},gb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeRules`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeRulesCommand`).sc(at).build(){},_b=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeSSLPolicies`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeSSLPoliciesCommand`).sc(Ut).build(){},vb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTags`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTagsCommand`).sc(Yt).build(){},yb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetGroupAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetGroupAttributesCommand`).sc(ct).build(){},bb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetGroups`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetGroupsCommand`).sc(qt).build(){},xb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetHealth`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetHealthCommand`).sc(Ue).build(){},Sb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetInstanceProfile`,{}).n(`IAMClient`,`GetInstanceProfileCommand`).sc(we).build(){},Cb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicy`,{}).n(`IAMClient`,`GetPolicyCommand`).sc(Ge).build(){},wb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicyVersion`,{}).n(`IAMClient`,`GetPolicyVersionCommand`).sc(Je).build(){},Tb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetRole`,{}).n(`IAMClient`,`GetRoleCommand`).sc(Se).build(){},Eb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetUser`,{}).n(`IAMClient`,`GetUserCommand`).sc(ke).build(){},Db=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAccessKeys`,{}).n(`IAMClient`,`ListAccessKeysCommand`).sc(Nt).build(){},Ob=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAttachedRolePolicies`,{}).n(`IAMClient`,`ListAttachedRolePoliciesCommand`).sc(De).build(){},kb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAttachedUserPolicies`,{}).n(`IAMClient`,`ListAttachedUserPoliciesCommand`).sc(Qe).build(){},Ab=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListInstanceProfiles`,{}).n(`IAMClient`,`ListInstanceProfilesCommand`).sc(Xe).build(){},jb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListInstanceProfilesForRole`,{}).n(`IAMClient`,`ListInstanceProfilesForRoleCommand`).sc(et).build(){},Mb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListPolicies`,{}).n(`IAMClient`,`ListPoliciesCommand`).sc(Ie).build(){},Nb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListRoles`,{}).n(`IAMClient`,`ListRolesCommand`).sc(ge).build(){},Pb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListUsers`,{}).n(`IAMClient`,`ListUsersCommand`).sc(pt).build(){},Fb=class extends R.classBuilder().ep(Gt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions()),Be(n)]}).s(`AmazonS3`,`ListBuckets`,{}).n(`S3Client`,`ListBucketsCommand`).sc(ht).build(){},Ib=class extends R.classBuilder().ep({...Gt,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions()),Be(n)]}).s(`AmazonS3`,`ListObjectsV2`,{}).n(`S3Client`,`ListObjectsV2Command`).sc(nt).build(){},Lb=!1;function Rb(e,t){Lb||!Cy(e)||(Lb=!0,$n(),zt(),t.clear(),window.location.pathname!==`/login`&&(window.location.href=`/login?reason=expired`))}function zb(){let e=new Xi({queryCache:new Yi({onError:t=>Rb(t,e)}),mutationCache:new qi({onError:t=>Rb(t,e)}),defaultOptions:{queries:{staleTime:5e3,refetchIntervalInBackground:!1}}});return e}function Bb(){let e=(0,Ls.c)(8),{theme:t,setTheme:n}=Vs(),r;e[0]!==n||e[1]!==t?(r=()=>{n(t===`light`?`dark`:t===`dark`?`light`:`dark`)},e[0]=n,e[1]=t,e[2]=r):r=e[2];let i=r,a,o,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,G.jsx)(wc,{className:`size-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90`}),o=(0,G.jsx)(hc,{className:`absolute size-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0`}),s=(0,G.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`}),e[3]=a,e[4]=o,e[5]=s):(a=e[3],o=e[4],s=e[5]);let c;return e[6]===i?c=e[7]:(c=(0,G.jsxs)(wr,{className:`rounded-full`,onClick:i,size:`icon-sm`,variant:`ghost`,children:[a,o,s]}),e[6]=i,e[7]=c),c}function Vb(){let e=(0,Ls.c)(7),{isAdmin:t,license:n}=xy(),r=t&&n===`open-source`,i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=Cn(`z-50 flex h-10 shrink-0 items-center gap-2 border-b border-sidebar-border bg-sidebar px-4 text-sidebar-foreground`,`sticky top-0`),a=(0,G.jsx)(Bg,{className:`-ml-1`}),e[0]=i,e[1]=a):(i=e[0],a=e[1]);let o;e[2]===r?o=e[3]:(o=r&&(0,G.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:Cn(br({variant:`outline`,size:`sm`})),children:`Upgrade`}),e[2]=r,e[3]=o);let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,G.jsx)(Bb,{}),e[4]=s):s=e[4];let c;return e[5]===o?c=e[6]:(c=(0,G.jsxs)(`header`,{className:i,children:[a,(0,G.jsxs)(`div`,{className:`flex w-full items-center justify-end gap-2`,children:[o,s]})]}),e[5]=o,e[6]=c),c}function Hb(){let e=(0,Ls.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,G.jsx)(`h1`,{className:`text-4xl font-bold`,children:`404`}),n=(0,G.jsx)(`p`,{className:`text-muted-foreground`,children:`Page not found`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-4`,children:[t,n,(0,G.jsx)(L,{to:`/`,children:(0,G.jsx)(wr,{variant:`outline`,children:`Go back home`})})]}),e[2]=r):r=e[2],r}function Ub(){let e=(0,Ls.c)(210),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:Wb},e[0]=t):t=e[0];let n=Ds(t),r=es(),i=Qi(),{isAdmin:a}=xy(),o;e[1]!==r||e[2]!==i?(o=function(){$n(),zt(),i.clear(),r({to:`/login`})},e[1]=r,e[2]=i,e[3]=o):o=e[3];let s=o,c;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsxs)(Hg,{className:`flex flex-row items-center gap-2 px-4 py-3`,children:[(0,G.jsx)(`img`,{src:`/mulga-logo.svg`,alt:`Mulga`,className:`size-6 shrink-0 dark:invert`}),(0,G.jsx)(`span`,{className:`truncate text-sm font-semibold group-data-[collapsible=icon]:hidden`,children:`Spinifex`})]}),e[4]=c):c=e[4];let l;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,G.jsx)(qg,{children:`General`}),e[5]=l):l=e[5];let u=n===`/`,d,f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,G.jsx)(sc,{className:`size-4`}),f=(0,G.jsx)(`span`,{children:`Dashboard`}),e[6]=d,e[7]=f):(d=e[6],f=e[7]);let p;e[8]===u?p=e[9]:(p=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/`,children:(0,G.jsxs)(Zg,{isActive:u,tooltip:`Dashboard`,children:[d,f]})})}),e[8]=u,e[9]=p);let m;e[10]!==a||e[11]!==n?(m=a&&(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/nodes`,children:(0,G.jsxs)(Zg,{isActive:n.startsWith(`/nodes`),tooltip:`Nodes`,children:[(0,G.jsx)(xc,{className:`size-4`}),(0,G.jsx)(`span`,{children:`Nodes`})]})})}),e[10]=a,e[11]=n,e[12]=m):m=e[12];let h;e[13]!==p||e[14]!==m?(h=(0,G.jsxs)(Kg,{children:[l,(0,G.jsxs)(Jg,{children:[p,m]})]}),e[13]=p,e[14]=m,e[15]=h):h=e[15];let g;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,G.jsx)(qg,{children:`EC2`}),e[16]=g):g=e[16];let _;e[17]===n?_=e[18]:(_=n.startsWith(`/ec2/describe-instances`)||n.startsWith(`/ec2/run-instances`),e[17]=n,e[18]=_);let v,y;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,G.jsx)(xc,{className:`size-4`}),y=(0,G.jsx)(`span`,{children:`Instances`}),e[19]=v,e[20]=y):(v=e[19],y=e[20]);let b;e[21]===_?b=e[22]:(b=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-instances`,children:(0,G.jsxs)(Zg,{isActive:_,tooltip:`Instances`,children:[v,y]})})}),e[21]=_,e[22]=b);let x;e[23]===n?x=e[24]:(x=n.startsWith(`/ec2/describe-images`),e[23]=n,e[24]=x);let S,C;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,G.jsx)(lc,{className:`size-4`}),C=(0,G.jsx)(`span`,{children:`Images`}),e[25]=S,e[26]=C):(S=e[25],C=e[26]);let w;e[27]===x?w=e[28]:(w=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-images`,children:(0,G.jsxs)(Zg,{isActive:x,tooltip:`Images`,children:[S,C]})})}),e[27]=x,e[28]=w);let T;e[29]===n?T=e[30]:(T=n.startsWith(`/ec2/describe-key-pairs`),e[29]=n,e[30]=T);let E,D;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,G.jsx)(uc,{className:`size-4`}),D=(0,G.jsx)(`span`,{children:`Key Pairs`}),e[31]=E,e[32]=D):(E=e[31],D=e[32]);let O;e[33]===T?O=e[34]:(O=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-key-pairs`,children:(0,G.jsxs)(Zg,{isActive:T,tooltip:`Key Pairs`,children:[E,D]})})}),e[33]=T,e[34]=O);let k;e[35]===n?k=e[36]:(k=n.startsWith(`/ec2/describe-addresses`)||n.startsWith(`/ec2/allocate-address`),e[35]=n,e[36]=k);let A,j;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,G.jsx)(mc,{className:`size-4`}),j=(0,G.jsx)(`span`,{children:`Elastic IPs`}),e[37]=A,e[38]=j):(A=e[37],j=e[38]);let M;e[39]===k?M=e[40]:(M=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-addresses`,children:(0,G.jsxs)(Zg,{isActive:k,tooltip:`Elastic IPs`,children:[A,j]})})}),e[39]=k,e[40]=M);let ee;e[41]===n?ee=e[42]:(ee=n.startsWith(`/ec2/describe-volumes`)||n.startsWith(`/ec2/create-volume`)||n.startsWith(`/ec2/modify-volume`),e[41]=n,e[42]=ee);let N,P;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,G.jsx)(oc,{className:`size-4`}),P=(0,G.jsx)(`span`,{children:`Volumes`}),e[43]=N,e[44]=P):(N=e[43],P=e[44]);let te;e[45]===ee?te=e[46]:(te=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-volumes`,children:(0,G.jsxs)(Zg,{isActive:ee,tooltip:`Volumes`,children:[N,P]})})}),e[45]=ee,e[46]=te);let ne;e[47]===n?ne=e[48]:(ne=n.startsWith(`/ec2/describe-snapshots`)||n.startsWith(`/ec2/create-snapshot`),e[47]=n,e[48]=ne);let re,ie;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,G.jsx)(tc,{className:`size-4`}),ie=(0,G.jsx)(`span`,{children:`Snapshots`}),e[49]=re,e[50]=ie):(re=e[49],ie=e[50]);let ae;e[51]===ne?ae=e[52]:(ae=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-snapshots`,children:(0,G.jsxs)(Zg,{isActive:ne,tooltip:`Snapshots`,children:[re,ie]})})}),e[51]=ne,e[52]=ae);let F;e[53]===n?F=e[54]:(F=n.startsWith(`/ec2/describe-placement-groups`)||n.startsWith(`/ec2/create-placement-group`),e[53]=n,e[54]=F);let oe,se;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,G.jsx)(dc,{className:`size-4`}),se=(0,G.jsx)(`span`,{children:`Placement Groups`}),e[55]=oe,e[56]=se):(oe=e[55],se=e[56]);let I;e[57]===F?I=e[58]:(I=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-placement-groups`,children:(0,G.jsxs)(Zg,{isActive:F,tooltip:`Placement Groups`,children:[oe,se]})})}),e[57]=F,e[58]=I);let ce;e[59]===n?ce=e[60]:(ce=n.startsWith(`/ec2/describe-load-balancers`)||n.startsWith(`/ec2/create-load-balancer`),e[59]=n,e[60]=ce);let le,ue;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,G.jsx)(Dc,{className:`size-4`}),ue=(0,G.jsx)(`span`,{children:`Load Balancers`}),e[61]=le,e[62]=ue):(le=e[61],ue=e[62]);let de;e[63]===ce?de=e[64]:(de=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-load-balancers`,children:(0,G.jsxs)(Zg,{isActive:ce,tooltip:`Load Balancers`,children:[le,ue]})})}),e[63]=ce,e[64]=de);let fe;e[65]===n?fe=e[66]:(fe=n.startsWith(`/ec2/describe-target-groups`)||n.startsWith(`/ec2/create-target-group`),e[65]=n,e[66]=fe);let pe,me;e[67]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,G.jsx)(ic,{className:`size-4`}),me=(0,G.jsx)(`span`,{children:`Target Groups`}),e[67]=pe,e[68]=me):(pe=e[67],me=e[68]);let he;e[69]===fe?he=e[70]:(he=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-target-groups`,children:(0,G.jsxs)(Zg,{isActive:fe,tooltip:`Target Groups`,children:[pe,me]})})}),e[69]=fe,e[70]=he);let ge;e[71]!==b||e[72]!==w||e[73]!==O||e[74]!==M||e[75]!==te||e[76]!==ae||e[77]!==I||e[78]!==de||e[79]!==he?(ge=(0,G.jsxs)(Kg,{children:[g,(0,G.jsxs)(Jg,{children:[b,w,O,M,te,ae,I,de,he]})]}),e[71]=b,e[72]=w,e[73]=O,e[74]=M,e[75]=te,e[76]=ae,e[77]=I,e[78]=de,e[79]=he,e[80]=ge):ge=e[80];let _e;e[81]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,G.jsx)(qg,{children:`Networking`}),e[81]=_e):_e=e[81];let ve;e[82]===n?ve=e[83]:(ve=n.startsWith(`/ec2/describe-vpcs`)||n.startsWith(`/ec2/create-vpc`),e[82]=n,e[83]=ve);let ye,be;e[84]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,G.jsx)(gc,{className:`size-4`}),be=(0,G.jsx)(`span`,{children:`VPCs`}),e[84]=ye,e[85]=be):(ye=e[84],be=e[85]);let xe;e[86]===ve?xe=e[87]:(xe=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-vpcs`,children:(0,G.jsxs)(Zg,{isActive:ve,tooltip:`VPCs`,children:[ye,be]})})}),e[86]=ve,e[87]=xe);let Se;e[88]===n?Se=e[89]:(Se=n.startsWith(`/ec2/describe-subnets`)||n.startsWith(`/ec2/create-subnet`),e[88]=n,e[89]=Se);let Ce,we;e[90]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,G.jsx)(fc,{className:`size-4`}),we=(0,G.jsx)(`span`,{children:`Subnets`}),e[90]=Ce,e[91]=we):(Ce=e[90],we=e[91]);let Te;e[92]===Se?Te=e[93]:(Te=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-subnets`,children:(0,G.jsxs)(Zg,{isActive:Se,tooltip:`Subnets`,children:[Ce,we]})})}),e[92]=Se,e[93]=Te);let Ee;e[94]===n?Ee=e[95]:(Ee=n.startsWith(`/ec2/describe-security-groups`)||n.startsWith(`/ec2/create-security-group`),e[94]=n,e[95]=Ee);let De,Oe;e[96]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,G.jsx)(Sc,{className:`size-4`}),Oe=(0,G.jsx)(`span`,{children:`Security Groups`}),e[96]=De,e[97]=Oe):(De=e[96],Oe=e[97]);let ke;e[98]===Ee?ke=e[99]:(ke=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-security-groups`,children:(0,G.jsxs)(Zg,{isActive:Ee,tooltip:`Security Groups`,children:[De,Oe]})})}),e[98]=Ee,e[99]=ke);let Ae;e[100]===n?Ae=e[101]:(Ae=n.startsWith(`/ec2/describe-route-tables`)||n.startsWith(`/ec2/create-route-table`),e[100]=n,e[101]=Ae);let je,Me;e[102]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,G.jsx)(yc,{className:`size-4`}),Me=(0,G.jsx)(`span`,{children:`Route Tables`}),e[102]=je,e[103]=Me):(je=e[102],Me=e[103]);let Ne;e[104]===Ae?Ne=e[105]:(Ne=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-route-tables`,children:(0,G.jsxs)(Zg,{isActive:Ae,tooltip:`Route Tables`,children:[je,Me]})})}),e[104]=Ae,e[105]=Ne);let Pe;e[106]===n?Pe=e[107]:(Pe=n.startsWith(`/ec2/describe-internet-gateways`),e[106]=n,e[107]=Pe);let Fe,Ie;e[108]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,G.jsx)(ac,{className:`size-4`}),Ie=(0,G.jsx)(`span`,{children:`Internet Gateways`}),e[108]=Fe,e[109]=Ie):(Fe=e[108],Ie=e[109]);let Le;e[110]===Pe?Le=e[111]:(Le=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-internet-gateways`,children:(0,G.jsxs)(Zg,{isActive:Pe,tooltip:`Internet Gateways`,children:[Fe,Ie]})})}),e[110]=Pe,e[111]=Le);let Re;e[112]===n?Re=e[113]:(Re=n.startsWith(`/ec2/describe-nat-gateways`)||n.startsWith(`/ec2/create-nat-gateway`),e[112]=n,e[113]=Re);let ze,Be;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,G.jsx)(bc,{className:`size-4`}),Be=(0,G.jsx)(`span`,{children:`NAT Gateways`}),e[114]=ze,e[115]=Be):(ze=e[114],Be=e[115]);let Ve;e[116]===Re?Ve=e[117]:(Ve=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-nat-gateways`,children:(0,G.jsxs)(Zg,{isActive:Re,tooltip:`NAT Gateways`,children:[ze,Be]})})}),e[116]=Re,e[117]=Ve);let He;e[118]!==xe||e[119]!==Te||e[120]!==ke||e[121]!==Ne||e[122]!==Le||e[123]!==Ve?(He=(0,G.jsxs)(Kg,{children:[_e,(0,G.jsxs)(Jg,{children:[xe,Te,ke,Ne,Le,Ve]})]}),e[118]=xe,e[119]=Te,e[120]=ke,e[121]=Ne,e[122]=Le,e[123]=Ve,e[124]=He):He=e[124];let Ue;e[125]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,G.jsx)(qg,{children:`Containers`}),e[125]=Ue):Ue=e[125];let We;e[126]===n?We=e[127]:(We=n.startsWith(`/eks/list-clusters`)||n.startsWith(`/eks/create-cluster`),e[126]=n,e[127]=We);let Ge,Ke;e[128]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,G.jsx)(ec,{className:`size-4`}),Ke=(0,G.jsx)(`span`,{children:`EKS`}),e[128]=Ge,e[129]=Ke):(Ge=e[128],Ke=e[129]);let qe;e[130]===We?qe=e[131]:(qe=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/eks/list-clusters`,children:(0,G.jsxs)(Zg,{isActive:We,tooltip:`EKS clusters`,children:[Ge,Ke]})})}),e[130]=We,e[131]=qe);let Je;e[132]===n?Je=e[133]:(Je=n.startsWith(`/ecr/list-repositories`),e[132]=n,e[133]=Je);let Ye,Xe;e[134]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=(0,G.jsx)(_c,{className:`size-4`}),Xe=(0,G.jsx)(`span`,{children:`ECR`}),e[134]=Ye,e[135]=Xe):(Ye=e[134],Xe=e[135]);let Ze;e[136]===Je?Ze=e[137]:(Ze=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ecr/list-repositories`,children:(0,G.jsxs)(Zg,{isActive:Je,tooltip:`ECR repositories`,children:[Ye,Xe]})})}),e[136]=Je,e[137]=Ze);let Qe;e[138]===n?Qe=e[139]:(Qe=n.startsWith(`/ecs/list-clusters`),e[138]=n,e[139]=Qe);let $e,et;e[140]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,G.jsx)(rc,{className:`size-4`}),et=(0,G.jsx)(`span`,{children:`ECS`}),e[140]=$e,e[141]=et):($e=e[140],et=e[141]);let tt;e[142]===Qe?tt=e[143]:(tt=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ecs/list-clusters`,children:(0,G.jsxs)(Zg,{isActive:Qe,tooltip:`ECS clusters`,children:[$e,et]})})}),e[142]=Qe,e[143]=tt);let nt;e[144]!==qe||e[145]!==Ze||e[146]!==tt?(nt=(0,G.jsxs)(Kg,{children:[Ue,(0,G.jsxs)(Jg,{children:[qe,Ze,tt]})]}),e[144]=qe,e[145]=Ze,e[146]=tt,e[147]=nt):nt=e[147];let rt;e[148]===Symbol.for(`react.memo_cache_sentinel`)?(rt=(0,G.jsx)(qg,{children:`IAM`}),e[148]=rt):rt=e[148];let it;e[149]===n?it=e[150]:(it=n.startsWith(`/iam/list-users`)||n.startsWith(`/iam/create-user`),e[149]=n,e[150]=it);let at,ot;e[151]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,G.jsx)(Ec,{className:`size-4`}),ot=(0,G.jsx)(`span`,{children:`Users`}),e[151]=at,e[152]=ot):(at=e[151],ot=e[152]);let st;e[153]===it?st=e[154]:(st=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/iam/list-users`,children:(0,G.jsxs)(Zg,{isActive:it,tooltip:`Users`,children:[at,ot]})})}),e[153]=it,e[154]=st);let ct;e[155]===n?ct=e[156]:(ct=n.startsWith(`/iam/list-policies`)||n.startsWith(`/iam/create-policy`),e[155]=n,e[156]=ct);let lt,ut;e[157]===Symbol.for(`react.memo_cache_sentinel`)?(lt=(0,G.jsx)(Cc,{className:`size-4`}),ut=(0,G.jsx)(`span`,{children:`Policies`}),e[157]=lt,e[158]=ut):(lt=e[157],ut=e[158]);let dt;e[159]===ct?dt=e[160]:(dt=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/iam/list-policies`,children:(0,G.jsxs)(Zg,{isActive:ct,tooltip:`Policies`,children:[lt,ut]})})}),e[159]=ct,e[160]=dt);let ft;e[161]===n?ft=e[162]:(ft=n.startsWith(`/iam/list-roles`)||n.startsWith(`/iam/create-role`),e[161]=n,e[162]=ft);let pt,mt;e[163]===Symbol.for(`react.memo_cache_sentinel`)?(pt=(0,G.jsx)(Tc,{className:`size-4`}),mt=(0,G.jsx)(`span`,{children:`Roles`}),e[163]=pt,e[164]=mt):(pt=e[163],mt=e[164]);let ht;e[165]===ft?ht=e[166]:(ht=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/iam/list-roles`,children:(0,G.jsxs)(Zg,{isActive:ft,tooltip:`Roles`,children:[pt,mt]})})}),e[165]=ft,e[166]=ht);let gt;e[167]===n?gt=e[168]:(gt=n.startsWith(`/iam/list-instance-profiles`)||n.startsWith(`/iam/create-instance-profile`),e[167]=n,e[168]=gt);let _t,vt;e[169]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,G.jsx)(cc,{className:`size-4`}),vt=(0,G.jsx)(`span`,{children:`Instance Profiles`}),e[169]=_t,e[170]=vt):(_t=e[169],vt=e[170]);let yt;e[171]===gt?yt=e[172]:(yt=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/iam/list-instance-profiles`,children:(0,G.jsxs)(Zg,{isActive:gt,tooltip:`Instance Profiles`,children:[_t,vt]})})}),e[171]=gt,e[172]=yt);let bt;e[173]!==ht||e[174]!==yt||e[175]!==st||e[176]!==dt?(bt=(0,G.jsxs)(Kg,{children:[rt,(0,G.jsxs)(Jg,{children:[st,dt,ht,yt]})]}),e[173]=ht,e[174]=yt,e[175]=st,e[176]=dt,e[177]=bt):bt=e[177];let xt;e[178]===Symbol.for(`react.memo_cache_sentinel`)?(xt=(0,G.jsx)(qg,{children:`S3`}),e[178]=xt):xt=e[178];let St;e[179]===n?St=e[180]:(St=n.startsWith(`/s3/ls`),e[179]=n,e[180]=St);let Ct,wt;e[181]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=(0,G.jsx)(xc,{className:`size-4`}),wt=(0,G.jsx)(`span`,{children:`Buckets`}),e[181]=Ct,e[182]=wt):(Ct=e[181],wt=e[182]);let Tt;e[183]===St?Tt=e[184]:(Tt=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/s3/ls`,children:(0,G.jsxs)(Zg,{isActive:St,tooltip:`Buckets`,children:[Ct,wt]})})}),e[183]=St,e[184]=Tt);let Et;e[185]!==a||e[186]!==n?(Et=a&&(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/s3/service-metrics`,children:(0,G.jsxs)(Zg,{isActive:n.startsWith(`/s3/service-metrics`),tooltip:`Service Metrics`,children:[(0,G.jsx)(Qs,{className:`size-4`}),(0,G.jsx)(`span`,{children:`Service Metrics`})]})})}),e[185]=a,e[186]=n,e[187]=Et):Et=e[187];let Dt;e[188]!==Tt||e[189]!==Et?(Dt=(0,G.jsxs)(Kg,{children:[xt,(0,G.jsxs)(Jg,{children:[Tt,Et]})]}),e[188]=Tt,e[189]=Et,e[190]=Dt):Dt=e[190];let Ot;e[191]===a?Ot=e[192]:(Ot=a&&(0,G.jsxs)(Kg,{children:[(0,G.jsx)(qg,{children:`Documentation`}),(0,G.jsx)(Jg,{children:(0,G.jsx)(Yg,{children:(0,G.jsx)(`a`,{href:`https://docs.mulgadc.com`,target:`_blank`,rel:`noopener noreferrer`,children:(0,G.jsxs)(Zg,{tooltip:`Documentation`,children:[(0,G.jsx)($s,{className:`size-4`}),(0,G.jsx)(`span`,{children:`Docs`})]})})})})]}),e[191]=a,e[192]=Ot);let kt;e[193]!==bt||e[194]!==Dt||e[195]!==Ot||e[196]!==ge||e[197]!==He||e[198]!==nt||e[199]!==h?(kt=(0,G.jsxs)(Gg,{children:[h,ge,He,nt,bt,Dt,Ot]}),e[193]=bt,e[194]=Dt,e[195]=Ot,e[196]=ge,e[197]=He,e[198]=nt,e[199]=h,e[200]=kt):kt=e[200];let At;e[201]===Symbol.for(`react.memo_cache_sentinel`)?(At=(0,G.jsx)(Wg,{className:`mx-0 w-full`}),e[201]=At):At=e[201];let jt,Mt;e[202]===Symbol.for(`react.memo_cache_sentinel`)?(jt=(0,G.jsx)(pc,{className:`size-4`}),Mt=(0,G.jsx)(`span`,{children:`Sign out`}),e[202]=jt,e[203]=Mt):(jt=e[202],Mt=e[203]);let Nt;e[204]===s?Nt=e[205]:(Nt=(0,G.jsxs)(Ug,{children:[At,(0,G.jsx)(Jg,{children:(0,G.jsx)(Yg,{children:(0,G.jsxs)(Zg,{onClick:s,tooltip:`Sign out`,children:[jt,Mt]})})})]}),e[204]=s,e[205]=Nt);let Pt;e[206]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,G.jsx)(Vg,{}),e[206]=Pt):Pt=e[206];let Ft;return e[207]!==kt||e[208]!==Nt?(Ft=(0,G.jsxs)(zg,{collapsible:`icon`,children:[c,kt,Nt,Pt]}),e[207]=kt,e[208]=Nt,e[209]=Ft):Ft=e[209],Ft}function Wb(e){return e.pathname}function Gb(e){let t=(0,Ls.c)(18),{error:n,reset:r}=e,i=M(),a=Qi(),o;t[0]!==a||t[1]!==r||t[2]!==i?(o=function(){a.invalidateQueries(),r(),i.invalidate()},t[0]=a,t[1]=r,t[2]=i,t[3]=o):o=t[3];let s=o,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(Ub,{}),t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,G.jsx)(Vb,{}),t[5]=l):l=t[5];let u,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,G.jsx)(`div`,{className:`flex justify-center`,children:(0,G.jsx)(nc,{className:`size-12 text-destructive`})}),d=(0,G.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Something went wrong`}),t[6]=u,t[7]=d):(u=t[6],d=t[7]);let f=n.message||`An unexpected error occurred`,p;t[8]===f?p=t[9]:(p=(0,G.jsx)(`p`,{className:`text-muted-foreground`,children:f}),t[8]=f,t[9]=p);let m;t[10]===s?m=t[11]:(m=(0,G.jsx)(wr,{onClick:s,variant:`default`,children:`Try Again`}),t[10]=s,t[11]=m);let h;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,G.jsx)(L,{to:`/`,children:(0,G.jsx)(wr,{variant:`outline`,children:`Go Home`})}),t[12]=h):h=t[12];let g;t[13]===m?g=t[14]:(g=(0,G.jsxs)(`div`,{className:`flex justify-center gap-2`,children:[m,h]}),t[13]=m,t[14]=g);let _;return t[15]!==g||t[16]!==p?(_=(0,G.jsxs)(G.Fragment,{children:[c,(0,G.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[l,(0,G.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 pt-0`,children:(0,G.jsxs)(`div`,{className:`max-w-md space-y-4 text-center`,children:[u,d,p,g]})})]})]}),t[15]=g,t[16]=p,t[17]=_):_=t[17],_}var Kb=is()({head:()=>({meta:[{title:`Mulga`}]}),component:()=>(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ms,{}),(0,G.jsx)(Ub,{}),(0,G.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[(0,G.jsx)(Vb,{}),(0,G.jsx)(`div`,{className:`flex flex-1 flex-col p-8`,children:(0,G.jsx)(vs,{})})]})]}),errorComponent:Gb,notFoundComponent:Hb}),qb=q(`/login`)({validateSearch:e=>({reason:e.reason===`expired`?`expired`:void 0}),beforeLoad:()=>{if(tr())throw me({to:`/`})},component:J(()=>z(()=>import(`./login.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),`component`)}),Jb=q(`/_auth`)({beforeLoad:()=>{if(!tr())throw me({to:`/login`})},component:J(()=>z(()=>import(`./route.js`),__vite__mapDeps([14,1])),`component`)}),Yb=a({queryKey:[`ec2`,`availabilityZones`],queryFn:async()=>{let e=new Ey({});return await Ft().send(e)},staleTime:3e5}),Xb=a({queryKey:[`ec2`,`instances`],queryFn:async()=>{let e=new ky({});return await Ft().send(e)},refetchInterval:5e3}),Zb=e=>a({queryKey:[`ec2`,`instances`,e],queryFn:async()=>{let t=new ky({InstanceIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),Qb=e=>a({queryKey:[`ec2`,`iam-instance-profile-associations`,e],queryFn:async()=>{let t=new Dy({Filters:[{Name:`instance-id`,Values:[e]}]});return await Ft().send(t)},refetchInterval:5e3}),$b=a({queryKey:[`ec2`,`instances`,`types`],queryFn:async()=>{let e=new Ay({Filters:[{Name:`capacity`,Values:[`true`]}]});return await Ft().send(e)},refetchInterval:5e3}),ex=a({queryKey:[`ec2`,`images`],queryFn:async()=>{let e=new Oy({});return await Ft().send(e)}}),tx=e=>a({queryKey:[`ec2`,`images`,e??`none`],queryFn:async()=>{if(!e)return{Images:[],$metadata:{}};let t=new Oy({ImageIds:[e]});return await Ft().send(t)}}),nx=a({queryKey:[`ec2`,`keypairs`],queryFn:async()=>{let e=new My({});return await Ft().send(e)}}),rx=e=>a({queryKey:[`ec2`,`keypairs`,e],queryFn:async()=>{let t=new My({KeyPairIds:[e]});return await Ft().send(t)}}),ix=a({queryKey:[`ec2`,`regions`],queryFn:async()=>{let e=new Fy({});return await Ft().send(e)},staleTime:3e5}),ax=a({queryKey:[`ec2`,`subnets`],queryFn:async()=>{let e=new zy({});return await Ft().send(e)}}),ox=e=>a({queryKey:[`ec2`,`subnets`,e],queryFn:async()=>{let t=new zy({SubnetIds:[e]});return await Ft().send(t)}}),sx=a({queryKey:[`ec2`,`snapshots`],queryFn:async()=>{let e=new Ry({});return await Ft().send(e)},refetchInterval:5e3}),cx=e=>a({queryKey:[`ec2`,`snapshots`,e],queryFn:async()=>{let t=new Ry({SnapshotIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),lx=a({queryKey:[`ec2`,`internetGateways`],queryFn:async()=>{let e=new jy({});return await Ft().send(e)},refetchInterval:5e3}),ux=e=>a({queryKey:[`ec2`,`internetGateways`,e],queryFn:async()=>{let t=new jy({InternetGatewayIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),dx=a({queryKey:[`ec2`,`routeTables`],queryFn:async()=>{let e=new Iy({});return await Ft().send(e)},refetchInterval:5e3}),fx=e=>a({queryKey:[`ec2`,`routeTables`,e],queryFn:async()=>{let t=new Iy({RouteTableIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),px=a({queryKey:[`ec2`,`vpcs`],queryFn:async()=>{let e=new Vy({});return await Ft().send(e)}}),mx=e=>a({queryKey:[`ec2`,`vpcs`,e],queryFn:async()=>{let t=new Vy({VpcIds:[e]});return await Ft().send(t)}}),hx=a({queryKey:[`ec2`,`placementGroups`],queryFn:async()=>{let e=new Py({});return await Ft().send(e)}}),gx=e=>a({queryKey:[`ec2`,`placementGroups`,e],queryFn:async()=>{let t=new Py({GroupIds:[e]});return await Ft().send(t)}}),_x=a({queryKey:[`ec2`,`securityGroups`],queryFn:async()=>{let e=new Ly({});return await Ft().send(e)}}),vx=e=>a({queryKey:[`ec2`,`securityGroups`,e],queryFn:async()=>{let t=new Ly({GroupIds:[e]});return await Ft().send(t)}}),yx=a({queryKey:[`ec2`,`addresses`],queryFn:async()=>{let e=new Ty({});return await Ft().send(e)},refetchInterval:5e3}),bx=e=>a({queryKey:[`ec2`,`addresses`,e],queryFn:async()=>{let t=new Ty({AllocationIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),xx=a({queryKey:[`ec2`,`natGateways`],queryFn:async()=>{let e=new Ny({});return await Ft().send(e)},refetchInterval:5e3}),Sx=e=>a({queryKey:[`ec2`,`natGateways`,e],queryFn:async()=>{let t=new Ny({NatGatewayIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),Cx=a({queryKey:[`ec2`,`volumes`],queryFn:async()=>{let e=new By({});return await Ft().send(e)},refetchInterval:5e3}),wx=e=>a({queryKey:[`ec2`,`volumes`,e],queryFn:async()=>{let t=new By({VolumeIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),Tx=a({queryKey:[`s3`,`buckets`],queryFn:async()=>{let e=new Fb({});return await Tt().send(e)}}),Ex=(e,t)=>a({queryKey:[`s3`,`buckets`,e,`objects`,t??``],queryFn:async()=>{let n=new Ib({Bucket:e,Prefix:t,Delimiter:`/`});return await Tt().send(n)}}),Dx=q(`/_auth/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Xb),e.queryClient.ensureQueryData(Cx),e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(nx),e.queryClient.ensureQueryData(Tx),e.queryClient.ensureQueryData(_x),e.queryClient.ensureQueryData(xx),e.queryClient.ensureQueryData(yx),e.queryClient.ensureQueryData(lx)])},head:()=>({meta:[{title:`Dashboard | Mulga`}]}),component:J(()=>z(()=>import(`./_auth.js`),__vite__mapDeps([15,1,2,3,4,5,6,16,17,18,19,20,21,22,8,12,23,24])),`component`)}),Ox=q(`/_auth/nodes`)({head:()=>({meta:[{title:`Nodes | Mulga`}]}),component:J(()=>z(()=>import(`./nodes.js`),__vite__mapDeps([25,1,2,3,16,17,26,20,22,8,12,23,24])),`component`)}),kx=q(`/_auth/s3/service-metrics`)({head:()=>({meta:[{title:`Service Metrics | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./service-metrics.js`),__vite__mapDeps([27,1,16,17,26,20,22,2,3,8,12,23,24])),`component`)}),Ax=q(`/_auth/s3/ls/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tx)},head:()=>({meta:[{title:`Buckets | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./ls.js`),__vite__mapDeps([28,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),jx=q(`/_auth/s3/(buckets)/create-bucket`)({head:()=>({meta:[{title:`Create Bucket | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./create-bucket.js`),__vite__mapDeps([31,1,2,3,32,5,4,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13])),`component`)}),Mx=q(`/_auth/iam/(users)/create-user`)({head:()=>({meta:[{title:`Create User | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./create-user.js`),__vite__mapDeps([41,1,42,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13,43,44])),`component`)}),Nx=q(`/_auth/iam/(roles)/create-role`)({head:()=>({meta:[{title:`Create Role | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./create-role.js`),__vite__mapDeps([45,1,42,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13,46,47,44,43])),`component`)}),Px=q(`/_auth/iam/(policies)/create-policy`)({head:()=>({meta:[{title:`Create Policy | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./create-policy.js`),__vite__mapDeps([48,1,42,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13,46,47,44,43])),`component`)}),Fx=q(`/_auth/iam/(instance-profiles)/create-instance-profile`)({head:()=>({meta:[{title:`Create Instance Profile | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./create-instance-profile.js`),__vite__mapDeps([49,1,42,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13,43,44])),`component`)}),Ix=a({queryKey:[`iam`,`users`],queryFn:async()=>{let e=new Pb({});return await lt().send(e)},staleTime:3e5}),Lx=e=>a({queryKey:[`iam`,`users`,e],queryFn:async()=>{let t=new Eb({UserName:e});return await lt().send(t)},staleTime:3e5}),Rx=e=>a({queryKey:[`iam`,`access-keys`,e],queryFn:async()=>{let t=new Db({UserName:e});return await lt().send(t)},staleTime:3e5}),zx=a({queryKey:[`iam`,`policies`],queryFn:async()=>{let e=new Mb({Scope:`Local`});return await lt().send(e)},staleTime:3e5}),Bx=e=>a({queryKey:[`iam`,`policies`,e],queryFn:async()=>{let t=new Cb({PolicyArn:e});return await lt().send(t)},staleTime:3e5}),Vx=(e,t)=>a({queryKey:[`iam`,`policy-versions`,e,t],queryFn:async()=>{let n=new wb({PolicyArn:e,VersionId:t});return await lt().send(n)},staleTime:3e5}),Hx=e=>a({queryKey:[`iam`,`attached-user-policies`,e],queryFn:async()=>{let t=new kb({UserName:e});return await lt().send(t)},staleTime:3e5}),Ux=a({queryKey:[`iam`,`roles`],queryFn:async()=>{let e=new Nb({});return await lt().send(e)},staleTime:3e5}),Wx=e=>a({queryKey:[`iam`,`roles`,e],queryFn:async()=>{let t=new Tb({RoleName:e});return await lt().send(t)},staleTime:3e5}),Gx=e=>a({queryKey:[`iam`,`attached-role-policies`,e],queryFn:async()=>{let t=new Ob({RoleName:e});return await lt().send(t)},staleTime:3e5}),Kx=a({queryKey:[`iam`,`instance-profiles`],queryFn:async()=>{let e=new Ab({});return await lt().send(e)},staleTime:3e5}),qx=e=>a({queryKey:[`iam`,`instance-profiles`,e],queryFn:async()=>{let t=new Sb({InstanceProfileName:e});return await lt().send(t)},staleTime:3e5}),Jx=e=>a({queryKey:[`iam`,`instance-profiles-for-role`,e],queryFn:async()=>{let t=new jb({RoleName:e});return await lt().send(t)},staleTime:3e5}),Yx=q(`/_auth/eks/(clusters)/create-cluster`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(Ux),e.queryClient.ensureQueryData(ex)])},head:()=>({meta:[{title:`Create Cluster | EKS | Mulga`}]}),component:J(()=>z(()=>import(`./create-cluster.js`),__vite__mapDeps([50,1,2,3,51,4,5,6,33,44,52,42,53,7,8,54,55,10,36,18,11,29,17,34,37,56,57,39,40,20,13,38,58,59])),`component`)}),Xx=3e4,Zx=15e3,Qx=a({queryKey:[`ecs`,`clusters`],queryFn:async()=>{let e=ot(),t=(await e.send(new Zy({}))).clusterArns??[];return t.length===0?[]:(await e.send(new Ky({clusters:t}))).clusters??[]},staleTime:Xx}),$x=e=>a({queryKey:[`ecs`,`clusters`,e],queryFn:async()=>(await ot().send(new Ky({clusters:[e]}))).clusters?.[0],staleTime:Xx}),eS=e=>a({queryKey:[`ecs`,`clusters`,e,`services`],queryFn:async()=>{let t=ot(),n=(await t.send(new $y({cluster:e}))).serviceArns??[];return n.length===0?[]:(await t.send(new Jy({cluster:e,services:n}))).services??[]},staleTime:Xx}),tS=e=>a({queryKey:[`ecs`,`clusters`,e,`tasks`],queryFn:async()=>{let t=ot(),n=(await t.send(new tb({cluster:e}))).taskArns??[];return n.length===0?[]:(await t.send(new Xy({cluster:e,tasks:n}))).tasks??[]},staleTime:Zx}),nS=e=>a({queryKey:[`ecs`,`clusters`,e,`container-instances`],queryFn:async()=>{let t=ot(),n=(await t.send(new Qy({cluster:e}))).containerInstanceArns??[];return n.length===0?[]:(await t.send(new qy({cluster:e,containerInstances:n}))).containerInstances??[]},staleTime:Xx}),rS=a({queryKey:[`ecs`,`task-definitions`],queryFn:async()=>(await ot().send(new eb({}))).taskDefinitionArns??[],staleTime:Xx}),iS=e=>a({queryKey:[`ecs`,`task-definitions`,e],queryFn:async()=>(await ot().send(new Yy({taskDefinition:e}))).taskDefinition,enabled:e!==``,staleTime:Xx}),aS=q(`/_auth/ecs/(clusters)/run-task`)({validateSearch:e=>({cluster:typeof e.cluster==`string`?e.cluster:``}),loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(rS),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(_x)])},head:()=>({meta:[{title:`Run Task | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./run-task.js`),__vite__mapDeps([60,1,61,2,3,4,5,6,33,54,7,8,55,10,36,18,11,16,17,29,34,39,40,20,13,62])),`component`)}),oS=q(`/_auth/ecs/(clusters)/register-task-definition`)({validateSearch:e=>({cluster:typeof e.cluster==`string`?e.cluster:``}),head:()=>({meta:[{title:`Register Task Definition | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./register-task-definition.js`),__vite__mapDeps([63,1,61,2,3,4,5,6,33,7,8,54,55,10,36,18,11,34,64,65,39,40,20,13,62])),`component`)}),sS=5e3,cS=a({queryKey:[`elbv2`,`loadBalancers`],queryFn:async()=>{let e=new hb({});return await Rt().send(e)},refetchInterval:e=>(e.state.data?.LoadBalancers??[]).some(e=>e.State?.Code===`provisioning`)?sS:!1}),lS=e=>a({queryKey:[`elbv2`,`loadBalancers`,e],queryFn:async()=>{let t=new hb({LoadBalancerArns:[e]});return await Rt().send(t)},refetchInterval:e=>(e.state.data?.LoadBalancers?.[0])?.State?.Code===`provisioning`?sS:!1}),uS=e=>a({queryKey:[`elbv2`,`loadBalancers`,e,`attributes`],queryFn:async()=>{let t=new mb({LoadBalancerArn:e});return await Rt().send(t)}}),dS=a({queryKey:[`elbv2`,`targetGroups`],queryFn:async()=>{let e=new bb({});return await Rt().send(e)}}),fS=e=>a({queryKey:[`elbv2`,`targetGroups`,e],queryFn:async()=>{let t=new bb({TargetGroupArns:[e]});return await Rt().send(t)}}),pS=e=>a({queryKey:[`elbv2`,`targetGroups`,e,`attributes`],queryFn:async()=>{let t=new yb({TargetGroupArn:e});return await Rt().send(t)}}),mS=e=>a({queryKey:[`elbv2`,`listeners`,e],queryFn:async()=>{let t=new pb({LoadBalancerArn:e});return await Rt().send(t)}}),hS=e=>a({queryKey:[`elbv2`,`listeners`,e,`rules`],queryFn:async()=>{let t=new gb({ListenerArn:e});return await Rt().send(t)}}),gS=e=>a({queryKey:[`elbv2`,`targetGroups`,e,`health`],queryFn:async()=>{let t=new xb({TargetGroupArn:e});return await Rt().send(t)}}),_S=a({queryKey:[`elbv2`,`sslPolicies`],queryFn:async()=>{let e=new _b({});return await Rt().send(e)},staleTime:1/0}),vS=e=>a({queryKey:[`elbv2`,`tags`,...e],queryFn:async()=>{let t=new vb({ResourceArns:e});return await Rt().send(t)},enabled:e.length>0}),yS=q(`/_auth/ecs/(clusters)/create-service`)({validateSearch:e=>({cluster:typeof e.cluster==`string`?e.cluster:``}),loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(rS),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(_x),e.queryClient.ensureQueryData(dS)])},head:()=>({meta:[{title:`Create Service | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./create-service.js`),__vite__mapDeps([66,1,61,2,3,4,5,6,33,54,7,8,55,10,36,18,11,16,17,29,34,39,40,20,13,62])),`component`)}),bS=q(`/_auth/ec2/(vpc)/create-vpc`)({head:()=>({meta:[{title:`Create VPC | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-vpc.js`),__vite__mapDeps([67,1,68,2,3,4,5,6,33,52,7,8,54,55,10,36,18,11,34,19,35,37,38,39,40,20,13,69])),`component`)}),xS=q(`/_auth/ec2/(volumes)/create-volume`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Yb)},head:()=>({meta:[{title:`Create Volume | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-volume.js`),__vite__mapDeps([70,1,68,2,3,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,69])),`component`)}),SS=q(`/_auth/ec2/(target-groups)/create-target-group`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(px)},head:()=>({meta:[{title:`Create Target Group | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-target-group.js`),__vite__mapDeps([71,1,72,2,3,4,5,6,33,11,29,17,34,35,7,8,36,18,37,38,73,9,10,54,55,64,65,13,39,40,20,74])),`component`)}),CS=q(`/_auth/ec2/(subnet)/create-subnet`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(Yb)])},head:()=>({meta:[{title:`Create Subnet | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-subnet.js`),__vite__mapDeps([75,1,2,3,68,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,69])),`component`)}),wS=q(`/_auth/ec2/(snapshots)/create-snapshot`)({validateSearch:e=>({volumeId:typeof e.volumeId==`string`?e.volumeId:void 0}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(Cx)},head:()=>({meta:[{title:`Create Snapshot | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-snapshot.js`),__vite__mapDeps([76,1,68,2,3,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,47,69])),`component`)}),TS=q(`/_auth/ec2/(security-groups)/create-security-group`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(px)},head:()=>({meta:[{title:`Create Security Group | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-security-group.js`),__vite__mapDeps([77,1,2,3,68,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,69])),`component`)}),ES=q(`/_auth/ec2/(route-tables)/create-route-table`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(px)},head:()=>({meta:[{title:`Create Route Table | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-route-table.js`),__vite__mapDeps([78,1,2,3,68,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,39,40,20,13,69])),`component`)}),DS=q(`/_auth/ec2/(placement-groups)/create-placement-group`)({head:()=>({meta:[{title:`Create Placement Group | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-placement-group.js`),__vite__mapDeps([79,1,68,2,3,4,5,6,33,52,54,7,8,55,10,36,18,11,34,35,37,38,39,40,20,13,69])),`component`)}),OS=q(`/_auth/ec2/(nat-gateways)/create-nat-gateway`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(yx)])},head:()=>({meta:[{title:`Create NAT Gateway | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-nat-gateway.js`),__vite__mapDeps([80,1,2,3,4,5,6,68,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,69])),`component`)}),kS=a({queryKey:[`acm`,`certificates`],queryFn:async()=>{let e=new wy({});return await kt().send(e)}}),AS=q(`/_auth/ec2/(load-balancers)/create-load-balancer`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(_x),e.queryClient.ensureQueryData(dS),e.queryClient.ensureQueryData(kS),e.queryClient.ensureQueryData(_S)])},head:()=>({meta:[{title:`Create Load Balancer | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-load-balancer.js`),__vite__mapDeps([81,1,2,3,82,4,5,6,53,7,8,33,39,13,47,72,54,55,10,36,18,11,29,17,34,64,35,37,38,65,73,9,40,20,74])),`component`)}),jS=q(`/_auth/ec2/(key)/import-key-pair`)({head:()=>({meta:[{title:`Import Key Pair | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./import-key-pair.js`),__vite__mapDeps([83,1,68,2,3,4,5,6,33,52,11,34,35,7,8,36,18,37,38,39,40,20,13,47,69])),`component`)}),MS=q(`/_auth/ec2/(key)/create-key-pair`)({head:()=>({meta:[{title:`Create Key Pair | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-key-pair.js`),__vite__mapDeps([84,1,68,2,3,4,5,6,33,52,53,7,8,11,34,36,85,35,18,37,38,57,39,40,20,13,69])),`component`)}),NS=q(`/_auth/ec2/(internet-gateways)/create-internet-gateway`)({head:()=>({meta:[{title:`Create Internet Gateway | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-internet-gateway.js`),__vite__mapDeps([86,1,68,2,3,4,5,6,33,52,11,34,35,7,8,36,18,37,38,39,40,20,13,69])),`component`)}),PS=q(`/_auth/ec2/(instances)/run-instances`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(ex),e.queryClient.ensureQueryData(nx),e.queryClient.ensureQueryData($b),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(hx),e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(_x)])},head:()=>({meta:[{title:`Run Instances | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./run-instances.js`),__vite__mapDeps([87,1,2,3,68,4,5,6,33,52,7,8,9,10,54,55,36,18,11,29,17,34,35,37,38,39,20,13,69])),`component`)}),FS=q(`/_auth/ec2/(elastic-ips)/allocate-address`)({head:()=>({meta:[{title:`Allocate Elastic IP | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./allocate-address.js`),__vite__mapDeps([88,1,68,2,3,4,5,6,33,52,11,34,35,7,8,36,18,37,38,39,40,20,13,69])),`component`)}),IS=q(`/_auth/s3/ls/$bucket`)({component:J(()=>z(()=>import(`./route2.js`),__vite__mapDeps([89,1])),`component`)}),LS=q(`/_auth/s3/ls/$bucket/`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Ex(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./_bucket.js`),__vite__mapDeps([90,1,2,3,32,5,4,6,33,91,7,8,85,65,92,53,39,29,17,34,20])),`component`)}),RS=q(`/_auth/iam/(users)/list-users/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Ix)},head:()=>({meta:[{title:`Users | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./list-users.js`),__vite__mapDeps([93,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),zS=q(`/_auth/iam/(roles)/list-roles/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Ux)},head:()=>({meta:[{title:`Roles | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./list-roles.js`),__vite__mapDeps([94,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),BS=q(`/_auth/iam/(policies)/list-policies/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(zx)},head:()=>({meta:[{title:`Policies | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./list-policies.js`),__vite__mapDeps([95,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),VS=q(`/_auth/iam/(instance-profiles)/list-instance-profiles/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Kx)},head:()=>({meta:[{title:`Instance Profiles | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./list-instance-profiles.js`),__vite__mapDeps([96,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),HS=3e4,US=3e5,WS=a({queryKey:[`eks`,`clusters`],queryFn:async()=>{let e=new db({});return await jt().send(e)},staleTime:HS}),GS=e=>a({queryKey:[`eks`,`clusters`,e],queryFn:async()=>{let t=new ab({name:e});return await jt().send(t)},staleTime:HS}),KS=e=>a({queryKey:[`eks`,`clusters`,e,`nodegroups`],queryFn:async()=>{let t=new fb({clusterName:e});return await jt().send(t)},staleTime:HS}),qS=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`nodegroups`,t],queryFn:async()=>{let n=new ob({clusterName:e,nodegroupName:t});return await jt().send(n)},staleTime:HS}),JS=e=>a({queryKey:[`eks`,`clusters`,e,`access-entries`],queryFn:async()=>{let t=new sb({clusterName:e});return await jt().send(t)},staleTime:HS}),YS=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`access-entries`,t],queryFn:async()=>{let n=new nb({clusterName:e,principalArn:t});return await jt().send(n)},staleTime:HS}),XS=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`access-entries`,t,`policies`],queryFn:async()=>{let n=new ub({clusterName:e,principalArn:t});return await jt().send(n)},staleTime:HS});a({queryKey:[`eks`,`access-policies`],queryFn:async()=>{let e=new cb({});return await jt().send(e)},staleTime:US});var ZS=a({queryKey:[`eks`,`addon-versions`],queryFn:async()=>{let e=new ib({});return await jt().send(e)},staleTime:US}),QS=e=>a({queryKey:[`eks`,`clusters`,e,`addons`],queryFn:async()=>{let t=new lb({clusterName:e});return await jt().send(t)},staleTime:HS}),$S=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`addons`,t],queryFn:async()=>{let n=new rb({clusterName:e,addonName:t});return await jt().send(n)},staleTime:HS}),eC=q(`/_auth/eks/(clusters)/list-clusters/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(WS)},head:()=>({meta:[{title:`Clusters | EKS | Mulga`}]}),component:J(()=>z(()=>import(`./list-clusters2.js`),__vite__mapDeps([97,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),tC=q(`/_auth/ecs/(clusters)/list-clusters/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Qx)},head:()=>({meta:[{title:`Clusters | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./list-clusters.js`),__vite__mapDeps([98,1,4,2,3,5,6,61,33,53,7,8,29,17,92,39,20,21,13])),`component`)}),nC=a({queryKey:[`ecr`,`repositories`],queryFn:async()=>{let e=new Uy({});return await bt().send(e)}}),rC=e=>a({queryKey:[`ecr`,`repositories`,e,`images`],queryFn:async()=>{let t=new Hy({repositoryName:e});return await bt().send(t)}}),iC=e=>a({queryKey:[`ecr`,`repositories`,e,`policy`],queryFn:async()=>{try{let t=new Gy({repositoryName:e});return(await bt().send(t)).policyText??null}catch(e){if(e instanceof Ae)return null;throw e}}}),aC=e=>a({queryKey:[`ecr`,`repositories`,e,`lifecycle`],queryFn:async()=>{try{let t=new Wy({repositoryName:e});return(await bt().send(t)).lifecyclePolicyText??null}catch(e){if(e instanceof Ee)return null;throw e}}}),oC=q(`/_auth/ecr/(repositories)/list-repositories/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(nC)},head:()=>({meta:[{title:`Repositories | ECR | Mulga`}]}),component:J(()=>z(()=>import(`./list-repositories.js`),__vite__mapDeps([99,1,2,3,4,5,6,100,33,53,7,8,29,17,20,13])),`component`)}),sC=q(`/_auth/ec2/(vpc)/describe-vpcs/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(px)},head:()=>({meta:[{title:`VPCs | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-vpcs.js`),__vite__mapDeps([101,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),cC=q(`/_auth/ec2/(volumes)/describe-volumes/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Cx)},head:()=>({meta:[{title:`Volumes | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-volumes.js`),__vite__mapDeps([102,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),lC=q(`/_auth/ec2/(target-groups)/describe-target-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(dS)},head:()=>({meta:[{title:`Target Groups | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-target-groups.js`),__vite__mapDeps([103,1,4,2,3,5,6,7,8,16,17,29,20])),`component`)}),uC=q(`/_auth/ec2/(subnet)/describe-subnets/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(ax)},head:()=>({meta:[{title:`Subnets | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-subnets.js`),__vite__mapDeps([104,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),dC=q(`/_auth/ec2/(snapshots)/describe-snapshots/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(sx)},head:()=>({meta:[{title:`Snapshots | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-snapshots.js`),__vite__mapDeps([105,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),fC=q(`/_auth/ec2/(security-groups)/describe-security-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(_x)},head:()=>({meta:[{title:`Security Groups | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-security-groups.js`),__vite__mapDeps([106,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),pC=q(`/_auth/ec2/(route-tables)/describe-route-tables/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(dx)},head:()=>({meta:[{title:`Route Tables | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-route-tables.js`),__vite__mapDeps([107,1,2,3,4,5,6,7,8,29,17,30,20,22])),`component`)}),mC=q(`/_auth/ec2/(placement-groups)/describe-placement-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(hx)},head:()=>({meta:[{title:`Placement Groups | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-placement-groups.js`),__vite__mapDeps([108,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),hC=q(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(xx)},head:()=>({meta:[{title:`NAT Gateways | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-nat-gateways.js`),__vite__mapDeps([109,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),gC=q(`/_auth/ec2/(load-balancers)/describe-load-balancers/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(cS)},head:()=>({meta:[{title:`Load Balancers | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-load-balancers.js`),__vite__mapDeps([110,1,2,3,4,5,6,7,8,29,17,20,21])),`component`)}),_C=q(`/_auth/ec2/(key)/describe-key-pairs/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(nx)},head:()=>({meta:[{title:`Key Pairs | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-key-pairs.js`),__vite__mapDeps([111,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),vC=q(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(lx)},head:()=>({meta:[{title:`Internet Gateways | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-internet-gateways.js`),__vite__mapDeps([112,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),yC=q(`/_auth/ec2/(instances)/describe-instances/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Xb)},head:()=>({meta:[{title:`Instances | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-instances.js`),__vite__mapDeps([113,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),bC=q(`/_auth/ec2/(images)/describe-images/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(ex)},head:()=>({meta:[{title:`Images | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-images.js`),__vite__mapDeps([114,1,29,17,30,4,2,3,5,6,20,21,58])),`component`)}),xC=q(`/_auth/ec2/(elastic-ips)/describe-addresses/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(yx)},head:()=>({meta:[{title:`Elastic IPs | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-addresses.js`),__vite__mapDeps([115,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),SC=q(`/_auth/s3/ls/$bucket/$`)({loader:async({context:e,params:t})=>{let n=Nn(t._splat??``);await e.queryClient.ensureQueryData(Ex(t.bucket,n))},head:({params:e})=>({meta:[{title:`${yn(e._splat??``,`${e.bucket}/`)} | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./_.js`),__vite__mapDeps([116,1,2,3,32,5,4,6,33,91,7,8,85,65,92,53,39,29,17,34])),`component`)}),CC=q(`/_auth/iam/(users)/list-users/$userName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Lx(t.userName)),e.queryClient.ensureQueryData(Rx(t.userName)),e.queryClient.ensureQueryData(Hx(t.userName)),e.queryClient.ensureQueryData(zx)])},head:({params:e})=>({meta:[{title:`${e.userName} | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./_userName.js`),__vite__mapDeps([117,1,2,3,42,4,5,6,33,53,7,8,29,17,34,36,65,57,92,118,39,20,21,38])),`component`)}),wC=q(`/_auth/iam/(roles)/list-roles/$roleName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Wx(t.roleName)),e.queryClient.ensureQueryData(Gx(t.roleName)),e.queryClient.ensureQueryData(Jx(t.roleName)),e.queryClient.ensureQueryData(zx)])},head:({params:e})=>({meta:[{title:`${e.roleName} | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./_roleName.js`),__vite__mapDeps([119,1,2,3,4,5,6,42,33,7,8,29,17,34,65,92,53,118,39,20,59])),`component`)}),TC=q(`/_auth/iam/(policies)/list-policies/$policyArn`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.policyArn),r=await e.queryClient.ensureQueryData(Bx(n)),i=r.Policy?.DefaultVersionId;return i&&await e.queryClient.ensureQueryData(Vx(n,i)),r},head:({loaderData:e})=>({meta:[{title:`${e?.Policy?.PolicyName??`Policy`} | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./_policyArn.js`),__vite__mapDeps([120,1,2,3,42,4,5,6,33,7,8,29,17,34,65,92,53,118,39,20,59])),`component`)}),EC=q(`/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(qx(t.instanceProfileName)),e.queryClient.ensureQueryData(Ux)])},head:({params:e})=>({meta:[{title:`${e.instanceProfileName} | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./_instanceProfileName.js`),__vite__mapDeps([121,1,2,3,4,5,6,42,33,7,8,29,17,34,65,92,53,118,39,20])),`component`)}),DC=q(`/_auth/eks/(clusters)/list-clusters/$clusterName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(GS(t.clusterName)),e.queryClient.ensureQueryData(KS(t.clusterName)),e.queryClient.ensureQueryData(JS(t.clusterName))])},head:({params:e})=>({meta:[{title:`${e.clusterName} | EKS | Mulga`}]}),component:J(()=>z(()=>import(`./_clusterName2.js`),__vite__mapDeps([122,1,2,3,4,5,6,51,33,44,52,53,7,8,123,55,10,11,16,17,29,34,35,36,18,37,38,65,92,118,39,20,22,13,46,47])),`component`)}),OC=q(`/_auth/ecs/(clusters)/list-clusters/$clusterName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData($x(t.clusterName)),e.queryClient.ensureQueryData(eS(t.clusterName)),e.queryClient.ensureQueryData(tS(t.clusterName))])},head:({params:e})=>({meta:[{title:`${e.clusterName} | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./_clusterName.js`),__vite__mapDeps([124,1,4,2,3,5,6,61,33,7,8,123,55,10,29,17,34,65,92,53,118,39,20,21])),`component`)}),kC=q(`/_auth/ecr/(repositories)/list-repositories/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(nC),e.queryClient.ensureQueryData(rC(n)),e.queryClient.ensureQueryData(iC(n))])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Repository | Mulga`}]}),component:J(()=>z(()=>import(`./_id17.js`),__vite__mapDeps([125,1,2,3,4,5,6,100,33,53,7,8,123,55,10,29,17,20,22,46,47,44])),`component`)}),AC=q(`/_auth/ec2/(vpc)/describe-vpcs/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(mx(t.id)),e.queryClient.ensureQueryData(ax)])},head:({params:e})=>({meta:[{title:`${e.id} | VPC | Mulga`}]}),component:J(()=>z(()=>import(`./_id16.js`),__vite__mapDeps([126,1,2,3,4,5,6,68,33,52,7,8,29,17,34,65,92,53,118,39,20,21])),`component`)}),jC=q(`/_auth/ec2/(volumes)/modify-volume/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(wx(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id15.js`),__vite__mapDeps([127,1,68,2,3,4,5,6,33,52,11,29,17,34,39,40,7,8,20,13,69])),`component`)}),MC=q(`/_auth/ec2/(volumes)/describe-volumes/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(wx(t.id)),e.queryClient.ensureQueryData(Xb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id14.js`),__vite__mapDeps([128,1,2,3,4,5,6,68,33,52,53,7,8,54,55,10,36,18,29,17,34,65,92,118,39,20,21,13])),`component`)}),NC=q(`/_auth/ec2/(target-groups)/describe-target-groups/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(fS(n)),e.queryClient.ensureQueryData(pS(n)),e.queryClient.ensureQueryData(vS([n])),e.queryClient.ensureQueryData(Xb)])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Target Group | Mulga`}]}),component:J(()=>z(()=>import(`./_id13.js`),__vite__mapDeps([129,1,2,3,72,4,5,6,33,53,7,8,123,55,10,16,17,29,34,65,92,118,130,54,36,18,64,13,39,20])),`component`)}),PC=q(`/_auth/ec2/(subnet)/describe-subnets/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(ox(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | Subnet | Mulga`}]}),component:J(()=>z(()=>import(`./_id12.js`),__vite__mapDeps([131,1,2,3,4,5,6,68,33,52,7,8,29,17,34,65,92,53,118,39,20,21])),`component`)}),FC=q(`/_auth/ec2/(snapshots)/describe-snapshots/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(cx(t.id)),e.queryClient.ensureQueryData(ix)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id11.js`),__vite__mapDeps([132,1,2,3,4,5,6,68,33,52,53,7,8,29,17,34,37,65,92,118,39,20,21,13])),`component`)}),IC=q(`/_auth/ec2/(security-groups)/describe-security-groups/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(vx(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | Security Group | Mulga`}]}),component:J(()=>z(()=>import(`./_id10.js`),__vite__mapDeps([133,1,4,2,3,5,6,68,33,52,53,7,8,54,55,10,36,18,11,29,17,34,64,65,92,118,39,20,13,69])),`component`)}),LC=q(`/_auth/ec2/(route-tables)/describe-route-tables/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(fx(t.id)),e.queryClient.ensureQueryData(lx),e.queryClient.ensureQueryData(xx),e.queryClient.ensureQueryData(ax)])},head:({params:e})=>({meta:[{title:`${e.id} | Route Table | Mulga`}]}),component:J(()=>z(()=>import(`./_id9.js`),__vite__mapDeps([134,1,2,3,4,5,6,68,33,52,7,8,54,55,10,36,18,11,29,17,34,65,92,53,118,39,20,22,13,69])),`component`)}),RC=q(`/_auth/ec2/(placement-groups)/describe-placement-groups/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(gx(t.id)),e.queryClient.ensureQueryData(Xb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id8.js`),__vite__mapDeps([135,1,4,2,3,5,6,68,33,52,7,8,29,17,34,65,92,53,118,39,20,21])),`component`)}),zC=q(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Sx(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | NAT Gateway | Mulga`}]}),component:J(()=>z(()=>import(`./_id7.js`),__vite__mapDeps([136,1,2,3,4,5,6,68,33,52,7,8,29,17,34,65,92,53,118,39,20,21])),`component`)}),BC=q(`/_auth/ec2/(load-balancers)/describe-load-balancers/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(lS(n)),e.queryClient.ensureQueryData(mS(n)),e.queryClient.ensureQueryData(uS(n)),e.queryClient.ensureQueryData(vS([n])),e.queryClient.ensureQueryData(dS),e.queryClient.ensureQueryData(ax)])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Load Balancer | Mulga`}]}),component:J(()=>z(()=>import(`./_id6.js`),__vite__mapDeps([137,1,2,3,82,4,5,6,53,7,8,33,39,13,47,72,54,55,10,36,18,123,11,29,17,34,65,92,118,130,64,20,21,74])),`component`)}),VC=q(`/_auth/ec2/(key)/describe-key-pairs/$id`)({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(rx(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??`Key Pair`} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id5.js`),__vite__mapDeps([138,1,2,3,68,4,5,6,33,52,7,8,29,17,34,65,92,53,118,39,20])),`component`)}),HC=q(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(ux(t.id)),e.queryClient.ensureQueryData(px)])},head:({params:e})=>({meta:[{title:`${e.id} | Internet Gateway | Mulga`}]}),component:J(()=>z(()=>import(`./_id4.js`),__vite__mapDeps([139,1,2,3,4,5,6,68,33,52,7,8,54,55,10,36,18,29,17,34,65,92,53,118,39,20])),`component`)}),UC=q(`/_auth/ec2/(instances)/describe-instances/$id`)({loader:async({context:e,params:t})=>{let[n]=await Promise.all([e.queryClient.ensureQueryData(Zb(t.id)),e.queryClient.ensureQueryData($b)]),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(tx(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??`Instance`} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id3.js`),__vite__mapDeps([140,1,2,3,4,5,6,68,33,52,53,7,8,54,55,10,36,18,16,17,29,34,56,65,92,118,39,20,21,13,47,23,24,141])),`component`)}),WC=q(`/_auth/ec2/(images)/describe-images/$id`)({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(tx(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??`Image`} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id2.js`),__vite__mapDeps([142,1,29,17,34,4,2,3,5,6,20,21,58,141,118])),`component`)}),GC=q(`/_auth/ec2/(elastic-ips)/describe-addresses/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(bx(t.id)),e.queryClient.ensureQueryData(Xb)])},head:({params:e})=>({meta:[{title:`${e.id} | Elastic IP | Mulga`}]}),component:J(()=>z(()=>import(`./_id.js`),__vite__mapDeps([143,1,2,3,68,4,5,6,33,52,7,8,54,55,10,36,18,29,17,34,65,92,53,118,39,20])),`component`)}),KC=qb.update({id:`/login`,path:`/login`,getParentRoute:()=>Kb}),$=Jb.update({id:`/_auth`,getParentRoute:()=>Kb}),qC=Dx.update({id:`/`,path:`/`,getParentRoute:()=>$}),JC=Ox.update({id:`/nodes`,path:`/nodes`,getParentRoute:()=>$}),YC=kx.update({id:`/s3/service-metrics`,path:`/s3/service-metrics`,getParentRoute:()=>$}),XC=Ax.update({id:`/s3/ls/`,path:`/s3/ls/`,getParentRoute:()=>$}),ZC=jx.update({id:`/s3/(buckets)/create-bucket`,path:`/s3/create-bucket`,getParentRoute:()=>$}),QC=Mx.update({id:`/iam/(users)/create-user`,path:`/iam/create-user`,getParentRoute:()=>$}),$C=Nx.update({id:`/iam/(roles)/create-role`,path:`/iam/create-role`,getParentRoute:()=>$}),ew=Px.update({id:`/iam/(policies)/create-policy`,path:`/iam/create-policy`,getParentRoute:()=>$}),tw=Fx.update({id:`/iam/(instance-profiles)/create-instance-profile`,path:`/iam/create-instance-profile`,getParentRoute:()=>$}),nw=Yx.update({id:`/eks/(clusters)/create-cluster`,path:`/eks/create-cluster`,getParentRoute:()=>$}),rw=aS.update({id:`/ecs/(clusters)/run-task`,path:`/ecs/run-task`,getParentRoute:()=>$}),iw=oS.update({id:`/ecs/(clusters)/register-task-definition`,path:`/ecs/register-task-definition`,getParentRoute:()=>$}),aw=yS.update({id:`/ecs/(clusters)/create-service`,path:`/ecs/create-service`,getParentRoute:()=>$}),ow=bS.update({id:`/ec2/(vpc)/create-vpc`,path:`/ec2/create-vpc`,getParentRoute:()=>$}),sw=xS.update({id:`/ec2/(volumes)/create-volume`,path:`/ec2/create-volume`,getParentRoute:()=>$}),cw=SS.update({id:`/ec2/(target-groups)/create-target-group`,path:`/ec2/create-target-group`,getParentRoute:()=>$}),lw=CS.update({id:`/ec2/(subnet)/create-subnet`,path:`/ec2/create-subnet`,getParentRoute:()=>$}),uw=wS.update({id:`/ec2/(snapshots)/create-snapshot`,path:`/ec2/create-snapshot`,getParentRoute:()=>$}),dw=TS.update({id:`/ec2/(security-groups)/create-security-group`,path:`/ec2/create-security-group`,getParentRoute:()=>$}),fw=ES.update({id:`/ec2/(route-tables)/create-route-table`,path:`/ec2/create-route-table`,getParentRoute:()=>$}),pw=DS.update({id:`/ec2/(placement-groups)/create-placement-group`,path:`/ec2/create-placement-group`,getParentRoute:()=>$}),mw=OS.update({id:`/ec2/(nat-gateways)/create-nat-gateway`,path:`/ec2/create-nat-gateway`,getParentRoute:()=>$}),hw=AS.update({id:`/ec2/(load-balancers)/create-load-balancer`,path:`/ec2/create-load-balancer`,getParentRoute:()=>$}),gw=jS.update({id:`/ec2/(key)/import-key-pair`,path:`/ec2/import-key-pair`,getParentRoute:()=>$}),_w=MS.update({id:`/ec2/(key)/create-key-pair`,path:`/ec2/create-key-pair`,getParentRoute:()=>$}),vw=NS.update({id:`/ec2/(internet-gateways)/create-internet-gateway`,path:`/ec2/create-internet-gateway`,getParentRoute:()=>$}),yw=PS.update({id:`/ec2/(instances)/run-instances`,path:`/ec2/run-instances`,getParentRoute:()=>$}),bw=FS.update({id:`/ec2/(elastic-ips)/allocate-address`,path:`/ec2/allocate-address`,getParentRoute:()=>$}),xw=IS.update({id:`/s3/ls/$bucket`,path:`/s3/ls/$bucket`,getParentRoute:()=>$}),Sw=LS.update({id:`/`,path:`/`,getParentRoute:()=>xw}),Cw=RS.update({id:`/iam/(users)/list-users/`,path:`/iam/list-users/`,getParentRoute:()=>$}),ww=zS.update({id:`/iam/(roles)/list-roles/`,path:`/iam/list-roles/`,getParentRoute:()=>$}),Tw=BS.update({id:`/iam/(policies)/list-policies/`,path:`/iam/list-policies/`,getParentRoute:()=>$}),Ew=VS.update({id:`/iam/(instance-profiles)/list-instance-profiles/`,path:`/iam/list-instance-profiles/`,getParentRoute:()=>$}),Dw=eC.update({id:`/eks/(clusters)/list-clusters/`,path:`/eks/list-clusters/`,getParentRoute:()=>$}),Ow=tC.update({id:`/ecs/(clusters)/list-clusters/`,path:`/ecs/list-clusters/`,getParentRoute:()=>$}),kw=oC.update({id:`/ecr/(repositories)/list-repositories/`,path:`/ecr/list-repositories/`,getParentRoute:()=>$}),Aw=sC.update({id:`/ec2/(vpc)/describe-vpcs/`,path:`/ec2/describe-vpcs/`,getParentRoute:()=>$}),jw=cC.update({id:`/ec2/(volumes)/describe-volumes/`,path:`/ec2/describe-volumes/`,getParentRoute:()=>$}),Mw=lC.update({id:`/ec2/(target-groups)/describe-target-groups/`,path:`/ec2/describe-target-groups/`,getParentRoute:()=>$}),Nw=uC.update({id:`/ec2/(subnet)/describe-subnets/`,path:`/ec2/describe-subnets/`,getParentRoute:()=>$}),Pw=dC.update({id:`/ec2/(snapshots)/describe-snapshots/`,path:`/ec2/describe-snapshots/`,getParentRoute:()=>$}),Fw=fC.update({id:`/ec2/(security-groups)/describe-security-groups/`,path:`/ec2/describe-security-groups/`,getParentRoute:()=>$}),Iw=pC.update({id:`/ec2/(route-tables)/describe-route-tables/`,path:`/ec2/describe-route-tables/`,getParentRoute:()=>$}),Lw=mC.update({id:`/ec2/(placement-groups)/describe-placement-groups/`,path:`/ec2/describe-placement-groups/`,getParentRoute:()=>$}),Rw=hC.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/`,path:`/ec2/describe-nat-gateways/`,getParentRoute:()=>$}),zw=gC.update({id:`/ec2/(load-balancers)/describe-load-balancers/`,path:`/ec2/describe-load-balancers/`,getParentRoute:()=>$}),Bw=_C.update({id:`/ec2/(key)/describe-key-pairs/`,path:`/ec2/describe-key-pairs/`,getParentRoute:()=>$}),Vw=vC.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/`,path:`/ec2/describe-internet-gateways/`,getParentRoute:()=>$}),Hw=yC.update({id:`/ec2/(instances)/describe-instances/`,path:`/ec2/describe-instances/`,getParentRoute:()=>$}),Uw=bC.update({id:`/ec2/(images)/describe-images/`,path:`/ec2/describe-images/`,getParentRoute:()=>$}),Ww=xC.update({id:`/ec2/(elastic-ips)/describe-addresses/`,path:`/ec2/describe-addresses/`,getParentRoute:()=>$}),Gw=SC.update({id:`/$`,path:`/$`,getParentRoute:()=>xw}),Kw=CC.update({id:`/iam/(users)/list-users/$userName`,path:`/iam/list-users/$userName`,getParentRoute:()=>$}),qw=wC.update({id:`/iam/(roles)/list-roles/$roleName`,path:`/iam/list-roles/$roleName`,getParentRoute:()=>$}),Jw=TC.update({id:`/iam/(policies)/list-policies/$policyArn`,path:`/iam/list-policies/$policyArn`,getParentRoute:()=>$}),Yw=EC.update({id:`/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`,path:`/iam/list-instance-profiles/$instanceProfileName`,getParentRoute:()=>$}),Xw=DC.update({id:`/eks/(clusters)/list-clusters/$clusterName`,path:`/eks/list-clusters/$clusterName`,getParentRoute:()=>$}),Zw=OC.update({id:`/ecs/(clusters)/list-clusters/$clusterName`,path:`/ecs/list-clusters/$clusterName`,getParentRoute:()=>$}),Qw=kC.update({id:`/ecr/(repositories)/list-repositories/$id`,path:`/ecr/list-repositories/$id`,getParentRoute:()=>$}),$w=AC.update({id:`/ec2/(vpc)/describe-vpcs/$id`,path:`/ec2/describe-vpcs/$id`,getParentRoute:()=>$}),eT=jC.update({id:`/ec2/(volumes)/modify-volume/$id`,path:`/ec2/modify-volume/$id`,getParentRoute:()=>$}),tT=MC.update({id:`/ec2/(volumes)/describe-volumes/$id`,path:`/ec2/describe-volumes/$id`,getParentRoute:()=>$}),nT=NC.update({id:`/ec2/(target-groups)/describe-target-groups/$id`,path:`/ec2/describe-target-groups/$id`,getParentRoute:()=>$}),rT=PC.update({id:`/ec2/(subnet)/describe-subnets/$id`,path:`/ec2/describe-subnets/$id`,getParentRoute:()=>$}),iT=FC.update({id:`/ec2/(snapshots)/describe-snapshots/$id`,path:`/ec2/describe-snapshots/$id`,getParentRoute:()=>$}),aT=IC.update({id:`/ec2/(security-groups)/describe-security-groups/$id`,path:`/ec2/describe-security-groups/$id`,getParentRoute:()=>$}),oT=LC.update({id:`/ec2/(route-tables)/describe-route-tables/$id`,path:`/ec2/describe-route-tables/$id`,getParentRoute:()=>$}),sT=RC.update({id:`/ec2/(placement-groups)/describe-placement-groups/$id`,path:`/ec2/describe-placement-groups/$id`,getParentRoute:()=>$}),cT=zC.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/$id`,path:`/ec2/describe-nat-gateways/$id`,getParentRoute:()=>$}),lT=BC.update({id:`/ec2/(load-balancers)/describe-load-balancers/$id`,path:`/ec2/describe-load-balancers/$id`,getParentRoute:()=>$}),uT=VC.update({id:`/ec2/(key)/describe-key-pairs/$id`,path:`/ec2/describe-key-pairs/$id`,getParentRoute:()=>$}),dT=HC.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/$id`,path:`/ec2/describe-internet-gateways/$id`,getParentRoute:()=>$}),fT=UC.update({id:`/ec2/(instances)/describe-instances/$id`,path:`/ec2/describe-instances/$id`,getParentRoute:()=>$}),pT=WC.update({id:`/ec2/(images)/describe-images/$id`,path:`/ec2/describe-images/$id`,getParentRoute:()=>$}),mT=GC.update({id:`/ec2/(elastic-ips)/describe-addresses/$id`,path:`/ec2/describe-addresses/$id`,getParentRoute:()=>$}),hT={AuthS3LsBucketSplatRoute:Gw,AuthS3LsBucketIndexRoute:Sw},gT={AuthNodesRoute:JC,AuthIndexRoute:qC,AuthS3ServiceMetricsRoute:YC,AuthS3LsBucketRouteRoute:xw._addFileChildren(hT),AuthEc2elasticIpsAllocateAddressRoute:bw,AuthEc2instancesRunInstancesRoute:yw,AuthEc2internetGatewaysCreateInternetGatewayRoute:vw,AuthEc2keyCreateKeyPairRoute:_w,AuthEc2keyImportKeyPairRoute:gw,AuthEc2loadBalancersCreateLoadBalancerRoute:hw,AuthEc2natGatewaysCreateNatGatewayRoute:mw,AuthEc2placementGroupsCreatePlacementGroupRoute:pw,AuthEc2routeTablesCreateRouteTableRoute:fw,AuthEc2securityGroupsCreateSecurityGroupRoute:dw,AuthEc2snapshotsCreateSnapshotRoute:uw,AuthEc2subnetCreateSubnetRoute:lw,AuthEc2targetGroupsCreateTargetGroupRoute:cw,AuthEc2volumesCreateVolumeRoute:sw,AuthEc2vpcCreateVpcRoute:ow,AuthEcsclustersCreateServiceRoute:aw,AuthEcsclustersRegisterTaskDefinitionRoute:iw,AuthEcsclustersRunTaskRoute:rw,AuthEksclustersCreateClusterRoute:nw,AuthIaminstanceProfilesCreateInstanceProfileRoute:tw,AuthIampoliciesCreatePolicyRoute:ew,AuthIamrolesCreateRoleRoute:$C,AuthIamusersCreateUserRoute:QC,AuthS3bucketsCreateBucketRoute:ZC,AuthS3LsIndexRoute:XC,AuthEc2elasticIpsDescribeAddressesIdRoute:mT,AuthEc2imagesDescribeImagesIdRoute:pT,AuthEc2instancesDescribeInstancesIdRoute:fT,AuthEc2internetGatewaysDescribeInternetGatewaysIdRoute:dT,AuthEc2keyDescribeKeyPairsIdRoute:uT,AuthEc2loadBalancersDescribeLoadBalancersIdRoute:lT,AuthEc2natGatewaysDescribeNatGatewaysIdRoute:cT,AuthEc2placementGroupsDescribePlacementGroupsIdRoute:sT,AuthEc2routeTablesDescribeRouteTablesIdRoute:oT,AuthEc2securityGroupsDescribeSecurityGroupsIdRoute:aT,AuthEc2snapshotsDescribeSnapshotsIdRoute:iT,AuthEc2subnetDescribeSubnetsIdRoute:rT,AuthEc2targetGroupsDescribeTargetGroupsIdRoute:nT,AuthEc2volumesDescribeVolumesIdRoute:tT,AuthEc2volumesModifyVolumeIdRoute:eT,AuthEc2vpcDescribeVpcsIdRoute:$w,AuthEcrrepositoriesListRepositoriesIdRoute:Qw,AuthEcsclustersListClustersClusterNameRoute:Zw,AuthEksclustersListClustersClusterNameRoute:Xw,AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRoute:Yw,AuthIampoliciesListPoliciesPolicyArnRoute:Jw,AuthIamrolesListRolesRoleNameRoute:qw,AuthIamusersListUsersUserNameRoute:Kw,AuthEc2elasticIpsDescribeAddressesIndexRoute:Ww,AuthEc2imagesDescribeImagesIndexRoute:Uw,AuthEc2instancesDescribeInstancesIndexRoute:Hw,AuthEc2internetGatewaysDescribeInternetGatewaysIndexRoute:Vw,AuthEc2keyDescribeKeyPairsIndexRoute:Bw,AuthEc2loadBalancersDescribeLoadBalancersIndexRoute:zw,AuthEc2natGatewaysDescribeNatGatewaysIndexRoute:Rw,AuthEc2placementGroupsDescribePlacementGroupsIndexRoute:Lw,AuthEc2routeTablesDescribeRouteTablesIndexRoute:Iw,AuthEc2securityGroupsDescribeSecurityGroupsIndexRoute:Fw,AuthEc2snapshotsDescribeSnapshotsIndexRoute:Pw,AuthEc2subnetDescribeSubnetsIndexRoute:Nw,AuthEc2targetGroupsDescribeTargetGroupsIndexRoute:Mw,AuthEc2volumesDescribeVolumesIndexRoute:jw,AuthEc2vpcDescribeVpcsIndexRoute:Aw,AuthEcrrepositoriesListRepositoriesIndexRoute:kw,AuthEcsclustersListClustersIndexRoute:Ow,AuthEksclustersListClustersIndexRoute:Dw,AuthIaminstanceProfilesListInstanceProfilesIndexRoute:Ew,AuthIampoliciesListPoliciesIndexRoute:Tw,AuthIamrolesListRolesIndexRoute:ww,AuthIamusersListUsersIndexRoute:Cw},_T={AuthRouteRoute:$._addFileChildren(gT),LoginRoute:KC},vT=Kb._addFileChildren(_T)._addFileTypes(),yT=zb(),bT=Cs({routeTree:vT,context:{queryClient:yT},defaultPreload:`intent`,scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),xT=document.querySelector(`#app`);xT&&!xT.innerHTML&&Is.createRoot(xT).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(Bs,{defaultTheme:`dark`,storageKey:`spinifex-ui-theme`,children:(0,G.jsx)($i,{client:yT,children:(0,G.jsx)(by,{children:(0,G.jsx)(Ig,{children:(0,G.jsx)(Es,{router:bT})})})})})}));export{gS as $,Yu as $n,Hi as $r,px as $t,YS as A,Xp as An,$c as Ar,Zb as At,kS as B,$d as Bn,xc as Br,hx as Bt,CC as C,Ym as Cn,pl as Cr,Tx as Ct,rC as D,nh as Dn,al as Dr,Qb as Dt,nC as E,Zm as En,il as Er,Yb as Et,GS as F,sp as Fn,Ic as Fr,rx as Ft,uS as G,wd as Gn,ac as Gr,_x as Gt,yS as H,Md as Hn,gc as Hr,fx as Ht,WS as I,bf as In,Nc as Ir,nx as It,_S as J,fd as Jn,Hs as Jr,ox as Jt,lS as K,Z as Kn,tc as Kr,cx as Kt,qS as L,mf as Ln,Oc as Lr,Sx as Lt,ZS as M,Vp as Mn,Vc as Mr,Xb as Mt,QS as N,Q as Nn,Bc as Nr,ux as Nt,iC as O,rh as On,ol as Or,tx as Ot,XS as P,Ap as Pn,Rc as Pr,lx as Pt,dS as Q,sd as Qn,Ki as Qr,mx as Qt,KS as R,rf as Rn,Dc as Rr,xx as Rt,wC as S,Jm as Sn,hl as Sr,Ex as St,aC as T,Xm as Tn,sl as Tr,yx as Tt,hS as U,Dd as Un,uc as Ur,dx as Ut,wS as V,Kd as Vn,bc as Vr,ix as Vt,mS as W,Od as Wn,oc as Wr,vx as Wt,pS as X,ld as Xn,es as Xr,wx as Xt,vS as Y,dd as Yn,vs as Yr,ax as Yt,fS as Z,cd as Zn,Qi as Zr,Cx as Zt,kC as _,Gm as _n,Xl as _r,Vx as _t,VC as a,ni as ai,pg as an,Vu as ar,eS as at,EC as b,$m as bn,xl as br,Lx as bt,RC as c,oi as ci,Dh as cn,Nu as cr,tS as ct,FC as d,ai as di,uh as dn,eu as dr,Hx as dt,ji as ei,qb as en,Ju as er,oS as et,PC as f,$r as fi,lh as fn,$l as fr,qx as ft,AC as g,Qm as gn,tu as gr,Bx as gt,jC as h,Wm as hn,Zl as hr,zx as ht,HC as i,ii,mg as in,Hu as ir,nS as it,$S as j,Gp as jn,Jc as jr,$b as jt,JS as k,ym as kn,tl as kr,ex as kt,LC as l,hi as li,Th as ln,Pu as lr,Rx as lt,MC as m,Xr as mi,sh as mn,ru as mr,Kx as mt,WC as n,Di as ni,gy as nn,Wu as nr,$x as nt,BC as o,bi as oi,dg as on,Iu as or,iS as ot,NC as p,Zr as pi,ch as pn,Ql as pr,Jx as pt,cS as q,pd as qn,Y as qr,sx as qt,UC as r,di as ri,ly as rn,Uu as rr,Qx as rt,zC as s,si,ng as sn,zu as sr,rS as st,GC as t,Oi as ti,xy as tn,Gu as tr,aS as tt,IC as u,Ti as ui,yh as un,Au as ur,Gx as ut,OC as v,Km as vn,Sl as vr,Wx as vt,SC as w,eh as wn,dl as wr,bx as wt,TC as x,qm as xn,vl as xr,Ix as xt,DC as y,Um as yn,bl as yr,Ux as yt,LS as z,af as zn,Cc as zr,gx as zt}; \ No newline at end of file +`).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Gt(e,``+r);break;case`className`:kt(e,`class`,r);break;case`tabIndex`:kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:kt(e,n,r);break;case`style`:Jt(e,r,o);break;case`data`:if(t!==`object`){kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Pd(e,t,`name`,i.name,i,null),Pd(e,t,`formEncType`,i.formEncType,i,null),Pd(e,t,`formMethod`,i.formMethod,i,null),Pd(e,t,`formTarget`,i.formTarget,i,null)):(Pd(e,t,`encType`,i.encType,i,null),Pd(e,t,`method`,i.method,i,null),Pd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Qt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:xd(`beforetoggle`,e),xd(`toggle`,e),Ot(e,`popover`,r);break;case`xlinkActuate`:L(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:L(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:L(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:L(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:L(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:L(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:L(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:L(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:L(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ot(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2s)break;var u=c.transferSize,d=c.initiatorType;u&&Rd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=Rt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),yt(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Rt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Rt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Rt(n.imageSizes)+`"]`)):i+=`[href="`+Rt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Rt(r)+`"][href="`+Rt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),yt(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=vt(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);yt(c),Id(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=vt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),yt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=vt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),yt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var i=(i=I.current)?vf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=vt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=vt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=vt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Mf(e){return`href="`+Rt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),yt(t),e.head.appendChild(t))}function If(e){return`[src="`+Rt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Rt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),Id(r,`style`,i),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Mf(n.href);var o=e.querySelector(Nf(i));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;r=Pf(n),(i=gf.get(i))&&Bf(r,i),o=(e.ownerDocument||e).createElement(`link`),yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(i=e.querySelector(Lf(o)))?(t.instance=i,yt(i),i):(r=n,(i=gf.get(o))&&(r=p({},n),Vf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),yt(i),Id(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,yt(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Fs()}))(),1),Ls=i(),Rs=(0,W.createContext)(void 0);function zs(e,t){try{let t=localStorage.getItem(e);if(t===`light`||t===`dark`||t===`system`)return t}catch{}return t}function Bs(e){let t=(0,Ls.c)(14),{children:n,defaultTheme:r,storageKey:i}=e,a=r===void 0?`dark`:r,o=i===void 0?`ui-theme`:i,s;t[0]!==a||t[1]!==o?(s=()=>zs(o,a),t[0]=a,t[1]=o,t[2]=s):s=t[2];let[c,l]=(0,W.useState)(s),u,d;t[3]===c?(u=t[4],d=t[5]):(u=()=>{let e=window.document.documentElement;if(e.classList.remove(`light`,`dark`),c===`system`){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;e.classList.add(t);return}e.classList.add(c)},d=[c],t[3]=c,t[4]=u,t[5]=d),(0,W.useEffect)(u,d);let f;t[6]===o?f=t[7]:(f=e=>{try{localStorage.setItem(o,e)}catch{}l(e)},t[6]=o,t[7]=f);let p;t[8]!==f||t[9]!==c?(p={theme:c,setTheme:f},t[8]=f,t[9]=c,t[10]=p):p=t[10];let m=p,h;return t[11]!==n||t[12]!==m?(h=(0,G.jsx)(Rs.Provider,{value:m,children:n}),t[11]=n,t[12]=m,t[13]=h):h=t[13],h}function Vs(){let e=(0,W.useContext)(Rs);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function Hs(e){return en(e.defaultTagName??`div`,e,e)}var Us=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ws=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Gs=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ks=e=>{let t=Gs(e);return t.charAt(0).toUpperCase()+t.slice(1)},qs={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Js=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ys=(0,W.createContext)({}),Xs=()=>(0,W.useContext)(Ys),Zs=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Xs()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...qs,width:t??l??qs.width,height:t??l??qs.height,stroke:e??f,strokeWidth:m,className:Us(`lucide`,p,i),...!a&&!Js(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Y=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(Zs,{ref:i,iconNode:t,className:Us(`lucide-${Ws(Ks(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ks(e),n},Qs=Y(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),$s=Y(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),ec=Y(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),tc=Y(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),nc=Y(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),rc=Y(`container`,[[`path`,{d:`M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z`,key:`1t2lqe`}],[`path`,{d:`M10 21.9V14L2.1 9.1`,key:`o7czzq`}],[`path`,{d:`m10 14 11.9-6.9`,key:`zm5e20`}],[`path`,{d:`M14 19.8v-8.1`,key:`159ecu`}],[`path`,{d:`M18 17.5V9.4`,key:`11uown`}]]),ic=Y(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),ac=Y(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),oc=Y(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),sc=Y(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),cc=Y(`id-card`,[[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`path`,{d:`M6.17 15a3 3 0 0 1 5.66 0`,key:`n6f512`}],[`circle`,{cx:`9`,cy:`11`,r:`2`,key:`yxgjnd`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]),lc=Y(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),uc=Y(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),dc=Y(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),fc=Y(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),pc=Y(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),mc=Y(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),hc=Y(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),gc=Y(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),_c=Y(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),vc=Y(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),yc=Y(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),bc=Y(`router`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,key:`w68u3i`}],[`path`,{d:`M6.01 18H6`,key:`19vcac`}],[`path`,{d:`M10.01 18H10`,key:`uamcmx`}],[`path`,{d:`M15 10v4`,key:`qjz1xs`}],[`path`,{d:`M17.84 7.17a4 4 0 0 0-5.66 0`,key:`1rif40`}],[`path`,{d:`M20.66 4.34a8 8 0 0 0-11.31 0`,key:`6a5xfq`}]]),xc=Y(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Sc=Y(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Cc=Y(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),wc=Y(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Tc=Y(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Ec=Y(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Dc=Y(`waypoints`,[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]),Oc=Y(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),kc=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),Ac={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jc={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Mc={disabled:!1,...jc},Nc={valid(e){return e===null?null:e?{[kc.valid]:``}:{[kc.invalid]:``}}},Pc={invalid:void 0,name:void 0,validityData:{state:Ac,errors:[],error:``,value:``,initialValue:null},setValidityData:tn,disabled:void 0,touched:jc.touched,setTouched:tn,dirty:jc.dirty,setDirty:tn,filled:jc.filled,setFilled:tn,focused:jc.focused,setFocused:tn,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:Mc,markedDirtyRef:{current:!1},registerFieldControl:tn,validation:{getValidationProps:(e,t=Xt)=>t,inputRef:{current:null},registerInput:tn,commit:async()=>{},change:tn}},Fc=W.createContext(Pc);function Ic(e=!0){let t=W.useContext(Fc);if(t.setValidityData===tn&&!e)throw Error(an(28));return t}var Lc=W.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:tn,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function Rc(){return W.useContext(Lc)}var zc=W.createContext({controlId:void 0,registerControlId:tn,labelId:void 0,setLabelId:tn,messageIds:[],setMessageIds:tn,getDescriptionProps:e=>e});function Bc(){return W.useContext(zc)}function Vc(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=Bc(),o=Ar(t),s=n?i:void 0,c=$t(()=>Symbol(`labelable-control`)),l=W.useRef(!1),u=W.useRef(t!=null),d=Cr(()=>{!l.current||a===tn||(l.current=!1,a(c.current,void 0))});return V(()=>{if(a===tn)return;let e;if(n){let n=r?.current;e=H(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),W.useEffect(()=>d,[d]),i??o}function Hc(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Uc,platform:Wc,maxTouchPoints:Gc}=Hc(),Kc=Uc.toLowerCase(),qc=Wc.toLowerCase(),Jc=/^i(os$|p)/.test(qc)||qc===`macintel`&&Gc>1,Yc=`android`,Xc=qc===Yc||Kc.includes(Yc),Zc=!Jc&&qc.startsWith(`mac`);qc.startsWith(`win`),!Xc&&/^(linux|chrome os)/.test(qc);var Qc=Zc||Jc,$c=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!$c&&Kc.includes(`firefox`),!$c&&Kc.includes(`chrom`);var el=Qc,tl=/jsdom|happydom/.test(Kc),nl=`data-base-ui-focusable`,rl=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,il=`ArrowLeft`,al=`ArrowRight`,ol=`ArrowUp`,sl=`ArrowDown`;function cl(e,t){if(!H(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(U(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function ll(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function ul(e){return e.matches(`html,body`)}function dl(e){return pr(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function fl(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${rl}`)!=null}function pl(e){return e?e.getAttribute(`role`)===`combobox`&&dl(e):!1}function ml(e){if(!e||tl)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function hl(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function gl(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...gl(e,t.id,n)])}function _l(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function vl(e){e.preventDefault(),e.stopPropagation()}function yl(e){return`nativeEvent`in e}function bl(e){return e.pointerType===``&&e.isTrusted?!0:Xc&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function xl(e){return tl?!1:!Xc&&e.width===0&&e.height===0||Xc&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Sl(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Cl(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var wl=[`top`,`right`,`bottom`,`left`],Tl=Math.min,El=Math.max,Dl=Math.round,Ol=Math.floor,kl=e=>({x:e,y:e}),Al={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function jl(e,t,n){return El(e,Tl(t,n))}function Ml(e,t){return typeof e==`function`?e(t):e}function Nl(e){return e.split(`-`)[0]}function Pl(e){return e.split(`-`)[1]}function Fl(e){return e===`x`?`y`:`x`}function Il(e){return e===`y`?`height`:`width`}function X(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ll(e){return Fl(X(e))}function Rl(e,t,n){n===void 0&&(n=!1);let r=Pl(e),i=Ll(e),a=Il(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ql(o)),[o,ql(o)]}function zl(e){let t=ql(e);return[Bl(e),t,Bl(t)]}function Bl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Vl=[`left`,`right`],Hl=[`right`,`left`],Ul=[`top`,`bottom`],Wl=[`bottom`,`top`];function Gl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Hl:Vl:t?Vl:Hl;case`left`:case`right`:return t?Ul:Wl;default:return[]}}function Kl(e,t,n,r){let i=Pl(e),a=Gl(Nl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Bl)))),a}function ql(e){let t=Nl(e);return Al[t]+e.slice(t.length)}function Jl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Jl(e)}function Xl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Zl(e,t){return t<0||t>=e.length}function Ql(e,t){return eu(e.current,{disabledIndices:t})}function $l(e,t){return eu(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function eu(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&tu(e,a,r));return a}function tu(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?ru(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function nu(e){return e.visibility===`hidden`||e.visibility===`collapse`}function ru(e,t=e?vr(e):null){return!e||!e.isConnected||!t||nu(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var iu=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function au(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Dr(n)?n.host:null}function ou(e){for(let t of Array.from(e.children))if(xr(t)===`summary`)return t;return null}function su(e,t){let n=ou(t);return!!n&&(e===n||U(n,e))}function cu(e){let t=e?xr(e):``;return e!=null&&e.matches(iu)&&(t!==`summary`||e.parentElement!=null&&xr(e.parentElement)===`details`&&ou(e.parentElement)===e)&&(t!==`details`||ou(e)==null)&&(t!==`input`||e.type!==`hidden`)}function lu(e){if(!cu(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=au(t)){let n=t!==e,r=xr(t)===`slot`;if(t.hasAttribute(`inert`)||n&&xr(t)===`details`&&!t.open&&!su(e,t)||t.hasAttribute(`hidden`)||!r&&!uu(t,n))return!1}return!0}function uu(e,t){let n=vr(e);return t?n.display!==`none`:ru(e,n)}function du(e){let t=e.tabIndex;if(t<0){let t=xr(e);if(t===`details`||t===`audio`||t===`video`||pr(e)&&e.isContentEditable)return 0}return t}function fu(e){if(xr(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function pu(e,t){let n=fu(e);if(!n)return!0;let r=t.find(e=>{let t=fu(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=fu(e);return t?.name===n.name&&t.form===n.form})===n}function mu(e){if(pr(e)&&xr(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return pr(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function hu(e,t){mu(e).forEach(e=>{cu(e)&&t.push(e),hu(e,t)})}function gu(e,t,n){mu(e).forEach(e=>{pr(e)&&e.matches(t)&&n.push(e),gu(e,t,n)})}function _u(e){return lu(e)&&du(e)>=0}function vu(e){let t=[];return hu(e,t),t.filter(lu)}function yu(e){let t=vu(e);return t.filter(e=>du(e)>=0&&pu(e,t))}function bu(e,t){let n=yu(e),r=n.length;if(r===0)return;let i=Ur(Wr(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function xu(e){return bu(Wr(e).body,1)||e}function Su(e){return bu(Wr(e).body,-1)||e}function Cu(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!U(n,r)}function wu(e){yu(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Tu(e){let t=[];gu(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var Eu=[];function Du(e){W.useEffect(e,Eu)}var Ou=0,ku=class e{static create(){return new e}currentId=Ou;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ou,t()},e)}isStarted(){return this.currentId!==Ou}clear=()=>{this.currentId!==Ou&&(clearTimeout(this.currentId),this.currentId=Ou)};disposeEffect=()=>this.clear};function Au(){let e=$t(ku.create).current;return Du(e.disposeEffect),e}var ju=null;globalThis.requestAnimationFrame;var Mu=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},Nu=class e{static create(){return new e}static request(e){return Mu.request(e)}static cancel(e){return Mu.cancel(e)}currentId=ju;request(e){this.cancel(),this.currentId=Mu.request(()=>{this.currentId=ju,e()})}cancel=()=>{this.currentId!==ju&&(Mu.cancel(this.currentId),this.currentId=ju)};disposeEffect=()=>this.cancel};function Pu(){let e=$t(Nu.create).current;return Du(e.disposeEffect),e}function Fu(e){return e==null?e:`current`in e?e.current:e}var Iu=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),Lu={[Iu.startingStyle]:``},Ru={[Iu.endingStyle]:``},zu={transitionStatus(e){return e===`starting`?Lu:e===`ending`?Ru:null}},Bu=n(It(),1);function Vu(e,t=!1,n=!0){let r=Pu();return Cr((i,a=null)=>{r.cancel();let o=Fu(e);if(o==null)return;let s=o,c=()=>{Bu.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=Iu.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Hu(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=Cr(i),o=Vu(r,n,!1);W.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function Uu(e,t=!1,n=!1){let[r,i]=W.useState(e&&t?`idle`:void 0),[a,o]=W.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),V(()=>{if(!e&&a&&r!==`ending`&&n){let e=Nu.request(()=>{i(`ending`)});return()=>{Nu.cancel(e)}}},[e,a,r,n]),V(()=>{if(!e||t)return;let n=Nu.request(()=>{i(void 0)});return()=>{Nu.cancel(n)}},[t,e]),V(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=Nu.request(()=>{i(`idle`)});return()=>{Nu.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}function Wu({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=W.useRef(e!==void 0),[a,o]=W.useState(t);return[i?e:a,W.useCallback(e=>{i||o(e)},[])]}function Gu(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Ic(),s=W.useRef(null);s.current||=Symbol(),V(()=>{let c=s.current;if(!(!c||!i))return o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}),()=>{o(c,void 0)}},[e,i,r,t,a,o,n])}var Ku=W.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=Ic(),{clearErrors:C}=Rc(),w=h||s,T=m??a,E={...p,disabled:w},{labelId:D}=Bc(),O=Vc({id:i});V(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let k=W.useRef(null);V(()=>{u&&k.current===Ur(Wr(k.current))&&y(!0)},[u,y]);let[A]=Wu({controlled:o,default:l,name:`FieldControl`,state:`value`}),j=o!==void 0,M=j?A:void 0,ee=Cr(()=>S.inputRef.current?.value);return Gu(S.inputRef,O,M,ee,!w,a),en(`input`,e,{ref:[t,k],state:E,props:[{id:O,disabled:w,name:T,ref:S.inputRef,"aria-labelledby":D,autoFocus:u,...j?{value:M}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,Hr(Nr,e.nativeEvent)),_(t!==v.initialValue),b(t!==``),e.nativeEvent.defaultPrevented||(C(T),S.change(t))},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},f,e=>S.getValidationProps(w,e)],stateAttributesMapping:Nc})}),qu=W.forwardRef(function(e,t){return(0,G.jsx)(Ku,{ref:t,...e})});function Ju(e){let t=(0,Ls.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=Cn(`h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground autofill:[-webkit-text-fill-color:var(--color-foreground)] autofill:[transition:background-color_9999s_ease-in-out_0s] focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,G.jsx)(qu,{className:a,"data-slot":`input`,type:i,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}var Yu=W.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return en(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function Xu(e){let t=(0,Ls.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`horizontal`:i,o;t[4]===n?o=t[5]:(o=Cn(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,G.jsx)(Yu,{className:o,"data-slot":`separator`,orientation:a,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}var Zu=W.createContext(!1),Qu=W.createContext(void 0);function $u(e){let t=W.useContext(Qu);if(e===!1&&t===void 0)throw Error(an(27));return t}var ed=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Iu.startingStyle]=`startingStyle`,e[e.endingStyle=Iu.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),td=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),nd={[td.popupOpen]:``},rd={[td.popupOpen]:``,[td.pressed]:``},id={[ed.open]:``},ad={[ed.closed]:``},od={[ed.anchorHidden]:``},sd={open(e){return e?nd:null}},cd={open(e){return e?rd:null}},ld={open(e){return e?id:ad},anchorHidden(e){return e?od:null}},ud={...ld,...zu},dd=W.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=$u(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return en(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:ud,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),fd=W.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{store:c}=$u(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=Sr({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Hr(Br,e.nativeEvent))}return en(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),pd=W.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=$u(),c=Ar(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),en(`p`,e,{ref:t,props:[{id:c},o]})});function md(e,t){return t!=null&&!Sl(t)?0:typeof e==`function`?e():e}function hd(e,t,n){let r=md(e,n);return typeof r==`number`?r:r?.[t]}function gd(e){return typeof e==`function`?e():e}function _d(e,t){return t||e===`click`||e===`mousedown`}function vd(e){return e?.includes(`mouse`)&&e!==`mousedown`}var yd=W.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ku,currentIdRef:{current:null},currentContextRef:{current:null}});function bd(e,t){e.current=t.current}function xd(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=W.useRef(n),a=W.useRef(n),o=W.useRef(null),s=W.useRef(null),c=Au();return V(()=>{if(a.current=n,!o.current){i.current=n;return}i.current={open:hd(i.current,`open`),close:hd(n,`close`)}},[n,o,i,a]),(0,G.jsx)(yd.Provider,{value:W.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function Sd(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=W.useContext(yd),[f,p]=W.useState(!1),m=W.useRef(n),h=W.useRef(!1);return V(()=>{m.current=n},[n]),V(()=>()=>{h.current=!0},[]),V(()=>{function e(){h.current||p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current,d.clear()}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{(m.current||a.current!==t)&&d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),V(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:hd(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Hr(Nr))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),V(()=>()=>{if(a.current===i){if(l.current=null,!m.current)return;a.current=null,bd(o,c),d.clear()}},[l,a,o,i,c,d]),W.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function Z(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cd(...e){return()=>{for(let t=0;t{t.current=t.next}};return t}var Ed={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Dd={...Ed,position:`fixed`,top:0,left:0},Od={...Ed,position:`absolute`},kd=W.forwardRef(function(e,t){let[n,r]=W.useState();V(()=>{el&&$c&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:Dd,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function Ad(e){return`data-base-ui-${e}`}var jd=0;function Md(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(jd);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),tn;let o=requestAnimationFrame(a);return jd=o,()=>{jd===o&&(cancelAnimationFrame(o),jd=0)}}var Nd={inert:new WeakMap,"aria-hidden":new WeakMap},Pd=`data-base-ui-inert`,Fd={inert:new WeakSet,"aria-hidden":new WeakSet},Id=new WeakMap,Ld=0;function Rd(e){return Fd[e]}function zd(e){return e?Dr(e)?e.host:zd(e.parentNode):null}var Bd=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=zd(t);return e.contains(n)?n:null}).filter(e=>e!=null),Vd=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Hd=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{xr(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Ud(e,t,n,r,{mark:i=!0}){let a=null;r?a=`inert`:n&&(a=`aria-hidden`);let o=null,s=null,c=Bd(t,e),l=i?Hd(t,Vd(c),new Set(c)):[],u=[],d=[];if(a){let e=Nd[a],n=Rd(a);s=n,o=e;let r=Bd(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=c.concat(r);Hd(t,Vd(i),new Set(i)).forEach(t=>{let r=t.getAttribute(a),i=r!==null&&r!==`false`,o=(e.get(t)||0)+1;e.set(t,o),u.push(t),o===1&&i&&n.add(t),i||t.setAttribute(a,a===`inert`?``:`true`)})}return i&&l.forEach(e=>{let t=(Id.get(e)||0)+1;Id.set(e,t),d.push(e),t===1&&e.setAttribute(Pd,``)}),Ld+=1,()=>{o&&u.forEach(e=>{let t=(o.get(e)||0)-1;o.set(e,t),t||(!s?.has(e)&&a&&e.removeAttribute(a),s?.delete(e))}),i&&d.forEach(e=>{let t=(Id.get(e)||0)-1;Id.set(e,t),t||e.removeAttribute(Pd)}),--Ld,Ld||(Nd.inert=new WeakMap,Nd[`aria-hidden`]=new WeakMap,Fd.inert=new WeakSet,Fd[`aria-hidden`]=new WeakSet,Id=new WeakMap)}}function Wd(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t,a=Wr(e[0]).body;return Ud(e,a,n,r,{mark:i})}var Gd={style:{transition:`none`}},Kd={fallbackAxisSide:`none`},qd={fallbackAxisSide:`end`},Jd={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Yd=W.createContext(null),Xd=()=>W.useContext(Yd),Zd=Ad(`portal`);function Qd(e={}){let{ref:t,container:n,componentProps:r=Xt,elementProps:i}=e,a=kr(),o=Xd()?.portalNode,[s,c]=W.useState(null),[l,u]=W.useState(null),d=Cr(e=>{e!==null&&u(e)}),f=W.useRef(null);V(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(ur(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=en(`div`,r,{ref:[t,d],props:[{id:a,[Zd]:``},i]});return{portalNode:l,portalSubtree:s&&p?Bu.createPortal(p,s):null}}var $d=W.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=Qd({container:o,ref:t,componentProps:e,elementProps:c}),d=W.useRef(null),f=W.useRef(null),p=W.useRef(null),m=W.useRef(null),[h,g]=W.useState(null),_=W.useRef(!1),v=h?.modal,y=h?.open,b=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;W.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&Cu(e)&&(e.type===`focusin`?_.current&&=(Tu(l),!1):(wu(l),_.current=!0))}return Cd(Z(l,`focusin`,e,!0),Z(l,`focusout`,e,!0))},[l,v]),V(()=>{!l||y!==!0||!_.current||(Tu(l),_.current=!1)},[y,l]);let x=W.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,G.jsxs)(W.Fragment,{children:[u,(0,G.jsxs)(Yd.Provider,{value:x,children:[b&&l&&(0,G.jsx)(kd,{"data-type":`outside`,ref:d,onFocus:e=>{Cu(e,l)?p.current?.focus():Su(h?h.domReference:null)?.focus()}}),b&&l&&(0,G.jsx)(`span`,{"aria-owns":l.id,style:Jd}),l&&Bu.createPortal(a,l),b&&l&&(0,G.jsx)(kd,{"data-type":`outside`,ref:f,onFocus:e=>{Cu(e,l)?m.current?.focus():(xu(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Hr(`focus-out`,e.nativeEvent)))}})]})]})});function ef(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var tf=W.createContext(null),nf=W.createContext(null),rf=()=>W.useContext(tf)?.id||null,af=e=>{let t=W.useContext(nf);return e??t};function of(e,t){let n=fr(Mr(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var sf=20,cf=[];function lf(){cf=cf.filter(e=>e.deref()?.isConnected)}function uf(e){lf(),e&&xr(e)!==`body`&&(cf.push(new WeakRef(e)),cf.length>sf&&(cf=cf.slice(-20)))}function df(){return lf(),cf[cf.length-1]?.deref()}function ff(e){return e?_u(e)?e:yu(e)[0]||e:null}function pf(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=vu(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return _u(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function mf(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=Cr(()=>b.current.floatingContext?.nodeId),S=i===!1,C=pl(_)&&S,w=wd(i),T=wd(a),E=wd(l),D=wd(g),O=af(p),k=Xd(),A=W.useRef(!1),j=W.useRef(!1),M=W.useRef(!1),ee=W.useRef(null),N=W.useRef(``),P=W.useRef(``),te=W.useRef(null),ne=W.useRef(null),re=Zt(te,f,k?.beforeInsideRef),ie=Zt(ne,k?.afterInsideRef),ae=Au(),F=Au(),oe=Pu(),se=k!=null,I=hl(v),ce=Cr((e=I)=>e?yu(e):[]),le=Cr(()=>m?.().filter(e=>e!=null)??[]);W.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&U(I,Ur(Wr(I)))&&ce().length===0&&!C&&vl(e)}return Z(Wr(I),`keydown`,e)},[r,I,s,C,ce]),W.useEffect(()=>{if(r||!g)return;let e=Wr(I);function t(){M.current=!1}function n(e){let t=Mr(e),n=le();M.current=!(U(v,t)||U(_,t)||U(k?.portalNode,t)||n.some(e=>e===t||U(e,t))),P.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(j.current=!0,F.start(0,()=>{j.current=!1}))}function i(){P.current=`keyboard`}return Cd(Z(e,`pointerdown`,n,!0),Z(e,`pointerup`,t,!0),Z(e,`pointercancel`,t,!0),Z(e,`keydown`,i,!0),t)},[r,v,_,I,g,k,F,le]),W.useEffect(()=>{if(r||!c)return;let e=Wr(I);function t(){j.current=!0,F.start(0,()=>{j.current=!1})}function n(e){let t=Mr(e);_u(t)&&(ee.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Mr(t);s&&n==null&&i!=null&&U(v,i)&&uf(i),queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=le(),f=n?.hasAttribute(Ad(`focus-guard`))&&[te.current,ne.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,Fu(d),Fu(u)].includes(n),p=!(U(_,n)||U(v,n)||U(n,v)||U(k?.portalNode,n)||l.some(e=>e===n||U(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>U(e,n))||f||O&&(gl(O.nodesRef.current,a).find(e=>U(e.context?.elements.floating,n)||U(e.context?.elements.domReference,n))||_l(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,hl(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&I&&pf(I),o&&r!==_&&!ru(i)&&Ur(e)===e.body){if(pr(I)&&(I.focus(),o===`popup`)){oe.request(()=>{I.focus()});return}let e=ce(),t=ee.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||I;pr(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!j.current&&(C||n!==df())&&(A.current=!0,h.setOpen(!1,Hr(Rr,t)))})}function a(){M.current||(b.current.insideReactTree=!0,ae.start(0,()=>{b.current.insideReactTree=!1}))}let l=pr(_)?_:null;if(!(!v&&!l))return Cd(l&&Z(l,`focusout`,i),l&&Z(l,`pointerdown`,t),v&&Z(v,`focusin`,n),v&&Z(v,`focusout`,i),v&&k&&Z(v,`focusout`,a,!0))},[r,_,v,I,s,O,k,h,c,o,ce,C,x,b,ae,F,oe,u,d,le]),W.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${Ad(`portal`)}]`)||[]),t=(O?_l(O.nodesRef.current,x()):[]).find(e=>pl(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Wd([v,...e,te.current,ne.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...le(),t,Fu(d),Fu(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=Wd([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,le]),V(()=>{if(!g||r||!pr(I))return;let e=Wr(I),t=Ur(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(E.current||``):n;if(r===void 0||r===!1||U(I,t))return;let i=null,a=()=>(i??=ce(I),i[0]||I),o;o=r===!0||r===null?a():Fu(r),o||=a();let s=U(I,Ur(e));Md(o,{preventScroll:o===I,shouldFocus(){if(!D.current)return!1;if(s)return!0;let t=Ur(e);return!(t!==o&&U(I,t))}})})},[r,g,I,ce,w,E,D]),V(()=>{if(r||!I)return;let e=Wr(I),t=Ur(e),n=E.current==null;uf(t);function i(e){if(e.open||(N.current=of(e.nativeEvent,P.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===`outside-press`)if(e.nested)A.current=!1;else if(bl(e.nativeEvent)||xl(e.nativeEvent))A.current=!1;else{let e=!1;Wr(I).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}y.on(`openchange`,i);function a(){let e=T.current,r=typeof e==`function`?e(N.current):e;if(r===void 0||r===!1)return null;r===null&&(r=!0);let i=_?.isConnected?_:null,a=t?.isConnected&&xr(t)!==`body`?t:null,o=n?a||i:i||a;return o||=df()||null,typeof r==`boolean`?o:Fu(r)||o||null}return()=>{y.off(`openchange`,i);let t=Ur(e),n=le(),r=U(v,t)||n.some(e=>e===t||U(e,t))||O&&gl(O.nodesRef.current,x(),!1).some(e=>U(e.context?.elements.floating,t)),o=T.current,s=a();queueMicrotask(()=>{let n=ff(s),i=typeof o!=`boolean`;o&&!A.current&&pr(n)&&(!(!i&&n!==t&&t!==e.body)||r)&&n.focus({preventScroll:!0}),A.current=!1})}},[r,v,I,T,E,y,O,_,x,le]),V(()=>{if(!$c||g||!v)return;let e=Ur(Wr(v));!pr(e)||!dl(e)||U(v,e)&&e.blur()},[g,v]),V(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),V(()=>{if(!(r||!I))return pf(I),()=>{queueMicrotask(lf)}},[r,I]);let ue=!r&&(s?!C:!0)&&(se||s);return(0,G.jsxs)(W.Fragment,{children:[ue&&(0,G.jsx)(kd,{"data-type":`inside`,ref:re,onFocus:e=>{if(s){let e=ce();Md(e[e.length-1])}else k?.portalNode&&(A.current=!1,Cu(e,k.portalNode)?xu(_)?.focus():Fu(d??k.beforeOutsideRef)?.focus())}}),n,ue&&(0,G.jsx)(kd,{"data-type":`inside`,ref:ie,onFocus:e=>{s?Md(ce()[0]):k?.portalNode&&(c&&(A.current=!0),Cu(e,k.portalNode)?Su(_)?.focus():Fu(u??k.afterOutsideRef)?.focus())}})]})}function hf(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function gf(e){return e!=null&&e.clientX!=null}function _f(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=W.useRef(!1),u=W.useRef(null),[d,f]=W.useState(),[p,m]=W.useState([]),h=Cr(e=>{i.set(`positionReference`,e)}),g=Cr((e,t,n)=>{l.current||c.current.openEvent&&!gf(c.current.openEvent)||i.set(`positionReference`,hf(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=Cr(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=Sl(d)?o:a;W.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=fr(o);function r(t){U(o,Mr(t))?e():g(t.clientX,t.clientY)}return!c.current.openEvent||gf(c.current.openEvent)?u.current=Z(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),W.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),W.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),W.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=W.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return W.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}function vf(){return!1}function yf(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function bf(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=vf,bubbles:s,externalTree:c}=t,l=`rootStore`in e?e.rootStore:e,u=l.useState(`open`),d=l.useState(`floatingElement`),{dataRef:f}=l.context,p=af(c),m=Cr(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=Cr(()=>a),{escapeKey:v,outsidePress:y}=yf(s),b=W.useRef(!1),x=W.useRef(!1),S=W.useRef(!1),C=W.useRef(!1),w=W.useRef(``),T=W.useRef(null),E=Au(),D=Au(),O=Cr(()=>{D.clear(),f.current.insideReactTree=!1}),k=Cr(e=>{let t=f.current.floatingContext?.nodeId;return(p?gl(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),A=Cr(e=>ll(e,l.select(`floatingElement`))||ll(e,l.select(`domReferenceElement`))),j=Cr(e=>{o()&&l.setOpen(!1,Hr(Pr,e.nativeEvent))}),M=Cr(e=>{if(!u||!n||!r||e.key!==`Escape`||C.current||!v&&k(`__escapeKeyBubbles`))return;let t=Hr(jr,yl(e)?e.nativeEvent:e);l.setOpen(!1,t),t.isCanceled||e.preventDefault(),!v&&!t.isPropagationAllowed&&e.stopPropagation()}),ee=Cr(()=>{f.current.insideReactTree=!0,D.start(0,O)}),N=Cr(e=>{if(!u||!n||e.button!==0)return;let t=Mr(e.nativeEvent);U(l.select(`floatingElement`),t)&&(b.current||(b.current=!0,x.current=!1))}),P=Cr(e=>{!u||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});W.useEffect(()=>{if(!u||!n)return;f.current.__escapeKeyBubbles=v,f.current.__outsidePressBubbles=y;let e=new ku,t=new ku;function i(){e.clear(),C.current=!0}function a(){e.start($c?5:0,()=>{C.current=!1})}function o(){S.current=!0,t.start(0,()=>{S.current=!1})}function s(){b.current=!1,x.current=!1}function c(){let e=w.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function D(e){let t=f.current.floatingContext?.nodeId,n=p&&gl(p.nodesRef.current,t).some(t=>ll(e,t.context?.elements.floating));return A(e)||n}function j(e){if(m(e)){e.type!==`click`&&!A(e)&&(t.clear(),S.current=!1),O();return}if(f.current.insideReactTree){O();return}let n=Mr(e),r=`[${Ad(`inert`)}]`,i=H(n)?n.getRootNode():null,a=Array.from((Dr(i)?i:Wr(l.select(`floatingElement`))).querySelectorAll(r)),o=l.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>U(e,n))))return;let s=H(n)?n:null;for(;s&&!Or(s);){let e=gr(s);if(Or(e)||!H(e))break;s=e}if(!(a.length&&H(n)&&!ul(n)&&!U(n,l.select(`floatingElement`))&&a.every(e=>!U(s,e)))){if(pr(n)&&!(`touches`in e)){let t=Or(n),r=vr(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!D(e)){if(c()===`intentional`&&S.current){t.clear(),S.current=!1;return}typeof h==`function`&&!h(e)||k(`__outsidePressBubbles`)||(l.setOpen(!1,Hr(zr,e)),O())}}}function ee(e){c()!==`sloppy`||e.pointerType===`touch`||!l.select(`open`)||!n||A(e)||j(e)}function N(e){if(c()!==`sloppy`||!l.select(`open`)||!n||A(e))return;let t=e.touches[0];t&&(T.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function P(e,t){let n=Mr(e);if(!n)return;let r=Z(n,e.type,()=>{t(e),r()})}function te(e){w.current=`touch`,P(e,N)}function ne(e){E.clear(),e.type===`pointerdown`&&(w.current=e.pointerType),!(e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)&&P(e,e=>{e.type===`pointerdown`?ee(e):j(e)})}function re(e){if(!b.current)return;let n=x.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!D(e)){if(n){o();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,O())}}}function ie(e){if(c()!==`sloppy`||!T.current||A(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-T.current.startX),r=Math.abs(t.clientY-T.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(T.current.dismissOnTouchEnd=!0),i>10&&(j(e),E.clear(),T.current=null)}function ae(e){P(e,ie)}function F(e){c()!==`sloppy`||!T.current||A(e)||(T.current.dismissOnTouchEnd&&j(e),E.clear(),T.current=null)}function oe(e){P(e,F)}let se=Wr(d),I=Cd(r&&Cd(Z(se,`keydown`,M),Z(se,`compositionstart`,i),Z(se,`compositionend`,a)),g&&Cd(Z(se,`click`,ne,!0),Z(se,`pointerdown`,ne,!0),Z(se,`pointerup`,re,!0),Z(se,`pointercancel`,re,!0),Z(se,`mousedown`,ne,!0),Z(se,`mouseup`,re,!0),Z(se,`touchstart`,te,!0),Z(se,`touchmove`,ae,!0),Z(se,`touchend`,oe,!0)));return()=>{I(),e.clear(),t.clear(),s(),S.current=!1}},[f,d,r,g,h,u,n,v,y,M,O,_,k,A,p,l,E]),W.useEffect(O,[h,O]);let te=W.useMemo(()=>({onKeyDown:M,onPointerDown:j,onClick:j}),[M,j]),ne=W.useMemo(()=>({onKeyDown:M,onPointerDown:P,onMouseDown:P,onClickCapture:ee,onMouseDownCapture(e){ee(),N(e)},onPointerDownCapture(e){ee(),N(e)},onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[M,ee,N,P]);return W.useMemo(()=>n?{reference:te,floating:ne,trigger:te}:{},[n,te,ne])}function xf(e,t,n){let{reference:r,floating:i}=e,a=X(t),o=Ll(t),s=Il(o),c=Nl(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Pl(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Sf(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ml(t,e),p=Yl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Xl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Xl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Cf=50,wf=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Sf},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=xf(l,r,c),f=r,p=0,m={};for(let n=0;ne<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==X(t))||T.every(e=>X(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=X(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Ef(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Df(e){return wl.some(t=>e[t]>=0)}var Of=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ml(e,t);switch(i){case`referenceHidden`:{let e=Ef(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Df(e)}}}case`escaped`:{let e=Ef(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Df(e)}}}default:return{}}}}},kf=new Set([`left`,`top`]);async function Af(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Nl(n),s=Pl(n),c=X(n)===`y`,l=kf.has(o)?-1:1,u=a&&c?-1:1,d=Ml(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var jf=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Af(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Mf=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ml(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=X(Nl(i)),p=Fl(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=jl(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=jl(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Nf=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ml(e,t),u={x:n,y:r},d=X(i),f=Fl(d),p=u[f],m=u[d],h=Ml(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=kf.has(Nl(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},Pf=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ml(e,t),u=await o.detectOverflow(t,l),d=Nl(i),f=Pl(i),p=X(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Tl(h-u[g],v),x=Tl(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=El(u.left,0),t=El(u.right,0),n=El(u.top,0),r=El(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:El(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:El(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Ff(e){let t=vr(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=pr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Dl(n)!==a||Dl(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function If(e){return H(e)?e:e.contextElement}function Lf(e){let t=If(e);if(!pr(t))return kl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ff(t),o=(a?Dl(n.width):n.width)/r,s=(a?Dl(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Rf=kl(0);function zf(e){let t=fr(e);return!cr()||!t.visualViewport?Rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fr(e)?!1:t}function Vf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=If(e),o=kl(1);t&&(r?H(r)&&(o=Lf(r)):o=Lf(e));let s=Bf(a,n,r)?zf(a):kl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=fr(a),t=r&&H(r)?fr(r):r,n=e,i=hr(n);for(;i&&r&&t!==n;){let e=Lf(i),t=i.getBoundingClientRect(),r=vr(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=fr(i),i=hr(n)}}return Xl({width:u,height:d,x:c,y:l})}function Hf(e,t){let n=yr(e).scrollLeft;return t?t.left+n:Vf(mr(e)).left+n}function Uf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Hf(e,n),y:n.top+t.scrollTop}}function Wf(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=mr(r),s=t?lr(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=kl(1),u=kl(0),d=pr(r);if((d||!d&&!a)&&((xr(r)!==`body`||sr(o))&&(c=yr(r)),d)){let e=Vf(r);l=Lf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Uf(o,c):kl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Gf(e){return Array.from(e.getClientRects())}function Kf(e){let t=mr(e),n=yr(e),r=e.ownerDocument.body,i=El(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=El(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Hf(e),s=-n.scrollTop;return vr(r).direction===`rtl`&&(o+=El(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var qf=25;function Jf(e,t){let n=fr(e),r=mr(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=cr();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Hf(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=qf&&(a-=o)}else l<=qf&&(a+=l);return{width:a,height:o,x:s,y:c}}function Yf(e,t){let n=Vf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=pr(e)?Lf(e):kl(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Xf(e,t,n){let r;if(t===`viewport`)r=Jf(e,n);else if(t===`document`)r=Kf(mr(e));else if(H(t))r=Yf(t,n);else{let n=zf(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Xl(r)}function Zf(e,t){let n=gr(e);return n===t||!H(n)||Or(n)?!1:vr(n).position===`fixed`||Zf(n,t)}function Qf(e,t){let n=t.get(e);if(n)return n;let r=_r(e,[],!1).filter(e=>H(e)&&xr(e)!==`body`),i=null,a=vr(e).position===`fixed`,o=a?gr(e):e;for(;H(o)&&!Or(o);){let t=vr(o),n=Er(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||sr(o)&&!n&&Zf(e,o))?r=r.filter(e=>e!==o):i=t,o=gr(o)}return t.set(e,r),r}function $f(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?lr(t)?[]:Qf(t,this._c):[].concat(n),r],o=Xf(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{o(!1,1e-7)},1e3)}n===1&&!cp(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function up(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=If(e),u=i||a?[...l?_r(l):[],...t?_r(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?lp(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Vf(e):null;c&&g();function g(){let t=Vf(e);h&&!cp(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var dp=jf,fp=Mf,pp=Tf,mp=Pf,hp=Of,gp=Nf,_p=(e,t,n)=>{let r=new Map,i={platform:sp,...n},a={...i.platform,_c:r};return wf(e,t,{...i,platform:a})},vp=typeof document<`u`?W.useLayoutEffect:function(){};function yp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yp(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!yp(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function bp(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xp(e,t){let n=bp(e);return Math.round(t*n)/n}function Sp(e){let t=W.useRef(e);return vp(()=>{t.current=e}),t}function Cp(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);yp(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=Sp(c),D=Sp(i),O=Sp(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),_p(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!yp(w.current,t)&&(w.current=t,Bu.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);vp(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);vp(()=>(A.current=!0,()=>{A.current=!1}),[]),vp(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=W.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=xp(M.floating,u.x),r=xp(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...bp(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var wp=(e,t)=>{let n=dp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tp=(e,t)=>{let n=fp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ep=(e,t)=>({fn:gp(e).fn,options:[e,t]}),Dp=(e,t)=>{let n=pp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Op=(e,t)=>{let n=mp(e);return{name:n.name,fn:n.fn,options:[e,t]}},kp=(e,t)=>{let n=hp(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ap(e){let t=W.useRef(!0);t.current&&(t.current=!1,e())}var Q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(an(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},jp=[],Mp=void 0;function Np(){return Mp}function Pp(e){jp.push(e)}function Fp(e){let t=(t,n)=>{let r=$t(Lp).current,i;try{Mp=r;for(let e of jp)e.before(r);i=e(t,n);for(let e of jp)e.after(r);r.didInitialize=!0}finally{Mp=void 0}return i};return t.displayName=e.displayName||e.name,t}function Ip(e){return W.forwardRef(Fp(e))}function Lp(){return{didInitialize:!1}}var Rp=ie(),zp=ne(),Bp=nn(19)?Up:Wp;function Vp(e,t,n,r,i){return Bp(e,t,n,r,i)}function Hp(e,t,n,r,i){let a=W.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Rp.useSyncExternalStore)(e.subscribe,a,a)}Pp({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Rp.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Up(e,t,n,r,i){let a=Np();if(!a)return Hp(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Wp(e,t,n,r,i){return(0,zp.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Gp=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Vp(this,e,t,n,r)}},Kp=class extends Gp{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){W.useDebugValue(e);let n=this;V(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;V(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;V(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){W.useDebugValue(e);let n=this,r=t!==void 0;V(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return W.useDebugValue(e),Vp(this,this.selectors[e],t,n,r)}useContextCallback(e,t){W.useDebugValue(e);let n=Cr(t??tn);this.context[e]=n}useStateSetter(e){let t=W.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},qp={open:Q(e=>e.open),transitionStatus:Q(e=>e.transitionStatus),domReferenceElement:Q(e=>e.domReferenceElement),referenceElement:Q(e=>e.positionReference??e.referenceElement),floatingElement:Q(e=>e.floatingElement),floatingId:Q(e=>e.floatingId)},Jp=class extends Kp{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:ef(),nested:n,triggerElements:i},qp),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Cl(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Yp(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=W.useRef(null);r===void 0&&f.current===null&&(f.current=new Jp({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),V(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};H(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}var Xp={tabIndex:-1,[nl]:``};function Zp(e){return t=>t===`touch`?e.current:!0}function Qp(e,t,n=!1){let r=kr(),i=rf()!=null,a=W.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return Yp({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function $p(e,t){let n=W.useRef(null),r=W.useRef(null);return W.useCallback(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function em(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let i=n?.id??null;(i||t)&&(e.activeTriggerId=i,e.activeTriggerElement=n??null)}function tm(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function nm(e,t,n,r={}){let i=n.reason,a=i===Fr,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=tm(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i={...r.extraState,open:t};o?i.instantType=`focus`:s?i.instantType=`dismiss`:a&&(i.instantType=void 0),em(i,t,n.trigger,c()),e.update(i)};a?Bu.flushSync(l):l()}function rm(e,t,n,r){Ap(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function im(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=$p(e,n),o=Cr(t=>{if(a(t),!t)return;let i=n.select(`open`),o=n.select(`activeTriggerId`);if(o===e){n.update({activeTriggerElement:t,...i?r:null});return}o==null&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return V(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function am(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState(`open`);V(()=>{if(!r){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let t=e.context.triggerElements.size,i={};e.state.triggerCount!==t&&(i.triggerCount=t);let a=e.select(`activeTriggerId`),o=null;if(a){let t=e.context.triggerElements.getById(a);t?t!==e.state.activeTriggerElement&&(i.activeTriggerElement=t):o=a}if(!o&&!a&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;i.activeTriggerId=e,i.activeTriggerElement=n}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),o&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===o&&!e.context.triggerElements.getById(o)){let t=Hr(Nr);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,e.useState(`triggerCount`),n])}function om(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Uu(e),o=t.useState(`preventUnmountingOnClose`),s=e?!1:o;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:s});let c=Cr(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Hu({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:a}}function sm(e,t){e.useSyncedValues(t),V(()=>()=>{e.update({activeTriggerProps:Xt,inactiveTriggerProps:Xt,popupProps:Xt})},[e])}function cm(e,t){V(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),V(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var lm=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function um(){return new Jp({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new lm,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function dm(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:um(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Xt,inactiveTriggerProps:Xt,popupProps:Xt}}function fm(e,t,n=!1){return new Jp({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var pm=Q(e=>e.triggerIdProp??e.activeTriggerId),mm=Q(e=>e.openProp??e.open),hm=Q(e=>(e.popupElement?.id??e.floatingId)||void 0);function gm(e,t){return t!==void 0&&mm(e)&&pm(e)===t}function _m(e,t){return gm(e,t)?!0:t!==void 0&&mm(e)&&pm(e)==null&&e.triggerCount===1}var vm={open:mm,mounted:Q(e=>e.mounted),transitionStatus:Q(e=>e.transitionStatus),floatingRootContext:Q(e=>e.floatingRootContext),triggerCount:Q(e=>e.triggerCount),preventUnmountingOnClose:Q(e=>e.preventUnmountingOnClose),payload:Q(e=>e.payload),activeTriggerId:pm,activeTriggerElement:Q(e=>e.mounted?e.activeTriggerElement:null),popupId:hm,isTriggerActive:Q((e,t)=>t!==void 0&&pm(e)===t),isOpenedByTrigger:Q((e,t)=>gm(e,t)),isMountedByTrigger:Q((e,t)=>t!==void 0&&pm(e)===t&&e.mounted),triggerProps:Q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:Q((e,t)=>_m(e,t)?hm(e):void 0),popupProps:Q(e=>e.popupProps),popupElement:Q(e=>e.popupElement),positionerElement:Q(e=>e.positionerElement)};function ym(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=kr(),a=rf()!=null,o=$t(()=>new Jp({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new lm,floatingId:i,syncOnly:!1,nested:a})).current;return V(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=H(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function bm(e={}){let{nodeId:t,externalTree:n}=e,r=ym(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=W.useState(null),[f,p]=W.useState(void 0),[m,h]=W.useState(void 0),g=W.useRef(null),_=af(n),v=W.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=Cp({...e,elements:{...v,...u&&{reference:u}}}),b=H(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=W.useCallback(e=>{let t=H(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=W.useCallback(e=>{(H(e)||e===null)&&(g.current=e,p(e)),(H(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!H(e))&&y.refs.setReference(e)},[y.refs,p]),w=W.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=W.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=W.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),D=W.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return V(()=>{s&&(g.current=s)},[s]),V(()=>{i.context.dataRef.current.floatingContext=D;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),W.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}var xm=Zc&&$c;function Sm(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=W.useRef(!1),c=W.useRef(null),l=W.useRef(!0),u=Au();W.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=fr(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&pr(e)&&e===Ur(Wr(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return Cd(Z(t,`blur`,r),xm&&Z(t,`keydown`,a,!0),xm&&Z(t,`pointerdown`,o,!0))},[i,n]),W.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);H(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=W.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=Mr(t.nativeEvent);if(H(a)){if(xm&&!t.relatedTarget){if(!l.current&&!dl(a))return}else if(!ml(a))return}let o=cl(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,Hr(Lr,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,Hr(Lr,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=H(n)&&n.hasAttribute(Ad(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=Ur(Wr(e));!n&&t===e||U(o.current.floatingContext?.refs.floating.current,t)||U(e,t)||a||cl(n??t,i.context.triggerElements)||i.setOpen(!1,Hr(Lr,r))})}}},[o,r,i,u]);return W.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var Cm=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new ku,this.restTimeout=new ku,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},wm=new WeakMap;function Tm(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&wm.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),wm.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Em(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=wm.get(n);a&&a!==e&&Tm(a),Tm(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,wm.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Dm(e){let t=e.context.dataRef.current,n=$t(()=>t.hoverInteractionState??Cm.create()).current;return t.hoverInteractionState||=n,Du(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Om(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=af(),d=rf(),f=Dm(a),p=Au(),m=Cr(()=>_d(l.current.openEvent?.type,f.interactedInside)),h=Cr(()=>vd(l.current.openEvent?.type)),g=Cr(()=>{Tm(f)});V(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),W.useEffect(()=>g,[g]),V(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&H(c)&&s){let e=c,t=s,n=Wr(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r;return Em(f,{scopeElement:f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),W.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&gl(u.nodesRef.current,d).length>0)}function t(e){let t=hd(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,Hr(Fr,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=Mr(e);if(!fl(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,v),g()}function _(n){if(e()&&u){u.events.on(`floating.closed`,v);return}if(cl(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&H(o)&&gl(u.nodesRef.current,r,!1).some(e=>U(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,Hr(Fr,t)),u.events.emit(`floating.closed`,t)})}let y=s;return Cd(y&&Z(y,`mouseenter`,c),y&&Z(y,`mouseleave`,_),y&&Z(y,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}var km={current:null};function Am(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=km,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=af(l),v=Dm(m),y=W.useRef(!1),b=wd(i),x=wd(r),S=wd(o),C=wd(n),w=wd(p),T=wd(f),E=Cr(()=>_d(h.current.openEvent?.type,v.interactedInside)),D=Cr(()=>w.current?.()!==!1),O=Cr((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!U(e,t);if(!H(n))return!1;let i=n;return r.hasMatchingElement(e=>U(e,i))&&(!e||!U(e,i))}),k=Cr(()=>{v.handler&&=(Wr(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=Cr(()=>{Tm(v)});return u&&(v.handleCloseOptions=b.current?.__options),W.useEffect(()=>k,[k]),W.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===Fr,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),W.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=hd(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,Hr(Fr,e)),_?.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,Hr(Fr,e)),_?.events.emit(`floating.closed`,e))}let t=c.current??(u?m.select(`domReferenceElement`):null);if(!H(t))return;function r(e){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Sl(v.pointerType))return;let t=gd(S.current),n=hd(x.current,`open`,v.pointerType),r=Mr(e),i=e.currentTarget??null,o=m.select(`domReferenceElement`),s=i;if(H(r)&&!m.context.triggerElements.hasElement(r)){for(let e of m.context.triggerElements.elements())if(U(e,r)){s=e;break}}H(i)&&H(o)&&!m.context.triggerElements.hasElement(i)&&U(i,o)&&(s=o);let c=s==null?!1:O(o,s,r),l=m.select(`open`),u=T.current?.()??m.select(`transitionStatus`)===`ending`,d=!l&&u&&y.current,f=!c&&H(s)&&H(o)&&U(o,s)&&d,p=t>0&&!n,h=c&&(l||d)||f,g=!l||c;if(h){D()&&m.setOpen(!0,Hr(Fr,e,s));return}p||(n?v.openChangeTimeout.start(n,()=>{g&&D()&&m.setOpen(!0,Hr(Fr,e,s))}):g&&D()&&m.setOpen(!0,Hr(Fr,e,s)))}function i(t){if(E()){A();return}k();let n=Wr(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let r=h.current.floatingContext??d?.();if(!cl(t.relatedTarget,m.context.triggerElements)){if(b.current&&r){m.select(`open`)||v.openChangeTimeout.clear();let i=c.current;v.handler=b.current({...r,tree:_,x:t.clientX,y:t.clientY,onClose(){A(),k(),C.current&&!E()&&i===m.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,v.handler),v.handler(t);return}(v.pointerType!==`touch`||!U(m.select(`floatingElement`),t.relatedTarget))&&e(t)}}return s?Cd(Z(t,`mousemove`,r,{once:!0}),Z(t,`mouseenter`,r),Z(t,`mouseleave`,i)):Cd(Z(t,`mouseenter`,r),Z(t,`mouseleave`,i))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),W.useMemo(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=m.select(`domReferenceElement`),i=m.select(`open`),o=O(r,n,e.target);if(a&&!Sl(v.pointerType))return;if(i&&o&&v.handleCloseOptions?.blockPointerEvents){let e=m.select(`floatingElement`);e&&Em(v,{scopeElement:v.handleCloseOptions?.getScope?.()??n.ownerDocument.body,referenceElement:n,floatingElement:e})}let s=gd(S.current);if(i&&!o||s===0||!o&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function c(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||o)&&D()&&m.setOpen(!0,Hr(Fr,t,n))}v.pointerType===`touch`?Bu.flushSync(()=>{c()}):o&&i?c():(v.restTimeoutPending=!0,v.restTimeout.start(s,c))}}},[n,v,E,O,a,m,S,D])}var jm=.1,Mm=jm*jm,Nm=.5;function Pm(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Fm(e,t,n,r,i,a,o,s,c,l){let u=!1;return Pm(e,t,n,r,i,a)&&(u=!u),Pm(e,t,i,a,o,s)&&(u=!u),Pm(e,t,o,s,c,l)&&(u=!u),Pm(e,t,c,l,n,r)&&(u=!u),u}function Im(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Lm(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Rm(e={}){let{blockPointerEvents:t=!1}=e,n=new ku,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Mm;return u=e,d=t,f=n,o0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Lm(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Lm(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Lm(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Lm(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Im(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Nm/2:Nm*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Nm+1,o=C||T?S.bottom-Nm:S.top,s=C?T?S.bottom-Nm:S.top:S.bottom-Nm;M=Fm(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Nm/2:Nm*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Nm,o=C||T?S.top+Nm:S.bottom,s=C?T?S.top+Nm:S.bottom:S.top+Nm;M=Fm(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Nm/2:Nm*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Nm+1,o=w||E?S.right-Nm:S.left,s=w?E?S.right-Nm:S.left:S.right-Nm;M=Fm(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Nm/2:Nm*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Nm,o=w||E?S.left+Nm:S.right,s=w?E?S.left+Nm:S.right:S.left+Nm;M=Fm(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var zm=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),Bm=function(e){return e[e.open=ed.open]=`open`,e[e.closed=ed.closed]=`closed`,e[e.startingStyle=ed.startingStyle]=`startingStyle`,e[e.endingStyle=ed.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),Vm=W.createContext(void 0);function Hm(){let e=W.useContext(Vm);if(e===void 0)throw Error(an(26));return e}var Um=`ArrowUp`,Wm=`ArrowDown`,Gm=`ArrowLeft`,Km=`ArrowRight`,qm=`Home`,Jm=new Set([Gm,Km]),Ym=new Set([Gm,Km,qm,`End`]),Xm=new Set([Um,Wm]),Zm=new Set([Um,Wm,qm,`End`]),Qm=new Set([...Jm,...Xm]),$m=new Set([...Qm,qm,`End`]),eh=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function th(e){return pr(e)&&e.tagName===`INPUT`}function nh(e){return!!(th(e)&&e.selectionStart!=null||pr(e)&&e.tagName===`TEXTAREA`)}function rh(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidthe.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLefte.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=ih(e,t,`top`),r=ah(e),i=ah(t);n-i.scrollMarginTope.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function ih(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function ah(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var oh={...ld,...zu,nestedDialogOpen(e){return e?{[Bm.nestedDialogOpen]:``}:null}},sh=W.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,{store:c}=$u(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`),C=s.id??S;Hm(),Hu({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let w=o===void 0?Zp(c.context.popupRef):o,T=g>0,E=c.useStateSetter(`popupElement`),D=en(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:T},props:[f,{id:C,"aria-labelledby":y??void 0,"aria-describedby":l??void 0,role:x,...Xp,hidden:!m,onKeyDown(e){$m.has(e.key)&&e.stopPropagation()},style:{[zm.nestedDialogs]:g}},s],ref:[t,c.context.popupRef,E],stateAttributesMapping:oh});return(0,G.jsx)(mf,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:w,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:D})});function ch(e){return nn(19)?e:e?`true`:void 0}var lh=W.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),uh=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=$u(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,G.jsx)(Vm.Provider,{value:n,children:(0,G.jsxs)($d,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(lh,{ref:i.context.internalBackdropRef,inert:ch(!s)}),e.children]})}):null}),dh={},fh={},ph=``;function mh(e){if(typeof document>`u`)return!1;let t=Wr(e);return fr(t).innerWidth-t.documentElement.clientWidth>0}function hh(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Wr(e),n=t.documentElement,r=t.body,i=sr(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function gh(e){let t=Wr(e),n=t.documentElement,r=t.body,i=sr(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function _h(e){let t=Wr(e),n=t.documentElement,r=t.body,i=fr(n),a=0,o=0,s=!1,c=Nu.create();if($c&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,dh={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ph=n.style.scrollBehavior,fh={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=sr(n)?n:r;if(s=hh(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,dh),Object.assign(r.style,fh),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=ph)}function d(){u(),c.request(l)}l();let f=Z(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var vh=new class{lockCount=0;restore=null;timeoutLock=ku.create();timeoutUnlock=ku.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Wr(e).documentElement,n=fr(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=tn;return}let r=Jc||!mh(e);this.restore=r?gh(e):_h(e)}};function yh(e=!0,t=null){V(()=>{if(e)return vh.acquire(t)},[e,t])}function bh(e){let{store:t,actionsRef:n}=e,r=t.useState(`open`);cm(t,r),am(t);let{forceUnmount:i}=om(r,t),a=W.useCallback(()=>{t.setOpen(!1,Hr(Vr))},[t]);W.useImperativeHandle(n,()=>({unmount:i,close:a}),[i,a])}function xh({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=W.useState(0),[u,d]=W.useState(0),f=c===0,p=bf(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0||`touches`in t&&t.touches.length!==1)return!1;let n=Mr(t);return f&&!i?a&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||U(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0:!1},escapeKey:f});return yh(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),e.useContextCallback(`onNestedDialogClose`,()=>{l(0),d(0)}),W.useEffect(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(c+1,u+ +!!n),t?.onNestedDialogClose&&!r&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&r&&t.onNestedDialogClose()}),[n,r,c,u,t]),sm(e,{activeTriggerProps:p.reference??Xt,inactiveTriggerProps:p.trigger??Xt,popupProps:p.floating??Xt,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var Sh={...vm,modal:Q(e=>e.modal),nested:Q(e=>e.nested),nestedOpenDialogCount:Q(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:Q(e=>e.nestedOpenDrawerCount),disablePointerDismissal:Q(e=>e.disablePointerDismissal),openMethod:Q(e=>e.openMethod),descriptionElementId:Q(e=>e.descriptionElementId),titleElementId:Q(e=>e.titleElementId),viewportElement:Q(e=>e.viewportElement),role:Q(e=>e.role)},Ch=class e extends Kp{constructor(e,t,n=!1){let r=new lm,i=wh(e);i.floatingRootContext=fm(r,t,n),super(i,{popupRef:W.createRef(),backdropRef:W.createRef(),internalBackdropRef:W.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Sh)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};em(n,e,t.trigger),this.update(n)};static useStore(t,n){return Qp(t,(t,r)=>new e(n,t,r),!0).store}};function wh(e={}){return{...dm(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Th(e,t=`dialog`){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=e,p=t===`drawer`,m=t===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=$u(!0),y={modal:h,disablePointerDismissal:g,nested:!!v,role:_},b=Ch.useStore(u?.store,{open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y});Ap(()=>{let e=r===void 0&&b.state.open===!1&&i===!0?{open:!0,activeTriggerId:f}:null;m?b.update(e?{...y,...e}:y):e&&b.update(e)}),b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);bh({store:b,actionsRef:l});let w=x||S,T=W.useMemo(()=>({store:b}),[b]);return(0,G.jsx)(Zu.Provider,{value:!1,children:(0,G.jsxs)(Qu.Provider,{value:T,children:[w&&(0,G.jsx)(xh,{store:b,parentContext:v?.store.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})})}function Eh(e){return Th(e,W.useContext(Zu)?`drawer`:`dialog`)}var Dh=W.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=$u(),c=Ar(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),en(`h2`,e,{ref:t,props:[{id:c},o]})});function Oh(e){let t=(0,Ls.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(Eh,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function kh(e){let t=(0,Ls.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(uh,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function Ah(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:animate-out data-open:animate-in fixed inset-0 z-50 bg-black/80 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(dd,{className:i,"data-slot":`sheet-overlay`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function jh(e){let t=(0,Ls.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,side:a,showCloseButton:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`right`:a,c=o===void 0?!0:o,l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,G.jsx)(Ah,{}),t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=Cn(`data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-closed:animate-out data-open:animate-in fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,r),t[7]=r,t[8]=u);let d;t[9]===c?d=t[10]:(d=c&&(0,G.jsxs)(fd,{"data-slot":`sheet-close`,render:(0,G.jsx)(wr,{className:`absolute top-4 right-4`,size:`icon-sm`,variant:`ghost`}),children:[(0,G.jsx)(Oc,{}),(0,G.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[9]=c,t[10]=d);let f;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==u||t[15]!==d?(f=(0,G.jsxs)(kh,{children:[l,(0,G.jsxs)(sh,{className:u,"data-side":s,"data-slot":`sheet-content`,...i,children:[n,d]})]}),t[11]=n,t[12]=i,t[13]=s,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function Mh(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`flex flex-col gap-1.5 p-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-slot":`sheet-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Nh(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`text-sm font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(Dh,{className:i,"data-slot":`sheet-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ph(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`text-xs/relaxed text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(pd,{className:i,"data-slot":`sheet-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Fh=W.createContext(void 0);function Ih(e){let t=W.useContext(Fh);if(t===void 0&&!e)throw Error(an(72));return t}var Lh={...vm,disabled:Q(e=>e.disabled),instantType:Q(e=>e.instantType),isInstantPhase:Q(e=>e.isInstantPhase),trackCursorAxis:Q(e=>e.trackCursorAxis),disableHoverablePopup:Q(e=>e.disableHoverablePopup),lastOpenChangeReason:Q(e=>e.openChangeReason),closeOnClick:Q(e=>e.closeOnClick),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport)},Rh=class e extends Kp{constructor(e,t,n=!1){let r=new lm,i={...zh(),...e};i.floatingRootContext=fm(r,t,n),super(i,{popupRef:W.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},Lh)}setOpen=(e,t)=>{nm(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Hr(Pr,e))}static useStore(t,n){return Qp(t,(t,r)=>new e(n,t,r)).store}};function zh(){return{...dm(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var Bh=Fp(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Rh.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});rm(p,r,n,d),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),p.useSyncedValue(`disabled`,t),am(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=om(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=W.useRef(null);V(()=>{m&&t&&p.setOpen(!1,Hr(Ir))},[m,t,p]),V(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),V(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]);let T=W.useCallback(()=>{p.setOpen(!1,Hr(Vr))},[p]);W.useImperativeHandle(o,()=>({unmount:y,close:T}),[y,T]);let E=h||_||!t&&a!==`none`;return(0,G.jsxs)(Fh.Provider,{value:p,children:[E&&(0,G.jsx)(Vh,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Vh({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=bf(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=_f(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n});return sm(e,{activeTriggerProps:W.useMemo(()=>Qt(a.reference,i.reference),[a.reference,i.reference]),inactiveTriggerProps:W.useMemo(()=>Qt(a.trigger,i.trigger),[a.trigger,i.trigger]),popupProps:W.useMemo(()=>Qt(Xp,a.floating,i.floating),[a.floating,i.floating])}),null}var Hh=W.createContext(void 0);function Uh(){return W.useContext(Hh)}var Wh=function(e){return e[e.popupOpen=td.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),Gh=`data-base-ui-tooltip-trigger`;function Kh(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;em.select(`transitionStatus`)===`ending`,shouldOpen(){return!N.current}}),F=Sm(v,{enabled:!A}).reference,oe=e=>{let t=N.current,n=Kh(e),r=ie(n),i=y.current,a=i&&n&&U(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,Hr(Fr,e));return}if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Sl(te.current)){let t=()=>{!N.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,Hr(Fr,e,i))},n=ne();n===0?(P.clear(),t()):P.start(n,t)}},se=m.useState(`triggerProps`,C);return en(`button`,e,{state:{open:_},ref:[t,S,y],props:[ae,F,C||M!==`none`?se:void 0,{onMouseOver(e){oe(e.nativeEvent)},onFocus(e){re(Kh(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){N.current=!1,P.clear(),te.current=void 0},onPointerEnter(e){te.current=e.pointerType},onPointerDown(e){te.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[Wh.triggerDisabled]:A?``:void 0,[Gh]:A?void 0:``},f],stateAttributesMapping:sd})}),Yh=W.createContext(void 0);function Xh(){let e=W.useContext(Yh);if(e===void 0)throw Error(an(70));return e}var Zh=W.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=Qd({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,G.jsxs)(W.Fragment,{children:[l,c&&Bu.createPortal(n,c)]})}),Qh=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Ih().useState(`mounted`)||n?(0,G.jsx)(Yh.Provider,{value:n,children:(0,G.jsx)(Zh,{ref:t,...r})}):null}),$h=W.createContext(void 0);function eg(){let e=W.useContext($h);if(e===void 0)throw Error(an(71));return e}var tg=W.createContext(void 0);function ng(){return W.useContext(tg)?.direction??`ltr`}var rg=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Ml(e,t)||{};if(l==null)return{};let f=Yl(u),p={x:n,y:r},m=Ll(i),h=Il(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=jl(k,j,A),ee=!c.arrow&&Pl(i)!=null&&j!==M&&a.reference[h]/2-(j({...rg(e),options:[e,t]}),ag=kp().fn,og={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await ag(e)).data?.referenceHidden||a}}}},sg={sideX:`left`,sideY:`top`},cg={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=fr(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:sg};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=Wr(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=Nl(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:sg.sideX,g=f===`top`?`bottom`:sg.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function lg(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function ug(e,t,n){let{rects:r,placement:i}=e;return{side:lg(t,Nl(i),n),align:Pl(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function dg(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=W.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=Cr(D),k=D?O:t,A=wd(t),j=wd(h),M=ng()===`rtl`,ee=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],N=a===`center`?ee:`${ee}-${a}`,P=c,te=+(r===`bottom`),ne=+(r===`top`),re=+(r===`right`),ie=+(r===`left`);typeof P==`number`?P={top:P+te,right:P+ie,bottom:P+ne,left:P+re}:P&&={top:(P.top||0)+te,right:(P.right||0)+ie,bottom:(P.bottom||0)+ne,left:(P.left||0)+re};let ae={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},F=W.useRef(null),oe=wd(i),se=wd(o),I=typeof i==`function`?0:i,ce=typeof o==`function`?0:o,le=[];f&&le.push(f),le.push(wp(e=>{let t=ug(e,r,M),n=typeof oe.current==`function`?oe.current(t):oe.current,i=typeof se.current==`function`?se.current(t):se.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[I,ce,M,r]));let ue=T===`none`&&w!==`shift`,de=!ue&&(l||_||w===`shift`),fe=w===`none`?null:Dp({...ae,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),pe=ue?null:Tp(e=>{let t=Wr(e.elements.floating).documentElement;return{...ae,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:de,limiter:l||_?void 0:Ep(e=>{if(!F.current)return{};let{width:t,height:n}=F.current.getBoundingClientRect(),r=X(Nl(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[ae,l,_,P,T]);w===`shift`||T===`shift`||a===`center`?le.push(pe,fe):le.push(fe,pe),le.push(Op({...ae,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=fr(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),ig(e=>({element:F.current||Wr(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=Nl(a),l=X(c),u=F.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(ug(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,de&&l===`y`&&b?S:x),{}}},og,y),V(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let me=W.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:he,elements:ge,x:_e,y:ve,middlewareData:ye,update:be,placement:xe,context:Se,isPositioned:Ce,floatingStyles:we}=bm({rootContext:m,open:p?h:void 0,placement:N,middleware:le,strategy:n,whileElementsMounted:p?void 0:(...e)=>up(...e,me),nodeId:v,externalTree:x}),{sideX:Te,sideY:Ee}=ye.adaptiveOrigin||sg,De=Ce?n:`fixed`,Oe=W.useMemo(()=>{let e=y?{position:De,[Te]:_e,[Ee]:ve}:{position:De,...we};return Ce||(e.opacity=0),e},[y,De,Te,_e,Ee,ve,we,Ce]),ke=W.useRef(null);V(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(fg(t)?t.current:t)||null;n!==ke.current&&(he.setPositionReference(n),ke.current=n)},[h,he,k,A]),W.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&fg(e)&&e.current!==ke.current&&(he.setPositionReference(e.current),ke.current=e.current)},[h,he,k,A]),W.useEffect(()=>{if(p&&h&&ge.reference&&ge.floating)return up(ge.reference,ge.floating,be,me)},[p,h,ge,be,me]);let Ae=Nl(xe),je=lg(r,Ae,M),Me=Pl(xe)||`center`,Ne=!!ye.hide?.referenceHidden;V(()=>{b&&h&&Ce&&C(Ae)},[b,h,Ce,Ae]);let Pe=W.useMemo(()=>({position:`absolute`,top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Fe=ye.arrow?.centerOffset!==0;return W.useMemo(()=>({positionerStyles:Oe,arrowStyles:Pe,arrowRef:F,arrowUncentered:Fe,side:je,align:Me,physicalSide:Ae,anchorHidden:Ne,refs:he,context:Se,isPositioned:Ce,update:be}),[Oe,Pe,F,Fe,je,Me,Ae,Ne,he,Se,Ce,be])}function fg(e){return e!=null&&`current`in e}function pg(e){return e===`starting`?Gd:Xt}function mg(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),en(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},pg(r),i],stateAttributesMapping:ld})}var hg=W.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=qd,style:g,..._}=e,v=Ih(),y=Xh(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=dg({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?cg:void 0}),O=mg(e,W.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,G.jsx)($h.Provider,{value:D,children:O})}),gg={...ld,...zu},_g=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Ih(),{side:s,align:c}=eg(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Hu({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Om(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return en(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[f,pg(d),a],stateAttributesMapping:gg})}),vg=W.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Ih(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=eg();return en(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:ld})}),yg=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=W.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=W.useMemo(()=>({open:t,close:n}),[t,n]);return(0,G.jsx)(Hh.Provider,{value:i,children:(0,G.jsx)(xd,{delay:a,timeoutMs:r,children:e.children})})};function bg(e){let t=(0,Ls.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,G.jsx)(yg,{"data-slot":`tooltip-provider`,delay:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function xg(e){let t=(0,Ls.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(bg,{children:(0,G.jsx)(Bh,{"data-slot":`tooltip`,...n})}),t[2]=n,t[3]=r),r}function Sg(e){let t=(0,Ls.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(Jh,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function Cg(e){let t=(0,Ls.c)(21),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,side:a,sideOffset:o,align:s,alignOffset:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`top`:a,u=o===void 0?4:o,d=s===void 0?`center`:s,f=c===void 0?0:c,p;t[8]===r?p=t[9]:(p=Cn(`data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-xs text-background **:data-[slot=kbd]:rounded-md`,r),t[8]=r,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,G.jsx)(vg,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`}),t[10]=m):m=t[10];let h;t[11]!==n||t[12]!==i||t[13]!==p?(h=(0,G.jsxs)(_g,{className:p,"data-slot":`tooltip-content`,...i,children:[n,m]}),t[11]=n,t[12]=i,t[13]=p,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==f||t[17]!==l||t[18]!==u||t[19]!==h?(g=(0,G.jsx)(Qh,{children:(0,G.jsx)(hg,{align:d,alignOffset:f,className:`isolate z-50`,side:l,sideOffset:u,children:h})}),t[15]=d,t[16]=f,t[17]=l,t[18]=u,t[19]=h,t[20]=g):g=t[20],g}var wg=window.matchMedia(`(max-width: 767px)`);function Tg(e){return wg.addEventListener(`change`,e),()=>wg.removeEventListener(`change`,e)}function Eg(){return wg.matches}function Dg(){return(0,W.useSyncExternalStore)(Tg,Eg)}var Og=`sidebar_state`,kg=3600*24*7,Ag=`12rem`,jg=`16rem`,Mg=`3rem`,Ng=`b`,Pg=W.createContext(null);function Fg(){let e=W.useContext(Pg);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Ig(e){let t=(0,Ls.c)(36),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({defaultOpen:c,open:i,onOpenChange:o,className:r,style:s,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=c===void 0?!0:c,u=Dg(),[d,f]=W.useState(!1),[p,m]=W.useState(l),h=i??p,g;t[8]!==h||t[9]!==o?(g=e=>{let t=typeof e==`function`?e(h):e;o?o(t):m(t),document.cookie=`${Og}=${t}; path=/; max-age=${kg}`},t[8]=h,t[9]=o,t[10]=g):g=t[10];let _=g,v;t[11]!==u||t[12]!==_?(v=()=>u?f(Rg):_(Lg),t[11]=u,t[12]=_,t[13]=v):v=t[13];let y=v,b,x;t[14]===y?(b=t[15],x=t[16]):(b=()=>{let e=e=>{e.key===Ng&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},x=[y],t[14]=y,t[15]=b,t[16]=x),W.useEffect(b,x);let S=h?`expanded`:`collapsed`,C;t[17]!==u||t[18]!==h||t[19]!==d||t[20]!==_||t[21]!==S||t[22]!==y?(C={state:S,open:h,setOpen:_,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:y},t[17]=u,t[18]=h,t[19]=d,t[20]=_,t[21]=S,t[22]=y,t[23]=C):C=t[23];let w=C,T;t[24]===r?T=t[25]:(T=Cn(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),t[24]=r,t[25]=T);let E;t[26]===s?E=t[27]:(E={"--sidebar-width":Ag,"--sidebar-width-icon":Mg,...s},t[26]=s,t[27]=E);let D=E,O;t[28]!==n||t[29]!==a||t[30]!==T||t[31]!==D?(O=(0,G.jsx)(`div`,{className:T,"data-slot":`sidebar-wrapper`,style:D,...a,children:n}),t[28]=n,t[29]=a,t[30]=T,t[31]=D,t[32]=O):O=t[32];let k;return t[33]!==w||t[34]!==O?(k=(0,G.jsx)(Pg.Provider,{value:w,children:O}),t[33]=w,t[34]=O,t[35]=k):k=t[35],k}function Lg(e){return!e}function Rg(e){return!e}function zg(e){let t=(0,Ls.c)(46),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({side:a,variant:o,collapsible:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`left`:a,l=o===void 0?`sidebar`:o,u=s===void 0?`offExamples`:s,{isMobile:d,state:f,openMobile:p,setOpenMobile:m}=Fg();if(u===`none`){let e;t[7]===r?e=t[8]:(e=Cn(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[7]=r,t[8]=e);let a;return t[9]!==n||t[10]!==i||t[11]!==e?(a=(0,G.jsx)(`div`,{className:e,"data-slot":`sidebar`,...i,children:n}),t[9]=n,t[10]=i,t[11]=e,t[12]=a):a=t[12],a}if(d){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e={"--sidebar-width":jg},t[13]=e):e=t[13];let r=e,a;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,G.jsxs)(Mh,{className:`sr-only`,children:[(0,G.jsx)(Nh,{children:`Sidebar`}),(0,G.jsx)(Ph,{children:`Displays the mobile sidebar.`})]}),t[14]=a):a=t[14];let o;t[15]===n?o=t[16]:(o=(0,G.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n}),t[15]=n,t[16]=o);let s;t[17]!==c||t[18]!==o?(s=(0,G.jsxs)(jh,{className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,"data-mobile":`true`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,side:c,style:r,children:[a,o]}),t[17]=c,t[18]=o,t[19]=s):s=t[19];let l;return t[20]!==p||t[21]!==i||t[22]!==m||t[23]!==s?(l=(0,G.jsx)(Oh,{onOpenChange:m,open:p,...i,children:s}),t[20]=p,t[21]=i,t[22]=m,t[23]=s,t[24]=l):l=t[24],l}let h=f===`collapsed`?u:``,g=l===`floating`||l===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,_;t[25]===g?_=t[26]:(_=Cn(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offExamples]:w-0`,`group-data-[side=right]:rotate-180`,g),t[25]=g,t[26]=_);let v;t[27]===_?v=t[28]:(v=(0,G.jsx)(`div`,{className:_,"data-slot":`sidebar-gap`}),t[27]=_,t[28]=v);let y=c===`left`?`left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]`,b=l===`floating`||l===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,x;t[29]!==r||t[30]!==y||t[31]!==b?(x=Cn(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,y,b,r),t[29]=r,t[30]=y,t[31]=b,t[32]=x):x=t[32];let S;t[33]===n?S=t[34]:(S=(0,G.jsx)(`div`,{className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,children:n}),t[33]=n,t[34]=S);let C;t[35]!==i||t[36]!==x||t[37]!==S?(C=(0,G.jsx)(`div`,{className:x,"data-slot":`sidebar-container`,...i,children:S}),t[35]=i,t[36]=x,t[37]=S,t[38]=C):C=t[38];let w;return t[39]!==c||t[40]!==f||t[41]!==C||t[42]!==h||t[43]!==v||t[44]!==l?(w=(0,G.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-collapsible":h,"data-side":c,"data-slot":`sidebar`,"data-state":f,"data-variant":l,children:[v,C]}),t[39]=c,t[40]=f,t[41]=C,t[42]=h,t[43]=v,t[44]=l,t[45]=w):w=t[45],w}function Bg(e){let t=(0,Ls.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{toggleSidebar:a}=Fg(),o;t[4]===n?o=t[5]:(o=Cn(n),t[4]=n,t[5]=o);let s;t[6]!==r||t[7]!==a?(s=e=>{r?.(e),a()},t[6]=r,t[7]=a,t[8]=s):s=t[8];let c,l;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(vc,{}),l=(0,G.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),t[9]=c,t[10]=l):(c=t[9],l=t[10]);let u;return t[11]!==i||t[12]!==o||t[13]!==s?(u=(0,G.jsxs)(wr,{className:o,"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,onClick:s,size:`icon-lg`,variant:`ghost`,...i,children:[c,l]}),t[11]=i,t[12]=o,t[13]=s,t[14]=u):u=t[14],u}function Vg(e){let t=(0,Ls.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{toggleSidebar:i}=Fg(),a;t[3]===n?a=t[4]:(a=Cn(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offExamples]:translate-x-0 group-data-[collapsible=offExamples]:after:left-full hover:group-data-[collapsible=offExamples]:bg-sidebar`,`[[data-side=left][data-collapsible=offExamples]_&]:-right-2`,`[[data-side=right][data-collapsible=offExamples]_&]:-left-2`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a||t[7]!==i?(o=(0,G.jsx)(`button`,{"aria-label":`Toggle Sidebar`,className:a,"data-sidebar":`rail`,"data-slot":`sidebar-rail`,onClick:i,tabIndex:-1,title:`Toggle Sidebar`,...r}),t[5]=r,t[6]=a,t[7]=i,t[8]=o):o=t[8],o}function Hg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-sidebar":`header`,"data-slot":`sidebar-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ug(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-sidebar":`footer`,"data-slot":`sidebar-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Wg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`mx-2 w-auto bg-sidebar-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(Xu,{className:i,"data-sidebar":`separator`,"data-slot":`sidebar-separator`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Gg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-sidebar":`content`,"data-slot":`sidebar-content`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Kg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`relative flex w-full min-w-0 flex-col px-2 py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`div`,{className:i,"data-sidebar":`group`,"data-slot":`sidebar-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function qg(e){let t=(0,Ls.c)(10),n,r,i,a;if(t[0]!==e){let{className:o,render:s,...c}=e;n=s,a=Hs,r=`div`,i=Qt({className:Cn(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,o)},c),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o={slot:`sidebar-group-label`,sidebar:`group-label`},t[5]=o):o=t[5];let s;return t[6]!==n||t[7]!==r||t[8]!==i?(s={defaultTagName:r,props:i,render:n,state:o},t[6]=n,t[7]=r,t[8]=i,t[9]=s):s=t[9],a(s)}function Jg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`flex w-full min-w-0 flex-col gap-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`ul`,{className:i,"data-sidebar":`menu`,"data-slot":`sidebar-menu`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Yg(e){let t=(0,Ls.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Cn(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,G.jsx)(`li`,{className:i,"data-sidebar":`menu-item`,"data-slot":`sidebar-menu-item`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Xg=rn(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-xs`,sm:`h-7 text-xs`,lg:`h-12 text-xs group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Zg(e){let t=(0,Ls.c)(15),{render:n,isActive:r,variant:i,size:a,tooltip:o,className:s,...c}=e,l=r===void 0?!1:r,u=i===void 0?`default`:i,d=a===void 0?`default`:a,{isMobile:f,state:p}=Fg(),m=Qt({className:Cn(Xg({variant:u,size:d}),s)},c),h=o?Sg:n,g;t[0]!==l||t[1]!==d?(g={slot:`sidebar-menu-button`,sidebar:`menu-button`,size:d,active:l},t[0]=l,t[1]=d,t[2]=g):g=t[2];let _;t[3]!==m||t[4]!==h||t[5]!==g?(_={defaultTagName:`button`,props:m,render:h,state:g},t[3]=m,t[4]=h,t[5]=g,t[6]=_):_=t[6];let v=Hs(_);if(!o)return v;let y;t[7]===o?y=t[8]:(y=typeof o==`string`?{children:o}:o,t[7]=o,t[8]=y);let b=y,x=p!==`collapsed`||f,S;t[9]!==x||t[10]!==b?(S=(0,G.jsx)(Cg,{align:`center`,hidden:x,side:`right`,...b}),t[9]=x,t[10]=b,t[11]=S):S=t[11];let C;return t[12]!==v||t[13]!==S?(C=(0,G.jsxs)(xg,{children:[v,S]}),t[12]=v,t[13]=S,t[14]=C):C=t[14],C}var Qg=class{async sign(e,t,n){return e}},$g=`ref`,e_=-1,t_=!0,n_=`isSet`,r_=`PartitionResult`,i_=`booleanEquals`,a_=`stringEquals`,o_=`getAttr`,s_=`us-east-1`,c_=`sigv4`,l_=`sts`,u_=`https://sts.{Region}.{PartitionResult#dnsSuffix}`,d_={[$g]:`Endpoint`},f_={[$g]:`Region`},p_={[$g]:r_},m_={},h_=[f_],g_={conditions:[[n_,[d_]],[n_,h_],[`aws.partition`,h_,r_],[i_,[{[$g]:`UseFIPS`},t_]],[i_,[{[$g]:`UseDualStack`},t_]],[a_,[f_,`aws-global`]],[i_,[{[$g]:`UseGlobalEndpoint`},t_]],[a_,[f_,`eu-central-1`]],[i_,[{fn:o_,argv:[p_,`supportsDualStack`]},t_]],[i_,[{fn:o_,argv:[p_,`supportsFIPS`]},t_]],[a_,[f_,`ap-south-1`]],[a_,[f_,`eu-north-1`]],[a_,[f_,`eu-west-1`]],[a_,[f_,`eu-west-2`]],[a_,[f_,`eu-west-3`]],[a_,[f_,`sa-east-1`]],[a_,[f_,s_]],[a_,[f_,`us-east-2`]],[a_,[f_,`us-west-2`]],[a_,[f_,`us-west-1`]],[a_,[f_,`ca-central-1`]],[a_,[f_,`ap-southeast-1`]],[a_,[f_,`ap-northeast-1`]],[a_,[f_,`ap-southeast-2`]],[a_,[{fn:o_,argv:[p_,`name`]},`aws-us-gov`]]],results:[[e_],[`https://sts.amazonaws.com`,{authSchemes:[{name:c_,signingName:l_,signingRegion:s_}]}],[u_,{authSchemes:[{name:c_,signingName:l_,signingRegion:`{Region}`}]}],[e_,`Invalid Configuration: FIPS and custom endpoint are not supported`],[e_,`Invalid Configuration: Dualstack and custom endpoint are not supported`],[d_,m_],[`https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,m_],[e_,`FIPS and DualStack are enabled, but this partition does not support one or both`],[`https://sts.{Region}.amazonaws.com`,m_],[`https://sts-fips.{Region}.{PartitionResult#dnsSuffix}`,m_],[e_,`FIPS is enabled but this partition does not support FIPS`],[`https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}`,m_],[e_,`DualStack is enabled but this partition does not support DualStack`],[u_,m_],[e_,`Invalid Configuration: Missing Region`]]},__=2,v_=new Int32Array([-1,1,-1,0,30,3,1,4,100000014,2,5,100000014,3,25,6,4,24,7,5,100000001,8,6,9,100000013,7,100000001,10,10,100000001,11,11,100000001,12,12,100000001,13,13,100000001,14,14,100000001,15,15,100000001,16,16,100000001,17,17,100000001,18,18,100000001,19,19,100000001,20,20,100000001,21,21,100000001,22,22,100000001,23,23,100000001,100000002,8,100000011,100000012,4,28,26,9,27,100000010,24,100000008,100000009,8,29,100000007,9,100000006,100000007,3,100000003,31,4,100000004,100000005]),y_=qn.from(v_,__,g_.conditions,g_.results),b_=new Qn({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`]}),x_=(e,t={})=>b_.get(e,()=>Wn(y_,{endpointParams:e,logger:t.logger}));er.aws=mn;var S_=(e=>async(t,n,r)=>{if(!r)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let i=await e(t,n,r),a=hn(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);let o=await Kn(r,{getEndpointParameterInstructions:a},t);return Object.assign(i,o)})(async(e,t,n)=>({operation:hn(t).operation,region:await Tn(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}));function C_(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function w_(e){return{schemeId:`aws.auth#sigv4a`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function T_(e){return{schemeId:`smithy.api#noAuth`}}var E_=((e,t,n)=>r=>{let i=e(r).properties?.authSchemes;if(!i)return t(r);let a=[];for(let e of i){let{name:t,properties:o={},...s}=e,c=t.toLowerCase();t!==c&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${t}' to '${c}'`);let l;if(c===`sigv4a`){l=`aws.auth#sigv4a`;let e=i.find(e=>{let t=e.name.toLowerCase();return t!==`sigv4a`&&t.startsWith(`sigv4`)});if(Fn.sigv4aDependency()===`none`&&e)continue}else if(c.startsWith(`sigv4`))l=`aws.auth#sigv4`;else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${c}'`);let u=n[l];if(!u)throw Error(`Could not find HttpAuthOption create function for '${l}'`);let d=u(r);d.schemeId=l,d.signingProperties={...d.signingProperties||{},...s,...o},a.push(d)}return a})(x_,e=>{let t=[];switch(e.operation){case`AssumeRoleWithSAML`:t.push(T_(e)),t.push(w_(e));break;case`AssumeRoleWithWebIdentity`:t.push(T_(e)),t.push(w_(e));break;default:t.push(C_(e)),t.push(w_(e))}return t},{"aws.auth#sigv4":C_,"aws.auth#sigv4a":w_,"smithy.api#noAuth":T_}),D_=e=>{let t=Dn(fn(e));return Object.assign(t,{authSchemePreference:Tn(e.authSchemePreference??[])})},O_=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:`sts`}),k_={UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}},A_={name:`@aws-sdk/client-sts`,description:`AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native`,version:`3.1072.0`,scripts:{build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline`,"build:es":`premove dist-es && tsc -p tsconfig.es.json`,"build:include:deps":`yarn g:turbo run build -F="$npm_package_name"`,"build:types":`premove dist-types && tsc -p tsconfig.types.json`,"build:types:downlevel":`downlevel-dts dist-types dist-types/ts3.4`,clean:`premove dist-cjs dist-es dist-types`,"extract:docs":`api-extractor run --local`,"generate:client":`node ../../scripts/generate-clients/single-service`,test:`yarn g:vitest run --passWithNoTests`,"test:watch":`yarn g:vitest watch --passWithNoTests`,"test:integration":`yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts`,"test:integration:watch":`yarn g:vitest watch --passWithNoTests -c vitest.config.integ.mts`,"test:e2e":`yarn g:vitest run -c vitest.config.e2e.mts`,"test:e2e:watch":`yarn g:vitest watch -c vitest.config.e2e.mts`,"test:index":`tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs`},main:`./dist-cjs/index.js`,types:`./dist-types/index.d.ts`,module:`./dist-es/index.js`,sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":`5.2.0`,"@aws-crypto/sha256-js":`5.2.0`,"@aws-sdk/core":`^3.974.22`,"@aws-sdk/credential-provider-node":`^3.972.57`,"@aws-sdk/signature-v4-multi-region":`^3.996.35`,"@aws-sdk/types":`^3.973.13`,"@smithy/core":`^3.24.6`,"@smithy/fetch-http-handler":`^5.4.6`,"@smithy/node-http-handler":`^4.7.6`,"@smithy/types":`^4.14.3`,tslib:`^2.6.2`},devDependencies:{"@smithy/snapshot-testing":`^2.1.7`,"@tsconfig/node20":`20.1.8`,"@types/node":`^20.14.8`,concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`,vitest:`^4.0.17`},engines:{node:`>=20.0.0`},typesVersions:{"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},files:[`dist-*/**`],author:{name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/sdk-for-javascript/`},license:`Apache-2.0`,browser:{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.browser`},"react-native":{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.native`},homepage:`https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts`,repository:{type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`clients/client-sts`}},j_=class e extends ir{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},M_=class e extends j_{name=`ExpiredTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},N_=class e extends j_{name=`MalformedPolicyDocumentException`;$fault=`client`;constructor(t){super({name:`MalformedPolicyDocumentException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},P_=class e extends j_{name=`PackedPolicyTooLargeException`;$fault=`client`;constructor(t){super({name:`PackedPolicyTooLargeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},F_=class e extends j_{name=`RegionDisabledException`;$fault=`client`;constructor(t){super({name:`RegionDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},I_=class e extends j_{name=`IDPRejectedClaimException`;$fault=`client`;constructor(t){super({name:`IDPRejectedClaimException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},L_=class e extends j_{name=`InvalidIdentityTokenException`;$fault=`client`;constructor(t){super({name:`InvalidIdentityTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},R_=class e extends j_{name=`IDPCommunicationErrorException`;$fault=`client`;$retryable={};constructor(t){super({name:`IDPCommunicationErrorException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},z_=class e extends j_{name=`InvalidAuthorizationMessageException`;$fault=`client`;constructor(t){super({name:`InvalidAuthorizationMessageException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},B_=class e extends j_{name=`ExpiredTradeInTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTradeInTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},V_=class e extends j_{name=`JWTPayloadSizeExceededException`;$fault=`client`;constructor(t){super({name:`JWTPayloadSizeExceededException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},H_=class e extends j_{name=`OutboundWebIdentityFederationDisabledException`;$fault=`client`;constructor(t){super({name:`OutboundWebIdentityFederationDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},U_=class e extends j_{name=`SessionDurationEscalationException`;$fault=`client`;constructor(t){super({name:`SessionDurationEscalationException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},W_=`Arn`,G_=`AccessKeyId`,K_=`Account`,q_=`Credentials`,J_=`DurationSeconds`,Y_=`Expiration`,X_=`ExpiredTokenException`,Z_=`ExpiredTradeInTokenException`,Q_=`GetCallerIdentity`,$_=`GetCallerIdentityRequest`,ev=`GetCallerIdentityResponse`,tv=`GetSessionToken`,nv=`GetSessionTokenRequest`,rv=`GetSessionTokenResponse`,iv=`InvalidAuthorizationMessageException`,av=`IDPCommunicationErrorException`,ov=`IDPRejectedClaimException`,sv=`InvalidIdentityTokenException`,cv=`JWTPayloadSizeExceededException`,lv=`MalformedPolicyDocumentException`,uv=`OutboundWebIdentityFederationDisabledException`,dv=`PackedPolicyTooLargeException`,fv=`RegionDisabledException`,pv=`SecretAccessKey`,mv=`SessionDurationEscalationException`,hv=`SerialNumber`,gv=`SessionToken`,_v=`TokenCode`,vv=`UserId`,yv=`accessKeySecretType`,bv=`awsQueryError`,xv=`client`,Sv=`error`,Cv=`httpError`,wv=`message`,Tv=`smithy.ts.sdk.synthetic.com.amazonaws.sts`,Ev=`com.amazonaws.sts`,Dv=un.for(Tv),Ov=[-3,Tv,`STSServiceException`,0,[],[]];Dv.registerError(Ov,j_);var kv=un.for(Ev),Av=[-3,Ev,X_,{[bv]:[`ExpiredTokenException`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Av,M_);var jv=[-3,Ev,Z_,{[bv]:[`ExpiredTradeInTokenException`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(jv,B_);var Mv=[-3,Ev,av,{[bv]:[`IDPCommunicationError`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Mv,R_);var Nv=[-3,Ev,ov,{[bv]:[`IDPRejectedClaim`,403],[Sv]:xv,[Cv]:403},[wv],[0]];kv.registerError(Nv,I_);var Pv=[-3,Ev,iv,{[bv]:[`InvalidAuthorizationMessageException`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Pv,z_);var Fv=[-3,Ev,sv,{[bv]:[`InvalidIdentityToken`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Fv,L_);var Iv=[-3,Ev,cv,{[bv]:[`JWTPayloadSizeExceededException`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Iv,V_);var Lv=[-3,Ev,lv,{[bv]:[`MalformedPolicyDocument`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(Lv,N_);var Rv=[-3,Ev,uv,{[bv]:[`OutboundWebIdentityFederationDisabledException`,403],[Sv]:xv,[Cv]:403},[wv],[0]];kv.registerError(Rv,H_);var zv=[-3,Ev,dv,{[bv]:[`PackedPolicyTooLarge`,400],[Sv]:xv,[Cv]:400},[wv],[0]];kv.registerError(zv,P_);var Bv=[-3,Ev,fv,{[bv]:[`RegionDisabledException`,403],[Sv]:xv,[Cv]:403},[wv],[0]];kv.registerError(Bv,F_);var Vv=[-3,Ev,mv,{[bv]:[`SessionDurationEscalationException`,403],[Sv]:xv,[Cv]:403},[wv],[0]];kv.registerError(Vv,U_);var Hv=[Dv,kv],Uv=[0,Ev,yv,8,0],Wv=[3,Ev,q_,0,[G_,pv,gv,Y_],[0,[()=>Uv,0],0,4],4],Gv=[3,Ev,$_,0,[],[]],Kv=[3,Ev,ev,0,[vv,K_,W_],[0,0,0]],qv=[3,Ev,nv,0,[J_,hv,_v],[1,0,0]],Jv=[3,Ev,rv,0,[q_],[[()=>Wv,0]]],Yv=[9,Ev,Q_,0,()=>Gv,()=>Kv],Xv=[9,Ev,tv,0,()=>qv,()=>Jv],Zv=e=>({apiVersion:`2011-06-15`,base64Decoder:e?.base64Decoder??Kr,base64Encoder:e?.base64Encoder??Jr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??x_,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??E_,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new sn},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new Xn},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new Qg}],logger:e?.logger??new Bn,protocol:e?.protocol??Gn,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sts`,errorTypeRegistries:Hv,xmlNamespace:`https://sts.amazonaws.com/doc/2011-06-15/`,version:`2011-06-15`,serviceTarget:`AWSSecurityTokenServiceV20110615`},serviceId:e?.serviceId??`STS`,signerConstructor:e?.signerConstructor??Fn,urlParser:e?.urlParser??Yn,utf8Decoder:e?.utf8Decoder??Gr,utf8Encoder:e?.utf8Encoder??qr}),Qv=e=>{let t=En(e),n=()=>t().then(Vn),r=Zv(e);return{...r,...e,runtime:`browser`,defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Yr,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(Error(`Credential is missing`))),defaultUserAgentProvider:e?.defaultUserAgentProvider??vn({serviceId:r.serviceId,clientVersion:A_.version}),maxAttempts:e?.maxAttempts??3,region:e?.region??Zn(`Region is missing`),requestHandler:Pn.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Rn),sha256:e?.sha256??ln,streamCollector:e?.streamCollector??rr,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(!1)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(!1))}},$v=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},ey=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),ty=(e,t)=>{let n=Object.assign(Jn(e),nr(e),on(e),$v(e));return t.forEach(e=>e.configure(n)),Object.assign(e,wn(n),ar(n),Un(n),ey(n))},ny=class extends On{config;constructor(...[e]){let t=Qv(e||{});super(t),this.initConfig=t;let n=ty(D_(Hn(xn(kn(zn(Mn(O_(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(pn(this.config)),this.middlewareStack.use(Sn(this.config)),this.middlewareStack.use(bn(this.config)),this.middlewareStack.use(jn(this.config)),this.middlewareStack.use(gn(this.config)),this.middlewareStack.use(Ln(this.config)),this.middlewareStack.use(In(this.config)),this.middlewareStack.use(_n(this.config,{httpAuthSchemeParametersProvider:S_,identityProviderConfigProvider:async e=>new or({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(cn(this.config))}destroy(){super.destroy()}},ry=class extends R.classBuilder().ep(k_).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`GetCallerIdentity`,{}).n(`STSClient`,`GetCallerIdentityCommand`).sc(Yv).build(){},iy=class extends R.classBuilder().ep(k_).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`GetSessionToken`,{}).n(`STSClient`,`GetSessionTokenCommand`).sc(Xv).build(){},ay=`ap-southeast-2`,oy=9999,sy=class extends Error{status;constructor(e,t,n){super(e),this.name=t,this.status=n}};function cy(e,t){let n=`<${t}>`,r=``,i=e.indexOf(n);if(i===-1)return null;let a=e.indexOf(r,i+n.length);return a===-1?null:e.slice(i+n.length,a)}async function ly({action:e,credentials:t,service:n=`spinifex`}){let r=window.location.protocol.replace(`:`,``),i=`Action=${e}`,a=new An({method:`POST`,protocol:r,hostname:`localhost`,port:oy,path:`/`,headers:{host:`localhost:${oy}`,"content-type":`application/x-www-form-urlencoded`},body:i}),o=await new dn({credentials:{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken},region:ay,service:n,sha256:ln}).sign(a),s={};for(let[e,t]of Object.entries(o.headers))typeof t==`string`&&(s[e]=t);let c=`${window.location.protocol}//${window.location.host}/proxy/awsgw/`,l=await fetch(c,{method:`POST`,headers:s,body:i});if(!l.ok){let t=await l.text().catch(()=>``),n=cy(t,`Code`),r=cy(t,`Message`)??t;throw new sy(`${e} failed: ${l.status}${r?` - ${r}`:``}`,n??`SignedFetchError`,l.status)}return await l.json()}var uy=`ap-southeast-2`,dy=`${window.location.protocol}//localhost:9999`,fy=43200;function py(e){e.middlewareStack.add(e=>async t=>(An.isInstance(t.request)&&(t.request.hostname=window.location.hostname,t.request.port=Number(window.location.port)||443,t.request.path=`/proxy/awsgw${t.request.path}`),await e(t)),{step:`finalizeRequest`,name:`proxyRewrite`,override:!0})}function my(e){let t=new ny({endpoint:dy,region:uy,credentials:e});return py(t),t}function hy(){let e=tr();if(!e)throw Error(`AWS credentials not configured`);return my({accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,sessionToken:e.sessionToken})}async function gy(e){let t=(await my(e).send(new iy({DurationSeconds:fy}))).Credentials;if(!t?.AccessKeyId||!t.SecretAccessKey||!t.SessionToken||!t.Expiration)throw Error(`GetSessionToken returned incomplete credentials`);return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.SessionToken,expiration:t.Expiration.toISOString()}}var _y=`000000000001`;function vy(e){let t=e?.indexOf(`:user/`)??-1;return t===-1||e===void 0?null:e.slice(t+6)||null}var yy=(0,W.createContext)(void 0);function by({children:e}){let[t,n]=(0,W.useState)({isAdmin:!1,accountId:null,userName:null,version:null,license:null,loading:!0});return(0,W.useEffect)(()=>{async function e(){let e=tr();if(!e){n(e=>({...e,loading:!1}));return}try{let t=await hy().send(new ry({})),r=t.Account??null,i=r===_y,a=null;if(i)try{a=await ly({action:`GetVersion`,credentials:e})}catch{}n({isAdmin:i,accountId:r,userName:vy(t.Arn),version:a,license:a?.license??null,loading:!1})}catch{n(e=>({...e,loading:!1}))}}e()},[]),(0,G.jsx)(yy,{value:t,children:e})}function xy(){let e=(0,W.useContext)(yy);if(e===void 0)throw Error(`useAdmin must be used within an AdminProvider`);return e}var Sy=new Set([`InvalidClientTokenId`,`SignatureDoesNotMatch`,`AuthFailure`,`MissingAuthenticationToken`,`IncompleteSignature`,`UnrecognizedClientException`,`ExpiredToken`,`ExpiredTokenException`,`InvalidAccessKeyId`]);function Cy(e){if(typeof e!=`object`||!e||!(`name`in e))return!1;let{name:t}=e;return typeof t==`string`&&Sy.has(t)}var wy=class extends R.classBuilder().ep(Bt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`CertificateManager`,`ListCertificates`,{}).n(`ACMClient`,`ListCertificatesCommand`).sc(ft).build(){},Ty=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeAddresses`,{}).n(`EC2Client`,`DescribeAddressesCommand`).sc(it).build(){},Ey=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeAvailabilityZones`,{}).n(`EC2Client`,`DescribeAvailabilityZonesCommand`).sc(Ht).build(){},Dy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeIamInstanceProfileAssociations`,{}).n(`EC2Client`,`DescribeIamInstanceProfileAssociationsCommand`).sc(Jt).build(){},Oy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeImages`,{}).n(`EC2Client`,`DescribeImagesCommand`).sc(st).build(){},ky=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstances`,{}).n(`EC2Client`,`DescribeInstancesCommand`).sc(He).build(){},Ay=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstanceTypes`,{}).n(`EC2Client`,`DescribeInstanceTypesCommand`).sc(Kt).build(){},jy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInternetGateways`,{}).n(`EC2Client`,`DescribeInternetGatewaysCommand`).sc(ye).build(){},My=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeKeyPairs`,{}).n(`EC2Client`,`DescribeKeyPairsCommand`).sc(Wt).build(){},Ny=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeNatGateways`,{}).n(`EC2Client`,`DescribeNatGatewaysCommand`).sc(We).build(){},Py=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribePlacementGroups`,{}).n(`EC2Client`,`DescribePlacementGroupsCommand`).sc(xe).build(){},Fy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeRegions`,{}).n(`EC2Client`,`DescribeRegionsCommand`).sc(be).build(){},Iy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeRouteTables`,{}).n(`EC2Client`,`DescribeRouteTablesCommand`).sc(Fe).build(){},Ly=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSecurityGroups`,{}).n(`EC2Client`,`DescribeSecurityGroupsCommand`).sc(wt).build(){},Ry=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSnapshots`,{}).n(`EC2Client`,`DescribeSnapshotsCommand`).sc(ve).build(){},zy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSubnets`,{}).n(`EC2Client`,`DescribeSubnetsCommand`).sc(xt).build(){},By=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVolumes`,{}).n(`EC2Client`,`DescribeVolumesCommand`).sc(Me).build(){},Vy=class extends R.classBuilder().ep(Le).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVpcs`,{}).n(`EC2Client`,`DescribeVpcsCommand`).sc(Ne).build(){},Hy=class extends R.classBuilder().ep(ze).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DescribeImages`,{}).n(`ECRClient`,`DescribeImagesCommand`).sc(Pe).build(){},Uy=class extends R.classBuilder().ep(ze).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`DescribeRepositories`,{}).n(`ECRClient`,`DescribeRepositoriesCommand`).sc(Ct).build(){},Wy=class extends R.classBuilder().ep(ze).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`GetLifecyclePolicy`,{}).n(`ECRClient`,`GetLifecyclePolicyCommand`).sc(_e).build(){},Gy=class extends R.classBuilder().ep(ze).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerRegistry_V20150921`,`GetRepositoryPolicy`,{}).n(`ECRClient`,`GetRepositoryPolicyCommand`).sc(je).build(){},Ky=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeClusters`,{}).n(`ECSClient`,`DescribeClustersCommand`).sc(ut).build(){},qy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeContainerInstances`,{}).n(`ECSClient`,`DescribeContainerInstancesCommand`).sc(Et).build(){},Jy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeServices`,{}).n(`ECSClient`,`DescribeServicesCommand`).sc(Vt).build(){},Yy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeTaskDefinition`,{}).n(`ECSClient`,`DescribeTaskDefinitionCommand`).sc(dt).build(){},Xy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`DescribeTasks`,{}).n(`ECSClient`,`DescribeTasksCommand`).sc(mt).build(){},Zy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListClusters`,{}).n(`ECSClient`,`ListClustersCommand`).sc(Mt).build(){},Qy=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListContainerInstances`,{}).n(`ECSClient`,`ListContainerInstancesCommand`).sc(Dt).build(){},$y=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListServices`,{}).n(`ECSClient`,`ListServicesCommand`).sc(vt).build(){},eb=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListTaskDefinitions`,{}).n(`ECSClient`,`ListTaskDefinitionsCommand`).sc(gt).build(){},tb=class extends R.classBuilder().ep(Ve).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2ContainerServiceV20141113`,`ListTasks`,{}).n(`ECSClient`,`ListTasksCommand`).sc(rt).build(){},nb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAccessEntry`,{}).n(`EKSClient`,`DescribeAccessEntryCommand`).sc(qe).build(){},rb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAddon`,{}).n(`EKSClient`,`DescribeAddonCommand`).sc(Te).build(){},ib=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAddonVersions`,{}).n(`EKSClient`,`DescribeAddonVersionsCommand`).sc(Ke).build(){},ab=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeCluster`,{}).n(`EKSClient`,`DescribeClusterCommand`).sc(Ye).build(){},ob=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeNodegroup`,{}).n(`EKSClient`,`DescribeNodegroupCommand`).sc(Ce).build(){},sb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAccessEntries`,{}).n(`EKSClient`,`ListAccessEntriesCommand`).sc(Pt).build(){},cb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAccessPolicies`,{}).n(`EKSClient`,`ListAccessPoliciesCommand`).sc(Oe).build(){},lb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAddons`,{}).n(`EKSClient`,`ListAddonsCommand`).sc($e).build(){},ub=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAssociatedAccessPolicies`,{}).n(`EKSClient`,`ListAssociatedAccessPoliciesCommand`).sc(Ze).build(){},db=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListClusters`,{}).n(`EKSClient`,`ListClustersCommand`).sc(tt).build(){},fb=class extends R.classBuilder().ep(At).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListNodegroups`,{}).n(`EKSClient`,`ListNodegroupsCommand`).sc(Re).build(){},pb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeListeners`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeListenersCommand`).sc(Ot).build(){},mb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeLoadBalancerAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeLoadBalancerAttributesCommand`).sc(yt).build(){},hb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeLoadBalancers`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeLoadBalancersCommand`).sc(_t).build(){},gb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeRules`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeRulesCommand`).sc(at).build(){},_b=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeSSLPolicies`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeSSLPoliciesCommand`).sc(Ut).build(){},vb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTags`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTagsCommand`).sc(Yt).build(){},yb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetGroupAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetGroupAttributesCommand`).sc(ct).build(){},bb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetGroups`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetGroupsCommand`).sc(qt).build(){},xb=class extends R.classBuilder().ep(St).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetHealth`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetHealthCommand`).sc(Ue).build(){},Sb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetInstanceProfile`,{}).n(`IAMClient`,`GetInstanceProfileCommand`).sc(we).build(){},Cb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicy`,{}).n(`IAMClient`,`GetPolicyCommand`).sc(Ge).build(){},wb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicyVersion`,{}).n(`IAMClient`,`GetPolicyVersionCommand`).sc(Je).build(){},Tb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetRole`,{}).n(`IAMClient`,`GetRoleCommand`).sc(Se).build(){},Eb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetUser`,{}).n(`IAMClient`,`GetUserCommand`).sc(ke).build(){},Db=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAccessKeys`,{}).n(`IAMClient`,`ListAccessKeysCommand`).sc(Nt).build(){},Ob=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAttachedRolePolicies`,{}).n(`IAMClient`,`ListAttachedRolePoliciesCommand`).sc(De).build(){},kb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAttachedUserPolicies`,{}).n(`IAMClient`,`ListAttachedUserPoliciesCommand`).sc(Qe).build(){},Ab=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListInstanceProfiles`,{}).n(`IAMClient`,`ListInstanceProfilesCommand`).sc(Xe).build(){},jb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListInstanceProfilesForRole`,{}).n(`IAMClient`,`ListInstanceProfilesForRoleCommand`).sc(et).build(){},Mb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListPolicies`,{}).n(`IAMClient`,`ListPoliciesCommand`).sc(Ie).build(){},Nb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListRoles`,{}).n(`IAMClient`,`ListRolesCommand`).sc(ge).build(){},Pb=class extends R.classBuilder().ep(Lt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListUsers`,{}).n(`IAMClient`,`ListUsersCommand`).sc(pt).build(){},Fb=class extends R.classBuilder().ep(Gt).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions()),Be(n)]}).s(`AmazonS3`,`ListBuckets`,{}).n(`S3Client`,`ListBucketsCommand`).sc(ht).build(){},Ib=class extends R.classBuilder().ep({...Gt,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[B(n,e.getEndpointParameterInstructions()),Be(n)]}).s(`AmazonS3`,`ListObjectsV2`,{}).n(`S3Client`,`ListObjectsV2Command`).sc(nt).build(){},Lb=!1;function Rb(e,t){Lb||!Cy(e)||(Lb=!0,$n(),zt(),t.clear(),window.location.pathname!==`/login`&&(window.location.href=`/login?reason=expired`))}function zb(){let e=new Xi({queryCache:new Yi({onError:t=>Rb(t,e)}),mutationCache:new qi({onError:t=>Rb(t,e)}),defaultOptions:{queries:{staleTime:5e3,refetchIntervalInBackground:!1}}});return e}function Bb(){let e=(0,Ls.c)(8),{theme:t,setTheme:n}=Vs(),r;e[0]!==n||e[1]!==t?(r=()=>{n(t===`light`?`dark`:t===`dark`?`light`:`dark`)},e[0]=n,e[1]=t,e[2]=r):r=e[2];let i=r,a,o,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,G.jsx)(wc,{className:`size-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90`}),o=(0,G.jsx)(hc,{className:`absolute size-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0`}),s=(0,G.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`}),e[3]=a,e[4]=o,e[5]=s):(a=e[3],o=e[4],s=e[5]);let c;return e[6]===i?c=e[7]:(c=(0,G.jsxs)(wr,{className:`rounded-full`,onClick:i,size:`icon-sm`,variant:`ghost`,children:[a,o,s]}),e[6]=i,e[7]=c),c}function Vb(){let e=(0,Ls.c)(7),{isAdmin:t,license:n}=xy(),r=t&&n===`open-source`,i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=Cn(`z-50 flex h-10 shrink-0 items-center gap-2 border-b border-sidebar-border bg-sidebar px-4 text-sidebar-foreground`,`sticky top-0`),a=(0,G.jsx)(Bg,{className:`-ml-1`}),e[0]=i,e[1]=a):(i=e[0],a=e[1]);let o;e[2]===r?o=e[3]:(o=r&&(0,G.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:Cn(br({variant:`outline`,size:`sm`})),children:`Upgrade`}),e[2]=r,e[3]=o);let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,G.jsx)(Bb,{}),e[4]=s):s=e[4];let c;return e[5]===o?c=e[6]:(c=(0,G.jsxs)(`header`,{className:i,children:[a,(0,G.jsxs)(`div`,{className:`flex w-full items-center justify-end gap-2`,children:[o,s]})]}),e[5]=o,e[6]=c),c}function Hb(){let e=(0,Ls.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,G.jsx)(`h1`,{className:`text-4xl font-bold`,children:`404`}),n=(0,G.jsx)(`p`,{className:`text-muted-foreground`,children:`Page not found`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-4`,children:[t,n,(0,G.jsx)(L,{to:`/`,children:(0,G.jsx)(wr,{variant:`outline`,children:`Go back home`})})]}),e[2]=r):r=e[2],r}function Ub(){let e=(0,Ls.c)(210),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:Wb},e[0]=t):t=e[0];let n=Ds(t),r=es(),i=Qi(),{isAdmin:a}=xy(),o;e[1]!==r||e[2]!==i?(o=function(){$n(),zt(),i.clear(),r({to:`/login`})},e[1]=r,e[2]=i,e[3]=o):o=e[3];let s=o,c;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsxs)(Hg,{className:`flex flex-row items-center gap-2 px-4 py-3`,children:[(0,G.jsx)(`img`,{src:`/mulga-logo.svg`,alt:`Mulga`,className:`size-6 shrink-0 dark:invert`}),(0,G.jsx)(`span`,{className:`truncate text-sm font-semibold group-data-[collapsible=icon]:hidden`,children:`Spinifex`})]}),e[4]=c):c=e[4];let l;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,G.jsx)(qg,{children:`General`}),e[5]=l):l=e[5];let u=n===`/`,d,f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,G.jsx)(sc,{className:`size-4`}),f=(0,G.jsx)(`span`,{children:`Dashboard`}),e[6]=d,e[7]=f):(d=e[6],f=e[7]);let p;e[8]===u?p=e[9]:(p=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/`,children:(0,G.jsxs)(Zg,{isActive:u,tooltip:`Dashboard`,children:[d,f]})})}),e[8]=u,e[9]=p);let m;e[10]!==a||e[11]!==n?(m=a&&(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/nodes`,children:(0,G.jsxs)(Zg,{isActive:n.startsWith(`/nodes`),tooltip:`Nodes`,children:[(0,G.jsx)(xc,{className:`size-4`}),(0,G.jsx)(`span`,{children:`Nodes`})]})})}),e[10]=a,e[11]=n,e[12]=m):m=e[12];let h;e[13]!==p||e[14]!==m?(h=(0,G.jsxs)(Kg,{children:[l,(0,G.jsxs)(Jg,{children:[p,m]})]}),e[13]=p,e[14]=m,e[15]=h):h=e[15];let g;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,G.jsx)(qg,{children:`EC2`}),e[16]=g):g=e[16];let _;e[17]===n?_=e[18]:(_=n.startsWith(`/ec2/describe-instances`)||n.startsWith(`/ec2/run-instances`),e[17]=n,e[18]=_);let v,y;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,G.jsx)(xc,{className:`size-4`}),y=(0,G.jsx)(`span`,{children:`Instances`}),e[19]=v,e[20]=y):(v=e[19],y=e[20]);let b;e[21]===_?b=e[22]:(b=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-instances`,children:(0,G.jsxs)(Zg,{isActive:_,tooltip:`Instances`,children:[v,y]})})}),e[21]=_,e[22]=b);let x;e[23]===n?x=e[24]:(x=n.startsWith(`/ec2/describe-images`),e[23]=n,e[24]=x);let S,C;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,G.jsx)(lc,{className:`size-4`}),C=(0,G.jsx)(`span`,{children:`Images`}),e[25]=S,e[26]=C):(S=e[25],C=e[26]);let w;e[27]===x?w=e[28]:(w=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-images`,children:(0,G.jsxs)(Zg,{isActive:x,tooltip:`Images`,children:[S,C]})})}),e[27]=x,e[28]=w);let T;e[29]===n?T=e[30]:(T=n.startsWith(`/ec2/describe-key-pairs`),e[29]=n,e[30]=T);let E,D;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,G.jsx)(uc,{className:`size-4`}),D=(0,G.jsx)(`span`,{children:`Key Pairs`}),e[31]=E,e[32]=D):(E=e[31],D=e[32]);let O;e[33]===T?O=e[34]:(O=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-key-pairs`,children:(0,G.jsxs)(Zg,{isActive:T,tooltip:`Key Pairs`,children:[E,D]})})}),e[33]=T,e[34]=O);let k;e[35]===n?k=e[36]:(k=n.startsWith(`/ec2/describe-addresses`)||n.startsWith(`/ec2/allocate-address`),e[35]=n,e[36]=k);let A,j;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,G.jsx)(mc,{className:`size-4`}),j=(0,G.jsx)(`span`,{children:`Elastic IPs`}),e[37]=A,e[38]=j):(A=e[37],j=e[38]);let M;e[39]===k?M=e[40]:(M=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-addresses`,children:(0,G.jsxs)(Zg,{isActive:k,tooltip:`Elastic IPs`,children:[A,j]})})}),e[39]=k,e[40]=M);let ee;e[41]===n?ee=e[42]:(ee=n.startsWith(`/ec2/describe-volumes`)||n.startsWith(`/ec2/create-volume`)||n.startsWith(`/ec2/modify-volume`),e[41]=n,e[42]=ee);let N,P;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,G.jsx)(oc,{className:`size-4`}),P=(0,G.jsx)(`span`,{children:`Volumes`}),e[43]=N,e[44]=P):(N=e[43],P=e[44]);let te;e[45]===ee?te=e[46]:(te=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-volumes`,children:(0,G.jsxs)(Zg,{isActive:ee,tooltip:`Volumes`,children:[N,P]})})}),e[45]=ee,e[46]=te);let ne;e[47]===n?ne=e[48]:(ne=n.startsWith(`/ec2/describe-snapshots`)||n.startsWith(`/ec2/create-snapshot`),e[47]=n,e[48]=ne);let re,ie;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,G.jsx)(tc,{className:`size-4`}),ie=(0,G.jsx)(`span`,{children:`Snapshots`}),e[49]=re,e[50]=ie):(re=e[49],ie=e[50]);let ae;e[51]===ne?ae=e[52]:(ae=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-snapshots`,children:(0,G.jsxs)(Zg,{isActive:ne,tooltip:`Snapshots`,children:[re,ie]})})}),e[51]=ne,e[52]=ae);let F;e[53]===n?F=e[54]:(F=n.startsWith(`/ec2/describe-placement-groups`)||n.startsWith(`/ec2/create-placement-group`),e[53]=n,e[54]=F);let oe,se;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,G.jsx)(dc,{className:`size-4`}),se=(0,G.jsx)(`span`,{children:`Placement Groups`}),e[55]=oe,e[56]=se):(oe=e[55],se=e[56]);let I;e[57]===F?I=e[58]:(I=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-placement-groups`,children:(0,G.jsxs)(Zg,{isActive:F,tooltip:`Placement Groups`,children:[oe,se]})})}),e[57]=F,e[58]=I);let ce;e[59]===n?ce=e[60]:(ce=n.startsWith(`/ec2/describe-load-balancers`)||n.startsWith(`/ec2/create-load-balancer`),e[59]=n,e[60]=ce);let le,ue;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,G.jsx)(Dc,{className:`size-4`}),ue=(0,G.jsx)(`span`,{children:`Load Balancers`}),e[61]=le,e[62]=ue):(le=e[61],ue=e[62]);let de;e[63]===ce?de=e[64]:(de=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-load-balancers`,children:(0,G.jsxs)(Zg,{isActive:ce,tooltip:`Load Balancers`,children:[le,ue]})})}),e[63]=ce,e[64]=de);let fe;e[65]===n?fe=e[66]:(fe=n.startsWith(`/ec2/describe-target-groups`)||n.startsWith(`/ec2/create-target-group`),e[65]=n,e[66]=fe);let pe,me;e[67]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,G.jsx)(ic,{className:`size-4`}),me=(0,G.jsx)(`span`,{children:`Target Groups`}),e[67]=pe,e[68]=me):(pe=e[67],me=e[68]);let he;e[69]===fe?he=e[70]:(he=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-target-groups`,children:(0,G.jsxs)(Zg,{isActive:fe,tooltip:`Target Groups`,children:[pe,me]})})}),e[69]=fe,e[70]=he);let ge;e[71]!==b||e[72]!==w||e[73]!==O||e[74]!==M||e[75]!==te||e[76]!==ae||e[77]!==I||e[78]!==de||e[79]!==he?(ge=(0,G.jsxs)(Kg,{children:[g,(0,G.jsxs)(Jg,{children:[b,w,O,M,te,ae,I,de,he]})]}),e[71]=b,e[72]=w,e[73]=O,e[74]=M,e[75]=te,e[76]=ae,e[77]=I,e[78]=de,e[79]=he,e[80]=ge):ge=e[80];let _e;e[81]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,G.jsx)(qg,{children:`Networking`}),e[81]=_e):_e=e[81];let ve;e[82]===n?ve=e[83]:(ve=n.startsWith(`/ec2/describe-vpcs`)||n.startsWith(`/ec2/create-vpc`),e[82]=n,e[83]=ve);let ye,be;e[84]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,G.jsx)(gc,{className:`size-4`}),be=(0,G.jsx)(`span`,{children:`VPCs`}),e[84]=ye,e[85]=be):(ye=e[84],be=e[85]);let xe;e[86]===ve?xe=e[87]:(xe=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-vpcs`,children:(0,G.jsxs)(Zg,{isActive:ve,tooltip:`VPCs`,children:[ye,be]})})}),e[86]=ve,e[87]=xe);let Se;e[88]===n?Se=e[89]:(Se=n.startsWith(`/ec2/describe-subnets`)||n.startsWith(`/ec2/create-subnet`),e[88]=n,e[89]=Se);let Ce,we;e[90]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,G.jsx)(fc,{className:`size-4`}),we=(0,G.jsx)(`span`,{children:`Subnets`}),e[90]=Ce,e[91]=we):(Ce=e[90],we=e[91]);let Te;e[92]===Se?Te=e[93]:(Te=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-subnets`,children:(0,G.jsxs)(Zg,{isActive:Se,tooltip:`Subnets`,children:[Ce,we]})})}),e[92]=Se,e[93]=Te);let Ee;e[94]===n?Ee=e[95]:(Ee=n.startsWith(`/ec2/describe-security-groups`)||n.startsWith(`/ec2/create-security-group`),e[94]=n,e[95]=Ee);let De,Oe;e[96]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,G.jsx)(Sc,{className:`size-4`}),Oe=(0,G.jsx)(`span`,{children:`Security Groups`}),e[96]=De,e[97]=Oe):(De=e[96],Oe=e[97]);let ke;e[98]===Ee?ke=e[99]:(ke=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-security-groups`,children:(0,G.jsxs)(Zg,{isActive:Ee,tooltip:`Security Groups`,children:[De,Oe]})})}),e[98]=Ee,e[99]=ke);let Ae;e[100]===n?Ae=e[101]:(Ae=n.startsWith(`/ec2/describe-route-tables`)||n.startsWith(`/ec2/create-route-table`),e[100]=n,e[101]=Ae);let je,Me;e[102]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,G.jsx)(yc,{className:`size-4`}),Me=(0,G.jsx)(`span`,{children:`Route Tables`}),e[102]=je,e[103]=Me):(je=e[102],Me=e[103]);let Ne;e[104]===Ae?Ne=e[105]:(Ne=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-route-tables`,children:(0,G.jsxs)(Zg,{isActive:Ae,tooltip:`Route Tables`,children:[je,Me]})})}),e[104]=Ae,e[105]=Ne);let Pe;e[106]===n?Pe=e[107]:(Pe=n.startsWith(`/ec2/describe-internet-gateways`),e[106]=n,e[107]=Pe);let Fe,Ie;e[108]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,G.jsx)(ac,{className:`size-4`}),Ie=(0,G.jsx)(`span`,{children:`Internet Gateways`}),e[108]=Fe,e[109]=Ie):(Fe=e[108],Ie=e[109]);let Le;e[110]===Pe?Le=e[111]:(Le=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-internet-gateways`,children:(0,G.jsxs)(Zg,{isActive:Pe,tooltip:`Internet Gateways`,children:[Fe,Ie]})})}),e[110]=Pe,e[111]=Le);let Re;e[112]===n?Re=e[113]:(Re=n.startsWith(`/ec2/describe-nat-gateways`)||n.startsWith(`/ec2/create-nat-gateway`),e[112]=n,e[113]=Re);let ze,Be;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,G.jsx)(bc,{className:`size-4`}),Be=(0,G.jsx)(`span`,{children:`NAT Gateways`}),e[114]=ze,e[115]=Be):(ze=e[114],Be=e[115]);let Ve;e[116]===Re?Ve=e[117]:(Ve=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ec2/describe-nat-gateways`,children:(0,G.jsxs)(Zg,{isActive:Re,tooltip:`NAT Gateways`,children:[ze,Be]})})}),e[116]=Re,e[117]=Ve);let He;e[118]!==xe||e[119]!==Te||e[120]!==ke||e[121]!==Ne||e[122]!==Le||e[123]!==Ve?(He=(0,G.jsxs)(Kg,{children:[_e,(0,G.jsxs)(Jg,{children:[xe,Te,ke,Ne,Le,Ve]})]}),e[118]=xe,e[119]=Te,e[120]=ke,e[121]=Ne,e[122]=Le,e[123]=Ve,e[124]=He):He=e[124];let Ue;e[125]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,G.jsx)(qg,{children:`Containers`}),e[125]=Ue):Ue=e[125];let We;e[126]===n?We=e[127]:(We=n.startsWith(`/eks/list-clusters`)||n.startsWith(`/eks/create-cluster`),e[126]=n,e[127]=We);let Ge,Ke;e[128]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,G.jsx)(ec,{className:`size-4`}),Ke=(0,G.jsx)(`span`,{children:`EKS`}),e[128]=Ge,e[129]=Ke):(Ge=e[128],Ke=e[129]);let qe;e[130]===We?qe=e[131]:(qe=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/eks/list-clusters`,children:(0,G.jsxs)(Zg,{isActive:We,tooltip:`EKS clusters`,children:[Ge,Ke]})})}),e[130]=We,e[131]=qe);let Je;e[132]===n?Je=e[133]:(Je=n.startsWith(`/ecr/list-repositories`),e[132]=n,e[133]=Je);let Ye,Xe;e[134]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=(0,G.jsx)(_c,{className:`size-4`}),Xe=(0,G.jsx)(`span`,{children:`ECR`}),e[134]=Ye,e[135]=Xe):(Ye=e[134],Xe=e[135]);let Ze;e[136]===Je?Ze=e[137]:(Ze=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ecr/list-repositories`,children:(0,G.jsxs)(Zg,{isActive:Je,tooltip:`ECR repositories`,children:[Ye,Xe]})})}),e[136]=Je,e[137]=Ze);let Qe;e[138]===n?Qe=e[139]:(Qe=n.startsWith(`/ecs/`),e[138]=n,e[139]=Qe);let $e,et;e[140]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,G.jsx)(rc,{className:`size-4`}),et=(0,G.jsx)(`span`,{children:`ECS`}),e[140]=$e,e[141]=et):($e=e[140],et=e[141]);let tt;e[142]===Qe?tt=e[143]:(tt=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/ecs/list-clusters`,children:(0,G.jsxs)(Zg,{isActive:Qe,tooltip:`ECS clusters`,children:[$e,et]})})}),e[142]=Qe,e[143]=tt);let nt;e[144]!==qe||e[145]!==Ze||e[146]!==tt?(nt=(0,G.jsxs)(Kg,{children:[Ue,(0,G.jsxs)(Jg,{children:[qe,Ze,tt]})]}),e[144]=qe,e[145]=Ze,e[146]=tt,e[147]=nt):nt=e[147];let rt;e[148]===Symbol.for(`react.memo_cache_sentinel`)?(rt=(0,G.jsx)(qg,{children:`IAM`}),e[148]=rt):rt=e[148];let it;e[149]===n?it=e[150]:(it=n.startsWith(`/iam/list-users`)||n.startsWith(`/iam/create-user`),e[149]=n,e[150]=it);let at,ot;e[151]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,G.jsx)(Ec,{className:`size-4`}),ot=(0,G.jsx)(`span`,{children:`Users`}),e[151]=at,e[152]=ot):(at=e[151],ot=e[152]);let st;e[153]===it?st=e[154]:(st=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/iam/list-users`,children:(0,G.jsxs)(Zg,{isActive:it,tooltip:`Users`,children:[at,ot]})})}),e[153]=it,e[154]=st);let ct;e[155]===n?ct=e[156]:(ct=n.startsWith(`/iam/list-policies`)||n.startsWith(`/iam/create-policy`),e[155]=n,e[156]=ct);let lt,ut;e[157]===Symbol.for(`react.memo_cache_sentinel`)?(lt=(0,G.jsx)(Cc,{className:`size-4`}),ut=(0,G.jsx)(`span`,{children:`Policies`}),e[157]=lt,e[158]=ut):(lt=e[157],ut=e[158]);let dt;e[159]===ct?dt=e[160]:(dt=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/iam/list-policies`,children:(0,G.jsxs)(Zg,{isActive:ct,tooltip:`Policies`,children:[lt,ut]})})}),e[159]=ct,e[160]=dt);let ft;e[161]===n?ft=e[162]:(ft=n.startsWith(`/iam/list-roles`)||n.startsWith(`/iam/create-role`),e[161]=n,e[162]=ft);let pt,mt;e[163]===Symbol.for(`react.memo_cache_sentinel`)?(pt=(0,G.jsx)(Tc,{className:`size-4`}),mt=(0,G.jsx)(`span`,{children:`Roles`}),e[163]=pt,e[164]=mt):(pt=e[163],mt=e[164]);let ht;e[165]===ft?ht=e[166]:(ht=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/iam/list-roles`,children:(0,G.jsxs)(Zg,{isActive:ft,tooltip:`Roles`,children:[pt,mt]})})}),e[165]=ft,e[166]=ht);let gt;e[167]===n?gt=e[168]:(gt=n.startsWith(`/iam/list-instance-profiles`)||n.startsWith(`/iam/create-instance-profile`),e[167]=n,e[168]=gt);let _t,vt;e[169]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,G.jsx)(cc,{className:`size-4`}),vt=(0,G.jsx)(`span`,{children:`Instance Profiles`}),e[169]=_t,e[170]=vt):(_t=e[169],vt=e[170]);let yt;e[171]===gt?yt=e[172]:(yt=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/iam/list-instance-profiles`,children:(0,G.jsxs)(Zg,{isActive:gt,tooltip:`Instance Profiles`,children:[_t,vt]})})}),e[171]=gt,e[172]=yt);let bt;e[173]!==ht||e[174]!==yt||e[175]!==st||e[176]!==dt?(bt=(0,G.jsxs)(Kg,{children:[rt,(0,G.jsxs)(Jg,{children:[st,dt,ht,yt]})]}),e[173]=ht,e[174]=yt,e[175]=st,e[176]=dt,e[177]=bt):bt=e[177];let xt;e[178]===Symbol.for(`react.memo_cache_sentinel`)?(xt=(0,G.jsx)(qg,{children:`S3`}),e[178]=xt):xt=e[178];let St;e[179]===n?St=e[180]:(St=n.startsWith(`/s3/ls`),e[179]=n,e[180]=St);let Ct,wt;e[181]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=(0,G.jsx)(xc,{className:`size-4`}),wt=(0,G.jsx)(`span`,{children:`Buckets`}),e[181]=Ct,e[182]=wt):(Ct=e[181],wt=e[182]);let Tt;e[183]===St?Tt=e[184]:(Tt=(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/s3/ls`,children:(0,G.jsxs)(Zg,{isActive:St,tooltip:`Buckets`,children:[Ct,wt]})})}),e[183]=St,e[184]=Tt);let Et;e[185]!==a||e[186]!==n?(Et=a&&(0,G.jsx)(Yg,{children:(0,G.jsx)(L,{to:`/s3/service-metrics`,children:(0,G.jsxs)(Zg,{isActive:n.startsWith(`/s3/service-metrics`),tooltip:`Service Metrics`,children:[(0,G.jsx)(Qs,{className:`size-4`}),(0,G.jsx)(`span`,{children:`Service Metrics`})]})})}),e[185]=a,e[186]=n,e[187]=Et):Et=e[187];let Dt;e[188]!==Tt||e[189]!==Et?(Dt=(0,G.jsxs)(Kg,{children:[xt,(0,G.jsxs)(Jg,{children:[Tt,Et]})]}),e[188]=Tt,e[189]=Et,e[190]=Dt):Dt=e[190];let Ot;e[191]===a?Ot=e[192]:(Ot=a&&(0,G.jsxs)(Kg,{children:[(0,G.jsx)(qg,{children:`Documentation`}),(0,G.jsx)(Jg,{children:(0,G.jsx)(Yg,{children:(0,G.jsx)(`a`,{href:`https://docs.mulgadc.com`,target:`_blank`,rel:`noopener noreferrer`,children:(0,G.jsxs)(Zg,{tooltip:`Documentation`,children:[(0,G.jsx)($s,{className:`size-4`}),(0,G.jsx)(`span`,{children:`Docs`})]})})})})]}),e[191]=a,e[192]=Ot);let kt;e[193]!==bt||e[194]!==Dt||e[195]!==Ot||e[196]!==ge||e[197]!==He||e[198]!==nt||e[199]!==h?(kt=(0,G.jsxs)(Gg,{children:[h,ge,He,nt,bt,Dt,Ot]}),e[193]=bt,e[194]=Dt,e[195]=Ot,e[196]=ge,e[197]=He,e[198]=nt,e[199]=h,e[200]=kt):kt=e[200];let At;e[201]===Symbol.for(`react.memo_cache_sentinel`)?(At=(0,G.jsx)(Wg,{className:`mx-0 w-full`}),e[201]=At):At=e[201];let jt,Mt;e[202]===Symbol.for(`react.memo_cache_sentinel`)?(jt=(0,G.jsx)(pc,{className:`size-4`}),Mt=(0,G.jsx)(`span`,{children:`Sign out`}),e[202]=jt,e[203]=Mt):(jt=e[202],Mt=e[203]);let Nt;e[204]===s?Nt=e[205]:(Nt=(0,G.jsxs)(Ug,{children:[At,(0,G.jsx)(Jg,{children:(0,G.jsx)(Yg,{children:(0,G.jsxs)(Zg,{onClick:s,tooltip:`Sign out`,children:[jt,Mt]})})})]}),e[204]=s,e[205]=Nt);let Pt;e[206]===Symbol.for(`react.memo_cache_sentinel`)?(Pt=(0,G.jsx)(Vg,{}),e[206]=Pt):Pt=e[206];let Ft;return e[207]!==kt||e[208]!==Nt?(Ft=(0,G.jsxs)(zg,{collapsible:`icon`,children:[c,kt,Nt,Pt]}),e[207]=kt,e[208]=Nt,e[209]=Ft):Ft=e[209],Ft}function Wb(e){return e.pathname}function Gb(e){let t=(0,Ls.c)(18),{error:n,reset:r}=e,i=M(),a=Qi(),o;t[0]!==a||t[1]!==r||t[2]!==i?(o=function(){a.invalidateQueries(),r(),i.invalidate()},t[0]=a,t[1]=r,t[2]=i,t[3]=o):o=t[3];let s=o,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(Ub,{}),t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,G.jsx)(Vb,{}),t[5]=l):l=t[5];let u,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,G.jsx)(`div`,{className:`flex justify-center`,children:(0,G.jsx)(nc,{className:`size-12 text-destructive`})}),d=(0,G.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Something went wrong`}),t[6]=u,t[7]=d):(u=t[6],d=t[7]);let f=n.message||`An unexpected error occurred`,p;t[8]===f?p=t[9]:(p=(0,G.jsx)(`p`,{className:`text-muted-foreground`,children:f}),t[8]=f,t[9]=p);let m;t[10]===s?m=t[11]:(m=(0,G.jsx)(wr,{onClick:s,variant:`default`,children:`Try Again`}),t[10]=s,t[11]=m);let h;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,G.jsx)(L,{to:`/`,children:(0,G.jsx)(wr,{variant:`outline`,children:`Go Home`})}),t[12]=h):h=t[12];let g;t[13]===m?g=t[14]:(g=(0,G.jsxs)(`div`,{className:`flex justify-center gap-2`,children:[m,h]}),t[13]=m,t[14]=g);let _;return t[15]!==g||t[16]!==p?(_=(0,G.jsxs)(G.Fragment,{children:[c,(0,G.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[l,(0,G.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 pt-0`,children:(0,G.jsxs)(`div`,{className:`max-w-md space-y-4 text-center`,children:[u,d,p,g]})})]})]}),t[15]=g,t[16]=p,t[17]=_):_=t[17],_}var Kb=is()({head:()=>({meta:[{title:`Mulga`}]}),component:()=>(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ms,{}),(0,G.jsx)(Ub,{}),(0,G.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[(0,G.jsx)(Vb,{}),(0,G.jsx)(`div`,{className:`flex flex-1 flex-col p-8`,children:(0,G.jsx)(vs,{})})]})]}),errorComponent:Gb,notFoundComponent:Hb}),qb=q(`/login`)({validateSearch:e=>({reason:e.reason===`expired`?`expired`:void 0}),beforeLoad:()=>{if(tr())throw me({to:`/`})},component:J(()=>z(()=>import(`./login.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),`component`)}),Jb=q(`/_auth`)({beforeLoad:()=>{if(!tr())throw me({to:`/login`})},component:J(()=>z(()=>import(`./route.js`),__vite__mapDeps([14,1])),`component`)}),Yb=a({queryKey:[`ec2`,`availabilityZones`],queryFn:async()=>{let e=new Ey({});return await Ft().send(e)},staleTime:3e5}),Xb=a({queryKey:[`ec2`,`instances`],queryFn:async()=>{let e=new ky({});return await Ft().send(e)},refetchInterval:5e3}),Zb=e=>a({queryKey:[`ec2`,`instances`,e],queryFn:async()=>{let t=new ky({InstanceIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),Qb=e=>a({queryKey:[`ec2`,`iam-instance-profile-associations`,e],queryFn:async()=>{let t=new Dy({Filters:[{Name:`instance-id`,Values:[e]}]});return await Ft().send(t)},refetchInterval:5e3}),$b=a({queryKey:[`ec2`,`instances`,`types`],queryFn:async()=>{let e=new Ay({Filters:[{Name:`capacity`,Values:[`true`]}]});return await Ft().send(e)},refetchInterval:5e3}),ex=a({queryKey:[`ec2`,`images`],queryFn:async()=>{let e=new Oy({});return await Ft().send(e)}}),tx=e=>a({queryKey:[`ec2`,`images`,e??`none`],queryFn:async()=>{if(!e)return{Images:[],$metadata:{}};let t=new Oy({ImageIds:[e]});return await Ft().send(t)}}),nx=a({queryKey:[`ec2`,`keypairs`],queryFn:async()=>{let e=new My({});return await Ft().send(e)}}),rx=e=>a({queryKey:[`ec2`,`keypairs`,e],queryFn:async()=>{let t=new My({KeyPairIds:[e]});return await Ft().send(t)}}),ix=a({queryKey:[`ec2`,`regions`],queryFn:async()=>{let e=new Fy({});return await Ft().send(e)},staleTime:3e5}),ax=a({queryKey:[`ec2`,`subnets`],queryFn:async()=>{let e=new zy({});return await Ft().send(e)}}),ox=e=>a({queryKey:[`ec2`,`subnets`,e],queryFn:async()=>{let t=new zy({SubnetIds:[e]});return await Ft().send(t)}}),sx=a({queryKey:[`ec2`,`snapshots`],queryFn:async()=>{let e=new Ry({});return await Ft().send(e)},refetchInterval:5e3}),cx=e=>a({queryKey:[`ec2`,`snapshots`,e],queryFn:async()=>{let t=new Ry({SnapshotIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),lx=a({queryKey:[`ec2`,`internetGateways`],queryFn:async()=>{let e=new jy({});return await Ft().send(e)},refetchInterval:5e3}),ux=e=>a({queryKey:[`ec2`,`internetGateways`,e],queryFn:async()=>{let t=new jy({InternetGatewayIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),dx=a({queryKey:[`ec2`,`routeTables`],queryFn:async()=>{let e=new Iy({});return await Ft().send(e)},refetchInterval:5e3}),fx=e=>a({queryKey:[`ec2`,`routeTables`,e],queryFn:async()=>{let t=new Iy({RouteTableIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),px=a({queryKey:[`ec2`,`vpcs`],queryFn:async()=>{let e=new Vy({});return await Ft().send(e)}}),mx=e=>a({queryKey:[`ec2`,`vpcs`,e],queryFn:async()=>{let t=new Vy({VpcIds:[e]});return await Ft().send(t)}}),hx=a({queryKey:[`ec2`,`placementGroups`],queryFn:async()=>{let e=new Py({});return await Ft().send(e)}}),gx=e=>a({queryKey:[`ec2`,`placementGroups`,e],queryFn:async()=>{let t=new Py({GroupIds:[e]});return await Ft().send(t)}}),_x=a({queryKey:[`ec2`,`securityGroups`],queryFn:async()=>{let e=new Ly({});return await Ft().send(e)}}),vx=e=>a({queryKey:[`ec2`,`securityGroups`,e],queryFn:async()=>{let t=new Ly({GroupIds:[e]});return await Ft().send(t)}}),yx=a({queryKey:[`ec2`,`addresses`],queryFn:async()=>{let e=new Ty({});return await Ft().send(e)},refetchInterval:5e3}),bx=e=>a({queryKey:[`ec2`,`addresses`,e],queryFn:async()=>{let t=new Ty({AllocationIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),xx=a({queryKey:[`ec2`,`natGateways`],queryFn:async()=>{let e=new Ny({});return await Ft().send(e)},refetchInterval:5e3}),Sx=e=>a({queryKey:[`ec2`,`natGateways`,e],queryFn:async()=>{let t=new Ny({NatGatewayIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),Cx=a({queryKey:[`ec2`,`volumes`],queryFn:async()=>{let e=new By({});return await Ft().send(e)},refetchInterval:5e3}),wx=e=>a({queryKey:[`ec2`,`volumes`,e],queryFn:async()=>{let t=new By({VolumeIds:[e]});return await Ft().send(t)},refetchInterval:5e3}),Tx=a({queryKey:[`s3`,`buckets`],queryFn:async()=>{let e=new Fb({});return await Tt().send(e)}}),Ex=(e,t)=>a({queryKey:[`s3`,`buckets`,e,`objects`,t??``],queryFn:async()=>{let n=new Ib({Bucket:e,Prefix:t,Delimiter:`/`});return await Tt().send(n)}}),Dx=q(`/_auth/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Xb),e.queryClient.ensureQueryData(Cx),e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(nx),e.queryClient.ensureQueryData(Tx),e.queryClient.ensureQueryData(_x),e.queryClient.ensureQueryData(xx),e.queryClient.ensureQueryData(yx),e.queryClient.ensureQueryData(lx)])},head:()=>({meta:[{title:`Dashboard | Mulga`}]}),component:J(()=>z(()=>import(`./_auth.js`),__vite__mapDeps([15,1,2,3,4,5,6,16,17,18,19,20,21,22,8,12,23,24])),`component`)}),Ox=q(`/_auth/nodes`)({head:()=>({meta:[{title:`Nodes | Mulga`}]}),component:J(()=>z(()=>import(`./nodes.js`),__vite__mapDeps([25,1,2,3,16,17,26,20,22,8,12,23,24])),`component`)}),kx=q(`/_auth/s3/service-metrics`)({head:()=>({meta:[{title:`Service Metrics | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./service-metrics.js`),__vite__mapDeps([27,1,16,17,26,20,22,2,3,8,12,23,24])),`component`)}),Ax=q(`/_auth/s3/ls/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tx)},head:()=>({meta:[{title:`Buckets | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./ls.js`),__vite__mapDeps([28,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),jx=q(`/_auth/s3/(buckets)/create-bucket`)({head:()=>({meta:[{title:`Create Bucket | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./create-bucket.js`),__vite__mapDeps([31,1,2,3,32,5,4,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13])),`component`)}),Mx=q(`/_auth/iam/(users)/create-user`)({head:()=>({meta:[{title:`Create User | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./create-user.js`),__vite__mapDeps([41,1,42,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13,43,44])),`component`)}),Nx=q(`/_auth/iam/(roles)/create-role`)({head:()=>({meta:[{title:`Create Role | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./create-role.js`),__vite__mapDeps([45,1,42,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13,46,47,44,43])),`component`)}),Px=q(`/_auth/iam/(policies)/create-policy`)({head:()=>({meta:[{title:`Create Policy | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./create-policy.js`),__vite__mapDeps([48,1,42,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13,46,47,44,43])),`component`)}),Fx=q(`/_auth/iam/(instance-profiles)/create-instance-profile`)({head:()=>({meta:[{title:`Create Instance Profile | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./create-instance-profile.js`),__vite__mapDeps([49,1,42,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,40,20,13,43,44])),`component`)}),Ix=a({queryKey:[`iam`,`users`],queryFn:async()=>{let e=new Pb({});return await lt().send(e)},staleTime:3e5}),Lx=e=>a({queryKey:[`iam`,`users`,e],queryFn:async()=>{let t=new Eb({UserName:e});return await lt().send(t)},staleTime:3e5}),Rx=e=>a({queryKey:[`iam`,`access-keys`,e],queryFn:async()=>{let t=new Db({UserName:e});return await lt().send(t)},staleTime:3e5}),zx=a({queryKey:[`iam`,`policies`],queryFn:async()=>{let e=new Mb({Scope:`Local`});return await lt().send(e)},staleTime:3e5}),Bx=e=>a({queryKey:[`iam`,`policies`,e],queryFn:async()=>{let t=new Cb({PolicyArn:e});return await lt().send(t)},staleTime:3e5}),Vx=(e,t)=>a({queryKey:[`iam`,`policy-versions`,e,t],queryFn:async()=>{let n=new wb({PolicyArn:e,VersionId:t});return await lt().send(n)},staleTime:3e5}),Hx=e=>a({queryKey:[`iam`,`attached-user-policies`,e],queryFn:async()=>{let t=new kb({UserName:e});return await lt().send(t)},staleTime:3e5}),Ux=a({queryKey:[`iam`,`roles`],queryFn:async()=>{let e=new Nb({});return await lt().send(e)},staleTime:3e5}),Wx=e=>a({queryKey:[`iam`,`roles`,e],queryFn:async()=>{let t=new Tb({RoleName:e});return await lt().send(t)},staleTime:3e5}),Gx=e=>a({queryKey:[`iam`,`attached-role-policies`,e],queryFn:async()=>{let t=new Ob({RoleName:e});return await lt().send(t)},staleTime:3e5}),Kx=a({queryKey:[`iam`,`instance-profiles`],queryFn:async()=>{let e=new Ab({});return await lt().send(e)},staleTime:3e5}),qx=e=>a({queryKey:[`iam`,`instance-profiles`,e],queryFn:async()=>{let t=new Sb({InstanceProfileName:e});return await lt().send(t)},staleTime:3e5}),Jx=e=>a({queryKey:[`iam`,`instance-profiles-for-role`,e],queryFn:async()=>{let t=new jb({RoleName:e});return await lt().send(t)},staleTime:3e5}),Yx=q(`/_auth/eks/(clusters)/create-cluster`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(Ux),e.queryClient.ensureQueryData(ex)])},head:()=>({meta:[{title:`Create Cluster | EKS | Mulga`}]}),component:J(()=>z(()=>import(`./create-cluster.js`),__vite__mapDeps([50,1,2,3,51,4,5,6,33,44,52,42,53,7,8,54,55,10,36,18,11,29,17,34,37,56,57,39,40,20,13,38,58,59])),`component`)}),Xx=3e4,Zx=15e3,Qx=a({queryKey:[`ecs`,`clusters`],queryFn:async()=>{let e=ot(),t=(await e.send(new Zy({}))).clusterArns??[];return t.length===0?[]:(await e.send(new Ky({clusters:t}))).clusters??[]},staleTime:Xx}),$x=e=>a({queryKey:[`ecs`,`clusters`,e],queryFn:async()=>(await ot().send(new Ky({clusters:[e]}))).clusters?.[0]??null,staleTime:Xx}),eS=e=>a({queryKey:[`ecs`,`clusters`,e,`services`],queryFn:async()=>{let t=ot(),n=(await t.send(new $y({cluster:e}))).serviceArns??[];return n.length===0?[]:(await t.send(new Jy({cluster:e,services:n}))).services??[]},staleTime:Xx}),tS=e=>a({queryKey:[`ecs`,`clusters`,e,`tasks`],queryFn:async()=>{let t=ot(),n=(await t.send(new tb({cluster:e}))).taskArns??[];return n.length===0?[]:(await t.send(new Xy({cluster:e,tasks:n}))).tasks??[]},staleTime:Zx}),nS=e=>a({queryKey:[`ecs`,`clusters`,e,`container-instances`],queryFn:async()=>{let t=ot(),n=(await t.send(new Qy({cluster:e}))).containerInstanceArns??[];return n.length===0?[]:(await t.send(new qy({cluster:e,containerInstances:n}))).containerInstances??[]},staleTime:Xx}),rS=a({queryKey:[`ecs`,`task-definitions`],queryFn:async()=>(await ot().send(new eb({}))).taskDefinitionArns??[],staleTime:Xx}),iS=e=>a({queryKey:[`ecs`,`task-definitions`,e],queryFn:async()=>(await ot().send(new Yy({taskDefinition:e}))).taskDefinition,enabled:e!==``,staleTime:Xx}),aS=q(`/_auth/ecs/(clusters)/task-definitions`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(rS)},head:()=>({meta:[{title:`Task Definitions | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./task-definitions.js`),__vite__mapDeps([60,1,4,2,3,5,6,61,33,7,8,29,17,62,53,39,20,63])),`component`)}),oS=q(`/_auth/ecs/(clusters)/run-task`)({validateSearch:e=>({cluster:typeof e.cluster==`string`?e.cluster:``}),loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(rS),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(_x)])},head:()=>({meta:[{title:`Run Task | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./run-task.js`),__vite__mapDeps([64,1,61,2,3,4,5,6,33,54,7,8,55,10,36,18,11,16,17,29,34,39,40,20,13,65])),`component`)}),sS=q(`/_auth/ecs/(clusters)/register-task-definition`)({validateSearch:e=>({cluster:typeof e.cluster==`string`?e.cluster:``}),head:()=>({meta:[{title:`Register Task Definition | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./register-task-definition.js`),__vite__mapDeps([66,1,61,2,3,4,5,6,33,7,8,54,55,10,36,18,11,34,67,68,39,40,20,13,65])),`component`)}),cS=5e3,lS=a({queryKey:[`elbv2`,`loadBalancers`],queryFn:async()=>{let e=new hb({});return await Rt().send(e)},refetchInterval:e=>(e.state.data?.LoadBalancers??[]).some(e=>e.State?.Code===`provisioning`)?cS:!1}),uS=e=>a({queryKey:[`elbv2`,`loadBalancers`,e],queryFn:async()=>{let t=new hb({LoadBalancerArns:[e]});return await Rt().send(t)},refetchInterval:e=>(e.state.data?.LoadBalancers?.[0])?.State?.Code===`provisioning`?cS:!1}),dS=e=>a({queryKey:[`elbv2`,`loadBalancers`,e,`attributes`],queryFn:async()=>{let t=new mb({LoadBalancerArn:e});return await Rt().send(t)}}),fS=a({queryKey:[`elbv2`,`targetGroups`],queryFn:async()=>{let e=new bb({});return await Rt().send(e)}}),pS=e=>a({queryKey:[`elbv2`,`targetGroups`,e],queryFn:async()=>{let t=new bb({TargetGroupArns:[e]});return await Rt().send(t)}}),mS=e=>a({queryKey:[`elbv2`,`targetGroups`,e,`attributes`],queryFn:async()=>{let t=new yb({TargetGroupArn:e});return await Rt().send(t)}}),hS=e=>a({queryKey:[`elbv2`,`listeners`,e],queryFn:async()=>{let t=new pb({LoadBalancerArn:e});return await Rt().send(t)}}),gS=e=>a({queryKey:[`elbv2`,`listeners`,e,`rules`],queryFn:async()=>{let t=new gb({ListenerArn:e});return await Rt().send(t)}}),_S=e=>a({queryKey:[`elbv2`,`targetGroups`,e,`health`],queryFn:async()=>{let t=new xb({TargetGroupArn:e});return await Rt().send(t)}}),vS=a({queryKey:[`elbv2`,`sslPolicies`],queryFn:async()=>{let e=new _b({});return await Rt().send(e)},staleTime:1/0}),yS=e=>a({queryKey:[`elbv2`,`tags`,...e],queryFn:async()=>{let t=new vb({ResourceArns:e});return await Rt().send(t)},enabled:e.length>0}),bS=q(`/_auth/ecs/(clusters)/create-service`)({validateSearch:e=>({cluster:typeof e.cluster==`string`?e.cluster:``}),loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(rS),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(_x),e.queryClient.ensureQueryData(fS)])},head:()=>({meta:[{title:`Create Service | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./create-service.js`),__vite__mapDeps([69,1,61,2,3,4,5,6,33,54,7,8,55,10,36,18,11,16,17,29,34,39,40,20,13,65])),`component`)}),xS=q(`/_auth/ec2/(vpc)/create-vpc`)({head:()=>({meta:[{title:`Create VPC | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-vpc.js`),__vite__mapDeps([70,1,71,2,3,4,5,6,33,52,7,8,54,55,10,36,18,11,34,19,35,37,38,39,40,20,13,72])),`component`)}),SS=q(`/_auth/ec2/(volumes)/create-volume`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Yb)},head:()=>({meta:[{title:`Create Volume | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-volume.js`),__vite__mapDeps([73,1,71,2,3,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,72])),`component`)}),CS=q(`/_auth/ec2/(target-groups)/create-target-group`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(px)},head:()=>({meta:[{title:`Create Target Group | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-target-group.js`),__vite__mapDeps([74,1,75,2,3,4,5,6,33,11,29,17,34,35,7,8,36,18,37,38,76,9,10,54,55,67,68,13,39,40,20,77])),`component`)}),wS=q(`/_auth/ec2/(subnet)/create-subnet`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(Yb)])},head:()=>({meta:[{title:`Create Subnet | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-subnet.js`),__vite__mapDeps([78,1,2,3,71,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,72])),`component`)}),TS=q(`/_auth/ec2/(snapshots)/create-snapshot`)({validateSearch:e=>({volumeId:typeof e.volumeId==`string`?e.volumeId:void 0}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(Cx)},head:()=>({meta:[{title:`Create Snapshot | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-snapshot.js`),__vite__mapDeps([79,1,71,2,3,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,47,72])),`component`)}),ES=q(`/_auth/ec2/(security-groups)/create-security-group`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(px)},head:()=>({meta:[{title:`Create Security Group | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-security-group.js`),__vite__mapDeps([80,1,2,3,71,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,72])),`component`)}),DS=q(`/_auth/ec2/(route-tables)/create-route-table`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(px)},head:()=>({meta:[{title:`Create Route Table | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-route-table.js`),__vite__mapDeps([81,1,2,3,71,4,5,6,33,52,54,7,8,55,10,36,18,11,29,17,34,39,40,20,13,72])),`component`)}),OS=q(`/_auth/ec2/(placement-groups)/create-placement-group`)({head:()=>({meta:[{title:`Create Placement Group | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-placement-group.js`),__vite__mapDeps([82,1,71,2,3,4,5,6,33,52,54,7,8,55,10,36,18,11,34,35,37,38,39,40,20,13,72])),`component`)}),kS=q(`/_auth/ec2/(nat-gateways)/create-nat-gateway`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(yx)])},head:()=>({meta:[{title:`Create NAT Gateway | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-nat-gateway.js`),__vite__mapDeps([83,1,2,3,4,5,6,71,33,52,54,7,8,55,10,36,18,11,29,17,34,35,37,38,39,40,20,13,72])),`component`)}),AS=a({queryKey:[`acm`,`certificates`],queryFn:async()=>{let e=new wy({});return await kt().send(e)}}),jS=q(`/_auth/ec2/(load-balancers)/create-load-balancer`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(_x),e.queryClient.ensureQueryData(fS),e.queryClient.ensureQueryData(AS),e.queryClient.ensureQueryData(vS)])},head:()=>({meta:[{title:`Create Load Balancer | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-load-balancer.js`),__vite__mapDeps([84,1,2,3,85,4,5,6,53,7,8,33,39,13,47,75,54,55,10,36,18,11,29,17,34,67,35,37,38,68,76,9,40,20,77])),`component`)}),MS=q(`/_auth/ec2/(key)/import-key-pair`)({head:()=>({meta:[{title:`Import Key Pair | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./import-key-pair.js`),__vite__mapDeps([86,1,71,2,3,4,5,6,33,52,11,34,35,7,8,36,18,37,38,39,40,20,13,47,72])),`component`)}),NS=q(`/_auth/ec2/(key)/create-key-pair`)({head:()=>({meta:[{title:`Create Key Pair | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-key-pair.js`),__vite__mapDeps([87,1,71,2,3,4,5,6,33,52,53,7,8,11,34,36,88,35,18,37,38,57,39,40,20,13,72])),`component`)}),PS=q(`/_auth/ec2/(internet-gateways)/create-internet-gateway`)({head:()=>({meta:[{title:`Create Internet Gateway | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./create-internet-gateway.js`),__vite__mapDeps([89,1,71,2,3,4,5,6,33,52,11,34,35,7,8,36,18,37,38,39,40,20,13,72])),`component`)}),FS=q(`/_auth/ec2/(instances)/run-instances`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(ex),e.queryClient.ensureQueryData(nx),e.queryClient.ensureQueryData($b),e.queryClient.ensureQueryData(ax),e.queryClient.ensureQueryData(hx),e.queryClient.ensureQueryData(px),e.queryClient.ensureQueryData(_x)])},head:()=>({meta:[{title:`Run Instances | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./run-instances.js`),__vite__mapDeps([90,1,2,3,71,4,5,6,33,52,7,8,9,10,54,55,36,18,11,29,17,34,35,37,38,39,20,13,72])),`component`)}),IS=q(`/_auth/ec2/(elastic-ips)/allocate-address`)({head:()=>({meta:[{title:`Allocate Elastic IP | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./allocate-address.js`),__vite__mapDeps([91,1,71,2,3,4,5,6,33,52,11,34,35,7,8,36,18,37,38,39,40,20,13,72])),`component`)}),LS=q(`/_auth/s3/ls/$bucket`)({component:J(()=>z(()=>import(`./route2.js`),__vite__mapDeps([92,1])),`component`)}),RS=q(`/_auth/s3/ls/$bucket/`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Ex(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./_bucket.js`),__vite__mapDeps([93,1,2,3,32,5,4,6,33,94,7,8,88,68,62,53,39,29,17,34,20])),`component`)}),zS=q(`/_auth/iam/(users)/list-users/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Ix)},head:()=>({meta:[{title:`Users | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./list-users.js`),__vite__mapDeps([95,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),BS=q(`/_auth/iam/(roles)/list-roles/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Ux)},head:()=>({meta:[{title:`Roles | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./list-roles.js`),__vite__mapDeps([96,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),VS=q(`/_auth/iam/(policies)/list-policies/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(zx)},head:()=>({meta:[{title:`Policies | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./list-policies.js`),__vite__mapDeps([97,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),HS=q(`/_auth/iam/(instance-profiles)/list-instance-profiles/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Kx)},head:()=>({meta:[{title:`Instance Profiles | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./list-instance-profiles.js`),__vite__mapDeps([98,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),US=3e4,WS=3e5,GS=a({queryKey:[`eks`,`clusters`],queryFn:async()=>{let e=new db({});return await jt().send(e)},staleTime:US}),KS=e=>a({queryKey:[`eks`,`clusters`,e],queryFn:async()=>{let t=new ab({name:e});return await jt().send(t)},staleTime:US}),qS=e=>a({queryKey:[`eks`,`clusters`,e,`nodegroups`],queryFn:async()=>{let t=new fb({clusterName:e});return await jt().send(t)},staleTime:US}),JS=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`nodegroups`,t],queryFn:async()=>{let n=new ob({clusterName:e,nodegroupName:t});return await jt().send(n)},staleTime:US}),YS=e=>a({queryKey:[`eks`,`clusters`,e,`access-entries`],queryFn:async()=>{let t=new sb({clusterName:e});return await jt().send(t)},staleTime:US}),XS=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`access-entries`,t],queryFn:async()=>{let n=new nb({clusterName:e,principalArn:t});return await jt().send(n)},staleTime:US}),ZS=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`access-entries`,t,`policies`],queryFn:async()=>{let n=new ub({clusterName:e,principalArn:t});return await jt().send(n)},staleTime:US});a({queryKey:[`eks`,`access-policies`],queryFn:async()=>{let e=new cb({});return await jt().send(e)},staleTime:WS});var QS=a({queryKey:[`eks`,`addon-versions`],queryFn:async()=>{let e=new ib({});return await jt().send(e)},staleTime:WS}),$S=e=>a({queryKey:[`eks`,`clusters`,e,`addons`],queryFn:async()=>{let t=new lb({clusterName:e});return await jt().send(t)},staleTime:US}),eC=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`addons`,t],queryFn:async()=>{let n=new rb({clusterName:e,addonName:t});return await jt().send(n)},staleTime:US}),tC=q(`/_auth/eks/(clusters)/list-clusters/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(GS)},head:()=>({meta:[{title:`Clusters | EKS | Mulga`}]}),component:J(()=>z(()=>import(`./list-clusters2.js`),__vite__mapDeps([99,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),nC=q(`/_auth/ecs/(clusters)/list-clusters/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Qx),e.queryClient.ensureQueryData(ex)])},head:()=>({meta:[{title:`Clusters | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./list-clusters.js`),__vite__mapDeps([100,1,4,2,3,5,6,61,33,53,7,8,29,17,36,37,56,57,62,39,20,21,13,38,58,63])),`component`)}),rC=a({queryKey:[`ecr`,`repositories`],queryFn:async()=>{let e=new Uy({});return await bt().send(e)}}),iC=e=>a({queryKey:[`ecr`,`repositories`,e,`images`],queryFn:async()=>{let t=new Hy({repositoryName:e});return await bt().send(t)}}),aC=e=>a({queryKey:[`ecr`,`repositories`,e,`policy`],queryFn:async()=>{try{let t=new Gy({repositoryName:e});return(await bt().send(t)).policyText??null}catch(e){if(e instanceof Ae)return null;throw e}}}),oC=e=>a({queryKey:[`ecr`,`repositories`,e,`lifecycle`],queryFn:async()=>{try{let t=new Wy({repositoryName:e});return(await bt().send(t)).lifecyclePolicyText??null}catch(e){if(e instanceof Ee)return null;throw e}}}),sC=q(`/_auth/ecr/(repositories)/list-repositories/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(rC)},head:()=>({meta:[{title:`Repositories | ECR | Mulga`}]}),component:J(()=>z(()=>import(`./list-repositories.js`),__vite__mapDeps([101,1,2,3,4,5,6,102,33,53,7,8,29,17,20,13])),`component`)}),cC=q(`/_auth/ec2/(vpc)/describe-vpcs/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(px)},head:()=>({meta:[{title:`VPCs | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-vpcs.js`),__vite__mapDeps([103,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),lC=q(`/_auth/ec2/(volumes)/describe-volumes/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Cx)},head:()=>({meta:[{title:`Volumes | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-volumes.js`),__vite__mapDeps([104,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),uC=q(`/_auth/ec2/(target-groups)/describe-target-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(fS)},head:()=>({meta:[{title:`Target Groups | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-target-groups.js`),__vite__mapDeps([105,1,4,2,3,5,6,7,8,16,17,29,20])),`component`)}),dC=q(`/_auth/ec2/(subnet)/describe-subnets/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(ax)},head:()=>({meta:[{title:`Subnets | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-subnets.js`),__vite__mapDeps([106,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),fC=q(`/_auth/ec2/(snapshots)/describe-snapshots/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(sx)},head:()=>({meta:[{title:`Snapshots | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-snapshots.js`),__vite__mapDeps([107,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),pC=q(`/_auth/ec2/(security-groups)/describe-security-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(_x)},head:()=>({meta:[{title:`Security Groups | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-security-groups.js`),__vite__mapDeps([108,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),mC=q(`/_auth/ec2/(route-tables)/describe-route-tables/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(dx)},head:()=>({meta:[{title:`Route Tables | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-route-tables.js`),__vite__mapDeps([109,1,2,3,4,5,6,7,8,29,17,30,20,22])),`component`)}),hC=q(`/_auth/ec2/(placement-groups)/describe-placement-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(hx)},head:()=>({meta:[{title:`Placement Groups | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-placement-groups.js`),__vite__mapDeps([110,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),gC=q(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(xx)},head:()=>({meta:[{title:`NAT Gateways | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-nat-gateways.js`),__vite__mapDeps([111,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),_C=q(`/_auth/ec2/(load-balancers)/describe-load-balancers/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(lS)},head:()=>({meta:[{title:`Load Balancers | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-load-balancers.js`),__vite__mapDeps([112,1,2,3,4,5,6,7,8,29,17,20,21])),`component`)}),vC=q(`/_auth/ec2/(key)/describe-key-pairs/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(nx)},head:()=>({meta:[{title:`Key Pairs | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-key-pairs.js`),__vite__mapDeps([113,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),yC=q(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(lx)},head:()=>({meta:[{title:`Internet Gateways | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-internet-gateways.js`),__vite__mapDeps([114,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),bC=q(`/_auth/ec2/(instances)/describe-instances/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Xb)},head:()=>({meta:[{title:`Instances | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-instances.js`),__vite__mapDeps([115,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),xC=q(`/_auth/ec2/(images)/describe-images/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(ex)},head:()=>({meta:[{title:`Images | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-images.js`),__vite__mapDeps([116,1,29,17,30,4,2,3,5,6,20,21,58])),`component`)}),SC=q(`/_auth/ec2/(elastic-ips)/describe-addresses/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(yx)},head:()=>({meta:[{title:`Elastic IPs | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./describe-addresses.js`),__vite__mapDeps([117,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),CC=q(`/_auth/s3/ls/$bucket/$`)({loader:async({context:e,params:t})=>{let n=Nn(t._splat??``);await e.queryClient.ensureQueryData(Ex(t.bucket,n))},head:({params:e})=>({meta:[{title:`${yn(e._splat??``,`${e.bucket}/`)} | S3 | Mulga`}]}),component:J(()=>z(()=>import(`./_.js`),__vite__mapDeps([118,1,2,3,32,5,4,6,33,94,7,8,88,68,62,53,39,29,17,34])),`component`)}),wC=q(`/_auth/iam/(users)/list-users/$userName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Lx(t.userName)),e.queryClient.ensureQueryData(Rx(t.userName)),e.queryClient.ensureQueryData(Hx(t.userName)),e.queryClient.ensureQueryData(zx)])},head:({params:e})=>({meta:[{title:`${e.userName} | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./_userName.js`),__vite__mapDeps([119,1,2,3,42,4,5,6,33,53,7,8,29,17,34,36,68,57,62,120,39,20,21,38])),`component`)}),TC=q(`/_auth/iam/(roles)/list-roles/$roleName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Wx(t.roleName)),e.queryClient.ensureQueryData(Gx(t.roleName)),e.queryClient.ensureQueryData(Jx(t.roleName)),e.queryClient.ensureQueryData(zx)])},head:({params:e})=>({meta:[{title:`${e.roleName} | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./_roleName.js`),__vite__mapDeps([121,1,2,3,4,5,6,42,33,7,8,29,17,34,68,62,53,120,39,20,59])),`component`)}),EC=q(`/_auth/iam/(policies)/list-policies/$policyArn`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.policyArn),r=await e.queryClient.ensureQueryData(Bx(n)),i=r.Policy?.DefaultVersionId;return i&&await e.queryClient.ensureQueryData(Vx(n,i)),r},head:({loaderData:e})=>({meta:[{title:`${e?.Policy?.PolicyName??`Policy`} | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./_policyArn.js`),__vite__mapDeps([122,1,2,3,42,4,5,6,33,7,8,29,17,34,68,62,53,120,39,20,59])),`component`)}),DC=q(`/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(qx(t.instanceProfileName)),e.queryClient.ensureQueryData(Ux)])},head:({params:e})=>({meta:[{title:`${e.instanceProfileName} | IAM | Mulga`}]}),component:J(()=>z(()=>import(`./_instanceProfileName.js`),__vite__mapDeps([123,1,2,3,4,5,6,42,33,7,8,29,17,34,68,62,53,120,39,20])),`component`)}),OC=q(`/_auth/eks/(clusters)/list-clusters/$clusterName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(KS(t.clusterName)),e.queryClient.ensureQueryData(qS(t.clusterName)),e.queryClient.ensureQueryData(YS(t.clusterName))])},head:({params:e})=>({meta:[{title:`${e.clusterName} | EKS | Mulga`}]}),component:J(()=>z(()=>import(`./_clusterName2.js`),__vite__mapDeps([124,1,2,3,4,5,6,51,33,44,52,53,7,8,125,55,10,11,16,17,29,34,35,36,18,37,38,68,62,120,39,20,22,13,46,47])),`component`)}),kC=q(`/_auth/ecs/(clusters)/list-clusters/$clusterName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData($x(t.clusterName)),e.queryClient.ensureQueryData(eS(t.clusterName)),e.queryClient.ensureQueryData(tS(t.clusterName))])},head:({params:e})=>({meta:[{title:`${e.clusterName} | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./_clusterName.js`),__vite__mapDeps([126,1,4,2,3,5,6,61,33,53,7,8,125,55,10,16,17,29,34,68,62,120,39,20,21,13])),`component`)}),AC=q(`/_auth/ecr/(repositories)/list-repositories/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(rC),e.queryClient.ensureQueryData(iC(n)),e.queryClient.ensureQueryData(aC(n))])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Repository | Mulga`}]}),component:J(()=>z(()=>import(`./_id17.js`),__vite__mapDeps([127,1,2,3,4,5,6,102,33,53,7,8,125,55,10,29,17,20,22,46,47,44])),`component`)}),jC=q(`/_auth/ec2/(vpc)/describe-vpcs/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(mx(t.id)),e.queryClient.ensureQueryData(ax)])},head:({params:e})=>({meta:[{title:`${e.id} | VPC | Mulga`}]}),component:J(()=>z(()=>import(`./_id16.js`),__vite__mapDeps([128,1,2,3,4,5,6,71,33,52,7,8,29,17,34,68,62,53,120,39,20,21])),`component`)}),MC=q(`/_auth/ec2/(volumes)/modify-volume/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(wx(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id15.js`),__vite__mapDeps([129,1,71,2,3,4,5,6,33,52,11,29,17,34,39,40,7,8,20,13,72])),`component`)}),NC=q(`/_auth/ec2/(volumes)/describe-volumes/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(wx(t.id)),e.queryClient.ensureQueryData(Xb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id14.js`),__vite__mapDeps([130,1,2,3,4,5,6,71,33,52,53,7,8,54,55,10,36,18,29,17,34,68,62,120,39,20,21,13])),`component`)}),PC=q(`/_auth/ec2/(target-groups)/describe-target-groups/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(pS(n)),e.queryClient.ensureQueryData(mS(n)),e.queryClient.ensureQueryData(yS([n])),e.queryClient.ensureQueryData(Xb)])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Target Group | Mulga`}]}),component:J(()=>z(()=>import(`./_id13.js`),__vite__mapDeps([131,1,2,3,75,4,5,6,33,53,7,8,125,55,10,16,17,29,34,68,62,120,132,54,36,18,67,13,39,20])),`component`)}),FC=q(`/_auth/ec2/(subnet)/describe-subnets/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(ox(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | Subnet | Mulga`}]}),component:J(()=>z(()=>import(`./_id12.js`),__vite__mapDeps([133,1,2,3,4,5,6,71,33,52,7,8,29,17,34,68,62,53,120,39,20,21])),`component`)}),IC=q(`/_auth/ec2/(snapshots)/describe-snapshots/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(cx(t.id)),e.queryClient.ensureQueryData(ix)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id11.js`),__vite__mapDeps([134,1,2,3,4,5,6,71,33,52,53,7,8,29,17,34,37,68,62,120,39,20,21,13])),`component`)}),LC=q(`/_auth/ec2/(security-groups)/describe-security-groups/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(vx(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | Security Group | Mulga`}]}),component:J(()=>z(()=>import(`./_id10.js`),__vite__mapDeps([135,1,4,2,3,5,6,71,33,52,53,7,8,54,55,10,36,18,11,29,17,34,67,68,62,120,39,20,13,72])),`component`)}),RC=q(`/_auth/ec2/(route-tables)/describe-route-tables/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(fx(t.id)),e.queryClient.ensureQueryData(lx),e.queryClient.ensureQueryData(xx),e.queryClient.ensureQueryData(ax)])},head:({params:e})=>({meta:[{title:`${e.id} | Route Table | Mulga`}]}),component:J(()=>z(()=>import(`./_id9.js`),__vite__mapDeps([136,1,2,3,4,5,6,71,33,52,7,8,54,55,10,36,18,11,29,17,34,68,62,53,120,39,20,22,13,72])),`component`)}),zC=q(`/_auth/ec2/(placement-groups)/describe-placement-groups/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(gx(t.id)),e.queryClient.ensureQueryData(Xb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id8.js`),__vite__mapDeps([137,1,4,2,3,5,6,71,33,52,7,8,29,17,34,68,62,53,120,39,20,21])),`component`)}),BC=q(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Sx(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | NAT Gateway | Mulga`}]}),component:J(()=>z(()=>import(`./_id7.js`),__vite__mapDeps([138,1,2,3,4,5,6,71,33,52,7,8,29,17,34,68,62,53,120,39,20,21])),`component`)}),VC=q(`/_auth/ec2/(load-balancers)/describe-load-balancers/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(uS(n)),e.queryClient.ensureQueryData(hS(n)),e.queryClient.ensureQueryData(dS(n)),e.queryClient.ensureQueryData(yS([n])),e.queryClient.ensureQueryData(fS),e.queryClient.ensureQueryData(ax)])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Load Balancer | Mulga`}]}),component:J(()=>z(()=>import(`./_id6.js`),__vite__mapDeps([139,1,2,3,85,4,5,6,53,7,8,33,39,13,47,75,54,55,10,36,18,125,11,29,17,34,68,62,120,132,67,20,21,77])),`component`)}),HC=q(`/_auth/ec2/(key)/describe-key-pairs/$id`)({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(rx(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??`Key Pair`} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id5.js`),__vite__mapDeps([140,1,2,3,71,4,5,6,33,52,7,8,29,17,34,68,62,53,120,39,20])),`component`)}),UC=q(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(ux(t.id)),e.queryClient.ensureQueryData(px)])},head:({params:e})=>({meta:[{title:`${e.id} | Internet Gateway | Mulga`}]}),component:J(()=>z(()=>import(`./_id4.js`),__vite__mapDeps([141,1,2,3,4,5,6,71,33,52,7,8,54,55,10,36,18,29,17,34,68,62,53,120,39,20])),`component`)}),WC=q(`/_auth/ec2/(instances)/describe-instances/$id`)({loader:async({context:e,params:t})=>{let[n]=await Promise.all([e.queryClient.ensureQueryData(Zb(t.id)),e.queryClient.ensureQueryData($b)]),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(tx(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??`Instance`} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id3.js`),__vite__mapDeps([142,1,2,3,4,5,6,71,33,52,53,7,8,54,55,10,36,18,16,17,29,34,56,68,62,120,39,20,21,13,47,23,24,143])),`component`)}),GC=q(`/_auth/ec2/(images)/describe-images/$id`)({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(tx(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??`Image`} | EC2 | Mulga`}]}),component:J(()=>z(()=>import(`./_id2.js`),__vite__mapDeps([144,1,29,17,34,4,2,3,5,6,20,21,58,143,120])),`component`)}),KC=q(`/_auth/ec2/(elastic-ips)/describe-addresses/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(bx(t.id)),e.queryClient.ensureQueryData(Xb)])},head:({params:e})=>({meta:[{title:`${e.id} | Elastic IP | Mulga`}]}),component:J(()=>z(()=>import(`./_id.js`),__vite__mapDeps([145,1,2,3,71,4,5,6,33,52,7,8,54,55,10,36,18,29,17,34,68,62,53,120,39,20])),`component`)}),qC=q(`/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(tS(t.clusterName))},head:({params:e})=>({meta:[{title:`${e.taskId} | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./_taskId.js`),__vite__mapDeps([146,1,29,17,34,4,2,3,5,6,120,20,21])),`component`)}),JC=q(`/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(eS(t.clusterName)),e.queryClient.ensureQueryData(tS(t.clusterName))])},head:({params:e})=>({meta:[{title:`${e.serviceName} | ECS | Mulga`}]}),component:J(()=>z(()=>import(`./_serviceName.js`),__vite__mapDeps([147,1,4,2,3,5,6,29,17,34,120,20,21])),`component`)}),YC=qb.update({id:`/login`,path:`/login`,getParentRoute:()=>Kb}),$=Jb.update({id:`/_auth`,getParentRoute:()=>Kb}),XC=Dx.update({id:`/`,path:`/`,getParentRoute:()=>$}),ZC=Ox.update({id:`/nodes`,path:`/nodes`,getParentRoute:()=>$}),QC=kx.update({id:`/s3/service-metrics`,path:`/s3/service-metrics`,getParentRoute:()=>$}),$C=Ax.update({id:`/s3/ls/`,path:`/s3/ls/`,getParentRoute:()=>$}),ew=jx.update({id:`/s3/(buckets)/create-bucket`,path:`/s3/create-bucket`,getParentRoute:()=>$}),tw=Mx.update({id:`/iam/(users)/create-user`,path:`/iam/create-user`,getParentRoute:()=>$}),nw=Nx.update({id:`/iam/(roles)/create-role`,path:`/iam/create-role`,getParentRoute:()=>$}),rw=Px.update({id:`/iam/(policies)/create-policy`,path:`/iam/create-policy`,getParentRoute:()=>$}),iw=Fx.update({id:`/iam/(instance-profiles)/create-instance-profile`,path:`/iam/create-instance-profile`,getParentRoute:()=>$}),aw=Yx.update({id:`/eks/(clusters)/create-cluster`,path:`/eks/create-cluster`,getParentRoute:()=>$}),ow=aS.update({id:`/ecs/(clusters)/task-definitions`,path:`/ecs/task-definitions`,getParentRoute:()=>$}),sw=oS.update({id:`/ecs/(clusters)/run-task`,path:`/ecs/run-task`,getParentRoute:()=>$}),cw=sS.update({id:`/ecs/(clusters)/register-task-definition`,path:`/ecs/register-task-definition`,getParentRoute:()=>$}),lw=bS.update({id:`/ecs/(clusters)/create-service`,path:`/ecs/create-service`,getParentRoute:()=>$}),uw=xS.update({id:`/ec2/(vpc)/create-vpc`,path:`/ec2/create-vpc`,getParentRoute:()=>$}),dw=SS.update({id:`/ec2/(volumes)/create-volume`,path:`/ec2/create-volume`,getParentRoute:()=>$}),fw=CS.update({id:`/ec2/(target-groups)/create-target-group`,path:`/ec2/create-target-group`,getParentRoute:()=>$}),pw=wS.update({id:`/ec2/(subnet)/create-subnet`,path:`/ec2/create-subnet`,getParentRoute:()=>$}),mw=TS.update({id:`/ec2/(snapshots)/create-snapshot`,path:`/ec2/create-snapshot`,getParentRoute:()=>$}),hw=ES.update({id:`/ec2/(security-groups)/create-security-group`,path:`/ec2/create-security-group`,getParentRoute:()=>$}),gw=DS.update({id:`/ec2/(route-tables)/create-route-table`,path:`/ec2/create-route-table`,getParentRoute:()=>$}),_w=OS.update({id:`/ec2/(placement-groups)/create-placement-group`,path:`/ec2/create-placement-group`,getParentRoute:()=>$}),vw=kS.update({id:`/ec2/(nat-gateways)/create-nat-gateway`,path:`/ec2/create-nat-gateway`,getParentRoute:()=>$}),yw=jS.update({id:`/ec2/(load-balancers)/create-load-balancer`,path:`/ec2/create-load-balancer`,getParentRoute:()=>$}),bw=MS.update({id:`/ec2/(key)/import-key-pair`,path:`/ec2/import-key-pair`,getParentRoute:()=>$}),xw=NS.update({id:`/ec2/(key)/create-key-pair`,path:`/ec2/create-key-pair`,getParentRoute:()=>$}),Sw=PS.update({id:`/ec2/(internet-gateways)/create-internet-gateway`,path:`/ec2/create-internet-gateway`,getParentRoute:()=>$}),Cw=FS.update({id:`/ec2/(instances)/run-instances`,path:`/ec2/run-instances`,getParentRoute:()=>$}),ww=IS.update({id:`/ec2/(elastic-ips)/allocate-address`,path:`/ec2/allocate-address`,getParentRoute:()=>$}),Tw=LS.update({id:`/s3/ls/$bucket`,path:`/s3/ls/$bucket`,getParentRoute:()=>$}),Ew=RS.update({id:`/`,path:`/`,getParentRoute:()=>Tw}),Dw=zS.update({id:`/iam/(users)/list-users/`,path:`/iam/list-users/`,getParentRoute:()=>$}),Ow=BS.update({id:`/iam/(roles)/list-roles/`,path:`/iam/list-roles/`,getParentRoute:()=>$}),kw=VS.update({id:`/iam/(policies)/list-policies/`,path:`/iam/list-policies/`,getParentRoute:()=>$}),Aw=HS.update({id:`/iam/(instance-profiles)/list-instance-profiles/`,path:`/iam/list-instance-profiles/`,getParentRoute:()=>$}),jw=tC.update({id:`/eks/(clusters)/list-clusters/`,path:`/eks/list-clusters/`,getParentRoute:()=>$}),Mw=nC.update({id:`/ecs/(clusters)/list-clusters/`,path:`/ecs/list-clusters/`,getParentRoute:()=>$}),Nw=sC.update({id:`/ecr/(repositories)/list-repositories/`,path:`/ecr/list-repositories/`,getParentRoute:()=>$}),Pw=cC.update({id:`/ec2/(vpc)/describe-vpcs/`,path:`/ec2/describe-vpcs/`,getParentRoute:()=>$}),Fw=lC.update({id:`/ec2/(volumes)/describe-volumes/`,path:`/ec2/describe-volumes/`,getParentRoute:()=>$}),Iw=uC.update({id:`/ec2/(target-groups)/describe-target-groups/`,path:`/ec2/describe-target-groups/`,getParentRoute:()=>$}),Lw=dC.update({id:`/ec2/(subnet)/describe-subnets/`,path:`/ec2/describe-subnets/`,getParentRoute:()=>$}),Rw=fC.update({id:`/ec2/(snapshots)/describe-snapshots/`,path:`/ec2/describe-snapshots/`,getParentRoute:()=>$}),zw=pC.update({id:`/ec2/(security-groups)/describe-security-groups/`,path:`/ec2/describe-security-groups/`,getParentRoute:()=>$}),Bw=mC.update({id:`/ec2/(route-tables)/describe-route-tables/`,path:`/ec2/describe-route-tables/`,getParentRoute:()=>$}),Vw=hC.update({id:`/ec2/(placement-groups)/describe-placement-groups/`,path:`/ec2/describe-placement-groups/`,getParentRoute:()=>$}),Hw=gC.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/`,path:`/ec2/describe-nat-gateways/`,getParentRoute:()=>$}),Uw=_C.update({id:`/ec2/(load-balancers)/describe-load-balancers/`,path:`/ec2/describe-load-balancers/`,getParentRoute:()=>$}),Ww=vC.update({id:`/ec2/(key)/describe-key-pairs/`,path:`/ec2/describe-key-pairs/`,getParentRoute:()=>$}),Gw=yC.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/`,path:`/ec2/describe-internet-gateways/`,getParentRoute:()=>$}),Kw=bC.update({id:`/ec2/(instances)/describe-instances/`,path:`/ec2/describe-instances/`,getParentRoute:()=>$}),qw=xC.update({id:`/ec2/(images)/describe-images/`,path:`/ec2/describe-images/`,getParentRoute:()=>$}),Jw=SC.update({id:`/ec2/(elastic-ips)/describe-addresses/`,path:`/ec2/describe-addresses/`,getParentRoute:()=>$}),Yw=CC.update({id:`/$`,path:`/$`,getParentRoute:()=>Tw}),Xw=wC.update({id:`/iam/(users)/list-users/$userName`,path:`/iam/list-users/$userName`,getParentRoute:()=>$}),Zw=TC.update({id:`/iam/(roles)/list-roles/$roleName`,path:`/iam/list-roles/$roleName`,getParentRoute:()=>$}),Qw=EC.update({id:`/iam/(policies)/list-policies/$policyArn`,path:`/iam/list-policies/$policyArn`,getParentRoute:()=>$}),$w=DC.update({id:`/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`,path:`/iam/list-instance-profiles/$instanceProfileName`,getParentRoute:()=>$}),eT=OC.update({id:`/eks/(clusters)/list-clusters/$clusterName`,path:`/eks/list-clusters/$clusterName`,getParentRoute:()=>$}),tT=kC.update({id:`/ecs/(clusters)/list-clusters/$clusterName`,path:`/ecs/list-clusters/$clusterName`,getParentRoute:()=>$}),nT=AC.update({id:`/ecr/(repositories)/list-repositories/$id`,path:`/ecr/list-repositories/$id`,getParentRoute:()=>$}),rT=jC.update({id:`/ec2/(vpc)/describe-vpcs/$id`,path:`/ec2/describe-vpcs/$id`,getParentRoute:()=>$}),iT=MC.update({id:`/ec2/(volumes)/modify-volume/$id`,path:`/ec2/modify-volume/$id`,getParentRoute:()=>$}),aT=NC.update({id:`/ec2/(volumes)/describe-volumes/$id`,path:`/ec2/describe-volumes/$id`,getParentRoute:()=>$}),oT=PC.update({id:`/ec2/(target-groups)/describe-target-groups/$id`,path:`/ec2/describe-target-groups/$id`,getParentRoute:()=>$}),sT=FC.update({id:`/ec2/(subnet)/describe-subnets/$id`,path:`/ec2/describe-subnets/$id`,getParentRoute:()=>$}),cT=IC.update({id:`/ec2/(snapshots)/describe-snapshots/$id`,path:`/ec2/describe-snapshots/$id`,getParentRoute:()=>$}),lT=LC.update({id:`/ec2/(security-groups)/describe-security-groups/$id`,path:`/ec2/describe-security-groups/$id`,getParentRoute:()=>$}),uT=RC.update({id:`/ec2/(route-tables)/describe-route-tables/$id`,path:`/ec2/describe-route-tables/$id`,getParentRoute:()=>$}),dT=zC.update({id:`/ec2/(placement-groups)/describe-placement-groups/$id`,path:`/ec2/describe-placement-groups/$id`,getParentRoute:()=>$}),fT=BC.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/$id`,path:`/ec2/describe-nat-gateways/$id`,getParentRoute:()=>$}),pT=VC.update({id:`/ec2/(load-balancers)/describe-load-balancers/$id`,path:`/ec2/describe-load-balancers/$id`,getParentRoute:()=>$}),mT=HC.update({id:`/ec2/(key)/describe-key-pairs/$id`,path:`/ec2/describe-key-pairs/$id`,getParentRoute:()=>$}),hT=UC.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/$id`,path:`/ec2/describe-internet-gateways/$id`,getParentRoute:()=>$}),gT=WC.update({id:`/ec2/(instances)/describe-instances/$id`,path:`/ec2/describe-instances/$id`,getParentRoute:()=>$}),_T=GC.update({id:`/ec2/(images)/describe-images/$id`,path:`/ec2/describe-images/$id`,getParentRoute:()=>$}),vT=KC.update({id:`/ec2/(elastic-ips)/describe-addresses/$id`,path:`/ec2/describe-addresses/$id`,getParentRoute:()=>$}),yT=qC.update({id:`/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId`,path:`/ecs/list-clusters/$clusterName/tasks/$taskId`,getParentRoute:()=>$}),bT=JC.update({id:`/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName`,path:`/ecs/list-clusters/$clusterName/services/$serviceName`,getParentRoute:()=>$}),xT={AuthS3LsBucketSplatRoute:Yw,AuthS3LsBucketIndexRoute:Ew},ST={AuthNodesRoute:ZC,AuthIndexRoute:XC,AuthS3ServiceMetricsRoute:QC,AuthS3LsBucketRouteRoute:Tw._addFileChildren(xT),AuthEc2elasticIpsAllocateAddressRoute:ww,AuthEc2instancesRunInstancesRoute:Cw,AuthEc2internetGatewaysCreateInternetGatewayRoute:Sw,AuthEc2keyCreateKeyPairRoute:xw,AuthEc2keyImportKeyPairRoute:bw,AuthEc2loadBalancersCreateLoadBalancerRoute:yw,AuthEc2natGatewaysCreateNatGatewayRoute:vw,AuthEc2placementGroupsCreatePlacementGroupRoute:_w,AuthEc2routeTablesCreateRouteTableRoute:gw,AuthEc2securityGroupsCreateSecurityGroupRoute:hw,AuthEc2snapshotsCreateSnapshotRoute:mw,AuthEc2subnetCreateSubnetRoute:pw,AuthEc2targetGroupsCreateTargetGroupRoute:fw,AuthEc2volumesCreateVolumeRoute:dw,AuthEc2vpcCreateVpcRoute:uw,AuthEcsclustersCreateServiceRoute:lw,AuthEcsclustersRegisterTaskDefinitionRoute:cw,AuthEcsclustersRunTaskRoute:sw,AuthEcsclustersTaskDefinitionsRoute:ow,AuthEksclustersCreateClusterRoute:aw,AuthIaminstanceProfilesCreateInstanceProfileRoute:iw,AuthIampoliciesCreatePolicyRoute:rw,AuthIamrolesCreateRoleRoute:nw,AuthIamusersCreateUserRoute:tw,AuthS3bucketsCreateBucketRoute:ew,AuthS3LsIndexRoute:$C,AuthEc2elasticIpsDescribeAddressesIdRoute:vT,AuthEc2imagesDescribeImagesIdRoute:_T,AuthEc2instancesDescribeInstancesIdRoute:gT,AuthEc2internetGatewaysDescribeInternetGatewaysIdRoute:hT,AuthEc2keyDescribeKeyPairsIdRoute:mT,AuthEc2loadBalancersDescribeLoadBalancersIdRoute:pT,AuthEc2natGatewaysDescribeNatGatewaysIdRoute:fT,AuthEc2placementGroupsDescribePlacementGroupsIdRoute:dT,AuthEc2routeTablesDescribeRouteTablesIdRoute:uT,AuthEc2securityGroupsDescribeSecurityGroupsIdRoute:lT,AuthEc2snapshotsDescribeSnapshotsIdRoute:cT,AuthEc2subnetDescribeSubnetsIdRoute:sT,AuthEc2targetGroupsDescribeTargetGroupsIdRoute:oT,AuthEc2volumesDescribeVolumesIdRoute:aT,AuthEc2volumesModifyVolumeIdRoute:iT,AuthEc2vpcDescribeVpcsIdRoute:rT,AuthEcrrepositoriesListRepositoriesIdRoute:nT,AuthEcsclustersListClustersClusterNameRoute:tT,AuthEksclustersListClustersClusterNameRoute:eT,AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRoute:$w,AuthIampoliciesListPoliciesPolicyArnRoute:Qw,AuthIamrolesListRolesRoleNameRoute:Zw,AuthIamusersListUsersUserNameRoute:Xw,AuthEc2elasticIpsDescribeAddressesIndexRoute:Jw,AuthEc2imagesDescribeImagesIndexRoute:qw,AuthEc2instancesDescribeInstancesIndexRoute:Kw,AuthEc2internetGatewaysDescribeInternetGatewaysIndexRoute:Gw,AuthEc2keyDescribeKeyPairsIndexRoute:Ww,AuthEc2loadBalancersDescribeLoadBalancersIndexRoute:Uw,AuthEc2natGatewaysDescribeNatGatewaysIndexRoute:Hw,AuthEc2placementGroupsDescribePlacementGroupsIndexRoute:Vw,AuthEc2routeTablesDescribeRouteTablesIndexRoute:Bw,AuthEc2securityGroupsDescribeSecurityGroupsIndexRoute:zw,AuthEc2snapshotsDescribeSnapshotsIndexRoute:Rw,AuthEc2subnetDescribeSubnetsIndexRoute:Lw,AuthEc2targetGroupsDescribeTargetGroupsIndexRoute:Iw,AuthEc2volumesDescribeVolumesIndexRoute:Fw,AuthEc2vpcDescribeVpcsIndexRoute:Pw,AuthEcrrepositoriesListRepositoriesIndexRoute:Nw,AuthEcsclustersListClustersIndexRoute:Mw,AuthEksclustersListClustersIndexRoute:jw,AuthIaminstanceProfilesListInstanceProfilesIndexRoute:Aw,AuthIampoliciesListPoliciesIndexRoute:kw,AuthIamrolesListRolesIndexRoute:Ow,AuthIamusersListUsersIndexRoute:Dw,AuthEcsclustersListClustersClusterNameServicesServiceNameRoute:bT,AuthEcsclustersListClustersClusterNameTasksTaskIdRoute:yT},CT={AuthRouteRoute:$._addFileChildren(ST),LoginRoute:YC},wT=Kb._addFileChildren(CT)._addFileTypes(),TT=zb(),ET=Cs({routeTree:wT,context:{queryClient:TT},defaultPreload:`intent`,scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),DT=document.querySelector(`#app`);DT&&!DT.innerHTML&&Is.createRoot(DT).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(Bs,{defaultTheme:`dark`,storageKey:`spinifex-ui-theme`,children:(0,G.jsx)($i,{client:TT,children:(0,G.jsx)(by,{children:(0,G.jsx)(Ig,{children:(0,G.jsx)(Es,{router:ET})})})})})}));export{pS as $,cd as $n,Qi as $r,Cx as $t,aC as A,rh as An,ol as Ar,tx as At,qS as B,rf as Bn,Dc as Br,xx as Bt,EC as C,qm as Cn,vl as Cr,Ix as Ct,oC as D,Xm as Dn,sl as Dr,yx as Dt,CC as E,eh as En,dl as Er,bx as Et,$S as F,Q as Fn,Bc as Fr,ux as Ft,gS as G,Dd as Gn,uc as Gr,dx as Gt,AS as H,$d as Hn,xc as Hr,hx as Ht,ZS as I,Ap as In,Rc as Ir,lx as It,uS as J,Z as Jn,tc as Jr,cx as Jt,hS as K,Od as Kn,oc as Kr,vx as Kt,KS as L,sp as Ln,Ic as Lr,rx as Lt,XS as M,Xp as Mn,$c as Mr,Zb as Mt,eC as N,Gp as Nn,Jc as Nr,$b as Nt,rC as O,Zm as On,il as Or,Yb as Ot,QS as P,Vp as Pn,Vc as Pr,Xb as Pt,mS as Q,ld as Qn,es as Qr,wx as Qt,GS as R,bf as Rn,Nc as Rr,nx as Rt,DC as S,$m as Sn,xl as Sr,Lx as St,wC as T,Ym as Tn,pl as Tr,Tx as Tt,TS as U,Kd as Un,bc as Ur,ix as Ut,RS as V,af as Vn,Cc as Vr,gx as Vt,bS as W,Md as Wn,gc as Wr,fx as Wt,vS as X,fd as Xn,Hs as Xr,ox as Xt,lS as Y,pd as Yn,Y as Yr,sx as Yt,yS as Z,dd as Zn,vs as Zr,ax as Zt,MC as _,Wm as _n,Zl as _r,zx as _t,WC as a,di as ai,ly as an,Uu as ar,Qx as at,kC as b,Km as bn,Sl as br,Wx as bt,VC as c,bi as ci,dg as cn,Iu as cr,iS as ct,RC as d,hi as di,Th as dn,Pu as dr,Rx as dt,Ki as ei,mx as en,sd as er,fS as et,LC as f,Ti as fi,yh as fn,Au as fr,Gx as ft,NC as g,Xr as gi,sh as gn,ru as gr,Kx as gt,PC as h,Zr as hi,ch as hn,Ql as hr,Jx as ht,GC as i,Di as ii,gy as in,Wu as ir,$x as it,YS as j,ym as jn,tl as jr,ex as jt,iC as k,nh as kn,al as kr,Qb as kt,BC as l,si as li,ng as ln,zu as lr,rS as lt,FC as m,$r as mi,lh as mn,$l as mr,qx as mt,qC as n,ji as ni,qb as nn,Ju as nr,sS as nt,UC as o,ii as oi,mg as on,Hu as or,nS as ot,IC as p,ai as pi,uh as pn,eu as pr,Hx as pt,dS as q,wd as qn,ac as qr,_x as qt,KC as r,Oi as ri,xy as rn,Gu as rr,oS as rt,HC as s,ni as si,pg as sn,Vu as sr,eS as st,JC as t,Hi as ti,px as tn,Yu as tr,_S as tt,zC as u,oi as ui,Dh as un,Nu as ur,tS as ut,jC as v,Qm as vn,tu as vr,Bx as vt,TC as w,Jm as wn,hl as wr,Ex as wt,OC as x,Um as xn,bl as xr,Ux as xt,AC as y,Gm as yn,Xl as yr,Vx as yt,JS as z,mf as zn,Oc as zr,Sx as zt}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-clusters.js b/spinifex/services/spinifexui/frontend/dist/assets/list-clusters.js index 7080e71e6..0c9984ac7 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-clusters.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-clusters.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{ni as a}from"./awsClient.js";import{t as o}from"./button.js";import{r as s,t as c}from"./ecs.js";import{Xr as l,er as u,rt as d}from"./index.js";import{t as f}from"./error-banner.js";import{t as p}from"./page-heading.js";import{a as m,t as h}from"./field.js";import{a as g,i as _,l as v,n as y,o as b,r as x,s as S,t as C}from"./alert-dialog.js";import{t as w}from"./delete-confirmation-dialog.js";import{t as T}from"./state-badge.js";var E=r(),D=t(n(),1),O=e();function k(e){let t=(0,E.c)(32),{open:n,onOpenChange:r}=e,i=c(),[a,o]=(0,D.useState)(``),s;t[0]!==i||t[1]!==r?(s=function(e){e||(o(``),i.reset()),r(e)},t[0]=i,t[1]=r,t[2]=s):s=t[2];let l=s,d;t[3]!==i||t[4]!==l||t[5]!==a?(d=async function(){try{await i.mutateAsync(a.trim()),l(!1)}catch{}},t[3]=i,t[4]=l,t[5]=a,t[6]=d):d=t[6];let f=d,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,O.jsxs)(S,{children:[(0,O.jsx)(v,{children:`Create Cluster`}),(0,O.jsx)(g,{children:`A cluster groups the services, tasks, and container instances that run on it.`})]}),t[7]=p):p=t[7];let w;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,O.jsx)(m,{children:(0,O.jsx)(`label`,{htmlFor:`clusterName`,children:`Name`})}),t[8]=w):w=t[8];let T;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>o(e.target.value),t[9]=T):T=t[9];let k;t[10]===a?k=t[11]:(k=(0,O.jsxs)(h,{children:[w,(0,O.jsx)(u,{id:`clusterName`,onChange:T,placeholder:`my-cluster`,value:a})]}),t[10]=a,t[11]=k);let A;t[12]===i.error?A=t[13]:(A=i.error&&(0,O.jsx)(`p`,{className:`text-sm text-destructive`,children:i.error.message}),t[12]=i.error,t[13]=A);let j;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,O.jsx)(x,{children:`Cancel`}),t[14]=j):j=t[14];let M;t[15]!==i.isPending||t[16]!==a?(M=i.isPending||!a.trim(),t[15]=i.isPending,t[16]=a,t[17]=M):M=t[17];let N;t[18]===f?N=t[19]:(N=e=>{e.preventDefault(),f()},t[18]=f,t[19]=N);let P=i.isPending?`Creating…`:`Create Cluster`,F;t[20]!==N||t[21]!==P||t[22]!==M?(F=(0,O.jsxs)(b,{children:[j,(0,O.jsx)(y,{disabled:M,onClick:N,children:P})]}),t[20]=N,t[21]=P,t[22]=M,t[23]=F):F=t[23];let I;t[24]!==F||t[25]!==k||t[26]!==A?(I=(0,O.jsxs)(_,{children:[p,k,A,F]}),t[24]=F,t[25]=k,t[26]=A,t[27]=I):I=t[27];let L;return t[28]!==l||t[29]!==n||t[30]!==I?(L=(0,O.jsx)(C,{onOpenChange:l,open:n,children:I}),t[28]=l,t[29]=n,t[30]=I,t[31]=L):L=t[31],L}function A(){let e=(0,E.c)(23),t=l(),{data:n}=i(d),r=s(),[c,u]=(0,D.useState)(!1),[m,h]=(0,D.useState)(null),g;e[0]!==r||e[1]!==m?(g=function(){m&&r.mutate(m,{onSuccess:()=>h(null)})},e[0]=r,e[1]=m,e[2]=g):g=e[2];let _=g,v;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,O.jsx)(p,{actions:(0,O.jsx)(o,{onClick:()=>u(!0),children:`Create Cluster`}),title:`Clusters`}),e[3]=v):v=e[3];let y;e[4]!==r.error||e[5]!==r.isError?(y=r.isError&&(0,O.jsx)(f,{error:r.error instanceof Error?r.error:void 0,msg:`Failed to delete cluster.`}),e[4]=r.error,e[5]=r.isError,e[6]=y):y=e[6];let b;e[7]!==n||e[8]!==t?(b=n.length>0?(0,O.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,O.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,O.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,O.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,O.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Services`}),(0,O.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running Tasks`}),(0,O.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Instances`}),(0,O.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,O.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,O.jsx)(`tbody`,{children:n.map(e=>{if(!e.clusterName)return null;let n=e.clusterName;return(0,O.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:n}}),children:[(0,O.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,O.jsx)(a,{className:`text-primary hover:underline`,onClick:j,params:{clusterName:n},to:`/ecs/list-clusters/$clusterName`,children:n})}),(0,O.jsx)(`td`,{className:`px-4 py-2`,children:(0,O.jsx)(T,{state:e.status})}),(0,O.jsx)(`td`,{className:`px-4 py-2`,children:e.activeServicesCount??0}),(0,O.jsx)(`td`,{className:`px-4 py-2`,children:e.runningTasksCount??0}),(0,O.jsx)(`td`,{className:`px-4 py-2`,children:e.registeredContainerInstancesCount??0}),(0,O.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,O.jsx)(o,{onClick:e=>{e.stopPropagation(),h(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n)})})]})}):(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:`No ECS clusters found.`}),e[7]=n,e[8]=t,e[9]=b):b=e[9];let x;e[10]===c?x=e[11]:(x=(0,O.jsx)(k,{onOpenChange:u,open:c}),e[10]=c,e[11]=x);let S=`This permanently deletes cluster "${m}" and force-stops every task it holds. This cannot be undone.`,C;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>!e&&h(null),e[12]=C):C=e[12];let A=m!==null,M;e[13]!==r.isPending||e[14]!==_||e[15]!==S||e[16]!==A?(M=(0,O.jsx)(w,{description:S,isPending:r.isPending,onConfirm:_,onOpenChange:C,open:A,title:`Delete cluster`}),e[13]=r.isPending,e[14]=_,e[15]=S,e[16]=A,e[17]=M):M=e[17];let N;return e[18]!==y||e[19]!==b||e[20]!==x||e[21]!==M?(N=(0,O.jsxs)(O.Fragment,{children:[v,y,b,x,M]}),e[18]=y,e[19]=b,e[20]=x,e[21]=M,e[22]=N):N=e[22],N}function j(e){return e.stopPropagation()}var M=A;export{M as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{ni as a}from"./awsClient.js";import{t as o}from"./check.js";import{t as s}from"./copy.js";import{t as c}from"./rotate-cw.js";import{t as l}from"./triangle-alert.js";import{t as u}from"./button.js";import{r as d,t as f}from"./ecs.js";import{$r as p,Qr as m,at as h,jt as g,nr as _}from"./index.js";import{t as v}from"./use-copy-to-clipboard.js";import{t as y}from"./error-banner.js";import{t as b}from"./page-heading.js";import{a as x,t as S}from"./field.js";import{a as C,i as w,l as T,n as E,o as D,r as O,s as k,t as A}from"./alert-dialog.js";import{t as j}from"./delete-confirmation-dialog.js";import{t as M}from"./state-badge.js";import{t as N}from"./system-managed.js";import{t as P}from"./ecs-section-nav.js";var F=r(),I=t(n(),1),L=e();function R(e){let t=(0,F.c)(32),{open:n,onOpenChange:r}=e,i=f(),[a,o]=(0,I.useState)(``),s;t[0]!==i||t[1]!==r?(s=function(e){e||(o(``),i.reset()),r(e)},t[0]=i,t[1]=r,t[2]=s):s=t[2];let c=s,l;t[3]!==i||t[4]!==c||t[5]!==a?(l=async function(){try{await i.mutateAsync(a.trim()),c(!1)}catch{}},t[3]=i,t[4]=c,t[5]=a,t[6]=l):l=t[6];let u=l,d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,L.jsxs)(k,{children:[(0,L.jsx)(T,{children:`Create Cluster`}),(0,L.jsx)(C,{children:`A cluster groups the services, tasks, and container instances that run on it.`})]}),t[7]=d):d=t[7];let p;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,L.jsx)(x,{children:(0,L.jsx)(`label`,{htmlFor:`clusterName`,children:`Name`})}),t[8]=p):p=t[8];let m;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>o(e.target.value),t[9]=m):m=t[9];let h;t[10]===a?h=t[11]:(h=(0,L.jsxs)(S,{children:[p,(0,L.jsx)(_,{id:`clusterName`,onChange:m,placeholder:`my-cluster`,value:a})]}),t[10]=a,t[11]=h);let g;t[12]===i.error?g=t[13]:(g=i.error&&(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:i.error.message}),t[12]=i.error,t[13]=g);let v;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,L.jsx)(O,{children:`Cancel`}),t[14]=v):v=t[14];let y;t[15]!==i.isPending||t[16]!==a?(y=i.isPending||!a.trim(),t[15]=i.isPending,t[16]=a,t[17]=y):y=t[17];let b;t[18]===u?b=t[19]:(b=e=>{e.preventDefault(),u()},t[18]=u,t[19]=b);let j=i.isPending?`Creating…`:`Create Cluster`,M;t[20]!==b||t[21]!==j||t[22]!==y?(M=(0,L.jsxs)(D,{children:[v,(0,L.jsx)(E,{disabled:y,onClick:b,children:j})]}),t[20]=b,t[21]=j,t[22]=y,t[23]=M):M=t[23];let N;t[24]!==M||t[25]!==h||t[26]!==g?(N=(0,L.jsxs)(w,{children:[d,h,g,M]}),t[24]=M,t[25]=h,t[26]=g,t[27]=N):N=t[27];let P;return t[28]!==c||t[29]!==n||t[30]!==N?(P=(0,L.jsx)(A,{onOpenChange:c,open:n,children:N}),t[28]=c,t[29]=n,t[30]=N,t[31]=P):P=t[31],P}var z=`spx admin images import --name spinifex-ecs-node`;function B(e){let t=(0,F.c)(21),{isRechecking:n,onRecheck:r}=e,{copied:i,copy:a}=v(),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,L.jsx)(l,{className:`mt-0.5 size-5 shrink-0 text-tactical-amber`}),t[0]=d):d=t[0];let f;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`ECS system image not found`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`ECS clusters need a Spinifex-managed node image (containerd + ecs-agent) to launch container instances. Import it before creating a cluster.`})]}),t[1]=f):f=t[1];let p,m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,L.jsx)(`span`,{className:`text-muted-foreground select-none`,children:`$`}),m=(0,L.jsx)(`span`,{className:`flex-1 text-foreground`,children:z}),t[2]=p,t[3]=m):(p=t[2],m=t[3]);let h;t[4]===a?h=t[5]:(h=()=>void a(z),t[4]=a,t[5]=h);let g;t[6]===i?g=t[7]:(g=i?(0,L.jsx)(o,{className:`size-3.5 text-tactical-green`}):(0,L.jsx)(s,{className:`size-3.5`}),t[6]=i,t[7]=g);let _;t[8]!==h||t[9]!==g?(_=(0,L.jsxs)(`div`,{className:`flex items-center gap-2 rounded border border-border bg-background px-3 py-2 font-mono text-xs`,children:[p,m,(0,L.jsx)(`button`,{"aria-label":`Copy command`,className:`text-muted-foreground transition-colors hover:text-foreground`,onClick:h,type:`button`,children:g})]}),t[8]=h,t[9]=g,t[10]=_):_=t[10];let y;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Run from any authenticated spx CLI host. The command downloads and registers the published node image, then click Recheck.`}),t[11]=y):y=t[11];let b=n?`size-4 animate-spin`:`size-4`,x;t[12]===b?x=t[13]:(x=(0,L.jsx)(c,{className:b}),t[12]=b,t[13]=x);let S;t[14]!==n||t[15]!==r||t[16]!==x?(S=(0,L.jsxs)(u,{disabled:n,onClick:r,size:`sm`,variant:`outline`,children:[x,`Recheck`]}),t[14]=n,t[15]=r,t[16]=x,t[17]=S):S=t[17];let C;return t[18]!==S||t[19]!==_?(C=(0,L.jsx)(`div`,{className:`mb-6 max-w-2xl rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-6`,children:(0,L.jsxs)(`div`,{className:`flex items-start gap-3`,children:[d,(0,L.jsxs)(`div`,{className:`space-y-4`,children:[f,_,y,S]})]})}),t[18]=S,t[19]=_,t[20]=C):C=t[20],C}function V(){let e=m(),t=p(),{data:n}=i(h),{data:r}=i(g),o=d(),[s,c]=(0,I.useState)(!1),[l,f]=(0,I.useState)(null),[_,v]=(0,I.useState)(!1),x=(r.Images??[]).some(N);async function S(){v(!0);try{await t.invalidateQueries({queryKey:g.queryKey})}finally{v(!1)}}function C(){l&&o.mutate(l,{onSuccess:()=>f(null)})}return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(b,{actions:(0,L.jsx)(u,{disabled:!x,onClick:()=>c(!0),children:`Create Cluster`}),title:`Clusters`}),(0,L.jsx)(P,{}),!x&&(0,L.jsx)(B,{isRechecking:_,onRecheck:S}),o.isError&&(0,L.jsx)(y,{error:o.error instanceof Error?o.error:void 0,msg:`Failed to delete cluster.`}),n.length>0?(0,L.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,L.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,L.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,L.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Services`}),(0,L.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running Tasks`}),(0,L.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Instances`}),(0,L.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,L.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,L.jsx)(`tbody`,{children:n.map(t=>{if(!t.clusterName)return null;let n=t.clusterName;return(0,L.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await e({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:n}}),children:[(0,L.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,L.jsx)(a,{className:`text-primary hover:underline`,onClick:e=>e.stopPropagation(),params:{clusterName:n},to:`/ecs/list-clusters/$clusterName`,children:n})}),(0,L.jsx)(`td`,{className:`px-4 py-2`,children:(0,L.jsx)(M,{state:t.status})}),(0,L.jsx)(`td`,{className:`px-4 py-2`,children:t.activeServicesCount??0}),(0,L.jsx)(`td`,{className:`px-4 py-2`,children:t.runningTasksCount??0}),(0,L.jsx)(`td`,{className:`px-4 py-2`,children:t.registeredContainerInstancesCount??0}),(0,L.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,L.jsx)(u,{onClick:e=>{e.stopPropagation(),f(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n)})})]})}):(0,L.jsx)(`p`,{className:`text-muted-foreground`,children:`No ECS clusters found.`}),(0,L.jsx)(R,{onOpenChange:c,open:s}),(0,L.jsx)(j,{description:`This permanently deletes cluster "${l}" and force-stops every task it holds. This cannot be undone.`,isPending:o.isPending,onConfirm:C,onOpenChange:e=>!e&&f(null),open:l!==null,title:`Delete cluster`})]})}var H=V;export{H as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-clusters2.js b/spinifex/services/spinifexui/frontend/dist/assets/list-clusters2.js index 6e9e1712b..f8e2d3e3a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-clusters2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-clusters2.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{I as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.clusters){let n=(t.clusters??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/eks/create-cluster`,children:(0,l.jsx)(i,{children:`Create Cluster`})}),title:`Clusters`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No EKS clusters found.`})]}),e[0]=t.clusters,e[1]=s}else s=e[1];return s}function d(e){return(0,l.jsx)(s,{params:{clusterName:e},title:e,to:`/eks/list-clusters/$clusterName`},e)}function f(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}var p=u;export{p as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{R as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.clusters){let n=(t.clusters??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/eks/create-cluster`,children:(0,l.jsx)(i,{children:`Create Cluster`})}),title:`Clusters`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No EKS clusters found.`})]}),e[0]=t.clusters,e[1]=s}else s=e[1];return s}function d(e){return(0,l.jsx)(s,{params:{clusterName:e},title:e,to:`/eks/list-clusters/$clusterName`},e)}function f(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}var p=u;export{p as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-instance-profiles.js b/spinifex/services/spinifexui/frontend/dist/assets/list-instance-profiles.js index 5d5453ea4..99cca1d43 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-instance-profiles.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-instance-profiles.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{mt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.InstanceProfiles){let n=(t.InstanceProfiles??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-instance-profile`,children:(0,l.jsx)(i,{children:`Create Instance Profile`})}),title:`Instance Profiles`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No instance profiles found.`})]}),e[0]=t.InstanceProfiles,e[1]=s}else s=e[1];return s}function d(e){return e.InstanceProfileName?(0,l.jsx)(s,{params:{instanceProfileName:e.InstanceProfileName},subtitle:e.Arn??``,title:e.InstanceProfileName,to:`/iam/list-instance-profiles/$instanceProfileName`},e.InstanceProfileName):null}function f(e,t){let n=e.InstanceProfileName?.toLowerCase()??``,r=t.InstanceProfileName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{gt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.InstanceProfiles){let n=(t.InstanceProfiles??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-instance-profile`,children:(0,l.jsx)(i,{children:`Create Instance Profile`})}),title:`Instance Profiles`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No instance profiles found.`})]}),e[0]=t.InstanceProfiles,e[1]=s}else s=e[1];return s}function d(e){return e.InstanceProfileName?(0,l.jsx)(s,{params:{instanceProfileName:e.InstanceProfileName},subtitle:e.Arn??``,title:e.InstanceProfileName,to:`/iam/list-instance-profiles/$instanceProfileName`},e.InstanceProfileName):null}function f(e,t){let n=e.InstanceProfileName?.toLowerCase()??``,r=t.InstanceProfileName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-policies.js b/spinifex/services/spinifexui/frontend/dist/assets/list-policies.js index fe568c49d..dd2e7a195 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-policies.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-policies.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{ht as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Policies){let n=(t.Policies??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-policy`,children:(0,l.jsx)(i,{children:`Create Policy`})}),title:`Policies`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),e[0]=t.Policies,e[1]=s}else s=e[1];return s}function d(e){return e.Arn?(0,l.jsx)(s,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:e.Arn??``,title:e.PolicyName??``,to:`/iam/list-policies/$policyArn`},e.Arn):null}function f(e,t){let n=e.PolicyName?.toLowerCase()??``,r=t.PolicyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{_t as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Policies){let n=(t.Policies??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-policy`,children:(0,l.jsx)(i,{children:`Create Policy`})}),title:`Policies`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),e[0]=t.Policies,e[1]=s}else s=e[1];return s}function d(e){return e.Arn?(0,l.jsx)(s,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:e.Arn??``,title:e.PolicyName??``,to:`/iam/list-policies/$policyArn`},e.Arn):null}function f(e,t){let n=e.PolicyName?.toLowerCase()??``,r=t.PolicyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-repositories.js b/spinifex/services/spinifexui/frontend/dist/assets/list-repositories.js index 12f1b09e3..ace76fbe7 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-repositories.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-repositories.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{ni as a}from"./awsClient.js";import{Bt as o}from"./auth.js";import{t as s}from"./button.js";import{i as c,n as l}from"./ecr.js";import{E as u,Xr as d,er as f}from"./index.js";import{t as p}from"./page-heading.js";import{a as m,t as h}from"./field.js";import{a as g,i as _,l as v,n as y,o as b,r as x,s as S,t as C}from"./alert-dialog.js";var w=r(),T=t(n(),1),E=e();function D(e){let t=(0,w.c)(32),{open:n,onOpenChange:r}=e,i=l(),[a,o]=(0,T.useState)(``),s;t[0]!==i||t[1]!==r?(s=function(e){e||(o(``),i.reset()),r(e)},t[0]=i,t[1]=r,t[2]=s):s=t[2];let c=s,u;t[3]!==i||t[4]!==c||t[5]!==a?(u=async function(){try{await i.mutateAsync(a.trim()),c(!1)}catch{}},t[3]=i,t[4]=c,t[5]=a,t[6]=u):u=t[6];let d=u,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,E.jsxs)(S,{children:[(0,E.jsx)(v,{children:`Create Repository`}),(0,E.jsxs)(g,{children:[`Repository names may include namespaces, e.g. `,`team/app`,`.`]})]}),t[7]=p):p=t[7];let D;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,E.jsx)(m,{children:(0,E.jsx)(`label`,{htmlFor:`repositoryName`,children:`Name`})}),t[8]=D):D=t[8];let O;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>o(e.target.value),t[9]=O):O=t[9];let k;t[10]===a?k=t[11]:(k=(0,E.jsxs)(h,{children:[D,(0,E.jsx)(f,{id:`repositoryName`,onChange:O,placeholder:`team/app`,value:a})]}),t[10]=a,t[11]=k);let A;t[12]===i.error?A=t[13]:(A=i.error&&(0,E.jsx)(`p`,{className:`text-sm text-destructive`,children:i.error.message}),t[12]=i.error,t[13]=A);let j;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,E.jsx)(x,{children:`Cancel`}),t[14]=j):j=t[14];let M;t[15]!==i.isPending||t[16]!==a?(M=i.isPending||!a.trim(),t[15]=i.isPending,t[16]=a,t[17]=M):M=t[17];let N;t[18]===d?N=t[19]:(N=e=>{e.preventDefault(),d()},t[18]=d,t[19]=N);let P=i.isPending?`Creating…`:`Create Repository`,F;t[20]!==N||t[21]!==P||t[22]!==M?(F=(0,E.jsxs)(b,{children:[j,(0,E.jsx)(y,{disabled:M,onClick:N,children:P})]}),t[20]=N,t[21]=P,t[22]=M,t[23]=F):F=t[23];let I;t[24]!==F||t[25]!==k||t[26]!==A?(I=(0,E.jsxs)(_,{children:[p,k,A,F]}),t[24]=F,t[25]=k,t[26]=A,t[27]=I):I=t[27];let L;return t[28]!==c||t[29]!==n||t[30]!==I?(L=(0,E.jsx)(C,{onOpenChange:c,open:n,children:I}),t[28]=c,t[29]=n,t[30]=I,t[31]=L):L=t[31],L}function O(){let e=(0,w.c)(35),t=d(),{data:n}=i(u),r=c(),[l,f]=(0,T.useState)(!1),[m,h]=(0,T.useState)(null),O;e[0]===n.repositories?O=e[1]:(O=n.repositories??[],e[0]=n.repositories,e[1]=O);let A=O,j;e[2]!==r||e[3]!==m?(j=async function(){if(m)try{await r.mutateAsync(m),h(null)}catch{}},e[2]=r,e[3]=m,e[4]=j):j=e[4];let M=j,N;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,E.jsx)(p,{actions:(0,E.jsx)(s,{onClick:()=>f(!0),children:`Create Repository`}),title:`Repositories`}),e[5]=N):N=e[5];let P;e[6]!==t||e[7]!==A?(P=A.length>0?(0,E.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,E.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,E.jsx)(`thead`,{children:(0,E.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`URI`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Tag Mutability`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,E.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,E.jsx)(`tbody`,{children:A.map(e=>{if(!e.repositoryName)return null;let n=e.repositoryName;return(0,E.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ecr/list-repositories/$id`,params:{id:encodeURIComponent(n)}}),children:[(0,E.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,E.jsx)(a,{className:`text-primary hover:underline`,onClick:k,params:{id:encodeURIComponent(n)},to:`/ecr/list-repositories/$id`,children:n})}),(0,E.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.repositoryUri??``}),(0,E.jsx)(`td`,{className:`px-4 py-2`,children:e.imageTagMutability??``}),(0,E.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:o(e.createdAt)}),(0,E.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,E.jsx)(s,{onClick:e=>{e.stopPropagation(),h(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n)})})]})}):(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`No repositories found.`}),e[6]=t,e[7]=A,e[8]=P):P=e[8];let F;e[9]===l?F=e[10]:(F=(0,E.jsx)(D,{onOpenChange:f,open:l}),e[9]=l,e[10]=F);let I;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>!e&&h(null),e[11]=I):I=e[11];let L=m!==null,R;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,E.jsx)(v,{children:`Delete repository?`}),e[12]=R):R=e[12];let z;e[13]===m?z=e[14]:(z=(0,E.jsxs)(S,{children:[R,(0,E.jsxs)(g,{children:[`This permanently deletes `,m,` and every image it holds. This cannot be undone.`]})]}),e[13]=m,e[14]=z);let B;e[15]===r.error?B=e[16]:(B=r.error&&(0,E.jsx)(`p`,{className:`text-sm text-destructive`,children:r.error.message}),e[15]=r.error,e[16]=B);let V;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,E.jsx)(x,{children:`Cancel`}),e[17]=V):V=e[17];let H;e[18]===M?H=e[19]:(H=e=>{e.preventDefault(),M()},e[18]=M,e[19]=H);let U=r.isPending?`Deleting…`:`Delete`,W;e[20]!==r.isPending||e[21]!==H||e[22]!==U?(W=(0,E.jsxs)(b,{children:[V,(0,E.jsx)(y,{disabled:r.isPending,onClick:H,children:U})]}),e[20]=r.isPending,e[21]=H,e[22]=U,e[23]=W):W=e[23];let G;e[24]!==W||e[25]!==z||e[26]!==B?(G=(0,E.jsxs)(_,{children:[z,B,W]}),e[24]=W,e[25]=z,e[26]=B,e[27]=G):G=e[27];let K;e[28]!==G||e[29]!==L?(K=(0,E.jsx)(C,{onOpenChange:I,open:L,children:G}),e[28]=G,e[29]=L,e[30]=K):K=e[30];let q;return e[31]!==K||e[32]!==P||e[33]!==F?(q=(0,E.jsxs)(E.Fragment,{children:[N,P,F,K]}),e[31]=K,e[32]=P,e[33]=F,e[34]=q):q=e[34],q}function k(e){return e.stopPropagation()}var A=O;export{A as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{ni as a}from"./awsClient.js";import{Bt as o}from"./auth.js";import{t as s}from"./button.js";import{i as c,n as l}from"./ecr.js";import{O as u,Qr as d,nr as f}from"./index.js";import{t as p}from"./page-heading.js";import{a as m,t as h}from"./field.js";import{a as g,i as _,l as v,n as y,o as b,r as x,s as S,t as C}from"./alert-dialog.js";var w=r(),T=t(n(),1),E=e();function D(e){let t=(0,w.c)(32),{open:n,onOpenChange:r}=e,i=l(),[a,o]=(0,T.useState)(``),s;t[0]!==i||t[1]!==r?(s=function(e){e||(o(``),i.reset()),r(e)},t[0]=i,t[1]=r,t[2]=s):s=t[2];let c=s,u;t[3]!==i||t[4]!==c||t[5]!==a?(u=async function(){try{await i.mutateAsync(a.trim()),c(!1)}catch{}},t[3]=i,t[4]=c,t[5]=a,t[6]=u):u=t[6];let d=u,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,E.jsxs)(S,{children:[(0,E.jsx)(v,{children:`Create Repository`}),(0,E.jsxs)(g,{children:[`Repository names may include namespaces, e.g. `,`team/app`,`.`]})]}),t[7]=p):p=t[7];let D;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,E.jsx)(m,{children:(0,E.jsx)(`label`,{htmlFor:`repositoryName`,children:`Name`})}),t[8]=D):D=t[8];let O;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>o(e.target.value),t[9]=O):O=t[9];let k;t[10]===a?k=t[11]:(k=(0,E.jsxs)(h,{children:[D,(0,E.jsx)(f,{id:`repositoryName`,onChange:O,placeholder:`team/app`,value:a})]}),t[10]=a,t[11]=k);let A;t[12]===i.error?A=t[13]:(A=i.error&&(0,E.jsx)(`p`,{className:`text-sm text-destructive`,children:i.error.message}),t[12]=i.error,t[13]=A);let j;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,E.jsx)(x,{children:`Cancel`}),t[14]=j):j=t[14];let M;t[15]!==i.isPending||t[16]!==a?(M=i.isPending||!a.trim(),t[15]=i.isPending,t[16]=a,t[17]=M):M=t[17];let N;t[18]===d?N=t[19]:(N=e=>{e.preventDefault(),d()},t[18]=d,t[19]=N);let P=i.isPending?`Creating…`:`Create Repository`,F;t[20]!==N||t[21]!==P||t[22]!==M?(F=(0,E.jsxs)(b,{children:[j,(0,E.jsx)(y,{disabled:M,onClick:N,children:P})]}),t[20]=N,t[21]=P,t[22]=M,t[23]=F):F=t[23];let I;t[24]!==F||t[25]!==k||t[26]!==A?(I=(0,E.jsxs)(_,{children:[p,k,A,F]}),t[24]=F,t[25]=k,t[26]=A,t[27]=I):I=t[27];let L;return t[28]!==c||t[29]!==n||t[30]!==I?(L=(0,E.jsx)(C,{onOpenChange:c,open:n,children:I}),t[28]=c,t[29]=n,t[30]=I,t[31]=L):L=t[31],L}function O(){let e=(0,w.c)(35),t=d(),{data:n}=i(u),r=c(),[l,f]=(0,T.useState)(!1),[m,h]=(0,T.useState)(null),O;e[0]===n.repositories?O=e[1]:(O=n.repositories??[],e[0]=n.repositories,e[1]=O);let A=O,j;e[2]!==r||e[3]!==m?(j=async function(){if(m)try{await r.mutateAsync(m),h(null)}catch{}},e[2]=r,e[3]=m,e[4]=j):j=e[4];let M=j,N;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,E.jsx)(p,{actions:(0,E.jsx)(s,{onClick:()=>f(!0),children:`Create Repository`}),title:`Repositories`}),e[5]=N):N=e[5];let P;e[6]!==t||e[7]!==A?(P=A.length>0?(0,E.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,E.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,E.jsx)(`thead`,{children:(0,E.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`URI`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Tag Mutability`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,E.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,E.jsx)(`tbody`,{children:A.map(e=>{if(!e.repositoryName)return null;let n=e.repositoryName;return(0,E.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ecr/list-repositories/$id`,params:{id:encodeURIComponent(n)}}),children:[(0,E.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,E.jsx)(a,{className:`text-primary hover:underline`,onClick:k,params:{id:encodeURIComponent(n)},to:`/ecr/list-repositories/$id`,children:n})}),(0,E.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.repositoryUri??``}),(0,E.jsx)(`td`,{className:`px-4 py-2`,children:e.imageTagMutability??``}),(0,E.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:o(e.createdAt)}),(0,E.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,E.jsx)(s,{onClick:e=>{e.stopPropagation(),h(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n)})})]})}):(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`No repositories found.`}),e[6]=t,e[7]=A,e[8]=P):P=e[8];let F;e[9]===l?F=e[10]:(F=(0,E.jsx)(D,{onOpenChange:f,open:l}),e[9]=l,e[10]=F);let I;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>!e&&h(null),e[11]=I):I=e[11];let L=m!==null,R;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,E.jsx)(v,{children:`Delete repository?`}),e[12]=R):R=e[12];let z;e[13]===m?z=e[14]:(z=(0,E.jsxs)(S,{children:[R,(0,E.jsxs)(g,{children:[`This permanently deletes `,m,` and every image it holds. This cannot be undone.`]})]}),e[13]=m,e[14]=z);let B;e[15]===r.error?B=e[16]:(B=r.error&&(0,E.jsx)(`p`,{className:`text-sm text-destructive`,children:r.error.message}),e[15]=r.error,e[16]=B);let V;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,E.jsx)(x,{children:`Cancel`}),e[17]=V):V=e[17];let H;e[18]===M?H=e[19]:(H=e=>{e.preventDefault(),M()},e[18]=M,e[19]=H);let U=r.isPending?`Deleting…`:`Delete`,W;e[20]!==r.isPending||e[21]!==H||e[22]!==U?(W=(0,E.jsxs)(b,{children:[V,(0,E.jsx)(y,{disabled:r.isPending,onClick:H,children:U})]}),e[20]=r.isPending,e[21]=H,e[22]=U,e[23]=W):W=e[23];let G;e[24]!==W||e[25]!==z||e[26]!==B?(G=(0,E.jsxs)(_,{children:[z,B,W]}),e[24]=W,e[25]=z,e[26]=B,e[27]=G):G=e[27];let K;e[28]!==G||e[29]!==L?(K=(0,E.jsx)(C,{onOpenChange:I,open:L,children:G}),e[28]=G,e[29]=L,e[30]=K):K=e[30];let q;return e[31]!==K||e[32]!==P||e[33]!==F?(q=(0,E.jsxs)(E.Fragment,{children:[N,P,F,K]}),e[31]=K,e[32]=P,e[33]=F,e[34]=q):q=e[34],q}function k(e){return e.stopPropagation()}var A=O;export{A as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-roles.js b/spinifex/services/spinifexui/frontend/dist/assets/list-roles.js index 15820cb8d..e8d465457 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-roles.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-roles.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{yt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Roles){let n=(t.Roles??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-role`,children:(0,l.jsx)(i,{children:`Create Role`})}),title:`Roles`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM roles found.`})]}),e[0]=t.Roles,e[1]=s}else s=e[1];return s}function d(e){return e.RoleName?(0,l.jsx)(s,{params:{roleName:e.RoleName},subtitle:e.Arn??``,title:e.RoleName,to:`/iam/list-roles/$roleName`},e.RoleName):null}function f(e,t){let n=e.RoleName?.toLowerCase()??``,r=t.RoleName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{xt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Roles){let n=(t.Roles??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-role`,children:(0,l.jsx)(i,{children:`Create Role`})}),title:`Roles`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM roles found.`})]}),e[0]=t.Roles,e[1]=s}else s=e[1];return s}function d(e){return e.RoleName?(0,l.jsx)(s,{params:{roleName:e.RoleName},subtitle:e.Arn??``,title:e.RoleName,to:`/iam/list-roles/$roleName`},e.RoleName):null}function f(e,t){let n=e.RoleName?.toLowerCase()??``,r=t.RoleName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-users.js b/spinifex/services/spinifexui/frontend/dist/assets/list-users.js index 7c976903a..ced0300f0 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-users.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-users.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{xt as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Users){let n=(t.Users??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-user`,children:(0,l.jsx)(i,{children:`Create User`})}),title:`Users`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),e[0]=t.Users,e[1]=s}else s=e[1];return s}function d(e){return e.UserName?(0,l.jsx)(s,{params:{userName:e.UserName},subtitle:e.UserId??``,title:e.UserName,to:`/iam/list-users/$userName`},e.UserName):null}function f(e,t){let n=e.UserName?.toLowerCase()??``,r=t.UserName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{t as i}from"./button.js";import{Ct as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Users){let n=(t.Users??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-user`,children:(0,l.jsx)(i,{children:`Create User`})}),title:`Users`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),e[0]=t.Users,e[1]=s}else s=e[1];return s}function d(e){return e.UserName?(0,l.jsx)(s,{params:{userName:e.UserName},subtitle:e.UserId??``,title:e.UserName,to:`/iam/list-users/$userName`},e.UserName):null}function f(e,t){let n=e.UserName?.toLowerCase()??``,r=t.UserName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/login.js b/spinifex/services/spinifexui/frontend/dist/assets/login.js index 584fafab8..7356628eb 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/login.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/login.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./awsClient.js";import{i as a,t as o}from"./auth.js";import{t as s}from"./button.js";import{en as c,er as l,nn as u}from"./index.js";import{i as d,t as f}from"./zod.js";import{a as p,i as m,r as h,t as g}from"./field.js";import{n as _,r as v,t as y}from"./collapsible.js";import{a as b,o as x,r as S,t as C}from"./card.js";var w=r(),T=t(n()),E=e();function D(){let{reason:e}=c.useSearch(),[t,n]=(0,T.useState)(null),{register:r,handleSubmit:_,formState:{errors:v,isSubmitting:y}}=d({resolver:f(o)});async function w(e){n(null);try{a(await u(e)),i(),window.location.href=`/`}catch{n(`Invalid credentials. Please check your Access Key ID and Secret Access Key.`)}}return(0,E.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,E.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col gap-4`,children:[(0,E.jsxs)(C,{children:[(0,E.jsx)(b,{children:(0,E.jsx)(x,{children:`AWS Credentials`})}),(0,E.jsxs)(S,{children:[e===`expired`&&!t&&(0,E.jsx)(`p`,{className:`mb-4 rounded-md bg-muted p-3 text-sm text-muted-foreground`,children:`Your session is no longer valid — please sign in again.`}),t&&(0,E.jsx)(`p`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:t}),(0,E.jsx)(`form`,{onSubmit:_(w),children:(0,E.jsxs)(m,{children:[(0,E.jsxs)(g,{children:[(0,E.jsx)(p,{children:(0,E.jsx)(`label`,{htmlFor:`accessKeyId`,children:`Access Key ID`})}),(0,E.jsx)(l,{"aria-invalid":!!v.accessKeyId,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...r(`accessKeyId`)}),(0,E.jsx)(h,{errors:[v.accessKeyId]})]}),(0,E.jsxs)(g,{children:[(0,E.jsx)(p,{children:(0,E.jsx)(`label`,{htmlFor:`secretAccessKey`,children:`Secret Access Key`})}),(0,E.jsx)(l,{"aria-invalid":!!v.secretAccessKey,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...r(`secretAccessKey`)}),(0,E.jsx)(h,{errors:[v.secretAccessKey]})]}),(0,E.jsx)(s,{className:`w-full`,disabled:y,type:`submit`,children:y?`Signing in...`:`Sign In`})]})})]})]}),(0,E.jsx)(O,{})]})})}function O(){let e=(0,w.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-sm font-medium`,children:`Install Local Certificate Authority`}),(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`To avoid browser certificate warnings, download and install the Spinifex CA as a trusted root on your OS.`})]}),n=(0,E.jsx)(`a`,{className:`inline-flex h-8 w-full items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground`,download:`spinifex-ca.pem`,href:`/api/ca.pem`,children:`Download CA Certificate`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,E.jsx)(v,{className:`cursor-pointer text-xs text-muted-foreground underline-offset-4 hover:underline`,children:`Installation instructions`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,E.jsx)(C,{className:`border-muted bg-muted/30`,children:(0,E.jsx)(S,{className:`pt-4 pb-4`,children:(0,E.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,n,(0,E.jsxs)(y,{children:[r,(0,E.jsx)(_,{children:(0,E.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`macOS`}),(0,E.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain spinifex-ca.pem`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`Windows`}),(0,E.jsx)(`p`,{children:`Double-click the file → Install Certificate → Local Machine → Trusted Root Certification Authorities`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`Linux`}),(0,E.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo cp spinifex-ca.pem /usr/local/share/ca-certificates/spinifex-ca.crt && sudo update-ca-certificates`})]})]})})]})]})})}),e[3]=i):i=e[3],i}export{D as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./awsClient.js";import{i as a,t as o}from"./auth.js";import{t as s}from"./button.js";import{in as c,nn as l,nr as u}from"./index.js";import{i as d,t as f}from"./zod.js";import{a as p,i as m,r as h,t as g}from"./field.js";import{n as _,r as v,t as y}from"./collapsible.js";import{a as b,o as x,r as S,t as C}from"./card.js";var w=r(),T=t(n()),E=e();function D(){let{reason:e}=l.useSearch(),[t,n]=(0,T.useState)(null),{register:r,handleSubmit:_,formState:{errors:v,isSubmitting:y}}=d({resolver:f(o)});async function w(e){n(null);try{a(await c(e)),i(),window.location.href=`/`}catch{n(`Invalid credentials. Please check your Access Key ID and Secret Access Key.`)}}return(0,E.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,E.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col gap-4`,children:[(0,E.jsxs)(C,{children:[(0,E.jsx)(b,{children:(0,E.jsx)(x,{children:`AWS Credentials`})}),(0,E.jsxs)(S,{children:[e===`expired`&&!t&&(0,E.jsx)(`p`,{className:`mb-4 rounded-md bg-muted p-3 text-sm text-muted-foreground`,children:`Your session is no longer valid — please sign in again.`}),t&&(0,E.jsx)(`p`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:t}),(0,E.jsx)(`form`,{onSubmit:_(w),children:(0,E.jsxs)(m,{children:[(0,E.jsxs)(g,{children:[(0,E.jsx)(p,{children:(0,E.jsx)(`label`,{htmlFor:`accessKeyId`,children:`Access Key ID`})}),(0,E.jsx)(u,{"aria-invalid":!!v.accessKeyId,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...r(`accessKeyId`)}),(0,E.jsx)(h,{errors:[v.accessKeyId]})]}),(0,E.jsxs)(g,{children:[(0,E.jsx)(p,{children:(0,E.jsx)(`label`,{htmlFor:`secretAccessKey`,children:`Secret Access Key`})}),(0,E.jsx)(u,{"aria-invalid":!!v.secretAccessKey,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...r(`secretAccessKey`)}),(0,E.jsx)(h,{errors:[v.secretAccessKey]})]}),(0,E.jsx)(s,{className:`w-full`,disabled:y,type:`submit`,children:y?`Signing in...`:`Sign In`})]})})]})]}),(0,E.jsx)(O,{})]})})}function O(){let e=(0,w.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-sm font-medium`,children:`Install Local Certificate Authority`}),(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`To avoid browser certificate warnings, download and install the Spinifex CA as a trusted root on your OS.`})]}),n=(0,E.jsx)(`a`,{className:`inline-flex h-8 w-full items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground`,download:`spinifex-ca.pem`,href:`/api/ca.pem`,children:`Download CA Certificate`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,E.jsx)(v,{className:`cursor-pointer text-xs text-muted-foreground underline-offset-4 hover:underline`,children:`Installation instructions`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,E.jsx)(C,{className:`border-muted bg-muted/30`,children:(0,E.jsx)(S,{className:`pt-4 pb-4`,children:(0,E.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,n,(0,E.jsxs)(y,{children:[r,(0,E.jsx)(_,{children:(0,E.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`macOS`}),(0,E.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain spinifex-ca.pem`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`Windows`}),(0,E.jsx)(`p`,{children:`Double-click the file → Install Certificate → Local Machine → Trusted Root Certification Authorities`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`Linux`}),(0,E.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo cp spinifex-ca.pem /usr/local/share/ca-certificates/spinifex-ca.crt && sudo update-ca-certificates`})]})]})})]})]})})}),e[3]=i):i=e[3],i}export{D as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/ls.js b/spinifex/services/spinifexui/frontend/dist/assets/ls.js index e4d7f2b00..941140c9d 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/ls.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/ls.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Bt as i}from"./auth.js";import{t as a}from"./button.js";import{Ct as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(o),i;e[0]===t.Buckets?i=e[1]:(i=t.Buckets??[],e[0]=t.Buckets,e[1]=i);let c=i,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/s3/create-bucket`,children:(0,u.jsx)(a,{children:`Create Bucket`})}),title:`Buckets`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No buckets found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.Name?(0,u.jsx)(c,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${i(e.CreationDate)}`:void 0,title:e.Name,to:`/s3/ls/$bucket`},e.Name):null}export{d as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{ni as r}from"./awsClient.js";import{Bt as i}from"./auth.js";import{t as a}from"./button.js";import{Tt as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(o),i;e[0]===t.Buckets?i=e[1]:(i=t.Buckets??[],e[0]=t.Buckets,e[1]=i);let c=i,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/s3/create-bucket`,children:(0,u.jsx)(a,{children:`Create Bucket`})}),title:`Buckets`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No buckets found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.Name?(0,u.jsx)(c,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${i(e.CreationDate)}`:void 0,title:e.Name,to:`/s3/ls/$bucket`},e.Name):null}export{d as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/nodes.js b/spinifex/services/spinifexui/frontend/dist/assets/nodes.js index 2ce5c837c..00cf861ad 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/nodes.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/nodes.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{n as r}from"./redirect.js";import{Ht as i}from"./auth.js";import{tn as a}from"./index.js";import{t as o}from"./page-heading.js";import{r as s,t as c}from"./admin.js";import{t as l}from"./badge.js";import{a as u,o as d,r as f,t as p}from"./card.js";var m=t(),h=e();function g(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function _(e){return e>=1?`${e.toFixed(1)}Gi`:`${Math.round(e*1024)}Mi`}function v(e){let t=Math.floor(Date.now()/1e3-e);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h ${n%60}m`:`${Math.floor(r/24)}d ${r%24}h`}function y(){let e=(0,m.c)(31),{isAdmin:t}=a(),i;e[0]===t?i=e[1]:(i={...c,enabled:t,refetchInterval:5e3},e[0]=t,e[1]=i);let{data:l}=n(i),g;e[2]===t?g=e[3]:(g={...s,enabled:t,refetchInterval:5e3},e[2]=t,e[3]=g);let{data:_}=n(g);if(!t)throw r({to:`/`});let v,y,T;if(e[4]!==l?.nodes||e[5]!==_?.vms){v=l?.nodes??[];let t;e[9]===_?.vms?t=e[10]:(t=_?.vms??[],e[9]=_?.vms,e[10]=t);let n;e[11]===t?n=e[12]:(n=t.filter(C),e[11]=t,e[12]=n),T=n;let r=new Map;for(let e of v)for(let t of e.instance_types??[]){let e=r.get(t.name);e?e.available+=t.available:r.set(t.name,{vcpu:t.vcpu,memory_gb:t.memory_gb,available:t.available})}y=[...r.entries()].map(S).toSorted(x),e[4]=l?.nodes,e[5]=_?.vms,e[6]=v,e[7]=y,e[8]=T}else v=e[6],y=e[7],T=e[8];let E=y,O;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,h.jsx)(o,{title:`Nodes`}),e[13]=O):O=e[13];let A;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,h.jsx)(u,{children:(0,h.jsx)(d,{className:`text-sm`,children:`Cluster Nodes`})}),e[14]=A):A=e[14];let M;e[15]===v?M=e[16]:(M=(0,h.jsxs)(p,{children:[A,(0,h.jsx)(f,{children:v.length===0?(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No nodes responding`}):(0,h.jsx)(w,{nodes:v})})]}),e[15]=v,e[16]=M);let N;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,h.jsx)(u,{children:(0,h.jsx)(d,{className:`text-sm`,children:`Elastic Compute Cloud (EC2)`})}),e[17]=N):N=e[17];let P;e[18]===T?P=e[19]:(P=(0,h.jsxs)(p,{children:[N,(0,h.jsx)(f,{children:T.length===0?(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances running`}):(0,h.jsx)(D,{vms:T})})]}),e[18]=T,e[19]=P);let I;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,h.jsx)(u,{children:(0,h.jsx)(d,{className:`text-sm`,children:`Resource Usage`})}),e[20]=I):I=e[20];let L;e[21]!==E||e[22]!==v?(L=(0,h.jsxs)(p,{children:[I,(0,h.jsx)(f,{className:`space-y-4`,children:v.length===0?(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No data`}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(k,{nodes:v}),E.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`h4`,{className:`mt-4 text-xs font-medium text-muted-foreground`,children:`Instance Type Capacity`}),(0,h.jsx)(j,{instanceTypes:E})]})]})})]}),e[21]=E,e[22]=v,e[23]=L):L=e[23];let R;e[24]===v?R=e[25]:(R=v.some(b)&&(0,h.jsxs)(p,{children:[(0,h.jsx)(u,{children:(0,h.jsx)(d,{className:`text-sm`,children:`GPU Inventory`})}),(0,h.jsx)(f,{children:(0,h.jsx)(F,{nodes:v})})]}),e[24]=v,e[25]=R);let z;return e[26]!==R||e[27]!==M||e[28]!==P||e[29]!==L?(z=(0,h.jsxs)(h.Fragment,{children:[O,(0,h.jsxs)(`div`,{className:`space-y-6`,children:[M,P,L,R]})]}),e[26]=R,e[27]=M,e[28]=P,e[29]=L,e[30]=z):z=e[30],z}function b(e){return(e.gpus?.length??0)>0}function x(e,t){return e.name.localeCompare(t.name)}function S(e){let[t,n]=e;return{name:t,...n}}function C(e){return!e.managed_by}function w(e){let t=(0,m.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,h.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(T),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,h.jsx)(`div`,{className:`overflow-x-auto`,children:(0,h.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,h.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function T(e){let t=[e.nats_role?`nats:${e.nats_role}`:null,e.predastore_role?`predastore:${e.predastore_role}`:null].filter(Boolean).join(`,`);return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,h.jsx)(l,{variant:e.status===`Ready`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono text-muted-foreground`,children:t||`-`}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:g(e.uptime)}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,h.jsx)(`td`,{className:`py-1.5`,children:(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:e.services?.join(`,`)??`-`})})]},e.node)}function E(e){return e?e.profile?`${i(e.vram_mib)} (${e.profile})`:`${e.model} ${i(e.vram_mib)}`:`-`}function D(e){let t=(0,m.c)(5),{vms:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Instance`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Type`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`vCPU`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Memory`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`GPU`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,h.jsx)(`th`,{className:`pb-1 font-medium`,children:`Age`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(O),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,h.jsx)(`div`,{className:`overflow-x-auto`,children:(0,h.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,h.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function O(e){return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.instance_id}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,h.jsx)(l,{variant:e.status===`running`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.instance_type}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vcpu}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:_(e.memory_gb)}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:E(e.gpu)}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.node}),(0,h.jsx)(`td`,{className:`py-1.5`,children:e.launch_time>0?v(e.launch_time):`-`})]},e.instance_id)}function k(e){let t=(0,m.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`CPU (used/total)`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`MEM (used/total)`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`GPU (used/total)`}),(0,h.jsx)(`th`,{className:`pb-1 font-medium`,children:`EC2`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(A),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,h.jsx)(`div`,{className:`overflow-x-auto`,children:(0,h.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,h.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function A(e){return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,h.jsxs)(`td`,{className:`py-1.5 pr-4 font-mono`,children:[e.alloc_vcpu,`/`,e.total_vcpu]}),(0,h.jsxs)(`td`,{className:`py-1.5 pr-4 font-mono`,children:[_(e.alloc_mem_gb),`/`,_(e.total_mem_gb)]}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.total_gpus>0?`${e.alloc_gpus}/${e.total_gpus}`:`-`}),(0,h.jsx)(`td`,{className:`py-1.5`,children:e.vm_count})]},e.node)}function j(e){let t=(0,m.c)(5),{instanceTypes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Instance Type`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Available`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`vCPU`}),(0,h.jsx)(`th`,{className:`pb-1 font-medium`,children:`Memory`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(M),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,h.jsx)(`div`,{className:`overflow-x-auto`,children:(0,h.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,h.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function M(e){return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.name}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.available}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vcpu}),(0,h.jsx)(`td`,{className:`py-1.5`,children:_(e.memory_gb)})]},e.name)}function N(e){let t=(0,m.c)(22),{gpu:n}=e,r;t[0]===n.model?r=t[1]:(r=(0,h.jsx)(`span`,{className:`font-medium`,children:n.model}),t[0]=n.model,t[1]=r);let a;t[2]===n.vram_mib?a=t[3]:(a=i(n.vram_mib),t[2]=n.vram_mib,t[3]=a);let o;t[4]===a?o=t[5]:(o=(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:a}),t[4]=a,t[5]=o);let s;t[6]===n.pci_address?s=t[7]:(s=(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:n.pci_address}),t[6]=n.pci_address,t[7]=s);let c;t[8]!==n.instance_id||t[9]!==n.mig_enabled?(c=n.mig_enabled?(0,h.jsx)(l,{className:`text-[0.625rem]`,variant:`secondary`,children:`MIG`}):(0,h.jsx)(`span`,{className:n.instance_id?`text-amber-500`:`text-green-600`,children:n.instance_id?`in-use: ${n.instance_id}`:`free`}),t[8]=n.instance_id,t[9]=n.mig_enabled,t[10]=c):c=t[10];let u;t[11]!==r||t[12]!==o||t[13]!==s||t[14]!==c?(u=(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 font-mono`,children:[r,o,s,c]}),t[11]=r,t[12]=o,t[13]=s,t[14]=c,t[15]=u):u=t[15];let d;t[16]!==n.mig_enabled||t[17]!==n.slices?(d=n.mig_enabled&&n.slices&&n.slices.length>0&&(0,h.jsxs)(`table`,{className:`mt-2 w-full`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-0.5 font-normal`,children:`GI`}),(0,h.jsx)(`th`,{className:`pr-4 pb-0.5 font-normal`,children:`Profile`}),(0,h.jsx)(`th`,{className:`pr-4 pb-0.5 font-normal`,children:`VRAM`}),(0,h.jsx)(`th`,{className:`pb-0.5 font-normal`,children:`Instance`})]})}),(0,h.jsx)(`tbody`,{children:n.slices.map(P)})]}),t[16]=n.mig_enabled,t[17]=n.slices,t[18]=d):d=t[18];let f;return t[19]!==u||t[20]!==d?(f=(0,h.jsxs)(`div`,{className:`rounded border p-2 text-xs`,children:[u,d]}),t[19]=u,t[20]=d,t[21]=f):f=t[21],f}function P(e){return(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`td`,{className:`py-0.5 pr-4 font-mono`,children:e.gi_id}),(0,h.jsx)(`td`,{className:`py-0.5 pr-4 font-mono`,children:e.profile}),(0,h.jsx)(`td`,{className:`py-0.5 pr-4`,children:i(e.vram_mib)}),(0,h.jsx)(`td`,{className:e.instance_id?`py-0.5 font-mono text-amber-500`:`py-0.5 text-green-600`,children:e.instance_id??`free`})]},e.gi_id)}function F(e){let t=(0,m.c)(6),{nodes:n}=e,r,i;if(t[0]!==n){let e=n.filter(R);r=`space-y-4`,i=e.map(I),t[0]=n,t[1]=r,t[2]=i}else r=t[1],i=t[2];let a;return t[3]!==r||t[4]!==i?(a=(0,h.jsx)(`div`,{className:r,children:i}),t[3]=r,t[4]=i,t[5]=a):a=t[5],a}function I(e){return(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h4`,{className:`mb-1.5 text-xs font-medium text-muted-foreground`,children:e.node}),(0,h.jsx)(`div`,{className:`space-y-2`,children:e.gpus?.map(L)})]},e.node)}function L(e){return(0,h.jsx)(N,{gpu:e},e.pci_address)}function R(e){return(e.gpus?.length??0)>0}export{y as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{n as r}from"./redirect.js";import{Ht as i}from"./auth.js";import{rn as a}from"./index.js";import{t as o}from"./page-heading.js";import{r as s,t as c}from"./admin.js";import{t as l}from"./badge.js";import{a as u,o as d,r as f,t as p}from"./card.js";var m=t(),h=e();function g(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function _(e){return e>=1?`${e.toFixed(1)}Gi`:`${Math.round(e*1024)}Mi`}function v(e){let t=Math.floor(Date.now()/1e3-e);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h ${n%60}m`:`${Math.floor(r/24)}d ${r%24}h`}function y(){let e=(0,m.c)(31),{isAdmin:t}=a(),i;e[0]===t?i=e[1]:(i={...c,enabled:t,refetchInterval:5e3},e[0]=t,e[1]=i);let{data:l}=n(i),g;e[2]===t?g=e[3]:(g={...s,enabled:t,refetchInterval:5e3},e[2]=t,e[3]=g);let{data:_}=n(g);if(!t)throw r({to:`/`});let v,y,T;if(e[4]!==l?.nodes||e[5]!==_?.vms){v=l?.nodes??[];let t;e[9]===_?.vms?t=e[10]:(t=_?.vms??[],e[9]=_?.vms,e[10]=t);let n;e[11]===t?n=e[12]:(n=t.filter(C),e[11]=t,e[12]=n),T=n;let r=new Map;for(let e of v)for(let t of e.instance_types??[]){let e=r.get(t.name);e?e.available+=t.available:r.set(t.name,{vcpu:t.vcpu,memory_gb:t.memory_gb,available:t.available})}y=[...r.entries()].map(S).toSorted(x),e[4]=l?.nodes,e[5]=_?.vms,e[6]=v,e[7]=y,e[8]=T}else v=e[6],y=e[7],T=e[8];let E=y,O;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,h.jsx)(o,{title:`Nodes`}),e[13]=O):O=e[13];let A;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,h.jsx)(u,{children:(0,h.jsx)(d,{className:`text-sm`,children:`Cluster Nodes`})}),e[14]=A):A=e[14];let M;e[15]===v?M=e[16]:(M=(0,h.jsxs)(p,{children:[A,(0,h.jsx)(f,{children:v.length===0?(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No nodes responding`}):(0,h.jsx)(w,{nodes:v})})]}),e[15]=v,e[16]=M);let N;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,h.jsx)(u,{children:(0,h.jsx)(d,{className:`text-sm`,children:`Elastic Compute Cloud (EC2)`})}),e[17]=N):N=e[17];let P;e[18]===T?P=e[19]:(P=(0,h.jsxs)(p,{children:[N,(0,h.jsx)(f,{children:T.length===0?(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances running`}):(0,h.jsx)(D,{vms:T})})]}),e[18]=T,e[19]=P);let I;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,h.jsx)(u,{children:(0,h.jsx)(d,{className:`text-sm`,children:`Resource Usage`})}),e[20]=I):I=e[20];let L;e[21]!==E||e[22]!==v?(L=(0,h.jsxs)(p,{children:[I,(0,h.jsx)(f,{className:`space-y-4`,children:v.length===0?(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No data`}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(k,{nodes:v}),E.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`h4`,{className:`mt-4 text-xs font-medium text-muted-foreground`,children:`Instance Type Capacity`}),(0,h.jsx)(j,{instanceTypes:E})]})]})})]}),e[21]=E,e[22]=v,e[23]=L):L=e[23];let R;e[24]===v?R=e[25]:(R=v.some(b)&&(0,h.jsxs)(p,{children:[(0,h.jsx)(u,{children:(0,h.jsx)(d,{className:`text-sm`,children:`GPU Inventory`})}),(0,h.jsx)(f,{children:(0,h.jsx)(F,{nodes:v})})]}),e[24]=v,e[25]=R);let z;return e[26]!==R||e[27]!==M||e[28]!==P||e[29]!==L?(z=(0,h.jsxs)(h.Fragment,{children:[O,(0,h.jsxs)(`div`,{className:`space-y-6`,children:[M,P,L,R]})]}),e[26]=R,e[27]=M,e[28]=P,e[29]=L,e[30]=z):z=e[30],z}function b(e){return(e.gpus?.length??0)>0}function x(e,t){return e.name.localeCompare(t.name)}function S(e){let[t,n]=e;return{name:t,...n}}function C(e){return!e.managed_by}function w(e){let t=(0,m.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,h.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(T),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,h.jsx)(`div`,{className:`overflow-x-auto`,children:(0,h.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,h.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function T(e){let t=[e.nats_role?`nats:${e.nats_role}`:null,e.predastore_role?`predastore:${e.predastore_role}`:null].filter(Boolean).join(`,`);return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,h.jsx)(l,{variant:e.status===`Ready`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono text-muted-foreground`,children:t||`-`}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:g(e.uptime)}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,h.jsx)(`td`,{className:`py-1.5`,children:(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:e.services?.join(`,`)??`-`})})]},e.node)}function E(e){return e?e.profile?`${i(e.vram_mib)} (${e.profile})`:`${e.model} ${i(e.vram_mib)}`:`-`}function D(e){let t=(0,m.c)(5),{vms:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Instance`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Type`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`vCPU`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Memory`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`GPU`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,h.jsx)(`th`,{className:`pb-1 font-medium`,children:`Age`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(O),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,h.jsx)(`div`,{className:`overflow-x-auto`,children:(0,h.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,h.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function O(e){return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.instance_id}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,h.jsx)(l,{variant:e.status===`running`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.instance_type}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vcpu}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:_(e.memory_gb)}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:E(e.gpu)}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.node}),(0,h.jsx)(`td`,{className:`py-1.5`,children:e.launch_time>0?v(e.launch_time):`-`})]},e.instance_id)}function k(e){let t=(0,m.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`CPU (used/total)`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`MEM (used/total)`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`GPU (used/total)`}),(0,h.jsx)(`th`,{className:`pb-1 font-medium`,children:`EC2`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(A),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,h.jsx)(`div`,{className:`overflow-x-auto`,children:(0,h.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,h.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function A(e){return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,h.jsxs)(`td`,{className:`py-1.5 pr-4 font-mono`,children:[e.alloc_vcpu,`/`,e.total_vcpu]}),(0,h.jsxs)(`td`,{className:`py-1.5 pr-4 font-mono`,children:[_(e.alloc_mem_gb),`/`,_(e.total_mem_gb)]}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.total_gpus>0?`${e.alloc_gpus}/${e.total_gpus}`:`-`}),(0,h.jsx)(`td`,{className:`py-1.5`,children:e.vm_count})]},e.node)}function j(e){let t=(0,m.c)(5),{instanceTypes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Instance Type`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Available`}),(0,h.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`vCPU`}),(0,h.jsx)(`th`,{className:`pb-1 font-medium`,children:`Memory`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(M),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,h.jsx)(`div`,{className:`overflow-x-auto`,children:(0,h.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,h.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function M(e){return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.name}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.available}),(0,h.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vcpu}),(0,h.jsx)(`td`,{className:`py-1.5`,children:_(e.memory_gb)})]},e.name)}function N(e){let t=(0,m.c)(22),{gpu:n}=e,r;t[0]===n.model?r=t[1]:(r=(0,h.jsx)(`span`,{className:`font-medium`,children:n.model}),t[0]=n.model,t[1]=r);let a;t[2]===n.vram_mib?a=t[3]:(a=i(n.vram_mib),t[2]=n.vram_mib,t[3]=a);let o;t[4]===a?o=t[5]:(o=(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:a}),t[4]=a,t[5]=o);let s;t[6]===n.pci_address?s=t[7]:(s=(0,h.jsx)(`span`,{className:`text-muted-foreground`,children:n.pci_address}),t[6]=n.pci_address,t[7]=s);let c;t[8]!==n.instance_id||t[9]!==n.mig_enabled?(c=n.mig_enabled?(0,h.jsx)(l,{className:`text-[0.625rem]`,variant:`secondary`,children:`MIG`}):(0,h.jsx)(`span`,{className:n.instance_id?`text-amber-500`:`text-green-600`,children:n.instance_id?`in-use: ${n.instance_id}`:`free`}),t[8]=n.instance_id,t[9]=n.mig_enabled,t[10]=c):c=t[10];let u;t[11]!==r||t[12]!==o||t[13]!==s||t[14]!==c?(u=(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 font-mono`,children:[r,o,s,c]}),t[11]=r,t[12]=o,t[13]=s,t[14]=c,t[15]=u):u=t[15];let d;t[16]!==n.mig_enabled||t[17]!==n.slices?(d=n.mig_enabled&&n.slices&&n.slices.length>0&&(0,h.jsxs)(`table`,{className:`mt-2 w-full`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`pr-4 pb-0.5 font-normal`,children:`GI`}),(0,h.jsx)(`th`,{className:`pr-4 pb-0.5 font-normal`,children:`Profile`}),(0,h.jsx)(`th`,{className:`pr-4 pb-0.5 font-normal`,children:`VRAM`}),(0,h.jsx)(`th`,{className:`pb-0.5 font-normal`,children:`Instance`})]})}),(0,h.jsx)(`tbody`,{children:n.slices.map(P)})]}),t[16]=n.mig_enabled,t[17]=n.slices,t[18]=d):d=t[18];let f;return t[19]!==u||t[20]!==d?(f=(0,h.jsxs)(`div`,{className:`rounded border p-2 text-xs`,children:[u,d]}),t[19]=u,t[20]=d,t[21]=f):f=t[21],f}function P(e){return(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`td`,{className:`py-0.5 pr-4 font-mono`,children:e.gi_id}),(0,h.jsx)(`td`,{className:`py-0.5 pr-4 font-mono`,children:e.profile}),(0,h.jsx)(`td`,{className:`py-0.5 pr-4`,children:i(e.vram_mib)}),(0,h.jsx)(`td`,{className:e.instance_id?`py-0.5 font-mono text-amber-500`:`py-0.5 text-green-600`,children:e.instance_id??`free`})]},e.gi_id)}function F(e){let t=(0,m.c)(6),{nodes:n}=e,r,i;if(t[0]!==n){let e=n.filter(R);r=`space-y-4`,i=e.map(I),t[0]=n,t[1]=r,t[2]=i}else r=t[1],i=t[2];let a;return t[3]!==r||t[4]!==i?(a=(0,h.jsx)(`div`,{className:r,children:i}),t[3]=r,t[4]=i,t[5]=a):a=t[5],a}function I(e){return(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`h4`,{className:`mb-1.5 text-xs font-medium text-muted-foreground`,children:e.node}),(0,h.jsx)(`div`,{className:`space-y-2`,children:e.gpus?.map(L)})]},e.node)}function L(e){return(0,h.jsx)(N,{gpu:e},e.pci_address)}function R(e){return(e.gpus?.length??0)>0}export{y as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/plus.js b/spinifex/services/spinifexui/frontend/dist/assets/plus.js index 684fa724b..dec06d967 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/plus.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/plus.js @@ -1 +1 @@ -import{qr as e}from"./index.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t}; \ No newline at end of file +import{Yr as e}from"./index.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/register-task-definition.js b/spinifex/services/spinifexui/frontend/dist/assets/register-task-definition.js index 1bfcc28a1..d98ab141a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/register-task-definition.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/register-task-definition.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{t as ee}from"./plus.js";import{t as te}from"./trash-2.js";import{t as ne}from"./button.js";import{o as re}from"./ecs.js";import{Xr as ie,er as c,et as l}from"./index.js";import{i as ae,n as oe,r as se,t as ce}from"./zod.js";import{t as le}from"./error-banner.js";import{t as ue}from"./form-actions.js";import{t as de}from"./page-heading.js";import{a as u,r as fe,t as d}from"./field.js";import{r as pe,t as f}from"./ecs2.js";var me=t(),p=e();function m(e){let t=(0,me.c)(118),{cluster:r}=e,i=ie(),a=re(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=ce(pe),t[0]=o):o=t[0];let s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s={resolver:o,defaultValues:{family:``,networkMode:`bridge`,cpu:``,memory:``,containerName:``,image:``,containerCpu:``,containerMemory:``,essential:!0,portMappings:[]}},t[1]=s):s=t[1];let{control:l,handleSubmit:f,register:m,formState:_e}=ae(s),{errors:h,isSubmitting:ve}=_e,ye;t[2]===l?ye=t[3]:(ye={control:l,name:`portMappings`},t[2]=l,t[3]=ye);let g=se(ye),be;t[4]!==r||t[5]!==i?(be=function(){i(r?{to:`/ecs/list-clusters/$clusterName`,params:{clusterName:r}}:{to:`/ecs/list-clusters`})},t[4]=r,t[5]=i,t[6]=be):be=t[6];let _=be,xe;t[7]!==_||t[8]!==a?(xe=async function(e){await a.mutateAsync(e),_()},t[7]=_,t[8]=a,t[9]=xe):xe=t[9];let Se=xe,Ce,we;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,p.jsx)(n,{to:`/ecs/list-clusters`,children:`Clusters`}),we=(0,p.jsx)(de,{subtitle:`Register a single-container task definition`,title:`Register Task Definition`}),t[10]=Ce,t[11]=we):(Ce=t[10],we=t[11]);let v;t[12]!==a.error||t[13]!==a.isError?(v=a.isError&&(0,p.jsx)(le,{error:a.error instanceof Error?a.error:void 0,msg:`Failed to register task definition.`}),t[12]=a.error,t[13]=a.isError,t[14]=v):v=t[14];let y;t[15]!==f||t[16]!==Se?(y=f(Se),t[15]=f,t[16]=Se,t[17]=y):y=t[17];let Te;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`family`,children:`Family`})}),t[18]=Te):Te=t[18];let b;t[19]===m?b=t[20]:(b=m(`family`),t[19]=m,t[20]=b);let x;t[21]===b?x=t[22]:(x=(0,p.jsx)(c,{id:`family`,placeholder:`my-app`,...b}),t[21]=b,t[22]=x);let S;t[23]===h.family?S=t[24]:(S=(0,p.jsx)(fe,{errors:[h.family]}),t[23]=h.family,t[24]=S);let C;t[25]!==x||t[26]!==S?(C=(0,p.jsxs)(d,{children:[Te,x,S]}),t[25]=x,t[26]=S,t[27]=C):C=t[27];let Ee;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`networkMode`,children:`Network mode`})}),t[28]=Ee):Ee=t[28];let w;t[29]===l?w=t[30]:(w=(0,p.jsxs)(d,{children:[Ee,(0,p.jsx)(oe,{control:l,name:`networkMode`,render:ge})]}),t[29]=l,t[30]=w);let T;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`cpu`,children:`Task CPU (units)`})}),t[31]=T):T=t[31];let E;t[32]===m?E=t[33]:(E=m(`cpu`),t[32]=m,t[33]=E);let D;t[34]===E?D=t[35]:(D=(0,p.jsxs)(d,{children:[T,(0,p.jsx)(c,{id:`cpu`,placeholder:`optional`,...E})]}),t[34]=E,t[35]=D);let De;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`memory`,children:`Task memory (MiB)`})}),t[36]=De):De=t[36];let O;t[37]===m?O=t[38]:(O=m(`memory`),t[37]=m,t[38]=O);let k;t[39]===O?k=t[40]:(k=(0,p.jsxs)(d,{children:[De,(0,p.jsx)(c,{id:`memory`,placeholder:`optional`,...O})]}),t[39]=O,t[40]=k);let A;t[41]!==D||t[42]!==k?(A=(0,p.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[D,k]}),t[41]=D,t[42]=k,t[43]=A):A=t[43];let Oe;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,p.jsx)(`h2`,{className:`mb-4 font-semibold`,children:`Container`}),t[44]=Oe):Oe=t[44];let ke;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`containerName`,children:`Name`})}),t[45]=ke):ke=t[45];let j;t[46]===m?j=t[47]:(j=m(`containerName`),t[46]=m,t[47]=j);let M;t[48]===j?M=t[49]:(M=(0,p.jsx)(c,{id:`containerName`,placeholder:`app`,...j}),t[48]=j,t[49]=M);let N;t[50]===h.containerName?N=t[51]:(N=(0,p.jsx)(fe,{errors:[h.containerName]}),t[50]=h.containerName,t[51]=N);let P;t[52]!==M||t[53]!==N?(P=(0,p.jsxs)(d,{children:[ke,M,N]}),t[52]=M,t[53]=N,t[54]=P):P=t[54];let Ae;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`image`,children:`Image`})}),t[55]=Ae):Ae=t[55];let F;t[56]===m?F=t[57]:(F=m(`image`),t[56]=m,t[57]=F);let I;t[58]===F?I=t[59]:(I=(0,p.jsx)(c,{id:`image`,placeholder:`public.ecr.aws/nginx/nginx:latest`,...F}),t[58]=F,t[59]=I);let L;t[60]===h.image?L=t[61]:(L=(0,p.jsx)(fe,{errors:[h.image]}),t[60]=h.image,t[61]=L);let R;t[62]!==I||t[63]!==L?(R=(0,p.jsxs)(d,{children:[Ae,I,L]}),t[62]=I,t[63]=L,t[64]=R):R=t[64];let je;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`containerCpu`,children:`CPU (units)`})}),t[65]=je):je=t[65];let z;t[66]===m?z=t[67]:(z=m(`containerCpu`),t[66]=m,t[67]=z);let B;t[68]===z?B=t[69]:(B=(0,p.jsxs)(d,{children:[je,(0,p.jsx)(c,{id:`containerCpu`,placeholder:`optional`,...z})]}),t[68]=z,t[69]=B);let Me;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`containerMemory`,children:`Memory (MiB)`})}),t[70]=Me):Me=t[70];let V;t[71]===m?V=t[72]:(V=m(`containerMemory`),t[71]=m,t[72]=V);let H;t[73]===V?H=t[74]:(H=(0,p.jsxs)(d,{children:[Me,(0,p.jsx)(c,{id:`containerMemory`,placeholder:`optional`,...V})]}),t[73]=V,t[74]=H);let U;t[75]!==B||t[76]!==H?(U=(0,p.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[B,H]}),t[75]=B,t[76]=H,t[77]=U):U=t[77];let W;t[78]===m?W=t[79]:(W=m(`essential`),t[78]=m,t[79]=W);let G;t[80]===W?G=t[81]:(G=(0,p.jsx)(`input`,{type:`checkbox`,...W}),t[80]=W,t[81]=G);let Ne;t[82]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,p.jsx)(`span`,{children:`Essential`}),t[82]=Ne):Ne=t[82];let K;t[83]===G?K=t[84]:(K=(0,p.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[G,Ne]}),t[83]=G,t[84]=K);let Pe;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,p.jsx)(`span`,{className:`text-sm font-medium`,children:`Port mappings`}),t[85]=Pe):Pe=t[85];let q;t[86]===g?q=t[87]:(q=()=>g.append({containerPort:80,protocol:`tcp`}),t[86]=g,t[87]=q);let Fe;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,p.jsx)(ee,{className:`size-4`}),t[88]=Fe):Fe=t[88];let J;t[89]===q?J=t[90]:(J=(0,p.jsxs)(`div`,{className:`flex items-center justify-between`,children:[Pe,(0,p.jsxs)(ne,{onClick:q,size:`sm`,type:`button`,variant:`outline`,children:[Fe,`Add port`]})]}),t[89]=q,t[90]=J);let Y;t[91]!==l||t[92]!==m||t[93]!==g?(Y=g.fields.map((e,t)=>(0,p.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,p.jsxs)(d,{className:`flex-1`,children:[(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`port-${t}`,children:`Container port`})}),(0,p.jsx)(c,{id:`port-${t}`,type:`number`,...m(`portMappings.${t}.containerPort`,{valueAsNumber:!0})})]}),(0,p.jsx)(oe,{control:l,name:`portMappings.${t}.protocol`,render:he}),(0,p.jsx)(ne,{"aria-label":`Remove port mapping`,onClick:()=>g.remove(t),size:`icon`,type:`button`,variant:`ghost`,children:(0,p.jsx)(te,{className:`size-4`})})]},e.id)),t[91]=l,t[92]=m,t[93]=g,t[94]=Y):Y=t[94];let X;t[95]!==J||t[96]!==Y?(X=(0,p.jsxs)(`div`,{className:`space-y-2`,children:[J,Y]}),t[95]=J,t[96]=Y,t[97]=X):X=t[97];let Z;t[98]!==P||t[99]!==R||t[100]!==U||t[101]!==K||t[102]!==X?(Z=(0,p.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[Oe,(0,p.jsxs)(`div`,{className:`space-y-4`,children:[P,R,U,K,X]})]}),t[98]=P,t[99]=R,t[100]=U,t[101]=K,t[102]=X,t[103]=Z):Z=t[103];let Q;t[104]!==_||t[105]!==ve||t[106]!==a.isPending?(Q=(0,p.jsx)(ue,{isPending:a.isPending,isSubmitting:ve,onCancel:_,pendingLabel:`Registering…`,submitLabel:`Register Task Definition`}),t[104]=_,t[105]=ve,t[106]=a.isPending,t[107]=Q):Q=t[107];let $;t[108]!==y||t[109]!==C||t[110]!==w||t[111]!==A||t[112]!==Z||t[113]!==Q?($=(0,p.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:y,children:[C,w,A,Z,Q]}),t[108]=y,t[109]=C,t[110]=w,t[111]=A,t[112]=Z,t[113]=Q,t[114]=$):$=t[114];let Ie;return t[115]!==$||t[116]!==v?(Ie=(0,p.jsxs)(p.Fragment,{children:[Ce,we,v,$]}),t[115]=$,t[116]=v,t[117]=Ie):Ie=t[117],Ie}function he(e){let{field:t}=e;return(0,p.jsxs)(s,{onValueChange:t.onChange,value:t.value,children:[(0,p.jsx)(o,{className:`w-28`,children:(0,p.jsx)(r,{})}),(0,p.jsxs)(a,{children:[(0,p.jsx)(i,{value:`tcp`,children:`tcp`}),(0,p.jsx)(i,{value:`udp`,children:`udp`})]})]})}function ge(e){let{field:t}=e;return(0,p.jsxs)(s,{onValueChange:t.onChange,value:t.value,children:[(0,p.jsx)(o,{className:`w-full`,id:`networkMode`,children:(0,p.jsx)(r,{})}),(0,p.jsx)(a,{children:f.map(_e)})]})}function _e(e){return(0,p.jsx)(i,{value:e,children:e},e)}function h(){let e=(0,me.c)(2),{cluster:t}=l.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,p.jsx)(m,{cluster:t}),e[0]=t,e[1]=n),n}export{h as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{t as ee}from"./plus.js";import{t as te}from"./trash-2.js";import{t as ne}from"./button.js";import{s as re}from"./ecs.js";import{Qr as ie,nr as c,nt as l}from"./index.js";import{i as ae,n as oe,r as se,t as ce}from"./zod.js";import{t as le}from"./error-banner.js";import{t as ue}from"./form-actions.js";import{t as de}from"./page-heading.js";import{a as u,r as fe,t as d}from"./field.js";import{r as pe,t as f}from"./ecs2.js";var me=t(),p=e();function m(e){let t=(0,me.c)(118),{cluster:r}=e,i=ie(),a=re(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=ce(pe),t[0]=o):o=t[0];let s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s={resolver:o,defaultValues:{family:``,networkMode:`bridge`,cpu:``,memory:``,containerName:``,image:``,containerCpu:``,containerMemory:``,essential:!0,portMappings:[]}},t[1]=s):s=t[1];let{control:l,handleSubmit:f,register:m,formState:_e}=ae(s),{errors:h,isSubmitting:ve}=_e,ye;t[2]===l?ye=t[3]:(ye={control:l,name:`portMappings`},t[2]=l,t[3]=ye);let g=se(ye),be;t[4]!==r||t[5]!==i?(be=function(){i(r?{to:`/ecs/list-clusters/$clusterName`,params:{clusterName:r}}:{to:`/ecs/list-clusters`})},t[4]=r,t[5]=i,t[6]=be):be=t[6];let _=be,xe;t[7]!==_||t[8]!==a?(xe=async function(e){await a.mutateAsync(e),_()},t[7]=_,t[8]=a,t[9]=xe):xe=t[9];let Se=xe,Ce,we;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,p.jsx)(n,{to:`/ecs/list-clusters`,children:`Clusters`}),we=(0,p.jsx)(de,{subtitle:`Register a single-container task definition`,title:`Register Task Definition`}),t[10]=Ce,t[11]=we):(Ce=t[10],we=t[11]);let v;t[12]!==a.error||t[13]!==a.isError?(v=a.isError&&(0,p.jsx)(le,{error:a.error instanceof Error?a.error:void 0,msg:`Failed to register task definition.`}),t[12]=a.error,t[13]=a.isError,t[14]=v):v=t[14];let y;t[15]!==f||t[16]!==Se?(y=f(Se),t[15]=f,t[16]=Se,t[17]=y):y=t[17];let Te;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`family`,children:`Family`})}),t[18]=Te):Te=t[18];let b;t[19]===m?b=t[20]:(b=m(`family`),t[19]=m,t[20]=b);let x;t[21]===b?x=t[22]:(x=(0,p.jsx)(c,{id:`family`,placeholder:`my-app`,...b}),t[21]=b,t[22]=x);let S;t[23]===h.family?S=t[24]:(S=(0,p.jsx)(fe,{errors:[h.family]}),t[23]=h.family,t[24]=S);let C;t[25]!==x||t[26]!==S?(C=(0,p.jsxs)(d,{children:[Te,x,S]}),t[25]=x,t[26]=S,t[27]=C):C=t[27];let Ee;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`networkMode`,children:`Network mode`})}),t[28]=Ee):Ee=t[28];let w;t[29]===l?w=t[30]:(w=(0,p.jsxs)(d,{children:[Ee,(0,p.jsx)(oe,{control:l,name:`networkMode`,render:ge})]}),t[29]=l,t[30]=w);let T;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`cpu`,children:`Task CPU (units)`})}),t[31]=T):T=t[31];let E;t[32]===m?E=t[33]:(E=m(`cpu`),t[32]=m,t[33]=E);let D;t[34]===E?D=t[35]:(D=(0,p.jsxs)(d,{children:[T,(0,p.jsx)(c,{id:`cpu`,placeholder:`optional`,...E})]}),t[34]=E,t[35]=D);let De;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`memory`,children:`Task memory (MiB)`})}),t[36]=De):De=t[36];let O;t[37]===m?O=t[38]:(O=m(`memory`),t[37]=m,t[38]=O);let k;t[39]===O?k=t[40]:(k=(0,p.jsxs)(d,{children:[De,(0,p.jsx)(c,{id:`memory`,placeholder:`optional`,...O})]}),t[39]=O,t[40]=k);let A;t[41]!==D||t[42]!==k?(A=(0,p.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[D,k]}),t[41]=D,t[42]=k,t[43]=A):A=t[43];let Oe;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,p.jsx)(`h2`,{className:`mb-4 font-semibold`,children:`Container`}),t[44]=Oe):Oe=t[44];let ke;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`containerName`,children:`Name`})}),t[45]=ke):ke=t[45];let j;t[46]===m?j=t[47]:(j=m(`containerName`),t[46]=m,t[47]=j);let M;t[48]===j?M=t[49]:(M=(0,p.jsx)(c,{id:`containerName`,placeholder:`app`,...j}),t[48]=j,t[49]=M);let N;t[50]===h.containerName?N=t[51]:(N=(0,p.jsx)(fe,{errors:[h.containerName]}),t[50]=h.containerName,t[51]=N);let P;t[52]!==M||t[53]!==N?(P=(0,p.jsxs)(d,{children:[ke,M,N]}),t[52]=M,t[53]=N,t[54]=P):P=t[54];let Ae;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`image`,children:`Image`})}),t[55]=Ae):Ae=t[55];let F;t[56]===m?F=t[57]:(F=m(`image`),t[56]=m,t[57]=F);let I;t[58]===F?I=t[59]:(I=(0,p.jsx)(c,{id:`image`,placeholder:`public.ecr.aws/nginx/nginx:latest`,...F}),t[58]=F,t[59]=I);let L;t[60]===h.image?L=t[61]:(L=(0,p.jsx)(fe,{errors:[h.image]}),t[60]=h.image,t[61]=L);let R;t[62]!==I||t[63]!==L?(R=(0,p.jsxs)(d,{children:[Ae,I,L]}),t[62]=I,t[63]=L,t[64]=R):R=t[64];let je;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`containerCpu`,children:`CPU (units)`})}),t[65]=je):je=t[65];let z;t[66]===m?z=t[67]:(z=m(`containerCpu`),t[66]=m,t[67]=z);let B;t[68]===z?B=t[69]:(B=(0,p.jsxs)(d,{children:[je,(0,p.jsx)(c,{id:`containerCpu`,placeholder:`optional`,...z})]}),t[68]=z,t[69]=B);let Me;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`containerMemory`,children:`Memory (MiB)`})}),t[70]=Me):Me=t[70];let V;t[71]===m?V=t[72]:(V=m(`containerMemory`),t[71]=m,t[72]=V);let H;t[73]===V?H=t[74]:(H=(0,p.jsxs)(d,{children:[Me,(0,p.jsx)(c,{id:`containerMemory`,placeholder:`optional`,...V})]}),t[73]=V,t[74]=H);let U;t[75]!==B||t[76]!==H?(U=(0,p.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[B,H]}),t[75]=B,t[76]=H,t[77]=U):U=t[77];let W;t[78]===m?W=t[79]:(W=m(`essential`),t[78]=m,t[79]=W);let G;t[80]===W?G=t[81]:(G=(0,p.jsx)(`input`,{type:`checkbox`,...W}),t[80]=W,t[81]=G);let Ne;t[82]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,p.jsx)(`span`,{children:`Essential`}),t[82]=Ne):Ne=t[82];let K;t[83]===G?K=t[84]:(K=(0,p.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[G,Ne]}),t[83]=G,t[84]=K);let Pe;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,p.jsx)(`span`,{className:`text-sm font-medium`,children:`Port mappings`}),t[85]=Pe):Pe=t[85];let q;t[86]===g?q=t[87]:(q=()=>g.append({containerPort:80,protocol:`tcp`}),t[86]=g,t[87]=q);let Fe;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,p.jsx)(ee,{className:`size-4`}),t[88]=Fe):Fe=t[88];let J;t[89]===q?J=t[90]:(J=(0,p.jsxs)(`div`,{className:`flex items-center justify-between`,children:[Pe,(0,p.jsxs)(ne,{onClick:q,size:`sm`,type:`button`,variant:`outline`,children:[Fe,`Add port`]})]}),t[89]=q,t[90]=J);let Y;t[91]!==l||t[92]!==m||t[93]!==g?(Y=g.fields.map((e,t)=>(0,p.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,p.jsxs)(d,{className:`flex-1`,children:[(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`port-${t}`,children:`Container port`})}),(0,p.jsx)(c,{id:`port-${t}`,type:`number`,...m(`portMappings.${t}.containerPort`,{valueAsNumber:!0})})]}),(0,p.jsx)(oe,{control:l,name:`portMappings.${t}.protocol`,render:he}),(0,p.jsx)(ne,{"aria-label":`Remove port mapping`,onClick:()=>g.remove(t),size:`icon`,type:`button`,variant:`ghost`,children:(0,p.jsx)(te,{className:`size-4`})})]},e.id)),t[91]=l,t[92]=m,t[93]=g,t[94]=Y):Y=t[94];let X;t[95]!==J||t[96]!==Y?(X=(0,p.jsxs)(`div`,{className:`space-y-2`,children:[J,Y]}),t[95]=J,t[96]=Y,t[97]=X):X=t[97];let Z;t[98]!==P||t[99]!==R||t[100]!==U||t[101]!==K||t[102]!==X?(Z=(0,p.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[Oe,(0,p.jsxs)(`div`,{className:`space-y-4`,children:[P,R,U,K,X]})]}),t[98]=P,t[99]=R,t[100]=U,t[101]=K,t[102]=X,t[103]=Z):Z=t[103];let Q;t[104]!==_||t[105]!==ve||t[106]!==a.isPending?(Q=(0,p.jsx)(ue,{isPending:a.isPending,isSubmitting:ve,onCancel:_,pendingLabel:`Registering…`,submitLabel:`Register Task Definition`}),t[104]=_,t[105]=ve,t[106]=a.isPending,t[107]=Q):Q=t[107];let $;t[108]!==y||t[109]!==C||t[110]!==w||t[111]!==A||t[112]!==Z||t[113]!==Q?($=(0,p.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:y,children:[C,w,A,Z,Q]}),t[108]=y,t[109]=C,t[110]=w,t[111]=A,t[112]=Z,t[113]=Q,t[114]=$):$=t[114];let Ie;return t[115]!==$||t[116]!==v?(Ie=(0,p.jsxs)(p.Fragment,{children:[Ce,we,v,$]}),t[115]=$,t[116]=v,t[117]=Ie):Ie=t[117],Ie}function he(e){let{field:t}=e;return(0,p.jsxs)(s,{onValueChange:t.onChange,value:t.value,children:[(0,p.jsx)(o,{className:`w-28`,children:(0,p.jsx)(r,{})}),(0,p.jsxs)(a,{children:[(0,p.jsx)(i,{value:`tcp`,children:`tcp`}),(0,p.jsx)(i,{value:`udp`,children:`udp`})]})]})}function ge(e){let{field:t}=e;return(0,p.jsxs)(s,{onValueChange:t.onChange,value:t.value,children:[(0,p.jsx)(o,{className:`w-full`,id:`networkMode`,children:(0,p.jsx)(r,{})}),(0,p.jsx)(a,{children:f.map(_e)})]})}function _e(e){return(0,p.jsx)(i,{value:e,children:e},e)}function h(){let e=(0,me.c)(2),{cluster:t}=l.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,p.jsx)(m,{cluster:t}),e[0]=t,e[1]=n),n}export{h as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/rotate-cw.js b/spinifex/services/spinifexui/frontend/dist/assets/rotate-cw.js index d1ab1fc07..50bb1c909 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/rotate-cw.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/rotate-cw.js @@ -1 +1 @@ -import{qr as e}from"./index.js";var t=e(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]);export{t}; \ No newline at end of file +import{Yr as e}from"./index.js";var t=e(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]);export{t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/route.js b/spinifex/services/spinifexui/frontend/dist/assets/route.js index 9ad8c62ed..6584e2d90 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/route.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/route.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{Yr as n}from"./index.js";var r=t(),i=e(),a=()=>{let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t};export{a as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{Zr as n}from"./index.js";var r=t(),i=e(),a=()=>{let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t};export{a as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/route2.js b/spinifex/services/spinifexui/frontend/dist/assets/route2.js index 9ad8c62ed..6584e2d90 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/route2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/route2.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{Yr as n}from"./index.js";var r=t(),i=e(),a=()=>{let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t};export{a as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{Zr as n}from"./index.js";var r=t(),i=e(),a=()=>{let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t};export{a as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/run-instances.js b/spinifex/services/spinifexui/frontend/dist/assets/run-instances.js index 4306e1c09..40c7fc8aa 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/run-instances.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/run-instances.js @@ -1,4 +1,4 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Ht as i}from"./auth.js";import{t as a}from"./back-link.js";import{t as o}from"./chevron-down.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m}from"./select.js";import{t as ee}from"./cli-command-panel.js";import{t as h}from"./button.js";import{d as g}from"./ec2.js";import{$t as _,Bt as v,Gt as y,It as te,Xr as b,Yt as x,er as S,jt as C,kt as ne}from"./index.js";import{i as w,n as T,t as E}from"./zod.js";import{t as D}from"./error-banner.js";import{t as O}from"./page-heading.js";import{a as k,n as A,r as j,t as M}from"./field.js";import{i as re,t as ie,v as ae}from"./ec22.js";import{n as oe,r as se,t as ce}from"./collapsible.js";var le=t(n()),N=e(),P=`/dev/sda1`,ue=`gp3`,de=1,fe=16384;function pe(){let e=b(),{data:t}=r(ne),{data:n}=r(te),{data:P}=r(C),{data:pe}=r(x),{data:he}=r(v),{data:ge}=r(_),{data:_e}=r(y),I=g(),L=t.Images??[],ve=n.KeyPairs??[],ye=pe.Subnets??[],be=he.PlacementGroups??[],xe=ge.Vpcs??[],R=_e.SecurityGroups??[],Se=(xe.find(e=>e.IsDefault)??xe[0])?.VpcId,Ce=ae(R.map(e=>e.GroupName??``)),z={},B=new Map;for(let e of P.InstanceTypes??[]){let t=e.InstanceType;if(t&&(z[t]=(z[t]??0)+1,!B.has(t))){let n=e.GpuInfo?.Gpus;n&&n.length>0&&B.set(t,{totalMiB:e.GpuInfo?.TotalGpuMemoryInMiB??0,gpuName:n[0]?.Name??``})}}let V=Object.keys(z).toSorted(),H=V.filter(e=>B.has(e)),U=V.filter(e=>!B.has(e)),we=L[0]?.ImageId,Te=ve[0]?.KeyName,Ee=V.find(e=>e.endsWith(`.nano`))??V[0],De=F(L.find(e=>e.ImageId===we)),{control:W,handleSubmit:Oe,register:G,setValue:K,getValues:ke,watch:q,formState:{errors:J,isSubmitting:Y}}=w({resolver:E(re.refine(e=>e.count<=(z[e.instanceType]??1),{message:`Cannot exceed available capacity`,path:[`count`]}).superRefine((e,t)=>{let n=F(L.find(t=>t.ImageId===e.imageId)).snapshotSize;e.rootVolumeSize!==void 0&&n!==void 0&&e.rootVolumeSizee.ImageId===je)),Me=q(`subnetId`),Ne=q(`securityGroupMode`),Pe=q(`ruleSource`),Fe=q(`securityGroupIds`)??[],$=ye.find(e=>e.SubnetId===Me)?.VpcId??Se,Ie=$?R.filter(e=>e.VpcId===$):R,Le=e=>{let t=ke(`securityGroupIds`)??[];K(`securityGroupIds`,t.includes(e)?t.filter(t=>t!==e):[...t,e],{shouldValidate:!0})};return(0,le.useEffect)(()=>{K(`rootDeviceName`,Q.deviceName)},[je,Q.deviceName,K]),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(a,{to:`/ec2/describe-instances`,children:`Back to instances`}),(0,N.jsx)(O,{title:`Run Instances`}),V.length===0&&(0,N.jsx)(D,{msg:`No compute available. No new instances can be created until compute is available.`}),I.error&&(0,N.jsx)(D,{error:I.error,msg:`Failed to create instance`}),(0,N.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:Oe(async t=>{await I.mutateAsync({...t,resolvedVpcId:$}),e({to:`/ec2/describe-instances`})}),children:[(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),(0,N.jsx)(T,{control:W,name:`imageId`,render:({field:e})=>{let t=L.find(t=>t.ImageId===e.value);return(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t),value:e.value??``,children:[(0,N.jsx)(p,{"aria-invalid":!!J.imageId,className:`w-full`,id:`imageId`,children:(0,N.jsx)(c,{children:t?`${t.Name??`Unnamed`} (${t.Architecture})`:``})}),(0,N.jsx)(u,{children:L.map(e=>(0,N.jsxs)(l,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId))})]})}}),(0,N.jsx)(j,{errors:[J.imageId]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,N.jsx)(T,{control:W,name:`instanceType`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t),value:e.value||``,children:[(0,N.jsx)(p,{"aria-invalid":!!J.instanceType,className:`w-full`,id:`instanceType`,children:(0,N.jsx)(c,{})}),(0,N.jsxs)(u,{children:[U.length>0&&(0,N.jsxs)(f,{children:[H.length>0&&(0,N.jsx)(s,{children:`Standard`}),U.map(e=>(0,N.jsxs)(l,{value:e,children:[e,` (`,z[e],` available)`]},e))]}),H.length>0&&U.length>0&&(0,N.jsx)(d,{}),H.length>0&&(0,N.jsxs)(f,{children:[(0,N.jsx)(s,{children:`GPU-Accelerated`}),H.map(e=>{let t=B.get(e);return(0,N.jsxs)(l,{value:e,children:[e,t?` — ${i(t.totalMiB)}`:``,` (`,z[e],` available)`]},e)})]})]})]})}),Z&&(0,N.jsxs)(A,{children:[`GPU: `,Z.gpuName,` ·`,` `,i(Z.totalMiB),` VRAM`]}),(0,N.jsx)(j,{errors:[J.instanceType]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),(0,N.jsx)(T,{control:W,name:`keyName`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t),value:e.value||``,children:[(0,N.jsx)(p,{"aria-invalid":!!J.keyName,className:`w-full`,id:`keyName`,children:(0,N.jsx)(c,{})}),(0,N.jsx)(u,{children:ve.map(e=>(0,N.jsx)(l,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId))})]})}),(0,N.jsx)(j,{errors:[J.keyName]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),(0,N.jsx)(T,{control:W,name:`subnetId`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t===`none`?void 0:t),value:e.value??`none`,children:[(0,N.jsx)(p,{className:`w-full`,id:`subnetId`,children:(0,N.jsx)(c,{})}),(0,N.jsxs)(u,{children:[(0,N.jsx)(l,{value:`none`,children:`none`}),ye.map(e=>(0,N.jsx)(l,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId))]})]})})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:`Security Group`}),(0,N.jsx)(A,{children:$?`Applies to VPC ${$}`:`No VPC resolved — select a subnet`}),(0,N.jsx)(T,{control:W,name:`securityGroupMode`,render:({field:e})=>(0,N.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,N.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{"aria-label":`Create new security group`,checked:e.value===`create`,onChange:()=>e.onChange(`create`),type:`radio`}),`Create new`]}),(0,N.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{"aria-label":`Select existing security group`,checked:e.value===`existing`,onChange:()=>e.onChange(`existing`),type:`radio`}),`Select existing`]})]})}),Ne===`create`?(0,N.jsxs)(`div`,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`newSgName`,children:`Name`})}),(0,N.jsx)(S,{"aria-invalid":!!J.newSgName,id:`newSgName`,type:`text`,...G(`newSgName`)}),(0,N.jsx)(j,{errors:[J.newSgName]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`newSgDescription`,children:`Description`})}),(0,N.jsx)(S,{id:`newSgDescription`,type:`text`,...G(`newSgDescription`)})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:`Inbound rules`}),(0,N.jsxs)(`div`,{className:`space-y-1`,children:[(0,N.jsx)(T,{control:W,name:`allowSsh`,render:({field:e})=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{"aria-label":`Allow SSH`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Allow SSH (tcp/22)`]})}),(0,N.jsx)(T,{control:W,name:`allowHttp`,render:({field:e})=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{"aria-label":`Allow HTTP`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Allow HTTP (tcp/80)`]})}),(0,N.jsx)(T,{control:W,name:`allowHttps`,render:({field:e})=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{"aria-label":`Allow HTTPS`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Allow HTTPS (tcp/443)`]})})]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:`Source`}),(0,N.jsx)(T,{control:W,name:`ruleSource`,render:({field:e})=>(0,N.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,N.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{"aria-label":`Source anywhere`,checked:e.value===`anywhere`,onChange:()=>e.onChange(`anywhere`),type:`radio`}),`Anywhere (0.0.0.0/0)`]}),(0,N.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{"aria-label":`Source custom CIDR`,checked:e.value===`custom`,onChange:()=>e.onChange(`custom`),type:`radio`}),`Custom CIDR`]})]})}),Pe===`custom`&&(0,N.jsxs)(`div`,{className:`mt-2`,children:[(0,N.jsx)(S,{"aria-invalid":!!J.customCidr,placeholder:`203.0.113.0/24`,type:`text`,...G(`customCidr`)}),(0,N.jsx)(j,{errors:[J.customCidr]})]})]})]}):(0,N.jsxs)(`div`,{className:`mt-3`,children:[Ie.length===0?(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the resolved VPC.`}):(0,N.jsx)(`div`,{className:`space-y-1`,children:Ie.map(e=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,N.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:Fe.includes(e.GroupId??``),onChange:()=>Le(e.GroupId??``),type:`checkbox`}),(0,N.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))}),(0,N.jsx)(j,{errors:[J.securityGroupIds]})]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`placementGroupName`,children:`Placement Group`})}),(0,N.jsx)(T,{control:W,name:`placementGroupName`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t===`none`?void 0:t),value:e.value??`none`,children:[(0,N.jsx)(p,{className:`w-full`,id:`placementGroupName`,children:(0,N.jsx)(c,{})}),(0,N.jsxs)(u,{children:[(0,N.jsx)(l,{value:`none`,children:`none`}),be.map(e=>(0,N.jsxs)(l,{value:e.GroupName??``,children:[e.GroupName,` (`,e.Strategy,`)`]},e.GroupId))]})]})})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`count`,children:`Number of Instances`})}),(0,N.jsx)(S,{"aria-describedby":`count-description`,"aria-invalid":!!J.count,id:`count`,type:`number`,...G(`count`,{valueAsNumber:!0})}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`count-description`,children:X&&`Available capacity for ${X}: ${Ae}`}),(0,N.jsx)(j,{errors:[J.count]})]}),(0,N.jsxs)(ce,{children:[(0,N.jsxs)(se,{className:`group flex h-7 w-full items-center justify-between rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none hover:bg-input/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 md:text-xs/relaxed dark:bg-input/30 dark:hover:bg-input/50`,render:(0,N.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,N.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,N.jsx)(o,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),(0,N.jsxs)(oe,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`rootDeviceName`,children:`Device Name`})}),(0,N.jsx)(S,{"aria-invalid":!!J.rootDeviceName,id:`rootDeviceName`,type:`text`,...G(`rootDeviceName`)}),(0,N.jsx)(j,{errors:[J.rootDeviceName]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),(0,N.jsx)(S,{"aria-invalid":!!J.rootVolumeSize,id:`rootVolumeSize`,max:fe,min:Q.snapshotSize??de,placeholder:Q.snapshotSize?`${Q.snapshotSize} (AMI default)`:`use AMI / backend default`,type:`number`,...G(`rootVolumeSize`,{setValueAs:e=>e===``||e==null?void 0:Number(e)})}),Q.snapshotSize!==void 0&&(0,N.jsxs)(A,{children:[`AMI snapshot size: `,Q.snapshotSize,` GiB`]}),(0,N.jsx)(j,{errors:[J.rootVolumeSize]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),(0,N.jsx)(T,{control:W,name:`rootVolumeType`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t),value:e.value??ue,children:[(0,N.jsx)(p,{"aria-invalid":!!J.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,N.jsx)(c,{})}),(0,N.jsx)(u,{children:ie.map(e=>(0,N.jsx)(l,{value:e,children:e},e))})]})}),(0,N.jsx)(j,{errors:[J.rootVolumeType]})]}),(0,N.jsx)(M,{children:(0,N.jsx)(T,{control:W,name:`rootDeleteOnTermination`,render:({field:e})=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{"aria-label":`Delete on termination`,checked:e.value??!0,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Delete on termination`]})})})]})]}),(0,N.jsx)(ee,{commands:me(q,$)}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(h,{disabled:Y||I.isPending,onClick:async()=>await e({to:`/ec2/describe-instances`}),type:`button`,variant:`outline`,children:`Cancel`}),(0,N.jsx)(h,{disabled:Y||I.isPending||V.length===0,type:`submit`,children:Y||I.isPending?`Creating…`:`Create Instance`})]})]})]})}function F(e){let t=e?.RootDeviceName??P,n=e?.BlockDeviceMappings??[];return{deviceName:t,snapshotSize:(n.find(e=>e.DeviceName===t)??n[0])?.Ebs?.VolumeSize}}function me(e,t){let n=e(`imageId`),r=typeof n==`string`?n:``,i=e(`instanceType`),a=typeof i==`string`?i:``,o=e(`keyName`),s=typeof o==`string`?o:``,c=e(`subnetId`),l=typeof c==`string`?c:``,u=e(`placementGroupName`),d=typeof u==`string`?u:``,f=e(`count`),p=typeof f==`number`?f:0,m=e(`rootDeviceName`),ee=typeof m==`string`?m:``,h=e(`rootVolumeSize`),g=typeof h==`number`?h:void 0,_=e(`rootVolumeType`),v=typeof _==`string`?_:``,y=e(`rootDeleteOnTermination`),te=typeof y==`boolean`?y:!0,b=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 run-instances`},{type:`flag`,value:` \\ +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{Ht as i}from"./auth.js";import{t as a}from"./back-link.js";import{t as o}from"./chevron-down.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m}from"./select.js";import{t as ee}from"./cli-command-panel.js";import{t as h}from"./button.js";import{d as g}from"./ec2.js";import{Ht as _,Nt as v,Qr as y,Rt as te,Zt as b,jt as x,nr as S,qt as C,tn as ne}from"./index.js";import{i as w,n as T,t as E}from"./zod.js";import{t as D}from"./error-banner.js";import{t as O}from"./page-heading.js";import{a as k,n as A,r as j,t as M}from"./field.js";import{i as re,t as ie,v as ae}from"./ec22.js";import{n as oe,r as se,t as ce}from"./collapsible.js";var le=t(n()),N=e(),P=`/dev/sda1`,ue=`gp3`,de=1,fe=16384;function pe(){let e=y(),{data:t}=r(x),{data:n}=r(te),{data:P}=r(v),{data:pe}=r(b),{data:he}=r(_),{data:ge}=r(ne),{data:_e}=r(C),I=g(),L=t.Images??[],ve=n.KeyPairs??[],ye=pe.Subnets??[],be=he.PlacementGroups??[],xe=ge.Vpcs??[],R=_e.SecurityGroups??[],Se=(xe.find(e=>e.IsDefault)??xe[0])?.VpcId,Ce=ae(R.map(e=>e.GroupName??``)),z={},B=new Map;for(let e of P.InstanceTypes??[]){let t=e.InstanceType;if(t&&(z[t]=(z[t]??0)+1,!B.has(t))){let n=e.GpuInfo?.Gpus;n&&n.length>0&&B.set(t,{totalMiB:e.GpuInfo?.TotalGpuMemoryInMiB??0,gpuName:n[0]?.Name??``})}}let V=Object.keys(z).toSorted(),H=V.filter(e=>B.has(e)),U=V.filter(e=>!B.has(e)),we=L[0]?.ImageId,Te=ve[0]?.KeyName,Ee=V.find(e=>e.endsWith(`.nano`))??V[0],De=F(L.find(e=>e.ImageId===we)),{control:W,handleSubmit:Oe,register:G,setValue:K,getValues:ke,watch:q,formState:{errors:J,isSubmitting:Y}}=w({resolver:E(re.refine(e=>e.count<=(z[e.instanceType]??1),{message:`Cannot exceed available capacity`,path:[`count`]}).superRefine((e,t)=>{let n=F(L.find(t=>t.ImageId===e.imageId)).snapshotSize;e.rootVolumeSize!==void 0&&n!==void 0&&e.rootVolumeSizee.ImageId===je)),Me=q(`subnetId`),Ne=q(`securityGroupMode`),Pe=q(`ruleSource`),Fe=q(`securityGroupIds`)??[],$=ye.find(e=>e.SubnetId===Me)?.VpcId??Se,Ie=$?R.filter(e=>e.VpcId===$):R,Le=e=>{let t=ke(`securityGroupIds`)??[];K(`securityGroupIds`,t.includes(e)?t.filter(t=>t!==e):[...t,e],{shouldValidate:!0})};return(0,le.useEffect)(()=>{K(`rootDeviceName`,Q.deviceName)},[je,Q.deviceName,K]),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(a,{to:`/ec2/describe-instances`,children:`Back to instances`}),(0,N.jsx)(O,{title:`Run Instances`}),V.length===0&&(0,N.jsx)(D,{msg:`No compute available. No new instances can be created until compute is available.`}),I.error&&(0,N.jsx)(D,{error:I.error,msg:`Failed to create instance`}),(0,N.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:Oe(async t=>{await I.mutateAsync({...t,resolvedVpcId:$}),e({to:`/ec2/describe-instances`})}),children:[(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),(0,N.jsx)(T,{control:W,name:`imageId`,render:({field:e})=>{let t=L.find(t=>t.ImageId===e.value);return(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t),value:e.value??``,children:[(0,N.jsx)(p,{"aria-invalid":!!J.imageId,className:`w-full`,id:`imageId`,children:(0,N.jsx)(c,{children:t?`${t.Name??`Unnamed`} (${t.Architecture})`:``})}),(0,N.jsx)(u,{children:L.map(e=>(0,N.jsxs)(l,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId))})]})}}),(0,N.jsx)(j,{errors:[J.imageId]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,N.jsx)(T,{control:W,name:`instanceType`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t),value:e.value||``,children:[(0,N.jsx)(p,{"aria-invalid":!!J.instanceType,className:`w-full`,id:`instanceType`,children:(0,N.jsx)(c,{})}),(0,N.jsxs)(u,{children:[U.length>0&&(0,N.jsxs)(f,{children:[H.length>0&&(0,N.jsx)(s,{children:`Standard`}),U.map(e=>(0,N.jsxs)(l,{value:e,children:[e,` (`,z[e],` available)`]},e))]}),H.length>0&&U.length>0&&(0,N.jsx)(d,{}),H.length>0&&(0,N.jsxs)(f,{children:[(0,N.jsx)(s,{children:`GPU-Accelerated`}),H.map(e=>{let t=B.get(e);return(0,N.jsxs)(l,{value:e,children:[e,t?` — ${i(t.totalMiB)}`:``,` (`,z[e],` available)`]},e)})]})]})]})}),Z&&(0,N.jsxs)(A,{children:[`GPU: `,Z.gpuName,` ·`,` `,i(Z.totalMiB),` VRAM`]}),(0,N.jsx)(j,{errors:[J.instanceType]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),(0,N.jsx)(T,{control:W,name:`keyName`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t),value:e.value||``,children:[(0,N.jsx)(p,{"aria-invalid":!!J.keyName,className:`w-full`,id:`keyName`,children:(0,N.jsx)(c,{})}),(0,N.jsx)(u,{children:ve.map(e=>(0,N.jsx)(l,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId))})]})}),(0,N.jsx)(j,{errors:[J.keyName]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),(0,N.jsx)(T,{control:W,name:`subnetId`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t===`none`?void 0:t),value:e.value??`none`,children:[(0,N.jsx)(p,{className:`w-full`,id:`subnetId`,children:(0,N.jsx)(c,{})}),(0,N.jsxs)(u,{children:[(0,N.jsx)(l,{value:`none`,children:`none`}),ye.map(e=>(0,N.jsx)(l,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId))]})]})})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:`Security Group`}),(0,N.jsx)(A,{children:$?`Applies to VPC ${$}`:`No VPC resolved — select a subnet`}),(0,N.jsx)(T,{control:W,name:`securityGroupMode`,render:({field:e})=>(0,N.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,N.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{"aria-label":`Create new security group`,checked:e.value===`create`,onChange:()=>e.onChange(`create`),type:`radio`}),`Create new`]}),(0,N.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{"aria-label":`Select existing security group`,checked:e.value===`existing`,onChange:()=>e.onChange(`existing`),type:`radio`}),`Select existing`]})]})}),Ne===`create`?(0,N.jsxs)(`div`,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`newSgName`,children:`Name`})}),(0,N.jsx)(S,{"aria-invalid":!!J.newSgName,id:`newSgName`,type:`text`,...G(`newSgName`)}),(0,N.jsx)(j,{errors:[J.newSgName]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`newSgDescription`,children:`Description`})}),(0,N.jsx)(S,{id:`newSgDescription`,type:`text`,...G(`newSgDescription`)})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:`Inbound rules`}),(0,N.jsxs)(`div`,{className:`space-y-1`,children:[(0,N.jsx)(T,{control:W,name:`allowSsh`,render:({field:e})=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{"aria-label":`Allow SSH`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Allow SSH (tcp/22)`]})}),(0,N.jsx)(T,{control:W,name:`allowHttp`,render:({field:e})=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{"aria-label":`Allow HTTP`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Allow HTTP (tcp/80)`]})}),(0,N.jsx)(T,{control:W,name:`allowHttps`,render:({field:e})=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{"aria-label":`Allow HTTPS`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Allow HTTPS (tcp/443)`]})})]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:`Source`}),(0,N.jsx)(T,{control:W,name:`ruleSource`,render:({field:e})=>(0,N.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,N.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{"aria-label":`Source anywhere`,checked:e.value===`anywhere`,onChange:()=>e.onChange(`anywhere`),type:`radio`}),`Anywhere (0.0.0.0/0)`]}),(0,N.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`input`,{"aria-label":`Source custom CIDR`,checked:e.value===`custom`,onChange:()=>e.onChange(`custom`),type:`radio`}),`Custom CIDR`]})]})}),Pe===`custom`&&(0,N.jsxs)(`div`,{className:`mt-2`,children:[(0,N.jsx)(S,{"aria-invalid":!!J.customCidr,placeholder:`203.0.113.0/24`,type:`text`,...G(`customCidr`)}),(0,N.jsx)(j,{errors:[J.customCidr]})]})]})]}):(0,N.jsxs)(`div`,{className:`mt-3`,children:[Ie.length===0?(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the resolved VPC.`}):(0,N.jsx)(`div`,{className:`space-y-1`,children:Ie.map(e=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,N.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:Fe.includes(e.GroupId??``),onChange:()=>Le(e.GroupId??``),type:`checkbox`}),(0,N.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))}),(0,N.jsx)(j,{errors:[J.securityGroupIds]})]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`placementGroupName`,children:`Placement Group`})}),(0,N.jsx)(T,{control:W,name:`placementGroupName`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t===`none`?void 0:t),value:e.value??`none`,children:[(0,N.jsx)(p,{className:`w-full`,id:`placementGroupName`,children:(0,N.jsx)(c,{})}),(0,N.jsxs)(u,{children:[(0,N.jsx)(l,{value:`none`,children:`none`}),be.map(e=>(0,N.jsxs)(l,{value:e.GroupName??``,children:[e.GroupName,` (`,e.Strategy,`)`]},e.GroupId))]})]})})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`count`,children:`Number of Instances`})}),(0,N.jsx)(S,{"aria-describedby":`count-description`,"aria-invalid":!!J.count,id:`count`,type:`number`,...G(`count`,{valueAsNumber:!0})}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`count-description`,children:X&&`Available capacity for ${X}: ${Ae}`}),(0,N.jsx)(j,{errors:[J.count]})]}),(0,N.jsxs)(ce,{children:[(0,N.jsxs)(se,{className:`group flex h-7 w-full items-center justify-between rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none hover:bg-input/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 md:text-xs/relaxed dark:bg-input/30 dark:hover:bg-input/50`,render:(0,N.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,N.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,N.jsx)(o,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),(0,N.jsxs)(oe,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`rootDeviceName`,children:`Device Name`})}),(0,N.jsx)(S,{"aria-invalid":!!J.rootDeviceName,id:`rootDeviceName`,type:`text`,...G(`rootDeviceName`)}),(0,N.jsx)(j,{errors:[J.rootDeviceName]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),(0,N.jsx)(S,{"aria-invalid":!!J.rootVolumeSize,id:`rootVolumeSize`,max:fe,min:Q.snapshotSize??de,placeholder:Q.snapshotSize?`${Q.snapshotSize} (AMI default)`:`use AMI / backend default`,type:`number`,...G(`rootVolumeSize`,{setValueAs:e=>e===``||e==null?void 0:Number(e)})}),Q.snapshotSize!==void 0&&(0,N.jsxs)(A,{children:[`AMI snapshot size: `,Q.snapshotSize,` GiB`]}),(0,N.jsx)(j,{errors:[J.rootVolumeSize]})]}),(0,N.jsxs)(M,{children:[(0,N.jsx)(k,{children:(0,N.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),(0,N.jsx)(T,{control:W,name:`rootVolumeType`,render:({field:e})=>(0,N.jsxs)(m,{onValueChange:t=>e.onChange(t),value:e.value??ue,children:[(0,N.jsx)(p,{"aria-invalid":!!J.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,N.jsx)(c,{})}),(0,N.jsx)(u,{children:ie.map(e=>(0,N.jsx)(l,{value:e,children:e},e))})]})}),(0,N.jsx)(j,{errors:[J.rootVolumeType]})]}),(0,N.jsx)(M,{children:(0,N.jsx)(T,{control:W,name:`rootDeleteOnTermination`,render:({field:e})=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{"aria-label":`Delete on termination`,checked:e.value??!0,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Delete on termination`]})})})]})]}),(0,N.jsx)(ee,{commands:me(q,$)}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[(0,N.jsx)(h,{disabled:Y||I.isPending,onClick:async()=>await e({to:`/ec2/describe-instances`}),type:`button`,variant:`outline`,children:`Cancel`}),(0,N.jsx)(h,{disabled:Y||I.isPending||V.length===0,type:`submit`,children:Y||I.isPending?`Creating…`:`Create Instance`})]})]})]})}function F(e){let t=e?.RootDeviceName??P,n=e?.BlockDeviceMappings??[];return{deviceName:t,snapshotSize:(n.find(e=>e.DeviceName===t)??n[0])?.Ebs?.VolumeSize}}function me(e,t){let n=e(`imageId`),r=typeof n==`string`?n:``,i=e(`instanceType`),a=typeof i==`string`?i:``,o=e(`keyName`),s=typeof o==`string`?o:``,c=e(`subnetId`),l=typeof c==`string`?c:``,u=e(`placementGroupName`),d=typeof u==`string`?u:``,f=e(`count`),p=typeof f==`number`?f:0,m=e(`rootDeviceName`),ee=typeof m==`string`?m:``,h=e(`rootVolumeSize`),g=typeof h==`number`?h:void 0,_=e(`rootVolumeType`),v=typeof _==`string`?_:``,y=e(`rootDeleteOnTermination`),te=typeof y==`boolean`?y:!0,b=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 run-instances`},{type:`flag`,value:` \\ --image-id`},{type:`value`,value:` ${r||``}`},{type:`flag`,value:` \\ --instance-type`},{type:`value`,value:` ${a||``}`},{type:`flag`,value:` \\ --key-name`},{type:`value`,value:` ${s||``}`}];l&&b.push({type:`flag`,value:` \\ diff --git a/spinifex/services/spinifexui/frontend/dist/assets/run-task.js b/spinifex/services/spinifexui/frontend/dist/assets/run-task.js index 8dc3d2e0d..39910775a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/run-task.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/run-task.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./back-link.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{s as u}from"./ecs.js";import{Gt as d,Xr as f,Yt as p,er as m,ot as h,st as g,tt as _}from"./index.js";import{i as v,n as y,t as b}from"./zod.js";import{t as x}from"./error-banner.js";import{t as S}from"./form-actions.js";import{t as C}from"./page-heading.js";import{a as w,r as T,t as E}from"./field.js";import{i as D}from"./ecs2.js";var O=t(),k=e();function A(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function j({cluster:e}){let t=f(),_=u(),{data:O}=r(g),{data:j}=r(p),{data:M}=r(d),N=j.Subnets??[],P=M.SecurityGroups??[],{control:F,handleSubmit:I,register:L,watch:R,setValue:z,getValues:B,formState:{errors:V,isSubmitting:H}}=v({resolver:b(D),defaultValues:{cluster:e,taskDefinition:``,count:1,subnets:[],securityGroups:[],assignPublicIp:!1}}),{data:U}=n(h(R(`taskDefinition`))),W=U?.networkMode===`awsvpc`,G=R(`subnets`),K=R(`securityGroups`),q=(e,t)=>{let n=B(e);z(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})};function J(){t({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:e}})}function Y(e){_.mutate({cluster:e.cluster,taskDefinition:e.taskDefinition,count:e.count,awsvpc:W,subnets:e.subnets,securityGroups:e.securityGroups,assignPublicIp:e.assignPublicIp},{onSuccess:J})}let X=W&&G.length===0;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(i,{params:{clusterName:e},to:`/ecs/list-clusters/$clusterName`,children:e}),(0,k.jsx)(C,{subtitle:`Cluster: ${e}`,title:`Run Task`}),_.isError&&(0,k.jsx)(x,{error:_.error instanceof Error?_.error:void 0,msg:`Failed to run task.`}),(0,k.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:I(Y),children:[(0,k.jsxs)(E,{children:[(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),(0,k.jsx)(y,{control:F,name:`taskDefinition`,render:({field:e})=>(0,k.jsxs)(l,{onValueChange:e.onChange,value:e.value,children:[(0,k.jsx)(c,{className:`w-full`,id:`taskDefinition`,children:(0,k.jsx)(a,{placeholder:`Select a task definition`})}),(0,k.jsx)(s,{children:O.map(e=>{let t=A(e);return(0,k.jsx)(o,{value:t,children:t},e)})})]})}),(0,k.jsx)(T,{errors:[V.taskDefinition]})]}),(0,k.jsxs)(E,{children:[(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`count`,children:`Count`})}),(0,k.jsx)(m,{id:`count`,type:`number`,...L(`count`,{valueAsNumber:!0})}),(0,k.jsx)(T,{errors:[V.count]})]}),W&&(0,k.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,k.jsx)(`div`,{className:`mt-2 space-y-1`,children:N.map(e=>(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,k.jsx)(`input`,{checked:G.includes(e.SubnetId??``),onChange:()=>q(`subnets`,e.SubnetId??``),type:`checkbox`}),(0,k.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,k.jsx)(`div`,{className:`mt-2 space-y-1`,children:P.map(e=>(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,k.jsx)(`input`,{checked:K.includes(e.GroupId??``),onChange:()=>q(`securityGroups`,e.GroupId??``),type:`checkbox`}),(0,k.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,k.jsx)(`input`,{type:`checkbox`,...L(`assignPublicIp`)}),(0,k.jsx)(`span`,{children:`Assign public IP`})]})]}),(0,k.jsx)(S,{isPending:_.isPending||X,isSubmitting:H,onCancel:J,pendingLabel:`Running…`,submitLabel:`Run Task`})]})]})}function M(){let e=(0,O.c)(2),{cluster:t}=_.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,k.jsx)(j,{cluster:t}),e[0]=t,e[1]=n),n}export{M as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./back-link.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{c as u}from"./ecs.js";import{Qr as d,Zt as f,ct as p,lt as m,nr as h,qt as g,rt as _}from"./index.js";import{i as v,n as y,t as b}from"./zod.js";import{t as x}from"./error-banner.js";import{t as S}from"./form-actions.js";import{t as C}from"./page-heading.js";import{a as w,r as T,t as E}from"./field.js";import{i as D}from"./ecs2.js";var O=t(),k=e();function A(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function j({cluster:e}){let t=d(),_=u(),{data:O}=r(m),{data:j}=r(f),{data:M}=r(g),N=j.Subnets??[],P=M.SecurityGroups??[],{control:F,handleSubmit:I,register:L,watch:R,setValue:z,getValues:B,formState:{errors:V,isSubmitting:H}}=v({resolver:b(D),defaultValues:{cluster:e,taskDefinition:``,count:1,subnets:[],securityGroups:[],assignPublicIp:!1}}),{data:U}=n(p(R(`taskDefinition`))),W=U?.networkMode===`awsvpc`,G=R(`subnets`),K=R(`securityGroups`),q=(e,t)=>{let n=B(e);z(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})};function J(){t({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:e}})}function Y(e){_.mutate({cluster:e.cluster,taskDefinition:e.taskDefinition,count:e.count,awsvpc:W,subnets:e.subnets,securityGroups:e.securityGroups,assignPublicIp:e.assignPublicIp},{onSuccess:J})}let X=W&&G.length===0;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(i,{params:{clusterName:e},to:`/ecs/list-clusters/$clusterName`,children:e}),(0,k.jsx)(C,{subtitle:`Cluster: ${e}`,title:`Run Task`}),_.isError&&(0,k.jsx)(x,{error:_.error instanceof Error?_.error:void 0,msg:`Failed to run task.`}),(0,k.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:I(Y),children:[(0,k.jsxs)(E,{children:[(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),(0,k.jsx)(y,{control:F,name:`taskDefinition`,render:({field:e})=>(0,k.jsxs)(l,{onValueChange:e.onChange,value:e.value,children:[(0,k.jsx)(c,{className:`w-full`,id:`taskDefinition`,children:(0,k.jsx)(a,{placeholder:`Select a task definition`})}),(0,k.jsx)(s,{children:O.map(e=>{let t=A(e);return(0,k.jsx)(o,{value:t,children:t},e)})})]})}),(0,k.jsx)(T,{errors:[V.taskDefinition]})]}),(0,k.jsxs)(E,{children:[(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`count`,children:`Count`})}),(0,k.jsx)(h,{id:`count`,type:`number`,...L(`count`,{valueAsNumber:!0})}),(0,k.jsx)(T,{errors:[V.count]})]}),W&&(0,k.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,k.jsx)(`div`,{className:`mt-2 space-y-1`,children:N.map(e=>(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,k.jsx)(`input`,{checked:G.includes(e.SubnetId??``),onChange:()=>q(`subnets`,e.SubnetId??``),type:`checkbox`}),(0,k.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,k.jsx)(`div`,{className:`mt-2 space-y-1`,children:P.map(e=>(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,k.jsx)(`input`,{checked:K.includes(e.GroupId??``),onChange:()=>q(`securityGroups`,e.GroupId??``),type:`checkbox`}),(0,k.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,k.jsx)(`input`,{type:`checkbox`,...L(`assignPublicIp`)}),(0,k.jsx)(`span`,{children:`Assign public IP`})]})]}),(0,k.jsx)(S,{isPending:_.isPending||X,isSubmitting:H,onCancel:J,pendingLabel:`Running…`,submitLabel:`Run Task`})]})]})}function M(){let e=(0,O.c)(2),{cluster:t}=_.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,k.jsx)(j,{cluster:t}),e[0]=t,e[1]=n),n}export{M as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/s3.js b/spinifex/services/spinifexui/frontend/dist/assets/s3.js index c71186f96..3dae54dbd 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/s3.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/s3.js @@ -1,4 +1,4 @@ -import{i as e,t}from"./compiler-runtime.js";import{t as n}from"./useMutation.js";import{C as r,E as i,S as a,T as o,b as s,d as c,f as l,l as u,m as d,p as f,u as p,v as m,w as h,x as g,y as _}from"./awsClient.js";import{At as v,Pt as y,St as b,_t as x,lt as S,q as C,st as w,ut as T}from"./auth.js";import{_ as E,a as ee,g as D,h as te,i as O,m as k,n as A,o as ne,r as j,s as M,t as N}from"./tslib.es6.js";import{i as P}from"./index.browser.js";import{Zr as F}from"./index.js";var I=()=>{let e=Array(8);for(let t=0;t<8;t++){let n=Array(512);for(let e=0;e<256;e++){let r=BigInt(e);for(let e=0;e<8*(t+1);e++)r&1n?r=r>>1n^11127430586519243189n:r>>=1n;n[e*2]=Number(r>>32n&4294967295n),n[e*2+1]=Number(r&4294967295n)}e[t]=new Uint32Array(n)}return e},L,R,z,B,V,H,U,W,G,K=()=>{L||(L=I(),[R,z,B,V,H,U,W,G]=L)},re=class{c1=0;c2=0;constructor(){K(),this.reset()}update(e){let t=e.length,n=0,r=this.c1,i=this.c2;for(;n+8<=t;){let t=((i^e[n++])&255)<<1,a=((i>>>8^e[n++])&255)<<1,o=((i>>>16^e[n++])&255)<<1,s=((i>>>24^e[n++])&255)<<1,c=((r^e[n++])&255)<<1,l=((r>>>8^e[n++])&255)<<1,u=((r>>>16^e[n++])&255)<<1,d=((r>>>24^e[n++])&255)<<1;r=G[t]^W[a]^U[o]^H[s]^V[c]^B[l]^z[u]^R[d],i=G[t+1]^W[a+1]^U[o+1]^H[s+1]^V[c+1]^B[l+1]^z[u+1]^R[d+1]}for(;n>>8|(r&255)<<24)>>>0,r=r>>>8^R[t],i^=R[t+1],n++}this.c1=r,this.c2=i}async digest(){let e=this.c1^4294967295,t=this.c2^4294967295;return new Uint8Array([e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255])}reset(){this.c1=4294967295,this.c2=4294967295}},ie={CrtCrc64Nvme:null},ae=(e,{requestChecksumRequired:t,requestAlgorithmMember:n,requestChecksumCalculation:r})=>{if(!n)return r===o.WHEN_SUPPORTED||t?h:void 0;if(e[n])return e[n]},oe=e=>e===r.MD5?`content-md5`:`x-amz-checksum-${e.toLowerCase()}`,se=(e,t)=>{let n=e.toLowerCase();for(let e of Object.keys(t))if(n===e.toLowerCase())return!0;return!1},ce=(e,t)=>{let n=e.toLowerCase();for(let e of Object.keys(t))if(e.toLowerCase().startsWith(n))return!0;return!1},le=e=>e!==void 0&&typeof e!=`string`&&!ArrayBuffer.isView(e)&&!D(e),ue=function(){function e(){this.crc32c=new de}return e.prototype.update=function(e){ne(e)||this.crc32c.update(M(e))},e.prototype.digest=function(){return N(this,void 0,void 0,function(){return A(this,function(e){return[2,ee(this.crc32c.digest())]})})},e.prototype.reset=function(){this.crc32c=new de},e}(),de=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=j(e),i=r.next();!i.done;i=r.next()){var a=i.value;this.checksum=this.checksum>>>8^fe[(this.checksum^a)&255]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}(),fe=O([0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697]),pe=()=>P,me=[r.CRC32,r.CRC32C,r.CRC64NVME,r.SHA1,r.SHA256],he=[r.SHA256,r.SHA1,r.CRC32,r.CRC32C,r.CRC64NVME],ge=(e,t)=>{let{checksumAlgorithms:n={}}=t;switch(e){case r.MD5:return n?.MD5??t.md5;case r.CRC32:return n?.CRC32??pe();case r.CRC32C:return n?.CRC32C??ue;case r.CRC64NVME:return typeof ie.CrtCrc64Nvme==`function`?n?.CRC64NVME??ie.CrtCrc64Nvme:n?.CRC64NVME??re;case r.SHA1:return n?.SHA1??t.sha1;case r.SHA256:return n?.SHA256??t.sha256;default:if(n?.[e])return n[e];throw Error(`The checksum algorithm "${e}" is not supported by the client. Select one of ${me}, or provide an implementation to the client constructor checksums field.`)}},_e=(e,t)=>{let n=new e;return n.update(E(t||``)),n.digest()},ve={name:`flexibleChecksumsMiddleware`,step:`build`,tags:[`BODY_CHECKSUM`],override:!0},ye=(e,t)=>(n,i)=>async a=>{if(!y.isInstance(a.request)||ce(`x-amz-checksum-`,a.request.headers))return n(a);let{request:s,input:c}=a,{body:l,headers:u}=s,{base64Encoder:d,streamHasher:f}=e,{requestChecksumRequired:p,requestAlgorithmMember:m}=t,g=await e.requestChecksumCalculation(),_=m?.name,v=m?.httpHeader;_&&!c[_]&&(g===o.WHEN_SUPPORTED||p)&&(c[_]=h,v&&(u[v]=h));let b=ae(c,{requestChecksumRequired:p,requestAlgorithmMember:m?.name,requestChecksumCalculation:g}),x=l,S=u;if(b){switch(b){case r.CRC32:C(i,`FLEXIBLE_CHECKSUMS_REQ_CRC32`,`U`);break;case r.CRC32C:C(i,`FLEXIBLE_CHECKSUMS_REQ_CRC32C`,`V`);break;case r.CRC64NVME:C(i,`FLEXIBLE_CHECKSUMS_REQ_CRC64`,`W`);break;case r.SHA1:C(i,`FLEXIBLE_CHECKSUMS_REQ_SHA1`,`X`);break;case r.SHA256:C(i,`FLEXIBLE_CHECKSUMS_REQ_SHA256`,`Y`);break}let t=oe(b),n=ge(b,e);if(le(l)){let{getAwsChunkedEncodingStream:r,bodyLengthChecker:a}=e;x=r(typeof e.requestStreamBufferSize==`number`&&e.requestStreamBufferSize>=8*1024?k(l,e.requestStreamBufferSize,i.logger):l,{base64Encoder:d,bodyLengthChecker:a,checksumLocationName:t,checksumAlgorithmFn:n,streamHasher:f}),S={...u,"content-encoding":u[`content-encoding`]?`${u[`content-encoding`]},aws-chunked`:`aws-chunked`,"transfer-encoding":`chunked`,"x-amz-decoded-content-length":u[`content-length`],"x-amz-content-sha256":`STREAMING-UNSIGNED-PAYLOAD-TRAILER`,"x-amz-trailer":t},delete S[`content-length`]}else if(!se(t,u)){let e=await _e(n,l);S={...u,[t]:d(e)}}}try{return await n({...a,request:{...s,headers:S,body:x}})}catch(e){if(e instanceof Error&&e.name===`InvalidChunkSizeError`)try{e.message.endsWith(`.`)||(e.message+=`.`),e.message+=` Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.`}catch{}throw e}},be={name:`flexibleChecksumsInputMiddleware`,toMiddleware:`serializerMiddleware`,relation:`before`,tags:[`BODY_CHECKSUM`],override:!0},xe=(e,t)=>(n,r)=>async a=>{let s=a.input,{requestValidationModeMember:c}=t,l=await e.requestChecksumCalculation(),u=await e.responseChecksumValidation();switch(l){case o.WHEN_REQUIRED:C(r,`FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED`,`a`);break;case o.WHEN_SUPPORTED:C(r,`FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED`,`Z`);break}switch(u){case i.WHEN_REQUIRED:C(r,`FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED`,`c`);break;case i.WHEN_SUPPORTED:C(r,`FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED`,`b`);break}return c&&!s[c]&&u===i.WHEN_SUPPORTED&&(s[c]=`ENABLED`),n(a)},Se=(e=[])=>{let t=[],n=he.length;for(let r of e){let e=he.indexOf(r);e===-1?t[n++]=r:t[e]=r}return t.filter(Boolean)},Ce=e=>{let t=e.lastIndexOf(`-`);if(t!==-1){let n=e.slice(t+1);if(!n.startsWith(`0`)){let e=parseInt(n,10);if(!isNaN(e)&&e>=1&&e<=1e4)return!0}}return!1},we=async(e,{checksumAlgorithmFn:t,base64Encoder:n})=>n(await _e(t,e)),Te=async(e,{config:t,responseAlgorithms:n,logger:i})=>{let a=Se(n),{body:o,headers:s}=e;for(let n of a){let a=oe(n),c=s[a];if(c){let s;try{s=ge(n,t)}catch(e){if(n===r.CRC64NVME){i?.warn(`Skipping ${r.CRC64NVME} checksum validation: ${e.message}`);continue}throw e}let{base64Encoder:l}=t;if(le(o)){e.body=te({expectedChecksum:c,checksumSourceLocation:a,checksum:new s,source:o,base64Encoder:l});return}let u=await we(o,{checksumAlgorithmFn:s,base64Encoder:l});if(u===c)break;throw Error(`Checksum mismatch: expected "${u}" but received "${c}" in response header "${a}".`)}}},Ee={name:`flexibleChecksumsResponseMiddleware`,toMiddleware:`deserializerMiddleware`,relation:`after`,tags:[`BODY_CHECKSUM`],override:!0},De=(e,t)=>(n,r)=>async i=>{if(!y.isInstance(i.request))return n(i);let a=i.input,o=await n(i),s=o.response,{requestValidationModeMember:c,responseAlgorithms:l}=t;if(c&&a[c]===`ENABLED`){let{clientName:t,commandName:n}=r,i=Object.keys(e.checksumAlgorithms??{}).filter(e=>{let t=oe(e);return s.headers[t]!==void 0}),a=Se([...l??[],...i]);if(t===`S3Client`&&n===`GetObjectCommand`&&a.every(e=>{let t=oe(e),n=s.headers[t];return!n||Ce(n)}))return o;await Te(s,{config:e,responseAlgorithms:a,logger:r.logger})}return o},Oe=(e,t)=>({applyToStack:n=>{n.add(ye(e,t),ve),n.addRelativeTo(xe(e,t),be),n.addRelativeTo(De(e,t),Ee)}}),ke=`content-length`,Ae=`x-amz-decoded-content-length`;function je(){return(e,t)=>async n=>{let{request:r}=n;if(y.isInstance(r)&&!(ke in r.headers)&&!(Ae in r.headers)){let e=`Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;typeof t?.logger?.warn==`function`&&!(t.logger instanceof x)?t.logger.warn(e):console.warn(e)}return e({...n})}}var Me={step:`finalizeRequest`,tags:[`CHECK_CONTENT_LENGTH_HEADER`],name:`getCheckContentLengthHeaderPlugin`,override:!0},Ne=e=>({applyToStack:e=>{e.add(je(),Me)}});function Pe(e){return t=>async n=>{let{CreateBucketConfiguration:r}=n.input,i=await e.region();return!r?.LocationConstraint&&!r?.Location&&i!==`us-east-1`&&(n.input.CreateBucketConfiguration=n.input.CreateBucketConfiguration??{},n.input.CreateBucketConfiguration.LocationConstraint=i),t(n)}}var Fe={step:`initialize`,tags:[`LOCATION_CONSTRAINT`,`CREATE_BUCKET_CONFIGURATION`],name:`locationConstraintMiddleware`,override:!0},Ie=e=>({applyToStack:t=>{t.add(Pe(e),Fe)}});function Le(e){return t=>async n=>{let r={...n.input};for(let t of[{target:`SSECustomerKey`,hash:`SSECustomerKeyMD5`},{target:`CopySourceSSECustomerKey`,hash:`CopySourceSSECustomerKeyMD5`}]){let n=r[t.target];if(n){let i;typeof n==`string`?ze(n,e)?i=e.base64Decoder(n):(i=e.utf8Decoder(n),r[t.target]=e.base64Encoder(i)):(i=ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n),r[t.target]=e.base64Encoder(i));let a=new e.md5;a.update(i),r[t.hash]=e.base64Encoder(await a.digest())}}return t({...n,input:r})}}var Re={name:`ssecMiddleware`,step:`initialize`,tags:[`SSE`],override:!0},q=e=>({applyToStack:t=>{t.add(Le(e),Re)}});function ze(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return t.base64Decoder(e).length===32}catch{return!1}}var Be=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n)]}).s(`AmazonS3`,`AbortMultipartUpload`,{}).n(`S3Client`,`AbortMultipartUploadCommand`).sc(p).build(){},Ve=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n),q(n)]}).s(`AmazonS3`,`CompleteMultipartUpload`,{}).n(`S3Client`,`CompleteMultipartUploadCommand`).sc(c).build(){},He=class extends b.classBuilder().ep({...g,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},DisableAccessPoints:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n),Ie(n)]}).s(`AmazonS3`,`CreateBucket`,{}).n(`S3Client`,`CreateBucketCommand`).sc(l).build(){},Ue=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n),q(n)]}).s(`AmazonS3`,`CreateMultipartUpload`,{}).n(`S3Client`,`CreateMultipartUploadCommand`).sc(f).build(){},We=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n)]}).s(`AmazonS3`,`DeleteObject`,{}).n(`S3Client`,`DeleteObjectCommand`).sc(d).build(){},Ge=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),Oe(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),Ne(n),a(n),q(n)]}).s(`AmazonS3`,`PutObject`,{}).n(`S3Client`,`PutObjectCommand`).sc(m).build(){},Ke=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),Oe(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),a(n)]}).s(`AmazonS3`,`PutObjectTagging`,{}).n(`S3Client`,`PutObjectTaggingCommand`).sc(_).build(){},qe=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),Oe(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),a(n),q(n)]}).s(`AmazonS3`,`UploadPart`,{}).n(`S3Client`,`UploadPartCommand`).sc(s).build(){},Je={CRC32:`CRC32`,CRC32C:`CRC32C`,CRC64NVME:`CRC64NVME`,MD5:`MD5`,SHA1:`SHA1`,SHA256:`SHA256`,SHA512:`SHA512`,XXHASH128:`XXHASH128`,XXHASH3:`XXHASH3`,XXHASH64:`XXHASH64`},Ye=e(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f;for(f=0;f>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;ac?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),Ze=e((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),J=e((e=>{var t=Xe(),n=Ze(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return p(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return m(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);var r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);var i=h(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:g(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);var n=v(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){for(var t=e.length<0?0:g(e.length)|0,n=o(t),r=0;r=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function _(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i2&&arguments[2]===!0;if(!r&&n===0)return 0;for(var i=!1;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return V(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return W(e).length;default:if(i)return r?-1:V(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=v;function y(e,t,n){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return M(this,t,n);case`utf8`:case`utf-8`:return O(this,t,n);case`ascii`:return ne(this,t,n);case`latin1`:case`binary`:return j(this,t,n);case`base64`:return te(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return N(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(var t=0;tn&&(t+=` ... `),``},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),d=0;d2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,re(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0)if(i)n=0;else return-1;if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:S(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):S(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function S(e,t,n,r,i){var a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}var l;if(i){var u=-1;for(l=n;lo&&(n=o-s),l=n;l>=0;l--){for(var d=!0,f=0;fi&&(r=i)):r=i;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);var i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;for(var a=!1;;)switch(r){case`hex`:return C(this,e,t,n);case`utf8`:case`utf-8`:return w(this,e,t,n);case`ascii`:return T(this,e,t,n);case`latin1`:case`binary`:return E(this,e,t,n);case`base64`:return ee(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return D(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function te(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+s<=n){var c,l,u,d;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[i+1],(c&192)==128&&(d=(a&31)<<6|c&63,d>127&&(o=d));break;case 3:c=e[i+1],l=e[i+2],(c&192)==128&&(l&192)==128&&(d=(a&15)<<12|(c&63)<<6|l&63,d>2047&&(d<55296||d>57343)&&(o=d));break;case 4:c=e[i+1],l=e[i+2],u=e[i+3],(c&192)==128&&(l&192)==128&&(u&192)==128&&(d=(a&15)<<18|(c&63)<<12|(l&63)<<6|u&63,d>65535&&d<1114112&&(o=d))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|o&1023),r.push(o),i+=s}return A(r)}var k=4096;function A(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);for(var n=``,r=0;rr)&&(n=r);for(var i=``,a=t;an&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),tn)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!1,52,8)};function F(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||te.length)throw RangeError(`Index out of range`)}s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var i=2**(8*n)-1;F(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=e&255;++o>>=0,n>>>=0,!r){var i=2**(8*n)-1;F(this,e,t,n,i,0)}var a=n-1,o=1;for(this[t+a]=e&255;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);F(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=e&255;++a>0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);F(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=e&255;--a>=0&&(o*=256);)e<0&&s===0&&this[t+a+1]!==0&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function I(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function L(e,t,r,i,a){return t=+t,r>>>=0,a||I(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)};function R(e,t,r,i,a){return t=+t,r>>>=0,a||I(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},s.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!s.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){var i=e.charCodeAt(0);(r===`utf8`&&i<128||r===`latin1`)&&(e=i)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length>>=0,n=n===void 0?this.length:n>>>0,e||=0;var a;if(typeof e==`number`)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function H(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function W(e){return t.toByteArray(B(e))}function G(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function re(e){return e!==e}var ie=(function(){for(var e=`0123456789abcdef`,t=Array(256),n=0;n<16;++n)for(var r=n*16,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t})()})),Qe=t(),$e=Ye(),Y=J(),et={lstatSync:()=>{},isFileReadStream(e){return!1},runtime:`browser`},tt=e=>{if(e==null)return 0;if(typeof e==`string`)return Y.Buffer.byteLength(e);if(typeof e.byteLength==`number`)return e.byteLength;if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size;if(typeof e.start==`number`&&typeof e.end==`number`)return e.end+1-e.start;if(et.isFileReadStream(e))try{return et.lstatSync(e.path).size}catch{return}},X;(function(e){e.EMPTY_INPUT=`a null or undefined Body`,e.CONTENT_LENGTH=`the ContentLength property of the params set by the caller`,e.STRING_LENGTH=`the encoded byte length of the Body string`,e.TYPED_ARRAY=`the byteLength of a typed byte array such as Uint8Array`,e.LENGTH=`the value of Body.length`,e.SIZE=`the value of Body.size`,e.START_END_DIFF=`the numeric difference between Body.start and Body.end`,e.LSTAT=`the size of the file given by Body.path on disk as reported by lstatSync`})(X||={});var nt=(e,t)=>{if(t!=null)return X.CONTENT_LENGTH;if(e==null)return X.EMPTY_INPUT;if(typeof e==`string`)return X.STRING_LENGTH;if(typeof e.byteLength==`number`)return X.TYPED_ARRAY;if(typeof e.length==`number`)return X.LENGTH;if(typeof e.size==`number`)return X.SIZE;if(typeof e.start==`number`&&typeof e.end==`number`)return X.START_END_DIFF;if(et.isFileReadStream(e))try{return et.lstatSync(e.path).size,X.LSTAT}catch{return}},Z=e(((e,t)=>{typeof Object.create==`function`?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),rt=e(((e,t)=>{t.exports=Ye().EventEmitter})),it=e(((e,t)=>{t.exports={}})),at=e(((e,t)=>{function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:`unshift`,value:function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length}},{key:`shift`,value:function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:`clear`,value:function(){this.head=this.tail=null,this.length=0}},{key:`join`,value:function(e){if(this.length===0)return``;for(var t=this.head,n=``+t.data;t=t.next;)n+=e+t.data;return n}},{key:`concat`,value:function(e){if(this.length===0)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),n=this.head,r=0;n;)p(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:`consume`,value:function(e,t){var n;return ei.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),e-=a,e===0){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:`_getBuffer`,value:function(e){var t=u.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),e-=a,e===0){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:f,value:function(e,t){return d(this,r(r({},t),{},{depth:0,customInspect:!1}))}}]),e}()})),ot=e(((e,t)=>{function n(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(o,this,e)):process.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted?process.nextTick(i,n):(n._writableState.errorEmitted=!0,process.nextTick(r,n,e)):process.nextTick(r,n,e):t?(process.nextTick(i,n),t(e)):process.nextTick(i,n)}),this)}function r(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit(`close`)}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit(`error`,t)}function s(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit(`error`,t)}t.exports={destroy:n,undestroy:a,errorOrDestroy:s}})),Q=e(((e,t)=>{function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r={};function i(e,t,i){i||=Error;function a(e,n,r){return typeof t==`string`?t:t(e,n,r)}var o=function(e){n(t,e);function t(t,n,r){return e.call(this,a(t,n,r))||this}return t}(i);o.prototype.name=i.name,o.prototype.code=e,r[e]=o}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?`one of ${t} ${e.slice(0,n-1).join(`, `)}, or `+e[n-1]:n===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function o(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}function s(e,t,n){return(n===void 0||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function c(e,t,n){return typeof n!=`number`&&(n=0),n+t.length>e.length?!1:e.indexOf(t,n)!==-1}i(`ERR_INVALID_OPT_VALUE`,function(e,t){return`The value "`+t+`" is invalid for option "`+e+`"`},TypeError),i(`ERR_INVALID_ARG_TYPE`,function(e,t,n){var r;typeof t==`string`&&o(t,`not `)?(r=`must not be`,t=t.replace(/^not /,``)):r=`must be`;var i=s(e,` argument`)?`The ${e} ${r} ${a(t,`type`)}`:`The "${e}" ${c(e,`.`)?`property`:`argument`} ${r} ${a(t,`type`)}`;return i+=`. Received type ${typeof n}`,i},TypeError),i(`ERR_STREAM_PUSH_AFTER_EOF`,`stream.push() after EOF`),i(`ERR_METHOD_NOT_IMPLEMENTED`,function(e){return`The `+e+` method is not implemented`}),i(`ERR_STREAM_PREMATURE_CLOSE`,`Premature close`),i(`ERR_STREAM_DESTROYED`,function(e){return`Cannot call `+e+` after a stream was destroyed`}),i(`ERR_MULTIPLE_CALLBACK`,`Callback called multiple times`),i(`ERR_STREAM_CANNOT_PIPE`,`Cannot pipe, not readable`),i(`ERR_STREAM_WRITE_AFTER_END`,`write after end`),i(`ERR_STREAM_NULL_VALUES`,`May not write null values to stream`,TypeError),i(`ERR_UNKNOWN_ENCODING`,function(e){return`Unknown encoding: `+e},TypeError),i(`ERR_STREAM_UNSHIFT_AFTER_END_EVENT`,`stream.unshift() after end event`),t.exports.codes=r})),st=e(((e,t)=>{var n=Q().codes.ERR_INVALID_OPT_VALUE;function r(e,t,n){return e.highWaterMark==null?t?e[n]:null:e.highWaterMark}function i(e,t,i,a){var o=r(t,a,i);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(a?i:`highWaterMark`,o);return Math.floor(o)}return e.objectMode?16:16*1024}t.exports={getHighWaterMark:i}})),ct=e(((e,t)=>{t.exports=n;function n(e,t){if(r(`noDeprecation`))return e;var n=!1;function i(){if(!n){if(r(`throwDeprecation`))throw Error(t);r(`traceDeprecation`)?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return i}function r(e){try{if(!global.localStorage)return!1}catch{return!1}var t=global.localStorage[e];return t==null?!1:String(t).toLowerCase()===`true`}})),lt=e(((e,t)=>{t.exports=T;function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){z(t,e)}}var r;T.WritableState=C;var i={deprecate:ct()},a=rt(),o=J().Buffer,s=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function c(e){return o.from(e)}function l(e){return o.isBuffer(e)||e instanceof s}var u=ot(),d=st().getHighWaterMark,f=Q().codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,h=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,_=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,y=f.ERR_STREAM_WRITE_AFTER_END,b=f.ERR_UNKNOWN_ENCODING,x=u.errorOrDestroy;Z()(T,a);function S(){}function C(e,t,i){r||=$(),e||={},typeof i!=`boolean`&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,`writableHighWaterMark`,i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){ne(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},`_writableState.buffer is deprecated. Use _writableState.getBuffer instead.`,`DEP0003`)})}catch{}})();var w;typeof Symbol==`function`&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==`function`?(w=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return w.call(this,e)?!0:this===T?e&&e._writableState instanceof C:!1}})):w=function(e){return e instanceof this};function T(e){r||=$();var t=this instanceof r;if(!t&&!w.call(T,this))return new T(e);this._writableState=new C(e,this,t),this.writable=!0,e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final)),a.call(this)}T.prototype.pipe=function(){x(this,new g)};function E(e,t){var n=new y;x(e,n),process.nextTick(t,n)}function ee(e,t,n,r){var i;return n===null?i=new v:typeof n!=`string`&&!t.objectMode&&(i=new p(`chunk`,[`string`,`Buffer`],n)),i?(x(e,i),process.nextTick(r,i),!1):!0}T.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&l(e);return a&&!o.isBuffer(e)&&(e=c(e)),typeof t==`function`&&(n=t,t=null),a?t=`buffer`:t||=r.defaultEncoding,typeof n!=`function`&&(n=S),r.ending?E(this,n):(a||ee(this,r,e,n))&&(r.pendingcb++,i=te(this,r,a,e,t,n)),i},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&N(this,e))},T.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=e.toLowerCase()),!([`hex`,`utf8`,`utf-8`,`ascii`,`binary`,`base64`,`ucs2`,`ucs-2`,`utf16le`,`utf-16le`,`raw`].indexOf((e+``).toLowerCase())>-1))throw new b(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==`string`&&(t=o.from(t,n)),t}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function te(e,t,n,r,i,a){if(!n){var o=D(t,r,i);r!==o&&(n=!0,i=`buffer`,r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length{var n=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=c;var r=ht(),i=lt();Z()(c,r);for(var a=n(i.prototype),o=0;o{var n=J(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}a.prototype=Object.create(r.prototype),i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),dt=e((e=>{var t=ut().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function _(e){return e&&e.length?this.write(e):``}})),ft=e(((e,t)=>{var n=Q().codes.ERR_STREAM_PREMATURE_CLOSE;function r(e){var t=!1;return function(){if(!t){t=!0;var n=[...arguments];e.apply(this,n)}}}function i(){}function a(e){return e.setHeader&&typeof e.abort==`function`}function o(e,t,s){if(typeof t==`function`)return o(e,null,t);t||={},s=r(s||i);var c=t.readable||t.readable!==!1&&e.readable,l=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||f()},d=e._writableState&&e._writableState.finished,f=function(){l=!1,d=!0,c||s.call(e)},p=e._readableState&&e._readableState.endEmitted,m=function(){c=!1,p=!0,l||s.call(e)},h=function(t){s.call(e,t)},g=function(){var t;if(c&&!p)return(!e._readableState||!e._readableState.ended)&&(t=new n),s.call(e,t);if(l&&!d)return(!e._writableState||!e._writableState.ended)&&(t=new n),s.call(e,t)},_=function(){e.req.on(`finish`,f)};return a(e)?(e.on(`complete`,f),e.on(`abort`,g),e.req?_():e.on(`request`,_)):l&&!e._writableState&&(e.on(`end`,u),e.on(`close`,u)),e.on(`end`,m),e.on(`finish`,f),t.error!==!1&&e.on(`error`,h),e.on(`close`,g),function(){e.removeListener(`complete`,f),e.removeListener(`abort`,g),e.removeListener(`request`,_),e.req&&e.req.removeListener(`finish`,f),e.removeListener(`end`,u),e.removeListener(`close`,u),e.removeListener(`finish`,f),e.removeListener(`end`,m),e.removeListener(`error`,h),e.removeListener(`close`,g)}}t.exports=o})),pt=e(((e,t)=>{var n;function r(e,t,n){return t=i(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=a(e,`string`);return typeof t==`symbol`?t:String(t)}function a(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var o=ft(),s=Symbol(`lastResolve`),c=Symbol(`lastReject`),l=Symbol(`error`),u=Symbol(`ended`),d=Symbol(`lastPromise`),f=Symbol(`handlePromise`),p=Symbol(`stream`);function m(e,t){return{value:e,done:t}}function h(e){var t=e[s];if(t!==null){var n=e[p].read();n!==null&&(e[d]=null,e[s]=null,e[c]=null,t(m(n,!1)))}}function g(e){process.nextTick(h,e)}function _(e,t){return function(n,r){e.then(function(){if(t[u]){n(m(void 0,!0));return}t[f](n,r)},r)}}var v=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((n={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(t!==null)return Promise.reject(t);if(this[u])return Promise.resolve(m(void 0,!0));if(this[p].destroyed)return new Promise(function(t,n){process.nextTick(function(){e[l]?n(e[l]):t(m(void 0,!0))})});var n=this[d],r;if(n)r=new Promise(_(n,this));else{var i=this[p].read();if(i!==null)return Promise.resolve(m(i,!1));r=new Promise(this[f])}return this[d]=r,r}},r(n,Symbol.asyncIterator,function(){return this}),r(n,`return`,function(){var e=this;return new Promise(function(t,n){e[p].destroy(null,function(e){if(e){n(e);return}t(m(void 0,!0))})})}),n),v);t.exports=function(e){var t,n=Object.create(y,(t={},r(t,p,{value:e,writable:!0}),r(t,s,{value:null,writable:!0}),r(t,c,{value:null,writable:!0}),r(t,l,{value:null,writable:!0}),r(t,u,{value:e._readableState.endEmitted,writable:!0}),r(t,f,{value:function(e,t){var r=n[p].read();r?(n[d]=null,n[s]=null,n[c]=null,e(m(r,!1))):(n[s]=e,n[c]=t)},writable:!0}),t));return n[d]=null,o(e,function(e){if(e&&e.code!==`ERR_STREAM_PREMATURE_CLOSE`){var t=n[c];t!==null&&(n[d]=null,n[s]=null,n[c]=null,t(e)),n[l]=e;return}var r=n[s];r!==null&&(n[d]=null,n[s]=null,n[c]=null,r(m(void 0,!0))),n[u]=!0}),e.on(`readable`,g.bind(null,n)),n}})),mt=e(((e,t)=>{t.exports=function(){throw Error(`Readable.from is not available in the browser`)}})),ht=e(((e,t)=>{t.exports=E;var n;E.ReadableState=T,Ye().EventEmitter;var r=function(e,t){return e.listeners(t).length},i=rt(),a=J().Buffer,o=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function s(e){return a.from(e)}function c(e){return a.isBuffer(e)||e instanceof o}var l=it(),u=l&&l.debuglog?l.debuglog(`stream`):function(){},d=at(),f=ot(),p=st().getHighWaterMark,m=Q().codes,h=m.ERR_INVALID_ARG_TYPE,g=m.ERR_STREAM_PUSH_AFTER_EOF,_=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,y,b,x;Z()(E,i);var S=f.errorOrDestroy,C=[`error`,`close`,`destroy`,`pause`,`resume`];function w(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function T(e,t,r){n||=$(),e||={},typeof r!=`boolean`&&(r=t instanceof n),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,`readableHighWaterMark`,r),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||`utf8`,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(y||=dt().StringDecoder,this.decoder=new y(e.encoding),this.encoding=e.encoding)}function E(e){if(n||=$(),!(this instanceof E))return new E(e);var t=this instanceof n;this._readableState=new T(e,this,t),this.readable=!0,e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy)),i.call(this)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:typeof e==`string`&&(t||=n.defaultEncoding,t!==n.encoding&&(e=a.from(e,t),t=``),r=!0),ee(this,e,t,!1,r)},E.prototype.unshift=function(e){return ee(this,e,null,!0,!1)};function ee(e,t,n,r,i){u(`readableAddChunk`,t);var o=e._readableState;if(t===null)o.reading=!1,ne(e,o);else{var c;if(i||(c=te(o,t)),c)S(e,c);else if(o.objectMode||t&&t.length>0)if(typeof t!=`string`&&!o.objectMode&&Object.getPrototypeOf(t)!==a.prototype&&(t=s(t)),r)o.endEmitted?S(e,new v):D(e,o,t,!0);else if(o.ended)S(e,new g);else if(o.destroyed)return!1;else o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||t.length!==0?D(e,o,t,!1):N(e,o)):D(e,o,t,!1);else r||(o.reading=!1,N(e,o))}return!o.ended&&(o.length=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function A(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=k(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}E.prototype.read=function(e){u(`read`,e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark===0?t.length>0:t.length>=t.highWaterMark)||t.ended))return u(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?H(this):j(this),null;if(e=A(e,t),e===0&&t.ended)return t.length===0&&H(this),null;var r=t.needReadable;u(`need readable`,r),(t.length===0||t.length-e0?V(e,t):null;return i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&H(this)),i!==null&&this.emit(`data`,i),i};function ne(e,t){if(u(`onEofChunk`),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,M(e)))}}function j(e){var t=e._readableState;u(`emitReadable`,t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u(`emitReadable`,t.flowing),t.emittedReadable=!0,process.nextTick(M,e))}function M(e){var t=e._readableState;u(`emitReadable_`,t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit(`readable`),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function N(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length1&&W(i.pipes,e)!==-1)&&!l&&(u(`false write response, pause`,i.awaitDrain),i.awaitDrain++),n.pause())}function p(t){u(`onerror`,t),g(),e.removeListener(`error`,p),r(e,`error`)===0&&S(e,t)}w(e,`error`,p);function m(){e.removeListener(`finish`,h),g()}e.once(`close`,m);function h(){u(`onfinish`),e.removeListener(`close`,m),g()}e.once(`finish`,h);function g(){u(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),i.flowing||(u(`pipe resume`),n.resume()),e};function F(e){return function(){var t=e._readableState;u(`pipeOnDrain`,t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&r(e,`data`)&&(t.flowing=!0,B(e))}}E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||=t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(`unpipe`,this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,r.flowing!==!1&&this.resume()):e===`readable`&&!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,u(`on readable`,r.length,r.reading),r.length?j(this):r.reading||process.nextTick(L,this)),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=i.prototype.removeListener.call(this,e,t);return e===`readable`&&process.nextTick(I,this),n},E.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return(e===`readable`||e===void 0)&&process.nextTick(I,this),t};function I(e){var t=e._readableState;t.readableListening=e.listenerCount(`readable`)>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount(`data`)>0&&e.resume()}function L(e){u(`readable nexttick read 0`),e.read(0)}E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u(`resume`),e.flowing=!e.readableListening,R(this,e)),e.paused=!1,this};function R(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(z,e,t))}function z(e,t){u(`resume`,t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(`resume`),B(e),t.flowing&&!t.reading&&e.read(0)}E.prototype.pause=function(){return u(`call pause flowing=%j`,this._readableState.flowing),this._readableState.flowing!==!1&&(u(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this._readableState.paused=!0,this};function B(e){var t=e._readableState;for(u(`flow`,t.flowing);t.flowing&&e.read()!==null;);}E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on(`end`,function(){if(u(`wrapped end`),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on(`data`,function(i){u(`wrapped data`),n.decoder&&(i=n.decoder.write(i)),!(n.objectMode&&i==null)&&(!n.objectMode&&(!i||!i.length)||t.push(i)||(r=!0,e.pause()))}),e)this[i]===void 0&&typeof e[i]==`function`&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function H(e){var t=e._readableState;u(`endReadable`,t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(U,t,e))}function U(e,t){if(u(`endReadableNT`,e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(`end`),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}typeof Symbol==`function`&&(E.from=function(e,t){return x===void 0&&(x=mt()),x(E,e,t)});function W(e,t){for(var n=0,r=e.length;n{t.exports=l;var n=Q().codes,r=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,s=$();Z()(l,s);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(r===null)return this.emit(`error`,new i);n.writechunk=null,n.writecb=null,t!=null&&this.push(t),r(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{t.exports=r;var n=gt();Z()(r,n);function r(e){if(!(this instanceof r))return new r(e);n.call(this,e)}r.prototype._transform=function(e,t,n){n(null,e)}})),vt=e(((e,t)=>{var n;function r(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var i=Q().codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){return e.setHeader&&typeof e.abort==`function`}function l(e,t,i,a){a=r(a);var s=!1;e.on(`close`,function(){s=!0}),n===void 0&&(n=ft()),n(e,{readable:t,writable:i},function(e){if(e)return a(e);s=!0,a()});var l=!1;return function(t){if(!s&&!l){if(l=!0,c(e))return e.abort();if(typeof e.destroy==`function`)return e.destroy();a(t||new o(`pipe`))}}}function u(e){e()}function d(e,t){return e.pipe(t)}function f(e){return!e.length||typeof e[e.length-1]!=`function`?s:e.pop()}function p(){var e=[...arguments],t=f(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a(`streams`);var n,r=e.map(function(i,a){var o=a0,function(e){n||=e,e&&r.forEach(u),!o&&(r.forEach(u),t(n))})});return e.reduce(d)}t.exports=p})),yt=e(((e,t)=>{t.exports=r;var n=Ye().EventEmitter;Z()(r,n),r.Readable=ht(),r.Writable=lt(),r.Duplex=$(),r.Transform=gt(),r.PassThrough=_t(),r.finished=ft(),r.pipeline=vt(),r.Stream=r;function r(){n.call(this)}r.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}r.on(`data`,i);function a(){r.readable&&r.resume&&r.resume()}e.on(`drain`,a),!e._isStdio&&(!t||t.end!==!1)&&(r.on(`end`,s),r.on(`close`,c));var o=!1;function s(){o||(o=!0,e.end())}function c(){o||(o=!0,typeof e.destroy==`function`&&e.destroy())}function l(e){if(u(),n.listenerCount(this,`error`)===0)throw e}r.on(`error`,l),e.on(`error`,l);function u(){r.removeListener(`data`,i),e.removeListener(`drain`,a),r.removeListener(`end`,s),r.removeListener(`close`,c),r.removeListener(`error`,l),e.removeListener(`error`,l),r.removeListener(`end`,u),r.removeListener(`close`,u),e.removeListener(`close`,u)}return r.on(`end`,u),r.on(`close`,u),e.on(`close`,u),e.emit(`pipe`,r),e}}))();async function*bt(e,t,n){let r=1,i={chunks:[],length:0};for await(let a of n(e))for(i.chunks.push(a),i.length+=a.byteLength;i.length>t;){let e=i.chunks.length>1?Y.Buffer.concat(i.chunks):i.chunks[0];yield{partNumber:r,data:e.subarray(0,t)},i.chunks=[e.subarray(t)],i.length=i.chunks[0].byteLength,r+=1}yield{partNumber:r,data:i.chunks.length===1?i.chunks[0]:Y.Buffer.concat(i.chunks),lastPart:!0}}async function*xt(e,t){let n=1,r=0,i=t;for(;i{if(e instanceof Uint8Array)return xt(e,t);if(e instanceof yt.Readable)return bt(e,t,St);if(e instanceof String||typeof e==`string`)return xt(Y.Buffer.from(e),t);if(typeof e.stream==`function`)return bt(e.stream(),t,Ct);if(e instanceof ReadableStream)return bt(e,t,Ct);throw Error(`Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.`)},Tt=class e extends $e.EventEmitter{static MIN_PART_SIZE=1024*1024*5;MAX_PARTS=1e4;queueSize=4;partSize;leavePartsOnError=!1;tags=[];client;params;totalBytes;totalBytesSource;bytesUploadedSoFar;abortController;concurrentUploaders=[];createMultiPartPromise;abortMultipartUploadCommand=null;uploadedParts=[];uploadEnqueuedPartsCount=0;expectedPartsCount;uploadId;uploadEvent;isMultiPart=!0;singleUploadResult;sent=!1;constructor(t){if(super(),this.queueSize=t.queueSize||this.queueSize,this.leavePartsOnError=t.leavePartsOnError||this.leavePartsOnError,this.tags=t.tags||this.tags,this.client=t.client,this.params=t.params,!this.params)throw Error(`InputError: Upload requires params to be passed to upload.`);this.totalBytes=this.params.ContentLength??tt(this.params.Body),this.totalBytesSource=nt(this.params.Body,this.params.ContentLength),this.bytesUploadedSoFar=0,this.abortController=t.abortController??new AbortController,this.partSize=t.partSize||Math.max(e.MIN_PART_SIZE,Math.ceil((this.totalBytes||0)/this.MAX_PARTS)),this.totalBytes!==void 0&&(this.expectedPartsCount=Math.ceil(this.totalBytes/this.partSize)),this.__validateInput()}async abort(){this.abortController.abort()}async done(){if(this.sent)throw Error(`@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance.`);return this.sent=!0,await Promise.race([this.__doMultipartUpload(),this.__abortTimeout(this.abortController.signal)])}on(e,t){return this.uploadEvent=e,super.on(e,t)}async __uploadUsingPut(e){this.isMultiPart=!1;let t={...this.params,Body:e.data},n=this.client.config,r=n.requestHandler,i=r instanceof $e.EventEmitter?r:null,a=t=>{this.bytesUploadedSoFar=t.loaded,this.totalBytes=t.total,this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:e.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})};i!==null&&i.on(`xhr.upload.progress`,a);let o=await Promise.all([this.client.send(new Ge(t)),n?.endpoint?.()]),s=o[0],c=o[1];if(c||=v(await S(t,Ge,{...n})),!c)throw Error(`Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.`);i!==null&&i.off(`xhr.upload.progress`,a);let l=this.params.Key.split(`/`).map(e=>w(e)).join(`/`),u=w(this.params.Bucket),d=(()=>{let e=c.hostname.startsWith(`${u}.`),t=this.client.config.forcePathStyle,n=c.port?`:${c.port}`:``;return t?`${c.protocol}//${c.hostname}${n}/${u}/${l}`:e?`${c.protocol}//${c.hostname}${n}/${l}`:`${c.protocol}//${u}.${c.hostname}${n}/${l}`})();this.singleUploadResult={...s,Bucket:this.params.Bucket,Key:this.params.Key,Location:d};let f=tt(e.data);this.__notifyProgress({loaded:f,total:f,part:1,Key:this.params.Key,Bucket:this.params.Bucket})}async __createMultipartUpload(){let e=await this.client.config.requestChecksumCalculation();if(!this.createMultiPartPromise){let t={...this.params,Body:void 0};e===`WHEN_SUPPORTED`&&(t.ChecksumAlgorithm=this.params.ChecksumAlgorithm||Je.CRC32),this.createMultiPartPromise=this.client.send(new Ue(t)).then(e=>(this.abortMultipartUploadCommand=new Be({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:e.UploadId}),e))}return this.createMultiPartPromise}async __doConcurrentUpload(e){for await(let t of e){if(this.uploadEnqueuedPartsCount>this.MAX_PARTS)throw Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`);if(this.abortController.signal.aborted)return;if(t.partNumber===1&&t.lastPart)return await this.__uploadUsingPut(t);if(!this.uploadId){let{UploadId:e}=await this.__createMultipartUpload();if(this.uploadId=e,this.abortController.signal.aborted)return}let e=tt(t.data)||0,n=this.client.config.requestHandler,r=n instanceof $e.EventEmitter?n:null,i=0,a=(n,r)=>{(Number(r.query.partNumber)||-1)===t.partNumber&&(n.total&&e&&(this.bytesUploadedSoFar+=n.loaded-i,i=n.loaded),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:t.partNumber,Key:this.params.Key,Bucket:this.params.Bucket}))};r!==null&&r.on(`xhr.upload.progress`,a),this.uploadEnqueuedPartsCount+=1,this.__validateUploadPart(t);let o=await this.client.send(new qe({...this.params,ContentLength:void 0,UploadId:this.uploadId,Body:t.data,PartNumber:t.partNumber}));if(r!==null&&r.off(`xhr.upload.progress`,a),this.abortController.signal.aborted)return;if(!o.ETag)throw Error(`Part ${t.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`);this.uploadedParts.push({PartNumber:t.partNumber,ETag:o.ETag,...o.ChecksumCRC32&&{ChecksumCRC32:o.ChecksumCRC32},...o.ChecksumCRC32C&&{ChecksumCRC32C:o.ChecksumCRC32C},...o.ChecksumSHA1&&{ChecksumSHA1:o.ChecksumSHA1},...o.ChecksumSHA256&&{ChecksumSHA256:o.ChecksumSHA256}}),r===null&&(this.bytesUploadedSoFar+=e),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:t.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})}}async __doMultipartUpload(){let e=wt(this.params.Body,this.partSize),t=[];for(let n=0;n{t.push(e)});this.concurrentUploaders.push(n)}if(await Promise.all(this.concurrentUploaders),t.length>=1)throw await this.markUploadAsAborted(),t[0];if(this.abortController.signal.aborted)throw await this.markUploadAsAborted(),Object.assign(Error(`Upload aborted.`),{name:`AbortError`});let n;if(this.isMultiPart){let{expectedPartsCount:e,uploadedParts:t,totalBytes:r,totalBytesSource:i}=this;if(r!==void 0&&e!==void 0&&t.length!==e)throw Error(`Expected ${e} part(s) but uploaded ${t.length} part(s). +import{i as e,t}from"./compiler-runtime.js";import{t as n}from"./useMutation.js";import{C as r,E as i,S as a,T as o,b as s,d as c,f as l,l as u,m as d,p as f,u as p,v as m,w as h,x as g,y as _}from"./awsClient.js";import{At as v,Pt as y,St as b,_t as x,lt as S,q as C,st as w,ut as T}from"./auth.js";import{_ as E,a as ee,g as D,h as te,i as O,m as k,n as A,o as ne,r as j,s as M,t as N}from"./tslib.es6.js";import{i as P}from"./index.browser.js";import{$r as F}from"./index.js";var I=()=>{let e=Array(8);for(let t=0;t<8;t++){let n=Array(512);for(let e=0;e<256;e++){let r=BigInt(e);for(let e=0;e<8*(t+1);e++)r&1n?r=r>>1n^11127430586519243189n:r>>=1n;n[e*2]=Number(r>>32n&4294967295n),n[e*2+1]=Number(r&4294967295n)}e[t]=new Uint32Array(n)}return e},L,R,z,B,V,H,U,W,G,K=()=>{L||(L=I(),[R,z,B,V,H,U,W,G]=L)},re=class{c1=0;c2=0;constructor(){K(),this.reset()}update(e){let t=e.length,n=0,r=this.c1,i=this.c2;for(;n+8<=t;){let t=((i^e[n++])&255)<<1,a=((i>>>8^e[n++])&255)<<1,o=((i>>>16^e[n++])&255)<<1,s=((i>>>24^e[n++])&255)<<1,c=((r^e[n++])&255)<<1,l=((r>>>8^e[n++])&255)<<1,u=((r>>>16^e[n++])&255)<<1,d=((r>>>24^e[n++])&255)<<1;r=G[t]^W[a]^U[o]^H[s]^V[c]^B[l]^z[u]^R[d],i=G[t+1]^W[a+1]^U[o+1]^H[s+1]^V[c+1]^B[l+1]^z[u+1]^R[d+1]}for(;n>>8|(r&255)<<24)>>>0,r=r>>>8^R[t],i^=R[t+1],n++}this.c1=r,this.c2=i}async digest(){let e=this.c1^4294967295,t=this.c2^4294967295;return new Uint8Array([e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255])}reset(){this.c1=4294967295,this.c2=4294967295}},ie={CrtCrc64Nvme:null},ae=(e,{requestChecksumRequired:t,requestAlgorithmMember:n,requestChecksumCalculation:r})=>{if(!n)return r===o.WHEN_SUPPORTED||t?h:void 0;if(e[n])return e[n]},oe=e=>e===r.MD5?`content-md5`:`x-amz-checksum-${e.toLowerCase()}`,se=(e,t)=>{let n=e.toLowerCase();for(let e of Object.keys(t))if(n===e.toLowerCase())return!0;return!1},ce=(e,t)=>{let n=e.toLowerCase();for(let e of Object.keys(t))if(e.toLowerCase().startsWith(n))return!0;return!1},le=e=>e!==void 0&&typeof e!=`string`&&!ArrayBuffer.isView(e)&&!D(e),ue=function(){function e(){this.crc32c=new de}return e.prototype.update=function(e){ne(e)||this.crc32c.update(M(e))},e.prototype.digest=function(){return N(this,void 0,void 0,function(){return A(this,function(e){return[2,ee(this.crc32c.digest())]})})},e.prototype.reset=function(){this.crc32c=new de},e}(),de=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var r=j(e),i=r.next();!i.done;i=r.next()){var a=i.value;this.checksum=this.checksum>>>8^fe[(this.checksum^a)&255]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}(),fe=O([0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697]),pe=()=>P,me=[r.CRC32,r.CRC32C,r.CRC64NVME,r.SHA1,r.SHA256],he=[r.SHA256,r.SHA1,r.CRC32,r.CRC32C,r.CRC64NVME],ge=(e,t)=>{let{checksumAlgorithms:n={}}=t;switch(e){case r.MD5:return n?.MD5??t.md5;case r.CRC32:return n?.CRC32??pe();case r.CRC32C:return n?.CRC32C??ue;case r.CRC64NVME:return typeof ie.CrtCrc64Nvme==`function`?n?.CRC64NVME??ie.CrtCrc64Nvme:n?.CRC64NVME??re;case r.SHA1:return n?.SHA1??t.sha1;case r.SHA256:return n?.SHA256??t.sha256;default:if(n?.[e])return n[e];throw Error(`The checksum algorithm "${e}" is not supported by the client. Select one of ${me}, or provide an implementation to the client constructor checksums field.`)}},_e=(e,t)=>{let n=new e;return n.update(E(t||``)),n.digest()},ve={name:`flexibleChecksumsMiddleware`,step:`build`,tags:[`BODY_CHECKSUM`],override:!0},ye=(e,t)=>(n,i)=>async a=>{if(!y.isInstance(a.request)||ce(`x-amz-checksum-`,a.request.headers))return n(a);let{request:s,input:c}=a,{body:l,headers:u}=s,{base64Encoder:d,streamHasher:f}=e,{requestChecksumRequired:p,requestAlgorithmMember:m}=t,g=await e.requestChecksumCalculation(),_=m?.name,v=m?.httpHeader;_&&!c[_]&&(g===o.WHEN_SUPPORTED||p)&&(c[_]=h,v&&(u[v]=h));let b=ae(c,{requestChecksumRequired:p,requestAlgorithmMember:m?.name,requestChecksumCalculation:g}),x=l,S=u;if(b){switch(b){case r.CRC32:C(i,`FLEXIBLE_CHECKSUMS_REQ_CRC32`,`U`);break;case r.CRC32C:C(i,`FLEXIBLE_CHECKSUMS_REQ_CRC32C`,`V`);break;case r.CRC64NVME:C(i,`FLEXIBLE_CHECKSUMS_REQ_CRC64`,`W`);break;case r.SHA1:C(i,`FLEXIBLE_CHECKSUMS_REQ_SHA1`,`X`);break;case r.SHA256:C(i,`FLEXIBLE_CHECKSUMS_REQ_SHA256`,`Y`);break}let t=oe(b),n=ge(b,e);if(le(l)){let{getAwsChunkedEncodingStream:r,bodyLengthChecker:a}=e;x=r(typeof e.requestStreamBufferSize==`number`&&e.requestStreamBufferSize>=8*1024?k(l,e.requestStreamBufferSize,i.logger):l,{base64Encoder:d,bodyLengthChecker:a,checksumLocationName:t,checksumAlgorithmFn:n,streamHasher:f}),S={...u,"content-encoding":u[`content-encoding`]?`${u[`content-encoding`]},aws-chunked`:`aws-chunked`,"transfer-encoding":`chunked`,"x-amz-decoded-content-length":u[`content-length`],"x-amz-content-sha256":`STREAMING-UNSIGNED-PAYLOAD-TRAILER`,"x-amz-trailer":t},delete S[`content-length`]}else if(!se(t,u)){let e=await _e(n,l);S={...u,[t]:d(e)}}}try{return await n({...a,request:{...s,headers:S,body:x}})}catch(e){if(e instanceof Error&&e.name===`InvalidChunkSizeError`)try{e.message.endsWith(`.`)||(e.message+=`.`),e.message+=` Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.`}catch{}throw e}},be={name:`flexibleChecksumsInputMiddleware`,toMiddleware:`serializerMiddleware`,relation:`before`,tags:[`BODY_CHECKSUM`],override:!0},xe=(e,t)=>(n,r)=>async a=>{let s=a.input,{requestValidationModeMember:c}=t,l=await e.requestChecksumCalculation(),u=await e.responseChecksumValidation();switch(l){case o.WHEN_REQUIRED:C(r,`FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED`,`a`);break;case o.WHEN_SUPPORTED:C(r,`FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED`,`Z`);break}switch(u){case i.WHEN_REQUIRED:C(r,`FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED`,`c`);break;case i.WHEN_SUPPORTED:C(r,`FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED`,`b`);break}return c&&!s[c]&&u===i.WHEN_SUPPORTED&&(s[c]=`ENABLED`),n(a)},Se=(e=[])=>{let t=[],n=he.length;for(let r of e){let e=he.indexOf(r);e===-1?t[n++]=r:t[e]=r}return t.filter(Boolean)},Ce=e=>{let t=e.lastIndexOf(`-`);if(t!==-1){let n=e.slice(t+1);if(!n.startsWith(`0`)){let e=parseInt(n,10);if(!isNaN(e)&&e>=1&&e<=1e4)return!0}}return!1},we=async(e,{checksumAlgorithmFn:t,base64Encoder:n})=>n(await _e(t,e)),Te=async(e,{config:t,responseAlgorithms:n,logger:i})=>{let a=Se(n),{body:o,headers:s}=e;for(let n of a){let a=oe(n),c=s[a];if(c){let s;try{s=ge(n,t)}catch(e){if(n===r.CRC64NVME){i?.warn(`Skipping ${r.CRC64NVME} checksum validation: ${e.message}`);continue}throw e}let{base64Encoder:l}=t;if(le(o)){e.body=te({expectedChecksum:c,checksumSourceLocation:a,checksum:new s,source:o,base64Encoder:l});return}let u=await we(o,{checksumAlgorithmFn:s,base64Encoder:l});if(u===c)break;throw Error(`Checksum mismatch: expected "${u}" but received "${c}" in response header "${a}".`)}}},Ee={name:`flexibleChecksumsResponseMiddleware`,toMiddleware:`deserializerMiddleware`,relation:`after`,tags:[`BODY_CHECKSUM`],override:!0},De=(e,t)=>(n,r)=>async i=>{if(!y.isInstance(i.request))return n(i);let a=i.input,o=await n(i),s=o.response,{requestValidationModeMember:c,responseAlgorithms:l}=t;if(c&&a[c]===`ENABLED`){let{clientName:t,commandName:n}=r,i=Object.keys(e.checksumAlgorithms??{}).filter(e=>{let t=oe(e);return s.headers[t]!==void 0}),a=Se([...l??[],...i]);if(t===`S3Client`&&n===`GetObjectCommand`&&a.every(e=>{let t=oe(e),n=s.headers[t];return!n||Ce(n)}))return o;await Te(s,{config:e,responseAlgorithms:a,logger:r.logger})}return o},Oe=(e,t)=>({applyToStack:n=>{n.add(ye(e,t),ve),n.addRelativeTo(xe(e,t),be),n.addRelativeTo(De(e,t),Ee)}}),ke=`content-length`,Ae=`x-amz-decoded-content-length`;function je(){return(e,t)=>async n=>{let{request:r}=n;if(y.isInstance(r)&&!(ke in r.headers)&&!(Ae in r.headers)){let e=`Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;typeof t?.logger?.warn==`function`&&!(t.logger instanceof x)?t.logger.warn(e):console.warn(e)}return e({...n})}}var Me={step:`finalizeRequest`,tags:[`CHECK_CONTENT_LENGTH_HEADER`],name:`getCheckContentLengthHeaderPlugin`,override:!0},Ne=e=>({applyToStack:e=>{e.add(je(),Me)}});function Pe(e){return t=>async n=>{let{CreateBucketConfiguration:r}=n.input,i=await e.region();return!r?.LocationConstraint&&!r?.Location&&i!==`us-east-1`&&(n.input.CreateBucketConfiguration=n.input.CreateBucketConfiguration??{},n.input.CreateBucketConfiguration.LocationConstraint=i),t(n)}}var Fe={step:`initialize`,tags:[`LOCATION_CONSTRAINT`,`CREATE_BUCKET_CONFIGURATION`],name:`locationConstraintMiddleware`,override:!0},Ie=e=>({applyToStack:t=>{t.add(Pe(e),Fe)}});function Le(e){return t=>async n=>{let r={...n.input};for(let t of[{target:`SSECustomerKey`,hash:`SSECustomerKeyMD5`},{target:`CopySourceSSECustomerKey`,hash:`CopySourceSSECustomerKeyMD5`}]){let n=r[t.target];if(n){let i;typeof n==`string`?ze(n,e)?i=e.base64Decoder(n):(i=e.utf8Decoder(n),r[t.target]=e.base64Encoder(i)):(i=ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n),r[t.target]=e.base64Encoder(i));let a=new e.md5;a.update(i),r[t.hash]=e.base64Encoder(await a.digest())}}return t({...n,input:r})}}var Re={name:`ssecMiddleware`,step:`initialize`,tags:[`SSE`],override:!0},q=e=>({applyToStack:t=>{t.add(Le(e),Re)}});function ze(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return t.base64Decoder(e).length===32}catch{return!1}}var Be=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n)]}).s(`AmazonS3`,`AbortMultipartUpload`,{}).n(`S3Client`,`AbortMultipartUploadCommand`).sc(p).build(){},Ve=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n),q(n)]}).s(`AmazonS3`,`CompleteMultipartUpload`,{}).n(`S3Client`,`CompleteMultipartUploadCommand`).sc(c).build(){},He=class extends b.classBuilder().ep({...g,UseS3ExpressControlEndpoint:{type:`staticContextParams`,value:!0},DisableAccessPoints:{type:`staticContextParams`,value:!0},Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n),Ie(n)]}).s(`AmazonS3`,`CreateBucket`,{}).n(`S3Client`,`CreateBucketCommand`).sc(l).build(){},Ue=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n),q(n)]}).s(`AmazonS3`,`CreateMultipartUpload`,{}).n(`S3Client`,`CreateMultipartUploadCommand`).sc(f).build(){},We=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),a(n)]}).s(`AmazonS3`,`DeleteObject`,{}).n(`S3Client`,`DeleteObjectCommand`).sc(d).build(){},Ge=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),Oe(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),Ne(n),a(n),q(n)]}).s(`AmazonS3`,`PutObject`,{}).n(`S3Client`,`PutObjectCommand`).sc(m).build(){},Ke=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),Oe(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!0}),a(n)]}).s(`AmazonS3`,`PutObjectTagging`,{}).n(`S3Client`,`PutObjectTaggingCommand`).sc(_).build(){},qe=class extends b.classBuilder().ep({...g,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[T(n,e.getEndpointParameterInstructions()),Oe(n,{requestAlgorithmMember:{httpHeader:`x-amz-sdk-checksum-algorithm`,name:`ChecksumAlgorithm`},requestChecksumRequired:!1}),a(n),q(n)]}).s(`AmazonS3`,`UploadPart`,{}).n(`S3Client`,`UploadPartCommand`).sc(s).build(){},Je={CRC32:`CRC32`,CRC32C:`CRC32C`,CRC64NVME:`CRC64NVME`,MD5:`MD5`,SHA1:`SHA1`,SHA256:`SHA256`,SHA512:`SHA512`,XXHASH128:`XXHASH128`,XXHASH3:`XXHASH3`,XXHASH64:`XXHASH64`},Ye=e(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f;for(f=0;f>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;ac?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),Ze=e((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),J=e((e=>{var t=Xe(),n=Ze(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return p(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return m(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);var r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);var i=h(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:g(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);var n=v(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){for(var t=e.length<0?0:g(e.length)|0,n=o(t),r=0;r=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function _(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i2&&arguments[2]===!0;if(!r&&n===0)return 0;for(var i=!1;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return V(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return W(e).length;default:if(i)return r?-1:V(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=v;function y(e,t,n){var r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return M(this,t,n);case`utf8`:case`utf-8`:return O(this,t,n);case`ascii`:return ne(this,t,n);case`latin1`:case`binary`:return j(this,t,n);case`base64`:return te(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return N(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function b(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(var t=0;tn&&(t+=` ... `),``},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n),d=0;d2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,re(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0)if(i)n=0;else return-1;if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:S(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):S(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function S(e,t,n,r,i){var a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}var l;if(i){var u=-1;for(l=n;lo&&(n=o-s),l=n;l>=0;l--){for(var d=!0,f=0;fi&&(r=i)):r=i;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);var i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;for(var a=!1;;)switch(r){case`hex`:return C(this,e,t,n);case`utf8`:case`utf-8`:return w(this,e,t,n);case`ascii`:return T(this,e,t,n);case`latin1`:case`binary`:return E(this,e,t,n);case`base64`:return ee(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return D(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function te(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+s<=n){var c,l,u,d;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[i+1],(c&192)==128&&(d=(a&31)<<6|c&63,d>127&&(o=d));break;case 3:c=e[i+1],l=e[i+2],(c&192)==128&&(l&192)==128&&(d=(a&15)<<12|(c&63)<<6|l&63,d>2047&&(d<55296||d>57343)&&(o=d));break;case 4:c=e[i+1],l=e[i+2],u=e[i+3],(c&192)==128&&(l&192)==128&&(u&192)==128&&(d=(a&15)<<18|(c&63)<<12|(l&63)<<6|u&63,d>65535&&d<1114112&&(o=d))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|o&1023),r.push(o),i+=s}return A(r)}var k=4096;function A(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);for(var n=``,r=0;rr)&&(n=r);for(var i=``,a=t;an&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),tn)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!1,52,8)};function F(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||te.length)throw RangeError(`Index out of range`)}s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){var i=2**(8*n)-1;F(this,e,t,n,i,0)}var a=1,o=0;for(this[t]=e&255;++o>>=0,n>>>=0,!r){var i=2**(8*n)-1;F(this,e,t,n,i,0)}var a=n-1,o=1;for(this[t+a]=e&255;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);F(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=e&255;++a>0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=2**(8*n-1);F(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=e&255;--a>=0&&(o*=256);)e<0&&s===0&&this[t+a+1]!==0&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function I(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function L(e,t,r,i,a){return t=+t,r>>>=0,a||I(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)};function R(e,t,r,i,a){return t=+t,r>>>=0,a||I(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},s.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!s.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){var i=e.charCodeAt(0);(r===`utf8`&&i<128||r===`latin1`)&&(e=i)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length>>=0,n=n===void 0?this.length:n>>>0,e||=0;var a;if(typeof e==`number`)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function H(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function W(e){return t.toByteArray(B(e))}function G(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function K(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function re(e){return e!==e}var ie=(function(){for(var e=`0123456789abcdef`,t=Array(256),n=0;n<16;++n)for(var r=n*16,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t})()})),Qe=t(),$e=Ye(),Y=J(),et={lstatSync:()=>{},isFileReadStream(e){return!1},runtime:`browser`},tt=e=>{if(e==null)return 0;if(typeof e==`string`)return Y.Buffer.byteLength(e);if(typeof e.byteLength==`number`)return e.byteLength;if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size;if(typeof e.start==`number`&&typeof e.end==`number`)return e.end+1-e.start;if(et.isFileReadStream(e))try{return et.lstatSync(e.path).size}catch{return}},X;(function(e){e.EMPTY_INPUT=`a null or undefined Body`,e.CONTENT_LENGTH=`the ContentLength property of the params set by the caller`,e.STRING_LENGTH=`the encoded byte length of the Body string`,e.TYPED_ARRAY=`the byteLength of a typed byte array such as Uint8Array`,e.LENGTH=`the value of Body.length`,e.SIZE=`the value of Body.size`,e.START_END_DIFF=`the numeric difference between Body.start and Body.end`,e.LSTAT=`the size of the file given by Body.path on disk as reported by lstatSync`})(X||={});var nt=(e,t)=>{if(t!=null)return X.CONTENT_LENGTH;if(e==null)return X.EMPTY_INPUT;if(typeof e==`string`)return X.STRING_LENGTH;if(typeof e.byteLength==`number`)return X.TYPED_ARRAY;if(typeof e.length==`number`)return X.LENGTH;if(typeof e.size==`number`)return X.SIZE;if(typeof e.start==`number`&&typeof e.end==`number`)return X.START_END_DIFF;if(et.isFileReadStream(e))try{return et.lstatSync(e.path).size,X.LSTAT}catch{return}},Z=e(((e,t)=>{typeof Object.create==`function`?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),rt=e(((e,t)=>{t.exports=Ye().EventEmitter})),it=e(((e,t)=>{t.exports={}})),at=e(((e,t)=>{function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r(e){for(var t=1;t0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:`unshift`,value:function(e){var t={data:e,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length}},{key:`shift`,value:function(){if(this.length!==0){var e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:`clear`,value:function(){this.head=this.tail=null,this.length=0}},{key:`join`,value:function(e){if(this.length===0)return``;for(var t=this.head,n=``+t.data;t=t.next;)n+=e+t.data;return n}},{key:`concat`,value:function(e){if(this.length===0)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),n=this.head,r=0;n;)p(n.data,t,r),r+=n.data.length,n=n.next;return t}},{key:`consume`,value:function(e,t){var n;return ei.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),e-=a,e===0){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:`_getBuffer`,value:function(e){var t=u.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),e-=a,e===0){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:f,value:function(e,t){return d(this,r(r({},t),{},{depth:0,customInspect:!1}))}}]),e}()})),ot=e(((e,t)=>{function n(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(o,this,e)):process.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted?process.nextTick(i,n):(n._writableState.errorEmitted=!0,process.nextTick(r,n,e)):process.nextTick(r,n,e):t?(process.nextTick(i,n),t(e)):process.nextTick(i,n)}),this)}function r(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit(`close`)}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit(`error`,t)}function s(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit(`error`,t)}t.exports={destroy:n,undestroy:a,errorOrDestroy:s}})),Q=e(((e,t)=>{function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r={};function i(e,t,i){i||=Error;function a(e,n,r){return typeof t==`string`?t:t(e,n,r)}var o=function(e){n(t,e);function t(t,n,r){return e.call(this,a(t,n,r))||this}return t}(i);o.prototype.name=i.name,o.prototype.code=e,r[e]=o}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?`one of ${t} ${e.slice(0,n-1).join(`, `)}, or `+e[n-1]:n===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}function o(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}function s(e,t,n){return(n===void 0||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}function c(e,t,n){return typeof n!=`number`&&(n=0),n+t.length>e.length?!1:e.indexOf(t,n)!==-1}i(`ERR_INVALID_OPT_VALUE`,function(e,t){return`The value "`+t+`" is invalid for option "`+e+`"`},TypeError),i(`ERR_INVALID_ARG_TYPE`,function(e,t,n){var r;typeof t==`string`&&o(t,`not `)?(r=`must not be`,t=t.replace(/^not /,``)):r=`must be`;var i=s(e,` argument`)?`The ${e} ${r} ${a(t,`type`)}`:`The "${e}" ${c(e,`.`)?`property`:`argument`} ${r} ${a(t,`type`)}`;return i+=`. Received type ${typeof n}`,i},TypeError),i(`ERR_STREAM_PUSH_AFTER_EOF`,`stream.push() after EOF`),i(`ERR_METHOD_NOT_IMPLEMENTED`,function(e){return`The `+e+` method is not implemented`}),i(`ERR_STREAM_PREMATURE_CLOSE`,`Premature close`),i(`ERR_STREAM_DESTROYED`,function(e){return`Cannot call `+e+` after a stream was destroyed`}),i(`ERR_MULTIPLE_CALLBACK`,`Callback called multiple times`),i(`ERR_STREAM_CANNOT_PIPE`,`Cannot pipe, not readable`),i(`ERR_STREAM_WRITE_AFTER_END`,`write after end`),i(`ERR_STREAM_NULL_VALUES`,`May not write null values to stream`,TypeError),i(`ERR_UNKNOWN_ENCODING`,function(e){return`Unknown encoding: `+e},TypeError),i(`ERR_STREAM_UNSHIFT_AFTER_END_EVENT`,`stream.unshift() after end event`),t.exports.codes=r})),st=e(((e,t)=>{var n=Q().codes.ERR_INVALID_OPT_VALUE;function r(e,t,n){return e.highWaterMark==null?t?e[n]:null:e.highWaterMark}function i(e,t,i,a){var o=r(t,a,i);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(a?i:`highWaterMark`,o);return Math.floor(o)}return e.objectMode?16:16*1024}t.exports={getHighWaterMark:i}})),ct=e(((e,t)=>{t.exports=n;function n(e,t){if(r(`noDeprecation`))return e;var n=!1;function i(){if(!n){if(r(`throwDeprecation`))throw Error(t);r(`traceDeprecation`)?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return i}function r(e){try{if(!global.localStorage)return!1}catch{return!1}var t=global.localStorage[e];return t==null?!1:String(t).toLowerCase()===`true`}})),lt=e(((e,t)=>{t.exports=T;function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){z(t,e)}}var r;T.WritableState=C;var i={deprecate:ct()},a=rt(),o=J().Buffer,s=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function c(e){return o.from(e)}function l(e){return o.isBuffer(e)||e instanceof s}var u=ot(),d=st().getHighWaterMark,f=Q().codes,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,h=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,_=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,y=f.ERR_STREAM_WRITE_AFTER_END,b=f.ERR_UNKNOWN_ENCODING,x=u.errorOrDestroy;Z()(T,a);function S(){}function C(e,t,i){r||=$(),e||={},typeof i!=`boolean`&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,`writableHighWaterMark`,i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||`utf8`,this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){ne(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},(function(){try{Object.defineProperty(C.prototype,"buffer",{get:i.deprecate(function(){return this.getBuffer()},`_writableState.buffer is deprecated. Use _writableState.getBuffer instead.`,`DEP0003`)})}catch{}})();var w;typeof Symbol==`function`&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==`function`?(w=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return w.call(this,e)?!0:this===T?e&&e._writableState instanceof C:!1}})):w=function(e){return e instanceof this};function T(e){r||=$();var t=this instanceof r;if(!t&&!w.call(T,this))return new T(e);this._writableState=new C(e,this,t),this.writable=!0,e&&(typeof e.write==`function`&&(this._write=e.write),typeof e.writev==`function`&&(this._writev=e.writev),typeof e.destroy==`function`&&(this._destroy=e.destroy),typeof e.final==`function`&&(this._final=e.final)),a.call(this)}T.prototype.pipe=function(){x(this,new g)};function E(e,t){var n=new y;x(e,n),process.nextTick(t,n)}function ee(e,t,n,r){var i;return n===null?i=new v:typeof n!=`string`&&!t.objectMode&&(i=new p(`chunk`,[`string`,`Buffer`],n)),i?(x(e,i),process.nextTick(r,i),!1):!0}T.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&l(e);return a&&!o.isBuffer(e)&&(e=c(e)),typeof t==`function`&&(n=t,t=null),a?t=`buffer`:t||=r.defaultEncoding,typeof n!=`function`&&(n=S),r.ending?E(this,n):(a||ee(this,r,e,n))&&(r.pendingcb++,i=te(this,r,a,e,t,n)),i},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&N(this,e))},T.prototype.setDefaultEncoding=function(e){if(typeof e==`string`&&(e=e.toLowerCase()),!([`hex`,`utf8`,`utf-8`,`ascii`,`binary`,`base64`,`ucs2`,`ucs-2`,`utf16le`,`utf-16le`,`raw`].indexOf((e+``).toLowerCase())>-1))throw new b(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(e,t,n){return!e.objectMode&&e.decodeStrings!==!1&&typeof t==`string`&&(t=o.from(t,n)),t}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function te(e,t,n,r,i,a){if(!n){var o=D(t,r,i);r!==o&&(n=!0,i=`buffer`,r=o)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length{var n=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=c;var r=ht(),i=lt();Z()(c,r);for(var a=n(i.prototype),o=0;o{var n=J(),r=n.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a);function a(e,t,n){return r(e,t,n)}a.prototype=Object.create(r.prototype),i(r,a),a.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},a.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},a.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},a.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),dt=e((e=>{var t=ut().Buffer,n=t.isEncoding||function(e){switch(e=``+e,e&&e.toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:case`raw`:return!0;default:return!1}};function r(e){if(!e)return`utf8`;for(var t;;)switch(e){case`utf8`:case`utf-8`:return`utf8`;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return`utf16le`;case`latin1`:case`binary`:return`latin1`;case`base64`:case`ascii`:case`hex`:return e;default:if(t)return;e=(``+e).toLowerCase(),t=!0}}function i(e){var i=r(e);if(typeof i!=`string`&&(t.isEncoding===n||!n(e)))throw Error(`Unknown encoding: `+e);return i||e}e.StringDecoder=a;function a(e){this.encoding=i(e);var n;switch(this.encoding){case`utf16le`:this.text=f,this.end=p,n=4;break;case`utf8`:this.fillLast=l,n=4;break;case`base64`:this.text=m,this.end=h,n=3;break;default:this.write=g,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}a.prototype.write=function(e){if(e.length===0)return``;var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return``;n=this.lastNeed,this.lastNeed=0}else n=0;return n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function c(e,t,n){if((t[0]&192)!=128)return e.lastNeed=0,`�`;if(e.lastNeed>1&&t.length>1){if((t[1]&192)!=128)return e.lastNeed=1,`�`;if(e.lastNeed>2&&t.length>2&&(t[2]&192)!=128)return e.lastNeed=2,`�`}}function l(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function u(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString(`utf8`,t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString(`utf8`,t,r)}function d(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+`�`:t}function f(e,t){if((e.length-t)%2==0){var n=e.toString(`utf16le`,t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(`utf16le`,t,e.length-1)}function p(e){var t=e&&e.length?this.write(e):``;if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(`utf16le`,0,n)}return t}function m(e,t){var n=(e.length-t)%3;return n===0?e.toString(`base64`,t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(`base64`,t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):``;return this.lastNeed?t+this.lastChar.toString(`base64`,0,3-this.lastNeed):t}function g(e){return e.toString(this.encoding)}function _(e){return e&&e.length?this.write(e):``}})),ft=e(((e,t)=>{var n=Q().codes.ERR_STREAM_PREMATURE_CLOSE;function r(e){var t=!1;return function(){if(!t){t=!0;var n=[...arguments];e.apply(this,n)}}}function i(){}function a(e){return e.setHeader&&typeof e.abort==`function`}function o(e,t,s){if(typeof t==`function`)return o(e,null,t);t||={},s=r(s||i);var c=t.readable||t.readable!==!1&&e.readable,l=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||f()},d=e._writableState&&e._writableState.finished,f=function(){l=!1,d=!0,c||s.call(e)},p=e._readableState&&e._readableState.endEmitted,m=function(){c=!1,p=!0,l||s.call(e)},h=function(t){s.call(e,t)},g=function(){var t;if(c&&!p)return(!e._readableState||!e._readableState.ended)&&(t=new n),s.call(e,t);if(l&&!d)return(!e._writableState||!e._writableState.ended)&&(t=new n),s.call(e,t)},_=function(){e.req.on(`finish`,f)};return a(e)?(e.on(`complete`,f),e.on(`abort`,g),e.req?_():e.on(`request`,_)):l&&!e._writableState&&(e.on(`end`,u),e.on(`close`,u)),e.on(`end`,m),e.on(`finish`,f),t.error!==!1&&e.on(`error`,h),e.on(`close`,g),function(){e.removeListener(`complete`,f),e.removeListener(`abort`,g),e.removeListener(`request`,_),e.req&&e.req.removeListener(`finish`,f),e.removeListener(`end`,u),e.removeListener(`close`,u),e.removeListener(`finish`,f),e.removeListener(`end`,m),e.removeListener(`error`,h),e.removeListener(`close`,g)}}t.exports=o})),pt=e(((e,t)=>{var n;function r(e,t,n){return t=i(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=a(e,`string`);return typeof t==`symbol`?t:String(t)}function a(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var o=ft(),s=Symbol(`lastResolve`),c=Symbol(`lastReject`),l=Symbol(`error`),u=Symbol(`ended`),d=Symbol(`lastPromise`),f=Symbol(`handlePromise`),p=Symbol(`stream`);function m(e,t){return{value:e,done:t}}function h(e){var t=e[s];if(t!==null){var n=e[p].read();n!==null&&(e[d]=null,e[s]=null,e[c]=null,t(m(n,!1)))}}function g(e){process.nextTick(h,e)}function _(e,t){return function(n,r){e.then(function(){if(t[u]){n(m(void 0,!0));return}t[f](n,r)},r)}}var v=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((n={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(t!==null)return Promise.reject(t);if(this[u])return Promise.resolve(m(void 0,!0));if(this[p].destroyed)return new Promise(function(t,n){process.nextTick(function(){e[l]?n(e[l]):t(m(void 0,!0))})});var n=this[d],r;if(n)r=new Promise(_(n,this));else{var i=this[p].read();if(i!==null)return Promise.resolve(m(i,!1));r=new Promise(this[f])}return this[d]=r,r}},r(n,Symbol.asyncIterator,function(){return this}),r(n,`return`,function(){var e=this;return new Promise(function(t,n){e[p].destroy(null,function(e){if(e){n(e);return}t(m(void 0,!0))})})}),n),v);t.exports=function(e){var t,n=Object.create(y,(t={},r(t,p,{value:e,writable:!0}),r(t,s,{value:null,writable:!0}),r(t,c,{value:null,writable:!0}),r(t,l,{value:null,writable:!0}),r(t,u,{value:e._readableState.endEmitted,writable:!0}),r(t,f,{value:function(e,t){var r=n[p].read();r?(n[d]=null,n[s]=null,n[c]=null,e(m(r,!1))):(n[s]=e,n[c]=t)},writable:!0}),t));return n[d]=null,o(e,function(e){if(e&&e.code!==`ERR_STREAM_PREMATURE_CLOSE`){var t=n[c];t!==null&&(n[d]=null,n[s]=null,n[c]=null,t(e)),n[l]=e;return}var r=n[s];r!==null&&(n[d]=null,n[s]=null,n[c]=null,r(m(void 0,!0))),n[u]=!0}),e.on(`readable`,g.bind(null,n)),n}})),mt=e(((e,t)=>{t.exports=function(){throw Error(`Readable.from is not available in the browser`)}})),ht=e(((e,t)=>{t.exports=E;var n;E.ReadableState=T,Ye().EventEmitter;var r=function(e,t){return e.listeners(t).length},i=rt(),a=J().Buffer,o=(typeof global<`u`?global:typeof window<`u`?window:typeof self<`u`?self:{}).Uint8Array||function(){};function s(e){return a.from(e)}function c(e){return a.isBuffer(e)||e instanceof o}var l=it(),u=l&&l.debuglog?l.debuglog(`stream`):function(){},d=at(),f=ot(),p=st().getHighWaterMark,m=Q().codes,h=m.ERR_INVALID_ARG_TYPE,g=m.ERR_STREAM_PUSH_AFTER_EOF,_=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,y,b,x;Z()(E,i);var S=f.errorOrDestroy,C=[`error`,`close`,`destroy`,`pause`,`resume`];function w(e,t,n){if(typeof e.prependListener==`function`)return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}function T(e,t,r){n||=$(),e||={},typeof r!=`boolean`&&(r=t instanceof n),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,`readableHighWaterMark`,r),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||`utf8`,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(y||=dt().StringDecoder,this.decoder=new y(e.encoding),this.encoding=e.encoding)}function E(e){if(n||=$(),!(this instanceof E))return new E(e);var t=this instanceof n;this._readableState=new T(e,this,t),this.readable=!0,e&&(typeof e.read==`function`&&(this._read=e.read),typeof e.destroy==`function`&&(this._destroy=e.destroy)),i.call(this)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var n=this._readableState,r;return n.objectMode?r=!0:typeof e==`string`&&(t||=n.defaultEncoding,t!==n.encoding&&(e=a.from(e,t),t=``),r=!0),ee(this,e,t,!1,r)},E.prototype.unshift=function(e){return ee(this,e,null,!0,!1)};function ee(e,t,n,r,i){u(`readableAddChunk`,t);var o=e._readableState;if(t===null)o.reading=!1,ne(e,o);else{var c;if(i||(c=te(o,t)),c)S(e,c);else if(o.objectMode||t&&t.length>0)if(typeof t!=`string`&&!o.objectMode&&Object.getPrototypeOf(t)!==a.prototype&&(t=s(t)),r)o.endEmitted?S(e,new v):D(e,o,t,!0);else if(o.ended)S(e,new g);else if(o.destroyed)return!1;else o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||t.length!==0?D(e,o,t,!1):N(e,o)):D(e,o,t,!1);else r||(o.reading=!1,N(e,o))}return!o.ended&&(o.length=O?e=O:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function A(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e===e?(e>t.highWaterMark&&(t.highWaterMark=k(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)):t.flowing&&t.length?t.buffer.head.data.length:t.length}E.prototype.read=function(e){u(`read`,e),e=parseInt(e,10);var t=this._readableState,n=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark===0?t.length>0:t.length>=t.highWaterMark)||t.ended))return u(`read: emitReadable`,t.length,t.ended),t.length===0&&t.ended?H(this):j(this),null;if(e=A(e,t),e===0&&t.ended)return t.length===0&&H(this),null;var r=t.needReadable;u(`need readable`,r),(t.length===0||t.length-e0?V(e,t):null;return i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&H(this)),i!==null&&this.emit(`data`,i),i};function ne(e,t){if(u(`onEofChunk`),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,M(e)))}}function j(e){var t=e._readableState;u(`emitReadable`,t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u(`emitReadable`,t.flowing),t.emittedReadable=!0,process.nextTick(M,e))}function M(e){var t=e._readableState;u(`emitReadable_`,t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit(`readable`),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function N(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length1&&W(i.pipes,e)!==-1)&&!l&&(u(`false write response, pause`,i.awaitDrain),i.awaitDrain++),n.pause())}function p(t){u(`onerror`,t),g(),e.removeListener(`error`,p),r(e,`error`)===0&&S(e,t)}w(e,`error`,p);function m(){e.removeListener(`finish`,h),g()}e.once(`close`,m);function h(){u(`onfinish`),e.removeListener(`close`,m),g()}e.once(`finish`,h);function g(){u(`unpipe`),n.unpipe(e)}return e.emit(`pipe`,n),i.flowing||(u(`pipe resume`),n.resume()),e};function F(e){return function(){var t=e._readableState;u(`pipeOnDrain`,t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&r(e,`data`)&&(t.flowing=!0,B(e))}}E.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||=t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(`unpipe`,this,n),this);if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,r.flowing!==!1&&this.resume()):e===`readable`&&!r.endEmitted&&!r.readableListening&&(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,u(`on readable`,r.length,r.reading),r.length?j(this):r.reading||process.nextTick(L,this)),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=i.prototype.removeListener.call(this,e,t);return e===`readable`&&process.nextTick(I,this),n},E.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return(e===`readable`||e===void 0)&&process.nextTick(I,this),t};function I(e){var t=e._readableState;t.readableListening=e.listenerCount(`readable`)>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount(`data`)>0&&e.resume()}function L(e){u(`readable nexttick read 0`),e.read(0)}E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u(`resume`),e.flowing=!e.readableListening,R(this,e)),e.paused=!1,this};function R(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(z,e,t))}function z(e,t){u(`resume`,t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(`resume`),B(e),t.flowing&&!t.reading&&e.read(0)}E.prototype.pause=function(){return u(`call pause flowing=%j`,this._readableState.flowing),this._readableState.flowing!==!1&&(u(`pause`),this._readableState.flowing=!1,this.emit(`pause`)),this._readableState.paused=!0,this};function B(e){var t=e._readableState;for(u(`flow`,t.flowing);t.flowing&&e.read()!==null;);}E.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on(`end`,function(){if(u(`wrapped end`),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on(`data`,function(i){u(`wrapped data`),n.decoder&&(i=n.decoder.write(i)),!(n.objectMode&&i==null)&&(!n.objectMode&&(!i||!i.length)||t.push(i)||(r=!0,e.pause()))}),e)this[i]===void 0&&typeof e[i]==`function`&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a=t.length?(n=t.decoder?t.buffer.join(``):t.buffer.length===1?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n}function H(e){var t=e._readableState;u(`endReadable`,t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(U,t,e))}function U(e,t){if(u(`endReadableNT`,e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit(`end`),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}typeof Symbol==`function`&&(E.from=function(e,t){return x===void 0&&(x=mt()),x(E,e,t)});function W(e,t){for(var n=0,r=e.length;n{t.exports=l;var n=Q().codes,r=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,s=$();Z()(l,s);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(r===null)return this.emit(`error`,new i);n.writechunk=null,n.writecb=null,t!=null&&this.push(t),r(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{t.exports=r;var n=gt();Z()(r,n);function r(e){if(!(this instanceof r))return new r(e);n.call(this,e)}r.prototype._transform=function(e,t,n){n(null,e)}})),vt=e(((e,t)=>{var n;function r(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var i=Q().codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){return e.setHeader&&typeof e.abort==`function`}function l(e,t,i,a){a=r(a);var s=!1;e.on(`close`,function(){s=!0}),n===void 0&&(n=ft()),n(e,{readable:t,writable:i},function(e){if(e)return a(e);s=!0,a()});var l=!1;return function(t){if(!s&&!l){if(l=!0,c(e))return e.abort();if(typeof e.destroy==`function`)return e.destroy();a(t||new o(`pipe`))}}}function u(e){e()}function d(e,t){return e.pipe(t)}function f(e){return!e.length||typeof e[e.length-1]!=`function`?s:e.pop()}function p(){var e=[...arguments],t=f(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new a(`streams`);var n,r=e.map(function(i,a){var o=a0,function(e){n||=e,e&&r.forEach(u),!o&&(r.forEach(u),t(n))})});return e.reduce(d)}t.exports=p})),yt=e(((e,t)=>{t.exports=r;var n=Ye().EventEmitter;Z()(r,n),r.Readable=ht(),r.Writable=lt(),r.Duplex=$(),r.Transform=gt(),r.PassThrough=_t(),r.finished=ft(),r.pipeline=vt(),r.Stream=r;function r(){n.call(this)}r.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}r.on(`data`,i);function a(){r.readable&&r.resume&&r.resume()}e.on(`drain`,a),!e._isStdio&&(!t||t.end!==!1)&&(r.on(`end`,s),r.on(`close`,c));var o=!1;function s(){o||(o=!0,e.end())}function c(){o||(o=!0,typeof e.destroy==`function`&&e.destroy())}function l(e){if(u(),n.listenerCount(this,`error`)===0)throw e}r.on(`error`,l),e.on(`error`,l);function u(){r.removeListener(`data`,i),e.removeListener(`drain`,a),r.removeListener(`end`,s),r.removeListener(`close`,c),r.removeListener(`error`,l),e.removeListener(`error`,l),r.removeListener(`end`,u),r.removeListener(`close`,u),e.removeListener(`close`,u)}return r.on(`end`,u),r.on(`close`,u),e.on(`close`,u),e.emit(`pipe`,r),e}}))();async function*bt(e,t,n){let r=1,i={chunks:[],length:0};for await(let a of n(e))for(i.chunks.push(a),i.length+=a.byteLength;i.length>t;){let e=i.chunks.length>1?Y.Buffer.concat(i.chunks):i.chunks[0];yield{partNumber:r,data:e.subarray(0,t)},i.chunks=[e.subarray(t)],i.length=i.chunks[0].byteLength,r+=1}yield{partNumber:r,data:i.chunks.length===1?i.chunks[0]:Y.Buffer.concat(i.chunks),lastPart:!0}}async function*xt(e,t){let n=1,r=0,i=t;for(;i{if(e instanceof Uint8Array)return xt(e,t);if(e instanceof yt.Readable)return bt(e,t,St);if(e instanceof String||typeof e==`string`)return xt(Y.Buffer.from(e),t);if(typeof e.stream==`function`)return bt(e.stream(),t,Ct);if(e instanceof ReadableStream)return bt(e,t,Ct);throw Error(`Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.`)},Tt=class e extends $e.EventEmitter{static MIN_PART_SIZE=1024*1024*5;MAX_PARTS=1e4;queueSize=4;partSize;leavePartsOnError=!1;tags=[];client;params;totalBytes;totalBytesSource;bytesUploadedSoFar;abortController;concurrentUploaders=[];createMultiPartPromise;abortMultipartUploadCommand=null;uploadedParts=[];uploadEnqueuedPartsCount=0;expectedPartsCount;uploadId;uploadEvent;isMultiPart=!0;singleUploadResult;sent=!1;constructor(t){if(super(),this.queueSize=t.queueSize||this.queueSize,this.leavePartsOnError=t.leavePartsOnError||this.leavePartsOnError,this.tags=t.tags||this.tags,this.client=t.client,this.params=t.params,!this.params)throw Error(`InputError: Upload requires params to be passed to upload.`);this.totalBytes=this.params.ContentLength??tt(this.params.Body),this.totalBytesSource=nt(this.params.Body,this.params.ContentLength),this.bytesUploadedSoFar=0,this.abortController=t.abortController??new AbortController,this.partSize=t.partSize||Math.max(e.MIN_PART_SIZE,Math.ceil((this.totalBytes||0)/this.MAX_PARTS)),this.totalBytes!==void 0&&(this.expectedPartsCount=Math.ceil(this.totalBytes/this.partSize)),this.__validateInput()}async abort(){this.abortController.abort()}async done(){if(this.sent)throw Error(`@aws-sdk/lib-storage: this instance of Upload has already executed .done(). Create a new instance.`);return this.sent=!0,await Promise.race([this.__doMultipartUpload(),this.__abortTimeout(this.abortController.signal)])}on(e,t){return this.uploadEvent=e,super.on(e,t)}async __uploadUsingPut(e){this.isMultiPart=!1;let t={...this.params,Body:e.data},n=this.client.config,r=n.requestHandler,i=r instanceof $e.EventEmitter?r:null,a=t=>{this.bytesUploadedSoFar=t.loaded,this.totalBytes=t.total,this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:e.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})};i!==null&&i.on(`xhr.upload.progress`,a);let o=await Promise.all([this.client.send(new Ge(t)),n?.endpoint?.()]),s=o[0],c=o[1];if(c||=v(await S(t,Ge,{...n})),!c)throw Error(`Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.`);i!==null&&i.off(`xhr.upload.progress`,a);let l=this.params.Key.split(`/`).map(e=>w(e)).join(`/`),u=w(this.params.Bucket),d=(()=>{let e=c.hostname.startsWith(`${u}.`),t=this.client.config.forcePathStyle,n=c.port?`:${c.port}`:``;return t?`${c.protocol}//${c.hostname}${n}/${u}/${l}`:e?`${c.protocol}//${c.hostname}${n}/${l}`:`${c.protocol}//${u}.${c.hostname}${n}/${l}`})();this.singleUploadResult={...s,Bucket:this.params.Bucket,Key:this.params.Key,Location:d};let f=tt(e.data);this.__notifyProgress({loaded:f,total:f,part:1,Key:this.params.Key,Bucket:this.params.Bucket})}async __createMultipartUpload(){let e=await this.client.config.requestChecksumCalculation();if(!this.createMultiPartPromise){let t={...this.params,Body:void 0};e===`WHEN_SUPPORTED`&&(t.ChecksumAlgorithm=this.params.ChecksumAlgorithm||Je.CRC32),this.createMultiPartPromise=this.client.send(new Ue(t)).then(e=>(this.abortMultipartUploadCommand=new Be({Bucket:this.params.Bucket,Key:this.params.Key,UploadId:e.UploadId}),e))}return this.createMultiPartPromise}async __doConcurrentUpload(e){for await(let t of e){if(this.uploadEnqueuedPartsCount>this.MAX_PARTS)throw Error(`Exceeded ${this.MAX_PARTS} parts in multipart upload to Bucket: ${this.params.Bucket} Key: ${this.params.Key}.`);if(this.abortController.signal.aborted)return;if(t.partNumber===1&&t.lastPart)return await this.__uploadUsingPut(t);if(!this.uploadId){let{UploadId:e}=await this.__createMultipartUpload();if(this.uploadId=e,this.abortController.signal.aborted)return}let e=tt(t.data)||0,n=this.client.config.requestHandler,r=n instanceof $e.EventEmitter?n:null,i=0,a=(n,r)=>{(Number(r.query.partNumber)||-1)===t.partNumber&&(n.total&&e&&(this.bytesUploadedSoFar+=n.loaded-i,i=n.loaded),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:t.partNumber,Key:this.params.Key,Bucket:this.params.Bucket}))};r!==null&&r.on(`xhr.upload.progress`,a),this.uploadEnqueuedPartsCount+=1,this.__validateUploadPart(t);let o=await this.client.send(new qe({...this.params,ContentLength:void 0,UploadId:this.uploadId,Body:t.data,PartNumber:t.partNumber}));if(r!==null&&r.off(`xhr.upload.progress`,a),this.abortController.signal.aborted)return;if(!o.ETag)throw Error(`Part ${t.partNumber} is missing ETag in UploadPart response. Missing Bucket CORS configuration for ETag header?`);this.uploadedParts.push({PartNumber:t.partNumber,ETag:o.ETag,...o.ChecksumCRC32&&{ChecksumCRC32:o.ChecksumCRC32},...o.ChecksumCRC32C&&{ChecksumCRC32C:o.ChecksumCRC32C},...o.ChecksumSHA1&&{ChecksumSHA1:o.ChecksumSHA1},...o.ChecksumSHA256&&{ChecksumSHA256:o.ChecksumSHA256}}),r===null&&(this.bytesUploadedSoFar+=e),this.__notifyProgress({loaded:this.bytesUploadedSoFar,total:this.totalBytes,part:t.partNumber,Key:this.params.Key,Bucket:this.params.Bucket})}}async __doMultipartUpload(){let e=wt(this.params.Body,this.partSize),t=[];for(let n=0;n{t.push(e)});this.concurrentUploaders.push(n)}if(await Promise.all(this.concurrentUploaders),t.length>=1)throw await this.markUploadAsAborted(),t[0];if(this.abortController.signal.aborted)throw await this.markUploadAsAborted(),Object.assign(Error(`Upload aborted.`),{name:`AbortError`});let n;if(this.isMultiPart){let{expectedPartsCount:e,uploadedParts:t,totalBytes:r,totalBytesSource:i}=this;if(r!==void 0&&e!==void 0&&t.length!==e)throw Error(`Expected ${e} part(s) but uploaded ${t.length} part(s). The expected part count is based on the byte-count of the input.params.Body, which was read from ${i} and is ${r}. If this is not correct, provide an override value by setting a number diff --git a/spinifex/services/spinifexui/frontend/dist/assets/select.js b/spinifex/services/spinifexui/frontend/dist/assets/select.js index 5e9ce4d70..765f19b0e 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/select.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/select.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{a as i,c as a,f as o,i as s,l as c,n as l,u}from"./dist.js";import{Lt as d}from"./auth.js";import{t as f}from"./check.js";import{t as p}from"./chevron-down.js";import{_ as m,b as h,o as g,r as _,s as v}from"./button.js";import{S as y,_ as b,b as x,f as S,g as C,l as w,n as ee,o as T,t as E,u as D,v as te,x as O,y as k}from"./createBaseUIEventDetails.js";import{$n as A,An as j,Ar as M,Bn as N,Cr as P,Dr as F,Er as I,Fn as ne,Fr as re,Gn as ie,Hn as ae,In as L,Ir as R,Kn as z,Ln as B,Mn as V,Mr as H,Nn as U,Nr as W,Or as G,Pn as oe,Pr as K,Qn as q,Rn as J,Sr as se,Tr as Y,Un as ce,Vn as le,Wn as ue,Xn as de,Zn as fe,_r as pe,an as me,bn as he,br as ge,dr as _e,fn as ve,fr as ye,gr as be,hr as xe,in as Se,ir as Ce,jn as we,jr as Te,kn as Ee,kr as De,lr as Oe,mr as ke,nr as Ae,on as je,pn as X,pr as Me,qr as Ne,rr as Pe,sn as Fe,sr as Ie,tr as Le,un as Re,ur as ze,vr as Be,wr as Ve,xr as He,yr as Ue,zn as We}from"./index.js";import{i as Ge,n as Ke,r as qe,t as Je}from"./useCompositeListItem.js";var Ye=Ne(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Z=t(n(),1);function Xe(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:a=!0,ignoreMouse:o=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=C}=t,u=`rootStore`in e?e.rootStore:e,d=u.context.dataRef,f=Z.useRef(void 0),p=Oe(),m=ze(),h=Z.useMemo(()=>{function e(e,t,n,r){let i=E(l,t,n);e&&r===`touch`&&c>0?m.start(c,()=>{u.setOpen(!0,i)}):u.setOpen(e,i)}function t(e,t,n){let r=d.current.openEvent,i=u.select(`domReferenceElement`)!==t;return e&&i||!e||!a?!0:r&&s?!n(r.type):!1}return{onPointerDown(e){f.current=e.pointerType},onMouseDown(n){let i=f.current,a=n.nativeEvent,s=u.select(`open`);if(n.button!==0||r===`click`||Be(i,!0)&&o)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),l=x(a);if(Ve(l)){e(c,a,l,i);return}let d=n.currentTarget;p.request(()=>{e(c,a,d,i)})},onClick(n){if(r===`mousedown-only`)return;let i=f.current;if(r===`mousedown`&&i){f.current=void 0;return}Be(i,!0)&&o||e(t(u.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){f.current=void 0}}},[d,r,o,l,u,s,a,p,m,c]);return Z.useMemo(()=>n?{reference:h}:i,[n,h])}var Ze=`Escape`;function Qe(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function $e(e,t){return Qe(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function et(e,t,n){return Qe(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function tt(e,t,n){return Qe(t,n?e===I:e===F,e===Y)}function nt(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===Ze:Qe(t,n?e===F:e===I,e===G)}function rt(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:_=void 0,orientation:y=`vertical`,parentOrientation:b,id:S,resetOnPointerLeave:C=!0,externalTree:w,grid:ee}=t,A=ee!=null,j=`rootStore`in e?e.rootStore:e,M=j.useState(`open`),N=j.useState(`floatingElement`),F=j.useState(`domReferenceElement`),I=j.context.dataRef,ne=se(N),re=P(F),L=ie(ne),R=J(),z=We(w),B=Z.useRef(f),V=Z.useRef(o??-1),H=Z.useRef(null),U=Z.useRef(!0),W=v(e=>{i(V.current===-1?null:V.current,e)}),G=Z.useRef(!!N),oe=Z.useRef(M),K=Z.useRef(!1),q=Z.useRef(!1),Y=Z.useRef(null),ce=ie(_),le=ie(M),ue=ie(o),de=ie(C),fe=Oe(),pe=Oe(),me=v(()=>{function e(e){d?z?.events.emit(`virtualfocus`,e):Y.current=ae(e,{sync:K.current,preventScroll:!0})}let t=n.current[V.current],r=q.current;t&&e(t),(K.current?e=>e():e=>fe.request(e))(()=>{let i=n.current[V.current]||t;i&&(t||e(i),we&&(r||!U.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});g(()=>{I.current.orientation=y},[I,y]),g(()=>{a&&(M&&N?(V.current=o??-1,B.current&&o!=null&&(q.current=!0,W())):G.current&&(V.current=-1,W()))},[a,M,N,o,W]),g(()=>{if(a){if(!M){K.current=!1;return}if(N)if(r==null){if(K.current=!1,ue.current!=null)return;if(G.current&&(V.current=-1,me()),(!oe.current||!G.current)&&B.current&&(H.current!=null||B.current===!0&&H.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>pe.request(e):queueMicrotask)(t),e+=1):(V.current=H.current==null||et(H.current,y,u)||l?Me(n):ye(n),H.current=null,W())};t()}}else xe(n.current,r)||(V.current=r,me(),q.current=!1)}},[a,M,N,r,ue,l,n,y,u,W,me,pe]),g(()=>{if(!a||N||!z||d||!G.current)return;let e=z.nodesRef.current,t=e.find(e=>e.id===R)?.context?.elements.floating,n=te(O(F??t??null)),r=e.some(e=>e.context&&k(e.context.elements.floating,n));t&&!r&&U.current&&t.focus({preventScroll:!0})},[a,N,F,z,R,d]),g(()=>{oe.current=M,G.current=!!N}),g(()=>{M||(H.current=null,B.current=f)},[M,f]);let he=r!=null,ve=v(e=>{if(!le.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(V.current!==t||r!==t)&&(V.current=t,W(e))}),be=v(()=>b??z?.nodesRef.current.find(e=>e.id===R)?.context?.dataRef?.current.orientation),Se=v(()=>Me(n,ce.current)),Ce=v(e=>{if(U.current=!1,K.current=!0,e.which===229||!le.current&&e.currentTarget===L.current)return;if(l&&nt(e.key,y,u,A)){$e(e.key,be())||He(e),j.setOpen(!1,E(D,e.nativeEvent)),h(F)&&(d?z?.events.emit(`virtualfocus`,F):F.focus());return}let t=V.current,r=Me(n,_),i=ye(n,_);if(re||(e.key===`Home`&&(He(e),V.current=r,W(e)),e.key===`End`&&(He(e),V.current=i,W(e))),ee!=null){let t=ee(e,V.current,n,y,c,u,_,r,i);if(t!=null&&(V.current=t,W(e)),y===`both`)return}if($e(e.key,y)){if(He(e),M&&!d&&te(e.currentTarget.ownerDocument)===e.currentTarget){V.current=et(e.key,y,u)?r:i,W(e);return}et(e.key,y,u)?c?t>=i?s&&t!==n.current.length?V.current=-1:(K.current=!1,V.current=r):V.current=_e(n.current,{startingIndex:t,disabledIndices:_}):V.current=Math.min(i,_e(n.current,{startingIndex:t,disabledIndices:_})):c?t<=r?s&&t!==-1?V.current=n.current.length:(K.current=!1,V.current=i):V.current=_e(n.current,{startingIndex:t,decrement:!0,disabledIndices:_}):V.current=Math.max(r,_e(n.current,{startingIndex:t,decrement:!0,disabledIndices:_})),xe(n.current,V.current)&&(V.current=-1),W(e)}}),we=Z.useMemo(()=>({onFocus(e){K.current=!0,ve(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){K.current=!0,q.current=!1,p&&ve(e)},onPointerLeave(e){if(!le.current||!U.current||e.pointerType===`touch`)return;K.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&de.current&&(Y.current?.(),Y.current=null,V.current=-1,W(e),!d)){let e=L.current,t=te(O(e));e&&k(e,t)&&e.focus({preventScroll:!0})}}}),[ve,le,L,p,n,W,de,d]),Te=Z.useMemo(()=>d&&M&&he&&{"aria-activedescendant":`${S}-${r}`},[d,M,he,S,r]),Ee=Z.useMemo(()=>({"aria-orientation":y===`both`?void 0:y,...re?{}:Te,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&M&&!d){let t=x(e.nativeEvent);if(t&&!k(L.current,t))return;He(e),j.setOpen(!1,E(T,e.nativeEvent)),h(F)&&F.focus();return}Ce(e)},onPointerMove(){U.current=!0}}),[Te,Ce,L,y,re,j,M,d,F]),De=Z.useMemo(()=>{function e(e){j.setOpen(!0,E(D,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&Ue(e.nativeEvent)&&(B.current=!d)}function n(e){B.current=f,f===`auto`&&ge(e.nativeEvent)&&(B.current=!0)}return{onKeyDown(t){let n=j.select(`open`);U.current=!1;let r=t.key.startsWith(`Arrow`),i=tt(t.key,be(),u),a=$e(t.key,y),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return Ce(t);if(!(!n&&!m&&r)){if(o){let e=$e(t.key,be());H.current=l&&e?null:t.key}if(l){i&&(He(t),n?(V.current=Se(),W(t)):e(t));return}a&&(ue.current!=null&&(V.current=ue.current),He(t),!n&&m?e(t):Ce(t),n&&W(t))}},onFocus(e){j.select(`open`)&&!d&&(V.current=-1,W(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[Ce,f,Se,l,W,j,m,y,be,u,ue,d]),ke=Z.useMemo(()=>({...Te,...De}),[Te,De]);return Z.useMemo(()=>a?{reference:ke,floating:Ee,item:we,trigger:De}:{},[a,ke,Ee,De,we])}function it(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:c,enabled:l=!0,resetMs:u=750,selectedIndex:d=null}=t,f=`rootStore`in e?e.rootStore:e,p=f.useState(`open`),m=ze(),h=Z.useRef(``),_=Z.useRef(d??i??-1),y=Z.useRef(null),b=v(e=>{function t(e){let t=r?.current[e];return!t||ke(t)}function l(e){return t(e)?o==null||!be(s,e,o):!1}function f(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t0&&e.key===` `&&(He(e),c?.(!0)),h.current.length>0&&h.current[0]!==` `&&f(g,h.current)===-1&&e.key!==` `&&c?.(!1),g==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;p&&e.key!==` `&&(He(e),c?.(!0));let v=h.current===``;v&&(_.current=d??i??-1),g.every((e,t)=>e&&l(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&h.current===e.key&&(h.current=``,_.current=y.current),h.current+=e.key,m.start(u,()=>{h.current=``,_.current=y.current,c?.(!1)});let b=((v?d??i??-1:_.current)??0)+1,x=f(g,h.current,b);x===-1?e.key!==` `&&(h.current=``,c?.(!1)):(a?.(x),y.current=x)}),x=v(e=>{let t=e.relatedTarget,n=f.select(`domReferenceElement`),r=f.select(`floatingElement`);k(n,t)||k(r,t)||(m.clear(),h.current=``,_.current=y.current,c?.(!1))});g(()=>{!p&&d!==null||(m.clear(),y.current=null,h.current!==``&&(h.current=``))},[p,d,m]),g(()=>{p&&h.current===``&&(_.current=d??i??-1)},[p,d,i]);let S=Z.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return Z.useMemo(()=>l?{reference:S,floating:S}:{},[l,S])}var Q=e();function at(e){let t=Z.useRef(``),n=Z.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Z.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function ot(e,t){let n=Z.useRef(e),r=v(t);g(()=>{n.current!==e&&r(n.current)},[e,r]),g(()=>{n.current=e},[e])}function st(e,t){let{onClick:n,onPointerDown:r}=at(v((n,r)=>{(typeof e==`function`?e():e)||t(r||(Te?`touch`:``))}));return Z.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function ct(e){let[t,n]=Z.useState(null),r=st(e,n);return ot(e,t=>{t&&!e&&n(null)}),Z.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function lt(e){let[t,n]=Z.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}var ut=Z.createContext(null),dt=Z.createContext(null);function ft(){let e=Z.useContext(ut);if(e===null)throw Error(u(60));return e}function pt(){let e=Z.useContext(dt);if(e===null)throw Error(u(61));return e}var mt=(e,t)=>Object.is(e,t);function ht(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function gt(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:ht(t,e,n))}function _t(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:ht(e,t,n))}function vt(e,t,n){return e.filter(e=>!ht(t,e,n))}function yt(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function bt(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function xt(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(bt(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function St(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return yt(e)}function Ct(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?yt(e.value):yt(e)}function wt(e,t,n){function r(){return St(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=bt(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Tt(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(Z.Fragment,{children:wt(r,t,n)},i)),e),[])}var $={id:U(e=>e.id),labelId:U(e=>e.labelId),modal:U(e=>e.modal),multiple:U(e=>e.multiple),items:U(e=>e.items),itemToStringLabel:U(e=>e.itemToStringLabel),itemToStringValue:U(e=>e.itemToStringValue),isItemEqualToValue:U(e=>e.isItemEqualToValue),value:U(e=>e.value),hasSelectedValue:U(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Ct(t,r)!==``}),hasNullItemLabel:U((e,t)=>t?xt(e.items):!1),open:U(e=>e.open),mounted:U(e=>e.mounted),forceMount:U(e=>e.forceMount),transitionStatus:U(e=>e.transitionStatus),openMethod:U(e=>e.openMethod),activeIndex:U(e=>e.activeIndex),selectedIndex:U(e=>e.selectedIndex),isActive:U((e,t)=>e.activeIndex===t),isSelected:U((e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>ht(t,e,n)):ht(t,r,n)}),isSelectedByFocus:U((e,t)=>e.selectedIndex===t),popupProps:U(e=>e.popupProps),triggerProps:U(e=>e.triggerProps),triggerElement:U(e=>e.triggerElement),positionerElement:U(e=>e.positionerElement),listElement:U(e=>e.listElement),popupSide:U(e=>e.popupSide),scrollUpArrowVisible:U(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:U(e=>e.scrollDownArrowVisible),hasScrollArrows:U(e=>e.hasScrollArrows)};function Et(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function Dt(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Ot(e,t){return Math.max(0,e-t)}function kt(e,t){if(t<=0)return 0;let n=Dt(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function At(e){let{id:t,value:n,defaultValue:r=null,onValueChange:l,open:u,defaultOpen:d=!1,onOpenChange:f,name:p,form:m,autoComplete:h,disabled:_=!1,readOnly:y=!1,required:b=!1,modal:x=!0,actionsRef:C,inputRef:w,onOpenChangeComplete:ee,items:T,multiple:D=!1,itemToStringLabel:te,itemToStringValue:O,isItemEqualToValue:k=mt,highlightItemOnHover:A=!0,children:M}=e,{clearErrors:N}=K(),{setDirty:P,setTouched:F,setFocused:I,validityData:ne,setFilled:ae,name:R,disabled:z,validation:B,validationMode:U}=re(),W=H({id:t}),G=z||_,q=R??p,[J,se]=Ae({controlled:n,default:D?r??s:r,name:`Select`,state:`value`}),[Y,le]=Ae({controlled:u,default:d,name:`Select`,state:`open`}),de=Z.useRef([]),fe=Z.useRef([]),pe=Z.useRef(null),me=Z.useRef(null),he=Z.useRef(0),ge=Z.useRef(null),_e=Z.useRef([]),ve=Z.useRef(!1),ye=Z.useRef(null),be=Z.useRef(null),xe=Z.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Se=Z.useRef(!1),{mounted:Te,setMounted:De,transitionStatus:Oe}=Pe(Y),{openMethod:ke,triggerProps:je}=ct(Y),X=c(()=>new we({id:W,labelId:void 0,modal:x,multiple:D,itemToStringLabel:te,itemToStringValue:O,isItemEqualToValue:k,value:J,open:Y,mounted:Te,transitionStatus:Oe,items:T,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Me=V(X,$.activeIndex),Ne=V(X,$.selectedIndex),Fe=V(X,$.triggerElement),Ie=V(X,$.positionerElement),Re=lt(ke),ze=ke??Re??null,Be=Z.useMemo(()=>D?``:Ct(J,O),[D,J,O]),Ve=Z.useMemo(()=>D&&Array.isArray(J)?J.map(e=>Ct(e,O)):Ct(J,O),[D,J,O]);Le(ie(X.state.triggerElement),W,J,v(()=>Ve),!G,p);let He=Z.useRef(J),Ue=D?Array.isArray(J)&&J.length>0:J!=null&&Ct(J,O)!==``;g(()=>{J!==He.current&&X.set(`forceMount`,!0)},[X,J]),g(()=>{ae(Ue)},[Ue,ae]),g(function(){let e=_e.current,t;if(D){let n=Array.isArray(J)?J:[];if(n.length===0)t=null;else{let r=n[n.length-1],i=_t(e,r,k);t=i===-1?null:i}}else{let n=_t(e,J,k);t=n===-1?null:n}t===null&&(be.current=null),!Y&&X.set(`selectedIndex`,t)},[Ue,D,Y,J,_e,k,X,be]);function We(e){let t=ne.initialValue;return Array.isArray(e)&&Array.isArray(t)?!Et(e,t,(e,t)=>ht(e,t,k)):e!==t}ot(J,()=>{N(q),P(We(J)),B.change(J)});let Ke=v((e,t)=>{f?.(e,t),!t.isCanceled&&(le(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(F(!0),I(!1),U===`onBlur`&&B.commit(J)))}),qe=v(()=>{De(!1),X.update({activeIndex:null,openMethod:null}),ee?.(!1)});Ce({enabled:!C,open:Y,ref:pe,onComplete(){Y||qe()}}),Z.useImperativeHandle(C,()=>({unmount:qe}),[qe]);let Je=v((e,t)=>{l?.(e,t),!t.isCanceled&&se(e)}),Ye=v(()=>{let e=X.state.listElement||pe.current;if(!e)return;let t=Ot(e.scrollHeight,e.clientHeight),n=kt(e.scrollTop,t),r=n>0,i=nGe(de.current[e]),onMatch(e){Y?X.set(`activeIndex`,e):Je(_e.current[e],E(`none`))},onTyping(e){ve.current=e}}),nt=Z.useMemo(()=>{let e=o(tt.reference,et.reference,$e.reference,Qe.reference,je);return W&&(e.id=W),e},[Qe.reference,tt.reference,et.reference,$e.reference,je,W]),at=Z.useMemo(()=>o(j,tt.floating,et.floating,$e.floating),[tt.floating,et.floating,$e.floating]),st=et.item??i;oe(()=>{X.update({popupProps:at,triggerProps:nt})}),g(()=>{X.update({id:W,modal:x,multiple:D,value:J,open:Y,mounted:Te,transitionStatus:Oe,popupProps:at,triggerProps:nt,items:T,itemToStringLabel:te,itemToStringValue:O,isItemEqualToValue:k,openMethod:ze})},[X,W,x,D,J,Y,Te,Oe,at,nt,T,te,O,k,ze]);let ft=Z.useMemo(()=>({store:X,name:q,required:b,disabled:G,readOnly:y,multiple:D,highlightItemOnHover:A,setValue:Je,setOpen:Ke,listRef:de,popupRef:pe,scrollHandlerRef:me,handleScrollArrowVisibility:Ye,scrollArrowsMountedCountRef:he,itemProps:st,valueRef:ge,valuesRef:_e,labelsRef:fe,typingRef:ve,selectionRef:xe,firstItemTextRef:ye,selectedItemTextRef:be,validation:B,onOpenChangeComplete:ee,alignItemWithTriggerActiveRef:Se,initialValueRef:He}),[X,q,b,G,y,D,A,Je,Ke,st,B,ee,Ye]),pt=a(w,B.inputRef),gt=D&&Array.isArray(J)&&J.length>0,vt=D?void 0:q,yt=Z.useMemo(()=>!D||!Array.isArray(J)||!q?null:J.map(e=>{let t=Ct(e,O);return(0,Q.jsx)(`input`,{type:`hidden`,form:m,name:q,value:t,disabled:G},t)}),[D,J,m,q,O,G]);return(0,Q.jsx)(ut.Provider,{value:ft,children:(0,Q.jsxs)(dt.Provider,{value:Ze,children:[M,(0,Q.jsx)(`input`,{...B.getValidationProps(G,{onFocus(){X.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||G||y)return;let t=e.currentTarget.value,n=E(S,e.nativeEvent);function r(){if(D)return;let e=t.toLowerCase(),r=_e.current.findIndex(t=>Ct(t,O).toLowerCase()===e||St(t,te).toLowerCase()===e);r===-1&&(r=_e.current.findIndex((t,n)=>{let r=fe.current[n];return r!=null&&r.toLowerCase()===e}));let i=r===-1?void 0:_e.current[r];i!=null&&Je(i,n)}X.set(`forceMount`,!0),queueMicrotask(r)}}),id:W&&vt==null?`${W}-hidden-input`:void 0,form:m,name:vt,autoComplete:h,value:Be,disabled:G,required:b&&!gt,readOnly:y,ref:pt,style:q?ue:ce,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),yt]})})}function jt(e,t){return e??t}function Mt(e){let t=e.getBoundingClientRect(),n=m(e);if(De)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var Nt=2,Pt=400,Ft={...fe,...R,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},It=Z.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:s=!0,style:c,...u}=e,{setTouched:d,setFocused:f,validationMode:p,state:m,disabled:h}=re(),{labelId:g}=W(),{store:y,setOpen:b,selectionRef:x,validation:C,readOnly:w,required:T,alignItemWithTriggerActiveRef:D,disabled:te}=ft(),A=h||te||a,j=V(y,$.open),M=V(y,$.mounted),N=V(y,$.value),P=V(y,$.triggerProps),F=V(y,$.positionerElement),I=V(y,$.listElement),ne=V(y,$.popupSide),ae=V(y,$.id),L=V(y,$.labelId),R=V(y,$.hasSelectedValue),z=M&&F?ne:null,B=i??ae,U=jt(g,L);H({id:B});let G=ie(F),oe=Z.useRef(null),{getButtonProps:K,buttonRef:q}=_({disabled:A,native:s}),J=v(e=>{y.set(`triggerElement`,e)}),Y=ze(),ce=ze(),le=ze();Z.useEffect(()=>{if(j)return le.start(Pt,()=>{x.current.allowUnselectedMouseUp=!0,x.current.allowSelectedMouseUp=!0}),()=>{le.clear()};x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ce.clear()},[j,x,ce,le]);let ue=o(P,{id:B,role:`combobox`,"aria-expanded":j?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":j?I?.id??se(F)?.id:void 0,"aria-labelledby":U,"aria-readonly":w||void 0,"aria-required":T||void 0,tabIndex:A?-1:0,onFocus(e){f(!0),j&&D.current&&b(!1,E(S,e.nativeEvent)),Y.start(0,()=>{y.set(`forceMount`,!0)})},onBlur(e){k(F,e.relatedTarget)||(d(!0),f(!1),p===`onBlur`&&C.commit(N))},onMouseDown(e){if(j)return;let t=O(e.currentTarget);function n(e){if(!oe.current)return;let t=e.target;if(k(oe.current,t)||k(G.current,t))return;let n=Mt(oe.current);e.clientX>=n.left-Nt&&e.clientX<=n.right+Nt&&e.clientY>=n.top-Nt&&e.clientY<=n.bottom+Nt||b(!1,E(ee,e))}ce.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},u,K),de=C.getValidationProps(A,ue);de.role=`combobox`;let fe={...m,open:j,disabled:A,value:N,readOnly:w,popupSide:z,placeholder:!R};return l(`button`,e,{ref:[t,oe,q,J],state:fe,stateAttributesMapping:Ft,props:de})}),Lt={value:()=>null},Rt=Z.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:u}=ft(),d=V(c,$.value),f=V(c,$.items),p=V(c,$.itemToStringLabel),m=V(c,$.hasSelectedValue),h=!m&&a!=null&&i==null,g=V(c,$.hasNullItemLabel,h),_={value:d,placeholder:!m},v=null;return v=typeof i==`function`?i(d):i??(!m&&a!=null&&!g?a:Array.isArray(d)?Tt(d,f,p):wt(d,f,p)),l(`span`,e,{state:_,ref:[t,u],props:[{children:v},s],stateAttributesMapping:Lt})}),zt=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=ft();return l(`span`,e,{state:{open:V(o,$.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:q})}),Bt=Z.createContext(void 0),Vt=Z.forwardRef(function(e,t){let{store:n}=ft(),r=V(n,$.mounted),i=V(n,$.forceMount);return r||i?(0,Q.jsx)(Bt.Provider,{value:!0,children:(0,Q.jsx)(N,{ref:t,...e})}):null}),Ht=Z.createContext(void 0);function Ut(){let e=Z.useContext(Ht);if(!e)throw Error(u(59));return e}function Wt(e,t){e&&Object.assign(e.style,t)}var Gt={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Kt=20;function qt(e,t,n,r){let[i,a]=Z.useState(!1);g(()=>{if(!e||!t||n==null){a(!1);return}let r=O(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Kt)},[e,t,n]),Re(e&&(!t||i),r)}var Jt={position:`fixed`},Yt=Z.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:_=le,style:y,...b}=e,{store:x,listRef:C,labelsRef:w,alignItemWithTriggerActiveRef:ee,selectedItemTextRef:T,valuesRef:D,initialValueRef:te,popupRef:O,setValue:k}=ft(),A=pt(),j=V(x,$.open),M=V(x,$.mounted),N=V(x,$.modal),P=V(x,$.value),F=V(x,$.openMethod),I=V(x,$.positionerElement),ne=V(x,$.triggerElement),re=V(x,$.isItemEqualToValue),ie=V(x,$.transitionStatus),ae=Z.useRef(null),L=Z.useRef(null),[R,z]=Z.useState(h),B=M&&R&&F!==`touch`;!M&&R!==h&&z(h),g(()=>{M||($.scrollUpArrowVisible(x.state)&&x.set(`scrollUpArrowVisible`,!1),$.scrollDownArrowVisible(x.state)&&x.set(`scrollDownArrowVisible`,!1))},[x,M]),Z.useImperativeHandle(ee,()=>B),qt((B||N)&&j,F===`touch`,I,ne);let H=je({anchor:n,floatingRootContext:A,positionMethod:r,mounted:M,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??B,collisionAvoidance:_,keepMounted:!0}),U=B?`none`:H.side,W=B?Jt:H.positionerStyles,G={open:j,side:U,align:H.align,anchorHidden:H.anchorHidden};g(()=>{x.set(`popupSide`,H.side)},[x,H.side]);let oe=Se(e,G,{styles:W,transitionStatus:ie,props:b,refs:[t,v(e=>{x.set(`positionerElement`,e)})],hidden:!M,inert:!j}),K=Z.useRef(0),q=v(e=>{if(e.size===0&&K.current===0||D.current.length===0)return;let t=K.current;if(K.current=e.size,e.size===t)return;let n=E(S);if(t!==0&&!x.state.multiple&&P!==null&&_t(D.current,P,re)===-1){let e=te.current,t=e!=null&&_t(D.current,e,re)!==-1?e:null;k(t,n),t===null&&(x.set(`selectedIndex`,null),T.current=null)}if(t!==0&&x.state.multiple&&Array.isArray(P)){let e=e=>_t(D.current,e,re)!==-1,t=P.filter(t=>e(t));(t.length!==P.length||t.some(e=>!gt(P,e,re)))&&(k(t,n),t.length===0&&(x.set(`selectedIndex`,null),T.current=null))}if(j&&B){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Wt(I,e),Wt(O.current,e)}}),J=Z.useMemo(()=>({...H,side:U,alignItemWithTriggerActive:B,setControlledAlignItemWithTrigger:z,scrollUpArrowRef:ae,scrollDownArrowRef:L}),[H,U,B,z]);return(0,Q.jsx)(qe,{elementsRef:C,labelsRef:w,onMapChange:q,children:(0,Q.jsxs)(Ht.Provider,{value:J,children:[M&&N&&(0,Q.jsx)(ve,{inert:X(!j),cutout:ne}),oe]})})}),Xt=`base-ui-disable-scrollbar`,Zt={className:Xt,getElement(e){return(0,Q.jsx)(`style`,{nonce:e,href:Xt,precedence:`base-ui:low`,children:`.${Xt}{scrollbar-width:none}.${Xt}::-webkit-scrollbar{display:none}`})}},Qt=Z.createContext(void 0);function $t(e){let t=Z.useContext(Qt);if(t===void 0&&!e)throw Error(u(69));return t}var en=Z.createContext(void 0),tn={disableStyleElements:!1};function nn(){return Z.useContext(en)??tn}var rn={...de,...Ie},an=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:c,onOpenChangeComplete:u,setOpen:d,valueRef:f,firstItemTextRef:p,selectedItemTextRef:h,multiple:_,handleScrollArrowVisibility:y,scrollHandlerRef:x,listRef:S,highlightItemOnHover:C}=ft(),{side:w,align:ee,alignItemWithTriggerActive:T,isPositioned:D,setControlledAlignItemWithTrigger:te}=Ut(),k=$t(!0)!=null,A=pt(),j=Fe(),{nonce:N,disableStyleElements:P}=nn(),F=V(s,$.id),I=V(s,$.open),ne=V(s,$.openMethod),re=V(s,$.mounted),ie=V(s,$.popupProps),ae=V(s,$.transitionStatus),L=V(s,$.triggerElement),R=V(s,$.positionerElement),H=V(s,$.listElement),U=Z.useRef(!1),W=Z.useRef(!1),G=Z.useRef({}),oe=Oe(),K=v(e=>{if(!R||!c.current||!W.current)return;if(U.current||!T){y();return}let t=R.style.top===`0px`,n=R.style.bottom===`0px`;if(!t&&!n){y();return}let r=cn(R),i=ln(R.getBoundingClientRect().height,`y`,r),a=O(R),o=m(R),s=o.getComputedStyle(R),l=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=on(o.getComputedStyle(c.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=sn(e),g=0,_=null,v=!1,b=!1,x=e=>{R.style.height=`${e}px`},S=(t,n)=>{let r=Dt(t,0,f-i);r>0&&x(i+r),e.scrollTop=n,f-(i+r)<=1&&(U.current=!0),y()},C=t?h-p:p,w=Math.min(i+C,f);if(g=w,C<=1){S(C,t?h:0);return}if(f-w>1?t?b=!0:_=0:(v=!0,n&&p1&&(e.scrollTop=n)}(v||g>=f-1)&&(U.current=!0),y()});Z.useImperativeHandle(x,()=>K,[K]),Ce({open:I,ref:c,onComplete(){I&&u?.(!0)}});let q={open:I,transitionStatus:ae,side:w,align:ee};g(()=>{!R||!c.current||Object.keys(G.current).length||(G.current={top:R.style.top||`0`,left:R.style.left||`0`,right:R.style.right,height:R.style.height,bottom:R.style.bottom,minHeight:R.style.minHeight,maxHeight:R.style.maxHeight,marginTop:R.style.marginTop,marginBottom:R.style.marginBottom})},[c,R]),g(()=>{I||T||(W.current=!1,U.current=!1,Wt(R,G.current))},[I,T,R,c]),g(()=>{let e=c.current;if(!I||!L||!R||!e||T&&!D||s.state.transitionStatus===`ending`)return;if(!T){W.current=!0,oe.request(y),e.style.removeProperty(`--transform-origin`);return}let t=fn(e);e.style.removeProperty(`--transform-origin`);try{let t=h.current;t?.isConnected||(t=!$.hasSelectedValue(s.state)&&p.current?.isConnected?p.current:null);let n=f.current,r=m(R),i=r.getComputedStyle(R),a=r.getComputedStyle(e),o=O(L),c=cn(L),l=un(L.getBoundingClientRect(),c),u=un(R.getBoundingClientRect(),c),d=l.height,g=H||e,_=g.scrollHeight,v=parseFloat(a.borderBottomWidth),b=parseFloat(i.marginTop)||10,x=parseFloat(i.marginBottom)||10,w=parseFloat(i.minHeight)||100,ee=on(a),T=o.documentElement.clientHeight-b-x,E=o.documentElement.clientWidth,D=T-l.bottom+d,k,A=j===`rtl`?l.right-u.width:l.left,N=0;if(t&&n){let e=un(n.getBoundingClientRect(),c);k=un(t.getBoundingClientRect(),c),A=u.left+(j===`rtl`?e.right-k.right:e.left-k.left);let r=e.top-l.top+e.height/2;N=k.top-u.top+k.height/2-r}let P=D+N+x+v,F=Math.min(T,P),I=T-b-x,ne=P-F,re=E-5;R.style.left=`${Dt(A,5,re-u.width)}px`,R.style.height=`${F}px`,R.style.maxHeight=`none`,R.style.marginTop=`${b}px`,R.style.marginBottom=`${x}px`,e.style.height=`100%`;let ie=sn(g),ae=ne>=ie-1;ae&&(F=Math.min(T,u.height)-(ne-ie));let z=l.top<20||l.bottom>T-20||Math.ceil(F)+1=I?`0`:`${e}px`,R.style.height=`${F}px`,g.scrollTop=sn(g)}else R.style.bottom=`0`,g.scrollTop=ne;if(k){let t=u.top,n=u.height,r=k.top+k.height/2,i=Dt(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(V===T||F>=ee)&&(U.current=!0),y(),C&&s.state.selectedIndex===null&&s.state.activeIndex===null&&S.current[0]!=null&&s.set(`activeIndex`,0),W.current=!0}finally{t()}},[s,I,R,L,f,p,h,c,y,T,te,oe,H,S,C,j,D]),Z.useEffect(()=>{if(!T||!R||!I)return;let e=m(R);function t(e){d(!1,E(b,e))}return z(e,`resize`,t)},[d,T,R,I]);let J={...H?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":_||void 0,id:`${F}-list`},onKeyDown(e){k&&he.has(e.key)&&e.stopPropagation()},onScroll(e){H||K(e.currentTarget)},...T&&{style:H?{height:`100%`}:Gt}},se=l(`div`,e,{ref:[t,c],state:q,stateAttributesMapping:rn,props:[ie,J,me(ae),{className:!H&&T?Zt.className:void 0},o]});return(0,Q.jsxs)(Z.Fragment,{children:[!P&&Zt.getElement(N),(0,Q.jsx)(B,{context:A,modal:!1,disabled:!re,openInteractionType:ne,returnFocus:a,restoreFocus:!0,children:se})]})});function on(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function sn(e){return Ot(e.scrollHeight,e.clientHeight)}function cn(e){return ne.getScale(e)}function ln(e,t,n){return e/n[t]}function un(e,t){return pe({x:ln(e.x,`x`,t),y:ln(e.y,`y`,t),width:ln(e.width,`x`,t),height:ln(e.height,`y`,t)})}var dn=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function fn(e){let{style:t}=e,n={};for(let[e,r]of dn)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of dn){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var pn=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=ft(),{alignItemWithTriggerActive:c}=Ut(),u=V(o,$.hasScrollArrows),d=V(o,$.openMethod),f=V(o,$.multiple),p={id:`${V(o,$.id)}-list`,role:`listbox`,"aria-multiselectable":f||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:Gt},className:u&&d!==`touch`?Zt.className:void 0};return l(`div`,e,{ref:[t,v(e=>{o.set(`listElement`,e)})],props:[p,a]})}),mn=Z.createContext(void 0);function hn(){let e=Z.useContext(mn);if(!e)throw Error(u(57));return e}var gn=Z.memo(Z.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...u}=e,d=Z.useRef(null),f=Ke({label:o,textRef:d,indexGuessBehavior:Je.GuessFromOrder}),{store:p,itemProps:m,setOpen:h,setValue:v,selectionRef:y,typingRef:b,valuesRef:x,multiple:S,selectedItemTextRef:C,disabled:ee,readOnly:T}=ft(),D=V(p,$.isActive,f.index),te=V(p,$.open),O=V(p,$.isSelected,a),k=V(p,$.isSelectedByFocus,f.index),A=V(p,$.isItemEqualToValue),j=f.index,M=j!==-1,N=Z.useRef(null);g(()=>{if(!M)return;let e=x.current;return e[j]=a,()=>{delete e[j]}},[M,j,a,x]),g(()=>{if(!M)return;let e=p.state.value,t=e;S&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&ht(a,t,A)&&(p.set(`selectedIndex`,j),d.current&&(C.current=d.current))},[M,j,S,A,p,a,C]);let P=Z.useRef(null),F=Z.useRef(`mouse`),I=Z.useRef(!1),{getButtonProps:ne,buttonRef:re}=_({disabled:s,focusableWhenDisabled:!0,native:c,composite:!0}),ie={disabled:s,selected:O,highlighted:D};function ae(e){if(ee||T)return;let t=p.state.value;if(S){let n=Array.isArray(t)?t:[];v(O?vt(n,a,A):[...n,a],E(w,e))}else v(a,E(w,e)),h(!1,E(w,e))}function L(){y.current.dragY=0}let R={role:`option`,"aria-selected":O,tabIndex:te&&D?0:-1,onKeyDown(e){P.current=e.key,p.set(`activeIndex`,j),e.key===` `&&b.current&&e.preventDefault()},onClick(e){let t=e.type===`click`&&F.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Ue(e.nativeEvent)&&(n!==void 0||D),i=t&&!r&&!I.current;I.current=!1,!(e.type===`keydown`&&P.current===null)&&(s||e.type===`keydown`&&P.current===` `&&b.current||i||(P.current=null,ae(e.nativeEvent)))},onPointerEnter(e){F.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=y.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){F.current=e.pointerType,I.current=!0,L()},onMouseUp(){if(L(),s||F.current===`touch`||I.current)return;let e=!y.current.allowSelectedMouseUp&&O,t=!y.current.allowUnselectedMouseUp&&!O;e||t||(I.current=!0,N.current?.click(),I.current=!1)}},z=l(`div`,e,{ref:[re,t,f.ref,N],state:ie,props:[m,R,u,ne]}),B=Z.useMemo(()=>({selected:O,index:j,textRef:d,selectedByFocus:k,hasRegistered:M}),[O,j,d,k,M]);return(0,Q.jsx)(mn.Provider,{value:B,children:z})})),_n=Z.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=hn();return n||r?(0,Q.jsx)(vn,{...e,ref:t}):null}),vn=Z.memo(Z.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=hn(),c=Z.useRef(null),{transitionStatus:u,setMounted:d}=Pe(s),f=l(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:Ie});return Ce({open:s,ref:c,onComplete(){s||d(!1)}}),f})),yn=Z.memo(Z.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i,hasRegistered:a}=hn(),{firstItemTextRef:o,selectedItemTextRef:s}=ft(),{render:c,className:u,style:d,...f}=e;return l(`div`,e,{ref:[Z.useCallback(e=>{e&&(a&&n===0&&(o.current=e),a&&i&&(s.current=e))},[o,s,n,i,a]),t,r],props:f})})),bn=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o=!1,...s}=e,c=a===`up`,{store:u,popupRef:d,listRef:f,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:m}=ft(),{side:h,scrollDownArrowRef:_,scrollUpArrowRef:v}=Ut(),y=V(u,c?$.scrollUpArrowVisible:$.scrollDownArrowVisible),b=V(u,$.openMethod),x=y&&b!==`touch`,S=ze(),C=c?v:_,{mounted:w,transitionStatus:ee,setMounted:T}=Pe(x);g(()=>(m.current+=1,u.state.hasScrollArrows||u.set(`hasScrollArrows`,!0),()=>{m.current=Math.max(0,m.current-1),m.current===0&&u.state.hasScrollArrows&&u.set(`hasScrollArrows`,!1)}),[u,m]),Ce({open:x,ref:C,onComplete(){x||T(!1)}});let E=l(`div`,e,{ref:[t,C],state:{direction:a,visible:x,side:h,transitionStatus:ee},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||S.isStarted())return;u.set(`activeIndex`,null);function t(){let e=u.state.listElement??d.current;if(!e)return;u.set(`activeIndex`,null),p();let n=Ot(e.scrollHeight,e.clientHeight),r=kt(e.scrollTop,n),i=r===(c?0:n),a=f.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&u.set(c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i){S.clear();return}if(a.length>0){let t=C.current?.offsetHeight||0;e.scrollTop=xn(a,c,r,e.clientHeight,t,n)}S.start(40,t)}S.start(40,t)},onMouseLeave(){S.clear()}},s],stateAttributesMapping:Ie});return w||o?E:null});function xn(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return os){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?kt(l.offsetTop+l.offsetHeight-r+i,a):a}var Sn=Z.forwardRef(function(e,t){return(0,Q.jsx)(bn,{...e,ref:t,direction:`down`})}),Cn=Z.forwardRef(function(e,t){return(0,Q.jsx)(bn,{...e,ref:t,direction:`up`})}),wn=Z.createContext(void 0);function Tn(){let e=Z.useContext(wn);if(e===void 0)throw Error(u(56));return e}var En=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Z.useState(),c=Z.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),u=l(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,Q.jsx)(wn.Provider,{value:c,children:u})}),Dn=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=Tn(),c=y(a);return g(()=>{s(c)},[c,s]),l(`div`,e,{ref:t,props:[{id:c},o]})}),On=r(),kn=At;function An(e){let t=(0,On.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`scroll-my-1 p-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(En,{className:i,"data-slot":`select-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function jn(e){let t=(0,On.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`flex flex-1 text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Rt,{className:i,"data-slot":`select-value`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Mn(e){let t=(0,On.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,size:o,id:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=o===void 0?`default`:o,c;t[6]===r?c=t[7]:(c=d(`flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,r),t[6]=r,t[7]=c);let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(zt,{render:(0,Q.jsx)(p,{className:`pointer-events-none size-3.5 text-muted-foreground`})}),t[8]=l):l=t[8];let u;return t[9]!==n||t[10]!==i||t[11]!==a||t[12]!==s||t[13]!==c?(u=(0,Q.jsxs)(It,{className:c,"data-size":s,"data-slot":`select-trigger`,id:i,...a,children:[n,l]}),t[9]=n,t[10]=i,t[11]=a,t[12]=s,t[13]=c,t[14]=u):u=t[14],u}function Nn(e){let t=(0,On.c)(26),n,r,i,a,o,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8]):({className:r,children:n,side:a,sideOffset:o,align:s,alignOffset:c,alignItemWithTrigger:l,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l);let u=a===void 0?`bottom`:a,f=o===void 0?4:o,p=s===void 0?`center`:s,m=c===void 0?0:c,h=l===void 0?!0:l,g;t[9]===r?g=t[10]:(g=d(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-closed:animate-out data-open:animate-in relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100`,r),t[9]=r,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Q.jsx)(Ln,{}),t[11]=_):_=t[11];let v;t[12]===n?v=t[13]:(v=(0,Q.jsx)(pn,{children:n}),t[12]=n,t[13]=v);let y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Q.jsx)(Rn,{}),t[14]=y):y=t[14];let b;t[15]!==i||t[16]!==g||t[17]!==v?(b=(0,Q.jsxs)(an,{className:g,"data-slot":`select-content`,...i,children:[_,v,y]}),t[15]=i,t[16]=g,t[17]=v,t[18]=b):b=t[18];let x;return t[19]!==p||t[20]!==h||t[21]!==m||t[22]!==u||t[23]!==f||t[24]!==b?(x=(0,Q.jsx)(Vt,{children:(0,Q.jsx)(Yt,{align:p,alignItemWithTrigger:h,alignOffset:m,className:`isolate z-50`,side:u,sideOffset:f,children:b})}),t[19]=p,t[20]=h,t[21]=m,t[22]=u,t[23]=f,t[24]=b,t[25]=x):x=t[25],x}function Pn(e){let t=(0,On.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`px-2 py-1.5 text-xs text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Dn,{className:i,"data-slot":`select-label`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fn(e){let t=(0,On.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=d(`relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=(0,Q.jsx)(yn,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:n}),t[6]=n,t[7]=o);let s;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(_n,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`}),children:(0,Q.jsx)(f,{className:`pointer-events-none`})}),t[8]=s):s=t[8];let c;return t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Q.jsxs)(gn,{className:a,"data-slot":`select-item`,...i,children:[o,s]}),t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function In(e){let t=(0,On.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`pointer-events-none -mx-1 my-1 h-px bg-border/50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(A,{className:i,"data-slot":`select-separator`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ln(e){let t=(0,On.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(Ye,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,Q.jsx)(Cn,{className:i,"data-slot":`select-scroll-up-button`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function Rn(e){let t=(0,On.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(p,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,Q.jsx)(Sn,{className:i,"data-slot":`select-scroll-down-button`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}export{Pn as a,jn as c,Fn as i,Nn as n,In as o,An as r,Mn as s,kn as t}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{a as i,c as a,f as o,i as s,l as c,n as l,u}from"./dist.js";import{Lt as d}from"./auth.js";import{t as f}from"./check.js";import{t as p}from"./chevron-down.js";import{_ as m,b as h,o as g,r as _,s as v}from"./button.js";import{S as y,_ as b,b as x,f as S,g as C,l as w,n as ee,o as T,t as E,u as D,v as te,x as O,y as k}from"./createBaseUIEventDetails.js";import{$n as A,Ar as j,Bn as M,Cr as N,Dr as P,Er as F,Fn as I,Fr as ne,Gn as re,Hn as ie,In as L,Ir as R,Jn as ae,Kn as z,Ln as B,Lr as V,Mn as H,Mr as U,Nn as oe,Nr as W,Or as G,Pn as K,Pr as se,Qn as q,Rn as ce,Rr as J,Sn as le,Sr as Y,Tr as ue,Un as de,Vn as fe,Wn as pe,Yr as me,_r as he,ar as ge,br as _e,cn as ve,dr as ye,er as be,fn as xe,fr as Se,gr as Ce,hn as we,hr as Te,ir as Ee,jn as De,jr as Oe,kr as ke,ln as Ae,lr as X,mn as je,mr as Me,on as Ne,or as Pe,pr as Fe,qn as Ie,rr as Le,sn as Re,tr as ze,vr as Be,wr as Ve,xr as He,yr as Ue,zn as We}from"./index.js";import{i as Ge,n as Ke,r as qe,t as Je}from"./useCompositeListItem.js";var Ye=me(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Z=t(n(),1);function Xe(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:a=!0,ignoreMouse:o=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=C}=t,u=`rootStore`in e?e.rootStore:e,d=u.context.dataRef,f=Z.useRef(void 0),p=ye(),m=Se(),h=Z.useMemo(()=>{function e(e,t,n,r){let i=E(l,t,n);e&&r===`touch`&&c>0?m.start(c,()=>{u.setOpen(!0,i)}):u.setOpen(e,i)}function t(e,t,n){let r=d.current.openEvent,i=u.select(`domReferenceElement`)!==t;return e&&i||!e||!a?!0:r&&s?!n(r.type):!1}return{onPointerDown(e){f.current=e.pointerType},onMouseDown(n){let i=f.current,a=n.nativeEvent,s=u.select(`open`);if(n.button!==0||r===`click`||_e(i,!0)&&o)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),l=x(a);if(F(l)){e(c,a,l,i);return}let d=n.currentTarget;p.request(()=>{e(c,a,d,i)})},onClick(n){if(r===`mousedown-only`)return;let i=f.current;if(r===`mousedown`&&i){f.current=void 0;return}_e(i,!0)&&o||e(t(u.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){f.current=void 0}}},[d,r,o,l,u,s,a,p,m,c]);return Z.useMemo(()=>n?{reference:h}:i,[n,h])}var Ze=`Escape`;function Qe(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function $e(e,t){return Qe(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function et(e,t,n){return Qe(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function tt(e,t,n){return Qe(t,n?e===G:e===ke,e===P)}function nt(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===Ze:Qe(t,n?e===ke:e===G,e===j)}function rt(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:_=void 0,orientation:y=`vertical`,parentOrientation:b,id:S,resetOnPointerLeave:C=!0,externalTree:w,grid:ee}=t,A=ee!=null,j=`rootStore`in e?e.rootStore:e,P=j.useState(`open`),F=j.useState(`floatingElement`),I=j.useState(`domReferenceElement`),ne=j.context.dataRef,re=Ve(F),ie=ue(I),L=Ie(re),R=M(),ae=fe(w),z=Z.useRef(f),B=Z.useRef(o??-1),V=Z.useRef(null),H=Z.useRef(!0),U=v(e=>{i(B.current===-1?null:B.current,e)}),oe=Z.useRef(!!F),W=Z.useRef(P),G=Z.useRef(!1),K=Z.useRef(!1),se=Z.useRef(null),q=Ie(_),ce=Ie(P),J=Ie(o),le=Ie(C),de=ye(),me=ye(),ge=v(()=>{function e(e){d?ae?.events.emit(`virtualfocus`,e):se.current=pe(e,{sync:G.current,preventScroll:!0})}let t=n.current[B.current],r=K.current;t&&e(t),(G.current?e=>e():e=>de.request(e))(()=>{let i=n.current[B.current]||t;i&&(t||e(i),Ce&&(r||!H.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});g(()=>{ne.current.orientation=y},[ne,y]),g(()=>{a&&(P&&F?(B.current=o??-1,z.current&&o!=null&&(K.current=!0,U())):oe.current&&(B.current=-1,U()))},[a,P,F,o,U]),g(()=>{if(a){if(!P){G.current=!1;return}if(F)if(r==null){if(G.current=!1,J.current!=null)return;if(oe.current&&(B.current=-1,ge()),(!W.current||!oe.current)&&z.current&&(V.current!=null||z.current===!0&&V.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>me.request(e):queueMicrotask)(t),e+=1):(B.current=V.current==null||et(V.current,y,u)||l?Te(n):Me(n),V.current=null,U())};t()}}else he(n.current,r)||(B.current=r,ge(),K.current=!1)}},[a,P,F,r,J,l,n,y,u,U,ge,me]),g(()=>{if(!a||F||!ae||d||!oe.current)return;let e=ae.nodesRef.current,t=e.find(e=>e.id===R)?.context?.elements.floating,n=te(O(I??t??null)),r=e.some(e=>e.context&&k(e.context.elements.floating,n));t&&!r&&H.current&&t.focus({preventScroll:!0})},[a,F,I,ae,R,d]),g(()=>{W.current=P,oe.current=!!F}),g(()=>{P||(V.current=null,z.current=f)},[P,f]);let _e=r!=null,ve=v(e=>{if(!ce.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(B.current!==t||r!==t)&&(B.current=t,U(e))}),be=v(()=>b??ae?.nodesRef.current.find(e=>e.id===R)?.context?.dataRef?.current.orientation),xe=v(()=>Te(n,q.current)),Se=v(e=>{if(H.current=!1,G.current=!0,e.which===229||!ce.current&&e.currentTarget===L.current)return;if(l&&nt(e.key,y,u,A)){$e(e.key,be())||N(e),j.setOpen(!1,E(D,e.nativeEvent)),h(I)&&(d?ae?.events.emit(`virtualfocus`,I):I.focus());return}let t=B.current,r=Te(n,_),i=Me(n,_);if(ie||(e.key===`Home`&&(N(e),B.current=r,U(e)),e.key===`End`&&(N(e),B.current=i,U(e))),ee!=null){let t=ee(e,B.current,n,y,c,u,_,r,i);if(t!=null&&(B.current=t,U(e)),y===`both`)return}if($e(e.key,y)){if(N(e),P&&!d&&te(e.currentTarget.ownerDocument)===e.currentTarget){B.current=et(e.key,y,u)?r:i,U(e);return}et(e.key,y,u)?c?t>=i?s&&t!==n.current.length?B.current=-1:(G.current=!1,B.current=r):B.current=Fe(n.current,{startingIndex:t,disabledIndices:_}):B.current=Math.min(i,Fe(n.current,{startingIndex:t,disabledIndices:_})):c?t<=r?s&&t!==-1?B.current=n.current.length:(G.current=!1,B.current=i):B.current=Fe(n.current,{startingIndex:t,decrement:!0,disabledIndices:_}):B.current=Math.max(r,Fe(n.current,{startingIndex:t,decrement:!0,disabledIndices:_})),he(n.current,B.current)&&(B.current=-1),U(e)}}),Ce=Z.useMemo(()=>({onFocus(e){G.current=!0,ve(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){G.current=!0,K.current=!1,p&&ve(e)},onPointerLeave(e){if(!ce.current||!H.current||e.pointerType===`touch`)return;G.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&le.current&&(se.current?.(),se.current=null,B.current=-1,U(e),!d)){let e=L.current,t=te(O(e));e&&k(e,t)&&e.focus({preventScroll:!0})}}}),[ve,ce,L,p,n,U,le,d]),we=Z.useMemo(()=>d&&P&&_e&&{"aria-activedescendant":`${S}-${r}`},[d,P,_e,S,r]),Ee=Z.useMemo(()=>({"aria-orientation":y===`both`?void 0:y,...ie?{}:we,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&P&&!d){let t=x(e.nativeEvent);if(t&&!k(L.current,t))return;N(e),j.setOpen(!1,E(T,e.nativeEvent)),h(I)&&I.focus();return}Se(e)},onPointerMove(){H.current=!0}}),[we,Se,L,y,ie,j,P,d,I]),De=Z.useMemo(()=>{function e(e){j.setOpen(!0,E(D,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&He(e.nativeEvent)&&(z.current=!d)}function n(e){z.current=f,f===`auto`&&Y(e.nativeEvent)&&(z.current=!0)}return{onKeyDown(t){let n=j.select(`open`);H.current=!1;let r=t.key.startsWith(`Arrow`),i=tt(t.key,be(),u),a=$e(t.key,y),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return Se(t);if(!(!n&&!m&&r)){if(o){let e=$e(t.key,be());V.current=l&&e?null:t.key}if(l){i&&(N(t),n?(B.current=xe(),U(t)):e(t));return}a&&(J.current!=null&&(B.current=J.current),N(t),!n&&m?e(t):Se(t),n&&U(t))}},onFocus(e){j.select(`open`)&&!d&&(B.current=-1,U(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[Se,f,xe,l,U,j,m,y,be,u,J,d]),Oe=Z.useMemo(()=>({...we,...De}),[we,De]);return Z.useMemo(()=>a?{reference:Oe,floating:Ee,item:Ce,trigger:De}:{},[a,Oe,Ee,De,Ce])}function it(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:c,enabled:l=!0,resetMs:u=750,selectedIndex:d=null}=t,f=`rootStore`in e?e.rootStore:e,p=f.useState(`open`),m=Se(),h=Z.useRef(``),_=Z.useRef(d??i??-1),y=Z.useRef(null),b=v(e=>{function t(e){let t=r?.current[e];return!t||Ce(t)}function l(e){return t(e)?o==null||!Be(s,e,o):!1}function f(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t0&&e.key===` `&&(N(e),c?.(!0)),h.current.length>0&&h.current[0]!==` `&&f(g,h.current)===-1&&e.key!==` `&&c?.(!1),g==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;p&&e.key!==` `&&(N(e),c?.(!0));let v=h.current===``;v&&(_.current=d??i??-1),g.every((e,t)=>e&&l(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&h.current===e.key&&(h.current=``,_.current=y.current),h.current+=e.key,m.start(u,()=>{h.current=``,_.current=y.current,c?.(!1)});let b=((v?d??i??-1:_.current)??0)+1,x=f(g,h.current,b);x===-1?e.key!==` `&&(h.current=``,c?.(!1)):(a?.(x),y.current=x)}),x=v(e=>{let t=e.relatedTarget,n=f.select(`domReferenceElement`),r=f.select(`floatingElement`);k(n,t)||k(r,t)||(m.clear(),h.current=``,_.current=y.current,c?.(!1))});g(()=>{!p&&d!==null||(m.clear(),y.current=null,h.current!==``&&(h.current=``))},[p,d,m]),g(()=>{p&&h.current===``&&(_.current=d??i??-1)},[p,d,i]);let S=Z.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return Z.useMemo(()=>l?{reference:S,floating:S}:{},[l,S])}var Q=e();function at(e){let t=Z.useRef(``),n=Z.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Z.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function ot(e,t){let n=Z.useRef(e),r=v(t);g(()=>{n.current!==e&&r(n.current)},[e,r]),g(()=>{n.current=e},[e])}function st(e,t){let{onClick:n,onPointerDown:r}=at(v((n,r)=>{(typeof e==`function`?e():e)||t(r||(W?`touch`:``))}));return Z.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function ct(e){let[t,n]=Z.useState(null),r=st(e,n);return ot(e,t=>{t&&!e&&n(null)}),Z.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function lt(e){let[t,n]=Z.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}var ut=Z.createContext(null),dt=Z.createContext(null);function ft(){let e=Z.useContext(ut);if(e===null)throw Error(u(60));return e}function pt(){let e=Z.useContext(dt);if(e===null)throw Error(u(61));return e}var mt=(e,t)=>Object.is(e,t);function ht(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function gt(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:ht(t,e,n))}function _t(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:ht(e,t,n))}function vt(e,t,n){return e.filter(e=>!ht(t,e,n))}function yt(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function bt(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function xt(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(bt(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function St(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return yt(e)}function Ct(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?yt(e.value):yt(e)}function wt(e,t,n){function r(){return St(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=bt(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Tt(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(Z.Fragment,{children:wt(r,t,n)},i)),e),[])}var $={id:I(e=>e.id),labelId:I(e=>e.labelId),modal:I(e=>e.modal),multiple:I(e=>e.multiple),items:I(e=>e.items),itemToStringLabel:I(e=>e.itemToStringLabel),itemToStringValue:I(e=>e.itemToStringValue),isItemEqualToValue:I(e=>e.isItemEqualToValue),value:I(e=>e.value),hasSelectedValue:I(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Ct(t,r)!==``}),hasNullItemLabel:I((e,t)=>t?xt(e.items):!1),open:I(e=>e.open),mounted:I(e=>e.mounted),forceMount:I(e=>e.forceMount),transitionStatus:I(e=>e.transitionStatus),openMethod:I(e=>e.openMethod),activeIndex:I(e=>e.activeIndex),selectedIndex:I(e=>e.selectedIndex),isActive:I((e,t)=>e.activeIndex===t),isSelected:I((e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>ht(t,e,n)):ht(t,r,n)}),isSelectedByFocus:I((e,t)=>e.selectedIndex===t),popupProps:I(e=>e.popupProps),triggerProps:I(e=>e.triggerProps),triggerElement:I(e=>e.triggerElement),positionerElement:I(e=>e.positionerElement),listElement:I(e=>e.listElement),popupSide:I(e=>e.popupSide),scrollUpArrowVisible:I(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:I(e=>e.scrollDownArrowVisible),hasScrollArrows:I(e=>e.hasScrollArrows)};function Et(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function Dt(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Ot(e,t){return Math.max(0,e-t)}function kt(e,t){if(t<=0)return 0;let n=Dt(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function At(e){let{id:t,value:n,defaultValue:r=null,onValueChange:l,open:u,defaultOpen:d=!1,onOpenChange:f,name:p,form:m,autoComplete:h,disabled:_=!1,readOnly:y=!1,required:b=!1,modal:x=!0,actionsRef:C,inputRef:w,onOpenChangeComplete:ee,items:T,multiple:D=!1,itemToStringLabel:te,itemToStringValue:O,isItemEqualToValue:k=mt,highlightItemOnHover:A=!0,children:j}=e,{clearErrors:M}=R(),{setDirty:N,setTouched:P,setFocused:F,validityData:I,setFilled:ne,name:ie,disabled:ae,validation:B,validationMode:U}=V(),W=se({id:t}),G=ae||_,q=ie??p,[J,le]=Ee({controlled:n,default:D?r??s:r,name:`Select`,state:`value`}),[Y,ue]=Ee({controlled:u,default:d,name:`Select`,state:`open`}),de=Z.useRef([]),fe=Z.useRef([]),pe=Z.useRef(null),me=Z.useRef(null),he=Z.useRef(0),_e=Z.useRef(null),ve=Z.useRef([]),ye=Z.useRef(!1),be=Z.useRef(null),xe=Z.useRef(null),Se=Z.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Ce=Z.useRef(!1),{mounted:we,setMounted:Te,transitionStatus:Oe}=ge(Y),{openMethod:ke,triggerProps:Ae}=ct(Y),X=c(()=>new oe({id:W,labelId:void 0,modal:x,multiple:D,itemToStringLabel:te,itemToStringValue:O,isItemEqualToValue:k,value:J,open:Y,mounted:we,transitionStatus:Oe,items:T,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,je=K(X,$.activeIndex),Me=K(X,$.selectedIndex),Ne=K(X,$.triggerElement),Fe=K(X,$.positionerElement),Re=lt(ke),ze=ke??Re??null,Be=Z.useMemo(()=>D?``:Ct(J,O),[D,J,O]),Ve=Z.useMemo(()=>D&&Array.isArray(J)?J.map(e=>Ct(e,O)):Ct(J,O),[D,J,O]);Le(Ie(X.state.triggerElement),W,J,v(()=>Ve),!G,p);let He=Z.useRef(J),Ue=D?Array.isArray(J)&&J.length>0:J!=null&&Ct(J,O)!==``;g(()=>{J!==He.current&&X.set(`forceMount`,!0)},[X,J]),g(()=>{ne(Ue)},[Ue,ne]),g(function(){let e=ve.current,t;if(D){let n=Array.isArray(J)?J:[];if(n.length===0)t=null;else{let r=n[n.length-1],i=_t(e,r,k);t=i===-1?null:i}}else{let n=_t(e,J,k);t=n===-1?null:n}t===null&&(xe.current=null),!Y&&X.set(`selectedIndex`,t)},[Ue,D,Y,J,ve,k,X,xe]);function We(e){let t=I.initialValue;return Array.isArray(e)&&Array.isArray(t)?!Et(e,t,(e,t)=>ht(e,t,k)):e!==t}ot(J,()=>{M(q),N(We(J)),B.change(J)});let Ke=v((e,t)=>{f?.(e,t),!t.isCanceled&&(ue(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(P(!0),F(!1),U===`onBlur`&&B.commit(J)))}),qe=v(()=>{Te(!1),X.update({activeIndex:null,openMethod:null}),ee?.(!1)});Pe({enabled:!C,open:Y,ref:pe,onComplete(){Y||qe()}}),Z.useImperativeHandle(C,()=>({unmount:qe}),[qe]);let Je=v((e,t)=>{l?.(e,t),!t.isCanceled&&le(e)}),Ye=v(()=>{let e=X.state.listElement||pe.current;if(!e)return;let t=Ot(e.scrollHeight,e.clientHeight),n=kt(e.scrollTop,t),r=n>0,i=nGe(de.current[e]),onMatch(e){Y?X.set(`activeIndex`,e):Je(ve.current[e],E(`none`))},onTyping(e){ye.current=e}}),nt=Z.useMemo(()=>{let e=o(tt.reference,et.reference,$e.reference,Qe.reference,Ae);return W&&(e.id=W),e},[Qe.reference,tt.reference,et.reference,$e.reference,Ae,W]),at=Z.useMemo(()=>o(H,tt.floating,et.floating,$e.floating),[tt.floating,et.floating,$e.floating]),st=et.item??i;L(()=>{X.update({popupProps:at,triggerProps:nt})}),g(()=>{X.update({id:W,modal:x,multiple:D,value:J,open:Y,mounted:we,transitionStatus:Oe,popupProps:at,triggerProps:nt,items:T,itemToStringLabel:te,itemToStringValue:O,isItemEqualToValue:k,openMethod:ze})},[X,W,x,D,J,Y,we,Oe,at,nt,T,te,O,k,ze]);let ft=Z.useMemo(()=>({store:X,name:q,required:b,disabled:G,readOnly:y,multiple:D,highlightItemOnHover:A,setValue:Je,setOpen:Ke,listRef:de,popupRef:pe,scrollHandlerRef:me,handleScrollArrowVisibility:Ye,scrollArrowsMountedCountRef:he,itemProps:st,valueRef:_e,valuesRef:ve,labelsRef:fe,typingRef:ye,selectionRef:Se,firstItemTextRef:be,selectedItemTextRef:xe,validation:B,onOpenChangeComplete:ee,alignItemWithTriggerActiveRef:Ce,initialValueRef:He}),[X,q,b,G,y,D,A,Je,Ke,st,B,ee,Ye]),pt=a(w,B.inputRef),gt=D&&Array.isArray(J)&&J.length>0,vt=D?void 0:q,yt=Z.useMemo(()=>!D||!Array.isArray(J)||!q?null:J.map(e=>{let t=Ct(e,O);return(0,Q.jsx)(`input`,{type:`hidden`,form:m,name:q,value:t,disabled:G},t)}),[D,J,m,q,O,G]);return(0,Q.jsx)(ut.Provider,{value:ft,children:(0,Q.jsxs)(dt.Provider,{value:Ze,children:[j,(0,Q.jsx)(`input`,{...B.getValidationProps(G,{onFocus(){X.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||G||y)return;let t=e.currentTarget.value,n=E(S,e.nativeEvent);function r(){if(D)return;let e=t.toLowerCase(),r=ve.current.findIndex(t=>Ct(t,O).toLowerCase()===e||St(t,te).toLowerCase()===e);r===-1&&(r=ve.current.findIndex((t,n)=>{let r=fe.current[n];return r!=null&&r.toLowerCase()===e}));let i=r===-1?void 0:ve.current[r];i!=null&&Je(i,n)}X.set(`forceMount`,!0),queueMicrotask(r)}}),id:W&&vt==null?`${W}-hidden-input`:void 0,form:m,name:vt,autoComplete:h,value:Be,disabled:G,required:b&&!gt,readOnly:y,ref:pt,style:q?z:re,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),yt]})})}function jt(e,t){return e??t}function Mt(e){let t=e.getBoundingClientRect(),n=m(e);if(Oe)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var Nt=2,Pt=400,Ft={...A,...J,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},It=Z.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:s=!0,style:c,...u}=e,{setTouched:d,setFocused:f,validationMode:p,state:m,disabled:h}=V(),{labelId:g}=ne(),{store:y,setOpen:b,selectionRef:x,validation:C,readOnly:w,required:T,alignItemWithTriggerActiveRef:D,disabled:te}=ft(),A=h||te||a,j=K(y,$.open),M=K(y,$.mounted),N=K(y,$.value),P=K(y,$.triggerProps),F=K(y,$.positionerElement),I=K(y,$.listElement),re=K(y,$.popupSide),ie=K(y,$.id),L=K(y,$.labelId),R=K(y,$.hasSelectedValue),ae=M&&F?re:null,z=i??ie,B=jt(g,L);se({id:z});let H=Ie(F),U=Z.useRef(null),{getButtonProps:oe,buttonRef:W}=_({disabled:A,native:s}),G=v(e=>{y.set(`triggerElement`,e)}),q=Se(),ce=Se(),J=Se();Z.useEffect(()=>{if(j)return J.start(Pt,()=>{x.current.allowUnselectedMouseUp=!0,x.current.allowSelectedMouseUp=!0}),()=>{J.clear()};x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ce.clear()},[j,x,ce,J]);let le=o(P,{id:z,role:`combobox`,"aria-expanded":j?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":j?I?.id??Ve(F)?.id:void 0,"aria-labelledby":B,"aria-readonly":w||void 0,"aria-required":T||void 0,tabIndex:A?-1:0,onFocus(e){f(!0),j&&D.current&&b(!1,E(S,e.nativeEvent)),q.start(0,()=>{y.set(`forceMount`,!0)})},onBlur(e){k(F,e.relatedTarget)||(d(!0),f(!1),p===`onBlur`&&C.commit(N))},onMouseDown(e){if(j)return;let t=O(e.currentTarget);function n(e){if(!U.current)return;let t=e.target;if(k(U.current,t)||k(H.current,t))return;let n=Mt(U.current);e.clientX>=n.left-Nt&&e.clientX<=n.right+Nt&&e.clientY>=n.top-Nt&&e.clientY<=n.bottom+Nt||b(!1,E(ee,e))}ce.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},u,oe),Y=C.getValidationProps(A,le);Y.role=`combobox`;let ue={...m,open:j,disabled:A,value:N,readOnly:w,popupSide:ae,placeholder:!R};return l(`button`,e,{ref:[t,U,W,G],state:ue,stateAttributesMapping:Ft,props:Y})}),Lt={value:()=>null},Rt=Z.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:u}=ft(),d=K(c,$.value),f=K(c,$.items),p=K(c,$.itemToStringLabel),m=K(c,$.hasSelectedValue),h=!m&&a!=null&&i==null,g=K(c,$.hasNullItemLabel,h),_={value:d,placeholder:!m},v=null;return v=typeof i==`function`?i(d):i??(!m&&a!=null&&!g?a:Array.isArray(d)?Tt(d,f,p):wt(d,f,p)),l(`span`,e,{state:_,ref:[t,u],props:[{children:v},s],stateAttributesMapping:Lt})}),zt=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=ft();return l(`span`,e,{state:{open:K(o,$.open)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:be})}),Bt=Z.createContext(void 0),Vt=Z.forwardRef(function(e,t){let{store:n}=ft(),r=K(n,$.mounted),i=K(n,$.forceMount);return r||i?(0,Q.jsx)(Bt.Provider,{value:!0,children:(0,Q.jsx)(ie,{ref:t,...e})}):null}),Ht=Z.createContext(void 0);function Ut(){let e=Z.useContext(Ht);if(!e)throw Error(u(59));return e}function Wt(e,t){e&&Object.assign(e.style,t)}var Gt={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Kt=20;function qt(e,t,n,r){let[i,a]=Z.useState(!1);g(()=>{if(!e||!t||n==null){a(!1);return}let r=O(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Kt)},[e,t,n]),xe(e&&(!t||i),r)}var Jt={position:`fixed`},Yt=Z.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:_=de,style:y,...b}=e,{store:x,listRef:C,labelsRef:w,alignItemWithTriggerActiveRef:ee,selectedItemTextRef:T,valuesRef:D,initialValueRef:te,popupRef:O,setValue:k}=ft(),A=pt(),j=K(x,$.open),M=K(x,$.mounted),N=K(x,$.modal),P=K(x,$.value),F=K(x,$.openMethod),I=K(x,$.positionerElement),ne=K(x,$.triggerElement),re=K(x,$.isItemEqualToValue),ie=K(x,$.transitionStatus),L=Z.useRef(null),R=Z.useRef(null),[ae,z]=Z.useState(h),B=M&&ae&&F!==`touch`;!M&&ae!==h&&z(h),g(()=>{M||($.scrollUpArrowVisible(x.state)&&x.set(`scrollUpArrowVisible`,!1),$.scrollDownArrowVisible(x.state)&&x.set(`scrollDownArrowVisible`,!1))},[x,M]),Z.useImperativeHandle(ee,()=>B),qt((B||N)&&j,F===`touch`,I,ne);let V=ve({anchor:n,floatingRootContext:A,positionMethod:r,mounted:M,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??B,collisionAvoidance:_,keepMounted:!0}),H=B?`none`:V.side,U=B?Jt:V.positionerStyles,oe={open:j,side:H,align:V.align,anchorHidden:V.anchorHidden};g(()=>{x.set(`popupSide`,V.side)},[x,V.side]);let W=Ne(e,oe,{styles:U,transitionStatus:ie,props:b,refs:[t,v(e=>{x.set(`positionerElement`,e)})],hidden:!M,inert:!j}),G=Z.useRef(0),se=v(e=>{if(e.size===0&&G.current===0||D.current.length===0)return;let t=G.current;if(G.current=e.size,e.size===t)return;let n=E(S);if(t!==0&&!x.state.multiple&&P!==null&&_t(D.current,P,re)===-1){let e=te.current,t=e!=null&&_t(D.current,e,re)!==-1?e:null;k(t,n),t===null&&(x.set(`selectedIndex`,null),T.current=null)}if(t!==0&&x.state.multiple&&Array.isArray(P)){let e=e=>_t(D.current,e,re)!==-1,t=P.filter(t=>e(t));(t.length!==P.length||t.some(e=>!gt(P,e,re)))&&(k(t,n),t.length===0&&(x.set(`selectedIndex`,null),T.current=null))}if(j&&B){x.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Wt(I,e),Wt(O.current,e)}}),q=Z.useMemo(()=>({...V,side:H,alignItemWithTriggerActive:B,setControlledAlignItemWithTrigger:z,scrollUpArrowRef:L,scrollDownArrowRef:R}),[V,H,B,z]);return(0,Q.jsx)(qe,{elementsRef:C,labelsRef:w,onMapChange:se,children:(0,Q.jsxs)(Ht.Provider,{value:q,children:[M&&N&&(0,Q.jsx)(je,{inert:we(!j),cutout:ne}),W]})})}),Xt=`base-ui-disable-scrollbar`,Zt={className:Xt,getElement(e){return(0,Q.jsx)(`style`,{nonce:e,href:Xt,precedence:`base-ui:low`,children:`.${Xt}{scrollbar-width:none}.${Xt}::-webkit-scrollbar{display:none}`})}},Qt=Z.createContext(void 0);function $t(e){let t=Z.useContext(Qt);if(t===void 0&&!e)throw Error(u(69));return t}var en=Z.createContext(void 0),tn={disableStyleElements:!1};function nn(){return Z.useContext(en)??tn}var rn={...q,...X},an=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s,popupRef:c,onOpenChangeComplete:u,setOpen:d,valueRef:f,firstItemTextRef:p,selectedItemTextRef:h,multiple:_,handleScrollArrowVisibility:y,scrollHandlerRef:x,listRef:S,highlightItemOnHover:C}=ft(),{side:w,align:ee,alignItemWithTriggerActive:T,isPositioned:D,setControlledAlignItemWithTrigger:te}=Ut(),k=$t(!0)!=null,A=pt(),j=Ae(),{nonce:M,disableStyleElements:N}=nn(),P=K(s,$.id),F=K(s,$.open),I=K(s,$.openMethod),ne=K(s,$.mounted),re=K(s,$.popupProps),ie=K(s,$.transitionStatus),L=K(s,$.triggerElement),R=K(s,$.positionerElement),z=K(s,$.listElement),B=Z.useRef(!1),V=Z.useRef(!1),H=Z.useRef({}),oe=ye(),W=v(e=>{if(!R||!c.current||!V.current)return;if(B.current||!T){y();return}let t=R.style.top===`0px`,n=R.style.bottom===`0px`;if(!t&&!n){y();return}let r=cn(R),i=ln(R.getBoundingClientRect().height,`y`,r),a=O(R),o=m(R),s=o.getComputedStyle(R),l=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=on(o.getComputedStyle(c.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=sn(e),g=0,_=null,v=!1,b=!1,x=e=>{R.style.height=`${e}px`},S=(t,n)=>{let r=Dt(t,0,f-i);r>0&&x(i+r),e.scrollTop=n,f-(i+r)<=1&&(B.current=!0),y()},C=t?h-p:p,w=Math.min(i+C,f);if(g=w,C<=1){S(C,t?h:0);return}if(f-w>1?t?b=!0:_=0:(v=!0,n&&p1&&(e.scrollTop=n)}(v||g>=f-1)&&(B.current=!0),y()});Z.useImperativeHandle(x,()=>W,[W]),Pe({open:F,ref:c,onComplete(){F&&u?.(!0)}});let G={open:F,transitionStatus:ie,side:w,align:ee};g(()=>{!R||!c.current||Object.keys(H.current).length||(H.current={top:R.style.top||`0`,left:R.style.left||`0`,right:R.style.right,height:R.style.height,bottom:R.style.bottom,minHeight:R.style.minHeight,maxHeight:R.style.maxHeight,marginTop:R.style.marginTop,marginBottom:R.style.marginBottom})},[c,R]),g(()=>{F||T||(V.current=!1,B.current=!1,Wt(R,H.current))},[F,T,R,c]),g(()=>{let e=c.current;if(!F||!L||!R||!e||T&&!D||s.state.transitionStatus===`ending`)return;if(!T){V.current=!0,oe.request(y),e.style.removeProperty(`--transform-origin`);return}let t=fn(e);e.style.removeProperty(`--transform-origin`);try{let t=h.current;t?.isConnected||(t=!$.hasSelectedValue(s.state)&&p.current?.isConnected?p.current:null);let n=f.current,r=m(R),i=r.getComputedStyle(R),a=r.getComputedStyle(e),o=O(L),c=cn(L),l=un(L.getBoundingClientRect(),c),u=un(R.getBoundingClientRect(),c),d=l.height,g=z||e,_=g.scrollHeight,v=parseFloat(a.borderBottomWidth),b=parseFloat(i.marginTop)||10,x=parseFloat(i.marginBottom)||10,w=parseFloat(i.minHeight)||100,ee=on(a),T=o.documentElement.clientHeight-b-x,E=o.documentElement.clientWidth,D=T-l.bottom+d,k,A=j===`rtl`?l.right-u.width:l.left,M=0;if(t&&n){let e=un(n.getBoundingClientRect(),c);k=un(t.getBoundingClientRect(),c),A=u.left+(j===`rtl`?e.right-k.right:e.left-k.left);let r=e.top-l.top+e.height/2;M=k.top-u.top+k.height/2-r}let N=D+M+x+v,P=Math.min(T,N),F=T-b-x,I=N-P,ne=E-5;R.style.left=`${Dt(A,5,ne-u.width)}px`,R.style.height=`${P}px`,R.style.maxHeight=`none`,R.style.marginTop=`${b}px`,R.style.marginBottom=`${x}px`,e.style.height=`100%`;let re=sn(g),ie=I>=re-1;ie&&(P=Math.min(T,u.height)-(I-re));let ae=l.top<20||l.bottom>T-20||Math.ceil(P)+1=F?`0`:`${e}px`,R.style.height=`${P}px`,g.scrollTop=sn(g)}else R.style.bottom=`0`,g.scrollTop=I;if(k){let t=u.top,n=u.height,r=k.top+k.height/2,i=Dt(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(W===T||P>=ee)&&(B.current=!0),y(),C&&s.state.selectedIndex===null&&s.state.activeIndex===null&&S.current[0]!=null&&s.set(`activeIndex`,0),V.current=!0}finally{t()}},[s,F,R,L,f,p,h,c,y,T,te,oe,z,S,C,j,D]),Z.useEffect(()=>{if(!T||!R||!F)return;let e=m(R);function t(e){d(!1,E(b,e))}return ae(e,`resize`,t)},[d,T,R,F]);let se={...z?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":_||void 0,id:`${P}-list`},onKeyDown(e){k&&le.has(e.key)&&e.stopPropagation()},onScroll(e){z||W(e.currentTarget)},...T&&{style:z?{height:`100%`}:Gt}},q=l(`div`,e,{ref:[t,c],state:G,stateAttributesMapping:rn,props:[re,se,Re(ie),{className:!z&&T?Zt.className:void 0},o]});return(0,Q.jsxs)(Z.Fragment,{children:[!N&&Zt.getElement(M),(0,Q.jsx)(We,{context:A,modal:!1,disabled:!ne,openInteractionType:I,returnFocus:a,restoreFocus:!0,children:q})]})});function on(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function sn(e){return Ot(e.scrollHeight,e.clientHeight)}function cn(e){return B.getScale(e)}function ln(e,t,n){return e/n[t]}function un(e,t){return Ue({x:ln(e.x,`x`,t),y:ln(e.y,`y`,t),width:ln(e.width,`x`,t),height:ln(e.height,`y`,t)})}var dn=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function fn(e){let{style:t}=e,n={};for(let[e,r]of dn)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of dn){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var pn=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s}=ft(),{alignItemWithTriggerActive:c}=Ut(),u=K(o,$.hasScrollArrows),d=K(o,$.openMethod),f=K(o,$.multiple),p={id:`${K(o,$.id)}-list`,role:`listbox`,"aria-multiselectable":f||void 0,onScroll(e){s.current?.(e.currentTarget)},...c&&{style:Gt},className:u&&d!==`touch`?Zt.className:void 0};return l(`div`,e,{ref:[t,v(e=>{o.set(`listElement`,e)})],props:[p,a]})}),mn=Z.createContext(void 0);function hn(){let e=Z.useContext(mn);if(!e)throw Error(u(57));return e}var gn=Z.memo(Z.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...u}=e,d=Z.useRef(null),f=Ke({label:o,textRef:d,indexGuessBehavior:Je.GuessFromOrder}),{store:p,itemProps:m,setOpen:h,setValue:v,selectionRef:y,typingRef:b,valuesRef:x,multiple:S,selectedItemTextRef:C,disabled:ee,readOnly:T}=ft(),D=K(p,$.isActive,f.index),te=K(p,$.open),O=K(p,$.isSelected,a),k=K(p,$.isSelectedByFocus,f.index),A=K(p,$.isItemEqualToValue),j=f.index,M=j!==-1,N=Z.useRef(null);g(()=>{if(!M)return;let e=x.current;return e[j]=a,()=>{delete e[j]}},[M,j,a,x]),g(()=>{if(!M)return;let e=p.state.value,t=e;S&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&ht(a,t,A)&&(p.set(`selectedIndex`,j),d.current&&(C.current=d.current))},[M,j,S,A,p,a,C]);let P=Z.useRef(null),F=Z.useRef(`mouse`),I=Z.useRef(!1),{getButtonProps:ne,buttonRef:re}=_({disabled:s,focusableWhenDisabled:!0,native:c,composite:!0}),ie={disabled:s,selected:O,highlighted:D};function L(e){if(ee||T)return;let t=p.state.value;if(S){let n=Array.isArray(t)?t:[];v(O?vt(n,a,A):[...n,a],E(w,e))}else v(a,E(w,e)),h(!1,E(w,e))}function R(){y.current.dragY=0}let ae={role:`option`,"aria-selected":O,tabIndex:te&&D?0:-1,onKeyDown(e){P.current=e.key,p.set(`activeIndex`,j),e.key===` `&&b.current&&e.preventDefault()},onClick(e){let t=e.type===`click`&&F.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&He(e.nativeEvent)&&(n!==void 0||D),i=t&&!r&&!I.current;I.current=!1,!(e.type===`keydown`&&P.current===null)&&(s||e.type===`keydown`&&P.current===` `&&b.current||i||(P.current=null,L(e.nativeEvent)))},onPointerEnter(e){F.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=y.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){F.current=e.pointerType,I.current=!0,R()},onMouseUp(){if(R(),s||F.current===`touch`||I.current)return;let e=!y.current.allowSelectedMouseUp&&O,t=!y.current.allowUnselectedMouseUp&&!O;e||t||(I.current=!0,N.current?.click(),I.current=!1)}},z=l(`div`,e,{ref:[re,t,f.ref,N],state:ie,props:[m,ae,u,ne]}),B=Z.useMemo(()=>({selected:O,index:j,textRef:d,selectedByFocus:k,hasRegistered:M}),[O,j,d,k,M]);return(0,Q.jsx)(mn.Provider,{value:B,children:z})})),_n=Z.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=hn();return n||r?(0,Q.jsx)(vn,{...e,ref:t}):null}),vn=Z.memo(Z.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=hn(),c=Z.useRef(null),{transitionStatus:u,setMounted:d}=ge(s),f=l(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:X});return Pe({open:s,ref:c,onComplete(){s||d(!1)}}),f})),yn=Z.memo(Z.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i,hasRegistered:a}=hn(),{firstItemTextRef:o,selectedItemTextRef:s}=ft(),{render:c,className:u,style:d,...f}=e;return l(`div`,e,{ref:[Z.useCallback(e=>{e&&(a&&n===0&&(o.current=e),a&&i&&(s.current=e))},[o,s,n,i,a]),t,r],props:f})})),bn=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o=!1,...s}=e,c=a===`up`,{store:u,popupRef:d,listRef:f,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:m}=ft(),{side:h,scrollDownArrowRef:_,scrollUpArrowRef:v}=Ut(),y=K(u,c?$.scrollUpArrowVisible:$.scrollDownArrowVisible),b=K(u,$.openMethod),x=y&&b!==`touch`,S=Se(),C=c?v:_,{mounted:w,transitionStatus:ee,setMounted:T}=ge(x);g(()=>(m.current+=1,u.state.hasScrollArrows||u.set(`hasScrollArrows`,!0),()=>{m.current=Math.max(0,m.current-1),m.current===0&&u.state.hasScrollArrows&&u.set(`hasScrollArrows`,!1)}),[u,m]),Pe({open:x,ref:C,onComplete(){x||T(!1)}});let E=l(`div`,e,{ref:[t,C],state:{direction:a,visible:x,side:h,transitionStatus:ee},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||S.isStarted())return;u.set(`activeIndex`,null);function t(){let e=u.state.listElement??d.current;if(!e)return;u.set(`activeIndex`,null),p();let n=Ot(e.scrollHeight,e.clientHeight),r=kt(e.scrollTop,n),i=r===(c?0:n),a=f.current;if(r!==e.scrollTop&&(e.scrollTop=r),a.length===0&&u.set(c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,!i),i){S.clear();return}if(a.length>0){let t=C.current?.offsetHeight||0;e.scrollTop=xn(a,c,r,e.clientHeight,t,n)}S.start(40,t)}S.start(40,t)},onMouseLeave(){S.clear()}},s],stateAttributesMapping:X});return w||o?E:null});function xn(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return os){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?kt(l.offsetTop+l.offsetHeight-r+i,a):a}var Sn=Z.forwardRef(function(e,t){return(0,Q.jsx)(bn,{...e,ref:t,direction:`down`})}),Cn=Z.forwardRef(function(e,t){return(0,Q.jsx)(bn,{...e,ref:t,direction:`up`})}),wn=Z.createContext(void 0);function Tn(){let e=Z.useContext(wn);if(e===void 0)throw Error(u(56));return e}var En=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Z.useState(),c=Z.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),u=l(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,Q.jsx)(wn.Provider,{value:c,children:u})}),Dn=Z.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=Tn(),c=y(a);return g(()=>{s(c)},[c,s]),l(`div`,e,{ref:t,props:[{id:c},o]})}),On=r(),kn=At;function An(e){let t=(0,On.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`scroll-my-1 p-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(En,{className:i,"data-slot":`select-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function jn(e){let t=(0,On.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`flex flex-1 text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Rt,{className:i,"data-slot":`select-value`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Mn(e){let t=(0,On.c)(15),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,size:o,id:i,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=o===void 0?`default`:o,c;t[6]===r?c=t[7]:(c=d(`flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,r),t[6]=r,t[7]=c);let l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(zt,{render:(0,Q.jsx)(p,{className:`pointer-events-none size-3.5 text-muted-foreground`})}),t[8]=l):l=t[8];let u;return t[9]!==n||t[10]!==i||t[11]!==a||t[12]!==s||t[13]!==c?(u=(0,Q.jsxs)(It,{className:c,"data-size":s,"data-slot":`select-trigger`,id:i,...a,children:[n,l]}),t[9]=n,t[10]=i,t[11]=a,t[12]=s,t[13]=c,t[14]=u):u=t[14],u}function Nn(e){let t=(0,On.c)(26),n,r,i,a,o,s,c,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8]):({className:r,children:n,side:a,sideOffset:o,align:s,alignOffset:c,alignItemWithTrigger:l,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l);let u=a===void 0?`bottom`:a,f=o===void 0?4:o,p=s===void 0?`center`:s,m=c===void 0?0:c,h=l===void 0?!0:l,g;t[9]===r?g=t[10]:(g=d(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-closed:animate-out data-open:animate-in relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100`,r),t[9]=r,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Q.jsx)(Ln,{}),t[11]=_):_=t[11];let v;t[12]===n?v=t[13]:(v=(0,Q.jsx)(pn,{children:n}),t[12]=n,t[13]=v);let y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Q.jsx)(Rn,{}),t[14]=y):y=t[14];let b;t[15]!==i||t[16]!==g||t[17]!==v?(b=(0,Q.jsxs)(an,{className:g,"data-slot":`select-content`,...i,children:[_,v,y]}),t[15]=i,t[16]=g,t[17]=v,t[18]=b):b=t[18];let x;return t[19]!==p||t[20]!==h||t[21]!==m||t[22]!==u||t[23]!==f||t[24]!==b?(x=(0,Q.jsx)(Vt,{children:(0,Q.jsx)(Yt,{align:p,alignItemWithTrigger:h,alignOffset:m,className:`isolate z-50`,side:u,sideOffset:f,children:b})}),t[19]=p,t[20]=h,t[21]=m,t[22]=u,t[23]=f,t[24]=b,t[25]=x):x=t[25],x}function Pn(e){let t=(0,On.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`px-2 py-1.5 text-xs text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Dn,{className:i,"data-slot":`select-label`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fn(e){let t=(0,On.c)(13),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=d(`relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=(0,Q.jsx)(yn,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:n}),t[6]=n,t[7]=o);let s;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Q.jsx)(_n,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`}),children:(0,Q.jsx)(f,{className:`pointer-events-none`})}),t[8]=s):s=t[8];let c;return t[9]!==i||t[10]!==a||t[11]!==o?(c=(0,Q.jsxs)(gn,{className:a,"data-slot":`select-item`,...i,children:[o,s]}),t[9]=i,t[10]=a,t[11]=o,t[12]=c):c=t[12],c}function In(e){let t=(0,On.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`pointer-events-none -mx-1 my-1 h-px bg-border/50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(ze,{className:i,"data-slot":`select-separator`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ln(e){let t=(0,On.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(Ye,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,Q.jsx)(Cn,{className:i,"data-slot":`select-scroll-up-button`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}function Rn(e){let t=(0,On.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5`,n),t[3]=n,t[4]=i);let a;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(p,{}),t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==i?(o=(0,Q.jsx)(Sn,{className:i,"data-slot":`select-scroll-down-button`,...r,children:a}),t[6]=r,t[7]=i,t[8]=o):o=t[8],o}export{Pn as a,jn as c,Fn as i,Nn as n,In as o,An as r,Mn as s,kn as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/service-metrics.js b/spinifex/services/spinifexui/frontend/dist/assets/service-metrics.js index 2cfd6881b..3b7c36a83 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/service-metrics.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/service-metrics.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{n as r}from"./redirect.js";import{tn as i}from"./index.js";import{t as a}from"./page-heading.js";import{n as o}from"./admin.js";import{t as s}from"./badge.js";import{a as c,o as l,r as u,t as d}from"./card.js";var f=t(),p=e();function m(){let e=(0,f.c)(46),{isAdmin:t}=i(),m;e[0]===t?m=e[1]:(m={...o,enabled:t,refetchInterval:5e3},e[0]=t,e[1]=m);let{data:y}=n(m);if(!t)throw r({to:`/`});let x=y?.encoding,S;e[2]===y?.db_nodes?S=e[3]:(S=y?.db_nodes??[],e[2]=y?.db_nodes,e[3]=S);let C=S,w;e[4]===y?.shard_nodes?w=e[5]:(w=y?.shard_nodes??[],e[4]=y?.shard_nodes,e[5]=w);let T=w,E;e[6]===C?E=e[7]:(E=C.length>0&&C.every(g),e[6]=C,e[7]=E);let D=E,O;e[8]===C?O=e[9]:(O=C.some(h),e[8]=C,e[9]=O);let k=O,A;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,p.jsx)(a,{title:`Service Metrics`}),e[10]=A):A=e[10];let j;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,p.jsx)(c,{children:(0,p.jsx)(l,{className:`text-sm`,children:`Predastore (S3) Overview`})}),e[11]=j):j=e[11];let M;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`Encoding`}),e[12]=M):M=e[12];let N;e[13]===x?N=e[14]:(N=(0,p.jsxs)(`div`,{children:[M,(0,p.jsx)(`div`,{className:`mt-1`,children:x?(0,p.jsxs)(s,{variant:`outline`,children:[x.type,` RS(`,x.data_shards,`,`,x.parity_shards,`)`]}):(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})})]}),e[13]=x,e[14]=N);let P;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`DB Nodes`}),e[15]=P):P=e[15];let F;e[16]===C.length?F=e[17]:(F=(0,p.jsxs)(`div`,{children:[P,(0,p.jsx)(`div`,{className:`mt-1 font-mono font-medium`,children:C.length})]}),e[16]=C.length,e[17]=F);let I;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`Shard Nodes`}),e[18]=I):I=e[18];let L;e[19]===T.length?L=e[20]:(L=(0,p.jsxs)(`div`,{children:[I,(0,p.jsx)(`div`,{className:`mt-1 font-mono font-medium`,children:T.length})]}),e[19]=T.length,e[20]=L);let R;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`Cluster Health`}),e[21]=R):R=e[21];let z;e[22]!==D||e[23]!==k||e[24]!==C.length?(z=(0,p.jsxs)(`div`,{children:[R,(0,p.jsx)(`div`,{className:`mt-1`,children:(0,p.jsx)(_,{nodeCount:C.length,allHealthy:D,anyUnhealthy:k})})]}),e[22]=D,e[23]=k,e[24]=C.length,e[25]=z):z=e[25];let B;e[26]!==F||e[27]!==L||e[28]!==z||e[29]!==N?(B=(0,p.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 text-xs md:grid-cols-4`,children:[N,F,L,z]}),e[26]=F,e[27]=L,e[28]=z,e[29]=N,e[30]=B):B=e[30];let V;e[31]===x?V=e[32]:(V=x&&(0,p.jsxs)(`p`,{className:`mt-3 text-[0.625rem] text-muted-foreground`,children:[`Reed-Solomon erasure coding: `,x.data_shards,` data shards + `,x.parity_shards,` parity`,` `,x.parity_shards===1?`shard`:`shards`,`. Can tolerate `,x.parity_shards,` shard`,` `,x.parity_shards===1?`failure`:`failures`,` without data loss.`]}),e[31]=x,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,p.jsxs)(d,{children:[j,(0,p.jsxs)(u,{children:[B,V]})]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(c,{children:(0,p.jsx)(l,{className:`text-sm`,children:`DB Consensus Nodes (Raft)`})}),e[36]=U):U=e[36];let W;e[37]===C?W=e[38]:(W=(0,p.jsxs)(d,{children:[U,(0,p.jsx)(u,{children:C.length===0?(0,p.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No data`}):(0,p.jsx)(v,{nodes:C})})]}),e[37]=C,e[38]=W);let G;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,p.jsx)(c,{children:(0,p.jsx)(l,{className:`text-sm`,children:`Object Storage Shard Nodes`})}),e[39]=G):G=e[39];let K;e[40]===T?K=e[41]:(K=(0,p.jsxs)(d,{children:[G,(0,p.jsx)(u,{children:T.length===0?(0,p.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No data`}):(0,p.jsx)(b,{nodes:T})})]}),e[40]=T,e[41]=K);let q;return e[42]!==H||e[43]!==W||e[44]!==K?(q=(0,p.jsxs)(p.Fragment,{children:[A,(0,p.jsxs)(`div`,{className:`space-y-6`,children:[H,W,K]})]}),e[42]=H,e[43]=W,e[44]=K,e[45]=q):q=e[45],q}function h(e){return!e.healthy}function g(e){return e.healthy}function _(e){let t=(0,f.c)(4),{nodeCount:n,allHealthy:r,anyUnhealthy:i}=e;if(n===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,p.jsx)(s,{variant:`secondary`,children:`Unknown`}),t[0]=e):e=t[0],e}if(r){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,p.jsx)(s,{variant:`default`,children:`Healthy`}),t[1]=e):e=t[1],e}if(i){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,p.jsx)(s,{variant:`destructive`,children:`Degraded`}),t[2]=e):e=t[2],e}let a;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,p.jsx)(s,{variant:`secondary`,children:`Unknown`}),t[3]=a):a=t[3],a}function v(e){let t=(0,f.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Host`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Port`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Health`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`State`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Leader`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Term`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Commit Index`}),(0,p.jsx)(`th`,{className:`pb-1 font-medium`,children:`Applied Index`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(y),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,p.jsx)(`div`,{className:`overflow-x-auto`,children:(0,p.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,p.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function y(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.id}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.port}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,p.jsx)(s,{variant:e.healthy?`default`:`destructive`,className:`text-[0.625rem]`,children:e.healthy?`Healthy`:`Unreachable`})}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.state?(0,p.jsx)(s,{variant:e.state===`Leader`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.state}):(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.leader??`-`}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.term??`-`}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.commit_index??`-`}),(0,p.jsx)(`td`,{className:`py-1.5 font-mono`,children:e.applied_index??`-`})]},e.id)}function b(e){let t=(0,f.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Host`}),(0,p.jsx)(`th`,{className:`pb-1 font-medium`,children:`Port`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(x),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,p.jsx)(`div`,{className:`overflow-x-auto`,children:(0,p.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,p.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function x(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.id}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,p.jsx)(`td`,{className:`py-1.5 font-mono`,children:e.port})]},e.id)}export{m as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{n as r}from"./redirect.js";import{rn as i}from"./index.js";import{t as a}from"./page-heading.js";import{n as o}from"./admin.js";import{t as s}from"./badge.js";import{a as c,o as l,r as u,t as d}from"./card.js";var f=t(),p=e();function m(){let e=(0,f.c)(46),{isAdmin:t}=i(),m;e[0]===t?m=e[1]:(m={...o,enabled:t,refetchInterval:5e3},e[0]=t,e[1]=m);let{data:y}=n(m);if(!t)throw r({to:`/`});let x=y?.encoding,S;e[2]===y?.db_nodes?S=e[3]:(S=y?.db_nodes??[],e[2]=y?.db_nodes,e[3]=S);let C=S,w;e[4]===y?.shard_nodes?w=e[5]:(w=y?.shard_nodes??[],e[4]=y?.shard_nodes,e[5]=w);let T=w,E;e[6]===C?E=e[7]:(E=C.length>0&&C.every(g),e[6]=C,e[7]=E);let D=E,O;e[8]===C?O=e[9]:(O=C.some(h),e[8]=C,e[9]=O);let k=O,A;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,p.jsx)(a,{title:`Service Metrics`}),e[10]=A):A=e[10];let j;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,p.jsx)(c,{children:(0,p.jsx)(l,{className:`text-sm`,children:`Predastore (S3) Overview`})}),e[11]=j):j=e[11];let M;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`Encoding`}),e[12]=M):M=e[12];let N;e[13]===x?N=e[14]:(N=(0,p.jsxs)(`div`,{children:[M,(0,p.jsx)(`div`,{className:`mt-1`,children:x?(0,p.jsxs)(s,{variant:`outline`,children:[x.type,` RS(`,x.data_shards,`,`,x.parity_shards,`)`]}):(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})})]}),e[13]=x,e[14]=N);let P;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`DB Nodes`}),e[15]=P):P=e[15];let F;e[16]===C.length?F=e[17]:(F=(0,p.jsxs)(`div`,{children:[P,(0,p.jsx)(`div`,{className:`mt-1 font-mono font-medium`,children:C.length})]}),e[16]=C.length,e[17]=F);let I;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`Shard Nodes`}),e[18]=I):I=e[18];let L;e[19]===T.length?L=e[20]:(L=(0,p.jsxs)(`div`,{children:[I,(0,p.jsx)(`div`,{className:`mt-1 font-mono font-medium`,children:T.length})]}),e[19]=T.length,e[20]=L);let R;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`Cluster Health`}),e[21]=R):R=e[21];let z;e[22]!==D||e[23]!==k||e[24]!==C.length?(z=(0,p.jsxs)(`div`,{children:[R,(0,p.jsx)(`div`,{className:`mt-1`,children:(0,p.jsx)(_,{nodeCount:C.length,allHealthy:D,anyUnhealthy:k})})]}),e[22]=D,e[23]=k,e[24]=C.length,e[25]=z):z=e[25];let B;e[26]!==F||e[27]!==L||e[28]!==z||e[29]!==N?(B=(0,p.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 text-xs md:grid-cols-4`,children:[N,F,L,z]}),e[26]=F,e[27]=L,e[28]=z,e[29]=N,e[30]=B):B=e[30];let V;e[31]===x?V=e[32]:(V=x&&(0,p.jsxs)(`p`,{className:`mt-3 text-[0.625rem] text-muted-foreground`,children:[`Reed-Solomon erasure coding: `,x.data_shards,` data shards + `,x.parity_shards,` parity`,` `,x.parity_shards===1?`shard`:`shards`,`. Can tolerate `,x.parity_shards,` shard`,` `,x.parity_shards===1?`failure`:`failures`,` without data loss.`]}),e[31]=x,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,p.jsxs)(d,{children:[j,(0,p.jsxs)(u,{children:[B,V]})]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(c,{children:(0,p.jsx)(l,{className:`text-sm`,children:`DB Consensus Nodes (Raft)`})}),e[36]=U):U=e[36];let W;e[37]===C?W=e[38]:(W=(0,p.jsxs)(d,{children:[U,(0,p.jsx)(u,{children:C.length===0?(0,p.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No data`}):(0,p.jsx)(v,{nodes:C})})]}),e[37]=C,e[38]=W);let G;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,p.jsx)(c,{children:(0,p.jsx)(l,{className:`text-sm`,children:`Object Storage Shard Nodes`})}),e[39]=G):G=e[39];let K;e[40]===T?K=e[41]:(K=(0,p.jsxs)(d,{children:[G,(0,p.jsx)(u,{children:T.length===0?(0,p.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No data`}):(0,p.jsx)(b,{nodes:T})})]}),e[40]=T,e[41]=K);let q;return e[42]!==H||e[43]!==W||e[44]!==K?(q=(0,p.jsxs)(p.Fragment,{children:[A,(0,p.jsxs)(`div`,{className:`space-y-6`,children:[H,W,K]})]}),e[42]=H,e[43]=W,e[44]=K,e[45]=q):q=e[45],q}function h(e){return!e.healthy}function g(e){return e.healthy}function _(e){let t=(0,f.c)(4),{nodeCount:n,allHealthy:r,anyUnhealthy:i}=e;if(n===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,p.jsx)(s,{variant:`secondary`,children:`Unknown`}),t[0]=e):e=t[0],e}if(r){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,p.jsx)(s,{variant:`default`,children:`Healthy`}),t[1]=e):e=t[1],e}if(i){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,p.jsx)(s,{variant:`destructive`,children:`Degraded`}),t[2]=e):e=t[2],e}let a;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,p.jsx)(s,{variant:`secondary`,children:`Unknown`}),t[3]=a):a=t[3],a}function v(e){let t=(0,f.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Host`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Port`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Health`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`State`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Leader`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Term`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Commit Index`}),(0,p.jsx)(`th`,{className:`pb-1 font-medium`,children:`Applied Index`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(y),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,p.jsx)(`div`,{className:`overflow-x-auto`,children:(0,p.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,p.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function y(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.id}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.port}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,p.jsx)(s,{variant:e.healthy?`default`:`destructive`,className:`text-[0.625rem]`,children:e.healthy?`Healthy`:`Unreachable`})}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.state?(0,p.jsx)(s,{variant:e.state===`Leader`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.state}):(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.leader??`-`}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.term??`-`}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.commit_index??`-`}),(0,p.jsx)(`td`,{className:`py-1.5 font-mono`,children:e.applied_index??`-`})]},e.id)}function b(e){let t=(0,f.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,p.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Host`}),(0,p.jsx)(`th`,{className:`pb-1 font-medium`,children:`Port`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(x),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,p.jsx)(`div`,{className:`overflow-x-auto`,children:(0,p.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,p.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function x(e){return(0,p.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.id}),(0,p.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,p.jsx)(`td`,{className:`py-1.5 font-mono`,children:e.port})]},e.id)}export{m as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/system-managed.js b/spinifex/services/spinifexui/frontend/dist/assets/system-managed.js index bc81e759e..9f7c6b87b 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/system-managed.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/system-managed.js @@ -1 +1 @@ -function e(e){return e.Tags?.some(e=>e.Key===`spinifex:managed-by`)??!1}function t(e){return e.Tags?.some(e=>e.Key===`spinifex:managed-by`&&e.Value===`eks`)??!1}export{e as n,t}; \ No newline at end of file +function e(e){return e.Tags?.some(e=>e.Key===`spinifex:managed-by`)??!1}function t(e){return e.Tags?.some(e=>e.Key===`spinifex:managed-by`&&e.Value===`eks`)??!1}function n(e){return e.Tags?.some(e=>e.Key===`spinifex:managed-by`&&e.Value===`ecs`)??!1}export{t as n,e as r,n as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/tabs.js b/spinifex/services/spinifexui/frontend/dist/assets/tabs.js index 71445d88d..b62fef6a1 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/tabs.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/tabs.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{a as i,c as a,i as o,n as s,u as c}from"./dist.js";import{Lt as l}from"./auth.js";import{a as u,i as d,o as f,r as p,s as m}from"./button.js";import{S as h,b as g,c as _,d as v,f as y,i as b,t as x,v as S,x as C,y as w}from"./createBaseUIEventDetails.js";import{Cn as T,Dn as E,En as D,On as O,Sn as k,Tn as A,_n as j,bn as M,dr as N,fr as P,gn as F,gr as I,hn as L,hr as R,ir as z,nr as B,or as V,pn as H,pr as U,rr as W,sn as G,sr as K,vn as q,wn as J,yn as Y}from"./index.js";import{i as ee,n as te,r as ne}from"./useCompositeListItem.js";var X=t(n(),1),re=X.createContext(void 0);function ie(){let e=X.useContext(re);if(e===void 0)throw Error(c(64));return e}var ae=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),Z={tabActivationDirection:e=>({[ae.activationDirection]:e})},Q=e(),oe=X.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:c,style:l,...u}=e,d=e.defaultValue!==void 0,p=X.useRef([]),[h,g]=X.useState(()=>new Map),[y,S]=B({controlled:c,default:r,name:`Tabs`,state:`value`}),C=c!==void 0,[w,T]=X.useState(()=>new Map),E=X.useRef(void 0),D=X.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of w.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[w]),[O,k]=X.useState(()=>({previousValue:y,tabActivationDirection:`none`})),{previousValue:A,tabActivationDirection:j}=O,M=j,N=!1;A!==y&&(M=se(A,y,a,w),N=A!=null&&y!=null&&D(y)==null);let P=N?A:y,F=A!==P||j!==M;f(()=>{F&&k({previousValue:P,tabActivationDirection:M})},[P,F,M]);let I=m((e,t)=>{t.activationDirection=se(y,e,a,w),i?.(e,t),!t.isCanceled&&S(e)}),L=m((e,t)=>{i?.(e,x(t,void 0,void 0,{activationDirection:`none`}))}),R=m((e,t)=>{g(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),z=m((e,t)=>{g(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),V=X.useCallback(e=>h.get(e),[h]),H=X.useCallback(e=>{for(let t of w.values())if(e===t?.value)return t?.id},[w]),U=X.useMemo(()=>({getTabElementBySelectedValue:D,getTabIdByPanelValue:H,getTabPanelIdByValue:V,onValueChange:I,orientation:a,registerMountedTabPanel:R,setTabMap:T,unregisterMountedTabPanel:z,tabActivationDirection:M,value:y}),[D,H,V,I,a,R,T,z,M,y]),W=X.useMemo(()=>{for(let e of w.values())if(e!=null&&e.value===y)return e},[w,y]),G=X.useMemo(()=>{for(let e of w.values())if(e!=null&&!e.disabled)return e.value},[w]),K=X.useRef(!d),q=X.useRef(r),J=X.useRef(d),Y=X.useRef(!1);f(()=>{if(C)return;function e(e,t){S(e),k(t=>t.previousValue===e&&t.tabActivationDirection===`none`?t:{previousValue:e,tabActivationDirection:`none`}),L(e,t),K.current=!1}if(w.size===0){Y.current&&y!==null&&!E.current?.isConnected&&e(null,v);return}Y.current=!0,E.current=w.keys().next().value;let t=W?.disabled,n=W==null&&y!==null;if(!t&&y===q.current&&(J.current=!1),J.current&&t&&y===q.current)return;let r=K.current;if(t||n){let n=G??null;if(y===n){K.current=!1;return}let i=v;r?i=_:t&&(i=b),e(n,i);return}r&&W!=null&&(L(y,_),K.current=!1)},[G,C,L,W,S,w,y]);let ee=s(`div`,e,{state:{orientation:a,tabActivationDirection:M},ref:t,props:u,stateAttributesMapping:Z});return(0,Q.jsx)(re.Provider,{value:U,children:(0,Q.jsx)(ne,{elementsRef:p,children:ee})})});function se(e,t,n,r){if(e==null||t==null)return`none`;let i=null,a=null;for(let[n,o]of r.entries()){if(o==null)continue;let r=o.value??o.index;if(e===r&&(i=n),t===r&&(a=n),i!=null&&a!=null)break}if(i==null||a==null)return i!==a&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?n===`horizontal`?t>e?`right`:`left`:t>e?`down`:`up`:`none`;let o=i.getBoundingClientRect(),s=a.getBoundingClientRect();if(n===`horizontal`){if(s.lefto.left)return`right`}else{if(s.topo.top)return`down`}return`none`}var ce=`data-composite-item-active`;function le(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=u(),{ref:i,index:o}=te(e),s=n===o,c=X.useRef(null),l=a(i,c);return{compositeProps:{tabIndex:s?0:-1,onFocus(){r(o)},onMouseMove(){let e=c.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!s&&!n&&e.focus()}},compositeRef:l,index:o}}var ue=X.createContext(void 0);function de(){let e=X.useContext(ue);if(e===void 0)throw Error(c(65));return e}var fe=X.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:c=!0,style:l,...u}=e,{value:d,getTabPanelIdByValue:m,orientation:g,tabActivationDirection:_}=ie(),{activateOnFocus:v,highlightedTabIndex:b,onTabActivation:T,registerTabResizeObserverElement:E,setHighlightedTabIndex:D,tabsListElement:O}=de(),k=h(o),{compositeProps:A,compositeRef:j,index:M}=le({metadata:X.useMemo(()=>({disabled:r,id:k,value:a}),[r,k,a])}),N=a===d,P=X.useRef(!1),F=X.useRef(null);f(()=>{let e=F.current;if(e)return E(e)},[E]),f(()=>{if(P.current){P.current=!1;return}if(!(N&&M>-1&&b!==M))return;let e=O;if(e!=null){let t=S(C(e));if(t&&w(e,t))return}r||D(M)},[N,M,b,D,r,O]);let{getButtonProps:I,buttonRef:L}=p({disabled:r,native:c,focusableWhenDisabled:!0}),R=m(a),z=X.useRef(!1),B=X.useRef(!1);function V(e){N||r||T(a,x(y,e.nativeEvent,void 0,{activationDirection:`none`}))}function H(e){N||(M>-1&&!r&&D(M),!r&&v&&(!z.current||z.current&&B.current)&&T(a,x(y,e.nativeEvent,void 0,{activationDirection:`none`})))}function U(e){if(N||r)return;z.current=!0;function t(){z.current=!1,B.current=!1}(!e.button||e.button===0)&&(B.current=!0,C(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return s(`button`,e,{state:{disabled:r,active:N,orientation:g,tabActivationDirection:_},ref:[t,L,j,F],props:[A,{role:`tab`,"aria-controls":R,"aria-selected":N,id:k,onClick:V,onFocus:H,onPointerDown:U,[ce]:N?``:void 0,onKeyDownCapture(){P.current=!0}},u,I],stateAttributesMapping:Z})}),pe=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=V.startingStyle]=`startingStyle`,e[e.endingStyle=V.endingStyle]=`endingStyle`,e}({}),me={...Z,...K},he=X.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...c}=e,{value:l,getTabIdByPanelValue:u,orientation:d,tabActivationDirection:p,registerMountedTabPanel:m,unregisterMountedTabPanel:g}=ie(),_=h(),{ref:v,index:y}=te({metadata:X.useMemo(()=>({id:_,value:r}),[_,r])}),b=r===l,{mounted:x,transitionStatus:S,setMounted:C}=W(b),w=!x,T=u(r),E={hidden:w,orientation:d,tabActivationDirection:p,transitionStatus:S},D=X.useRef(null),O=s(`div`,e,{state:E,ref:[t,v,D],props:[{"aria-labelledby":T,hidden:w,id:_,role:`tabpanel`,tabIndex:b?0:-1,inert:H(!b),[pe.index]:y},c],stateAttributesMapping:me});return z({open:b,ref:D,onComplete(){b||C(!1)}}),f(()=>{if(!(w&&!a)&&_!=null)return m(r,_),()=>{g(r,_)}},[w,a,r,_,m,g]),a||x?O:null}),ge=[];function _e(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:o,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:d=!1,disabledIndices:p,modifierKeys:h=ge}=e,[_,v]=X.useState(0),y=r!=null,b=X.useRef(null),x=a(b,l),S=X.useRef([]),C=X.useRef(!1),w=s??_,z=m((e,t=!1)=>{if((c??v)(e),t){let t=S.current[e];O(b.current,t,o,n)}}),B=m(e=>{if(e.size===0||C.current)return;C.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?t.indexOf(r):-1;if(i!==-1)z(i);else if(I(t,w,p)){let e=N(t,{disabledIndices:p});R(t,e)||z(e)}O(b.current,r,o,n)});f(()=>{if(p==null||s!=null||!C.current)return;let e=S.current;if(I(e,w,p)){let t=N(e,{disabledIndices:p});R(e,t)||z(t)}},[p,s,w,S,z]);let V=m((e,t,n)=>i?i(e,t,n,S):n),H=m(e=>{let a=u?M:F;if(!a.has(e.key)||ve(e,h)||!b.current)return;let s=o===`rtl`,c=s?j:q,l={horizontal:c,vertical:L,both:c}[n],f=s?q:j,m={horizontal:f,vertical:Y,both:f}[n],_=g(e.nativeEvent);if(_!=null&&E(_)&&!ee(_)){let t=_.selectionStart,n=_.selectionEnd,r=_.value??``;if(t==null||e.shiftKey||t!==n||e.key!==m&&t0)return}let v=w,x=U(S,p),C=P(S,p);r!=null&&(v=r({disabledIndices:p,elementsRef:S,event:e,highlightedIndex:w,loopFocus:t,maxIndex:C,minIndex:x,onLoop:V,orientation:n,rtl:s}));let O={horizontal:[c],vertical:[L],both:[c,L]}[n],I={horizontal:[f],vertical:[Y],both:[f,Y]}[n],B=y?a:{horizontal:u?T:k,vertical:u?D:A,both:a}[n];u&&(e.key===`Home`?v=x:e.key===`End`&&(v=C)),v===w&&(O.includes(e.key)||I.includes(e.key))&&(t&&v===C&&O.includes(e.key)?(v=x,i&&(v=i(e,w,v,S))):t&&v===x&&I.includes(e.key)?(v=C,i&&(v=i(e,w,v,S))):v=N(S.current,{startingIndex:v,decrement:I.includes(e.key),disabledIndices:p})),v!==w&&!R(S.current,v)&&(d&&e.stopPropagation(),B.has(e.key)&&e.preventDefault(),z(v,!0),queueMicrotask(()=>{S.current[v]?.focus()}))});return{props:{ref:x,onFocus(e){let t=b.current,n=g(e.nativeEvent);!t||n==null||!E(n)||n.setSelectionRange(0,n.value.length??0)},onKeyDown:H},highlightedIndex:w,onHighlightedIndexChange:z,elementsRef:S,disabledIndices:p,onMapChange:B,relayKeyboardEvent:H}}function ve(e,t){for(let n of J.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function ye(e){let{render:t,className:n,style:r,refs:a=o,props:c=o,state:l=i,stateAttributesMapping:u,highlightedIndex:f,onHighlightedIndexChange:p,orientation:m,grid:h,loopFocus:g,onLoop:_,enableHomeAndEndKeys:v,onMapChange:y,stopEventPropagation:b=!0,rootRef:x,disabledIndices:S,modifierKeys:C,highlightItemOnHover:w=!1,tag:T=`div`,...E}=e,{props:D,highlightedIndex:O,onHighlightedIndexChange:k,elementsRef:A,onMapChange:j,relayKeyboardEvent:M}=_e({grid:h,loopFocus:g,onLoop:_,orientation:m,highlightedIndex:f,onHighlightedIndexChange:p,rootRef:x,stopEventPropagation:b,enableHomeAndEndKeys:v,direction:G(),disabledIndices:S,modifierKeys:C}),N=s(T,e,{state:l,ref:a,props:[D,...c,E],stateAttributesMapping:u}),P=X.useMemo(()=>({highlightedIndex:O,onHighlightedIndexChange:k,highlightItemOnHover:w,relayKeyboardEvent:M}),[O,k,w,M]);return(0,Q.jsx)(d.Provider,{value:P,children:(0,Q.jsx)(ne,{elementsRef:A,onMapChange:e=>{y?.(e),j(e)},children:N})})}var be=X.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:s,...c}=e,{onValueChange:l,orientation:u,value:d,setTabMap:p,tabActivationDirection:h}=ie(),[g,_]=X.useState(0),[v,y]=X.useState(null),b=X.useRef(new Set),x=X.useRef(new Set),S=X.useRef(null);f(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{b.current.forEach(e=>{e()})});return S.current=e,v&&e.observe(v),x.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),S.current=null}},[v]);let C=m(e=>(b.current.add(e),()=>{b.current.delete(e)})),w=m(e=>(x.current.add(e),S.current?.observe(e),()=>{x.current.delete(e),S.current?.unobserve(e)})),T=m((e,t)=>{e!==d&&l(e,t)}),E={orientation:u,tabActivationDirection:h},D={"aria-orientation":u===`vertical`?`vertical`:void 0,role:`tablist`},O=X.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:g,registerIndicatorUpdateListener:C,registerTabResizeObserverElement:w,onTabActivation:T,setHighlightedTabIndex:_,tabsListElement:v}),[n,g,C,w,T,_,v]);return(0,Q.jsx)(ue.Provider,{value:O,children:(0,Q.jsx)(ye,{render:a,className:r,style:s,state:E,refs:[t,y],props:[D,c],stateAttributesMapping:Z,highlightedIndex:g,enableHomeAndEndKeys:!0,loopFocus:i,orientation:u,onHighlightedIndexChange:_,onMapChange:p,disabledIndices:o})})}),$=r();function xe(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`flex flex-col gap-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(oe,{className:i,"data-slot":`tabs`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Se(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`inline-flex items-center gap-1 border-b`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(be,{className:i,"data-slot":`tabs-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ce(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`inline-flex items-center justify-center border-b-2 border-transparent px-3 py-2 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/30 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-selected:border-primary data-selected:text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(fe,{className:i,"data-slot":`tabs-tab`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function we(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`focus-visible:outline-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(he,{className:i,"data-slot":`tabs-panel`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ce as i,Se as n,we as r,xe as t}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{a as i,c as a,i as o,n as s,u as c}from"./dist.js";import{Lt as l}from"./auth.js";import{a as u,i as d,o as f,r as p,s as m}from"./button.js";import{S as h,b as g,c as _,d as v,f as y,i as b,t as x,v as S,x as C,y as w}from"./createBaseUIEventDetails.js";import{An as T,Dn as E,En as D,On as O,Sn as k,Tn as A,_n as j,_r as M,ar as N,bn as P,cr as F,hn as I,hr as L,ir as ee,kn as R,ln as z,lr as B,mr as V,or as H,pr as U,vn as W,vr as G,wn as K,xn as q,yn as J}from"./index.js";import{i as te,n as ne,r as re}from"./useCompositeListItem.js";var Y=t(n(),1),ie=Y.createContext(void 0);function X(){let e=Y.useContext(ie);if(e===void 0)throw Error(c(64));return e}var ae=function(e){return e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e}({}),Z={tabActivationDirection:e=>({[ae.activationDirection]:e})},Q=e(),oe=Y.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:c,style:l,...u}=e,d=e.defaultValue!==void 0,p=Y.useRef([]),[h,g]=Y.useState(()=>new Map),[y,S]=ee({controlled:c,default:r,name:`Tabs`,state:`value`}),C=c!==void 0,[w,T]=Y.useState(()=>new Map),E=Y.useRef(void 0),D=Y.useCallback(e=>{if(e===void 0)return null;for(let[t,n]of w.entries())if(n!=null&&e===(n.value??n.index))return t;return null},[w]),[O,k]=Y.useState(()=>({previousValue:y,tabActivationDirection:`none`})),{previousValue:A,tabActivationDirection:j}=O,M=j,N=!1;A!==y&&(M=se(A,y,a,w),N=A!=null&&y!=null&&D(y)==null);let P=N?A:y,F=A!==P||j!==M;f(()=>{F&&k({previousValue:P,tabActivationDirection:M})},[P,F,M]);let I=m((e,t)=>{t.activationDirection=se(y,e,a,w),i?.(e,t),!t.isCanceled&&S(e)}),L=m((e,t)=>{i?.(e,x(t,void 0,void 0,{activationDirection:`none`}))}),R=m((e,t)=>{g(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})}),z=m((e,t)=>{g(n=>{if(!n.has(e)||n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})}),B=Y.useCallback(e=>h.get(e),[h]),V=Y.useCallback(e=>{for(let t of w.values())if(e===t?.value)return t?.id},[w]),H=Y.useMemo(()=>({getTabElementBySelectedValue:D,getTabIdByPanelValue:V,getTabPanelIdByValue:B,onValueChange:I,orientation:a,registerMountedTabPanel:R,setTabMap:T,unregisterMountedTabPanel:z,tabActivationDirection:M,value:y}),[D,V,B,I,a,R,T,z,M,y]),U=Y.useMemo(()=>{for(let e of w.values())if(e!=null&&e.value===y)return e},[w,y]),W=Y.useMemo(()=>{for(let e of w.values())if(e!=null&&!e.disabled)return e.value},[w]),G=Y.useRef(!d),K=Y.useRef(r),q=Y.useRef(d),J=Y.useRef(!1);f(()=>{if(C)return;function e(e,t){S(e),k(t=>t.previousValue===e&&t.tabActivationDirection===`none`?t:{previousValue:e,tabActivationDirection:`none`}),L(e,t),G.current=!1}if(w.size===0){J.current&&y!==null&&!E.current?.isConnected&&e(null,v);return}J.current=!0,E.current=w.keys().next().value;let t=U?.disabled,n=U==null&&y!==null;if(!t&&y===K.current&&(q.current=!1),q.current&&t&&y===K.current)return;let r=G.current;if(t||n){let n=W??null;if(y===n){G.current=!1;return}let i=v;r?i=_:t&&(i=b),e(n,i);return}r&&U!=null&&(L(y,_),G.current=!1)},[W,C,L,U,S,w,y]);let te=s(`div`,e,{state:{orientation:a,tabActivationDirection:M},ref:t,props:u,stateAttributesMapping:Z});return(0,Q.jsx)(ie.Provider,{value:H,children:(0,Q.jsx)(re,{elementsRef:p,children:te})})});function se(e,t,n,r){if(e==null||t==null)return`none`;let i=null,a=null;for(let[n,o]of r.entries()){if(o==null)continue;let r=o.value??o.index;if(e===r&&(i=n),t===r&&(a=n),i!=null&&a!=null)break}if(i==null||a==null)return i!==a&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?n===`horizontal`?t>e?`right`:`left`:t>e?`down`:`up`:`none`;let o=i.getBoundingClientRect(),s=a.getBoundingClientRect();if(n===`horizontal`){if(s.lefto.left)return`right`}else{if(s.topo.top)return`down`}return`none`}var ce=`data-composite-item-active`;function le(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=u(),{ref:i,index:o}=ne(e),s=n===o,c=Y.useRef(null),l=a(i,c);return{compositeProps:{tabIndex:s?0:-1,onFocus(){r(o)},onMouseMove(){let e=c.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!s&&!n&&e.focus()}},compositeRef:l,index:o}}var ue=Y.createContext(void 0);function de(){let e=Y.useContext(ue);if(e===void 0)throw Error(c(65));return e}var fe=Y.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:c=!0,style:l,...u}=e,{value:d,getTabPanelIdByValue:m,orientation:g,tabActivationDirection:_}=X(),{activateOnFocus:v,highlightedTabIndex:b,onTabActivation:T,registerTabResizeObserverElement:E,setHighlightedTabIndex:D,tabsListElement:O}=de(),k=h(o),{compositeProps:A,compositeRef:j,index:M}=le({metadata:Y.useMemo(()=>({disabled:r,id:k,value:a}),[r,k,a])}),N=a===d,P=Y.useRef(!1),F=Y.useRef(null);f(()=>{let e=F.current;if(e)return E(e)},[E]),f(()=>{if(P.current){P.current=!1;return}if(!(N&&M>-1&&b!==M))return;let e=O;if(e!=null){let t=S(C(e));if(t&&w(e,t))return}r||D(M)},[N,M,b,D,r,O]);let{getButtonProps:I,buttonRef:L}=p({disabled:r,native:c,focusableWhenDisabled:!0}),ee=m(a),R=Y.useRef(!1),z=Y.useRef(!1);function B(e){N||r||T(a,x(y,e.nativeEvent,void 0,{activationDirection:`none`}))}function V(e){N||(M>-1&&!r&&D(M),!r&&v&&(!R.current||R.current&&z.current)&&T(a,x(y,e.nativeEvent,void 0,{activationDirection:`none`})))}function H(e){if(N||r)return;R.current=!0;function t(){R.current=!1,z.current=!1}(!e.button||e.button===0)&&(z.current=!0,C(e.currentTarget).addEventListener(`pointerup`,t,{once:!0}))}return s(`button`,e,{state:{disabled:r,active:N,orientation:g,tabActivationDirection:_},ref:[t,L,j,F],props:[A,{role:`tab`,"aria-controls":ee,"aria-selected":N,id:k,onClick:B,onFocus:V,onPointerDown:H,[ce]:N?``:void 0,onKeyDownCapture(){P.current=!0}},u,I],stateAttributesMapping:Z})}),pe=function(e){return e.index=`data-index`,e.activationDirection=`data-activation-direction`,e.orientation=`data-orientation`,e.hidden=`data-hidden`,e[e.startingStyle=F.startingStyle]=`startingStyle`,e[e.endingStyle=F.endingStyle]=`endingStyle`,e}({}),me={...Z,...B},he=Y.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...c}=e,{value:l,getTabIdByPanelValue:u,orientation:d,tabActivationDirection:p,registerMountedTabPanel:m,unregisterMountedTabPanel:g}=X(),_=h(),{ref:v,index:y}=ne({metadata:Y.useMemo(()=>({id:_,value:r}),[_,r])}),b=r===l,{mounted:x,transitionStatus:S,setMounted:C}=N(b),w=!x,T=u(r),E={hidden:w,orientation:d,tabActivationDirection:p,transitionStatus:S},D=Y.useRef(null),O=s(`div`,e,{state:E,ref:[t,v,D],props:[{"aria-labelledby":T,hidden:w,id:_,role:`tabpanel`,tabIndex:b?0:-1,inert:I(!b),[pe.index]:y},c],stateAttributesMapping:me});return H({open:b,ref:D,onComplete(){b||C(!1)}}),f(()=>{if(!(w&&!a)&&_!=null)return m(r,_),()=>{g(r,_)}},[w,a,r,_,m,g]),a||x?O:null}),ge=[];function _e(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:o,highlightedIndex:s,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:d=!1,disabledIndices:p,modifierKeys:h=ge}=e,[_,v]=Y.useState(0),y=r!=null,b=Y.useRef(null),x=a(b,l),S=Y.useRef([]),C=Y.useRef(!1),w=s??_,D=m((e,t=!1)=>{if((c??v)(e),t){let t=S.current[e];T(b.current,t,o,n)}}),N=m(e=>{if(e.size===0||C.current)return;C.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?t.indexOf(r):-1;if(i!==-1)D(i);else if(G(t,w,p)){let e=U(t,{disabledIndices:p});M(t,e)||D(e)}T(b.current,r,o,n)});f(()=>{if(p==null||s!=null||!C.current)return;let e=S.current;if(G(e,w,p)){let t=U(e,{disabledIndices:p});M(e,t)||D(t)}},[p,s,w,S,D]);let F=m((e,t,n)=>i?i(e,t,n,S):n),I=m(e=>{let a=u?k:W;if(!a.has(e.key)||ve(e,h)||!b.current)return;let s=o===`rtl`,c=s?J:P,l={horizontal:c,vertical:j,both:c}[n],f=s?P:J,m={horizontal:f,vertical:q,both:f}[n],_=g(e.nativeEvent);if(_!=null&&R(_)&&!te(_)){let t=_.selectionStart,n=_.selectionEnd,r=_.value??``;if(t==null||e.shiftKey||t!==n||e.key!==m&&t0)return}let v=w,x=L(S,p),C=V(S,p);r!=null&&(v=r({disabledIndices:p,elementsRef:S,event:e,highlightedIndex:w,loopFocus:t,maxIndex:C,minIndex:x,onLoop:F,orientation:n,rtl:s}));let T={horizontal:[c],vertical:[j],both:[c,j]}[n],N={horizontal:[f],vertical:[q],both:[f,q]}[n],I=y?a:{horizontal:u?A:K,vertical:u?O:E,both:a}[n];u&&(e.key===`Home`?v=x:e.key===`End`&&(v=C)),v===w&&(T.includes(e.key)||N.includes(e.key))&&(t&&v===C&&T.includes(e.key)?(v=x,i&&(v=i(e,w,v,S))):t&&v===x&&N.includes(e.key)?(v=C,i&&(v=i(e,w,v,S))):v=U(S.current,{startingIndex:v,decrement:N.includes(e.key),disabledIndices:p})),v!==w&&!M(S.current,v)&&(d&&e.stopPropagation(),I.has(e.key)&&e.preventDefault(),D(v,!0),queueMicrotask(()=>{S.current[v]?.focus()}))});return{props:{ref:x,onFocus(e){let t=b.current,n=g(e.nativeEvent);!t||n==null||!R(n)||n.setSelectionRange(0,n.value.length??0)},onKeyDown:I},highlightedIndex:w,onHighlightedIndexChange:D,elementsRef:S,disabledIndices:p,onMapChange:N,relayKeyboardEvent:I}}function ve(e,t){for(let n of D.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function ye(e){let{render:t,className:n,style:r,refs:a=o,props:c=o,state:l=i,stateAttributesMapping:u,highlightedIndex:f,onHighlightedIndexChange:p,orientation:m,grid:h,loopFocus:g,onLoop:_,enableHomeAndEndKeys:v,onMapChange:y,stopEventPropagation:b=!0,rootRef:x,disabledIndices:S,modifierKeys:C,highlightItemOnHover:w=!1,tag:T=`div`,...E}=e,{props:D,highlightedIndex:O,onHighlightedIndexChange:k,elementsRef:A,onMapChange:j,relayKeyboardEvent:M}=_e({grid:h,loopFocus:g,onLoop:_,orientation:m,highlightedIndex:f,onHighlightedIndexChange:p,rootRef:x,stopEventPropagation:b,enableHomeAndEndKeys:v,direction:z(),disabledIndices:S,modifierKeys:C}),N=s(T,e,{state:l,ref:a,props:[D,...c,E],stateAttributesMapping:u}),P=Y.useMemo(()=>({highlightedIndex:O,onHighlightedIndexChange:k,highlightItemOnHover:w,relayKeyboardEvent:M}),[O,k,w,M]);return(0,Q.jsx)(d.Provider,{value:P,children:(0,Q.jsx)(re,{elementsRef:A,onMapChange:e=>{y?.(e),j(e)},children:N})})}var be=Y.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:s,...c}=e,{onValueChange:l,orientation:u,value:d,setTabMap:p,tabActivationDirection:h}=X(),[g,_]=Y.useState(0),[v,y]=Y.useState(null),b=Y.useRef(new Set),x=Y.useRef(new Set),S=Y.useRef(null);f(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{b.current.forEach(e=>{e()})});return S.current=e,v&&e.observe(v),x.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),S.current=null}},[v]);let C=m(e=>(b.current.add(e),()=>{b.current.delete(e)})),w=m(e=>(x.current.add(e),S.current?.observe(e),()=>{x.current.delete(e),S.current?.unobserve(e)})),T=m((e,t)=>{e!==d&&l(e,t)}),E={orientation:u,tabActivationDirection:h},D={"aria-orientation":u===`vertical`?`vertical`:void 0,role:`tablist`},O=Y.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:g,registerIndicatorUpdateListener:C,registerTabResizeObserverElement:w,onTabActivation:T,setHighlightedTabIndex:_,tabsListElement:v}),[n,g,C,w,T,_,v]);return(0,Q.jsx)(ue.Provider,{value:O,children:(0,Q.jsx)(ye,{render:a,className:r,style:s,state:E,refs:[t,y],props:[D,c],stateAttributesMapping:Z,highlightedIndex:g,enableHomeAndEndKeys:!0,loopFocus:i,orientation:u,onHighlightedIndexChange:_,onMapChange:p,disabledIndices:o})})}),$=r();function xe(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`flex flex-col gap-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(oe,{className:i,"data-slot":`tabs`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Se(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`inline-flex items-center gap-1 border-b`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(be,{className:i,"data-slot":`tabs-list`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ce(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`inline-flex items-center justify-center border-b-2 border-transparent px-3 py-2 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/30 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-selected:border-primary data-selected:text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(fe,{className:i,"data-slot":`tabs-tab`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function we(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`focus-visible:outline-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(he,{className:i,"data-slot":`tabs-panel`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ce as i,Se as n,we as r,xe as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/tags-editor.js b/spinifex/services/spinifexui/frontend/dist/assets/tags-editor.js index cc3f8d1e2..e03868ea8 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/tags-editor.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/tags-editor.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{c as i,i as a,n as o,s,t as c}from"./select.js";import{t as l}from"./plus.js";import{t as u}from"./trash-2.js";import{t as d}from"./button.js";import{er as f}from"./index.js";import{a as p,r as m,t as h}from"./field.js";var ee=r(),te=t(n(),1),g=e();function ne(e,t){let n=new Map;for(let e of t)e.Key!==void 0&&n.set(e.Key,e.Value??``);let r={};for(let t of e)r[t.key]=n.get(t.key)??``;return r}function _(e,t){if(e.type===`int`){if(t.trim()===``)return`Value is required`;if(!/^-?\d+$/.test(t))return`Must be a whole number`;let n=Number(t);if(e.min!==void 0&&ne.max)return`Must be at most ${e.max}`}}function v(e){let t=(0,ee.c)(56),{specs:n,attributes:r,onSubmit:a,isPending:l,error:u,isSuccess:v}=e,b;t[0]!==r||t[1]!==n?(b=ne(n,r),t[0]=r,t[1]=n,t[2]=b):b=t[2];let x=b,[S,C]=(0,te.useState)(x),w;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(w=(e,t)=>{C(n=>({...n,[e]:t}))},t[3]=w):w=t[3];let T=w,E;if(t[4]!==n||t[5]!==S){E={};for(let e of n)E[e.key]=_(e,S[e.key]??``);t[4]=n,t[5]=S,t[6]=E}else E=t[6];let D=Object.values(E).some(Boolean),O;if(t[7]!==x||t[8]!==n||t[9]!==S){let e;t[11]!==x||t[12]!==S?(e=e=>(S[e.key]??``)!==(x[e.key]??``),t[11]=x,t[12]=S,t[13]=e):e=t[13];let r;t[14]===S?r=t[15]:(r=e=>({key:e.key,value:S[e.key]??``}),t[14]=S,t[15]=r),O=n.filter(e).map(r),t[7]=x,t[8]=n,t[9]=S,t[10]=O}else O=t[10];let k=O,A;t[16]===x?A=t[17]:(A=()=>{C(x)},t[16]=x,t[17]=A);let j=A,M;t[18]!==k||t[19]!==D||t[20]!==a?(M=e=>{e.preventDefault(),!(D||k.length===0)&&a(k)},t[18]=k,t[19]=D,t[20]=a,t[21]=M):M=t[21];let N;t[22]===u?N=t[23]:(N=u&&(0,g.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:u.message||`Failed to save attributes`}),t[22]=u,t[23]=N);let P;t[24]!==k.length||t[25]!==v?(P=v&&k.length===0&&(0,g.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Attributes saved.`}),t[24]=k.length,t[25]=v,t[26]=P):P=t[26];let F;if(t[27]!==E||t[28]!==n||t[29]!==S){let e;t[31]!==E||t[32]!==S?(e=e=>{let t=`attr-${e.key}`,n=S[e.key]??``,r=E[e.key];return(0,g.jsxs)(h,{children:[(0,g.jsx)(p,{children:(0,g.jsx)(`label`,{htmlFor:t,children:e.label})}),e.type===`bool`&&(0,g.jsx)(`input`,{"aria-label":e.label,checked:n===`true`,id:t,onChange:t=>T(e.key,t.target.checked?`true`:`false`),type:`checkbox`}),e.type===`int`&&(0,g.jsx)(f,{"aria-invalid":!!r,id:t,inputMode:`numeric`,onChange:t=>T(e.key,t.target.value),value:n}),e.type===`text`&&(0,g.jsx)(f,{id:t,onChange:t=>T(e.key,t.target.value),placeholder:e.placeholder,value:n}),e.type===`select`&&(0,g.jsxs)(c,{onValueChange:t=>T(e.key,t??``),value:n,children:[(0,g.jsx)(s,{className:`w-full`,id:t,children:(0,g.jsx)(i,{})}),(0,g.jsx)(o,{children:e.options.map(y)})]}),e.description&&(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}),(0,g.jsx)(m,{errors:[r?{message:r}:void 0]})]},e.key)},t[31]=E,t[32]=S,t[33]=e):e=t[33],F=n.map(e),t[27]=E,t[28]=n,t[29]=S,t[30]=F}else F=t[30];let I;t[34]===F?I=t[35]:(I=(0,g.jsx)(`div`,{className:`grid gap-4 p-4 sm:grid-cols-2`,children:F}),t[34]=F,t[35]=I);let L=k.length===0?`No changes`:`${k.length} change${k.length===1?``:`s`} pending`,R;t[36]===L?R=t[37]:(R=(0,g.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:L}),t[36]=L,t[37]=R);let z=l||k.length===0,B;t[38]!==j||t[39]!==z?(B=(0,g.jsx)(d,{disabled:z,onClick:j,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[38]=j,t[39]=z,t[40]=B):B=t[40];let V=l||D||k.length===0,H=l?`Saving…`:`Save changes`,U;t[41]!==V||t[42]!==H?(U=(0,g.jsx)(d,{disabled:V,size:`sm`,type:`submit`,children:H}),t[41]=V,t[42]=H,t[43]=U):U=t[43];let W;t[44]!==R||t[45]!==B||t[46]!==U?(W=(0,g.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[R,B,U]}),t[44]=R,t[45]=B,t[46]=U,t[47]=W):W=t[47];let G;t[48]!==W||t[49]!==I?(G=(0,g.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[I,W]}),t[48]=W,t[49]=I,t[50]=G):G=t[50];let K;return t[51]!==G||t[52]!==M||t[53]!==N||t[54]!==P?(K=(0,g.jsxs)(`form`,{onSubmit:M,children:[N,P,G]}),t[51]=G,t[52]=M,t[53]=N,t[54]=P,t[55]=K):K=t[55],K}function y(e){return(0,g.jsx)(a,{value:e,children:e},e)}var b=[{key:`deletion_protection.enabled`,label:`Deletion protection`,type:`bool`},{key:`load_balancing.cross_zone.enabled`,label:`Cross-zone load balancing`,type:`bool`},{key:`idle_timeout.timeout_seconds`,label:`Idle timeout (s)`,type:`int`,min:1,max:4e3},{key:`client_keep_alive.seconds`,label:`Client keep-alive (s)`,type:`int`,min:60,max:604800},{key:`routing.http2.enabled`,label:`HTTP/2`,type:`bool`},{key:`routing.http.drop_invalid_header_fields.enabled`,label:`Drop invalid header fields`,type:`bool`},{key:`routing.http.preserve_host_header.enabled`,label:`Preserve host header`,type:`bool`},{key:`routing.http.xff_client_port.enabled`,label:`XFF client port`,type:`bool`},{key:`routing.http.xff_header_processing.mode`,label:`XFF header processing`,type:`select`,options:[`append`,`preserve`,`remove`]},{key:`routing.http.desync_mitigation_mode`,label:`Desync mitigation mode`,type:`select`,options:[`defensive`,`strictest`,`monitor`]},{key:`routing.http.x_amzn_tls_version_and_cipher_suite.enabled`,label:`Add TLS version & cipher headers`,type:`bool`},{key:`waf.fail_open.enabled`,label:`WAF fail open`,type:`bool`},{key:`zonal_shift.config.enabled`,label:`Zonal shift`,type:`bool`},{key:`access_logs.s3.enabled`,label:`Access logs: enabled`,type:`bool`},{key:`access_logs.s3.bucket`,label:`Access logs: S3 bucket`,type:`text`},{key:`access_logs.s3.prefix`,label:`Access logs: S3 prefix`,type:`text`},{key:`connection_logs.s3.enabled`,label:`Connection logs: enabled`,type:`bool`},{key:`connection_logs.s3.bucket`,label:`Connection logs: S3 bucket`,type:`text`},{key:`connection_logs.s3.prefix`,label:`Connection logs: S3 prefix`,type:`text`}],x=[{key:`deregistration_delay.timeout_seconds`,label:`Deregistration delay (s)`,type:`int`,min:0,max:3600},{key:`stickiness.enabled`,label:`Stickiness`,type:`bool`},{key:`stickiness.type`,label:`Stickiness type`,type:`select`,options:[`lb_cookie`,`source_ip`]},{key:`stickiness.lb_cookie.duration_seconds`,label:`Stickiness lb_cookie duration (s)`,type:`int`,min:1,max:604800},{key:`load_balancing.cross_zone.enabled`,label:`Cross-zone load balancing`,type:`select`,options:[`true`,`false`,`use_load_balancer_configuration`]},{key:`load_balancing.algorithm.type`,label:`Load balancing algorithm`,type:`select`,options:[`round_robin`,`least_outstanding_requests`]},{key:`slow_start.duration_seconds`,label:`Slow start duration (s)`,type:`int`,min:0,max:900}];function S(e){return e.map((e,t)=>({id:t,key:e.Key??``,value:e.Value??``}))}function C(e){return e.map(e=>({key:e.key.trim(),value:e.value})).filter(e=>e.key.length>0)}function w(e){let t=(0,ee.c)(66),{tags:n,onSubmit:r,isPending:i,error:a,isSuccess:o}=e,s;t[0]===n?s=t[1]:(s=S(n),t[0]=n,t[1]=s);let c=s,[p,m]=(0,te.useState)(c),[h,ne]=(0,te.useState)(c.length),_;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=(e,t)=>{m(n=>n.map(n=>n.id===e?{...n,...t}:n))},t[2]=_):_=t[2];let v=_,y;t[3]===h?y=t[4]:(y=()=>{m(e=>[...e,{id:h,key:``,value:``}]),ne(D)},t[3]=h,t[4]=y);let b=y,x;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>{m(t=>t.filter(t=>t.id!==e))},t[5]=x):x=t[5];let w=x,O;t[6]===c?O=t[7]:(O=()=>{m(c)},t[6]=c,t[7]=O);let k=O,A;t[8]===p?A=t[9]:(A=p.some(E),t[8]=p,t[9]=A);let j=A,M,N,P,F;if(t[10]!==j||t[11]!==p){P=C(p);let e=P.map(T);M=new Set(e).size!==e.length,N=j||M,F=JSON.stringify(P),t[10]=j,t[11]=p,t[12]=M,t[13]=N,t[14]=P,t[15]=F}else M=t[12],N=t[13],P=t[14],F=t[15];let I;t[16]===c?I=t[17]:(I=JSON.stringify(C(c)),t[16]=c,t[17]=I);let L=F!==I,R;t[18]!==L||t[19]!==N||t[20]!==P||t[21]!==r?(R=e=>{e.preventDefault(),!(N||!L)&&r(P)},t[18]=L,t[19]=N,t[20]=P,t[21]=r,t[22]=R):R=t[22];let z;t[23]===a?z=t[24]:(z=a&&(0,g.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:a.message||`Failed to save tags`}),t[23]=a,t[24]=z);let B;t[25]!==L||t[26]!==o?(B=o&&!L&&(0,g.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Tags saved.`}),t[25]=L,t[26]=o,t[27]=B):B=t[27];let V;t[28]===p.length?V=t[29]:(V=p.length===0&&(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No tags.`}),t[28]=p.length,t[29]=V);let H;if(t[30]!==p){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(f,{"aria-label":`Tag key`,onChange:t=>v(e.id,{key:t.target.value}),placeholder:`Key`,value:e.key}),(0,g.jsx)(f,{"aria-label":`Tag value`,onChange:t=>v(e.id,{value:t.target.value}),placeholder:`Value`,value:e.value}),(0,g.jsx)(d,{"aria-label":`Remove tag`,onClick:()=>w(e.id),size:`icon`,type:`button`,variant:`ghost`,children:(0,g.jsx)(u,{className:`size-4`})})]},e.id),t[32]=e):e=t[32],H=p.map(e),t[30]=p,t[31]=H}else H=t[31];let U;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,g.jsx)(l,{className:`size-4`}),t[33]=U):U=t[33];let W;t[34]===b?W=t[35]:(W=(0,g.jsx)(`div`,{children:(0,g.jsxs)(d,{onClick:b,size:`sm`,type:`button`,variant:`secondary`,children:[U,` Add tag`]})}),t[34]=b,t[35]=W);let G;t[36]===j?G=t[37]:(G=j&&(0,g.jsx)(`p`,{className:`text-xs text-destructive`,children:`Every tag with a value needs a key.`}),t[36]=j,t[37]=G);let K;t[38]===M?K=t[39]:(K=M&&(0,g.jsx)(`p`,{className:`text-xs text-destructive`,children:`Tag keys must be unique.`}),t[38]=M,t[39]=K);let q;t[40]!==V||t[41]!==H||t[42]!==W||t[43]!==G||t[44]!==K?(q=(0,g.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[V,H,W,G,K]}),t[40]=V,t[41]=H,t[42]=W,t[43]=G,t[44]=K,t[45]=q):q=t[45];let re=L?`Unsaved changes`:`No changes`,J;t[46]===re?J=t[47]:(J=(0,g.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:re}),t[46]=re,t[47]=J);let ie=i||!L,Y;t[48]!==k||t[49]!==ie?(Y=(0,g.jsx)(d,{disabled:ie,onClick:k,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[48]=k,t[49]=ie,t[50]=Y):Y=t[50];let ae=i||N||!L,oe=i?`Saving…`:`Save changes`,X;t[51]!==ae||t[52]!==oe?(X=(0,g.jsx)(d,{disabled:ae,size:`sm`,type:`submit`,children:oe}),t[51]=ae,t[52]=oe,t[53]=X):X=t[53];let Z;t[54]!==J||t[55]!==Y||t[56]!==X?(Z=(0,g.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[J,Y,X]}),t[54]=J,t[55]=Y,t[56]=X,t[57]=Z):Z=t[57];let Q;t[58]!==q||t[59]!==Z?(Q=(0,g.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[q,Z]}),t[58]=q,t[59]=Z,t[60]=Q):Q=t[60];let $;return t[61]!==z||t[62]!==B||t[63]!==Q||t[64]!==R?($=(0,g.jsxs)(`form`,{onSubmit:R,children:[z,B,Q]}),t[61]=z,t[62]=B,t[63]=Q,t[64]=R,t[65]=$):$=t[65],$}function T(e){return e.key}function E(e){return e.key.trim().length===0&&e.value.length>0}function D(e){return e+1}export{x as i,v as n,b as r,w as t}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{c as i,i as a,n as o,s,t as c}from"./select.js";import{t as l}from"./plus.js";import{t as u}from"./trash-2.js";import{t as d}from"./button.js";import{nr as f}from"./index.js";import{a as p,r as m,t as h}from"./field.js";var ee=r(),te=t(n(),1),g=e();function ne(e,t){let n=new Map;for(let e of t)e.Key!==void 0&&n.set(e.Key,e.Value??``);let r={};for(let t of e)r[t.key]=n.get(t.key)??``;return r}function _(e,t){if(e.type===`int`){if(t.trim()===``)return`Value is required`;if(!/^-?\d+$/.test(t))return`Must be a whole number`;let n=Number(t);if(e.min!==void 0&&ne.max)return`Must be at most ${e.max}`}}function v(e){let t=(0,ee.c)(56),{specs:n,attributes:r,onSubmit:a,isPending:l,error:u,isSuccess:v}=e,b;t[0]!==r||t[1]!==n?(b=ne(n,r),t[0]=r,t[1]=n,t[2]=b):b=t[2];let x=b,[S,C]=(0,te.useState)(x),w;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(w=(e,t)=>{C(n=>({...n,[e]:t}))},t[3]=w):w=t[3];let T=w,E;if(t[4]!==n||t[5]!==S){E={};for(let e of n)E[e.key]=_(e,S[e.key]??``);t[4]=n,t[5]=S,t[6]=E}else E=t[6];let D=Object.values(E).some(Boolean),O;if(t[7]!==x||t[8]!==n||t[9]!==S){let e;t[11]!==x||t[12]!==S?(e=e=>(S[e.key]??``)!==(x[e.key]??``),t[11]=x,t[12]=S,t[13]=e):e=t[13];let r;t[14]===S?r=t[15]:(r=e=>({key:e.key,value:S[e.key]??``}),t[14]=S,t[15]=r),O=n.filter(e).map(r),t[7]=x,t[8]=n,t[9]=S,t[10]=O}else O=t[10];let k=O,A;t[16]===x?A=t[17]:(A=()=>{C(x)},t[16]=x,t[17]=A);let j=A,M;t[18]!==k||t[19]!==D||t[20]!==a?(M=e=>{e.preventDefault(),!(D||k.length===0)&&a(k)},t[18]=k,t[19]=D,t[20]=a,t[21]=M):M=t[21];let N;t[22]===u?N=t[23]:(N=u&&(0,g.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:u.message||`Failed to save attributes`}),t[22]=u,t[23]=N);let P;t[24]!==k.length||t[25]!==v?(P=v&&k.length===0&&(0,g.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Attributes saved.`}),t[24]=k.length,t[25]=v,t[26]=P):P=t[26];let F;if(t[27]!==E||t[28]!==n||t[29]!==S){let e;t[31]!==E||t[32]!==S?(e=e=>{let t=`attr-${e.key}`,n=S[e.key]??``,r=E[e.key];return(0,g.jsxs)(h,{children:[(0,g.jsx)(p,{children:(0,g.jsx)(`label`,{htmlFor:t,children:e.label})}),e.type===`bool`&&(0,g.jsx)(`input`,{"aria-label":e.label,checked:n===`true`,id:t,onChange:t=>T(e.key,t.target.checked?`true`:`false`),type:`checkbox`}),e.type===`int`&&(0,g.jsx)(f,{"aria-invalid":!!r,id:t,inputMode:`numeric`,onChange:t=>T(e.key,t.target.value),value:n}),e.type===`text`&&(0,g.jsx)(f,{id:t,onChange:t=>T(e.key,t.target.value),placeholder:e.placeholder,value:n}),e.type===`select`&&(0,g.jsxs)(c,{onValueChange:t=>T(e.key,t??``),value:n,children:[(0,g.jsx)(s,{className:`w-full`,id:t,children:(0,g.jsx)(i,{})}),(0,g.jsx)(o,{children:e.options.map(y)})]}),e.description&&(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}),(0,g.jsx)(m,{errors:[r?{message:r}:void 0]})]},e.key)},t[31]=E,t[32]=S,t[33]=e):e=t[33],F=n.map(e),t[27]=E,t[28]=n,t[29]=S,t[30]=F}else F=t[30];let I;t[34]===F?I=t[35]:(I=(0,g.jsx)(`div`,{className:`grid gap-4 p-4 sm:grid-cols-2`,children:F}),t[34]=F,t[35]=I);let L=k.length===0?`No changes`:`${k.length} change${k.length===1?``:`s`} pending`,R;t[36]===L?R=t[37]:(R=(0,g.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:L}),t[36]=L,t[37]=R);let z=l||k.length===0,B;t[38]!==j||t[39]!==z?(B=(0,g.jsx)(d,{disabled:z,onClick:j,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[38]=j,t[39]=z,t[40]=B):B=t[40];let V=l||D||k.length===0,H=l?`Saving…`:`Save changes`,U;t[41]!==V||t[42]!==H?(U=(0,g.jsx)(d,{disabled:V,size:`sm`,type:`submit`,children:H}),t[41]=V,t[42]=H,t[43]=U):U=t[43];let W;t[44]!==R||t[45]!==B||t[46]!==U?(W=(0,g.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[R,B,U]}),t[44]=R,t[45]=B,t[46]=U,t[47]=W):W=t[47];let G;t[48]!==W||t[49]!==I?(G=(0,g.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[I,W]}),t[48]=W,t[49]=I,t[50]=G):G=t[50];let K;return t[51]!==G||t[52]!==M||t[53]!==N||t[54]!==P?(K=(0,g.jsxs)(`form`,{onSubmit:M,children:[N,P,G]}),t[51]=G,t[52]=M,t[53]=N,t[54]=P,t[55]=K):K=t[55],K}function y(e){return(0,g.jsx)(a,{value:e,children:e},e)}var b=[{key:`deletion_protection.enabled`,label:`Deletion protection`,type:`bool`},{key:`load_balancing.cross_zone.enabled`,label:`Cross-zone load balancing`,type:`bool`},{key:`idle_timeout.timeout_seconds`,label:`Idle timeout (s)`,type:`int`,min:1,max:4e3},{key:`client_keep_alive.seconds`,label:`Client keep-alive (s)`,type:`int`,min:60,max:604800},{key:`routing.http2.enabled`,label:`HTTP/2`,type:`bool`},{key:`routing.http.drop_invalid_header_fields.enabled`,label:`Drop invalid header fields`,type:`bool`},{key:`routing.http.preserve_host_header.enabled`,label:`Preserve host header`,type:`bool`},{key:`routing.http.xff_client_port.enabled`,label:`XFF client port`,type:`bool`},{key:`routing.http.xff_header_processing.mode`,label:`XFF header processing`,type:`select`,options:[`append`,`preserve`,`remove`]},{key:`routing.http.desync_mitigation_mode`,label:`Desync mitigation mode`,type:`select`,options:[`defensive`,`strictest`,`monitor`]},{key:`routing.http.x_amzn_tls_version_and_cipher_suite.enabled`,label:`Add TLS version & cipher headers`,type:`bool`},{key:`waf.fail_open.enabled`,label:`WAF fail open`,type:`bool`},{key:`zonal_shift.config.enabled`,label:`Zonal shift`,type:`bool`},{key:`access_logs.s3.enabled`,label:`Access logs: enabled`,type:`bool`},{key:`access_logs.s3.bucket`,label:`Access logs: S3 bucket`,type:`text`},{key:`access_logs.s3.prefix`,label:`Access logs: S3 prefix`,type:`text`},{key:`connection_logs.s3.enabled`,label:`Connection logs: enabled`,type:`bool`},{key:`connection_logs.s3.bucket`,label:`Connection logs: S3 bucket`,type:`text`},{key:`connection_logs.s3.prefix`,label:`Connection logs: S3 prefix`,type:`text`}],x=[{key:`deregistration_delay.timeout_seconds`,label:`Deregistration delay (s)`,type:`int`,min:0,max:3600},{key:`stickiness.enabled`,label:`Stickiness`,type:`bool`},{key:`stickiness.type`,label:`Stickiness type`,type:`select`,options:[`lb_cookie`,`source_ip`]},{key:`stickiness.lb_cookie.duration_seconds`,label:`Stickiness lb_cookie duration (s)`,type:`int`,min:1,max:604800},{key:`load_balancing.cross_zone.enabled`,label:`Cross-zone load balancing`,type:`select`,options:[`true`,`false`,`use_load_balancer_configuration`]},{key:`load_balancing.algorithm.type`,label:`Load balancing algorithm`,type:`select`,options:[`round_robin`,`least_outstanding_requests`]},{key:`slow_start.duration_seconds`,label:`Slow start duration (s)`,type:`int`,min:0,max:900}];function S(e){return e.map((e,t)=>({id:t,key:e.Key??``,value:e.Value??``}))}function C(e){return e.map(e=>({key:e.key.trim(),value:e.value})).filter(e=>e.key.length>0)}function w(e){let t=(0,ee.c)(66),{tags:n,onSubmit:r,isPending:i,error:a,isSuccess:o}=e,s;t[0]===n?s=t[1]:(s=S(n),t[0]=n,t[1]=s);let c=s,[p,m]=(0,te.useState)(c),[h,ne]=(0,te.useState)(c.length),_;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=(e,t)=>{m(n=>n.map(n=>n.id===e?{...n,...t}:n))},t[2]=_):_=t[2];let v=_,y;t[3]===h?y=t[4]:(y=()=>{m(e=>[...e,{id:h,key:``,value:``}]),ne(D)},t[3]=h,t[4]=y);let b=y,x;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>{m(t=>t.filter(t=>t.id!==e))},t[5]=x):x=t[5];let w=x,O;t[6]===c?O=t[7]:(O=()=>{m(c)},t[6]=c,t[7]=O);let k=O,A;t[8]===p?A=t[9]:(A=p.some(E),t[8]=p,t[9]=A);let j=A,M,N,P,F;if(t[10]!==j||t[11]!==p){P=C(p);let e=P.map(T);M=new Set(e).size!==e.length,N=j||M,F=JSON.stringify(P),t[10]=j,t[11]=p,t[12]=M,t[13]=N,t[14]=P,t[15]=F}else M=t[12],N=t[13],P=t[14],F=t[15];let I;t[16]===c?I=t[17]:(I=JSON.stringify(C(c)),t[16]=c,t[17]=I);let L=F!==I,R;t[18]!==L||t[19]!==N||t[20]!==P||t[21]!==r?(R=e=>{e.preventDefault(),!(N||!L)&&r(P)},t[18]=L,t[19]=N,t[20]=P,t[21]=r,t[22]=R):R=t[22];let z;t[23]===a?z=t[24]:(z=a&&(0,g.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:a.message||`Failed to save tags`}),t[23]=a,t[24]=z);let B;t[25]!==L||t[26]!==o?(B=o&&!L&&(0,g.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Tags saved.`}),t[25]=L,t[26]=o,t[27]=B):B=t[27];let V;t[28]===p.length?V=t[29]:(V=p.length===0&&(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No tags.`}),t[28]=p.length,t[29]=V);let H;if(t[30]!==p){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(f,{"aria-label":`Tag key`,onChange:t=>v(e.id,{key:t.target.value}),placeholder:`Key`,value:e.key}),(0,g.jsx)(f,{"aria-label":`Tag value`,onChange:t=>v(e.id,{value:t.target.value}),placeholder:`Value`,value:e.value}),(0,g.jsx)(d,{"aria-label":`Remove tag`,onClick:()=>w(e.id),size:`icon`,type:`button`,variant:`ghost`,children:(0,g.jsx)(u,{className:`size-4`})})]},e.id),t[32]=e):e=t[32],H=p.map(e),t[30]=p,t[31]=H}else H=t[31];let U;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,g.jsx)(l,{className:`size-4`}),t[33]=U):U=t[33];let W;t[34]===b?W=t[35]:(W=(0,g.jsx)(`div`,{children:(0,g.jsxs)(d,{onClick:b,size:`sm`,type:`button`,variant:`secondary`,children:[U,` Add tag`]})}),t[34]=b,t[35]=W);let G;t[36]===j?G=t[37]:(G=j&&(0,g.jsx)(`p`,{className:`text-xs text-destructive`,children:`Every tag with a value needs a key.`}),t[36]=j,t[37]=G);let K;t[38]===M?K=t[39]:(K=M&&(0,g.jsx)(`p`,{className:`text-xs text-destructive`,children:`Tag keys must be unique.`}),t[38]=M,t[39]=K);let q;t[40]!==V||t[41]!==H||t[42]!==W||t[43]!==G||t[44]!==K?(q=(0,g.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[V,H,W,G,K]}),t[40]=V,t[41]=H,t[42]=W,t[43]=G,t[44]=K,t[45]=q):q=t[45];let re=L?`Unsaved changes`:`No changes`,J;t[46]===re?J=t[47]:(J=(0,g.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:re}),t[46]=re,t[47]=J);let ie=i||!L,Y;t[48]!==k||t[49]!==ie?(Y=(0,g.jsx)(d,{disabled:ie,onClick:k,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[48]=k,t[49]=ie,t[50]=Y):Y=t[50];let ae=i||N||!L,oe=i?`Saving…`:`Save changes`,X;t[51]!==ae||t[52]!==oe?(X=(0,g.jsx)(d,{disabled:ae,size:`sm`,type:`submit`,children:oe}),t[51]=ae,t[52]=oe,t[53]=X):X=t[53];let Z;t[54]!==J||t[55]!==Y||t[56]!==X?(Z=(0,g.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[J,Y,X]}),t[54]=J,t[55]=Y,t[56]=X,t[57]=Z):Z=t[57];let Q;t[58]!==q||t[59]!==Z?(Q=(0,g.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[q,Z]}),t[58]=q,t[59]=Z,t[60]=Q):Q=t[60];let $;return t[61]!==z||t[62]!==B||t[63]!==Q||t[64]!==R?($=(0,g.jsxs)(`form`,{onSubmit:R,children:[z,B,Q]}),t[61]=z,t[62]=B,t[63]=Q,t[64]=R,t[65]=$):$=t[65],$}function T(e){return e.key}function E(e){return e.key.trim().length===0&&e.value.length>0}function D(e){return e+1}export{x as i,v as n,b as r,w as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/target-group-form.js b/spinifex/services/spinifexui/frontend/dist/assets/target-group-form.js index ebd934741..0e29428eb 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/target-group-form.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/target-group-form.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{Ut as ee}from"./auth.js";import{c as te,i as ne,n as re,s as ie,t as ae}from"./select.js";import{t as oe}from"./plus.js";import{t as se}from"./trash-2.js";import{t as ce}from"./button.js";import{er as n}from"./index.js";import{a as le,n as ue}from"./zod.js";import{a as r,r as i,t as a}from"./field.js";import{n as de,r as fe,t as pe}from"./collapsible.js";var me=t(),o=e();function he(e){let t=(0,me.c)(147),{form:ee,vpcs:ne,allowedProtocols:he}=e,ve;t[0]===he?ve=t[1]:(ve=he===void 0?[`HTTP`,`HTTPS`,`TCP`,`UDP`,`TLS`,`TCP_UDP`]:he,t[0]=he,t[1]=ve);let ye=ve,{control:s,register:c,setValue:l,getValues:u,formState:be}=ee,{errors:d}=be,xe;t[2]===s?xe=t[3]:(xe={control:s,name:`tags`},t[2]=s,t[3]=xe);let Se=le(xe),Ce;t[4]===s?Ce=t[5]:(Ce={control:s,name:`protocol`},t[4]=s,t[5]=Ce);let we=le(Ce),f=we===`HTTP`||we===`HTTPS`,Te;t[6]===l?Te=t[7]:(Te=e=>{e&&(l(`protocol`,e),l(`healthCheck.protocol`,e===`HTTP`||e===`HTTPS`?`HTTP`:`TCP`))},t[6]=l,t[7]=Te);let Ee=Te,De;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`tg-name`,children:`Name`})}),t[8]=De):De=t[8];let Oe=!!d.name,p;t[9]===c?p=t[10]:(p=c(`name`),t[9]=c,t[10]=p);let m;t[11]!==Oe||t[12]!==p?(m=(0,o.jsx)(n,{"aria-invalid":Oe,id:`tg-name`,placeholder:`my-target-group`,...p}),t[11]=Oe,t[12]=p,t[13]=m):m=t[13];let h;t[14]===d.name?h=t[15]:(h=(0,o.jsx)(i,{errors:[d.name]}),t[14]=d.name,t[15]=h);let g;t[16]!==m||t[17]!==h?(g=(0,o.jsxs)(a,{children:[De,m,h]}),t[16]=m,t[17]=h,t[18]=g):g=t[18];let ke;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`tg-protocol`,children:`Protocol`})}),t[19]=ke):ke=t[19];let _;t[20]!==ye||t[21]!==Ee?(_=e=>{let{field:t}=e;return(0,o.jsxs)(ae,{onValueChange:Ee,value:t.value,children:[(0,o.jsx)(ie,{className:`w-full`,id:`tg-protocol`,children:(0,o.jsx)(te,{})}),(0,o.jsx)(re,{children:ye.map(_e)})]})},t[20]=ye,t[21]=Ee,t[22]=_):_=t[22];let v;t[23]!==s||t[24]!==_?(v=(0,o.jsxs)(a,{children:[ke,(0,o.jsx)(ue,{control:s,name:`protocol`,render:_})]}),t[23]=s,t[24]=_,t[25]=v):v=t[25];let Ae;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`tg-port`,children:`Port`})}),t[26]=Ae):Ae=t[26];let je=!!d.port,y;t[27]===c?y=t[28]:(y=c(`port`,{valueAsNumber:!0}),t[27]=c,t[28]=y);let b;t[29]!==je||t[30]!==y?(b=(0,o.jsx)(n,{"aria-invalid":je,id:`tg-port`,inputMode:`numeric`,placeholder:`80`,type:`number`,...y}),t[29]=je,t[30]=y,t[31]=b):b=t[31];let x;t[32]===d.port?x=t[33]:(x=(0,o.jsx)(i,{errors:[d.port]}),t[32]=d.port,t[33]=x);let S;t[34]!==b||t[35]!==x?(S=(0,o.jsxs)(a,{children:[Ae,b,x]}),t[34]=b,t[35]=x,t[36]=S):S=t[36];let Me;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`tg-vpc`,children:`VPC`})}),t[37]=Me):Me=t[37];let C;t[38]!==d.vpcId||t[39]!==ne?(C=e=>{let{field:t}=e;return(0,o.jsxs)(ae,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,o.jsx)(ie,{"aria-invalid":!!d.vpcId,className:`w-full`,id:`tg-vpc`,children:(0,o.jsx)(te,{placeholder:`Select VPC`})}),(0,o.jsx)(re,{children:ne.map(ge)})]})},t[38]=d.vpcId,t[39]=ne,t[40]=C):C=t[40];let w;t[41]!==s||t[42]!==C?(w=(0,o.jsx)(ue,{control:s,name:`vpcId`,render:C}),t[41]=s,t[42]=C,t[43]=w):w=t[43];let T;t[44]===d.vpcId?T=t[45]:(T=(0,o.jsx)(i,{errors:[d.vpcId]}),t[44]=d.vpcId,t[45]=T);let E;t[46]!==w||t[47]!==T?(E=(0,o.jsxs)(a,{children:[Me,w,T]}),t[46]=w,t[47]=T,t[48]=E):E=t[48];let Ne;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,o.jsx)(fe,{className:`text-left text-sm font-medium text-muted-foreground hover:text-foreground`,render:(0,o.jsx)(`button`,{"aria-label":`Health check settings`,type:`button`}),children:`Health check settings`}),t[49]=Ne):Ne=t[49];let D;t[50]!==d.healthCheck?.path||t[51]!==f||t[52]!==c?(D=f&&(0,o.jsxs)(a,{children:[(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-path`,children:`Path`})}),(0,o.jsx)(n,{"aria-invalid":!!d.healthCheck?.path,id:`hc-path`,placeholder:`/`,...c(`healthCheck.path`)}),(0,o.jsx)(i,{errors:[d.healthCheck?.path]})]}),t[50]=d.healthCheck?.path,t[51]=f,t[52]=c,t[53]=D):D=t[53];let Pe;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-port`,children:`Port`})}),t[54]=Pe):Pe=t[54];let Fe=!!d.healthCheck?.port,O;t[55]===c?O=t[56]:(O=c(`healthCheck.port`),t[55]=c,t[56]=O);let k;t[57]!==Fe||t[58]!==O?(k=(0,o.jsx)(n,{"aria-invalid":Fe,id:`hc-port`,placeholder:`traffic-port or numeric`,...O}),t[57]=Fe,t[58]=O,t[59]=k):k=t[59];let Ie=d.healthCheck?.port,A;t[60]===Ie?A=t[61]:(A=(0,o.jsx)(i,{errors:[Ie]}),t[60]=Ie,t[61]=A);let j;t[62]!==k||t[63]!==A?(j=(0,o.jsxs)(a,{children:[Pe,k,A]}),t[62]=k,t[63]=A,t[64]=j):j=t[64];let Le;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-interval`,children:`Interval (seconds)`})}),t[65]=Le):Le=t[65];let Re=!!d.healthCheck?.intervalSeconds,M;t[66]===c?M=t[67]:(M=c(`healthCheck.intervalSeconds`,{valueAsNumber:!0}),t[66]=c,t[67]=M);let N;t[68]!==Re||t[69]!==M?(N=(0,o.jsx)(n,{"aria-invalid":Re,id:`hc-interval`,inputMode:`numeric`,type:`number`,...M}),t[68]=Re,t[69]=M,t[70]=N):N=t[70];let ze=d.healthCheck?.intervalSeconds,P;t[71]===ze?P=t[72]:(P=(0,o.jsx)(i,{errors:[ze]}),t[71]=ze,t[72]=P);let F;t[73]!==N||t[74]!==P?(F=(0,o.jsxs)(a,{children:[Le,N,P]}),t[73]=N,t[74]=P,t[75]=F):F=t[75];let Be;t[76]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-timeout`,children:`Timeout (seconds)`})}),t[76]=Be):Be=t[76];let Ve=!!d.healthCheck?.timeoutSeconds,I;t[77]===c?I=t[78]:(I=c(`healthCheck.timeoutSeconds`,{valueAsNumber:!0}),t[77]=c,t[78]=I);let L;t[79]!==Ve||t[80]!==I?(L=(0,o.jsx)(n,{"aria-invalid":Ve,id:`hc-timeout`,inputMode:`numeric`,type:`number`,...I}),t[79]=Ve,t[80]=I,t[81]=L):L=t[81];let He=d.healthCheck?.timeoutSeconds,R;t[82]===He?R=t[83]:(R=(0,o.jsx)(i,{errors:[He]}),t[82]=He,t[83]=R);let z;t[84]!==L||t[85]!==R?(z=(0,o.jsxs)(a,{children:[Be,L,R]}),t[84]=L,t[85]=R,t[86]=z):z=t[86];let Ue;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-healthy`,children:`Healthy threshold`})}),t[87]=Ue):Ue=t[87];let We=!!d.healthCheck?.healthyThresholdCount,B;t[88]===c?B=t[89]:(B=c(`healthCheck.healthyThresholdCount`,{valueAsNumber:!0}),t[88]=c,t[89]=B);let V;t[90]!==We||t[91]!==B?(V=(0,o.jsx)(n,{"aria-invalid":We,id:`hc-healthy`,inputMode:`numeric`,type:`number`,...B}),t[90]=We,t[91]=B,t[92]=V):V=t[92];let Ge=d.healthCheck?.healthyThresholdCount,H;t[93]===Ge?H=t[94]:(H=(0,o.jsx)(i,{errors:[Ge]}),t[93]=Ge,t[94]=H);let U;t[95]!==V||t[96]!==H?(U=(0,o.jsxs)(a,{children:[Ue,V,H]}),t[95]=V,t[96]=H,t[97]=U):U=t[97];let Ke;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-unhealthy`,children:`Unhealthy threshold`})}),t[98]=Ke):Ke=t[98];let qe=!!d.healthCheck?.unhealthyThresholdCount,W;t[99]===c?W=t[100]:(W=c(`healthCheck.unhealthyThresholdCount`,{valueAsNumber:!0}),t[99]=c,t[100]=W);let G;t[101]!==qe||t[102]!==W?(G=(0,o.jsx)(n,{"aria-invalid":qe,id:`hc-unhealthy`,inputMode:`numeric`,type:`number`,...W}),t[101]=qe,t[102]=W,t[103]=G):G=t[103];let Je=d.healthCheck?.unhealthyThresholdCount,K;t[104]===Je?K=t[105]:(K=(0,o.jsx)(i,{errors:[Je]}),t[104]=Je,t[105]=K);let q;t[106]!==G||t[107]!==K?(q=(0,o.jsxs)(a,{children:[Ke,G,K]}),t[106]=G,t[107]=K,t[108]=q):q=t[108];let J;t[109]!==d.healthCheck?.matcher||t[110]!==f||t[111]!==c?(J=f&&(0,o.jsxs)(a,{children:[(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-matcher`,children:`Matcher (HTTP codes)`})}),(0,o.jsx)(n,{"aria-invalid":!!d.healthCheck?.matcher,id:`hc-matcher`,placeholder:`200 or 200-299 or 200,201`,...c(`healthCheck.matcher`)}),(0,o.jsx)(i,{errors:[d.healthCheck?.matcher]})]}),t[109]=d.healthCheck?.matcher,t[110]=f,t[111]=c,t[112]=J):J=t[112];let Y;t[113]!==D||t[114]!==j||t[115]!==F||t[116]!==z||t[117]!==U||t[118]!==q||t[119]!==J?(Y=(0,o.jsxs)(pe,{children:[Ne,(0,o.jsxs)(de,{className:`mt-3 space-y-4 border-l-2 border-muted pl-4`,children:[D,j,F,z,U,q,J]})]}),t[113]=D,t[114]=j,t[115]=F,t[116]=z,t[117]=U,t[118]=q,t[119]=J,t[120]=Y):Y=t[120];let Ye;t[121]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=(0,o.jsx)(r,{children:`Tags`}),t[121]=Ye):Ye=t[121];let X;if(t[122]!==u||t[123]!==c||t[124]!==l||t[125]!==Se){let e;t[127]!==u||t[128]!==c||t[129]!==l?(e=(e,t)=>(0,o.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,o.jsx)(n,{placeholder:`Key`,...c(`tags.${t}.key`)}),(0,o.jsx)(n,{placeholder:`Value`,...c(`tags.${t}.value`)}),(0,o.jsx)(ce,{onClick:()=>l(`tags`,u(`tags`).filter((e,ee)=>ee!==t)),size:`icon`,type:`button`,variant:`ghost`,children:(0,o.jsx)(se,{className:`size-3.5`})})]},t),t[127]=u,t[128]=c,t[129]=l,t[130]=e):e=t[130],X=Se.map(e),t[122]=u,t[123]=c,t[124]=l,t[125]=Se,t[126]=X}else X=t[126];let Z;t[131]!==u||t[132]!==l?(Z=()=>l(`tags`,[...u(`tags`),{key:``,value:``}]),t[131]=u,t[132]=l,t[133]=Z):Z=t[133];let Xe;t[134]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,o.jsx)(oe,{className:`size-3.5`}),t[134]=Xe):Xe=t[134];let Q;t[135]===Z?Q=t[136]:(Q=(0,o.jsxs)(ce,{onClick:Z,size:`sm`,type:`button`,variant:`outline`,children:[Xe,`Add tag`]}),t[135]=Z,t[136]=Q);let $;t[137]!==X||t[138]!==Q?($=(0,o.jsxs)(a,{children:[Ye,(0,o.jsxs)(`div`,{className:`space-y-2`,children:[X,Q]})]}),t[137]=X,t[138]=Q,t[139]=$):$=t[139];let Ze;return t[140]!==g||t[141]!==v||t[142]!==S||t[143]!==E||t[144]!==Y||t[145]!==$?(Ze=(0,o.jsxs)(o.Fragment,{children:[g,v,S,E,Y,$]}),t[140]=g,t[141]=v,t[142]=S,t[143]=E,t[144]=Y,t[145]=$,t[146]=Ze):Ze=t[146],Ze}function ge(e){let t=ee(e.Tags);return(0,o.jsx)(ne,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function _e(e){return(0,o.jsx)(ne,{value:e,children:e},e)}export{he as t}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{Ut as ee}from"./auth.js";import{c as te,i as ne,n as re,s as ie,t as ae}from"./select.js";import{t as oe}from"./plus.js";import{t as se}from"./trash-2.js";import{t as ce}from"./button.js";import{nr as n}from"./index.js";import{a as le,n as ue}from"./zod.js";import{a as r,r as i,t as a}from"./field.js";import{n as de,r as fe,t as pe}from"./collapsible.js";var me=t(),o=e();function he(e){let t=(0,me.c)(147),{form:ee,vpcs:ne,allowedProtocols:he}=e,ve;t[0]===he?ve=t[1]:(ve=he===void 0?[`HTTP`,`HTTPS`,`TCP`,`UDP`,`TLS`,`TCP_UDP`]:he,t[0]=he,t[1]=ve);let ye=ve,{control:s,register:c,setValue:l,getValues:u,formState:be}=ee,{errors:d}=be,xe;t[2]===s?xe=t[3]:(xe={control:s,name:`tags`},t[2]=s,t[3]=xe);let Se=le(xe),Ce;t[4]===s?Ce=t[5]:(Ce={control:s,name:`protocol`},t[4]=s,t[5]=Ce);let we=le(Ce),f=we===`HTTP`||we===`HTTPS`,Te;t[6]===l?Te=t[7]:(Te=e=>{e&&(l(`protocol`,e),l(`healthCheck.protocol`,e===`HTTP`||e===`HTTPS`?`HTTP`:`TCP`))},t[6]=l,t[7]=Te);let Ee=Te,De;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`tg-name`,children:`Name`})}),t[8]=De):De=t[8];let Oe=!!d.name,p;t[9]===c?p=t[10]:(p=c(`name`),t[9]=c,t[10]=p);let m;t[11]!==Oe||t[12]!==p?(m=(0,o.jsx)(n,{"aria-invalid":Oe,id:`tg-name`,placeholder:`my-target-group`,...p}),t[11]=Oe,t[12]=p,t[13]=m):m=t[13];let h;t[14]===d.name?h=t[15]:(h=(0,o.jsx)(i,{errors:[d.name]}),t[14]=d.name,t[15]=h);let g;t[16]!==m||t[17]!==h?(g=(0,o.jsxs)(a,{children:[De,m,h]}),t[16]=m,t[17]=h,t[18]=g):g=t[18];let ke;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`tg-protocol`,children:`Protocol`})}),t[19]=ke):ke=t[19];let _;t[20]!==ye||t[21]!==Ee?(_=e=>{let{field:t}=e;return(0,o.jsxs)(ae,{onValueChange:Ee,value:t.value,children:[(0,o.jsx)(ie,{className:`w-full`,id:`tg-protocol`,children:(0,o.jsx)(te,{})}),(0,o.jsx)(re,{children:ye.map(_e)})]})},t[20]=ye,t[21]=Ee,t[22]=_):_=t[22];let v;t[23]!==s||t[24]!==_?(v=(0,o.jsxs)(a,{children:[ke,(0,o.jsx)(ue,{control:s,name:`protocol`,render:_})]}),t[23]=s,t[24]=_,t[25]=v):v=t[25];let Ae;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`tg-port`,children:`Port`})}),t[26]=Ae):Ae=t[26];let je=!!d.port,y;t[27]===c?y=t[28]:(y=c(`port`,{valueAsNumber:!0}),t[27]=c,t[28]=y);let b;t[29]!==je||t[30]!==y?(b=(0,o.jsx)(n,{"aria-invalid":je,id:`tg-port`,inputMode:`numeric`,placeholder:`80`,type:`number`,...y}),t[29]=je,t[30]=y,t[31]=b):b=t[31];let x;t[32]===d.port?x=t[33]:(x=(0,o.jsx)(i,{errors:[d.port]}),t[32]=d.port,t[33]=x);let S;t[34]!==b||t[35]!==x?(S=(0,o.jsxs)(a,{children:[Ae,b,x]}),t[34]=b,t[35]=x,t[36]=S):S=t[36];let Me;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`tg-vpc`,children:`VPC`})}),t[37]=Me):Me=t[37];let C;t[38]!==d.vpcId||t[39]!==ne?(C=e=>{let{field:t}=e;return(0,o.jsxs)(ae,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,o.jsx)(ie,{"aria-invalid":!!d.vpcId,className:`w-full`,id:`tg-vpc`,children:(0,o.jsx)(te,{placeholder:`Select VPC`})}),(0,o.jsx)(re,{children:ne.map(ge)})]})},t[38]=d.vpcId,t[39]=ne,t[40]=C):C=t[40];let w;t[41]!==s||t[42]!==C?(w=(0,o.jsx)(ue,{control:s,name:`vpcId`,render:C}),t[41]=s,t[42]=C,t[43]=w):w=t[43];let T;t[44]===d.vpcId?T=t[45]:(T=(0,o.jsx)(i,{errors:[d.vpcId]}),t[44]=d.vpcId,t[45]=T);let E;t[46]!==w||t[47]!==T?(E=(0,o.jsxs)(a,{children:[Me,w,T]}),t[46]=w,t[47]=T,t[48]=E):E=t[48];let Ne;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,o.jsx)(fe,{className:`text-left text-sm font-medium text-muted-foreground hover:text-foreground`,render:(0,o.jsx)(`button`,{"aria-label":`Health check settings`,type:`button`}),children:`Health check settings`}),t[49]=Ne):Ne=t[49];let D;t[50]!==d.healthCheck?.path||t[51]!==f||t[52]!==c?(D=f&&(0,o.jsxs)(a,{children:[(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-path`,children:`Path`})}),(0,o.jsx)(n,{"aria-invalid":!!d.healthCheck?.path,id:`hc-path`,placeholder:`/`,...c(`healthCheck.path`)}),(0,o.jsx)(i,{errors:[d.healthCheck?.path]})]}),t[50]=d.healthCheck?.path,t[51]=f,t[52]=c,t[53]=D):D=t[53];let Pe;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-port`,children:`Port`})}),t[54]=Pe):Pe=t[54];let Fe=!!d.healthCheck?.port,O;t[55]===c?O=t[56]:(O=c(`healthCheck.port`),t[55]=c,t[56]=O);let k;t[57]!==Fe||t[58]!==O?(k=(0,o.jsx)(n,{"aria-invalid":Fe,id:`hc-port`,placeholder:`traffic-port or numeric`,...O}),t[57]=Fe,t[58]=O,t[59]=k):k=t[59];let Ie=d.healthCheck?.port,A;t[60]===Ie?A=t[61]:(A=(0,o.jsx)(i,{errors:[Ie]}),t[60]=Ie,t[61]=A);let j;t[62]!==k||t[63]!==A?(j=(0,o.jsxs)(a,{children:[Pe,k,A]}),t[62]=k,t[63]=A,t[64]=j):j=t[64];let Le;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-interval`,children:`Interval (seconds)`})}),t[65]=Le):Le=t[65];let Re=!!d.healthCheck?.intervalSeconds,M;t[66]===c?M=t[67]:(M=c(`healthCheck.intervalSeconds`,{valueAsNumber:!0}),t[66]=c,t[67]=M);let N;t[68]!==Re||t[69]!==M?(N=(0,o.jsx)(n,{"aria-invalid":Re,id:`hc-interval`,inputMode:`numeric`,type:`number`,...M}),t[68]=Re,t[69]=M,t[70]=N):N=t[70];let ze=d.healthCheck?.intervalSeconds,P;t[71]===ze?P=t[72]:(P=(0,o.jsx)(i,{errors:[ze]}),t[71]=ze,t[72]=P);let F;t[73]!==N||t[74]!==P?(F=(0,o.jsxs)(a,{children:[Le,N,P]}),t[73]=N,t[74]=P,t[75]=F):F=t[75];let Be;t[76]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-timeout`,children:`Timeout (seconds)`})}),t[76]=Be):Be=t[76];let Ve=!!d.healthCheck?.timeoutSeconds,I;t[77]===c?I=t[78]:(I=c(`healthCheck.timeoutSeconds`,{valueAsNumber:!0}),t[77]=c,t[78]=I);let L;t[79]!==Ve||t[80]!==I?(L=(0,o.jsx)(n,{"aria-invalid":Ve,id:`hc-timeout`,inputMode:`numeric`,type:`number`,...I}),t[79]=Ve,t[80]=I,t[81]=L):L=t[81];let He=d.healthCheck?.timeoutSeconds,R;t[82]===He?R=t[83]:(R=(0,o.jsx)(i,{errors:[He]}),t[82]=He,t[83]=R);let z;t[84]!==L||t[85]!==R?(z=(0,o.jsxs)(a,{children:[Be,L,R]}),t[84]=L,t[85]=R,t[86]=z):z=t[86];let Ue;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-healthy`,children:`Healthy threshold`})}),t[87]=Ue):Ue=t[87];let We=!!d.healthCheck?.healthyThresholdCount,B;t[88]===c?B=t[89]:(B=c(`healthCheck.healthyThresholdCount`,{valueAsNumber:!0}),t[88]=c,t[89]=B);let V;t[90]!==We||t[91]!==B?(V=(0,o.jsx)(n,{"aria-invalid":We,id:`hc-healthy`,inputMode:`numeric`,type:`number`,...B}),t[90]=We,t[91]=B,t[92]=V):V=t[92];let Ge=d.healthCheck?.healthyThresholdCount,H;t[93]===Ge?H=t[94]:(H=(0,o.jsx)(i,{errors:[Ge]}),t[93]=Ge,t[94]=H);let U;t[95]!==V||t[96]!==H?(U=(0,o.jsxs)(a,{children:[Ue,V,H]}),t[95]=V,t[96]=H,t[97]=U):U=t[97];let Ke;t[98]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-unhealthy`,children:`Unhealthy threshold`})}),t[98]=Ke):Ke=t[98];let qe=!!d.healthCheck?.unhealthyThresholdCount,W;t[99]===c?W=t[100]:(W=c(`healthCheck.unhealthyThresholdCount`,{valueAsNumber:!0}),t[99]=c,t[100]=W);let G;t[101]!==qe||t[102]!==W?(G=(0,o.jsx)(n,{"aria-invalid":qe,id:`hc-unhealthy`,inputMode:`numeric`,type:`number`,...W}),t[101]=qe,t[102]=W,t[103]=G):G=t[103];let Je=d.healthCheck?.unhealthyThresholdCount,K;t[104]===Je?K=t[105]:(K=(0,o.jsx)(i,{errors:[Je]}),t[104]=Je,t[105]=K);let q;t[106]!==G||t[107]!==K?(q=(0,o.jsxs)(a,{children:[Ke,G,K]}),t[106]=G,t[107]=K,t[108]=q):q=t[108];let J;t[109]!==d.healthCheck?.matcher||t[110]!==f||t[111]!==c?(J=f&&(0,o.jsxs)(a,{children:[(0,o.jsx)(r,{children:(0,o.jsx)(`label`,{htmlFor:`hc-matcher`,children:`Matcher (HTTP codes)`})}),(0,o.jsx)(n,{"aria-invalid":!!d.healthCheck?.matcher,id:`hc-matcher`,placeholder:`200 or 200-299 or 200,201`,...c(`healthCheck.matcher`)}),(0,o.jsx)(i,{errors:[d.healthCheck?.matcher]})]}),t[109]=d.healthCheck?.matcher,t[110]=f,t[111]=c,t[112]=J):J=t[112];let Y;t[113]!==D||t[114]!==j||t[115]!==F||t[116]!==z||t[117]!==U||t[118]!==q||t[119]!==J?(Y=(0,o.jsxs)(pe,{children:[Ne,(0,o.jsxs)(de,{className:`mt-3 space-y-4 border-l-2 border-muted pl-4`,children:[D,j,F,z,U,q,J]})]}),t[113]=D,t[114]=j,t[115]=F,t[116]=z,t[117]=U,t[118]=q,t[119]=J,t[120]=Y):Y=t[120];let Ye;t[121]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=(0,o.jsx)(r,{children:`Tags`}),t[121]=Ye):Ye=t[121];let X;if(t[122]!==u||t[123]!==c||t[124]!==l||t[125]!==Se){let e;t[127]!==u||t[128]!==c||t[129]!==l?(e=(e,t)=>(0,o.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,o.jsx)(n,{placeholder:`Key`,...c(`tags.${t}.key`)}),(0,o.jsx)(n,{placeholder:`Value`,...c(`tags.${t}.value`)}),(0,o.jsx)(ce,{onClick:()=>l(`tags`,u(`tags`).filter((e,ee)=>ee!==t)),size:`icon`,type:`button`,variant:`ghost`,children:(0,o.jsx)(se,{className:`size-3.5`})})]},t),t[127]=u,t[128]=c,t[129]=l,t[130]=e):e=t[130],X=Se.map(e),t[122]=u,t[123]=c,t[124]=l,t[125]=Se,t[126]=X}else X=t[126];let Z;t[131]!==u||t[132]!==l?(Z=()=>l(`tags`,[...u(`tags`),{key:``,value:``}]),t[131]=u,t[132]=l,t[133]=Z):Z=t[133];let Xe;t[134]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,o.jsx)(oe,{className:`size-3.5`}),t[134]=Xe):Xe=t[134];let Q;t[135]===Z?Q=t[136]:(Q=(0,o.jsxs)(ce,{onClick:Z,size:`sm`,type:`button`,variant:`outline`,children:[Xe,`Add tag`]}),t[135]=Z,t[136]=Q);let $;t[137]!==X||t[138]!==Q?($=(0,o.jsxs)(a,{children:[Ye,(0,o.jsxs)(`div`,{className:`space-y-2`,children:[X,Q]})]}),t[137]=X,t[138]=Q,t[139]=$):$=t[139];let Ze;return t[140]!==g||t[141]!==v||t[142]!==S||t[143]!==E||t[144]!==Y||t[145]!==$?(Ze=(0,o.jsxs)(o.Fragment,{children:[g,v,S,E,Y,$]}),t[140]=g,t[141]=v,t[142]=S,t[143]=E,t[144]=Y,t[145]=$,t[146]=Ze):Ze=t[146],Ze}function ge(e){let t=ee(e.Tags);return(0,o.jsx)(ne,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function _e(e){return(0,o.jsx)(ne,{value:e,children:e},e)}export{he as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/task-definitions.js b/spinifex/services/spinifexui/frontend/dist/assets/task-definitions.js new file mode 100644 index 000000000..5c0bd4ca2 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/dist/assets/task-definitions.js @@ -0,0 +1 @@ +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{ni as a}from"./awsClient.js";import{t as o}from"./button.js";import{a as s}from"./ecs.js";import{lt as c}from"./index.js";import{t as l}from"./error-banner.js";import{t as u}from"./page-heading.js";import{t as d}from"./delete-confirmation-dialog.js";import{t as f}from"./ecs-section-nav.js";var p=r(),m=t(n(),1),h=e();function g(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function _(e){let t=(0,p.c)(24),{clusterName:n}=e,{data:r}=i(c),u=s(),[f,_]=(0,m.useState)(null),v;t[0]!==u||t[1]!==f?(v=function(){f&&u.mutate(f,{onSuccess:()=>_(null)})},t[0]=u,t[1]=f,t[2]=v):v=t[2];let y=v,b=n??``,x;t[3]===b?x=t[4]:(x={cluster:b},t[3]=b,t[4]=x);let S;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,h.jsx)(o,{size:`sm`,children:`Register task definition`}),t[5]=S):S=t[5];let C;t[6]===x?C=t[7]:(C=(0,h.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,h.jsx)(a,{search:x,to:`/ecs/register-task-definition`,children:S})}),t[6]=x,t[7]=C);let w;t[8]!==u.error||t[9]!==u.isError?(w=u.isError&&(0,h.jsx)(l,{error:u.error instanceof Error?u.error:void 0,msg:`Failed to deregister task definition.`}),t[8]=u.error,t[9]=u.isError,t[10]=w):w=t[10];let T;t[11]===r?T=t[12]:(T=r.length===0?(0,h.jsx)(`p`,{className:`text-muted-foreground`,children:`No task definitions found.`}):(0,h.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,h.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Family : Revision`}),(0,h.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,h.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,h.jsx)(`tbody`,{children:r.map(e=>{let t=g(e);return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t}),(0,h.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,h.jsx)(o,{onClick:()=>_(t),size:`sm`,variant:`destructive`,children:`Deregister`})})]},e)})})]})}),t[11]=r,t[12]=T);let E=`This marks task definition "${f}" INACTIVE. Existing tasks keep running; no new tasks can use it.`,D;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>!e&&_(null),t[13]=D):D=t[13];let O=f!==null,k;t[14]!==u.isPending||t[15]!==y||t[16]!==O||t[17]!==E?(k=(0,h.jsx)(d,{confirmLabel:`Deregister`,description:E,isPending:u.isPending,onConfirm:y,onOpenChange:D,open:O,pendingLabel:`Deregistering…`,title:`Deregister task definition`}),t[14]=u.isPending,t[15]=y,t[16]=O,t[17]=E,t[18]=k):k=t[18];let A;return t[19]!==k||t[20]!==C||t[21]!==w||t[22]!==T?(A=(0,h.jsxs)(h.Fragment,{children:[C,w,T,k]}),t[19]=k,t[20]=C,t[21]=w,t[22]=T,t[23]=A):A=t[23],A}function v(){let e=(0,p.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u,{title:`Task definitions`}),(0,h.jsx)(f,{}),(0,h.jsx)(_,{})]}),e[0]=t):t=e[0],t}var y=v;export{y as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/trash-2.js b/spinifex/services/spinifexui/frontend/dist/assets/trash-2.js index bdd9b1408..6742e0f32 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/trash-2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/trash-2.js @@ -1 +1 @@ -import{qr as e}from"./index.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t}; \ No newline at end of file +import{Yr as e}from"./index.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/triangle-alert.js b/spinifex/services/spinifexui/frontend/dist/assets/triangle-alert.js index dcf0b75d3..bf557f5b0 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/triangle-alert.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/triangle-alert.js @@ -1 +1 @@ -import{qr as e}from"./index.js";var t=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t}; \ No newline at end of file +import{Yr as e}from"./index.js";var t=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/upload-button.js b/spinifex/services/spinifexui/frontend/dist/assets/upload-button.js index df67f55ee..f6bb4cc43 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/upload-button.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/upload-button.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{h as i,l as a,ni as o,x as s}from"./awsClient.js";import{Bt as c,Nt as l,St as u,Vt as d,ut as f}from"./auth.js";import{t as p}from"./download.js";import{t as m}from"./trash-2.js";import{t as h}from"./button.js";import{M as g}from"./tslib.es6.js";import{a as _,i as v,n as y}from"./s3.js";import{qr as b}from"./index.js";import{t as x}from"./error-banner.js";import{t as S}from"./delete-confirmation-dialog.js";var C=b(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),w=b(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),T=b(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),E=e=>(e,t)=>async n=>{let r=await e(n),{response:i}=r;if(l.isInstance(i)&&i.headers.expires){i.headers.expiresstring=i.headers.expires;try{g(i.headers.expires)}catch(e){t.logger?.warn(`AWS SDK Warning for ${t.clientName}::${t.commandName} response parsing (${i.headers.expires}): ${e}`),delete i.headers.expires}}return r},D={tags:[`S3`],name:`s3ExpiresMiddleware`,override:!0,relation:`after`,toMiddleware:`deserializerMiddleware`},O=e=>({applyToStack:t=>{t.addRelativeTo(E(e),D)}}),k=class extends u.classBuilder().ep({...s,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[f(n,e.getEndpointParameterInstructions()),_(n,{requestChecksumRequired:!1,requestValidationModeMember:`ChecksumMode`,responseAlgorithms:[`CRC64NVME`,`CRC32`,`CRC32C`,`SHA256`,`SHA1`,`SHA512`,`MD5`,`XXHASH64`,`XXHASH3`,`XXHASH128`]}),v(n),O(n)]}).s(`AmazonS3`,`GetObject`,{}).n(`S3Client`,`GetObjectCommand`).sc(i).build(){},A=r(),j=e();function M(e){let t=(0,A.c)(9),{folderName:n,fullPrefix:r,bucketName:i}=e,a;t[0]!==i||t[1]!==r?(a={bucket:i,_splat:r},t[0]=i,t[1]=r,t[2]=a):a=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,j.jsx)(w,{className:`size-5 text-muted-foreground`}),t[3]=s):s=t[3];let c;t[4]===n?c=t[5]:(c=(0,j.jsx)(`span`,{className:`font-medium`,children:n}),t[4]=n,t[5]=c);let l;return t[6]!==a||t[7]!==c?(l=(0,j.jsxs)(o,{className:`flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,params:a,to:`/s3/ls/$bucket/$`,children:[s,c]}),t[6]=a,t[7]=c,t[8]=l):l=t[8],l}var N=t(n(),1);function P({object:e,bucketName:t,displayName:n,fullKey:r}){let[i,o]=(0,N.useState)(!1),[s,l]=(0,N.useState)(null),u=y();async function f(){l(null);try{let e=new k({Bucket:t,Key:r}),i=await a().send(e);if(i.Body){let e=await i.Body.transformToByteArray(),t=URL.createObjectURL(new Blob([e])),r=document.createElement(`a`);r.href=t,r.download=n,document.body.append(r),r.click(),r.remove(),URL.revokeObjectURL(t)}}catch(e){l(Error(`Failed to download object`,{cause:e}))}}async function h(){try{await u.mutateAsync({bucket:t,key:r})}finally{o(!1)}}return(0,j.jsxs)(`div`,{children:[u.error&&(0,j.jsx)(x,{error:u.error,msg:`Failed to delete object`}),s&&(0,j.jsx)(x,{error:s,msg:`Failed to download object`}),(0,j.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border bg-card p-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,j.jsx)(C,{className:`size-5 text-muted-foreground`}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`font-medium`,children:n}),e.LastModified&&(0,j.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Last Modified: `,c(e.LastModified)]})]})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,j.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:d(e.Size??0)}),(0,j.jsx)(`button`,{"aria-label":`Download ${n}`,className:`rounded-md p-2 transition-colors hover:bg-accent`,onClick:f,type:`button`,children:(0,j.jsx)(p,{className:`size-4`})}),(0,j.jsx)(`button`,{"aria-label":`Delete ${n}`,className:`rounded-md p-2 text-destructive transition-colors hover:bg-accent`,onClick:()=>o(!0),type:`button`,children:(0,j.jsx)(m,{className:`size-4`})})]}),(0,j.jsx)(S,{description:(0,j.jsxs)(j.Fragment,{children:[`Are you sure you want to delete `,(0,j.jsx)(`strong`,{children:n}),`? This action cannot be undone.`]}),isPending:u.isPending,onConfirm:h,onOpenChange:o,open:i,title:`Delete Object`})]})]},e.Key)}function F({bucket:e,prefix:t=``,isPending:n,onUpload:r}){let i=(0,N.useRef)(null);async function a(n){let a=n.target.files;if(!(!a||a.length===0))try{await Promise.all([...a].map(async n=>await r({bucket:e,key:`${t}${n.name}`,file:n})))}finally{i.current&&(i.current.value=``)}}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`input`,{accept:`*/*`,"aria-label":`Choose files to upload`,className:`hidden`,multiple:!0,onChange:a,ref:i,type:`file`}),(0,j.jsxs)(h,{disabled:n,onClick:()=>i.current?.click(),size:`sm`,children:[(0,j.jsx)(T,{className:`mr-2 size-4`}),n?`Uploading…`:`Upload Files`]})]})}export{P as n,M as r,F as t}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{h as i,l as a,ni as o,x as s}from"./awsClient.js";import{Bt as c,Nt as l,St as u,Vt as d,ut as f}from"./auth.js";import{t as p}from"./download.js";import{t as m}from"./trash-2.js";import{t as h}from"./button.js";import{M as g}from"./tslib.es6.js";import{a as _,i as v,n as y}from"./s3.js";import{Yr as b}from"./index.js";import{t as x}from"./error-banner.js";import{t as S}from"./delete-confirmation-dialog.js";var C=b(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),w=b(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),T=b(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),E=e=>(e,t)=>async n=>{let r=await e(n),{response:i}=r;if(l.isInstance(i)&&i.headers.expires){i.headers.expiresstring=i.headers.expires;try{g(i.headers.expires)}catch(e){t.logger?.warn(`AWS SDK Warning for ${t.clientName}::${t.commandName} response parsing (${i.headers.expires}): ${e}`),delete i.headers.expires}}return r},D={tags:[`S3`],name:`s3ExpiresMiddleware`,override:!0,relation:`after`,toMiddleware:`deserializerMiddleware`},O=e=>({applyToStack:t=>{t.addRelativeTo(E(e),D)}}),k=class extends u.classBuilder().ep({...s,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[f(n,e.getEndpointParameterInstructions()),_(n,{requestChecksumRequired:!1,requestValidationModeMember:`ChecksumMode`,responseAlgorithms:[`CRC64NVME`,`CRC32`,`CRC32C`,`SHA256`,`SHA1`,`SHA512`,`MD5`,`XXHASH64`,`XXHASH3`,`XXHASH128`]}),v(n),O(n)]}).s(`AmazonS3`,`GetObject`,{}).n(`S3Client`,`GetObjectCommand`).sc(i).build(){},A=r(),j=e();function M(e){let t=(0,A.c)(9),{folderName:n,fullPrefix:r,bucketName:i}=e,a;t[0]!==i||t[1]!==r?(a={bucket:i,_splat:r},t[0]=i,t[1]=r,t[2]=a):a=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,j.jsx)(w,{className:`size-5 text-muted-foreground`}),t[3]=s):s=t[3];let c;t[4]===n?c=t[5]:(c=(0,j.jsx)(`span`,{className:`font-medium`,children:n}),t[4]=n,t[5]=c);let l;return t[6]!==a||t[7]!==c?(l=(0,j.jsxs)(o,{className:`flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,params:a,to:`/s3/ls/$bucket/$`,children:[s,c]}),t[6]=a,t[7]=c,t[8]=l):l=t[8],l}var N=t(n(),1);function P({object:e,bucketName:t,displayName:n,fullKey:r}){let[i,o]=(0,N.useState)(!1),[s,l]=(0,N.useState)(null),u=y();async function f(){l(null);try{let e=new k({Bucket:t,Key:r}),i=await a().send(e);if(i.Body){let e=await i.Body.transformToByteArray(),t=URL.createObjectURL(new Blob([e])),r=document.createElement(`a`);r.href=t,r.download=n,document.body.append(r),r.click(),r.remove(),URL.revokeObjectURL(t)}}catch(e){l(Error(`Failed to download object`,{cause:e}))}}async function h(){try{await u.mutateAsync({bucket:t,key:r})}finally{o(!1)}}return(0,j.jsxs)(`div`,{children:[u.error&&(0,j.jsx)(x,{error:u.error,msg:`Failed to delete object`}),s&&(0,j.jsx)(x,{error:s,msg:`Failed to download object`}),(0,j.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border bg-card p-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,j.jsx)(C,{className:`size-5 text-muted-foreground`}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`font-medium`,children:n}),e.LastModified&&(0,j.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Last Modified: `,c(e.LastModified)]})]})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,j.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:d(e.Size??0)}),(0,j.jsx)(`button`,{"aria-label":`Download ${n}`,className:`rounded-md p-2 transition-colors hover:bg-accent`,onClick:f,type:`button`,children:(0,j.jsx)(p,{className:`size-4`})}),(0,j.jsx)(`button`,{"aria-label":`Delete ${n}`,className:`rounded-md p-2 text-destructive transition-colors hover:bg-accent`,onClick:()=>o(!0),type:`button`,children:(0,j.jsx)(m,{className:`size-4`})})]}),(0,j.jsx)(S,{description:(0,j.jsxs)(j.Fragment,{children:[`Are you sure you want to delete `,(0,j.jsx)(`strong`,{children:n}),`? This action cannot be undone.`]}),isPending:u.isPending,onConfirm:h,onOpenChange:o,open:i,title:`Delete Object`})]})]},e.Key)}function F({bucket:e,prefix:t=``,isPending:n,onUpload:r}){let i=(0,N.useRef)(null);async function a(n){let a=n.target.files;if(!(!a||a.length===0))try{await Promise.all([...a].map(async n=>await r({bucket:e,key:`${t}${n.name}`,file:n})))}finally{i.current&&(i.current.value=``)}}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`input`,{accept:`*/*`,"aria-label":`Choose files to upload`,className:`hidden`,multiple:!0,onChange:a,ref:i,type:`file`}),(0,j.jsxs)(h,{disabled:n,onClick:()=>i.current?.click(),size:`sm`,children:[(0,j.jsx)(T,{className:`mr-2 size-4`}),n?`Uploading…`:`Upload Files`]})]})}export{P as n,M as r,F as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/useBaseQuery.js b/spinifex/services/spinifexui/frontend/dist/assets/useBaseQuery.js index fd9c27f9b..0c346877c 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/useBaseQuery.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/useBaseQuery.js @@ -1 +1 @@ -import{n as e,o as t,r as n}from"./compiler-runtime.js";import{$r as r,Zr as i,ai as a,ci as o,di as s,ei as c,fi as l,ii as u,li as d,mi as f,ni as p,oi as m,pi as h,si as g,ti as _,ui as v}from"./index.js";var y=class extends f{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=_(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),x(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return S(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return S(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof g(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!d(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&C(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||o(this.options.staleTime,this.#t)!==o(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||g(this.options.enabled,this.#t)!==g(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return T(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(a)),t}#g(){this.#b();let e=o(this.options.staleTime,this.#t);if(p.isServer()||this.#r.isStale||!u(e))return;let t=s(this.#r.dataUpdatedAt,e)+1;this.#d=l.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(p.isServer()||g(this.options.enabled,this.#t)===!1||!u(this.#p)||this.#p===0)&&(this.#f=l.setInterval(()=>{(this.options.refetchIntervalInBackground||h.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(l.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(l.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,i=this.options,a=this.#r,o=this.#i,s=this.#a,c=e===n?this.#n:e.state,{state:l}=e,u={...l},d=!1,f;if(t._optimisticResults){let a=this.hasListeners(),o=!a&&x(e,t),s=a&&C(e,n,t,i);(o||s)&&(u={...u,...r(l.data,e.options)}),t._optimisticResults===`isRestoring`&&(u.fetchStatus=`idle`)}let{error:p,errorUpdatedAt:h,status:v}=u;f=u.data;let y=!1;if(t.placeholderData!==void 0&&f===void 0&&v===`pending`){let e;a?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=a.data,y=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(v=`success`,f=m(a?.data,e,t),d=!0)}if(t.select&&f!==void 0&&!y)if(a&&f===o?.data&&t.select===this.#c)f=this.#l;else try{this.#c=t.select,f=t.select(f),f=m(a?.data,f,t),this.#l=f,this.#s=null}catch(e){this.#s=e}this.#s&&(p=this.#s,f=this.#l,h=Date.now(),v=`error`);let b=u.fetchStatus===`fetching`,S=v===`pending`,T=v===`error`,E=S&&b,D=f!==void 0,O={status:v,fetchStatus:u.fetchStatus,isPending:S,isSuccess:v===`success`,isError:T,isInitialLoading:E,isLoading:E,data:f,dataUpdatedAt:u.dataUpdatedAt,error:p,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:T&&!D,isPaused:u.fetchStatus===`paused`,isPlaceholderData:d,isRefetchError:T&&D,isStale:w(e,t),refetch:this.refetch,promise:this.#o,isEnabled:g(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=O.data!==void 0,r=O.status===`error`&&!t,i=e=>{r?e.reject(O.error):t&&e.resolve(O.data)},a=()=>{i(this.#o=O.promise=_())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||O.data!==o.value)&&a();break;case`rejected`:(!r||O.error!==o.reason)&&a();break}}return O}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!d(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){c.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function b(e,t){return g(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&g(t.retryOnMount,e)===!1)}function x(e,t){return b(e,t)||e.state.data!==void 0&&S(e,t,t.refetchOnMount)}function S(e,t,n){if(g(t.enabled,e)!==!1&&o(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&w(e,t)}return!1}function C(e,t,n,r){return(e!==t||g(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&w(e,n)}function w(e,t){return g(t.enabled,e)!==!1&&e.isStaleByTime(o(t.staleTime,e))}function T(e,t){return!d(e.getCurrentResult(),t)}e();var E=t(n(),1),D=E.createContext(!1),O=()=>E.useContext(D);D.Provider;function k(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var A=E.createContext(k()),j=()=>E.useContext(A),M=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?v(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},N=e=>{E.useEffect(()=>{e.clearReset()},[e])},P=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||v(n,[e.error,r])),F=(e,t)=>t.state.data===void 0,I=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},L=(e,t)=>e.isLoading&&e.isFetching&&!t,R=(e,t)=>e?.suspense&&t.isPending,z=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function B(e,t,n){let r=O(),o=j(),s=i(n),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l);let u=s.getQueryCache().get(l.queryHash),d=e.subscribed!==!1;l._optimisticResults=r?`isRestoring`:d?`optimistic`:void 0,I(l),M(l,o,u),N(o);let f=!s.getQueryCache().get(l.queryHash),[m]=E.useState(()=>new t(s,l)),h=m.getOptimisticResult(l),g=!r&&d;if(E.useSyncExternalStore(E.useCallback(e=>{let t=g?m.subscribe(c.batchCalls(e)):a;return m.updateResult(),t},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),E.useEffect(()=>{m.setOptions(l)},[l,m]),R(l,h))throw z(l,m,o);if(P({result:h,errorResetBoundary:o,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw h.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(l,h),l.experimental_prefetchInRender&&!p.isServer()&&L(h,r)&&(f?z(l,m,o):u?.promise)?.catch(a).finally(()=>{m.updateResult()}),l.notifyOnChangeProps?h:m.trackResult(h)}export{F as n,y as r,B as t}; \ No newline at end of file +import{n as e,o as t,r as n}from"./compiler-runtime.js";import{$r as r,ci as i,di as a,fi as o,gi as s,hi as c,ii as l,li as u,mi as d,ni as f,oi as p,pi as m,ri as h,si as g,ti as _,ui as v}from"./index.js";var y=class extends s{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=h(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),x(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return S(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return S(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof u(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!a(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&C(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||u(this.options.enabled,this.#t)!==u(t.enabled,this.#t)||v(this.options.staleTime,this.#t)!==v(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||u(this.options.enabled,this.#t)!==u(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return T(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(g)),t}#g(){this.#b();let e=v(this.options.staleTime,this.#t);if(l.isServer()||this.#r.isStale||!p(e))return;let t=m(this.#r.dataUpdatedAt,e)+1;this.#d=d.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(l.isServer()||u(this.options.enabled,this.#t)===!1||!p(this.#p)||this.#p===0)&&(this.#f=d.setInterval(()=>{(this.options.refetchIntervalInBackground||c.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(d.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(d.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,a=this.#r,o=this.#i,s=this.#a,c=e===n?this.#n:e.state,{state:l}=e,d={...l},f=!1,p;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&x(e,t),o=i&&C(e,n,t,r);(a||o)&&(d={...d,..._(l.data,e.options)}),t._optimisticResults===`isRestoring`&&(d.fetchStatus=`idle`)}let{error:m,errorUpdatedAt:g,status:v}=d;p=d.data;let y=!1;if(t.placeholderData!==void 0&&p===void 0&&v===`pending`){let e;a?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=a.data,y=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(v=`success`,p=i(a?.data,e,t),f=!0)}if(t.select&&p!==void 0&&!y)if(a&&p===o?.data&&t.select===this.#c)p=this.#l;else try{this.#c=t.select,p=t.select(p),p=i(a?.data,p,t),this.#l=p,this.#s=null}catch(e){this.#s=e}this.#s&&(m=this.#s,p=this.#l,g=Date.now(),v=`error`);let b=d.fetchStatus===`fetching`,S=v===`pending`,T=v===`error`,E=S&&b,D=p!==void 0,O={status:v,fetchStatus:d.fetchStatus,isPending:S,isSuccess:v===`success`,isError:T,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:T&&!D,isPaused:d.fetchStatus===`paused`,isPlaceholderData:f,isRefetchError:T&&D,isStale:w(e,t),refetch:this.refetch,promise:this.#o,isEnabled:u(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=O.data!==void 0,r=O.status===`error`&&!t,i=e=>{r?e.reject(O.error):t&&e.resolve(O.data)},a=()=>{i(this.#o=O.promise=h())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||O.data!==o.value)&&a();break;case`rejected`:(!r||O.error!==o.reason)&&a();break}}return O}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!a(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){f.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function b(e,t){return u(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&u(t.retryOnMount,e)===!1)}function x(e,t){return b(e,t)||e.state.data!==void 0&&S(e,t,t.refetchOnMount)}function S(e,t,n){if(u(t.enabled,e)!==!1&&v(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&w(e,t)}return!1}function C(e,t,n,r){return(e!==t||u(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&w(e,n)}function w(e,t){return u(t.enabled,e)!==!1&&e.isStaleByTime(v(t.staleTime,e))}function T(e,t){return!a(e.getCurrentResult(),t)}e();var E=t(n(),1),D=E.createContext(!1),O=()=>E.useContext(D);D.Provider;function k(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var A=E.createContext(k()),j=()=>E.useContext(A),M=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?o(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},N=e=>{E.useEffect(()=>{e.clearReset()},[e])},P=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||o(n,[e.error,r])),F=(e,t)=>t.state.data===void 0,I=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},L=(e,t)=>e.isLoading&&e.isFetching&&!t,R=(e,t)=>e?.suspense&&t.isPending,z=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function B(e,t,n){let i=O(),a=j(),o=r(n),s=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=o.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=i?`isRestoring`:u?`optimistic`:void 0,I(s),M(s,a,c),N(a);let d=!o.getQueryCache().get(s.queryHash),[p]=E.useState(()=>new t(o,s)),m=p.getOptimisticResult(s),h=!i&&u;if(E.useSyncExternalStore(E.useCallback(e=>{let t=h?p.subscribe(f.batchCalls(e)):g;return p.updateResult(),t},[p,h]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),E.useEffect(()=>{p.setOptions(s)},[s,p]),R(s,m))throw z(s,p,a);if(P({result:m,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw m.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(s,m),s.experimental_prefetchInRender&&!l.isServer()&&L(m,i)&&(d?z(s,p,a):c?.promise)?.catch(g).finally(()=>{p.updateResult()}),s.notifyOnChangeProps?m:p.trackResult(m)}export{F as n,y as r,B as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/useMutation.js b/spinifex/services/spinifexui/frontend/dist/assets/useMutation.js index 74066526f..9dbc10deb 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/useMutation.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/useMutation.js @@ -1 +1 @@ -import{o as e,r as t}from"./compiler-runtime.js";import{Qr as n,Zr as r,ai as i,ei as a,li as o,mi as s,ri as c,ui as l}from"./index.js";var u=class extends s{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),o(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&c(t.mutationKey)!==c(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??n();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){a.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=e(t(),1);function f(e,t){let n=r(t),[o]=d.useState(()=>new u(n,e));d.useEffect(()=>{o.setOptions(e)},[o,e]);let s=d.useSyncExternalStore(d.useCallback(e=>o.subscribe(a.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=d.useCallback((e,t)=>{o.mutate(e,t).catch(i)},[o]);if(s.error&&l(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:c,mutateAsync:s.mutate}}export{f as t}; \ No newline at end of file +import{o as e,r as t}from"./compiler-runtime.js";import{$r as n,ai as r,di as i,ei as a,fi as o,gi as s,ni as c,si as l}from"./index.js";var u=class extends s{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),i(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&r(t.mutationKey)!==r(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??a();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){c.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=e(t(),1);function f(e,t){let r=n(t),[i]=d.useState(()=>new u(r,e));d.useEffect(()=>{i.setOptions(e)},[i,e]);let a=d.useSyncExternalStore(d.useCallback(e=>i.subscribe(c.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=d.useCallback((e,t)=>{i.mutate(e,t).catch(l)},[i]);if(a.error&&o(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:s,mutateAsync:a.mutate}}export{f as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/src/layouts/sidebar-layout.tsx b/spinifex/services/spinifexui/frontend/src/layouts/sidebar-layout.tsx index fadb0ec79..80d795f57 100644 --- a/spinifex/services/spinifexui/frontend/src/layouts/sidebar-layout.tsx +++ b/spinifex/services/spinifexui/frontend/src/layouts/sidebar-layout.tsx @@ -364,7 +364,7 @@ export function SidebarLayout() { diff --git a/spinifex/services/spinifexui/frontend/src/lib/ecs-provision.ts b/spinifex/services/spinifexui/frontend/src/lib/ecs-provision.ts new file mode 100644 index 000000000..c832a050e --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/lib/ecs-provision.ts @@ -0,0 +1,110 @@ +import { Sha256 } from "@aws-crypto/sha256-browser" +import { HttpRequest } from "@smithy/protocol-http" +import { SignatureV4 } from "@smithy/signature-v4" + +import { getCredentials } from "@/lib/auth" + +const AWS_REGION = "ap-southeast-2" +const GATEWAY_PORT = 9999 +const TARGET = "AmazonEC2ContainerServiceV20141113.ProvisionCapacity" + +export interface ProvisionCapacityRequest { + Cluster: string + InstanceType?: string + Count?: number + SubnetID: string + SecurityGroupID: string + KeyName?: string +} + +export interface ProvisionCapacityResponse { + InstanceIDs?: string[] +} + +// jsonErrorMessage extracts a human-readable message from a JSON-1.1 error +// body. Returns null when the body is not JSON or carries no message. +function jsonErrorMessage(body: string): string | null { + try { + const parsed: unknown = JSON.parse(body) + if (parsed && typeof parsed === "object") { + if ("message" in parsed && typeof parsed.message === "string") { + return parsed.message + } + if ("Message" in parsed && typeof parsed.Message === "string") { + return parsed.Message + } + } + } catch { + // Non-JSON body. + } + return null +} + +// provisionCapacity calls the custom ProvisionCapacity gateway action. The AWS +// SDK has no command for it, so the JSON-1.1 request is SigV4-signed by hand, +// mirroring signed-fetch.ts, and POSTed through the same-origin proxy. +export async function provisionCapacity( + req: ProvisionCapacityRequest, +): Promise { + const credentials = getCredentials() + if (!credentials) { + throw new Error("Not authenticated") + } + + const protocol = window.location.protocol.replace(":", "") + const body = JSON.stringify(req) + + // Headers are set before signing so they are part of the signature, matching + // the gateway's SigV4 verification expectations. + const request = new HttpRequest({ + method: "POST", + protocol, + hostname: "localhost", + port: GATEWAY_PORT, + path: "/", + headers: { + host: `localhost:${GATEWAY_PORT}`, + "content-type": "application/x-amz-json-1.1", + "x-amz-target": TARGET, + }, + body, + }) + + const signer = new SignatureV4({ + credentials: { + accessKeyId: credentials.accessKeyId, + secretAccessKey: credentials.secretAccessKey, + sessionToken: credentials.sessionToken, + }, + region: AWS_REGION, + service: "ecs", + sha256: Sha256, + }) + + const signed = await signer.sign(request) + + const headers: Record = {} + for (const [key, value] of Object.entries(signed.headers)) { + if (typeof value === "string") { + headers[key] = value + } + } + + const proxyUrl = `${window.location.protocol}//${window.location.host}/proxy/awsgw/` + const response = await fetch(proxyUrl, { + method: "POST", + headers, + body, + }) + + if (!response.ok) { + const detail = await response.text().catch(() => "") + const summary = jsonErrorMessage(detail) ?? detail + throw new Error( + `ProvisionCapacity failed: ${response.status}${summary ? ` - ${summary}` : ""}`, + ) + } + + // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- response.json() returns Promise + return await (response.json() as Promise) +} diff --git a/spinifex/services/spinifexui/frontend/src/lib/system-managed.test.ts b/spinifex/services/spinifexui/frontend/src/lib/system-managed.test.ts index b4e53fe88..2bbb111f2 100644 --- a/spinifex/services/spinifexui/frontend/src/lib/system-managed.test.ts +++ b/spinifex/services/spinifexui/frontend/src/lib/system-managed.test.ts @@ -1,7 +1,11 @@ import type { Image } from "@aws-sdk/client-ec2" import { describe, expect, it } from "vitest" -import { SYSTEM_MANAGED_TAG_KEY, isSystemManagedImage } from "./system-managed" +import { + SYSTEM_MANAGED_TAG_KEY, + isEcsSystemImage, + isSystemManagedImage, +} from "./system-managed" describe("isSystemManagedImage", () => { it("returns true when image carries the managed-by tag", () => { @@ -24,3 +28,19 @@ describe("isSystemManagedImage", () => { expect(isSystemManagedImage({ ImageId: "ami-3" })).toBeFalsy() }) }) + +describe("isEcsSystemImage", () => { + it("matches only the managed-by=ecs tag value", () => { + const ecs: Image = { + ImageId: "ami-ecs", + Tags: [{ Key: SYSTEM_MANAGED_TAG_KEY, Value: "ecs" }], + } + const eks: Image = { + ImageId: "ami-eks", + Tags: [{ Key: SYSTEM_MANAGED_TAG_KEY, Value: "eks" }], + } + expect(isEcsSystemImage(ecs)).toBeTruthy() + expect(isEcsSystemImage(eks)).toBeFalsy() + expect(isEcsSystemImage({ ImageId: "ami-bare" })).toBeFalsy() + }) +}) diff --git a/spinifex/services/spinifexui/frontend/src/lib/system-managed.ts b/spinifex/services/spinifexui/frontend/src/lib/system-managed.ts index b58a188a5..370373a4d 100644 --- a/spinifex/services/spinifexui/frontend/src/lib/system-managed.ts +++ b/spinifex/services/spinifexui/frontend/src/lib/system-managed.ts @@ -22,3 +22,17 @@ export function isEksSystemImage(image: Image): boolean { ) ?? false ) } + +// Tag value identifying the ECS node system image (containerd + ecs-agent), +// applied by `spx admin images import --tag spinifex:managed-by=ecs`. +export const ECS_SYSTEM_IMAGE_TAG_VALUE = "ecs" + +export function isEcsSystemImage(image: Image): boolean { + return ( + image.Tags?.some( + (tag) => + tag.Key === SYSTEM_MANAGED_TAG_KEY && + tag.Value === ECS_SYSTEM_IMAGE_TAG_VALUE, + ) ?? false + ) +} diff --git a/spinifex/services/spinifexui/frontend/src/mutations/ecs.ts b/spinifex/services/spinifexui/frontend/src/mutations/ecs.ts index 0510abb2e..92156df94 100644 --- a/spinifex/services/spinifexui/frontend/src/mutations/ecs.ts +++ b/spinifex/services/spinifexui/frontend/src/mutations/ecs.ts @@ -13,6 +13,11 @@ import { import { useMutation, useQueryClient } from "@tanstack/react-query" import { getEcsClient } from "@/lib/awsClient" +import { + provisionCapacity, + type ProvisionCapacityRequest, +} from "@/lib/ecs-provision" +import { ecsContainerInstancesQueryOptions } from "@/queries/ecs" import type { CreateServiceFormData, RegisterTaskDefinitionFormData, @@ -176,6 +181,22 @@ export function useRegisterTaskDefinition() { }) } +// useProvisionCapacity launches container instances into a cluster via the +// custom ProvisionCapacity gateway action, then invalidates the cluster's +// container-instance list so it re-polls until they register. +export function useProvisionCapacity() { + const queryClient = useQueryClient() + return useMutation({ + mutationFn: async (req: ProvisionCapacityRequest) => + await provisionCapacity(req), + onSuccess: (_data, variables) => { + void queryClient.invalidateQueries({ + queryKey: ecsContainerInstancesQueryOptions(variables.Cluster).queryKey, + }) + }, + }) +} + export interface RunTaskParams { cluster: string taskDefinition: string diff --git a/spinifex/services/spinifexui/frontend/src/queries/ecs.ts b/spinifex/services/spinifexui/frontend/src/queries/ecs.ts index 37f3ea746..e7c594ac5 100644 --- a/spinifex/services/spinifexui/frontend/src/queries/ecs.ts +++ b/spinifex/services/spinifexui/frontend/src/queries/ecs.ts @@ -43,7 +43,7 @@ export const ecsClusterQueryOptions = (clusterName: string) => const described = await getEcsClient().send( new DescribeClustersCommand({ clusters: [clusterName] }), ) - return described.clusters?.[0] + return described.clusters?.[0] ?? null }, staleTime: CLUSTER_STALE_TIME, }) diff --git a/spinifex/services/spinifexui/frontend/src/routeTree.gen.ts b/spinifex/services/spinifexui/frontend/src/routeTree.gen.ts index ea1e1776f..fc6bfa4bb 100644 --- a/spinifex/services/spinifexui/frontend/src/routeTree.gen.ts +++ b/spinifex/services/spinifexui/frontend/src/routeTree.gen.ts @@ -21,6 +21,7 @@ import { Route as AuthIamrolesCreateRoleRouteImport } from './routes/_auth/iam/( import { Route as AuthIampoliciesCreatePolicyRouteImport } from './routes/_auth/iam/(policies)/create-policy' import { Route as AuthIaminstanceProfilesCreateInstanceProfileRouteImport } from './routes/_auth/iam/(instance-profiles)/create-instance-profile' import { Route as AuthEksclustersCreateClusterRouteImport } from './routes/_auth/eks/(clusters)/create-cluster' +import { Route as AuthEcsclustersTaskDefinitionsRouteImport } from './routes/_auth/ecs/(clusters)/task-definitions' import { Route as AuthEcsclustersRunTaskRouteImport } from './routes/_auth/ecs/(clusters)/run-task' import { Route as AuthEcsclustersRegisterTaskDefinitionRouteImport } from './routes/_auth/ecs/(clusters)/register-task-definition' import { Route as AuthEcsclustersCreateServiceRouteImport } from './routes/_auth/ecs/(clusters)/create-service' @@ -87,6 +88,8 @@ import { Route as AuthEc2internetGatewaysDescribeInternetGatewaysIdRouteImport } import { Route as AuthEc2instancesDescribeInstancesIdRouteImport } from './routes/_auth/ec2/(instances)/describe-instances/$id' import { Route as AuthEc2imagesDescribeImagesIdRouteImport } from './routes/_auth/ec2/(images)/describe-images/$id' import { Route as AuthEc2elasticIpsDescribeAddressesIdRouteImport } from './routes/_auth/ec2/(elastic-ips)/describe-addresses/$id' +import { Route as AuthEcsclustersListClustersClusterNameTasksTaskIdRouteImport } from './routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId' +import { Route as AuthEcsclustersListClustersClusterNameServicesServiceNameRouteImport } from './routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName' const LoginRoute = LoginRouteImport.update({ id: '/login', @@ -151,6 +154,12 @@ const AuthEksclustersCreateClusterRoute = path: '/eks/create-cluster', getParentRoute: () => AuthRouteRoute, } as any) +const AuthEcsclustersTaskDefinitionsRoute = + AuthEcsclustersTaskDefinitionsRouteImport.update({ + id: '/ecs/(clusters)/task-definitions', + path: '/ecs/task-definitions', + getParentRoute: () => AuthRouteRoute, + } as any) const AuthEcsclustersRunTaskRoute = AuthEcsclustersRunTaskRouteImport.update({ id: '/ecs/(clusters)/run-task', path: '/ecs/run-task', @@ -542,6 +551,18 @@ const AuthEc2elasticIpsDescribeAddressesIdRoute = path: '/ec2/describe-addresses/$id', getParentRoute: () => AuthRouteRoute, } as any) +const AuthEcsclustersListClustersClusterNameTasksTaskIdRoute = + AuthEcsclustersListClustersClusterNameTasksTaskIdRouteImport.update({ + id: '/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId', + path: '/ecs/list-clusters/$clusterName/tasks/$taskId', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEcsclustersListClustersClusterNameServicesServiceNameRoute = + AuthEcsclustersListClustersClusterNameServicesServiceNameRouteImport.update({ + id: '/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName', + path: '/ecs/list-clusters/$clusterName/services/$serviceName', + getParentRoute: () => AuthRouteRoute, + } as any) export interface FileRoutesByFullPath { '/': typeof AuthIndexRoute @@ -567,6 +588,7 @@ export interface FileRoutesByFullPath { '/ecs/create-service': typeof AuthEcsclustersCreateServiceRoute '/ecs/register-task-definition': typeof AuthEcsclustersRegisterTaskDefinitionRoute '/ecs/run-task': typeof AuthEcsclustersRunTaskRoute + '/ecs/task-definitions': typeof AuthEcsclustersTaskDefinitionsRoute '/eks/create-cluster': typeof AuthEksclustersCreateClusterRoute '/iam/create-instance-profile': typeof AuthIaminstanceProfilesCreateInstanceProfileRoute '/iam/create-policy': typeof AuthIampoliciesCreatePolicyRoute @@ -621,6 +643,8 @@ export interface FileRoutesByFullPath { '/iam/list-roles/': typeof AuthIamrolesListRolesIndexRoute '/iam/list-users/': typeof AuthIamusersListUsersIndexRoute '/s3/ls/$bucket/': typeof AuthS3LsBucketIndexRoute + '/ecs/list-clusters/$clusterName/services/$serviceName': typeof AuthEcsclustersListClustersClusterNameServicesServiceNameRoute + '/ecs/list-clusters/$clusterName/tasks/$taskId': typeof AuthEcsclustersListClustersClusterNameTasksTaskIdRoute } export interface FileRoutesByTo { '/login': typeof LoginRoute @@ -645,6 +669,7 @@ export interface FileRoutesByTo { '/ecs/create-service': typeof AuthEcsclustersCreateServiceRoute '/ecs/register-task-definition': typeof AuthEcsclustersRegisterTaskDefinitionRoute '/ecs/run-task': typeof AuthEcsclustersRunTaskRoute + '/ecs/task-definitions': typeof AuthEcsclustersTaskDefinitionsRoute '/eks/create-cluster': typeof AuthEksclustersCreateClusterRoute '/iam/create-instance-profile': typeof AuthIaminstanceProfilesCreateInstanceProfileRoute '/iam/create-policy': typeof AuthIampoliciesCreatePolicyRoute @@ -699,6 +724,8 @@ export interface FileRoutesByTo { '/iam/list-roles': typeof AuthIamrolesListRolesIndexRoute '/iam/list-users': typeof AuthIamusersListUsersIndexRoute '/s3/ls/$bucket': typeof AuthS3LsBucketIndexRoute + '/ecs/list-clusters/$clusterName/services/$serviceName': typeof AuthEcsclustersListClustersClusterNameServicesServiceNameRoute + '/ecs/list-clusters/$clusterName/tasks/$taskId': typeof AuthEcsclustersListClustersClusterNameTasksTaskIdRoute } export interface FileRoutesById { __root__: typeof rootRouteImport @@ -726,6 +753,7 @@ export interface FileRoutesById { '/_auth/ecs/(clusters)/create-service': typeof AuthEcsclustersCreateServiceRoute '/_auth/ecs/(clusters)/register-task-definition': typeof AuthEcsclustersRegisterTaskDefinitionRoute '/_auth/ecs/(clusters)/run-task': typeof AuthEcsclustersRunTaskRoute + '/_auth/ecs/(clusters)/task-definitions': typeof AuthEcsclustersTaskDefinitionsRoute '/_auth/eks/(clusters)/create-cluster': typeof AuthEksclustersCreateClusterRoute '/_auth/iam/(instance-profiles)/create-instance-profile': typeof AuthIaminstanceProfilesCreateInstanceProfileRoute '/_auth/iam/(policies)/create-policy': typeof AuthIampoliciesCreatePolicyRoute @@ -780,6 +808,8 @@ export interface FileRoutesById { '/_auth/iam/(roles)/list-roles/': typeof AuthIamrolesListRolesIndexRoute '/_auth/iam/(users)/list-users/': typeof AuthIamusersListUsersIndexRoute '/_auth/s3/ls/$bucket/': typeof AuthS3LsBucketIndexRoute + '/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName': typeof AuthEcsclustersListClustersClusterNameServicesServiceNameRoute + '/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId': typeof AuthEcsclustersListClustersClusterNameTasksTaskIdRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath @@ -807,6 +837,7 @@ export interface FileRouteTypes { | '/ecs/create-service' | '/ecs/register-task-definition' | '/ecs/run-task' + | '/ecs/task-definitions' | '/eks/create-cluster' | '/iam/create-instance-profile' | '/iam/create-policy' @@ -861,6 +892,8 @@ export interface FileRouteTypes { | '/iam/list-roles/' | '/iam/list-users/' | '/s3/ls/$bucket/' + | '/ecs/list-clusters/$clusterName/services/$serviceName' + | '/ecs/list-clusters/$clusterName/tasks/$taskId' fileRoutesByTo: FileRoutesByTo to: | '/login' @@ -885,6 +918,7 @@ export interface FileRouteTypes { | '/ecs/create-service' | '/ecs/register-task-definition' | '/ecs/run-task' + | '/ecs/task-definitions' | '/eks/create-cluster' | '/iam/create-instance-profile' | '/iam/create-policy' @@ -939,6 +973,8 @@ export interface FileRouteTypes { | '/iam/list-roles' | '/iam/list-users' | '/s3/ls/$bucket' + | '/ecs/list-clusters/$clusterName/services/$serviceName' + | '/ecs/list-clusters/$clusterName/tasks/$taskId' id: | '__root__' | '/_auth' @@ -965,6 +1001,7 @@ export interface FileRouteTypes { | '/_auth/ecs/(clusters)/create-service' | '/_auth/ecs/(clusters)/register-task-definition' | '/_auth/ecs/(clusters)/run-task' + | '/_auth/ecs/(clusters)/task-definitions' | '/_auth/eks/(clusters)/create-cluster' | '/_auth/iam/(instance-profiles)/create-instance-profile' | '/_auth/iam/(policies)/create-policy' @@ -1019,6 +1056,8 @@ export interface FileRouteTypes { | '/_auth/iam/(roles)/list-roles/' | '/_auth/iam/(users)/list-users/' | '/_auth/s3/ls/$bucket/' + | '/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName' + | '/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId' fileRoutesById: FileRoutesById } export interface RootRouteChildren { @@ -1112,6 +1151,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthEksclustersCreateClusterRouteImport parentRoute: typeof AuthRouteRoute } + '/_auth/ecs/(clusters)/task-definitions': { + id: '/_auth/ecs/(clusters)/task-definitions' + path: '/ecs/task-definitions' + fullPath: '/ecs/task-definitions' + preLoaderRoute: typeof AuthEcsclustersTaskDefinitionsRouteImport + parentRoute: typeof AuthRouteRoute + } '/_auth/ecs/(clusters)/run-task': { id: '/_auth/ecs/(clusters)/run-task' path: '/ecs/run-task' @@ -1574,6 +1620,20 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthEc2elasticIpsDescribeAddressesIdRouteImport parentRoute: typeof AuthRouteRoute } + '/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId': { + id: '/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId' + path: '/ecs/list-clusters/$clusterName/tasks/$taskId' + fullPath: '/ecs/list-clusters/$clusterName/tasks/$taskId' + preLoaderRoute: typeof AuthEcsclustersListClustersClusterNameTasksTaskIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName': { + id: '/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName' + path: '/ecs/list-clusters/$clusterName/services/$serviceName' + fullPath: '/ecs/list-clusters/$clusterName/services/$serviceName' + preLoaderRoute: typeof AuthEcsclustersListClustersClusterNameServicesServiceNameRouteImport + parentRoute: typeof AuthRouteRoute + } } } @@ -1613,6 +1673,7 @@ interface AuthRouteRouteChildren { AuthEcsclustersCreateServiceRoute: typeof AuthEcsclustersCreateServiceRoute AuthEcsclustersRegisterTaskDefinitionRoute: typeof AuthEcsclustersRegisterTaskDefinitionRoute AuthEcsclustersRunTaskRoute: typeof AuthEcsclustersRunTaskRoute + AuthEcsclustersTaskDefinitionsRoute: typeof AuthEcsclustersTaskDefinitionsRoute AuthEksclustersCreateClusterRoute: typeof AuthEksclustersCreateClusterRoute AuthIaminstanceProfilesCreateInstanceProfileRoute: typeof AuthIaminstanceProfilesCreateInstanceProfileRoute AuthIampoliciesCreatePolicyRoute: typeof AuthIampoliciesCreatePolicyRoute @@ -1665,6 +1726,8 @@ interface AuthRouteRouteChildren { AuthIampoliciesListPoliciesIndexRoute: typeof AuthIampoliciesListPoliciesIndexRoute AuthIamrolesListRolesIndexRoute: typeof AuthIamrolesListRolesIndexRoute AuthIamusersListUsersIndexRoute: typeof AuthIamusersListUsersIndexRoute + AuthEcsclustersListClustersClusterNameServicesServiceNameRoute: typeof AuthEcsclustersListClustersClusterNameServicesServiceNameRoute + AuthEcsclustersListClustersClusterNameTasksTaskIdRoute: typeof AuthEcsclustersListClustersClusterNameTasksTaskIdRoute } const AuthRouteRouteChildren: AuthRouteRouteChildren = { @@ -1698,6 +1761,7 @@ const AuthRouteRouteChildren: AuthRouteRouteChildren = { AuthEcsclustersRegisterTaskDefinitionRoute: AuthEcsclustersRegisterTaskDefinitionRoute, AuthEcsclustersRunTaskRoute: AuthEcsclustersRunTaskRoute, + AuthEcsclustersTaskDefinitionsRoute: AuthEcsclustersTaskDefinitionsRoute, AuthEksclustersCreateClusterRoute: AuthEksclustersCreateClusterRoute, AuthIaminstanceProfilesCreateInstanceProfileRoute: AuthIaminstanceProfilesCreateInstanceProfileRoute, @@ -1780,6 +1844,10 @@ const AuthRouteRouteChildren: AuthRouteRouteChildren = { AuthIampoliciesListPoliciesIndexRoute: AuthIampoliciesListPoliciesIndexRoute, AuthIamrolesListRolesIndexRoute: AuthIamrolesListRolesIndexRoute, AuthIamusersListUsersIndexRoute: AuthIamusersListUsersIndexRoute, + AuthEcsclustersListClustersClusterNameServicesServiceNameRoute: + AuthEcsclustersListClustersClusterNameServicesServiceNameRoute, + AuthEcsclustersListClustersClusterNameTasksTaskIdRoute: + AuthEcsclustersListClustersClusterNameTasksTaskIdRoute, } const AuthRouteRouteWithChildren = AuthRouteRoute._addFileChildren( diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/cluster-detail-page.test.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/cluster-detail-page.test.tsx index 07af30b64..6c613eb48 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/cluster-detail-page.test.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/cluster-detail-page.test.tsx @@ -1,4 +1,4 @@ -import { screen } from "@testing-library/react" +import { fireEvent, screen } from "@testing-library/react" import { describe, expect, it, vi } from "vitest" import { @@ -23,35 +23,65 @@ vi.mock("@tanstack/react-router", async (importOriginal) => { vi.mock("./services-tab", () => ({ ServicesTab: () => null })) vi.mock("./tasks-tab", () => ({ TasksTab: () => null })) -vi.mock("./task-definitions-tab", () => ({ TaskDefinitionsTab: () => null })) vi.mock("./container-instances-tab", () => ({ ContainerInstancesTab: () => null, })) import { ClusterDetailPage } from "./cluster-detail-page" +function seedCluster(extra: Record = {}) { + const qc = createTestQueryClient() + qc.setQueryData(["ecs", "clusters", "web"], { + clusterName: "web", + clusterArn: "arn:aws:ecs:ap-southeast-2:123456789012:cluster/web", + status: "ACTIVE", + activeServicesCount: 2, + runningTasksCount: 3, + pendingTasksCount: 0, + registeredContainerInstancesCount: 1, + ...extra, + }) + return qc +} + describe("ClusterDetailPage", () => { - it("renders the overview with cluster ARN and tab labels", () => { - const qc = createTestQueryClient() - qc.setQueryData(["ecs", "clusters", "web"], { - clusterName: "web", - clusterArn: "arn:aws:ecs:ap-southeast-2:123456789012:cluster/web", - status: "ACTIVE", - activeServicesCount: 2, - runningTasksCount: 3, - pendingTasksCount: 0, - registeredContainerInstancesCount: 1, - }) - renderWithClient(, qc) + it("renders the AWS-aligned tab labels", () => { + renderWithClient(, seedCluster()) expect(screen.getByRole("heading", { name: "web" })).toBeInTheDocument() + expect(screen.getByRole("button", { name: /Delete/ })).toBeInTheDocument() + for (const label of ["Services", "Tasks", "Infrastructure", "Tags"]) { + expect(screen.getByRole("tab", { name: label })).toBeInTheDocument() + } + expect( + screen.queryByRole("tab", { name: "Configuration" }), + ).not.toBeInTheDocument() + }) + + it("shows cluster ARN in the overview panel above the tabs", () => { + renderWithClient(, seedCluster()) + expect( screen.getByText("arn:aws:ecs:ap-southeast-2:123456789012:cluster/web"), ).toBeInTheDocument() - expect(screen.getByRole("button", { name: /Delete/ })).toBeInTheDocument() - expect(screen.getByRole("tab", { name: "Services" })).toBeInTheDocument() - expect( - screen.getByRole("tab", { name: "Container Instances" }), - ).toBeInTheDocument() + }) + + it("renders cluster tags on the Tags tab", () => { + renderWithClient( + , + seedCluster({ tags: [{ key: "env", value: "prod" }] }), + ) + + fireEvent.click(screen.getByRole("tab", { name: "Tags" })) + expect(screen.getByText("env")).toBeInTheDocument() + expect(screen.getByText("prod")).toBeInTheDocument() + }) + + it("shows a not-found message when the cluster is missing", () => { + const qc = createTestQueryClient() + qc.setQueryData(["ecs", "clusters", "web"], null) + renderWithClient(, qc) + + expect(screen.getByText("Cluster not found.")).toBeInTheDocument() }) }) diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/cluster-detail-page.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/cluster-detail-page.tsx index 3e28b83f0..3b8571dd3 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/cluster-detail-page.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/cluster-detail-page.tsx @@ -17,7 +17,6 @@ import { ecsClusterQueryOptions } from "@/queries/ecs" import { ContainerInstancesTab } from "./container-instances-tab" import { ServicesTab } from "./services-tab" -import { TaskDefinitionsTab } from "./task-definitions-tab" import { TasksTab } from "./tasks-tab" export function ClusterDetailPage({ clusterName }: { clusterName: string }) { @@ -38,6 +37,18 @@ export function ClusterDetailPage({ clusterName }: { clusterName: string }) { }) } + if (!cluster) { + return ( + <> + Clusters + +

Cluster not found.

+ + ) + } + + const tags = cluster.tags ?? [] + return ( <> Clusters @@ -53,7 +64,7 @@ export function ClusterDetailPage({ clusterName }: { clusterName: string }) { Delete - + } subtitle="Cluster Details" @@ -71,41 +82,38 @@ export function ClusterDetailPage({ clusterName }: { clusterName: string }) { /> )} - + + Overview + + + + + + + + + + + - Overview Services Tasks - Task Definitions - Container Instances + Infrastructure + Tags - - - Cluster - - - - - - - - - - - @@ -114,12 +122,35 @@ export function ClusterDetailPage({ clusterName }: { clusterName: string }) { - - + + - - + + {tags.length === 0 ? ( +

No tags.

+ ) : ( +
+ + + + + + + + + {tags.map((tag) => ( + + + + + ))} + +
KeyValue
{tag.key} + {tag.value} +
+
+ )}
diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/clusters-list-page.test.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/clusters-list-page.test.tsx index 43a08fc89..03107aa98 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/clusters-list-page.test.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/clusters-list-page.test.tsx @@ -27,9 +27,17 @@ vi.mock("@tanstack/react-router", async (importOriginal) => { import { ClustersListPage } from "./clusters-list-page" -function seed(clusters: unknown[]) { +const ECS_NODE_IMAGE = { + ImageId: "ami-ecs", + Tags: [{ Key: "spinifex:managed-by", Value: "ecs" }], +} + +// seed wires both queries the page reads. By default an ECS node image is +// present so the create flow is enabled; pass [] to exercise the guard. +function seed(clusters: unknown[], images: unknown[] = [ECS_NODE_IMAGE]) { const qc = createTestQueryClient() qc.setQueryData(["ecs", "clusters"], clusters) + qc.setQueryData(["ec2", "images"], { Images: images }) return qc } @@ -57,12 +65,20 @@ describe("ClustersListPage", () => { expect(screen.getByText("No ECS clusters found.")).toBeInTheDocument() }) - it("opens the create dialog", () => { + it("opens the create dialog when an ECS node image is present", () => { renderWithClient(, seed([])) fireEvent.click(screen.getByRole("button", { name: "Create Cluster" })) expect(screen.getByText(/A cluster groups/)).toBeInTheDocument() }) + it("blocks creation and warns when no ECS node image exists", () => { + renderWithClient(, seed([], [])) + expect(screen.getByText("ECS system image not found")).toBeInTheDocument() + expect( + screen.getByRole("button", { name: "Create Cluster" }), + ).toBeDisabled() + }) + it("opens the delete confirmation for a cluster", () => { renderWithClient(, seed([CLUSTER])) fireEvent.click(screen.getByRole("button", { name: "Delete" })) diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/clusters-list-page.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/clusters-list-page.tsx index 478906d74..fc199009e 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/clusters-list-page.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/clusters-list-page.tsx @@ -1,5 +1,5 @@ import type { Cluster } from "@aws-sdk/client-ecs" -import { useSuspenseQuery } from "@tanstack/react-query" +import { useQueryClient, useSuspenseQuery } from "@tanstack/react-query" import { Link, useNavigate } from "@tanstack/react-router" import { useState } from "react" @@ -8,17 +8,37 @@ import { ErrorBanner } from "@/components/error-banner" import { PageHeading } from "@/components/page-heading" import { StateBadge } from "@/components/state-badge" import { Button } from "@/components/ui/button" +import { isEcsSystemImage } from "@/lib/system-managed" import { useDeleteCluster } from "@/mutations/ecs" +import { ec2ImagesQueryOptions } from "@/queries/ec2" import { ecsClustersQueryOptions } from "@/queries/ecs" import { CreateClusterDialog } from "./create-cluster-dialog" +import { EcsSectionNav } from "./ecs-section-nav" +import { EcsSystemImageRequired } from "./ecs-system-image-required" export function ClustersListPage() { const navigate = useNavigate() + const queryClient = useQueryClient() const { data: clusters } = useSuspenseQuery(ecsClustersQueryOptions) + const { data: imagesData } = useSuspenseQuery(ec2ImagesQueryOptions) const deleteCluster = useDeleteCluster() const [createOpen, setCreateOpen] = useState(false) const [deleteTarget, setDeleteTarget] = useState(null) + const [isRechecking, setIsRechecking] = useState(false) + + const hasEcsSystemImage = (imagesData.Images ?? []).some(isEcsSystemImage) + + async function handleRecheck() { + setIsRechecking(true) + try { + await queryClient.invalidateQueries({ + queryKey: ec2ImagesQueryOptions.queryKey, + }) + } finally { + setIsRechecking(false) + } + } function handleDelete() { if (!deleteTarget) { @@ -33,11 +53,25 @@ export function ClustersListPage() { <> setCreateOpen(true)}>Create Cluster + } title="Clusters" /> + + + {!hasEcsSystemImage && ( + + )} + {deleteCluster.isError && ( (null) + const [showProvision, setShowProvision] = useState(false) function handleConfirm() { if (!pending) { @@ -72,14 +75,14 @@ export function ContainerInstancesTab({ const error = updateState.error ?? deregister.error const isPending = updateState.isPending || deregister.isPending - if (instances.length === 0) { - return ( -

No container instances found.

- ) - } - return ( <> +
+ +
+ {isError && ( )} -
- - - - - - - - - - - - {instances.map((instance: ContainerInstance) => { - const arn = instance.containerInstanceArn ?? "" - const draining = instance.status === "DRAINING" - return ( - - - - - - - - ) - })} - -
EC2 InstanceStatusRunningPending - Actions -
- {instance.ec2InstanceId} - - - - {instance.runningTasksCount ?? 0} - - {instance.pendingTasksCount ?? 0} - -
- - -
-
-
+ {instances.length === 0 ? ( +

No container instances found.

+ ) : ( +
+ + + + + + + + + + + + {instances.map((instance: ContainerInstance) => { + const arn = instance.containerInstanceArn ?? "" + const draining = instance.status === "DRAINING" + return ( + + + + + + + + ) + })} + +
EC2 InstanceStatusRunningPending + Actions +
+ {instance.ec2InstanceId} + + + + {instance.runningTasksCount ?? 0} + + {instance.pendingTasksCount ?? 0} + +
+ + +
+
+
+ )} + + + + Clusters + + + Task definitions + + + ) +} diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/ecs-system-image-required.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/ecs-system-image-required.tsx new file mode 100644 index 000000000..2e6c0bdda --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/ecs-system-image-required.tsx @@ -0,0 +1,70 @@ +import { Check, Copy, RotateCw, TriangleAlert } from "lucide-react" + +import { Button } from "@/components/ui/button" +import { useCopyToClipboard } from "@/hooks/use-copy-to-clipboard" + +const IMPORT_COMMAND = "spx admin images import --name spinifex-ecs-node" + +export function EcsSystemImageRequired({ + isRechecking, + onRecheck, +}: { + isRechecking: boolean + onRecheck: () => void +}) { + const { copied, copy } = useCopyToClipboard() + + return ( +
+
+ +
+
+

+ ECS system image not found +

+

+ ECS clusters need a Spinifex-managed node image (containerd + + ecs-agent) to launch container instances. Import it before + creating a cluster. +

+
+ +
+ $ + {IMPORT_COMMAND} + +
+ +

+ Run from any authenticated spx CLI host. The command downloads and + registers the published node image, then click Recheck. +

+ + +
+
+
+ ) +} diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.test.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.test.tsx new file mode 100644 index 000000000..0087fe77d --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.test.tsx @@ -0,0 +1,103 @@ +import { fireEvent, screen, waitFor } from "@testing-library/react" +import { describe, expect, it, vi } from "vitest" + +import { + createTestQueryClient, + renderWithClient, +} from "@/test/elbv2-integration" + +vi.mock("@/lib/awsClient", () => ({ + getEcsClient: () => ({ send: vi.fn() }), + getEc2Client: () => ({ send: vi.fn() }), +})) + +const { provisionCapacity } = vi.hoisted(() => ({ + provisionCapacity: vi.fn(), +})) + +vi.mock("@/lib/ecs-provision", () => ({ + provisionCapacity, +})) + +import { ProvisionCapacityDialog } from "./provision-capacity-dialog" + +function seed() { + const qc = createTestQueryClient() + qc.setQueryData(["ec2", "subnets"], { + Subnets: [ + { + SubnetId: "subnet-1", + CidrBlock: "10.0.1.0/24", + AvailabilityZone: "ap-southeast-2a", + }, + ], + }) + qc.setQueryData(["ec2", "securityGroups"], { + SecurityGroups: [{ GroupId: "sg-1", GroupName: "default" }], + }) + qc.setQueryData(["ec2", "keypairs"], { + KeyPairs: [{ KeyPairId: "key-1", KeyName: "my-key" }], + }) + return qc +} + +describe("ProvisionCapacityDialog", () => { + it("renders the capacity fields", () => { + renderWithClient( + , + seed(), + ) + expect(screen.getByLabelText("Instance type")).toHaveValue("t3.small") + expect(screen.getByLabelText("Count")).toHaveValue(1) + expect(screen.getByLabelText("Subnet")).toBeInTheDocument() + expect(screen.getByLabelText("Security group")).toBeInTheDocument() + expect(screen.getByLabelText("Key pair")).toBeInTheDocument() + }) + + it("provisions with the selected values", async () => { + provisionCapacity.mockResolvedValue({ InstanceIDs: ["i-123"] }) + const onOpenChange = vi.fn() + renderWithClient( + , + seed(), + ) + + fireEvent.change(screen.getByLabelText("Subnet"), { + target: { value: "subnet-1" }, + }) + fireEvent.change(screen.getByLabelText("Security group"), { + target: { value: "sg-1" }, + }) + fireEvent.change(screen.getByLabelText("Key pair"), { + target: { value: "my-key" }, + }) + + fireEvent.click(screen.getByRole("button", { name: "Provision" })) + + await waitFor(() => { + expect(provisionCapacity).toHaveBeenCalledWith({ + Cluster: "web", + InstanceType: "t3.small", + Count: 1, + SubnetID: "subnet-1", + SecurityGroupID: "sg-1", + KeyName: "my-key", + }) + }) + await waitFor(() => { + expect(onOpenChange).toHaveBeenCalledWith(false) + }) + }) + + it("disables submit until required fields are selected", () => { + renderWithClient( + , + seed(), + ) + expect(screen.getByRole("button", { name: "Provision" })).toBeDisabled() + }) +}) diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.tsx new file mode 100644 index 000000000..3875c89ef --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/provision-capacity-dialog.tsx @@ -0,0 +1,205 @@ +import { useQuery } from "@tanstack/react-query" +import { useState } from "react" + +import { ErrorBanner } from "@/components/error-banner" +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from "@/components/ui/alert-dialog" +import { Field, FieldTitle } from "@/components/ui/field" +import { Input } from "@/components/ui/input" +import { useProvisionCapacity } from "@/mutations/ecs" +import { + ec2KeyPairsQueryOptions, + ec2SecurityGroupsQueryOptions, + ec2SubnetsQueryOptions, +} from "@/queries/ec2" + +interface ProvisionCapacityDialogProps { + clusterName: string + open: boolean + onOpenChange: (open: boolean) => void +} + +const SELECT_CLASS = + "h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm" + +export function ProvisionCapacityDialog({ + clusterName, + open, + onOpenChange, +}: ProvisionCapacityDialogProps) { + const provision = useProvisionCapacity() + const { data: subnetsData } = useQuery(ec2SubnetsQueryOptions) + const { data: sgData } = useQuery(ec2SecurityGroupsQueryOptions) + const { data: keyPairsData } = useQuery(ec2KeyPairsQueryOptions) + + const subnets = subnetsData?.Subnets ?? [] + const securityGroups = sgData?.SecurityGroups ?? [] + const keyPairs = keyPairsData?.KeyPairs ?? [] + + const [instanceType, setInstanceType] = useState("t3.small") + const [count, setCount] = useState(1) + const [subnetId, setSubnetId] = useState("") + const [securityGroupId, setSecurityGroupId] = useState("") + const [keyName, setKeyName] = useState("") + + function handleClose(nextOpen: boolean) { + if (!nextOpen) { + setInstanceType("t3.small") + setCount(1) + setSubnetId("") + setSecurityGroupId("") + setKeyName("") + provision.reset() + } + onOpenChange(nextOpen) + } + + async function handleProvision() { + try { + await provision.mutateAsync({ + Cluster: clusterName, + InstanceType: instanceType || undefined, + Count: count, + SubnetID: subnetId, + SecurityGroupID: securityGroupId, + KeyName: keyName || undefined, + }) + handleClose(false) + } catch { + // error shown via provision.error + } + } + + const disabled = + provision.isPending || subnetId === "" || securityGroupId === "" + + return ( + + + + Provision EC2 capacity + + Launch container instances into cluster “{clusterName}”. + They register automatically once booted. + + + +
+ + + + + setInstanceType(e.target.value)} + placeholder="t3.small" + value={instanceType} + /> + + + + + + + setCount(Number(e.target.value))} + type="number" + value={count} + /> + + + + + + + + + + + + + + + + + + + + + + +
+ + {provision.error && ( + + )} + + + Cancel + { + e.preventDefault() + void handleProvision() + }} + > + {provision.isPending ? "Provisioning…" : "Provision"} + + +
+
+ ) +} diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/service-detail-page.test.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/service-detail-page.test.tsx new file mode 100644 index 000000000..33cac207b --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/service-detail-page.test.tsx @@ -0,0 +1,124 @@ +import { screen } from "@testing-library/react" +import { describe, expect, it, vi } from "vitest" + +import { + createTestQueryClient, + renderWithClient, +} from "@/test/elbv2-integration" + +vi.mock("@/lib/awsClient", () => ({ + getEcsClient: () => ({ send: vi.fn() }), +})) + +vi.mock("@tanstack/react-router", async (importOriginal) => { + const actual = await importOriginal() + return { + ...actual, + useNavigate: () => vi.fn(), + Link: ({ + children, + to, + params, + }: { + children: React.ReactNode + to?: string + params?: { taskId?: string } + }) => {children}, + } +}) + +import { ServiceDetailPage } from "./service-detail-page" + +const TASK_ID = "task0001" +const TASK_ARN = `arn:aws:ecs:ap-southeast-2:123456789012:task/web/${TASK_ID}` + +function seedService() { + const qc = createTestQueryClient() + qc.setQueryData( + ["ecs", "clusters", "web", "services"], + [ + { + serviceName: "web-svc", + serviceArn: + "arn:aws:ecs:ap-southeast-2:123456789012:service/web/web-svc", + status: "ACTIVE", + desiredCount: 1, + runningCount: 1, + pendingCount: 0, + taskDefinition: + "arn:aws:ecs:ap-southeast-2:123456789012:task-definition/app:3", + launchType: "EC2", + loadBalancers: [ + { + targetGroupArn: + "arn:aws:elasticloadbalancing:ap-southeast-2:123456789012:targetgroup/tg/abc", + containerName: "app", + containerPort: 80, + }, + ], + events: [{ id: "e1", message: "service reached steady state" }], + }, + ], + ) + qc.setQueryData( + ["ecs", "clusters", "web", "tasks"], + [ + { + taskArn: TASK_ARN, + lastStatus: "RUNNING", + group: "service:web-svc", + attachments: [ + { + type: "ElasticNetworkInterface", + details: [ + { name: "privateIPv4Address", value: "10.0.1.5" }, + { name: "publicIPv4Address", value: "54.1.2.3" }, + ], + }, + ], + }, + ], + ) + return qc +} + +describe("ServiceDetailPage", () => { + it("lists member tasks linking to the task detail page", () => { + renderWithClient( + , + seedService(), + ) + + const link = screen.getByRole("link", { name: TASK_ID }) + expect(link).toBeInTheDocument() + expect(link.getAttribute("href")).toContain( + "/ecs/list-clusters/$clusterName/tasks/$taskId", + ) + expect(link.getAttribute("href")).toContain(TASK_ID) + expect(screen.getByText("10.0.1.5")).toBeInTheDocument() + expect(screen.getByText("54.1.2.3")).toBeInTheDocument() + }) + + it("renders load balancers and config", () => { + renderWithClient( + , + seedService(), + ) + + expect(screen.getByText("app")).toBeInTheDocument() + expect(screen.getByText("80")).toBeInTheDocument() + expect(screen.getByText("service reached steady state")).toBeInTheDocument() + }) + + it("shows a not-found message when the service is missing", () => { + const qc = createTestQueryClient() + qc.setQueryData(["ecs", "clusters", "web", "services"], []) + qc.setQueryData(["ecs", "clusters", "web", "tasks"], []) + renderWithClient( + , + qc, + ) + + expect(screen.getByText("Service not found.")).toBeInTheDocument() + }) +}) diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/service-detail-page.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/service-detail-page.tsx new file mode 100644 index 000000000..d5c19b212 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/service-detail-page.tsx @@ -0,0 +1,260 @@ +import type { + Deployment, + LoadBalancer, + ServiceEvent, + Task, +} from "@aws-sdk/client-ecs" +import { useSuspenseQuery } from "@tanstack/react-query" +import { Link } from "@tanstack/react-router" + +import { BackLink } from "@/components/back-link" +import { DetailCard } from "@/components/detail-card" +import { DetailRow } from "@/components/detail-row" +import { PageHeading } from "@/components/page-heading" +import { StateBadge } from "@/components/state-badge" +import { ecsServicesQueryOptions, ecsTasksQueryOptions } from "@/queries/ecs" + +// shortArn renders the trailing resource segment of an ARN, falling back to the +// whole string when there is no slash. +function shortArn(arn: string | undefined): string { + if (!arn) { + return "" + } + const idx = arn.lastIndexOf("/") + return idx === -1 ? arn : arn.slice(idx + 1) +} + +function attachmentDetail(task: Task, name: string): string | undefined { + const eni = (task.attachments ?? []).find( + (a) => a.type === "ElasticNetworkInterface", + ) + return eni?.details?.find((d) => d.name === name)?.value +} + +export function ServiceDetailPage({ + clusterName, + serviceName, +}: { + clusterName: string + serviceName: string +}) { + const { data: services } = useSuspenseQuery( + ecsServicesQueryOptions(clusterName), + ) + const { data: tasks } = useSuspenseQuery(ecsTasksQueryOptions(clusterName)) + const service = services.find((s) => s.serviceName === serviceName) + + if (!service) { + return ( + <> + + {clusterName} + + +

Service not found.

+ + ) + } + + const loadBalancers = service.loadBalancers ?? [] + const memberTasks = tasks.filter( + (t: Task) => t.group === `service:${serviceName}`, + ) + const deployments = service.deployments ?? [] + const events = service.events ?? [] + + return ( + <> + + {clusterName} + + + } + subtitle="Service Details" + title={serviceName} + /> + + + Configuration + + } + /> + + + + + + + + + +
+

Load balancers

+ {loadBalancers.length === 0 ? ( +

None

+ ) : ( +
+ + + + + + + + + + {loadBalancers.map((lb: LoadBalancer) => ( + + + + + + ))} + +
Target GroupContainerPort
+ {shortArn(lb.targetGroupArn)} + {lb.containerName}{lb.containerPort}
+
+ )} +
+ +
+

Tasks

+ {memberTasks.length === 0 ? ( +

No tasks found.

+ ) : ( +
+ + + + + + + + + + + {memberTasks.map((task: Task) => { + const id = shortArn(task.taskArn) + return ( + + + + + + + ) + })} + +
TaskLast StatusPrivate IPPublic IP
+ + {id} + + + + + {attachmentDetail(task, "privateIPv4Address") ?? "—"} + + {attachmentDetail(task, "publicIPv4Address") ?? "—"} +
+
+ )} +
+ +
+

Deployments

+ {deployments.length === 0 ? ( +

None

+ ) : ( +
+ + + + + + + + + + + + {deployments.map((deployment: Deployment) => ( + + + + + + + + ))} + +
StatusTask DefinitionDesiredRunningPending
{deployment.status} + {shortArn(deployment.taskDefinition)} + + {deployment.desiredCount ?? 0} + + {deployment.runningCount ?? 0} + + {deployment.pendingCount ?? 0} +
+
+ )} +
+ +
+

Events

+ {events.length === 0 ? ( +

None

+ ) : ( +
+ + + + + + + + + {events.map((event: ServiceEvent) => ( + + + + + ))} + +
TimeMessage
+ {event.createdAt + ? new Date(event.createdAt).toISOString() + : ""} + {event.message}
+
+ )} +
+ + ) +} diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/services-tab.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/services-tab.tsx index 1a485e57e..801602922 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/services-tab.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/services-tab.tsx @@ -51,7 +51,16 @@ export function ServicesTab({ clusterName }: { clusterName: string }) { key={service.serviceArn ?? service.serviceName} > - {service.serviceName} + + {service.serviceName} + diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-tab.test.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-list.test.tsx similarity index 84% rename from spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-tab.test.tsx rename to spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-list.test.tsx index aa1e4ee02..30290c33a 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-tab.test.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-list.test.tsx @@ -15,7 +15,7 @@ vi.mock("@tanstack/react-router", async (orig) => ({ Link: ({ children }: { children: React.ReactNode }) => <>{children}, })) -import { TaskDefinitionsTab } from "./task-definitions-tab" +import { TaskDefinitionsList } from "./task-definitions-list" function seed(arns: string[]) { const qc = createTestQueryClient() @@ -23,10 +23,10 @@ function seed(arns: string[]) { return qc } -describe("TaskDefinitionsTab", () => { +describe("TaskDefinitionsList", () => { it("renders family:revision from the ARN with a deregister action", () => { renderWithClient( - , + , seed(["arn:aws:ecs:ap-southeast-2:123456789012:task-definition/app:3"]), ) expect(screen.getByText("app:3")).toBeInTheDocument() @@ -37,7 +37,7 @@ describe("TaskDefinitionsTab", () => { it("opens the deregister confirmation", () => { renderWithClient( - , + , seed(["arn:aws:ecs:ap-southeast-2:123456789012:task-definition/app:3"]), ) fireEvent.click(screen.getByRole("button", { name: "Deregister" })) @@ -47,7 +47,7 @@ describe("TaskDefinitionsTab", () => { }) it("shows empty state with no task definitions", () => { - renderWithClient(, seed([])) + renderWithClient(, seed([])) expect(screen.getByText("No task definitions found.")).toBeInTheDocument() }) }) diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-tab.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-list.tsx similarity index 92% rename from spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-tab.tsx rename to spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-list.tsx index 4465963f2..9ba749642 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-tab.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-list.tsx @@ -15,7 +15,9 @@ function familyRevision(arn: string): string { return idx === -1 ? arn : arn.slice(idx + 1) } -export function TaskDefinitionsTab({ clusterName }: { clusterName: string }) { +// TaskDefinitionsList renders the account-scoped task definitions. clusterName, +// when present, is only the return target for the register wizard. +export function TaskDefinitionsList({ clusterName }: { clusterName?: string }) { const { data: arns } = useSuspenseQuery(ecsTaskDefinitionsQueryOptions) const deregister = useDeregisterTaskDefinition() const [target, setTarget] = useState(null) @@ -31,7 +33,7 @@ export function TaskDefinitionsTab({ clusterName }: { clusterName: string }) { <>
diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-page.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-page.tsx new file mode 100644 index 000000000..023ef6dcc --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-definitions-page.tsx @@ -0,0 +1,14 @@ +import { PageHeading } from "@/components/page-heading" + +import { EcsSectionNav } from "./ecs-section-nav" +import { TaskDefinitionsList } from "./task-definitions-list" + +export function TaskDefinitionsPage() { + return ( + <> + + + + + ) +} diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-detail-page.test.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-detail-page.test.tsx new file mode 100644 index 000000000..3e18535bf --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-detail-page.test.tsx @@ -0,0 +1,116 @@ +import { screen } from "@testing-library/react" +import { describe, expect, it, vi } from "vitest" + +import { + createTestQueryClient, + renderWithClient, +} from "@/test/elbv2-integration" + +vi.mock("@/lib/awsClient", () => ({ + getEcsClient: () => ({ send: vi.fn() }), +})) + +vi.mock("@tanstack/react-router", async (importOriginal) => { + const actual = await importOriginal() + return { + ...actual, + useNavigate: () => vi.fn(), + Link: ({ children, to }: { children: React.ReactNode; to?: string }) => ( + {children} + ), + } +}) + +import { TaskDetailPage } from "./task-detail-page" + +const TASK_ID = "abc123def456" +const TASK_ARN = `arn:aws:ecs:ap-southeast-2:123456789012:task/web/${TASK_ID}` + +function seedTask(details: { name: string; value: string }[]) { + const qc = createTestQueryClient() + qc.setQueryData( + ["ecs", "clusters", "web", "tasks"], + [ + { + taskArn: TASK_ARN, + lastStatus: "RUNNING", + desiredStatus: "RUNNING", + taskDefinitionArn: + "arn:aws:ecs:ap-southeast-2:123456789012:task-definition/app:3", + launchType: "EC2", + group: "service:web-svc", + attachments: [ + { + type: "ElasticNetworkInterface", + details, + }, + ], + containers: [ + { + name: "app", + image: "nginx:latest", + lastStatus: "RUNNING", + healthStatus: "HEALTHY", + }, + ], + }, + ], + ) + return qc +} + +describe("TaskDetailPage", () => { + it("shows private and public IP when both are present", () => { + renderWithClient( + , + seedTask([ + { name: "networkInterfaceId", value: "eni-0abc" }, + { name: "privateIPv4Address", value: "10.0.1.5" }, + { name: "publicIPv4Address", value: "54.1.2.3" }, + { name: "subnetId", value: "subnet-123" }, + { name: "macAddress", value: "0a:1b:2c:3d:4e:5f" }, + ]), + ) + + expect(screen.getByText("Private IP")).toBeInTheDocument() + expect(screen.getByText("10.0.1.5")).toBeInTheDocument() + expect(screen.getByText("Public IP")).toBeInTheDocument() + expect(screen.getByText("54.1.2.3")).toBeInTheDocument() + expect(screen.getByText("eni-0abc")).toBeInTheDocument() + }) + + it("renders an em dash for an absent public IP", () => { + renderWithClient( + , + seedTask([ + { name: "networkInterfaceId", value: "eni-0abc" }, + { name: "privateIPv4Address", value: "10.0.1.5" }, + { name: "subnetId", value: "subnet-123" }, + ]), + ) + + expect(screen.getByText("10.0.1.5")).toBeInTheDocument() + expect(screen.getByText("Public IP")).toBeInTheDocument() + expect(screen.queryByText("54.1.2.3")).not.toBeInTheDocument() + expect(screen.getAllByText("—").length).toBeGreaterThan(0) + }) + + it("lists containers with status and health", () => { + renderWithClient( + , + seedTask([{ name: "privateIPv4Address", value: "10.0.1.5" }]), + ) + + expect(screen.getByText("app")).toBeInTheDocument() + expect(screen.getByText("nginx:latest")).toBeInTheDocument() + expect(screen.getByText("HEALTHY")).toBeInTheDocument() + }) + + it("shows a not-found message when the task is missing", () => { + const qc = createTestQueryClient() + qc.setQueryData(["ecs", "clusters", "web", "tasks"], []) + renderWithClient(, qc) + + expect(screen.getByText("Task not found.")).toBeInTheDocument() + }) +}) diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-detail-page.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-detail-page.tsx new file mode 100644 index 000000000..bc70dcc36 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/task-detail-page.tsx @@ -0,0 +1,178 @@ +import type { Attachment, Container, Task } from "@aws-sdk/client-ecs" +import { useSuspenseQuery } from "@tanstack/react-query" + +import { BackLink } from "@/components/back-link" +import { DetailCard } from "@/components/detail-card" +import { DetailRow } from "@/components/detail-row" +import { PageHeading } from "@/components/page-heading" +import { StateBadge } from "@/components/state-badge" +import { ecsTasksQueryOptions } from "@/queries/ecs" + +// shortArn renders the trailing resource segment of an ARN, falling back to the +// whole string when there is no slash. +function shortArn(arn: string | undefined): string { + if (!arn) { + return "" + } + const idx = arn.lastIndexOf("/") + return idx === -1 ? arn : arn.slice(idx + 1) +} + +function attachmentDetail( + attachment: Attachment | undefined, + name: string, +): string | undefined { + return attachment?.details?.find((d) => d.name === name)?.value +} + +function formatTime(value: Date | undefined): string { + return value ? new Date(value).toISOString() : "" +} + +export function TaskDetailPage({ + clusterName, + taskId, +}: { + clusterName: string + taskId: string +}) { + const { data: tasks } = useSuspenseQuery(ecsTasksQueryOptions(clusterName)) + const task = tasks.find((t: Task) => (t.taskArn ?? "").endsWith(taskId)) + + if (!task) { + return ( + <> + + {clusterName} + + +

Task not found.

+ + ) + } + + const eni = (task.attachments ?? []).find( + (a) => a.type === "ElasticNetworkInterface", + ) + const containers = task.containers ?? [] + + return ( + <> + + {clusterName} + + + } + subtitle="Task Details" + title={shortArn(task.taskArn)} + /> + + + Configuration + + + } + /> + + + + + + + + {task.stoppedReason ? ( + + ) : null} + + + +
+ + Networking + {eni ? ( + + + + + + + + ) : ( +
+

+ Network mode does not assign an ENI. +

+
+ )} +
+
+ +
+

Containers

+ {containers.length === 0 ? ( +

No containers.

+ ) : ( +
+ + + + + + + + + + + + {containers.map((container: Container) => ( + + + + + + + + ))} + +
NameImageStatusHealthExit Code / Reason
{container.name} + {container.image} + + + {container.healthStatus} + {container.exitCode === undefined + ? (container.reason ?? "") + : String(container.exitCode)} +
+
+ )} +
+ + ) +} diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/tasks-tab.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/tasks-tab.tsx index 025187a5e..f2ccae39c 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/tasks-tab.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/-components/tasks-tab.tsx @@ -70,7 +70,15 @@ export function TasksTab({ clusterName }: { clusterName: string }) { const stoppable = task.lastStatus !== "STOPPED" return ( - {id} + + + {id} + + diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName.tsx new file mode 100644 index 000000000..3229505a6 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName.tsx @@ -0,0 +1,31 @@ +import { createFileRoute } from "@tanstack/react-router" + +import { ecsServicesQueryOptions, ecsTasksQueryOptions } from "@/queries/ecs" + +import { ServiceDetailPage } from "../../../-components/service-detail-page" + +export const Route = createFileRoute( + "/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName", +)({ + loader: async ({ context, params }) => { + await Promise.all([ + context.queryClient.ensureQueryData( + ecsServicesQueryOptions(params.clusterName), + ), + context.queryClient.ensureQueryData( + ecsTasksQueryOptions(params.clusterName), + ), + ]) + }, + head: ({ params }) => ({ + meta: [{ title: `${params.serviceName} | ECS | Mulga` }], + }), + component: ServiceDetail, +}) + +function ServiceDetail() { + const { clusterName, serviceName } = Route.useParams() + return ( + + ) +} diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId.tsx new file mode 100644 index 000000000..85ad73ac9 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId.tsx @@ -0,0 +1,24 @@ +import { createFileRoute } from "@tanstack/react-router" + +import { ecsTasksQueryOptions } from "@/queries/ecs" + +import { TaskDetailPage } from "../../../-components/task-detail-page" + +export const Route = createFileRoute( + "/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId", +)({ + loader: async ({ context, params }) => { + await context.queryClient.ensureQueryData( + ecsTasksQueryOptions(params.clusterName), + ) + }, + head: ({ params }) => ({ + meta: [{ title: `${params.taskId} | ECS | Mulga` }], + }), + component: TaskDetail, +}) + +function TaskDetail() { + const { clusterName, taskId } = Route.useParams() + return +} diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/index.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/index.tsx index 8ad19053a..251c8df9d 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/index.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/list-clusters/index.tsx @@ -1,12 +1,16 @@ import { createFileRoute } from "@tanstack/react-router" +import { ec2ImagesQueryOptions } from "@/queries/ec2" import { ecsClustersQueryOptions } from "@/queries/ecs" import { ClustersListPage } from "../-components/clusters-list-page" export const Route = createFileRoute("/_auth/ecs/(clusters)/list-clusters/")({ loader: async ({ context }) => { - await context.queryClient.ensureQueryData(ecsClustersQueryOptions) + await Promise.all([ + context.queryClient.ensureQueryData(ecsClustersQueryOptions), + context.queryClient.ensureQueryData(ec2ImagesQueryOptions), + ]) }, head: () => ({ meta: [{ title: "Clusters | ECS | Mulga" }], diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/task-definitions.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/task-definitions.tsx new file mode 100644 index 000000000..ec680d899 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ecs/(clusters)/task-definitions.tsx @@ -0,0 +1,15 @@ +import { createFileRoute } from "@tanstack/react-router" + +import { ecsTaskDefinitionsQueryOptions } from "@/queries/ecs" + +import { TaskDefinitionsPage } from "./-components/task-definitions-page" + +export const Route = createFileRoute("/_auth/ecs/(clusters)/task-definitions")({ + loader: async ({ context }) => { + await context.queryClient.ensureQueryData(ecsTaskDefinitionsQueryOptions) + }, + head: () => ({ + meta: [{ title: "Task Definitions | ECS | Mulga" }], + }), + component: TaskDefinitionsPage, +}) diff --git a/spinifex/tags/tags.go b/spinifex/tags/tags.go index 9514888dd..68dfcfb1f 100644 --- a/spinifex/tags/tags.go +++ b/spinifex/tags/tags.go @@ -15,6 +15,11 @@ const ( // their ENIs, the unified eks-node AMI, cluster + nodegroup SGs). ManagedByEKS = "eks" + // ManagedByECS identifies the spinifex-ecs-node AMI for resolution. + // Container instances launched from it stay customer-owned and untagged, + // so this value is not added to IsSystemManaged. + ManagedByECS = "ecs" + // LBARNKey stores the parent LB ARN on ELBv2-managed ENIs. LBARNKey = "spinifex:lb-arn" ) diff --git a/spinifex/utils/images.go b/spinifex/utils/images.go index e2efb993a..d8458c240 100644 --- a/spinifex/utils/images.go +++ b/spinifex/utils/images.go @@ -435,6 +435,23 @@ var AvailableImages = map[string]Images{ BootMode: "bios", Tags: map[string]string{"spinifex:managed-by": "eks"}, }, + + // ECS container-instance system AMI. Resolved by spinifex:managed-by=ecs tag — + // importing this entry lets ECS launch container instances that register and run tasks. + "spinifex-ecs-node": { + Name: "spinifex-ecs-node", + Description: "Mulga ECS node image — Alpine 3.21.7 + containerd + ecs-agent (registers as a container instance at first boot)", + Distro: "alpine", + Version: "3.21.7", + Arch: "x86_64", + Platform: "Linux/UNIX", + CreatedAt: time.Date(2026, 6, 26, 0, 0, 0, 0, time.UTC), + URL: "https://iso.mulgadc.com/system-ami/spinifex-ecs-node-x86_64.qcow2", + Checksum: "https://iso.mulgadc.com/system-ami/spinifex-ecs-node-x86_64.qcow2.sha256", + ChecksumType: "sha256", + BootMode: "bios", + Tags: map[string]string{"spinifex:managed-by": "ecs"}, + }, } func ExtractDiskImageFromFile(imagepath string, tmpdir string) (diskimage string, err error) { diff --git a/spinifex/utils/utils_test.go b/spinifex/utils/utils_test.go index 03ead0e34..0ac10299d 100644 --- a/spinifex/utils/utils_test.go +++ b/spinifex/utils/utils_test.go @@ -1636,3 +1636,10 @@ func TestClientIP(t *testing.T) { }) } } + +func TestAvailableImages_ECSNodeEntry(t *testing.T) { + img, ok := AvailableImages["spinifex-ecs-node"] + require.True(t, ok, "spinifex-ecs-node must be in the system image catalog") + assert.Equal(t, "ecs", img.Tags["spinifex:managed-by"], + "ECS node image must carry the managed-by=ecs tag the UI guard resolves on") +}