import { z as r } from "zod";
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
r.unknown();
const E = r.object({
  color: r.optional(r.string()),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  padding: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  borderRadius: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), q = r.object({
  family: r.optional(r.string()),
  color: r.optional(r.string()),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  size: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  lineHeight: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  stroke: r.optional(r.string()),
  strokeWidth: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), P = r.object({
  top: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  left: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  right: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), g = r.object({
  type: r.enum(["caption"]),
  src: r.string().min(1).regex(/\S/),
  font: r.optional(q),
  background: r.optional(E),
  margin: r.optional(P),
  trim: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  speed: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), Kr = g, U = r.object({
  color: r.union([r.string().regex(/^#[0-9a-fA-F]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  threshold: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(0).lte(250)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  halo: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(0).lte(250)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), J = r.object({
  type: r.enum(["text-to-avatar"]),
  text: r.string(),
  avatar: r.enum([
    "jack",
    "lana",
    "lily",
    "matt",
    "rian"
  ]),
  background: r.optional(r.string())
}), V = r.object({
  type: r.literal("didTextToAvatarOptions_DIDTextToAvatarOptions")
}).and(J), H = r.object({
  provider: r.enum(["d-id"]),
  options: V
}), K = r.object({
  type: r.enum(["text-to-speech"]),
  text: r.string(),
  voice: r.enum([
    "Adam",
    "Antoni",
    "Arnold",
    "Bella",
    "Domi",
    "Elli",
    "Josh",
    "Rachel",
    "Sam"
  ])
}), M = r.object({
  type: r.literal("elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions")
}).and(K), Q = r.object({
  provider: r.enum(["elevenlabs"]),
  options: M
}), W = r.object({
  type: r.enum(["text-to-avatar"]),
  text: r.string(),
  avatar: r.enum([
    "Angela",
    "Bill",
    "Daisy",
    "Derek",
    "Eva",
    "Jake",
    "Jeff",
    "Jerome",
    "Joon",
    "Kayla",
    "Kent",
    "Luna",
    "Mark",
    "Matthew",
    "Monica",
    "Peter",
    "Selina",
    "Tanya",
    "Thomas",
    "Tina",
    "Tyler",
    "Vanessa",
    "Vera",
    "Wilson",
    "Zoey"
  ]),
  voice: r.enum([
    "Abbi - Natural",
    "Adam - Natural",
    "Aiston - Friendly",
    "Alice - Newscaster",
    "Alison - Cheerful",
    "Amber - Friendly",
    "Amy - Warm",
    "Ana - Cheerful",
    "Antoni - Friendly",
    "Aria - Newscaster",
    "Arnold - Cheerful",
    "Arthur - Natural",
    "Bella - Friendly",
    "Belle - Natural",
    "Brandon - Warm",
    "Brian - Natural",
    "Bruce - Natural",
    "Cerise - Cheerful",
    "Christopher - Calm",
    "Clara - Professional",
    "Connor - Natural",
    "Dahlia - Friendly",
    "Davis - Professional",
    "Dean - Natural",
    "Delbert - Cheerful",
    "Edward - Friendly",
    "Elaine - Calm",
    "Emily - Natural",
    "Emma - Newscaster",
    "Eric - Newscaster",
    "Grace - Natural",
    "Hailey - Calm",
    "Indira - Cheerful",
    "Isabella - Cheerful",
    "Jacob - Natural",
    "Jahmai - Friendly",
    "Jane - Serious",
    "Jason - Serious",
    "Jelle - Friendly",
    "Jen - Natural",
    "Jenny - Professional",
    "Jodi - Cheerful",
    "Joey - Calm",
    "Johan - Friendly",
    "Josie - Cheerful",
    "Keanan - Natural",
    "Keith - Cheerful",
    "Kellie - Friendly",
    "Lauren - Friendly",
    "Leah - Natural",
    "Liam - Professional",
    "Libby - Natural",
    "Lily - Professional",
    "Lucas - Natural",
    "Luke - Professional",
    "Luna - Natural",
    "Marieke - Natural",
    "Matthew - Professional",
    "Michelle - Natural",
    "Mitchell - Natural",
    "Molly - Newscaster",
    "Monica - Calm",
    "Natasha - Professional",
    "Neerja - Newscaster",
    "Noah - Serious",
    "Oliver - Newscaster",
    "Olivia - Calm",
    "Paul - Natural",
    "Prabhat - Natural",
    "Raveena - Natural",
    "Rudi - Friendly",
    "Ryan - Professional",
    "Sam - Natural",
    "Sara - Cheerful",
    "Sherry - Friendly",
    "Sonia - Warm",
    "Thomas - Natural",
    "Todd - Professional",
    "Tony - Professional",
    "Tracy - Cheerful",
    "Wayne - Natural",
    "Wilder - Natural",
    "Wille - Natural",
    "William - Friendly"
  ]),
  avatarStyle: r.optional(r.enum(["normal", "circle"])),
  background: r.optional(r.string()),
  ratio: r.optional(r.enum(["16:9", "9:16"])),
  test: r.optional(r.boolean())
}), X = r.object({
  type: r.literal("heygenTextToAvatarOptions_HeyGenTextToAvatarOptions")
}).and(W), Y = r.object({
  provider: r.enum(["heygen"]),
  options: X
}), v = r.object({
  type: r.enum(["text-generator"]),
  prompt: r.string(),
  model: r.enum(["gpt-3.5-turbo", "gpt-4"]),
  systemPrompt: r.optional(r.string())
}), ee = r.object({
  type: r.literal("openaiTextGeneratorOptions_OpenAiTextGeneratorOptions")
}).and(v), re = r.object({
  provider: r.enum(["openai"]),
  options: ee
}), te = r.object({
  status: r.string(),
  title: r.string(),
  detail: r.string()
});
r.object({
  errors: r.array(te)
});
const ne = r.object({
  owner: r.string(),
  provider: r.enum([
    "shotstack",
    "elevenlabs",
    "heygen",
    "d-id"
  ]),
  type: r.enum(["text-to-speech", "text-to-avatar"]),
  url: r.optional(r.string()),
  status: r.enum([
    "queued",
    "processing",
    "saving",
    "done",
    "failed"
  ]),
  created: r.string(),
  updated: r.string()
}), ie = r.object({
  type: r.string(),
  id: r.string(),
  attributes: ne
});
r.object({
  data: ie
});
const se = r.object({
  type: r.enum(["image-to-video"]),
  imageUrl: r.string(),
  guidanceScale: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.8),
  motion: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(127)
}), oe = r.object({
  type: r.enum(["text-generator"]),
  prompt: r.string()
}), ae = r.object({
  type: r.enum(["text-to-image"]),
  prompt: r.string(),
  width: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  height: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), ue = r.object({
  type: r.enum(["text-to-speech"]),
  text: r.string(),
  voice: r.enum([
    "Hala",
    "Lisa",
    "Arlet",
    "Hiujin",
    "Zhiyu",
    "Sofie",
    "Laura",
    "Olivia",
    "Amy",
    "Emma",
    "Brian",
    "Arthur",
    "Kajal",
    "Niamh",
    "Aria",
    "Ayanda",
    "Ivy",
    "Joanna",
    "Kendra",
    "Kimberly",
    "Salli",
    "Joey",
    "Justin",
    "Kevin",
    "Matthew",
    "Ruth",
    "Stephen",
    "Suvi",
    "Léa",
    "Rémi",
    "Gabrielle",
    "Liam",
    "Vicki",
    "Daniel",
    "Hannah",
    "Kajal",
    "Bianca",
    "Adriano",
    "Takumi",
    "Kazuha",
    "Tomoko",
    "Seoyeon",
    "Ida",
    "Ola",
    "Camila",
    "Vitória",
    "Vitoria",
    "Thiago",
    "Inês",
    "Ines",
    "Lucia",
    "Sergio",
    "Mia",
    "Andrés",
    "Lupe",
    "Pedro",
    "Elin"
  ]),
  language: r.optional(r.enum([
    "cmn-CN",
    "da-DK",
    "de-DE",
    "en-AU",
    "en-GB",
    "en-IN",
    "en-US",
    "es-ES",
    "es-MX",
    "es-US",
    "fr-CA",
    "fr-FR",
    "it-IT",
    "ja-JP",
    "hi-IN",
    "ko-KR",
    "nb-NO",
    "nl-NL",
    "pl-PL",
    "pt-BR",
    "pt-PT",
    "sv-SE",
    "en-NZ",
    "en-ZA",
    "ca-ES",
    "de-AT",
    "yue-CN",
    "ar-AE",
    "fi-FI"
  ])),
  newscaster: r.optional(r.boolean()).default(!1)
}), fe = r.union([
  r.object({
    type: r.literal("shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions")
  }).and(ue),
  r.object({
    type: r.literal("shotstackTextToImageOptions_ShotstackTextToImageOptions")
  }).and(ae),
  r.object({
    type: r.literal("shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions")
  }).and(oe),
  r.object({
    type: r.literal("shotstackImageToVideoOptions_ShotstackImageToVideoOptions")
  }).and(se)
]), le = r.object({
  provider: r.enum(["shotstack"]),
  options: fe
}), pe = r.object({
  type: r.enum(["text-to-image"]),
  prompt: r.string(),
  engine: r.optional(r.enum([
    "stable-diffusion-xl-1024-v0-9",
    "stable-diffusion-xl-1024-v1-0",
    "stable-diffusion-v1-6",
    "stable-diffusion-512-v2-1",
    "stable-diffusion-xl-beta-v2-2-2"
  ])),
  width: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  height: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  steps: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(30),
  seed: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  cfgScale: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(7),
  stylePreset: r.optional(r.enum([
    "3d-model",
    "analog-film",
    "anime",
    "cinematic",
    "comic-book",
    "digital-art",
    "enhance",
    "fantasy-art",
    "isometric",
    "line-art",
    "low-poly",
    "modeling-compound",
    "neon-punk",
    "origami",
    "photographic",
    "pixel-art",
    "tile-texture"
  ]))
}), de = r.object({
  type: r.literal("stabilityAiTextToImageOptions_StabilityAiTextToImageOptions")
}).and(pe), ge = r.object({
  provider: r.enum(["stability-ai"]),
  options: de
}), ce = r.union([
  r.object({
    provider: r.literal("shotstackGeneratedAsset_ShotstackGeneratedAsset")
  }).and(le),
  r.object({
    provider: r.literal("didGeneratedAsset_DIDGeneratedAsset")
  }).and(H),
  r.object({
    provider: r.literal("elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset")
  }).and(Q),
  r.object({
    provider: r.literal("heygenGeneratedAsset_HeyGenGeneratedAsset")
  }).and(Y),
  r.object({
    provider: r.literal("openaiGeneratedAsset_OpenAiGeneratedAsset")
  }).and(re),
  r.object({
    provider: r.literal("stabilityAiGeneratedAsset_StabilityAiGeneratedAsset")
  }).and(ge)
]), n = r.object({
  top: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  bottom: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  left: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  right: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), Mr = n, me = r.object({
  bucket: r.string(),
  prefix: r.optional(r.string()),
  filename: r.optional(r.string())
}), Ae = r.object({
  provider: r.literal("google-cloud-storage"),
  options: r.optional(me)
}), ye = r.object({
  folderId: r.string(),
  filename: r.optional(r.string())
}), be = r.object({
  provider: r.literal("google-drive"),
  options: ye
}), he = r.object({
  playbackPolicy: r.optional(r.array(r.enum(["public", "signed"]))),
  passthrough: r.optional(r.string().max(255))
}), ze = r.object({
  provider: r.literal("mux"),
  options: r.optional(he)
}), $e = r.object({
  region: r.string(),
  bucket: r.string(),
  prefix: r.optional(r.string()),
  filename: r.optional(r.string()),
  acl: r.optional(r.string())
}), Ze = r.object({
  provider: r.literal("s3"),
  options: r.optional($e)
}), _e = r.object({
  provider: r.literal("shotstack"),
  exclude: r.optional(r.boolean())
}), Se = r.object({
  title: r.optional(r.string().max(150)),
  privacyLevel: r.optional(r.enum([
    "public",
    "friends",
    "private"
  ])),
  disableDuet: r.optional(r.boolean()).default(!1),
  disableStitch: r.optional(r.boolean()).default(!1),
  disableComment: r.optional(r.boolean()).default(!1)
}), xe = r.object({
  provider: r.literal("tiktok"),
  options: r.optional(Se)
}), Ne = r.object({
  view: r.optional(r.enum([
    "anybody",
    "nobody",
    "contacts",
    "password",
    "unlisted"
  ])),
  embed: r.optional(r.enum([
    "public",
    "private",
    "whitelist"
  ])),
  comments: r.optional(r.enum([
    "anybody",
    "nobody",
    "contacts"
  ])),
  download: r.optional(r.boolean()),
  add: r.optional(r.boolean())
}), je = r.object({
  name: r.optional(r.string()),
  description: r.optional(r.string()),
  privacy: r.optional(Ne),
  folderUri: r.optional(r.string())
}), we = r.object({
  provider: r.literal("vimeo"),
  options: r.optional(je)
}), s = r.discriminatedUnion("provider", [
  _e,
  ze,
  Ze,
  Ae,
  be,
  we,
  xe
]), Te = s, Fe = r.object({
  horizontal: r.optional(r.boolean()),
  vertical: r.optional(r.boolean())
}), ke = r.object({
  src: r.string()
}), c = r.object({
  type: r.enum(["html"]),
  html: r.string(),
  css: r.optional(r.string()),
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  height: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  background: r.optional(r.string()),
  position: r.optional(r.enum([
    "top",
    "topRight",
    "right",
    "bottomRight",
    "bottom",
    "bottomLeft",
    "left",
    "topLeft",
    "center"
  ]))
}), Qr = c, m = r.object({
  type: r.enum(["image"]),
  src: r.string().min(1).regex(/\S/),
  crop: r.optional(n)
}), Wr = m, A = r.object({
  type: r.enum(["image-to-video"]),
  src: r.string().min(1),
  prompt: r.optional(r.string()),
  aspectRatio: r.optional(r.enum([
    "1:1",
    "4:3",
    "16:9",
    "9:16",
    "3:4",
    "21:9",
    "9:21"
  ])),
  speed: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  crop: r.optional(n)
}), Xr = A, Re = r.object({
  preset: r.enum([
    "conference",
    "interview",
    "lecture",
    "meeting",
    "mobile_phone",
    "music",
    "podcast",
    "studio",
    "voice_over"
  ])
}), Oe = r.object({
  provider: r.string().default("dolby"),
  options: Re
}), De = r.object({
  enhancement: r.literal("dolbyEnhancement_DolbyEnhancement")
}).and(Oe), Le = r.object({
  audio: r.optional(De)
}), Ie = r.object({
  status: r.string(),
  title: r.string(),
  detail: r.string()
});
r.object({
  errors: r.array(Ie)
});
const Ge = r.object({
  type: r.string(),
  id: r.string()
});
r.object({
  data: Ge
});
const Ce = r.object({
  id: r.string(),
  url: r.string(),
  expires: r.string()
}), Be = r.object({
  type: r.string(),
  id: r.string(),
  attributes: Ce
});
r.object({
  data: Be
});
const Ee = r.object({
  speed: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  preservePitch: r.optional(r.boolean())
}), qe = r.object({
  format: r.optional(r.enum(["srt", "vtt"]))
}), y = r.object({
  type: r.enum(["luma"]),
  src: r.string().min(1).regex(/\S/),
  trim: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), Yr = y, b = r.object({
  find: r.string(),
  replace: r.unknown()
}), Pe = r.object({
  capture: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), Ue = r.object({
  start: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  length: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), Je = r.object({
  id: r.string(),
  owner: r.string(),
  region: r.optional(r.string()),
  renderId: r.optional(r.string()),
  providerId: r.optional(r.string()),
  filename: r.optional(r.string()),
  url: r.optional(r.string()),
  status: r.enum([
    "importing",
    "ready",
    "failed",
    "deleted"
  ]),
  created: r.optional(r.string()),
  updated: r.optional(r.string())
}), h = r.object({
  type: r.string(),
  attributes: Je
});
r.object({
  data: r.array(h)
});
r.object({
  data: h
});
r.object({
  success: r.boolean(),
  message: r.string(),
  response: r.record(r.string(), r.unknown())
});
const Ve = r.object({
  message: r.string(),
  id: r.string()
});
r.object({
  success: r.boolean(),
  message: r.string(),
  response: Ve
});
const He = r.object({
  id: r.string(),
  name: r.string(),
  created: r.optional(r.string()),
  updated: r.optional(r.string())
}), Ke = r.object({
  owner: r.string(),
  templates: r.array(He)
});
r.object({
  success: r.boolean(),
  message: r.string(),
  response: Ke
});
const Me = r.object({
  message: r.string(),
  id: r.string()
});
r.object({
  success: r.boolean(),
  message: r.string(),
  response: Me
});
const Qe = r.object({
  horizontal: r.optional(r.enum([
    "left",
    "center",
    "right"
  ])),
  vertical: r.optional(r.enum([
    "top",
    "middle",
    "bottom"
  ]))
}), We = r.object({
  preset: r.enum([
    "fadeIn",
    "slideIn",
    "typewriter",
    "ascend",
    "shift",
    "movingLetters"
  ]),
  duration: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0.1).lte(30)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  style: r.optional(r.enum(["character", "word"])),
  direction: r.optional(r.enum([
    "left",
    "right",
    "up",
    "down"
  ]))
}), Xe = r.object({
  color: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
  borderRadius: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
}), Ye = r.object({
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  color: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
  radius: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
}), ve = r.object({
  type: r.optional(r.enum(["linear", "radial"])),
  angle: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(360)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  stops: r.array(r.object({
    offset: r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    color: r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  })).min(2)
}), er = r.object({
  top: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  right: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  bottom: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  left: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
}), rr = r.object({
  offsetX: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  offsetY: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  blur: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  color: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
}), tr = r.object({
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  color: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
}), nr = r.object({
  family: r.optional(r.string()).default("Open Sans"),
  size: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(1).lte(500)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
  weight: r.optional(r.unknown()).default("400"),
  color: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#ffffff"),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
  background: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  stroke: r.optional(tr)
}), ir = r.object({
  letterSpacing: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  lineHeight: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
  textTransform: r.optional(r.enum([
    "none",
    "uppercase",
    "lowercase",
    "capitalize"
  ])),
  textDecoration: r.optional(r.enum([
    "none",
    "underline",
    "line-through"
  ])),
  gradient: r.optional(ve)
}), z = r.object({
  type: r.enum(["rich-text"]),
  text: r.string().max(5e3),
  font: r.optional(nr),
  style: r.optional(ir),
  shadow: r.optional(rr),
  background: r.optional(Xe),
  border: r.optional(Ye),
  padding: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    er
  ])),
  align: r.optional(Qe),
  animation: r.optional(We)
}), vr = z, sr = r.object({
  id: r.optional(r.string()),
  owner: r.optional(r.string()),
  status: r.optional(r.enum(["queued", "failed"])),
  created: r.optional(r.string())
}), or = r.object({
  type: r.optional(r.string()),
  attributes: r.optional(sr)
});
r.object({
  data: or
});
const ar = r.object({
  url: r.string(),
  id: r.string(),
  destinations: r.array(s)
}), $ = r.object({
  type: r.enum(["shape"]),
  shape: r.enum([
    "rectangle",
    "circle",
    "line"
  ]),
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  height: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  fill: r.optional(r.object({
    color: r.optional(r.string()),
    opacity: r.optional(r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
  })),
  stroke: r.optional(r.object({
    color: r.optional(r.string()),
    width: r.optional(r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
  })),
  rectangle: r.optional(r.object({
    width: r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    height: r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    cornerRadius: r.optional(r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
  })),
  circle: r.optional(r.object({
    radius: r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  })),
  line: r.optional(r.object({
    length: r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    thickness: r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }))
}), et = $, l = r.object({
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  height: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), ur = l, Z = r.object({
  format: r.optional(r.enum([
    "mp4",
    "webm",
    "mov",
    "avi",
    "mkv",
    "ogv",
    "wmv",
    "avif",
    "gif",
    "mp3",
    "wav",
    "jpg",
    "png",
    "webp",
    "tif"
  ])),
  size: r.optional(l),
  fit: r.optional(r.enum([
    "cover",
    "contain",
    "crop"
  ])),
  resolution: r.optional(r.enum([
    "preview",
    "mobile",
    "sd",
    "hd",
    "fhd"
  ])),
  quality: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(1).lte(100)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  fps: r.optional(r.union([
    r.literal(12),
    r.literal(15),
    r.literal(23.976),
    r.literal(24),
    r.literal(25),
    r.literal(29.97),
    r.literal(30),
    r.literal(48),
    r.literal(50),
    r.literal(59.94),
    r.literal(60)
  ])),
  speed: r.optional(Ee),
  keyframeInterval: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(1).lte(300)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  fixOffset: r.optional(r.boolean()),
  fixRotation: r.optional(r.boolean()),
  enhance: r.optional(Le),
  filename: r.optional(r.string())
}), fr = r.object({
  renditions: r.optional(r.array(Z)),
  transcription: r.optional(qe)
}), lr = r.object({
  id: r.string(),
  status: r.optional(r.enum([
    "queued",
    "importing",
    "ready",
    "failed",
    "deleted",
    "overwritten"
  ])),
  url: r.optional(r.string()),
  executionTime: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  transformation: r.optional(Z),
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  height: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  duration: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  fps: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), pr = r.object({
  renditions: r.optional(r.array(lr))
}), dr = r.object({
  id: r.string(),
  owner: r.string(),
  input: r.optional(r.string()),
  source: r.optional(r.string()),
  status: r.optional(r.enum([
    "queued",
    "importing",
    "ready",
    "failed",
    "deleted",
    "overwritten"
  ])),
  outputs: r.optional(pr),
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  height: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  duration: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  fps: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  created: r.optional(r.string()),
  updated: r.optional(r.string())
}), _ = r.object({
  type: r.string(),
  id: r.string(),
  attributes: dr
});
r.object({
  data: r.array(_)
});
r.object({
  data: _
});
const gr = r.object({
  url: r.optional(r.string()),
  outputs: r.optional(fr),
  destinations: r.optional(s),
  callback: r.optional(r.string())
}), cr = r.object({
  src: r.string().min(1).regex(/\S/),
  effect: r.optional(r.enum([
    "fadeIn",
    "fadeOut",
    "fadeInFadeOut"
  ])),
  volume: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), S = r.object({
  offset: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  color: r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), mr = r.object({
  type: r.enum(["linear"]),
  angle: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(360)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  stops: r.array(S).min(2),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
}), Ar = r.object({
  type: r.enum(["radial"]),
  stops: r.array(S).min(2),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
}), yr = r.object({
  offsetX: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  offsetY: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  blur: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  color: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
}), br = r.object({
  type: r.enum(["solid"]),
  color: r.string().regex(/^#[A-Fa-f0-9]{6}$/).default("#000000"),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
}), hr = r.discriminatedUnion("type", [
  br,
  mr,
  Ar
]), zr = r.object({
  color: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(100)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
  lineCap: r.optional(r.enum([
    "butt",
    "round",
    "square"
  ])),
  lineJoin: r.optional(r.enum([
    "miter",
    "round",
    "bevel"
  ])),
  dashArray: r.optional(r.array(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
  dashOffset: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
}), $r = r.object({
  x: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  y: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  rotation: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(-360).lte(360)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
  scale: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0.01).lte(100)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
  originX: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
  originY: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
}), Zr = r.object({
  type: r.enum(["arrow"]),
  length: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  headWidth: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(1e3)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  headLength: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(1e3)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  shaftWidth: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(1e3)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), _r = r.object({
  type: r.enum(["circle"]),
  radius: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(2048)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), Sr = r.object({
  type: r.enum(["cross"]),
  width: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  height: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  thickness: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(500)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), xr = r.object({
  type: r.enum(["ellipse"]),
  radiusX: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(2048)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  radiusY: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(2048)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), Nr = r.object({
  type: r.enum(["heart"]),
  size: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), jr = r.object({
  type: r.enum(["line"]),
  length: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  thickness: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(500)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), wr = r.object({
  type: r.enum(["path"]),
  d: r.string().min(1).max(1e5)
}), Tr = r.object({
  type: r.enum(["polygon"]),
  sides: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(3).lte(100)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  radius: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(2048)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), Fr = r.object({
  type: r.enum(["rectangle"]),
  width: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  height: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  cornerRadius: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(2048)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
}), kr = r.object({
  type: r.enum(["ring"]),
  outerRadius: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(2048)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  innerRadius: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(2048)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), Rr = r.object({
  type: r.enum(["star"]),
  points: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(3).lte(100)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  outerRadius: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(2048)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  innerRadius: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(2048)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), Or = r.discriminatedUnion("type", [
  Fr,
  _r,
  xr,
  jr,
  Tr,
  Rr,
  Zr,
  Nr,
  Sr,
  kr,
  wr
]), x = r.object({
  type: r.enum(["svg"]),
  src: r.optional(r.string().min(1).max(5e5)),
  shape: r.optional(Or),
  fill: r.optional(hr),
  stroke: r.optional(zr),
  shadow: r.optional(yr),
  transform: r.optional($r),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  height: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int().gte(1).lte(4096)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}).superRefine((e, a) => {
  const d = e.shape !== void 0, u = e.src !== void 0 && e.src.trim() !== "";
  if (!d && !u && a.addIssue({
    code: r.ZodIssueCode.custom,
    message: "Either 'src' or 'shape' must be provided",
    path: []
  }), d && u && a.addIssue({
    code: r.ZodIssueCode.custom,
    message: "Provide either 'src' or 'shape', not both",
    path: ["src"]
  }), u) {
    const B = ["shape", "fill", "stroke", "shadow", "transform", "width", "height"];
    for (const f of B)
      e[f] !== void 0 && a.addIssue({
        code: r.ZodIssueCode.custom,
        message: `'${f}' is not allowed when using 'src'. Only 'type' and 'src' are allowed in import mode`,
        path: [f]
      });
  }
}), rt = x, Dr = r.object({
  id: r.string(),
  merge: r.optional(r.array(b))
}), Lr = r.object({
  horizontal: r.optional(r.enum([
    "left",
    "center",
    "right"
  ])),
  vertical: r.optional(r.enum([
    "top",
    "center",
    "bottom"
  ]))
}), Ir = r.object({
  preset: r.enum(["typewriter"]),
  duration: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0.1).lte(30)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), Gr = r.object({
  color: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  padding: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(100)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  borderRadius: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), Cr = r.object({
  family: r.optional(r.string()),
  color: r.optional(r.string()),
  opacity: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  size: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  weight: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  lineHeight: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), Br = r.object({
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  color: r.optional(r.union([r.string().regex(/^#[A-Fa-f0-9]{6}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), N = r.object({
  type: r.enum(["text"]),
  text: r.string(),
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  height: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  font: r.optional(Cr),
  background: r.optional(Gr),
  alignment: r.optional(Lr),
  stroke: r.optional(Br),
  animation: r.optional(Ir),
  ellipsis: r.optional(r.string())
}), tt = N, j = r.object({
  type: r.enum(["text-to-image"]),
  prompt: r.string(),
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  height: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().int()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  crop: r.optional(n)
}), nt = j, Er = r.object({
  capture: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
  scale: r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
}), w = r.object({
  format: r.enum([
    "mp4",
    "gif",
    "mp3",
    "jpg",
    "png",
    "bmp"
  ]),
  resolution: r.optional(r.enum([
    "preview",
    "mobile",
    "sd",
    "hd",
    "1080",
    "4k"
  ])),
  aspectRatio: r.optional(r.enum([
    "16:9",
    "9:16",
    "1:1",
    "4:5",
    "4:3"
  ])),
  size: r.optional(l),
  fps: r.optional(r.union([
    r.literal(12),
    r.literal(15),
    r.literal(23.976),
    r.literal(24),
    r.literal(25),
    r.literal(29.97),
    r.literal(30),
    r.literal(48),
    r.literal(50),
    r.literal(59.94),
    r.literal(60)
  ])),
  scaleTo: r.optional(r.enum([
    "preview",
    "mobile",
    "sd",
    "hd",
    "1080",
    "4k"
  ])),
  quality: r.optional(r.enum([
    "verylow",
    "low",
    "medium",
    "high",
    "veryhigh"
  ])),
  repeat: r.optional(r.boolean()),
  mute: r.optional(r.boolean()),
  range: r.optional(Ue),
  poster: r.optional(Pe),
  thumbnail: r.optional(Er),
  destinations: r.optional(r.array(s))
}), o = w, T = r.object({
  in: r.optional(r.enum([
    "none",
    "fade",
    "fadeSlow",
    "fadeFast",
    "reveal",
    "revealSlow",
    "revealFast",
    "wipeLeft",
    "wipeLeftSlow",
    "wipeLeftFast",
    "wipeRight",
    "wipeRightSlow",
    "wipeRightFast",
    "slideLeft",
    "slideLeftSlow",
    "slideLeftFast",
    "slideRight",
    "slideRightSlow",
    "slideRightFast",
    "slideUp",
    "slideUpSlow",
    "slideUpFast",
    "slideDown",
    "slideDownSlow",
    "slideDownFast",
    "carouselLeft",
    "carouselLeftSlow",
    "carouselLeftFast",
    "carouselRight",
    "carouselRightSlow",
    "carouselRightFast",
    "carouselUp",
    "carouselUpSlow",
    "carouselUpFast",
    "carouselDown",
    "carouselDownSlow",
    "carouselDownFast",
    "shuffleTopRight",
    "shuffleTopRightSlow",
    "shuffleTopRightFast",
    "shuffleRightTop",
    "shuffleRightTopSlow",
    "shuffleRightTopFast",
    "shuffleRightBottom",
    "shuffleRightBottomSlow",
    "shuffleRightBottomFast",
    "shuffleBottomRight",
    "shuffleBottomRightSlow",
    "shuffleBottomRightFast",
    "shuffleBottomLeft",
    "shuffleBottomLeftSlow",
    "shuffleBottomLeftFast",
    "shuffleLeftBottom",
    "shuffleLeftBottomSlow",
    "shuffleLeftBottomFast",
    "shuffleLeftTop",
    "shuffleLeftTopSlow",
    "shuffleLeftTopFast",
    "shuffleTopLeft",
    "shuffleTopLeftSlow",
    "shuffleTopLeftFast",
    "zoom"
  ])),
  out: r.optional(r.enum([
    "none",
    "fade",
    "fadeSlow",
    "fadeFast",
    "reveal",
    "revealSlow",
    "revealFast",
    "wipeLeft",
    "wipeLeftSlow",
    "wipeLeftFast",
    "wipeRight",
    "wipeRightSlow",
    "wipeRightFast",
    "slideLeft",
    "slideLeftSlow",
    "slideLeftFast",
    "slideRight",
    "slideRightSlow",
    "slideRightFast",
    "slideUp",
    "slideUpSlow",
    "slideUpFast",
    "slideDown",
    "slideDownSlow",
    "slideDownFast",
    "carouselLeft",
    "carouselLeftSlow",
    "carouselLeftFast",
    "carouselRight",
    "carouselRightSlow",
    "carouselRightFast",
    "carouselUp",
    "carouselUpSlow",
    "carouselUpFast",
    "carouselDown",
    "carouselDownSlow",
    "carouselDownFast",
    "shuffleTopRight",
    "shuffleTopRightSlow",
    "shuffleTopRightFast",
    "shuffleRightTop",
    "shuffleRightTopSlow",
    "shuffleRightTopFast",
    "shuffleRightBottom",
    "shuffleRightBottomSlow",
    "shuffleRightBottomFast",
    "shuffleBottomRight",
    "shuffleBottomRightSlow",
    "shuffleBottomRightFast",
    "shuffleBottomLeft",
    "shuffleBottomLeftSlow",
    "shuffleBottomLeftFast",
    "shuffleLeftBottom",
    "shuffleLeftBottomSlow",
    "shuffleLeftBottomFast",
    "shuffleLeftTop",
    "shuffleLeftTopSlow",
    "shuffleLeftTopFast",
    "shuffleTopLeft",
    "shuffleTopLeftSlow",
    "shuffleTopLeftFast",
    "zoom"
  ]))
}), it = T, t = r.object({
  from: r.optional(r.unknown()),
  to: r.optional(r.unknown()),
  start: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  length: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  interpolation: r.optional(r.enum([
    "linear",
    "bezier",
    "constant"
  ])),
  easing: r.optional(r.enum([
    "ease",
    "easeIn",
    "easeOut",
    "easeInOut",
    "easeInQuad",
    "easeInCubic",
    "easeInQuart",
    "easeInQuint",
    "easeInSine",
    "easeInExpo",
    "easeInCirc",
    "easeInBack",
    "easeOutQuad",
    "easeOutCubic",
    "easeOutQuart",
    "easeOutQuint",
    "easeOutSine",
    "easeOutExpo",
    "easeOutCirc",
    "easeOutBack",
    "easeInOutQuad",
    "easeInOutCubic",
    "easeInOutQuart",
    "easeInOutQuint",
    "easeInOutSine",
    "easeInOutExpo",
    "easeInOutCirc",
    "easeInOutBack"
  ]))
}), st = t, F = r.object({
  type: r.enum(["audio"]),
  src: r.string().min(1).regex(/\S/),
  trim: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  volume: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ])),
  speed: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  effect: r.optional(r.enum([
    "none",
    "fadeIn",
    "fadeOut",
    "fadeInFadeOut"
  ]))
}), ot = F, p = r.object({
  x: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(-10).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ])),
  y: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(-10).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ]))
}), at = p, qr = r.object({
  angle: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(-360).lte(360)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ]))
}), Pr = r.object({
  x: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(-100).lte(100)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ])),
  y: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(-100).lte(100)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ]))
}), k = r.object({
  type: r.enum(["text-to-speech"]),
  text: r.string(),
  voice: r.string(),
  language: r.optional(r.string()),
  newscaster: r.optional(r.boolean()).default(!1),
  trim: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  volume: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ])),
  speed: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  effect: r.optional(r.enum([
    "none",
    "fadeIn",
    "fadeOut",
    "fadeInFadeOut"
  ]))
}), ut = k, Ur = r.object({
  type: r.enum(["title"]),
  text: r.string(),
  style: r.optional(r.enum([
    "minimal",
    "blockbuster",
    "vogue",
    "sketchy",
    "skinny",
    "chunk",
    "chunkLight",
    "marker",
    "future",
    "subtitle"
  ])),
  color: r.optional(r.string()),
  size: r.optional(r.enum([
    "xx-small",
    "x-small",
    "small",
    "medium",
    "large",
    "x-large",
    "xx-large"
  ])),
  background: r.optional(r.string()),
  position: r.optional(r.enum([
    "top",
    "topRight",
    "right",
    "bottomRight",
    "bottom",
    "bottomLeft",
    "left",
    "topLeft",
    "center"
  ])),
  offset: r.optional(p)
}), R = r.object({
  rotate: r.optional(qr),
  skew: r.optional(Pr),
  flip: r.optional(Fe)
}), ft = R, O = r.object({
  type: r.enum(["video"]),
  src: r.string().min(1).regex(/\S/),
  transcode: r.optional(r.boolean()),
  trim: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  volume: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(0).lte(1)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ])),
  volumeEffect: r.optional(r.enum([
    "none",
    "fadeIn",
    "fadeOut",
    "fadeInFadeOut"
  ])),
  speed: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(0).lte(10)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  crop: r.optional(n),
  chromaKey: r.optional(U)
}), lt = O, D = r.discriminatedUnion("type", [
  O,
  m,
  N,
  z,
  F,
  y,
  g,
  c,
  Ur,
  $,
  x,
  j,
  A,
  k
]), pt = D, L = r.object({
  asset: D,
  start: r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.union([r.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  ]),
  length: r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number().gte(0)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.union([r.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  ]),
  fit: r.optional(r.enum([
    "cover",
    "contain",
    "crop",
    "none"
  ])),
  scale: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ])),
  width: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(3840)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  height: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number().gte(1).lte(2160)), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  position: r.optional(r.enum([
    "top",
    "topRight",
    "right",
    "bottomRight",
    "bottom",
    "bottomLeft",
    "left",
    "topLeft",
    "center"
  ])),
  offset: r.optional(p),
  transition: r.optional(T),
  effect: r.optional(r.enum([
    "zoomIn",
    "zoomInSlow",
    "zoomInFast",
    "zoomOut",
    "zoomOutSlow",
    "zoomOutFast",
    "slideLeft",
    "slideLeftSlow",
    "slideLeftFast",
    "slideRight",
    "slideRightSlow",
    "slideRightFast",
    "slideUp",
    "slideUpSlow",
    "slideUpFast",
    "slideDown",
    "slideDownSlow",
    "slideDownFast"
  ])),
  filter: r.optional(r.enum([
    "none",
    "blur",
    "boost",
    "contrast",
    "darken",
    "greyscale",
    "lighten",
    "muted",
    "negative"
  ])),
  opacity: r.optional(r.union([
    r.union([r.preprocess((e) => {
      if (!(e === "" || e === null || e === void 0))
        return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
    }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
    r.array(t)
  ])),
  transform: r.optional(R),
  alias: r.optional(r.union([r.string().regex(/^[A-Za-z0-9_-]+$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
}), dt = L, I = r.object({
  clips: r.array(L).min(1)
}), gt = I, G = r.object({
  soundtrack: r.optional(cr),
  background: r.optional(r.string()),
  fonts: r.optional(r.array(ke)),
  tracks: r.array(I).min(1),
  cache: r.optional(r.boolean())
}), ct = G, i = r.object({
  timeline: G,
  output: w,
  merge: r.optional(r.array(b)),
  callback: r.optional(r.string()),
  disk: r.optional(r.enum(["local", "mount"]))
}), mt = i, Jr = r.object({
  id: r.string(),
  owner: r.string(),
  plan: r.optional(r.string()),
  status: r.enum([
    "queued",
    "fetching",
    "preprocessing",
    "rendering",
    "saving",
    "done",
    "failed"
  ]),
  error: r.optional(r.string()),
  duration: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  renderTime: r.optional(r.union([r.preprocess((e) => {
    if (!(e === "" || e === null || e === void 0))
      return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
  }, r.number()), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
  url: r.optional(r.string()),
  poster: r.optional(r.union([
    r.string(),
    r.null()
  ])),
  thumbnail: r.optional(r.union([
    r.string(),
    r.null()
  ])),
  data: r.optional(i),
  created: r.optional(r.string()),
  updated: r.optional(r.string())
});
r.object({
  success: r.boolean(),
  message: r.string(),
  response: Jr
});
const Vr = r.object({
  id: r.string(),
  name: r.string(),
  owner: r.string(),
  template: i
});
r.object({
  success: r.boolean(),
  message: r.string(),
  response: Vr
});
const C = r.object({
  name: r.string(),
  template: r.optional(i)
});
r.object({
  body: i,
  path: r.optional(r.never()),
  query: r.optional(r.never())
});
r.object({
  body: r.optional(r.never()),
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.object({
    data: r.optional(r.boolean()),
    merged: r.optional(r.boolean())
  }))
});
r.object({
  body: r.optional(r.never()),
  path: r.optional(r.never()),
  query: r.optional(r.never())
});
r.object({
  body: C,
  path: r.optional(r.never()),
  query: r.optional(r.never())
});
r.object({
  body: r.optional(r.never()),
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.never())
});
r.void();
r.object({
  body: r.optional(r.never()),
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.never())
});
r.object({
  body: C,
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.never())
});
r.object({
  body: Dr,
  path: r.optional(r.never()),
  query: r.optional(r.never())
});
r.object({
  body: r.optional(r.never()),
  path: r.object({
    url: r.string()
  }),
  query: r.optional(r.never())
});
r.object({
  body: r.optional(r.never()),
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.never())
});
r.void();
r.object({
  body: r.optional(r.never()),
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.never())
});
r.object({
  body: r.optional(r.never()),
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.never())
});
r.object({
  body: ar,
  path: r.optional(r.never()),
  query: r.optional(r.never())
});
r.object({
  body: r.optional(r.never()),
  path: r.optional(r.never()),
  query: r.optional(r.never())
});
r.object({
  body: gr,
  path: r.optional(r.never()),
  query: r.optional(r.never())
});
r.object({
  body: r.optional(r.never()),
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.never())
});
r.void();
r.object({
  body: r.optional(r.never()),
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.never())
});
r.object({
  body: r.optional(r.never()),
  path: r.optional(r.never()),
  query: r.optional(r.never())
});
r.object({
  body: ce,
  path: r.optional(r.never()),
  query: r.optional(r.never())
});
r.object({
  body: r.optional(r.never()),
  path: r.object({
    id: r.union([r.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), r.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
  }),
  query: r.optional(r.never())
});
const At = Te, yt = ur, bt = o.shape.format, ht = o.shape.fps.unwrap(), zt = o.shape.resolution, $t = o.shape.aspectRatio, Zt = r.string().regex(/^#[0-9A-Fa-f]{6}$|^#[0-9A-Fa-f]{8}$/);
export {
  pt as AssetSchema,
  ot as AudioAssetSchema,
  Kr as CaptionAssetSchema,
  dt as ClipSchema,
  Mr as CropSchema,
  At as DestinationSchema,
  mt as EditSchema,
  Zt as HexColorSchema,
  Qr as HtmlAssetSchema,
  Wr as ImageAssetSchema,
  Xr as ImageToVideoAssetSchema,
  st as KeyframeSchema,
  Yr as LumaAssetSchema,
  at as OffsetSchema,
  $t as OutputAspectRatioSchema,
  bt as OutputFormatSchema,
  ht as OutputFpsSchema,
  zt as OutputResolutionSchema,
  o as OutputSchema,
  yt as OutputSizeSchema,
  vr as RichTextAssetSchema,
  et as ShapeAssetSchema,
  rt as SvgAssetSchema,
  tt as TextAssetSchema,
  nt as TextToImageAssetSchema,
  ut as TextToSpeechAssetSchema,
  ct as TimelineSchema,
  gt as TrackSchema,
  ft as TransformationSchema,
  it as TransitionSchema,
  st as TweenSchema,
  lt as VideoAssetSchema
};
