{"version":3,"file":"index.cjs","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","z"],"sources":["../src/v3/schemas/planDefinitions.ts","../src/v3/schemas/subscription.ts","../src/v3/schemas/subscribe.ts","../src/v3/schemas/portal.ts","../src/v3/schemas/error.ts","../src/v3/schemas/usage.ts","../src/v3/schemas/billingAlerts.ts","../src/v3/schemas/billingLimit.ts","../src/v3/schemas/registryCredentials.ts","../src/v3/schemas/enqueueBuild.ts","../src/v3/schemas/initialDeployment.ts","../src/v3/schemas/privateLink.ts","../src/v3/schemas/promoCodes.ts","../src/v3/schemas/ipLocation.ts","../src/v3/client/index.ts","../src/v3/machineDefinition.ts","../src/v3/machinePresets.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst ExceedableLimit = z.object({\n  number: z.number(),\n  canExceed: z.boolean().optional(),\n});\n\nexport type ExceedableLimit = z.infer<typeof ExceedableLimit>;\n\nconst EnvironmentBasedLimit = z.object({\n  production: z.number(),\n  staging: z.number(),\n  preview: z.number(),\n  development: z.number(),\n  canExceed: z.boolean().optional(),\n  // Legacy, return the `production` value\n  number: z.number(),\n});\nexport type EnvironmentBasedLimit = z.infer<typeof EnvironmentBasedLimit>;\n\nconst BatchRateLimitConfig = z.object({\n  type: z.string(),\n  interval: z.string(),\n  maxTokens: z.number(),\n  refillRate: z.number(),\n});\nexport type BatchRateLimitConfig = z.infer<typeof BatchRateLimitConfig>;\n\nconst BatchQueueConcurrencyConfig = z.object({\n  processingConcurrency: z.number(),\n});\nexport type BatchQueueConcurrencyConfig = z.infer<typeof BatchQueueConcurrencyConfig>;\n\n/**\n * Hosted webhook limits, synced into Organization.webhookLimitsConfig on plan changes. The webapp\n * falls back to its env defaults for any field that isn't set.\n */\nconst WebhookLimitsConfig = z.object({\n  maxWaitersPerEnvironment: z.number(),\n  maxWaitersPerEndpoint: z.number(),\n  concurrency: z.number(),\n  deliveryRetentionDays: z.number(),\n  deliveryRetentionStrict: z.boolean().optional(),\n  endpointRateLimitTokens: z.number().optional(),\n  endpointRateLimitWindowSeconds: z.number().optional(),\n  environmentRateLimitTokens: z.number().optional(),\n  environmentRateLimitWindowSeconds: z.number().optional(),\n});\nexport type WebhookLimitsConfig = z.infer<typeof WebhookLimitsConfig>;\n\nconst QueueSizeLimits = z.object({\n  development: z.number(),\n  deployed: z.number(),\n});\nexport type QueueSizeLimits = z.infer<typeof QueueSizeLimits>;\n\nconst Limits = z.object({\n  includedUsage: z.number(),\n  concurrentRuns: EnvironmentBasedLimit,\n  teamMembers: ExceedableLimit,\n  schedules: ExceedableLimit,\n  logRetentionDays: ExceedableLimit,\n  queryPeriodDays: ExceedableLimit,\n  alerts: ExceedableLimit,\n  hasStagingEnvironment: z.boolean(),\n  realtimeConcurrentConnections: ExceedableLimit,\n  branches: ExceedableLimit,\n  branchesDev: ExceedableLimit,\n  support: z.enum([\"community\", \"slack\"]),\n  batchRateLimitConfig: BatchRateLimitConfig.optional(),\n  batchQueueConcurrencyConfig: BatchQueueConcurrencyConfig.optional(),\n  webhookLimitsConfig: WebhookLimitsConfig.optional(),\n  metricDashboards: ExceedableLimit,\n  metricWidgetsPerDashboard: ExceedableLimit,\n  // Optional so an older webapp parsing a newer plan doesn't throw.\n  // Absent = unlimited via the webapp's getLimit fallback.\n  agentMessages: ExceedableLimit.optional(),\n  agentWatchMaxHours: ExceedableLimit.optional(),\n  agentWatchers: ExceedableLimit.optional(),\n  declaredSchedulesPerDeploy: ExceedableLimit.optional(),\n  queueSizeLimits: QueueSizeLimits.optional(),\n  hasPrivateNetworking: z.boolean().optional(),\n  privateLinkConnectionLimit: z.number().optional(),\n  hasSso: z.boolean().optional(),\n  // Duration string (e.g. \"30d\", \"1y\"). When set, the org gets a\n  // dedicated S2 stream basin with this retention; when omitted, the\n  // org's streams flow to the shared global basin.\n  streamBasinRetention: z.string().optional(),\n});\n\nexport type Limits = z.infer<typeof Limits>;\n\nconst commonMetadata = {\n  title: z.string(),\n  code: z.string(),\n};\n\nconst pricingLookup = {\n  tierPriceCode: z.string(),\n  usagePriceCode: z.string(),\n  usageCouponCode: z.string().optional(),\n};\nconst FreePlanDefinition = z.object({\n  ...commonMetadata,\n  type: z.literal(\"free\"),\n  limits: Limits,\n});\nexport type FreePlanDefinition = z.infer<typeof FreePlanDefinition>;\n\nconst PaidPlanDefinition = z.object({\n  ...commonMetadata,\n  type: z.literal(\"paid\"),\n  tierPrice: z.number(),\n  stripe: z.object(pricingLookup),\n  limits: Limits,\n});\nexport type PaidPlanDefinition = z.infer<typeof PaidPlanDefinition>;\n\nconst EnterprisePlanDefinition = z.object({\n  ...commonMetadata,\n  type: z.literal(\"enterprise\"),\n  limits: Limits,\n});\nexport type EnterprisePlanDefinition = z.infer<typeof EnterprisePlanDefinition>;\n\nexport const PlanDefinitionSchema = z.discriminatedUnion(\"type\", [\n  FreePlanDefinition,\n  PaidPlanDefinition,\n  EnterprisePlanDefinition,\n]);\nexport type PlanDefinition = z.infer<typeof PlanDefinitionSchema>;\n\nconst MachineDefinition = z.object({\n  code: z.string(),\n  title: z.string(),\n  cpu: z.number(),\n  memory: z.number(),\n  centsPerMs: z.number(),\n});\n\nexport type MachineDefinition = z.infer<typeof MachineDefinition>;\n\nexport const Plans = z.object({\n  free: FreePlanDefinition,\n  hobby: PaidPlanDefinition,\n  pro: PaidPlanDefinition,\n  enterprise: EnterprisePlanDefinition,\n});\nexport type Plans = z.infer<typeof Plans>;\n\n/** The pricing per step of the add-on, e.g. $10 for 50 units */\nconst AddOnPricing = z.object({\n  /** The step size - must purchase in multiples of this amount */\n  stepSize: z.number(),\n  /** Price per step in cents */\n  centsPerStep: z.number(),\n});\nexport type AddOnPricing = z.infer<typeof AddOnPricing>;\n\nexport const PlansResult = z.object({\n  plans: Plans,\n  usagePricing: z.object({\n    centsPerRunInvocation: z.number(),\n    machines: z.record(z.string(), MachineDefinition),\n    defaultMachine: z.string(),\n  }),\n  addOnPricing: z.object({\n    concurrency: AddOnPricing,\n    branches: AddOnPricing,\n    seats: AddOnPricing,\n    schedules: AddOnPricing,\n  }),\n});\n\nexport type PlansResult = z.infer<typeof PlansResult>;\n\nexport const AddOnDefinition = z.object({\n  code: z.enum([\"concurrency\", \"branches\", \"seats\", \"schedules\"]),\n  priceCode: z.string(),\n  pricing: AddOnPricing,\n});\n\nexport type AddOnDefinition = z.infer<typeof AddOnDefinition>;\n\nexport const AddOn = z.object({\n  purchased: z.number(),\n  quota: z.number().optional(),\n});\nexport type AddOn = z.infer<typeof AddOn>;\n\nexport const AddOns = z.object({\n  concurrentRuns: AddOn.optional(),\n  branches: AddOn.optional(),\n  seats: AddOn.optional(),\n  schedules: AddOn.optional(),\n});\nexport type AddOns = z.infer<typeof AddOns>;\n","import { z } from \"zod\";\nimport { AddOns, PlanDefinitionSchema } from \"./planDefinitions\";\n\nconst FreeTierStatus = z.enum([\"requires_connect\", \"approved\", \"rejected\"]);\nexport type FreeTierStatus = z.infer<typeof FreeTierStatus>;\n\nexport const SubscriptionResult = z.object({\n  freeTierStatus: FreeTierStatus,\n  isPaying: z.boolean(),\n  showSelfServe: z.boolean().default(true),\n  canceledAt: z.string().optional(),\n  plan: PlanDefinitionSchema.optional(),\n  addOns: AddOns.optional(),\n});\n\nexport type SubscriptionResult = z.infer<typeof SubscriptionResult>;\n\nexport const CurrentPlan = z.object({\n  //todo remove this after the next deploy\n  subscription: z.any(),\n  v3Subscription: SubscriptionResult,\n});\n\nexport type CurrentPlan = z.infer<typeof CurrentPlan>;\n","import { z } from \"zod\";\n\nconst SetPaidPlanBodySchema = z.object({\n  type: z.literal(\"paid\"),\n  planCode: z.string(),\n  userId: z.string(),\n});\n\nconst SetFreePlanBodySchema = z.object({\n  type: z.literal(\"free\"),\n  userId: z.string(),\n});\n\nexport const SetPlanBodySchema = z.discriminatedUnion(\"type\", [\n  SetPaidPlanBodySchema,\n  SetFreePlanBodySchema,\n]);\n\nexport type SetPlanBody = z.infer<typeof SetPlanBodySchema>;\n\nexport const FreeConnectRequiredSchema = z.object({\n  action: z.literal(\"free_connect_required\"),\n  connectUrl: z.string().url(),\n});\n\nexport type FreeConnectRequired = z.infer<typeof FreeConnectRequiredSchema>;\n\nexport const FreeConnectedSchema = z.object({\n  action: z.literal(\"free_connected\"),\n  accepted: z.boolean(),\n});\n\nexport type FreeConnected = z.infer<typeof FreeConnectedSchema>;\n\nconst UpdatedSubscriptionResultSchema = z.object({\n  action: z.literal(\"updated_subscription\"),\n  subscription: z.object({\n    planCode: z.string(),\n  }),\n});\n\nexport type UpdatedSubscriptionResult = z.infer<typeof UpdatedSubscriptionResultSchema>;\n\nconst CreateSubscriptionFlowStartSchema = z.object({\n  action: z.literal(\"create_subscription_flow_start\"),\n  subscription: z.object({\n    planCode: z.string(),\n  }),\n  checkoutUrl: z.string().url(),\n});\n\nexport type CreateSubscriptionFlowStart = z.infer<typeof CreateSubscriptionFlowStartSchema>;\n\nconst CanceledSubscriptionResultSchema = z.object({\n  action: z.literal(\"canceled_subscription\"),\n});\n\nexport type CanceledSubscriptionResult = z.infer<typeof CanceledSubscriptionResultSchema>;\n\nexport const SubscribeResultSchema = z.discriminatedUnion(\"action\", [\n  FreeConnectRequiredSchema,\n  FreeConnectedSchema,\n  CreateSubscriptionFlowStartSchema,\n  UpdatedSubscriptionResultSchema,\n  CanceledSubscriptionResultSchema,\n]);\n\nexport type SubscribeResult = z.infer<typeof SubscribeResultSchema>;\n\nexport const SetAddOnBody = z.object({\n  type: z.enum([\"concurrency\", \"branches\", \"seats\", \"schedules\"]),\n  amount: z.number(),\n});\n\nexport type SetAddOnBody = z.infer<typeof SetAddOnBody>;\n\nexport const SetAddOnResult = z.discriminatedUnion(\"result\", [\n  z.object({\n    result: z.literal(\"error\"),\n    error: z.string(),\n  }),\n  z.object({\n    result: z.literal(\"success\"),\n    type: z.string(),\n    amount: z.number(),\n    subscription: z.object({\n      id: z.string(),\n    }),\n  }),\n  z.object({\n    result: z.literal(\"max_quota_reached\"),\n    type: z.string(),\n    maxQuota: z.number(),\n  }),\n]);\n\nexport type SetAddOnResult = z.infer<typeof SetAddOnResult>;\n\nexport const CancelSubscriptionResponse = z.object({\n  outcome: z.enum([\"canceled\", \"already_canceled\", \"no_subscription\"]),\n  cancelAt: z.string().nullable(),\n});\n\nexport type CancelSubscriptionResponse = z.infer<typeof CancelSubscriptionResponse>;\n","import { z } from \"zod\";\n\nexport const CustomerPortalRequestBodySchema = z.object({\n  returnUrl: z.string(),\n});\n\nexport type CustomerPortalRequestBody = z.infer<typeof CustomerPortalRequestBodySchema>;\n\nexport const CustomerPortalSchema = z.object({\n  customerPortalUrl: z.string().optional(),\n});\n\nexport type CustomerPortal = z.infer<typeof CustomerPortalSchema>;\n","import { z } from \"zod\";\n\n// `.passthrough()` so endpoints can return extra context (e.g. `currentDealKey`\n// on a 409 from /api/admin/coupons/apply) without each one needing its own\n// error schema. `code` is the conventional machine-readable discriminator.\nexport const ErrorSchema = z\n  .object({\n    error: z.string(),\n    code: z.string().optional(),\n  })\n  .passthrough();\n\nexport type Error = z.infer<typeof ErrorSchema>;\n","import { z } from \"zod\";\n\nexport const UsageParams = z.object({\n  from: z.coerce.date(),\n  to: z.coerce.date(),\n});\nexport type UsageParams = z.infer<typeof UsageParams>;\n\nexport const UsageResult = z.object({\n  cents: z.number(),\n});\nexport type UsageResult = z.infer<typeof UsageResult>;\n\nconst Window = z.enum([\"MINUTE\", \"HOUR\", \"DAY\"]);\n\n// const BooleanParam = z.preprocess((val) => (val === \"true\" ? true : false), z.boolean());\n\nexport const UsageSeriesParams = z.object({\n  from: z.coerce.date(),\n  to: z.coerce.date(),\n  /** defaults to DAY */\n  window: Window.optional(),\n  timezone: z.string().optional(),\n  //these don't work at the moment because you can't group by items that aren't defined in the meter group by\n  // groupByEnvironmentType: BooleanParam.optional(),\n  // groupByTaskIdentifier: BooleanParam.optional(),\n});\n\nexport type UsageSeriesParams = z.infer<typeof UsageSeriesParams>;\n\nexport const UsageSeriesResult = z.object({\n  from: z.string(),\n  to: z.string(),\n  window: Window.optional(),\n  data: z\n    .object({\n      value: z.number(),\n      windowStart: z.string(),\n      windowEnd: z.string(),\n      //these don't work at the moment\n      // groupBy: z\n      //   .object({\n      //     environmentType: z.string().optional(),\n      //     taskIdentifer: z.string().optional(),\n      //   })\n      //   .optional(),\n    })\n    .array(),\n});\n\nexport type UsageSeriesResult = z.infer<typeof UsageSeriesResult>;\n\nexport const ReportComputeUsageEvent = z.object({\n  durationMs: z.number(),\n});\n\nexport type ReportComputeUsageEvent = z.infer<typeof ReportComputeUsageEvent>;\n\nexport const ReportUsagePlan = z.object({\n  type: z.string(),\n  code: z.string(),\n  isPaying: z.boolean(),\n});\n\nexport type ReportUsagePlan = z.infer<typeof ReportUsagePlan>;\n\nexport const ReportUsageResult = z.object({\n  hasAccess: z.boolean(),\n  balance: z.number().optional(),\n  usage: z.number().optional(),\n  overage: z.number().optional(),\n  plan: ReportUsagePlan.optional(),\n  limitState: z.literal(\"grace\").optional(),\n  reason: z.enum([\"free_tier_exceeded\", \"billing_limit\"]).optional(),\n});\n\nexport type ReportUsageResult = z.infer<typeof ReportUsageResult>;\n\n/** Upper bound for a single invocation base charge ($100). */\nexport const MAX_INVOCATION_COST_IN_CENTS = 10_000;\n\nexport const ReportInvocationUsageEvent = z.object({\n  organizationId: z.string().min(1).max(128),\n  costInCents: z.number().finite().min(0).max(MAX_INVOCATION_COST_IN_CENTS),\n  additionalData: z.record(z.string(), z.any()).optional(),\n});\n\nexport type ReportInvocationUsageEvent = z.infer<typeof ReportInvocationUsageEvent>;\n\nexport const ReportInvocationUsageResult = z.discriminatedUnion(\"success\", [\n  z.object({\n    success: z.literal(true),\n  }),\n  z.object({\n    success: z.literal(false),\n    error: z.string(),\n  }),\n]);\n","import { z } from \"zod\";\n\nconst BillingAlertDefinition = z.object({\n  amount: z.number(),\n  emails: z.array(z.string()),\n  alertLevels: z.array(z.number()),\n});\n\nexport const BillingAlertsResult = BillingAlertDefinition;\n\nexport type BillingAlertsResult = z.infer<typeof BillingAlertsResult>;\n\nexport const UpdateBillingAlertsRequest = z.object({\n  amount: z.number().positive(),\n  emails: z.array(z.string()),\n  alertLevels: z.array(z.number()),\n});\n\nexport type UpdateBillingAlertsRequest = z.infer<typeof UpdateBillingAlertsRequest>;\n","import { z } from \"zod\";\n\nexport const BillingLimitState = z.discriminatedUnion(\"status\", [\n  z.object({\n    status: z.literal(\"ok\"),\n  }),\n  z.object({\n    status: z.literal(\"grace\"),\n    hitAt: z.string(),\n    graceEndsAt: z.string(),\n  }),\n  z.object({\n    status: z.literal(\"rejected\"),\n    hitAt: z.string(),\n    graceEndsAt: z.string(),\n  }),\n]);\n\nexport type BillingLimitState = z.infer<typeof BillingLimitState>;\n\nconst billingLimitConfiguredFields = {\n  isConfigured: z.literal(true),\n  cancelInProgressRuns: z.boolean(),\n  limitState: BillingLimitState,\n  effectiveAmountCents: z.number().int().nonnegative().nullable(),\n  gracePeriodMs: z.number().int().nonnegative(),\n};\n\nexport const BillingLimitUnconfigured = z.object({\n  isConfigured: z.literal(false),\n  gracePeriodMs: z.number().int().nonnegative(),\n});\n\nexport const BillingLimitConfiguredNone = z.object({\n  ...billingLimitConfiguredFields,\n  mode: z.literal(\"none\"),\n});\n\nexport const BillingLimitConfiguredPlan = z.object({\n  ...billingLimitConfiguredFields,\n  mode: z.literal(\"plan\"),\n});\n\nexport const BillingLimitConfiguredCustom = z.object({\n  ...billingLimitConfiguredFields,\n  mode: z.literal(\"custom\"),\n  amountCents: z.number().int().positive(),\n});\n\nexport const BillingLimitResult = z.union([\n  BillingLimitUnconfigured,\n  BillingLimitConfiguredNone,\n  BillingLimitConfiguredPlan,\n  BillingLimitConfiguredCustom,\n]);\n\nexport type BillingLimitResult = z.infer<typeof BillingLimitResult>;\n\nexport const UpdateBillingLimitRequest = z.discriminatedUnion(\"mode\", [\n  z.object({\n    mode: z.literal(\"none\"),\n    cancelInProgressRuns: z.boolean(),\n  }),\n  z.object({\n    mode: z.literal(\"plan\"),\n    cancelInProgressRuns: z.boolean(),\n  }),\n  z.object({\n    mode: z.literal(\"custom\"),\n    amountCents: z.number().int().positive(),\n    cancelInProgressRuns: z.boolean(),\n  }),\n]);\n\nexport type UpdateBillingLimitRequest = z.infer<typeof UpdateBillingLimitRequest>;\n\nexport const ResolveBillingLimitRequest = z.discriminatedUnion(\"action\", [\n  z.object({\n    action: z.literal(\"increase\"),\n    newAmountCents: z.number().int().positive(),\n    resumeMode: z.enum([\"queue\", \"new_only\"]),\n  }),\n  z.object({\n    action: z.literal(\"remove\"),\n    resumeMode: z.enum([\"queue\", \"new_only\"]),\n  }),\n]);\n\nexport type ResolveBillingLimitRequest = z.infer<typeof ResolveBillingLimitRequest>;\n\nexport const BillingLimitActiveOrg = z.object({\n  orgId: z.string(),\n  limitState: z.enum([\"grace\", \"rejected\"]),\n});\n\nexport const BillingLimitsActiveResult = z.object({\n  orgs: z.array(BillingLimitActiveOrg),\n});\n\nexport type BillingLimitsActiveResult = z.infer<typeof BillingLimitsActiveResult>;\n\nexport const BillingLimitPendingResolveOrg = z.object({\n  organizationId: z.string(),\n  resumeMode: z.enum([\"queue\", \"new_only\"]),\n  resolvedAt: z.string(),\n});\n\nexport const BillingLimitsPendingResolvesResult = z.object({\n  orgs: z.array(BillingLimitPendingResolveOrg),\n});\n\nexport type BillingLimitsPendingResolvesResult = z.infer<typeof BillingLimitsPendingResolvesResult>;\n","import { z } from \"zod\";\n\nexport const RegistryCredentialsResponseSchema = z.object({\n  username: z.string(),\n  password: z.string(),\n  expiresAt: z.string().datetime(),\n  repositoryUri: z.string(),\n});\n\nexport type RegistryCredentialsResponse = z.infer<typeof RegistryCredentialsResponseSchema>;\n","import { z } from \"zod\";\n\nconst EnqueueBuildOptionsSchema = z.object({\n  skipPromotion: z.boolean().optional(),\n  configFilePath: z.string().optional(),\n  // Pre-built bundle: the build server only runs the container build\n  fromBundle: z.boolean().optional(),\n});\n\nexport const EnqueueBuildRequestSchema = z.union([\n  z.object({\n    deploymentId: z.string(),\n    artifactKey: z.string(),\n    options: EnqueueBuildOptionsSchema,\n  }),\n  // Build the deployment's commit from the project's connected GitHub repository.\n  z.object({\n    deploymentId: z.string(),\n    github: z.object({\n      commitSha: z.string().regex(/^[0-9a-f]{40}$/, \"commitSha must be a full lowercase git SHA\"),\n      ref: z.string().min(1).max(255),\n    }),\n    options: EnqueueBuildOptionsSchema,\n  }),\n]);\n\nexport type EnqueueBuildRequest = z.infer<typeof EnqueueBuildRequestSchema>;\n\nexport const EnqueueBuildResponseSchema = z.object({\n  buildId: z.string(),\n});\n\nexport type EnqueueBuildResponse = z.infer<typeof EnqueueBuildResponseSchema>;\n\nexport const EnqueueBuildErrorCodeSchema = z.enum([\n  \"DEPLOYMENT_NOT_PENDING\",\n  \"NO_CONNECTED_REPOSITORY\",\n  \"ATOMIC_PRODUCTION_REQUIRES_VERCEL\",\n  \"COMMIT_NOT_FOUND\",\n  \"GITHUB_UNAVAILABLE\",\n]);\n\nexport type EnqueueBuildErrorCode = z.infer<typeof EnqueueBuildErrorCodeSchema>;\n","import { z } from \"zod\";\n\nexport const TriggerInitialDeploymentRequestSchema = z.object({\n  environment: z.enum([\"prod\", \"staging\", \"preview\"]),\n  // Optional git branch whose HEAD to build. Absent = the repo's default branch\n  // (preserves prior behaviour). Bound the new input before external requests and queueing.\n  branch: z.string().min(1).max(255).optional(),\n});\n\nexport type TriggerInitialDeploymentRequest = z.infer<typeof TriggerInitialDeploymentRequestSchema>;\n\nexport const TriggerInitialDeploymentResponseSchema = z.object({\n  ok: z.boolean(),\n});\n\nexport type TriggerInitialDeploymentResponse = z.infer<\n  typeof TriggerInitialDeploymentResponseSchema\n>;\n","import { z } from \"zod\";\n\nexport const PrivateLinkConnectionStatus = z.enum([\n  \"PENDING\",\n  \"PROVISIONING\",\n  \"ACTIVE\",\n  \"ERROR\",\n  \"DELETING\",\n]);\nexport type PrivateLinkConnectionStatus = z.infer<typeof PrivateLinkConnectionStatus>;\n\nexport const PrivateLinkConnection = z.object({\n  id: z.string(),\n  friendlyId: z.string(),\n  name: z.string(),\n  organizationId: z.string(),\n  endpointServiceName: z.string(),\n  targetRegion: z.string(),\n  status: PrivateLinkConnectionStatus,\n  statusMessage: z.string().nullable(),\n  endpointDnsName: z.string().nullable(),\n  endpointIps: z.array(z.string()).nullable(),\n  provisionedAt: z.string().nullable(),\n  createdAt: z.string(),\n  updatedAt: z.string(),\n});\nexport type PrivateLinkConnection = z.infer<typeof PrivateLinkConnection>;\n\nexport const PrivateLinkConnectionList = z.object({\n  connections: z.array(PrivateLinkConnection),\n});\nexport type PrivateLinkConnectionList = z.infer<typeof PrivateLinkConnectionList>;\n\nexport const CreatePrivateLinkConnectionBody = z.object({\n  name: z\n    .string()\n    .min(1)\n    .max(100)\n    .regex(\n      /^[a-zA-Z][a-zA-Z0-9 _-]*$/,\n      \"Must start with a letter and contain only letters, numbers, spaces, hyphens, or underscores\"\n    ),\n  endpointServiceName: z\n    .string()\n    .regex(\n      /^com\\.amazonaws\\.vpce\\..+\\.vpce-svc-.+$/,\n      \"Must be a valid VPC Endpoint Service name (com.amazonaws.vpce.<region>.vpce-svc-*)\"\n    ),\n  // Region support is dynamic (driven by the billing service's env vars), so\n  // this validates the AWS region *format* only; the authoritative check that\n  // the region is actually configured happens server-side against the set of\n  // regions discovered from env vars.\n  targetRegion: z.string().regex(/^[a-z]{2}-[a-z]+-\\d+$/, \"Must be a valid AWS region\"),\n});\nexport type CreatePrivateLinkConnectionBody = z.infer<typeof CreatePrivateLinkConnectionBody>;\n\nexport const DeletePrivateLinkResult = z.object({\n  success: z.boolean(),\n});\nexport type DeletePrivateLinkResult = z.infer<typeof DeletePrivateLinkResult>;\n\nexport const PrivateLinkRegionsResult = z.object({\n  availableRegions: z.array(z.string()),\n  activeRegions: z.array(z.string()),\n});\nexport type PrivateLinkRegionsResult = z.infer<typeof PrivateLinkRegionsResult>;\n","import { z } from \"zod\";\n\nexport const ValidatePromoCodeBodySchema = z.object({\n  code: z.string(),\n});\nexport type ValidatePromoCodeBody = z.infer<typeof ValidatePromoCodeBodySchema>;\n\nexport const ValidatePromoCodeResult = z.object({\n  valid: z.boolean(),\n  amountInCents: z.number().optional(),\n  expiresAt: z.string().datetime().nullable().optional(),\n});\nexport type ValidatePromoCodeResultType = z.infer<typeof ValidatePromoCodeResult>;\n\nexport const ApplyPromoCodeBodySchema = z.object({\n  code: z.string(),\n  userId: z.string(),\n});\nexport type ApplyPromoCodeBody = z.infer<typeof ApplyPromoCodeBodySchema>;\n\nexport const ApplyPromoCodeResult = z.object({\n  applied: z.boolean(),\n  amountInCents: z.number().optional(),\n  expiresAt: z.string().datetime().nullable().optional(),\n  // Present when applied is false, e.g. \"already_redeemed\" or \"invalid\".\n  reason: z.string().optional(),\n});\nexport type ApplyPromoCodeResultType = z.infer<typeof ApplyPromoCodeResult>;\n\nexport const PromoCreditsResult = z.object({\n  promoCredits: z\n    .object({\n      grantedCents: z.number(),\n      remainingCents: z.number(),\n      expiresAt: z.string().datetime().nullable(),\n    })\n    .nullable(),\n});\nexport type PromoCreditsResultType = z.infer<typeof PromoCreditsResult>;\n","import { z } from \"zod\";\n\n/** Approximate country and network owner of an IPv4 address, from the IPinfo Lite dataset. */\nexport const IpLocation = z.object({\n  country: z.string().nullable(),\n  countryCode: z.string().nullable(),\n  asn: z.number().int().nullable(),\n  asName: z.string().nullable(),\n});\n\nexport type IpLocation = z.infer<typeof IpLocation>;\n\nexport const IpLocationResult = z.object({\n  location: IpLocation.nullable(),\n});\n\nexport type IpLocationResultBody = z.infer<typeof IpLocationResult>;\n","import type { ZodType, z } from \"zod\";\nimport type {\n  CustomerPortalRequestBody,\n  ReportInvocationUsageEvent,\n  SetPlanBody,\n  UpdateBillingAlertsRequest,\n  UpdateBillingLimitRequest,\n  ResolveBillingLimitRequest,\n  UsageParams,\n  UsageSeriesParams,\n  SetAddOnBody,\n  EnqueueBuildRequest,\n  TriggerInitialDeploymentRequest,\n  CreatePrivateLinkConnectionBody,\n} from \"../schemas\";\nimport {\n  BillingAlertsResult,\n  BillingLimitResult,\n  BillingLimitsActiveResult,\n  IpLocationResult,\n  CurrentPlan,\n  CustomerPortalSchema,\n  ErrorSchema,\n  PlansResult,\n  ReportInvocationUsageResult,\n  ReportUsageResult,\n  SubscribeResultSchema,\n  CancelSubscriptionResponse,\n  UsageResult,\n  UsageSeriesResult,\n  RegistryCredentialsResponseSchema,\n  SetAddOnResult,\n  EnqueueBuildResponseSchema,\n  TriggerInitialDeploymentResponseSchema,\n  PrivateLinkConnectionList,\n  PrivateLinkConnection,\n  DeletePrivateLinkResult,\n  PrivateLinkRegionsResult,\n  ValidatePromoCodeResult,\n  ApplyPromoCodeResult,\n  PromoCreditsResult,\n} from \"../schemas\";\n\ntype BillingClientConfig = {\n  url: string;\n  apiKey: string;\n};\n\ntype SuccessResult<TSchema extends ZodType> = {\n  success: true;\n} & z.infer<TSchema>;\n\ntype ErrorResult = {\n  success: false;\n  error: string;\n  code?: string;\n  [key: string]: unknown;\n};\n\ntype Result<TSchema extends ZodType> = SuccessResult<TSchema> | ErrorResult;\n\nexport type PlansResponse = Result<typeof PlansResult>;\nexport type CurrentPlanResponse = Result<typeof CurrentPlan>;\nexport type SetPlanResponse = Result<typeof SubscribeResultSchema>;\nexport type CancelSubscriptionResult = Result<typeof CancelSubscriptionResponse>;\nexport type CustomerPortalResponse = Result<typeof CustomerPortalSchema>;\nexport type UsageResponse = Result<typeof UsageResult>;\nexport type UsageSeriesResponse = Result<typeof UsageSeriesResult>;\nexport type UsageInvocationReportResponse = Result<typeof ReportInvocationUsageResult>;\nexport type UsageEntitlementResponse = Result<typeof ReportUsageResult>;\nexport type BillingAlertsResponse = Result<typeof BillingAlertsResult>;\nexport type BillingLimitResponse = Result<typeof BillingLimitResult>;\nexport type BillingLimitsActiveResponse = Result<typeof BillingLimitsActiveResult>;\nexport type IpLocationResponse = Result<typeof IpLocationResult>;\nexport type RegistryCredentialsResult = Result<typeof RegistryCredentialsResponseSchema>;\nexport type SetAddOnResponse = Result<typeof SetAddOnResult>;\nexport type EnqueueBuildResult = Result<typeof EnqueueBuildResponseSchema>;\nexport type PrivateLinkConnectionListResponse = Result<typeof PrivateLinkConnectionList>;\nexport type PrivateLinkConnectionResponse = Result<typeof PrivateLinkConnection>;\nexport type DeletePrivateLinkResponse = Result<typeof DeletePrivateLinkResult>;\nexport type PrivateLinkRegionsResponse = Result<typeof PrivateLinkRegionsResult>;\nexport type TriggerInitialDeploymentResult = Result<typeof TriggerInitialDeploymentResponseSchema>;\nexport type ValidatePromoCodeResponse = Result<typeof ValidatePromoCodeResult>;\nexport type ApplyPromoCodeResponse = Result<typeof ApplyPromoCodeResult>;\nexport type PromoCreditsResponse = Result<typeof PromoCreditsResult>;\n\nexport class BillingClient {\n  constructor(private readonly config: BillingClientConfig) {}\n\n  async plans(): Promise<PlansResponse> {\n    return await this.fetch(`/api/v1/plans/v3`, PlansResult);\n  }\n\n  async currentPlan(orgId: string): Promise<CurrentPlanResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}`, CurrentPlan);\n  }\n\n  async usage(orgId: string, params: UsageParams): Promise<UsageResponse> {\n    const search = objectToSearchParams(params);\n    return await this.fetch(`/api/v1/orgs/${orgId}/usage?${search?.toString()}`, UsageResult);\n  }\n\n  async usageSeries(orgId: string, params: UsageSeriesParams): Promise<UsageSeriesResponse> {\n    const search = objectToSearchParams(params);\n    return await this.fetch(\n      `/api/v1/orgs/${orgId}/usage/series?${search?.toString()}`,\n      UsageSeriesResult\n    );\n  }\n\n  async setPlan(orgId: string, body: SetPlanBody): Promise<SetPlanResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/v3/subscription`, SubscribeResultSchema, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(body),\n    });\n  }\n\n  async cancelSubscription(orgId: string): Promise<CancelSubscriptionResult> {\n    return await this.fetch(\n      `/api/v1/orgs/${orgId}/v3/subscription/cancel`,\n      CancelSubscriptionResponse,\n      { method: \"POST\" }\n    );\n  }\n\n  async setAddOn(orgId: string, body: SetAddOnBody): Promise<SetAddOnResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/v3/subscription/addon`, SetAddOnResult, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(body),\n    });\n  }\n\n  async validatePromoCode(code: string): Promise<ValidatePromoCodeResponse> {\n    return await this.fetch(`/api/v1/promo-codes/validate`, ValidatePromoCodeResult, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify({ code }),\n    });\n  }\n\n  async applyPromoCode(\n    orgId: string,\n    body: { code: string; userId: string }\n  ): Promise<ApplyPromoCodeResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/promo/apply`, ApplyPromoCodeResult, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(body),\n    });\n  }\n\n  async promoCredits(orgId: string): Promise<PromoCreditsResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/promo/credits`, PromoCreditsResult);\n  }\n\n  async createPortalSession(\n    orgId: string,\n    body: CustomerPortalRequestBody\n  ): Promise<CustomerPortalResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/v3/subscription/portal`, CustomerPortalSchema, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(body),\n    });\n  }\n\n  /**\n   *\n   * @param event The data is in the body, not using a JWT\n   * @returns details about usage\n   */\n  async reportInvocationUsage(\n    event: ReportInvocationUsageEvent\n  ): Promise<UsageInvocationReportResponse> {\n    return await this.fetch(`/api/v1/usage/ingest/invocation`, ReportInvocationUsageResult, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(event),\n    });\n  }\n\n  /**\n   * Generates registry credentials for a project. This is used to push images to a project's container repository.\n   *\n   * @param projectId The ID of the project\n   * @param region The region to generate credentials for\n   * @returns The registry credentials\n   */\n  async generateRegistryCredentials(\n    projectId: string,\n    region: \"us-east-1\" | \"eu-central-1\"\n  ): Promise<RegistryCredentialsResult> {\n    return await this.fetch(\n      `/api/v1/projects/${projectId}/generate-registry-credentials`,\n      RegistryCredentialsResponseSchema,\n      {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n        },\n        body: JSON.stringify({ region }),\n      }\n    );\n  }\n\n  /**\n   * Enqueues a build for a project deployment.\n   *\n   * @param projectId The ID of the project\n   * @param body The enqueue build request containing the deployment ID\n   * @returns The build ID\n   */\n  async enqueueBuild(projectId: string, body: EnqueueBuildRequest): Promise<EnqueueBuildResult> {\n    return await this.fetch(\n      `/api/v1/projects/${projectId}/enqueue-build`,\n      EnqueueBuildResponseSchema,\n      {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n        },\n        body: JSON.stringify(body),\n      }\n    );\n  }\n\n  /**\n   *\n   * @param event The data is in the body, not using a JWT\n   * @returns details about usage\n   */\n  async getEntitlement(orgId: string): Promise<UsageEntitlementResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/usage/entitlement`, ReportUsageResult);\n  }\n\n  async getBillingAlerts(orgId: string): Promise<BillingAlertsResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/billing-alerts`, BillingAlertsResult);\n  }\n\n  async updateBillingAlerts(\n    orgId: string,\n    body: UpdateBillingAlertsRequest\n  ): Promise<BillingAlertsResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/billing-alerts`, BillingAlertsResult, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(body),\n    });\n  }\n\n  async getBillingLimit(orgId: string): Promise<BillingLimitResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/billing-limit`, BillingLimitResult);\n  }\n\n  async updateBillingLimit(\n    orgId: string,\n    body: UpdateBillingLimitRequest\n  ): Promise<BillingLimitResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/billing-limit`, BillingLimitResult, {\n      method: \"PUT\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(body),\n    });\n  }\n\n  async resolveBillingLimit(\n    orgId: string,\n    body: ResolveBillingLimitRequest\n  ): Promise<BillingLimitResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/billing-limit/resolve`, BillingLimitResult, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(body),\n    });\n  }\n\n  async getActiveBillingLimits(): Promise<BillingLimitsActiveResponse> {\n    return await this.fetch(`/api/v1/billing-limits/active`, BillingLimitsActiveResult);\n  }\n\n  /** Approximate country and network owner of an IP address. `location` is null when unknown. */\n  async getIpLocation(ip: string): Promise<IpLocationResponse> {\n    return await this.fetch(`/api/v1/ip-location?ip=${encodeURIComponent(ip)}`, IpLocationResult);\n  }\n\n  async getPrivateLinks(orgId: string): Promise<PrivateLinkConnectionListResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/private-connections`, PrivateLinkConnectionList);\n  }\n\n  async createPrivateLink(\n    orgId: string,\n    body: CreatePrivateLinkConnectionBody\n  ): Promise<PrivateLinkConnectionResponse> {\n    return await this.fetch(`/api/v1/orgs/${orgId}/private-connections`, PrivateLinkConnection, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify(body),\n    });\n  }\n\n  async deletePrivateLink(orgId: string, connectionId: string): Promise<DeletePrivateLinkResponse> {\n    return await this.fetch(\n      `/api/v1/orgs/${orgId}/private-connections/${connectionId}`,\n      DeletePrivateLinkResult,\n      {\n        method: \"DELETE\",\n      }\n    );\n  }\n\n  async getPrivateLinkRegions(orgId: string): Promise<PrivateLinkRegionsResponse> {\n    return await this.fetch(\n      `/api/v1/orgs/${orgId}/private-connections/regions`,\n      PrivateLinkRegionsResult\n    );\n  }\n\n  async triggerInitialDeployment(\n    projectId: string,\n    body: TriggerInitialDeploymentRequest\n  ): Promise<TriggerInitialDeploymentResult> {\n    return await this.fetch(\n      `/api/v1/projects/${projectId}/initial-deployment`,\n      TriggerInitialDeploymentResponseSchema,\n      {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n        },\n        body: JSON.stringify(body),\n      }\n    );\n  }\n\n  async fetch<TSchema extends ZodType = z.ZodTypeAny>(\n    path: string,\n    schema: TSchema,\n    requestInit?: RequestInit\n  ): Promise<Result<TSchema>> {\n    const response = await fetch(`${this.config.url}${path}`, {\n      ...requestInit,\n      headers: {\n        ...requestInit?.headers,\n        Authorization: `Bearer ${this.config.apiKey}`,\n      },\n    });\n\n    if (!response.ok) {\n      // Error bodies should be { error: string } JSON, but anything in\n      // the path (proxy 502 pages, runtime-thrown plain-text Responses)\n      // can produce non-JSON. Never let the error path itself throw —\n      // fall back to a synthetic status-code error the callers' string\n      // matching treats as the generic case.\n      let parsedError: z.infer<typeof ErrorSchema>;\n      try {\n        parsedError = ErrorSchema.parse(await response.json());\n      } catch {\n        parsedError = { error: `http_${response.status}` };\n      }\n      return {\n        success: false,\n        ...parsedError,\n      };\n    }\n\n    const json = await response.json();\n    // zod v4 types a generic schema's output as `unknown` (v3 gave `any`); intersect\n    // with `object` so it remains spreadable while keeping its inferred shape.\n    const parsed = schema.parse(json) as z.infer<TSchema> & object;\n    return {\n      success: true,\n      ...parsed,\n    };\n  }\n}\n\nexport function objectToSearchParams(\n  obj:\n    | undefined\n    | Record<\n        string,\n        string | string[] | number | number[] | boolean | boolean[] | Date | Date[] | undefined\n      >\n): URLSearchParams | undefined {\n  if (!obj) return undefined;\n\n  const searchParams = new URLSearchParams();\n  //for each item add to the search params, skip undefined and join arrays with commas\n  Object.entries(obj).forEach(([key, value]) => {\n    if (value === undefined) return;\n    if (Array.isArray(value)) {\n      const values = value.map((d) => {\n        if (d instanceof Date) return d.toISOString();\n        return d;\n      });\n\n      searchParams.append(key, values.join(\",\"));\n    } else {\n      const v = value instanceof Date ? value.toISOString() : value;\n      searchParams.append(key, v.toString());\n    }\n  });\n\n  return searchParams;\n}\n","import type { MachineDefinition } from \"./schemas\";\n\nexport type MachineDefinitionInput = {\n  code: string;\n  title: string;\n  cpu: number;\n  memory: number;\n  centsPerVCpuSecond: number;\n  centsPerGbRamSecond: number;\n};\n\nexport function machineDefinition({\n  code,\n  title,\n  cpu,\n  memory,\n  centsPerVCpuSecond,\n  centsPerGbRamSecond,\n}: MachineDefinitionInput): MachineDefinition {\n  const centsPerSecond = cpu * centsPerVCpuSecond + memory * centsPerGbRamSecond;\n  const centsPerMs = centsPerSecond / 1000;\n  return {\n    code,\n    title,\n    cpu,\n    memory,\n    centsPerMs,\n  };\n}\n","import { machineDefinition } from \"./machineDefinition\";\n\nconst centsPerVCpuSecond = Number(process.env.CENTS_PER_VCPU_SECOND ?? 0);\nconst centsPerGbRamSecond = Number(process.env.CENTS_PER_GB_RAM_SECOND ?? 0);\n\nexport const machines = {\n  micro: machineDefinition({\n    code: \"micro\",\n    title: \"Micro\",\n    cpu: 0.25,\n    memory: 0.25,\n    centsPerVCpuSecond,\n    centsPerGbRamSecond,\n  }),\n  \"small-1x\": machineDefinition({\n    code: \"small-1x\",\n    title: \"Small 1x\",\n    cpu: 0.5,\n    memory: 0.5,\n    centsPerVCpuSecond,\n    centsPerGbRamSecond,\n  }),\n  \"small-2x\": machineDefinition({\n    code: \"small-2x\",\n    title: \"Small 2x\",\n    cpu: 1,\n    memory: 1,\n    centsPerVCpuSecond,\n    centsPerGbRamSecond,\n  }),\n  \"medium-1x\": machineDefinition({\n    code: \"medium-1x\",\n    title: \"Medium 1x\",\n    cpu: 1,\n    memory: 2,\n    centsPerVCpuSecond,\n    centsPerGbRamSecond,\n  }),\n  \"medium-2x\": machineDefinition({\n    code: \"medium-2x\",\n    title: \"Medium 2x\",\n    cpu: 2,\n    memory: 4,\n    centsPerVCpuSecond,\n    centsPerGbRamSecond,\n  }),\n  \"large-1x\": machineDefinition({\n    code: \"large-1x\",\n    title: \"Large 1x\",\n    cpu: 4,\n    memory: 8,\n    centsPerVCpuSecond,\n    centsPerGbRamSecond,\n  }),\n  \"large-2x\": machineDefinition({\n    code: \"large-2x\",\n    title: \"Large 2x\",\n    cpu: 8,\n    memory: 16,\n    centsPerVCpuSecond,\n    centsPerGbRamSecond,\n  }),\n};\n\nexport type MachineCode = keyof typeof machines;\n\nexport const defaultMachine: MachineCode = \"small-1x\";\n"],"mappings":";;;AAEA,MAAM,kBAAkBA,IAAAA,EAAE,OAAO;CAC/B,QAAQA,IAAAA,EAAE,OAAO;CACjB,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS;AAClC,CAAC;AAID,MAAM,wBAAwBA,IAAAA,EAAE,OAAO;CACrC,YAAYA,IAAAA,EAAE,OAAO;CACrB,SAASA,IAAAA,EAAE,OAAO;CAClB,SAASA,IAAAA,EAAE,OAAO;CAClB,aAAaA,IAAAA,EAAE,OAAO;CACtB,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS;CAEhC,QAAQA,IAAAA,EAAE,OAAO;AACnB,CAAC;AAGD,MAAM,uBAAuBA,IAAAA,EAAE,OAAO;CACpC,MAAMA,IAAAA,EAAE,OAAO;CACf,UAAUA,IAAAA,EAAE,OAAO;CACnB,WAAWA,IAAAA,EAAE,OAAO;CACpB,YAAYA,IAAAA,EAAE,OAAO;AACvB,CAAC;AAGD,MAAM,8BAA8BA,IAAAA,EAAE,OAAO,EAC3C,uBAAuBA,IAAAA,EAAE,OAAO,EAClC,CAAC;;;;;AAOD,MAAM,sBAAsBA,IAAAA,EAAE,OAAO;CACnC,0BAA0BA,IAAAA,EAAE,OAAO;CACnC,uBAAuBA,IAAAA,EAAE,OAAO;CAChC,aAAaA,IAAAA,EAAE,OAAO;CACtB,uBAAuBA,IAAAA,EAAE,OAAO;CAChC,yBAAyBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC9C,yBAAyBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC7C,gCAAgCA,IAAAA,EAAE,OAAO,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