!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a09bf6-0810-7351-b593-daeb6b335a78")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,162630,e=>{"use strict";e.i(204067);var t=e.i(796805);let n={Requested:"requested",Deferred:"deferred",Failed:"failed"};t.z.object({instructions:t.z.string().trim().max(2e3).nullable()});let r=t.z.object({instructions:t.z.string().nullable(),sync:t.z.enum([n.Requested,n.Deferred,n.Failed])});e.s(["INTERN_INSTRUCTIONS_MAX_LENGTH",0,2e3,"InternInstructionsSyncState",0,n,"InternInstructionsUpdateResponseSchema",0,r])},290430,348925,522099,e=>{"use strict";e.i(204067);var t=e.i(796805);let n={SlackAppUnowned:"slack_app_unowned",WorkspaceArchiveFailed:"workspace_archive_failed"},r=t.z.object({step:t.z.string(),message:t.z.string(),code:t.z.string().optional(),observed_at:t.z.string().datetime()}).passthrough(),i=t.z.object({started_at:t.z.string().datetime().optional(),current_step:t.z.string().optional(),status_before:t.z.string().optional(),attempt:t.z.number().int().nonnegative().optional(),failures:t.z.array(r).optional()}).passthrough(),a=new Set([n.SlackAppUnowned]),l={Terminal:"terminal",Retryable:"retryable",Unclassified:"unclassified"};e.s(["DESTROY_SWEEP_MAX_ATTEMPTS",0,5,"DestroyFailureCode",0,n,"DestroyRetryClass",0,l,"DestroyStateSchema",0,i,"classifyDestroyFailures",0,function(e){return 0===e.length?l.Unclassified:e.every(e=>void 0!==e.code&&a.has(e.code))?l.Terminal:e.some(e=>void 0!==e.code)?l.Retryable:l.Unclassified}],348925);let s={NonRetryable:"non_retryable",Retryable:"retryable",Unknown:"unknown"},o=t.z.enum([s.NonRetryable,s.Retryable,s.Unknown]),u={Running:"running",Succeeded:"succeeded",Failed:"failed"},c=t.z.enum([u.Running,u.Succeeded,u.Failed]),d=t.z.object({at:t.z.string().datetime(),message:t.z.string(),category:o}),g=t.z.object({status:c,attempts:t.z.number().int().nonnegative(),failures:t.z.array(d),last_failure:d.nullish()}),m=t.z.record(t.z.string(),g);e.s(["InternFailureCategory",0,s,"InternStepStatus",0,u,"InternStepsSchema",0,m],522099);let h={AwaitingSlackInstall:"awaiting_slack_install",Queued:"queued",EnsureOrKey:"ensure_or_key",CreateCfTunnel:"create_cf_tunnel",CreateGcpVm:"create_gcp_vm",Running:"running",Failed:"failed",Stopped:"stopped",Destroying:"destroying",DestroyFailed:"destroy_failed"},p=t.z.enum([h.AwaitingSlackInstall,h.Queued,h.EnsureOrKey,h.CreateCfTunnel,h.CreateGcpVm,h.Running,h.Failed,h.Stopped,h.Destroying,h.DestroyFailed]),z={Queued:"queued",EnsureOrKey:"ensure_or_key",CreateCfTunnel:"create_cf_tunnel",CreateGcpVm:"create_gcp_vm",Running:"running",Failed:"failed"},_=t.z.enum([z.Queued,z.EnsureOrKey,z.CreateCfTunnel,z.CreateGcpVm,z.Running,z.Failed]),b={[z.Queued]:{label:"Queued",stepNumber:1},[z.EnsureOrKey]:{label:"Minting OpenRouter API key",stepNumber:1},[z.CreateCfTunnel]:{label:"Creating Cloudflare tunnel",stepNumber:2},[z.CreateGcpVm]:{label:"Provisioning runtime VM",stepNumber:3},[z.Running]:{label:"Live",stepNumber:3},[z.Failed]:{label:"Failed",stepNumber:3}};t.z.object({current_step:_,step_label:t.z.string().optional(),step_number:t.z.number().optional(),total_steps:t.z.number().optional(),step_started_at:t.z.string().datetime().optional(),updated_at:t.z.string().datetime().optional()});let f={Applied:"applied",Unchanged:"unchanged",Failed:"failed"},y=t.z.enum([f.Applied,f.Unchanged,f.Failed]),v={Healthy:"healthy",Degraded:"degraded",Bypassed:"bypassed"},S=t.z.enum([v.Healthy,v.Degraded,v.Bypassed]),I={Healthy:"healthy",Unhealthy:"unhealthy"},k=t.z.enum([I.Healthy,I.Unhealthy]),A=t.z.enum(["rebooted_empty","vm_not_running","inconclusive"]),w=t.z.object({last_success:t.z.object({at:t.z.string().datetime(),remote:t.z.string(),short_sha:t.z.string()}).nullable(),last_failure:t.z.object({at:t.z.string().datetime(),detail:t.z.string()}).nullable(),observed_at:t.z.string().datetime()}),E=t.z.object({instance_id:t.z.string().nullish(),cf_tunnel_hostname:t.z.string().nullish(),provisioning_state:t.z.unknown().nullish(),vm_birth_config:t.z.object({zone:t.z.string().nullish(),runtime_image:t.z.string().nullish()}).passthrough().nullish(),desired_runtime_image:t.z.string().nullish(),desired_runtime_image_set_at:t.z.string().datetime().nullish().catch(void 0),running_runtime_image:t.z.string().nullish(),running_ori_version:t.z.string().nullish(),runtime_image_state:y.nullish().catch(void 0),runtime_image_observed_at:t.z.string().datetime().nullish().catch(void 0),runtime_refresh_reset:t.z.object({attempt:t.z.number().int().nonnegative(),reason:t.z.enum(["health_gate","stopped_vm_start"]).nullish(),requested_at:t.z.string().datetime().nullish(),reset_operation_name:t.z.string().nullish(),completed_at:t.z.string().datetime().nullish()}).nullish().catch(void 0),vm_stop:t.z.object({attempt:t.z.number().int().nonnegative(),reason:t.z.enum(["health_gate"]),stop_operation_name:t.z.string().nullish(),confirmed_at:t.z.string().datetime().nullish()}).nullish().catch(void 0),running_model:t.z.string().nullish(),running_model_observed_at:t.z.string().datetime().nullish().catch(void 0),health_outcome:S.nullish().catch(void 0),health_observed_at:t.z.string().datetime().nullish().catch(void 0),live_health:k.nullish().catch(void 0),live_health_observed_at:t.z.string().datetime().nullish().catch(void 0),last_healthy_at:t.z.string().datetime().nullish().catch(void 0),consecutive_failures:t.z.number().int().nonnegative().nullish().catch(void 0),empty_reboot:A.nullish().catch(void 0),backup_status:w.nullish().catch(void 0),workflow_instance_id:t.z.string().nullish(),provisioning_attempt:t.z.number().int().nonnegative().nullish(),intern_log_id:t.z.string().uuid().nullish()}).passthrough(),R=t.z.string().min(1).max(39).regex(/^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$/,"GitHub org must be 1-39 chars, alphanumerics + single hyphens (no leading/trailing/consecutive).").transform(e=>e.toLowerCase()),U=t.z.string().min(1).max(255),j=t.z.object({vcs_org:U,repo:t.z.string().nullable(),default_branch:t.z.string().nullish()}),x=t.z.object({archive_id:t.z.string(),requested_at:t.z.string(),applied_at:t.z.string().optional(),reopen_pending:t.z.string().optional()}),T=t.z.object({status:p.optional().catch(void 0),last_failure:t.z.object({step:t.z.string(),error:t.z.string(),at:t.z.string().datetime()}).nullish(),instructions:t.z.string().nullish(),model:t.z.string().nullish(),features_source:t.z.string().nullish(),steps:m.optional(),destroy:i.optional(),restore:x.optional()});T.extend({status:p.optional()}).partial();let N="Intern name must be 2-17 chars, start with a lowercase letter, contain only lowercase a-z/0-9 and single hyphens between alphanumeric segments.",C=t.z.string().min(2,N).max(17,N).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,N);e.s(["GithubOrgSchema",0,R,"INTERN_NAME_MAX_LENGTH",0,17,"INTERN_PROVISIONING_STEPS",0,b,"INTERN_TOTAL_STEPS",0,3,"InternHealthOutcome",0,v,"InternLiveHealth",0,I,"InternMetadataSchema",0,T,"InternNameSchema",0,C,"InternProvisioningStep",0,z,"InternProvisioningStepSchema",0,_,"InternStatus",0,h,"InternStatusSchema",0,p,"RuntimeImageState",0,f,"RuntimeImageStateSchema",0,y,"RuntimeMetadataSchema",0,E,"VcsMetadataSchema",0,j],290430)},738367,817673,766148,e=>{"use strict";e.i(204067);var t=e.i(796805),n=e.i(290430);t.z.object({data:t.z.object({intern:t.z.object({name:n.InternNameSchema}),slack:t.z.object({outcome:t.z.nativeEnum({Applied:"applied",ConfigTokenRejected:"config_token_rejected",InvalidManifest:"invalid_manifest",RateLimited:"rate_limited",ReinstallRequired:"reinstall_required",SlackAppMissing:"slack_app_missing",SlackUnavailable:"slack_unavailable",SlackUnconfigured:"slack_unconfigured"}),retryAfterSeconds:t.z.number().int().nonnegative().optional()})})}),e.s([],738367),e.s(["INTERNS_MAX_LIMIT",0,500],817673);var r=e.i(162630);let i=t.z.string().trim().min(1).max(200).regex(/^[A-Za-z0-9~._:@+-]+\/[A-Za-z0-9~._:@+-]+$/u,"Expected an author/slug model id");t.z.object({model:i.nullable()});let a=t.z.object({model:t.z.string().nullable(),sync:t.z.enum([r.InternInstructionsSyncState.Requested,r.InternInstructionsSyncState.Deferred,r.InternInstructionsSyncState.Failed])});e.s(["InternModelUpdateResponseSchema",0,a],766148)},55494,e=>{"use strict";e.i(204067);var t=e.i(796805),n=e.i(290430);let r={UpToDate:"up_to_date",NotRunning:"not_running",NoVm:"no_vm",NoReconcileTimer:"no_reconcile_timer",VaultSidecarConfigStale:"vault_sidecar_config_stale",Unrecognized:"unrecognized"};t.z.string().min(1).max(512).optional();let i=t.z.discriminatedUnion("kind",[t.z.object({kind:t.z.literal("available")}),t.z.object({kind:t.z.literal("unavailable"),reason:t.z.enum([r.UpToDate,r.NotRunning,r.NoVm,r.NoReconcileTimer,r.VaultSidecarConfigStale,r.Unrecognized]).catch(r.Unrecognized)})]),a={Applied:"applied",Pending:"pending",Unknown:"unknown"},l=t.z.enum([a.Applied,a.Pending,a.Unknown]),s=t.z.object({instructions:l,model:l,observedAt:t.z.string().nullable()});a.Unknown,a.Unknown;let o=t.z.object({bootedImage:t.z.string().nullable(),canReconcile:t.z.boolean().nullable().default(null),currentImage:t.z.string(),hasStaleVaultSidecar:t.z.boolean().nullable().default(null),desiredImage:t.z.string().nullable(),desiredSetAt:t.z.string().nullable(),hasVm:t.z.boolean(),observedAt:t.z.string().nullable(),runningImage:t.z.string().nullable(),personaSync:s.optional(),runningModel:t.z.string().nullable().default(null),runningModelObservedAt:t.z.string().nullable().default(null),runningVersion:t.z.string().nullable().default(null),resolvedVersion:t.z.object({image:t.z.string(),version:t.z.string()}).nullable().default(null),state:n.RuntimeImageStateSchema.nullable()}),u=t.z.object({availability:i,runtimeImage:o});e.s(["InternPersonaApplyState",0,a,"InternRuntimeImageResponseSchema",0,u,"RuntimeImageUnavailableReason",0,r,"effectiveRuntimeImage",0,function(e){return null!==e.runningImage?e.runningImage:null===e.desiredSetAt?e.bootedImage:null}])},797084,e=>{"use strict";e.i(204067);var t=e.i(796805);let n=t.z.object({internId:t.z.string(),spendUsd:t.z.number().nullable()}),r=t.z.object({interns:t.z.array(n),windowEnd:t.z.string(),windowStart:t.z.string()});e.s(["INTERN_SPEND_WINDOW_DAYS",0,30,"InternSpendResponseSchema",0,r])},956425,e=>{"use strict";var t=e.i(350652),n=e.i(586404);e.i(204067);var r=e.i(796805),i=e.i(242871),a=e.i(290430);r.z.enum(["vcs","chat","cloud","mcp"]);r.z.enum(["github","slack","slack_admin","google","zoom","teams","discord","gitlab","bitbucket","gcp","aws","sandbox","agents_api","mcp"]);let l=r.z.object({github_org:a.GithubOrgSchema,app_id:r.z.string(),app_slug:r.z.string(),client_id:r.z.string(),client_secret_encrypted:i.EncryptedSecretSchema,private_key_encrypted:i.EncryptedSecretSchema,installation_id:r.z.string().nullable(),installed_at:r.z.string().datetime().nullable(),scope_intern_id:r.z.string().min(1).nullish(),user_callback_registered:r.z.boolean().nullish()}),s=r.z.object({kind:r.z.literal("pat"),github_login:r.z.string(),pat_encrypted:i.EncryptedSecretSchema,token_expires_at:r.z.string().nullable(),label:r.z.string().min(1).max(100).nullish(),github_owner:a.GithubOrgSchema.nullish(),repo_full_names:r.z.array(r.z.string().min(1)).nullish(),scope_intern_id:r.z.string().min(1).nullish(),oauth:r.z.object({app_credential_id:r.z.string().min(1),refresh_token_encrypted:i.EncryptedSecretSchema.nullable(),refresh_token_expires_at:r.z.string().datetime().nullable()}).nullish()});r.z.union([l,s]),r.z.object({slack_app_id:r.z.string(),client_id:r.z.string(),client_secret_encrypted:i.EncryptedSecretSchema,signing_secret_encrypted:i.EncryptedSecretSchema,bot_user_id:r.z.string().nullable(),bot_token_encrypted:i.EncryptedSecretSchema.nullable(),slack_team_id:r.z.string().nullable(),slack_enterprise_id:r.z.string().nullable(),is_enterprise_install:r.z.boolean().nullable(),installed_at:r.z.string().datetime().nullable(),scopes_granted:r.z.array(r.z.string()).nullable(),installer_slack_user_id:r.z.string().nullish(),tokens_version:r.z.string().nullable()}),r.z.object({access_token_encrypted:i.EncryptedSecretSchema,refresh_token_encrypted:i.EncryptedSecretSchema,expires_at:r.z.string().datetime(),scopes:r.z.array(r.z.string()),last_rotated_at:r.z.string().datetime().nullable()}),r.z.object({google_workspace_id:r.z.string().nullable(),client_id:r.z.string(),client_secret_encrypted:i.EncryptedSecretSchema,refresh_token_encrypted:i.EncryptedSecretSchema.nullable(),scopes:r.z.array(r.z.string()),installed_at:r.z.string().datetime().nullable()}),r.z.object({client_id:r.z.string(),client_secret_encrypted:i.EncryptedSecretSchema,bot_token_encrypted:i.EncryptedSecretSchema.nullable(),installed_at:r.z.string().datetime().nullable()}),r.z.object({tenant_id:r.z.string(),client_id:r.z.string(),client_secret_encrypted:i.EncryptedSecretSchema,installed_at:r.z.string().datetime().nullable()}),r.z.object({guild_id:r.z.string(),bot_token_encrypted:i.EncryptedSecretSchema,installed_at:r.z.string().datetime().nullable()}),r.z.object({gitlab_group:r.z.string(),access_token_encrypted:i.EncryptedSecretSchema,installed_at:r.z.string().datetime().nullable()}),r.z.object({workspace_slug:r.z.string(),access_token_encrypted:i.EncryptedSecretSchema,installed_at:r.z.string().datetime().nullable()}),r.z.object({project_id:r.z.string(),zone:r.z.string(),machine_type:r.z.string(),service_account_email:r.z.string().min(1).nullable(),service_account_key_encrypted:i.EncryptedSecretSchema.nullish()}).refine(e=>null!==e.service_account_email||(0,n.isDefinedAndNotNull)(e.service_account_key_encrypted),{message:"GCP credential must have either service_account_email (workload identity) or service_account_key_encrypted"}),r.z.object({account_id:r.z.string(),region:r.z.string(),role_arn:r.z.string()}),r.z.object({provider:r.z.string(),instance_id:r.z.string().nullable()}),r.z.object({provider:r.z.string(),api_key_encrypted:i.EncryptedSecretSchema});let o=r.z.object({at:r.z.string().datetime(),outcome:r.z.enum(["refreshed","failed"]),error:r.z.string().max(200).nullable()}),u=r.z.object({at:r.z.string().datetime(),outcome:r.z.enum(["ok","failed"]),tool_count:r.z.number().int().nonnegative().nullable(),error:r.z.string().max(200).nullable()});r.z.object({provider:r.z.string().min(1),server_url:r.z.string().min(1).nullable(),token_endpoint:r.z.string().min(1).nullable(),client_id:r.z.string().min(1).nullable(),refresh_token_encrypted:i.EncryptedSecretSchema.nullable(),access_token_expires_at:r.z.string().datetime().nullable(),workspace_name:r.z.string().nullish(),connected_at:r.z.string().datetime(),scope_intern_id:r.z.string().min(1).nullish(),label:r.z.string().min(1).max(100).nullish(),transport:t.mcpTransportSchema.nullish(),auth_method:r.z.nativeEnum(t.McpAuthMethod).nullish(),oauth_grant:r.z.nativeEnum(t.McpOauthGrant).nullish(),oauth_client_source:r.z.nativeEnum(t.McpOauthClientSource).nullish(),oauth_scope:r.z.string().min(1).max(1024).nullish(),client_secret_encrypted:i.EncryptedSecretSchema.nullish(),headers:r.z.array(t.McpHeaderSchema).nullish(),secret_keys:r.z.array(r.z.string().min(1)).nullish(),linked_secrets:r.z.array(r.z.object({key:r.z.string().min(1),name:r.z.string().min(1)})).nullish(),stdio:t.McpStdioConnectionConfigSchema.omit({transport:!0}).nullish(),stdio_secrets:r.z.array(r.z.object({key:r.z.string().min(1),value_encrypted:i.EncryptedSecretSchema})).nullish(),is_enabled:r.z.boolean().nullish(),last_refresh:o.nullish(),last_test:u.nullish()}),e.s([],956425)},350652,72230,242871,e=>{"use strict";let t,n;var r,i=e.i(693697);e.i(204067);var a=e.i(796805);let l=/^(?!.*__)[a-z]([a-z0-9_]*[a-z0-9])?$/,s={GithubApp:"github_app",GithubPat:"github_pat",Slack:"slack",SlackAdmin:"slack_admin",Google:"google",Zoom:"zoom",Teams:"teams",Discord:"discord",Gitlab:"gitlab",Bitbucket:"bitbucket",Gcp:"gcp",Aws:"aws",Sandbox:"sandbox",AgentsApi:"agents_api",Mcp:"mcp",Legacy:"legacy",Custom:"custom"},o=a.z.nativeEnum(s),u=a.z.object({header:a.z.string().regex(/^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,128}$/),secretName:a.z.string().regex(l),template:a.z.string().max(4096).regex(/^[^\r\n\0]*$/,{message:"template must be a single line"}).refine(e=>e.includes("{value}"),{message:"template must contain {value}"})}),c=a.z.object({host:a.z.string().trim().min(1),pathPrefix:a.z.string().startsWith("/").default("/"),inject:a.z.array(u).max(20).optional()}),d=a.z.object({id:a.z.string(),workspaceId:a.z.string(),kind:o,externalId:a.z.string(),routes:a.z.array(c),permissions:a.z.record(a.z.string(),a.z.unknown()),createdAt:a.z.string(),hasSecrets:a.z.boolean().optional()}),g=a.z.object({origins:a.z.array(d)}),m={Scoped:"scoped",Shared:"shared"},h=a.z.object({id:a.z.string(),agentId:a.z.string().nullable(),workspaceId:a.z.string(),name:a.z.string().regex(l),createdAt:a.z.string(),originId:a.z.string().nullable().default(null),precedence:a.z.nativeEnum(m).nullable().default(null)});a.z.object({secrets:a.z.array(h)});let p={NotConfigured:"vault_not_configured",Unauthorized:"vault_unauthorized",Unreachable:"vault_unreachable",UpstreamError:"vault_upstream_error",InvalidResponse:"vault_invalid_response",OriginNotManual:"vault_origin_not_manual",AgentNotInWorkspace:"vault_agent_not_in_workspace"};a.z.object({error:a.z.string(),code:a.z.nativeEnum(p)}),a.z.object({error:a.z.string().trim().min(1)}),e.s(["GITHUB_APP_VAULT_SECRET_NAME",0,"github_app_token","GITHUB_VAULT_SECRET_NAME",0,"github_token","SECRET_NAME_REGEX",0,l,"VaultErrorCode",0,p,"VaultOriginKind",0,s,"VaultPrecedence",0,m,"vaultOriginsSchema",0,g],72230);let z={Http:"http",Stdio:"stdio"},_=a.z.nativeEnum(z),b={None:"none",OAuth:"oauth"},f={AuthorizationCode:"authorization_code",ClientCredentials:"client_credentials"},y={Dynamic:"dynamic",PreRegistered:"preregistered"},v=["bun","bunx","node","npx","uv","uvx"],S=new Set(["authorization","proxy-authorization","x-api-key","x-goog-api-key","x-anthropic-api-key","x-auth-token","x-custom-auth","dd-api-key","dd-application-key","dd-app-key"]),I=/^(?!.*__)[A-Z][A-Z0-9_]{0,62}[A-Z0-9]$|^[A-Z]$/,k=/\$\{([A-Z][A-Z0-9_]*)\}|\$([A-Z][A-Z0-9_]*)(?![A-Z0-9_}])/g,A=/\$\{|\$[A-Z]/,w=/\$\{[A-Z][A-Z0-9_]*\}\}/,E=/\$\{|\$[A-Z]/,R=a.z.object({name:a.z.string().regex(/^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,128}$/),value:a.z.string().min(1).max(4096).regex(/^[^\r\n\0]*$/,{message:"Header values must be a single line"})});function U(e){let t=[...e.matchAll(k)],n=e.replace(k,"");if(A.test(n)||w.test(e))return(0,i.err)("Write a secret reference as $KEY, or wrap the key in braces after the dollar sign with both braces present");if(0===t.length)return(0,i.ok)({kind:"literal",value:e});let[r]=t,a=r?.[1]??r?.[2];return t.length>1||void 0===r||void 0===a?(0,i.err)("A header may reference at most one secret"):I.test(a)?(0,i.ok)({kind:"secret",key:a,template:e.replace(r[0],"{value}")}):(0,i.err)(`"${a}" is not a valid secret key`)}function j(e){return E.test(e)}function x(e){let t=[];for(let n of e){let e=U(n.value);(0,i.isErr)(e)||"secret"!==e.data.kind||t.includes(e.data.key)||t.push(e.data.key)}return t}let T=a.z.string().max(2048).url().refine(e=>{let t=(0,i.wrap)(()=>new URL(e));return(0,i.isOk)(t)&&"https:"===t.data.protocol&&""===t.data.username&&""===t.data.password},{message:"MCP server URL must be https, with no embedded credentials"}),N=a.z.object({method:a.z.literal(b.OAuth),grant:a.z.nativeEnum(f),clientSource:a.z.nativeEnum(y),clientId:a.z.string().min(1).max(512).nullable(),scope:a.z.string().min(1).max(1024).nullable()}),C=a.z.object({method:a.z.literal(b.None)}),M=a.z.discriminatedUnion("method",[C,N]),$=a.z.object({transport:a.z.literal(z.Http),url:T,headers:a.z.array(R).max(20),auth:M}),O=a.z.object({name:a.z.string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/),value:a.z.string().max(2048)}),D=a.z.object({transport:a.z.literal(z.Stdio),command:a.z.string().trim().min(1).max(256),args:a.z.array(a.z.string().max(1024)).max(64),env:a.z.array(O).max(32)}),P=a.z.union([$,D]);function F(e){return e.transport===z.Stdio}let L="oauth_client_required";function V(e,t){let n=U(e);return(0,i.isErr)(n)?(0,i.err)({code:"invalid_secret_reference",message:n.error}):"secret"!==n.data.kind||t.includes(n.data.key)?n:(0,i.err)({code:"missing_secret_value",message:`No value supplied for $${n.data.key}`})}function q(e){let t=new Set;for(let n of e){if(t.has(n))return n;t.add(n)}return null}function G(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function K(e){if("boolean"!=typeof e)throw Error(`boolean expected, not ${e}`)}function Z(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function B(e,...t){if(!G(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function H(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function Q(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function J(...e){for(let t=0;t>i&a),s=Number(n&a),o=4*!!r,u=4*!r;e.setUint32(t+o,l,r),e.setUint32(t+u,s,r)}function ee(e){return Uint8Array.from(e)}e.s(["MCP_STDIO_RUNTIME_COMMANDS",0,v,"McpAuthMethod",0,b,"McpConnectionConfigSchema",0,P,"McpHeaderSchema",0,R,"McpOauthClientSource",0,y,"McpOauthGrant",0,f,"McpStdioConnectionConfigSchema",0,D,"McpTransport",0,z,"isMcpStdioConfig",0,F,"mcpTransportSchema",0,_,"secretKeysReferencedBy",0,x,"validateMcpConnectionConfig",0,function(e,t){let n;if(F(e)){var r,a=e,l=t;if(!v.some(e=>e===a.command))return(0,i.err)({code:"stdio_command_unavailable",message:`The intern runtime can launch ${v.join(", ")} only; "${a.command}" is not installed`});let n=q(a.env.map(e=>e.name));if(null!==n)return(0,i.err)({code:"duplicate_env_name",message:`Environment variable "${n}" is listed more than once`});if(a.args.some(j))return(0,i.err)({code:"stdio_secret_reference",message:"Reference stored secrets from environment variables, not arguments: the command line is visible to every process on the intern"});for(let e of a.env){let t=V(e.value,l);if((0,i.isErr)(t))return t}return new TextEncoder().encode(JSON.stringify(a)).length>8192?(0,i.err)({code:"stdio_config_too_large",message:"A STDIO server configuration is limited to 8 KiB in total"}):(0,i.ok)(void 0)}let s=q(e.headers.map(e=>e.name.toLowerCase()));if(null!==s)return(0,i.err)({code:"duplicate_header",message:`Header "${s}" is listed more than once`});for(let n of e.headers){let e=V(n.value,t);if((0,i.isErr)(e))return e;let r=S.has(n.name.toLowerCase());if("literal"===e.data.kind&&r)return(0,i.err)({code:"credential_header_literal",message:function(e){let t=/^\$\{?([a-z][a-z0-9_]*)\}?$/.exec(e.value);if(t?.[1]!==void 0){let n=t[1].toUpperCase();return`${e.name}: write the reference in uppercase as $${n}; a vault secret named ${t[1]} is used automatically`}return`${e.name} carries a credential; store it as a secret and reference it as $KEY`}(n)})}return e.auth.method!==b.OAuth?(0,i.ok)(void 0):x(e.headers).length>0?(0,i.err)({code:"oauth_secret_headers",message:"An OAuth connection cannot also send secret-backed headers; use literal headers, or connect with headers instead of OAuth"}):(n=(r=e.auth).grant===f.ClientCredentials)&&r.clientSource===y.Dynamic?(0,i.err)({code:L,message:"The client-credentials grant needs a pre-registered client, not automatic registration"}):(r.clientSource!==y.Dynamic||n)&&null===r.clientId?(0,i.err)({code:L,message:"This OAuth mode needs a pre-registered client id"}):(0,i.ok)(void 0)},"vaultSecretNameForKey",0,function(e){return e.toLowerCase()}],350652),new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];let et=e=>Uint8Array.from(e.split("").map(e=>e.charCodeAt(0))),en=et("expand 16-byte k"),er=et("expand 32-byte k"),ei=Q(en),ea=Q(er);function el(e,t){return e<>>32-t}function es(e){return e.byteOffset%4==0}let eo=0x100000000-1,eu=new Uint32Array;function ec(e,t){let{allowShortKeys:n,extendNonceFn:r,counterLength:i,counterRight:a,rounds:l}=function(e,t){if(null==t||"object"!=typeof t)throw Error("options must be defined");return Object.assign(e,t)}({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if("function"!=typeof e)throw Error("core must be a function");return Z(i),Z(l),K(a),K(n),(t,s,o,u,c=0)=>{let d,g;B(t),B(s),B(o);let m=o.length;if(void 0===u&&(u=new Uint8Array(m)),B(u),Z(c),c<0||c>=eo)throw Error("arx: counter overflow");if(u.length=eo)throw Error("arx: counter overflow");let p=Math.min(64,o-h);if(d&&64===p){let e=h/4;if(h%4!=0)throw Error("arx: invalid block position");for(let t=0,n;t<16;t++)m[n=e+t]=g[n]^c[t];h+=64;continue}for(let e=0,t;e255&e[t++]|(255&e[t++])<<8;class eg{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,B(e=W(e),32);const t=ed(e,0),n=ed(e,2),r=ed(e,4),i=ed(e,6),a=ed(e,8),l=ed(e,10),s=ed(e,12),o=ed(e,14);this.r[0]=8191&t,this.r[1]=(t>>>13|n<<3)&8191,this.r[2]=(n>>>10|r<<6)&7939,this.r[3]=(r>>>7|i<<9)&8191,this.r[4]=(i>>>4|a<<12)&255,this.r[5]=a>>>1&8190,this.r[6]=(a>>>14|l<<2)&8191,this.r[7]=(l>>>11|s<<5)&8065,this.r[8]=(s>>>8|o<<8)&8191,this.r[9]=o>>>5&127;for(let t=0;t<8;t++)this.pad[t]=ed(e,16+2*t)}process(e,t,n=!1){let{h:r,r:i}=this,a=i[0],l=i[1],s=i[2],o=i[3],u=i[4],c=i[5],d=i[6],g=i[7],m=i[8],h=i[9],p=ed(e,t+0),z=ed(e,t+2),_=ed(e,t+4),b=ed(e,t+6),f=ed(e,t+8),y=ed(e,t+10),v=ed(e,t+12),S=ed(e,t+14),I=r[0]+(8191&p),k=r[1]+((p>>>13|z<<3)&8191),A=r[2]+((z>>>10|_<<6)&8191),w=r[3]+((_>>>7|b<<9)&8191),E=r[4]+((b>>>4|f<<12)&8191),R=r[5]+(f>>>1&8191),U=r[6]+((f>>>14|y<<2)&8191),j=r[7]+((y>>>11|v<<5)&8191),x=r[8]+((v>>>8|S<<8)&8191),T=r[9]+(S>>>5|2048*!n),N=0,C=0+I*a+5*h*k+5*m*A+5*g*w+5*d*E;N=C>>>13,C&=8191,C+=5*c*R+5*u*U+5*o*j+5*s*x+5*l*T,N+=C>>>13,C&=8191;let M=N+I*l+k*a+5*h*A+5*m*w+5*g*E;N=M>>>13,M&=8191,M+=5*d*R+5*c*U+5*u*j+5*o*x+5*s*T,N+=M>>>13,M&=8191;let $=N+I*s+k*l+A*a+5*h*w+5*m*E;N=$>>>13,$&=8191,$+=5*g*R+5*d*U+5*c*j+5*u*x+5*o*T,N+=$>>>13,$&=8191;let O=N+I*o+k*s+A*l+w*a+5*h*E;N=O>>>13,O&=8191,O+=5*m*R+5*g*U+5*d*j+5*c*x+5*u*T,N+=O>>>13,O&=8191;let D=N+I*u+k*o+A*s+w*l+E*a;N=D>>>13,D&=8191,D+=5*h*R+5*m*U+5*g*j+5*d*x+5*c*T,N+=D>>>13,D&=8191;let P=N+I*c+k*u+A*o+w*s+E*l;N=P>>>13,P&=8191,P+=R*a+5*h*U+5*m*j+5*g*x+5*d*T,N+=P>>>13,P&=8191;let F=N+I*d+k*c+A*u+w*o+E*s;N=F>>>13,F&=8191,F+=R*l+U*a+5*h*j+5*m*x+5*g*T,N+=F>>>13,F&=8191;let L=N+I*g+k*d+A*c+w*u+E*o;N=L>>>13,L&=8191,L+=R*s+U*l+j*a+5*h*x+5*m*T,N+=L>>>13,L&=8191;let V=N+I*m+k*g+A*d+w*c+E*u;N=V>>>13,V&=8191,V+=R*o+U*s+j*l+x*a+5*h*T,N+=V>>>13,V&=8191;let q=N+I*h+k*m+A*g+w*d+E*c;N=q>>>13,q&=8191,q+=R*u+U*o+j*s+x*l+T*a,N+=q>>>13,q&=8191,C=8191&(N=(N=(N<<2)+N|0)+C|0),N>>>=13,M+=N,r[0]=C,r[1]=M,r[2]=$,r[3]=O,r[4]=D,r[5]=P,r[6]=F,r[7]=L,r[8]=V,r[9]=q}finalize(){let{h:e,pad:t}=this,n=new Uint16Array(10),r=e[1]>>>13;e[1]&=8191;for(let t=2;t<10;t++)e[t]+=r,r=e[t]>>>13,e[t]&=8191;e[0]+=5*r,r=e[0]>>>13,e[0]&=8191,e[1]+=r,r=e[1]>>>13,e[1]&=8191,e[2]+=r,n[0]=e[0]+5,r=n[0]>>>13,n[0]&=8191;for(let t=1;t<10;t++)n[t]=e[t]+r,r=n[t]>>>13,n[t]&=8191;n[9]-=8192;let i=(1^r)-1;for(let e=0;e<10;e++)n[e]&=i;i=~i;for(let t=0;t<10;t++)e[t]=e[t]&i|n[t];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let a=e[0]+t[0];e[0]=65535&a;for(let n=1;n<8;n++)a=(e[n]+t[n]|0)+(a>>>16)|0,e[n]=65535&a;J(n)}update(e){H(this),B(e=W(e));let{buffer:t,blockLen:n}=this,r=e.length;for(let i=0;i>>0,e[a++]=r[t]>>>8;return e}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}}let em=(r=e=>new eg(e),(t=(e,t)=>r(t).update(W(e)).digest()).outputLen=(n=r(new Uint8Array(32))).outputLen,t.blockLen=n.blockLen,t.create=e=>r(e),t);function eh(e,t,n,r,i,a=20){let l=e[0],s=e[1],o=e[2],u=e[3],c=t[0],d=t[1],g=t[2],m=t[3],h=t[4],p=t[5],z=t[6],_=t[7],b=n[0],f=n[1],y=n[2],v=l,S=s,I=o,k=u,A=c,w=d,E=g,R=m,U=h,j=p,x=z,T=_,N=i,C=b,M=f,$=y;for(let e=0;e{e.update(t);let n=t.length%16;n&&e.update(e_.subarray(n))},ef=new Uint8Array(32);function ey(e,t,n,r,i){var a,l;let s,o,u=e(t,n,ef),c=em.create(u);i&&eb(c,i),eb(c,r);let d=(a=r.length,l=i?i.length:0,K(!0),Y(o=new DataView((s=new Uint8Array(16)).buffer,s.byteOffset,s.byteLength),0,BigInt(l),!0),Y(o,8,BigInt(a),!0),s);c.update(d);let g=c.digest();return J(u,d),g}let ev=e=>(t,n,r)=>({encrypt(i,a){let l=i.length;(a=X(l+16,a,!1)).set(i);let s=a.subarray(0,-16);e(t,n,s,s,1);let o=ey(e,t,n,s,r);return a.set(o,l),J(o),a},decrypt(i,a){a=X(i.length-16,a,!1);let l=i.subarray(0,-16),s=i.subarray(-16),o=ey(e,t,n,l,r);if(!function(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r{"use strict";var t=e.i(505962),n=e.i(162630);e.i(738367);var r=e.i(817673),i=e.i(766148),a=e.i(55494),l=e.i(797084);e.i(956425);var s=e.i(290430),o=e.i(151960),u=e.i(626824),c=e.i(10684),d=e.i(710612),g=e.i(267482),m=e.i(693697);e.i(204067);var h=e.i(796805),p=e.i(450740),z=e.i(8842),_=e.i(79247),b=e.i(695707);e.i(270401);var f=e.i(612523);let y="/api/frontend/v1/private/interns",v=h.z.object({archivedAt:h.z.string().nullable(),cfTunnelHostname:h.z.string().nullable(),connectionCredentialIds:h.z.array(h.z.string()),createdAt:h.z.string(),creatorUserId:h.z.string(),description:h.z.string().nullable(),entityId:h.z.string(),iconSha256:h.z.string().nullable(),id:h.z.string(),instructions:h.z.string().nullable(),lastFailureMessage:h.z.string().nullable(),metadata:s.InternMetadataSchema,name:h.z.string(),openrouterKeyId:h.z.number().nullable(),progress:h.z.object({currentStep:s.InternProvisioningStepSchema,internId:h.z.string(),stepLabel:h.z.string(),stepNumber:h.z.number(),stepStartedAt:h.z.string(),totalSteps:h.z.number(),updatedAt:h.z.string()}).nullable(),provisioningSlug:h.z.string(),runtimeCredentialId:h.z.string().nullable(),runtimeMetadata:s.RuntimeMetadataSchema,slackAppId:h.z.string().nullable(),slackBotUserId:h.z.string().nullable(),slackInstallState:h.z.discriminatedUnion("kind",[h.z.object({kind:h.z.literal("not_provisioned")}),h.z.object({kind:h.z.literal("awaiting_install")}),h.z.object({installedAt:h.z.string(),kind:h.z.literal("installed"),slackTeamId:h.z.string()})]),slackTeamId:h.z.string().nullable(),status:s.InternStatusSchema,updatedAt:h.z.string(),vcsCredentialId:h.z.string().nullable(),vcsMetadata:s.VcsMetadataSchema.nullable(),vmZone:h.z.string().nullable(),workspaceId:h.z.string()}),S=h.z.object({currentRuntimeImage:h.z.string().nullable(),hasMore:h.z.boolean(),interns:h.z.array(v)}),I=h.z.object({intern:v}),k=(0,u.createQueryKeys)("interns",{list:e=>[{workspaceId:e}],detail:(e,t)=>[{internId:t,workspaceId:e}],runtimeImage:(e,t)=>[{internId:t,workspaceId:e}],spend:e=>[{workspaceId:e}]}),A=r.INTERNS_MAX_LIMIT;function w(e){return(0,z.queryOptions)({queryKey:k.list(e),queryFn:null===e?p.skipToken:({signal:t})=>(0,o.fetchAPIQuery)(y,{schema:S,searchParams:{limit:A,workspaceId:e},signal:t}),placeholderData:null===e?void 0:p.keepPreviousData})}function E(e){return{spendByInternId:new Map(e.interns.map(e=>[e.internId,e.spendUsd])),windowStart:e.windowStart}}async function R(e){let{acknowledgeOrphans:t,internId:n}=e,r=await (0,g.fetchJsonResult)(`${y}/${n}${!0===t?"?acknowledge_orphans=true":""}`,{method:"DELETE"});return(0,m.isErr)(r)?r:(0,m.ok)(void 0)}async function U(e,t){let n=await (0,g.fetchJsonResult)(`${y}/${e}/runtime-image`,{body:JSON.stringify({...void 0===t.image?{}:{image:t.image},...void 0===t.expectedImage?{}:{expectedImage:t.expectedImage}}),headers:{"Content-Type":"application/json"},method:"POST"});return(0,m.isErr)(n)?n:(0,m.ok)(n.data.data)}let j=h.z.object({data:n.InternInstructionsUpdateResponseSchema}),x=h.z.object({data:i.InternModelUpdateResponseSchema});e.s(["cachedInternsListOptions",0,function(e){return(0,z.queryOptions)({...w(e),enabled:!1,placeholderData:void 0})},"internDetailOptions",0,function(e,t){return(0,z.queryOptions)({queryKey:k.detail(e,t),queryFn:null===e||null===t?p.skipToken:({signal:e})=>(0,o.fetchAPIQuery)(`${y}/${t}`,{schema:I,signal:e})})},"internIconUrl",0,function(e,t){return`${y}/${e}/icon?v=${t}`},"internKeys",0,k,"internRuntimeImageOptions",0,function(e,t){return(0,z.queryOptions)({queryKey:k.runtimeImage(e,t),queryFn:null===t?p.skipToken:({signal:e})=>(0,o.fetchAPIQuery)(`${y}/${t}/runtime-image`,{schema:a.InternRuntimeImageResponseSchema,signal:e}),refetchInterval:e=>{var t;return void 0!==(t=e.state.data)&&(0,f.resolveRuntimeImageDisplay)({availability:t.availability,facts:t.runtimeImage,nowMs:Date.now()}).state===f.RuntimeImageDisplayState.Pending&&1e4},refetchIntervalInBackground:!0})},"internsListOptions",0,w,"useDestroyIntern",0,function(e){let n,r=(0,t.c)(2);return r[0]!==e?(n={mutationFn:R,invalidates:d.Invalidation.BACKGROUND_ONLY,backgroundInvalidates:(t,n)=>{let{internId:r}=n;return[k.list(e),k.detail(e,r),k.runtimeImage(e,r)]}},r[0]=e,r[1]=n):n=r[1],(0,d.useAPIMutation)(n)},"useInternSpend",0,function(e){let n,r,i=(0,t.c)(4);if(i[0]!==e)n=(0,z.queryOptions)({queryKey:k.spend(e),queryFn:null===e?p.skipToken:({signal:t})=>(0,o.fetchAPIQuery)(`${y}/spend`,{schema:l.InternSpendResponseSchema,searchParams:{workspaceId:e},signal:t}),staleTime:c.StaleTime.CATALOG}),i[0]=e,i[1]=n;else n=i[1];return i[2]!==n?(r={...n,select:E},i[2]=n,i[3]=r):r=i[3],(0,_.useQuery)(r)},"useInvalidateInterns",0,function(e){let n,r=(0,t.c)(3),i=(0,b.useQueryClient)();return r[0]!==i||r[1]!==e?(n=async()=>{await i.invalidateQueries({queryKey:k.list(e)})},r[0]=i,r[1]=e,r[2]=n):n=r[2],n},"useRequestInternRuntimeImage",0,function(e,n){let r,i,a,l,s,o,u=(0,t.c)(17);return u[0]!==n?(r=e=>U(n,e),u[0]=n,u[1]=r):r=u[1],u[2]!==e?(i=k.list(e),u[2]=e,u[3]=i):i=u[3],u[4]!==n||u[5]!==e?(a=k.detail(e,n),u[4]=n,u[5]=e,u[6]=a):a=u[6],u[7]!==n||u[8]!==e?(l=k.runtimeImage(e,n),u[7]=n,u[8]=e,u[9]=l):l=u[9],u[10]!==i||u[11]!==a||u[12]!==l?(s=[i,a,l],u[10]=i,u[11]=a,u[12]=l,u[13]=s):s=u[13],u[14]!==r||u[15]!==s?(o={mutationFn:r,invalidates:s},u[14]=r,u[15]=s,u[16]=o):o=u[16],(0,d.useAPIMutation)(o)},"useUpdateInternInstructions",0,function(e,n){let r,i,a,l,s,o=(0,t.c)(13);return o[0]!==n?(r=async e=>{let t=await (0,g.fetchJsonResult)(`${y}/${n}/instructions`,{body:JSON.stringify({instructions:e}),headers:{"Content-Type":"application/json"},method:"PUT"},j);return(0,m.isErr)(t)?t:(0,m.ok)(t.data.data)},o[0]=n,o[1]=r):r=o[1],o[2]!==e?(i=k.list(e),o[2]=e,o[3]=i):i=o[3],o[4]!==n||o[5]!==e?(a=k.detail(e,n),o[4]=n,o[5]=e,o[6]=a):a=o[6],o[7]!==i||o[8]!==a?(l=[i,a],o[7]=i,o[8]=a,o[9]=l):l=o[9],o[10]!==r||o[11]!==l?(s={mutationFn:r,invalidates:l},o[10]=r,o[11]=l,o[12]=s):s=o[12],(0,d.useAPIMutation)(s)},"useUpdateInternModel",0,function(e,n){let r,i,a,l,s,o=(0,t.c)(13);return o[0]!==n?(r=async e=>{let t=await (0,g.fetchJsonResult)(`${y}/${n}/model`,{body:JSON.stringify({model:e}),headers:{"Content-Type":"application/json"},method:"PUT"},x);return(0,m.isErr)(t)?t:(0,m.ok)(t.data.data)},o[0]=n,o[1]=r):r=o[1],o[2]!==e?(i=k.list(e),o[2]=e,o[3]=i):i=o[3],o[4]!==n||o[5]!==e?(a=k.detail(e,n),o[4]=n,o[5]=e,o[6]=a):a=o[6],o[7]!==i||o[8]!==a?(l=[i,a],o[7]=i,o[8]=a,o[9]=l):l=o[9],o[10]!==r||o[11]!==l?(s={mutationFn:r,invalidates:l},o[10]=r,o[11]=l,o[12]=s):s=o[12],(0,d.useAPIMutation)(s)}])},654040,e=>{"use strict";e.s(["getInternInitials",0,function(e){let t=e.trim();return 0===t.length||"Your intern"===t?"..":t.slice(0,2).toUpperCase()}])},612523,e=>{"use strict";var t=e.i(55494);e.i(956425);var n=e.i(290430);let r={UpToDate:"up_to_date",Outdated:"outdated",Pending:"pending",Stalled:"stalled",Unchanged:"unchanged",Failed:"failed",Unknown:"unknown"};function i(e){if(0===e.length)return"—";let[t,n]=e.split("@"),r=(t??e).split("/").at(-1)??e;if(void 0===n)return r;let[i,a]=n.split(":");return void 0===a?r:`${r.split(":").at(0)??r}@${i}:${a.slice(0,12)}`}function a(e){return(0,t.effectiveRuntimeImage)(e)}e.s(["RuntimeImageDisplayState",0,r,"formatRuntimeImageRef",0,i,"isRuntimeImageUpdateAvailable",0,function(e,t){return!t&&null!==e.runningRef&&null!==e.currentRef&&e.state!==r.UpToDate},"resolveRuntimeImageDisplay",0,function(e){var l,s,o;let u,{availability:c,facts:d,nowMs:g}=e,m=function(e){var t,i;let l,{facts:s,isUpToDate:o,nowMs:u}=e;return s.state===n.RuntimeImageState.Unchanged?r.Unchanged:s.state===n.RuntimeImageState.Failed?r.Failed:null!==s.desiredSetAt&&null===s.state?(t=s.desiredSetAt,i=u,Number.isNaN(l=Date.parse(t))||i-l>9e5)?r.Stalled:r.Pending:o?r.UpToDate:null!==a(s)&&s.hasVm?r.Outdated:r.Unknown}({facts:d,isUpToDate:c?.kind==="unavailable"&&c.reason===t.RuntimeImageUnavailableReason.UpToDate||null!==(u=a(l=d))&&u===l.currentImage,nowMs:g}),h=a(d),p=null===d.desiredSetAt?NaN:Date.parse(d.desiredSetAt),z=m===r.Pending?d.desiredImage:null;return{canRequest:c?.kind==="available"&&m!==r.Pending,restartImage:void 0!==(s=c)&&("available"===s.kind||s.reason===t.RuntimeImageUnavailableReason.UpToDate||s.reason===t.RuntimeImageUnavailableReason.VaultSidecarConfigStale)&&m!==r.Pending?h:null,currentRef:null===d.currentImage?null:i(d.currentImage),runningImage:h,runningRef:null===h?null:i(h),runningVersion:null===(o=d).runningImage?null:o.runningVersion,expiresAtMs:m!==r.Pending||Number.isNaN(p)?null:p+9e5,state:m,targetImage:z,targetRef:null===z?null:i(z)}},"runtimeImageFactsFromMetadata",0,function(e,t){return{bootedImage:e.vm_birth_config?.runtime_image??null,currentImage:t,desiredImage:e.desired_runtime_image??null,desiredSetAt:e.desired_runtime_image_set_at??null,hasVm:(e.vm_birth_config??null)!==null,runningImage:e.running_runtime_image??null,runningVersion:e.running_ori_version??null,state:e.runtime_image_state??null}}])}]); //# sourceMappingURL=40gl3wl_ukck6.js.map //# chunkId=01a09bf6-0810-7351-b593-daeb6b335a78