cueframe 0.4.10 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cueframe.js CHANGED
@@ -1,26 +1,87 @@
1
1
  #!/usr/bin/env node
2
- import{A as ce,B as O,C as j,D as v,E as oe,F as Ve,G as X,H as Gl,a as Le,b as Pl,c as Ie,d as Mt,e as Hl,f as Ul,g as jl,h as kr,i as wr,j as gt,k as Jt,l as Vl,m as Dn,n as T,o as F,p as se,q as S,r as Xt,s as Wl,t as Rr,u as o,v as $l,w as Yl,x as Nr,y as U,z as ee}from"./chunk-QS37SCWN.js";import{a as L}from"./chunk-3QSA3EBY.js";import{Command as FR}from"commander";import{existsSync as sg}from"fs";import{homedir as eu}from"os";import{dirname as cg,join as ka}from"path";import{fileURLToPath as lg}from"url";import{agents as ug,detectGlobalAgents as tu,upsertServer as dg}from"add-mcp";import{createHash as tg,randomUUID as Kl}from"crypto";import{chmodSync as ng,existsSync as rg,lstatSync as Ia,mkdirSync as Ta,readFileSync as Jl,readdirSync as Xl,renameSync as xa,writeFileSync as Ql}from"fs";import{dirname as Or,join as qe}from"path";var _a=".cueframe-install.json";function Zl(e){return tg("sha256").update(e).digest("hex")}function zl(e){let t=new Map;function n(r){let a=qe(e,r),i=Ia(a);if(i.isSymbolicLink())throw new Error(`Skill package contains a symbolic link: ${a}`);if(i.isDirectory())for(let c of Xl(a).sort())!r&&c===_a||n(r?`${r}/${c}`:c);else if(i.isFile())t.set(r,{bytes:Jl(a),mode:i.mode&511});else throw new Error(`Unsupported skill package entry: ${a}`)}return n(""),t}function Ca(e){return Object.fromEntries([...e].map(([t,n])=>[t,`${n.mode}:${Zl(n.bytes)}`]))}function og(e,t){let n=Object.keys(e).sort();return JSON.stringify(n)===JSON.stringify(Object.keys(t).sort())&&n.every(r=>e[r]===t[r])}function ag(e,t){try{let n=qe(e,_a);if(!Ia(n).isFile())return;let r=JSON.parse(Jl(n,"utf8"));return r.version!==1||typeof r.sourceHash!="string"||!r.files||!og(r.files,Ca(t))?void 0:r}catch{return}}function ig(e,t){let n=`> Installed ${t} by \`npx -y cueframe install\`. Run it again to refresh
2
+ import{A as B,B as ze,C as Ke,D as ue,E as vl,a as We,b as gl,c as Le,d as ft,e as xl,f as zl,g as bl,h as Hn,i as Jn,j as ht,k as Gt,l as Sl,m as Wo,n as P,o as W,p as be,q as E,r as Ht,s as yl,t as Kn,u as Xn,v as X,w as ge,x as Se,y as F,z as ee}from"./chunk-56LDB4H5.js";import{a as at}from"./chunk-3QSA3EBY.js";import{Command as Bwe}from"commander";import{existsSync as Zz}from"fs";import{homedir as kl}from"os";import{dirname as Gz,join as Oa}from"path";import{fileURLToPath as Hz}from"url";import{agents as Jz,detectGlobalAgents as Cl,upsertServer as Kz}from"add-mcp";import{createHash as Fz,randomUUID as wl}from"crypto";import{chmodSync as Uz,existsSync as Nz,lstatSync as Ia,mkdirSync as va,readFileSync as Ml,readdirSync as Ol,renameSync as wa,writeFileSync as Rl}from"fs";import{dirname as Yn,join as et}from"path";var Ma=".cueframe-install.json";function $l(e){return Fz("sha256").update(e).digest("hex")}function Il(e){let t=new Map;function i(a){let o=et(e,a),r=Ia(o);if(r.isSymbolicLink())throw new Error(`Skill package contains a symbolic link: ${o}`);if(r.isDirectory())for(let d of Ol(o).sort())!a&&d===Ma||i(a?`${a}/${d}`:d);else if(r.isFile())t.set(a,{bytes:Ml(o),mode:r.mode&511});else throw new Error(`Unsupported skill package entry: ${o}`)}return i(""),t}function Ra(e){return Object.fromEntries([...e].map(([t,i])=>[t,`${i.mode}:${$l(i.bytes)}`]))}function qz(e,t){let i=Object.keys(e).sort();return JSON.stringify(i)===JSON.stringify(Object.keys(t).sort())&&i.every(a=>e[a]===t[a])}function Bz(e,t){try{let i=et(e,Ma);if(!Ia(i).isFile())return;let a=JSON.parse(Ml(i,"utf8"));return a.version!==1||typeof a.sourceHash!="string"||!a.files||!qz(a.files,Ra(t))?void 0:a}catch{return}}function Wz(e,t){let i=`> Installed ${t} by \`npx -y cueframe install\`. Run it again to refresh
3
3
  > unchanged managed skills. Locally edited or untracked packages are preserved;
4
4
  > inspect reported conflicts before using \`--force\` (which makes a backup).
5
- `,r=e.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n/);return r?`${r[0]}
6
- ${n}${e.slice(r[0].length)}`:`${n}
7
- ${e}`}function ql(e,t,n={}){let r={installed:[],unchanged:[],skipped:[],backups:[]},a=n.today??new Date().toISOString().slice(0,10),i=Xl(e).sort().flatMap(c=>{let u=qe(e,c);if(!rg(qe(u,"SKILL.md")))return[];let f=zl(u),l=Zl(JSON.stringify(Ca(f))),d=f.get("SKILL.md");return f.set("SKILL.md",{...d,bytes:Buffer.from(ig(d.bytes.toString("utf8"),a))}),[{name:c,files:f,sourceHash:l}]});for(let c of new Set(t))for(let{name:u,files:f,sourceHash:l}of i){let d=qe(c,u),p=qe(d,"SKILL.md"),A=!1;try{Ia(d),A=!0}catch(M){if(M.code!=="ENOENT")throw M}if(A&&!n.force){let M;try{M=ag(d,zl(d))}catch{}if(!M){r.skipped.push(p);continue}if(M.sourceHash===l){r.unchanged.push(p);continue}}let E=qe(Or(c),"cueframe-skill-staging",`${u}-${Kl()}`);for(let[M,I]of f){let k=qe(E,M);Ta(Or(k),{recursive:!0}),Ql(k,I.bytes),ng(k,I.mode)}let N={version:1,sourceHash:l,files:Ca(f)};Ql(qe(E,_a),JSON.stringify(N,null,2)+`
8
- `),Ta(c,{recursive:!0});let C;A&&(C=qe(Or(c),"cueframe-skill-backups",`${u}-${Kl()}`),Ta(Or(C),{recursive:!0}),xa(d,C));try{xa(E,d)}catch(M){throw C&&xa(C,d),M}C&&r.backups.push({skill:p,path:C}),r.installed.push(p)}return r}var vr="cueframe",mg=ka(cg(lg(import.meta.url)),"skills");function pg(e){return(ug[e]?.supportedTransports??[]).includes("http")}async function fg(e){return(await tu()).map(n=>{if(!pg(n))return{agent:n,wired:!1,error:"speaks stdio only \u2014 CueFrame\u2019s MCP server is remote HTTP"};try{let r=dg(n,vr,{type:"http",url:e});return{agent:n,wired:r.success,path:r.path,error:r.error}}catch(r){return{agent:n,wired:!1,error:r instanceof Error?r.message:String(r)}}})}async function nu(e,t=mg){let n=`${Xt(e.target)}/v1/mcp`,r=[ka(eu(),".agents","skills"),ka(eu(),".claude","skills")];if(e.dryRun){let l=await tu();j(e,{ok:!0,dryRun:!0,mcpUrl:n,wouldWire:l,serverName:vr,skillDirectories:r},()=>{console.log(`Would wire MCP server "${vr}" \u2192 ${n} into:`),l.length===0&&console.log(" (no agents detected on this machine)");for(let d of l)console.log(` \u2192 ${d}`);console.log("Would install/refresh CueFrame skills in ~/.agents/skills and ~/.claude/skills"),console.log("Dry run \u2014 nothing was written.")});return}sg(t)||(v(e,"install",new Error("Bundled skills/ directory not found"),T.UserError),S(T.UserError));let a=await fg(n),{installed:i,unchanged:c,skipped:u,backups:f}=ql(t,r,e);i.length===0&&c.length===0&&u.length===0&&a.length===0&&(v(e,"install",new Error("No agents detected and no skills found \u2014 nothing to install"),T.UserError),S(T.UserError)),j(e,{ok:!0,mcpUrl:n,agents:a,skills:i,unchanged:c,skipped:u,backups:f,skillDirectories:r},()=>{if(console.log(`\u2713 CueFrame MCP server (${n})`),a.length===0)console.log(" No agents detected on this machine. Add it manually:"),console.log(` claude mcp add --transport http ${vr} ${n}`),console.log(` \u2026or add the MCP server ${n} as a custom connector.`);else for(let l of a)console.log(l.wired?` \u2192 wired ${l.agent}`:` \u2717 ${l.agent}: ${l.error??"failed"}`);if(console.log(`\u2713 Installed/refreshed ${i.length} CueFrame skill copies in ~/.agents/skills and ~/.claude/skills`),c.length>0&&console.log(` ${c.length} already current`),u.length>0){console.log(` ${u.length} preserved (locally changed or untracked; review before --force)`);for(let l of u)console.log(` ${l}`)}for(let l of f)console.log(` Backup: ${l.path}`);console.log(""),console.log("Next: ask your agent to make a video \u2014 it opens a browser to authorize on"),console.log("first call. No API key needed."),console.log("Restart your agent session to load the MCP server and skills."),console.log(""),console.log("This installed no `cueframe` binary \u2014 npx leaves nothing on your PATH."),console.log("Prefer the terminal? Every command runs as `npx -y cueframe \u2026`:"),console.log(" npx -y cueframe login")})}import{existsSync as wa,mkdirSync as hg,readFileSync as ou,writeFileSync as Ra}from"fs";import{join as Na}from"path";var ru="cueframe.json",gg="cueframe/components",Fr=".cueframe/";function Ag(e,t){let n=Na(e,".gitignore");if(wa(n)){let r=ou(n,"utf8"),a=r.split(`
9
- `).map(i=>i.trim());if(a.includes(Fr)||a.includes(".cueframe"))return!1;if(!t){let i=r.endsWith(`
10
- `)||r.length===0?"":`
11
- `;Ra(n,`${r}${i}
5
+ `,a=e.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n/);return a?`${a[0]}
6
+ ${i}${e.slice(a[0].length)}`:`${i}
7
+ ${e}`}function Tl(e,t,i={}){let a={installed:[],unchanged:[],skipped:[],backups:[]},o=i.today??new Date().toISOString().slice(0,10),r=Ol(e).sort().flatMap(d=>{let p=et(e,d);if(!Nz(et(p,"SKILL.md")))return[];let f=Il(p),u=$l(JSON.stringify(Ra(f))),g=f.get("SKILL.md");return f.set("SKILL.md",{...g,bytes:Buffer.from(Wz(g.bytes.toString("utf8"),o))}),[{name:d,files:f,sourceHash:u}]});for(let d of new Set(t))for(let{name:p,files:f,sourceHash:u}of r){let g=et(d,p),S=et(g,"SKILL.md"),y=!1;try{Ia(g),y=!0}catch(j){if(j.code!=="ENOENT")throw j}if(y&&!i.force){let j;try{j=Bz(g,Il(g))}catch{}if(!j){a.skipped.push(S);continue}if(j.sourceHash===u){a.unchanged.push(S);continue}}let w=et(Yn(d),"cueframe-skill-staging",`${p}-${wl()}`);for(let[j,Z]of f){let U=et(w,j);va(Yn(U),{recursive:!0}),Rl(U,Z.bytes),Uz(U,Z.mode)}let O={version:1,sourceHash:u,files:Ra(f)};Rl(et(w,Ma),JSON.stringify(O,null,2)+`
8
+ `),va(d,{recursive:!0});let T;y&&(T=et(Yn(d),"cueframe-skill-backups",`${p}-${wl()}`),va(Yn(T),{recursive:!0}),wa(g,T));try{wa(w,g)}catch(j){throw T&&wa(T,g),j}T&&a.backups.push({skill:S,path:T}),a.installed.push(S)}return a}var Qn="cueframe",Xz=Oa(Gz(Hz(import.meta.url)),"skills");function Yz(e){return(Jz[e]?.supportedTransports??[]).includes("http")}async function Qz(e){return(await Cl()).map(i=>{if(!Yz(i))return{agent:i,wired:!1,error:"speaks stdio only \u2014 CueFrame\u2019s MCP server is remote HTTP"};try{let a=Kz(i,Qn,{type:"http",url:e});return{agent:i,wired:a.success,path:a.path,error:a.error}}catch(a){return{agent:i,wired:!1,error:a instanceof Error?a.message:String(a)}}})}async function Dl(e,t=Xz){let i=`${Ht(e.target)}/v1/mcp`,a=[Oa(kl(),".agents","skills"),Oa(kl(),".claude","skills")];if(e.dryRun){let u=await Cl();ee(e,{ok:!0,dryRun:!0,mcpUrl:i,wouldWire:u,serverName:Qn,skillDirectories:a},()=>{console.log(`Would wire MCP server "${Qn}" \u2192 ${i} into:`),u.length===0&&console.log(" (no agents detected on this machine)");for(let g of u)console.log(` \u2192 ${g}`);console.log("Would install/refresh CueFrame skills in ~/.agents/skills and ~/.claude/skills"),console.log("Dry run \u2014 nothing was written.")});return}Zz(t)||(B(e,"install",new Error("Bundled skills/ directory not found"),P.UserError),E(P.UserError));let o=await Qz(i),{installed:r,unchanged:d,skipped:p,backups:f}=Tl(t,a,e);r.length===0&&d.length===0&&p.length===0&&o.length===0&&(B(e,"install",new Error("No agents detected and no skills found \u2014 nothing to install"),P.UserError),E(P.UserError)),ee(e,{ok:!0,mcpUrl:i,agents:o,skills:r,unchanged:d,skipped:p,backups:f,skillDirectories:a},()=>{if(console.log(`\u2713 CueFrame MCP server (${i})`),o.length===0)console.log(" No agents detected on this machine. Add it manually:"),console.log(` claude mcp add --transport http ${Qn} ${i}`),console.log(` \u2026or add the MCP server ${i} as a custom connector.`);else for(let u of o)console.log(u.wired?` \u2192 wired ${u.agent}`:` \u2717 ${u.agent}: ${u.error??"failed"}`);if(console.log(`\u2713 Installed/refreshed ${r.length} CueFrame skill copies in ~/.agents/skills and ~/.claude/skills`),d.length>0&&console.log(` ${d.length} already current`),p.length>0){console.log(` ${p.length} preserved (locally changed or untracked; review before --force)`);for(let u of p)console.log(` ${u}`)}for(let u of f)console.log(` Backup: ${u.path}`);console.log(""),console.log("Next: ask your agent to make a video \u2014 it opens a browser to authorize on"),console.log("first call. No API key needed."),console.log("Restart your agent session to load the MCP server and skills."),console.log(""),console.log("This installed no `cueframe` binary \u2014 npx leaves nothing on your PATH."),console.log("Prefer the terminal? Every command runs as `npx -y cueframe \u2026`:"),console.log(" npx -y cueframe login")})}import{existsSync as $a,mkdirSync as eb,readFileSync as jl,writeFileSync as Ta}from"fs";import{join as ka}from"path";var _l="cueframe.json",tb="cueframe/components",er=".cueframe/";function ob(e,t){let i=ka(e,".gitignore");if($a(i)){let a=jl(i,"utf8"),o=a.split(`
9
+ `).map(r=>r.trim());if(o.includes(er)||o.includes(".cueframe"))return!1;if(!t){let r=a.endsWith(`
10
+ `)||a.length===0?"":`
11
+ `;Ta(i,`${a}${r}
12
12
  # CueFrame derived render cache (regenerated; never authored)
13
- ${Fr}
14
- `)}return!0}return t||Ra(n,`# CueFrame derived render cache (regenerated; never authored)
15
- ${Fr}
16
- `),!0}function au(e){let t=process.cwd(),n=e.dryRun??!1;O(e,"init_prepare",{cwd:t,dryRun:n});let r=Na(t,ru),a=wa(r),i=gg;if(a)try{let l=JSON.parse(ou(r,"utf8"));typeof l.componentsDir=="string"&&l.componentsDir.length>0&&(i=l.componentsDir)}catch{}else n||Ra(r,`${JSON.stringify({componentsDir:i},null,2)}
17
- `);let c=Na(t,i),u=wa(c);!u&&!n&&hg(c,{recursive:!0});let f=Ag(t,n);j(e,{ok:!0,dryRun:n,root:t,manifest:{path:r,created:!a},componentsDir:i,componentsDirCreated:!u,gitignoreUpdated:f},()=>{console.log(`\u2713 ${n?"Would initialize":"Initialized"} CueFrame workspace at ${t}`),console.log(` ${a?"kept":"created"} ${ru} (componentsDir: ${i})`),console.log(` ${u?"exists":"created"} ${i}/`),f&&console.log(` gitignored ${Fr}`),console.log("Next: cueframe new component <name>")})}import{existsSync as Ug,mkdirSync as jg,readFileSync as Vg,readdirSync as Wg,writeFileSync as gu}from"fs";import{join as Au}from"path";import{existsSync as Dr,readFileSync as bg,readdirSync as yg,statSync as Eg}from"fs";import{dirname as Sg,join as Zt,parse as Tg}from"path";var xg="cueframe/components";var Cg="cueframe.json",Ig=o.object({componentsDir:o.string().min(1).default(xg)}).passthrough();function Mn(e){let t=e,n=Tg(t).root;for(;;){let r=Zt(t,Cg);if(Dr(r)){let a=bg(r,"utf8"),i=Ig.parse(JSON.parse(a));return{root:t,manifest:i}}if(t===n)return null;t=Sg(t)}}function iu(e){return Zt(e.root,e.manifest.componentsDir)}function Mr(e,t){return Zt(iu(e),t)}function su(e){let t=iu(e);return Dr(t)?yg(t).filter(n=>{let r=Zt(t,n);return Eg(r).isDirectory()?Dr(Zt(r,"index.tsx"))&&Dr(Zt(r,"config.ts")):!1}).sort():[]}import{existsSync as Bg,readFileSync as Lg}from"fs";import{join as Pg}from"path";var Oa=2,_g=2,Br=2,va=o.enum(["image","video","audio","data"]),kg=o.union([o.literal(256),o.literal(512),o.literal(1024),o.literal(2048)]),wg=o.discriminatedUnion("mode",[o.object({mode:o.literal("original")}).strict(),o.object({mode:o.literal("tier"),tier:kg}).strict(),o.object({mode:o.literal("auto"),maxProjectedWidthRatio:o.number().positive().max(64),maxProjectedHeightRatio:o.number().positive().max(64),minVisibleSourceWidthRatio:o.number().positive().max(1).default(1),minVisibleSourceHeightRatio:o.number().positive().max(1).default(1)}).strict()]),Rg=o.object({kind:va,required:o.boolean(),mimeTypes:o.array(o.string().min(1)).min(1).optional(),mediaDemand:wg.optional()}).strict(),cu=o.enum(["canvas2d","webgl","webgl2","webgpu"]),Fa=o.object({api:cu,required:o.literal(!0),accelerationPreference:o.enum(["hardware-preferred","software-allowed"])}).strict(),lu=o.object({version:o.literal(2)}).strict(),uu=o.enum(["angle","angle-egl","swangle","vulkan"]),du=o.object({glBackend:uu,colorPipeline:o.literal("srgb"),sceneShot:lu.nullable()}).strict(),Ng=o.object({webgl:o.string().min(1),renderer:o.string(),maxTextureSize:o.number().int().positive(),halfFloatColorTarget:o.string().min(1),glBackend:uu}).strict(),Og=o.object({loadedRuntimeIdentity:o.string().min(1),loadedDependencyIdentity:o.string().min(1),observedRasterAffectingFlags:o.object({browserArguments:o.array(o.string().min(1))}).strict(),browserProduct:o.string().min(1),browserVersion:o.string().min(1),browserExecutableSha256:o.string().regex(/^[a-f0-9]{64}$/),headless:o.boolean(),os:o.string().min(1),arch:o.string().min(1),deviceScaleFactor:o.number().positive(),colorProfile:o.string().min(1),actualGlBackend:o.string().min(1),actualRenderer:o.string().min(1),gpuIdentity:o.string().min(1).nullable()}).strict(),r1=Og.omit({deviceScaleFactor:!0}).strict(),o1=o.object({handle:o.string().min(1),mimeType:o.literal("image/png"),byteLength:o.number().int().positive(),width:o.number().int().positive(),height:o.number().int().positive(),encodedSha256:o.string().regex(/^[a-f0-9]{64}$/)}).strict(),a1=o.object({sessionId:o.string().uuid(),requestId:o.number().int().nonnegative(),frame:o.number().int().nonnegative(),deviceScaleFactor:o.number().positive()}).strict(),Lr=o.object({version:o.literal(Oa),assets:o.record(o.string().min(1),Rg),graphics:Fa,alphaPolicy:o.enum(["requires-transparency","allows-opaque"]),sceneShot:lu.optional()}).strict(),mu=Object.freeze({version:Oa,assets:Object.freeze({}),graphics:Object.freeze({api:"canvas2d",required:!0,accelerationPreference:"software-allowed"}),alphaPolicy:"requires-transparency"}),Pr=o.object({version:o.literal(Oa),componentId:o.string().min(1).max(128).regex(/^[a-z0-9][a-z0-9._-]*$/),tsxSource:o.string().min(1),manifest:Lr}).strict(),pu=o.object({handle:o.string().min(1).max(256),kind:va,mimeType:o.string().min(1),contentSha256:o.string().regex(/^[a-f0-9]{64}$/),width:o.number().int().positive().optional(),height:o.number().int().positive().optional(),durationSec:o.number().positive().optional(),frameRate:o.number().positive().optional()}).strict(),vg=o.object({handle:o.string().min(1).max(256),kind:va,mimeType:o.string().min(1),width:o.number().int().positive().optional(),height:o.number().int().positive().optional(),durationSec:o.number().positive().optional(),frameRate:o.number().positive().optional()}).strict(),Fg=o.object({path:o.string().min(1)}).strict(),i1=o.object({version:o.literal(_g),bundleId:o.string().regex(/^[a-f0-9]{64}$/),sourceVersionId:o.string().regex(/^[a-f0-9]{64}$/),runtimeDigest:o.string().min(1),dependencyLockDigest:o.string().regex(/^[a-f0-9]{64}$/),entrypoint:o.string().min(1),manifest:Lr}).strict(),s1=o.object({version:o.literal(Br),bundleId:o.string().regex(/^[a-f0-9]{64}$/),params:o.record(o.string(),o.unknown()),assets:o.record(o.string().min(1),pu),width:o.number().int().positive(),height:o.number().int().positive(),fps:o.number().positive(),durationInFrames:o.number().int().positive(),alpha:o.boolean(),graphics:Fa,seed:o.string().min(1),renderer:du}).strict(),c1=o.object({version:o.literal(Br),source:Pr,params:o.record(o.string(),o.unknown()),assets:o.record(o.string().min(1),pu),width:o.number().int().positive(),height:o.number().int().positive(),fps:o.number().positive(),durationInFrames:o.number().int().positive(),codec:o.enum(["vp9","prores"]),runtimeDigest:o.string().min(1),dependencyLockDigest:o.string().regex(/^[a-f0-9]{64}$/),seed:o.string().min(1)}).strict(),l1=o.object({version:o.literal(Br),source:Pr,params:o.record(o.string(),o.unknown()),assets:o.record(o.string().min(1),vg),assetFiles:o.record(o.string().min(1),Fg),width:o.number().int().positive(),height:o.number().int().positive(),fps:o.number().positive(),durationInFrames:o.number().int().positive(),codec:o.enum(["vp9","prores"]),runtimeDigest:o.string().min(1),dependencyLockDigest:o.string().regex(/^[a-f0-9]{64}$/),seed:o.string().min(1)}).strict();var Dg=o.object({api:cu,acceleration:o.enum(["hardware","software"]),adapterName:o.string().min(1).optional(),deviceLost:o.literal(!1)}).strict(),u1=o.object({version:o.literal(Br),artifactId:o.string().regex(/^[a-f0-9]{64}$/),renderKey:o.string().regex(/^[a-f0-9]{64}$/),bundleId:o.string().regex(/^[a-f0-9]{64}$/),sourceVersionId:o.string().regex(/^[a-f0-9]{64}$/),runtimeDigest:o.string().min(1),outputSha256:o.string().regex(/^[a-f0-9]{64}$/),outputBytes:o.number().int().positive(),codec:o.enum(["png","vp9","prores"]),width:o.number().int().positive(),height:o.number().int().positive(),fps:o.number().positive(),durationInFrames:o.number().int().positive(),alpha:o.boolean(),requestedGraphics:Fa,actualGraphics:Dg,renderer:du,host:Ng.nullable()}).strict(),Mg=["invalid_component_source","unsupported_runtime_version","component_does_not_compile","component_runtime_error","component_deadline_exceeded","component_resource_exhausted","component_asset_undeclared","component_asset_unavailable","component_asset_integrity_failed","component_network_denied","component_import_denied","component_api_mismatch","component_graphics_unavailable","component_graphics_mismatch","component_device_lost","component_output_invalid","component_output_unverifiable","component_conflict","component_scene_invalid"],d1=o.enum(Mg);var fu=mu;function Hg(e,t,n){let r=Lr.safeParse(e);if(!r.success)throw Object.assign(new Error(`Component "${t}" has no valid contract-v2 manifest at ${n}.`),{code:"no_component_manifest"});return r.data}function hu(e,t){let n=Pg(e.root,"cueframe.json");if(!Bg(n))throw Object.assign(new Error("No cueframe.json workspace manifest was found."),{code:"no_component_manifest"});let r=JSON.parse(Lg(n,"utf8"));return Hg(r.components?.[t]?.manifest,t,`cueframe.json components.${t}.manifest`)}var $g="cueframe.json";function Yg(e){return e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}function Gg(e){return e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function Da(e,t){v(e,"new_component",new Error(t),T.UserError),S(T.UserError)}function Kg(e,t){return`import React from 'react';
13
+ ${er}
14
+ `)}return!0}return t||Ta(i,`# CueFrame derived render cache (regenerated; never authored)
15
+ ${er}
16
+ `),!0}function El(e){let t=process.cwd(),i=e.dryRun??!1;F(e,"init_prepare",{cwd:t,dryRun:i});let a=ka(t,_l),o=$a(a),r=tb;if(o)try{let u=JSON.parse(jl(a,"utf8"));typeof u.componentsDir=="string"&&u.componentsDir.length>0&&(r=u.componentsDir)}catch{}else i||Ta(a,`${JSON.stringify({componentsDir:r},null,2)}
17
+ `);let d=ka(t,r),p=$a(d);!p&&!i&&eb(d,{recursive:!0});let f=ob(t,i);ee(e,{ok:!0,dryRun:i,root:t,manifest:{path:a,created:!o},componentsDir:r,componentsDirCreated:!p,gitignoreUpdated:f},()=>{console.log(`\u2713 ${i?"Would initialize":"Initialized"} CueFrame workspace at ${t}`),console.log(` ${o?"kept":"created"} ${_l} (componentsDir: ${r})`),console.log(` ${p?"exists":"created"} ${r}/`),f&&console.log(` gitignored ${er}`),console.log("Next: cueframe new component <name>")})}import{existsSync as Vve,mkdirSync as Ave,readFileSync as Fve,readdirSync as Uve,writeFileSync as _x}from"fs";import{join as jx}from"path";import{existsSync as ia,readFileSync as Bw,readdirSync as Ww,statSync as Zw}from"fs";import{dirname as Gw,join as jo,parse as Hw}from"path";var qn={};at(qn,{$brand:()=>Ba,$input:()=>hd,$output:()=>fd,INVALID:()=>je,NEVER:()=>qa,TimePrecision:()=>Md,ZodAny:()=>pm,ZodArray:()=>fm,ZodBase64:()=>Ki,ZodBase64URL:()=>Xi,ZodBigInt:()=>Do,ZodBigIntFormat:()=>ea,ZodBoolean:()=>Co,ZodCIDRv4:()=>Hi,ZodCIDRv6:()=>Ji,ZodCUID:()=>Ui,ZodCUID2:()=>Ni,ZodCatch:()=>_m,ZodCodec:()=>Vn,ZodCompileAsyncError:()=>Ye,ZodCompileUnsupportedError:()=>te,ZodCreditCard:()=>im,ZodCustom:()=>An,ZodCustomStringFormat:()=>Wt,ZodDate:()=>_n,ZodDefault:()=>Om,ZodDiscriminatedUnion:()=>gm,ZodE164:()=>Yi,ZodEmail:()=>Li,ZodEmoji:()=>Ai,ZodEnum:()=>$o,ZodError:()=>zw,ZodExactOptional:()=>na,ZodFile:()=>wm,ZodFirstPartyTypeKind:()=>Zm,ZodFunction:()=>Nm,ZodGUID:()=>Vi,ZodIBAN:()=>am,ZodIPv4:()=>Zi,ZodIPv6:()=>Gi,ZodISODate:()=>It,ZodISODateTime:()=>Rt,ZodISODuration:()=>Ot,ZodISOTime:()=>Mt,ZodInstanceOf:()=>Wm,ZodIntersection:()=>xm,ZodIssueCode:()=>yw,ZodJWT:()=>Qi,ZodKSUID:()=>Wi,ZodLazy:()=>Fm,ZodLiteral:()=>vm,ZodMAC:()=>rm,ZodMap:()=>Sm,ZodNaN:()=>Em,ZodNanoID:()=>Fi,ZodNever:()=>lm,ZodNonOptional:()=>ra,ZodNull:()=>dm,ZodNullable:()=>Mm,ZodNumber:()=>ko,ZodNumberFormat:()=>Zt,ZodObject:()=>jn,ZodOptional:()=>Pn,ZodPipe:()=>Ln,ZodPrefault:()=>Tm,ZodPreprocess:()=>Pm,ZodPromise:()=>Um,ZodReadonly:()=>Lm,ZodRealError:()=>Ne,ZodRecord:()=>Oo,ZodSet:()=>ym,ZodString:()=>To,ZodStringFormat:()=>ce,ZodSuccess:()=>Dm,ZodSymbol:()=>sm,ZodTemplateLiteral:()=>Am,ZodTransform:()=>Rm,ZodTuple:()=>bm,ZodType:()=>Y,ZodULID:()=>qi,ZodURL:()=>Dn,ZodUUID:()=>rt,ZodUndefined:()=>cm,ZodUnion:()=>En,ZodUnknown:()=>mm,ZodVoid:()=>um,ZodXID:()=>Bi,ZodXor:()=>hm,_ZodString:()=>Pi,_default:()=>$m,_function:()=>dg,any:()=>Wh,array:()=>h,base64:()=>Mh,base64url:()=>Oh,bigint:()=>Fh,boolean:()=>R,catch:()=>jm,check:()=>pg,cidrv4:()=>Rh,cidrv6:()=>Ih,clone:()=>re,codec:()=>ig,coerce:()=>Hm,compile:()=>bd,config:()=>xe,core:()=>mt,creditCard:()=>Th,cuid:()=>gh,cuid2:()=>xh,currencyCode:()=>jh,custom:()=>mg,date:()=>Zh,decode:()=>Xp,decodeAsync:()=>Qp,deepPartial:()=>Rg,describe:()=>lg,discriminatedUnion:()=>Jh,e164:()=>$h,email:()=>sh,emoji:()=>fh,encode:()=>Kp,encodeAsync:()=>Yp,endsWith:()=>go,enum:()=>l,exactOptional:()=>Im,file:()=>tg,flattenError:()=>tn,float32:()=>Ph,float64:()=>Lh,formatError:()=>on,fromJSONSchema:()=>vg,function:()=>dg,getDiscriminatedOption:()=>Nc,getErrorMap:()=>ww,globalRegistry:()=>$e,gt:()=>ot,gte:()=>Be,guid:()=>ch,hash:()=>Eh,hex:()=>_h,hostname:()=>Dh,httpUrl:()=>uh,iban:()=>kh,includes:()=>fo,input:()=>Mg,instanceof:()=>fg,int:()=>x,int32:()=>Vh,int64:()=>Uh,intersection:()=>zm,invertCodec:()=>ag,ipv4:()=>yh,ipv6:()=>wh,iso:()=>Fn,json:()=>gg,jwt:()=>Ch,keyof:()=>Gh,ksuid:()=>Sh,lazy:()=>lt,length:()=>Ut,literal:()=>m,locales:()=>wn,looseObject:()=>$t,looseRecord:()=>Xh,lowercase:()=>lo,lt:()=>tt,lte:()=>qe,mac:()=>vh,map:()=>Yh,maxLength:()=>Ft,maxSize:()=>St,memoizer:()=>yn,meta:()=>ug,mime:()=>zo,minLength:()=>pt,minSize:()=>nt,multipleOf:()=>bt,nan:()=>rg,nanoid:()=>hh,nativeEnum:()=>eg,negative:()=>Ri,never:()=>ta,nonnegative:()=>Mi,nonoptional:()=>Cm,nonpositive:()=>Ii,normalize:()=>bo,null:()=>q,nullable:()=>Cn,nullish:()=>og,number:()=>s,object:()=>k,optional:()=>qt,output:()=>Og,overwrite:()=>Qe,parse:()=>Zp,parseAsync:()=>Gp,partialRecord:()=>Kh,pipe:()=>Ei,positive:()=>wi,prefault:()=>km,preprocess:()=>xg,prettifyError:()=>Ja,promise:()=>cg,properties:()=>xo,property:()=>Oi,readonly:()=>Vm,record:()=>b,refine:()=>qm,regex:()=>mo,regexes:()=>He,registry:()=>Yr,safeDecode:()=>tm,safeDecodeAsync:()=>nm,safeEncode:()=>em,safeEncodeAsync:()=>om,safeParse:()=>Hp,safeParseAsync:()=>Jp,set:()=>Qh,setErrorMap:()=>vw,size:()=>At,slugify:()=>wo,startsWith:()=>ho,strictObject:()=>c,string:()=>n,stringFormat:()=>Ce,stringbool:()=>hg,success:()=>ng,superRefine:()=>Bm,symbol:()=>qh,templateLiteral:()=>sg,toJSONSchema:()=>Ci,toLowerCase:()=>yo,toUpperCase:()=>vo,toZod:()=>Zo,transform:()=>oa,treeifyError:()=>Ha,trim:()=>So,tuple:()=>A,uint32:()=>Ah,uint64:()=>Nh,ulid:()=>zh,undefined:()=>Bh,union:()=>z,unknown:()=>$,uppercase:()=>uo,url:()=>le,util:()=>C,uuid:()=>dh,uuidv4:()=>ph,uuidv6:()=>mh,uuidv7:()=>lh,validate:()=>nn,validateAsync:()=>rn,void:()=>we,withParser:()=>Qr,xid:()=>bh,xor:()=>Hh});var mt={};at(mt,{$ZodAny:()=>jc,$ZodArray:()=>Ac,$ZodAsyncError:()=>Fe,$ZodBase64:()=>vc,$ZodBase64URL:()=>wc,$ZodBigInt:()=>Vr,$ZodBigIntFormat:()=>kc,$ZodBoolean:()=>hn,$ZodCIDRv4:()=>Sc,$ZodCIDRv6:()=>yc,$ZodCUID:()=>cc,$ZodCUID2:()=>dc,$ZodCatch:()=>rd,$ZodCheck:()=>de,$ZodCheckBigIntFormat:()=>Es,$ZodCheckEndsWith:()=>Gs,$ZodCheckGreaterThan:()=>vr,$ZodCheckIncludes:()=>Ws,$ZodCheckLengthEquals:()=>Us,$ZodCheckLessThan:()=>yr,$ZodCheckLowerCase:()=>qs,$ZodCheckMaxLength:()=>As,$ZodCheckMaxSize:()=>Ps,$ZodCheckMimeType:()=>Ks,$ZodCheckMinLength:()=>Fs,$ZodCheckMinSize:()=>Ls,$ZodCheckMultipleOf:()=>_s,$ZodCheckNumberFormat:()=>js,$ZodCheckOverwrite:()=>Xs,$ZodCheckProperties:()=>Js,$ZodCheckProperty:()=>Hs,$ZodCheckRegex:()=>Ns,$ZodCheckSizeEquals:()=>Vs,$ZodCheckStartsWith:()=>Zs,$ZodCheckStringFormat:()=>io,$ZodCheckUpperCase:()=>Bs,$ZodCodec:()=>xn,$ZodCreditCard:()=>Ic,$ZodCustom:()=>md,$ZodCustomStringFormat:()=>$c,$ZodCyclicError:()=>Wr,$ZodDate:()=>Vc,$ZodDefault:()=>ed,$ZodDiscriminatedUnion:()=>qc,$ZodE164:()=>Rc,$ZodEmail:()=>oc,$ZodEmoji:()=>ac,$ZodEncodeError:()=>zt,$ZodEnum:()=>Hc,$ZodError:()=>Ga,$ZodExactOptional:()=>Yc,$ZodFile:()=>Kc,$ZodFunction:()=>dd,$ZodGUID:()=>ec,$ZodIBAN:()=>Mc,$ZodIPv4:()=>xc,$ZodIPv6:()=>zc,$ZodISODate:()=>fc,$ZodISODateTime:()=>uc,$ZodISODuration:()=>gc,$ZodISOTime:()=>hc,$ZodIntersection:()=>Bc,$ZodJWT:()=>Oc,$ZodKSUID:()=>lc,$ZodLazy:()=>zn,$ZodLiteral:()=>Jc,$ZodMAC:()=>bc,$ZodMap:()=>Zc,$ZodNaN:()=>id,$ZodNanoID:()=>sc,$ZodNever:()=>Pc,$ZodNonOptional:()=>od,$ZodNull:()=>_c,$ZodNullable:()=>Qc,$ZodNumber:()=>Lr,$ZodNumberFormat:()=>Tc,$ZodObject:()=>gu,$ZodObjectJIT:()=>Fc,$ZodOptional:()=>Fr,$ZodPipe:()=>Ur,$ZodPrefault:()=>td,$ZodPreprocess:()=>ad,$ZodPromise:()=>pd,$ZodReadonly:()=>sd,$ZodRealError:()=>Ue,$ZodRecord:()=>Wc,$ZodRegistry:()=>Xr,$ZodSet:()=>Gc,$ZodString:()=>jt,$ZodStringFormat:()=>ie,$ZodSuccess:()=>nd,$ZodSymbol:()=>Cc,$ZodTemplateLiteral:()=>cd,$ZodTransform:()=>Xc,$ZodTuple:()=>Ar,$ZodType:()=>K,$ZodULID:()=>pc,$ZodURL:()=>ic,$ZodUUID:()=>tc,$ZodUndefined:()=>Dc,$ZodUnion:()=>gn,$ZodUnknown:()=>Ec,$ZodVoid:()=>Lc,$ZodXID:()=>mc,$ZodXor:()=>Uc,$brand:()=>Ba,$constructor:()=>I,$input:()=>hd,$output:()=>fd,Doc:()=>_t,INVALID:()=>je,JSONSchema:()=>rh,JSONSchemaGenerator:()=>Di,NEVER:()=>qa,TimePrecision:()=>Md,URL_BAD_FORMAT:()=>nc,URL_UNPARSEABLE:()=>pn,ZodCompileAsyncError:()=>Ye,ZodCompileUnsupportedError:()=>te,_any:()=>qd,_array:()=>Kd,_base64:()=>bi,_base64url:()=>Si,_bigint:()=>Pd,_boolean:()=>jd,_catch:()=>aw,_check:()=>Nf,_cidrv4:()=>xi,_cidrv6:()=>zi,_coercedBigint:()=>Ld,_coercedBoolean:()=>Ed,_coercedDate:()=>Hd,_coercedNumber:()=>$d,_coercedString:()=>vd,_creditCard:()=>Rd,_cuid:()=>pi,_cuid2:()=>mi,_custom:()=>Yd,_date:()=>Gd,_decode:()=>pr,_decodeAsync:()=>lr,_default:()=>nw,_discriminatedUnion:()=>Wv,_e164:()=>yi,_email:()=>oi,_emoji:()=>ci,_encode:()=>dr,_encodeAsync:()=>mr,_endsWith:()=>go,_enum:()=>Xv,_file:()=>Xd,_float32:()=>kd,_float64:()=>Cd,_gt:()=>ot,_gte:()=>Be,_guid:()=>ni,_iban:()=>Id,_includes:()=>fo,_int:()=>Td,_int32:()=>Dd,_int64:()=>Vd,_intersection:()=>Zv,_ipv4:()=>hi,_ipv6:()=>gi,_isoDate:()=>Mn,_isoDateTime:()=>In,_isoDuration:()=>$n,_isoTime:()=>On,_jwt:()=>vi,_ksuid:()=>fi,_lazy:()=>pw,_length:()=>Ut,_literal:()=>Qv,_lowercase:()=>lo,_lt:()=>tt,_lte:()=>qe,_mac:()=>wd,_map:()=>Jv,_max:()=>qe,_maxLength:()=>Ft,_maxSize:()=>St,_mime:()=>zo,_min:()=>Be,_minLength:()=>pt,_minSize:()=>nt,_multipleOf:()=>bt,_nan:()=>Jd,_nanoid:()=>di,_nativeEnum:()=>Yv,_negative:()=>Ri,_never:()=>Wd,_nonnegative:()=>Mi,_nonoptional:()=>rw,_nonpositive:()=>Ii,_normalize:()=>bo,_null:()=>Nd,_nullable:()=>ow,_number:()=>Od,_optional:()=>tw,_overwrite:()=>Qe,_parse:()=>to,_parseAsync:()=>oo,_pipe:()=>sw,_positive:()=>wi,_promise:()=>mw,_properties:()=>xo,_property:()=>Oi,_readonly:()=>cw,_record:()=>Hv,_refine:()=>Qd,_regex:()=>mo,_safeDecode:()=>fr,_safeDecodeAsync:()=>gr,_safeEncode:()=>ur,_safeEncodeAsync:()=>hr,_safeParse:()=>no,_safeParseAsync:()=>ro,_set:()=>Kv,_size:()=>At,_slugify:()=>wo,_startsWith:()=>ho,_string:()=>yd,_stringFormat:()=>Nt,_stringbool:()=>np,_success:()=>iw,_superRefine:()=>ep,_symbol:()=>Fd,_templateLiteral:()=>dw,_toLowerCase:()=>yo,_toUpperCase:()=>vo,_transform:()=>ew,_trim:()=>So,_tuple:()=>Gv,_uint32:()=>_d,_uint64:()=>Ad,_ulid:()=>li,_undefined:()=>Ud,_union:()=>qv,_unknown:()=>Bd,_uppercase:()=>uo,_url:()=>Rn,_uuid:()=>ri,_uuidv4:()=>ii,_uuidv6:()=>ai,_uuidv7:()=>si,_void:()=>Zd,_xid:()=>ui,_xor:()=>Bv,base64Charset:()=>Dr,base64urlCharset:()=>fn,canParseURL:()=>rc,clone:()=>re,compile:()=>bd,compileFn:()=>ei,config:()=>xe,createStandardJSONSchemaMethod:()=>Ro,createToJSONSchemaMethod:()=>ip,decode:()=>Gb,decodeAsync:()=>Jb,describe:()=>tp,encode:()=>Zb,encodeAsync:()=>Hb,extractDefs:()=>vt,finalize:()=>wt,flattenError:()=>tn,formatError:()=>on,getDiscriminatedOption:()=>Nc,globalConfig:()=>Ie,globalRegistry:()=>$e,handleUnrepresentable:()=>ye,initializeContext:()=>yt,isBackEdge:()=>Gr,isRecursiveSchema:()=>Zr,isValidBase64:()=>un,isValidBase64URL:()=>_r,isValidCIDRv6:()=>Cr,isValidCreditCard:()=>jr,isValidIBAN:()=>Er,isValidIPv6:()=>ln,isValidJWT:()=>Pr,locales:()=>wn,memoizer:()=>yn,mergeValues:()=>ao,meta:()=>op,parse:()=>sr,parseAsync:()=>cr,parseURLObject:()=>uu,prettifyError:()=>Ja,process:()=>ae,processSchema:()=>ae,regexes:()=>He,registry:()=>Yr,safeDecode:()=>Xb,safeDecodeAsync:()=>Qb,safeEncode:()=>Kb,safeEncodeAsync:()=>Yb,safeParse:()=>Ub,safeParseAsync:()=>Nb,standardProps:()=>Or,stripTabAndNewline:()=>mn,toDotPath:()=>Zl,toJSONSchema:()=>Ci,toZod:()=>Zo,treeifyError:()=>Ha,urlHostnameOk:()=>Tr,urlProtocolOk:()=>kr,util:()=>C,validate:()=>nn,validateAsync:()=>rn,validateURL:()=>$r,version:()=>Ys,withParser:()=>Qr});var C={};at(C,{BIGINT_FORMAT_RANGES:()=>Xo,CONSTANT_CATCH:()=>ir,Class:()=>_a,NUMBER_FORMAT_RANGES:()=>Ko,aborted:()=>_e,allowsEval:()=>Pa,assert:()=>sb,assertEqual:()=>nb,assertIs:()=>ib,assertNever:()=>ab,assertNotEqual:()=>rb,assignProp:()=>Oe,attachSchema:()=>rr,base64ToUint8Array:()=>Fl,base64urlToUint8Array:()=>Mb,cached:()=>Yt,captureStackTrace:()=>or,cleanEnum:()=>Ib,cleanRegex:()=>ct,clone:()=>re,cloneDef:()=>pb,codePointLength:()=>Ct,constantCatch:()=>Ua,createTransparentProxy:()=>gb,defineLazy:()=>ja,defineLazyInternal:()=>Q,derived:()=>kb,esc:()=>De,escapeRegex:()=>Ge,explicitlyAborted:()=>Aa,extend:()=>bb,finalizeIssue:()=>Ae,floatSafeRemainder:()=>Go,getElementAtPath:()=>mb,getEnumValues:()=>Kt,getLengthableOrigin:()=>Qo,getParsedType:()=>hb,getSizableOrigin:()=>Yo,hexToUint8Array:()=>$b,hide:()=>en,installLazyProp:()=>jb,isObject:()=>kt,isPlainObject:()=>Ze,issue:()=>eo,joinValues:()=>M,jsonStringifyReplacer:()=>Xt,members:()=>Fa,merge:()=>yb,mergeDefs:()=>Xe,normalizeParams:()=>L,nullish:()=>tr,numKeys:()=>fb,objectClone:()=>cb,omit:()=>zb,optionalKeys:()=>Va,own:()=>xt,parsedType:()=>_,partial:()=>vb,pick:()=>xb,prefixIssues:()=>Ve,primitiveTypes:()=>La,promiseAllObject:()=>lb,propertyKeyTypes:()=>Jo,randomString:()=>ub,rawShape:()=>Qt,required:()=>wb,safeExtend:()=>Sb,shallowClone:()=>Ho,slugify:()=>Ea,stringifyPrimitive:()=>D,toZod:()=>Zo,uint8ArrayToBase64:()=>Ul,uint8ArrayToBase64url:()=>Ob,uint8ArrayToHex:()=>Tb,unwrapMessage:()=>Jt});function nb(e){return e}function rb(e){return e}function Zo(){return e=>e}function ib(e){}function ab(e){throw new Error("Unexpected value in exhaustive check")}function sb(e){}function Kt(e){let t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,o])=>t.indexOf(+a)===-1).map(([a,o])=>o)}function M(e,t="|"){return e.map(i=>D(i)).join(t)}function Xt(e,t){return typeof t=="bigint"?t.toString():t}var Da=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function Yt(e){return new Da(e)}function tr(e){return e==null}function ct(e){let t=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(t,i)}function Go(e,t){let i=e/t,a=Math.round(i),o=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-a)<o?0:i-a}var Pl=Symbol("evaluating");function ja(e,t,i){let a;Object.defineProperty(e,t,{get(){if(a!==Pl)return a===void 0&&(a=Pl,a=i()),a},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function cb(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Oe(e,t,i){Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}function Qt(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function st(e){return Qt(e._zod.def)??e._zod.def.shape}function Ll(e,t,i){Object.defineProperty(e,t,{get(){let a=i();return Oe(this,t,a),a},enumerable:!0,configurable:!0})}function Vl(e,t,i){t in e?Oe(e,t,i):e[t]=i}function Tt(e,t,i,a){let o=st(t);for(let r of i){let d=Object.getOwnPropertyDescriptor(o,r);d.enumerable&&(d.get?Ll(e,r,()=>{let p=t._zod.def.shape[r];return a?a(p,r):p}):Vl(e,r,a?a(d.value,r):d.value))}}function db(e,t){for(let i of Reflect.ownKeys(t)){let a=Object.getOwnPropertyDescriptor(t,i);a.enumerable&&(a.get?Ll(e,i,()=>t[i]):Vl(e,i,a.value))}}function Xe(...e){let t={};for(let i of e){let a=Object.getOwnPropertyDescriptors(i);Object.assign(t,a)}return Object.defineProperties({},t)}function pb(e){return Xe(e._zod.def)}function mb(e,t){return t?t.reduce((i,a)=>i?.[a],e):e}function lb(e){let t=Object.keys(e),i=t.map(a=>e[a]);return Promise.all(i).then(a=>{let o={};for(let r=0;r<t.length;r++)o[t[r]]=a[r];return o})}function ub(e=10){let t="abcdefghijklmnopqrstuvwxyz",i="";for(let a=0;a<e;a++)i+=t[Math.floor(Math.random()*t.length)];return i}function De(e){return JSON.stringify(e)}function Ea(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var or="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function kt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Pa=Yt(()=>{if(Ie.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ze(e){if(kt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let i=t.prototype;return!(kt(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Ho(e){return Ze(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function fb(e){let t=0;for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&t++;return t}var hb=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Jo=new Set(["string","number","symbol"]),La=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ge(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function re(e,t,i){let a=new e._zod.constr(t??e._zod.def);return(!t||i?.parent)&&(a._zod.parent=e),a}function L(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function gb(e){let t;return new Proxy({},{get(i,a,o){return t??(t=e()),Reflect.get(t,a,o)},set(i,a,o,r){return t??(t=e()),Reflect.set(t,a,o,r)},has(i,a){return t??(t=e()),Reflect.has(t,a)},deleteProperty(i,a){return t??(t=e()),Reflect.deleteProperty(t,a)},ownKeys(i){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(i,a){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,a)},defineProperty(i,a,o){return t??(t=e()),Reflect.defineProperty(t,a,o)}})}function D(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Va(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Ko={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Xo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function xb(e,t){let i=e._zod.def,a=i.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let r={};return Tt(r,e,nr(e,t)),re(e,Xe(i,{shape:r,checks:[]}))}function nr(e,t){let i=st(e),a=[];for(let o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(i,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&a.push(o)}return a}function zb(e,t){let i=e._zod.def,a=i.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let r=new Set(nr(e,t)),d={};return Tt(d,e,Reflect.ownKeys(st(e)).filter(p=>!r.has(p))),re(e,Xe(i,{shape:d,checks:[]}))}function bb(e,t){if(!Ze(t))throw new Error("Invalid input to extend: expected a plain object");let i=e._zod.def.checks;if(i&&i.length>0){let o=st(e);for(let r of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return re(e,Xe(e._zod.def,{shape:Al(e,t)}))}function Al(e,t){let i={};return Tt(i,e,Reflect.ownKeys(st(e))),db(i,t),i}function Sb(e,t){if(!Ze(t))throw new Error("Invalid input to safeExtend: expected a plain object");return re(e,Xe(e._zod.def,{shape:Al(e,t)}))}function yb(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i={};Tt(i,e,Reflect.ownKeys(st(e))),Tt(i,t,Reflect.ownKeys(st(t)));let a=Xe(e._zod.def,{shape:i,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return re(e,a)}function vb(e,t,i,a="partial"){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(`.${a}() cannot be used on object schemas containing refinements`);let p=i?new Set(nr(t,i)):void 0,f={};return Tt(f,t,Reflect.ownKeys(st(t)),e&&((u,g)=>p&&!p.has(g)?u:new e({type:"optional",innerType:u}))),re(t,Xe(t._zod.def,{shape:f,checks:[]}))}function wb(e,t,i){let a=i?new Set(nr(t,i)):void 0,o={};return Tt(o,t,Reflect.ownKeys(st(t)),(r,d)=>a&&!a.has(d)?r:new e({type:"nonoptional",innerType:r})),re(t,Xe(t._zod.def,{shape:o}))}function _e(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function Aa(e,t=0){if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(e.issues[i]?.continue===!1)return!0;return!1}function Ve(e,t){return t.map(i=>{var a;return(a=i).path??(a.path=[]),i.path.unshift(e),i})}function Jt(e){return typeof e=="string"?e:e?.message}function rr(e,t,i){var a;for(let o=t;o<e.length;o++)(a=e[o]).schema??(a.schema=i)}function Ae(e,t,i){var a;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(a=e).schema??(a.schema=e.inst):e.schema=e.inst);let r=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,d=e.message?e.message:Jt(e.inst?._zod.def?.error?.(e))??Jt(r?.(e))??Jt(t?.error?.(e))??Jt(i.customError?.(e))??Jt(i.localeError?.(e))??"Invalid input",p={};for(let f of Object.keys(e))f==="inst"||f==="schema"||f==="continue"||f==="input"||f==="__proto__"||(p[f]=e[f]);return p.path??(p.path=[]),p.message=d,t?.reportInput&&(p.input=e.input),p}function Yo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var Rb=/[\uD800-\uDBFF]/;function Ct(e){let t=e.length;if(!Rb.test(e))return t;let i=t;for(let a=0;a<t-1;a++)(e.charCodeAt(a)&64512)===55296&&(e.charCodeAt(a+1)&64512)===56320&&(i--,a++);return i}function Qo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function _(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let i=e;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return t}function eo(...e){let[t,i,a]=e;return typeof t=="string"?{message:t,code:"custom",input:i,inst:a}:{...t}}function Ib(e){return Object.entries(e).filter(([t,i])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Fl(e){let t=atob(e),i=new Uint8Array(t.length);for(let a=0;a<t.length;a++)i[a]=t.charCodeAt(a);return i}function Ul(e){let t="";for(let i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return btoa(t)}function Mb(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-t.length%4)%4);return Fl(t+i)}function Ob(e){return Ul(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $b(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(t.length/2);for(let a=0;a<t.length;a+=2)i[a/2]=Number.parseInt(t.slice(a,a+2),16);return i}function Tb(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var _a=class{constructor(...t){}};function Fa(e,t){for(let i in t){let a=Object.getOwnPropertyDescriptor(t,i);a.get?Object.defineProperty(e,i,{...a,enumerable:!1}):Cb(e,i,a.value)}}function xt(e,t,i,a=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:a,value:i}),i}function en(e,t,i){return xt(e,t,i,!1)}function kb(e,t){for(let i in e){let a=e[i];Object.defineProperty(t,i,{configurable:!0,enumerable:!0,get(){return xt(this,i,a(this))},set(o){xt(this,i,o)}})}return t}function Cb(e,t,i){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?i:xt(this,t,i.bind(this))},set(a){xt(this,t,a)}})}function Db(e,t){let i=Object.getPrototypeOf(e);return t in i?void 0:i}var Ca,gt=!1,_b={configurable:!0,get(){gt=!0}};function Q(e,t,i){let a=Object.getPrototypeOf(e._zod);if(t in a&&Ca!==e._zod){Ca=void 0;return}Ca=e._zod,Object.defineProperty(a,t,{configurable:!0,get(){Object.defineProperty(this,t,_b);let o=gt;gt=!1;try{let r=i(this);return gt?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),gt=gt||o,r}catch(r){throw delete this[t],gt=gt||o,r}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function jb(e,t,i,a){let o=Db(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){let r={configurable:!0,writable:!0,enumerable:a,value:void 0};return Object.defineProperty(this,t,r),r.value=i(this),Object.defineProperty(this,t,r),r.value},set(r){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:a,value:r})}})}var ir="~constantCatch";function Ua(e){let t=()=>e;return t[ir]=!0,t}var Nl,qa=Object.freeze({status:"aborted"}),Na={value:void 0,enumerable:!1},ql="captureStackTrace"in Error?Error:null;function Eb(e){let t=ql;if(t){let i=t.stackTraceLimit;if(typeof i=="number"){try{t.stackTraceLimit=0}catch{return ql=null,new e}try{return new e}finally{t.stackTraceLimit=i}}}return new e}function I(e,t,i,a){let o={};function r(y){this.def=y,this.constr=S,this.traits=new Set}r.prototype=o;let d=i,p=d&&new WeakSet;function f(y,w){if(y._zod){if(y._zod.traits.has(e))return}else{Na.value=new r(w);try{Object.defineProperty(y,"_zod",Na)}finally{Na.value=void 0}}if(y._zod.traits.add(e),t(y,w),p){let T=Object.getPrototypeOf(y),j=y._zod.constr.prototype,Z=T;for(;Z&&Z!==j;)Z=Object.getPrototypeOf(Z);let U=Z??T;p.has(U)||(p.add(U),Fa(U,d))}let O=S.prototype;for(let T in O)Object.prototype.hasOwnProperty.call(O,T)&&(T in y||(y[T]=O[T].bind(y)))}let u=a?.Parent??Object;class g extends u{}Object.defineProperty(g,"name",{value:e});function S(y){let w=a?.Parent?Eb(g):this;f(w,y);let O=w._zod.deferred;if(O){for(let j of O)j();w._zod.deferred=void 0}let T=globalThis.__zod_globalConfig?.postProcessor;return T&&T(w),w}return Object.defineProperty(S,"init",{value:f}),Object.defineProperty(S,Symbol.hasInstance,{value:y=>a?.Parent&&y instanceof a.Parent?!0:y?._zod?.traits?.has(e)}),Object.defineProperty(S,"name",{value:e}),S}var Ba=Symbol("zod_brand"),Fe=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},zt=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Nl=globalThis).__zod_globalConfig??(Nl.__zod_globalConfig={});var Ie=globalThis.__zod_globalConfig;function xe(e){return e&&Object.assign(Ie,e),Ie}function Pb(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Xt,2)),e.message}function Lb(e){this._zod.message=e}var Vb={get:Pb,set:Lb,enumerable:!0,configurable:!0},Za={value:void 0,enumerable:!1},Bl=new WeakSet([Object.prototype,Error.prototype]),Wl=(e,t)=>{e.name="$ZodError",Za.value=t,Object.defineProperty(e,"issues",Za),Za.value=void 0,Object.defineProperty(e,"message",Vb);let i=Object.getPrototypeOf(e);Bl.has(i)||(Bl.add(i),Object.defineProperty(i,"toString",{configurable:!0,enumerable:!1,get(){let a=()=>this.message;return Object.defineProperty(this,"toString",{value:a,configurable:!0,writable:!0}),a},set(a){Object.defineProperty(this,"toString",{value:a,configurable:!0,writable:!0})}}))},Ga=I("$ZodError",Wl),Ue=I("$ZodError",Wl,void 0,{Parent:Error});function Ab(e,t,i){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:i(),writable:!0,enumerable:!0,configurable:!0}):e[t]=i()),e[t]}function tn(e,t=i=>i.message){let i={},a=[];for(let o of e.issues)o.path.length>0?Ab(i,o.path[0],()=>[]).push(t(o)):a.push(t(o));return{formErrors:a,fieldErrors:i}}function on(e,t=i=>i.message){let i={_errors:[]},a=(o,r=[])=>{for(let d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(p=>a({issues:p},[...r,...d.path]));else if(d.code==="invalid_key")a({issues:d.issues},[...r,...d.path]);else if(d.code==="invalid_element")a({issues:d.issues},[...r,...d.path]);else{let p=[...r,...d.path];if(p.length===0)i._errors.push(t(d));else{let f=i,u=0;for(;u<p.length;){let g=p[u],S=u===p.length-1;if(g==="_errors"){S&&f._errors.push(t(d)),u++;continue}Object.prototype.hasOwnProperty.call(f,g)||Object.defineProperty(f,g,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let y=f[g];S&&y._errors.push(t(d)),f=y,u++}}}};return a(e),i}function Ha(e,t=i=>i.message){let i={errors:[]},a=(o,r=[])=>{var d;for(let p of o.issues)if(p.code==="invalid_union"&&p.errors.length)p.errors.map(f=>a({issues:f},[...r,...p.path]));else if(p.code==="invalid_key")a({issues:p.issues},[...r,...p.path]);else if(p.code==="invalid_element")a({issues:p.issues},[...r,...p.path]);else{let f=[...r,...p.path];if(f.length===0){i.errors.push(t(p));continue}let u=i,g=0;for(;g<f.length;){let S=f[g],y=g===f.length-1;typeof S=="string"?(u.properties??(u.properties={}),Object.prototype.hasOwnProperty.call(u.properties,S)||Object.defineProperty(u.properties,S,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),u=u.properties[S]):(u.items??(u.items=[]),(d=u.items)[S]??(d[S]={errors:[]}),u=u.items[S]),y&&u.errors.push(t(p)),g++}}};return a(e),i}function Zl(e){let t=[],i=e.map(a=>typeof a=="object"?a.key:a);for(let a of i)typeof a=="number"?t.push(`[${a}]`):typeof a=="symbol"?t.push(`[${JSON.stringify(String(a))}]`):/[^\w$]/.test(a)?t.push(`[${JSON.stringify(a)}]`):(t.length&&t.push("."),t.push(a));return t.join("")}function Ja(e){let t=[],i=[...e.issues].sort((a,o)=>(a.path??[]).length-(o.path??[]).length);for(let a of i)t.push(`\u2716 ${a.message}`),a.path?.length&&t.push(` \u2192 at ${Zl(a.path)}`);return t.join(`
18
+ `)}function ar(e,t){return{callee:t?.callee??e,Err:t?.Err}}var to=e=>{let t=(i,a,o,r)=>{let d=o?{...o,async:!1}:{async:!1},p=i._zod.run({value:a,issues:[]},d);if(p instanceof Promise)throw new Fe;if(p.issues.length){let f=new(r?.Err??e)(p.issues.map(u=>Ae(u,d,xe())));throw or(f,r?.callee??t),f}return p.value};return t},sr=to(Ue),oo=e=>{let t=async(i,a,o,r)=>{let d=o?{...o,async:!0}:{async:!0},p=i._zod.run({value:a,issues:[]},d);if(p instanceof Promise&&(p=await p),p.issues.length){let f=new(r?.Err??e)(p.issues.map(u=>Ae(u,d,xe())));throw or(f,r?.callee??t),f}return p.value};return t},cr=oo(Ue),no=e=>(t,i,a)=>{let o=a?{...a,async:!1}:{async:!1},r=t._zod.run({value:i,issues:[]},o);if(r instanceof Promise)throw new Fe;return r.issues.length?Gl(e,r.issues,o):{success:!0,data:r.value}},Ub=no(Ue);function Gl(e,t,i){let a;return{success:!1,get error(){return a||(a=new e(t.map(o=>Ae(o,i,xe()))),t=void 0,i=void 0),a},set error(o){a=o,t=void 0,i=void 0}}}var ro=e=>async(t,i,a)=>{let o=a?{...a,async:!0}:{async:!0},r=t._zod.run({value:i,issues:[]},o);return r instanceof Promise&&(r=await r),r.issues.length?Gl(e,r.issues,o):{success:!0,data:r.value}},Nb=ro(Ue),qb=Symbol.for("zod.compile.invalid"),Bb=Symbol.for("zod.compile.fallback"),nn=((e,t,i)=>{let a=e._zod.bag.validator;if(a!==void 0){if(a(t)!==qb)return!0;if(a.definite===!0&&i===void 0)return!1}return Wb(e,t,i)});function Wb(e,t,i){let a=i?{...i,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun,r;if(o?(a[Bb]=!0,r=o({value:t,issues:[]},a)):r=e._zod.run({value:t,issues:[]},a),r instanceof Promise)throw new Fe;return r.issues.length===0}var rn=async(e,t,i)=>{let a=i?{...i,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},a);return o instanceof Promise&&(o=await o),o.issues.length===0},dr=e=>{let t=to(e),i=(a,o,r,d)=>{let p=r?{...r,direction:"backward"}:{direction:"backward"};return t(a,o,p,ar(i,d))};return i},Zb=dr(Ue),pr=e=>{let t=to(e),i=(a,o,r,d)=>t(a,o,r,ar(i,d));return i},Gb=pr(Ue),mr=e=>{let t=oo(e),i=async(a,o,r,d)=>{let p=r?{...r,direction:"backward"}:{direction:"backward"};return await t(a,o,p,ar(i,d))};return i},Hb=mr(Ue),lr=e=>{let t=oo(e),i=async(a,o,r,d)=>await t(a,o,r,ar(i,d));return i},Jb=lr(Ue),ur=e=>(t,i,a)=>{let o=a?{...a,direction:"backward"}:{direction:"backward"};return no(e)(t,i,o)},Kb=ur(Ue),fr=e=>(t,i,a)=>no(e)(t,i,a),Xb=fr(Ue),hr=e=>async(t,i,a)=>{let o=a?{...a,direction:"backward"}:{direction:"backward"};return ro(e)(t,i,o)},Yb=hr(Ue),gr=e=>async(t,i,a)=>ro(e)(t,i,a),Qb=gr(Ue);var He={};at(He,{anyString:()=>vs,base64:()=>us,base64url:()=>fs,bigint:()=>Rs,boolean:()=>Is,browserEmail:()=>sS,cidrv4:()=>ms,cidrv6:()=>ls,creditCard:()=>xr,cuid:()=>Xa,cuid2:()=>Ya,currencyCode:()=>zs,date:()=>bs,datetime:()=>ys,domain:()=>gs,duration:()=>rs,e164:()=>xs,email:()=>as,emoji:()=>ss,extendedDuration:()=>eS,guid:()=>is,hex:()=>ks,hostname:()=>hs,html5Email:()=>rS,httpProtocol:()=>an,iban:()=>zr,idnEmail:()=>aS,integer:()=>sn,ipv4:()=>cs,ipv6:()=>ds,ksuid:()=>ts,lowercase:()=>$s,mac:()=>ps,md5_base64:()=>mS,md5_base64url:()=>lS,md5_hex:()=>pS,nanoid:()=>os,nanoidOfLength:()=>ns,null:()=>Ms,number:()=>dt,rfc5322Email:()=>iS,sha1_base64:()=>fS,sha1_base64url:()=>hS,sha1_hex:()=>uS,sha256_base64:()=>xS,sha256_base64url:()=>zS,sha256_hex:()=>gS,sha384_base64:()=>SS,sha384_base64url:()=>yS,sha384_hex:()=>bS,sha512_base64:()=>wS,sha512_base64url:()=>RS,sha512_hex:()=>vS,string:()=>ws,time:()=>Ss,ulid:()=>Qa,undefined:()=>Os,unicodeEmail:()=>Hl,uppercase:()=>Ts,uuid:()=>Dt,uuid4:()=>tS,uuid6:()=>oS,uuid7:()=>nS,xid:()=>es});var Xa=/^[cC][0-9a-z]{6,}$/,Ya=/^[0-9a-z]+$/,Qa=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,es=/^[0-9a-vA-V]{20}$/,ts=/^[A-Za-z0-9]{27}$/,os=/^[a-zA-Z0-9_-]{21}$/;function ns(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var rs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,eS=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,is=/^([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})$/,Dt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,tS=Dt(4),oS=Dt(6),nS=Dt(7),as=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rS=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,iS=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Hl=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,aS=Hl,sS=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cS="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function ss(){return new RegExp(cS,"u")}var cs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ds=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ps=e=>{let t=Ge(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ms=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ls=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,us=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fs=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,hs=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,gs=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,an=/^https?$/,xs=/^\+[1-9]\d{6,14}$/,xr=/^\d(?:[ -]?\d){11,18}$/,zs=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,zr=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,Jl="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function dS(e){return new RegExp(`^${e}$`)}var bs=dS(Jl);function Ka(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ss(e){return new RegExp(`^${Ka(e)}$`)}function ys(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${Ka({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,a=e.local?`${i}|${Ka({precision:e.precision})}`:i;return new RegExp(`^${Jl}T(?:${a})$`)}var vs=/^[\s\S]{0,}$/,ws=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Rs=/^-?\d+n?$/,sn=/^-?\d+$/,dt=/^-?\d+(?:\.\d+)?$/,Is=/^(?:true|false)$/i,Ms=/^null$/i;var Os=/^undefined$/i;var $s=/^[^A-Z]*$/,Ts=/^[^a-z]*$/,ks=/^[0-9a-fA-F]*$/;function cn(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function dn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var pS=/^[0-9a-fA-F]{32}$/,mS=cn(22,"=="),lS=dn(22),uS=/^[0-9a-fA-F]{40}$/,fS=cn(27,"="),hS=dn(27),gS=/^[0-9a-fA-F]{64}$/,xS=cn(43,"="),zS=dn(43),bS=/^[0-9a-fA-F]{96}$/,SS=cn(64,""),yS=dn(64),vS=/^[0-9a-fA-F]{128}$/,wS=cn(86,"=="),RS=dn(86);var de=I("$ZodCheck",(e,t)=>{var i;e._zod??(e._zod={}),e._zod.def=t,(i=e._zod).onattach??(i.onattach=[])}),Cs=e=>{let t=e.value;return!tr(t)&&t.size!==void 0},Ds=e=>{let t=e.value;return!tr(t)&&t.length!==void 0},br={number:"number",bigint:"bigint",object:"date"},yr=I("$ZodCheckLessThan",(e,t)=>{de.init(e,t);let i=br[typeof t.value];e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:br[typeof a.value]??i,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vr=I("$ZodCheckGreaterThan",(e,t)=>{de.init(e,t);let i=br[typeof t.value];e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:br[typeof a.value]??i,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_s=I("$ZodCheckMultipleOf",(e,t)=>{de.init(e,t),e._zod.check=i=>{if(typeof i.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?t.value!==BigInt(0)&&i.value%t.value===BigInt(0):Go(i.value,t.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:t.value,input:i.value,inst:e,continue:!t.abort})}}),js=I("$ZodCheckNumberFormat",(e,t)=>{de.init(e,t),t.format=t.format||"float64";let i=t.format?.includes("int"),a=i?"int":"number",[o,r]=Ko[t.format];e._zod.check=d=>{let p=d.value;if(i){if(!Number.isInteger(p)){d.issues.push({expected:a,format:t.format,code:"invalid_type",continue:!1,input:p,inst:e});return}if(!Number.isSafeInteger(p)){p>0?d.issues.push({input:p,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort}):d.issues.push({input:p,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort});return}}p<o&&d.issues.push({origin:"number",input:p,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),p>r&&d.issues.push({origin:"number",input:p,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Es=I("$ZodCheckBigIntFormat",(e,t)=>{de.init(e,t);let[i,a]=Xo[t.format];e._zod.check=o=>{let r=o.value;r<i&&o.issues.push({origin:"bigint",input:r,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),r>a&&o.issues.push({origin:"bigint",input:r,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Ps=I("$ZodCheckMaxSize",(e,t)=>{var i;de.init(e,t),(i=e._zod.def).when??(i.when=Cs),e._zod.check=a=>{let o=a.value;o.size<=t.maximum||a.issues.push({origin:Yo(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ls=I("$ZodCheckMinSize",(e,t)=>{var i;de.init(e,t),(i=e._zod.def).when??(i.when=Cs),e._zod.check=a=>{let o=a.value;o.size>=t.minimum||a.issues.push({origin:Yo(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vs=I("$ZodCheckSizeEquals",(e,t)=>{var i;de.init(e,t),(i=e._zod.def).when??(i.when=Cs),e._zod.check=a=>{let o=a.value,r=o.size;if(r===t.size)return;let d=r>t.size;a.issues.push({origin:Yo(o),...d?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),As=I("$ZodCheckMaxLength",(e,t)=>{var i;de.init(e,t),(i=e._zod.def).when??(i.when=Ds),e._zod.check=a=>{let o=a.value,r=o.length;if((typeof o=="string"&&r>t.maximum?Ct(o):r)<=t.maximum)return;let p=Qo(o);a.issues.push({origin:p,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Fs=I("$ZodCheckMinLength",(e,t)=>{var i;de.init(e,t),(i=e._zod.def).when??(i.when=Ds),e._zod.check=a=>{let o=a.value,r=o.length;if((typeof o=="string"&&r>=t.minimum&&r<t.minimum*2?Ct(o):r)>=t.minimum)return;let p=Qo(o);a.issues.push({origin:p,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Us=I("$ZodCheckLengthEquals",(e,t)=>{var i;de.init(e,t),(i=e._zod.def).when??(i.when=Ds),e._zod.check=a=>{let o=a.value,r=o.length,d=typeof o=="string"&&r>=t.length&&r<=t.length*2?Ct(o):r;if(d===t.length)return;let p=Qo(o),f=d>t.length;a.issues.push({origin:p,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),io=I("$ZodCheckStringFormat",(e,t)=>{var i,a;de.init(e,t),t.pattern?(i=e._zod).check??(i.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),Ns=I("$ZodCheckRegex",(e,t)=>{io.init(e,t),e._zod.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),qs=I("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=$s),io.init(e,t)}),Bs=I("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ts),io.init(e,t)}),Ws=I("$ZodCheckIncludes",(e,t)=>{de.init(e,t);let i=Ge(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position},}${i}`:i);t.pattern=a,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Zs=I("$ZodCheckStartsWith",(e,t)=>{de.init(e,t);let i=new RegExp(`^${Ge(t.prefix)}.*`);t.pattern??(t.pattern=i),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),Gs=I("$ZodCheckEndsWith",(e,t)=>{de.init(e,t);let i=new RegExp(`.*${Ge(t.suffix)}$`);t.pattern??(t.pattern=i),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}});function Sr(e,t,i){e.issues.length&&t.issues.push(...Ve(i,e.issues))}var Hs=I("$ZodCheckProperty",(e,t)=>{de.init(e,t),e._zod.check=i=>{let a=t.schema._zod.run({value:i.value[t.property],issues:[]},{});if(a instanceof Promise)return a.then(o=>Sr(o,i,t.property));Sr(a,i,t.property)}}),Js=I("$ZodCheckProperties",(e,t)=>{de.init(e,t),en(e,Symbol.iterator,function*(){yield e});let i;e._zod.check=a=>{if(a.value==null){a.issues.push({expected:"object",code:"invalid_type",input:a.value,inst:e});return}i??(i=Reflect.ownKeys(t.shape).map(d=>[d,t.shape[d]]));let o=a.value,r;for(let[d,p]of i){let f=p._zod.run({value:o[d],issues:[]},{});f instanceof Promise?(r??(r=[]),r.push(f.then(u=>Sr(u,a,d)))):Sr(f,a,d)}if(r)return Promise.all(r).then(()=>{})}}),Ks=I("$ZodCheckMimeType",(e,t)=>{de.init(e,t);let i=new Set(t.mime);e._zod.check=a=>{i.has(a.value.type)||a.issues.push({code:"invalid_value",values:t.mime,input:a.value.type,inst:e,continue:!t.abort})}}),Xs=I("$ZodCheckOverwrite",(e,t)=>{de.init(e,t),e._zod.check=i=>{i.value=t.tx(i.value)}});var _t=class{constructor(t=[],i={}){this.content=[],this.indent=0,this.args=t,this.closed=i}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let a=t.split(`
19
+ `).filter(d=>d),o=Math.min(...a.map(d=>d.length-d.trimStart().length)),r=a.map(d=>d.slice(o)).map(d=>" ".repeat(this.indent*2)+d);for(let d of r)this.content.push(d)}compile(){let t=Function,i=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
20
+ ${i.join(`
21
+ `)}
22
+ };`)(...Object.values(this.closed))}};var Ys={major:4,minor:6,patch:5};var K=I("$ZodType",(e,t)=>{var i;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ys;let a=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...a??[]]:a?.length?[...a]:[];for(let r of o)for(let d of r._zod.onattach)d(e);if(o.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(p,f,u)=>{if(p.memo)return p;let g=_e(p),S;for(let y of f){if(y._zod.def.when){if(Aa(p)||!y._zod.def.when(p))continue}else if(g)continue;let w=p.issues.length,O=y._zod.check(p);if(O instanceof Promise&&u?.async===!1)throw new Fe;if(S||O instanceof Promise)S=(S??Promise.resolve()).then(async()=>{await O,p.issues.length!==w&&(rr(p.issues,w,e),g||(g=_e(p,w)))});else{if(p.issues.length===w)continue;rr(p.issues,w,e),g||(g=_e(p,w))}}return S?S.then(()=>p):p},d=(p,f,u)=>{if(_e(p))return p.aborted=!0,p;let g=r(f,o,u);if(g instanceof Promise){if(u.async===!1)throw new Fe;return g.then(S=>e._zod.parse(S,u))}return e._zod.parse(g,u)};e._zod.run=(p,f)=>{if(f.skipChecks)return e._zod.parse(p,f);if(f.direction==="backward"){let g=e._zod.parse({value:p.value,issues:[]},{...f,skipChecks:!0});return g instanceof Promise?g.then(S=>d(S,p,f)):d(g,p,f)}let u=e._zod.parse(p,f);if(u instanceof Promise){if(f.async===!1)throw new Fe;return u.then(g=>r(g,o,f))}return r(u,o,f)}}},{get"~standard"(){return en(this,"~standard",Or(this))},set"~standard"(e){xt(this,"~standard",e)}}),lu=(e,t)=>e.issues.length?{issues:e.issues.map(i=>Ae(i,t,xe()))}:{value:e.value};async function IS(e,t){let i={async:!0};return lu(await e._zod.run({value:t,issues:[]},i),i)}function Or(e){return{validate:t=>{let i={async:!1};try{let a=e._zod.run({value:t,issues:[]},i);if(!(a instanceof Promise))return lu(a,i)}catch{}return IS(e,t)},vendor:"zod",version:1}}var jt=I("$ZodString",(e,t)=>{K.init(e,t),e._zod.pattern=t.pattern??vs,e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),ie=I("$ZodStringFormat",(e,t)=>{io.init(e,t),jt.init(e,t)}),ec=I("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=is),ie.init(e,t)}),tc=I("$ZodUUID",(e,t)=>{if(t.version){let a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Dt(a))}else t.pattern??(t.pattern=Dt());ie.init(e,t)}),oc=I("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=as),ie.init(e,t)}),nc=1,pn=2;function rc(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function $r(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?rc(e)||pn:uu(e,t)}function uu(e,t){if(!t.normalize&&t.protocol?.source===an.source&&!/^https?:\/\//i.test(e))return nc;try{if(typeof URL<"u"){let i=URL;if(typeof i.parse=="function")return i.parse(e)??pn}return new URL(e)}catch{return pn}}var MS=/[\t\n\r]/g;function mn(e){return e.replace(MS,"")}function Tr(e,t){return t.lastIndex=0,t.test(e.hostname)}function kr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var ic=I("$ZodURL",(e,t)=>{ie.init(e,t),e._zod.check=i=>{try{let a=i.value.trim(),o=$r(a,t);if(o===nc){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!t.abort});return}if(o===pn){i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort});return}if(o===!0){i.value=mn(a);return}t.hostname&&!Tr(o,t.hostname)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:i.value,inst:e,continue:!t.abort}),t.protocol&&!kr(o,t.protocol)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:i.value,inst:e,continue:!t.abort}),i.value=t.normalize?o.href:mn(a);return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!t.abort})}}}),ac=I("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ss()),ie.init(e,t)}),sc=I("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?os:ns(t.length)),ie.init(e,t)}),cc=I("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Xa),ie.init(e,t)}),dc=I("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ya),ie.init(e,t)}),pc=I("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Qa),ie.init(e,t)}),mc=I("$ZodXID",(e,t)=>{t.pattern??(t.pattern=es),ie.init(e,t)}),lc=I("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ts),ie.init(e,t)}),uc=I("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ys(t)),ie.init(e,t)}),fc=I("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=bs),ie.init(e,t)}),hc=I("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ss(t)),ie.init(e,t)}),gc=I("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=rs),ie.init(e,t)}),xc=I("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=cs),ie.init(e,t)}),OS=/^[0-9a-fA-F:.]+$/;function ln(e){return OS.test(e)?rc(`http://[${e}]`):!1}var zc=I("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ds),ie.init(e,t),e._zod.check=i=>{ln(i.value)||i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}),bc=I("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=ps(t.delimiter)),ie.init(e,t)}),Sc=I("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ms),ie.init(e,t)});function Cr(e){let t=e.split("/");if(t.length!==2)return!1;let[i,a]=t;if(!a)return!1;let o=Number(a);return`${o}`!==a||o<0||o>128?!1:ln(i)}var yc=I("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ls),ie.init(e,t),e._zod.check=i=>{Cr(i.value)||i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!t.abort})}});function un(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Dr=/^[0-9a-zA-Z+/]*={0,2}$/,vc=I("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Dr),ie.init(e,t),e._zod.check=i=>{un(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!t.abort})}}),fn=/^[A-Za-z0-9_-]*$/;function _r(e){if(!fn.test(e))return!1;let t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),i=t.padEnd(Math.ceil(t.length/4)*4,"=");return un(i)}var wc=I("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=fn),ie.init(e,t),e._zod.check=i=>{_r(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!t.abort})}}),Rc=I("$ZodE164",(e,t)=>{t.pattern??(t.pattern=xs),ie.init(e,t)}),$S=/[- ]/g;function TS(e){let t=e.length,i=1,a=0;for(;t;){let o=e.charCodeAt(--t)-48;i^=1,a+=i?[0,2,4,6,8,1,3,5,7,9][o]:o}return a%10===0}function jr(e){return xr.test(e)?TS(e.replace($S,"")):!1}var Ic=I("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=xr),ie.init(e,t),e._zod.check=i=>{jr(i.value)||i.issues.push({code:"invalid_format",format:"credit_card",input:i.value,inst:e,continue:!t.abort})}});function kS(e){let t=0,i=e.length;for(let a=4;a<i;a++){let o=e.charCodeAt(a);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}for(let a=0;a<4;a++){let o=e.charCodeAt(a);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}return t===1}function Er(e){return zr.test(e)?kS(e):!1}var Mc=I("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=zr),ie.init(e,t),e._zod.check=i=>{Er(i.value)||i.issues.push({code:"invalid_format",format:"iban",input:i.value,inst:e,continue:!t.abort})}});function Pr(e,t=null){try{let i=e.split(".");if(i.length!==3)return!1;let[a]=i;if(!a)return!1;let o=JSON.parse(atob(a));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var Oc=I("$ZodJWT",(e,t)=>{ie.init(e,t),e._zod.check=i=>{Pr(i.value,t.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!t.abort})}}),$c=I("$ZodCustomStringFormat",(e,t)=>{ie.init(e,t),e._zod.check=i=>{t.fn(i.value)||i.issues.push({code:"invalid_format",format:t.format,input:i.value,inst:e,continue:!t.abort})}}),Lr=I("$ZodNumber",(e,t)=>{K.init(e,t),e._zod.pattern=dt,e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=Number(i.value)}catch{}let o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;let r=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return i.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...r?{received:r}:{}}),i}}),Tc=I("$ZodNumberFormat",(e,t)=>{js.init(e,t),Lr.init(e,t)}),hn=I("$ZodBoolean",(e,t)=>{K.init(e,t),e._zod.pattern=Is,e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=!!i.value}catch{}let o=i.value;return typeof o=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),i}}),Vr=I("$ZodBigInt",(e,t)=>{K.init(e,t),e._zod.pattern=Rs,e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=BigInt(i.value)}catch{}return typeof i.value=="bigint"||i.issues.push({expected:"bigint",code:"invalid_type",input:i.value,inst:e}),i}}),kc=I("$ZodBigIntFormat",(e,t)=>{Es.init(e,t),Vr.init(e,t)}),Cc=I("$ZodSymbol",(e,t)=>{K.init(e,t),e._zod.parse=(i,a)=>{let o=i.value;return typeof o=="symbol"||i.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),i}}),Dc=I("$ZodUndefined",(e,t)=>{K.init(e,t),e._zod.pattern=Os,e._zod.values=new Set([void 0]),e._zod.parse=(i,a)=>{let o=i.value;return typeof o>"u"||i.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),i}}),_c=I("$ZodNull",(e,t)=>{K.init(e,t),e._zod.pattern=Ms,e._zod.values=new Set([null]),e._zod.parse=(i,a)=>{let o=i.value;return o===null||i.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),i}}),jc=I("$ZodAny",(e,t)=>{K.init(e,t),e._zod.parse=i=>i}),Ec=I("$ZodUnknown",(e,t)=>{K.init(e,t),e._zod.parse=i=>i}),Pc=I("$ZodNever",(e,t)=>{K.init(e,t),e._zod.parse=(i,a)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)}),Lc=I("$ZodVoid",(e,t)=>{K.init(e,t),e._zod.parse=(i,a)=>{let o=i.value;return typeof o>"u"||i.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),i}}),Vc=I("$ZodDate",(e,t)=>{K.init(e,t),e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=new Date(i.value)}catch{}let o=i.value,r=o instanceof Date;return r&&!Number.isNaN(o.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:o,...r?{received:"Invalid Date"}:{},inst:e}),i}});function Xl(e,t,i){e.issues.length&&t.issues.push(...Ve(i,e.issues)),t.value[i]=e.value}var Ac=I("$ZodArray",(e,t)=>{K.init(e,t);let i=Ie.memoizer;i?.attach(e),e._zod.parse=(a,o)=>{let r=a.value;if(!Array.isArray(r))return a.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),a;a.value=i?i.alloc(e,a,Array(r.length),o):Array(r.length);let d=[],p=o?.abortEarly;for(let f=0;f<r.length;f++){let u=r[f],g=t.element._zod.run({value:u,issues:[]},o);if(g instanceof Promise)d.push(g.then(S=>Xl(S,a,f)));else if(Xl(g,a,f),p&&g.issues.length!==0&&_e(g))break}return d.length?Promise.all(d).then(()=>a):a}});function Mr(e,t,i,a,o,r){let d=i in a,p=r==="optional";if(!(!d&&p&&o==="optional")){if(e.issues.length){if(o!==void 0&&p&&!d)return;t.issues.push(...Ve(i,e.issues))}if(!d&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}e.value===void 0?(d||o==="defaulted"&&!p)&&(t.value[i]=void 0):t.value[i]=e.value}}var CS=[];function fu(e){let t=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),a=i.length?i:CS,o=a.length?[...t,...a]:t;for(let d of o)if(!e.shape?.[d]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);let r=Va(e.shape);return{...e,allKeys:o,symbolKeys:a,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function hu(e,t,i,a,o,r,d){let p=[],f=o.keySet,u=o.catchall._zod,g=u.def.type,S=u.optin,y=u.optout,w=0;for(let O in t){if(d&&i.issues.length!==w){if(_e(i,w))break;w=i.issues.length}if(f.has(O))continue;if(O==="__proto__"){g==="never"&&p.push(O);continue}if(g==="never"){p.push(O);continue}let T=u.run({value:t[O],issues:[]},a);T instanceof Promise?e.push(T.then(j=>Mr(j,i,O,t,S,y))):Mr(T,i,O,t,S,y)}return p.length&&i.issues.push({code:"unrecognized_keys",keys:p,input:t,inst:r,continue:!0}),e.length?Promise.all(e).then(()=>i):i}var gu=I("$ZodObject",(e,t)=>{K.init(e,t);let i=Object.getOwnPropertyDescriptor(t,"shape"),a=i?.get?i.get.raw:t.shape??{};if(a){let u=()=>{let g={...a};return Object.defineProperty(t,"shape",{value:g}),u.raw=g,g};u.raw=a,Object.defineProperty(t,"shape",{get:u})}let o=Yt(()=>fu(t));Q(e,"propValues",u=>{let g=u.def.shape,S={};for(let y in g){let w=g[y]._zod;if(w.values){Object.prototype.hasOwnProperty.call(S,y)||Oe(S,y,new Set);for(let O of w.values)S[y].add(O);w.optin!==void 0&&S[y].add(void 0)}}return S});let r=kt,d=t.catchall,p,f=Ie.memoizer;f?.attach(e),e._zod.parse=(u,g)=>{p??(p=o.value);let S=u.value;if(!r(S))return u.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),u;u.value=f?f.alloc(e,u,{},g):{};let y=[],w=p.shape,O=g?.abortEarly,T=u.issues.length;for(let j of p.allKeys){if(O&&u.issues.length!==T){if(_e(u,T))break;T=u.issues.length}if(j==="__proto__")continue;let Z=w[j],U=Z._zod.optin,V=Z._zod.optout,H=Z._zod.run({value:S[j],issues:[]},g);H instanceof Promise?y.push(H.then(se=>Mr(se,u,j,S,U,V))):Mr(H,u,j,S,U,V)}return d?hu(y,S,u,g,o.value,e,O===!0):y.length?Promise.all(y).then(()=>u):u}}),Fc=I("$ZodObjectJIT",(e,t)=>{gu.init(e,t);let i=e._zod.parse,a=Yt(()=>fu(t)),o=Ie.memoizer,r=w=>{let O=a.value,T=O.symbolKeys,j=new _t(["payload","ctx"],{shape:w,inst:e,memo:o,syms:T}),Z=se=>`shape[${se}]._zod.run({ value: input[${se}], issues: [] }, ctx)`,U=(se,ne)=>`
23
+ let ${se}_ab = false;
24
+ for (let i = 0; i < ${se}.issues.length; i++) {
25
+ const iss = ${se}.issues[i];
26
+ iss.path = iss.path ? [${ne}, ...iss.path] : [${ne}];
27
+ payload.issues.push(iss);
28
+ if (iss.continue !== true) ${se}_ab = true;
29
+ }
30
+ if (${se}_ab && ctx && ctx.abortEarly) {
31
+ payload.value = newResult;
32
+ return payload;
33
+ }`;j.write("const input = payload.value;");let V=Object.create(null),H=0;for(let se of O.allKeys)V[se]=`key_${H++}`;j.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let se of O.allKeys){if(se==="__proto__")continue;let ne=V[se],Te=typeof se=="symbol"?`syms[${T.indexOf(se)}]`:De(se),Bo=`${Te} in input`,fl=w[se],ya=fl?._zod?.optin,hl=ya!==void 0,Vz=fl?._zod?.optout==="optional";if(j.write(`const ${ne} = ${Z(Te)};`),hl&&Vz){let Az=ya==="optional"?`${ne}_present`:`${ne}.value !== undefined || ${ne}_present`;j.write(`
34
+ const ${ne}_present = ${Bo};
35
+ if (!${ne}.issues.length || ${ne}_present) {
36
+ if (${ne}.issues.length) {${U(ne,Te)}
37
+ }
18
38
 
19
- /** Custom CueFrame component. Mounted through component contract v2. Edit me. */
39
+ if (${Az}) {
40
+ newResult[${Te}] = ${ne}.value;
41
+ }
42
+ }
43
+
44
+ `)}else hl?(j.write(`
45
+ if (${ne}.issues.length) {${U(ne,Te)}
46
+ }
47
+ `),ya==="defaulted"?j.write(`newResult[${Te}] = ${ne}.value;`):j.write(`
48
+ if (${ne}.value !== undefined || ${Bo}) {
49
+ newResult[${Te}] = ${ne}.value;
50
+ }
51
+ `)):j.write(`
52
+ const ${ne}_present = ${Bo};
53
+ if (${ne}.issues.length) {${U(ne,Te)}
54
+ }
55
+ if (!${ne}_present && !${ne}.issues.length) {
56
+ payload.issues.push({
57
+ code: "invalid_type",
58
+ expected: "nonoptional",
59
+ input: undefined,
60
+ path: [${Te}]
61
+ });
62
+ if (ctx && ctx.abortEarly) {
63
+ payload.value = newResult;
64
+ return payload;
65
+ }
66
+ }
67
+
68
+ if (${ne}_present) {
69
+ newResult[${Te}] = ${ne}.value;
70
+ }
71
+
72
+ `)}return j.write("payload.value = newResult;"),j.write("return payload;"),j.compile()},d,p=kt,f=!Ie.jitless,g=f&&Pa.value,S=t.catchall,y;e._zod.parse=(w,O)=>{y??(y=a.value);let T=w.value;return p(T)?f&&g&&O?.async===!1&&O.jitless!==!0?(d||(d=r(t.shape)),w=d(w,O),S?hu([],T,w,O,y,e,O?.abortEarly===!0):w):i(w,O):(w.issues.push({expected:"object",code:"invalid_type",input:T,inst:e}),w)}});function Yl(e,t,i,a){for(let r of e)if(r.issues.length===0)return t.value=r.value,t;let o=e.filter(r=>!_e(r));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map(r=>r.issues.map(d=>Ae(d,a,xe())))}),t)}var gn=I("$ZodUnion",(e,t)=>{K.init(e,t),Q(e,"optin",a=>a.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":a.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Q(e,"optout",a=>a.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Q(e,"values",a=>{if(a.def.options.every(o=>o._zod.values))return new Set(a.def.options.flatMap(o=>Array.from(o._zod.values)))}),Q(e,"pattern",a=>{if(a.def.options.every(o=>o._zod.pattern)){let o=a.def.options.map(r=>r._zod.pattern);return new RegExp(`^(${o.map(r=>ct(r.source)).join("|")})$`)}});let i=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(a,o)=>{if(i)return i(a,o);let r=!1,d=[];for(let p of t.options){let f=p._zod.run({value:a.value,issues:[]},o);if(f instanceof Promise)d.push(f),r=!0;else{if(f.issues.length===0)return f;d.push(f)}}return r?Promise.all(d).then(p=>Yl(p,a,e,o)):Yl(d,a,e,o)}});function Ql(e,t,i,a){let o=[];for(let r=0;r<e.length;r++)e[r].issues.length===0&&o.push(r);return o.length===1?(t.value=e[o[0]].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:e.map(r=>r.issues.map(d=>Ae(d,a,xe())))}):t.issues.push({code:"invalid_union",input:t.value,inst:i,errors:[],inclusive:!1,matches:o}),t)}var Uc=I("$ZodXor",(e,t)=>{gn.init(e,t),t.inclusive=!1;let i=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(a,o)=>{if(i)return i(a,o);let r=!1,d=[];for(let p of t.options){let f=p._zod.run({value:a.value,issues:[]},o);f instanceof Promise?(d.push(f),r=!0):d.push(f)}return r?Promise.all(d).then(p=>Ql(p,a,e,o)):Ql(d,a,e,o)}});function Nc(e,t){let i=e._zod,a=i.bag.optionsMap;a||(a=xu(i.def),i.bag.optionsMap=a);let o=a.get(t);if(o===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return o}function xu(e){let t=new Map;for(let i of e.options){let a=i._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let o of a)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null)}else t.set(o,i)}return t}var qc=I("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,gn.init(e,t);let i=e._zod.parse;Q(e,"propValues",o=>{let r={},d=0;for(let p of o.def.options){let f=p._zod.propValues;if(!f||Object.keys(f).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(p)}"`);f[o.def.discriminator]?.has(void 0)&&d++;for(let[u,g]of Object.entries(f)){Object.prototype.hasOwnProperty.call(r,u)||Oe(r,u,new Set);for(let S of g)r[u].add(S)}}return!o.def.unionFallback&&d>1&&r[o.def.discriminator]?.delete(void 0),r}),t.options.forEach((o,r)=>{let d=Qt(o._zod.def);if(d&&!Object.prototype.hasOwnProperty.call(d,t.discriminator))throw new Error(`Invalid discriminated union option at index "${r}"`)});let a=Yt(()=>xu(t));e._zod.parse=(o,r)=>{let d=o.value;if(!kt(d))return o.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),o;let p=d?.[t.discriminator],f=a.value.get(p);return f&&(p!==void 0||r.direction!=="backward")?f._zod.run(o,r):t.unionFallback||r.direction==="backward"?i(o,r):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(a.value.keys()).filter(u=>a.value.get(u)!==null),input:d,path:[t.discriminator],inst:e}),o)}}),Bc=I("$ZodIntersection",(e,t)=>{K.init(e,t),e._zod.parse=(i,a)=>{let o=i.value,r=t.left._zod.run({value:o,issues:[]},a),d=t.right._zod.run({value:o,issues:[]},a);return r instanceof Promise||d instanceof Promise?Promise.all([r,d]).then(([f,u])=>eu(i,f,u)):eu(i,r,d)}});function ao(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ze(e)&&Ze(t)){let i=Object.keys(t),a=Object.keys(e).filter(r=>i.indexOf(r)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let r of a){if(r==="__proto__")continue;let d=ao(e[r],t[r]);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};o[r]=d.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let a=0;a<e.length;a++){let o=e[a],r=t[a],d=ao(o,r);if(!d.valid)return{valid:!1,mergeErrorPath:[a,...d.mergeErrorPath]};i.push(d.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function eu(e,t,i){let a=new Map,o,r=new Map,d=(u,g)=>{let S;if(u.code==="unrecognized_keys"&&!u.path?.length)o??(o=u),S=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){let y=String(u.path[0]);r.has(y)||r.set(y,u),S=[y]}else return!1;for(let y of S)a.has(y)||a.set(y,{}),a.get(y)[g]=!0;return!0};for(let u of t.issues)d(u,"l")||e.issues.push(u);for(let u of i.issues)d(u,"r")||e.issues.push(u);let p=[...a].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(p.length){let u=o?p.filter(g=>o.keys.includes(g)):[];u.length&&e.issues.push({...o,keys:u});for(let g of p)!u.includes(g)&&r.has(g)&&e.issues.push(r.get(g))}let f=ao(t.value,i.value);if(!f.valid){if(_e(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(f.mergeErrorPath)}`)}return e.value=f.data,e}var Ar=I("$ZodTuple",(e,t)=>{K.init(e,t);let i=t.items,a=Ie.memoizer;a?.attach(e),e._zod.parse=(o,r)=>{let d=o.value;if(!Array.isArray(d))return o.issues.push({input:d,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=a?a.alloc(e,o,[],r):[];let p=[],f=tu(i,"optin"),u=tu(i,"optout");if(!t.rest){if(d.length<f)return o.issues.push({code:"too_small",minimum:f,inclusive:!0,input:d,inst:e,origin:"array"}),o;d.length>i.length&&o.issues.push({code:"too_big",maximum:i.length,inclusive:!0,input:d,inst:e,origin:"array"})}let g=new Array(i.length),S=t.rest?r?.abortEarly:void 0,y=!1;for(let w=0;w<i.length;w++){let O=i[w]._zod.run({value:d[w],issues:[]},r);O instanceof Promise?p.push(O.then(T=>{g[w]=T})):(g[w]=O,S&&!y&&O.issues.length&&(y=_e(O)))}if(t.rest&&!y){let w=i.length-1,O=d.slice(i.length),T=o.issues.length;for(let j of O){if(S&&o.issues.length!==T){if(_e(o,T))break;T=o.issues.length}w++;let Z=t.rest._zod.run({value:j,issues:[]},r);Z instanceof Promise?p.push(Z.then(U=>ou(U,o,w))):ou(Z,o,w)}}return p.length?Promise.all(p).then(()=>nu(g,o,i,d,u)):nu(g,o,i,d,u)}});function tu(e,t){for(let i=e.length-1;i>=0;i--)if(!(t==="optin"?e[i]._zod.optin!==void 0:e[i]._zod.optout==="optional"))return i+1;return 0}function ou(e,t,i){e.issues.length&&t.issues.push(...Ve(i,e.issues)),t.value[i]=e.value}function nu(e,t,i,a,o){for(let r=0;r<i.length;r++){let d=e[r],p=r<a.length;if(!p&&r>=o&&i[r]._zod.optin==="optional"){t.value.length=r;break}if(d.issues.length){if(!p&&r>=o){t.value.length=r;break}t.issues.push(...Ve(r,d.issues))}t.value[r]=d.value}for(let r=t.value.length-1;r>=a.length&&(i[r]._zod.optout==="optional"&&t.value[r]===void 0);r--)t.value.length=r;return t}var Wc=I("$ZodRecord",(e,t)=>{K.init(e,t);let i=Ie.memoizer;i?.attach(e),e._zod.parse=(a,o)=>{let r=a.value;if(!Ze(r))return a.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),a;let d=[],p=t.keyType._zod.values;if(p&&!t.partial){a.value=i?i.alloc(e,a,{},o):{};let f=new Set;for(let g of p)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){if(f.add(typeof g=="number"?g.toString():g),g==="__proto__")continue;let S=t.keyType._zod.run({value:g,issues:[]},o);if(S instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(S.issues.length){a.issues.push({code:"invalid_key",origin:"record",issues:S.issues.map(O=>Ae(O,o,xe())),input:g,path:[g],inst:e});continue}let y=S.value;if(y==="__proto__")continue;let w=t.valueType._zod.run({value:r[g],issues:[]},o);w instanceof Promise?d.push(w.then(O=>{O.issues.length&&a.issues.push(...Ve(g,O.issues)),a.value[y]=O.value})):(w.issues.length&&a.issues.push(...Ve(g,w.issues)),a.value[y]=w.value)}let u;for(let g in r)if(!f.has(g))if(t.mode==="loose"){if(g==="__proto__")continue;a.value[g]=r[g]}else u=u??[],u.push(g);u&&u.length>0&&a.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u,continue:!0})}else{a.value=i?i.alloc(e,a,{},o):{};let f;for(let u of Reflect.ownKeys(r)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,u))continue;let g=t.keyType._zod.run({value:u,issues:[]},o);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&dt.test(u)&&g.issues.length){let O=t.keyType._zod.run({value:Number(u),issues:[]},o);if(O instanceof Promise)throw new Error("Async schemas not supported in object keys currently");O.issues.length===0&&(g=O)}if(g.issues.length){t.mode==="loose"?a.value[u]=r[u]:p?(f=f??[],f.push(u)):a.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(O=>Ae(O,o,xe())),input:u,path:[u],inst:e});continue}let y=g.value;if(y==="__proto__")continue;let w=t.valueType._zod.run({value:r[u],issues:[]},o);w instanceof Promise?d.push(w.then(O=>{O.issues.length&&a.issues.push(...Ve(u,O.issues)),a.value[y]=O.value})):(w.issues.length&&a.issues.push(...Ve(u,w.issues)),a.value[y]=w.value)}f&&f.length>0&&a.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:f,continue:!0})}return d.length?Promise.all(d).then(()=>a):a}}),Zc=I("$ZodMap",(e,t)=>{K.init(e,t);let i=Ie.memoizer;i?.attach(e),e._zod.parse=(a,o)=>{let r=a.value;if(!(r instanceof Map))return a.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),a;let d=[];a.value=i?i.alloc(e,a,new Map,o):new Map;let p=o?.abortEarly,f=a.issues.length;for(let[u,g]of r){if(p&&a.issues.length!==f){if(_e(a,f))break;f=a.issues.length}let S=t.keyType._zod.run({value:u,issues:[]},o),y=t.valueType._zod.run({value:g,issues:[]},o);S instanceof Promise||y instanceof Promise?d.push(Promise.all([S,y]).then(([w,O])=>{ru(w,O,a,u,r,e,o)})):ru(S,y,a,u,r,e,o)}return d.length?Promise.all(d).then(()=>a):a}});function ru(e,t,i,a,o,r,d){e.issues.length&&(Jo.has(typeof a)?i.issues.push(...Ve(a,e.issues)):i.issues.push({code:"invalid_key",origin:"map",input:o,inst:r,issues:e.issues.map(p=>Ae(p,d,xe()))})),t.issues.length&&(Jo.has(typeof a)?i.issues.push(...Ve(a,t.issues)):i.issues.push({origin:"map",code:"invalid_element",input:o,inst:r,key:a,issues:t.issues.map(p=>Ae(p,d,xe()))})),i.value.set(e.value,t.value)}var Gc=I("$ZodSet",(e,t)=>{K.init(e,t);let i=Ie.memoizer;i?.attach(e),e._zod.parse=(a,o)=>{let r=a.value;if(!(r instanceof Set))return a.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),a;let d=[];a.value=i?i.alloc(e,a,new Set,o):new Set;let p=o?.abortEarly,f=a.issues.length;for(let u of r){if(p&&a.issues.length!==f){if(_e(a,f))break;f=a.issues.length}let g=t.valueType._zod.run({value:u,issues:[]},o);g instanceof Promise?d.push(g.then(S=>iu(S,a))):iu(g,a)}return d.length?Promise.all(d).then(()=>a):a}});function iu(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Hc=I("$ZodEnum",(e,t)=>{K.init(e,t);let i=Kt(t.entries),a=new Set(i);e._zod.values=a,Q(e,"pattern",o=>{let r=Kt(o.def.entries).filter(d=>Jo.has(typeof d));return new RegExp(r.length?`^(${r.map(d=>Ge(d.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,r)=>{let d=o.value;return a.has(d)||o.issues.push({code:"invalid_value",values:i,input:d,inst:e}),o}}),Jc=I("$ZodLiteral",(e,t)=>{K.init(e,t);let i=new Set(t.values);e._zod.values=i,Q(e,"pattern",a=>{let o=a.def.values;return new RegExp(o.length?`^(${o.map(r=>typeof r=="string"?Ge(r):r?Ge(r.toString()):String(r)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(a,o)=>{let r=a.value;return i.has(r)||a.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),a}}),Kc=I("$ZodFile",(e,t)=>{K.init(e,t),e._zod.parse=(i,a)=>{let o=i.value;return o instanceof File||i.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),i}}),Xc=I("$ZodTransform",(e,t)=>{K.init(e,t),e._zod.optin="optional",Ie.memoizer?.guard(e),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new zt(e.constructor.name);let o=t.transform(i.value,i);if(a.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(i.value=d,i));if(o instanceof Promise)throw new Fe;return i.value=o,i}});function au(e,t){return e.value=t.issues.length?void 0:t.value,e}var Fr=I("$ZodOptional",(e,t)=>{K.init(e,t),Q(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Q(e,"values",i=>{let a=i.def.innerType._zod.values;return a?new Set([...a,void 0]):void 0}),Q(e,"pattern",i=>{let a=i.def.innerType._zod.pattern;return a?new RegExp(`^(${ct(a.source)})?$`):void 0}),e._zod.parse=(i,a)=>{if(i.value===void 0){if(t.innerType._zod.optin!=="defaulted")return i;let o=t.innerType._zod.run({value:i.value,issues:[]},a);return o instanceof Promise?o.then(r=>au(i,r)):au(i,o)}return t.innerType._zod.run(i,a)}}),Yc=I("$ZodExactOptional",(e,t)=>{Fr.init(e,t),Q(e,"values",i=>i.def.innerType._zod.values),Q(e,"pattern",i=>i.def.innerType._zod.pattern),e._zod.parse=(i,a)=>t.innerType._zod.run(i,a)}),Qc=I("$ZodNullable",(e,t)=>{K.init(e,t),Q(e,"optin",i=>i.def.innerType._zod.optin),Q(e,"optout",i=>i.def.innerType._zod.optout),Q(e,"pattern",i=>{let a=i.def.innerType._zod.pattern;return a?new RegExp(`^(${ct(a.source)}|null)$`):void 0}),Q(e,"values",i=>i.def.innerType._zod.values?new Set([...i.def.innerType._zod.values,null]):void 0),e._zod.parse=(i,a)=>i.value===null?i:t.innerType._zod.run(i,a)}),ed=I("$ZodDefault",(e,t)=>{K.init(e,t),e._zod.optin="defaulted",Q(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return t.innerType._zod.run(i,a);if(i.value===void 0)return i.value=t.defaultValue,i;let o=t.innerType._zod.run(i,a);return o instanceof Promise?o.then(r=>su(r,t)):su(o,t)}});function su(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var td=I("$ZodPrefault",(e,t)=>{K.init(e,t),e._zod.optin="defaulted",Q(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,a)=>(a.direction==="backward"||i.value===void 0&&(i.value=t.defaultValue),t.innerType._zod.run(i,a))}),od=I("$ZodNonOptional",(e,t)=>{K.init(e,t),Q(e,"values",i=>{let a=i.def.innerType._zod.values;return a?new Set([...a].filter(o=>o!==void 0)):void 0}),e._zod.parse=(i,a)=>{let o=t.innerType._zod.run(i,a);return o instanceof Promise?o.then(r=>cu(r,e)):cu(o,e)}});function cu(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var nd=I("$ZodSuccess",(e,t)=>{K.init(e,t),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new zt("ZodSuccess");let o=t.innerType._zod.run(i,a);return o instanceof Promise?o.then(r=>(i.value=r.issues.length===0,i)):(i.value=o.issues.length===0,i)}});function du(e,t,i,a){return t.issues.length?(e.value=i.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>Ae(o,a,xe()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var rd=I("$ZodCatch",(e,t)=>{K.init(e,t),Q(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Q(e,"optout",i=>i.def.innerType._zod.optout),Q(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return t.innerType._zod.run(i,a);let o=t.innerType._zod.run({value:i.value,issues:[]},a);return o instanceof Promise?o.then(r=>du(i,r,t,a)):du(i,o,t,a)}}),id=I("$ZodNaN",(e,t)=>{K.init(e,t),e._zod.parse=(i,a)=>((typeof i.value!="number"||!Number.isNaN(i.value))&&i.issues.push({input:i.value,inst:e,expected:"nan",code:"invalid_type"}),i)}),Ur=I("$ZodPipe",(e,t)=>{K.init(e,t),Q(e,"values",i=>i.def.in._zod.values),Q(e,"optin",i=>i.def.in._zod.optin),Q(e,"optout",i=>i.def.out._zod.optout),Q(e,"propValues",i=>i.def.in._zod.propValues),e._zod.parse=(i,a)=>{if(a.direction==="backward"){let r=t.out._zod.run(i,a);return r instanceof Promise?r.then(d=>wr(d,t.in,a)):wr(r,t.in,a)}let o=t.in._zod.run(i,a);return o instanceof Promise?o.then(r=>wr(r,t.out,a)):wr(o,t.out,a)}});function wr(e,t,i){return e.issues.some(a=>a.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},i)}var xn=I("$ZodCodec",(e,t)=>{K.init(e,t),Q(e,"values",i=>i.def.in._zod.values),Q(e,"optin",i=>i.def.in._zod.optin),Q(e,"optout",i=>i.def.out._zod.optout),Q(e,"propValues",i=>i.def.in._zod.propValues),e._zod.parse=(i,a)=>{if((a.direction||"forward")==="forward"){let r=t.in._zod.run(i,a);return r instanceof Promise?r.then(d=>Rr(d,t,a)):Rr(r,t,a)}else{let r=t.out._zod.run(i,a);return r instanceof Promise?r.then(d=>Rr(d,t,a)):Rr(r,t,a)}}});function Rr(e,t,i){if(e.issues.length)return e.aborted=!0,e;if((i.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(r=>Ir(e,r,t.out,i)):Ir(e,o,t.out,i)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(r=>Ir(e,r,t.in,i)):Ir(e,o,t.in,i)}}function Ir(e,t,i,a){return e.issues.length?(e.aborted=!0,e):i._zod.run({value:t,issues:e.issues},a)}var ad=I("$ZodPreprocess",(e,t)=>{Ur.init(e,t)}),sd=I("$ZodReadonly",(e,t)=>{K.init(e,t),Q(e,"propValues",i=>i.def.innerType._zod.propValues),Q(e,"values",i=>i.def.innerType._zod.values),Q(e,"optin",i=>i.def.innerType?._zod?.optin),Q(e,"optout",i=>i.def.innerType?._zod?.optout),e._zod.parse=(i,a)=>{if(a.direction==="backward")return t.innerType._zod.run(i,a);let o=t.innerType._zod.run(i,a);return o instanceof Promise?o.then(pu):pu(o)}});function pu(e){return e.memo||(e.value=Object.freeze(e.value)),e}function DS(e){let t=e._zod.def,i=t.pattern,a=!!t.format?.includes("int"),o,r;for(let p of t.checks??[]){let f=p._zod.def;f.pattern&&(i=f.pattern),a||(a=!!f.format?.includes("int"));let u=f.minimum??f.length,g=f.maximum??f.length;u!==void 0&&(o===void 0||u>o)&&(o=u),g!==void 0&&(r===void 0||g<r)&&(r=g)}if(i)return i.source;if(o!==void 0&&r!==void 0&&o>r)return"(?!)";if(o!==void 0||r!==void 0)return ws({minimum:o,maximum:r}).source;let d=e._zod.pattern;return(a&&d===dt?sn:d)?.source}function Qs(e){let t=e._zod.def,i=e._zod.pattern?.source,a=t.innerType??e._zod.innerType;if(a){let o=a._zod.pattern?.source,r=Qs(a);return i&&o&&r&&r!==o?i.replace(ct(o),()=>ct(r)):i}if(t.options){let o=t.options.map(Qs);if(o.every(Boolean))return`^(${o.map(r=>ct(r)).join("|")})$`}return DS(e)}var cd=I("$ZodTemplateLiteral",(e,t)=>{K.init(e,t);let i=[];for(let a of t.parts)if(typeof a=="object"&&a!==null){let o=Qs(a);if(!o)throw new Error(`Invalid template literal part, no pattern found: ${[...a._zod.traits].shift()}`);i.push(ct(o))}else if(a===null||La.has(typeof a))i.push(Ge(`${a}`));else throw new Error(`Invalid template literal part: ${a}`);e._zod.pattern=new RegExp(`^${i.join("")}$`),e._zod.parse=(a,o)=>typeof a.value!="string"?(a.issues.push({input:a.value,inst:e,expected:"string",code:"invalid_type"}),a):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(a.value)||a.issues.push({input:a.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),a)}),dd=I("$ZodFunction",(e,t)=>(K.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=i=>{if(typeof i!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...a){let o=e._def.input?sr(e._def.input,a):a,r=Reflect.apply(i,this,o);return e._def.output?sr(e._def.output,r):r},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=i=>{if(typeof i!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...a){let o=e._def.input?await cr(e._def.input,a):a,r=await Reflect.apply(i,this,o);return e._def.output?await cr(e._def.output,r):r},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(i,a)=>typeof i.value!="function"?(i.issues.push({code:"invalid_type",expected:"function",input:i.value,inst:e}),i):(e._def.output&&e._def.output._zod.def.type==="promise"?i.value=e.implementAsync(i.value):i.value=e.implement(i.value),i),e.input=(...i)=>{let a=e.constructor;return Array.isArray(i[0])?new a({type:"function",input:new Ar({type:"tuple",items:i[0],rest:i[1]}),output:e._def.output}):new a({type:"function",input:i[0],output:e._def.output})},e.output=i=>{let a=e.constructor;return new a({type:"function",input:e._def.input,output:i})},e)),pd=I("$ZodPromise",(e,t)=>{K.init(e,t),e._zod.parse=(i,a)=>Promise.resolve(i.value).then(o=>t.innerType._zod.run({value:o,issues:[]},a))}),zn=I("$ZodLazy",(e,t)=>{K.init(e,t),ja(e._zod,"innerType",()=>{let i=t;return i._cachedInner||(i._cachedInner=t.getter()),i._cachedInner}),Q(e,"pattern",i=>i.innerType?._zod?.pattern),Q(e,"propValues",i=>i.innerType?._zod?.propValues),Q(e,"optin",i=>i.innerType?._zod?.optin??void 0),Q(e,"optout",i=>i.innerType?._zod?.optout??void 0),e._zod.parse=(i,a)=>e._zod.innerType._zod.run(i,a)}),md=I("$ZodCustom",(e,t)=>{de.init(e,t),K.init(e,t),e._zod.parse=(i,a)=>i,e._zod.check=i=>{let a=i.value,o=t.fn(a);if(o instanceof Promise)return o.then(r=>mu(r,i,a,e));mu(o,i,a,e)}});function mu(e,t,i,a){if(!e){let o={code:"custom",input:i,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(o.params=a._zod.def.params),t.issues.push(eo(o))}}var Wr=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},ud="~memo",bu=[];function Su(e){return e!==null&&typeof e=="object"}function ld(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var yu=new WeakMap,so=0,Br=1,bn=2;function Sn(e,t,i){let a=yu.get(e);if(a!==void 0)return a?bn:so;if(t.has(e))return bn;t.add(e);let o=so,r=g=>{if(o!==bn&&g?._zod){let S=Sn(g,t,i);S>o&&(o=S)}},d=(g,S)=>{let y=so;for(let w of Reflect.ownKeys(g)){let O=Object.getOwnPropertyDescriptor(g,w);if(S&&!O.enumerable)continue;let T=O.get?Br:O.value?._zod?Sn(O.value,t,i):so;T>y&&(y=T)}return y},p=g=>{g>o&&(o=g)},f=e._zod.def,u=f.type;switch(u){case"object":{let g=Qt(f);p(g?d(g,!0):Br),r(f.catchall);break}case"array":r(f.element);break;case"tuple":for(let g of f.items)r(g);r(f.rest);break;case"record":case"map":r(f.keyType),r(f.valueType);break;case"set":r(f.valueType);break;case"union":for(let g of f.options)r(g);break;case"intersection":r(f.left),r(f.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":r(f.innerType);break;case"pipe":r(f.in),r(f.out);break;case"function":r(f.input),r(f.output);break;case"lazy":{let g=f._cachedInner??(i?e._zod.innerType:void 0);p(g?Sn(g,t,!1):Br);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let g in f){let S=Object.getOwnPropertyDescriptor(f,g);if(!S||S.get)continue;let y=S.value;if(!(!y||typeof y!="object")){if(y._zod)r(y);else if(Array.isArray(y))for(let w of y)r(w)}}}return t.delete(e),_S(e,o)}function _S(e,t){return t!==Br&&yu.set(e,t===bn),t}function Zr(e){return Sn(e,new Set,!0)!==so}function jS(e,t){let i=e.buckets.get(t);return i||(i=new WeakMap,e.buckets.set(t,i)),i}var Nr,qr=[],ES={alloc(e,t,i){let a=Nr;if(!a)return i;Nr=void 0;let o={value:i,issues:null};return a.set(t.value,o),qr.push(o),i},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let i=e._zod.parse,a=(o,r)=>{if(r.direction!=="backward"&&Gr(r,o.value))throw new Wr;return i(o,r)};e._zod.parse=a,e._zod.run===i&&(e._zod.run=a)})},attach(e){var t;let i,a=!1,o,r;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let d=e._zod.parse,p=(f,u)=>{if(i===void 0){let Z=Sn(e,new Set,!1);if(Z===so)return e._zod.parse=d,e._zod.run===p&&(e._zod.run=d),d(f,u);Z===bn||a?i=!0:a=!0}let g=f.value;if(!Su(g))return d(f,u);let S=u[ud];S||(S={buckets:new WeakMap,backEdges:void 0},u[ud]=S);let y;o===u?y=r:(y=jS(S,e),o=u,r=y);let w=y.get(g);if(w)return f.value=w.value,w.issues?w.issues.length&&f.issues.push(...ld(w.issues)):(f.memo=!0,S.backEdges??(S.backEdges=new WeakSet),S.backEdges.add(w.value)),f;Nr=y;let O=qr.length,T=d(f,u);Nr=void 0;let j=qr.length>O?qr.pop():void 0;return T instanceof Promise?T.then(Z=>(j&&(j.issues=Z.issues.length?ld(Z.issues):bu),Z)):(j&&(j.issues=T.issues.length?ld(T.issues):bu),T)};e._zod.parse=p,e._zod.run===d&&(e._zod.run=p)})}};function yn(){return ES}function Gr(e,t){let i=e[ud]?.backEdges;return i!==void 0&&Su(t)&&i.has(t)}var wn={};at(wn,{ar:()=>vu,az:()=>wu,be:()=>Iu,bg:()=>Mu,bn:()=>Ou,ca:()=>$u,ckb:()=>Tu,cs:()=>ku,da:()=>Cu,de:()=>Du,el:()=>_u,en:()=>Hr,eo:()=>ju,es:()=>Eu,fa:()=>Pu,fi:()=>Lu,fr:()=>Vu,frCA:()=>Au,gu:()=>Fu,he:()=>Uu,hi:()=>Nu,hr:()=>qu,hu:()=>Bu,hy:()=>Zu,id:()=>Gu,is:()=>Hu,it:()=>Ju,ja:()=>Ku,ka:()=>Xu,kh:()=>Yu,km:()=>Jr,kn:()=>Qu,ko:()=>ef,lt:()=>of,mk:()=>nf,ms:()=>rf,ne:()=>af,nl:()=>sf,nn:()=>cf,no:()=>df,ota:()=>pf,pl:()=>lf,ps:()=>mf,pt:()=>uf,ptBR:()=>ff,ro:()=>hf,ru:()=>xf,sk:()=>zf,sl:()=>bf,sv:()=>Sf,ta:()=>yf,tg:()=>vf,th:()=>wf,tk:()=>Rf,tr:()=>If,ua:()=>Mf,uk:()=>Kr,ur:()=>Of,uz:()=>$f,vi:()=>Tf,yo:()=>Df,zhCN:()=>kf,zhTW:()=>Cf});var PS=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(o){return e[o]??null}let i={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${p}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${r}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${p}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${D(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${r} ${o.maximum.toString()} ${d.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${r} ${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${r} ${o.minimum.toString()} ${d.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${r} ${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:r.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${r.suffix}"`:r.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${r.includes}"`:r.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${r.pattern}`:`${i[r.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${M(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function vu(){return{localeError:PS()}}var LS=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${p}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${r}, daxil olan ${p}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${D(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${r}${o.maximum.toString()} ${d.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${r}${o.minimum.toString()} ${d.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${r.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:r.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${r.suffix}" il\u0259 bitm\u0259lidir`:r.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${r.includes}" daxil olmal\u0131d\u0131r`:r.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${r.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${i[r.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${M(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function wu(){return{localeError:LS()}}function Ru(e,t,i,a){let o=Math.abs(e),r=o%10,d=o%100;return d>=11&&d<=19?a:r===1?t:r>=2&&r<=4?i:a}var VS=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(o){return e[o]??null}let i={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},a={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${p}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${r}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${p}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${D(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);if(d){let p=Number(o.maximum),f=Ru(p,d.unit.one,d.unit.few,d.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${d.verb} ${r}${o.maximum.toString()} ${f}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);if(d){let p=Number(o.minimum),f=Ru(p,d.unit.one,d.unit.few,d.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${d.verb} ${r}${o.minimum.toString()} ${f}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${r.prefix}"`:r.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${r.suffix}"`:r.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${r.includes}"`:r.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${r.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${i[r.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${M(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Iu(){return{localeError:VS()}}var AS=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let i={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},a={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${p}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${r}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${p}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${D(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${r}${o.maximum.toString()} ${d.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${r}${o.minimum.toString()} ${d.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;if(r.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${r.prefix}"`;if(r.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${r.suffix}"`;if(r.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${r.includes}"`;if(r.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${r.pattern}`;let d="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return r.format==="emoji"&&(d="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),r.format==="datetime"&&(d="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),r.format==="date"&&(d="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),r.format==="time"&&(d="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),r.format==="duration"&&(d="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${d} ${i[r.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${M(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Mu(){return{localeError:AS()}}var FS=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(o){return e[o]??null}let i={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${r}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${p}`}case"invalid_value":return o.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${D(o.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${M(o.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${r}${o.maximum.toString()} ${d.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${r}${o.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${r}${o.minimum.toString()} ${d.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${r}${o.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${r.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:r.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${r.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:r.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${r.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:r.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${r.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${i[r.format]??o.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${o.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${o.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${M(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o.options.map(d=>`'${d}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function Ou(){return{localeError:FS()}}var US=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let i={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${p}`:`Tipus inv\xE0lid: s'esperava ${r}, s'ha rebut ${p}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${D(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${M(o.values," o ")}`;case"too_big":{let r=o.inclusive?"com a m\xE0xim":"menys de",d=t(o.origin);return d?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${r} ${o.maximum.toString()} ${d.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${r} ${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?"com a m\xEDnim":"m\xE9s de",d=t(o.origin);return d?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${r} ${o.minimum.toString()} ${d.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${r} ${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${r.prefix}"`:r.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${r.suffix}"`:r.format==="includes"?`Format inv\xE0lid: ha d'incloure "${r.includes}"`:r.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${r.pattern}`:`Format inv\xE0lid per a ${i[r.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${M(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}};function $u(){return{localeError:US()}}var NS=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(o){return e[o]??null}let i={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},a={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d,f=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(g=>p.endsWith(g))?"\u06CC\u06D5":"\u06D5",u=/^[a-zA-Z]+$/.test(p);return d==="null"||d==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${r} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${p}${u?"":f}`}case"invalid_value":return o.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${D(o.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${M(o.values,"|")}`;case"too_big":{let r=t(o.origin);return r?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} ${r.unit} ${r.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let r=t(o.origin);return r?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} ${r.unit} ${r.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${r.prefix}"`:r.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${r.suffix}"`:r.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${r.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:r.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${r.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${i[r.format]??o.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${o.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${M(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${o.options.map(d=>`'${d}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${o.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function Tu(){return{localeError:NS()}}var qS=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(o){return e[o]??null}let i={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},a={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${p}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${r}, obdr\u017Eeno ${p}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${D(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${r}${o.maximum.toString()} ${d.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${r}${o.minimum.toString()} ${d.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${r.prefix}"`:r.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${r.suffix}"`:r.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${r.includes}"`:r.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${r.pattern}`:`Neplatn\xFD form\xE1t ${i[r.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${M(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function ku(){return{localeError:qS()}}var BS=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},a={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${p}`:`Ugyldigt input: forventede ${r}, fik ${p}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${D(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin),p=a[o.origin]??o.origin;return d?`For stor: forventede ${p??"value"} ${d.verb} ${r} ${o.maximum.toString()} ${d.unit??"elementer"}`:`For stor: forventede ${p??"value"} havde ${r} ${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin),p=a[o.origin]??o.origin;return d?`For lille: forventede ${p} ${d.verb} ${r} ${o.minimum.toString()} ${d.unit}`:`For lille: forventede ${p} havde ${r} ${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Ugyldig streng: skal starte med "${r.prefix}"`:r.format==="ends_with"?`Ugyldig streng: skal ende med "${r.suffix}"`:r.format==="includes"?`Ugyldig streng: skal indeholde "${r.includes}"`:r.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${r.pattern}`:`Ugyldig ${i[r.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${M(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}};function Cu(){return{localeError:BS()}}var WS=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function t(o){return e[o]??null}let i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},a={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${p}`:`Ung\xFCltige Eingabe: erwartet ${r}, erhalten ${p}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${D(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${r}${o.maximum.toString()} ${d.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${r}${o.maximum.toString()} ist`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Zu klein: erwartet, dass ${o.origin} ${r}${o.minimum.toString()} ${d.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${r}${o.minimum.toString()} ist`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Ung\xFCltiger String: muss mit "${r.prefix}" beginnen`:r.format==="ends_with"?`Ung\xFCltiger String: muss mit "${r.suffix}" enden`:r.format==="includes"?`Ung\xFCltiger String: muss "${r.includes}" enthalten`:r.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${r.pattern} entsprechen`:`Ung\xFCltig: ${i[r.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${M(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Du(){return{localeError:WS()}}var ZS=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(o){return e[o]??null}let i={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return typeof o.expected=="string"&&/^[A-Z]/.test(o.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${o.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${p}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${p}`}case"invalid_value":return o.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${D(o.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${r}${o.maximum.toString()} ${d.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${r}${o.minimum.toString()} ${d.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${r.prefix}"`:r.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${r.suffix}"`:r.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${r.includes}"`:r.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${r.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${i[r.format]??o.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${o.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${o.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${o.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${M(o.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${o.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${o.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function _u(){return{localeError:ZS()}}var GS=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};function o(r,d){return r==="number"&&typeof d=="number"&&!Number.isFinite(d)?String(d):a[r]??r}return r=>{switch(r.code){case"invalid_type":{let d=o(r.expected),p=_(r.input),f=o(p,r.input);return`Invalid input: expected ${d}, received ${f}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${D(r.values[0])}`:`Invalid option: expected one of ${M(r.values,"|")}`;case"too_big":{let d=r.exact?"exactly ":r.inclusive?"<=":"<",p=t(r.origin);return p?`Too big: expected ${r.origin??"value"} to have ${d}${r.maximum.toString()} ${p.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${d}${r.maximum.toString()}`}case"too_small":{let d=r.exact?"exactly ":r.inclusive?">=":">",p=t(r.origin);return p?`Too small: expected ${r.origin} to have ${d}${r.minimum.toString()} ${p.unit}`:`Too small: expected ${r.origin} to be ${d}${r.minimum.toString()}`}case"invalid_format":{let d=r;return d.format==="starts_with"?`Invalid string: must start with "${d.prefix}"`:d.format==="ends_with"?`Invalid string: must end with "${d.suffix}"`:d.format==="includes"?`Invalid string: must include "${d.includes}"`:d.format==="regex"?`Invalid string: must match pattern ${d.pattern}`:`Invalid ${i[d.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${M(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(p=>`'${p}'`).join(" | ")}`:r.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Hr(){return{localeError:GS()}}var HS=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let i={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},a={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${p}`:`Nevalida enigo: atendi\u011Dis ${r}, ricevi\u011Dis ${p}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${D(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${r}${o.maximum.toString()} ${d.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${r}${o.minimum.toString()} ${d.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${r.prefix}"`:r.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${r.suffix}"`:r.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${r.includes}"`:r.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`:`Nevalida ${i[r.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${M(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function ju(){return{localeError:HS()}}var JS=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${p}`:`Entrada inv\xE1lida: se esperaba ${r}, recibido ${p}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${D(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin),p=a[o.origin]??o.origin;return d?`Demasiado grande: se esperaba que ${p??"valor"} tuviera ${r}${o.maximum.toString()} ${d.unit??"elementos"}`:`Demasiado grande: se esperaba que ${p??"valor"} fuera ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin),p=a[o.origin]??o.origin;return d?`Demasiado peque\xF1o: se esperaba que ${p} tuviera ${r}${o.minimum.toString()} ${d.unit}`:`Demasiado peque\xF1o: se esperaba que ${p} fuera ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${r.prefix}"`:r.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${r.suffix}"`:r.format==="includes"?`Cadena inv\xE1lida: debe incluir "${r.includes}"`:r.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${r.pattern}`:`Inv\xE1lido ${i[r.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${M(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${a[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${a[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}};function Eu(){return{localeError:JS()}}var KS=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(o){return e[o]??null}let i={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},a={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${p} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${r} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${p} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${D(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${M(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${r}${o.maximum.toString()} ${d.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${r}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${r}${o.minimum.toString()} ${d.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${r}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${r.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:r.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${r.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:r.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${r.includes}" \u0628\u0627\u0634\u062F`:r.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${r.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${i[r.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${M(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Pu(){return{localeError:KS()}}var XS=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(o){return e[o]??null}let i={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${p}`:`Virheellinen tyyppi: odotettiin ${r}, oli ${p}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${D(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Liian suuri: ${d.subject} t\xE4ytyy olla ${r}${o.maximum.toString()} ${d.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Liian pieni: ${d.subject} t\xE4ytyy olla ${r}${o.minimum.toString()} ${d.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${r.prefix}"`:r.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${r.suffix}"`:r.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${r.includes}"`:r.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${r.pattern}`:`Virheellinen ${i[r.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${M(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Lu(){return{localeError:XS()}}var YS=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let i={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},a={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instance de ${o.expected} attendu, ${p} re\xE7u`:`Entr\xE9e invalide : ${r} attendu, ${p} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${D(o.values[0])} attendu`:`Option invalide : une valeur parmi ${M(o.values,"|")} attendue`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Trop grand : ${a[o.origin]??"valeur"} doit ${d.verb} ${r}${o.maximum.toString()} ${d.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${a[o.origin]??"valeur"} doit \xEAtre ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Trop petit : ${a[o.origin]??"valeur"} doit ${d.verb} ${r}${o.minimum.toString()} ${d.unit}`:`Trop petit : ${a[o.origin]??"valeur"} doit \xEAtre ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${r.prefix}"`:r.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${r.suffix}"`:r.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${r.includes}"`:r.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${r.pattern}`:`${i[r.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${M(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function Vu(){return{localeError:YS()}}var QS=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let i={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${p}`:`Entr\xE9e invalide : attendu ${r}, re\xE7u ${p}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${D(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"\u2264":"<",d=t(o.origin);return d?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${r}${o.maximum.toString()} ${d.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?"\u2265":">",d=t(o.origin);return d?`Trop petit : attendu que ${o.origin} ait ${r}${o.minimum.toString()} ${d.unit}`:`Trop petit : attendu que ${o.origin} soit ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${r.prefix}"`:r.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${r.suffix}"`:r.format==="includes"?`Cha\xEEne invalide : doit inclure "${r.includes}"`:r.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${r.pattern}`:`${i[r.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${M(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function Au(){return{localeError:QS()}}var ey=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(o){return e[o]??null}let i={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${r}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${p}`}case"invalid_value":return o.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${D(o.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${M(o.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${r}${o.maximum.toString()} ${d.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${r}${o.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${r}${o.minimum.toString()} ${d.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${r}${o.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${r.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:r.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${r.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:r.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${r.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:r.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${r.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${i[r.format]??o.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${o.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${o.keys.length>1?"\u0A93":""}: ${M(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o.options.map(d=>`'${d}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function Fu(){return{localeError:ey()}}var ty=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},i=u=>u?e[u]:void 0,a=u=>{let g=i(u);return g?g.label:u??e.unknown.label},o=u=>`\u05D4${a(u)}`,r=u=>(i(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",d=u=>u?t[u]??null:null,p={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},f={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let g=u.expected,S=f[g??""]??a(g),y=_(u.input),w=f[y]??e[y]?.label??y;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${w}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}, \u05D4\u05EA\u05E7\u05D1\u05DC ${w}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${D(u.values[0])}`;let g=u.values.map(w=>D(w));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${g[0]} \u05D0\u05D5 ${g[1]}`;let S=g[g.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${g.slice(0,-1).join(", ")} \u05D0\u05D5 ${S}`}case"too_big":{let g=d(u.origin),S=o(u.origin??"value");if(u.origin==="string")return`${g?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${S} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${g?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let O=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${S} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${O}`}if(u.origin==="array"||u.origin==="set"){let O=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",T=u.inclusive?`${u.maximum} ${g?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${g?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${S} ${O} \u05DC\u05D4\u05DB\u05D9\u05DC ${T}`.trim()}let y=u.inclusive?"<=":"<",w=r(u.origin??"value");return g?.unit?`${g.longLabel} \u05DE\u05D3\u05D9: ${S} ${w} ${y}${u.maximum.toString()} ${g.unit}`:`${g?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${S} ${w} ${y}${u.maximum.toString()}`}case"too_small":{let g=d(u.origin),S=o(u.origin??"value");if(u.origin==="string")return`${g?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${S} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${g?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let O=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${S} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${O}`}if(u.origin==="array"||u.origin==="set"){let O=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let j=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${S} ${O} \u05DC\u05D4\u05DB\u05D9\u05DC ${j}`}let T=u.inclusive?`${u.minimum} ${g?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${g?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${S} ${O} \u05DC\u05D4\u05DB\u05D9\u05DC ${T}`.trim()}let y=u.inclusive?">=":">",w=r(u.origin??"value");return g?.unit?`${g.shortLabel} \u05DE\u05D3\u05D9: ${S} ${w} ${y}${u.minimum.toString()} ${g.unit}`:`${g?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${S} ${w} ${y}${u.minimum.toString()}`}case"invalid_format":{let g=u;if(g.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${g.prefix}"`;if(g.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${g.suffix}"`;if(g.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${g.includes}"`;if(g.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${g.pattern}`;let S=p[g.format],y=S?.label??g.format,O=(S?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${y} \u05DC\u05D0 ${O}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${M(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Uu(){return{localeError:ty()}}var oy=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(o){return e[o]??null}let i={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${p}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${D(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${r}${o.maximum} ${d.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} ${r}${o.maximum} \u0939\u094B`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} \u092E\u0947\u0902 ${r}${o.minimum} ${d.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} ${r}${o.minimum} \u0939\u094B`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${r.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:r.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${r.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:r.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${r.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:r.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${r.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${i[r.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${o.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${o.keys.length>1?"\u092F\u093E\u0901":""}: ${M(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${o.origin} \u092E\u0947\u0902`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(d=>`'${d}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Nu(){return{localeError:oy()}}var ny=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(o){return e[o]??null}let i={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},a={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${p}`:`Neispravan unos: o\u010Dekuje se ${r}, a primljeno je ${p}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${D(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin),p=a[o.origin]??o.origin;return d?`Preveliko: o\u010Dekivano da ${p??"vrijednost"} ima ${r}${o.maximum.toString()} ${d.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${p??"vrijednost"} bude ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin),p=a[o.origin]??o.origin;return d?`Premalo: o\u010Dekivano da ${p} ima ${r}${o.minimum.toString()} ${d.unit}`:`Premalo: o\u010Dekivano da ${p} bude ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${r.prefix}"`:r.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${r.suffix}"`:r.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${r.includes}"`:r.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${r.pattern}`:`Neispravna ${i[r.format]??o.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${o.divisor}`;case"unrecognized_keys":return`Neprepoznat${o.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${M(o.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${a[o.origin]??o.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${a[o.origin]??o.origin}`;default:return"Neispravan unos"}}};function qu(){return{localeError:ny()}}var ry=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let i={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},a={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${p}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${r}, a kapott \xE9rt\xE9k ${p}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${D(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${r}${o.maximum.toString()} ${d.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${r}${o.minimum.toString()} ${d.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\xC9rv\xE9nytelen string: "${r.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:r.format==="ends_with"?`\xC9rv\xE9nytelen string: "${r.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:r.format==="includes"?`\xC9rv\xE9nytelen string: "${r.includes}" \xE9rt\xE9ket kell tartalmaznia`:r.format==="regex"?`\xC9rv\xE9nytelen string: ${r.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${i[r.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${M(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Bu(){return{localeError:ry()}}function Wu(e,t,i){return Math.abs(e)===1?t:i}function co(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],i=e[e.length-1];return e+(t.includes(i)?"\u0576":"\u0568")}var iy=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(o){return e[o]??null}let i={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},a={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${p}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${r}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${p}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${D(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);if(d){let p=Number(o.maximum),f=Wu(p,d.unit.one,d.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${co(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${r}${o.maximum.toString()} ${f}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${co(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);if(d){let p=Number(o.minimum),f=Wu(p,d.unit.one,d.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${co(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${r}${o.minimum.toString()} ${f}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${co(o.origin)} \u056C\u056B\u0576\u056B ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${r.prefix}"-\u0578\u057E`:r.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${r.suffix}"-\u0578\u057E`:r.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${r.includes}"`:r.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${r.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${i[r.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${M(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${co(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${co(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Zu(){return{localeError:iy()}}var ay=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${p}`:`Input tidak valid: diharapkan ${r}, diterima ${p}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${D(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${r}${o.maximum.toString()} ${d.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Terlalu kecil: diharapkan ${o.origin} memiliki ${r}${o.minimum.toString()} ${d.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`String tidak valid: harus dimulai dengan "${r.prefix}"`:r.format==="ends_with"?`String tidak valid: harus berakhir dengan "${r.suffix}"`:r.format==="includes"?`String tidak valid: harus menyertakan "${r.includes}"`:r.format==="regex"?`String tidak valid: harus sesuai pola ${r.pattern}`:`${i[r.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${M(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}};function Gu(){return{localeError:ay()}}var sy=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let i={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},a={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${p} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${p} \xFEar sem \xE1 a\xF0 vera ${r}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${D(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${r}${o.maximum.toString()} ${d.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${r}${o.minimum.toString()} ${d.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${r.prefix}"`:r.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${r.suffix}"`:r.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${r.includes}"`:r.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${r.pattern}`:`Rangt ${i[r.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${M(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}};function Hu(){return{localeError:sy()}}var cy=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${p}`:`Input non valido: atteso ${r}, ricevuto ${p}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${D(o.values[0])}`:`Opzione non valida: atteso uno tra ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Troppo grande: ${o.origin??"valore"} deve avere ${r}${o.maximum.toString()} ${d.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Troppo piccolo: ${o.origin} deve avere ${r}${o.minimum.toString()} ${d.unit}`:`Troppo piccolo: ${o.origin} deve essere ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Stringa non valida: deve iniziare con "${r.prefix}"`:r.format==="ends_with"?`Stringa non valida: deve terminare con "${r.suffix}"`:r.format==="includes"?`Stringa non valida: deve includere "${r.includes}"`:r.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${r.pattern}`:`Input non valido: ${i[r.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${M(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}};function Ju(){return{localeError:cy()}}var dy=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(o){return e[o]??null}let i={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},a={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${p}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${r}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${p}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${D(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${M(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let r=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",d=t(o.origin);return d?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${d.unit??"\u8981\u7D20"}${r}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${r}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let r=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",d=t(o.origin);return d?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${d.unit}${r}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${r}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${r.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:r.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${r.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:r.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${r.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:r.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${r.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${i[r.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${M(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Ku(){return{localeError:dy()}}var py=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let i={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},a={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${p}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${p}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${D(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${M(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${d.verb} ${r}${o.maximum.toString()} ${d.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${d.verb} ${r}${o.minimum.toString()} ${d.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${r.prefix}"-\u10D8\u10D7`:r.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${r.suffix}"-\u10D8\u10D7`:r.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${r.includes}"-\u10E1`:r.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${r.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${i[r.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${M(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Xu(){return{localeError:py()}}var my=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(o){return e[o]??null}let i={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},a={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${p}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${p}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${D(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${r} ${o.maximum.toString()} ${d.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${r} ${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${r} ${o.minimum.toString()} ${d.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${r} ${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${r.prefix}"`:r.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${r.suffix}"`:r.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${r.includes}"`:r.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${r.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${i[r.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${M(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Jr(){return{localeError:my()}}function Yu(){return Jr()}var ly=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(o){return e[o]??null}let i={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${r}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${p}`}case"invalid_value":return o.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${D(o.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${r}${o.maximum.toString()} ${d.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${r}${o.minimum.toString()} ${d.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${r.prefix}"`:r.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${r.suffix}"`:r.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${r.includes}"`:r.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${r.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${i[r.format]??o.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${o.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${o.keys.length>1?"s":""}: ${M(o.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.options.map(d=>`'${d}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${o.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function Qu(){return{localeError:ly()}}var uy=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"},map:{unit:"\uAC1C",verb:"to have"}};function t(o){return e[o]??null}let i={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${p}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${r}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${p}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${D(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${M(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let r=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",d=r==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",p=t(o.origin),f=p?.unit??"\uC694\uC18C";return p?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${f} ${r}${d}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${r}${d}`}case"too_small":{let r=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",d=r==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",p=t(o.origin),f=p?.unit??"\uC694\uC18C";return p?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${f} ${r}${d}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${r}${d}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${r.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:r.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${r.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:r.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${r.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:r.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${r.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${i[r.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${M(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function ef(){return{localeError:uy()}}var vn=e=>e.charAt(0).toUpperCase()+e.slice(1);function tf(e){let t=Math.abs(e),i=t%10,a=t%100;return a>=11&&a<=19||i===0?"many":i===1?"one":"few"}var fy=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,r,d,p){let f=e[o]??null;return f===null?f:{unit:f.unit[r],verb:f.verb[p][d?"inclusive":"notInclusive"]}}let i={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},a={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${p}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${p}, o tik\u0117tasi - ${r}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${D(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${M(o.values,"|")} pasirinkim\u0173`;case"too_big":{let r=a[o.origin]??o.origin,d=t(o.origin,tf(Number(o.maximum)),o.inclusive??!1,"smaller");if(d?.verb)return`${vn(r??o.origin??"reik\u0161m\u0117")} ${d.verb} ${o.maximum.toString()} ${d.unit??"element\u0173"}`;let p=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${vn(r??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${p} ${o.maximum.toString()} ${d?.unit}`}case"too_small":{let r=a[o.origin]??o.origin,d=t(o.origin,tf(Number(o.minimum)),o.inclusive??!1,"bigger");if(d?.verb)return`${vn(r??o.origin??"reik\u0161m\u0117")} ${d.verb} ${o.minimum.toString()} ${d.unit??"element\u0173"}`;let p=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${vn(r??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${p} ${o.minimum.toString()} ${d?.unit}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${r.prefix}"`:r.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${r.suffix}"`:r.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${r.includes}"`:r.format==="regex"?`Eilut\u0117 privalo atitikti ${r.pattern}`:`Neteisingas ${i[r.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${M(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let r=a[o.origin]??o.origin;return`${vn(r??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function of(){return{localeError:fy()}}var hy=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(o){return e[o]??null}let i={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},a={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${p}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${p}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${D(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${r}${o.maximum.toString()} ${d.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${r}${o.minimum.toString()} ${d.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${r.prefix}"`:r.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${r.suffix}"`:r.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${r.includes}"`:r.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${r.pattern}`:`Invalid ${i[r.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${M(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function nf(){return{localeError:hy()}}var gy=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${p}`:`Input tidak sah: dijangka ${r}, diterima ${p}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${D(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Terlalu besar: dijangka ${o.origin??"nilai"} ${d.verb} ${r}${o.maximum.toString()} ${d.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Terlalu kecil: dijangka ${o.origin} ${d.verb} ${r}${o.minimum.toString()} ${d.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`String tidak sah: mesti bermula dengan "${r.prefix}"`:r.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${r.suffix}"`:r.format==="includes"?`String tidak sah: mesti mengandungi "${r.includes}"`:r.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${r.pattern}`:`${i[r.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${M(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}};function rf(){return{localeError:gy()}}var xy=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(o){return e[o]??null}let i={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${r}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${p}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${D(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} \u092E\u093E ${r}${o.maximum.toString()} ${d.unit} ${d.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} ${r}${o.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} \u092E\u093E ${r}${o.minimum.toString()} ${d.unit} ${d.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} ${r}${o.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${r.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:r.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${r.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:r.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${r.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:r.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${r.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${i[r.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${o.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${o.keys.length>1?"\u0939\u0930\u0942":""}: ${M(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${o.origin} \u092E\u093E`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(d=>`'${d}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function af(){return{localeError:xy()}}var zy=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},a={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${p}`:`Ongeldige invoer: verwacht ${r}, ontving ${p}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${D(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin),p=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return d?`Te ${p}: verwacht dat ${o.origin??"waarde"} ${r}${o.maximum.toString()} ${d.unit??"elementen"} ${d.verb}`:`Te ${p}: verwacht dat ${o.origin??"waarde"} ${r}${o.maximum.toString()} is`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin),p=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return d?`Te ${p}: verwacht dat ${o.origin} ${r}${o.minimum.toString()} ${d.unit} ${d.verb}`:`Te ${p}: verwacht dat ${o.origin} ${r}${o.minimum.toString()} is`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Ongeldige tekst: moet met "${r.prefix}" beginnen`:r.format==="ends_with"?`Ongeldige tekst: moet op "${r.suffix}" eindigen`:r.format==="includes"?`Ongeldige tekst: moet "${r.includes}" bevatten`:r.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${r.pattern}`:`Ongeldig: ${i[r.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${M(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}};function sf(){return{localeError:zy()}}var by=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(o){return e[o]??null}let i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"tal",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventa instanceof ${o.expected}, fekk ${p}`:`Ugyldig input: forventa ${r}, fekk ${p}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventa ${D(o.values[0])}`:`Ugyldig val: forventa eitt av ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${r}${o.maximum.toString()} ${d.unit??"element"}`:`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`For lite(n): forventa ${o.origin} til \xE5 ha ${r}${o.minimum.toString()} ${d.unit}`:`For lite(n): forventa ${o.origin} til \xE5 ha ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${r.prefix}"`:r.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${r.suffix}"`:r.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${r.includes}"`:r.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${r.pattern}`:`Ugyldig ${i[r.format]??o.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${M(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function cf(){return{localeError:by()}}var Sy=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(o){return e[o]??null}let i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${p}`:`Ugyldig input: forventet ${r}, fikk ${p}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${D(o.values[0])}`:`Ugyldig valg: forventet en av ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${r}${o.maximum.toString()} ${d.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`For lite(n): forventet ${o.origin} til \xE5 ha ${r}${o.minimum.toString()} ${d.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${r.prefix}"`:r.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${r.suffix}"`:r.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${r.includes}"`:r.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${r.pattern}`:`Ugyldig ${i[r.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${M(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function df(){return{localeError:Sy()}}var yy=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let i={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},a={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${p}`:`F\xE2sit giren: umulan ${r}, al\u0131nan ${p}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${D(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${r}${o.maximum.toString()} ${d.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${r}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${r}${o.minimum.toString()} ${d.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${r}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let r=o;return r.format==="starts_with"?`F\xE2sit metin: "${r.prefix}" ile ba\u015Flamal\u0131.`:r.format==="ends_with"?`F\xE2sit metin: "${r.suffix}" ile bitmeli.`:r.format==="includes"?`F\xE2sit metin: "${r.includes}" ihtiv\xE2 etmeli.`:r.format==="regex"?`F\xE2sit metin: ${r.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${i[r.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${M(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function pf(){return{localeError:yy()}}var vy=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(o){return e[o]??null}let i={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},a={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${p} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${r} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${p} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${D(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${M(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${r}${o.maximum.toString()} ${d.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${r}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${r}${o.minimum.toString()} ${d.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${r}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${r.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:r.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${r.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:r.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${r.includes}" \u0648\u0644\u0631\u064A`:r.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${r.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${i[r.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${M(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function mf(){return{localeError:vy()}}var wy=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(o){return e[o]??null}let i={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},a={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${p}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${r}, otrzymano ${p}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${D(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${r}${o.maximum.toString()} ${d.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${r}${o.minimum.toString()} ${d.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${r.prefix}"`:r.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${r.suffix}"`:r.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${r.includes}"`:r.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${r.pattern}`:`Nieprawid\u0142ow(y/a/e) ${i[r.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${M(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function lf(){return{localeError:wy()}}var Ry=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(d){return e[d]??null}let i={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},a={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:a.masculine},number:{name:"n\xFAmero",articles:a.masculine},int:{name:"n\xFAmero inteiro",articles:a.masculine},boolean:{name:"valor booleano",articles:a.masculine},bigint:{name:"n\xFAmero bigint",articles:a.masculine},symbol:{name:"s\xEDmbolo",articles:a.masculine},undefined:{name:'valor "undefined"',articles:a.masculine},null:{name:'valor "nulo"',articles:a.masculine},never:{name:'valor "never"',articles:a.masculine},void:{name:'valor "void"',articles:a.masculine},date:{name:"data",articles:a.feminine},array:{name:"vetor",articles:a.masculine},object:{name:"objeto",articles:a.masculine},tuple:{name:"tuplo",articles:a.masculine},record:{name:"registo",articles:a.masculine},map:{name:"mapa",articles:a.masculine},set:{name:"conjunto",articles:a.masculine},file:{name:"ficheiro",articles:a.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:a.masculine},nan:{name:'valor "NaN"',articles:a.masculine},function:{name:"fun\xE7\xE3o",articles:a.feminine}};function r(d,p){let f=o[d]??{name:`valor "${d}"`,articles:a.masculine};return`${f.articles[p]} ${f.name}`}return d=>{switch(d.code){case"invalid_type":{let p=r(d.expected,"indefinite"),f=_(d.input),u=r(f,"indefinite");return`Entrada inv\xE1lida: esperava ${p}, recebeu ${u}`}case"invalid_value":return d.values.length===1?`Entrada inv\xE1lida: esperava ${D(d.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${M(d.values,"|")}`;case"too_big":{let p=d.inclusive?"<=":"<",f=t(d.origin);return f?`Demasiado grande: esperava que ${r(d.origin,"definite")} tivesse ${p} ${d.maximum.toString()} ${f.unit??"elementos"}`:`Demasiado grande: esperava que ${r(d.origin,"definite")} fosse ${p} ${d.maximum.toString()}`}case"too_small":{let p=d.inclusive?">=":">",f=t(d.origin);return f?`Demasiado pequeno: esperava que ${r(d.origin,"definite")} tivesse ${p} ${d.minimum.toString()} ${f.unit??"elementos"}`:`Demasiado pequeno: esperava que ${r(d.origin,"definite")} fosse ${p} ${d.minimum.toString()}`}case"invalid_format":{let p=d;return p.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${p.prefix}"`:p.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${p.suffix}"`:p.format==="includes"?`Texto inv\xE1lido: deve incluir "${p.includes}"`:p.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${p.pattern}`:`Formato d${i[p.format]??d.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${d.divisor}`;case"unrecognized_keys":{let p=d.keys.length>1?"s":"";return`Chave${p} inv\xE1lida${p}: ${M(d.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${r(d.origin,"definite")}`;case"invalid_union":return d.options&&Array.isArray(d.options)&&d.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${d.options.map(f=>`'${f}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${r(d.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function uf(){return{localeError:Ry()}}var Iy=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(d){return e[d]??null}let i={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},a={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:a.masculine},number:{name:"n\xFAmero",articles:a.masculine},int:{name:"n\xFAmero inteiro",articles:a.masculine},boolean:{name:"valor booleano",articles:a.masculine},bigint:{name:"n\xFAmero bigint",articles:a.masculine},symbol:{name:"s\xEDmbolo",articles:a.masculine},undefined:{name:'valor "undefined"',articles:a.masculine},null:{name:'valor "nulo"',articles:a.masculine},never:{name:'valor "never"',articles:a.masculine},void:{name:'valor "void"',articles:a.masculine},date:{name:"data",articles:a.feminine},array:{name:"vetor",articles:a.masculine},object:{name:"objeto",articles:a.masculine},tuple:{name:"tupla",articles:a.feminine},record:{name:"registro",articles:a.masculine},map:{name:"mapa",articles:a.masculine},set:{name:"conjunto",articles:a.masculine},file:{name:"arquivo",articles:a.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:a.masculine},nan:{name:'valor "NaN"',articles:a.masculine},function:{name:"fun\xE7\xE3o",articles:a.feminine}};function r(d,p){let f=o[d]??{name:`valor "${d}"`,articles:a.masculine};return`${f.articles[p]} ${f.name}`}return d=>{switch(d.code){case"invalid_type":{let p=r(d.expected,"indefinite"),f=_(d.input),u=r(f,"indefinite");return`Entrada inv\xE1lida: esperava ${p}, recebeu ${u}`}case"invalid_value":return d.values.length===1?`Entrada inv\xE1lida: esperava ${D(d.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${M(d.values,"|")}`;case"too_big":{let p=d.inclusive?"<=":"<",f=t(d.origin);return f?`Grande demais: esperava que ${r(d.origin,"definite")} tivesse ${p} ${d.maximum.toString()} ${f.unit??"elementos"}`:`Grande demais: esperava que ${r(d.origin,"definite")} fosse ${p} ${d.maximum.toString()}`}case"too_small":{let p=d.inclusive?">=":">",f=t(d.origin);return f?`Pequeno demais: esperava que ${r(d.origin,"definite")} tivesse ${p} ${d.minimum.toString()} ${f.unit??"elementos"}`:`Pequeno demais: esperava que ${r(d.origin,"definite")} fosse ${p} ${d.minimum.toString()}`}case"invalid_format":{let p=d;return p.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${p.prefix}"`:p.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${p.suffix}"`:p.format==="includes"?`Texto inv\xE1lido: deve incluir "${p.includes}"`:p.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${p.pattern}`:`Formato d${i[p.format]??d.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${d.divisor}`;case"unrecognized_keys":{let p=d.keys.length>1?"s":"";return`Chave${p} inv\xE1lida${p}: ${M(d.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${r(d.origin,"definite")}`;case"invalid_union":return d.options&&Array.isArray(d.options)&&d.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${d.options.map(f=>`'${f}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${r(d.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function ff(){return{localeError:Iy()}}var My=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(o){return e[o]??null}let i={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},a={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return`Intrare invalid\u0103: a\u0219teptat ${r}, primit ${p}`}case"invalid_value":return o.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${D(o.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} ${d.verb} ${r}${o.maximum.toString()} ${d.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} s\u0103 fie ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Prea mic: a\u0219teptat ca ${o.origin} ${d.verb} ${r}${o.minimum.toString()} ${d.unit}`:`Prea mic: a\u0219teptat ca ${o.origin} s\u0103 fie ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${r.prefix}"`:r.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${r.suffix}"`:r.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${r.includes}"`:r.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${r.pattern}`:`Format invalid: ${i[r.format]??o.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${o.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${M(o.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${o.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${o.origin}`;default:return"Intrare invalid\u0103"}}};function hf(){return{localeError:My()}}function gf(e,t,i,a){let o=Math.abs(e),r=o%10,d=o%100;return d>=11&&d<=19?a:r===1?t:r>=2&&r<=4?i:a}var Oy=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(o){return e[o]??null}let i={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},a={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${p}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${r}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${p}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${D(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);if(d){let p=Number(o.maximum),f=gf(p,d.unit.one,d.unit.few,d.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${r}${o.maximum.toString()} ${f}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);if(d){let p=Number(o.minimum),f=gf(p,d.unit.one,d.unit.few,d.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${r}${o.minimum.toString()} ${f}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${r.prefix}"`:r.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${r.suffix}"`:r.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${r.includes}"`:r.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${r.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${i[r.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${M(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function xf(){return{localeError:Oy()}}var $y=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(o){return e[o]??null}let i={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},a={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${o.expected}, obdr\u017Ean\xE9 ${p}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${r}, obdr\u017Ean\xE9 ${p}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${D(o.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${r}${o.maximum.toString()} ${d.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${r}${o.minimum.toString()} ${d.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${r.prefix}"`:r.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${r.suffix}"`:r.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${r.includes}"`:r.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${r.pattern}`:`Neplatn\xFD form\xE1t ${i[r.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${M(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function zf(){return{localeError:$y()}}var Ty=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let i={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},a={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${p}`:`Neveljaven vnos: pri\u010Dakovano ${r}, prejeto ${p}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${D(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${r}${o.maximum.toString()} ${d.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${r}${o.minimum.toString()} ${d.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${r.prefix}"`:r.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${r.suffix}"`:r.format==="includes"?`Neveljaven niz: mora vsebovati "${r.includes}"`:r.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${r.pattern}`:`Neveljaven ${i[r.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${M(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}};function bf(){return{localeError:Ty()}}var ky=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(o){return e[o]??null}let i={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},a={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${p}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${r}, fick ${p}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${D(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${r}${o.maximum.toString()} ${d.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${r}${o.minimum.toString()} ${d.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${r.prefix}"`:r.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${r.suffix}"`:r.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${r.includes}"`:r.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${r.pattern}"`:`Ogiltig(t) ${i[r.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${M(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Sf(){return{localeError:ky()}}var Cy=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(o){return e[o]??null}let i={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${p}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${p}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${D(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${M(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${r}${o.maximum.toString()} ${d.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${r}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${r}${o.minimum.toString()} ${d.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${r}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${r.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:r.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${r.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:r.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${r.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:r.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${r.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${i[r.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${M(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function yf(){return{localeError:Cy()}}var Dy=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(o){return e[o]??null}let i={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},a={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${r} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${p} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return o.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${D(o.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${M(o.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${r}${o.maximum.toString()} ${d.unit} ${d.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${r}${o.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${r}${o.minimum.toString()} ${d.unit} ${d.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${r}${o.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${r.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:r.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${r.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:r.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${r.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:r.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${r.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${i[r.format]??o.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${o.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${o.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${M(o.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${o.options.map(d=>`'${d}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function vf(){return{localeError:Dy()}}var _y=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(o){return e[o]??null}let i={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},a={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${p}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${r} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${p}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${D(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",d=t(o.origin);return d?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${r} ${o.maximum.toString()} ${d.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${r} ${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",d=t(o.origin);return d?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${r} ${o.minimum.toString()} ${d.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${r} ${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${r.prefix}"`:r.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${r.suffix}"`:r.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${r.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:r.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${r.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${i[r.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${M(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function wf(){return{localeError:_y()}}var jy=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(o){return e[o]??null}let i={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return`N\xE4dogry baha: gara\u015Fylan ${r} \xFDerine ${p} alyndy`}case"invalid_value":return o.values.length===1?`N\xE4dogry baha: ${D(o.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${r} ${o.maximum.toString()} ${d.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${r} ${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${r} ${o.minimum.toString()} ${d.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${r} ${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`N\xE4dogry setir: "${r.prefix}" bilen ba\u015Flamaly`:r.format==="ends_with"?`N\xE4dogry setir: "${r.suffix}" bilen gutarmaly`:r.format==="includes"?`N\xE4dogry setir: "${r.includes}" saklamaly`:r.format==="regex"?`N\xE4dogry setir: ${r.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${i[r.format]??o.format}`}case"not_multiple_of":return`N\xE4dogry san: ${o.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${o.keys.length>1?"lar":""}: ${M(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${o.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function Rf(){return{localeError:jy()}}var Ey=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let i={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${p}`:`Ge\xE7ersiz de\u011Fer: beklenen ${r}, al\u0131nan ${p}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${D(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${r}${o.maximum.toString()} ${d.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${r}${o.minimum.toString()} ${d.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Ge\xE7ersiz metin: "${r.prefix}" ile ba\u015Flamal\u0131`:r.format==="ends_with"?`Ge\xE7ersiz metin: "${r.suffix}" ile bitmeli`:r.format==="includes"?`Ge\xE7ersiz metin: "${r.includes}" i\xE7ermeli`:r.format==="regex"?`Ge\xE7ersiz metin: ${r.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${i[r.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${M(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function If(){return{localeError:Ey()}}var Py=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(o){return e[o]??null}let i={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},a={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${p}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${r}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${p}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${D(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${d.verb} ${r}${o.maximum.toString()} ${d.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${d.verb} ${r}${o.minimum.toString()} ${d.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${r.prefix}"`:r.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${r.suffix}"`:r.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${r.includes}"`:r.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${r.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${i[r.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${M(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Kr(){return{localeError:Py()}}function Mf(){return Kr()}var Ly=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(o){return e[o]??null}let i={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},a={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${p} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${r} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${p} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${D(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${M(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${r}${o.maximum.toString()} ${d.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${r}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${r}${o.minimum.toString()} ${d.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${r}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${r.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:r.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${r.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:r.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${r.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:r.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${r.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${i[r.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${M(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Of(){return{localeError:Ly()}}var Vy=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(o){return e[o]??null}let i={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},a={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${p}`:`Noto\u2018g\u2018ri kirish: kutilgan ${r}, qabul qilingan ${p}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${D(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Juda katta: kutilgan ${o.origin??"qiymat"} ${r}${o.maximum.toString()} ${d.unit} ${d.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Juda kichik: kutilgan ${o.origin} ${r}${o.minimum.toString()} ${d.unit} ${d.verb}`:`Juda kichik: kutilgan ${o.origin} ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${r.prefix}" bilan boshlanishi kerak`:r.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${r.suffix}" bilan tugashi kerak`:r.format==="includes"?`Noto\u2018g\u2018ri satr: "${r.includes}" ni o\u2018z ichiga olishi kerak`:r.format==="regex"?`Noto\u2018g\u2018ri satr: ${r.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${i[r.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${M(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function $f(){return{localeError:Vy()}}var Ay=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(o){return e[o]??null}let i={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},a={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${p}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${r}, nh\u1EADn \u0111\u01B0\u1EE3c ${p}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${D(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${d.verb} ${r}${o.maximum.toString()} ${d.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${d.verb} ${r}${o.minimum.toString()} ${d.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${r.prefix}"`:r.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${r.suffix}"`:r.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${r.includes}"`:r.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${r.pattern}`:`${i[r.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${M(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Tf(){return{localeError:Ay()}}var Fy=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(o){return e[o]??null}let i={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},a={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${p}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${r}\uFF0C\u5B9E\u9645\u63A5\u6536 ${p}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${D(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${r}${o.maximum.toString()} ${d.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${r}${o.minimum.toString()} ${d.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${r.prefix}" \u5F00\u5934`:r.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${r.suffix}" \u7ED3\u5C3E`:r.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${r.includes}"`:r.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${r.pattern}`:`\u65E0\u6548${i[r.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${M(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function kf(){return{localeError:Fy()}}var Uy=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(o){return e[o]??null}let i={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},a={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${p}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${r}\uFF0C\u4F46\u6536\u5230 ${p}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${D(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${r}${o.maximum.toString()} ${d.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${r}${o.minimum.toString()} ${d.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${r.prefix}" \u958B\u982D`:r.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${r.suffix}" \u7D50\u5C3E`:r.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${r.includes}"`:r.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${r.pattern}`:`\u7121\u6548\u7684 ${i[r.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${M(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Cf(){return{localeError:Uy()}}var Ny=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"},map:{unit:"nkan",verb:"n\xED"}};function t(o){return e[o]??null}let i={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},a={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let r=a[o.expected]??o.expected,d=_(o.input),p=a[d]??d;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${p}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${r}, \xE0m\u1ECD\u0300 a r\xED ${p}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${D(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${M(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",d=t(o.origin);return d?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${d.verb} ${r}${o.maximum} ${d.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${r}${o.maximum}`}case"too_small":{let r=o.inclusive?">=":">",d=t(o.origin);return d?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${d.verb} ${r}${o.minimum} ${d.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${r}${o.minimum}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${r.prefix}"`:r.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${r.suffix}"`:r.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${r.includes}"`:r.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${r.pattern}`:`A\u1E63\xEC\u1E63e: ${i[r.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${M(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Df(){return{localeError:Ny()}}var _f,fd=Symbol("ZodOutput"),hd=Symbol("ZodInput"),Xr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...i){let a=i[0];return this._map.set(t,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let i=this._map.get(t);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(t),this}get(t){let i=t._zod.parent;if(i){let a={...this.get(i)??{}};delete a.id;let o={...a,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Yr(){return new Xr}(_f=globalThis).__zod_globalRegistry??(_f.__zod_globalRegistry=Yr());var $e=globalThis.__zod_globalRegistry;var je=Symbol.for("zod.compile.invalid"),jf=Symbol.for("zod.compile.fallback"),Ye=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},te=class extends Error{constructor(t,i=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=i}};function By(e,t){try{return ei(e,{assertOnly:!0})}catch{return t}}function bd(e,t){try{let i=ei(e),a=Qr(e,i);return a._zod.bag.validator=By(e,i),a}catch(i){if(t?.strict)throw i;return e}}function Qr(e,t){if(Zr(e))throw new te("a schema whose subtree contains a reference cycle");let i=re(e),a=e._zod.run,o=a.__originalRun??a,r=(d,p)=>{if(p?.async||p?.direction==="backward"||p?.skipChecks||p?.[jf]||p&&Gr(p,d.value))return o(d,p);let f=t(d.value);return f!==je?(d.value=f,d):(p&&(p[jf]=!0),o(d,p))};return r.__originalRun=o,i._zod.bag.fallbackRun=o,i._zod.bag.validator=t,i._zod.run=r,a.__originalRun||Wy(i,e,t),i}function Wy(e,t,i){let a=e,o=t;if(typeof o.safeParse=="function"){let r=o.safeParse;a.safeParse=(d,p)=>{let f=i(d);return f!==je?{success:!0,data:f}:r(d,p)}}if(typeof o.parse=="function"){let r=o.parse;a.parse=(d,p)=>{let f=i(d);return f!==je?f:r(d,p)}}}function ei(e,t){let i=!0;try{i=Zr(e)}catch{}if(i)throw new te("a schema whose subtree contains a reference cycle");let a={constants:new Map,constantCounter:0,varCounter:0,definite:!0},o=new _t(["input"]),r=fe(o,a,e,"input",!t?.assertOnly);o.write(r===null?"return true;":`return ${r};`);let d=["INVALID",...a.constants.keys()],p=[je,...a.constants.values()],f=o.content.join(`
73
+ `),u=t?.debug?d.length>0?`// Constants: ${d.join(", ")}
74
+ ${f}`:f:"",g=Function,S=`return (input) => {
75
+ ${f}
76
+ }`,y;try{y=new g(...d,S)(...p)}catch(w){throw new te(`this schema (generated code failed to evaluate: ${w.message})`)}return t?.debug&&(y.code=u),y.definite=a.definite,y}function J(e,t){for(let[a,o]of e.constants)if(o===t)return a;let i=`c${e.constantCounter++}`;return e.constants.set(i,t),i}function Lt(e,t){return e.definite=!1,J(e,t)}function G(e){return`v${e.varCounter++}`}function Zy(e,t){let i=e._zod.run({value:t,issues:[]},{});if(i&&typeof i.then=="function")return je;let a=i;return a.issues.length===0?a.value:je}function ke(e,t,i,a,o=!0){let r=e.content.length,d=t.constants.size,p=t.constantCounter,f=t.varCounter;try{return fe(e,t,i,a,o)}catch(u){if(!(u instanceof te)||!u.islandable)throw u;if(e.content.length=r,t.constants.size>d){let g=Array.from(t.constants.keys()).slice(d);for(let S of g)t.constants.delete(S)}return t.constantCounter=p,t.varCounter=f,Gy(e,t,i,a)}}function Gy(e,t,i,a){t.definite=!1;let o=J(t,i),r=J(t,Zy),d=G(t);return e.write(`const ${d} = ${r}(${o}, ${a});`),e.write(`if (${d} === INVALID) return INVALID;`),d}var Hy=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function Jy(e,t,i,a){let o=i._zod.def.checks;if(!o||o.length===0)return a;let r=a;for(let d of o){let p=d._zod.def;if(p.when&&!Hy.has(p.check))throw new te('check with a custom "when" condition');switch(p.check){case"greater_than":Ky(e,t,p,r);break;case"less_than":Xy(e,t,p,r);break;case"multiple_of":Yy(e,t,p,r);break;case"number_format":Ff(e,p,r);break;case"min_length":{let f=Et(p.minimum,"min_length"),u=gd(e,t,r,`${r}.length >= ${f} && ${r}.length < ${p.minimum*2}`);e.write(`if (${u} < ${f}) return INVALID;`);break}case"max_length":{let f=Et(p.maximum,"max_length"),u=gd(e,t,r,`${r}.length > ${f}`);e.write(`if (${u} > ${f}) return INVALID;`);break}case"length_equals":{let f=Et(p.length,"length_equals"),u=gd(e,t,r,`${r}.length >= ${f} && ${r}.length <= ${p.length*2}`);e.write(`if (${u} !== ${f}) return INVALID;`);break}case"min_size":e.write(`if (${r}.size < ${Et(p.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${r}.size > ${Et(p.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${r}.size !== ${Et(p.size,"size_equals")}) return INVALID;`);break;case"string_format":r=Uf(e,t,p,r);break;case"custom":r=rv(e,t,d,r);break;case"bigint_format":Qy(e,p,r);break;case"mime_type":ev(e,t,p,r);break;case"property":ov(e,t,p,r);break;case"properties":tv(e,t,p,r);break;case"overwrite":{let f=G(t);nv(e,t,d,r,f),r=f;break}default:throw new te(`check type ${p.check}`)}}return r}function gd(e,t,i,a){let o=J(t,Ct),r=G(t);return e.write(`const ${r} = typeof ${i} === "string" && ${a} ? ${o}(${i}) : ${i}.length;`),r}function Et(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new te(`${t} bound of type ${typeof e}`);return`${e}`}function Af(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new te("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new te("comparison check with Invalid Date bound");return J(e,t)}throw new te(`comparison check bound of type ${typeof t}`)}function Ky(e,t,i,a){let o=i.inclusive?"<":"<=";e.write(`if (${a} ${o} ${Af(t,i.value)}) return INVALID;`)}function Xy(e,t,i,a){let o=i.inclusive?">":">=";e.write(`if (${a} ${o} ${Af(t,i.value)}) return INVALID;`)}function Yy(e,t,i,a){if(typeof i.value=="bigint"){if(i.value===BigInt(0))throw new te("multiple_of check with a zero divisor");e.write(`if (${a} % ${i.value}n !== 0n) return INVALID;`)}else{let o=J(t,Go);e.write(`if (${o}(${a}, ${Et(i.value,"multiple_of")}) !== 0) return INVALID;`)}}function Ff(e,t,i){let a=t.format;switch(a){case"safeint":e.write(`if (!Number.isSafeInteger(${i})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${i}) || ${i} < -2147483648 || ${i} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${i}) || ${i} < 0 || ${i} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${i}) || ${i} < -3.4028234663852886e38 || ${i} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${i})) return INVALID;`);break;default:throw new te(`number format ${a}`)}}function Qy(e,t,i){let a=t.format;if(a)switch(a){case"int64":e.write(`if (${i} < -9223372036854775808n || ${i} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${i} < 0n || ${i} > 18446744073709551615n) return INVALID;`);break;default:throw new te(`bigint format ${a}`)}}function ev(e,t,i,a){let o=i.mime;if(o&&o.length>0){let r=J(t,new Set(o));e.write(`if (!${r}.has(${a}.type)) return INVALID;`)}}function tv(e,t,i,a){if(i.when)throw new te('check with a custom "when" condition');e.write(`if (${a} == null) return INVALID;`);let o=i.shape;for(let r of Reflect.ownKeys(o)){let d=typeof r=="symbol"?J(t,r):De(r),p=G(t);e.write(`const ${p} = ${a}[${d}];`),ke(e,t,o[r],p,!1)}}function ov(e,t,i,a){let o=`${a}[${JSON.stringify(i.property)}]`;fe(e,t,i.schema,o)}function nv(e,t,i,a,o){let r=i._zod.def.tx;if(!r)throw new te("overwrite check without a transform function");if(Vt(r))throw new Ye("z.compile: async overwrite transforms are not supported");let d=J(t,r);e.write(`const ${o} = ${d}(${a});`)}function xd(){throw new Fe}function Sd(e){this.issues.push(e)}function rv(e,t,i,a){let o=i._zod.def;if(o.fn){if(Vt(o.fn))throw new Ye("z.compile: async .refine() predicates are not supported");let r=Lt(t,o.fn),d=J(t,xd),p=G(t);return e.write(`const ${p} = ${r}(${a});`),e.write(`if (${p} instanceof Promise) ${d}();`),e.write(`if (!${p}) return INVALID;`),a}if(i._zod.check){if(Vt(i._zod.check))throw new Ye("z.compile: async .superRefine() / check functions are not supported");let r=i._zod.check,p=Lt(t,u=>{let g={value:u,issues:[],addIssue:Sd};return r(g)instanceof Promise&&xd(),g.issues.length===0?g.value:je}),f=G(t);return e.write(`const ${f} = ${p}(${a});`),e.write(`if (${f} === INVALID) return INVALID;`),f}throw new te("custom check without a predicate or check function")}var iv=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function Uf(e,t,i,a,o=!0){let r=i.format;if(r==="base64"){let u=J(t,un);return e.write(`if (!${u}(${a})) return INVALID;`),a}if(r==="base64url"){let u=J(t,_r);return e.write(`if (!${u}(${a})) return INVALID;`),a}if(r==="jwt"){let u=J(t,Pr),g=J(t,i.alg??null);return e.write(`if (!${u}(${a}, ${g})) return INVALID;`),a}if(r==="ipv6"){let u=J(t,ln);return e.write(`if (!${u}(${a})) return INVALID;`),a}if(r==="cidrv6"){let u=J(t,Cr);return e.write(`if (!${u}(${a})) return INVALID;`),a}if(r==="credit_card"){let u=J(t,jr);return e.write(`if (!${u}(${a})) return INVALID;`),a}if(r==="iban"){let u=J(t,Er);return e.write(`if (!${u}(${a})) return INVALID;`),a}let d=i;if(r==="url"||r==="httpurl"||d.normalize||d.hostname!==void 0||d.protocol!==void 0){let u=J(t,$r),g=J(t,i),S=G(t),y=G(t);if(e.write(`const ${S} = ${a}.trim();`),e.write(`const ${y} = ${u}(${S}, ${g});`),e.write(`if (typeof ${y} === "number") return INVALID;`),d.hostname!==void 0){let T=J(t,Tr);e.write(`if (!${T}(${y}, ${g}.hostname)) return INVALID;`)}if(d.protocol!==void 0){let T=J(t,kr);e.write(`if (!${T}(${y}, ${g}.protocol)) return INVALID;`)}if(!o)return null;let w=G(t),O=d.normalize?`${y}.href`:`${J(t,mn)}(${S})`;return e.write(`const ${w} = ${O};`),w}let p=i.fn;if(p){if(Vt(p))throw new te(`async string format ${r}`);let u=J(t,p);return e.write(`if (!${u}(${a})) return INVALID;`),a}if(iv.has(r)&&i.pattern){let u=J(t,i.pattern);return e.write(`${u}.lastIndex = 0;`),e.write(`if (!${u}.test(${a})) return INVALID;`),a}let f=i.format;switch(f){case"regex":throw new te("regex format without a pattern");case"lowercase":e.write(`if (${a} !== ${a}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${a} !== ${a}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${a}.includes(${De(i.includes)})) return INVALID;`);break;case"starts_with":{let u=i.prefix;e.write(`if (${a}.slice(0, ${u.length}) !== ${De(u)}) return INVALID;`);break}case"ends_with":{let u=i.suffix;e.write(`if (${a}.slice(-${u.length}) !== ${De(u)}) return INVALID;`);break}default:throw new te(`string format ${f}`)}return a}function fe(e,t,i,a,o=!0){let r=i._zod.def,d=r.type;if(r.coerce)throw new te(`coercion (z.coerce.${d}())`);let p=o||!!r.checks?.length,f;switch(d){case"string":f=av(e,t,i,a,p);break;case"number":f=sv(e,i,a);break;case"boolean":f=cv(e,a);break;case"bigint":f=dv(e,i,a);break;case"symbol":f=pv(e,a);break;case"undefined":f=mv(e,a);break;case"null":f=lv(e,a);break;case"any":case"unknown":f=a;break;case"never":e.write("return INVALID;"),f=a;break;case"void":f=uv(e,a);break;case"nan":f=fv(e,a);break;case"date":f=hv(e,a);break;case"object":f=gv(e,t,i,a,p);break;case"optional":f=xv(e,t,i,a,p);break;case"nullable":f=Sv(e,t,i,a,p);break;case"array":f=yv(e,t,i,a,p);break;case"literal":f=vv(e,t,i,a);break;case"enum":f=wv(e,t,i,a);break;case"readonly":{let u=Pf(e,t,i,a),g=G(t);e.write(`const ${g} = Object.freeze(${u});`),f=g;break}case"success":Pf(e,t,i,a),f="true";break;case"default":case"prefault":f=Rv(e,t,i,a);break;case"nonoptional":f=Iv(e,t,i,a);break;case"tuple":f=Mv(e,t,i,a);break;case"union":f=Ov(e,t,i,a);break;case"intersection":f=kv(e,t,i,a);break;case"record":f=Cv(e,t,i,a);break;case"map":f=_v(e,t,i,a);break;case"set":f=jv(e,t,i,a);break;case"file":f=Ev(e,a);break;case"template_literal":f=Pv(e,t,i,a);break;case"lazy":f=Lv(e,t,i,a);break;case"pipe":f=Vv(e,t,i,a);break;case"custom":f=Av(e,t,i,a);break;case"transform":f=Nv(e,t,i,a);break;case"catch":f=Uv(e,t,i,a);break;default:throw new te(`schema type ${d}`)}return f===null?null:Jy(e,t,i,f)}function av(e,t,i,a,o=!0){e.write(`if (typeof ${a} !== "string") return INVALID;`);let r=i._zod.def;return r.format===void 0?a:Uf(e,t,r,a,o)}function sv(e,t,i){e.write(`if (typeof ${i} !== "number" || !Number.isFinite(${i})) return INVALID;`);let a=t._zod.def;return a.check==="number_format"&&a.format&&Ff(e,{format:a.format},i),i}function cv(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function dv(e,t,i){e.write(`if (typeof ${i} !== "bigint") return INVALID;`);let a=t._zod.def;if(a.format)switch(a.format){case"int64":e.write(`if (${i} < -9223372036854775808n || ${i} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${i} < 0n || ${i} > 18446744073709551615n) return INVALID;`);break}return i}function pv(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function mv(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function lv(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function uv(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function fv(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function hv(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function gv(e,t,i,a,o=!0){let r=i._zod.def;e.write(`if (typeof ${a} !== "object" || ${a} === null || Array.isArray(${a})) return INVALID;`);let d=r.shape,p=Object.keys(d),f=Object.getOwnPropertySymbols(d),u=f.length?[...p,...f]:p,g=U=>typeof U=="symbol"?J(t,U):De(U),S=U=>typeof U=="symbol"?`[${g(U)}]`:De(U),y=d;if(p.includes("__proto__"))throw new te('object shape key "__proto__"');let w=new Map;for(let U of u){let V=y[U],H=g(U),se=G(t);if(e.write(`const ${se} = ${a}[${H}];`),V._zod.optin!==void 0){let ne=G(t);e.write(`let ${ne} = (() => {`),e.indented(Te=>{let Bo=ke(Te,t,V,se);Te.write(`return ${Bo};`)}),e.write("})();"),V._zod.optout==="optional"?(e.write(`if (${ne} === INVALID) {`),e.indented(Te=>{Te.write(`if (${H} in ${a}) return INVALID;`),Te.write(`${ne} = undefined;`)}),e.write("}")):e.write(`if (${ne} === INVALID) return INVALID;`),w.set(U,ne)}else{bv(V)&&e.write(`if (!(${H} in ${a})) return INVALID;`);let ne=ke(e,t,V,se,o);ne!==null&&w.set(U,ne)}}let O=r.catchall,T="none";if(O){let U=O._zod.def.type;if(U==="never"){let V=p.map(H=>`k !== ${De(H)}`).join(" && ")||"true";e.write(`for (const k in ${a}) {`),e.indented(H=>{H.write(`if (${V}) return INVALID;`)}),e.write("}")}else(U==="unknown"||U==="any")&&!O._zod.def.checks?.length?T="passthrough":T="schema"}let j=G(t),Z=u.some(U=>Ef(y[U])||zd(y[U]));if(!o){if(T==="schema"){let U=p.length>0?J(t,new Set(p)):null;e.write(`for (const k in ${a}) {`),e.indented(V=>{V.write('if (k === "__proto__") continue;'),U&&V.write(`if (${U}.has(k)) continue;`);let H=G(t);V.write(`const ${H} = ${a}[k];`),ke(V,t,O,H,!1)}),e.write("}")}return null}if(Z){e.write(`const ${j} = {};`);for(let U of u){let V=g(U),H=w.get(U);zd(y[U])?e.write(`if (${V} in ${a}) ${j}[${V}] = ${H};`):Ef(y[U])?e.write(`if (${H} !== undefined || ${V} in ${a}) ${j}[${V}] = ${H};`):e.write(`${j}[${V}] = ${H};`)}}else{let U=u.map(V=>`${S(V)}: ${w.get(V)}`).join(", ");e.write(`const ${j} = { ${U} };`)}if(T!=="none"){let U=p.length>0?J(t,new Set(p)):null;e.write(`for (const k in ${a}) {`),e.indented(V=>{if(V.write('if (k === "__proto__") continue;'),U&&V.write(`if (${U}.has(k)) continue;`),T==="passthrough")V.write(`${j}[k] = ${a}[k];`);else{let H=G(t);V.write(`const ${H} = ${a}[k];`);let se=ke(V,t,O,H);V.write(`${j}[k] = ${se};`)}}),e.write("}")}return j}function xv(e,t,i,a,o=!0){let r=i._zod.def;if(zv(i))return fe(e,t,r.innerType,a,o);if(r.innerType._zod.optin==="defaulted"){let p=G(t),f=G(t);return e.write(`let ${p};`),e.write(`if (${a} === undefined) {`),e.indented(u=>{u.write(`const ${f} = (() => {`),u.indented(g=>{let S=fe(g,t,r.innerType,a);g.write(`return ${S};`)}),u.write("})();"),u.write(`if (${f} !== INVALID) ${p} = ${f};`)}),e.write("} else {"),e.indented(u=>{let g=fe(u,t,r.innerType,a);u.write(`${p} = ${g};`)}),e.write("}"),p}let d=o?G(t):null;return d&&e.write(`let ${d};`),e.write(`if (${a} !== undefined) {`),e.indented(p=>{let f=fe(p,t,r.innerType,a,o);d&&f!==null&&p.write(`${d} = ${f};`)}),e.write("}"),d}function zv(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function bv(e){return e._zod.optin===void 0&&Pt(e)}function Pt(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Pt(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Pt(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Pt):!0;case"intersection":return!t.left||!t.right?!0:Pt(t.left)&&Pt(t.right);case"pipe":return t.in?Pt(t.in):!0;default:return!0}}function zd(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function Ef(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&po(e)}function po(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?po(t.innerType):!0;case"union":return t.options?t.options.some(po):!0;case"intersection":return!t.left||!t.right||po(t.left)||po(t.right);case"pipe":return t.out?po(t.out):!0;default:return!0}}function Sv(e,t,i,a,o=!0){let r=i._zod.def,d=o?G(t):null;return d&&e.write(`let ${d} = null;`),e.write(`if (${a} !== null) {`),e.indented(p=>{let f=fe(p,t,r.innerType,a,o);d&&f!==null&&p.write(`${d} = ${f};`)}),e.write("}"),d}function yv(e,t,i,a,o=!0){let r=i._zod.def;e.write(`if (!Array.isArray(${a})) return INVALID;`);let d=o?G(t):null,p=G(t),f=G(t);return d&&e.write(`const ${d} = new Array(${a}.length);`),e.write(`for (let ${p} = 0; ${p} < ${a}.length; ${p}++) {`),e.indented(u=>{u.write(`const ${f} = ${a}[${p}];`);let g=ke(u,t,r.element,f,o);d&&g!==null&&u.write(`${d}[${p}] = ${g};`)}),e.write("}"),d}function vv(e,t,i,a){let r=i._zod.def.values;if(r.length!==1){let p=J(t,new Set(r));return e.write(`if (!${p}.has(${a})) return INVALID;`),a}let d=r[0];if(typeof d=="number"&&Number.isNaN(d)){let p=J(t,new Set(r));return e.write(`if (!${p}.has(${a})) return INVALID;`),a}if(typeof d=="string")e.write(`if (${a} !== ${De(d)}) return INVALID;`);else if(typeof d=="number"||typeof d=="boolean")e.write(`if (${a} !== ${d}) return INVALID;`);else if(d===null)e.write(`if (${a} !== null) return INVALID;`);else if(d===void 0)e.write(`if (${a} !== undefined) return INVALID;`);else if(typeof d=="bigint")e.write(`if (${a} !== ${d}n) return INVALID;`);else throw new te(`literal type ${typeof d}`);return a}function wv(e,t,i,a){let o=i._zod.values;if(!o)throw new te("enum schema without enumerated values");let r=J(t,o);return e.write(`if (!${r}.has(${a})) return INVALID;`),a}function Pf(e,t,i,a){let o=i._zod.def;return fe(e,t,o.innerType,a)}function Rv(e,t,i,a){let o=i._zod.def,d=Object.getOwnPropertyDescriptor(i._zod.def,"defaultValue")?()=>i._zod.def.defaultValue:void 0;if(i._zod.def.type==="prefault"){if(!d)return fe(e,t,o.innerType,a);let f=J(t,d),u=G(t);return e.write(`let ${u} = ${a};`),e.write(`if (${a} === undefined) ${u} = ${f}();`),fe(e,t,o.innerType,u)}let p=G(t);if(d){let f=J(t,d),u=J(t,Ho);e.write(`let ${p};`),e.write(`if (${a} === undefined) {`),e.indented(g=>{g.write(`${p} = ${u}(${f}());`)}),e.write("} else {"),e.indented(g=>{let S=fe(g,t,o.innerType,a);g.write(`${p} = ${S} === undefined ? ${u}(${f}()) : ${S};`)}),e.write("}")}else e.write(`let ${p};`),e.write(`if (${a} !== undefined) {`),e.indented(f=>{let u=fe(f,t,o.innerType,a);f.write(`${p} = ${u};`)}),e.write("}");return p}function Iv(e,t,i,a){let o=i._zod.def,r=fe(e,t,o.innerType,a),d=G(t);return e.write(`const ${d} = ${r};`),e.write(`if (${d} === undefined) return INVALID;`),d}function Mv(e,t,i,a){let o=i._zod.def,r=o.items,d=o.rest;e.write(`if (!Array.isArray(${a})) return INVALID;`);let p=Lf(r,"optin"),f=Lf(r,"optout");d?e.write(`if (${a}.length < ${p}) return INVALID;`):e.write(`if (${a}.length < ${p} || ${a}.length > ${r.length}) return INVALID;`);let u=G(t);e.write(`const ${u} = [];`);for(let g=0;g<r.length;g++){let S=r[g];if(g>=f)e.write(`if (${u}.length === ${g}) {`),e.indented(y=>{y.write(`if (${g} < ${a}.length) {`),y.indented(w=>{let O=G(t);w.write(`const ${O} = ${a}[${g}];`);let T=ke(w,t,S,O);w.write(`${u}[${g}] = ${T};`)}),y.write("} else {"),y.indented(w=>{if(zd(S)){w.write(`${u}.length = ${g};`);return}let O=G(t),T=G(t);w.write(`const ${O} = undefined;`),w.write(`const ${T} = (() => {`),w.indented(j=>{let Z=ke(j,t,S,O);j.write(`return ${Z};`)}),w.write("})();"),w.write(`if (${T} === INVALID || ${T} === undefined) ${u}.length = ${g};`),w.write(`else ${u}[${g}] = ${T};`)}),y.write("}")}),e.write("}");else{let y=G(t);e.write(`const ${y} = ${a}[${g}];`);let w=ke(e,t,S,y);e.write(`${u}[${g}] = ${w};`)}}if(d){let g=G(t),S=G(t);e.write(`for (let ${g} = ${r.length}; ${g} < ${a}.length; ${g}++) {`),e.indented(y=>{y.write(`const ${S} = ${a}[${g}];`);let w=ke(y,t,d,S);y.write(`${u}[${g}] = ${w};`)}),e.write("}")}return u}function Lf(e,t){for(let i=e.length-1;i>=0;i--)if(!(t==="optin"?e[i]._zod.optin!==void 0:e[i]._zod.optout==="optional"))return i+1;return 0}function Ov(e,t,i,a){let o=i._zod.def,r=o.options;if(o.discriminator)return $v(e,t,o,a);if(o.inclusive===!1)throw new te("exclusive unions (z.xor)");if(r.length===0)return e.write("return INVALID;"),a;if(r.length===1)return fe(e,t,r[0],a);if(r.every(f=>f._zod.def.type==="literal"&&!f._zod.def.checks?.length)){let f=new Set(r.flatMap(g=>g._zod.def.values)),u=J(t,f);return e.write(`if (!${u}.has(${a})) return INVALID;`),a}let p=G(t);e.write(`let ${p};`);for(let f=0;f<r.length;f++){let u=r[f];f===0?e.write(`${p} = (() => {`):e.write(`if (${p} === INVALID) ${p} = (() => {`),e.indented(g=>{let S=fe(g,t,u,a);g.write(`return ${S};`)}),e.write("})();")}return e.write(`if (${p} === INVALID) return INVALID;`),p}function $v(e,t,i,a){if(i.unionFallback)throw new te("discriminated union with unionFallback");if(i.options.length===0)return e.write("return INVALID;"),a;let o=G(t),r=G(t);e.write(`const ${o} = ${a}?.[${De(i.discriminator)}];`),e.write(`let ${r};`);let d=!0,p=new Set;for(let f of i.options){let u=f._zod.propValues?.[i.discriminator];if(!u||u.size===0)throw new te("discriminated union option without static discriminator values");for(let y of u){if(p.has(y))throw new te(`duplicate discriminator value ${String(y)}`);p.add(y)}let g=Array.from(u,y=>Tv(t,o,y)),S=d?"if":"else if";e.write(`${S} (${g.join(" || ")}) {`),e.indented(y=>{let w=fe(y,t,f,a);y.write(`${r} = ${w};`)}),e.write("}"),d=!1}return e.write("else { return INVALID; }"),r}function Tv(e,t,i){if(typeof i=="string")return`${t} === ${De(i)}`;if(typeof i=="number")return Number.isNaN(i)?`Number.isNaN(${t})`:`${t} === ${i}`;if(typeof i=="boolean")return`${t} === ${i}`;if(i===null)return`${t} === null`;if(i===void 0)return`${t} === undefined`;if(typeof i=="bigint")return`${t} === ${i}n`;if(typeof i=="symbol"){let a=J(e,i);return`${t} === ${a}`}throw new te(`literal discriminator value ${String(i)}`)}function kv(e,t,i,a){let o=i._zod.def;t.definite=!1;let r=ke(e,t,o.left,a),d=ke(e,t,o.right,a),p=J(t,ao),f=G(t);return e.write(`const ${f} = ${p}(${r}, ${d});`),e.write(`if (!${f}.valid) return INVALID;`),`${f}.data`}function Cv(e,t,i,a){let o=i._zod.def,r=J(t,Ze);e.write(`if (!${r}(${a})) return INVALID;`);let d=G(t),p=G(t),f=G(t);e.write(`const ${d} = {};`);let u=o,g=u.partial?void 0:o.keyType._zod.values;if(g){let w=[];for(let T of g){if(!(typeof T=="string"||typeof T=="number"||typeof T=="symbol"))throw new te(`record key value ${String(T)}`);let j=typeof T=="number"?T.toString():T;if(j==="__proto__")throw new te('record key "__proto__"');w.push(j);let Z=J(t,T),U=fe(e,t,o.keyType,Z),V=G(t);e.write(`const ${V} = ${a}[${Dv(t,j)}];`);let H=ke(e,t,o.valueType,V);e.write(`${d}[${U}] = ${H};`)}let O=J(t,new Set(w));return e.write(`for (const ${p} in ${a}) {`),e.indented(T=>{T.write(`if (${O}.has(${p})) continue;`),u.mode==="loose"?T.write(`if (${p} !== "__proto__") ${d}[${p}] = ${a}[${p}];`):T.write("return INVALID;")}),e.write("}"),d}let S=o.keyType._zod.def;if(!(S.type==="string"&&S.format===void 0&&!S.coerce&&(S.checks?.length??0)===0)){let w=o.mode==="loose",O=ei(o.keyType);O.definite===!1&&(t.definite=!1);let T=J(t,O),j=J(t,dt),Z=G(t);return Vf(e,t,a,p,U=>{U.write(`let ${Z} = ${T}(${p});`),U.write(`if (${Z} === INVALID && typeof ${p} === "string" && ${j}.test(${p})) ${Z} = ${T}(Number(${p}));`),w?U.write(`if (${Z} === INVALID) { ${d}[${p}] = ${a}[${p}]; continue; }`):U.write(`if (${Z} === INVALID) return INVALID;`),U.write(`if (${Z} === "__proto__") continue;`);let V=G(t);U.write(`const ${V} = ${a}[${p}];`);let H=ke(U,t,o.valueType,V);U.write(`${d}[${Z}] = ${H};`)}),d}return Vf(e,t,a,p,w=>{w.write(`const ${f} = ${a}[${p}];`);let O=ke(w,t,o.valueType,f);w.write(`${d}[${p}] = ${O};`)},"return INVALID;"),d}function Vf(e,t,i,a,o,r){let d=J(t,Object.prototype.propertyIsEnumerable),p=G(t),f=G(t),u=G(t);e.write(`const ${p} = Object.getOwnPropertySymbols(${i});`),e.write(`const ${f} = Object.getOwnPropertyNames(${i});`),e.write(`for (let ${u} = 0; ${u} < ${f}.length; ${u}++) {`),e.indented(g=>{g.write(`const ${a} = ${f}[${u}];`),g.write(`if (${a} === "__proto__" || !${d}.call(${i}, ${a})) continue;`),o(g)}),e.write("}"),e.write(`for (let ${u} = 0; ${u} < ${p}.length; ${u}++) {`),e.indented(g=>{g.write(`const ${a} = ${p}[${u}];`),g.write(`if (!${d}.call(${i}, ${a})) continue;`),r?g.write(r):o(g)}),e.write("}")}function Dv(e,t){return typeof t=="string"?De(t):J(e,t)}function _v(e,t,i,a){let o=i._zod.def;e.write(`if (!(${a} instanceof Map)) return INVALID;`);let r=G(t),d=G(t),p=G(t);return e.write(`const ${r} = new Map();`),e.write(`for (const [${d}, ${p}] of ${a}) {`),e.indented(f=>{let u=fe(f,t,o.keyType,d),g=fe(f,t,o.valueType,p);f.write(`${r}.set(${u}, ${g});`)}),e.write("}"),r}function jv(e,t,i,a){let o=i._zod.def;e.write(`if (!(${a} instanceof Set)) return INVALID;`);let r=G(t),d=G(t);return e.write(`const ${r} = new Set();`),e.write(`for (const ${d} of ${a}) {`),e.indented(p=>{let f=fe(p,t,o.valueType,d);p.write(`${r}.add(${f});`)}),e.write("}"),r}function Ev(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function Pv(e,t,i,a){e.write(`if (typeof ${a} !== "string") return INVALID;`);let o=i._zod.pattern;if(o){let r=J(t,o);e.write(`${r}.lastIndex = 0;`),e.write(`if (!${r}.test(${a})) return INVALID;`)}return a}function Lv(e,t,i,a){let o=i._zod.def,r=Lt(t,o.getter),d=J(t,{parser:null});e.write(`if (!${d}.parser) {`),e.indented(f=>{f.write(`const inner = ${r}();`),f.write(`${d}.parser = function(input) {`),f.indented(u=>{u.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),u.write("return result.issues.length === 0 ? result.value : INVALID;")}),f.write("};")}),e.write("}");let p=G(t);return e.write(`const ${p} = ${d}.parser(${a});`),e.write(`if (${p} === INVALID) return INVALID;`),p}function Vv(e,t,i,a){let o=i._zod.def,r=fe(e,t,o.in,a);if(o.transform){if(Vt(o.transform))throw new Ye("z.compile: async transforms in pipes are not supported");let d=o.transform,f=Lt(t,g=>{let S={value:g,issues:[],addIssue:Sd},y=d(g,S);return y instanceof Promise?je:S.issues.length===0?y:je}),u=G(t);return e.write(`const ${u} = ${f}(${r});`),e.write(`if (${u} === INVALID) return INVALID;`),fe(e,t,o.out,u)}else return fe(e,t,o.out,r)}function Vt(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function Av(e,t,i,a){let o=i._zod.def;if(o.fn){if(Vt(o.fn))throw new Ye("z.compile: async custom predicates are not supported");let r=Lt(t,o.fn),d=J(t,xd),p=G(t);e.write(`const ${p} = ${r}(${a});`),e.write(`if (${p} instanceof Promise) ${d}();`),e.write(`if (!${p}) return INVALID;`)}else throw new te("custom schema without a predicate function");return a}function Fv(e,t,i){let a=e._zod.run({value:i,issues:[]},{});if(a&&typeof a.then=="function")return je;let o=a;return o.issues.length===0?o.value:t()}function Uv(e,t,i,a){let o=i._zod.def;if(!o.catchValue[ir])throw new te("catch with a callback (only a constant catch value compiles)",!1);let r=G(t);e.write(`let ${r} = (() => {`),e.indented(u=>{let g=ke(u,t,o.innerType,a);u.write(`return ${g};`)}),e.write("})();");let d=J(t,o.innerType),p=Lt(t,o.catchValue),f=J(t,Fv);return e.write(`if (${r} === INVALID) {`),e.indented(u=>{u.write(`${r} = ${f}(${d}, ${p}, ${a});`),u.write(`if (${r} === INVALID) return INVALID;`)}),e.write("}"),r}function Nv(e,t,i,a){let o=i._zod.def;if(o.transform){if(Vt(o.transform))throw new Ye("z.compile: async transforms are not supported");let r=o.transform,p=Lt(t,u=>{let g={value:u,issues:[],addIssue:Sd},S=r(u,g);return S instanceof Promise?je:g.issues.length===0?S:je}),f=G(t);return e.write(`const ${f} = ${p}(${a});`),e.write(`if (${f} === INVALID) return INVALID;`),f}return a}function ti(e){return e.checks&&(e.checks=[...e.checks]),e}function yd(e,t){return new e(ti({type:"string",...L(t)}))}function vd(e,t){return new e(ti({type:"string",coerce:!0,...L(t)}))}function oi(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...L(t)})}function ni(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...L(t)})}function ri(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...L(t)})}function ii(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...L(t)})}function ai(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...L(t)})}function si(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...L(t)})}function Rn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...L(t)})}function ci(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...L(t)})}function di(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...L(t)})}function pi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...L(t)})}function mi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...L(t)})}function li(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...L(t)})}function ui(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...L(t)})}function fi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...L(t)})}function hi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...L(t)})}function gi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...L(t)})}function wd(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...L(t)})}function xi(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...L(t)})}function zi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...L(t)})}function bi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...L(t)})}function Si(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...L(t)})}function yi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...L(t)})}function Rd(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...L(t)})}function Id(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...L(t)})}function vi(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...L(t)})}var Md={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function In(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...L(t)})}function Mn(e,t){return new e({type:"string",format:"date",check:"string_format",...L(t)})}function On(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...L(t)})}function $n(e,t){return new e({type:"string",format:"duration",check:"string_format",...L(t)})}function Od(e,t){return new e(ti({type:"number",checks:[],...L(t)}))}function $d(e,t){return new e(ti({type:"number",coerce:!0,checks:[],...L(t)}))}function Td(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...L(t)})}function kd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...L(t)})}function Cd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...L(t)})}function Dd(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...L(t)})}function _d(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...L(t)})}function jd(e,t){return new e({type:"boolean",...L(t)})}function Ed(e,t){return new e({type:"boolean",coerce:!0,...L(t)})}function Pd(e,t){return new e({type:"bigint",...L(t)})}function Ld(e,t){return new e({type:"bigint",coerce:!0,...L(t)})}function Vd(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...L(t)})}function Ad(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...L(t)})}function Fd(e,t){return new e({type:"symbol",...L(t)})}function Ud(e,t){return new e({type:"undefined",...L(t)})}function Nd(e,t){return new e({type:"null",...L(t)})}function qd(e){return new e({type:"any"})}function Bd(e){return new e({type:"unknown"})}function Wd(e,t){return new e({type:"never",...L(t)})}function Zd(e,t){return new e({type:"void",...L(t)})}function Gd(e,t){return new e({type:"date",...L(t)})}function Hd(e,t){return new e({type:"date",coerce:!0,...L(t)})}function Jd(e,t){return new e({type:"nan",...L(t)})}function tt(e,t){return new yr({check:"less_than",...L(t),value:e,inclusive:!1})}function qe(e,t){return new yr({check:"less_than",...L(t),value:e,inclusive:!0})}function ot(e,t){return new vr({check:"greater_than",...L(t),value:e,inclusive:!1})}function Be(e,t){return new vr({check:"greater_than",...L(t),value:e,inclusive:!0})}function wi(e){return ot(0,e)}function Ri(e){return tt(0,e)}function Ii(e){return qe(0,e)}function Mi(e){return Be(0,e)}function bt(e,t){return new _s({check:"multiple_of",...L(t),value:e})}function St(e,t){return new Ps({check:"max_size",...L(t),maximum:e})}function nt(e,t){return new Ls({check:"min_size",...L(t),minimum:e})}function At(e,t){return new Vs({check:"size_equals",...L(t),size:e})}function Ft(e,t){return new As({check:"max_length",...L(t),maximum:e})}function pt(e,t){return new Fs({check:"min_length",...L(t),minimum:e})}function Ut(e,t){return new Us({check:"length_equals",...L(t),length:e})}function mo(e,t){return new Ns({check:"string_format",format:"regex",...L(t),pattern:e})}function lo(e){return new qs({check:"string_format",format:"lowercase",...L(e)})}function uo(e){return new Bs({check:"string_format",format:"uppercase",...L(e)})}function fo(e,t){return new Ws({check:"string_format",format:"includes",...L(t),includes:e})}function ho(e,t){return new Zs({check:"string_format",format:"starts_with",...L(t),prefix:e})}function go(e,t){return new Gs({check:"string_format",format:"ends_with",...L(t),suffix:e})}function Oi(e,t,i){return new Hs({check:"property",property:e,schema:t,...L(i)})}function xo(e,t){return new Js({check:"properties",shape:e,...L(t)})}function zo(e,t){return new Ks({check:"mime_type",mime:e,...L(t)})}function Qe(e){return new Xs({check:"overwrite",tx:e})}function bo(e){return Qe(t=>t.normalize(e))}function So(){return Qe(e=>e.trim())}function yo(){return Qe(e=>e.toLowerCase())}function vo(){return Qe(e=>e.toUpperCase())}function wo(){return Qe(e=>Ea(e))}function Kd(e,t,i){return new e({type:"array",element:t,...L(i)})}function qv(e,t,i){return new e({type:"union",options:t,...L(i)})}function Bv(e,t,i){return new e({type:"union",options:t,inclusive:!1,...L(i)})}function Wv(e,t,i,a){return new e({type:"union",options:i,discriminator:t,...L(a)})}function Zv(e,t,i){return new e({type:"intersection",left:t,right:i})}function Gv(e,t,i,a){let o=i instanceof K,r=o?a:i,d=o?i:null;return new e({type:"tuple",items:t,rest:d,...L(r)})}function Hv(e,t,i,a){return new e({type:"record",keyType:t,valueType:i,...L(a)})}function Jv(e,t,i,a){return new e({type:"map",keyType:t,valueType:i,...L(a)})}function Kv(e,t,i){return new e({type:"set",valueType:t,...L(i)})}function Xv(e,t,i){let a=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:a,...L(i)})}function Yv(e,t,i){return new e({type:"enum",entries:t,...L(i)})}function Qv(e,t,i){return new e({type:"literal",values:Array.isArray(t)?t:[t],...L(i)})}function Xd(e,t){return new e({type:"file",...L(t)})}function ew(e,t){return new e({type:"transform",transform:t})}function tw(e,t){return new e({type:"optional",innerType:t})}function ow(e,t){return new e({type:"nullable",innerType:t})}function nw(e,t,i){return new e({type:"default",innerType:t,get defaultValue(){return typeof i=="function"?i():Ho(i)}})}function rw(e,t,i){return new e({type:"nonoptional",innerType:t,...L(i)})}function iw(e,t){return new e({type:"success",innerType:t})}function aw(e,t,i){return new e({type:"catch",innerType:t,catchValue:typeof i=="function"?i:Ua(i)})}function sw(e,t,i){return new e({type:"pipe",in:t,out:i})}function cw(e,t){return new e({type:"readonly",innerType:t})}function dw(e,t,i){return new e({type:"template_literal",parts:t,...L(i)})}function pw(e,t){return new e({type:"lazy",getter:t})}function mw(e,t){return new e({type:"promise",innerType:t})}function Yd(e,t,i){let a=L(i);return a.abort??(a.abort=!0),new e({type:"custom",check:"custom",fn:t,...a})}function Qd(e,t,i){return new e({type:"custom",check:"custom",fn:t,...L(i)})}function ep(e,t){let i=Nf(a=>(a.addIssue=o=>{if(typeof o=="string")a.issues.push(eo(o,a.value,i._zod.def));else{let r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=a.value),r.inst??(r.inst=i),r.continue??(r.continue=!i._zod.def.abort),a.issues.push(eo(r))}},e(a.value,a)),t);return i}function Nf(e,t){let i=new de({check:"custom",...L(t)});return i._zod.check=e,i}function tp(e){let t=new de({check:"describe"});return t._zod.onattach=[i=>{let a=$e.get(i)??{};$e.add(i,{...a,description:e})}],t._zod.check=()=>{},t}function op(e){let t=new de({check:"meta"});return t._zod.onattach=[i=>{let a=$e.get(i)??{};$e.add(i,{...a,...e})}],t._zod.check=()=>{},t}function np(e,t){let i=L(t),a=i.truthy??["true","1","yes","on","y","enabled"],o=i.falsy??["false","0","no","off","n","disabled"];i.case!=="sensitive"&&(a=a.map(w=>typeof w=="string"?w.toLowerCase():w),o=o.map(w=>typeof w=="string"?w.toLowerCase():w));let r=new Set(a),d=new Set(o),p=e.Codec??xn,f=e.Boolean??hn,u=e.String??jt,g=new u({type:"string",error:i.error}),S=new f({type:"boolean",error:i.error}),y=new p({type:"pipe",in:g,out:S,transform:((w,O)=>{let T=w;return i.case!=="sensitive"&&(T=T.toLowerCase()),r.has(T)?!0:d.has(T)?!1:(O.issues.push({code:"invalid_value",expected:"stringbool",values:[...r,...d],input:O.value,inst:y,continue:!1}),{})}),reverseTransform:((w,O)=>w===!0?a[0]||"true":o[0]||"false"),error:i.error});return y._zod.bag.truthy=a,y._zod.bag.falsy=o,y._zod.bag.case=i.case??"insensitive",y}function Nt(e,t,i,a={}){let o=L(a),r={check:"string_format",type:"string",format:t,fn:typeof i=="function"?i:p=>i.test(p),...o};return i instanceof RegExp&&(r.pattern=i),new e(r)}function Tn(e,...t){for(let i of t)for(let a of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,a)&&Oe(e,a,i[a]);return e}function yt(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??$e,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function ye(e,t,i,a,o){let r=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:a.path,message:o}):t.unrepresentable;if(r==="any")return!1;if(r===void 0||r==="throw")throw new Error(o);return Object.assign(i,r),!0}function ae(e,t,i={path:[],schemaPath:[]}){var a;let o=e._zod.def,r=t.seen.get(e);if(r)return r.count++,i.schemaPath.includes(e)&&(r.cycle=i.path),r.schema;let d={schema:{},count:1,cycle:void 0,path:i.path};t.seen.set(e,d),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let p=e._zod.toJSONSchema?.();if(p)d.schema=p;else{let g={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,d.schema,g);else{let y=d.schema,w=t.processors[o.type];if(!w)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);w(e,t,y,g)}let S=e._zod.parent;S&&(d.ref||(d.ref=S),ae(S,t,g),t.seen.get(S).isParent=!0)}let f=t.metadataRegistry.get(e);return f&&Tn(d.schema,f),t.io==="input"&&Ee(e)&&(delete d.schema.examples,delete d.schema.default),t.io==="input"&&"_prefault"in d.schema&&((a=d.schema).default??(a.default=d.schema._prefault)),delete d.schema._prefault,t.seen.get(e).schema}function qf(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function vt(e,t){let i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let a=new Map;for(let d of e.seen.entries()){let p=e.metadataRegistry.get(d[0])?.id;if(p){let f=a.get(p);if(f&&f!==d[0])throw new Error(`Duplicate schema id "${p}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(p,d[0])}}let o=d=>{let p=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let S=e.external.registry.get(d[0])?.id,y=e.external.uri??(O=>O);if(S)return{ref:y(S)};let w=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=w,{defId:w,ref:`${y("__shared")}#/${p}/${qf(w)}`}}let f="#",u=`${f}/${p}/`;if(d[1]===i&&!d[1].schema.id)return{ref:f};let g=d[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:u+qf(g)}},r=d=>{if(d[1].schema.$ref)return;let p=d[1],{ref:f,defId:u}=o(d);p.def={...p.schema},u&&(p.defId=u);let g=p.schema;for(let S in g)delete g[S];g.$ref=f};if(e.cycles==="throw")for(let d of e.seen.entries()){let p=d[1];if(p.cycle)throw new Error(`Cycle detected: #/${p.cycle?.join("/")}/<root>
77
+
78
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let d of e.seen.entries()){let p=d[1];if(t===d[0]){r(d);continue}if(e.external){let u=e.external.registry.get(d[0])?.id;if(t!==d[0]&&u){r(d);continue}}if(e.metadataRegistry.get(d[0])?.id){r(d);continue}if(p.cycle){r(d);continue}p.count>1&&e.reused==="ref"&&r(d)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Zf(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let i=[];for(let a of t){if(!a||typeof a!="object")return;Zf(a);let o=Object.keys(a);if(o.length!==1||o[0]!=="type")return;let r=a.type;for(let d of Array.isArray(r)?r:[r]){if(typeof d!="string")return;i.includes(d)||i.push(d)}}delete e.anyOf,e.type=i.length===1?i[0]:i}var Gf=new Set(["type","properties","required","additionalProperties"]),Bf=["oneOf","anyOf"];function Wf(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function rp(e){let t=[];for(let r of e){if(typeof r!="object"||r.type!=="object")return null;for(let d in r)if(!Gf.has(d))return null;t.push(r)}let i={},a=new Set;for(let r of t){for(let d in r.properties){if(Object.prototype.hasOwnProperty.call(i,d))continue;let p=[];for(let u of t){let g=u.properties?.[d]??Wf(u);g!=null&&(p.some(S=>JSON.stringify(S)===JSON.stringify(g))||p.push(g))}let f=p.length===1?p[0]:rp(p)??{allOf:p};Oe(i,d,f)}for(let d of r.required??[])a.add(d)}let o={type:"object",properties:i};if(a.size&&(o.required=[...a]),t.every(r=>r.additionalProperties===!1))o.additionalProperties=!1;else{let r=[];for(let d of t){let p=Wf(d);p&&!r.some(f=>JSON.stringify(f)===JSON.stringify(p))&&r.push(p)}r.length===1?o.additionalProperties=r[0]:r.length>1&&(o.additionalProperties={allOf:r})}return o}function lw(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of Gf)if(o in e)return;let i=t.filter(o=>Bf.some(r=>Array.isArray(o[r]))),a=null;if(!i.length)a=rp(t);else{let o=i[0],r=Bf.find(f=>Array.isArray(o[f]));if(Object.keys(o).length!==1)return;let d=t.filter(f=>f!==o),p=o[r].map(f=>rp([...d,f]));if(p.some(f=>!f))return;a={[r]:p}}a&&(delete e.allOf,Tn(e,a))}function wt(e,t){let i=e.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");let a=p=>{let f=e.seen.get(p);if(f.ref===null)return;let u=f.def??f.schema,g={...u},S=f.ref;if(f.ref=null,S){a(S);let w=e.seen.get(S),O=w.schema;if(O.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(O)):Tn(u,O),Tn(u,g),p._zod.parent===S)for(let j in u)j==="$ref"||j==="allOf"||j in g||delete u[j];if(O.$ref&&w.def)for(let j in u)j==="$ref"||j==="allOf"||j in w.def&&JSON.stringify(u[j])===JSON.stringify(w.def[j])&&delete u[j]}let y=p._zod.parent;if(y&&y!==S){a(y);let w=e.seen.get(y);if(w?.schema.$ref&&(u.$ref=w.schema.$ref,w.def))for(let O in u)O==="$ref"||O==="allOf"||O in w.def&&JSON.stringify(u[O])===JSON.stringify(w.def[O])&&delete u[O]}e.override({zodSchema:p,jsonSchema:u,path:f.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let p of[...e.seen.entries()].reverse())a(p[0]);if(e.target!=="openapi-3.0")for(let p of e.seen.entries())Zf(p[1].def??p[1].schema);for(let p of e.deferred)p();if(e.intersections.length){let p=new Map;for(let f of e.seen.values())for(let u of[f.schema,f.def]){let g=u?.allOf;if(!Array.isArray(g))continue;let S=p.get(g);S?S.push(u):p.set(g,[u])}for(let f of e.intersections)for(let u of p.get(f)??[])lw(u)}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let p=e.external.registry.get(t)?.id;if(!p)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(p)}Tn(o,i.defId?i.schema:i.def??i.schema);let r=e.metadataRegistry.get(t)?.id;r!==void 0&&o.id===r&&delete o.id;let d=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let p of e.seen.entries()){let f=p[1];f.def&&f.defId&&(f.def.id===f.defId&&delete f.def.id,Oe(d,f.defId,f.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(d).length>0&&(e.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{let p=JSON.parse(JSON.stringify(o));return Object.defineProperty(p,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ro(t,"input",e.processors),output:Ro(t,"output",e.processors)}},enumerable:!1,writable:!1}),p}catch{throw new Error("Error converting schema to JSON.")}}function Ee(e,t){let i=t??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);let a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return Ee(a.element,i);if(a.type==="set")return Ee(a.valueType,i);if(a.type==="lazy")return Ee(a.getter(),i);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault"||a.type==="catch")return Ee(a.innerType,i);if(a.type==="intersection")return Ee(a.left,i)||Ee(a.right,i);if(a.type==="record"||a.type==="map")return Ee(a.keyType,i)||Ee(a.valueType,i);if(a.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ee(a.in,i)||Ee(a.out,i);if(a.type==="object"){for(let o in a.shape)if(Ee(a.shape[o],i))return!0;return!1}if(a.type==="union"){for(let o of a.options)if(Ee(o,i))return!0;return!1}if(a.type==="tuple"){for(let o of a.items)if(Ee(o,i))return!0;return!!(a.rest&&Ee(a.rest,i))}return!1}var ip=(e,t={})=>i=>{let a=yt({...i,processors:t});return ae(e,a),vt(a,e),wt(a,e)},Ro=(e,t,i={})=>a=>{let{libraryOptions:o,target:r}=a??{},d=yt({...o??{},target:r,io:t,processors:i});return ae(e,d),vt(d,e),wt(d,e)};var Io=(e,t,i)=>{(e[t]===void 0||i>e[t])&&(e[t]=i)},Mo=(e,t,i)=>{(e[t]===void 0||i<e[t])&&(e[t]=i)},Hf=(e,t)=>{Io(e,"minimum",t),Mo(e,"maximum",t)},Yf=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},Qf=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},eh=(e,t)=>{e.mime=e.mime?e.mime.filter(i=>t.includes(i)):[...t]},th=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},Jf=(e,t)=>Io(e,"minimum",t.minimum),Kf=(e,t)=>Mo(e,"maximum",t.maximum),Xf=e=>(t,i)=>{th(t,i.format);let[a,o]=e[i.format];Io(t,"minimum",a),Mo(t,"maximum",o)},uw={greater_than:(e,t)=>Io(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Mo(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>Yf(e,t.value),number_format:Xf(Ko),bigint_format:Xf(Xo),min_length:Jf,max_length:Kf,length_equals:(e,t)=>Hf(e,t.length),min_size:Jf,max_size:Kf,size_equals:(e,t)=>Hf(e,t.size),string_format:(e,t)=>{th(e,t.format),t.pattern&&Qf(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>eh(e,t.mime)};function ve(e){let t={},i=e._zod.def,a=e._zod.traits.has("$ZodCheck")?[e,...i.checks??[]]:i.checks??[];for(let r of a)uw[r._zod.def.check]?.(t,r._zod.def);let o=e._zod.bag;o.minimum!==void 0&&Io(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&Io(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Mo(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Mo(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&Yf(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&eh(t,o.mime);for(let r of o.patterns??[])Qf(t,r);return t}var fw={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},hw=new Map([[Dr,us],[fn,fs]]),oh=e=>hw.get(e)??e,cp=(e,t,i,a)=>{let o=i;o.type="string";let{minimum:r,maximum:d,format:p,patterns:f,contentEncoding:u,laxFormat:g}=ve(e);if(typeof r=="number"&&(o.minLength=r),typeof d=="number"&&(o.maxLength=d),p&&(o.format=fw[p]??p,o.format===""&&delete o.format,(p==="time"||g)&&delete o.format),u&&(o.contentEncoding=u),f&&f.size>0){let S=[...f].map(oh);S.length===1?o.pattern=S[0].source:S.length>1&&(o.allOf=[...S.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},dp=(e,t,i,a)=>{let o=i,{minimum:r,maximum:d,multipleOf:p,exclusiveMaximum:f,exclusiveMinimum:u,isInt:g}=ve(e);o.type=g?"integer":"number";let S=typeof u=="number"&&u>=(r??Number.NEGATIVE_INFINITY),y=typeof f=="number"&&f<=(d??Number.POSITIVE_INFINITY),w=t.target==="draft-04"||t.target==="openapi-3.0";if(S?w?(o.minimum=u,o.exclusiveMinimum=!0):o.exclusiveMinimum=u:typeof r=="number"&&(o.minimum=r),y?w?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f:typeof d=="number"&&(o.maximum=d),p){let O=new Set;for(let Z of p)Number.isFinite(Z)&&Z!==0?O.add(Math.abs(Z)):ye(e,t,o,a,`A multipleOf divisor of ${Z} cannot be represented in JSON Schema`);let[T,...j]=O;T!==void 0&&(o.multipleOf=T),j.length&&(o.allOf=[...o.allOf??[],...j.map(Z=>({multipleOf:Z}))])}},pp=(e,t,i,a)=>{i.type="boolean"},mp=(e,t,i,a)=>{ye(e,t,i,a,"BigInt cannot be represented in JSON Schema")},lp=(e,t,i,a)=>{ye(e,t,i,a,"Symbols cannot be represented in JSON Schema")},up=(e,t,i,a)=>{t.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},fp=(e,t,i,a)=>{ye(e,t,i,a,"Undefined cannot be represented in JSON Schema")},hp=(e,t,i,a)=>{ye(e,t,i,a,"Void cannot be represented in JSON Schema")},gp=(e,t,i,a)=>{i.not={}},xp=(e,t,i,a)=>{},zp=(e,t,i,a)=>{},bp=(e,t,i,a)=>{ye(e,t,i,a,"Date cannot be represented in JSON Schema")},Sp=(e,t,i,a)=>{let o=e._zod.def,r=Kt(o.entries);if(r.length===0){i.not={};return}r.every(d=>typeof d=="number")&&(i.type="number"),r.every(d=>typeof d=="string")&&(i.type="string"),i.enum=r},yp=(e,t,i,a)=>{let o=e._zod.def;if(o.values.length===0){i.not={};return}let r=[];for(let d of o.values)if(d===void 0){if(ye(e,t,i,a,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(ye(e,t,i,a,"BigInt literals cannot be represented in JSON Schema"))return;r.push(Number(d))}else r.push(d);if(r.length!==0)if(r.length===1){let d=r[0];i.type=d===null?"null":typeof d,t.target==="draft-04"||t.target==="openapi-3.0"?i.enum=[d]:i.const=d}else r.every(d=>typeof d=="number")&&(i.type="number"),r.every(d=>typeof d=="string")&&(i.type="string"),r.every(d=>typeof d=="boolean")&&(i.type="boolean"),r.every(d=>d===null)&&(i.type="null"),i.enum=r},vp=(e,t,i,a)=>{ye(e,t,i,a,"NaN cannot be represented in JSON Schema")},wp=(e,t,i,a)=>{let o=i,r=e._zod.pattern;if(!r)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=r.source},Rp=(e,t,i,a)=>{let o=i;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:r,maximum:d,mime:p}=ve(e);r!==void 0&&(o.minLength=r),d!==void 0&&(o.maxLength=d),p&&(p.length===0?o.not={}:p.length===1?o.contentMediaType=p[0]:o.anyOf=p.map(f=>({contentMediaType:f})))},Ip=(e,t,i,a)=>{i.type="boolean"},Mp=(e,t,i,a)=>{ye(e,t,i,a,"Custom types cannot be represented in JSON Schema")},Op=(e,t,i,a)=>{ye(e,t,i,a,"Function types cannot be represented in JSON Schema")},$p=(e,t,i,a)=>{ye(e,t,i,a,"Transforms cannot be represented in JSON Schema")},Tp=(e,t,i,a)=>{ye(e,t,i,a,"Map cannot be represented in JSON Schema")},kp=(e,t,i,a)=>{ye(e,t,i,a,"Set cannot be represented in JSON Schema")},Cp=(e,t,i,a)=>{let o=i,r=e._zod.def,{minimum:d,maximum:p}=ve(e);typeof d=="number"&&(o.minItems=d),typeof p=="number"&&(o.maxItems=p),o.type="array",o.items=ae(r.element,t,{...a,path:[...a.path,"items"]})};function kn(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?kn(t.out):t.type==="catch"?kn(t.innerType):e._zod.optin}var Dp=(e,t,i,a)=>{let o=i,r=e._zod.def,d=r.shape;if(Object.getOwnPropertySymbols(d).length&&ye(e,t,o,a,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let u in d)Oe(o.properties,u,ae(d[u],t,{...a,path:[...a.path,"properties",u]}));let f=[];for(let u of Object.keys(d)){let g=r.shape[u];(t.io==="input"?kn(g)===void 0:g._zod.optout===void 0)&&f.push(u)}f.length>0&&(o.required=f),r.catchall?._zod.def.type==="never"?o.additionalProperties=!1:r.catchall?r.catchall&&(o.additionalProperties=ae(r.catchall,t,{...a,path:[...a.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Ti=(e,t,i,a)=>{let o=e._zod.def,r=o.inclusive===!1,d=o.options.map((p,f)=>ae(p,t,{...a,path:[...a.path,r?"oneOf":"anyOf",f]}));r?i.oneOf=d:i.anyOf=d},_p=(e,t,i,a)=>{let o=e._zod.def,r=ae(o.left,t,{...a,path:[...a.path,"allOf",0]}),d=ae(o.right,t,{...a,path:[...a.path,"allOf",1]}),p=u=>"allOf"in u&&Object.keys(u).length===1,f=[...p(r)?r.allOf:[r],...p(d)?d.allOf:[d]];i.allOf=f,t.intersections.push(f)},jp=(e,t,i,a)=>{let o=i,r=e._zod.def;o.type="array";let d=t.target==="draft-2020-12"?"prefixItems":"items",p=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",f=r.items.map((T,j)=>ae(T,t,{...a,path:[...a.path,d,j]})),u=r.rest?ae(r.rest,t,{...a,path:[...a.path,p,...t.target==="openapi-3.0"?[r.items.length]:[]]}):null,g=r.items.length;for(;g>0;){let T=r.items[g-1];if(!(t.io==="input"?kn(T)!==void 0:T._zod.optout==="optional"))break;g--}let S=r.items.length,y=!r.rest;t.target==="draft-2020-12"?(o.prefixItems=f,y?o.items=!1:u&&(o.items=u),g>0&&(o.minItems=g),y&&(o.maxItems=S)):t.target==="openapi-3.0"?(o.items={anyOf:f},u&&o.items.anyOf.push(u),g>0&&(o.minItems=g),y&&(o.maxItems=S)):(o.items=f,y?o.additionalItems=!1:u&&(o.additionalItems=u),g>0&&(o.minItems=g),y&&(o.maxItems=S));let{minimum:w,maximum:O}=ve(e);typeof w=="number"&&(o.minItems=w),typeof O=="number"&&(o.maxItems=O)};function ap(e,t,i){if(t.$ref){if(i.has(t))return t;i.add(t);let O=e.get(t)?.def;if(!O)return t;let T=ap(e,O,i);return T===O?t:T}for(let O of["anyOf","oneOf"]){let T=t[O];if(!Array.isArray(T))continue;let j=T.map(Z=>ap(e,Z,i));j.some((Z,U)=>Z!==T[U])&&(t={...t,[O]:j})}let a=Array.isArray(t.type)?t.type:[t.type],o=!a.includes("string")&&a.some(O=>O==="number"||O==="integer"),r=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!r?.some(O=>typeof O=="number"))return t;let{minimum:d,maximum:p,exclusiveMinimum:f,exclusiveMaximum:u,multipleOf:g,format:S,id:y,...w}=t;return w.enum?w.enum=w.enum.map(O=>typeof O=="number"?String(O):O):typeof w.const=="number"&&(w.const=String(w.const)),o&&(w.type="string",r||(w.pattern=(a.includes("number")?dt:sn).source)),w}var sp=new WeakMap;function gw(e){let t=new Map;for(let a of e.seen.values())a.def&&!t.has(a.schema)&&t.set(a.schema,a);let i=new Map;for(let a of sp.get(e)??[]){let o=e.seen.get(a),r=(o?.def??o?.schema)?.propertyNames;if(!r||r===!0||i.has(r))continue;let d=ap(t,r,new Set);d!==r&&i.set(r,d)}if(i.size)for(let a of e.seen.values())for(let o of[a.schema,a.def]){let r=o&&i.get(o.propertyNames);r&&(o.propertyNames=r)}}var Ep=(e,t,i,a)=>{let o=i,r=e._zod.def;o.type="object";let d=r.keyType,p=ve(d).patterns;if(r.mode==="loose"&&p&&p.size>0){let g=ae(r.valueType,t,{...a,path:[...a.path,"patternProperties","*"]});o.patternProperties={};for(let S of p)Oe(o.patternProperties,oh(S).source,g)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=ae(r.keyType,t,{...a,path:[...a.path,"propertyNames"]});let g=sp.get(t);g||(g=[],sp.set(t,g),t.deferred.push(()=>gw(t))),g.push(e)}o.additionalProperties=ae(r.valueType,t,{...a,path:[...a.path,"additionalProperties"]})}let f=d._zod.values,u=t.io==="input"&&kn(r.valueType)!==void 0;if(f&&!r.partial&&!u){let g=[...f].filter(S=>typeof S=="string"||typeof S=="number");g.length>0&&(o.required=g.map(String))}},Pp=(e,t,i,a)=>{let o=e._zod.def,r=ae(o.innerType,t,a),d=t.seen.get(e);t.target==="openapi-3.0"?(d.ref=o.innerType,i.nullable=!0):i.anyOf=[r,{type:"null"}]},Lp=(e,t,i,a)=>{let o=e._zod.def;ae(o.innerType,t,a);let r=t.seen.get(e);r.ref=o.innerType},Vp=Symbol();function nh(e,t,i,a,o){let r=!1,d=JSON.stringify(e,(p,f)=>typeof f!="bigint"?f:(r=!0,null));return r?(ye(t,i,a,o,"BigInt defaults cannot be represented in JSON Schema"),Vp):JSON.parse(d)}var Ap=(e,t,i,a)=>{let o=e._zod.def;ae(o.innerType,t,a);let r=t.seen.get(e);r.ref=o.innerType;let d=nh(o.defaultValue,e,t,i,a);d!==Vp&&(i.default=d)},Fp=(e,t,i,a)=>{let o=e._zod.def;ae(o.innerType,t,a);let r=t.seen.get(e);if(r.ref=o.innerType,t.io!=="input")return;let d=nh(o.defaultValue,e,t,i,a);d!==Vp&&(i._prefault=d)},Up=(e,t,i,a)=>{let o=e._zod.def;ae(o.innerType,t,a);let r=t.seen.get(e);r.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{ye(e,t,i,a,"Dynamic catch values are not supported in JSON Schema");return}i.default=d},Np=(e,t,i,a)=>{let o=e._zod.def,r=o.in._zod.traits.has("$ZodTransform"),d=t.io==="input"?r?o.out:o.in:o.out;ae(d,t,a);let p=t.seen.get(e);p.ref=d},qp=(e,t,i,a)=>{let o=e._zod.def;ae(o.innerType,t,a);let r=t.seen.get(e);r.ref=o.innerType,i.readOnly=!0},Bp=(e,t,i,a)=>{let o=e._zod.def;ae(o.innerType,t,a);let r=t.seen.get(e);r.ref=o.innerType},ki=(e,t,i,a)=>{let o=e._zod.def;ae(o.innerType,t,a);let r=t.seen.get(e);r.ref=o.innerType},Wp=(e,t,i,a)=>{let o=e._zod.innerType;ae(o,t,a);let r=t.seen.get(e);r.ref=o},$i={string:cp,number:dp,boolean:pp,bigint:mp,symbol:lp,null:up,undefined:fp,void:hp,never:gp,any:xp,unknown:zp,date:bp,enum:Sp,literal:yp,nan:vp,template_literal:wp,file:Rp,success:Ip,custom:Mp,function:Op,transform:$p,map:Tp,set:kp,array:Cp,object:Dp,union:Ti,intersection:_p,tuple:jp,record:Ep,nullable:Pp,nonoptional:Lp,default:Ap,prefault:Fp,catch:Up,pipe:Np,readonly:qp,promise:Bp,optional:ki,lazy:Wp};function Ci(e,t){if("_idmap"in e){let a=e,o=yt({...t,processors:$i}),r={};for(let f of a._idmap.entries()){let[u,g]=f;ae(g,o)}let d={},p={registry:a,uri:t?.uri,defs:r};o.external=p;for(let f of a._idmap.entries()){let[u,g]=f;vt(o,g),Oe(d,u,wt(o,g))}if(Object.keys(r).length>0){let f=o.target==="draft-2020-12"?"$defs":"definitions";d.__shared={[f]:r}}return{schemas:d}}let i=yt({...t,processors:$i});return ae(e,i),vt(i,e),wt(i,e)}var Di=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let i=t?.target??"draft-2020-12";i==="draft-4"&&(i="draft-04"),i==="draft-7"&&(i="draft-07"),this.ctx=yt({processors:$i,target:i,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,i={path:[],schemaPath:[]}){return ae(t,this.ctx,i)}emit(t,i){i&&(i.cycles&&(this.ctx.cycles=i.cycles),i.reused&&(this.ctx.reused=i.reused),i.external&&(this.ctx.external=i.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,vt(this.ctx,t);let a=wt(this.ctx,t),{"~standard":o,...r}=a;return r}};var rh={};var _o={};at(_o,{ZodAny:()=>pm,ZodArray:()=>fm,ZodBase64:()=>Ki,ZodBase64URL:()=>Xi,ZodBigInt:()=>Do,ZodBigIntFormat:()=>ea,ZodBoolean:()=>Co,ZodCIDRv4:()=>Hi,ZodCIDRv6:()=>Ji,ZodCUID:()=>Ui,ZodCUID2:()=>Ni,ZodCatch:()=>_m,ZodCodec:()=>Vn,ZodCreditCard:()=>im,ZodCustom:()=>An,ZodCustomStringFormat:()=>Wt,ZodDate:()=>_n,ZodDefault:()=>Om,ZodDiscriminatedUnion:()=>gm,ZodE164:()=>Yi,ZodEmail:()=>Li,ZodEmoji:()=>Ai,ZodEnum:()=>$o,ZodExactOptional:()=>na,ZodFile:()=>wm,ZodFunction:()=>Nm,ZodGUID:()=>Vi,ZodIBAN:()=>am,ZodIPv4:()=>Zi,ZodIPv6:()=>Gi,ZodISODate:()=>It,ZodISODateTime:()=>Rt,ZodISODuration:()=>Ot,ZodISOTime:()=>Mt,ZodInstanceOf:()=>Wm,ZodIntersection:()=>xm,ZodJWT:()=>Qi,ZodKSUID:()=>Wi,ZodLazy:()=>Fm,ZodLiteral:()=>vm,ZodMAC:()=>rm,ZodMap:()=>Sm,ZodNaN:()=>Em,ZodNanoID:()=>Fi,ZodNever:()=>lm,ZodNonOptional:()=>ra,ZodNull:()=>dm,ZodNullable:()=>Mm,ZodNumber:()=>ko,ZodNumberFormat:()=>Zt,ZodObject:()=>jn,ZodOptional:()=>Pn,ZodPipe:()=>Ln,ZodPrefault:()=>Tm,ZodPreprocess:()=>Pm,ZodPromise:()=>Um,ZodReadonly:()=>Lm,ZodRecord:()=>Oo,ZodSet:()=>ym,ZodString:()=>To,ZodStringFormat:()=>ce,ZodSuccess:()=>Dm,ZodSymbol:()=>sm,ZodTemplateLiteral:()=>Am,ZodTransform:()=>Rm,ZodTuple:()=>bm,ZodType:()=>Y,ZodULID:()=>qi,ZodURL:()=>Dn,ZodUUID:()=>rt,ZodUndefined:()=>cm,ZodUnion:()=>En,ZodUnknown:()=>mm,ZodVoid:()=>um,ZodXID:()=>Bi,ZodXor:()=>hm,_ZodString:()=>Pi,_default:()=>$m,_function:()=>dg,any:()=>Wh,array:()=>h,base64:()=>Mh,base64url:()=>Oh,bigint:()=>Fh,boolean:()=>R,catch:()=>jm,check:()=>pg,cidrv4:()=>Rh,cidrv6:()=>Ih,codec:()=>ig,creditCard:()=>Th,cuid:()=>gh,cuid2:()=>xh,currencyCode:()=>jh,custom:()=>mg,date:()=>Zh,describe:()=>lg,discriminatedUnion:()=>Jh,e164:()=>$h,email:()=>sh,emoji:()=>fh,enum:()=>l,exactOptional:()=>Im,file:()=>tg,float32:()=>Ph,float64:()=>Lh,function:()=>dg,guid:()=>ch,hash:()=>Eh,hex:()=>_h,hostname:()=>Dh,httpUrl:()=>uh,iban:()=>kh,instanceof:()=>fg,int:()=>x,int32:()=>Vh,int64:()=>Uh,intersection:()=>zm,invertCodec:()=>ag,ipv4:()=>yh,ipv6:()=>wh,json:()=>gg,jwt:()=>Ch,keyof:()=>Gh,ksuid:()=>Sh,lazy:()=>lt,literal:()=>m,looseObject:()=>$t,looseRecord:()=>Xh,mac:()=>vh,map:()=>Yh,meta:()=>ug,nan:()=>rg,nanoid:()=>hh,nativeEnum:()=>eg,never:()=>ta,nonoptional:()=>Cm,null:()=>q,nullable:()=>Cn,nullish:()=>og,number:()=>s,object:()=>k,optional:()=>qt,partialRecord:()=>Kh,pipe:()=>Ei,prefault:()=>km,preprocess:()=>xg,promise:()=>cg,readonly:()=>Vm,record:()=>b,refine:()=>qm,set:()=>Qh,strictObject:()=>c,string:()=>n,stringFormat:()=>Ce,stringbool:()=>hg,success:()=>ng,superRefine:()=>Bm,symbol:()=>qh,templateLiteral:()=>sg,transform:()=>oa,tuple:()=>A,uint32:()=>Ah,uint64:()=>Nh,ulid:()=>zh,undefined:()=>Bh,union:()=>z,unknown:()=>$,url:()=>le,uuid:()=>dh,uuidv4:()=>ph,uuidv6:()=>mh,uuidv7:()=>lh,void:()=>we,xid:()=>bh,xor:()=>Hh});var _i={};at(_i,{endsWith:()=>go,gt:()=>ot,gte:()=>Be,includes:()=>fo,length:()=>Ut,lowercase:()=>lo,lt:()=>tt,lte:()=>qe,maxLength:()=>Ft,maxSize:()=>St,mime:()=>zo,minLength:()=>pt,minSize:()=>nt,multipleOf:()=>bt,negative:()=>Ri,nonnegative:()=>Mi,nonpositive:()=>Ii,normalize:()=>bo,overwrite:()=>Qe,positive:()=>wi,properties:()=>xo,property:()=>Oi,regex:()=>mo,size:()=>At,slugify:()=>wo,startsWith:()=>ho,toLowerCase:()=>yo,toUpperCase:()=>vo,trim:()=>So,uppercase:()=>uo});var ih=new WeakSet([Object.prototype,Error.prototype]);function ji(e,t,i){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let a=i(this);return Object.defineProperty(this,t,{value:a,configurable:!0,writable:!0}),a},set(a){Object.defineProperty(this,t,{value:a,configurable:!0,writable:!0})}})}var ah=(e,t)=>{Ga.init(e,t),e.name="ZodError";let i=Object.getPrototypeOf(e);ih.has(i)||(ih.add(i),ji(i,"format",a=>o=>on(a,o)),ji(i,"flatten",a=>o=>tn(a,o)),ji(i,"addIssue",a=>o=>{a.issues.push(o),a.message=JSON.stringify(a.issues,Xt,2)}),ji(i,"addIssues",a=>o=>{a.issues.push(...o),a.message=JSON.stringify(a.issues,Xt,2)}),Object.defineProperty(i,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},zw=I("ZodError",ah),Ne=I("ZodError",ah,void 0,{Parent:Error});var Zp=to(Ne),Gp=oo(Ne),Hp=no(Ne),Jp=ro(Ne),Kp=dr(Ne),Xp=pr(Ne),Yp=mr(Ne),Qp=lr(Ne),em=ur(Ne),tm=fr(Ne),om=hr(Ne),nm=gr(Ne);function Sw(){Ie.localeError||xe(Hr())}function Bt(){Ie.memoizer||xe({memoizer:yn()})}var Y=I("ZodType",(e,t)=>(Sw(),K.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(C.mergeDefs(t,{checks:[...t.checks??[],...e.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return re(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(qm(e,t))},superRefine(e,t){return this.check(Bm(e,t))},overwrite(e){return this.check(Qe(e))},optional(){return qt(this)},exactOptional(){return Im(this)},nullable(){return Cn(this)},nullish(){return qt(Cn(this))},nonoptional(e){return Cm(this,e)},array(){return h(this)},or(e){return z([this,e])},and(e){return zm(this,e)},transform(e){return Ei(this,oa(e))},default(e){return $m(this,e)},prefault(e){return km(this,e)},catch(e){return jm(this,e)},pipe(e){return Ei(this,e)},readonly(){return Vm(this)},describe(e){let t=this.clone();return $e.add(t,{description:e}),t},meta(...e){if(e.length===0)return $e.get(this);let t=this.clone();return $e.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return C.hide(this,"~standard",{...Or(this),jsonSchema:{input:Ro(this,"input"),output:Ro(this,"output")}})},set"~standard"(e){C.own(this,"~standard",e)},parse:function e(t,i){return Zp(this,t,i,{callee:e})},parseAsync:async function e(t,i){return await Gp(this,t,i,{callee:e})},safeParse(e,t){return Hp(this,e,t)},async safeParseAsync(e,t){return Jp(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){C.own(this,"spa",e)},validate(e,t){return nn(this,e,t)},validateAsync(e,t){return rn(this,e,t)},encode:function e(t,i){return Kp(this,t,i,{callee:e})},decode:function e(t,i){return Xp(this,t,i,{callee:e})},encodeAsync:async function e(t,i){return await Yp(this,t,i,{callee:e})},decodeAsync:async function e(t,i){return await Qp(this,t,i,{callee:e})},safeEncode(e,t){return em(this,e,t)},safeDecode(e,t){return tm(this,e,t)},async safeEncodeAsync(e,t){return om(this,e,t)},async safeDecodeAsync(e,t){return nm(this,e,t)},toJSONSchema(e){return ip(this,{})(e)},get description(){return $e.get(this)?.description},get _def(){return this._zod.def}}),Pi=I("_ZodString",(e,t)=>{jt.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>cp(e,i,a,o)},C.derived({format:e=>ve(e).format??null,minLength:e=>ve(e).minimum??null,maxLength:e=>ve(e).maximum??null},{regex(...e){return this.check(mo(...e))},includes(...e){return this.check(fo(...e))},startsWith(...e){return this.check(ho(...e))},endsWith(...e){return this.check(go(...e))},min(...e){return this.check(pt(...e))},max(...e){return this.check(Ft(...e))},length(...e){return this.check(Ut(...e))},nonempty(...e){return this.check(pt(1,...e))},lowercase(e){return this.check(lo(e))},uppercase(e){return this.check(uo(e))},trim(){return this.check(So())},normalize(...e){return this.check(bo(...e))},toLowerCase(){return this.check(yo())},toUpperCase(){return this.check(vo())},slugify(){return this.check(wo())}})),To=I("ZodString",(e,t)=>{jt.init(e,t),Pi.init(e,t)},{email(e){return this.check(oi(Li,e))},url(e){return this.check(Rn(Dn,e))},jwt(e){return this.check(vi(Qi,e))},emoji(e){return this.check(ci(Ai,e))},guid(e){return this.check(ni(Vi,e))},uuid(e){return this.check(ri(rt,e))},uuidv4(e){return this.check(ii(rt,e))},uuidv6(e){return this.check(ai(rt,e))},uuidv7(e){return this.check(si(rt,e))},nanoid(e){return this.check(di(Fi,e))},cuid(e){return this.check(pi(Ui,e))},cuid2(e){return this.check(mi(Ni,e))},ulid(e){return this.check(li(qi,e))},base64(e){return this.check(bi(Ki,e))},base64url(e){return this.check(Si(Xi,e))},xid(e){return this.check(ui(Bi,e))},ksuid(e){return this.check(fi(Wi,e))},ipv4(e){return this.check(hi(Zi,e))},ipv6(e){return this.check(gi(Gi,e))},cidrv4(e){return this.check(xi(Hi,e))},cidrv6(e){return this.check(zi(Ji,e))},e164(e){return this.check(yi(Yi,e))},datetime(e){return this.check(In(Rt,e))},date(e){return this.check(Mn(It,e))},time(e){return this.check(On(Mt,e))},duration(e){return this.check($n(Ot,e))}});function n(e){return yd(To,e)}var ce=I("ZodStringFormat",(e,t)=>{ie.init(e,t),Pi.init(e,t)}),Rt=I("ZodISODateTime",(e,t)=>{uc.init(e,t),ce.init(e,t)}),It=I("ZodISODate",(e,t)=>{fc.init(e,t),ce.init(e,t)}),Mt=I("ZodISOTime",(e,t)=>{hc.init(e,t),ce.init(e,t)}),Ot=I("ZodISODuration",(e,t)=>{gc.init(e,t),ce.init(e,t)}),Li=I("ZodEmail",(e,t)=>{oc.init(e,t),ce.init(e,t)});function sh(e){return oi(Li,e)}var Vi=I("ZodGUID",(e,t)=>{ec.init(e,t),ce.init(e,t)});function ch(e){return ni(Vi,e)}var rt=I("ZodUUID",(e,t)=>{tc.init(e,t),ce.init(e,t)});function dh(e){return ri(rt,e)}function ph(e){return ii(rt,e)}function mh(e){return ai(rt,e)}function lh(e){return si(rt,e)}var Dn=I("ZodURL",(e,t)=>{ic.init(e,t),ce.init(e,t)});function le(e){return Rn(Dn,e)}function uh(e){return Rn(Dn,{protocol:an,hostname:gs,...C.normalizeParams(e)})}var Ai=I("ZodEmoji",(e,t)=>{ac.init(e,t),ce.init(e,t)});function fh(e){return ci(Ai,e)}var Fi=I("ZodNanoID",(e,t)=>{sc.init(e,t),ce.init(e,t)});function hh(e){return di(Fi,e)}var Ui=I("ZodCUID",(e,t)=>{cc.init(e,t),ce.init(e,t)});function gh(e){return pi(Ui,e)}var Ni=I("ZodCUID2",(e,t)=>{dc.init(e,t),ce.init(e,t)});function xh(e){return mi(Ni,e)}var qi=I("ZodULID",(e,t)=>{pc.init(e,t),ce.init(e,t)});function zh(e){return li(qi,e)}var Bi=I("ZodXID",(e,t)=>{mc.init(e,t),ce.init(e,t)});function bh(e){return ui(Bi,e)}var Wi=I("ZodKSUID",(e,t)=>{lc.init(e,t),ce.init(e,t)});function Sh(e){return fi(Wi,e)}var Zi=I("ZodIPv4",(e,t)=>{xc.init(e,t),ce.init(e,t)});function yh(e){return hi(Zi,e)}var rm=I("ZodMAC",(e,t)=>{bc.init(e,t),ce.init(e,t)});function vh(e){return wd(rm,e)}var Gi=I("ZodIPv6",(e,t)=>{zc.init(e,t),ce.init(e,t)});function wh(e){return gi(Gi,e)}var Hi=I("ZodCIDRv4",(e,t)=>{Sc.init(e,t),ce.init(e,t)});function Rh(e){return xi(Hi,e)}var Ji=I("ZodCIDRv6",(e,t)=>{yc.init(e,t),ce.init(e,t)});function Ih(e){return zi(Ji,e)}var Ki=I("ZodBase64",(e,t)=>{vc.init(e,t),ce.init(e,t)});function Mh(e){return bi(Ki,e)}var Xi=I("ZodBase64URL",(e,t)=>{wc.init(e,t),ce.init(e,t)});function Oh(e){return Si(Xi,e)}var Yi=I("ZodE164",(e,t)=>{Rc.init(e,t),ce.init(e,t)});function $h(e){return yi(Yi,e)}var im=I("ZodCreditCard",(e,t)=>{Ic.init(e,t),ce.init(e,t)});function Th(e){return Rd(im,e)}var am=I("ZodIBAN",(e,t)=>{Mc.init(e,t),ce.init(e,t)});function kh(e){return Id(am,e)}var Qi=I("ZodJWT",(e,t)=>{Oc.init(e,t),ce.init(e,t)});function Ch(e){return vi(Qi,e)}var Wt=I("ZodCustomStringFormat",(e,t)=>{$c.init(e,t),ce.init(e,t)});function Ce(e,t,i={}){return Nt(Wt,e,t,i)}function Dh(e){return Nt(Wt,"hostname",hs,e)}function _h(e){return Nt(Wt,"hex",ks,e)}function jh(e){return Nt(Wt,"currency_code",zs,e)}function Eh(e,t){let i=t?.enc??"hex",a=`${e}_${i}`,o=He[a];if(!o)throw new Error(`Unrecognized hash format: ${a}`);return Nt(Wt,a,o,t)}var ko=I("ZodNumber",(e,t)=>{Lr.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>dp(e,i,a,o),e.isFinite=!0},C.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:i}=ve(e);return Math.max(t??Number.NEGATIVE_INFINITY,i??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:i}=ve(e);return Math.min(t??Number.POSITIVE_INFINITY,i??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:i}=ve(e);return!!t||!!i?.some(Number.isSafeInteger)},format:e=>ve(e).format??null},{gt(e,t){return this.check(ot(e,t))},gte(e,t){return this.check(Be(e,t))},min(e,t){return this.check(Be(e,t))},lt(e,t){return this.check(tt(e,t))},lte(e,t){return this.check(qe(e,t))},max(e,t){return this.check(qe(e,t))},int(e){return this.check(x(e))},safe(e){return this.check(x(e))},positive(e){return this.check(ot(0,e))},nonnegative(e){return this.check(Be(0,e))},negative(e){return this.check(tt(0,e))},nonpositive(e){return this.check(qe(0,e))},multipleOf(e,t){return this.check(bt(e,t))},step(e,t){return this.check(bt(e,t))},finite(){return this}}));function s(e){return Od(ko,e)}var Zt=I("ZodNumberFormat",(e,t)=>{Tc.init(e,t),ko.init(e,t)});function x(e){return Td(Zt,e)}function Ph(e){return kd(Zt,e)}function Lh(e){return Cd(Zt,e)}function Vh(e){return Dd(Zt,e)}function Ah(e){return _d(Zt,e)}var Co=I("ZodBoolean",(e,t)=>{hn.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>pp(e,i,a,o)});function R(e){return jd(Co,e)}var Do=I("ZodBigInt",(e,t)=>{Vr.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>mp(e,i,a,o)},C.derived({minValue:e=>ve(e).minimum??null,maxValue:e=>ve(e).maximum??null,format:e=>ve(e).format??null},{gte(e,t){return this.check(Be(e,t))},min(e,t){return this.check(Be(e,t))},gt(e,t){return this.check(ot(e,t))},lt(e,t){return this.check(tt(e,t))},lte(e,t){return this.check(qe(e,t))},max(e,t){return this.check(qe(e,t))},positive(e){return this.check(ot(BigInt(0),e))},negative(e){return this.check(tt(BigInt(0),e))},nonpositive(e){return this.check(qe(BigInt(0),e))},nonnegative(e){return this.check(Be(BigInt(0),e))},multipleOf(e,t){return this.check(bt(e,t))}}));function Fh(e){return Pd(Do,e)}var ea=I("ZodBigIntFormat",(e,t)=>{kc.init(e,t),Do.init(e,t)});function Uh(e){return Vd(ea,e)}function Nh(e){return Ad(ea,e)}var sm=I("ZodSymbol",(e,t)=>{Cc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>lp(e,i,a,o)});function qh(e){return Fd(sm,e)}var cm=I("ZodUndefined",(e,t)=>{Dc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>fp(e,i,a,o)});function Bh(e){return Ud(cm,e)}var dm=I("ZodNull",(e,t)=>{_c.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>up(e,i,a,o)});function q(e){return Nd(dm,e)}var pm=I("ZodAny",(e,t)=>{jc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>xp(e,i,a,o)});function Wh(){return qd(pm)}var mm=I("ZodUnknown",(e,t)=>{Ec.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>zp(e,i,a,o)});function $(){return Bd(mm)}var lm=I("ZodNever",(e,t)=>{Pc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>gp(e,i,a,o)});function ta(e){return Wd(lm,e)}var um=I("ZodVoid",(e,t)=>{Lc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>hp(e,i,a,o)});function we(e){return Zd(um,e)}var _n=I("ZodDate",(e,t)=>{Vc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>bp(e,i,a,o),e.min=(i,a)=>e.check(Be(i,a)),e.max=(i,a)=>e.check(qe(i,a))},C.derived({minDate:e=>{let{minimum:t}=ve(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=ve(e);return t?new Date(t):null}},{}));function Zh(e){return Gd(_n,e)}var fm=I("ZodArray",(e,t)=>{Bt(),Ac.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Cp(e,i,a,o),e.element=t.element},{min(e,t){return this.check(pt(e,t))},nonempty(e){return this.check(pt(1,e))},max(e,t){return this.check(Ft(e,t))},length(e,t){return this.check(Ut(e,t))},unwrap(){return this.element}});function h(e,t){return Kd(fm,e,t)}function Gh(e){let t=e._zod.def.shape;return l(Object.keys(t))}var jn=I("ZodObject",(e,t)=>{Bt(),Fc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Dp(e,i,a,o),C.installLazyProp(e,"shape",i=>i._zod.def.shape,!1)},{keyof(){return l(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(C.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(C.mergeDefs(this._zod.def,{catchall:$()}))},loose(){return this.clone(C.mergeDefs(this._zod.def,{catchall:$()}))},strict(){return this.clone(C.mergeDefs(this._zod.def,{catchall:ta()}))},strip(){return this.clone(C.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return C.extend(this,e)},safeExtend(e){return C.safeExtend(this,e)},merge(e){return C.merge(this,e)},pick(e){return C.pick(this,e)},omit(e){return C.omit(this,e)},partial(...e){return C.partial(Pn,this,e[0])},exactPartial(...e){return C.partial(na,this,e[0],"exactPartial")},required(...e){return C.required(ra,this,e[0])}});function k(e,t){let i={type:"object",shape:e??{},...C.normalizeParams(t)};return new jn(i)}function c(e,t){return new jn({type:"object",shape:e,catchall:ta(),...C.normalizeParams(t)})}function $t(e,t){return new jn({type:"object",shape:e,catchall:$(),...C.normalizeParams(t)})}var En=I("ZodUnion",(e,t)=>{gn.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Ti(e,i,a,o),e.options=t.options});function z(e,t){return new En({type:"union",options:e,...C.normalizeParams(t)})}var hm=I("ZodXor",(e,t)=>{En.init(e,t),Uc.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Ti(e,i,a,o),e.options=t.options});function Hh(e,t){return new hm({type:"union",options:e,inclusive:!1,...C.normalizeParams(t)})}var gm=I("ZodDiscriminatedUnion",(e,t)=>{En.init(e,t),qc.init(e,t)});function Jh(e,t,i){return new gm({type:"union",options:t,discriminator:e,...C.normalizeParams(i)})}var xm=I("ZodIntersection",(e,t)=>{Bc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>_p(e,i,a,o)});function zm(e,t){return new xm({type:"intersection",left:e,right:t})}var bm=I("ZodTuple",(e,t)=>{Bt(),Ar.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>jp(e,i,a,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Pn({type:"optional",innerType:t}))})}});function A(e,t,i){let a=t instanceof K,o=a?i:t,r=a?t:null;return new bm({type:"tuple",items:e,rest:r,...C.normalizeParams(o)})}var Oo=I("ZodRecord",(e,t)=>{Bt(),Wc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Ep(e,i,a,o),e.keyType=t.keyType,e.valueType=t.valueType});function b(e,t,i){return!t||!t._zod?new Oo({type:"record",keyType:n(),valueType:e,...C.normalizeParams(t)}):new Oo({type:"record",keyType:e,valueType:t,...C.normalizeParams(i)})}function Kh(e,t,i){return new Oo({type:"record",keyType:e,valueType:t,...C.normalizeParams(i),partial:!0})}function Xh(e,t,i){return new Oo({type:"record",keyType:e,valueType:t,mode:"loose",...C.normalizeParams(i)})}var Sm=I("ZodMap",(e,t)=>{Bt(),Zc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Tp(e,i,a,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...i)=>e.check(nt(...i)),e.nonempty=i=>e.check(nt(1,i)),e.max=(...i)=>e.check(St(...i)),e.size=(...i)=>e.check(At(...i))});function Yh(e,t,i){return new Sm({type:"map",keyType:e,valueType:t,...C.normalizeParams(i)})}var ym=I("ZodSet",(e,t)=>{Bt(),Gc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>kp(e,i,a,o),e.min=(...i)=>e.check(nt(...i)),e.nonempty=i=>e.check(nt(1,i)),e.max=(...i)=>e.check(St(...i)),e.size=(...i)=>e.check(At(...i))});function Qh(e,t){return new ym({type:"set",valueType:e,...C.normalizeParams(t)})}var $o=I("ZodEnum",(e,t)=>{Hc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(a,o,r)=>Sp(e,a,o,r),e.enum=t.entries,e.options=[...e._zod.values];let i=new Set(Object.keys(t.entries));e.extract=(a,o)=>{let r={};for(let d of a)if(i.has(d))r[d]=t.entries[d];else throw new Error(`Key ${d} not found in enum`);return new $o({...t,checks:[],...C.normalizeParams(o),entries:r})},e.exclude=(a,o)=>{let r={...t.entries};for(let d of a)if(i.has(d))delete r[d];else throw new Error(`Key ${d} not found in enum`);return new $o({...t,checks:[],...C.normalizeParams(o),entries:r})}});function l(e,t){let i=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new $o({type:"enum",entries:i,...C.normalizeParams(t)})}function eg(e,t){return new $o({type:"enum",entries:e,...C.normalizeParams(t)})}var vm=I("ZodLiteral",(e,t)=>{Jc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>yp(e,i,a,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function m(e,t){return new vm({type:"literal",values:Array.isArray(e)?e:[e],...C.normalizeParams(t)})}var wm=I("ZodFile",(e,t)=>{Kc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Rp(e,i,a,o),e.min=(i,a)=>e.check(nt(i,a)),e.max=(i,a)=>e.check(St(i,a)),e.mime=(i,a)=>e.check(zo(Array.isArray(i)?i:[i],a))});function tg(e){return Xd(wm,e)}var Rm=I("ZodTransform",(e,t)=>{Bt(),Xc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>$p(e,i,a,o),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new zt(e.constructor.name);i.addIssue=r=>{if(typeof r=="string")i.issues.push(C.issue(r,i.value,t));else{let d=r;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=i.value),d.inst??(d.inst=e),i.issues.push(C.issue(d))}};let o=t.transform(i.value,i);return o instanceof Promise?o.then(r=>(i.value=r,i)):(i.value=o,i)}});function oa(e){return new Rm({type:"transform",transform:e})}var Pn=I("ZodOptional",(e,t)=>{Fr.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>ki(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function qt(e){return new Pn({type:"optional",innerType:e})}var na=I("ZodExactOptional",(e,t)=>{Yc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>ki(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function Im(e){return new na({type:"optional",innerType:e})}var Mm=I("ZodNullable",(e,t)=>{Qc.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Pp(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function Cn(e){return new Mm({type:"nullable",innerType:e})}function og(e){return qt(Cn(e))}var Om=I("ZodDefault",(e,t)=>{ed.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Ap(e,i,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $m(e,t){return new Om({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():C.shallowClone(t)}})}var Tm=I("ZodPrefault",(e,t)=>{td.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Fp(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function km(e,t){return new Tm({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():C.shallowClone(t)}})}var ra=I("ZodNonOptional",(e,t)=>{od.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Lp(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function Cm(e,t){return new ra({type:"nonoptional",innerType:e,...C.normalizeParams(t)})}var Dm=I("ZodSuccess",(e,t)=>{nd.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Ip(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function ng(e){return new Dm({type:"success",innerType:e})}var _m=I("ZodCatch",(e,t)=>{rd.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Up(e,i,a,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jm(e,t){return new _m({type:"catch",innerType:e,catchValue:typeof t=="function"?t:C.constantCatch(t)})}var Em=I("ZodNaN",(e,t)=>{id.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>vp(e,i,a,o)});function rg(e){return Jd(Em,e)}var Ln=I("ZodPipe",(e,t)=>{Ur.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Np(e,i,a,o),e.in=t.in,e.out=t.out});function Ei(e,t){return new Ln({type:"pipe",in:e,out:t})}var Vn=I("ZodCodec",(e,t)=>{Ln.init(e,t),xn.init(e,t)});function ig(e,t,i){return new Vn({type:"pipe",in:e,out:t,transform:i.decode,reverseTransform:i.encode})}function ag(e){let t=e._zod.def;return new Vn({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Pm=I("ZodPreprocess",(e,t)=>{Ln.init(e,t),ad.init(e,t)}),Lm=I("ZodReadonly",(e,t)=>{sd.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>qp(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function Vm(e){return new Lm({type:"readonly",innerType:e})}var Am=I("ZodTemplateLiteral",(e,t)=>{cd.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>wp(e,i,a,o)});function sg(e,t){return new Am({type:"template_literal",parts:e,...C.normalizeParams(t)})}var Fm=I("ZodLazy",(e,t)=>{zn.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Wp(e,i,a,o),e.unwrap=()=>e._zod.def.getter()});function lt(e){return new Fm({type:"lazy",getter:e})}var Um=I("ZodPromise",(e,t)=>{pd.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Bp(e,i,a,o),e.unwrap=()=>e._zod.def.innerType});function cg(e){return new Um({type:"promise",innerType:e})}var Nm=I("ZodFunction",(e,t)=>{dd.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Op(e,i,a,o)});function dg(e){return new Nm({type:"function",input:Array.isArray(e?.input)?A(e?.input):e?.input??h($()),output:e?.output??$()})}var An=I("ZodCustom",(e,t)=>{md.init(e,t),Y.init(e,t),e._zod.processJSONSchema=(i,a,o)=>Mp(e,i,a,o)});function pg(e){let t=new de({check:"custom"});return t._zod.check=e,t}function mg(e,t){return Yd(An,e??(()=>!0),t)}function qm(e,t={}){return Qd(An,e,t)}function Bm(e,t){return ep(e,t)}var lg=tp,ug=op,Wm=I("ZodInstanceOf",(e,t)=>{An.init(e,t)},{properties(e,t){return this.check(xo(e,t))}});function fg(e,t={}){let i=new Wm({type:"custom",check:"custom",fn:a=>a instanceof e,abort:!0,...C.normalizeParams(t)});return i._zod.bag.Class=e,i._zod.check=a=>{a.value instanceof e||a.issues.push({code:"invalid_type",expected:e.name,input:a.value,inst:i,path:[...i._zod.def.path??[]]})},i}var hg=(...e)=>np({Codec:Vn,Boolean:Co,String:To},...e);function gg(e){let t=lt(()=>z([n(e),s(),R(),q(),h(t),b(n(),t)]));return t}function xg(e,t){return new Pm({type:"pipe",in:oa(e),out:t})}var yw={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function vw(e){xe({customError:e})}function ww(){return xe().customError}var Zm;Zm||(Zm={});var Fn={};at(Fn,{ZodISODate:()=>It,ZodISODateTime:()=>Rt,ZodISODuration:()=>Ot,ZodISOTime:()=>Mt,date:()=>Iw,datetime:()=>Rw,duration:()=>Ow,time:()=>Mw});function Rw(e){return In(Rt,e)}function Iw(e){return Mn(It,e)}function Mw(e){return On(Mt,e)}function Ow(e){return $n(Ot,e)}var N={..._o,..._i,iso:Fn},$w=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Tw(e,t){let i=e.$schema;return i==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":i==="http://json-schema.org/draft-07/schema#"?"draft-7":i==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function zg(e,t){return e.map((i,a)=>a<t?i:i.optional())}function kw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Cw(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let i=e.slice(1).split("/").filter(Boolean);if(i.length===0)return t.rootSchema;let a=t.version==="draft-2020-12"?"$defs":"definitions";if(i[0]===a){let o=i[1]===void 0?void 0:kw(i[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function Dw(e,t){return N.transform(a=>a).check(a=>{let o=a.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let r=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&r.length<t.minProperties&&a.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:!0}),t.maxProperties!==void 0&&r.length>t.maxProperties&&a.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:!0}),t.keySchema)for(let d of r){let p=t.keySchema.safeParse(d);p.success||a.issues.push({code:"invalid_key",origin:"record",issues:p.error.issues,input:d,path:[d],continue:!0})}}).pipe(e)}function Gm(e,t){if(e===null)return"z";let i=typeof e;if(i!=="object"){if(i==="number"&&Number.isNaN(e))return null;let a=String(e);return`${i[0]}${a.length}:${a}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let r=[];for(let d of e){let p=Gm(d,t);if(p===null)return null;r.push(p)}return`a${r.length}:[${r.join(",")}]`}let a=Object.keys(e).sort(),o=[];for(let r of a){let d=Gm(e[r],t);if(d===null)return null;o.push(`${r.length}:${r}=${d}`)}return`o${o.length}:{${o.join(",")}}`}finally{t.delete(e)}}var _w=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),jw=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Un(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(Un):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,i])=>_w.has(t)?Un(i):!jw.has(t)||typeof i!="object"||i===null?!1:Object.values(i).some(Un))}function bg(e){return e===1?"element":"elements"}function Ew(e,t){return N.transform(a=>a).check(a=>{let o=a.value;if(Array.isArray(o)){if(t.uniqueItems===!0){let r=new Map;for(let d=0;d<o.length;d++){let p=Gm(o[d],new Set);if(p===null)continue;let f=r.get(p);if(f===void 0){r.set(p,d);continue}a.issues.push({code:"custom",message:`Array items must be unique: element at index ${d} duplicates the one at index ${f}`,input:o,path:[d],continue:!0})}}if(t.containsSchema){let r=t.minContains??1,d=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,p=0;for(let f of o)if(t.containsSchema.safeParse(f).success&&++p>=d)break;p<r&&a.issues.push({code:"custom",message:`Array must contain at least ${r} matching ${bg(r)}; found ${p}`,input:o,continue:!0}),t.maxContains!==void 0&&p>t.maxContains&&a.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${bg(t.maxContains)}`,input:o,continue:!0})}}}).pipe(e)}function Sg(e,t){if(e!==!1)return e===void 0||e===!0?N.any():Pe(e,t)}var Pw=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function yg(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return N.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return N.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let r=Cw(o,t),d=Pe(r,t);return t.refs.set(o,d),t.processing.delete(o),d}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return N.null();if(o.length===0)return N.never();if(o.length===1)return N.literal(o[0]);if(o.every(d=>typeof d=="string"))return N.enum(o);let r=o.map(d=>N.literal(d));return r.length<2?r[0]:N.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return N.literal(e.const);let i=e.type;if(Array.isArray(i)){let o=i.map(r=>{let d={...e,type:r};return yg(d,t)});return o.length===0?N.never():o.length===1?o[0]:N.union(o)}if(!i)return N.any();let a;switch(i){case"string":{let o=N.string();if(e.format){let r=e.format;r==="email"?o=o.check(N.email()):r==="uri"||r==="uri-reference"?o=o.check(N.url()):r==="uuid"||r==="guid"?o=o.check(N.uuid()):r==="date-time"?o=o.check(N.iso.datetime({offset:!0})):r==="date"?o=o.check(N.iso.date()):r==="time"?o=o.check(N.regex(Pw)):r==="duration"?o=o.check(N.iso.duration()):r==="hostname"?o=o.check(N.hostname()):r==="ipv4"?o=o.check(N.ipv4()):r==="ipv6"?o=o.check(N.ipv6()):r==="mac"?o=o.check(N.mac()):r==="cidr"?o=o.check(N.cidrv4()):r==="cidr-v6"?o=o.check(N.cidrv6()):r==="base64"?o=o.check(N.base64()):r==="base64url"?o=o.check(N.base64url()):r==="e164"?o=o.check(N.e164()):r==="credit_card"?o=o.check(N.creditCard()):r==="iban"?o=o.check(N.iban()):r==="jwt"?o=o.check(N.jwt()):r==="emoji"?o=o.check(N.emoji()):r==="nanoid"?o=o.check(N.nanoid()):r==="cuid"?o=o.check(N.cuid()):r==="cuid2"?o=o.check(N.cuid2()):r==="ulid"?o=o.check(N.ulid()):r==="xid"?o=o.check(N.xid()):r==="ksuid"&&(o=o.check(N.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),a=o;break}case"number":case"integer":{let o=i==="integer"?N.number().int():N.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),a=o;break}case"boolean":{a=N.boolean();break}case"null":{a=N.null();break}case"object":{let o={},r=e.properties||{},d=new Set(e.required||[]),p=typeof e.additionalProperties=="object"?Pe(e.additionalProperties,t):void 0;for(let[S,y]of Object.entries(r)){let w=Pe(y,t);Oe(o,S,d.has(S)?w:w.optional())}if(e.patternProperties){let S=e.patternProperties,y=Object.keys(S),w=[];for(let T of y){let j=Pe(S[T],t),Z=N.string().regex(new RegExp(T));w.push(N.looseRecord(Z,j))}let O=[];if(Object.keys(o).length>0&&O.push(N.object(o).passthrough()),O.push(...w),O.length===0)a=N.object({}).passthrough();else if(O.length===1)a=O[0];else{let T=N.intersection(O[0],O[1]);for(let j=2;j<O.length;j++)T=N.intersection(T,O[j]);a=T}if(e.additionalProperties===!1){let T=Object.keys(o),j=y.map(U=>new RegExp(U)),Z=a;a=a.check(U=>{if(!Ze(U.value))return;let V=[];for(let H of Object.keys(U.value))T.includes(H)||j.some(se=>se.test(H))||V.push(H);V.length&&U.issues.push({code:"unrecognized_keys",keys:V,input:U.value,inst:Z})})}}else{let S=N.object(o);e.additionalProperties===!1?a=S.strict():p?a=S.catchall(p):a=S.passthrough()}let f=e.propertyNames!==void 0&&e.propertyNames!==!0,u=typeof e.minProperties=="number"?e.minProperties:void 0,g=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(f||u!==void 0||g!==void 0){let S;if(f){let y=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;S=Pe(y,t)}a=Dw(a,{keySchema:S,minProperties:u,maxProperties:g})}break}case"array":{let o=e.prefixItems,r=e.items;if(o&&Array.isArray(o)){let d=typeof e.minItems=="number"?e.minItems:0,p=o.map(S=>Pe(S,t)),f=zg(p,d),u=Array.isArray(r)?void 0:Sg(r,t),g=N.tuple(f);a=u?g.rest(u):g,typeof e.minItems=="number"&&(a=a.check(N.minLength(e.minItems))),typeof e.maxItems=="number"&&(a=a.check(N.maxLength(e.maxItems)))}else if(Array.isArray(r)){let d=typeof e.minItems=="number"?e.minItems:0,p=r.map(S=>Pe(S,t)),f=zg(p,d),u=Sg(e.additionalItems,t),g=N.tuple(f);a=u?g.rest(u):g,typeof e.minItems=="number"&&(a=a.check(N.minLength(e.minItems))),typeof e.maxItems=="number"&&(a=a.check(N.maxLength(e.maxItems)))}else if(r!==void 0){let d=Pe(r,t),p=N.array(d);typeof e.minItems=="number"&&(p=p.min(e.minItems)),typeof e.maxItems=="number"&&(p=p.max(e.maxItems)),a=p}else a=N.array(N.any());(e.uniqueItems===!0||e.contains!==void 0)&&(a=Ew(a,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?Pe(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${i}`)}return a}function Pe(e,t){if(typeof e=="boolean")return e?N.any():N.never();let i=yg(e,t),a=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let p=e.anyOf.map(u=>Pe(u,t)),f=N.union(p);i=a?N.intersection(i,f):f}if(e.oneOf&&Array.isArray(e.oneOf)){let p=e.oneOf.map(u=>Pe(u,t)),f=N.xor(p);i=a?N.intersection(i,f):f}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)i=a?i:N.any();else{let p=a?i:Pe(e.allOf[0],t),f=a?0:1;for(let u=f;u<e.allOf.length;u++)p=N.intersection(p,Pe(e.allOf[u],t));i=p}e.nullable===!0&&t.version==="openapi-3.0"&&(i=N.nullable(i)),e.readOnly===!0&&(i=N.readonly(i)),e.default!==void 0&&(i=i.default(e.default));let o={},r=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let p of r)p in e&&(o[p]=e[p]);let d=["contentEncoding","contentMediaType","contentSchema"];for(let p of d)p in e&&(o[p]=e[p]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Un(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let p of["minProperties","maxProperties"])e[p]!==void 0&&(o[p]=e[p])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Un(e.contains)&&(o.contains=e.contains);for(let p of["uniqueItems","minContains","maxContains"])e[p]!==void 0&&(o[p]=e[p])}for(let p of Object.keys(e))$w.has(p)||Oe(o,p,e[p]);return Object.keys(o).length>0&&t.registry.add(i,o),e.description&&(i=i.describe(e.description)),i}function vg(e,t){if(typeof e=="boolean")return e?N.any():N.never();let i;try{i=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let a=Tw(i,t?.defaultTarget),o=i.$defs||i.definitions||{},r={version:a,defs:o,refs:new Map,processing:new Set,rootSchema:i,registry:t?.registry??$e};return Pe(i,r)}var wg=Symbol("z.visit/resolving");function Nn(e,t){let i=typeof t=="function"?t:(d,p)=>{let f=t[d._zod.def.type];return f?f(d,p):d},a=new Map;function o(d){let p=a.get(d);if(p===wg)return new zn({type:"lazy",getter:()=>a.get(d)});if(p!==void 0)return p;a.set(d,wg);let f=r(d),u=i(f,f!==d);return a.set(d,u),u}function r(d){let p=d._zod.def,f=p.type;switch(f){case"object":{let u=p.shape,g=Object.keys(u),S=!1,y={};for(let O of g){let T=o(u[O]);T!==u[O]&&(S=!0),y[O]=T}let w=p.catchall;return p.catchall&&(w=o(p.catchall),w!==p.catchall&&(S=!0)),S?re(d,{...p,shape:y,catchall:w}):d}case"array":{let u=o(p.element);return u===p.element?d:re(d,{...p,element:u})}case"tuple":{let u=p.items,g=!1,S=[];for(let w of u){let O=o(w);O!==w&&(g=!0),S.push(O)}let y=p.rest;return p.rest&&(y=o(p.rest),y!==p.rest&&(g=!0)),g?re(d,{...p,items:S,rest:y}):d}case"record":case"map":{let u=o(p.keyType),g=o(p.valueType);return u===p.keyType&&g===p.valueType?d:re(d,{...p,keyType:u,valueType:g})}case"set":{let u=o(p.valueType);return u===p.valueType?d:re(d,{...p,valueType:u})}case"union":{let u=p.options,g=!1,S=[];for(let y of u){let w=o(y);w!==y&&(g=!0),S.push(w)}return g?re(d,{...p,options:S}):d}case"intersection":{let u=o(p.left),g=o(p.right);return u===p.left&&g===p.right?d:re(d,{...p,left:u,right:g})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let u=o(p.innerType);return u===p.innerType?d:re(d,{...p,innerType:u})}case"pipe":{let u=o(p.in),g=o(p.out);return u===p.in&&g===p.out?d:re(d,{...p,in:u,out:g})}case"function":{let u=o(p.input),g=o(p.output);return u===p.input&&g===p.output?d:re(d,{...p,input:u,output:g})}case"lazy":{let u=p.getter,{_cachedInner:g,...S}=p;return re(d,{...S,getter:()=>o(u())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return d;default:return d}}return o(e)}function Rg(e){return Nn(e,{object:t=>t.partial(),union:t=>{let i=t._zod.def;return i.discriminator===void 0?t:z(i.options)}})}function Lw(e,t){if(!t?.length)return e;let i=e._zod.def;return re(e,Xe(i,{checks:[...i.checks??[],...t]}),{parent:!0})}function Ig(e){return Lw(e.out,e.checks)}function Vw(e){return e.in._zod.traits.has("$ZodTransform")?Ig(e):e.in}function Mg(e){return Nn(e,{pipe:t=>Vw(t._zod.def),default:(t,i)=>i?qt(t._zod.def.innerType):t,catch:(t,i)=>i?t._zod.def.innerType:t})}function Og(e){return Nn(e,{pipe:t=>Ig(t._zod.def),prefault:(t,i)=>i?t._zod.def.innerType:t})}var Hm={};at(Hm,{bigint:()=>Nw,boolean:()=>Uw,date:()=>qw,number:()=>Fw,string:()=>Aw});function Aw(e){return vd(To,e)}function Fw(e){return $d(ko,e)}function Uw(e){return Ed(Co,e)}function Nw(e){return Ld(Do,e)}function qw(e){return Hd(_n,e)}var Jw="cueframe/components";var Kw="cueframe.json",Xw=qn.object({componentsDir:qn.string().min(1).default(Jw)}).passthrough();function Bn(e){let t=e,i=Hw(t).root;for(;;){let a=jo(t,Kw);if(ia(a)){let o=Bw(a,"utf8"),r=Xw.parse(JSON.parse(o));return{root:t,manifest:r}}if(t===i)return null;t=Gw(t)}}function $g(e){return jo(e.root,e.manifest.componentsDir)}function Eo(e,t){return jo($g(e),t)}function Tg(e){let t=$g(e);return ia(t)?Ww(t).filter(i=>{let a=jo(t,i);return Zw(a).isDirectory()?ia(jo(a,"index.tsx"))&&ia(jo(a,"config.ts")):!1}).sort():[]}import{readFileSync as Eve,existsSync as Pve}from"fs";import{join as Lve}from"path";var kg=c({featureId:n().describe("Stable billing feature id."),name:n().describe("Human-readable feature name."),type:l(["metered","boolean","credit_system"]).describe("metered = a depleting/gauge quota (has balances); boolean = an on/off plan grant; credit_system = a spendable wallet the metered lines draw from."),unit:z([l(["cents","count","minutes","gb"]),q()]).describe("What `balance`/`includedUsage`/`usage` are COUNTED IN \u2014 do not assume. `exports` is output-MINUTES (not a number of renders), `compose`/`ai_tokens`/`compose_verify`/`generate` are CENTS of spend (not a number of calls), `compose_capture` is a count of stills, `storage` is GB, a credit system is cents (1 credit = $0.01). null = boolean feature, nothing to count."),included:R().nullable().describe("Does the CURRENT plan grant this feature? For a credit-funded feature (see `fundedBy`) this is true whenever the plan grants the funding wallet \u2014 spend is then bounded by `balance`, not by inclusion. false = not on this plan (a create gated on it 402s billing_required); null = unknown (billing not configured / no live data)."),unlimited:R().nullable().describe("Metered only: the plan grants an effectively-unlimited allowance. null = unknown / boolean feature."),balance:s().nullable().describe("Metered only: remaining balance for the current period, in THIS feature's unit. For a credit-funded feature it is the funding wallet's balance restated at `creditCost` credits per unit \u2014 a SHARE of a pool, not a private allowance. null = unknown / boolean feature."),includedUsage:s().nullable().describe("Metered only: the plan's included allowance (the period limit), in this feature's unit. null = unknown / boolean feature."),usage:s().nullable().describe("Metered only: amount consumed this period, in this feature's unit. null = unknown / boolean feature."),nextResetAt:s().nullable().describe("Metered only: epoch-ms when the period balance resets. null = unknown / no scheduled reset."),fundedBy:n().nullable().describe("The credit system that actually pays for this feature (always `credits` \u2014 there is one wallet). Non-null means the feature has NO separate allowance: its `balance` restates that shared wallet, and every other feature with the same `fundedBy` competes for the same money. null = the plan grants this feature directly."),creditCost:s().nullable().describe("Credits consumed per ONE unit of this feature (exports 50 = $0.50 per 1080p output-minute; compose_capture 2 = $0.02 per still). null = not credit-funded."),listUsdPerUnit:s().nullable().describe("LIST price in USD of ONE unit of this feature (see `unit`) \u2014 the quote to read BEFORE a call. Credit-funded: `creditCost`/100 (exports 0.5 per 1080p output-minute; compose_capture 0.02 per still; compose/ai_tokens/generate 0.015 per cent of provider cost). 0 = the plan grants this feature and it draws NO credits (resource_import: stock search AND import are free for a keyed caller, bytes count toward `storage`; brand_kits). null = not quotable up front (a wallet, a gauge, or a feature the plan does not grant).")}).describe("A single feature's entitlement: whether the plan includes it, remaining/limit when metered, and the per-unit list price to quote before a call");var Yw=c({generationLimit:z([c({applies:R(),unit:m("cents_of_provider_cost"),cap:s().nullable(),spent:s().nullable(),remaining:s().nullable()}),q()]).describe("Separate lifetime generation cap before a credit-pack purchase. Wallet balance is still shared; generation must also fit this remaining provider-cost allowance. null means unknown."),orgId:n().describe("The org this API key is bound to \u2014 resolved server-side from the Authorization credential, NEVER from the request body/query."),displayName:n().nullable().describe("Org/customer display name from the billing record; null when not set or unknown."),plan:z([c({id:n().describe("Plan/product id (e.g. free, pro, business, studio)."),name:n().nullable().describe("Plan display name.")}),q()]).describe("The customer's current base plan/tier. null = unknown (billing not configured, or no active plan resolvable yet)."),entitlements:b(n(),kg).describe("Per-feature entitlements keyed by featureId. Covers the billing-gated capabilities: `exports` gates create_render AND generate_media output; `compose` gates compose; `brand_kits` gates create_brand_kit; `resource_import` gates import_resource (a boolean grant: `listUsdPerUnit` 0 \u2014 stock search and import cost no credits for a keyed caller); plus ai_tokens/storage/compose_verify/compose_capture/etc. Read `listUsdPerUnit` for what one unit costs before you spend it. Most capabilities are CREDIT-FUNDED \u2014 `included` is true and the real limit is `balance`, drawn from the shared wallet named in `fundedBy` (`credits` \u2014 generation included; a free org is additionally bounded by a generation cap). So read `balance`, not `included`, to decide whether you can afford a call; `included:false` means the plan genuinely lacks the feature. Check BEFORE a metered call to avoid a mid-workflow 402 billing_required (whose error `details.featureId` names the gating feature)."),costCeilings:c({generateMediaUsdPerCall:s().nullable().describe("Per-call USD ceiling for generate_media: a generation whose ESTIMATE exceeds this 402s (generation_budget_exceeded) before any spend. Right-size the prompt/duration under this. null = unknown.")}).describe("Discoverable per-call cost ceilings so an agent can price/right-size a request before a guaranteed 402."),billingConfigured:R().describe("false = billing is not configured in this environment, so plan/entitlement values are best-effort and may be null (unknown), not authoritative."),surfaces:c({console:n().describe("Origin of the authenticated web console."),usage:n().describe("Browser URL for the usage ledger."),billing:n().describe("Browser URL for plan and credits."),apiKeys:n().describe("Browser URL for minting and revoking API keys."),project:q().describe("No per-project browser view exists yet, so there is no URL to hand a user for a project or its composition. Stated as an explicit null so a client does not construct a route that 404s (CUE-19). Show a rendered frame (preview_frame) or a completed render instead.")}).describe('The browser URLs that actually exist, so an agent asked to "show me" can hand the user a real link instead of guessing one from an id. A null means the surface is not built, not that it is hidden from this key.')}).describe("Account discovery for the authenticated key: identity + plan + entitlements + cost ceilings + the browser surfaces that exist. Read this to see what your plan/credits allow before a metered call (create_render / compose / generate_media / create_brand_kit).");var Qw=0,eR=9007199254740991,tR=c({name:n().min(1),permissions:b(n(),h(l(["read","write"])).min(1)).describe("Resource \u2192 actions grant. Resources: media, sessions, projects, renders, webhooks, billing. Actions: read, write. Least-privilege \u2014 grant only what's needed (billing:write is required to start a checkout)."),expiresIn:x().gt(Qw).max(eR).optional().describe("Lifetime in seconds; omit for no expiry.")});var oR=c({key:n().describe("The full secret key (cf_test_\u2026 / cf_live_\u2026). Shown ONCE \u2014 store it now."),id:n(),prefix:n(),start:n().describe("First chars of the key, for later identification.")});var Cg=c({ref:n().describe("Placement handle: a pack soundId/bedId, or an org media id."),role:l(["vo","music","sfx","ambience"]).describe("Declared role for mix policy."),envelopeClass:l(["transient","sweep","ambient"]).describe("Coarse envelope shape \u2014 the browse grouping."),description:n(),durationSec:s(),evidence:c({envelopeClass:l(["transient","sweep","ambient"]),attackMs:s().optional(),spectralCentroidHz:s().optional(),meanVolumeDb:s().optional(),maxVolumeDb:s().optional()}).describe("Envelope probe evidence (always carries envelopeClass)."),source:l(["pack","org","generated"]).describe("Provenance discriminant."),license:n().describe('"CC0" (pack), "org-owned"/a CC token (org), or "generated".'),provenance:n().describe("Human-legible provenance (pack attribution / org-owned / generator + prompt)."),bpm:s().optional().describe("Tempo \u2014 present for music-role entries."),mood:h(n()).optional().describe("Editorial mood tags \u2014 present for pack music beds.")});var Dg=c({id:n().describe("Billing catalog product id (e.g. pro, pro_yearly)."),tier:n().describe("Plan tier: pro | business | studio."),name:n(),interval:n().describe("month | year."),priceUsd:s().describe("Price in USD for the interval.")});var nR=c({plans:h(Dg).describe("Every purchasable {tier, interval} and its product id."),billingConfigured:R()});var rR=200,iR=200,aR=2e3,sR=500,cR=500,dR=5e3,pR=0,mR=1,lR=300,uR=0,fR=1e4,hR=120,gR=24,xR=40,zR=500,bR=0,SR=5e3,yR=0,vR=5e3,wR=0,RR=2e3,IR=0,MR=9007199254740991,OR=24,$R=0,TR=1,kR=300,CR=24,DR=4e3,_R=0,jR=60,ER=6,PR=24,LR=60,VR=c({kitId:n().min(1).max(rR),name:n().min(1).max(iR),description:n().max(aR).optional(),tagline:n().max(sR).optional(),secondaryTagline:n().max(cR).optional(),colors:c({primary:n().min(1),secondary:n().min(1),accent:n().min(1),background:n().min(1),text:n().min(1)}),extraColors:h(c({hex:n().min(1),label:n().min(1),usage:n().optional()})).optional(),headingFont:c({fontFamily:n().min(1),fontWeight:s()}),bodyFont:c({fontFamily:n().min(1),fontWeight:s()}),voiceGuidelines:n().max(dR).optional(),syncCaptions:R().optional(),captionProfile:c({fontFamily:n().optional(),fontSize:s().optional(),fontWeight:s().optional(),color:n().optional(),highlightColor:n().optional(),backgroundColor:n().optional(),plate:l(["glass","solid","none"]).optional(),position:l(["top","center","bottom"]).optional(),textTransform:l(["none","uppercase"]).optional(),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:s().optional(),entranceStaggerMs:s().optional(),exitMs:s().optional(),emphasisColor:n().optional(),emphasisScale:s().optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:s().optional(),emphasisFontStyle:l(["normal","italic"]).optional(),emphasisTextTransform:l(["none","uppercase"]).optional(),emphasisLetterSpacing:s().optional(),emphasisPlate:R().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional()}).optional(),motion:c({duration:s().optional(),easing:z([l(["linear","ease","ease-in","ease-out","ease-in-out"]),c({kind:m("cubic-bezier"),x1:s(),y1:s(),x2:s(),y2:s()})]).optional(),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:s().optional(),exitMs:s().optional()}).optional(),logo:c({src:n().min(1),alt:n().optional(),placement:l(["tl","tr","bl","br"]).optional(),sizePct:s().optional()}).optional(),intro:c({kind:l(["card","video"]),src:n().min(1).optional(),title:n().optional(),subtitle:n().optional(),durationMs:s().optional()}).optional(),outro:c({kind:l(["card","video"]),src:n().min(1).optional(),title:n().optional(),subtitle:n().optional(),durationMs:s().optional()}).optional(),watermark:c({src:n().min(1),opacity:s().min(pR).max(mR).optional(),placement:l(["tl","tr","bl","br"]).optional()}).optional(),spacing:c({base:s().optional(),lg:s().optional(),sm:s().optional()}).optional(),sizing:c({fontSizeHeading:s().optional(),fontSizeBody:s().optional(),fontSizeLabel:s().optional(),borderRadius:s().optional()}).optional(),audio:c({sfxIntensity:l(["off","light","standard","dense"]).optional(),musicEnabled:R().optional(),musicMood:n().max(lR).optional(),sonicLogo:c({ref:n().min(1),placement:l(["intro","outro","both"]),offsetMs:x().min(uR).max(fR).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:c({tick:n().min(1).optional(),pop:n().min(1).optional(),impact:n().min(1).optional(),confirm:n().min(1).optional(),error:n().min(1).optional(),whoosh:n().min(1).optional(),riser:n().min(1).optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:c({bedId:n().min(1).optional(),genre:n().max(hR).optional(),bpmRange:c({min:s(),max:s()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:z([c({ref:n().min(1)}),q()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional(),exemplarKeys:h(n().min(1)).max(gR).optional(),contactSheetKey:n().min(1).optional(),motifs:h(c({id:n().min(1).max(xR),observed:n().min(1).max(zR),body:z([c({kind:m("card"),html:n().min(1),tokens:b(n(),n()).optional()}),c({kind:m("overlay"),primitiveId:n().min(1),params:b(n(),$()).optional()}),c({kind:m("component"),componentId:n().min(1),props:b(n(),$()).optional()})]),motion:c({preset:l(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),enterMs:x().min(bR).max(SR).optional(),exitMs:x().min(yR).max(vR).optional(),staggerMs:x().min(wR).max(RR).optional(),confidence:l(["high","low"]).optional()}).optional(),role:l(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),zone:c({x:s(),y:s(),w:s(),h:s()}).optional(),evidence:h(x().min(IR).max(MR)).max(OR).optional(),diffScore:s().min($R).max(TR).optional(),coverage:l(["reproduced","approximated","skipped"]),skipReason:n().max(kR).optional()})).max(CR).optional(),styleRubric:n().max(DR).optional(),density:c({graphicsPerMin:s().min(_R).max(jR),maxSimultaneous:x().min(1).max(ER)}).optional(),inspiration:c({sources:h(n()).min(1).max(PR),extractedAt:s(),extractionVersion:n().min(1).max(LR)}).optional()}).describe("POST /brand-kits body. Org/user are server-resolved; never accepted from the body.");var AR=12,FR=c({motifId:n().min(1).optional(),limit:x().min(1).max(AR).optional()}).describe("POST /brand-kits/{id}/exemplars body \u2014 select which exemplar frames to presign.");var UR=-9007199254740991,NR=9007199254740991,qR=c({exemplars:h(c({index:x().min(UR).max(NR),url:n()})),contactSheetUrl:n().optional()});var BR=300,WR=0,ZR=1e4,GR=120,HR=24,JR=40,KR=500,XR=0,YR=5e3,QR=0,eI=5e3,tI=0,oI=2e3,nI=0,rI=9007199254740991,iI=24,aI=0,sI=1,cI=300,dI=24,pI=4e3,mI=0,lI=60,uI=6,fI=24,hI=60,Wn=c({id:n(),name:n(),description:n().nullable(),tagline:n().nullable(),colors:b(n(),n()),extraColors:h(c({name:n(),value:n()})).optional(),fonts:c({heading:z([c({family:n(),weight:z([s(),n()]).optional()}),q()]),body:z([c({family:n(),weight:z([s(),n()]).optional()}),q()])}),voiceGuidelines:n().nullable(),captions:c({sync:R(),profile:z([b(n(),$()),q()])}),motion:c({duration:s().optional(),easing:z([l(["linear","ease","ease-in","ease-out","ease-in-out"]),c({kind:m("cubic-bezier"),x1:s(),y1:s(),x2:s(),y2:s()})]).optional(),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:s().optional(),exitMs:s().optional()}).optional(),logo:c({src:n(),alt:n().optional(),placement:l(["tl","tr","bl","br"]).optional(),sizePct:s().optional()}).optional(),intro:c({kind:l(["card","video"]),src:n().optional(),title:n().optional(),subtitle:n().optional(),durationMs:s().optional()}).optional(),outro:c({kind:l(["card","video"]),src:n().optional(),title:n().optional(),subtitle:n().optional(),durationMs:s().optional()}).optional(),watermark:c({src:n(),opacity:s().optional(),placement:l(["tl","tr","bl","br"]).optional()}).optional(),spacing:c({base:s().optional(),lg:s().optional(),sm:s().optional()}).optional(),sizing:c({fontSizeHeading:s().optional(),fontSizeBody:s().optional(),fontSizeLabel:s().optional(),borderRadius:s().optional()}).optional(),audio:c({sfxIntensity:l(["off","light","standard","dense"]).optional(),musicEnabled:R().optional(),musicMood:n().max(BR).optional(),sonicLogo:c({ref:n().min(1),placement:l(["intro","outro","both"]),offsetMs:x().min(WR).max(ZR).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:c({tick:n().min(1).optional(),pop:n().min(1).optional(),impact:n().min(1).optional(),confirm:n().min(1).optional(),error:n().min(1).optional(),whoosh:n().min(1).optional(),riser:n().min(1).optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:c({bedId:n().min(1).optional(),genre:n().max(GR).optional(),bpmRange:c({min:s(),max:s()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:z([c({ref:n().min(1)}),q()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional(),exemplarKeys:h(n().min(1)).max(HR).optional(),contactSheetKey:n().min(1).optional(),motifs:h(c({id:n().min(1).max(JR),observed:n().min(1).max(KR),body:z([c({kind:m("card"),html:n().min(1),tokens:b(n(),n()).optional()}),c({kind:m("overlay"),primitiveId:n().min(1),params:b(n(),$()).optional()}),c({kind:m("component"),componentId:n().min(1),props:b(n(),$()).optional()})]),motion:c({preset:l(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),enterMs:x().min(XR).max(YR).optional(),exitMs:x().min(QR).max(eI).optional(),staggerMs:x().min(tI).max(oI).optional(),confidence:l(["high","low"]).optional()}).optional(),role:l(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),zone:c({x:s(),y:s(),w:s(),h:s()}).optional(),evidence:h(x().min(nI).max(rI)).max(iI).optional(),diffScore:s().min(aI).max(sI).optional(),coverage:l(["reproduced","approximated","skipped"]),skipReason:n().max(cI).optional()})).max(dI).optional(),styleRubric:n().max(pI).optional(),density:c({graphicsPerMin:s().min(mI).max(lI),maxSimultaneous:x().min(1).max(uI)}).optional(),inspiration:c({sources:h(n()).min(1).max(fI),extractedAt:s(),extractionVersion:n().min(1).max(hI)}).optional(),createdAt:n(),updatedAt:n()}).describe("Brand kit response per \xA7Brand Kits.");var pe=c({hasMore:R(),nextCursor:n().nullable(),prevCursor:n().nullable()}).describe("Cursor pagination metadata.");var gI=c({data:h(Wn),pagination:pe});var xI=300,Po=c({music:c({enabled:R().describe("Whether the compose carries a music bed."),mood:n().max(xI).optional().describe("Freeform mood/genre prompt for the GENERATED bed (e.g. 'understated editorial, warm'). Ignored when mediaId pins a track."),mediaId:n().min(1).optional().describe("Pin a client-imported track as the bed. HONOR-OR-REFUSE: must be an org-owned kind:'audio' media item, else 422 \u2014 never accept-and-ignore. Absent \u21D2 generate from mood.")}).optional(),sfx:c({intensity:l(["off","light","standard","dense"]).describe("SFX placement density. Real-footage content keeps restraint caps regardless ('dense' is the explicit opt-out); generated/graphic-led content unlocks the standard tier.")}).optional()});var zI=0,bI=0,SI=0,yI=80,vI=8,Lo=c({id:n().min(1),intent:n().min(1).describe("What this beat DOES editorially (hook the claim, prove it, CTA\u2026)."),durationSec:s().gt(zI).optional(),source:c({mediaId:n().min(1),startSec:s().min(bI),endSec:s().gt(SI)}).optional().describe("MOMENT PINNING: this beat uses EXACTLY this window of this media item \u2014 honored to-the-frame or refused. v1: every sourced beat must reference the SAME mediaId (multi-source briefs are refused loudly, not silently merged)."),graphic:c({role:l(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]).describe("The mandated graphic's editorial role (the graphics-plan GraphicRole vocabulary)."),items:h(n().min(1).max(yI)).max(vI).optional().describe("Mandated list items (enumeration/sequence) \u2014 carried VERBATIM into the plan's copy.items.")}).optional().describe("GRAPHICS MANDATE: the plan MUST carry a graphics request of this role overlapping this beat's window \u2014 enforced at the plan gate (honor-or-refuse, like moment pinning). Prose mustIncludes reaches only the judge; this is the checkable form.")});var Vo=l(["overlay","component","card","no-transitions"]);var wI=3,Ao=c({holdAt:h(l(["content","layout","motion"])).max(wI).optional().describe("Checkpoint gates \u2014 the compose pauses at each named stage for review via resume. DEFAULT (gates absent): the compose holds at EVERY stage \u2014 your agent reviews and resumes each one; an unreviewed checkpoint times out loudly after 60min. Auto-progression is the opt-in (gates.autoApprove: true)."),autoApprove:R().optional().describe("true = fully autonomous (compose runs with NO gates \u2014 the headless opt-in; without it a brief holds at every stage by default). Mutually exclusive with a non-empty holdAt."),reviewMode:l(["agent","hosted"]).optional().describe("Who captures the review decision. Default 'agent': you relay the packet and call resume. 'hosted': every checkpoint mints a review-page URL (checkpoint.ready payload + get_checkpoint's reviewUrl) where a human approves/revises from the browser \u2014 no account, no agent session; the recorded decision rides the SAME resume rail and you learn of it via checkpoint webhooks / wait_job.")});var oe=z([n(),s(),R(),q(),h(lt(()=>oe)),b(n(),lt(()=>oe))]);var he=c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional()}).describe("Output-format spec per \xA7Format.");var RI=200,II=2e3,MI=500,OI=100,$I=0,TI=3600,kI=500,CI=500,DI=35,_I=500,jI=2e3,EI=24,PI=24,LI=12,VI=24,AI=0,FI=0,UI=0,NI=0,qI=0,BI=0,WI=0,ZI=4,GI=0,HI=0,JI=0,KI=0,XI=0,YI=0,QI=0,eM=0,tM=0,oM=1,nM=0,rM=1,iM=.1,aM=1,sM=0,cM=0,dM=-.3,pM=.3,mM=-.3,lM=.3,uM=0,fM=0,hM=0,gM=16,xM=0,zM=256,bM=new RegExp("^[a-f0-9]{64}$"),SM=256,yM=128,vM=256,wM=0,RM=1,IM=0,MM=1,OM=-.3,$M=.3,TM=256,kM=new RegExp("^[a-f0-9]{64}$"),CM=256,DM=128,_M=0,jM=9007199254740991,EM=0,PM=1,LM=0,VM=-1,AM=2,FM=-1,UM=2,NM=0,qM=1,BM=0,WM=1,ZM=0,GM=1,HM=0,JM=1,KM=256,XM=new RegExp("^[a-f0-9]{64}$"),YM=256,QM=128,e0=0,t0=0,o0=0,n0=256,r0=new RegExp("^[a-f0-9]{64}$"),i0=256,a0=128,s0=0,c0=2,d0=16,p0=8,m0=c({projectId:n().min(1),name:n().max(RI).optional(),goal:n().min(1).max(II).describe("What the video must accomplish."),audience:n().max(MI).optional(),platform:n().max(OI).optional(),format:he.optional(),durationSec:s().gt($I).max(TI).optional().describe("Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (\xB11.5s) and refuses a brief it cannot honor."),tone:n().max(kI).optional(),cta:n().max(CI).optional(),locale:n().max(DI).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:n().max(_I).optional(),caption:n().max(jI).optional(),beats:h(Lo).max(EI).optional(),mustIncludes:h(n().min(1)).max(PI).optional(),references:h(n()).max(LI).optional(),captions:c({styleId:n().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:h(n().min(1)).max(VI).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:c({textAnimation:n().optional(),transitions:n().optional(),colorMood:n().optional(),captionStyle:n().optional()}).optional(),seededGraphics:h(c({id:n().min(1),startTime:s().min(AI).describe("Timeline start (seconds)."),duration:s().gt(FI).describe("Clip duration (seconds)."),source:z([c({kind:m("media"),mediaId:n().min(1),trim:c({start:s().min(UI).describe("Source trim start (seconds)."),end:s().min(NI).describe("Source trim end (seconds).")}).optional(),excludedRanges:h(c({start:s().min(qI),end:s().min(BI),reason:n().optional()})).optional(),volume:s().min(WI).max(ZI).optional(),muted:R().optional(),playbackRate:s().gt(GI).optional(),sync:l(["video","independent"]).optional(),kenBurns:l(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:s().optional(),fadeInMs:s().min(HI).optional(),fadeOutMs:s().min(JI).optional(),loop:R().optional(),audioRole:l(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:s().max(KI),attackMs:s().min(XI),releaseMs:s().min(YI),windows:h(c({startMs:s(),endMs:s()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:s()}).optional(),reframe:c({segments:h(c({startSec:s().min(QI).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:s().gt(eM).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:z([c({mode:m("frame-center")}),c({mode:m("point"),x:s().min(tM).max(oM),y:s().min(nM).max(rM)}),c({mode:m("face"),faceId:n().min(1),shotScale:l(["close","standard","wide"]).optional()}),c({mode:m("all-faces")}),c({mode:m("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:s().min(iM).max(aM).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:s().min(sM).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:s().min(cM).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:s().min(dM).max(pM).describe("Horizontal nudge, source-normalized (+ = right)."),y:s().min(mM).max(lM).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:m("component"),componentId:n().min(1),props:b(n(),$()),assets:b(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),assetTiming:b(n(),c({trimStartSec:s().min(uM).optional(),trimEndSec:s().gt(fM).optional(),playbackRate:s().gt(hM).max(gM).optional(),endPolicy:l(["loop","hold","reject"]),timelineOffsetSec:s().min(xM).optional()})).optional(),zPlane:l(["front","behind-subject"]).optional(),execution:c({version:m(3),componentId:n().min(1).max(zM),sourceVersionId:n().regex(bM),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(SM)).optional(),mediaBindings:b(n(),h(n().min(1).max(yM))).optional()}).optional(),placement:z([c({version:m(3),kind:m("clip")}),c({version:m(3),kind:m("content-slots"),slots:b(n(),c({targetClipIds:h(n().min(1).max(vM)),ownership:l(["reference","exclusive"])}))})]).optional()}),c({kind:m("overlay"),primitiveId:n().min(1),params:b(n(),$()),zPlane:l(["front","behind-subject"]).optional(),anchor:c({space:m("scene"),x:s().min(wM).max(RM),y:s().min(IM).max(MM)}).optional(),parallax:s().min(OM).max($M).optional()}),c({kind:m("effect"),primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),component:c({version:m(3),componentId:n().min(1).max(TM),sourceVersionId:n().regex(kM),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(CM)).optional(),mediaBindings:b(n(),h(n().min(1).max(DM))).optional()}).optional(),targetTrackIds:h(n().min(1)).min(1).optional(),wrapperOrder:x().min(_M).max(jM).optional()}),c({kind:m("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:b(n(),n()).optional(),zPlane:m("front").optional()})]),kind:l(["video","audio","image","overlay","effect"]).optional(),opacity:s().min(EM).max(PM).optional(),scale:s().gt(LM).optional(),rotation:s().optional(),position:c({x:s().min(VM).max(AM),y:s().min(FM).max(UM)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:s().min(NM).max(qM),y:s().min(BM).max(WM),w:s().gt(ZM).max(GM),h:s().gt(HM).max(JM)}).optional(),fit:l(["cover","contain"]).optional(),captionVisibility:l(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:h(c({primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(KM),sourceVersionId:n().regex(XM),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(YM)).optional(),mediaBindings:b(n(),h(n().min(1).max(QM))).optional()}).optional(),window:c({startTime:s().min(e0),duration:s().gt(t0)}).optional()})).optional(),transitionIn:c({type:n().min(1),duration:s().gt(o0),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(n0),sourceVersionId:n().regex(r0),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(i0)).optional(),mediaBindings:b(n(),h(n().min(1).max(a0))).optional()}).optional(),fromClipId:n().min(1).optional(),toClipId:n().min(1).optional(),handlePolicy:m("outgoing-overrun-at-cut-v1").optional()}).optional(),linkGroupId:n().min(1).optional(),animate:b(n(),h(c({time:s().min(s0),value:s(),easing:z([l(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:A([s(),s(),s(),s()])})]).optional()})).min(c0)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")})).max(d0).optional().describe("Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."),exclusions:h(Vo).max(p0).optional(),gates:Ao.optional(),audio:Po.optional()});var l0=-9007199254740991,u0=9007199254740991,_g=c({composeUsd:s(),renderUsdPerExport:s(),estimatedJourneyUsd:s().describe("compose + expected renders \u2014 relay this BEFORE composing."),revisionCyclesIncluded:x().min(l0).max(u0).describe("Revise cycles the compose price includes per gate (A1). Beyond this, resume(revise) is refused with `revision_cycles_exhausted` \u2014 saying no never silently charges.")});var f0=200,h0=2e3,g0=500,x0=100,z0=0,b0=3600,S0=500,y0=500,v0=35,w0=500,R0=2e3,I0=24,M0=24,O0=12,$0=24,T0=0,k0=0,C0=0,D0=0,_0=0,j0=0,E0=0,P0=4,L0=0,V0=0,A0=0,F0=0,U0=0,N0=0,q0=0,B0=0,W0=0,Z0=1,G0=0,H0=1,J0=.1,K0=1,X0=0,Y0=0,Q0=-.3,eO=.3,tO=-.3,oO=.3,nO=0,rO=0,iO=0,aO=16,sO=0,cO=256,dO=new RegExp("^[a-f0-9]{64}$"),pO=256,mO=128,lO=256,uO=0,fO=1,hO=0,gO=1,xO=-.3,zO=.3,bO=256,SO=new RegExp("^[a-f0-9]{64}$"),yO=256,vO=128,wO=0,RO=9007199254740991,IO=0,MO=1,OO=0,$O=-1,TO=2,kO=-1,CO=2,DO=0,_O=1,jO=0,EO=1,PO=0,LO=1,VO=0,AO=1,FO=256,UO=new RegExp("^[a-f0-9]{64}$"),NO=256,qO=128,BO=0,WO=0,ZO=0,GO=256,HO=new RegExp("^[a-f0-9]{64}$"),JO=256,KO=128,XO=0,YO=2,QO=16,e$=8,Jm=c({id:n(),projectId:n(),kind:l(["authored","clip"]).describe("authored = create_brief; clip = minted by suggest_briefs from an AI clip suggestion."),sourceSuggestionId:n().optional().describe("kind:'clip' provenance \u2014 the suggestion this Brief was minted from."),name:n().max(f0).optional(),goal:n().min(1).max(h0).describe("What the video must accomplish."),audience:n().max(g0).optional(),platform:n().max(x0).optional(),format:he.optional(),durationSec:s().gt(z0).max(b0).optional().describe("Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (\xB11.5s) and refuses a brief it cannot honor."),tone:n().max(S0).optional(),cta:n().max(y0).optional(),locale:n().max(v0).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:n().max(w0).optional(),caption:n().max(R0).optional(),beats:h(Lo).max(I0).optional(),mustIncludes:h(n().min(1)).max(M0).optional(),references:h(n()).max(O0).optional(),captions:c({styleId:n().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:h(n().min(1)).max($0).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:c({textAnimation:n().optional(),transitions:n().optional(),colorMood:n().optional(),captionStyle:n().optional()}).optional(),seededGraphics:h(c({id:n().min(1),startTime:s().min(T0).describe("Timeline start (seconds)."),duration:s().gt(k0).describe("Clip duration (seconds)."),source:z([c({kind:m("media"),mediaId:n().min(1),trim:c({start:s().min(C0).describe("Source trim start (seconds)."),end:s().min(D0).describe("Source trim end (seconds).")}).optional(),excludedRanges:h(c({start:s().min(_0),end:s().min(j0),reason:n().optional()})).optional(),volume:s().min(E0).max(P0).optional(),muted:R().optional(),playbackRate:s().gt(L0).optional(),sync:l(["video","independent"]).optional(),kenBurns:l(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:s().optional(),fadeInMs:s().min(V0).optional(),fadeOutMs:s().min(A0).optional(),loop:R().optional(),audioRole:l(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:s().max(F0),attackMs:s().min(U0),releaseMs:s().min(N0),windows:h(c({startMs:s(),endMs:s()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:s()}).optional(),reframe:c({segments:h(c({startSec:s().min(q0).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:s().gt(B0).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:z([c({mode:m("frame-center")}),c({mode:m("point"),x:s().min(W0).max(Z0),y:s().min(G0).max(H0)}),c({mode:m("face"),faceId:n().min(1),shotScale:l(["close","standard","wide"]).optional()}),c({mode:m("all-faces")}),c({mode:m("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:s().min(J0).max(K0).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:s().min(X0).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:s().min(Y0).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:s().min(Q0).max(eO).describe("Horizontal nudge, source-normalized (+ = right)."),y:s().min(tO).max(oO).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:m("component"),componentId:n().min(1),props:b(n(),$()),assets:b(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),assetTiming:b(n(),c({trimStartSec:s().min(nO).optional(),trimEndSec:s().gt(rO).optional(),playbackRate:s().gt(iO).max(aO).optional(),endPolicy:l(["loop","hold","reject"]),timelineOffsetSec:s().min(sO).optional()})).optional(),zPlane:l(["front","behind-subject"]).optional(),execution:c({version:m(3),componentId:n().min(1).max(cO),sourceVersionId:n().regex(dO),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(pO)).optional(),mediaBindings:b(n(),h(n().min(1).max(mO))).optional()}).optional(),placement:z([c({version:m(3),kind:m("clip")}),c({version:m(3),kind:m("content-slots"),slots:b(n(),c({targetClipIds:h(n().min(1).max(lO)),ownership:l(["reference","exclusive"])}))})]).optional()}),c({kind:m("overlay"),primitiveId:n().min(1),params:b(n(),$()),zPlane:l(["front","behind-subject"]).optional(),anchor:c({space:m("scene"),x:s().min(uO).max(fO),y:s().min(hO).max(gO)}).optional(),parallax:s().min(xO).max(zO).optional()}),c({kind:m("effect"),primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),component:c({version:m(3),componentId:n().min(1).max(bO),sourceVersionId:n().regex(SO),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(yO)).optional(),mediaBindings:b(n(),h(n().min(1).max(vO))).optional()}).optional(),targetTrackIds:h(n().min(1)).min(1).optional(),wrapperOrder:x().min(wO).max(RO).optional()}),c({kind:m("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:b(n(),n()).optional(),zPlane:m("front").optional()})]),kind:l(["video","audio","image","overlay","effect"]).optional(),opacity:s().min(IO).max(MO).optional(),scale:s().gt(OO).optional(),rotation:s().optional(),position:c({x:s().min($O).max(TO),y:s().min(kO).max(CO)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:s().min(DO).max(_O),y:s().min(jO).max(EO),w:s().gt(PO).max(LO),h:s().gt(VO).max(AO)}).optional(),fit:l(["cover","contain"]).optional(),captionVisibility:l(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:h(c({primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(FO),sourceVersionId:n().regex(UO),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(NO)).optional(),mediaBindings:b(n(),h(n().min(1).max(qO))).optional()}).optional(),window:c({startTime:s().min(BO),duration:s().gt(WO)}).optional()})).optional(),transitionIn:c({type:n().min(1),duration:s().gt(ZO),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(GO),sourceVersionId:n().regex(HO),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(JO)).optional(),mediaBindings:b(n(),h(n().min(1).max(KO))).optional()}).optional(),fromClipId:n().min(1).optional(),toClipId:n().min(1).optional(),handlePolicy:m("outgoing-overrun-at-cut-v1").optional()}).optional(),linkGroupId:n().min(1).optional(),animate:b(n(),h(c({time:s().min(XO),value:s(),easing:z([l(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:A([s(),s(),s(),s()])})]).optional()})).min(YO)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")})).max(QO).optional().describe("Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."),exclusions:h(Vo).max(e$).optional(),gates:Ao.optional(),audio:Po.optional(),quote:_g,createdAt:s(),updatedAt:s()});var t$=c({data:h(Jm),pagination:pe});var o$=200,n$=2e3,r$=500,i$=100,a$=0,s$=3600,c$=500,d$=500,p$=35,m$=500,l$=2e3,u$=24,f$=24,h$=12,g$=24,x$=0,z$=0,b$=0,S$=0,y$=0,v$=0,w$=0,R$=4,I$=0,M$=0,O$=0,$$=0,T$=0,k$=0,C$=0,D$=0,_$=0,j$=1,E$=0,P$=1,L$=.1,V$=1,A$=0,F$=0,U$=-.3,N$=.3,q$=-.3,B$=.3,W$=0,Z$=0,G$=0,H$=16,J$=0,K$=256,X$=new RegExp("^[a-f0-9]{64}$"),Y$=256,Q$=128,eT=256,tT=0,oT=1,nT=0,rT=1,iT=-.3,aT=.3,sT=256,cT=new RegExp("^[a-f0-9]{64}$"),dT=256,pT=128,mT=0,lT=9007199254740991,uT=0,fT=1,hT=0,gT=-1,xT=2,zT=-1,bT=2,ST=0,yT=1,vT=0,wT=1,RT=0,IT=1,MT=0,OT=1,$T=256,TT=new RegExp("^[a-f0-9]{64}$"),kT=256,CT=128,DT=0,_T=0,jT=0,ET=256,PT=new RegExp("^[a-f0-9]{64}$"),LT=256,VT=128,AT=0,FT=2,UT=16,NT=8,qT=c({name:n().max(o$).optional(),goal:n().min(1).max(n$).optional().describe("What the video must accomplish."),audience:n().max(r$).optional(),platform:n().max(i$).optional(),format:he.optional(),durationSec:s().gt(a$).max(s$).optional().describe("Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (\xB11.5s) and refuses a brief it cannot honor."),tone:n().max(c$).optional(),cta:n().max(d$).optional(),locale:n().max(p$).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:n().max(m$).optional(),caption:n().max(l$).optional(),beats:h(Lo).max(u$).optional(),mustIncludes:h(n().min(1)).max(f$).optional(),references:h(n()).max(h$).optional(),captions:c({styleId:n().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:h(n().min(1)).max(g$).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:c({textAnimation:n().optional(),transitions:n().optional(),colorMood:n().optional(),captionStyle:n().optional()}).optional(),seededGraphics:h(c({id:n().min(1),startTime:s().min(x$).describe("Timeline start (seconds)."),duration:s().gt(z$).describe("Clip duration (seconds)."),source:z([c({kind:m("media"),mediaId:n().min(1),trim:c({start:s().min(b$).describe("Source trim start (seconds)."),end:s().min(S$).describe("Source trim end (seconds).")}).optional(),excludedRanges:h(c({start:s().min(y$),end:s().min(v$),reason:n().optional()})).optional(),volume:s().min(w$).max(R$).optional(),muted:R().optional(),playbackRate:s().gt(I$).optional(),sync:l(["video","independent"]).optional(),kenBurns:l(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:s().optional(),fadeInMs:s().min(M$).optional(),fadeOutMs:s().min(O$).optional(),loop:R().optional(),audioRole:l(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:s().max($$),attackMs:s().min(T$),releaseMs:s().min(k$),windows:h(c({startMs:s(),endMs:s()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:s()}).optional(),reframe:c({segments:h(c({startSec:s().min(C$).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:s().gt(D$).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:z([c({mode:m("frame-center")}),c({mode:m("point"),x:s().min(_$).max(j$),y:s().min(E$).max(P$)}),c({mode:m("face"),faceId:n().min(1),shotScale:l(["close","standard","wide"]).optional()}),c({mode:m("all-faces")}),c({mode:m("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:s().min(L$).max(V$).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:s().min(A$).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:s().min(F$).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:s().min(U$).max(N$).describe("Horizontal nudge, source-normalized (+ = right)."),y:s().min(q$).max(B$).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:m("component"),componentId:n().min(1),props:b(n(),$()),assets:b(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),assetTiming:b(n(),c({trimStartSec:s().min(W$).optional(),trimEndSec:s().gt(Z$).optional(),playbackRate:s().gt(G$).max(H$).optional(),endPolicy:l(["loop","hold","reject"]),timelineOffsetSec:s().min(J$).optional()})).optional(),zPlane:l(["front","behind-subject"]).optional(),execution:c({version:m(3),componentId:n().min(1).max(K$),sourceVersionId:n().regex(X$),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(Y$)).optional(),mediaBindings:b(n(),h(n().min(1).max(Q$))).optional()}).optional(),placement:z([c({version:m(3),kind:m("clip")}),c({version:m(3),kind:m("content-slots"),slots:b(n(),c({targetClipIds:h(n().min(1).max(eT)),ownership:l(["reference","exclusive"])}))})]).optional()}),c({kind:m("overlay"),primitiveId:n().min(1),params:b(n(),$()),zPlane:l(["front","behind-subject"]).optional(),anchor:c({space:m("scene"),x:s().min(tT).max(oT),y:s().min(nT).max(rT)}).optional(),parallax:s().min(iT).max(aT).optional()}),c({kind:m("effect"),primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),component:c({version:m(3),componentId:n().min(1).max(sT),sourceVersionId:n().regex(cT),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(dT)).optional(),mediaBindings:b(n(),h(n().min(1).max(pT))).optional()}).optional(),targetTrackIds:h(n().min(1)).min(1).optional(),wrapperOrder:x().min(mT).max(lT).optional()}),c({kind:m("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:b(n(),n()).optional(),zPlane:m("front").optional()})]),kind:l(["video","audio","image","overlay","effect"]).optional(),opacity:s().min(uT).max(fT).optional(),scale:s().gt(hT).optional(),rotation:s().optional(),position:c({x:s().min(gT).max(xT),y:s().min(zT).max(bT)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:s().min(ST).max(yT),y:s().min(vT).max(wT),w:s().gt(RT).max(IT),h:s().gt(MT).max(OT)}).optional(),fit:l(["cover","contain"]).optional(),captionVisibility:l(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:h(c({primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max($T),sourceVersionId:n().regex(TT),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(kT)).optional(),mediaBindings:b(n(),h(n().min(1).max(CT))).optional()}).optional(),window:c({startTime:s().min(DT),duration:s().gt(_T)}).optional()})).optional(),transitionIn:c({type:n().min(1),duration:s().gt(jT),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(ET),sourceVersionId:n().regex(PT),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(LT)).optional(),mediaBindings:b(n(),h(n().min(1).max(VT))).optional()}).optional(),fromClipId:n().min(1).optional(),toClipId:n().min(1).optional(),handlePolicy:m("outgoing-overrun-at-cut-v1").optional()}).optional(),linkGroupId:n().min(1).optional(),animate:b(n(),h(c({time:s().min(AT),value:s(),easing:z([l(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:A([s(),s(),s(),s()])})]).optional()})).min(FT)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")})).max(UT).optional().describe("Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."),exclusions:h(Vo).max(NT).optional(),gates:Ao.optional(),audio:Po.optional()});var BT=256,WT=256,ZT=256,GT=256,HT=256,JT=256,KT=new RegExp("^[a-f0-9]{64}$"),XT=256,YT=256,QT=0,ek=new RegExp("^[a-f0-9]{64}$"),tk=new RegExp("^[a-f0-9]{64}$"),ok=new RegExp("^[a-f0-9]{64}$"),nk=0,rk=9007199254740991,ik=0,ak=9007199254740991,sk=0,ck=9007199254740991,dk=0,pk=0,mk=9007199254740991,lk=new RegExp("^[a-f0-9]{64}$"),uk=0,fk=9007199254740991,hk=0,gk=9007199254740991,xk=new RegExp("^[a-f0-9]{64}$"),zk=256,bk=256,Sk=256,yk=256,vk=256,wk=256,Rk=new RegExp("^[a-f0-9]{64}$"),Ik=128,Mk=0,Ok=9007199254740991,$k=0,Tk=9007199254740991,kk=0,Ck=9007199254740991,Dk=0,_k=0,jk=0,Ek=256,Pk=256,Lk=256,Vk=256,Ak=256,Fk=256,Uk=new RegExp("^[a-f0-9]{64}$"),Nk=256,qk=256,Bk=0,Wk=new RegExp("^[a-f0-9]{64}$"),Zk=new RegExp("^[a-f0-9]{64}$"),Gk=new RegExp("^[a-f0-9]{64}$"),Hk=0,Jk=9007199254740991,Kk=0,Xk=9007199254740991,Yk=0,Qk=9007199254740991,eC=0,tC=0,oC=9007199254740991,nC=new RegExp("^[a-f0-9]{64}$"),rC=0,iC=9007199254740991,aC=0,sC=9007199254740991,cC=new RegExp("^[a-f0-9]{64}$"),dC=256,pC=256,mC=256,lC=256,uC=256,fC=256,hC=new RegExp("^[a-f0-9]{64}$"),gC=new RegExp("^[a-f0-9]{64}$"),xC=256,zC=256,bC=256,SC=256,yC=256,vC=256,wC=new RegExp("^[a-f0-9]{64}$"),RC=256,IC=256,MC=256,OC=256,$C=256,TC=256,kC=new RegExp("^[a-f0-9]{64}$"),CC=256,DC=256,_C=0,jC=new RegExp("^[a-f0-9]{64}$"),EC=new RegExp("^[a-f0-9]{64}$"),PC=new RegExp("^[a-f0-9]{64}$"),LC=0,VC=9007199254740991,AC=0,FC=9007199254740991,UC=0,NC=9007199254740991,qC=0,BC=0,WC=9007199254740991,ZC=new RegExp("^[a-f0-9]{64}$"),GC=0,HC=9007199254740991,JC=0,KC=9007199254740991,XC=new RegExp("^[a-f0-9]{64}$"),YC=256,QC=256,eD=256,tD=256,oD=256,nD=256,rD=new RegExp("^[a-f0-9]{64}$"),iD=9007199254740991,aD=256,sD=256,cD=256,dD=256,pD=256,mD=256,lD=new RegExp("^[a-f0-9]{64}$"),uD=new RegExp("^[a-f0-9]{64}$"),fD=c({card:z([c({identity:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(BT)}),c({kind:m("org-local"),orgId:n().min(1).max(WT),workspaceId:n().min(1).max(ZT)}),c({kind:m("org-hosted"),orgId:n().min(1).max(GT),deploymentId:n().min(1).max(HT)})]),id:n().min(1).max(JT),revision:n().regex(KT)}),name:n().min(1).max(XT),description:n(),category:n().min(1).max(YT),presentation:c({version:m(1),representativeTimeSeconds:s().min(QT)}).optional(),showcase:c({version:m(1),presentationKey:n().min(1),fixtureIdentity:n().regex(ek),rendererIdentity:n().regex(tk),video:c({file:n().min(1),sha256:n().regex(ok),byteLength:x().gt(nk).max(rk),width:x().gt(ik).max(ak),height:x().gt(sk).max(ck),fps:s().gt(dk),durationInFrames:x().gt(pk).max(mk)}),poster:c({file:n().min(1),sha256:n().regex(lk),byteLength:x().gt(uk).max(fk),frame:x().min(hk).max(gk)})}).optional(),preview:c({identity:n().regex(xk),status:l(["unproven","verified"])}).optional(),kind:m("definition"),source:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(zk)}),c({kind:m("org-local"),orgId:n().min(1).max(bk),workspaceId:n().min(1).max(Sk)}),c({kind:m("org-hosted"),orgId:n().min(1).max(yk),deploymentId:n().min(1).max(vk)})]),componentId:n().min(1).max(wk),sourceVersionId:n().regex(Rk),sourceVersion:z([m(2),m(3)])}),declaration:z([c({state:m("v3"),capabilities:h(z([c({kind:m("clip")}),c({kind:m("cut-transition"),protocol:m("per-child")}),c({kind:m("content-slots"),slots:h(c({name:n().min(1).max(Ik),min:x().min(Mk).max(Ok),max:x().gt($k).max(Tk),ownership:l(["reference","exclusive"]),sizing:l(["canvas","container"])})).min(1)}),c({kind:m("clip-wrapper"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()}),c({kind:m("global-wrapper"),scope:m("media-lanes"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()})])).min(1),timing:c({defaultDuration:c({frames:x().gt(kk).max(Ck),fps:s().gt(Dk)}),minDurationSec:s().gt(_k).optional(),maxDurationSec:s().gt(jk).optional()})}),c({state:m("legacy-v2"),metadataStatus:m("unresolved")})]),origin:l(["server-native","customer-owned"])}),c({identity:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(Ek)}),c({kind:m("org-local"),orgId:n().min(1).max(Pk),workspaceId:n().min(1).max(Lk)}),c({kind:m("org-hosted"),orgId:n().min(1).max(Vk),deploymentId:n().min(1).max(Ak)})]),id:n().min(1).max(Fk),revision:n().regex(Uk)}),name:n().min(1).max(Nk),description:n(),category:n().min(1).max(qk),presentation:c({version:m(1),representativeTimeSeconds:s().min(Bk)}).optional(),showcase:c({version:m(1),presentationKey:n().min(1),fixtureIdentity:n().regex(Wk),rendererIdentity:n().regex(Zk),video:c({file:n().min(1),sha256:n().regex(Gk),byteLength:x().gt(Hk).max(Jk),width:x().gt(Kk).max(Xk),height:x().gt(Yk).max(Qk),fps:s().gt(eC),durationInFrames:x().gt(tC).max(oC)}),poster:c({file:n().min(1),sha256:n().regex(nC),byteLength:x().gt(rC).max(iC),frame:x().min(aC).max(sC)})}).optional(),preview:c({identity:n().regex(cC),status:l(["unproven","verified"])}).optional(),kind:m("preset"),definition:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(dC)}),c({kind:m("org-local"),orgId:n().min(1).max(pC),workspaceId:n().min(1).max(mC)}),c({kind:m("org-hosted"),orgId:n().min(1).max(lC),deploymentId:n().min(1).max(uC)})]),componentId:n().min(1).max(fC),sourceVersionId:n().regex(hC),sourceVersion:z([m(2),m(3)])}),presetVersionId:n().regex(gC),historicalDocument:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(xC)}),c({kind:m("org-local"),orgId:n().min(1).max(zC),workspaceId:n().min(1).max(bC)}),c({kind:m("org-hosted"),orgId:n().min(1).max(SC),deploymentId:n().min(1).max(yC)})]),documentId:n().min(1).max(vC),documentSha256:n().regex(wC)}),equivalence:l(["unproven","verified"])}),c({identity:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(RC)}),c({kind:m("org-local"),orgId:n().min(1).max(IC),workspaceId:n().min(1).max(MC)}),c({kind:m("org-hosted"),orgId:n().min(1).max(OC),deploymentId:n().min(1).max($C)})]),id:n().min(1).max(TC),revision:n().regex(kC)}),name:n().min(1).max(CC),description:n(),category:n().min(1).max(DC),presentation:c({version:m(1),representativeTimeSeconds:s().min(_C)}).optional(),showcase:c({version:m(1),presentationKey:n().min(1),fixtureIdentity:n().regex(jC),rendererIdentity:n().regex(EC),video:c({file:n().min(1),sha256:n().regex(PC),byteLength:x().gt(LC).max(VC),width:x().gt(AC).max(FC),height:x().gt(UC).max(NC),fps:s().gt(qC),durationInFrames:x().gt(BC).max(WC)}),poster:c({file:n().min(1),sha256:n().regex(ZC),byteLength:x().gt(GC).max(HC),frame:x().min(JC).max(KC)})}).optional(),preview:c({identity:n().regex(XC),status:l(["unproven","verified"])}).optional(),kind:m("recipe"),document:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(YC)}),c({kind:m("org-local"),orgId:n().min(1).max(QC),workspaceId:n().min(1).max(eD)}),c({kind:m("org-hosted"),orgId:n().min(1).max(tD),deploymentId:n().min(1).max(oD)})]),documentId:n().min(1).max(nD),documentSha256:n().regex(rD)}),placementCount:x().min(1).max(iD),memberSources:h(c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(aD)}),c({kind:m("org-local"),orgId:n().min(1).max(sD),workspaceId:n().min(1).max(cD)}),c({kind:m("org-hosted"),orgId:n().min(1).max(dD),deploymentId:n().min(1).max(pD)})]),componentId:n().min(1).max(mD),sourceVersionId:n().regex(lD),sourceVersion:z([m(2),m(3)])})).min(1),equivalence:l(["unproven","verified"])})]),document:b(n(),$()).optional(),documentText:n().optional(),documentSha256:n().regex(uD).optional(),source:b(n(),$()).optional(),sources:h(b(n(),$())).optional(),preset:b(n(),$()).optional()});var hD="month",gD=c({plan:l(["credit_pack_10","credit_pack_30","credit_pack_100"]).describe("Plan tier to subscribe to."),interval:l(["month","year"]).default(hD).describe("Billing interval: 'month' (monthly) or 'year' (annual, ~2 months free).")});var xD=c({url:n().describe("Hosted Stripe checkout URL to open in a browser to complete payment. Always present on success \u2014 an existing saved card is never charged without confirming here."),plan:n(),interval:n(),productId:n().describe("Resolved billing catalog product id.")});var zD=0,bD=9007199254740991,SD=2e3,jg=c({anchor:z([c({beatId:n().min(1)}),c({timecodeMs:x().min(zD).max(bD)})]).describe("What the comment is about: a plan beat (content gate) or a timecode on the artifact (layout/motion gates)."),verdict:l(["approve","revise","lock"]).describe("Per-anchor verdict under the single gate decision. `lock` = contractually frozen \u2014 the director touching a locked element is a defect, surfaced as a lock_violation verdict on the next packet (the no-discard machinery)."),note:n().max(SD).optional()});var aa=c({thisStepUsd:s().describe("What approving costs NEXT (the render at the final gate; $0 earlier)."),jobSpendSoFarUsd:s().describe("What has SETTLED so far \u2014 $0 while the run is live (compose is charge-on-delivery on both rails), so abandoning at a gate charges nothing."),estimatedJourneyTotalUsd:s().describe("The same journey number the Brief quoted.")});var sa=l(["content","layout","motion"]);var yD=-9007199254740991,vD=9007199254740991,wD=-9007199254740991,RD=9007199254740991,Km=c({id:n(),projectId:n(),composeJobId:n().optional(),briefId:n().optional(),kind:l(["gate","score"]),stage:sa.optional(),version:x().min(yD).max(vD),status:l(["awaiting","approved","revised","abandoned","expired","superseded"]),artifact:$().describe("The stage artifact under review: the locked ComposePlan at content; the composition wire shape at layout/motion; the judged composition snapshot on kind:'score'."),stillUrls:h(n()).optional().describe("Presigned storyboard/eval stills \u2014 the packet's visual evidence (may be GC'd by the retention sweep after the job goes terminal; the decision record is immortal)."),criticVerdicts:$().optional().describe("Per-criterion scores + critique from the design loop / judge, incl. lock_violation entries."),quote:aa.optional(),revisionCycle:x().min(wD).max(RD).describe("Revise cycles this gate has consumed. The brief quote states the included count (revisionCyclesIncluded); beyond it, resume(revise) is refused with a typed error."),decision:$().optional().describe("The recorded decision {decision, comments?, globalNote?, decidedAt} once resolved."),reviewMode:l(["agent","hosted"]).optional().describe("How this packet is decided (from the Brief's gates). 'hosted' = the review PAGE captures the decision; absent/'agent' = the decision flows back through the driving agent."),reviewUrl:n().optional().describe("Hosted review-page URL (present when reviewMode is 'hosted') \u2014 a human decides from this link, no account or agent session; the recorded decision rides the SAME resume rail, and the agent learns of it via checkpoint webhooks / wait_job."),createdAt:s(),updatedAt:s()});var ID=c({data:h(Km),pagination:pe});var MD=24,OD=4e3,$D=c({decision:l(["approve","revise","abandon"]).describe("The ONE verdict for this gate (GitHub review grammar). approve = proceed (comments allowed \u2014 they record as taste signal without gating); revise = the director revises per comments/edits and RE-PRESENTS this same gate (in-job, no re-meter); abandon = end the run."),comments:h(jg).max(MD).optional(),edits:$().optional().describe("Your edited stage artifact (the power path). With edits the re-presented packet carries exactly what you supplied; with comments alone the director re-authors scoped by them."),globalNote:n().max(OD).optional()}).describe("POST /checkpoints/:id/resume body \u2014 the A1 review grammar.");var TD=c({ok:m(!0)}).describe("POST /checkpoints/:id/resume response.");var d$e=c({ok:R()});var m$e=c({etag:n()});var kD=0,CD=64,DD=0,_D=64,jD=1,ED=0,PD=1,LD=1,VD=0,AD=1,Je=c({version:m(2),assets:b(n(),c({kind:l(["image","video","audio","data","visual"]),required:R(),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(kD).max(CD),maxProjectedHeightRatio:s().gt(DD).max(_D),minVisibleSourceWidthRatio:s().gt(ED).max(PD).default(jD),minVisibleSourceHeightRatio:s().gt(VD).max(AD).default(LD)})]).optional()})),graphics:c({api:l(["canvas2d","webgl","webgl2","webgpu"]),required:m(!0),accelerationPreference:l(["hardware-preferred","software-allowed"])}),alphaPolicy:l(["requires-transparency","allows-opaque"]),sceneShot:c({version:m(2)}).optional(),visualMedia:c({version:m(1)}).optional()});var FD=200,UD=200,ND=2e3,qD=200,BD=0,WD=128,ZD=new RegExp("^[a-z0-9][a-z0-9._-]*$"),GD=0,HD=64,JD=0,KD=64,XD=1,YD=0,QD=1,e1=1,t1=0,o1=1,n1=128,r1=new RegExp("^[a-zA-Z0-9][a-zA-Z0-9._-]*$"),i1=8e6,a1=0,s1=64,c1=0,d1=64,p1=1,m1=0,l1=1,u1=1,f1=0,h1=1,g1=128,x1=128,z1=128,b1=0,S1=9007199254740991,y1=0,v1=0,w1=0,R1=128,I1=0,M1=9007199254740991,O1=0,$1=9007199254740991,T1=128,k1=128,C1=16,D1=0,_1=9007199254740991,j1=0,E1=9007199254740991,P1=0,L1=64,V1=0,A1=64,F1=1,U1=0,N1=1,q1=1,B1=0,W1=1,Z1=new RegExp("^https:\\/\\/.*"),G1=new RegExp("^[a-f0-9]{64}$"),H1=0,J1=0,K1=128,X1=new RegExp("^[a-f0-9]{64}$"),Y1=0,Q1=0,e2=new RegExp("^https:\\/\\/.*"),t2=new RegExp("^[a-f0-9]{64}$"),o2=0,n2=0,r2=128,i2=new RegExp("^[a-f0-9]{64}$"),a2=0,s2=0,c2=2,Eg=c({componentId:n().min(1).max(FD).describe("Caller-chosen stable component id. On create it names the new component. On PUT/PATCH it is optional and, when present, must equal the id in the path; a mismatch is a 400 naming both."),tsxSource:n().min(1).optional(),name:n().min(1).max(UD),description:n().max(ND),category:l(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),propSchema:b(n(),$()).optional(),origin:l(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(qD).optional(),tokens:b(n(),$()).optional(),examples:h(b(n(),$())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:s().gt(BD).optional(),manifest:Je.optional(),source:z([c({version:m(2),componentId:n().min(1).max(WD).regex(ZD),tsxSource:n().min(1),manifest:c({version:m(2),assets:b(n(),c({kind:l(["image","video","audio","data","visual"]),required:R(),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(GD).max(HD),maxProjectedHeightRatio:s().gt(JD).max(KD),minVisibleSourceWidthRatio:s().gt(YD).max(QD).default(XD),minVisibleSourceHeightRatio:s().gt(t1).max(o1).default(e1)})]).optional()})),graphics:c({api:l(["canvas2d","webgl","webgl2","webgpu"]),required:m(!0),accelerationPreference:l(["hardware-preferred","software-allowed"])}),alphaPolicy:l(["requires-transparency","allows-opaque"]),sceneShot:c({version:m(2)}).optional(),visualMedia:c({version:m(1)}).optional()})}),c({version:m(3),componentId:n().min(1).max(n1).regex(r1),tsxSource:n().min(1).max(i1),manifest:c({version:m(2),assets:b(n(),c({kind:l(["image","video","audio","data","visual"]),required:R(),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(a1).max(s1),maxProjectedHeightRatio:s().gt(c1).max(d1),minVisibleSourceWidthRatio:s().gt(m1).max(l1).default(p1),minVisibleSourceHeightRatio:s().gt(f1).max(h1).default(u1)})]).optional()})),graphics:c({api:l(["canvas2d","webgl","webgl2","webgpu"]),required:m(!0),accelerationPreference:l(["hardware-preferred","software-allowed"])}),alphaPolicy:l(["requires-transparency","allows-opaque"]),sceneShot:c({version:m(2)}).optional(),visualMedia:c({version:m(1)}).optional()}),definition:c({inputSchema:b(n(),$()),defaults:b(n(),$()),brandBindings:h(c({propPath:n().min(1).max(g1),cssVar:n().min(1).max(x1),fallback:n().optional(),brandKitPath:n().min(1).max(z1).optional()})),timing:c({defaultDuration:c({frames:x().gt(b1).max(S1),fps:s().gt(y1)}),minDurationSec:s().gt(v1).optional(),maxDurationSec:s().gt(w1).optional()}),capabilities:h(z([c({kind:m("clip")}),c({kind:m("cut-transition"),protocol:m("per-child")}),c({kind:m("content-slots"),slots:h(c({name:n().min(1).max(R1),min:x().min(I1).max(M1),max:x().gt(O1).max($1),ownership:l(["reference","exclusive"]),sizing:l(["canvas","container"])})).min(1)}),c({kind:m("clip-wrapper"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()}),c({kind:m("global-wrapper"),scope:m("media-lanes"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()})])).min(1),mediaBindings:h(c({name:n().min(1).max(T1),propPath:h(n().min(1).max(k1)).min(1).max(C1),kind:l(["image","video","visual"]),collection:l(["scalar","array"]),cardinality:c({min:x().min(D1).max(_1),max:x().gt(j1).max(E1).optional()}),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(P1).max(L1),maxProjectedHeightRatio:s().gt(V1).max(A1),minVisibleSourceWidthRatio:s().gt(U1).max(N1).default(F1),minVisibleSourceHeightRatio:s().gt(B1).max(W1).default(q1)})]).optional()})).min(1).optional(),preview:c({params:b(n(),$()).optional(),format:c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional(),platform:n().optional()}).optional(),assets:b(n(),z([c({url:Ce("starts_with",Z1),sha256:n().regex(G1),mimeType:n().min(1),frameRate:s().gt(H1).optional(),durationSec:s().gt(J1).optional()}),c({mediaId:n().min(1).max(K1),sha256:n().regex(X1),mimeType:n().min(1),frameRate:s().gt(Y1).optional(),durationSec:s().gt(Q1).optional()})])).optional(),mediaBindings:b(n(),h(z([c({url:Ce("starts_with",e2),sha256:n().regex(t2),mimeType:n().min(1),frameRate:s().gt(o2).optional(),durationSec:s().gt(n2).optional()}),c({mediaId:n().min(1).max(r2),sha256:n().regex(i2),mimeType:n().min(1),frameRate:s().gt(a2).optional(),durationSec:s().gt(s2).optional()})]))).optional()}).optional()})})]).optional(),supportedSourceVersions:h(z([m(2),m(3)])).min(1).max(c2).optional()}).describe("POST /components body. Org/user are server-resolved; never accepted from the body.");var ca=c({clipSourceKind:l(["overlay","effect","component"]).describe("The ClipSource `kind` to author this entry as: 'overlay' (built-in text/ui/scene/background/layout), 'effect' (built-in effect/transition), or 'component' (an org-INSTALLED custom component)."),refField:l(["primitiveId","componentId"]).describe("Which id field keys the ClipSource: 'primitiveId' for built-ins (source:'default'), 'componentId' for installed components (source:'installed'). Using the wrong field will NOT resolve at render.")});var da=c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional()});var d2=200,p2=2e3,m2=200,l2=0,Xm=c({name:n().min(1).max(d2),description:n().max(p2),category:l(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),propSchema:b(n(),$()),origin:l(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(m2).optional(),tokens:b(n(),$()).optional(),examples:h(b(n(),$())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:s().gt(l2).optional(),manifest:Je.optional().describe("The stored runtime manifest (assets, graphics API, alpha policy) of an org-INSTALLED component: the same object the create/update body takes, so a manifest read back here can be written back unchanged. Built-in defaults have no stored manifest and omit it. Its `version` is always 2 (the contract version), unlike the entry's semver `version`."),id:n().describe("The entry's id: a `primitiveId` for a built-in, a `componentId` for an installed component."),source:l(["default","installed"]).describe("'default' = built-in primitive (place by primitiveId); 'installed' = org-authored component (place by componentId)."),kind:l(["component","transition","scene"]).describe("RENDER kind (component | transition | scene). NOT the ClipSource variant \u2014 see `placement` for how to author it on the timeline."),version:n().describe("The ENTRY's version: a semver string ('0.0.0' until an authored component is versioned). Distinct from `manifest.version`, which is the runtime contract version and is always the literal 2."),propDefaults:b(n(),$()).optional(),textParam:n().nullish().describe("The param field that carries this primitive's primary text; null = no single text slot."),subtextParam:n().nullish().describe("The param field for secondary text (subtitle/byline); null = none."),format:da.optional(),intent:n().optional().describe("Selection signal: a verb naming what this primitive accomplishes (e.g. 'product-trailer'). Match it to the beat you are authoring."),useWhen:n().optional().describe("When to use this \u2014 AND when not to. The negative guidance is load-bearing; read it before picking."),pairsWith:h(n()).optional().describe("Authoring guidance: ids of primitives that COMPOSE well with this one in the same edit."),avoidWith:h(n()).optional().describe("Authoring guidance: ids of primitives that CONFLICT with this one \u2014 do not place together."),tags:h(n()).optional().describe("Free-text search keywords."),mood:h(n()).optional().describe("Vibe/tone tags (e.g. 'cinematic', 'minimal'). Filter to match the edit's mood."),tier:l(["recommended","standard","niche"]).optional().describe("Quality/applicability RANKING (a preference, not a flag). Prefer 'recommended'; reach for 'niche' only when its specific use-case is exactly the beat."),useCase:h(l(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"])).optional().describe("The edit ROLE(s) this primitive fills \u2014 the dimension to filter by for a beat (e.g. 'intro', 'title-over-footage', 'grade')."),fixedCopy:h(n()).optional().describe("On-screen strings this primitive BAKES \u2014 the read-side counterpart to propSchema. These literals render REGARDLESS of params (no param can change them); fork the source via get_component_source to edit them. Use this to see at author time what fixed copy (someone-else's marketing text, faux-code, faux-data) will appear before you render."),brandBindings:h(c({param:n(),brandToken:n()})).optional().describe("Params that can follow the project brand kit. Each {param, brandToken} says: set `param` to `brandToken` (a `$brand:` ref, e.g. '$brand:colors.accent') to track the brand instead of a literal. See the list response's `brandTokens` for the full ref vocabulary. Omitted when nothing is brand-bound."),placement:ca.describe("How to author this entry as a ClipSource via apply_composition: the exact ClipSource `kind` + the id field to key it by. Built-ins place as {kind:'overlay'|'effect', primitiveId}; installed components place as {kind:'component', componentId}. A kind:'scene' primitive has no 'scene' ClipSource \u2014 it is placed as {kind:'overlay', primitiveId}."),warnings:h(n()).optional().describe("Non-blocking save-time advisories \u2014 the create/update SUCCEEDED. Currently: a `fontFamily` string literal referencing a NON-vendored font (a bare CSS generic like 'serif', or an unknown named family like 'Arial') whose LIVE-lane pixels vary by render host \u2014 re-author with a vendored family or 'Georgia'. Omitted when there is nothing to flag; only present on the create/update responses.")}).describe("Component catalog entry per \xA7Components.");var Pg=c({soundId:n().describe("Stable sound-pack item id."),family:l(["tick","pop","impact","confirm","error","whoosh","riser"]).describe("Editorial family the compose sfx pass binds by."),envelopeClass:l(["transient","sweep","ambient"]).describe("Coarse envelope shape \u2014 the browse grouping."),intensity:l(["subtle","standard","strong"]),durationSec:s().describe("Duration of the mastered asset (seconds)."),description:n().describe("One-line human-legible caption."),attribution:n().describe("CC0 provenance string.")});var Lg=c({data:h(Xm),pagination:pe,brandTokens:h(n()).optional().describe("Catalog-level reference: the valid `$brand:` token refs a param value may carry (e.g. accentColor: \"$brand:colors.accent\"). Colors + fonts are the common bindings; the full design-token vocabulary is listed. Derived from the brand kit resolver so it can't drift. See each entry's `brandBindings` for which params are brand-bound by default."),sfx:h(Pg).optional().describe("Catalog-level reference: the curated CC0 SFX pack (closed, versioned). The compose sfx pass places these deterministically; this is the pack-only structural inventory to pick a `soundId` by family. Present on the first page only."),audio:h(Cg).optional().describe(`The UNIFIED org sound palette (audio-substrate Phase 2): the curated packs (SFX + music beds) unioned with THIS org's own uploads/imports (source:"org") and generated audio (source:"generated"), one uniform entry shape carrying role + envelopeClass + provenance + license; music entries carry bpm. Prefer an org sound when it fits \u2014 an org that uploads its product's real UI sounds hears ITS product. Present on the first page only.`)});var u2=256,f2=256,h2=256,g2=256,x2=256,z2=256,b2=256,S2=256,y2=256,v2=256,w2=256,R2=new RegExp("^[a-f0-9]{64}$"),I2=256,M2=256,O2=0,$2=new RegExp("^[a-f0-9]{64}$"),T2=new RegExp("^[a-f0-9]{64}$"),k2=new RegExp("^[a-f0-9]{64}$"),C2=0,D2=9007199254740991,_2=0,j2=9007199254740991,E2=0,P2=9007199254740991,L2=0,V2=0,A2=9007199254740991,F2=new RegExp("^[a-f0-9]{64}$"),U2=0,N2=9007199254740991,q2=0,B2=9007199254740991,W2=new RegExp("^[a-f0-9]{64}$"),Z2=256,G2=256,H2=256,J2=256,K2=256,X2=256,Y2=new RegExp("^[a-f0-9]{64}$"),Q2=128,e_=0,t_=9007199254740991,o_=0,n_=9007199254740991,r_=0,i_=9007199254740991,a_=0,s_=0,c_=0,d_=256,p_=256,m_=256,l_=256,u_=256,f_=256,h_=new RegExp("^[a-f0-9]{64}$"),g_=256,x_=256,z_=0,b_=new RegExp("^[a-f0-9]{64}$"),S_=new RegExp("^[a-f0-9]{64}$"),y_=new RegExp("^[a-f0-9]{64}$"),v_=0,w_=9007199254740991,R_=0,I_=9007199254740991,M_=0,O_=9007199254740991,$_=0,T_=0,k_=9007199254740991,C_=new RegExp("^[a-f0-9]{64}$"),D_=0,__=9007199254740991,j_=0,E_=9007199254740991,P_=new RegExp("^[a-f0-9]{64}$"),L_=256,V_=256,A_=256,F_=256,U_=256,N_=256,q_=new RegExp("^[a-f0-9]{64}$"),B_=new RegExp("^[a-f0-9]{64}$"),W_=256,Z_=256,G_=256,H_=256,J_=256,K_=256,X_=new RegExp("^[a-f0-9]{64}$"),Y_=256,Q_=256,ej=256,tj=256,oj=256,nj=256,rj=new RegExp("^[a-f0-9]{64}$"),ij=256,aj=256,sj=0,cj=new RegExp("^[a-f0-9]{64}$"),dj=new RegExp("^[a-f0-9]{64}$"),pj=new RegExp("^[a-f0-9]{64}$"),mj=0,lj=9007199254740991,uj=0,fj=9007199254740991,hj=0,gj=9007199254740991,xj=0,zj=0,bj=9007199254740991,Sj=new RegExp("^[a-f0-9]{64}$"),yj=0,vj=9007199254740991,wj=0,Rj=9007199254740991,Ij=new RegExp("^[a-f0-9]{64}$"),Mj=256,Oj=256,$j=256,Tj=256,kj=256,Cj=256,Dj=new RegExp("^[a-f0-9]{64}$"),_j=9007199254740991,jj=256,Ej=256,Pj=256,Lj=256,Vj=256,Aj=256,Fj=new RegExp("^[a-f0-9]{64}$"),Uj=z([Lg,c({protocolVersion:m(1),scope:z([c({kind:m("builtin"),collection:n().min(1).max(u2)}),c({kind:m("org-local"),orgId:n().min(1).max(f2),workspaceId:n().min(1).max(h2)}),c({kind:m("org-hosted"),orgId:n().min(1).max(g2),deploymentId:n().min(1).max(x2)})]).optional(),data:h(z([c({identity:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(z2)}),c({kind:m("org-local"),orgId:n().min(1).max(b2),workspaceId:n().min(1).max(S2)}),c({kind:m("org-hosted"),orgId:n().min(1).max(y2),deploymentId:n().min(1).max(v2)})]),id:n().min(1).max(w2),revision:n().regex(R2)}),name:n().min(1).max(I2),description:n(),category:n().min(1).max(M2),presentation:c({version:m(1),representativeTimeSeconds:s().min(O2)}).optional(),showcase:c({version:m(1),presentationKey:n().min(1),fixtureIdentity:n().regex($2),rendererIdentity:n().regex(T2),video:c({file:n().min(1),sha256:n().regex(k2),byteLength:x().gt(C2).max(D2),width:x().gt(_2).max(j2),height:x().gt(E2).max(P2),fps:s().gt(L2),durationInFrames:x().gt(V2).max(A2)}),poster:c({file:n().min(1),sha256:n().regex(F2),byteLength:x().gt(U2).max(N2),frame:x().min(q2).max(B2)})}).optional(),preview:c({identity:n().regex(W2),status:l(["unproven","verified"])}).optional(),kind:m("definition"),source:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(Z2)}),c({kind:m("org-local"),orgId:n().min(1).max(G2),workspaceId:n().min(1).max(H2)}),c({kind:m("org-hosted"),orgId:n().min(1).max(J2),deploymentId:n().min(1).max(K2)})]),componentId:n().min(1).max(X2),sourceVersionId:n().regex(Y2),sourceVersion:z([m(2),m(3)])}),declaration:z([c({state:m("v3"),capabilities:h(z([c({kind:m("clip")}),c({kind:m("cut-transition"),protocol:m("per-child")}),c({kind:m("content-slots"),slots:h(c({name:n().min(1).max(Q2),min:x().min(e_).max(t_),max:x().gt(o_).max(n_),ownership:l(["reference","exclusive"]),sizing:l(["canvas","container"])})).min(1)}),c({kind:m("clip-wrapper"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()}),c({kind:m("global-wrapper"),scope:m("media-lanes"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()})])).min(1),timing:c({defaultDuration:c({frames:x().gt(r_).max(i_),fps:s().gt(a_)}),minDurationSec:s().gt(s_).optional(),maxDurationSec:s().gt(c_).optional()})}),c({state:m("legacy-v2"),metadataStatus:m("unresolved")})]),origin:l(["server-native","customer-owned"])}),c({identity:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(d_)}),c({kind:m("org-local"),orgId:n().min(1).max(p_),workspaceId:n().min(1).max(m_)}),c({kind:m("org-hosted"),orgId:n().min(1).max(l_),deploymentId:n().min(1).max(u_)})]),id:n().min(1).max(f_),revision:n().regex(h_)}),name:n().min(1).max(g_),description:n(),category:n().min(1).max(x_),presentation:c({version:m(1),representativeTimeSeconds:s().min(z_)}).optional(),showcase:c({version:m(1),presentationKey:n().min(1),fixtureIdentity:n().regex(b_),rendererIdentity:n().regex(S_),video:c({file:n().min(1),sha256:n().regex(y_),byteLength:x().gt(v_).max(w_),width:x().gt(R_).max(I_),height:x().gt(M_).max(O_),fps:s().gt($_),durationInFrames:x().gt(T_).max(k_)}),poster:c({file:n().min(1),sha256:n().regex(C_),byteLength:x().gt(D_).max(__),frame:x().min(j_).max(E_)})}).optional(),preview:c({identity:n().regex(P_),status:l(["unproven","verified"])}).optional(),kind:m("preset"),definition:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(L_)}),c({kind:m("org-local"),orgId:n().min(1).max(V_),workspaceId:n().min(1).max(A_)}),c({kind:m("org-hosted"),orgId:n().min(1).max(F_),deploymentId:n().min(1).max(U_)})]),componentId:n().min(1).max(N_),sourceVersionId:n().regex(q_),sourceVersion:z([m(2),m(3)])}),presetVersionId:n().regex(B_),historicalDocument:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(W_)}),c({kind:m("org-local"),orgId:n().min(1).max(Z_),workspaceId:n().min(1).max(G_)}),c({kind:m("org-hosted"),orgId:n().min(1).max(H_),deploymentId:n().min(1).max(J_)})]),documentId:n().min(1).max(K_),documentSha256:n().regex(X_)}),equivalence:l(["unproven","verified"])}),c({identity:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(Y_)}),c({kind:m("org-local"),orgId:n().min(1).max(Q_),workspaceId:n().min(1).max(ej)}),c({kind:m("org-hosted"),orgId:n().min(1).max(tj),deploymentId:n().min(1).max(oj)})]),id:n().min(1).max(nj),revision:n().regex(rj)}),name:n().min(1).max(ij),description:n(),category:n().min(1).max(aj),presentation:c({version:m(1),representativeTimeSeconds:s().min(sj)}).optional(),showcase:c({version:m(1),presentationKey:n().min(1),fixtureIdentity:n().regex(cj),rendererIdentity:n().regex(dj),video:c({file:n().min(1),sha256:n().regex(pj),byteLength:x().gt(mj).max(lj),width:x().gt(uj).max(fj),height:x().gt(hj).max(gj),fps:s().gt(xj),durationInFrames:x().gt(zj).max(bj)}),poster:c({file:n().min(1),sha256:n().regex(Sj),byteLength:x().gt(yj).max(vj),frame:x().min(wj).max(Rj)})}).optional(),preview:c({identity:n().regex(Ij),status:l(["unproven","verified"])}).optional(),kind:m("recipe"),document:c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(Mj)}),c({kind:m("org-local"),orgId:n().min(1).max(Oj),workspaceId:n().min(1).max($j)}),c({kind:m("org-hosted"),orgId:n().min(1).max(Tj),deploymentId:n().min(1).max(kj)})]),documentId:n().min(1).max(Cj),documentSha256:n().regex(Dj)}),placementCount:x().min(1).max(_j),memberSources:h(c({scope:z([c({kind:m("builtin"),collection:n().min(1).max(jj)}),c({kind:m("org-local"),orgId:n().min(1).max(Ej),workspaceId:n().min(1).max(Pj)}),c({kind:m("org-hosted"),orgId:n().min(1).max(Lj),deploymentId:n().min(1).max(Vj)})]),componentId:n().min(1).max(Aj),sourceVersionId:n().regex(Fj),sourceVersion:z([m(2),m(3)])})).min(1),equivalence:l(["unproven","verified"])})])),pagination:pe})]);var Nj=0,qj=9007199254740991,Bj=128,Wj=0,Zj=9007199254740991,Gj=256,Hj=65536,Jj=2048,Fo=z([c({mode:m("exact"),expectedRevision:x().min(Nj).max(qj)}),c({mode:m("guarded"),compositionId:n().min(1).max(Bj).optional(),observedRevision:x().min(Wj).max(Zj),basis:h(c({key:n().min(1).max(Gj),token:n().max(Hj)})).max(Jj)})]);var Kj=200,Xj=200,Yj=2e3,Qj=200,eE=0,tE=128,oE=new RegExp("^[a-z0-9][a-z0-9._-]*$"),nE=0,rE=64,iE=0,aE=64,sE=1,cE=0,dE=1,pE=1,mE=0,lE=1,uE=128,fE=new RegExp("^[a-zA-Z0-9][a-zA-Z0-9._-]*$"),hE=8e6,gE=0,xE=64,zE=0,bE=64,SE=1,yE=0,vE=1,wE=1,RE=0,IE=1,ME=128,OE=128,$E=128,TE=0,kE=9007199254740991,CE=0,DE=0,_E=0,jE=128,EE=0,PE=9007199254740991,LE=0,VE=9007199254740991,AE=128,FE=128,UE=16,NE=0,qE=9007199254740991,BE=0,WE=9007199254740991,ZE=0,GE=64,HE=0,JE=64,KE=1,XE=0,YE=1,QE=1,eP=0,tP=1,oP=new RegExp("^https:\\/\\/.*"),nP=new RegExp("^[a-f0-9]{64}$"),rP=0,iP=0,aP=128,sP=new RegExp("^[a-f0-9]{64}$"),cP=0,dP=0,pP=new RegExp("^https:\\/\\/.*"),mP=new RegExp("^[a-f0-9]{64}$"),lP=0,uP=0,fP=128,hP=new RegExp("^[a-f0-9]{64}$"),gP=0,xP=0,zP=2,bP=c({componentId:n().min(1).max(Kj).optional().describe("Caller-chosen stable component id. On create it names the new component. On PUT/PATCH it is optional and, when present, must equal the id in the path; a mismatch is a 400 naming both."),tsxSource:n().min(1).optional(),name:n().min(1).max(Xj).optional(),description:n().max(Yj).optional(),category:l(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),propSchema:b(n(),$()).optional(),origin:l(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(Qj).optional(),tokens:b(n(),$()).optional(),examples:h(b(n(),$())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:s().gt(eE).optional(),manifest:Je.optional(),source:z([c({version:m(2),componentId:n().min(1).max(tE).regex(oE),tsxSource:n().min(1),manifest:c({version:m(2),assets:b(n(),c({kind:l(["image","video","audio","data","visual"]),required:R(),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(nE).max(rE),maxProjectedHeightRatio:s().gt(iE).max(aE),minVisibleSourceWidthRatio:s().gt(cE).max(dE).default(sE),minVisibleSourceHeightRatio:s().gt(mE).max(lE).default(pE)})]).optional()})),graphics:c({api:l(["canvas2d","webgl","webgl2","webgpu"]),required:m(!0),accelerationPreference:l(["hardware-preferred","software-allowed"])}),alphaPolicy:l(["requires-transparency","allows-opaque"]),sceneShot:c({version:m(2)}).optional(),visualMedia:c({version:m(1)}).optional()})}),c({version:m(3),componentId:n().min(1).max(uE).regex(fE),tsxSource:n().min(1).max(hE),manifest:c({version:m(2),assets:b(n(),c({kind:l(["image","video","audio","data","visual"]),required:R(),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(gE).max(xE),maxProjectedHeightRatio:s().gt(zE).max(bE),minVisibleSourceWidthRatio:s().gt(yE).max(vE).default(SE),minVisibleSourceHeightRatio:s().gt(RE).max(IE).default(wE)})]).optional()})),graphics:c({api:l(["canvas2d","webgl","webgl2","webgpu"]),required:m(!0),accelerationPreference:l(["hardware-preferred","software-allowed"])}),alphaPolicy:l(["requires-transparency","allows-opaque"]),sceneShot:c({version:m(2)}).optional(),visualMedia:c({version:m(1)}).optional()}),definition:c({inputSchema:b(n(),$()),defaults:b(n(),$()),brandBindings:h(c({propPath:n().min(1).max(ME),cssVar:n().min(1).max(OE),fallback:n().optional(),brandKitPath:n().min(1).max($E).optional()})),timing:c({defaultDuration:c({frames:x().gt(TE).max(kE),fps:s().gt(CE)}),minDurationSec:s().gt(DE).optional(),maxDurationSec:s().gt(_E).optional()}),capabilities:h(z([c({kind:m("clip")}),c({kind:m("cut-transition"),protocol:m("per-child")}),c({kind:m("content-slots"),slots:h(c({name:n().min(1).max(jE),min:x().min(EE).max(PE),max:x().gt(LE).max(VE),ownership:l(["reference","exclusive"]),sizing:l(["canvas","container"])})).min(1)}),c({kind:m("clip-wrapper"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()}),c({kind:m("global-wrapper"),scope:m("media-lanes"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()})])).min(1),mediaBindings:h(c({name:n().min(1).max(AE),propPath:h(n().min(1).max(FE)).min(1).max(UE),kind:l(["image","video","visual"]),collection:l(["scalar","array"]),cardinality:c({min:x().min(NE).max(qE),max:x().gt(BE).max(WE).optional()}),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(ZE).max(GE),maxProjectedHeightRatio:s().gt(HE).max(JE),minVisibleSourceWidthRatio:s().gt(XE).max(YE).default(KE),minVisibleSourceHeightRatio:s().gt(eP).max(tP).default(QE)})]).optional()})).min(1).optional(),preview:c({params:b(n(),$()).optional(),format:c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional(),platform:n().optional()}).optional(),assets:b(n(),z([c({url:Ce("starts_with",oP),sha256:n().regex(nP),mimeType:n().min(1),frameRate:s().gt(rP).optional(),durationSec:s().gt(iP).optional()}),c({mediaId:n().min(1).max(aP),sha256:n().regex(sP),mimeType:n().min(1),frameRate:s().gt(cP).optional(),durationSec:s().gt(dP).optional()})])).optional(),mediaBindings:b(n(),h(z([c({url:Ce("starts_with",pP),sha256:n().regex(mP),mimeType:n().min(1),frameRate:s().gt(lP).optional(),durationSec:s().gt(uP).optional()}),c({mediaId:n().min(1).max(fP),sha256:n().regex(hP),mimeType:n().min(1),frameRate:s().gt(gP).optional(),durationSec:s().gt(xP).optional()})]))).optional()}).optional()})})]).optional(),supportedSourceVersions:h(z([m(2),m(3)])).min(1).max(zP).optional(),projectId:n().min(1).optional().describe("A project whose explicitly named composition moves its placements atomically with the source write. Requires compositionId and concurrency."),compositionId:n().min(1).optional().describe("The exact composition observed by the caller. Required with projectId and concurrency."),concurrency:Fo.optional().describe("Caller-observed placement guard. component.repin currently requires mode:exact; guarded mode refuses before writes.")}).describe("PATCH /components/:id body, RFC 7396 merge: a field you omit is left exactly as it was. Org/user are server-resolved; never accepted from the body.");var Vg=c({artifactKind:m("image"),contentType:l(["image/png","image/jpeg"]),cached:R(),listUsd:s().optional().describe("List price charged for this delivered preview."),url:le(),urlExpiresAt:n()});var Ag=c({artifactKind:m("motion"),contentType:m("video/webm"),cached:R(),listUsd:s().optional().describe("List price charged for this delivered preview."),url:le(),urlExpiresAt:n()});var Fg=z([Vg,Ag]);var SP=0,yP=9007199254740991,vP=0,wP=9007199254740991,RP=0,IP=120,MP=3600,OP=c({componentId:n().min(1),params:b(n(),$()).optional(),assets:b(n(),n().min(1)).optional().describe("Component asset-slot name to org mediaId. Every required manifest slot must be bound."),width:x().gt(SP).max(yP).optional(),height:x().gt(vP).max(wP).optional(),fps:s().gt(RP).max(IP).optional().describe("Preview frame rate. When omitted, uses the project's format."),durationInFrames:x().min(1).max(MP).optional().describe("Preview frame count. When omitted, uses the component's declared duration; required if the component has none.")});var $P=200,TP=2e3,kP=200,CP=0,DP=128,_P=new RegExp("^[a-z0-9][a-z0-9._-]*$"),jP=0,EP=64,PP=0,LP=64,VP=1,AP=0,FP=1,UP=1,NP=0,qP=1,BP=128,WP=new RegExp("^[a-zA-Z0-9][a-zA-Z0-9._-]*$"),ZP=8e6,GP=0,HP=64,JP=0,KP=64,XP=1,YP=0,QP=1,eL=1,tL=0,oL=1,nL=128,rL=128,iL=128,aL=0,sL=9007199254740991,cL=0,dL=0,pL=0,mL=128,lL=0,uL=9007199254740991,fL=0,hL=9007199254740991,gL=128,xL=128,zL=16,bL=0,SL=9007199254740991,yL=0,vL=9007199254740991,wL=0,RL=64,IL=0,ML=64,OL=1,$L=0,TL=1,kL=1,CL=0,DL=1,_L=new RegExp("^https:\\/\\/.*"),jL=new RegExp("^[a-f0-9]{64}$"),EL=0,PL=0,LL=128,VL=new RegExp("^[a-f0-9]{64}$"),AL=0,FL=0,UL=new RegExp("^https:\\/\\/.*"),NL=new RegExp("^[a-f0-9]{64}$"),qL=0,BL=0,WL=128,ZL=new RegExp("^[a-f0-9]{64}$"),GL=0,HL=0,JL=c({tsxSource:n().min(1),name:n().min(1).max($P).optional(),description:n().max(TP).optional(),propSchema:b(n(),$()),origin:l(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(kP).optional(),tokens:b(n(),$()).optional(),examples:h(b(n(),$())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:s().gt(CP).optional(),manifest:Je,id:n(),source:l(["default","installed"]),metadataStatus:m("unresolved").optional().describe("Historical source-only reads omit unavailable discovery name/description instead of borrowing current metadata."),sourceVersionId:n().optional().describe("Exact immutable source pin, returned beside an opted-in sourceSnapshot; distinct from bundle revisions."),sourceSnapshot:z([c({version:m(2),componentId:n().min(1).max(DP).regex(_P),tsxSource:n().min(1),manifest:c({version:m(2),assets:b(n(),c({kind:l(["image","video","audio","data","visual"]),required:R(),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(jP).max(EP),maxProjectedHeightRatio:s().gt(PP).max(LP),minVisibleSourceWidthRatio:s().gt(AP).max(FP).default(VP),minVisibleSourceHeightRatio:s().gt(NP).max(qP).default(UP)})]).optional()})),graphics:c({api:l(["canvas2d","webgl","webgl2","webgpu"]),required:m(!0),accelerationPreference:l(["hardware-preferred","software-allowed"])}),alphaPolicy:l(["requires-transparency","allows-opaque"]),sceneShot:c({version:m(2)}).optional(),visualMedia:c({version:m(1)}).optional()})}),c({version:m(3),componentId:n().min(1).max(BP).regex(WP),tsxSource:n().min(1).max(ZP),manifest:c({version:m(2),assets:b(n(),c({kind:l(["image","video","audio","data","visual"]),required:R(),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(GP).max(HP),maxProjectedHeightRatio:s().gt(JP).max(KP),minVisibleSourceWidthRatio:s().gt(YP).max(QP).default(XP),minVisibleSourceHeightRatio:s().gt(tL).max(oL).default(eL)})]).optional()})),graphics:c({api:l(["canvas2d","webgl","webgl2","webgpu"]),required:m(!0),accelerationPreference:l(["hardware-preferred","software-allowed"])}),alphaPolicy:l(["requires-transparency","allows-opaque"]),sceneShot:c({version:m(2)}).optional(),visualMedia:c({version:m(1)}).optional()}),definition:c({inputSchema:b(n(),$()),defaults:b(n(),$()),brandBindings:h(c({propPath:n().min(1).max(nL),cssVar:n().min(1).max(rL),fallback:n().optional(),brandKitPath:n().min(1).max(iL).optional()})),timing:c({defaultDuration:c({frames:x().gt(aL).max(sL),fps:s().gt(cL)}),minDurationSec:s().gt(dL).optional(),maxDurationSec:s().gt(pL).optional()}),capabilities:h(z([c({kind:m("clip")}),c({kind:m("cut-transition"),protocol:m("per-child")}),c({kind:m("content-slots"),slots:h(c({name:n().min(1).max(mL),min:x().min(lL).max(uL),max:x().gt(fL).max(hL),ownership:l(["reference","exclusive"]),sizing:l(["canvas","container"])})).min(1)}),c({kind:m("clip-wrapper"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()}),c({kind:m("global-wrapper"),scope:m("media-lanes"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()})])).min(1),mediaBindings:h(c({name:n().min(1).max(gL),propPath:h(n().min(1).max(xL)).min(1).max(zL),kind:l(["image","video","visual"]),collection:l(["scalar","array"]),cardinality:c({min:x().min(bL).max(SL),max:x().gt(yL).max(vL).optional()}),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(wL).max(RL),maxProjectedHeightRatio:s().gt(IL).max(ML),minVisibleSourceWidthRatio:s().gt($L).max(TL).default(OL),minVisibleSourceHeightRatio:s().gt(CL).max(DL).default(kL)})]).optional()})).min(1).optional(),preview:c({params:b(n(),$()).optional(),format:c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional(),platform:n().optional()}).optional(),assets:b(n(),z([c({url:Ce("starts_with",_L),sha256:n().regex(jL),mimeType:n().min(1),frameRate:s().gt(EL).optional(),durationSec:s().gt(PL).optional()}),c({mediaId:n().min(1).max(LL),sha256:n().regex(VL),mimeType:n().min(1),frameRate:s().gt(AL).optional(),durationSec:s().gt(FL).optional()})])).optional(),mediaBindings:b(n(),h(z([c({url:Ce("starts_with",UL),sha256:n().regex(NL),mimeType:n().min(1),frameRate:s().gt(qL).optional(),durationSec:s().gt(BL).optional()}),c({mediaId:n().min(1).max(WL),sha256:n().regex(ZL),mimeType:n().min(1),frameRate:s().gt(GL).optional(),durationSec:s().gt(HL).optional()})]))).optional()}).optional()})})]).optional().describe("Canonical immutable source snapshot, returned on explicit supportedSourceVersions opt-in; source remains provenance.")}).describe("Installed component SOURCE (TSX) + ownership provenance per \xA7Components.");var KL=200,XL=200,YL=2e3,QL=200,eV=0,tV=128,oV=new RegExp("^[a-z0-9][a-z0-9._-]*$"),nV=0,rV=64,iV=0,aV=64,sV=1,cV=0,dV=1,pV=1,mV=0,lV=1,uV=128,fV=new RegExp("^[a-zA-Z0-9][a-zA-Z0-9._-]*$"),hV=8e6,gV=0,xV=64,zV=0,bV=64,SV=1,yV=0,vV=1,wV=1,RV=0,IV=1,MV=128,OV=128,$V=128,TV=0,kV=9007199254740991,CV=0,DV=0,_V=0,jV=128,EV=0,PV=9007199254740991,LV=0,VV=9007199254740991,AV=128,FV=128,UV=16,NV=0,qV=9007199254740991,BV=0,WV=9007199254740991,ZV=0,GV=64,HV=0,JV=64,KV=1,XV=0,YV=1,QV=1,eA=0,tA=1,oA=new RegExp("^https:\\/\\/.*"),nA=new RegExp("^[a-f0-9]{64}$"),rA=0,iA=0,aA=128,sA=new RegExp("^[a-f0-9]{64}$"),cA=0,dA=0,pA=new RegExp("^https:\\/\\/.*"),mA=new RegExp("^[a-f0-9]{64}$"),lA=0,uA=0,fA=128,hA=new RegExp("^[a-f0-9]{64}$"),gA=0,xA=0,zA=2,bA=c({componentId:n().min(1).max(KL).optional().describe("Caller-chosen stable component id. On create it names the new component. On PUT/PATCH it is optional and, when present, must equal the id in the path; a mismatch is a 400 naming both."),tsxSource:n().min(1).optional(),name:n().min(1).max(XL).optional(),description:n().max(YL).optional(),category:l(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),propSchema:b(n(),$()).optional(),origin:l(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(QL).optional(),tokens:b(n(),$()).optional(),examples:h(b(n(),$())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:s().gt(eV).optional(),manifest:Je.optional(),source:z([c({version:m(2),componentId:n().min(1).max(tV).regex(oV),tsxSource:n().min(1),manifest:c({version:m(2),assets:b(n(),c({kind:l(["image","video","audio","data","visual"]),required:R(),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(nV).max(rV),maxProjectedHeightRatio:s().gt(iV).max(aV),minVisibleSourceWidthRatio:s().gt(cV).max(dV).default(sV),minVisibleSourceHeightRatio:s().gt(mV).max(lV).default(pV)})]).optional()})),graphics:c({api:l(["canvas2d","webgl","webgl2","webgpu"]),required:m(!0),accelerationPreference:l(["hardware-preferred","software-allowed"])}),alphaPolicy:l(["requires-transparency","allows-opaque"]),sceneShot:c({version:m(2)}).optional(),visualMedia:c({version:m(1)}).optional()})}),c({version:m(3),componentId:n().min(1).max(uV).regex(fV),tsxSource:n().min(1).max(hV),manifest:c({version:m(2),assets:b(n(),c({kind:l(["image","video","audio","data","visual"]),required:R(),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(gV).max(xV),maxProjectedHeightRatio:s().gt(zV).max(bV),minVisibleSourceWidthRatio:s().gt(yV).max(vV).default(SV),minVisibleSourceHeightRatio:s().gt(RV).max(IV).default(wV)})]).optional()})),graphics:c({api:l(["canvas2d","webgl","webgl2","webgpu"]),required:m(!0),accelerationPreference:l(["hardware-preferred","software-allowed"])}),alphaPolicy:l(["requires-transparency","allows-opaque"]),sceneShot:c({version:m(2)}).optional(),visualMedia:c({version:m(1)}).optional()}),definition:c({inputSchema:b(n(),$()),defaults:b(n(),$()),brandBindings:h(c({propPath:n().min(1).max(MV),cssVar:n().min(1).max(OV),fallback:n().optional(),brandKitPath:n().min(1).max($V).optional()})),timing:c({defaultDuration:c({frames:x().gt(TV).max(kV),fps:s().gt(CV)}),minDurationSec:s().gt(DV).optional(),maxDurationSec:s().gt(_V).optional()}),capabilities:h(z([c({kind:m("clip")}),c({kind:m("cut-transition"),protocol:m("per-child")}),c({kind:m("content-slots"),slots:h(c({name:n().min(1).max(jV),min:x().min(EV).max(PV),max:x().gt(LV).max(VV),ownership:l(["reference","exclusive"]),sizing:l(["canvas","container"])})).min(1)}),c({kind:m("clip-wrapper"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()}),c({kind:m("global-wrapper"),scope:m("media-lanes"),ordering:l(["any","innermost"]),acceptsWrappedTargets:R()})])).min(1),mediaBindings:h(c({name:n().min(1).max(AV),propPath:h(n().min(1).max(FV)).min(1).max(UV),kind:l(["image","video","visual"]),collection:l(["scalar","array"]),cardinality:c({min:x().min(NV).max(qV),max:x().gt(BV).max(WV).optional()}),mimeTypes:h(n().min(1)).min(1).optional(),mediaDemand:z([c({mode:m("original")}),c({mode:m("tier"),tier:z([m(256),m(512),m(1024),m(2048)])}),c({mode:m("auto"),maxProjectedWidthRatio:s().gt(ZV).max(GV),maxProjectedHeightRatio:s().gt(HV).max(JV),minVisibleSourceWidthRatio:s().gt(XV).max(YV).default(KV),minVisibleSourceHeightRatio:s().gt(eA).max(tA).default(QV)})]).optional()})).min(1).optional(),preview:c({params:b(n(),$()).optional(),format:c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional(),platform:n().optional()}).optional(),assets:b(n(),z([c({url:Ce("starts_with",oA),sha256:n().regex(nA),mimeType:n().min(1),frameRate:s().gt(rA).optional(),durationSec:s().gt(iA).optional()}),c({mediaId:n().min(1).max(aA),sha256:n().regex(sA),mimeType:n().min(1),frameRate:s().gt(cA).optional(),durationSec:s().gt(dA).optional()})])).optional(),mediaBindings:b(n(),h(z([c({url:Ce("starts_with",pA),sha256:n().regex(mA),mimeType:n().min(1),frameRate:s().gt(lA).optional(),durationSec:s().gt(uA).optional()}),c({mediaId:n().min(1).max(fA),sha256:n().regex(hA),mimeType:n().min(1),frameRate:s().gt(gA).optional(),durationSec:s().gt(xA).optional()})]))).optional()}).optional()})})]).optional(),supportedSourceVersions:h(z([m(2),m(3)])).min(1).max(zA).optional(),projectId:n().min(1).optional().describe("A project whose explicitly named composition moves its placements atomically with the source write. Requires compositionId and concurrency."),compositionId:n().min(1).optional().describe("The exact composition observed by the caller. Required with projectId and concurrency."),concurrency:Fo.optional().describe("Caller-observed placement guard. component.repin currently requires mode:exact; guarded mode refuses before writes.")}).describe("PUT /components/:id body: every writable field, all optional; an omitted field is carried forward. Org/user are server-resolved; never accepted from the body.");var SA=200,yA=2e3,vA=200,wA=0,RA=0,IA=9007199254740991,MA=0,OA=9007199254740991,$A=c({name:n().min(1).max(SA),description:n().max(yA),category:l(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),propSchema:b(n(),$()),origin:l(["customer-owned","server-native"]).optional(),ejectedFrom:n().max(vA).optional(),tokens:b(n(),$()).optional(),examples:h(b(n(),$())).optional().describe("Usage examples, as authored. A built-in primitive projects {name, mood?, params?, description?}; an authored component's examples are whatever it wrote, which is why the item is open. One shape for both directions: what you write here is what you read back."),durationInFrames:s().gt(wA).optional(),manifest:Je.optional().describe("The stored runtime manifest (assets, graphics API, alpha policy) of an org-INSTALLED component: the same object the create/update body takes, so a manifest read back here can be written back unchanged. Built-in defaults have no stored manifest and omit it. Its `version` is always 2 (the contract version), unlike the entry's semver `version`."),id:n().describe("The entry's id: a `primitiveId` for a built-in, a `componentId` for an installed component."),source:l(["default","installed"]).describe("'default' = built-in primitive (place by primitiveId); 'installed' = org-authored component (place by componentId)."),kind:l(["component","transition","scene"]).describe("RENDER kind (component | transition | scene). NOT the ClipSource variant \u2014 see `placement` for how to author it on the timeline."),version:n().describe("The ENTRY's version: a semver string ('0.0.0' until an authored component is versioned). Distinct from `manifest.version`, which is the runtime contract version and is always the literal 2."),propDefaults:b(n(),$()).optional(),textParam:n().nullish().describe("The param field that carries this primitive's primary text; null = no single text slot."),subtextParam:n().nullish().describe("The param field for secondary text (subtitle/byline); null = none."),format:da.optional(),intent:n().optional().describe("Selection signal: a verb naming what this primitive accomplishes (e.g. 'product-trailer'). Match it to the beat you are authoring."),useWhen:n().optional().describe("When to use this \u2014 AND when not to. The negative guidance is load-bearing; read it before picking."),pairsWith:h(n()).optional().describe("Authoring guidance: ids of primitives that COMPOSE well with this one in the same edit."),avoidWith:h(n()).optional().describe("Authoring guidance: ids of primitives that CONFLICT with this one \u2014 do not place together."),tags:h(n()).optional().describe("Free-text search keywords."),mood:h(n()).optional().describe("Vibe/tone tags (e.g. 'cinematic', 'minimal'). Filter to match the edit's mood."),tier:l(["recommended","standard","niche"]).optional().describe("Quality/applicability RANKING (a preference, not a flag). Prefer 'recommended'; reach for 'niche' only when its specific use-case is exactly the beat."),useCase:h(l(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"])).optional().describe("The edit ROLE(s) this primitive fills \u2014 the dimension to filter by for a beat (e.g. 'intro', 'title-over-footage', 'grade')."),fixedCopy:h(n()).optional().describe("On-screen strings this primitive BAKES \u2014 the read-side counterpart to propSchema. These literals render REGARDLESS of params (no param can change them); fork the source via get_component_source to edit them. Use this to see at author time what fixed copy (someone-else's marketing text, faux-code, faux-data) will appear before you render."),brandBindings:h(c({param:n(),brandToken:n()})).optional().describe("Params that can follow the project brand kit. Each {param, brandToken} says: set `param` to `brandToken` (a `$brand:` ref, e.g. '$brand:colors.accent') to track the brand instead of a literal. See the list response's `brandTokens` for the full ref vocabulary. Omitted when nothing is brand-bound."),placement:ca.describe("How to author this entry as a ClipSource via apply_composition: the exact ClipSource `kind` + the id field to key it by. Built-ins place as {kind:'overlay'|'effect', primitiveId}; installed components place as {kind:'component', componentId}. A kind:'scene' primitive has no 'scene' ClipSource \u2014 it is placed as {kind:'overlay', primitiveId}."),warnings:h(n()).optional().describe("Non-blocking save-time advisories \u2014 the create/update SUCCEEDED. Currently: a `fontFamily` string literal referencing a NON-vendored font (a bare CSS generic like 'serif', or an unknown named family like 'Arial') whose LIVE-lane pixels vary by render host \u2014 re-author with a vendored family or 'Georgia'. Omitted when there is nothing to flag; only present on the create/update responses."),repinned:c({compositionId:n(),pins:x().min(RA).max(IA).describe("Placements in that composition moved from the previous version to this one, nested scene surfaces included."),etag:n().nullable().describe("The composition's ETag after the move; null when no pin moved.")}).optional().describe("Present when the update named `projectId`: the composition whose placements moved to the new version."),placementsPinnedToPrevious:x().min(MA).max(OA).describe("Placements across the org that still pin the previous version and will keep rendering it. Name `projectId` (and `compositionId`) on the update to move a composition's placements with it.")}).describe("Updated component entry plus where its placements point.");var TA=2e3,kA=5,CA=0,DA=0,_A=10,jA=-9007199254740991,EA=9007199254740991,PA=64,LA=3,VA=c({suggestionId:n().min(1).optional(),fromComposition:R().optional().describe("Reuse the project's current composition as the compose starting point (critique-retry path). The Director RE-AUTHORS graphics: if the current composition is client-authored and contains graphic clips (overlay/component/card), the request is refused (validation_error naming the clips) \u2014 render it verbatim with create_render instead. The director's own output (critique-retry) is exempt."),briefId:n().min(1).optional().describe("Compose from a persisted Brief (create_brief) \u2014 the intent-first door: every Brief field is HONORED or the request is refused loudly naming the field (window from beat moment-pinning; seeded graphics carried VERBATIM as locked clips; exclusions enforced; locale + caption emphasis threaded to the Director). Exactly ONE of suggestionId | fromComposition | briefId."),format:he.optional().describe("Optional format override. Phase 2 ignores this \u2014 format precedence is project.compositionFormat \u2192 9:16 fhd 30fps default."),scope:$().optional().describe("RequestScope discriminated union (per compose-api-contract.md). Editor-only scopes (captions/overlay-track/broll/overlay-instance/segment) require an editor-session token; API tokens get 403 on those."),critique:n().max(TA).optional().describe("Structured critique block (per compose-api-contract.md decision #11). Capped at 2KB total; per-criterion blocks capped at 500 chars."),parentJobId:n().optional().describe("Pointer to the prior compose job this run iterates on. Surfaced on the resulting compose job as baselineComposeJobId."),maxCandidates:x().min(1).max(kA).optional().describe("Ensemble size. Currently pinned to 1 \u2014 the multi-candidate ensemble is disabled pending a capacity bound, so any value >1 is ignored and every compose runs a single candidate. Still accepted for forward-compat; will honor [1, 5] again once re-enabled."),budgetUsd:s().gt(CA).optional().describe("Per-job budget cap (USD). Clamped at the route against the org's composeMaxBudgetUsdPerJob setting."),qualityThreshold:s().min(DA).max(_A).optional().describe("Composite-score accept threshold. Server default per contract."),seed:x().min(jA).max(EA).optional().describe("Deterministic seed for replay."),clientNonce:n().max(PA).optional().describe("Opaque caller token that disambiguates intentional same-critique retries. Without it, identical (project, sug, seed, critique) tuples deduplicate; with it, retries create a fresh execution."),holdAt:h(l(["content","layout","motion"])).max(LA).optional().describe("Opt-in checkpoint gates. Each named stage pauses the compose at its boundary (status \u2192 awaiting_input) for client review via resume. Absent/empty \u21D2 fully autonomous. Non-empty \u21D2 the run is a single spine.")}).describe("POST /projects/:id/compose body.");var AA=c({composeJobId:n().describe("Opaque compose job id; pass to the SSE stream URL."),projectId:n(),status:l(["queued","failed"]).describe("queued = normal; failed = startup failed and the job is already terminal (the SSE stream will emit a single `job_failed` frame and close)."),streamUrl:n().optional().describe("Relative SSE endpoint to stream this job's events (per compose-api-contract.md).")}).describe("POST /projects/:id/compose response.");var FA=0,UA=9007199254740991,Ug=c({mode:l(["advise","amend","explore"]),assessment:c({editorial:c({score:s(),grounding:l(["measured","judged"]),abstained:R(),reliability:s().optional()}),spatial:c({score:s(),grounding:l(["measured","judged"]),abstained:R(),reliability:s().optional()}),brand:c({score:s(),grounding:l(["measured","judged"]),abstained:R(),reliability:s().optional()}),caption:c({score:s(),grounding:l(["measured","judged"]),abstained:R(),reliability:s().optional()})}).optional().describe("Grounded critique of the CURRENT composition. Omitted for mode=advise."),proposals:h(c({label:n(),candidateIndex:x().min(FA).max(UA).optional().describe("Present for amend/explore \u2014 adopt via POST /compose/jobs/:jobId/select with this candidateIndex. Absent for advise."),changeSummary:h(n()).describe("Human-legible edit-pattern labels."),boundToEtag:n().optional().describe("The composition etag this proposal was computed against."),expectedDelta:b(n(),n()).optional().describe("Advisory per-criterion score lift; NOT authoritative pre-recalibration.")})),principles:h(n()).describe("Reusable, grounded lessons for the client's next authoring."),plan:$().optional().describe("Present for mode=advise \u2014 the planner agent's ComposePlan (framing/cuts/captions/graphics intents) as GUIDANCE. The client agent reads it and re-authors; it is NOT converted to ops."),checkpointId:n().optional().describe("The durable kind:'score' Checkpoint minted from this advisory (evidence convergence \u2014 get_checkpoint re-reads the envelope later). Stamped at the consult success terminal.")}).describe("The advisory envelope returned by a completed consult job (on ComposeJobDetailResponse.advisoryResult).");var NA=-9007199254740991,qA=9007199254740991,BA=0,WA=9007199254740991,ZA=-9007199254740991,GA=9007199254740991,HA=c({composeJobId:n(),projectId:n(),status:l(["queued","running","awaiting_input","complete","failed","cancelled"]),error:n().nullable(),request:c({suggestionId:n().optional(),fromComposition:R().optional(),scope:$().optional(),critique:n().optional(),parentJobId:n().optional(),maxCandidates:x().min(NA).max(qA).optional(),budgetUsd:s().optional(),qualityThreshold:s().optional()}),candidates:h($()),winner:z([c({candidateIndex:x().min(BA).max(WA),compositionRunId:n()}),q()]),listUsd:s().optional(),startedAt:s(),completedAt:s().nullable(),advisoryResult:Ug.optional(),checkpoint:c({checkpointId:n(),stage:l(["content","layout","motion"]),version:x().min(ZA).max(GA)}).optional()});var Ng=c({composeJobId:n(),projectId:n(),status:l(["queued","running","awaiting_input","complete","failed","cancelled"]),suggestionId:n().optional(),createdAt:s(),completedAt:s().nullable()});var JA=c({jobs:h(Ng)});var KA=0,XA=9007199254740991,YA=c({candidateIndex:x().min(KA).max(XA),selectStrategy:l(["agent-authoritative","editor-merge","editor-replace"]),ifMatch:n().optional()}).describe("POST /projects/:id/compose/jobs/:jobId/select body.");var QA=0,e4=9007199254740991,t4=c({newCompositionEtag:n(),mergeResult:c({replayedEdits:x().min(QA).max(e4),droppedEdits:h(c({trackId:n(),clipId:n().optional(),wordStartMs:s().optional(),reason:l(["target_removed","conflict"])}))}).optional()}).describe("POST /projects/:id/compose/jobs/:jobId/select response.");var o4=64,n4=c({seedComposition:$().optional(),leaseJobId:n().min(1).max(o4).optional()});var r4=0,i4=4,a4=0,s4=0,c4=0,d4=0,p4=0,m4=0,l4=0,u4=4,f4=0,h4=0,g4=0,x4=0,z4=0,b4=0,S4=0,y4=0,v4=0,w4=1,R4=0,I4=1,M4=.1,O4=1,$4=0,T4=0,k4=-.3,C4=.3,D4=-.3,_4=.3,j4=0,E4=0,P4=0,L4=16,V4=0,A4=256,F4=new RegExp("^[a-f0-9]{64}$"),U4=256,N4=128,q4=256,B4=0,W4=1,Z4=0,G4=1,H4=-.3,J4=.3,K4=256,X4=new RegExp("^[a-f0-9]{64}$"),Y4=256,Q4=128,eF=0,tF=9007199254740991,oF=0,nF=1,rF=0,iF=-1,aF=2,sF=-1,cF=2,dF=0,pF=1,mF=0,lF=1,uF=0,fF=1,hF=0,gF=1,xF=256,zF=new RegExp("^[a-f0-9]{64}$"),bF=256,SF=128,yF=0,vF=0,wF=0,RF=256,IF=new RegExp("^[a-f0-9]{64}$"),MF=256,OF=128,$F=0,TF=2,kF=0,CF=0,DF=0,_F=0,jF=0,EF=0,PF=15,LF=100,VF=900,AF=0,FF=1,UF=0,NF=1,qF=0,BF=1,WF=0,ZF=1,GF=-5,HF=20,JF=0,KF=2,XF=0,YF=2,QF=0,e9=100,t9=900,o9=0,n9=0,r9=0,i9=0,a9=.5,s9=12,c9=0,d9=100,p9=0,m9=9007199254740991,l9=0,u9=9007199254740991,f9=0,h9=9007199254740991,g9=0,x9=1,z9=0,b9=1,S9=0,y9=1,v9=0,w9=1,R9=.25,I9=4,M9=-45,O9=45,$9=15,T9=100,k9=900,C9=-5,D9=20,_9=0,j9=2,E9=0,P9=2,L9=0,V9=100,A9=900,F9=0,U9=.5,N9=12,q9=0,B9=0,W9=0,Z9=0,G9=9007199254740991,H9=0,J9=9007199254740991,K9=new RegExp("^[a-f0-9]{64}$"),X9=0,Y9=0,Q9=15,e6=100,t6=900,o6=0,n6=1,r6=0,i6=1,a6=0,s6=1,c6=0,d6=1,p6=-5,m6=20,l6=0,u6=2,f6=0,h6=2,g6=0,x6=100,z6=900,b6=0,S6=0,y6=0,v6=0,w6=.5,R6=12,I6=0,M6=100,O6=0,$6=9007199254740991,T6=0,k6=9007199254740991,C6=0,D6=9007199254740991,_6=0,j6=1,E6=0,P6=1,L6=0,V6=1,A6=0,F6=1,U6=.25,N6=4,q6=-45,B6=45,W6=15,Z6=100,G6=900,H6=-5,J6=20,K6=0,X6=2,Y6=0,Q6=2,eU=0,tU=100,oU=900,nU=0,rU=.5,iU=12,aU=0,sU=0,cU=0,dU=0,pU=9007199254740991,mU=0,lU=9007199254740991,uU=new RegExp("^[a-f0-9]{64}$"),ut=c({v:m(1),format:c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional(),platform:n().optional()}),tracks:h(c({id:n().min(1),kind:l(["video","audio","image","overlay","effect"]),name:n().optional(),enabled:R().optional(),volume:s().min(r4).max(i4).optional(),contents:h(z([c({id:n().min(1),startTime:s().min(a4).describe("Timeline start (seconds)."),duration:s().gt(s4).describe("Clip duration (seconds)."),source:z([c({kind:m("media"),mediaId:n().min(1),trim:c({start:s().min(c4).describe("Source trim start (seconds)."),end:s().min(d4).describe("Source trim end (seconds).")}).optional(),excludedRanges:h(c({start:s().min(p4),end:s().min(m4),reason:n().optional()})).optional(),volume:s().min(l4).max(u4).optional(),muted:R().optional(),playbackRate:s().gt(f4).optional(),sync:l(["video","independent"]).optional(),kenBurns:l(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:s().optional(),fadeInMs:s().min(h4).optional(),fadeOutMs:s().min(g4).optional(),loop:R().optional(),audioRole:l(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:s().max(x4),attackMs:s().min(z4),releaseMs:s().min(b4),windows:h(c({startMs:s(),endMs:s()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:s()}).optional(),reframe:c({segments:h(c({startSec:s().min(S4).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:s().gt(y4).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:z([c({mode:m("frame-center")}),c({mode:m("point"),x:s().min(v4).max(w4),y:s().min(R4).max(I4)}),c({mode:m("face"),faceId:n().min(1),shotScale:l(["close","standard","wide"]).optional()}),c({mode:m("all-faces")}),c({mode:m("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:s().min(M4).max(O4).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:s().min($4).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:s().min(T4).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:s().min(k4).max(C4).describe("Horizontal nudge, source-normalized (+ = right)."),y:s().min(D4).max(_4).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:m("component"),componentId:n().min(1),props:b(n(),$()),assets:b(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),assetTiming:b(n(),c({trimStartSec:s().min(j4).optional(),trimEndSec:s().gt(E4).optional(),playbackRate:s().gt(P4).max(L4).optional(),endPolicy:l(["loop","hold","reject"]),timelineOffsetSec:s().min(V4).optional()})).optional(),zPlane:l(["front","behind-subject"]).optional(),execution:c({version:m(3),componentId:n().min(1).max(A4),sourceVersionId:n().regex(F4),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(U4)).optional(),mediaBindings:b(n(),h(n().min(1).max(N4))).optional()}).optional(),placement:z([c({version:m(3),kind:m("clip")}),c({version:m(3),kind:m("content-slots"),slots:b(n(),c({targetClipIds:h(n().min(1).max(q4)),ownership:l(["reference","exclusive"])}))})]).optional()}),c({kind:m("overlay"),primitiveId:n().min(1),params:b(n(),$()),zPlane:l(["front","behind-subject"]).optional(),anchor:c({space:m("scene"),x:s().min(B4).max(W4),y:s().min(Z4).max(G4)}).optional(),parallax:s().min(H4).max(J4).optional()}),c({kind:m("effect"),primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),component:c({version:m(3),componentId:n().min(1).max(K4),sourceVersionId:n().regex(X4),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(Y4)).optional(),mediaBindings:b(n(),h(n().min(1).max(Q4))).optional()}).optional(),targetTrackIds:h(n().min(1)).min(1).optional(),wrapperOrder:x().min(eF).max(tF).optional()}),c({kind:m("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:b(n(),n()).optional(),zPlane:m("front").optional()})]),kind:l(["video","audio","image","overlay","effect"]).optional(),opacity:s().min(oF).max(nF).optional(),scale:s().gt(rF).optional(),rotation:s().optional(),position:c({x:s().min(iF).max(aF),y:s().min(sF).max(cF)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:s().min(dF).max(pF),y:s().min(mF).max(lF),w:s().gt(uF).max(fF),h:s().gt(hF).max(gF)}).optional(),fit:l(["cover","contain"]).optional(),captionVisibility:l(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:h(c({primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(xF),sourceVersionId:n().regex(zF),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(bF)).optional(),mediaBindings:b(n(),h(n().min(1).max(SF))).optional()}).optional(),window:c({startTime:s().min(yF),duration:s().gt(vF)}).optional()})).optional(),transitionIn:c({type:n().min(1),duration:s().gt(wF),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(RF),sourceVersionId:n().regex(IF),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(MF)).optional(),mediaBindings:b(n(),h(n().min(1).max(OF))).optional()}).optional(),fromClipId:n().min(1).optional(),toClipId:n().min(1).optional(),handlePolicy:m("outgoing-overrun-at-cut-v1").optional()}).optional(),linkGroupId:n().min(1).optional(),animate:b(n(),h(c({time:s().min($F),value:s(),easing:z([l(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:A([s(),s(),s(),s()])})]).optional()})).min(TF)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")}),c({id:n().min(1),startTime:s().min(kF).describe("Timeline start (seconds)."),duration:s().gt(CF).describe("Gap duration (seconds).")})]))})),markers:h(c({id:n().min(1),startTime:s().min(DF),endTime:s().min(_F).optional(),kind:n().min(1),name:n().optional(),metadata:b(n(),$()).optional()})).optional(),captions:z([c({source:m("derived"),from:c({clipId:n()}),segments:h(c({words:h(c({text:n().min(1),startMs:s().min(jF).describe("Word start on the composition timeline, in milliseconds."),endMs:s().min(EF).describe("Word end on the composition timeline, in milliseconds."),emphasis:R().optional(),annotate:l(["circle","underline"]).optional()}))})),style:c({fontFamily:n().min(1).optional(),fontSize:s().min(1).max(PF).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:x().min(LF).max(VF).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:l(["glass","solid","none"]).optional(),position:l(["top","center","bottom"]).optional(),region:c({x:s().min(AF).max(FF),y:s().min(UF).max(NF),w:s().gt(qF).max(BF),h:s().gt(WF).max(ZF)}).optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:l(["none","uppercase","capitalize"]).optional(),letterSpacing:s().min(GF).max(HF).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:s().min(JF).max(KF).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:s().min(XF).max(YF).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisGradient:n().optional(),emphasisScale:s().gt(QF).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:x().min(e9).max(t9).optional(),emphasisTextTransform:l(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:s().optional(),emphasisFontStyle:l(["normal","italic"]).optional(),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:s().min(o9).optional(),entranceStaggerMs:s().min(n9).optional(),exitMs:s().min(r9).optional(),emphasisPlate:R().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:s().min(i9).optional(),emphasisPlatePadX:s().optional(),emphasisPlatePadY:s().optional(),emphasisPlateReveal:R().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:s().min(a9).max(s9).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:l(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:s().gt(c9).max(d9).optional()}).optional(),layouts:h(c({segmentIndex:x().min(p9).max(m9),wordStartIndex:x().min(l9).max(u9),wordEndIndex:x().gt(f9).max(h9).describe("Exclusive word index in the saved caption segment."),region:c({x:s().min(g9).max(x9),y:s().min(z9).max(b9),w:s().gt(S9).max(y9),h:s().gt(v9).max(w9)}),scale:s().min(R9).max(I9).optional(),rotation:s().min(M9).max(O9).optional(),style:c({fontFamily:n().min(1).optional(),fontSize:s().min(1).max($9).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:x().min(T9).max(k9).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:l(["glass","solid","none"]).optional(),textTransform:l(["none","uppercase","capitalize"]).optional(),letterSpacing:s().min(C9).max(D9).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:s().min(_9).max(j9).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:s().min(E9).max(P9).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisScale:s().gt(L9).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:x().min(V9).max(A9).optional(),emphasisTextTransform:l(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:s().optional(),emphasisFontStyle:l(["normal","italic"]).optional(),emphasisPlate:R().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:s().min(F9).optional(),emphasisPlatePadX:s().optional(),emphasisPlatePadY:s().optional(),emphasisPlateReveal:R().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:s().min(U9).max(N9).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:l(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:s().min(q9).optional(),entranceStaggerMs:s().min(B9).optional(),exitMs:s().min(W9).optional()}).optional(),holdThroughWordIndex:x().min(Z9).max(G9).optional().describe("Inclusive saved-word index in this segment. The layout stays visible until that word ends."),wordMarks:h(c({wordIndex:x().min(H9).max(J9),emphasis:R().optional(),annotate:z([l(["circle","underline"]),q()]).optional()})).optional(),wordSignature:n().regex(K9)})).optional(),zPlane:l(["front","behind-subject"]).optional()}),c({source:m("authored"),segments:h(c({words:h(c({text:n().min(1),startMs:s().min(X9).describe("Word start on the composition timeline, in milliseconds."),endMs:s().min(Y9).describe("Word end on the composition timeline, in milliseconds."),emphasis:R().optional(),annotate:l(["circle","underline"]).optional()}))})),style:c({fontFamily:n().min(1).optional(),fontSize:s().min(1).max(Q9).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:x().min(e6).max(t6).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:l(["glass","solid","none"]).optional(),position:l(["top","center","bottom"]).optional(),region:c({x:s().min(o6).max(n6),y:s().min(r6).max(i6),w:s().gt(a6).max(s6),h:s().gt(c6).max(d6)}).optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:l(["none","uppercase","capitalize"]).optional(),letterSpacing:s().min(p6).max(m6).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:s().min(l6).max(u6).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:s().min(f6).max(h6).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisGradient:n().optional(),emphasisScale:s().gt(g6).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:x().min(x6).max(z6).optional(),emphasisTextTransform:l(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:s().optional(),emphasisFontStyle:l(["normal","italic"]).optional(),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:s().min(b6).optional(),entranceStaggerMs:s().min(S6).optional(),exitMs:s().min(y6).optional(),emphasisPlate:R().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:s().min(v6).optional(),emphasisPlatePadX:s().optional(),emphasisPlatePadY:s().optional(),emphasisPlateReveal:R().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:s().min(w6).max(R6).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:l(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:s().gt(I6).max(M6).optional()}).optional(),layouts:h(c({segmentIndex:x().min(O6).max($6),wordStartIndex:x().min(T6).max(k6),wordEndIndex:x().gt(C6).max(D6).describe("Exclusive word index in the saved caption segment."),region:c({x:s().min(_6).max(j6),y:s().min(E6).max(P6),w:s().gt(L6).max(V6),h:s().gt(A6).max(F6)}),scale:s().min(U6).max(N6).optional(),rotation:s().min(q6).max(B6).optional(),style:c({fontFamily:n().min(1).optional(),fontSize:s().min(1).max(W6).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:x().min(Z6).max(G6).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:l(["glass","solid","none"]).optional(),textTransform:l(["none","uppercase","capitalize"]).optional(),letterSpacing:s().min(H6).max(J6).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:s().min(K6).max(X6).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:s().min(Y6).max(Q6).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisScale:s().gt(eU).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:x().min(tU).max(oU).optional(),emphasisTextTransform:l(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:s().optional(),emphasisFontStyle:l(["normal","italic"]).optional(),emphasisPlate:R().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:s().min(nU).optional(),emphasisPlatePadX:s().optional(),emphasisPlatePadY:s().optional(),emphasisPlateReveal:R().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:s().min(rU).max(iU).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:l(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:s().min(aU).optional(),entranceStaggerMs:s().min(sU).optional(),exitMs:s().min(cU).optional()}).optional(),holdThroughWordIndex:x().min(dU).max(pU).optional().describe("Inclusive saved-word index in this segment. The layout stays visible until that word ends."),wordMarks:h(c({wordIndex:x().min(mU).max(lU),emphasis:R().optional(),annotate:z([l(["circle","underline"]),q()]).optional()})).optional(),wordSignature:n().regex(uU)})).optional(),zPlane:l(["front","behind-subject"]).optional()})]).optional(),license:c({type:n().min(1),source:n().optional(),notes:n().optional()}).optional(),accessibility:c({audioDescriptionTrackId:n().optional(),captionsTrackId:n().optional(),signLanguageTrackId:n().optional(),notes:n().optional()}).optional()}).describe("Canonical composition wire shape (multi-track; carries reframe, captions, markers).");var me=z([q(),R(),s(),n(),h(lt(()=>me)),b(n(),lt(()=>me))]);var fU=64,hU=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),gU=1,xU=0,zU=1,bU=0,SU=1,yU=200,vU=4e3,wU=0,RU=3.141592653589793,IU=64,MU=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),OU=0,$U=1,TU=0,kU=1,CU=0,DU=1,_U=0,jU=1,EU=0,PU=1,LU=2.333,VU=0,AU=1,FU=16,UU=64,NU=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),qU=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),BU=256,WU=new RegExp("^[a-f0-9]{64}$"),ZU=0,GU=9007199254740991,HU=0,JU=9007199254740991,KU=0,XU=9007199254740991,YU=256,QU=0,eN=0,tN=9007199254740991,oN=0,nN=9007199254740991,rN=64,iN=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),aN=1,sN=0,cN=1,dN=0,pN=1,mN=80,lN=2e3,uN=64,fN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),hN=0,gN=1,xN=0,zN=1,bN=0,SN=1,yN=0,vN=1,wN=0,RN=1,IN=2.333,MN=0,ON=1,$N=16,TN=64,kN=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),CN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),DN=256,_N=new RegExp("^[a-f0-9]{64}$"),jN=0,EN=9007199254740991,PN=0,LN=9007199254740991,VN=0,AN=9007199254740991,FN=256,UN=0,NN=0,qN=9007199254740991,BN=0,WN=9007199254740991,ZN=64,GN=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),HN=1,JN=0,KN=1,XN=0,YN=1,QN=40,eq=8e3,tq=40,oq=8e3,nq=32,rq=4,iq=200,aq=32,sq=0,cq=15,dq=0,pq="satin",mq=64,lq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),uq=0,fq=1,hq=0,gq=1,xq=0,zq=1,bq=0,Sq=1,yq=0,vq=1,wq=2.333,Rq=0,Iq=1,Mq=16,Oq=64,$q=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),Tq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),kq=256,Cq=new RegExp("^[a-f0-9]{64}$"),Dq=0,_q=9007199254740991,jq=0,Eq=9007199254740991,Pq=0,Lq=9007199254740991,Vq=256,Aq=0,Fq=0,Uq=9007199254740991,Nq=0,qq=9007199254740991,Bq=64,Wq=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Zq=1,Gq=0,Hq=1,Jq=0,Kq=1,Xq=40,Yq=8e3,Qq=40,eB=8e3,tB="contain",oB="straight",nB=!0,rB="hidden",iB=64,aB=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),sB=0,cB=1,dB=0,pB=1,mB=0,lB=1,uB=0,fB=1,hB=0,gB=1,xB=2.333,zB=0,bB=1,SB=16,yB=64,vB=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),wB=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),RB=256,IB=new RegExp("^[a-f0-9]{64}$"),MB=0,OB=9007199254740991,$B=0,TB=9007199254740991,kB=0,CB=9007199254740991,DB=256,_B=0,jB=0,EB=9007199254740991,PB=0,LB=9007199254740991,VB=64,AB=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),FB=1,UB=0,NB=1,qB=512,BB=new RegExp("^[^\\r\\n]+$"),WB=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),ZB=16,GB=24,HB=128,JB=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),KB=100,XB=900,YB=8,QB=800,eW=1.2,tW=.6,oW=3,nW=0,rW=-20,iW=40,aW="center",sW=0,cW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),dW=1,pW=0,mW=64,lW=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),uW=1,fW=0,hW=1,gW=512,xW=new RegExp("^[^\\r\\n]+$"),zW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),bW=16,SW=24,yW=128,vW=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),wW=100,RW=900,IW=8,MW=800,OW=1.2,$W=.6,TW=3,kW=0,CW=-20,DW=40,_W="center",jW=0,EW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),PW=0,LW=1,VW=0,qg=z([c({kind:m("laptop"),id:n().min(1).max(fU).regex(hU),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(xU).default(gU)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(bU).max(SU).default(zU),width:s().min(yU).max(vU),openAngle:s().min(wU).max(RU),materials:h(c({role:n().min(1).max(IU),type:l(["physical","unlit"]),color:z([n().regex(MU),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(OU).max($U).optional(),metalness:s().min(TU).max(kU).optional(),clearcoat:s().min(CU).max(DU).optional(),clearcoatRoughness:s().min(_U).max(jU).optional(),anisotropy:s().min(EU).max(PU).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(LU).optional(),reflectivity:s().min(VU).max(AU).optional()})).max(FU).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(UU).regex(NU).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(qU),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(BU),sourceVersionId:n().regex(WU)}),captureFrame:x().min(ZU).max(GU),layout:c({width:x().gt(HU).max(JU),height:x().gt(KU).max(XU)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(YU),startFrame:x().min(eN).max(tN).default(QU),endFrame:x().gt(oN).max(nN).optional()})])).optional()}),c({kind:m("phone"),id:n().min(1).max(rN).regex(iN),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(sN).default(aN)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(dN).max(pN).default(cN),width:s().min(mN).max(lN),materials:h(c({role:n().min(1).max(uN),type:l(["physical","unlit"]),color:z([n().regex(fN),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(hN).max(gN).optional(),metalness:s().min(xN).max(zN).optional(),clearcoat:s().min(bN).max(SN).optional(),clearcoatRoughness:s().min(yN).max(vN).optional(),anisotropy:s().min(wN).max(RN).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(IN).optional(),reflectivity:s().min(MN).max(ON).optional()})).max($N).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(TN).regex(kN).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(CN),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(DN),sourceVersionId:n().regex(_N)}),captureFrame:x().min(jN).max(EN),layout:c({width:x().gt(PN).max(LN),height:x().gt(VN).max(AN)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(FN),startFrame:x().min(NN).max(qN).default(UN),endFrame:x().gt(BN).max(WN).optional()})])).optional()}),c({kind:m("slab"),id:n().min(1).max(ZN).regex(GN),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(JN).default(HN)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(XN).max(YN).default(KN),width:s().min(QN).max(eq),height:s().min(tq).max(oq),thickness:s().min(rq).max(iq).default(nq),cornerRadius:s().min(sq).default(aq),edgeRadius:s().min(dq).default(cq),finish:l(["satin","brushed"]).default(pq),materials:h(c({role:n().min(1).max(mq),type:l(["physical","unlit"]),color:z([n().regex(lq),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(uq).max(fq).optional(),metalness:s().min(hq).max(gq).optional(),clearcoat:s().min(xq).max(zq).optional(),clearcoatRoughness:s().min(bq).max(Sq).optional(),anisotropy:s().min(yq).max(vq).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(wq).optional(),reflectivity:s().min(Rq).max(Iq).optional()})).max(Mq).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(Oq).regex($q).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(Tq),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(kq),sourceVersionId:n().regex(Cq)}),captureFrame:x().min(Dq).max(_q),layout:c({width:x().gt(jq).max(Eq),height:x().gt(Pq).max(Lq)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(Vq),startFrame:x().min(Fq).max(Uq).default(Aq),endFrame:x().gt(Nq).max(qq).optional()})])).optional()}),c({kind:m("page"),id:n().min(1).max(Bq).regex(Wq),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(Gq).default(Zq)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(Jq).max(Kq).default(Hq),width:s().min(Xq).max(Yq),height:s().min(Qq).max(eB),fit:l(["contain","cover"]).default(tB),transparency:l(["straight","premultiplied","opaque"]).default(oB),depthWrite:R().default(nB),backface:l(["hidden","visible"]).default(rB),materials:h(c({role:n().min(1).max(iB),type:l(["physical","unlit"]),color:z([n().regex(aB),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(sB).max(cB).optional(),metalness:s().min(dB).max(pB).optional(),clearcoat:s().min(mB).max(lB).optional(),clearcoatRoughness:s().min(uB).max(fB).optional(),anisotropy:s().min(hB).max(gB).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(xB).optional(),reflectivity:s().min(zB).max(bB).optional()})).max(SB).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(yB).regex(vB).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(wB),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(RB),sourceVersionId:n().regex(IB)}),captureFrame:x().min(MB).max(OB),layout:c({width:x().gt($B).max(TB),height:x().gt(kB).max(CB)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(DB),startFrame:x().min(jB).max(EB).default(_B),endFrame:x().gt(PB).max(LB).optional()})]))}),c({id:n().min(1).max(VB).regex(AB),kind:m("text"),opacity:s().min(UB).max(NB).default(FB),lines:h(c({runs:h(c({text:n().min(1).max(qB).regex(BB),color:z([n().regex(WB),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(ZB)})).min(1).max(GB),fontFamily:z([n().min(1).max(HB).regex(JB),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(KB).max(XB),fontStyle:l(["normal","italic"]),fontSize:s().min(YB).max(QB),lineHeight:s().min(tW).max(oW).default(eW),letterSpacing:s().min(rW).max(iW).default(nW),align:l(["left","center","right"]).default(aW),maxWidth:s().gt(sW).optional(),color:z([n().regex(cW),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("world"),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(pW).default(dW)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max(mW).regex(lW),kind:m("text"),opacity:s().min(fW).max(hW).default(uW),lines:h(c({runs:h(c({text:n().min(1).max(gW).regex(xW),color:z([n().regex(zW),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(bW)})).min(1).max(SW),fontFamily:z([n().min(1).max(yW).regex(vW),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(wW).max(RW),fontStyle:l(["normal","italic"]),fontSize:s().min(IW).max(MW),lineHeight:s().min($W).max(TW).default(OW),letterSpacing:s().min(CW).max(DW).default(kW),align:l(["left","center","right"]).default(_W),maxWidth:s().gt(jW).optional(),color:z([n().regex(EW),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("screen"),x:s(),y:s(),rotation:s().default(PW),scale:s().gt(VW).default(LW)})]);var AW=64,FW=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),UW=1,NW=0,qW=1,BW=0,WW=1,ZW=16,GW=64,HW=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),JW=1,KW=0,XW=1,YW=0,QW=1,e5=200,t5=4e3,o5=0,n5=3.141592653589793,r5=64,i5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),a5=0,s5=1,c5=0,d5=1,p5=0,m5=1,l5=0,u5=1,f5=0,h5=1,g5=2.333,x5=0,z5=1,b5=16,S5=64,y5=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),v5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),w5=256,R5=new RegExp("^[a-f0-9]{64}$"),I5=0,M5=9007199254740991,O5=0,$5=9007199254740991,T5=0,k5=9007199254740991,C5=256,D5=0,_5=0,j5=9007199254740991,E5=0,P5=9007199254740991,L5=64,V5=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),A5=1,F5=0,U5=1,N5=0,q5=1,B5=80,W5=2e3,Z5=64,G5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),H5=0,J5=1,K5=0,X5=1,Y5=0,Q5=1,eZ=0,tZ=1,oZ=0,nZ=1,rZ=2.333,iZ=0,aZ=1,sZ=16,cZ=64,dZ=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),pZ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),mZ=256,lZ=new RegExp("^[a-f0-9]{64}$"),uZ=0,fZ=9007199254740991,hZ=0,gZ=9007199254740991,xZ=0,zZ=9007199254740991,bZ=256,SZ=0,yZ=0,vZ=9007199254740991,wZ=0,RZ=9007199254740991,IZ=64,MZ=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),OZ=1,$Z=0,TZ=1,kZ=0,CZ=1,DZ=40,_Z=8e3,jZ=40,EZ=8e3,PZ=32,LZ=4,VZ=200,AZ=32,FZ=0,UZ=15,NZ=0,qZ="satin",BZ=64,WZ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),ZZ=0,GZ=1,HZ=0,JZ=1,KZ=0,XZ=1,YZ=0,QZ=1,eG=0,tG=1,oG=2.333,nG=0,rG=1,iG=16,aG=64,sG=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),cG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),dG=256,pG=new RegExp("^[a-f0-9]{64}$"),mG=0,lG=9007199254740991,uG=0,fG=9007199254740991,hG=0,gG=9007199254740991,xG=256,zG=0,bG=0,SG=9007199254740991,yG=0,vG=9007199254740991,wG=64,RG=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),IG=1,MG=0,OG=1,$G=0,TG=1,kG=40,CG=8e3,DG=40,_G=8e3,jG="contain",EG="straight",PG=!0,LG="hidden",VG=64,AG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),FG=0,UG=1,NG=0,qG=1,BG=0,WG=1,ZG=0,GG=1,HG=0,JG=1,KG=2.333,XG=0,YG=1,QG=16,e3=64,t3=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),o3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),n3=256,r3=new RegExp("^[a-f0-9]{64}$"),i3=0,a3=9007199254740991,s3=0,c3=9007199254740991,d3=0,p3=9007199254740991,m3=256,l3=0,u3=0,f3=9007199254740991,h3=0,g3=9007199254740991,x3=64,z3=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),b3=1,S3=0,y3=1,v3=512,w3=new RegExp("^[^\\r\\n]+$"),R3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),I3=16,M3=24,O3=128,$3=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),T3=100,k3=900,C3=8,D3=800,_3=1.2,j3=.6,E3=3,P3=0,L3=-20,V3=40,A3="center",F3=0,U3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),N3=1,q3=0,B3=64,W3=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Z3=1,G3=0,H3=1,J3=512,K3=new RegExp("^[^\\r\\n]+$"),X3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Y3=16,Q3=24,e7=128,t7=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),o7=100,n7=900,r7=8,i7=800,a7=1.2,s7=.6,c7=3,d7=0,p7=-20,m7=40,l7="center",u7=0,f7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),h7=0,g7=1,x7=0,Bg=z([c({kind:m("group"),id:n().min(1).max(AW).regex(FW),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(NW).default(UW)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(BW).max(WW).default(qW),children:h(qg).min(1).max(ZW)}),c({kind:m("laptop"),id:n().min(1).max(GW).regex(HW),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(KW).default(JW)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(YW).max(QW).default(XW),width:s().min(e5).max(t5),openAngle:s().min(o5).max(n5),materials:h(c({role:n().min(1).max(r5),type:l(["physical","unlit"]),color:z([n().regex(i5),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(a5).max(s5).optional(),metalness:s().min(c5).max(d5).optional(),clearcoat:s().min(p5).max(m5).optional(),clearcoatRoughness:s().min(l5).max(u5).optional(),anisotropy:s().min(f5).max(h5).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(g5).optional(),reflectivity:s().min(x5).max(z5).optional()})).max(b5).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(S5).regex(y5).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(v5),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(w5),sourceVersionId:n().regex(R5)}),captureFrame:x().min(I5).max(M5),layout:c({width:x().gt(O5).max($5),height:x().gt(T5).max(k5)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(C5),startFrame:x().min(_5).max(j5).default(D5),endFrame:x().gt(E5).max(P5).optional()})])).optional()}),c({kind:m("phone"),id:n().min(1).max(L5).regex(V5),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(F5).default(A5)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(N5).max(q5).default(U5),width:s().min(B5).max(W5),materials:h(c({role:n().min(1).max(Z5),type:l(["physical","unlit"]),color:z([n().regex(G5),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(H5).max(J5).optional(),metalness:s().min(K5).max(X5).optional(),clearcoat:s().min(Y5).max(Q5).optional(),clearcoatRoughness:s().min(eZ).max(tZ).optional(),anisotropy:s().min(oZ).max(nZ).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(rZ).optional(),reflectivity:s().min(iZ).max(aZ).optional()})).max(sZ).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(cZ).regex(dZ).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(pZ),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(mZ),sourceVersionId:n().regex(lZ)}),captureFrame:x().min(uZ).max(fZ),layout:c({width:x().gt(hZ).max(gZ),height:x().gt(xZ).max(zZ)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(bZ),startFrame:x().min(yZ).max(vZ).default(SZ),endFrame:x().gt(wZ).max(RZ).optional()})])).optional()}),c({kind:m("slab"),id:n().min(1).max(IZ).regex(MZ),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt($Z).default(OZ)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(kZ).max(CZ).default(TZ),width:s().min(DZ).max(_Z),height:s().min(jZ).max(EZ),thickness:s().min(LZ).max(VZ).default(PZ),cornerRadius:s().min(FZ).default(AZ),edgeRadius:s().min(NZ).default(UZ),finish:l(["satin","brushed"]).default(qZ),materials:h(c({role:n().min(1).max(BZ),type:l(["physical","unlit"]),color:z([n().regex(WZ),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(ZZ).max(GZ).optional(),metalness:s().min(HZ).max(JZ).optional(),clearcoat:s().min(KZ).max(XZ).optional(),clearcoatRoughness:s().min(YZ).max(QZ).optional(),anisotropy:s().min(eG).max(tG).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(oG).optional(),reflectivity:s().min(nG).max(rG).optional()})).max(iG).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(aG).regex(sG).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(cG),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(dG),sourceVersionId:n().regex(pG)}),captureFrame:x().min(mG).max(lG),layout:c({width:x().gt(uG).max(fG),height:x().gt(hG).max(gG)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(xG),startFrame:x().min(bG).max(SG).default(zG),endFrame:x().gt(yG).max(vG).optional()})])).optional()}),c({kind:m("page"),id:n().min(1).max(wG).regex(RG),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(MG).default(IG)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min($G).max(TG).default(OG),width:s().min(kG).max(CG),height:s().min(DG).max(_G),fit:l(["contain","cover"]).default(jG),transparency:l(["straight","premultiplied","opaque"]).default(EG),depthWrite:R().default(PG),backface:l(["hidden","visible"]).default(LG),materials:h(c({role:n().min(1).max(VG),type:l(["physical","unlit"]),color:z([n().regex(AG),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(FG).max(UG).optional(),metalness:s().min(NG).max(qG).optional(),clearcoat:s().min(BG).max(WG).optional(),clearcoatRoughness:s().min(ZG).max(GG).optional(),anisotropy:s().min(HG).max(JG).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(KG).optional(),reflectivity:s().min(XG).max(YG).optional()})).max(QG).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(e3).regex(t3).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(o3),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(n3),sourceVersionId:n().regex(r3)}),captureFrame:x().min(i3).max(a3),layout:c({width:x().gt(s3).max(c3),height:x().gt(d3).max(p3)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(m3),startFrame:x().min(u3).max(f3).default(l3),endFrame:x().gt(h3).max(g3).optional()})]))}),c({id:n().min(1).max(x3).regex(z3),kind:m("text"),opacity:s().min(S3).max(y3).default(b3),lines:h(c({runs:h(c({text:n().min(1).max(v3).regex(w3),color:z([n().regex(R3),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(I3)})).min(1).max(M3),fontFamily:z([n().min(1).max(O3).regex($3),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(T3).max(k3),fontStyle:l(["normal","italic"]),fontSize:s().min(C3).max(D3),lineHeight:s().min(j3).max(E3).default(_3),letterSpacing:s().min(L3).max(V3).default(P3),align:l(["left","center","right"]).default(A3),maxWidth:s().gt(F3).optional(),color:z([n().regex(U3),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("world"),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(q3).default(N3)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max(B3).regex(W3),kind:m("text"),opacity:s().min(G3).max(H3).default(Z3),lines:h(c({runs:h(c({text:n().min(1).max(J3).regex(K3),color:z([n().regex(X3),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(Y3)})).min(1).max(Q3),fontFamily:z([n().min(1).max(e7).regex(t7),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(o7).max(n7),fontStyle:l(["normal","italic"]),fontSize:s().min(r7).max(i7),lineHeight:s().min(s7).max(c7).default(a7),letterSpacing:s().min(p7).max(m7).default(d7),align:l(["left","center","right"]).default(l7),maxWidth:s().gt(u7).optional(),color:z([n().regex(f7),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("screen"),x:s(),y:s(),rotation:s().default(h7),scale:s().gt(x7).default(g7)})]);var z7=64,b7=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),S7=1,y7=0,v7=1,w7=0,R7=1,I7=16,M7=64,O7=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),$7=1,T7=0,k7=1,C7=0,D7=1,_7=200,j7=4e3,E7=0,P7=3.141592653589793,L7=64,V7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),A7=0,F7=1,U7=0,N7=1,q7=0,B7=1,W7=0,Z7=1,G7=0,H7=1,J7=2.333,K7=0,X7=1,Y7=16,Q7=64,eH=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),tH=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),oH=256,nH=new RegExp("^[a-f0-9]{64}$"),rH=0,iH=9007199254740991,aH=0,sH=9007199254740991,cH=0,dH=9007199254740991,pH=256,mH=0,lH=0,uH=9007199254740991,fH=0,hH=9007199254740991,gH=64,xH=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),zH=1,bH=0,SH=1,yH=0,vH=1,wH=80,RH=2e3,IH=64,MH=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),OH=0,$H=1,TH=0,kH=1,CH=0,DH=1,_H=0,jH=1,EH=0,PH=1,LH=2.333,VH=0,AH=1,FH=16,UH=64,NH=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),qH=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),BH=256,WH=new RegExp("^[a-f0-9]{64}$"),ZH=0,GH=9007199254740991,HH=0,JH=9007199254740991,KH=0,XH=9007199254740991,YH=256,QH=0,eJ=0,tJ=9007199254740991,oJ=0,nJ=9007199254740991,rJ=64,iJ=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),aJ=1,sJ=0,cJ=1,dJ=0,pJ=1,mJ=40,lJ=8e3,uJ=40,fJ=8e3,hJ=32,gJ=4,xJ=200,zJ=32,bJ=0,SJ=15,yJ=0,vJ="satin",wJ=64,RJ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),IJ=0,MJ=1,OJ=0,$J=1,TJ=0,kJ=1,CJ=0,DJ=1,_J=0,jJ=1,EJ=2.333,PJ=0,LJ=1,VJ=16,AJ=64,FJ=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),UJ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),NJ=256,qJ=new RegExp("^[a-f0-9]{64}$"),BJ=0,WJ=9007199254740991,ZJ=0,GJ=9007199254740991,HJ=0,JJ=9007199254740991,KJ=256,XJ=0,YJ=0,QJ=9007199254740991,eK=0,tK=9007199254740991,oK=64,nK=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),rK=1,iK=0,aK=1,sK=0,cK=1,dK=40,pK=8e3,mK=40,lK=8e3,uK="contain",fK="straight",hK=!0,gK="hidden",xK=64,zK=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),bK=0,SK=1,yK=0,vK=1,wK=0,RK=1,IK=0,MK=1,OK=0,$K=1,TK=2.333,kK=0,CK=1,DK=16,_K=64,jK=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),EK=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),PK=256,LK=new RegExp("^[a-f0-9]{64}$"),VK=0,AK=9007199254740991,FK=0,UK=9007199254740991,NK=0,qK=9007199254740991,BK=256,WK=0,ZK=0,GK=9007199254740991,HK=0,JK=9007199254740991,KK=64,XK=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),YK=1,QK=0,e8=1,t8=512,o8=new RegExp("^[^\\r\\n]+$"),n8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),r8=16,i8=24,a8=128,s8=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),c8=100,d8=900,p8=8,m8=800,l8=1.2,u8=.6,f8=3,h8=0,g8=-20,x8=40,z8="center",b8=0,S8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),y8=1,v8=0,w8=64,R8=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),I8=1,M8=0,O8=1,$8=512,T8=new RegExp("^[^\\r\\n]+$"),k8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),C8=16,D8=24,_8=128,j8=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),E8=100,P8=900,L8=8,V8=800,A8=1.2,F8=.6,U8=3,N8=0,q8=-20,B8=40,W8="center",Z8=0,G8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),H8=0,J8=1,K8=0,Wg=z([c({kind:m("group"),id:n().min(1).max(z7).regex(b7),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(y7).default(S7)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(w7).max(R7).default(v7),children:h(Bg).min(1).max(I7)}),c({kind:m("laptop"),id:n().min(1).max(M7).regex(O7),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(T7).default($7)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(C7).max(D7).default(k7),width:s().min(_7).max(j7),openAngle:s().min(E7).max(P7),materials:h(c({role:n().min(1).max(L7),type:l(["physical","unlit"]),color:z([n().regex(V7),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(A7).max(F7).optional(),metalness:s().min(U7).max(N7).optional(),clearcoat:s().min(q7).max(B7).optional(),clearcoatRoughness:s().min(W7).max(Z7).optional(),anisotropy:s().min(G7).max(H7).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(J7).optional(),reflectivity:s().min(K7).max(X7).optional()})).max(Y7).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(Q7).regex(eH).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(tH),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(oH),sourceVersionId:n().regex(nH)}),captureFrame:x().min(rH).max(iH),layout:c({width:x().gt(aH).max(sH),height:x().gt(cH).max(dH)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(pH),startFrame:x().min(lH).max(uH).default(mH),endFrame:x().gt(fH).max(hH).optional()})])).optional()}),c({kind:m("phone"),id:n().min(1).max(gH).regex(xH),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(bH).default(zH)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(yH).max(vH).default(SH),width:s().min(wH).max(RH),materials:h(c({role:n().min(1).max(IH),type:l(["physical","unlit"]),color:z([n().regex(MH),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(OH).max($H).optional(),metalness:s().min(TH).max(kH).optional(),clearcoat:s().min(CH).max(DH).optional(),clearcoatRoughness:s().min(_H).max(jH).optional(),anisotropy:s().min(EH).max(PH).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(LH).optional(),reflectivity:s().min(VH).max(AH).optional()})).max(FH).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(UH).regex(NH).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(qH),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(BH),sourceVersionId:n().regex(WH)}),captureFrame:x().min(ZH).max(GH),layout:c({width:x().gt(HH).max(JH),height:x().gt(KH).max(XH)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(YH),startFrame:x().min(eJ).max(tJ).default(QH),endFrame:x().gt(oJ).max(nJ).optional()})])).optional()}),c({kind:m("slab"),id:n().min(1).max(rJ).regex(iJ),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(sJ).default(aJ)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(dJ).max(pJ).default(cJ),width:s().min(mJ).max(lJ),height:s().min(uJ).max(fJ),thickness:s().min(gJ).max(xJ).default(hJ),cornerRadius:s().min(bJ).default(zJ),edgeRadius:s().min(yJ).default(SJ),finish:l(["satin","brushed"]).default(vJ),materials:h(c({role:n().min(1).max(wJ),type:l(["physical","unlit"]),color:z([n().regex(RJ),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(IJ).max(MJ).optional(),metalness:s().min(OJ).max($J).optional(),clearcoat:s().min(TJ).max(kJ).optional(),clearcoatRoughness:s().min(CJ).max(DJ).optional(),anisotropy:s().min(_J).max(jJ).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(EJ).optional(),reflectivity:s().min(PJ).max(LJ).optional()})).max(VJ).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(AJ).regex(FJ).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(UJ),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(NJ),sourceVersionId:n().regex(qJ)}),captureFrame:x().min(BJ).max(WJ),layout:c({width:x().gt(ZJ).max(GJ),height:x().gt(HJ).max(JJ)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(KJ),startFrame:x().min(YJ).max(QJ).default(XJ),endFrame:x().gt(eK).max(tK).optional()})])).optional()}),c({kind:m("page"),id:n().min(1).max(oK).regex(nK),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(iK).default(rK)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(sK).max(cK).default(aK),width:s().min(dK).max(pK),height:s().min(mK).max(lK),fit:l(["contain","cover"]).default(uK),transparency:l(["straight","premultiplied","opaque"]).default(fK),depthWrite:R().default(hK),backface:l(["hidden","visible"]).default(gK),materials:h(c({role:n().min(1).max(xK),type:l(["physical","unlit"]),color:z([n().regex(zK),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(bK).max(SK).optional(),metalness:s().min(yK).max(vK).optional(),clearcoat:s().min(wK).max(RK).optional(),clearcoatRoughness:s().min(IK).max(MK).optional(),anisotropy:s().min(OK).max($K).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(TK).optional(),reflectivity:s().min(kK).max(CK).optional()})).max(DK).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(_K).regex(jK).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(EK),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(PK),sourceVersionId:n().regex(LK)}),captureFrame:x().min(VK).max(AK),layout:c({width:x().gt(FK).max(UK),height:x().gt(NK).max(qK)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(BK),startFrame:x().min(ZK).max(GK).default(WK),endFrame:x().gt(HK).max(JK).optional()})]))}),c({id:n().min(1).max(KK).regex(XK),kind:m("text"),opacity:s().min(QK).max(e8).default(YK),lines:h(c({runs:h(c({text:n().min(1).max(t8).regex(o8),color:z([n().regex(n8),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(r8)})).min(1).max(i8),fontFamily:z([n().min(1).max(a8).regex(s8),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(c8).max(d8),fontStyle:l(["normal","italic"]),fontSize:s().min(p8).max(m8),lineHeight:s().min(u8).max(f8).default(l8),letterSpacing:s().min(g8).max(x8).default(h8),align:l(["left","center","right"]).default(z8),maxWidth:s().gt(b8).optional(),color:z([n().regex(S8),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("world"),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(v8).default(y8)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max(w8).regex(R8),kind:m("text"),opacity:s().min(M8).max(O8).default(I8),lines:h(c({runs:h(c({text:n().min(1).max($8).regex(T8),color:z([n().regex(k8),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(C8)})).min(1).max(D8),fontFamily:z([n().min(1).max(_8).regex(j8),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(E8).max(P8),fontStyle:l(["normal","italic"]),fontSize:s().min(L8).max(V8),lineHeight:s().min(F8).max(U8).default(A8),letterSpacing:s().min(q8).max(B8).default(N8),align:l(["left","center","right"]).default(W8),maxWidth:s().gt(Z8).optional(),color:z([n().regex(G8),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("screen"),x:s(),y:s(),rotation:s().default(H8),scale:s().gt(K8).default(J8)})]);var X8=64,Y8=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Q8=1,eX=0,tX=1,oX=0,nX=1,rX=16,iX=64,aX=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),sX=1,cX=0,dX=1,pX=0,mX=1,lX=200,uX=4e3,fX=0,hX=3.141592653589793,gX=64,xX=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),zX=0,bX=1,SX=0,yX=1,vX=0,wX=1,RX=0,IX=1,MX=0,OX=1,$X=2.333,TX=0,kX=1,CX=16,DX=64,_X=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),jX=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),EX=256,PX=new RegExp("^[a-f0-9]{64}$"),LX=0,VX=9007199254740991,AX=0,FX=9007199254740991,UX=0,NX=9007199254740991,qX=256,BX=0,WX=0,ZX=9007199254740991,GX=0,HX=9007199254740991,JX=64,KX=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),XX=1,YX=0,QX=1,eY=0,tY=1,oY=80,nY=2e3,rY=64,iY=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),aY=0,sY=1,cY=0,dY=1,pY=0,mY=1,lY=0,uY=1,fY=0,hY=1,gY=2.333,xY=0,zY=1,bY=16,SY=64,yY=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),vY=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),wY=256,RY=new RegExp("^[a-f0-9]{64}$"),IY=0,MY=9007199254740991,OY=0,$Y=9007199254740991,TY=0,kY=9007199254740991,CY=256,DY=0,_Y=0,jY=9007199254740991,EY=0,PY=9007199254740991,LY=64,VY=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),AY=1,FY=0,UY=1,NY=0,qY=1,BY=40,WY=8e3,ZY=40,GY=8e3,HY=32,JY=4,KY=200,XY=32,YY=0,QY=15,eQ=0,tQ="satin",oQ=64,nQ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),rQ=0,iQ=1,aQ=0,sQ=1,cQ=0,dQ=1,pQ=0,mQ=1,lQ=0,uQ=1,fQ=2.333,hQ=0,gQ=1,xQ=16,zQ=64,bQ=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),SQ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),yQ=256,vQ=new RegExp("^[a-f0-9]{64}$"),wQ=0,RQ=9007199254740991,IQ=0,MQ=9007199254740991,OQ=0,$Q=9007199254740991,TQ=256,kQ=0,CQ=0,DQ=9007199254740991,_Q=0,jQ=9007199254740991,EQ=64,PQ=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),LQ=1,VQ=0,AQ=1,FQ=0,UQ=1,NQ=40,qQ=8e3,BQ=40,WQ=8e3,ZQ="contain",GQ="straight",HQ=!0,JQ="hidden",KQ=64,XQ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),YQ=0,QQ=1,eee=0,tee=1,oee=0,nee=1,ree=0,iee=1,aee=0,see=1,cee=2.333,dee=0,pee=1,mee=16,lee=64,uee=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),fee=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),hee=256,gee=new RegExp("^[a-f0-9]{64}$"),xee=0,zee=9007199254740991,bee=0,See=9007199254740991,yee=0,vee=9007199254740991,wee=256,Ree=0,Iee=0,Mee=9007199254740991,Oee=0,$ee=9007199254740991,Tee=64,kee=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Cee=1,Dee=0,_ee=1,jee=512,Eee=new RegExp("^[^\\r\\n]+$"),Pee=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Lee=16,Vee=24,Aee=128,Fee=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),Uee=100,Nee=900,qee=8,Bee=800,Wee=1.2,Zee=.6,Gee=3,Hee=0,Jee=-20,Kee=40,Xee="center",Yee=0,Qee=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),ete=1,tte=0,ote=64,nte=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),rte=1,ite=0,ate=1,ste=512,cte=new RegExp("^[^\\r\\n]+$"),dte=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),pte=16,mte=24,lte=128,ute=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),fte=100,hte=900,gte=8,xte=800,zte=1.2,bte=.6,Ste=3,yte=0,vte=-20,wte=40,Rte="center",Ite=0,Mte=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Ote=0,$te=1,Tte=0,Zg=z([c({kind:m("group"),id:n().min(1).max(X8).regex(Y8),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(eX).default(Q8)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(oX).max(nX).default(tX),children:h(Wg).min(1).max(rX)}),c({kind:m("laptop"),id:n().min(1).max(iX).regex(aX),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(cX).default(sX)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(pX).max(mX).default(dX),width:s().min(lX).max(uX),openAngle:s().min(fX).max(hX),materials:h(c({role:n().min(1).max(gX),type:l(["physical","unlit"]),color:z([n().regex(xX),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(zX).max(bX).optional(),metalness:s().min(SX).max(yX).optional(),clearcoat:s().min(vX).max(wX).optional(),clearcoatRoughness:s().min(RX).max(IX).optional(),anisotropy:s().min(MX).max(OX).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max($X).optional(),reflectivity:s().min(TX).max(kX).optional()})).max(CX).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(DX).regex(_X).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(jX),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(EX),sourceVersionId:n().regex(PX)}),captureFrame:x().min(LX).max(VX),layout:c({width:x().gt(AX).max(FX),height:x().gt(UX).max(NX)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(qX),startFrame:x().min(WX).max(ZX).default(BX),endFrame:x().gt(GX).max(HX).optional()})])).optional()}),c({kind:m("phone"),id:n().min(1).max(JX).regex(KX),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(YX).default(XX)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(eY).max(tY).default(QX),width:s().min(oY).max(nY),materials:h(c({role:n().min(1).max(rY),type:l(["physical","unlit"]),color:z([n().regex(iY),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(aY).max(sY).optional(),metalness:s().min(cY).max(dY).optional(),clearcoat:s().min(pY).max(mY).optional(),clearcoatRoughness:s().min(lY).max(uY).optional(),anisotropy:s().min(fY).max(hY).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(gY).optional(),reflectivity:s().min(xY).max(zY).optional()})).max(bY).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(SY).regex(yY).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(vY),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(wY),sourceVersionId:n().regex(RY)}),captureFrame:x().min(IY).max(MY),layout:c({width:x().gt(OY).max($Y),height:x().gt(TY).max(kY)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(CY),startFrame:x().min(_Y).max(jY).default(DY),endFrame:x().gt(EY).max(PY).optional()})])).optional()}),c({kind:m("slab"),id:n().min(1).max(LY).regex(VY),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(FY).default(AY)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(NY).max(qY).default(UY),width:s().min(BY).max(WY),height:s().min(ZY).max(GY),thickness:s().min(JY).max(KY).default(HY),cornerRadius:s().min(YY).default(XY),edgeRadius:s().min(eQ).default(QY),finish:l(["satin","brushed"]).default(tQ),materials:h(c({role:n().min(1).max(oQ),type:l(["physical","unlit"]),color:z([n().regex(nQ),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(rQ).max(iQ).optional(),metalness:s().min(aQ).max(sQ).optional(),clearcoat:s().min(cQ).max(dQ).optional(),clearcoatRoughness:s().min(pQ).max(mQ).optional(),anisotropy:s().min(lQ).max(uQ).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(fQ).optional(),reflectivity:s().min(hQ).max(gQ).optional()})).max(xQ).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(zQ).regex(bQ).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(SQ),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(yQ),sourceVersionId:n().regex(vQ)}),captureFrame:x().min(wQ).max(RQ),layout:c({width:x().gt(IQ).max(MQ),height:x().gt(OQ).max($Q)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(TQ),startFrame:x().min(CQ).max(DQ).default(kQ),endFrame:x().gt(_Q).max(jQ).optional()})])).optional()}),c({kind:m("page"),id:n().min(1).max(EQ).regex(PQ),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(VQ).default(LQ)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(FQ).max(UQ).default(AQ),width:s().min(NQ).max(qQ),height:s().min(BQ).max(WQ),fit:l(["contain","cover"]).default(ZQ),transparency:l(["straight","premultiplied","opaque"]).default(GQ),depthWrite:R().default(HQ),backface:l(["hidden","visible"]).default(JQ),materials:h(c({role:n().min(1).max(KQ),type:l(["physical","unlit"]),color:z([n().regex(XQ),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(YQ).max(QQ).optional(),metalness:s().min(eee).max(tee).optional(),clearcoat:s().min(oee).max(nee).optional(),clearcoatRoughness:s().min(ree).max(iee).optional(),anisotropy:s().min(aee).max(see).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(cee).optional(),reflectivity:s().min(dee).max(pee).optional()})).max(mee).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(lee).regex(uee).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(fee),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(hee),sourceVersionId:n().regex(gee)}),captureFrame:x().min(xee).max(zee),layout:c({width:x().gt(bee).max(See),height:x().gt(yee).max(vee)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(wee),startFrame:x().min(Iee).max(Mee).default(Ree),endFrame:x().gt(Oee).max($ee).optional()})]))}),c({id:n().min(1).max(Tee).regex(kee),kind:m("text"),opacity:s().min(Dee).max(_ee).default(Cee),lines:h(c({runs:h(c({text:n().min(1).max(jee).regex(Eee),color:z([n().regex(Pee),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(Lee)})).min(1).max(Vee),fontFamily:z([n().min(1).max(Aee).regex(Fee),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(Uee).max(Nee),fontStyle:l(["normal","italic"]),fontSize:s().min(qee).max(Bee),lineHeight:s().min(Zee).max(Gee).default(Wee),letterSpacing:s().min(Jee).max(Kee).default(Hee),align:l(["left","center","right"]).default(Xee),maxWidth:s().gt(Yee).optional(),color:z([n().regex(Qee),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("world"),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(tte).default(ete)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max(ote).regex(nte),kind:m("text"),opacity:s().min(ite).max(ate).default(rte),lines:h(c({runs:h(c({text:n().min(1).max(ste).regex(cte),color:z([n().regex(dte),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(pte)})).min(1).max(mte),fontFamily:z([n().min(1).max(lte).regex(ute),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(fte).max(hte),fontStyle:l(["normal","italic"]),fontSize:s().min(gte).max(xte),lineHeight:s().min(bte).max(Ste).default(zte),letterSpacing:s().min(vte).max(wte).default(yte),align:l(["left","center","right"]).default(Rte),maxWidth:s().gt(Ite).optional(),color:z([n().regex(Mte),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("screen"),x:s(),y:s(),rotation:s().default(Ote),scale:s().gt(Tte).default($te)})]);var kte=64,Cte=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Dte=1,_te=0,jte=1,Ete=0,Pte=1,Lte=16,Vte=64,Ate=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Fte=1,Ute=0,Nte=1,qte=0,Bte=1,Wte=200,Zte=4e3,Gte=0,Hte=3.141592653589793,Jte=64,Kte=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Xte=0,Yte=1,Qte=0,eoe=1,toe=0,ooe=1,noe=0,roe=1,ioe=0,aoe=1,soe=2.333,coe=0,doe=1,poe=16,moe=64,loe=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),uoe=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),foe=256,hoe=new RegExp("^[a-f0-9]{64}$"),goe=0,xoe=9007199254740991,zoe=0,boe=9007199254740991,Soe=0,yoe=9007199254740991,voe=256,woe=0,Roe=0,Ioe=9007199254740991,Moe=0,Ooe=9007199254740991,$oe=64,Toe=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),koe=1,Coe=0,Doe=1,_oe=0,joe=1,Eoe=80,Poe=2e3,Loe=64,Voe=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Aoe=0,Foe=1,Uoe=0,Noe=1,qoe=0,Boe=1,Woe=0,Zoe=1,Goe=0,Hoe=1,Joe=2.333,Koe=0,Xoe=1,Yoe=16,Qoe=64,ene=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),tne=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),one=256,nne=new RegExp("^[a-f0-9]{64}$"),rne=0,ine=9007199254740991,ane=0,sne=9007199254740991,cne=0,dne=9007199254740991,pne=256,mne=0,lne=0,une=9007199254740991,fne=0,hne=9007199254740991,gne=64,xne=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),zne=1,bne=0,Sne=1,yne=0,vne=1,wne=40,Rne=8e3,Ine=40,Mne=8e3,One=32,$ne=4,Tne=200,kne=32,Cne=0,Dne=15,_ne=0,jne="satin",Ene=64,Pne=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Lne=0,Vne=1,Ane=0,Fne=1,Une=0,Nne=1,qne=0,Bne=1,Wne=0,Zne=1,Gne=2.333,Hne=0,Jne=1,Kne=16,Xne=64,Yne=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),Qne=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),ere=256,tre=new RegExp("^[a-f0-9]{64}$"),ore=0,nre=9007199254740991,rre=0,ire=9007199254740991,are=0,sre=9007199254740991,cre=256,dre=0,pre=0,mre=9007199254740991,lre=0,ure=9007199254740991,fre=64,hre=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),gre=1,xre=0,zre=1,bre=0,Sre=1,yre=40,vre=8e3,wre=40,Rre=8e3,Ire="contain",Mre="straight",Ore=!0,$re="hidden",Tre=64,kre=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Cre=0,Dre=1,_re=0,jre=1,Ere=0,Pre=1,Lre=0,Vre=1,Are=0,Fre=1,Ure=2.333,Nre=0,qre=1,Bre=16,Wre=64,Zre=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),Gre=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Hre=256,Jre=new RegExp("^[a-f0-9]{64}$"),Kre=0,Xre=9007199254740991,Yre=0,Qre=9007199254740991,eie=0,tie=9007199254740991,oie=256,nie=0,rie=0,iie=9007199254740991,aie=0,sie=9007199254740991,cie=64,die=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),pie=1,mie=0,lie=1,uie=512,fie=new RegExp("^[^\\r\\n]+$"),hie=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),gie=16,xie=24,zie=128,bie=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),Sie=100,yie=900,vie=8,wie=800,Rie=1.2,Iie=.6,Mie=3,Oie=0,$ie=-20,Tie=40,kie="center",Cie=0,Die=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),_ie=1,jie=0,Eie=64,Pie=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Lie=1,Vie=0,Aie=1,Fie=512,Uie=new RegExp("^[^\\r\\n]+$"),Nie=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),qie=16,Bie=24,Wie=128,Zie=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),Gie=100,Hie=900,Jie=8,Kie=800,Xie=1.2,Yie=.6,Qie=3,eae=0,tae=-20,oae=40,nae="center",rae=0,iae=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),aae=0,sae=1,cae=0,Gg=z([c({kind:m("group"),id:n().min(1).max(kte).regex(Cte),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(_te).default(Dte)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(Ete).max(Pte).default(jte),children:h(Zg).min(1).max(Lte)}),c({kind:m("laptop"),id:n().min(1).max(Vte).regex(Ate),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(Ute).default(Fte)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(qte).max(Bte).default(Nte),width:s().min(Wte).max(Zte),openAngle:s().min(Gte).max(Hte),materials:h(c({role:n().min(1).max(Jte),type:l(["physical","unlit"]),color:z([n().regex(Kte),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(Xte).max(Yte).optional(),metalness:s().min(Qte).max(eoe).optional(),clearcoat:s().min(toe).max(ooe).optional(),clearcoatRoughness:s().min(noe).max(roe).optional(),anisotropy:s().min(ioe).max(aoe).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(soe).optional(),reflectivity:s().min(coe).max(doe).optional()})).max(poe).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(moe).regex(loe).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(uoe),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(foe),sourceVersionId:n().regex(hoe)}),captureFrame:x().min(goe).max(xoe),layout:c({width:x().gt(zoe).max(boe),height:x().gt(Soe).max(yoe)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(voe),startFrame:x().min(Roe).max(Ioe).default(woe),endFrame:x().gt(Moe).max(Ooe).optional()})])).optional()}),c({kind:m("phone"),id:n().min(1).max($oe).regex(Toe),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(Coe).default(koe)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(_oe).max(joe).default(Doe),width:s().min(Eoe).max(Poe),materials:h(c({role:n().min(1).max(Loe),type:l(["physical","unlit"]),color:z([n().regex(Voe),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(Aoe).max(Foe).optional(),metalness:s().min(Uoe).max(Noe).optional(),clearcoat:s().min(qoe).max(Boe).optional(),clearcoatRoughness:s().min(Woe).max(Zoe).optional(),anisotropy:s().min(Goe).max(Hoe).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(Joe).optional(),reflectivity:s().min(Koe).max(Xoe).optional()})).max(Yoe).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(Qoe).regex(ene).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(tne),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(one),sourceVersionId:n().regex(nne)}),captureFrame:x().min(rne).max(ine),layout:c({width:x().gt(ane).max(sne),height:x().gt(cne).max(dne)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(pne),startFrame:x().min(lne).max(une).default(mne),endFrame:x().gt(fne).max(hne).optional()})])).optional()}),c({kind:m("slab"),id:n().min(1).max(gne).regex(xne),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(bne).default(zne)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(yne).max(vne).default(Sne),width:s().min(wne).max(Rne),height:s().min(Ine).max(Mne),thickness:s().min($ne).max(Tne).default(One),cornerRadius:s().min(Cne).default(kne),edgeRadius:s().min(_ne).default(Dne),finish:l(["satin","brushed"]).default(jne),materials:h(c({role:n().min(1).max(Ene),type:l(["physical","unlit"]),color:z([n().regex(Pne),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(Lne).max(Vne).optional(),metalness:s().min(Ane).max(Fne).optional(),clearcoat:s().min(Une).max(Nne).optional(),clearcoatRoughness:s().min(qne).max(Bne).optional(),anisotropy:s().min(Wne).max(Zne).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(Gne).optional(),reflectivity:s().min(Hne).max(Jne).optional()})).max(Kne).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(Xne).regex(Yne).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(Qne),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(ere),sourceVersionId:n().regex(tre)}),captureFrame:x().min(ore).max(nre),layout:c({width:x().gt(rre).max(ire),height:x().gt(are).max(sre)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(cre),startFrame:x().min(pre).max(mre).default(dre),endFrame:x().gt(lre).max(ure).optional()})])).optional()}),c({kind:m("page"),id:n().min(1).max(fre).regex(hre),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(xre).default(gre)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:s().min(bre).max(Sre).default(zre),width:s().min(yre).max(vre),height:s().min(wre).max(Rre),fit:l(["contain","cover"]).default(Ire),transparency:l(["straight","premultiplied","opaque"]).default(Mre),depthWrite:R().default(Ore),backface:l(["hidden","visible"]).default($re),materials:h(c({role:n().min(1).max(Tre),type:l(["physical","unlit"]),color:z([n().regex(kre),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:s().min(Cre).max(Dre).optional(),metalness:s().min(_re).max(jre).optional(),clearcoat:s().min(Ere).max(Pre).optional(),clearcoatRoughness:s().min(Lre).max(Vre).optional(),anisotropy:s().min(Are).max(Fre).optional(),anisotropyRotation:s().optional(),ior:s().min(1).max(Ure).optional(),reflectivity:s().min(Nre).max(qre).optional()})).max(Bre).optional(),surfaces:b(n(),z([c({source:m("image"),assetSlot:n().min(1).max(Wre).regex(Zre).describe("Image asset slot name bound by the clip assets map; never a URL.")}),c({source:m("color"),color:z([n().regex(Gre),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({source:m("component"),component:c({version:m(1),componentId:n().min(1).max(Hre),sourceVersionId:n().regex(Jre)}),captureFrame:x().min(Kre).max(Xre),layout:c({width:x().gt(Yre).max(Qre),height:x().gt(eie).max(tie)}),bakeScale:z([m(2),m(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:b(n(),me).optional()}),c({source:m("video"),mediaId:n().min(1).max(oie),startFrame:x().min(rie).max(iie).default(nie),endFrame:x().gt(aie).max(sie).optional()})]))}),c({id:n().min(1).max(cie).regex(die),kind:m("text"),opacity:s().min(mie).max(lie).default(pie),lines:h(c({runs:h(c({text:n().min(1).max(uie).regex(fie),color:z([n().regex(hie),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(gie)})).min(1).max(xie),fontFamily:z([n().min(1).max(zie).regex(bie),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(Sie).max(yie),fontStyle:l(["normal","italic"]),fontSize:s().min(vie).max(wie),lineHeight:s().min(Iie).max(Mie).default(Rie),letterSpacing:s().min($ie).max(Tie).default(Oie),align:l(["left","center","right"]).default(kie),maxWidth:s().gt(Cie).optional(),color:z([n().regex(Die),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("world"),transform:c({position:A([s(),s(),s()]).default([0,0,0]),rotation:A([s(),s(),s()]).default([0,0,0]),scale:s().gt(jie).default(_ie)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),c({id:n().min(1).max(Eie).regex(Pie),kind:m("text"),opacity:s().min(Vie).max(Aie).default(Lie),lines:h(c({runs:h(c({text:n().min(1).max(Fie).regex(Uie),color:z([n().regex(Nie),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(qie)})).min(1).max(Bie),fontFamily:z([n().min(1).max(Wie).regex(Zie),l(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:x().min(Gie).max(Hie),fontStyle:l(["normal","italic"]),fontSize:s().min(Jie).max(Kie),lineHeight:s().min(Yie).max(Qie).default(Xie),letterSpacing:s().min(tae).max(oae).default(eae),align:l(["left","center","right"]).default(nae),maxWidth:s().gt(rae).optional(),color:z([n().regex(iae),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:m("screen"),x:s(),y:s(),rotation:s().default(aae),scale:s().gt(cae).default(sae)})]);var dae=16,pae=8192,mae=16,lae=8192,uae=.3141592653589793,fae=1.3962634015954636,hae="studio",gae="soft",xae=1,zae=0,bae=-420,Sae=.5,yae=0,vae=1,wae={lightingProfile:"studio",preset:"soft",intensity:1,floorY:-420,shadowOpacity:.5},Rae=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Iae=0,Mae=0,Oae=1,$ae=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Tae=2,kae=8,Cae=0,Dae=1,_ae=0,jae=1,Eae=0,Pae=1,Lae=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Vae=2,Aae=8,Fae={kind:"transparent"},Uae=64,Nae=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),qae=0,Bae=1,Wae=0,Zae=1,Gae=-4,Hae=5,Jae=0,Kae=1,Xae=-4,Yae=5,Qae=256,ese=[],tse=0,ose=0,nse=.5,rse=0,ise=0,ase=1,sse=0,cse=0,dse=0,pse=64,mse=null,lse={grain:0,vignette:0,focus:null},use=64,fse=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),hse=2,gse=0,xse=[],Ym=c({version:m(2),referenceSize:c({width:x().min(dae).max(pae),height:x().min(mae).max(lae)}),camera:c({position:A([s(),s(),s()]).optional(),rotation:A([s(),s(),s()]).optional(),fov:s().min(uae).max(fae).optional()}).optional(),environment:z([c({kind:m("studio").optional(),lightingProfile:l(["studio","studio-edge"]).default(hae),preset:l(["soft","key","rim"]).default(gae),intensity:s().min(zae).default(xae),floorY:s().default(bae),shadowOpacity:s().min(yae).max(vae).default(Sae)}),c({kind:m("photographic-studio-v1")})]).default(wae),backdrop:z([c({kind:m("transparent")}),c({kind:m("solid"),color:z([n().regex(Rae),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),c({kind:m("linear"),angle:s().default(Iae),stops:h(c({at:s().min(Mae).max(Oae),color:z([n().regex($ae),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])})).min(Tae).max(kae)}),c({kind:m("radial"),at:A([s().min(Cae).max(Dae),s().min(_ae).max(jae)]).default([.5,.5]),stops:h(c({at:s().min(Eae).max(Pae),color:z([n().regex(Lae),l(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])})).min(Vae).max(Aae)})]).default(Fae),layers:h(Gg).min(1),animation:h(c({target:z([c({kind:m("camera")}),c({kind:m("layer"),layerId:n().min(1).max(Uae).regex(Nae)}),c({kind:m("environment")}),c({kind:m("focus")})]),property:l(["positionX","positionY","positionZ","rotationX","rotationY","rotationZ","fov","scale","opacity","openAngle","x","y","rotation","intensity","distance","range","maxBlur"]),keyframes:h(c({at:s().min(qae).max(Bae),value:s(),easing:z([c({kind:m("linear")}),c({kind:m("hold")}),c({kind:m("bezier"),x1:s().min(Wae).max(Zae),y1:s().min(Gae).max(Hae),x2:s().min(Jae).max(Kae),y2:s().min(Xae).max(Yae)})]).optional()})).min(1).max(Qae)})).default(ese),post:c({grain:s().min(ose).max(nse).default(tse),vignette:s().min(ise).max(ase).default(rse),focus:z([c({distance:s().gt(sse),range:s().gt(cse),maxBlur:s().min(dse).max(pse)}),q()]).default(mse)}).default(lse),constraints:h(c({kind:m("minSeparation"),objects:h(n().min(1).max(use).regex(fse)).min(hse),gap:s().gt(gse)})).default(xse)}).describe("A version-2 scene shot: a self-contained 3D world-object shot that scene.add / scene.update materializes into an ordinary component clip. The shot owns its layers, camera, lighting, backdrop and normalized local animation; the composition owns start, duration, ordering, cuts and transitions. Coordinates are REFERENCE PIXELS: origin at frame centre, +X right, +Y down, +Z toward the viewer. referenceSize must have the SAME aspect ratio as the composition format; mismatch fails instead of cropping. At equal aspect ratio the shot scales uniformly by outputWidth/referenceWidth. A segment's easing belongs to the keyframe it ARRIVES at; the first keyframe has no easing. Authoring limits: 32 layers, 4 devices, 16 distinct image slots, 256 keyframes per channel, 2048 keyframes per shot. Version 2 supports nested groups, procedural slab/page/phone/laptop objects, screen- and world-space text, admitted image/component/video surfaces, fixed photographic and generated studio environments, transparent/solid/linear/radial backdrops, constraints, focus, grain and vignette. Raw HTML, custom shader props, imported GLB models, arbitrary external HDR environments, skeletal animation and physics are refused with an exact field path.");var zse=0,Qm=c({type:l(["cut","fade","dissolve","wipe"]),duration:s().min(zse).optional()}).describe("Inter-scene transition.");var bse=0,Sse=0,yse=0,vse=0,wse=0,Rse=0,Ise=0,Mse=0,Ose=0,$se=0,Tse=0,kse=4,Cse=0,Dse=0,_se=0,jse=0,Ese=0,Pse=0,Lse=0,Vse=0,Ase=0,Fse=1,Use=0,Nse=1,qse=.1,Bse=1,Wse=0,Zse=0,Gse=-.3,Hse=.3,Jse=-.3,Kse=.3,Xse=0,Yse=0,Qse=0,ece=16,tce=0,oce=256,nce=new RegExp("^[a-f0-9]{64}$"),rce=256,ice=128,ace=256,sce=0,cce=1,dce=0,pce=1,mce=-.3,lce=.3,uce=256,fce=new RegExp("^[a-f0-9]{64}$"),hce=256,gce=128,xce=0,zce=9007199254740991,bce=0,Sce=1,yce=0,vce=-1,wce=2,Rce=-1,Ice=2,Mce=0,Oce=1,$ce=0,Tce=1,kce=0,Cce=1,Dce=0,_ce=1,jce=256,Ece=new RegExp("^[a-f0-9]{64}$"),Pce=256,Lce=128,Vce=0,Ace=0,Fce=0,Uce=256,Nce=new RegExp("^[a-f0-9]{64}$"),qce=256,Bce=128,Wce=0,Zce=2,Gce=0,Hce=0,Jce=0,Kce=0,Xce=0,Yce=0,Qce=0,ede=4,tde=0,ode=0,nde=0,rde=0,ide=0,ade=0,sde=0,cde=0,dde=0,pde=1,mde=0,lde=1,ude=.1,fde=1,hde=0,gde=0,xde=-.3,zde=.3,bde=-.3,Sde=.3,yde=0,vde=0,wde=0,Rde=16,Ide=0,Mde=256,Ode=new RegExp("^[a-f0-9]{64}$"),$de=256,Tde=128,kde=256,Cde=0,Dde=1,_de=0,jde=1,Ede=-.3,Pde=.3,Lde=256,Vde=new RegExp("^[a-f0-9]{64}$"),Ade=256,Fde=128,Ude=0,Nde=9007199254740991,qde=0,Bde=1,Wde=0,Zde=-1,Gde=2,Hde=-1,Jde=2,Kde=0,Xde=1,Yde=0,Qde=1,epe=0,tpe=1,ope=0,npe=1,rpe=256,ipe=new RegExp("^[a-f0-9]{64}$"),ape=256,spe=128,cpe=0,dpe=0,ppe=0,mpe=256,lpe=new RegExp("^[a-f0-9]{64}$"),upe=256,fpe=128,hpe=0,gpe=2,xpe=0,zpe=0,bpe=0,Spe=0,ype=0,vpe=0,wpe=0,Rpe=4,Ipe=0,Mpe=0,Ope=0,$pe=0,Tpe=0,kpe=0,Cpe=0,Dpe=0,_pe=0,jpe=1,Epe=0,Ppe=1,Lpe=.1,Vpe=1,Ape=0,Fpe=0,Upe=-.3,Npe=.3,qpe=-.3,Bpe=.3,Wpe=0,Zpe=0,Gpe=0,Hpe=16,Jpe=0,Kpe=256,Xpe=new RegExp("^[a-f0-9]{64}$"),Ype=256,Qpe=128,eme=256,tme=0,ome=1,nme=0,rme=1,ime=-.3,ame=.3,sme=256,cme=new RegExp("^[a-f0-9]{64}$"),dme=256,pme=128,mme=0,lme=9007199254740991,ume=0,fme=1,hme=0,gme=-1,xme=2,zme=-1,bme=2,Sme=0,yme=1,vme=0,wme=1,Rme=0,Ime=1,Mme=0,Ome=1,$me=256,Tme=new RegExp("^[a-f0-9]{64}$"),kme=256,Cme=128,Dme=0,_me=0,jme=0,Eme=256,Pme=new RegExp("^[a-f0-9]{64}$"),Lme=256,Vme=128,Ame=0,Fme=2,Ume=0,Nme=0,qme=0,Bme=0,Wme=0,Zme=0,Gme=0,Hme=1,Jme=0,Kme=1,Xme=.1,Yme=1,Qme=0,ele=0,tle=-.3,ole=.3,nle=-.3,rle=.3,ile=256,ale=new RegExp("^[a-f0-9]{64}$"),sle=256,cle=128,dle=0,ple=0,mle=15,lle=100,ule=900,fle=0,hle=1,gle=0,xle=1,zle=0,ble=1,Sle=0,yle=1,vle=-5,wle=20,Rle=0,Ile=2,Mle=0,Ole=2,$le=0,Tle=100,kle=900,Cle=0,Dle=0,_le=0,jle=0,Ele=.5,Ple=12,Lle=0,Vle=100,Ale=0,Fle=9007199254740991,Ule=0,Nle=9007199254740991,qle=0,Ble=9007199254740991,Wle=0,Zle=1,Gle=0,Hle=1,Jle=0,Kle=1,Xle=0,Yle=1,Qle=.25,eue=4,tue=-45,oue=45,nue=15,rue=100,iue=900,aue=-5,sue=20,cue=0,due=2,pue=0,mue=2,lue=0,uue=100,fue=900,hue=0,gue=.5,xue=12,zue=0,bue=0,Sue=0,yue=0,vue=9007199254740991,wue=0,Rue=9007199254740991,Iue=0,Mue=0,Oue=15,$ue=100,Tue=900,kue=0,Cue=1,Due=0,_ue=1,jue=0,Eue=1,Pue=0,Lue=1,Vue=-5,Aue=20,Fue=0,Uue=2,Nue=0,que=2,Bue=0,Wue=100,Zue=900,Gue=0,Hue=0,Jue=0,Kue=0,Xue=.5,Yue=12,Que=0,efe=100,tfe=0,ofe=0,nfe=0,rfe=2e3,ife=new RegExp("^[a-f0-9]{64}$"),afe=new RegExp("^[a-f0-9]{64}$"),sfe=256,cfe=new RegExp("^[a-f0-9]{64}$"),dfe=256,pfe=128,mfe=256,lfe=new RegExp("^[a-f0-9]{64}$"),ufe=256,ffe=128,hfe=512,el=z([c({type:m("scene.add"),clipId:n(),trackId:n().optional(),newTrack:R().optional(),newTrackId:n().optional(),startTime:s().min(bse),duration:s().gt(Sse),scene:Ym,assets:b(n(),n()),transitionIn:Qm.optional()}).describe('Author a scene shot and place it on a dedicated overlay track. The host validates the scene, generates and registers an immutable wrapper component source, and emits the ordinary track/clip operations carrying `props.componentRef` \u2014 you edit a scene SPEC, never wrapper TSX or a source hash. Registration and the composition update are ONE undoable edit; a failure publishes nothing and leaves no clip pointing at an unresolved source. Pass EXACTLY ONE of `trackId` (an existing dedicated scene track) or `newTrack: true` (mint one). That track holds scene-shot clips and gaps only \u2014 no generic component/primitive/media clips in v1 \u2014 and existing generic overlay tracks are unaffected. Scene clips use front zPlane and full-frame placement: outer per-clip `region`, `position`, `scale`, `rotation`, `fit`, `effects`, `animate`, `params.transition`, `params.sequenceGroup` and internal fadeIn/fadeOut are REFUSED with a path, because the shot\'s own layer transforms are the single transform owner. TEXT: `space: "screen"` text is composed above the world result, stays fixed in the frame and stays sharp through focus; `space: "world"` text is rasterized into the 3D scene, moves with the camera and is occluded by geometry. Screenshots and world text are UNLIT and colour-managed so product UI colours are not tinted by the studio lighting, while device bodies are lit and cast shadows; an unlit surface still occludes. SCOPE GAP (pre-existing, neither closed nor changed by scene shots): global wrap effects \u2014 composition-level grades and camera effects \u2014 do not reach front-overlay clips, so they do not affect a scene shot. Author the look INSIDE the shot (`post.grain`, `post.vignette`, `post.focus`, `backdrop`, `environment`) instead. DISCOVERY: there is no built-in scene primitive to look up in list_catalog; the wrapper this operation registers appears afterwards as an ordinary INSTALLED component under the existing catalog rules. ASSETS: `assets` binds each slot name a layer references to a media id in the same project, and the slot\'s declared KIND decides what it admits \u2014 an image slot takes PNG, JPEG or WebP, a video slot MP4 or WebM. Binding the wrong kind is refused with the slot\'s path.'),c({type:m("scene.update"),clipId:n(),startTime:s().min(yse).optional(),duration:s().gt(vse).optional(),scene:Ym.optional(),assets:b(n(),n()).optional(),transitionIn:Qm.optional()}).describe("Revise a scene shot in place by clip id. Send a replacement `scene` and/or `assets`; timing changes use the ordinary clip timing fields (`startTime`, `duration`, `transitionIn`). Omitted fields keep their persisted values and the MERGED result is re-validated as a whole, so a partial edit cannot leave the shot invalid. Changing only values or asset IDs updates props and bindings and REUSES the pinned source; changing the referenced SLOT SET regenerates the wrapper manifest and registers a new immutable source version atomically. Undo restores the source reference, spec, bindings and timing together. Topology, asset bindings, text content, font properties, device kind and colours are STATIC within a shot's animation \u2014 change them here (a revised spec) rather than trying to animate them. This is not a source trim or slip: a shortened or extended clip resamples the SAME normalized animation over its new duration, and trim/slip requests on generated animation are rejected rather than reinterpreted as media trims. In one batch, `scene.update` may target a shot added by an earlier `scene.add`. ASSETS: `assets` binds each slot name a layer references to a media id in the same project, and the slot's declared KIND decides what it admits \u2014 an image slot takes PNG, JPEG or WebP, a video slot MP4 or WebM. Binding the wrong kind is refused with the slot's path."),c({type:m("clip.add"),clip:c({id:n().min(1),startTime:s().min(wse).describe("Timeline start (seconds)."),duration:s().gt(Rse).describe("Clip duration (seconds)."),source:z([c({kind:m("media"),mediaId:n().min(1),trim:c({start:s().min(Ise).describe("Source trim start (seconds)."),end:s().min(Mse).describe("Source trim end (seconds).")}).optional(),excludedRanges:h(c({start:s().min(Ose),end:s().min($se),reason:n().optional()})).optional(),volume:s().min(Tse).max(kse).optional(),muted:R().optional(),playbackRate:s().gt(Cse).optional(),sync:l(["video","independent"]).optional(),kenBurns:l(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:s().optional(),fadeInMs:s().min(Dse).optional(),fadeOutMs:s().min(_se).optional(),loop:R().optional(),audioRole:l(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:s().max(jse),attackMs:s().min(Ese),releaseMs:s().min(Pse),windows:h(c({startMs:s(),endMs:s()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:s()}).optional(),reframe:c({segments:h(c({startSec:s().min(Lse).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:s().gt(Vse).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:z([c({mode:m("frame-center")}),c({mode:m("point"),x:s().min(Ase).max(Fse),y:s().min(Use).max(Nse)}),c({mode:m("face"),faceId:n().min(1),shotScale:l(["close","standard","wide"]).optional()}),c({mode:m("all-faces")}),c({mode:m("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:s().min(qse).max(Bse).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:s().min(Wse).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:s().min(Zse).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:s().min(Gse).max(Hse).describe("Horizontal nudge, source-normalized (+ = right)."),y:s().min(Jse).max(Kse).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:m("component"),componentId:n().min(1),props:b(n(),$()),assets:b(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),assetTiming:b(n(),c({trimStartSec:s().min(Xse).optional(),trimEndSec:s().gt(Yse).optional(),playbackRate:s().gt(Qse).max(ece).optional(),endPolicy:l(["loop","hold","reject"]),timelineOffsetSec:s().min(tce).optional()})).optional(),zPlane:l(["front","behind-subject"]).optional(),execution:c({version:m(3),componentId:n().min(1).max(oce),sourceVersionId:n().regex(nce),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(rce)).optional(),mediaBindings:b(n(),h(n().min(1).max(ice))).optional()}).optional(),placement:z([c({version:m(3),kind:m("clip")}),c({version:m(3),kind:m("content-slots"),slots:b(n(),c({targetClipIds:h(n().min(1).max(ace)),ownership:l(["reference","exclusive"])}))})]).optional()}),c({kind:m("overlay"),primitiveId:n().min(1),params:b(n(),$()),zPlane:l(["front","behind-subject"]).optional(),anchor:c({space:m("scene"),x:s().min(sce).max(cce),y:s().min(dce).max(pce)}).optional(),parallax:s().min(mce).max(lce).optional()}),c({kind:m("effect"),primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),component:c({version:m(3),componentId:n().min(1).max(uce),sourceVersionId:n().regex(fce),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(hce)).optional(),mediaBindings:b(n(),h(n().min(1).max(gce))).optional()}).optional(),targetTrackIds:h(n().min(1)).min(1).optional(),wrapperOrder:x().min(xce).max(zce).optional()}),c({kind:m("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:b(n(),n()).optional(),zPlane:m("front").optional()})]),kind:l(["video","audio","image","overlay","effect"]).optional(),opacity:s().min(bce).max(Sce).optional(),scale:s().gt(yce).optional(),rotation:s().optional(),position:c({x:s().min(vce).max(wce),y:s().min(Rce).max(Ice)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:s().min(Mce).max(Oce),y:s().min($ce).max(Tce),w:s().gt(kce).max(Cce),h:s().gt(Dce).max(_ce)}).optional(),fit:l(["cover","contain"]).optional(),captionVisibility:l(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:h(c({primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(jce),sourceVersionId:n().regex(Ece),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(Pce)).optional(),mediaBindings:b(n(),h(n().min(1).max(Lce))).optional()}).optional(),window:c({startTime:s().min(Vce),duration:s().gt(Ace)}).optional()})).optional(),transitionIn:c({type:n().min(1),duration:s().gt(Fce),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(Uce),sourceVersionId:n().regex(Nce),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(qce)).optional(),mediaBindings:b(n(),h(n().min(1).max(Bce))).optional()}).optional(),fromClipId:n().min(1).optional(),toClipId:n().min(1).optional(),handlePolicy:m("outgoing-overrun-at-cut-v1").optional()}).optional(),linkGroupId:n().min(1).optional(),animate:b(n(),h(c({time:s().min(Wce),value:s(),easing:z([l(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:A([s(),s(),s(),s()])})]).optional()})).min(Zce)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")}),trackId:n().optional(),newTrack:R().optional(),newTrackId:n().optional()}).describe("Add a clip to the timeline. The clip self-routes to a track by FAMILY (`clip.kind`, else derived from `source.kind`, else the target track) \u2014 a `media` clip MUST carry `kind` (video|audio|image) or a `trackId`, else it is rejected as ambiguous. `trackId` targets an existing SAME-family track; `newTrack:true` (with optional pinned `newTrackId`) creates a fresh track of that family."),c({type:m("clip.remove"),clipId:n()}).describe("Remove a clip by id (located across every track)."),c({type:m("clip.update"),clipId:n(),patch:c({id:n().min(1).optional(),startTime:s().min(Gce).optional().describe("Timeline start (seconds)."),duration:s().gt(Hce).optional().describe("Clip duration (seconds)."),source:z([c({kind:m("media"),mediaId:n().min(1),trim:c({start:s().min(Jce).describe("Source trim start (seconds)."),end:s().min(Kce).describe("Source trim end (seconds).")}).optional(),excludedRanges:h(c({start:s().min(Xce),end:s().min(Yce),reason:n().optional()})).optional(),volume:s().min(Qce).max(ede).optional(),muted:R().optional(),playbackRate:s().gt(tde).optional(),sync:l(["video","independent"]).optional(),kenBurns:l(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:s().optional(),fadeInMs:s().min(ode).optional(),fadeOutMs:s().min(nde).optional(),loop:R().optional(),audioRole:l(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:s().max(rde),attackMs:s().min(ide),releaseMs:s().min(ade),windows:h(c({startMs:s(),endMs:s()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:s()}).optional(),reframe:c({segments:h(c({startSec:s().min(sde).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:s().gt(cde).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:z([c({mode:m("frame-center")}),c({mode:m("point"),x:s().min(dde).max(pde),y:s().min(mde).max(lde)}),c({mode:m("face"),faceId:n().min(1),shotScale:l(["close","standard","wide"]).optional()}),c({mode:m("all-faces")}),c({mode:m("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:s().min(ude).max(fde).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:s().min(hde).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:s().min(gde).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:s().min(xde).max(zde).describe("Horizontal nudge, source-normalized (+ = right)."),y:s().min(bde).max(Sde).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:m("component"),componentId:n().min(1),props:b(n(),$()),assets:b(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),assetTiming:b(n(),c({trimStartSec:s().min(yde).optional(),trimEndSec:s().gt(vde).optional(),playbackRate:s().gt(wde).max(Rde).optional(),endPolicy:l(["loop","hold","reject"]),timelineOffsetSec:s().min(Ide).optional()})).optional(),zPlane:l(["front","behind-subject"]).optional(),execution:c({version:m(3),componentId:n().min(1).max(Mde),sourceVersionId:n().regex(Ode),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max($de)).optional(),mediaBindings:b(n(),h(n().min(1).max(Tde))).optional()}).optional(),placement:z([c({version:m(3),kind:m("clip")}),c({version:m(3),kind:m("content-slots"),slots:b(n(),c({targetClipIds:h(n().min(1).max(kde)),ownership:l(["reference","exclusive"])}))})]).optional()}),c({kind:m("overlay"),primitiveId:n().min(1),params:b(n(),$()),zPlane:l(["front","behind-subject"]).optional(),anchor:c({space:m("scene"),x:s().min(Cde).max(Dde),y:s().min(_de).max(jde)}).optional(),parallax:s().min(Ede).max(Pde).optional()}),c({kind:m("effect"),primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),component:c({version:m(3),componentId:n().min(1).max(Lde),sourceVersionId:n().regex(Vde),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(Ade)).optional(),mediaBindings:b(n(),h(n().min(1).max(Fde))).optional()}).optional(),targetTrackIds:h(n().min(1)).min(1).optional(),wrapperOrder:x().min(Ude).max(Nde).optional()}),c({kind:m("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:b(n(),n()).optional(),zPlane:m("front").optional()})]).optional(),kind:l(["video","audio","image","overlay","effect"]).optional(),opacity:s().min(qde).max(Bde).optional(),scale:s().gt(Wde).optional(),rotation:s().optional(),position:c({x:s().min(Zde).max(Gde),y:s().min(Hde).max(Jde)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:s().min(Kde).max(Xde),y:s().min(Yde).max(Qde),w:s().gt(epe).max(tpe),h:s().gt(ope).max(npe)}).optional(),fit:l(["cover","contain"]).optional(),captionVisibility:l(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:h(c({primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(rpe),sourceVersionId:n().regex(ipe),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(ape)).optional(),mediaBindings:b(n(),h(n().min(1).max(spe))).optional()}).optional(),window:c({startTime:s().min(cpe),duration:s().gt(dpe)}).optional()})).optional(),transitionIn:c({type:n().min(1),duration:s().gt(ppe),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(mpe),sourceVersionId:n().regex(lpe),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(upe)).optional(),mediaBindings:b(n(),h(n().min(1).max(fpe))).optional()}).optional(),fromClipId:n().min(1).optional(),toClipId:n().min(1).optional(),handlePolicy:m("outgoing-overrun-at-cut-v1").optional()}).optional(),linkGroupId:n().min(1).optional(),animate:b(n(),h(c({time:s().min(hpe),value:s(),easing:z([l(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:A([s(),s(),s(),s()])})]).optional()})).min(gpe)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")})}).describe("Patch an existing clip by id (cross-family). The patch is a partial TimelineClip. NOTE: `source` is REPLACED wholesale \u2014 the patch merges at the top level only, so a partial `source` WIPES the source fields you omit. Patch the whole source object when changing it. (To change reframe/excluded ranges, prefer setCropIntents / addExcludedRange, not a source patch.)"),c({type:m("removeClipsByMediaId"),mediaId:n()}).describe("Remove EVERY clip sourced from a given mediaId (e.g. after deleting that media)."),c({type:m("loadOverlays"),clips:h(c({id:n().min(1),startTime:s().min(xpe).describe("Timeline start (seconds)."),duration:s().gt(zpe).describe("Clip duration (seconds)."),source:z([c({kind:m("media"),mediaId:n().min(1),trim:c({start:s().min(bpe).describe("Source trim start (seconds)."),end:s().min(Spe).describe("Source trim end (seconds).")}).optional(),excludedRanges:h(c({start:s().min(ype),end:s().min(vpe),reason:n().optional()})).optional(),volume:s().min(wpe).max(Rpe).optional(),muted:R().optional(),playbackRate:s().gt(Ipe).optional(),sync:l(["video","independent"]).optional(),kenBurns:l(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:s().optional(),fadeInMs:s().min(Mpe).optional(),fadeOutMs:s().min(Ope).optional(),loop:R().optional(),audioRole:l(["sfx","music","vo","ambience"]).optional(),duck:c({duckDb:s().max($pe),attackMs:s().min(Tpe),releaseMs:s().min(kpe),windows:h(c({startMs:s(),endMs:s()})).optional()}).optional(),anchor:c({clipId:n().min(1),offsetMs:s()}).optional(),reframe:c({segments:h(c({startSec:s().min(Cpe).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:s().gt(Dpe).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:z([c({mode:m("frame-center")}),c({mode:m("point"),x:s().min(_pe).max(jpe),y:s().min(Epe).max(Ppe)}),c({mode:m("face"),faceId:n().min(1),shotScale:l(["close","standard","wide"]).optional()}),c({mode:m("all-faces")}),c({mode:m("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:s().min(Lpe).max(Vpe).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:s().min(Ape).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:s().min(Fpe).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:s().min(Upe).max(Npe).describe("Horizontal nudge, source-normalized (+ = right)."),y:s().min(qpe).max(Bpe).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),c({kind:m("component"),componentId:n().min(1),props:b(n(),$()),assets:b(n(),n().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),assetTiming:b(n(),c({trimStartSec:s().min(Wpe).optional(),trimEndSec:s().gt(Zpe).optional(),playbackRate:s().gt(Gpe).max(Hpe).optional(),endPolicy:l(["loop","hold","reject"]),timelineOffsetSec:s().min(Jpe).optional()})).optional(),zPlane:l(["front","behind-subject"]).optional(),execution:c({version:m(3),componentId:n().min(1).max(Kpe),sourceVersionId:n().regex(Xpe),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(Ype)).optional(),mediaBindings:b(n(),h(n().min(1).max(Qpe))).optional()}).optional(),placement:z([c({version:m(3),kind:m("clip")}),c({version:m(3),kind:m("content-slots"),slots:b(n(),c({targetClipIds:h(n().min(1).max(eme)),ownership:l(["reference","exclusive"])}))})]).optional()}),c({kind:m("overlay"),primitiveId:n().min(1),params:b(n(),$()),zPlane:l(["front","behind-subject"]).optional(),anchor:c({space:m("scene"),x:s().min(tme).max(ome),y:s().min(nme).max(rme)}).optional(),parallax:s().min(ime).max(ame).optional()}),c({kind:m("effect"),primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),component:c({version:m(3),componentId:n().min(1).max(sme),sourceVersionId:n().regex(cme),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(dme)).optional(),mediaBindings:b(n(),h(n().min(1).max(pme))).optional()}).optional(),targetTrackIds:h(n().min(1)).min(1).optional(),wrapperOrder:x().min(mme).max(lme).optional()}),c({kind:m("card"),html:n().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. FONTS: name a family from GET /v1/fonts (list_render_fonts) \u2014 the renderer loads those faces for the card and waits for them, so `font-family: Inter` draws Inter. `@import` and remote font files are REFUSED: the card renders with no network. A family that is not on that list has no bytes behind it and the browser falls back, so end any stack with a generic (`Inter, sans-serif`) rather than relying on a system face being present."),tokens:b(n(),n()).optional(),zPlane:m("front").optional()})]),kind:l(["video","audio","image","overlay","effect"]).optional(),opacity:s().min(ume).max(fme).optional(),scale:s().gt(hme).optional(),rotation:s().optional(),position:c({x:s().min(gme).max(xme),y:s().min(zme).max(bme)}).optional().describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),region:c({x:s().min(Sme).max(yme),y:s().min(vme).max(wme),w:s().gt(Rme).max(Ime),h:s().gt(Mme).max(Ome)}).optional(),fit:l(["cover","contain"]).optional(),captionVisibility:l(["visible","hidden"]).optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:h(c({primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max($me),sourceVersionId:n().regex(Tme),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(kme)).optional(),mediaBindings:b(n(),h(n().min(1).max(Cme))).optional()}).optional(),window:c({startTime:s().min(Dme),duration:s().gt(_me)}).optional()})).optional(),transitionIn:c({type:n().min(1),duration:s().gt(jme),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(Eme),sourceVersionId:n().regex(Pme),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(Lme)).optional(),mediaBindings:b(n(),h(n().min(1).max(Vme))).optional()}).optional(),fromClipId:n().min(1).optional(),toClipId:n().min(1).optional(),handlePolicy:m("outgoing-overrun-at-cut-v1").optional()}).optional(),linkGroupId:n().min(1).optional(),animate:b(n(),h(c({time:s().min(Ame),value:s(),easing:z([l(["linear","ease","easeIn","easeOut","easeInOut"]),c({cubicBezier:A([s(),s(),s(),s()])})]).optional()})).min(Fme)).optional().describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.")}))}).describe("Replace the overlay channel wholesale with the given clips (bulk set, not a merge)."),c({type:m("addMarker"),marker:c({id:n().min(1),startTime:s().min(Ume),endTime:s().min(Nme).optional(),kind:n().min(1),name:n().optional(),metadata:b(n(),$()).optional()})}).describe("Add a timeline marker (a named time point/range; carry extensions in `metadata`)."),c({type:m("removeMarker"),markerId:n()}).describe("Remove a marker by id."),c({type:m("updateMarker"),markerId:n(),updates:c({id:n().min(1).optional(),startTime:s().min(qme).optional(),endTime:s().min(Bme).optional(),kind:n().min(1).optional(),name:n().optional(),metadata:b(n(),$()).optional()})}).describe("Patch a marker's fields by id (partial merge)."),c({type:m("setCropIntents"),clipId:n(),segments:z([h(c({startSec:s().min(Wme).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:s().gt(Zme).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:z([c({mode:m("frame-center")}),c({mode:m("point"),x:s().min(Gme).max(Hme),y:s().min(Jme).max(Kme)}),c({mode:m("face"),faceId:n().min(1),shotScale:l(["close","standard","wide"]).optional()}),c({mode:m("all-faces")}),c({mode:m("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:n().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:s().min(Xme).max(Yme).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:c({in:s().min(Qme).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:s().min(ele).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:c({x:s().min(tle).max(ole).describe("Horizontal nudge, source-normalized (+ = right)."),y:s().min(nle).max(rle).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})),q()])}).describe("Set (or CLEAR, with `segments: null`) the camera/reframe channel on a MEDIA clip \u2014 the time-aligned source\u2192output viewport (focus, zoom, ease, bias). This is the PREFERRED way to author reframing; do NOT reframe via a whole-source `clip.update` patch. Segments tile the clip's duration."),c({type:m("setEffects"),clipId:n(),effects:h(c({primitiveId:n().min(1).optional(),params:b(n(),$()).optional(),id:n().min(1).optional(),component:c({version:m(3),componentId:n().min(1).max(ile),sourceVersionId:n().regex(ale),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(sle)).optional(),mediaBindings:b(n(),h(n().min(1).max(cle))).optional()}).optional(),window:c({startTime:s().min(dle),duration:s().gt(ple)}).optional()}))}).describe("Set (or CLEAR, with `effects: []`) a clip's EFFECT channel \u2014 the registered effect primitives stacked onto that clip, each `{ primitiveId, params? }`. WHOLESALE: the array REPLACES the clip's current effects, so send the full stack (read the clip first to add one). This is the ONLY way to change effects on an existing clip \u2014 do NOT reach for a `clip.update` patch, whose top-level merge is the source-clobbering footgun documented above."),c({type:m("setCaptionStyle"),style:c({fontFamily:n().min(1).optional(),fontSize:s().min(1).max(mle).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:x().min(lle).max(ule).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:l(["glass","solid","none"]).optional(),position:l(["top","center","bottom"]).optional(),region:c({x:s().min(fle).max(hle),y:s().min(gle).max(xle),w:s().gt(zle).max(ble),h:s().gt(Sle).max(yle)}).optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:l(["none","uppercase","capitalize"]).optional(),letterSpacing:s().min(vle).max(wle).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:s().min(Rle).max(Ile).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:s().min(Mle).max(Ole).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisGradient:n().optional(),emphasisScale:s().gt($le).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:x().min(Tle).max(kle).optional(),emphasisTextTransform:l(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:s().optional(),emphasisFontStyle:l(["normal","italic"]).optional(),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:s().min(Cle).optional(),entranceStaggerMs:s().min(Dle).optional(),exitMs:s().min(_le).optional(),emphasisPlate:R().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:s().min(jle).optional(),emphasisPlatePadX:s().optional(),emphasisPlatePadY:s().optional(),emphasisPlateReveal:R().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:s().min(Ele).max(Ple).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:l(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:s().gt(Lle).max(Vle).optional()})}).describe("Merge style overrides (font/color/position/emphasis) onto the composition's caption layer. Partial \u2014 omitted fields keep their current value; creates the caption container if absent."),c({type:m("setCaptionLayouts"),layouts:h(c({segmentIndex:x().min(Ale).max(Fle),wordStartIndex:x().min(Ule).max(Nle),wordEndIndex:x().gt(qle).max(Ble).describe("Exclusive word index in the saved caption segment."),region:c({x:s().min(Wle).max(Zle),y:s().min(Gle).max(Hle),w:s().gt(Jle).max(Kle),h:s().gt(Xle).max(Yle)}),scale:s().min(Qle).max(eue).optional(),rotation:s().min(tue).max(oue).optional(),style:c({fontFamily:n().min(1).optional(),fontSize:s().min(1).max(nue).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:x().min(rue).max(iue).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:l(["glass","solid","none"]).optional(),textTransform:l(["none","uppercase","capitalize"]).optional(),letterSpacing:s().min(aue).max(sue).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:s().min(cue).max(due).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:s().min(pue).max(mue).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisScale:s().gt(lue).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:x().min(uue).max(fue).optional(),emphasisTextTransform:l(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:s().optional(),emphasisFontStyle:l(["normal","italic"]).optional(),emphasisPlate:R().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:s().min(hue).optional(),emphasisPlatePadX:s().optional(),emphasisPlatePadY:s().optional(),emphasisPlateReveal:R().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:s().min(gue).max(xue).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:l(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:s().min(zue).optional(),entranceStaggerMs:s().min(bue).optional(),exitMs:s().min(Sue).optional()}).optional(),holdThroughWordIndex:x().min(yue).max(vue).optional().describe("Inclusive saved-word index in this segment. The layout stays visible until that word ends."),wordMarks:h(c({wordIndex:x().min(wue).max(Rue),emphasis:R().optional(),annotate:z([l(["circle","underline"]),q()]).optional()})).optional()}))}).describe("Replace native caption placements without changing transcript words or timings. Each layout references a half-open word-index range in one saved segment; a one-word range is valid. region places that group independently, optional bounded scale/rotation/style changes its look, and holdThroughWordIndex keeps it visible through a later saved word in the same segment. All words in a placed range occupy one page; rendering refuses a range that cannot fit its box, so enlarge region or split the range. The box reserves horizontal space of 1.6 font sizes and vertical space of 0.8 font sizes for padding, with at most three lines. Unreferenced words keep the default caption layout. Word ranges must not overlap. Reapply after caption regeneration or timeline cuts."),c({type:m("setCaptionDepth"),zPlane:l(["front","behind-subject"])}).describe("Set the caption compositing plane. Use `behind-subject` to place captions behind the segmented foreground subject; use `front` for conventional captions above all video layers."),c({type:m("setCaptions"),segments:h(c({words:h(c({text:n().min(1),startMs:s().min(Iue).describe("Word start on the composition timeline, in milliseconds."),endMs:s().min(Mue).describe("Word end on the composition timeline, in milliseconds."),emphasis:R().optional(),annotate:l(["circle","underline"]).optional()}))})),style:c({fontFamily:n().min(1).optional(),fontSize:s().min(1).max(Oue).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:x().min($ue).max(Tue).optional(),color:n().min(1).optional(),highlightColor:n().min(1).optional(),backgroundColor:n().optional(),plate:l(["glass","solid","none"]).optional(),position:l(["top","center","bottom"]).optional(),region:c({x:s().min(kue).max(Cue),y:s().min(Due).max(_ue),w:s().gt(jue).max(Eue),h:s().gt(Pue).max(Lue)}).optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:l(["none","uppercase","capitalize"]).optional(),letterSpacing:s().min(Vue).max(Aue).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:s().min(Fue).max(Uue).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:s().min(Nue).max(que).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:n().optional(),emphasisGradient:n().optional(),emphasisScale:s().gt(Bue).optional(),emphasisFontFamily:n().optional(),emphasisFontWeight:x().min(Wue).max(Zue).optional(),emphasisTextTransform:l(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:s().optional(),emphasisFontStyle:l(["normal","italic"]).optional(),entrance:l(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:s().min(Gue).optional(),entranceStaggerMs:s().min(Hue).optional(),exitMs:s().min(Jue).optional(),emphasisPlate:R().optional(),emphasisPlateColor:n().optional(),emphasisPlateTextColor:n().optional(),emphasisPlateAltColor:n().optional(),emphasisPlateAltTextColor:n().optional(),emphasisPlateRadius:s().min(Kue).optional(),emphasisPlatePadX:s().optional(),emphasisPlatePadY:s().optional(),emphasisPlateReveal:R().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:n().optional(),annotationStrokeWidth:s().min(Xue).max(Yue).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:l(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:s().gt(Que).max(efe).optional()}).optional()}).describe("Replace the caption SEGMENTS wholesale \u2014 author the word-timed caption layer directly (each segment = one sentence/page of `words` with timeline-ms `startMs`/`endMs`, optional `emphasis`). This is how a client with its OWN word timings (e.g. a generated VO take) gets word-synced captions without a source transcript; the compose lane's transcript slice writes the same layer. `style`, when given, merges with setCaptionStyle semantics; an omitted style keeps the existing one. Renderer paginates within a segment and never pools words across two \u2014 keep segments sentence-bounded."),c({type:m("captions.fromTranscript"),mediaId:n().min(1),window:c({startSec:s().min(tfe),endSec:s().gt(ofe)}).optional()}).describe("Attach caption CONTENT from the media's cached transcript \u2014 no pasting words. ROUTE-MATERIALIZED like applyMotionPreset/materializeGrid: the server slices the word-timed transcript to `window` (source seconds; absent = the whole media), rebases times, sentence-splits into segments, and applies it as `setCaptions`. 422 media_no_transcript when the media has no transcript or no words in the window. For your OWN word timings use setCaptions directly. For edited multi-clip timelines, use captions.fromComposition after saving the edits; that operation projects all selected track clips, trims, exclusions, and placements."),c({type:m("captions.fromComposition"),trackId:n().min(1)}).describe("Snapshot word-timed captions from the SAVED edits on one explicit enabled video or audio track. The host reads each source media transcript, projects words through clip trim, excluded ranges and placement, then replaces the caption segments. This is route-materialized to setCaptions; call it AFTER persisting clip edits and call it again when those edits change. The existing caption style and depth are preserved. Missing transcripts, unsupported clips, inconsistent clip durations, and overlapping audible clips fail loud. Playback rate scales source word times and playable duration on both audio and video tracks."),c({type:m("applyMotionPreset"),clipId:n(),preset:n(),params:c({enterMs:s().optional(),exitMs:s().optional(),staggerMs:s().optional()}).optional()}).describe("Shell a STATIC `card` clip with a frame-driven MOTION preset \u2014 the public card-shelling op (the layout renders VERBATIM; only the container animates in/out). The server wraps the card in the chosen `preset` (fade-up / slide-in-left / slide-in-right / scale-pop / stagger-reveal), transpiles it, mints it as a LIVE component, and swaps the clip source to that component (the bakeless live lane \u2014 no box). `params` tunes timing (`enterMs`/`exitMs`, `staggerMs` for stagger-reveal). The target must be a static card (components already carry motion; library overlays already move); re-run overwrites idempotently ONLY while the target is still a card (an uncompilable shell); once shelled, the clip is a COMPONENT \u2014 to change its motion, remove and re-add the card, then re-shell. Honored under `dry_run` (validates preset + target without transpiling or persisting). ORDERING: the preset resolves its target against the PERSISTED composition \u2014 a card added in the SAME batch is not yet visible to it. Persist the clip.add batch first, then shell in a following call."),c({type:m("materializeGrid"),clipId:n(),grid:l(["beat","word","shot"]),maxMarkers:x().gt(nfe).max(rfe).optional()}).describe('Materialize a clip\'s SOURCE-media temporal GRID as timeline markers \u2014 the rhythm authority you cut to. `grid:"beat"` reads a MUSIC bed\'s beat map (get_media_context.beatGrid), `grid:"word"` the VO word onsets (wordGrid); each grid point is projected from media time to TIMELINE time through the clip\'s placement (startTime, trim, playbackRate, excludedRanges) and written as a `kind:"beat"|"word"` marker (`metadata.sourceClipId` set). Points outside the clip\'s visible window are skipped. Re-running REPLACES the prior markers from the same clip+grid (idempotent). Land cuts and transition MIDPOINTS on the markers (a 0.5s transition starts 0.25s before its marker). `maxMarkers` (default 500, ceiling 2000) \u2014 exceeding it fails loud with the count. `grid:"shot"` is not yet exposed (shot_grid_unavailable). The target must be a media clip; absent evidence fails loud (grid_unavailable) naming how to get it (declare audioRole:"music" at ingest / transcribe).'),c({type:m("setFormat"),format:c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional()})}).describe("Set the output format \u2014 `aspectRatio` (16:9|9:16|1:1|4:5) plus optional `fps` and `resolution`. Merges: an omitted field keeps the current value."),c({type:m("addTrack"),kind:l(["video","audio","image","overlay","effect"]),name:n().optional(),id:n().optional()}).describe("Add an EMPTY track of a given family (video|audio|image|overlay|effect). Optional pinned `id`. The new track is appended, so it starts at the BACK: index 0 is the top layer and higher indices are further back (see `reorderTracks`). Track order only ranks clips on the same plane \u2014 every overlay draws above the video lane unless its `zPlane` is `behind-subject`, whatever its track index."),c({type:m("removeTrack"),trackId:n()}).describe("Remove a track AND all its clips by id."),c({type:m("updateTrack"),trackId:n(),updates:c({name:n().optional(),enabled:R().optional()})}).describe("Patch a track's `name` / `enabled` by id."),c({type:m("reorderTracks"),fromIndex:s(),toIndex:s()}).describe('Move a track from one index to another. ORDER: index 0 is the TOP layer, not the bottom \u2014 moving a backdrop to index 0 puts it in FRONT of everything and hides the composition. Higher index = further back. PRECEDENCE: track order decides compositing only among clips on the same plane. Overlays are composited in a lane ABOVE the video lane whatever their track index; the one exception is `zPlane:"behind-subject"`, which moves the overlay inside its host clip, behind the segmented foreground. So if reordering tracks does not change what you see, the plane split already decided it.'),c({type:m("moveClipToTrack"),clipId:n(),targetTrackId:n(),newStartTime:s().optional()}).describe("Move a clip to another SAME-family track, optionally at a new `newStartTime`."),c({type:m("duplicateClip"),clipId:n(),newClipId:n().optional()}).describe("Duplicate a clip by id. Pin `newClipId` to make the copy's id deterministic (required for a clean undo/inverse)."),c({type:m("cutAndRipple"),start:s(),end:s()}).describe("Server-authoritative: delete the [start,end] time window (seconds) and ripple every downstream clip/marker/caption earlier to close the gap."),c({type:m("ripple"),time:s(),amount:s()}).describe("Server-authoritative: shift everything at/after `time` (seconds) by `amount` seconds (+ opens a gap, \u2212 closes one)."),c({type:m("addExcludedRange"),clipId:n(),sourceStart:s(),sourceEnd:s(),reason:n().optional()}).describe("Server-authoritative: exclude a [sourceStart,sourceEnd] span (seconds) of a clip's SOURCE (an internal trim) and ripple downstream \u2014 the preferred way to drop a sub-range vs a source patch."),c({type:m("removeExcludedRange"),clipId:n(),rangeIdx:s()}).describe("Server-authoritative: remove a clip's previously-added excluded range by index (re-includes that span, ripples downstream)."),c({type:m("component.repin"),componentId:n(),from:n(),to:n()}).describe("Move every pin of a component at version `from` to version `to`: the clips that place it and the scene surfaces that nest it. A clip's version changes only through a composition write; a component edit issues this op over the composition it names."),c({type:m("component.repin-v3"),componentId:n().min(1),from:n().regex(ife),to:n().regex(afe),expectedCompositionEtag:n().min(1),changes:h(c({placementId:n().min(1),before:c({version:m(3),componentId:n().min(1).max(sfe),sourceVersionId:n().regex(cfe),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(dfe)).optional(),mediaBindings:b(n(),h(n().min(1).max(pfe))).optional()}),after:c({version:m(3),componentId:n().min(1).max(mfe),sourceVersionId:n().regex(lfe),params:b(n(),oe),seed:n().min(1),assets:b(n(),n().min(1).max(ufe)).optional(),mediaBindings:b(n(),h(n().min(1).max(ffe))).optional()})})).min(1).max(hfe)}).describe("Atomically repin explicit version3 invocations using complete before/after execution references and an exact composition etag. Persistence must canonically admit scoped source hashes, destination input schemas and every resulting target context before applying, including replay/undo. Never infer a latest head, downgrade versions or accept an admitted flag.")]).describe("One scoped composition operation. Discriminated by `type` \u2014 `clip.add` / `clip.remove` / `clip.update` patch clips across any family; the rest cover markers, reframe, effects, captions, format, tracks, and the server-authoritative ripple recomputes. Every variant is `.strict()`: an unknown field is refused, not ignored.");var gfe=1,xfe=256,zfe=256,bfe=new RegExp("^[a-f0-9]{64}$"),Sfe=512,yfe=new RegExp("^[a-f0-9]{64}$"),vfe=c({ops:h(el).min(1),componentExecutionVersions:h(m(3)).min(1).max(gfe).optional(),builtinSources:h(c({scope:c({kind:m("builtin"),collection:n().min(1).max(xfe)}),componentId:n().min(1).max(zfe),sourceVersionId:n().regex(bfe),sourceVersion:m(3)})).min(1).max(Sfe).optional(),expectedBrandIdentity:n().regex(yfe).optional(),concurrency:Fo.optional().describe("Version 1 shared dependency admission. Guarded requests must name the observed immutable composition with composition_id or concurrency.compositionId; changed or missing dependencies refuse the entire batch."),if_match:n().optional().describe('Optional OCC precondition \u2014 the strong etag (`"<hex>"`) the caller last saw. On mismatch the batch is rejected (409 stale_etag) before any op applies.'),dry_run:R().optional().describe("When true, validate the batch (apply + projection accept/reject guards) WITHOUT persisting. Returns `{ valid, errors }` instead of applying."),composition_id:n().optional().describe("Target a SPECIFIC composition instead of the project's active one. Omit it and the project's active composition is edited, which is the default and the common case. `preview_frame` and `create_render` already accept a compositionId; this closes the gap so a second composition minted with `new_composition` can actually be authored into \u2014 build variant A, mint B, edit B, preview both. Mutually exclusive with `session_id`, which targets the session's scratch."),session_id:n().optional().describe("Optional compose-session id. When present, the ops target the session's SCRATCH composition (a derived sibling) instead of the project's active composition \u2014 the server never mutates active until commit.")}).describe("POST /projects/:id/composition/apply body \u2014 a batch of CompositionOps.");var wfe=200,Rfe=c({name:n().min(1).max(wfe).optional(),format:he.optional()}).describe("POST /projects/:id/compositions body \u2014 create a new video (composition) in the project. `format` defaults to the project's compositionFormat when omitted.");var Ife=256,Mfe=65536,Hg=z([c({mode:m("guarded"),basis:h(c({key:n().min(1).max(Ife),token:n().max(Mfe)})),absentClipToken:m("null")}),c({mode:m("exact"),reason:n()})]);var Ofe=c({suggestionId:n().min(1),format:c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional(),platform:n().optional()}).optional()});var $fe=0,Tfe=9007199254740991,Jg=c({compositionId:n(),format:he,etag:n(),isActive:R(),updatedAt:s(),sceneCount:x().min($fe).max(Tfe)}).describe("A composition in a project, flagging the active one.");var kfe=c({data:h(Jg)}).describe("GET /projects/:id/compositions response.");var Cfe=0,Dfe=9007199254740991,_fe=new RegExp("^[a-f0-9]{64}$"),jfe=z([ut,c({composition:ut,composition_id:n(),revision:x().min(Cfe).max(Dfe),dependencies:Hg,expectedBrandIdentity:n().regex(_fe).optional(),brandAuthorityError:n().optional()})]);var Efe=1,Pfe=256,Lfe=256,Vfe=new RegExp("^[a-f0-9]{64}$"),Afe=512,Ffe=new RegExp("^[a-f0-9]{64}$"),Ufe=z([c({composition:ut,componentExecutionVersions:h(m(3)).min(1).max(Efe),builtinSources:h(c({scope:c({kind:m("builtin"),collection:n().min(1).max(Pfe)}),componentId:n().min(1).max(Lfe),sourceVersionId:n().regex(Vfe),sourceVersion:m(3)})).min(1).max(Afe).optional(),expectedBrandIdentity:n().regex(Ffe).optional()}),ut]);var Nfe=2e3,qfe=c({intent:n().min(1).max(Nfe).describe("Plain-English goal \u2014 what you're trying to achieve with this edit."),mode:l(["advise","amend","explore"]).optional().describe("advise = proposer-only (no render/judge, no grounded assessment); amend (default) = grade the current composition + author the fix for the weakest criterion; explore = ranked slate of diverse directions. All modes are async \u2014 poll the returned job."),focus:l(["editorial","spatial","brand","caption"]).optional().describe("Optional criterion to concentrate the advice on."),ifMatch:n().optional().describe("Etag of the composition the advice is computed against. Proposals are bound to it; apply a proposal BEFORE any other edit or it will 409.")}).describe("POST /projects/:id/consult body.");var Bfe=c({consultJobId:n().describe("Opaque consult job id; poll it for the advisory result."),projectId:n(),status:l(["queued","failed"]).describe("queued = normal; failed = startup failed and the job is already terminal."),streamUrl:n().optional().describe("Relative SSE endpoint to stream this job's events.")}).describe("POST /projects/:id/consult response.");var Kg=c({faceId:n(),bbox:c({x:s(),y:s(),width:s(),height:s()}),speakingShare:s().optional()});var Xg=c({detectorVersion:n().describe("Version of the face detector that produced this source-window roster."),window:c({startSec:s(),endSec:s()}),faces:h(Kg)});var QTe=c({projectId:n(),mediaId:n()});var Wfe=0,Zfe=10,Gfe=6,Hfe=c({criticId:n().min(1).describe("Stable client id; re-registering the same id UPSERTS."),label:n().min(1),tier:l(["rules","rubric","evaluator"]),floor:s().min(Wfe).max(Zfe).optional().describe("Score below this routes a refine like a built-in criterion. Defaults to 6."),rules:h(b(n(),$())).optional().describe('tier "rules": declarative ClientRule[] (data).'),rubric:n().optional().describe('tier "rubric": your criterion + description; scored as an extra column.'),referenceMediaIds:h(n()).max(Gfe).optional().describe('tier "rubric"/"evaluator": up to 6 org media ids whose thumbnails the judge sees as YOUR reference standard \u2014 "looks like mine" becomes a machine check. Each must be an org-owned media item with a visual thumbnail (422 names any that is not).'),url:le().optional().describe('tier "evaluator": your HTTPS webhook; CueFrame POSTs the artifact.')}).describe("Register a custom compose critic.");var pa=c({criticId:n(),label:n(),tier:l(["rules","rubric","evaluator"]),floor:s(),referenceMediaIds:h(n()).optional()}).describe("One registered critic (rubric/rules/url stay write-only \u2014 never echoed).");var Jfe=c({critics:h(pa)});var Kfe=c({id:n(),criticId:n(),tier:l(["rules","rubric","evaluator"]),secret:n().optional().describe("evaluator tier: Standard-Webhooks signing secret, returned ONCE.")}).describe("POST /critics response (evaluator secret present exactly once).");var Xfe=c({fromCompositionId:n().min(1).describe("Source composition to reframe a sibling from."),targetFormat:he.describe("The target output format (aspectRatio + optional fps/resolution) for the new sibling.")}).describe("Derive a reframed sibling composition for a new aspect (Auto-Reframe / Magic-Resize, agent-native).");var Yfe=c({compositionId:n().describe("The new sibling composition's id.")}).describe("POST /projects/:id/compositions/derive response.");var dke=c({error:c({code:n().describe("Stable machine-readable error code per \xA7Error Model."),message:n().describe("Human-readable message."),contract:n().describe("Contract version that produced this verdict. If it differs between two calls, the rules changed underneath you, not your request."),contractVersion:n().describe("Version of the published `@cueframe/api-contract` this server implements. Compare it with the `contractVersion` of the package your client was generated from: a higher value here means the server has moved ahead of your document."),details:b(n(),$()).optional().describe("Optional context (currentEtag, projectIds, retryAfter, \u2026).")}).describe("Standard API error envelope.")}).describe("Error envelope used by every non-2xx response.");var Uo=c({kind:l(["transcript","subjectTrack","matte"]),intent:c({kind:l(["whole","window"]),window:c({startSec:s(),endSec:s()}).optional().describe("The SOURCE window this fact covers, when it is scoped to a clip.")}),status:l(["pending","ready","failed"]),summary:c({presenceFraction:s().optional().describe("Matte only: fraction of frames carrying a detected subject (0\u20131). Below 0.6 there is no reliable silhouette \u2014 the matte is delivered but cannot carry a behind-subject graphic, and is NOT charged."),faceCount:s().optional(),language:n().optional(),wordCount:s().optional(),durationSec:s().optional()}).optional(),charge:c({usd:s()}).optional().describe("What this fact was BILLED, in USD. Absent when it cost nothing: a compose/render side effect (already paid for inside that operation) or an unusable matte."),error:c({code:n(),message:n()}).optional(),readyAt:s().optional()}).describe("One derived fact about a media item \u2014 computed once, charged at most once.");var No=c({kind:l(["transcript","subjectTrack","matte"]),quotedUsd:s().describe("The server's price for this enhancement, in USD. Meaningful ONLY when `available` is true \u2014 an unavailable offer quotes 0 because there is nothing to price yet."),available:R(),reason:n().optional().describe("Why this cannot be bought right now. Present iff `available` is false. e.g. `media_not_ready` (the source has no known duration yet).")}).describe("A purchasable enhancement that this media item does not have yet.");var Yg=z([c({kind:l(["subjectTrack","matte"]),scope:c({startSec:s(),endSec:s()}),state:l(["pending","ready","failed"]),fact:Uo}),c({kind:l(["subjectTrack","matte"]),scope:c({startSec:s(),endSec:s()}),state:l(["available","unavailable"]),offer:No})]).describe("The server-selected fact or offer for one exact source window. Present when kind, startSec, and endSec are supplied; clients consume this instead of recreating the fact hash.");var Qfe=24,ehe=c({count:x().min(1).max(Qfe),contentType:l(["image/jpeg","image/png"]).optional(),includeContactSheet:R().optional()}).describe("POST /brand-kits/exemplar-uploads body. Reserve presigned PUT slots for curated reference frames (\u2264720px recommended \u2014 they are vision input tokens downstream).");var the=c({batchId:n(),uploads:h(c({key:n(),url:n()})),contactSheetUpload:c({key:n(),url:n()}).optional(),expiresAt:n()});var ohe=c({clipSuggestionId:n().min(1)}).describe("POST /projects/:id/exports/{fcpxml,premiere} body.");var Qg=c({phase:l(["trim","build","upload","trigger"]),message:n(),detail:n().optional(),retryable:R()});var ex=l(["fcpxml","premiere"]);var tx=l(["queued","trimming","building","uploading","complete","error","cancelled"]);var nhe=0,rhe=1,ihe=c({id:n(),format:ex,status:tx,progress:s().min(nhe).max(rhe).describe("Fractional progress 0..1 across the trim/build/upload pipeline. Reaches 1 only on `complete`."),outputUrl:n().nullable(),outputExpiresAt:n().nullable(),outputSizeBytes:s().nullable(),outputDurationSec:s().nullable(),error:z([Qg,q()]).describe("Set when status is `error`; null otherwise. The phase field localizes the failure to trim / build / upload / trigger."),trimCacheHit:R().nullable(),clipSuggestionId:n().nullable(),createdAt:n(),updatedAt:n()}).describe("NLE export job response.");var ahe=c({url:le()}).describe("POST /brand-kits/extract body \u2014 the website URL to extract brand tokens from.");var ox=c({colors:h(n()),fonts:h(n()),title:n().optional(),description:n().optional()}).describe("POST /brand-kits/extract response \u2014 extracted brand tokens (not persisted).");var she=200,che=0,dhe=50,phe=c({query:n().min(1).max(she),perPage:x().gt(che).max(dhe).optional()}).describe("POST /fonts/search body.");var mhe=c({results:h(c({family:n(),category:n().optional(),variants:h(n()).optional(),cssUrl:n().optional(),previewText:n().optional()}))}).describe("POST /fonts/search response.");var lhe=new RegExp("^[a-f0-9]{64}$"),uhe=new RegExp("^(2|3)(,(2|3))?$"),kke=c({builtinCollection:l(["native","curated-definitions"]).optional(),sourceVersionId:n().regex(lhe).optional(),supportedSourceVersions:n().regex(uhe).optional()});var Dke=c({composition:$()});var jke=c({componentExecutionVersions:m("3").optional(),includeDependencies:l(["true","false"]).optional(),compositionId:n().optional()});var fhe=0,hhe=0,ghe=20,xhe=100,Pke=c({after:x().min(fhe).optional(),before:x().min(hhe).optional(),limit:x().min(1).max(xhe).default(ghe)});var Vke=$t({});var zhe=100,bhe=-9007199254740991,She=9007199254740991,yhe=-9007199254740991,vhe=9007199254740991,Fke=c({limit:x().min(1).max(zhe).optional(),after:n().optional(),projectId:n().optional(),jobId:n().optional(),from:x().min(bhe).max(She).optional(),to:x().min(yhe).max(vhe).optional()});var Nke=c({deep:m("1").optional()});var whe=c({status:l(["ok","degraded"]),version:n(),checks:b(n(),c({ok:R(),detail:n().optional()})).optional()}).describe("Health probe response.");var nx=c({jobId:n().describe("Poll GET /v1/jobs/{jobId} / wait_job until terminal."),jobKey:n().describe("Deterministic identity of the work (content hash of every input the result depends on). Re-enqueueing the same key returns the same job while it runs; a failed key revives as a fresh attempt."),kind:n().describe("Job family, e.g. `verify` | `preview` | `brand_kit_extract`."),status:l(["running","succeeded","cancelled"]).describe("running on a fresh/deduped enqueue; succeeded when an identical request already completed. Cancelled is part of the shared status vocabulary; identical cancelled work revives to running.")});var Rhe=0,Ihe=9007199254740991,Mhe=0,Ohe=9007199254740991,rx=c({geometry:c({scale:s(),compositionWidth:s().optional(),compositionHeight:s().optional(),width:s().optional(),height:s().optional()}),warnings:h(b(n(),$())).optional(),previewed:c({source:l(["inline","scratch","persisted"]),compositionId:n().optional(),etag:n().optional()}),listUsd:s().optional().describe("List price charged for this delivered capture."),artifacts:h(c({id:n(),beatSec:s(),bytes:x().gt(Rhe).max(Ihe),contentType:l(["image/png","image/jpeg"]),layers:c({video:n().nullable(),overlays:x().min(Mhe).max(Ohe)}),url:le(),urlExpiresAt:n()}))});var ix=c({perCriterion:$(),composite:s(),critique:n(),checkpointId:n(),beats:$().optional(),clientScores:h($()).optional(),listUsd:s().optional().describe("List price charged for this delivered evaluation.")});var $he=c({id:n().describe("Job id \u2014 pass to GET /v1/jobs/{id} / wait_job."),jobKey:n().describe("Deterministic identity of the work (idempotency key, e.g. `verify-<sessionId>-<contentHash>` \u2014 the hash covers the composition AND grading inputs). Re-enqueueing the same key returns the same job while it runs."),kind:n().describe("Job family, e.g. `verify`."),status:l(["running","succeeded","failed","cancelled"]).describe("Poll until terminal (`succeeded` | `failed` | `cancelled`)."),progress:z([c({phase:n(),percent:s().optional(),message:n().optional()}),q()]).describe("Executor heartbeat while running; null when none reported."),result:z([z([rx,Fg,ix,ox]),q()]).describe("Kind-specific payload when status is `succeeded`; null otherwise."),error:z([c({code:n(),message:n()}),q()]).describe("Stable failure code + human message when status is `failed`; null otherwise. `job_timeout` = the executor died mid-run and the stall sweep reaped the job \u2014 re-enqueue to retry."),createdAt:n(),updatedAt:n(),completedAt:n().nullable()});var ax=c({mediaId:n().describe("The media item this moment belongs to \u2014 feed it to apply_composition as a clip source, or GET /v1/media/{id}/context for its faces/beat/word grids."),name:n().describe("The media item's name, so a result is readable without a second call."),score:s().describe("Cosine similarity between the query text and the chunk's frame, in [-1, 1]. Higher is closer. Compare scores WITHIN one response; absolute values are not calibrated across queries."),startSec:s().describe("Moment start, SECONDS from the media item's start."),endSec:s().describe("Moment end, SECONDS from the media item's start."),thumbUrl:n().nullable().describe("Presigned URL for the media item's thumbnail, or null when it has none. This is the ITEM's thumbnail, not a still of this moment \u2014 render a still of the exact range with preview_frame.")});var The=c({results:h(ax).describe("Matching moments, best first. Empty means nothing matched (when `indexing` is false) \u2014 the library was searched and came back empty-handed."),indexing:R().describe('TRUE when some of the org\'s footage is NOT in the visual index yet \u2014 media that predates it, or is still processing. This is COVERAGE, not emptiness: it can be true ALONGSIDE results, and then it means "these are the best moments among what we have looked at so far", not "these are the best moments". An empty `results` with `indexing: true` means "not looked at yet", NOT "no match" \u2014 re-run the media through processing (reprocess) to index it, then search again. FALSE with empty `results` is a real miss: the library was searched and nothing matched.')}).describe(`Semantic search over the org's OWN footage. The query is embedded with the same CLIP model that embedded every indexed frame, so a description of what you want to SEE ("wide shot of the speaker at a whiteboard") finds the moment even when nobody says those words.`);var khe=100,oCe=c({limit:x().min(1).max(khe).optional(),after:n().optional()});var Che=100,rCe=c({limit:x().min(1).max(Che).optional(),after:n().optional(),projectId:n().optional(),kind:l(["authored","clip","all"]).optional()});var Dhe=100,aCe=c({projection:l(["component-library"]).optional(),origin:l(["builtin","library"]).optional(),libraryKind:l(["definition","preset","recipe"]).optional(),category:l(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),kind:l(["component","transition","scene"]).optional(),tier:l(["recommended","standard","niche"]).optional(),useCase:l(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"]).optional(),mood:n().optional(),q:n().optional(),intent:n().optional(),limit:x().min(1).max(Dhe).optional(),after:n().optional()});var _he=100,cCe=c({limit:x().min(1).max(_he).optional(),after:n().optional(),composeJobId:n().optional(),projectId:n().optional()});var pCe=c({kind:l(["subjectTrack","matte"]).optional(),startSec:s().optional(),endSec:s().optional()});var jhe=100,lCe=c({limit:x().min(1).max(jhe).optional(),after:n().optional(),kind:l(["video","audio","image","gif","asset","source","stock"]).optional(),source:l(["upload","generated","import-url","stock"]).optional(),tag:n().optional()});var Ehe=100,fCe=c({limit:x().min(1).max(Ehe).optional(),after:n().optional(),platform:n().optional(),format:n().optional(),topic:n().optional()});var Phe=100,gCe=c({limit:x().min(1).max(Phe).optional(),after:n().optional(),status:n().optional()});var Lhe=100,zCe=c({limit:x().min(1).max(Lhe).optional(),after:n().optional()});var SCe=c({groupId:n().min(1)});var Vhe=100,vCe=c({limit:x().min(1).max(Vhe).optional(),after:n().optional()});var Ahe=100,RCe=c({limit:x().min(1).max(Ahe).optional(),after:n().optional()});var Fhe=100,MCe=c({limit:x().min(1).max(Fhe).optional(),after:n().optional()});var Uhe=0,Nhe=0,qhe=c({startSec:s().min(Uhe).describe("Source-in of the window to matte, in seconds into the underlying source."),endSec:s().gt(Nhe).describe("Source-out of the window to matte, in seconds into the underlying source.")}).describe("POST /media/:id/matte body. The window is REQUIRED and is the clip's SOURCE trim, not timeline time: a matte's cost scales with its duration, so there is no whole-source default to fall back on.");var Bhe=c({factId:n(),status:l(["pending","ready","failed"]),quotedUsd:s().describe("The server's price for this matte, in USD, quoted from the window duration."),alreadyExisted:R().describe("True when a matte for this exact window was already pending or ready. Nothing was dispatched and nothing will be charged.")}).describe("POST /media/:id/matte response \u2014 the claimed matte fact.");var tl=c({mediaItemId:n(),language:n().nullable(),fullText:n(),utterances:h(b(n(),$())),data:h(b(n(),$())).optional(),pagination:pe.optional()}).describe("Transcript response.");var Whe=c({mediaId:n(),durationSec:s().nullable(),width:s().nullable(),height:s().nullable(),thumbnail:z([c({url:n()}),q()]).describe("Presigned processing thumbnail (~1 week) \u2014 the footage at a glance. For stills at chosen timestamps, use preview_frame with a one-clip composition over this media."),faces:c({status:l(["ready","not_detected"]),windows:h(Xg)}),transcript:c({status:l(["ready","not_transcribed","unavailable"]),data:z([tl,q()])}),beatGrid:z([c({bpm:s(),beatTimesMs:h(s()).describe("Beat onset times in MILLISECONDS \u2014 divide by 1000 for timeline startTime (composition timeline fields are seconds)."),confidence:s().describe("Rhythmic-periodicity strength (0\u20131). Trust the grid for cutting when high; a beatless bed reports low."),method:l(["requested-anchored","detected"]).describe("`requested-anchored` = phase-locked to a requested BPM (a generated bed whose prompt named a tempo); `detected` = full beat tracking (import/upload).")}),q()]).describe("The MUSIC-role rhythm grid (audio-substrate MVP). Present only for a music bed that carries a computed beat grid; null otherwise. For a music-driven film, cut on these beats (transition midpoints on beats, risers resolving on downbeats)."),wordGrid:z([c({wordTimesMs:h(s()).describe("Word onset times in MILLISECONDS, in order \u2014 divide by 1000 for timeline startTime (composition timeline fields are seconds).")}),q()]).describe("The VO-role rhythm grid: word onsets surfaced from the transcript (pure exposure). Present only when a transcript exists; null otherwise. For a VO-driven (narration) film, cut every beat boundary to the voice \u2014 the film-spine rule."),audioRole:z([l(["vo","music","sfx","ambience"]),q()]).describe("DECLARED audio role of this asset (audio-substrate P0): 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO \u2014 never ducks). Author the clip source's `audioRole` from this. Null for footage/images or an undeclared audio asset."),envelope:z([c({envelopeClass:l(["transient","sweep","ambient"]).describe("Coarse temporal shape: 'transient' (a sharp one-shot), 'sweep' (a bounded rise/fall over ~0.5\u20132s), 'ambient' (an unbounded bed)."),attackMs:s().optional(),spectralCentroidHz:s().optional(),meanVolumeDb:s().optional(),maxVolumeDb:s().optional()}),q()]).describe("Envelope evidence (audio-substrate P0). `envelopeClass` is always present when an envelope exists (the SFX pack carries it); the numeric probe stats are present only when an audio probe has run. Null when no envelope is stored."),facts:h(Uo).describe("Derived facts about this source (subject tracks, mattes): what has been computed, its status, and what it was billed. Same shape as GET /media/{id}/facts."),offers:h(No).describe("Enhancements this source does not have yet, with a server quote. Same shape as GET /media/{id}/facts. Mattes are quoted per-window via POST /media/{id}/matte, never here.")}).describe("Read-only authoring context for a source media item: detected face roster + transcript + the temporal grids (beat / word) an agent cuts to, the DECLARED audioRole + envelope of an audio asset, and the paid-enhancement block (facts already computed + offers for what is missing).");var Zhe=c({id:n(),uploadUrl:le(),expiresAt:n()}).describe("POST /media response: reserved media id + a presigned PUT URL. PUT the raw bytes to uploadUrl (\u2264 ~5 GiB), then POST /media/:id/finalize.");var Ghe=0,Hhe=0,Jhe=c({kind:l(["subjectTrack","matte"]).describe("Which enhancement to buy. `transcript` is NOT purchasable here \u2014 it is delivered by the transcription pipeline."),intent:c({startSec:s().min(Ghe),endSec:s().gt(Hhe)}).optional().describe("The SOURCE window. REQUIRED for `matte` (its cost scales with duration). OPTIONAL for `subjectTrack`: give a clip's source window to buy the track the render looks up for THAT clip, and pay only for its duration; omit it to detect the whole source.")}).describe("POST /media/:id/facts body.");var Khe=c({factId:n(),status:l(["pending","ready","failed"]),quotedUsd:s(),alreadyExisted:R().describe("True when this exact fact was already pending or ready. Nothing was dispatched and nothing will be charged.")}).describe("POST /media/:id/facts response.");var Xhe=c({facts:h(Uo),offers:h(No).describe("What is NOT yet present and could be bought. A `matte` offer appears ONLY when the request carried `startSec`+`endSec` (the clip's SOURCE window) \u2014 a matte's price is a function of its duration, so there is no honest whole-source matte quote. `transcript` is never offered: it is produced by the ingest pipeline, not bought here."),exact:Yg.optional()}).describe("Facts and offers for a media item, plus an exact-window resolution when requested.");var Yhe=c({audioRole:l(["vo","music","sfx","ambience"]).optional().describe("Declared audio role: 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO \u2014 never ducks).")}).describe("POST /media/:id/finalize body \u2014 optional declared audioRole.");var Qhe=c({id:n(),status:l(["processing","complete"]),processingPhase:n()}).describe("POST /media/:id/finalize response: ingest triggered (audio/video \u2192 processing) or the item is immediately ready (image/asset \u2192 complete).");var ege=1e4,tge=c({generator:l(["text-to-video","text-to-image","image-to-video","text-to-music","text-to-speech","text-to-sfx","auto"]),prompt:n().min(1).max(ege),style:b(n(),$()).optional().describe("Free-form generation parameters, read per generator. All generators honor `aspect` (string) + `durationSec` (number) where applicable. text-to-speech honors `voice` (string; default voice when omitted), `speed` (number 0.7-1.2), `stability` (number 0-1), and `styleExaggeration` (number 0-1 \u2192 the endpoint's style exaggeration). Provider and model selection are server-owned and cannot be overridden."),refs:c({firstFrameMediaId:n().optional(),lastFrameMediaId:n().optional(),imageMediaIds:h(n()).optional()}).optional()}).describe("POST /media/generate body.");var oge=c({id:n(),status:m("generating"),estimateUsd:s().optional()}).describe("POST /media/generate response.");var nge=2048,rge=500,ige=0,age=10737418240,sge=c({url:le().max(nge),filename:n().min(1).max(rge),contentType:l(["video/mp4","video/quicktime","video/x-matroska","video/webm","audio/mpeg","audio/wav","audio/x-wav","audio/mp4","audio/aac","image/png","image/jpeg","image/webp","image/gif","image/svg+xml","application/json","font/ttf","font/otf","font/woff","font/woff2"]),size:x().gt(ige).max(age).optional(),audioRole:l(["vo","music","sfx","ambience"]).optional().describe("Declared audio role: 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO \u2014 never ducks).")}).describe("POST /media/import body.");var cge=c({id:n(),status:m("importing")}).describe("POST /media/import response.");var sx=c({phase:l(["idle","pending_import","pending_upload","uploading","extracting","loading_model","transcribing","proxy","embedding","analyzing","indexing","generating","rendering","processing","complete","error","cancelled"]),percent:s().nullish(),message:n().nullish(),error:n().nullish()}).describe("Processing status stored on mediaItems rows.");var ol=c({id:n(),status:n(),source:l(["upload","generated","stock"]),name:n(),mimeType:n(),fileSize:s(),duration:s().nullable(),width:s().nullable(),height:s().nullable(),frameRate:s().nullable(),progress:z([c({phase:n(),percent:s().nullable()}),q()]),analysis:z([b(n(),$()),q()]),listUsd:s().optional().describe("A2 money stamp \u2014 GENERATED media only: the generate meter's LIST price (USD) at the success terminal. A plan allowance may zero the invoice line. Absent for uploads/imports, failures, x402 (on-chain receipts)."),thumbnailUrl:n().nullable().describe("Presigned GET URL for the item's thumbnail (an uploaded image is its own thumbnail), valid ~7 days \u2014 fetch it directly, no auth header. null when no thumbnail exists yet (still processing, stock imports, audio)."),kind:n().nullable(),tags:z([h(n()),q()]),attribution:z([c({provider:l(["pexels","pixabay","freesound","klipy"]),externalId:n().nullable(),assetUrl:n().nullable(),license:n().nullable()}),q()]),processingStatus:z([sx,q()]),createdAt:n(),updatedAt:n()}).describe("Media item response per \xA7Media.");var dge=c({data:h(ol),pagination:pe});var pge=500,mge=0,lge=10737418240,uge=c({filename:n().min(1).max(pge),contentType:l(["video/mp4","video/quicktime","video/x-matroska","video/webm","audio/mpeg","audio/wav","audio/x-wav","audio/mp4","audio/aac","image/png","image/jpeg","image/webp","image/gif","image/svg+xml","application/json","font/ttf","font/otf","font/woff","font/woff2"]),size:x().gt(mge).max(lge),projectId:n().min(1).optional()}).describe("POST /media upload initiation body.");var fge=c({jobId:n(),status:n(),muxedItems:z([b(n(),n()),q()]).optional(),error:n().nullish(),startedAt:n().nullish(),completedAt:n().nullish()}).describe("Mux job response.");var rDe=c({sessionId:n()});var hge=0,gge=0,xge=c({fromSec:s().min(hge).describe("Window start, seconds into the composition."),toSec:s().gt(gge).describe("Window end (exclusive), seconds."),compositionId:n().min(1).optional().describe("Target a specific composition; defaults to the project's active composition.")}).describe("POST /projects/:id/preview-clip body.");var zge=18,bge=.1,Sge=1,yge=100,vge=c({composition:$().optional().describe("The composition to render. Absent \u21D2 the project's ACTIVE composition \u2014 what create_render will encode. The response's `previewed.source` names what was rendered."),compositionId:n().optional().describe("Preview a SPECIFIC persisted composition of this project (create_render parity). Absent \u21D2 the active one. A stale/foreign id is a 404 \u2014 never a silent fall-through."),session_id:n().optional().describe("Compose-session id: render that session's SCRATCH composition (what the session has been editing) instead of the active row. Ignored when `composition` is passed."),timestamps:h(s()).min(1).max(zge).describe("Composition seconds to capture, 18 per request. The batch renders as ONE unit of work \u2014 one warm container, one source decode, N seeks \u2014 and that unit has a fixed time budget, so a larger batch is refused here rather than accepted and timed out minutes later. For a denser sweep, split it across calls; identical beats are served from the still cache, so overlapping batches are cheap."),imageFormat:l(["png","jpeg"]).optional().describe("Still format. Default jpeg \u2014 these pixels go to a vision model, where jpeg is equivalent and png costs multiples in bytes to store and move. Pass png only when you need full fidelity."),scale:s().min(bge).max(Sge).optional().describe("Render scale 0.1\u20131. Default 0.5, which is what this schema has always recommended for vision-bound looks. Pass 1 when judging fine detail \u2014 it costs ~4x the vision tokens."),jpegQuality:x().min(1).max(yge).optional().describe("JPEG quality (jpeg only). Default 70 \u2014 the quality the eval panel grades at.")});var wge=300,Rge=0,Ige=1e4,Mge=120,Oge=c({brandKits:h(c({id:n(),name:n(),audio:c({sfxIntensity:l(["off","light","standard","dense"]).optional(),musicEnabled:R().optional(),musicMood:n().max(wge).optional(),sonicLogo:c({ref:n().min(1),placement:l(["intro","outro","both"]),offsetMs:x().min(Rge).max(Ige).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:c({tick:n().min(1).optional(),pop:n().min(1).optional(),impact:n().min(1).optional(),confirm:n().min(1).optional(),error:n().min(1).optional(),whoosh:n().min(1).optional(),riser:n().min(1).optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:c({bedId:n().min(1).optional(),genre:n().max(Mge).optional(),bpmRange:c({min:s(),max:s()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:z([c({ref:n().min(1)}),q()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional()})).describe("The org's brand kits (bind one to a project via update_project). `audio` carries the brand sound kit when set."),critics:h(pa).describe("Registered critics \u2014 run in the Director's gates AND score_composition."),references:h(c({mediaId:n(),name:n().optional(),thumbnailUrl:n().optional().describe("Presigned reference thumbnail (~1 week).")})).describe("The union of critic reference media \u2014 the org's visual standard, with provenance."),recentDecisions:h(c({checkpointId:n(),projectId:n(),kind:l(["gate","score"]),stage:l(["content","layout","motion"]).optional(),decision:n(),decidedAt:s()})).describe("The last recorded checkpoint decisions \u2014 the raw taste log phase 2 will distill.")}).describe("The org's legible taste: brand + critics + references + decision log.");var $ge=0,Tge=9007199254740991,cx=c({hasComposition:R(),sceneCount:x().min($ge).max(Tge),duration:s().nullable(),updatedAt:n().nullable()}).describe("Summary of a project's stored composition.");var dx=c({id:n(),name:n(),kind:n().nullable(),durationSec:s().nullable().describe("Seconds. Uses the media duration when known; audio without one falls back to its transcript's measured duration (same rule as get_media_context)."),hasTranscript:R().describe("A cached transcript EXISTS for this item. The bodies are never inlined here \u2014 fetch one with GET /v1/media/{id}/transcript (or get_media_context for faces + grids too).")}).describe("One media item as the project context lists it: identity + duration + whether a transcript exists.");var px=z([c({status:m("ready"),mediaId:n(),words:h(c({text:n(),start:s().describe("Word onset (SECONDS from source start)."),end:s().describe("Word end (SECONDS from source start).")}))}),c({status:m("unavailable"),mediaId:n()})]);var kge=0,Cge=0,Dge=c({composition:z([ut,q()]).describe("The project's ACTIVE composition wire shape \u2014 identical to GET /v1/projects/{id}/composition. NULL when the project has no composition yet (a freshly created project): mint one with new_composition, or let the first apply_composition create it."),format:z([c({aspectRatio:l(["16:9","9:16","1:1","4:5"]),fps:z([m(24),m(25),m(30),m(60)]).optional(),resolution:l(["hd","fhd","4k"]).optional(),platform:n().optional()}),q()]).describe("The composition's format, hoisted \u2014 the pixel frame every card/graphic must be authored against. Null whenever `composition` is null."),media:h(dx).describe("The org's media library (most recent first, capped) \u2014 the pool this project can draw clips from."),transcript:z([px,q()]).describe('The FIRST transcribed media item\'s word-timed transcript, flattened \u2014 the spine a VO-driven film cuts to. `status:"ready"` carries the words; `status:"unavailable"` means the transcript exists but its body could not be fetched (retry); null means nothing in `media` is transcribed. For any OTHER transcribed item (see each entry\'s `hasTranscript`), read GET /v1/media/{id}/transcript.'),brandKit:z([Wn,q()]).describe("The kit BOUND to this project (`projects.brandKitId` is the brand SSOT \u2014 bind one via update_project). Null when the project has no kit bound; enumerate the org's kits with GET /v1/brand-kits."),markers:h(c({id:n().min(1),startTime:s().min(kge),endTime:s().min(Cge).optional(),kind:n().min(1),name:n().optional(),metadata:b(n(),$()).optional()})).describe("The composition's markers \u2014 hoisted alongside `format`. Empty when the composition carries none AND when there is no composition yet.")}).describe("One-call agent context for a project: composition + format + media pool + the lead transcript + the bound brand kit + markers. Replaces get_composition + get_media_context + get_profile at the start of an authoring session. A 404 means the project doesn't exist for your org \u2014 never that it is empty.");var _ge=200,jge=0,Ege=0,Pge=c({name:n().min(1).max(_ge),description:n().optional(),format:he.optional(),brandKitId:n().min(1).optional(),width:s().gt(jge).optional(),height:s().gt(Ege).optional()}).describe("POST /projects body.");var mx=z([c({id:n(),status:n(),createdAt:n(),outputUrl:n().nullable(),outputExpiresAt:n().nullable()}),q()]).describe("Most recent render for a project, if any.");var nl=c({id:n(),name:n(),description:n().nullable(),format:z([he,q()]),brandKitId:n().nullable(),activeCompositionId:n().nullable(),composition:cx,lastRender:mx,webUrl:n().nullable().describe("A browser URL that opens THIS project, or null when CueFrame exposes no web view for a project. Null today: the console serves account surfaces (keys, usage, billing) and has no per-project page, so there is no link to give. Do NOT synthesise one \u2014 a guessed console path 404s. Show the user rendered output (create_render \u2192 outputUrl) or a preview still instead. This field becoming non-null is the signal that a real project view exists."),createdAt:n()}).describe("Project response per \xA7Projects.");var Lge=c({data:h(nl),pagination:pe});var Vge=200,Age=c({name:n().min(1).max(Vge).optional(),description:n().optional(),format:he.optional(),brandKitId:n().min(1).optional()}).describe("PATCH /projects/:id body.");var Fge=c({clipSuggestionId:n().min(1).optional(),compositionId:n().min(1).optional().describe("Target a specific composition in the project; defaults to the project's active composition."),format:he.optional(),priority:l(["interactive","standard","background"]).optional(),intent:l(["preview","final"]).optional(),brandKitId:z([n().min(1),q()]).optional()}).describe("POST /projects/:id/renders body.");var Uge=c({manifestVersion:n().describe("Identifies this exact face table. Derived from the table's own content, so it moves when and only when the admitted set moves. Record it beside a composition to state which face table a font choice was validated against."),families:h(c({family:n().describe("The family name authoring accepts VERBATIM \u2014 card, caption and scene text alike."),weights:h(c({min:s(),max:s()})).describe("The weights a shipped file declares. A static face has min === max; a variable face gives its declared wght axis range. Any weight inside a range renders; anything outside every range is REFUSED, never synthesised."),styles:h(l(["normal","italic"])).describe("The styles bytes exist for in this family. Request italic only when this list includes 'italic'; the renderer refuses synthetic slant."),captionDefaults:c({base:s(),emphasis:s()}).describe("The weights a caption is drawn at when the style names none."),origin:l(["bundled","aliased"]).describe("'bundled' = bytes ship in the render bundle. 'aliased' = a metric-compatible binary stands in for the named family.")}))}).describe("GET /fonts response \u2014 the renderer's admitted font set. Derived from the same table the font gate refuses by, so any family/weight/style here passes validation by construction. Covers the BUNDLED set only: a brand kit's sealed faces are per-org and per-render.");var Nge=0,qge=9007199254740991,Bge=0,Wge=9007199254740991,lx=c({phase:l(["queued","validating","presigning","collecting-artifacts","resolving","detecting","baking-matte","translating","spawning","encoding","uploading"]),percent:s(),scenesCompleted:x().min(Nge).max(qge).optional(),scenesTotal:x().min(Bge).max(Wge).optional()}).describe("Non-terminal render progress; phase is one of the worker's emitted stages.");var rl=c({id:n(),status:l(["queued","pending","rendering","complete","error","cancelled"]),progress:lx.optional(),outputUrl:n().nullable(),outputExpiresAt:n().nullable(),error:n().nullable().describe("Human-readable failure message. Pair with `errorCode` for a stable, machine-readable code an agent runner can branch on."),errorCode:n().nullable().describe("Stable, machine-readable error code (e.g. `render_pipeline_unavailable`, `render_route_missing`, `render_pipeline_failed`). Null when status is not `error` or unavailable for an older render."),errorDetails:z([b(n(),$()),q()]).describe("Structured failure context \u2014 `{ targetUrl?, upstreamStatus?, upstreamCode?, attemptedAt? }`. Surfaced so agent runners can distinguish operator-config issues from upstream-down vs route-missing without parsing `error`."),category:z([l(["authoring","transient","internal"]),q()]).describe("Failure taxonomy when status is `error`; null otherwise. `authoring` = deterministic defect in YOUR composition/request \u2014 fix it, retrying is futile; `transient` = temporary pipeline/infra failure \u2014 safe to retry_render; `internal` = unexpected server fault \u2014 retry once then escalate. Mirrors the render.failed webhook's `category`."),retryable:R().nullable().describe("Whether re-attempting the SAME render can succeed (status `error`); null otherwise. true \u2192 call retry_render. false \u2192 deterministic (category authoring/internal); fix the composition first \u2014 retry_render alone reproduces it. Mirrors the render.failed webhook's `retryable`."),createdAt:n(),updatedAt:n().describe("ISO-8601 timestamp of the render's most recent progress update. Compute staleness = now \u2212 updatedAt to distinguish a wedged render from a slow one and decide whether to wait, cancel, or retry."),listUsd:s().optional().describe("A2 money stamp: the metered event's LIST price (USD), stamped at the success terminal (exports for deliverable renders, compose_capture for A8 previews). A plan allowance may zero the actual invoice line \u2014 this is the list price, never a Stripe charge. Absent while running, on failure, and for x402 orgs (on-chain receipts). Mirrors the get_usage ledger."),warnings:h(n()).optional().describe("Non-fatal advisories surfaced at render-CREATE (omitted when none, and on GET \u2014 create-time only).")}).describe("Render job response per \xA7Renders.");var Zge=c({data:h(rl),pagination:pe});var Gge=c({outputUrl:n(),outputExpiresAt:n()}).describe("POST /refresh-url response.");var Hge=new RegExp("^[a-f0-9]{64}$"),FDe=c({collection:n().min(1),id:n().min(1),revision:n().regex(Hge)});var ma=c({candidateId:n(),provider:l(["pexels","pixabay","freesound","klipy"]),kind:l(["video","photo","sfx","gif"]),thumbnail:n(),previewUrl:n(),downloadUrl:n().optional(),duration:s().optional(),width:s().optional(),height:s().optional(),author:n(),authorUrl:n().optional(),assetUrl:n().optional(),license:n().optional()}).describe("A stock resource search candidate.");var Jge=c({kind:l(["sfx-pack","music-pack"]).optional(),id:n().min(1).optional(),projectId:n().min(1).optional(),candidateId:n().min(1).optional()}).describe('POST /resources/import body \u2014 stock candidate lane { projectId, candidateId } OR curated pack lane { kind:"sfx-pack"|"music-pack", id }.');var Kge=c({id:n(),status:l(["importing","ready"])}).describe("POST /resources/import response.");var Xge=200,Yge=200,Qge=10,exe=0,txe=50,oxe=0,nxe=9007199254740991,rxe=0,ixe=9007199254740991,axe=0,sxe=0,cxe=c({query:n().min(1).max(Xge).optional(),queries:h(n().min(1).max(Yge)).min(1).max(Qge).optional(),kind:l(["video","photo","sfx","gif"]).optional(),provider:l(["pexels","pixabay","freesound","klipy"]).optional(),limit:x().gt(exe).max(txe).optional(),minWidth:x().gt(oxe).max(nxe).optional().describe("Video-only minimum selected-rendition width in pixels; smaller results are excluded."),minHeight:x().gt(rxe).max(ixe).optional().describe("Video-only minimum selected-rendition height in pixels; smaller results are excluded."),durationSec:c({min:s().min(axe).optional(),max:s().gt(sxe).optional()}).optional().describe("sfx-only clip-length bound in seconds \u2192 Freesound native filter.")}).describe("POST /resources/search body \u2014 one `query`, or a batch of `queries[]`.");var ux=c({query:n(),provider:l(["pexels","pixabay","freesound","klipy"]).optional(),kind:l(["video","photo","sfx","gif"]).optional(),candidates:h(ma),error:n().optional()}).describe("One query's candidates within a batch search.");var dxe=c({provider:l(["pexels","pixabay","freesound","klipy"]).optional(),kind:l(["video","photo","sfx","gif"]).optional(),candidates:h(ma).optional(),results:h(ux).optional()}).describe("POST /resources/search response \u2014 `candidates` for one query, `results[]` for a batch.");var pxe=-9007199254740991,mxe=9007199254740991,lxe=c({ok:m(!0),stage:l(["content","layout","motion"]).optional(),version:x().min(pxe).max(mxe).optional(),composeJobId:n().optional()}).describe("Decision recorded; the run resumes (the SAME rail as POST /checkpoints/{id}/resume).");var uxe=-9007199254740991,fxe=9007199254740991,hxe=-9007199254740991,gxe=9007199254740991,xxe=-9007199254740991,zxe=9007199254740991,bxe=c({id:n(),projectId:n(),composeJobId:n().optional(),briefId:n().optional(),kind:l(["gate","score"]),stage:sa.optional(),version:x().min(uxe).max(fxe),status:l(["awaiting","approved","revised","abandoned","expired","superseded"]),artifact:$().describe("The stage artifact under review: the locked ComposePlan at content; the composition wire shape at layout/motion; the judged composition snapshot on kind:'score'."),stillUrls:h(n()).optional().describe("Presigned storyboard/eval stills \u2014 the packet's visual evidence (may be GC'd by the retention sweep after the job goes terminal; the decision record is immortal)."),criticVerdicts:$().optional().describe("Per-criterion scores + critique from the design loop / judge, incl. lock_violation entries."),quote:aa.optional(),revisionCycle:x().min(hxe).max(gxe).describe("Revise cycles this gate has consumed. The brief quote states the included count (revisionCyclesIncluded); beyond it, resume(revise) is refused with a typed error."),decision:$().optional().describe("The recorded decision {decision, comments?, globalNote?, decidedAt} once resolved."),reviewMode:l(["agent","hosted"]).optional().describe("How this packet is decided (from the Brief's gates). 'hosted' = the review PAGE captures the decision; absent/'agent' = the decision flows back through the driving agent."),createdAt:s(),updatedAt:s(),versionStack:h(c({id:n(),version:x().min(xxe).max(zxe),stage:l(["content","layout","motion"]).optional(),status:n(),decision:n().optional(),createdAt:s()})).describe("The run's v1\u2192vN gate history \u2014 per-version status + decision summaries.")});var Sxe=c({composition:$().optional().describe("The composition to judge. Absent \u21D2 the project's ACTIVE composition."),compositionId:n().optional().describe("Judge a SPECIFIC persisted composition of this project (create_render parity). Absent \u21D2 the active one. A stale/foreign id is a 404 \u2014 never a silent fall-through."),session_id:n().optional().describe("Compose-session id: judge that session's SCRATCH composition (what the session has been editing) instead of the active row. Ignored when `composition` is passed."),editorialIntent:n().optional(),brandContext:n().optional()});var yxe=10,vxe=25,o1e=c({q:n().min(1),limit:x().min(1).max(vxe).default(yxe)});var fx=c({startSec:s(),endSec:s(),candidateId:n().describe("The chosen audio source (the clearest mic) for this span \u2192 programAudioSourceId."),reasons:h(n())});var hx=c({startSec:s(),endSec:s(),candidateId:n(),sourceInSec:s().describe("Chosen source window start (declared-offset resolved)."),sourceOutSec:s(),reasons:h(n())});var gx=c({candidateId:n().describe("Stable angle/source id. An unknown id is rejected, never remapped."),role:n().nullish().describe('Agent-declared semantic tag (e.g. "wide", "webcam").'),score:s().describe("The weighted prominence score (\u03A3 weights\xB7signal)."),contributions:b(n(),s()).describe("signalKey \u2192 weighted contribution (the agent reweights from this)."),reasons:h(n())});var xx=c({startSec:s().describe("Span start (output seconds)."),endSec:s().describe("Span end (output seconds)."),chosen:n().describe('The recommended candidateId, or "__hold__" (abstain).'),pacingNote:n().nullish().describe("Which mechanism produced the pick (argmax / hysteresis / override / hold \u2026)."),candidates:h(gx)});var wxe=c({projectId:n(),groupId:n(),selectorVersion:n(),signalVersions:b(n(),n()),moments:h(xx),recommendation:c({cutSchedule:h(hx),audioBed:h(fx).describe("Best-audio bed (instance #3): the clearest mic per span."),suppressedSwitches:h(c({atSec:s(),wouldHaveBeenCandidateId:n(),byScore:s(),blockedBy:n(),releaseAtSec:s().nullable()})).describe("Switches the stabilizer suppressed (the anti-ping-pong audit).")}),divergesFromComposition:R().optional()}).describe("Selector (switch) candidates + recommendation for a synced-angle group. Every candidate carries score + contributions + reasons so the agent reweights from evidence; the recommendation is the lowered cut schedule + best-audio bed.");var Rxe=0,Ixe=0,Mxe=0,Oxe=0,$xe=0,Txe=c({groupId:n().min(1),weights:b(n(),s()).optional().describe("Sparse prominence weights (the taste knob, non-negative). Default = DOMINANCE_WEIGHTS."),minHoldSec:s().gt(Rxe).optional(),enterSec:s().min(Ixe).optional(),switchMargin:s().min(Mxe).optional(),cooldownSec:s().min(Oxe).optional(),maxHoldSec:s().gt($xe).optional(),lockSourceId:n().optional().describe("Pin a camera/angle for the whole timeline."),overrides:h(c({startSec:s(),endSec:s(),candidateId:n()})).optional()});var kxe=200,Cxe=50,Dxe=20,_xe=c({name:n().min(1).max(kxe),files:h(c({mediaId:n().min(1),role:n().min(1).max(Cxe)})).min(1).max(Dxe)}).describe("POST /sessions body.");var zx=c({mediaId:n(),role:n(),status:n().nullable()}).describe("One file member of a session, with optional role + status.");var jxe=0,Exe=9007199254740991,bx=c({id:n(),name:n(),fileCount:x().min(jxe).max(Exe),muxStatus:n().nullable(),createdAt:n()}).describe("Session list summary (per list endpoint).");var Pxe=c({data:h(bx),pagination:pe});var Lxe=c({id:n(),name:n(),files:h(zx),mux:c({status:n().nullable(),jobId:n().nullable(),muxedItems:z([b(n(),n()),q()]),error:n().nullable(),startedAt:n().nullable(),completedAt:n().nullable()}),createdAt:n()}).describe("Session response per \xA7Sessions.");var Sx=c({name:n(),title:n(),description:n()}).describe("A CueFrame agent skill (metadata).");var Vxe=c({skills:h(Sx)}).describe("GET /skills response \u2014 the available agent skills.");var Axe=c({factId:n().describe("Opaque identifier for the derived fact."),status:l(["pending","ready","failed"]).describe("State of the fact right now. `ready` with `alreadyExisted` means the detection was already computed and is available immediately."),quotedUsd:s().describe("The server's price for this detection, in USD, quoted from the source duration. Zero is charged when `alreadyExisted` is true."),alreadyExisted:R().describe("True when this exact detection was already pending or ready. Nothing was dispatched and nothing will be charged \u2014 the same fact is served twice for one price.")}).describe("POST /media/:id/detect-subjects response \u2014 the claimed perception fact.");var Fxe=0,Uxe=9007199254740991,yx=c({id:n(),briefId:n().nullable(),rank:x().gt(Fxe).max(Uxe),trim:c({start:s(),end:s()}),score:s(),title:n(),reason:n(),topic:n(),hook:n(),platforms:h(n()),format:n(),caption:n(),hashtags:h(n()),textOverlays:h(n()),editingNotes:n(),motionStyle:c({textAnimation:n(),transitions:n(),colorMood:n(),captionStyle:n()}),visualTreatment:h(c({time:z([s(),n()]),visual:n()})),brollSuggestions:h(c({moment:n(),searchTerms:h(n()),rationale:n()})),thumbnailConcept:n()}).describe("Single ranked clip suggestion.");var Nxe=c({status:l(["idle","generating","completed","failed"]),createdAt:n().nullable(),analyzedAt:n().nullable(),jobId:n().nullable(),topics:h(n()),suggestions:h(yx),pagination:pe}).describe("GET /media/:id/suggestions envelope.");var qxe=c({status:l(["queued","running","complete","failed"]),alreadyRunning:R().optional()}).describe("POST /media/:id/suggestions response.");var Bxe=-9007199254740991,Wxe=9007199254740991,C1e=c({templateId:n(),version:x().min(Bxe).max(Wxe),pendingMediaIds:h(n())});var Zxe=new RegExp("^https:\\/\\/.*"),qo=z([c({mediaId:n().min(1)}),c({url:Ce("starts_with",Zxe),mimeType:n().min(1).optional()}),c({sample:m(!0)})]);var Gxe=new RegExp("^[a-f0-9]{64}$"),Hxe=0,Jxe=0,Kxe=9007199254740991,Xxe=128,Yxe=1,Qxe=new RegExp("^[a-f0-9]{64}$"),eze={},tze={},oze=c({documentSha256:n().regex(Gxe).optional(),insert:c({startTime:s().min(Hxe),idPrefix:n().min(1)}).optional(),expectedRevision:x().min(Jxe).max(Kxe).optional(),commandId:n().min(1).max(Xxe).optional(),componentExecutionVersions:h(m(3)).min(1).max(Yxe).optional(),expectedBrandIdentity:n().regex(Qxe).optional(),projectId:n().min(1),values:b(n(),$()).default(eze),media:b(n(),qo).default(tze),preset:n().min(1).optional(),brandKitId:n().min(1).optional()});var nze=-9007199254740991,rze=9007199254740991,ize=c({projectId:n(),compositionId:n(),versionId:n(),etag:n(),templateId:n(),version:x().min(nze).max(rze),components:h(c({documentKey:n(),componentId:n(),sourceVersionId:n(),created:R()}))});var la=b(n(),$()).describe("A CueFrame template document (kernel TemplateDocument): v: 1, slug, name, composition with {{name}} references, parameters, components by value, an optional brandKit, presets, rubric, gallery and provenance.");var vx=z([c({mediaId:n().min(1)}),c({sample:m(!0)})]).describe("A media value a dry run can resolve without importing anything: `{ mediaId }` (one of this org's media rows) or `{ sample: true }` (the parameter's pinned sample).");var aze=200,sze={},cze={},dze=c({projectName:n().min(1).max(aze),values:b(n(),$()).default(sze),media:b(n(),qo).default(cze),preset:n().min(1).optional(),brandKitId:n().min(1).optional()});var pze=c({jobId:n(),projectId:n().nullable(),status:l(["preparing","ready","failed","cancelled"]),stage:l(["resolving","downloading","verifying","importing","processing","attaching","applying","preflighting","ready"]),templateRef:n(),documentSha256:n().nullable(),errorCode:n().optional(),errorMessage:n().optional(),createdAt:n(),updatedAt:n()});var mze=-9007199254740991,lze=9007199254740991,uze=new RegExp("^[a-f0-9]{64}$"),wx=c({id:n(),slug:n(),name:n(),version:x().min(mze).max(lze),documentSha256:n().regex(uze),fromCatalog:R(),createdAt:n(),updatedAt:n()});var fze=c({data:h(wx),pagination:pe});var Rx=c({code:n().describe("The problem's code: template_parse, template_parameter_undeclared, template_reference_misplaced, template_media_site, template_matte_stale, template_sample_missing, template_media_required, template_preset_unknown, template_values_invalid, template_media_kind_mismatch or payload_too_large."),param:n().optional().describe("The parameter the problem names, when it names one."),message:n()});var Ix=c({document:la,dryRun:R().optional().describe("When true, store nothing: answer 200 with the kernel's verdict on the document as `TemplateValidateResponse`. Without `values`, `media` or `preset` the document itself is checked (every preset binds against the parameters' samples and placeholder values for required parameters that have no default). With any of them, only the caller's inputs are bound, `{ mediaId }` values against this org's real media rows."),values:b(n(),$()).optional().describe("Dry run only (400 without `dryRun: true`): parameter values to bind, by parameter name."),media:b(n(),vx).optional().describe("Dry run only (400 without `dryRun: true`): media values to bind, by media parameter name."),preset:n().min(1).optional().describe("Dry run only (400 without `dryRun: true`): the preset whose values the bind starts from.")});var hze=80,gze=new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$"),Mx=c({slug:n().max(hze).regex(gze)});var xze=z([Ix,Mx]);var zze={},bze={},Sze=0,yze=c({values:b(n(),$()).default(zze),media:b(n(),qo).default(bze),preset:n().min(1).optional(),brandKitId:n().min(1).optional(),posterAt:s().min(Sze).optional().describe("Seconds into the render for the poster still; default 1.")});var vze=-9007199254740991,wze=9007199254740991,Rze=c({id:n(),status:l(["preparing","rendering","complete","failed","cancelled","revoked"]),templateId:n(),version:x().min(vze).max(wze),preset:n().optional(),brandKitId:n().optional(),shareUrl:n().nullable(),posterUrl:n().nullable(),renderId:n().nullable(),errorCode:n().optional(),errorMessage:n().optional(),expiresAt:n().optional(),createdAt:n(),updatedAt:n()});var Ize=-9007199254740991,Mze=9007199254740991,Oze=new RegExp("^[a-f0-9]{64}$"),$ze=c({id:n(),slug:n(),name:n(),version:x().min(Ize).max(Mze),documentSha256:n().regex(Oze),fromCatalog:R(),document:la,createdAt:n(),updatedAt:n()});var Tze=c({ok:R().describe("True when the kernel found no problem."),slug:n().nullable().describe("The document's slug, or null when the document did not carry one."),problems:h(Rx).describe("Every problem found, in the order the kernel's checks run; empty when `ok`.")});var kze=1e3,Cze=0,Dze=0,_ze=256,jze=256,Eze=0,Pze=0,Lze=256,Vze=12e3,Aze=c({words:h(c({text:n().min(1).max(kze),timelineStart:s().min(Cze),timelineEnd:s().min(Dze),clipId:n().min(1).max(_ze),poolItemId:n().min(1).max(jze),sourceStart:s().min(Eze),sourceEnd:s().min(Pze),speakerId:z([n().max(Lze),q()])})).min(1).max(Vze)}).describe("A bounded merged timeline transcript for CueFrame edit analysis. The server selects the model; clients cannot provide a provider, API key, or model override.");var Fze=0,Uze=9007199254740991,Nze=0,qze=9007199254740991,Bze=0,Wze=9007199254740991,Zze=c({fillers:h(x().min(Fze).max(Uze)),silenceGaps:h(x().min(Nze).max(qze)),emphasis:h(x().min(Bze).max(Wze))}).describe("CueFrame-model analysis of timeline word indices. Every returned index refers to the request's words array.");var Gze=64,Hze=new RegExp("^[a-z][a-z0-9_]*$"),Jze=0,Kze=1,Xze=500,Yze=10,Qze=c({scores:h(c({name:n().min(1).max(Gze).regex(Hze),value:s().min(Jze).max(Kze),comment:n().max(Xze).optional()})).min(1).max(Yze)}).describe("POST /traces/:traceId/scores body.");var ebe=-9007199254740991,tbe=9007199254740991,obe=c({accepted:x().min(ebe).max(tbe)}).describe("POST /traces/:traceId/scores response.");var nbe=0,rbe=0,ibe=c({task:l(["summary","chapters","highlights"]).describe("What to ask of the transcript. `summary` \u2014 prose: the argument plus the concrete takeaways as bullets. `chapters` \u2014 one line per subject change, `[h:mm:ss] Title \u2014 description`. `highlights` \u2014 up to 8 standalone moments, strongest first, one line each as `[h:mm:ss]-[h:mm:ss] Title \u2014 why it lands` plus the line that carries it. Every timestamp is ABSOLUTE seconds from the start of the media, including when you pass a `window`, and every one is verified against the transcript before you see it \u2014 but they are LINE-START markers about 15s apart, so treat a span as APPROXIMATE (up to 15s early) and refine it against the word timings from GET /v1/media/{id}/context before you cut."),window:c({startSec:s().min(nbe).describe("Window start, SECONDS from the start of the media."),endSec:s().min(rbe).describe("Window end, SECONDS from the start of the media.")}).optional().describe("Analyse only this slice of the transcript. Omit to analyse all of it. Words are windowed exactly as captions.fromTranscript windows them (a word straddling an edge is clamped, a word wholly outside is dropped). Use this when a long recording is rejected with `transcript_too_long`, and to chapter a single segment of a podcast without paying for the whole thing.")}).describe("One editorial question about a media item's transcript.");var abe=c({task:l(["summary","chapters","highlights"]).describe("Echo of the requested task \u2014 so a batched caller can pair answers to asks."),result:n().describe("The answer, as text. `summary` is prose; `chapters` and `highlights` are one record per LINE in the shape documented on the request's `task` field \u2014 split on newlines to parse them. Timestamps are absolute seconds from the start of the media and every one is CHECKED against the transcript before the response is returned (a fabricated timestamp fails the call rather than shipping), but they are line-start markers about 15s apart \u2014 a boundary can sit up to 15s BEFORE the moment you want. Use them to locate, not to cut: refine against the word timings in GET /v1/media/{id}/context.")}).describe("The analysis of one media item's transcript. Metered: this is a real LLM call, billed on measured token spend, so it is not a read to poll.");var u2e=c({detector:l(["face","person"]).optional()});var sbe=c({projectId:n().optional().describe("Optional project to scope the token to; omitted = org library.")});var cbe=-9007199254740991,dbe=9007199254740991,pbe=c({token:n(),expiresAt:x().min(cbe).max(dbe).describe("Expiry, ms since epoch (~30 min TTL).")}).describe("POST /uploads/token response: a short-lived token for the signed upload lane (the upload-signing worker's `uppy-auth-token` header). The org is derived from the session server-side and stamped into the token.");var Ox=c({featureId:n().describe("The metered plan feature (exports, compose, compose_verify, \u2026)."),value:s().optional().describe("Metered amount, in the feature's own unit (exports = render-minutes, storage = GB). Absent for a discrete single use, AND deliberately absent on the cost-plus lines (compose, generate, ai_tokens, compose_verify) whose internal metered unit is not a quantity \u2014 read `listUsd` for what those events cost you."),projectId:n().optional(),jobId:n().optional().describe("The job that produced the meter: a render/compose/preview job id, a media id (transcription, generate), or a clip-suggestion run id (jobKind `suggestions` \u2014 see `mediaItemId` for the media it analyzed)."),jobKind:n().optional().describe("render | compose | consult_* | verify | preview | generate | suggestions | session_uptime | \u2026"),mediaItemId:n().optional().describe("The media item the job ran over, when it ran over one (suggestions, transcription). Resolve it with GET /v1/media/{id}."),listUsd:s().optional().describe("LIST price of this metered event, USD. Honest naming: the invoice may zero it inside a plan allowance \u2014 this is the event's list price, not a Stripe line item."),createdAt:s().describe("Epoch-ms when the meter landed.")});var mbe=c({data:h(Ox),pagination:pe});var y2e=c({contract:n().describe("The contract this verdict was computed against (the kernel version the deployment runs). If it differs between two calls, the validator changed, not your composition."),valid:R(),errors:h(c({code:n(),stage:n(),category:n(),retryable:R(),message:n(),fix:b(n(),$()).optional()})),advisories:h(c({rule:n(),criterion:n(),clipId:n().optional(),detail:n(),fix:n()})).describe("Deterministic, render-free QUALITY floors (the SAME named defects the Director's in-loop verify and score_composition surface: static-hold, caption-spine, sfx-density, sfx-speech-collision, bed-coverage, audio-role). NON-blocking \u2014 they never flip `valid` (an editorially-weak composition still renders); fix them for quality, not to save. Empty when the composition is clean or the wire shape failed (they need a parsed composition)."),warnings:h(n()).optional().describe("Non-blocking render-fidelity warnings detected before enqueue, including unavailable font families."),quote:c({thisStepUsd:s(),jobSpendSoFarUsd:s(),estimatedJourneyTotalUsd:s()}).describe("The A2 money triple for the commodity lane: validate is free; estimatedJourneyTotalUsd is the render price to finish from a valid composition \u2014 relay it BEFORE create_render.")});var it=l(["media.transcribed","media.completed","suggest.completed","session.mux.complete","session.mux.failed","render.completed","compose.completed","checkpoint.ready","project.updated","composition.updated","webhook.test"]);var lbe=0,ube=6e4,fbe=c({url:le().min(1),events:h(it).min(1),settleMs:x().min(lbe).max(ube).optional()}).describe("POST /webhooks body.");var hbe=0,gbe=9007199254740991,xbe=c({id:n(),url:le(),events:h(it),settleMs:x().min(hbe).max(gbe),enabled:R(),status:l(["active","pending"]).describe("active = ownership verified + receiving events; pending = challenge not echoed, inactive."),secret:n().describe("Standard Webhooks signing secret, format `whsec_<base64>`. Returned ONCE at create; rotate = delete + recreate. Every delivery carries `webhook-id`, `webhook-timestamp` (unix seconds), and `webhook-signature: v1,<base64>` (HMAC-SHA256 over `{id}.{timestamp}.{rawBody}`). Verify with any Standard-Webhooks library (`standardwebhooks` / `svix`): `new Webhook(secret).verify(rawBody, headers)`."),verification:c({status:m("pending"),reason:n()}).optional().describe('Present ONLY when ownership verification did not complete (status:"pending"). CueFrame POSTs a signed `webhook.verify` challenge whose `data.token` your endpoint must echo in a 2xx to activate; `reason` is one of token_not_echoed | non_2xx_<code> | unreachable | ssrf_blocked. A pending webhook receives no events \u2014 fix the receiver and POST /webhooks/:id/verify (no delete/recreate needed). See GET /webhooks/events for the full contract.')}).describe("POST /webhooks response (secret present exactly once).");var zbe=c({delivery:b(n(),$()).describe("The shared HTTP envelope + headers + retry semantics."),signing:b(n(),$()).describe("Standard Webhooks signing: secret format, signed content, how to verify."),ownershipVerification:b(n(),$()).describe("The synchronous echo-the-token activation handshake + recovery."),events:h(c({event:it,when:n(),data:b(n(),n())})).describe("Every subscribable event with its exact delivery `data` fields."),sample:b(n(),$()).describe("A fully-worked example delivery (headers + body).")}).describe("The webhook delivery/signing/verification contract, as data. Read this before building a receiver.");var bbe=0,Sbe=9007199254740991,ybe=0,vbe=9007199254740991,il=c({id:n(),url:le(),events:h(it),settleMs:x().min(bbe).max(Sbe),enabled:R(),verificationStatus:l(["pending","verified"]).describe("pending = callback URL has not echoed the ownership challenge (receives no events); verified = ownership proven."),createdAt:n(),lastDeliveredAt:n().nullable(),lastFailedAt:n().nullable(),consecutiveFailures:x().min(ybe).max(vbe)}).describe("Webhook endpoint record (secret omitted after create).");var wbe=c({data:h(il),pagination:pe});var Rbe=0,Ibe=6e4,Mbe=c({url:le().min(1).optional(),events:h(it).min(1).optional(),settleMs:x().min(Rbe).max(Ibe).optional(),enabled:R().optional()}).describe("PATCH /webhooks/:id body.");var Obe=c({deliveryId:n(),status:m("queued")}).describe("POST /webhooks/:id/test response.");var $be=c({id:n(),status:l(["active","pending"]).describe("active = ownership verified + receiving events; pending = challenge not echoed."),verification:c({status:m("pending"),reason:n()}).optional().describe("Present only when the re-challenge did not verify; `reason` names why (see WebhookCreateResponse.verification).")}).describe("POST /webhooks/:id/verify response.");var Tbe=c({orgId:n(),permissions:b(n(),h(n())),keyId:n(),keyName:n()}).describe("Whoami response.");var kbe=2048,Cbe=c({videoUrl:le().max(kbe),format:he.optional()});var N2e=c({x402Version:m(2),accepts:h($t({})).describe("Accepted payment requirements. Read `accepts[0]` for scheme (`exact` for a fixed price, `upto` for a measured one), network (CAIP-2), asset, amount and payTo."),error:n().optional().describe("Human-readable reason.")}).describe("x402 v2 PaymentRequired challenge \u2014 the body of a 402 on a priced operation.");var Dbe=100,_be=-9007199254740991,jbe=9007199254740991,Ebe=-9007199254740991,Pbe=9007199254740991,Lbe=k({limit:x().min(1).max(Dbe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),projectId:n().optional().describe("Only events attributed to this project."),jobId:n().optional().describe('Only events produced by this job \u2014 how to answer "did my failed render post a charge?" for one run.'),from:x().min(_be).max(jbe).optional().describe("Period start, epoch milliseconds, INCLUSIVE."),to:x().min(Ebe).max(Pbe).optional().describe("Period end, epoch milliseconds, EXCLUSIVE.")});var Vbe=100,Abe=k({limit:x().min(1).max(Vbe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var Fbe=k({id:n()});var Ube=k({id:n()});var Nbe=100,qbe=k({limit:x().min(1).max(Nbe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),projectId:n().optional().describe("Scope to one project. Omit for every brief in the org."),kind:l(["authored","clip","all"]).optional().describe("Which briefs to list. `authored` (default) = human-authored only; `clip` = the machine-minted clip briefs from suggest_briefs; `all` = both.")});var Bbe=k({id:n()});var Wbe=k({id:n()});var Zbe=k({id:n()}),Gbe=we();var Hbe=k({id:n()});var Jbe=k({id:n()});var Kbe=100,Xbe=k({limit:x().min(1).max(Kbe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),composeJobId:n().optional().describe("Scope to ONE compose run \u2014 its v1\u2192vN gate history with per-version status and decisions."),projectId:n().optional().describe("Scope to everything reviewable in one project.")});var Ybe=k({id:n()});var Qbe=k({id:n()});var eSe=k({id:n()});var tSe=$(),oSe=k({id:n()}),nSe=100,rSe=k({limit:x().min(1).max(nSe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),platform:n().optional().describe("Only suggestions cut for this delivery platform."),format:n().optional().describe("Only suggestions in this output format."),topic:n().optional().describe("Only suggestions matching this topic label.")});var iSe=k({id:n()});var aSe=k({id:n()}),sSe=$();var cSe=new RegExp("^[a-f0-9]{64}$"),dSe=k({collection:n().min(1),id:n().min(1),revision:n().regex(cSe)});var pSe=100,mSe=k({projection:l(["component-library"]).optional(),origin:l(["builtin","library"]).optional().describe("With component-library projection, builtin selects immutable builtin cards; library selects the authenticated org's exact serving datastore."),libraryKind:l(["definition","preset","recipe"]).optional(),category:l(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional().describe("Filter to one category bucket (text|effects|transitions|layouts|backgrounds|ui-blocks|scenes)."),kind:l(["component","transition","scene"]).optional().describe("Filter by render kind (component|transition|scene)."),tier:l(["recommended","standard","niche"]).optional().describe("Filter by curation tier (recommended|standard|niche)."),useCase:l(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"]).optional().describe("Filter to entries whose useCase includes this edit role (e.g. intro, title-over-footage, grade)."),mood:n().optional().describe("Filter to entries whose mood tags include this value (e.g. cinematic, minimal)."),q:n().optional().describe("Free-text match across id/name/description/intent/useWhen/tags/mood. Recommend-orders results."),intent:n().optional().describe("Alias of `q` framed as recommend-by-intent (e.g. intent=intro). Recommend-orders results."),limit:x().min(1).max(pSe).optional().describe("Page size (1..100). Omit to return the whole filtered catalog in one page."),after:n().optional().describe("Opaque cursor from a previous page's nextCursor (forward-only).")});var al=Eg;var lSe=k({id:n()});var uSe=k({id:n()});var fSe=k({id:n()});var hSe=k({id:n()}),gSe=new RegExp("^[a-f0-9]{64}$"),xSe=new RegExp("^(2|3)(,(2|3))?$"),zSe=k({builtinCollection:l(["native","curated-definitions"]).optional(),sourceVersionId:n().regex(gSe).optional(),supportedSourceVersions:n().regex(xSe).optional().describe("Comma-separated accepted source versions, e.g.2,3. Absence accepts the historical v2 protocol only.")});var bSe=k({id:n()});var SSe=k({id:n(),composeJobId:n()}),ySe=$(),vSe=k({id:n(),composeJobId:n()});var wSe=k({id:n(),composeJobId:n()});var RSe=k({id:n()});var ISe=k({id:n(),composeJobId:n()});var MSe=k({id:n()});var OSe=k({sessionId:n()}),$Se=k({id:n(),sessionId:n()}),TSe=k({composition:$()}),kSe=k({id:n(),sessionId:n()}),CSe=k({ok:R()}),DSe=k({id:n(),sessionId:n()}),_Se=k({etag:n()});var jSe=k({id:n()}),ESe=k({componentExecutionVersions:m("3").optional().describe("Explicit accepted saved component execution protocol. Absent readers accept only the historical protocol."),includeDependencies:l(["true","false"]).optional().describe("Return the immutable composition identity, project revision and shared v1 dependency expectations alongside the composition."),compositionId:n().optional().describe("Read a SPECIFIC composition instead of the project's active one. Omit it and the active composition is returned. Pairs with `composition_id` on the apply op: an edit you can make to a second composition is one you can read back.")});var PSe=k({id:n()});var LSe=$(),VSe=k({id:n()});var ASe=we(),FSe=k({id:n()});var USe=k({id:n()});var NSe=$(),qSe=k({id:n()});var BSe=$(),WSe=k({id:n()});var ZSe=k({contract:n().describe("The contract this verdict was computed against (the kernel version the deployment runs). If it differs between two calls, the validator changed, not your composition."),valid:R(),errors:h(k({code:n(),stage:n(),category:n(),retryable:R(),message:n(),fix:b(n(),$()).optional()})),advisories:h(k({rule:n(),criterion:n(),clipId:n().optional(),detail:n(),fix:n()})).describe("Deterministic, render-free QUALITY floors (the SAME named defects the Director's in-loop verify and score_composition surface: static-hold, caption-spine, sfx-density, sfx-speech-collision, bed-coverage, audio-role). NON-blocking \u2014 they never flip `valid` (an editorially-weak composition still renders); fix them for quality, not to save. Empty when the composition is clean or the wire shape failed (they need a parsed composition)."),warnings:h(n()).optional().describe("Non-blocking render-fidelity warnings detected before enqueue, including unavailable font families."),quote:k({thisStepUsd:s(),jobSpendSoFarUsd:s(),estimatedJourneyTotalUsd:s()}).describe("The A2 money triple for the commodity lane: validate is free; estimatedJourneyTotalUsd is the render price to finish from a valid composition \u2014 relay it BEFORE create_render.")}),GSe=k({id:n(),compositionId:n()}),HSe=we();var JSe=k({id:n()});var KSe=k({criticId:n()}),XSe=we();var YSe=k({id:n()});var QSe=k({id:n()});var eye=k({id:n()});var tye=k({id:n()});var oye=k({id:n()});var nye=k({id:n(),exportId:n()});var rye=k({id:n(),exportId:n()});var iye=k({deep:m("1").optional().describe("Pass `1` to run the deep dependency checks instead of the shallow liveness probe.")});var aye=$t({});var sye=k({jobId:n()});var cye=k({jobId:n()});var dye=10,pye=25,mye=k({q:n().min(1).describe("What the moment should look like, in plain language. Describe the IMAGE, not the words spoken."),limit:x().min(1).max(pye).default(dye).describe("Maximum moments to return. Default 10, maximum 25.")});var lye=100,uye=k({limit:x().min(1).max(lye).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),kind:l(["video","audio","image","gif","asset","source","stock"]).optional().describe("Filter to one media kind."),source:l(["upload","generated","import-url","stock"]).optional().describe("Filter by how the item entered the library."),tag:n().optional().describe("Filter to items carrying this EXACT tag (not a prefix or substring match).")});var fye=k({id:n()});var hye=k({id:n()}),gye=we(),xye=k({id:n()});var zye=k({id:n()}),bye=0,Sye=0,yye=20,vye=100,wye=k({after:x().min(bye).optional().describe("Zero-based utterance cursor returned as pagination.nextCursor."),before:x().min(Sye).optional().describe("Zero-based utterance cursor for a backward page. Do not combine with after."),limit:x().min(1).max(vye).default(yye).describe("Utterances per page.")});var Rye=k({id:n()});var Iye=k({id:n()}),Mye=k({detector:l(["face","person"]).optional().describe("Which detector to run. Defaults to `face`; an unknown value is refused, never defaulted.")});var Oye=k({id:n()});var $ye=k({id:n()}),Tye=k({kind:l(["subjectTrack","matte"]).optional().describe("Resolve one exact editor prerequisite. Requires startSec and endSec; the response includes the server-selected `exact` result."),startSec:s().optional().describe("Source-in of the clip's trim, in seconds. Must be sent WITH endSec \u2014 one without the other is a 400, never a silent whole-source default."),endSec:s().optional().describe("Source-out of the clip's trim, in seconds. Must be sent WITH startSec.")});var kye=k({id:n()});var Cye=k({id:n()});var Dye=100,_ye=k({limit:x().min(1).max(Dye).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var jye=k({id:n()});var Eye=k({id:n()});var Pye=k({id:n()}),Lye=we(),Vye=k({id:n()});var Aye=k({id:n()});var Fye=k({id:n()}),Uye=100,Nye=k({limit:x().min(1).max(Uye).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),status:n().optional().describe("Comma-separated render statuses to include (e.g. `error,cancelled`). Omit for every status.")});var qye=k({id:n()});var Bye=k({id:n(),renderId:n()});var Wye=k({id:n(),renderId:n()});var Zye=k({id:n(),renderId:n()});var Gye=k({id:n(),renderId:n()});var Hye=k({id:n(),renderId:n()}),Jye=$();var Kye=k({id:n()}),Xye=k({groupId:n().min(1).describe("The synced-angle group to score.")});var Yye=k({id:n()});var Qye=100,eve=k({limit:x().min(1).max(Qye).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var tve=k({id:n()});var ove=k({id:n()}),nve=we(),rve=k({id:n()});var ive=k({id:n()});var ave=k({name:n()}),sve=$();var cve=100,dve=k({limit:x().min(1).max(cve).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var pve=k({id:n()});var mve=k({id:n()}),lve=we(),uve=k({id:n()});var fve=k({jobId:n()});var hve=k({jobId:n()});var gve=k({jobId:n()});var xve=k({id:n()});var zve=k({id:n()});var bve=k({id:n(),renderId:n()});var Sve=k({id:n(),renderId:n()});var yve=k({id:n(),renderId:n()});var vve=k({traceId:n()});var wve=100,Rve=k({limit:x().min(1).max(wve).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:n().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var Ive=k({id:n()});var Mve=k({id:n()});var Ove=k({id:n()}),$ve=we(),Tve=k({id:n()});var kve=k({id:n()});var Cve=k({projectId:n(),mediaId:n()});import{existsSync as Dve,readFileSync as _ve}from"fs";import{join as jve}from"path";var $x=Object.freeze({version:2,assets:Object.freeze({}),graphics:Object.freeze({api:"canvas2d",required:!0,accelerationPreference:"software-allowed"}),alphaPolicy:"requires-transparency"});var Tx=$x;function kx(e,t){let i=jve(e.root,"cueframe.json");if(!Dve(i))throw Object.assign(new Error("No cueframe.json workspace manifest was found."),{code:"no_component_manifest"});let o=JSON.parse(_ve(i,"utf8")).components?.[t]?.manifest;if(o==null)throw Object.assign(new Error(`Component "${t}" has no contract-v2 manifest at cueframe.json components.${t}.manifest.`),{code:"no_component_manifest"});return o}function Cx(e){return{inputSchema:{type:"object",properties:{text:{type:"string"}},additionalProperties:!1},defaults:{text:e},timing:{defaultDuration:{frames:90,fps:30}},brandBindings:[],capabilities:[{kind:"clip"}]}}function Dx(e,t,i){let a=Lve(Eo(e,t),"definition.json");if(!Pve(a))throw Object.assign(new Error(`Component "${t}" needs an explicit v3 definition.json before publishing. Declare its inputSchema, defaults, timing, brandBindings and capabilities; do not overwrite existing source with a new scaffold.`),{code:"invalid_component_definition"});let o;try{o=JSON.parse(Eve(a,"utf8"))}catch{throw Object.assign(new Error(`Invalid JSON in ${a}`),{code:"invalid_component_definition"})}let r={version:3,componentId:t,tsxSource:i,manifest:kx(e,t),definition:o},d=al.shape.source.safeParse(r);if(!d.success||d.data?.version!==3)throw Object.assign(new Error(`Invalid component v3 source: ${d.success?"expected version 3":d.error.message}`),{code:"invalid_component_definition"});return d.data}var Nve="cueframe.json";function qve(e){return e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join("")}function Bve(e){return e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function sl(e,t){B(e,"new_component",new Error(t),P.UserError),E(P.UserError)}function Wve(e,t){return`import React from 'react';
79
+
80
+ /** Custom CueFrame component. Source v3 standalone clip; edit definition.json with the code. */
20
81
  export default function ${t}({ params }: { durationInFrames: number; params: Record<string, unknown>; assets: Record<string, unknown>; render: { frame: number; fps: number; width: number; height: number; seed: string; colorSpace: 'srgb' } }) {
21
82
  return <div style={{ width: '100%', height: '100%', display: 'grid', placeItems: 'center' }}>{String((params as { text?: unknown }).text ?? '${e}')}</div>;
22
83
  }
23
- `}function Qg(e,t){return`import { z } from 'zod';
84
+ `}function Zve(e,t){return`import { z } from 'zod';
24
85
  import component from './index';
25
86
 
26
87
  const paramsSchema = z.object({}).passthrough();
@@ -35,39 +96,33 @@ export const config = {
35
96
  paramsSchema,
36
97
  };
37
98
  export default config;
38
- `}function bu(e,t){X(e,"name",t);let n=t.dryRun??!1,r=t.force??!1,a=Yg(e);a||Da(t,`name "${e}" has no alphanumeric characters to form a component identifier.`);let i=Gg(e);O(t,"new_component_prepare",{name:e,dryRun:n,force:r});let c=Mn(process.cwd());c||Da(t,"No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first to scaffold one.");let u=Mr(c,e),f=Ug(u);f&&Wg(u).length>0&&!r&&Da(t,`Component dir ${u} already exists and is non-empty. Pass --force to overwrite (this replaces local source).`);let l={"index.tsx":Kg(e,a),"config.ts":Qg(e,i)};if(!n){jg(u,{recursive:!0});for(let[E,N]of Object.entries(l))gu(Au(u,E),N);let d=Au(c.root,$g),p=JSON.parse(Vg(d,"utf8")),A=p.components??{};A[e]={custom:!0,manifest:fu},p.components=A,gu(d,`${JSON.stringify(p,null,2)}
39
- `)}j(t,{ok:!0,dryRun:n,name:e,component:a,dir:u,files:Object.keys(l),overwritten:f&&r},()=>{console.log(`\u2713 ${n?"Would scaffold":"Scaffolded"} custom component ${e} (${a}) into ${u}`);for(let p of Object.keys(l))console.log(` ${n?"would write":"wrote"} ${p}`);n||console.log(` stamped cueframe.json components.${e} (custom)`),console.log("Edit index.tsx, then `cueframe push "+e+"` to publish it to CueFrame.")})}import{existsSync as Ur,readFileSync as jr}from"fs";import{join as Vr}from"path";import le from"typescript";var zg="cueframe.json",Jg=["effects","transitions","text","layouts"];function Xg(e){return Jg.includes(e??"")?e:"layouts"}function Zg(e){let t=e;for(;le.isAsExpression(t)||le.isParenthesizedExpression(t)||typeof le.isSatisfiesExpression=="function"&&le.isSatisfiesExpression(t);)t=t.expression;return t}function qg(e,t){for(let n of e.statements)if(le.isImportDeclaration(n)&&le.isStringLiteral(n.moduleSpecifier)&&n.moduleSpecifier.text===t)return!0;return!1}function yu(e,t){let n=le.createSourceFile(t,e,le.ScriptTarget.Latest,!0,le.ScriptKind.TS),r;for(let i of n.statements)if(le.isVariableStatement(i)){for(let c of i.declarationList.declarations)if(le.isIdentifier(c.name)&&c.name.text==="config"&&c.initializer){let u=Zg(c.initializer);le.isObjectLiteralExpression(u)&&(r=u)}if(r)break}let a={};if(!r)return a;for(let i of r.properties){if(!le.isPropertyAssignment(i)||!(le.isIdentifier(i.name)||le.isStringLiteral(i.name)))continue;let c=i.name.text;le.isStringLiteralLike(i.initializer)&&(c==="name"?a.name=i.initializer.text:c==="category"?a.category=i.initializer.text:c==="version"&&(a.version=i.initializer.text))}return a}function eA(e){let t=Vr(e,"config.ts");if(!Ur(t))return{};let n=jr(t,"utf8"),r=le.createSourceFile("config.ts",n,le.ScriptTarget.Latest,!0,le.ScriptKind.TS),a=Vr(e,"_config.ts");return qg(r,"./_config")&&Ur(a)?yu(jr(a,"utf8"),"_config.ts"):yu(n,"config.ts")}function tA(e){return e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function nA(e,t){let n=Vr(e.root,zg);if(Ur(n))try{let a=JSON.parse(jr(n,"utf8")).components?.[t]?.ejectedFrom;return typeof a=="string"&&a.length>0?a:void 0}catch{return}}var Hr="none \u2014 params are unvalidated server-side";function Eu(e){let t=e.code;return t==="no_component_source"||t==="no_component_manifest"?T.UserError:F(e)}async function Su(e,t,n){let r=Mr(e,t),a=Vr(r,"index.tsx");if(!Ur(a))throw Object.assign(new Error(`Component "${t}" has no index.tsx at ${r}. Scaffold it first: cueframe new component ${t}`),{code:"no_component_source"});let i=jr(a,"utf8"),c=eA(r),u=c.name??tA(t),f=Xg(c.category),l=nA(e,t),d=hu(e,t),p=`Custom component "${t}" pushed from the local CueFrame workspace.`,A={type:"object",properties:{}};O(n,"push_component",{id:t,name:u,category:f,version:c.version,ejectedFrom:l,propSchema:Hr});let E=!1;try{await kr.getComponent(t),E=!0}catch(N){if(N instanceof Le&&N.status===404)E=!1;else throw N}return E?(await kr.updateComponent(t,{tsxSource:i,name:u,description:p,category:f,propSchema:A,origin:"customer-owned",manifest:d,...l?{ejectedFrom:l}:{}}),O(n,"pushed",{id:t,action:"updated"}),{id:t,action:"updated",name:u,category:f,propSchema:Hr}):(await kr.createComponent({componentId:t,tsxSource:i,name:u,description:p,category:f,propSchema:A,origin:"customer-owned",manifest:d,...l?{ejectedFrom:l}:{}}),O(n,"pushed",{id:t,action:"created"}),{id:t,action:"created",name:u,category:f,propSchema:Hr})}async function Tu(e,t){e||(v(t,"push",new Error("Pass a component id (cueframe push <id>), or use `cueframe sync` to push all."),T.UserError),S(T.UserError)),X(e,"id",t),U(t.target);let n=Mn(process.cwd());n||(v(t,"push",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),T.UserError),S(T.UserError)),O(t,"push_prepare",{id:e,target:t.target});try{let r=await Su(n,e,t);j(t,{ok:!0,target:t.target,...r},()=>{console.log(`\u2713 ${r.action} component ${r.id} (${r.name}) on CueFrame`),console.log(` propSchema: ${r.propSchema}`)})}catch(r){let a=Eu(r);v(t,"push",r,a),S(a)}}async function xu(e){U(e.target);let t=Mn(process.cwd());t||(v(e,"sync",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),T.UserError),S(T.UserError));let n=su(t);O(e,"sync_prepare",{target:e.target,count:n.length,ids:n});let r=[],a=[];for(let i of n)try{r.push(await Su(t,i,e))}catch(c){let u=Eu(c);oe(e,"sync",c,u),a.push({id:i,error:c})}j(e,{ok:a.length===0,target:e.target,pushed:r,failed:a.map(i=>({id:i.id,error:ee(i.error)}))},()=>{if(r.length===0&&a.length===0){console.log("No components to sync. Scaffold one with `cueframe eject` or `cueframe new component`.");return}for(let i of r)console.log(`\u2713 ${i.action} ${i.id} (${i.name})`);r.length>0&&console.log(` propSchema: ${Hr}`);for(let i of a)console.error(`\u2716 ${i.id}: ${ee(i.error)}`);console.log(`Synced ${r.length}/${n.length} component(s) to CueFrame.`)}),a.length>0&&S(F(a[0].error))}var Wr=["media","sessions","projects","renders","webhooks"],Cu={readonly:Object.fromEntries(Wr.map(e=>[e,["read"]])),editall:Object.fromEntries(Wr.map(e=>[e,["read","write"]]))};function rA(e){if(e.preset){let t=Cu[e.preset];return t||(console.error(`Unknown --preset "${e.preset}". Valid: ${Object.keys(Cu).join(", ")}.`),S(T.UserError)),t}if(e.scope)return oA(e.scope);console.error("Provide --scope or --preset (e.g. --preset readonly | editall)."),S(T.UserError)}function oA(e){let t={};for(let n of e.split(",").map(r=>r.trim()).filter(Boolean)){let[r,a]=n.split(":");(!r||!a)&&(console.error(`Invalid --scope "${n}". Use resource:rw (e.g. renders:rw,media:r).`),S(T.UserError)),Wr.includes(r)||(console.error(`--scope "${n}": unknown resource "${r}". Valid: ${Wr.join(", ")}.`),S(T.UserError));let i=[];/r/i.test(a)&&i.push("read"),/w/i.test(a)&&i.push("write"),i.length===0&&(console.error(`--scope "${n}": actions must include r and/or w.`),S(T.UserError)),t[r]=i}return Object.keys(t).length===0&&(console.error("--scope is required, e.g. --scope media:rw,projects:rw,renders:rw"),S(T.UserError)),t}async function Iu(e){U(e.target);let t=rA(e),n={name:e.name,permissions:t};if(e.expires){let r=Number(e.expires);(!Number.isFinite(r)||r<=0)&&(console.error("--expires must be a positive number of days."),S(T.UserError)),n.expiresIn=Math.round(r*86400)}try{let r=await Mt("/v1/api-keys",{method:"POST",body:JSON.stringify(n),headers:{"content-type":"application/json"}});j(e,{ok:!0,id:r.id,prefix:r.prefix,start:r.start,key:r.key},()=>{let a=Object.entries(t).map(([i,c])=>`${i}:${c.map(u=>u[0]).join("")}`).join(" ");console.log(`\u2713 API key "${e.name}" created \u2014 scopes: ${a}`),console.log(`
40
- ${r.key}
41
- `),console.log(" Shown ONCE \u2014 store it now (paste it into your integration; not saved here).")})}catch(r){v(e,"keys_create",r,F(r)),S(F(r))}}async function _u(e){U(e.target);let t;try{t=await Ie("/api/auth/api-key/list",{method:"GET"})}catch(r){v(e,"keys_list",r,F(r)),S(F(r))}t.status>=400&&(v(e,"keys_list",new Error(`list failed (${t.status})`),se(t.status)),S(se(t.status)));let n=Array.isArray(t.body)?t.body:[];j(e,{ok:!0,keys:n},()=>{if(n.length===0){console.log("No API keys.");return}for(let r of n)console.log(` ${r.id} ${r.name??"(unnamed)"} ${r.start??""}\u2026`)})}async function ku(e,t){U(t.target);let n;try{n=await Ie("/api/auth/api-key/delete",{method:"POST",body:JSON.stringify({keyId:e}),headers:{"content-type":"application/json"}})}catch(r){v(t,"keys_revoke",r,F(r)),S(F(r))}n.status>=400&&(v(t,"keys_revoke",new Error(`revoke failed (${n.status})`),se(n.status)),S(se(n.status))),j(t,{ok:!0,revoked:e},()=>console.log(`\u2713 Revoked ${e}`))}async function wu(e){U(e.target),O(e,"list_prepare",{target:e.target});try{let t=await Jt.listProjects(),n=e.limit,r=typeof n=="number"&&Number.isFinite(n)&&n>0?t.data.slice(0,n):t.data;if(O(e,"list_complete",{count:r.length,total:t.data.length,truncated:r.length<t.data.length,projects:r}),!e.json){if(t.data.length===0){console.log("No projects found.");return}for(let a of r){let i=new Date(a.createdAt).toLocaleDateString();console.log(` ${a.id} ${a.name} (${i})`)}r.length<t.data.length&&console.log(` \u2026 ${t.data.length-r.length} more (raise --limit to see all)`)}}catch(t){v(e,"list",t,F(t)),S(F(t))}}import{readFile as aA,stat as iA}from"fs/promises";import{existsSync as sA}from"fs";import{basename as cA,extname as lA}from"path";var uA=4e3,Ru=1800*1e3,Nu=5,Ou={".mp4":"video/mp4",".mov":"video/quicktime",".webm":"video/webm",".mkv":"video/x-matroska",".wav":"audio/wav",".mp3":"audio/mpeg",".m4a":"audio/mp4",".aac":"audio/aac",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml"};function dA(e,t){let n=lA(e).toLowerCase(),r=Ou[n];if(!r){let a=new Error(`Unsupported file extension "${n||"(none)"}" for ${e}. Supported: ${Object.keys(Ou).join(", ")}.`);v(t,"preflight",a,T.UserError),S(T.UserError)}return r}var vu=["vo","music","sfx","ambience"];async function $r(e,t){sA(e)||(v(t,"preflight",new Error(`File not found: ${e}`),T.UserError),S(T.UserError));let n=cA(e),r=(await iA(e)).size,a=dA(n,t);if(t.audioRole&&!vu.includes(t.audioRole)){let C=new Error(`--audio-role must be one of ${vu.join("|")} (got "${t.audioRole}")`);v(t,"preflight",C,T.UserError),S(T.UserError)}let i=t.audioRole;if(t.dryRun){O(t,"upload_dry_run",{file:n,sizeBytes:r,contentType:a,target:t.target,analyzeAfter:!!t.analyze,wouldCall:"POST /v1/media \u2192 presigned PUT \u2192 POST /v1/media/:id/finalize \u2192 poll processing"}),t.json||console.log(`[dry-run] Would upload ${n} (${(r/1024/1024).toFixed(1)} MB, ${a}) to ${t.target}.`);return}U(t.target),O(t,"upload_prepare",{file:n,sizeBytes:r,contentType:a,target:t.target});let c=ce("Preparing upload\u2026",t.json),u,f;try{let C=await gt.createMediaUpload({filename:n,contentType:a,size:r});u=C.id,f=C.uploadUrl,c.succeed("Ready"),O(t,"upload_ready",{mediaItemId:u})}catch(C){c.fail(`Failed: ${ee(C)}`),oe(t,"upload_prepare",C,F(C)),S(F(C))}let l=Date.now(),d=ce(`Uploading ${n} (${(r/1024/1024).toFixed(1)} MB)\u2026`,t.json);try{let C=await aA(e),M=await fetch(f,{method:"PUT",headers:{"Content-Type":a},body:C});if(!M.ok)throw new Error(`presigned PUT failed: ${M.status} ${M.statusText}`);await gt.finalizeMedia(u,i?{audioRole:i}:{}),d.succeed(`Uploaded: ${n}`),O(t,"upload_complete",{mediaItemId:u,bytesUploaded:r,...i?{audioRole:i}:{},durationMs:Date.now()-l})}catch(C){d.fail(`Upload failed: ${ee(C)}`),oe(t,"upload",C,T.NetworkError),S(T.NetworkError)}let p=ce("Processing (transcription)\u2026",t.json),A=Date.now(),E=null,N=0;for(;;){if(await new Promise(C=>setTimeout(C,uA)),Date.now()-A>Ru){let C=`Processing did not complete within ${Math.round(Ru/6e4)}m. Media item ID: ${u}.`;p.fail(C),oe(t,"process",new Error(C),T.ApiServerError),S(T.ApiServerError)}try{let C=await gt.getMedia(u);N=0;let M=C?.processingStatus?.phase??"unknown",I=C?.processingStatus?.percent??null,k=Math.round((Date.now()-A)/1e3),D=I!=null?` \xB7 ${Math.round(I*100)}%`:"";if(p.text=`Processing\u2026 ${M}${D} (${k}s)`,O(t,"process_progress",{phase:M,percent:I,elapsedSec:k}),M==="complete"||M==="completed"){p.succeed(`Ready: ${u}`),E=C,O(t,"process_complete",{mediaItemId:u,durationMs:Date.now()-A,item:C});break}if(M==="error"){let H=C?.processingStatus?.error??"unknown error";p.fail(`Processing failed: ${H}`),oe(t,"process",new Error(H),T.ApiServerError),S(T.ApiServerError)}}catch(C){C instanceof Le&&[401,403,404].includes(C.status)&&(p.fail(`Processing check failed: ${ee(C)}`),oe(t,"process",C,F(C)),S(F(C))),N++,N>=Nu&&(p.fail(`Processing check failed: ${ee(C)}`),oe(t,"process",new Error(`Processing status unreadable after ${Nu} consecutive failures: ${ee(C)}`),F(C)),S(F(C)))}}if(t.analyze){Ve(`
42
- Media item ID: ${u}`,t);let{analyzeCommand:C}=await import("./analyze-CDC4H53Q.js");return await C(u,{target:t.target,wait:!0,json:t.json}),{mediaItemId:u,item:E}}return t.json||j(t,{mediaItemId:u,item:E},()=>{console.log(`
43
- Media item ID: ${u}`),console.log(`
44
- Run \`cueframe analyze ${u} --target ${t.target}\` to generate clip suggestions.`)}),{mediaItemId:u,item:E}}function Ma(e){let t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${String(n).padStart(2,"0")}`}async function Fu(e,t){e!==void 0&&X(e,"mediaItemId",t),U(t.target),O(t,"clips_prepare",{target:t.target,mode:e?"suggestions":"media-list",...e?{mediaItemId:e}:{}});try{if(!e){let r=await gt.listMedia();if(O(t,"clips_complete",{mode:"media-list",count:r.data.length,media:r.data}),!t.json){if(r.data.length===0){console.log("No media items found. Import a video first.");return}console.log("Media items (pass the ID to `cueframe clips <id>`):"),console.log("");for(let a of r.data){let i=a.duration?`${Ma(a.duration)} `:"",c=a.processingStatus?.phase??"unknown",u=c==="complete"?"":` [${c}]`;console.log(` ${a.id} ${a.name} ${i}${u}`)}}return}let n=await jl.listMediaSuggestions(e);if(O(t,"clips_complete",{mode:"suggestions",mediaItemId:e,count:n.suggestions.length,suggestions:n.suggestions}),!t.json){if(n.suggestions.length===0){console.log("No clip suggestions found for this media item."),console.log("If analysis is still running, try again shortly. Otherwise the video may not have suitable clips.");return}console.log(`${n.suggestions.length} clip suggestion${n.suggestions.length!==1?"s":""}:`),console.log("");for(let r of n.suggestions){let a=`${Ma(r.trim.start)} \u2192 ${Ma(r.trim.end)}`,i=(r.trim.end-r.trim.start).toFixed(1);console.log(` ${r.id}`),console.log(` ${r.title}`),console.log(` ${a} (${i}s) ${r.format} score: ${r.score}`),r.reason&&console.log(` ${r.reason}`),console.log("")}}}catch(n){v(t,"clips",n,F(n)),S(F(n))}}import{readFileSync as mA}from"fs";async function Du(e,t){X(e,"projectId",t),U(t.target),O(t,"composition_get_prepare",{projectId:e});let n=await Bn(`/v1/projects/${e}/composition`,{method:"GET"},t,"composition_get");n.status>=400&&(Ln(n,t,"composition_get"),S(se(n.status)));let r=n.headers.etag,a=r&&Lu(r);O(t,"composition_get_complete",{projectId:e,etag:a,status:n.status}),j(t,{etag:a,composition:n.body},()=>{a&&console.log(`# ETag: ${a}`),console.log(JSON.stringify(n.body,null,2))})}async function Mu(e,t){X(e,"projectId",t),t.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),S(T.UserError)),U(t.target);let n=await Ba(e,t),r=await Pu(t.body);O(t,"composition_put_prepare",{projectId:e,ifMatch:n});let a=new Headers({"content-type":"application/json","if-match":n}),i=await Bn(`/v1/projects/${e}/composition`,{method:"PUT",headers:a,body:r},t,"composition_put");i.status>=400&&(Ln(i,t,"composition_put"),S(se(i.status)));let c=i.headers.etag;return O(t,"composition_put_complete",{projectId:e,etag:c,status:i.status,response:i.body}),j(t,{etag:c,response:i.body},()=>{console.log(`Composition saved (ETag: ${c??"unknown"}).`),i.body&&typeof i.body=="object"&&console.log(JSON.stringify(i.body,null,2))}),{etag:c,response:i.body}}async function Yr(e,t){X(e,"projectId",t),t.suggestionId||(console.error("--suggestion <suggestionId> is required"),S(T.UserError)),U(t.target);let n=await Ba(e,t),r;if(t.format)try{r=JSON.parse(t.format)}catch{console.error(`--format must be JSON, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`),S(T.UserError)}let a=JSON.stringify({suggestionId:t.suggestionId,...r?{format:r}:{}});O(t,"composition_from_suggestion_prepare",{projectId:e,suggestionId:t.suggestionId,ifMatch:n});let i,c=n,u=0,f=3;for(;;){u++;let d=new Headers({"content-type":"application/json","if-match":c});if(i=await Bn(`/v1/projects/${e}/composition/from-suggestion`,{method:"POST",headers:d,body:a},t,"composition_from_suggestion"),!(i.status===409&&i.body?.error?.code==="stale_etag"))break;if(u>f){O(t,"composition_from_suggestion_etag_retries_exhausted",{projectId:e,attempts:f});break}O(t,"composition_from_suggestion_etag_retry",{projectId:e,attempt:u,reason:"stale_etag"}),c=await Ba(e,t)}i.status>=400&&(Ln(i,t,"composition_from_suggestion"),S(se(i.status)));let l=i.headers.etag;O(t,"composition_from_suggestion_complete",{projectId:e,suggestionId:t.suggestionId,etag:l,status:i.status,response:i.body,attempts:u}),j(t,{etag:l,response:i.body},()=>{console.log(`Composition built from suggestion ${t.suggestionId} (ETag: ${l??"unknown"}).`),i.body&&typeof i.body=="object"&&console.log(JSON.stringify(i.body,null,2))})}async function Bu(e){e.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),S(T.UserError)),U(e.target);let t=await Pu(e.body);O(e,"composition_validate_prepare",{});let n=new Headers({"content-type":"application/json"}),r=await Bn("/v1/composition/validate",{method:"POST",headers:n,body:t},e,"composition_validate");return r.status>=400&&(Ln(r,e,"composition_validate"),S(se(r.status))),O(e,"composition_validate_complete",{status:r.status}),j(e,{valid:!0},()=>{console.log("\u2713 Composition is valid.")}),{valid:!0}}function Lu(e){return e.replace(/^W\//,"").replace(/-gzip(?=("?)$)/,"")}async function Ba(e,t){if(t.force)return"*";if(t.ifMatch)return t.ifMatch;let n=await Bn(`/v1/projects/${e}/composition`,{method:"GET"},t,"composition_etag_fetch");if(n.status===404)return Ve("No existing composition; treating as create (If-Match: *).",t),"*";n.status>=400&&(Ln(n,t,"composition_etag_fetch"),S(se(n.status)));let r=n.headers.etag;return r||(v(t,"composition_etag_fetch",new Error("Server returned no ETag on composition GET; cannot safely thread If-Match. Pass --force to overwrite anyway."),T.ApiServerError),S(T.ApiServerError)),Lu(r)}async function Pu(e){if(e.startsWith("@")){let t=e.slice(1);if(t==="-"){let n=[];for await(let r of process.stdin)n.push(Buffer.isBuffer(r)?r:Buffer.from(r));return Buffer.concat(n).toString("utf-8")}return mA(t,"utf-8")}return e}async function Bn(e,t,n,r){try{return await Ie(e,t)}catch(a){v(n,r,a,T.NetworkError),S(T.NetworkError)}}function Ln(e,t,n){let r=e.body?.error,a=r?.code??"unknown",i=r?.message??e.statusText,c=pA(a,e.status,r?.details),u=se(e.status);t.json?v(t,n,Object.assign(new Error(i),{code:a,status:e.status,details:r?.details,advice:c}),u):(process.stderr.write(`\u2716 ${n}: ${i} (${a}, ${e.status})
45
- `),c&&process.stderr.write(` \u2192 ${c}
46
- `))}function pA(e,t,n){let r=new Le(t,{code:e,message:"",details:n&&typeof n=="object"?n:void 0}),a=Hl(r);return a||(t===404?"Project or composition not found. Run `cueframe list` to confirm the project ID; the composition may not yet exist.":null)}async function Hu(e){let t=e.aspect?{aspectRatio:e.aspect,fps:e.fps??30,resolution:e.resolution??"fhd"}:void 0;if(e.dryRun){if(O(e,"project_create_dry_run",{name:e.name,target:e.target,format:t??null,brandKitId:e.brandKitId??null,fromSuggestion:e.fromSuggestion??null,cheap:e.cheap??!1,wouldCall:e.fromSuggestion?e.cheap?"POST /v1/projects \u2192 POST /v1/projects/:id/composition/from-suggestion (sync translator)":"POST /v1/projects \u2192 POST /v1/projects/:id/compose (async) \u2192 SSE watch":"POST /v1/projects"}),!e.json){let a=e.cheap?" (--cheap: deterministic translator)":"";console.log(`[dry-run] Would create project "${e.name}" on ${e.target}`+(e.fromSuggestion?` from suggestion ${e.fromSuggestion}${a}.`:"."))}return}U(e.target),O(e,"project_create_prepare",{name:e.name,target:e.target,fromSuggestion:e.fromSuggestion??null,brandKitId:e.brandKitId??null,cheap:e.cheap??!1});let n=ce(`Creating project "${e.name}"\u2026`,e.json),r;try{r=await Jt.createProject({name:e.name,format:t,brandKitId:e.brandKitId}),n.succeed(`Created: ${r.id}`)}catch(a){n.fail(`Failed: ${ee(a)}`),oe(e,"project_create",a,F(a)),S(F(a))}if(O(e,"project_create_complete",{project:r}),!e.json&&!e.fromSuggestion&&console.log(`
47
- ${r.id} ${r.name}`),e.fromSuggestion){let a=!1;if(a||await Yr(r.id,{target:e.target,suggestionId:e.fromSuggestion,json:e.json,force:!0}),!e.json){let i=a?"(composed)":"(translated)";console.log(`
48
- ${r.id} ${r.name} \u2190 composed from ${e.fromSuggestion} ${i}`)}}return r}async function Uu(e,t){X(e,"projectId",t),U(t.target),O(t,"project_delete_prepare",{projectId:e});try{await Jt.deleteProject(e),O(t,"project_delete_complete",{projectId:e}),j(t,{ok:!0,projectId:e},()=>{console.log(`Project ${e} deleted.`)})}catch(n){v(t,"project_delete",n,F(n)),S(F(n))}}async function ju(e,t){X(e,"mediaId",t),U(t.target),O(t,"media_delete_prepare",{mediaId:e});try{await gt.deleteMedia(e),O(t,"media_delete_complete",{mediaId:e}),j(t,{ok:!0,mediaId:e},()=>{console.log(`Media ${e} deleted.`)})}catch(n){v(t,"media_delete",n,F(n)),S(F(n))}}import{writeFileSync as fA}from"fs";import{resolve as hA}from"path";var gA=1500,AA=4e3,bA=1800*1e3,Vu=5;async function La(e,t,n={}){let r=Date.now()+(n.timeoutMs??bA),a=n.reconnectBackoffMs??gA,i=Date.now(),c=0;for(;Date.now()<r;){let u=null,f=!1;try{for await(let l of Ul(e,t)){if(c=0,l.event==="progress"){let d=Math.round((Date.now()-i)/1e3);if(n.spinner){let p=Math.round(l.data.percent*100);n.spinner.text=`Rendering\u2026 ${l.data.phase}${p>0?` \xB7 ${p}%`:""} (${d}s)`}n.onProgress?.({phase:l.data.phase,percent:l.data.percent,elapsedSec:d});continue}l.event==="complete"?u={kind:"complete",outputUrl:l.data.outputUrl,outputExpiresAt:l.data.outputExpiresAt,duration:l.data.duration}:u={kind:"failed",message:l.data.message};break}}catch(l){if(l instanceof Le)f=!0;else{if(c++,c>=Vu)throw Object.assign(new Error(`Render stream unreachable after ${Vu} consecutive transport failures: ${l instanceof Error?l.message:String(l)}`),{cause:l});await new Promise(d=>setTimeout(d,a));continue}}if(u)return u;if(f){let l=await yA(e,t);if(l)return l;await new Promise(d=>setTimeout(d,AA));continue}await new Promise(l=>setTimeout(l,a))}return{kind:"failed",message:`Timed out waiting for render to reach a terminal state. Render ID: ${t}, Project ID: ${e}.`}}async function yA(e,t){let n=await Vl.getRender(e,t);return n.status==="complete"?{kind:"complete",outputUrl:n.outputUrl??null,outputExpiresAt:null,duration:null}:n.status==="error"||n.status==="cancelled"?{kind:"failed",message:n.error??`Render ${n.status}`}:null}async function Wu(e,t){X(e,"renderId",t),X(t.project,"projectId",t),U(t.target),O(t,"render_watch_prepare",{renderId:e,projectId:t.project,target:t.target});let n=ce(`Watching render ${e}\u2026`,t.json),r;try{r=await La(t.project,e,{spinner:n,onProgress:i=>O(t,"render_progress",{renderId:e,...i})})}catch(i){n.fail(`Failed to watch render: ${ee(i)}`),oe(t,"render_watch",i,F(i)),S(F(i))}r.kind==="failed"&&(n.fail(r.message),oe(t,"render_watch",new Error(r.message),T.ApiServerError),S(T.ApiServerError)),n.succeed(`Render complete (${e})`);let a=null;t.download&&r.outputUrl?a=await Pa(r.outputUrl,t.out??`./reel-${e.slice(0,8)}.mp4`,t.json):r.outputUrl||(v(t,"render_watch",new Error("Render reported complete but no outputUrl was returned."),T.ApiServerError),t.json||console.error(`Render reported complete but no outputUrl was returned.
49
- Re-fetch via GET /v1/projects/${t.project}/renders/${e}.`),S(T.ApiServerError)),O(t,"render_complete",{renderId:e,projectId:t.project,outputUrl:r.outputUrl,outputExpiresAt:r.outputExpiresAt,duration:r.duration,outputPath:a}),t.json||(r.outputUrl&&console.log(`MP4 URL: ${r.outputUrl}`),r.outputExpiresAt&&console.log(`Expires: ${r.outputExpiresAt}`),r.duration!=null&&console.log(`Duration: ${r.duration}s`))}async function Pa(e,t,n){let r=hA(t),a=ce(`Downloading \u2192 ${r}\u2026`,n);try{let i=await fetch(e);if(!i.ok)throw new Error(`HTTP ${i.status}`);let c=Buffer.from(await i.arrayBuffer());return fA(r,c),a.succeed(`Saved: ${r} (${(c.length/1024/1024).toFixed(1)} MB)`),r}catch(i){a.fail(`Download failed: ${ee(i)}`),console.error(`
50
- MP4 URL (1-hour TTL): ${e}`),S(T.NetworkError)}}async function $u(e,t){let n=t.map(c=>c==null?"null":String(c)).join(":"),r=`${e}:${n}`,a=new TextEncoder().encode(r),i=await crypto.subtle.digest("SHA-256",a);return Array.from(new Uint8Array(i),c=>c.toString(16).padStart(2,"0")).join("")}async function EA(e){let t=await Ie(`/v1/projects/${e}/composition`,{method:"GET"});return t.status===404?"no-composition":t.status>=400?"unknown-composition":t.headers.etag??"no-etag"}async function Gr(e,t){if(X(e,"projectId",t),t.dryRun){O(t,"render_dry_run",{projectId:e,target:t.target,wouldCall:"POST /v1/projects/:id/renders \u2192 SSE watch \u2192 download MP4"}),t.json||console.log(`[dry-run] Would render project ${e} on ${t.target}.`);return}U(t.target),O(t,"render_prepare",{projectId:e,target:t.target});let n;try{n=t.idempotencyKey??await $u("render",[e,await EA(e)]),O(t,"idempotency_key",{scope:"render",key:n,overridden:!!t.idempotencyKey})}catch(d){n="",O(t,"idempotency_key",{scope:"render",key:null,skipped:!0,reason:d instanceof Error?d.message:String(d)})}let r=ce("Queuing render\u2026",t.json),a,i,c=!1;try{let d=t.aspect?{format:{aspectRatio:t.aspect,fps:t.fps??30,resolution:t.resolution??"fhd"}}:{};t.priority&&(d.priority=t.priority),t.intent&&(d.intent=t.intent);let p={"content-type":"application/json"};n&&(p["idempotency-key"]=n);let A=await Ie(`/v1/projects/${e}/renders`,{method:"POST",headers:p,body:JSON.stringify(d)});if(A.status>=400){let N=A.body?.error;throw new Le(A.status,{code:N?.code??"unknown",message:N?.message??A.statusText})}let E=A.body;a=E.id,i=E.status,c=A.headers["idempotency-replay"]==="true",r.succeed(c?`Render replayed: ${a} (status: ${i})`:`Render queued: ${a}`)}catch(d){r.fail(`Failed: ${ee(d)}`),oe(t,"render_prepare",d,F(d)),S(F(d))}c?O(t,"render_idempotent_replay",{renderId:a,projectId:e,status:i,idempotencyKey:n}):O(t,"render_queued",{renderId:a,projectId:e});let u=ce("Rendering\u2026",t.json),f;try{f=await La(e,a,{spinner:u,onProgress:d=>O(t,"render_progress",{renderId:a,...d})})}catch(d){u.fail(`Failed to watch render: ${ee(d)}`),oe(t,"render_progress",d,F(d)),S(F(d))}f.kind==="failed"&&(u.fail(f.message),oe(t,"render_progress",new Error(f.message),T.ApiServerError),S(T.ApiServerError)),u.succeed("Render complete"),f.outputUrl||(v(t,"render_complete",new Error("Render reported complete but no outputUrl was returned."),T.ApiServerError),t.json||console.error(`Render reported complete but no outputUrl was returned.
51
- Render ID: ${a}
99
+ `}function Ex(e,t){ue(e,"name",t);let i=t.dryRun??!1,a=t.force??!1,o=qve(e);o||sl(t,`name "${e}" has no alphanumeric characters to form a component identifier.`);let r=Bve(e);F(t,"new_component_prepare",{name:e,dryRun:i,force:a});let d=Bn(process.cwd());d||sl(t,"No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first to scaffold one.");let p=Eo(d,e),f=Vve(p);f&&Uve(p).length>0&&!a&&sl(t,`Component dir ${p} already exists and is non-empty. Pass --force to overwrite (this replaces local source).`);let u={"index.tsx":Wve(e,o),"config.ts":Zve(e,r),"definition.json":JSON.stringify(Cx(e),null,2)+`
100
+ `};if(!i){Ave(p,{recursive:!0});for(let[w,O]of Object.entries(u))_x(jx(p,w),O);let g=jx(d.root,Nve),S=JSON.parse(Fve(g,"utf8")),y=S.components??{};y[e]={custom:!0,manifest:Tx},S.components=y,_x(g,`${JSON.stringify(S,null,2)}
101
+ `)}ee(t,{ok:!0,dryRun:i,name:e,component:o,dir:p,files:Object.keys(u),overwritten:f&&a},()=>{console.log(`\u2713 ${i?"Would scaffold":"Scaffolded"} custom component ${e} (${o}) into ${p}`);for(let S of Object.keys(u))console.log(` ${i?"would write":"wrote"} ${S}`);i||console.log(` stamped cueframe.json components.${e} (custom)`),console.log("Edit index.tsx, then `cueframe push "+e+"` to publish it to CueFrame.")})}import{existsSync as fa,readFileSync as ha}from"fs";import{join as ga}from"path";import Re from"typescript";var Gve="cueframe.json",Hve=["effects","transitions","text","layouts","backgrounds","ui-blocks","scenes"];function Jve(e){return Hve.includes(e??"")?e:"layouts"}function Kve(e){let t=e;for(;Re.isAsExpression(t)||Re.isParenthesizedExpression(t)||typeof Re.isSatisfiesExpression=="function"&&Re.isSatisfiesExpression(t);)t=t.expression;return t}function Xve(e,t){for(let i of e.statements)if(Re.isImportDeclaration(i)&&Re.isStringLiteral(i.moduleSpecifier)&&i.moduleSpecifier.text===t)return!0;return!1}function Px(e,t){let i=Re.createSourceFile(t,e,Re.ScriptTarget.Latest,!0,Re.ScriptKind.TS),a;for(let r of i.statements)if(Re.isVariableStatement(r)){for(let d of r.declarationList.declarations)if(Re.isIdentifier(d.name)&&d.name.text==="config"&&d.initializer){let p=Kve(d.initializer);Re.isObjectLiteralExpression(p)&&(a=p)}if(a)break}let o={};if(!a)return o;for(let r of a.properties){if(!Re.isPropertyAssignment(r)||!(Re.isIdentifier(r.name)||Re.isStringLiteral(r.name)))continue;let d=r.name.text;Re.isStringLiteralLike(r.initializer)&&(d==="name"?o.name=r.initializer.text:d==="category"?o.category=r.initializer.text:d==="version"&&(o.version=r.initializer.text))}return o}function Yve(e){let t=ga(e,"config.ts");if(!fa(t))return{};let i=ha(t,"utf8"),a=Re.createSourceFile("config.ts",i,Re.ScriptTarget.Latest,!0,Re.ScriptKind.TS),o=ga(e,"_config.ts");return Xve(a,"./_config")&&fa(o)?Px(ha(o,"utf8"),"_config.ts"):Px(i,"config.ts")}function Qve(e){return e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function ewe(e,t){let i=ga(e.root,Gve);if(fa(i))try{let o=JSON.parse(ha(i,"utf8")).components?.[t]?.ejectedFrom;return typeof o=="string"&&o.length>0?o:void 0}catch{return}}var ua="declared in the v3 source definition";function Lx(e){let t=e.code;return t==="no_component_source"||t==="no_component_manifest"||t==="invalid_component_definition"?P.UserError:W(e)}async function Vx(e,t,i){let a=Eo(e,t),o=ga(a,"index.tsx");if(!fa(o))throw Object.assign(new Error(`Component "${t}" has no index.tsx at ${a}. Scaffold it first: cueframe new component ${t}`),{code:"no_component_source"});let r=ha(o,"utf8"),d=Yve(a),p=d.name??Qve(t),f=Jve(d.category),u=ewe(e,t),g=Dx(e,t,r),S=`Custom component "${t}" pushed from the local CueFrame workspace.`;F(i,"push_component",{id:t,name:p,category:f,version:d.version,ejectedFrom:u,propSchema:ua});let y=!1;try{await Hn.getComponent(t),y=!0}catch(w){if(w instanceof We&&w.status===404)y=!1;else throw w}return y?(await Hn.updateComponent(t,{source:g,name:p,description:S,category:f,origin:"customer-owned",...u?{ejectedFrom:u}:{}}),F(i,"pushed",{id:t,action:"updated"}),{id:t,action:"updated",name:p,category:f,propSchema:ua}):(await Hn.createComponent({componentId:t,source:g,name:p,description:S,category:f,origin:"customer-owned",...u?{ejectedFrom:u}:{}}),F(i,"pushed",{id:t,action:"created"}),{id:t,action:"created",name:p,category:f,propSchema:ua})}async function Ax(e,t){e||(B(t,"push",new Error("Pass a component id (cueframe push <id>), or use `cueframe sync` to push all."),P.UserError),E(P.UserError)),ue(e,"id",t),X(t.target);let i=Bn(process.cwd());i||(B(t,"push",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),P.UserError),E(P.UserError)),F(t,"push_prepare",{id:e,target:t.target});try{let a=await Vx(i,e,t);ee(t,{ok:!0,target:t.target,...a},()=>{console.log(`\u2713 ${a.action} component ${a.id} (${a.name}) on CueFrame`),console.log(` propSchema: ${a.propSchema}`)})}catch(a){let o=Lx(a);B(t,"push",a,o),E(o)}}async function Fx(e){X(e.target);let t=Bn(process.cwd());t||(B(e,"sync",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),P.UserError),E(P.UserError));let i=Tg(t);F(e,"sync_prepare",{target:e.target,count:i.length,ids:i});let a=[],o=[];for(let r of i)try{a.push(await Vx(t,r,e))}catch(d){let p=Lx(d);ze(e,"sync",d,p),o.push({id:r,error:d})}ee(e,{ok:o.length===0,target:e.target,pushed:a,failed:o.map(r=>({id:r.id,error:ge(r.error)}))},()=>{if(a.length===0&&o.length===0){console.log("No components to sync. Scaffold one with `cueframe eject` or `cueframe new component`.");return}for(let r of a)console.log(`\u2713 ${r.action} ${r.id} (${r.name})`);a.length>0&&console.log(` propSchema: ${ua}`);for(let r of o)console.error(`\u2716 ${r.id}: ${ge(r.error)}`);console.log(`Synced ${a.length}/${i.length} component(s) to CueFrame.`)}),o.length>0&&E(W(o[0].error))}var xa=["media","sessions","projects","renders","webhooks"],Ux={readonly:Object.fromEntries(xa.map(e=>[e,["read"]])),editall:Object.fromEntries(xa.map(e=>[e,["read","write"]]))};function twe(e){if(e.preset){let t=Ux[e.preset];return t||(console.error(`Unknown --preset "${e.preset}". Valid: ${Object.keys(Ux).join(", ")}.`),E(P.UserError)),t}if(e.scope)return owe(e.scope);console.error("Provide --scope or --preset (e.g. --preset readonly | editall)."),E(P.UserError)}function owe(e){let t={};for(let i of e.split(",").map(a=>a.trim()).filter(Boolean)){let[a,o]=i.split(":");(!a||!o)&&(console.error(`Invalid --scope "${i}". Use resource:rw (e.g. renders:rw,media:r).`),E(P.UserError)),xa.includes(a)||(console.error(`--scope "${i}": unknown resource "${a}". Valid: ${xa.join(", ")}.`),E(P.UserError));let r=[];/r/i.test(o)&&r.push("read"),/w/i.test(o)&&r.push("write"),r.length===0&&(console.error(`--scope "${i}": actions must include r and/or w.`),E(P.UserError)),t[a]=r}return Object.keys(t).length===0&&(console.error("--scope is required, e.g. --scope media:rw,projects:rw,renders:rw"),E(P.UserError)),t}async function Nx(e){X(e.target);let t=twe(e),i={name:e.name,permissions:t};if(e.expires){let a=Number(e.expires);(!Number.isFinite(a)||a<=0)&&(console.error("--expires must be a positive number of days."),E(P.UserError)),i.expiresIn=Math.round(a*86400)}try{let a=await ft("/v1/api-keys",{method:"POST",body:JSON.stringify(i),headers:{"content-type":"application/json"}});ee(e,{ok:!0,id:a.id,prefix:a.prefix,start:a.start,key:a.key},()=>{let o=Object.entries(t).map(([r,d])=>`${r}:${d.map(p=>p[0]).join("")}`).join(" ");console.log(`\u2713 API key "${e.name}" created \u2014 scopes: ${o}`),console.log(`
102
+ ${a.key}
103
+ `),console.log(" Shown ONCE \u2014 store it now (paste it into your integration; not saved here).")})}catch(a){B(e,"keys_create",a,W(a)),E(W(a))}}async function qx(e){X(e.target);let t;try{t=await Le("/api/auth/api-key/list",{method:"GET"})}catch(a){B(e,"keys_list",a,W(a)),E(W(a))}t.status>=400&&(B(e,"keys_list",new Error(`list failed (${t.status})`),be(t.status)),E(be(t.status)));let i=Array.isArray(t.body)?t.body:[];ee(e,{ok:!0,keys:i},()=>{if(i.length===0){console.log("No API keys.");return}for(let a of i)console.log(` ${a.id} ${a.name??"(unnamed)"} ${a.start??""}\u2026`)})}async function Bx(e,t){X(t.target);let i;try{i=await Le("/api/auth/api-key/delete",{method:"POST",body:JSON.stringify({keyId:e}),headers:{"content-type":"application/json"}})}catch(a){B(t,"keys_revoke",a,W(a)),E(W(a))}i.status>=400&&(B(t,"keys_revoke",new Error(`revoke failed (${i.status})`),be(i.status)),E(be(i.status))),ee(t,{ok:!0,revoked:e},()=>console.log(`\u2713 Revoked ${e}`))}async function Wx(e){X(e.target),F(e,"list_prepare",{target:e.target});try{let t=await Gt.listProjects(),i=e.limit,a=typeof i=="number"&&Number.isFinite(i)&&i>0?t.data.slice(0,i):t.data;if(F(e,"list_complete",{count:a.length,total:t.data.length,truncated:a.length<t.data.length,projects:a}),!e.json){if(t.data.length===0){console.log("No projects found.");return}for(let o of a){let r=new Date(o.createdAt).toLocaleDateString();console.log(` ${o.id} ${o.name} (${r})`)}a.length<t.data.length&&console.log(` \u2026 ${t.data.length-a.length} more (raise --limit to see all)`)}}catch(t){B(e,"list",t,W(t)),E(W(t))}}import{readFile as nwe,stat as rwe}from"fs/promises";import{existsSync as iwe}from"fs";import{basename as awe,extname as swe}from"path";var cwe=4e3,Zx=1800*1e3,Gx=5,Hx={".mp4":"video/mp4",".mov":"video/quicktime",".webm":"video/webm",".mkv":"video/x-matroska",".wav":"audio/wav",".mp3":"audio/mpeg",".m4a":"audio/mp4",".aac":"audio/aac",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml"};function dwe(e,t){let i=swe(e).toLowerCase(),a=Hx[i];if(!a){let o=new Error(`Unsupported file extension "${i||"(none)"}" for ${e}. Supported: ${Object.keys(Hx).join(", ")}.`);B(t,"preflight",o,P.UserError),E(P.UserError)}return a}var Jx=["vo","music","sfx","ambience"];async function za(e,t){iwe(e)||(B(t,"preflight",new Error(`File not found: ${e}`),P.UserError),E(P.UserError));let i=awe(e),a=(await rwe(e)).size,o=dwe(i,t);if(t.audioRole&&!Jx.includes(t.audioRole)){let T=new Error(`--audio-role must be one of ${Jx.join("|")} (got "${t.audioRole}")`);B(t,"preflight",T,P.UserError),E(P.UserError)}let r=t.audioRole;if(t.dryRun){F(t,"upload_dry_run",{file:i,sizeBytes:a,contentType:o,target:t.target,analyzeAfter:!!t.analyze,wouldCall:"POST /v1/media \u2192 presigned PUT \u2192 POST /v1/media/:id/finalize \u2192 poll processing"}),t.json||console.log(`[dry-run] Would upload ${i} (${(a/1024/1024).toFixed(1)} MB, ${o}) to ${t.target}.`);return}X(t.target),F(t,"upload_prepare",{file:i,sizeBytes:a,contentType:o,target:t.target});let d=Se("Preparing upload\u2026",t.json),p,f;try{let T=await ht.createMediaUpload({filename:i,contentType:o,size:a});p=T.id,f=T.uploadUrl,d.succeed("Ready"),F(t,"upload_ready",{mediaItemId:p})}catch(T){d.fail(`Failed: ${ge(T)}`),ze(t,"upload_prepare",T,W(T)),E(W(T))}let u=Date.now(),g=Se(`Uploading ${i} (${(a/1024/1024).toFixed(1)} MB)\u2026`,t.json);try{let T=await nwe(e),j=await fetch(f,{method:"PUT",headers:{"Content-Type":o},body:T});if(!j.ok)throw new Error(`presigned PUT failed: ${j.status} ${j.statusText}`);await ht.finalizeMedia(p,r?{audioRole:r}:{}),g.succeed(`Uploaded: ${i}`),F(t,"upload_complete",{mediaItemId:p,bytesUploaded:a,...r?{audioRole:r}:{},durationMs:Date.now()-u})}catch(T){g.fail(`Upload failed: ${ge(T)}`),ze(t,"upload",T,P.NetworkError),E(P.NetworkError)}let S=Se("Processing (transcription)\u2026",t.json),y=Date.now(),w=null,O=0;for(;;){if(await new Promise(T=>setTimeout(T,cwe)),Date.now()-y>Zx){let T=`Processing did not complete within ${Math.round(Zx/6e4)}m. Media item ID: ${p}.`;S.fail(T),ze(t,"process",new Error(T),P.ApiServerError),E(P.ApiServerError)}try{let T=await ht.getMedia(p);O=0;let j=T?.processingStatus?.phase??"unknown",Z=T?.processingStatus?.percent??null,U=Math.round((Date.now()-y)/1e3),V=Z!=null?` \xB7 ${Math.round(Z*100)}%`:"";if(S.text=`Processing\u2026 ${j}${V} (${U}s)`,F(t,"process_progress",{phase:j,percent:Z,elapsedSec:U}),j==="complete"||j==="completed"){S.succeed(`Ready: ${p}`),w=T,F(t,"process_complete",{mediaItemId:p,durationMs:Date.now()-y,item:T});break}if(j==="error"){let H=T?.processingStatus?.error??"unknown error";S.fail(`Processing failed: ${H}`),ze(t,"process",new Error(H),P.ApiServerError),E(P.ApiServerError)}}catch(T){T instanceof We&&[401,403,404].includes(T.status)&&(S.fail(`Processing check failed: ${ge(T)}`),ze(t,"process",T,W(T)),E(W(T))),O++,O>=Gx&&(S.fail(`Processing check failed: ${ge(T)}`),ze(t,"process",new Error(`Processing status unreadable after ${Gx} consecutive failures: ${ge(T)}`),W(T)),E(W(T)))}}if(t.analyze){Ke(`
104
+ Media item ID: ${p}`,t);let{analyzeCommand:T}=await import("./analyze-5OURFQXO.js");return await T(p,{target:t.target,wait:!0,json:t.json}),{mediaItemId:p,item:w}}return t.json||ee(t,{mediaItemId:p,item:w},()=>{console.log(`
105
+ Media item ID: ${p}`),console.log(`
106
+ Run \`cueframe analyze ${p} --target ${t.target}\` to generate clip suggestions.`)}),{mediaItemId:p,item:w}}function cl(e){let t=Math.floor(e/60),i=Math.floor(e%60);return`${t}:${String(i).padStart(2,"0")}`}async function Kx(e,t){e!==void 0&&ue(e,"mediaItemId",t),X(t.target),F(t,"clips_prepare",{target:t.target,mode:e?"suggestions":"media-list",...e?{mediaItemId:e}:{}});try{if(!e){let a=await ht.listMedia();if(F(t,"clips_complete",{mode:"media-list",count:a.data.length,media:a.data}),!t.json){if(a.data.length===0){console.log("No media items found. Import a video first.");return}console.log("Media items (pass the ID to `cueframe clips <id>`):"),console.log("");for(let o of a.data){let r=o.duration?`${cl(o.duration)} `:"",d=o.processingStatus?.phase??"unknown",p=d==="complete"?"":` [${d}]`;console.log(` ${o.id} ${o.name} ${r}${p}`)}}return}let i=await bl.listMediaSuggestions(e);if(F(t,"clips_complete",{mode:"suggestions",mediaItemId:e,count:i.suggestions.length,suggestions:i.suggestions}),!t.json){if(i.suggestions.length===0){console.log("No clip suggestions found for this media item."),console.log("If analysis is still running, try again shortly. Otherwise the video may not have suitable clips.");return}console.log(`${i.suggestions.length} clip suggestion${i.suggestions.length!==1?"s":""}:`),console.log("");for(let a of i.suggestions){let o=`${cl(a.trim.start)} \u2192 ${cl(a.trim.end)}`,r=(a.trim.end-a.trim.start).toFixed(1);console.log(` ${a.id}`),console.log(` ${a.title}`),console.log(` ${o} (${r}s) ${a.format} score: ${a.score}`),a.reason&&console.log(` ${a.reason}`),console.log("")}}}catch(i){B(t,"clips",i,W(i)),E(W(i))}}import{readFileSync as pwe}from"fs";async function Xx(e,t){ue(e,"projectId",t),X(t.target),F(t,"composition_get_prepare",{projectId:e});let i=await Zn(`/v1/projects/${e}/composition`,{method:"GET"},t,"composition_get");i.status>=400&&(Gn(i,t,"composition_get"),E(be(i.status)));let a=i.headers.etag,o=a&&ez(a);F(t,"composition_get_complete",{projectId:e,etag:o,status:i.status}),ee(t,{etag:o,composition:i.body},()=>{o&&console.log(`# ETag: ${o}`),console.log(JSON.stringify(i.body,null,2))})}async function Yx(e,t){ue(e,"projectId",t),t.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),E(P.UserError)),X(t.target);let i=await dl(e,t),a=await tz(t.body);F(t,"composition_put_prepare",{projectId:e,ifMatch:i});let o=new Headers({"content-type":"application/json","if-match":i}),r=await Zn(`/v1/projects/${e}/composition`,{method:"PUT",headers:o,body:a},t,"composition_put");r.status>=400&&(Gn(r,t,"composition_put"),E(be(r.status)));let d=r.headers.etag;return F(t,"composition_put_complete",{projectId:e,etag:d,status:r.status,response:r.body}),ee(t,{etag:d,response:r.body},()=>{console.log(`Composition saved (ETag: ${d??"unknown"}).`),r.body&&typeof r.body=="object"&&console.log(JSON.stringify(r.body,null,2))}),{etag:d,response:r.body}}async function ba(e,t){ue(e,"projectId",t),t.suggestionId||(console.error("--suggestion <suggestionId> is required"),E(P.UserError)),X(t.target);let i=await dl(e,t),a;if(t.format)try{a=JSON.parse(t.format)}catch{console.error(`--format must be JSON, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`),E(P.UserError)}let o=JSON.stringify({suggestionId:t.suggestionId,...a?{format:a}:{}});F(t,"composition_from_suggestion_prepare",{projectId:e,suggestionId:t.suggestionId,ifMatch:i});let r,d=i,p=0,f=3;for(;;){p++;let g=new Headers({"content-type":"application/json","if-match":d});if(r=await Zn(`/v1/projects/${e}/composition/from-suggestion`,{method:"POST",headers:g,body:o},t,"composition_from_suggestion"),!(r.status===409&&r.body?.error?.code==="stale_etag"))break;if(p>f){F(t,"composition_from_suggestion_etag_retries_exhausted",{projectId:e,attempts:f});break}F(t,"composition_from_suggestion_etag_retry",{projectId:e,attempt:p,reason:"stale_etag"}),d=await dl(e,t)}r.status>=400&&(Gn(r,t,"composition_from_suggestion"),E(be(r.status)));let u=r.headers.etag;F(t,"composition_from_suggestion_complete",{projectId:e,suggestionId:t.suggestionId,etag:u,status:r.status,response:r.body,attempts:p}),ee(t,{etag:u,response:r.body},()=>{console.log(`Composition built from suggestion ${t.suggestionId} (ETag: ${u??"unknown"}).`),r.body&&typeof r.body=="object"&&console.log(JSON.stringify(r.body,null,2))})}async function Qx(e){e.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),E(P.UserError)),X(e.target);let t=await tz(e.body);F(e,"composition_validate_prepare",{});let i=new Headers({"content-type":"application/json"}),a=await Zn("/v1/composition/validate",{method:"POST",headers:i,body:t},e,"composition_validate");return a.status>=400&&(Gn(a,e,"composition_validate"),E(be(a.status))),F(e,"composition_validate_complete",{status:a.status}),ee(e,{valid:!0},()=>{console.log("\u2713 Composition is valid.")}),{valid:!0}}function ez(e){return e.replace(/^W\//,"").replace(/-gzip(?=("?)$)/,"")}async function dl(e,t){if(t.force)return"*";if(t.ifMatch)return t.ifMatch;let i=await Zn(`/v1/projects/${e}/composition`,{method:"GET"},t,"composition_etag_fetch");if(i.status===404)return Ke("No existing composition; treating as create (If-Match: *).",t),"*";i.status>=400&&(Gn(i,t,"composition_etag_fetch"),E(be(i.status)));let a=i.headers.etag;return a||(B(t,"composition_etag_fetch",new Error("Server returned no ETag on composition GET; cannot safely thread If-Match. Pass --force to overwrite anyway."),P.ApiServerError),E(P.ApiServerError)),ez(a)}async function tz(e){if(e.startsWith("@")){let t=e.slice(1);if(t==="-"){let i=[];for await(let a of process.stdin)i.push(Buffer.isBuffer(a)?a:Buffer.from(a));return Buffer.concat(i).toString("utf-8")}return pwe(t,"utf-8")}return e}async function Zn(e,t,i,a){try{return await Le(e,t)}catch(o){B(i,a,o,P.NetworkError),E(P.NetworkError)}}function Gn(e,t,i){let a=e.body?.error,o=a?.code??"unknown",r=a?.message??e.statusText,d=mwe(o,e.status,a?.details),p=be(e.status);t.json?B(t,i,Object.assign(new Error(r),{code:o,status:e.status,details:a?.details,advice:d}),p):(process.stderr.write(`\u2716 ${i}: ${r} (${o}, ${e.status})
107
+ `),d&&process.stderr.write(` \u2192 ${d}
108
+ `))}function mwe(e,t,i){let a=new We(t,{code:e,message:"",details:i&&typeof i=="object"?i:void 0}),o=xl(a);return o||(t===404?"Project or composition not found. Run `cueframe list` to confirm the project ID; the composition may not yet exist.":null)}async function oz(e){let t=e.aspect?{aspectRatio:e.aspect,fps:e.fps??30,resolution:e.resolution??"fhd"}:void 0;if(e.dryRun){if(F(e,"project_create_dry_run",{name:e.name,target:e.target,format:t??null,brandKitId:e.brandKitId??null,fromSuggestion:e.fromSuggestion??null,cheap:e.cheap??!1,wouldCall:e.fromSuggestion?e.cheap?"POST /v1/projects \u2192 POST /v1/projects/:id/composition/from-suggestion (sync translator)":"POST /v1/projects \u2192 POST /v1/projects/:id/compose (async) \u2192 SSE watch":"POST /v1/projects"}),!e.json){let o=e.cheap?" (--cheap: deterministic translator)":"";console.log(`[dry-run] Would create project "${e.name}" on ${e.target}`+(e.fromSuggestion?` from suggestion ${e.fromSuggestion}${o}.`:"."))}return}X(e.target),F(e,"project_create_prepare",{name:e.name,target:e.target,fromSuggestion:e.fromSuggestion??null,brandKitId:e.brandKitId??null,cheap:e.cheap??!1});let i=Se(`Creating project "${e.name}"\u2026`,e.json),a;try{a=await Gt.createProject({name:e.name,format:t,brandKitId:e.brandKitId}),i.succeed(`Created: ${a.id}`)}catch(o){i.fail(`Failed: ${ge(o)}`),ze(e,"project_create",o,W(o)),E(W(o))}if(F(e,"project_create_complete",{project:a}),!e.json&&!e.fromSuggestion&&console.log(`
109
+ ${a.id} ${a.name}`),e.fromSuggestion){let o=!1;if(o||await ba(a.id,{target:e.target,suggestionId:e.fromSuggestion,json:e.json,force:!0}),!e.json){let r=o?"(composed)":"(translated)";console.log(`
110
+ ${a.id} ${a.name} \u2190 composed from ${e.fromSuggestion} ${r}`)}}return a}async function nz(e,t){ue(e,"projectId",t),X(t.target),F(t,"project_delete_prepare",{projectId:e});try{await Gt.deleteProject(e),F(t,"project_delete_complete",{projectId:e}),ee(t,{ok:!0,projectId:e},()=>{console.log(`Project ${e} deleted.`)})}catch(i){B(t,"project_delete",i,W(i)),E(W(i))}}async function rz(e,t){ue(e,"mediaId",t),X(t.target),F(t,"media_delete_prepare",{mediaId:e});try{await ht.deleteMedia(e),F(t,"media_delete_complete",{mediaId:e}),ee(t,{ok:!0,mediaId:e},()=>{console.log(`Media ${e} deleted.`)})}catch(i){B(t,"media_delete",i,W(i)),E(W(i))}}import{writeFileSync as lwe}from"fs";import{resolve as uwe}from"path";var fwe=1500,hwe=4e3,gwe=1800*1e3,iz=5;async function pl(e,t,i={}){let a=Date.now()+(i.timeoutMs??gwe),o=i.reconnectBackoffMs??fwe,r=Date.now(),d=0;for(;Date.now()<a;){let p=null,f=!1;try{for await(let u of zl(e,t)){if(d=0,u.event==="progress"){let g=Math.round((Date.now()-r)/1e3);if(i.spinner){let S=Math.round(u.data.percent*100);i.spinner.text=`Rendering\u2026 ${u.data.phase}${S>0?` \xB7 ${S}%`:""} (${g}s)`}i.onProgress?.({phase:u.data.phase,percent:u.data.percent,elapsedSec:g});continue}u.event==="complete"?p={kind:"complete",outputUrl:u.data.outputUrl,outputExpiresAt:u.data.outputExpiresAt,duration:u.data.duration}:p={kind:"failed",message:u.data.message};break}}catch(u){if(u instanceof We)f=!0;else{if(d++,d>=iz)throw Object.assign(new Error(`Render stream unreachable after ${iz} consecutive transport failures: ${u instanceof Error?u.message:String(u)}`),{cause:u});await new Promise(g=>setTimeout(g,o));continue}}if(p)return p;if(f){let u=await xwe(e,t);if(u)return u;await new Promise(g=>setTimeout(g,hwe));continue}await new Promise(u=>setTimeout(u,o))}return{kind:"failed",message:`Timed out waiting for render to reach a terminal state. Render ID: ${t}, Project ID: ${e}.`}}async function xwe(e,t){let i=await Sl.getRender(e,t);return i.status==="complete"?{kind:"complete",outputUrl:i.outputUrl??null,outputExpiresAt:null,duration:null}:i.status==="error"||i.status==="cancelled"?{kind:"failed",message:i.error??`Render ${i.status}`}:null}async function az(e,t){ue(e,"renderId",t),ue(t.project,"projectId",t),X(t.target),F(t,"render_watch_prepare",{renderId:e,projectId:t.project,target:t.target});let i=Se(`Watching render ${e}\u2026`,t.json),a;try{a=await pl(t.project,e,{spinner:i,onProgress:r=>F(t,"render_progress",{renderId:e,...r})})}catch(r){i.fail(`Failed to watch render: ${ge(r)}`),ze(t,"render_watch",r,W(r)),E(W(r))}a.kind==="failed"&&(i.fail(a.message),ze(t,"render_watch",new Error(a.message),P.ApiServerError),E(P.ApiServerError)),i.succeed(`Render complete (${e})`);let o=null;t.download&&a.outputUrl?o=await ml(a.outputUrl,t.out??`./reel-${e.slice(0,8)}.mp4`,t.json):a.outputUrl||(B(t,"render_watch",new Error("Render reported complete but no outputUrl was returned."),P.ApiServerError),t.json||console.error(`Render reported complete but no outputUrl was returned.
111
+ Re-fetch via GET /v1/projects/${t.project}/renders/${e}.`),E(P.ApiServerError)),F(t,"render_complete",{renderId:e,projectId:t.project,outputUrl:a.outputUrl,outputExpiresAt:a.outputExpiresAt,duration:a.duration,outputPath:o}),t.json||(a.outputUrl&&console.log(`MP4 URL: ${a.outputUrl}`),a.outputExpiresAt&&console.log(`Expires: ${a.outputExpiresAt}`),a.duration!=null&&console.log(`Duration: ${a.duration}s`))}async function ml(e,t,i){let a=uwe(t),o=Se(`Downloading \u2192 ${a}\u2026`,i);try{let r=await fetch(e);if(!r.ok)throw new Error(`HTTP ${r.status}`);let d=Buffer.from(await r.arrayBuffer());return lwe(a,d),o.succeed(`Saved: ${a} (${(d.length/1024/1024).toFixed(1)} MB)`),a}catch(r){o.fail(`Download failed: ${ge(r)}`),console.error(`
112
+ MP4 URL (1-hour TTL): ${e}`),E(P.NetworkError)}}async function sz(e,t){let i=t.map(d=>d==null?"null":String(d)).join(":"),a=`${e}:${i}`,o=new TextEncoder().encode(a),r=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(r),d=>d.toString(16).padStart(2,"0")).join("")}async function zwe(e){let t=await Le(`/v1/projects/${e}/composition`,{method:"GET"});return t.status===404?"no-composition":t.status>=400?"unknown-composition":t.headers.etag??"no-etag"}async function Sa(e,t){if(ue(e,"projectId",t),t.dryRun){F(t,"render_dry_run",{projectId:e,target:t.target,wouldCall:"POST /v1/projects/:id/renders \u2192 SSE watch \u2192 download MP4"}),t.json||console.log(`[dry-run] Would render project ${e} on ${t.target}.`);return}X(t.target),F(t,"render_prepare",{projectId:e,target:t.target});let i;try{i=t.idempotencyKey??await sz("render",[e,await zwe(e)]),F(t,"idempotency_key",{scope:"render",key:i,overridden:!!t.idempotencyKey})}catch(g){i="",F(t,"idempotency_key",{scope:"render",key:null,skipped:!0,reason:g instanceof Error?g.message:String(g)})}let a=Se("Queuing render\u2026",t.json),o,r,d=!1;try{let g=t.aspect?{format:{aspectRatio:t.aspect,fps:t.fps??30,resolution:t.resolution??"fhd"}}:{};t.priority&&(g.priority=t.priority),t.intent&&(g.intent=t.intent);let S={"content-type":"application/json"};i&&(S["idempotency-key"]=i);let y=await Le(`/v1/projects/${e}/renders`,{method:"POST",headers:S,body:JSON.stringify(g)});if(y.status>=400){let O=y.body?.error;throw new We(y.status,{code:O?.code??"unknown",message:O?.message??y.statusText})}let w=y.body;o=w.id,r=w.status,d=y.headers["idempotency-replay"]==="true",a.succeed(d?`Render replayed: ${o} (status: ${r})`:`Render queued: ${o}`)}catch(g){a.fail(`Failed: ${ge(g)}`),ze(t,"render_prepare",g,W(g)),E(W(g))}d?F(t,"render_idempotent_replay",{renderId:o,projectId:e,status:r,idempotencyKey:i}):F(t,"render_queued",{renderId:o,projectId:e});let p=Se("Rendering\u2026",t.json),f;try{f=await pl(e,o,{spinner:p,onProgress:g=>F(t,"render_progress",{renderId:o,...g})})}catch(g){p.fail(`Failed to watch render: ${ge(g)}`),ze(t,"render_progress",g,W(g)),E(W(g))}f.kind==="failed"&&(p.fail(f.message),ze(t,"render_progress",new Error(f.message),P.ApiServerError),E(P.ApiServerError)),p.succeed("Render complete"),f.outputUrl||(B(t,"render_complete",new Error("Render reported complete but no outputUrl was returned."),P.ApiServerError),t.json||console.error(`Render reported complete but no outputUrl was returned.
113
+ Render ID: ${o}
52
114
  Project ID: ${e}
53
- Re-fetch via GET /v1/projects/${e}/renders/${a} once the URL is signed.`),S(T.ApiServerError));let l=await Pa(f.outputUrl,t.out??`./reel-${a.slice(0,8)}.mp4`,t.json);return O(t,"render_complete",{renderId:a,projectId:e,outputUrl:f.outputUrl,outputExpiresAt:f.outputExpiresAt,duration:f.duration,outputPath:l}),{renderId:a,projectId:e,outputUrl:f.outputUrl,outputExpiresAt:f.outputExpiresAt,duration:f.duration,outputPath:l}}import{existsSync as kh}from"fs";import{createHash as sR,randomUUID as cR}from"crypto";import{readFile as lR}from"fs/promises";import{resolve as Nl}from"path";var Yu=["Inter","Space Mono","Montserrat","Roboto","Poppins","Oswald","Playfair Display","Bebas Neue","Instrument Serif","National Park","Bricolage Grotesque","Schibsted Grotesk"],Gu=["Georgia"],Ku=Object.freeze({Inter:{slug:"inter",faces:[{weight:"100 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},Montserrat:{slug:"montserrat",faces:[{weight:"100 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},Roboto:{slug:"roboto",faces:[{weight:"100 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},Oswald:{slug:"oswald",faces:[{weight:"400 700",file:"400"}],captionDefaults:{base:600,emphasis:700}},"Playfair Display":{slug:"playfair-display",faces:[{weight:"400 900",file:"400"},{weight:"400 900",file:"400-italic",style:"italic"}],captionDefaults:{base:600,emphasis:800}},"Bricolage Grotesque":{slug:"bricolage-grotesque",faces:[{weight:"200 800",file:"400"}],captionDefaults:{base:600,emphasis:800}},"Schibsted Grotesk":{slug:"schibsted-grotesk",faces:[{weight:"400 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},"Space Mono":{slug:"space-mono",faces:[{weight:"400",file:"400"},{weight:"700",file:"700"}],captionDefaults:{base:400,emphasis:700}},Poppins:{slug:"poppins",faces:[{weight:"400",file:"400"},{weight:"700",file:"700"}],captionDefaults:{base:400,emphasis:700}},"Bebas Neue":{slug:"bebas-neue",faces:[{weight:"400",file:"400"}],captionDefaults:{base:400,emphasis:400}},"Instrument Serif":{slug:"instrument-serif",faces:[{weight:"400",file:"400"},{weight:"400",file:"400-italic",style:"italic"}],captionDefaults:{base:400,emphasis:400}},"National Park":{slug:"national-park",faces:[{weight:"400",file:"400"}],captionDefaults:{base:400,emphasis:400}},Georgia:{slug:"gelasio",faces:[{weight:"400",file:"400"},{weight:"700",file:"700"}],captionDefaults:{base:400,emphasis:700}}}),Pn="normal";function At(e){return Ku[e]}function SA(e,t){let n=e.weight.split(/\s+/).map(Number);if(n.some(i=>!Number.isFinite(i)))return!1;if(n.length===1)return n[0]===t;let[r,a]=n;return t>=r&&t<=a}function Kr(e,t,n){let r=At(e);return r?r.faces.some(a=>(a.style??Pn)===n&&SA(a,t)):!1}function Qu(e){let t=At(e);return t?[...new Set(t.faces.map(n=>n.weight.split(/\s+/).join("-")))].join(", "):""}function zu(e){return e.split(",").map(t=>t.trim().replace(/^['"]|['"]$/g,"").trim()).filter(Boolean)}var TA=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);var xA=new Map(Object.keys(Ku).map(e=>[e.toLowerCase(),e]));function Ha(e){if(typeof e!="string"||e.trim().length===0)return{kind:"default"};if(e.includes("$brand:")||e.includes("${"))return{kind:"unknown"};let t;for(let n of zu(e)){let r=n.toLowerCase();if(TA.has(r))continue;let a=xA.get(r);if(!a)return{kind:"unknown"};t??=a}return t?{kind:"bundled",family:t}:{kind:"default"}}function Ju(e){let t=Ha(e);return t.kind==="bundled"?t.family:e}var Hn=Object.freeze({fontFamily:"Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,emphasisFontWeight:800,emphasisFontStyle:"normal"}),CA="Inter";function Xu(e){return typeof e!="string"||e.trim().length===0?{kind:"bundled",family:CA}:Ha(e)}function Zu(e){return(e.kind==="bundled"?At(e.family):void 0)?.captionDefaults??{base:Hn.fontWeight,emphasis:Hn.emphasisFontWeight}}function IA(e){let t=e.fontFamily??Hn.fontFamily,n=Xu(e.fontFamily),r=e.fontWeight??Zu(n).base,a=e.emphasisFontFamily,i=a??t,c=a===void 0?n:Xu(a),u=e.emphasisFontWeight??Zu(c).emphasis,f=e.emphasisFontStyle??Hn.emphasisFontStyle;return{base:{role:"base",field:"fontWeight",stack:t,resolved:n,weight:r,style:Pn,fromDefault:e.fontWeight===void 0},emphasis:{role:"emphasis",field:f==="italic"?"emphasisFontStyle":"emphasisFontWeight",stack:i,resolved:c,weight:u,style:f,fromDefault:f==="italic"?e.emphasisFontStyle===void 0:e.emphasisFontWeight===void 0}}}function _A(e){let{base:t,emphasis:n}=IA(e);return n.stack===t.stack&&n.weight===t.weight&&n.style===t.style?[t]:[t,n]}var $N=Object.freeze(["fontWeight","emphasisFontWeight","emphasisFontStyle"]);function qu(e){return e.fromDefault?`no ${e.field} is authored, so the ${e.role} run is drawn at the default ${e.style==="italic"?`${e.field} "italic"`:e.weight}`:`${e.field} ${e.style==="italic"?'"italic"':e.weight} has no file behind it`}function kA(e){if(e.resolved.kind==="default"&&e.style==="italic")return{field:e.field,face:{family:e.stack,weight:e.weight,style:e.style},message:`font_not_reproducible \u2014 ${qu(e)}: "${e.stack}" names no font file the render bundle carries, so this stack ships no italic binary to select and the browser would slant whatever upright face it matched and the render refuses it before capture. Emphasise with emphasisFontWeight, emphasisColor or emphasisScale, or name an uploaded brand font that is sealed in italic.`};if(e.resolved.kind!=="bundled")return null;let t={family:e.resolved.family,weight:e.weight,style:e.style};if(e.style==="italic"&&!At(e.resolved.family).faces.some(r=>r.style==="italic"))return{field:e.field,face:t,message:`font_not_reproducible \u2014 ${qu(e)}: ${e.resolved.family} ships no italic binary, so the browser would slant the upright face and the render refuses it before capture. Emphasise with emphasisFontWeight, emphasisColor or emphasisScale, or name an uploaded brand font that is sealed in italic.`};if(Kr(e.resolved.family,e.weight,e.style))return null;let n=e.role==="emphasis"?"emphasisFontWeight":"fontWeight";return{field:n,face:t,message:`font_not_reproducible \u2014 ${n} ${e.weight} (${e.style}) has no file behind it: ${e.resolved.family} ships ${Qu(e.resolved.family)}. The render refuses a weight outside that range before capture rather than let the browser substitute a nearby file, so set ${n} to a weight the family covers, or pick a family whose files do.`}}function qt(e){let t=[];for(let n of _A(e)){let r=kA(n);r&&t.push(r)}return t}var wA=Object.freeze(["fontFamily","fontWeight","emphasisFontFamily","emphasisFontWeight","emphasisFontStyle"]);function Ua(e){return e.caption?{ref:e.caption,slot:"caption"}:e.body?{ref:e.body,slot:"body"}:{ref:e.heading,slot:"heading"}}function ja(e){let t=e.captionProfile?.fontFamily;if(t!==void 0)return{family:t,path:"captionProfile.fontFamily"};let{ref:n,slot:r}=Ua(e.fonts);return{family:n?.family,path:`fonts.${r}`}}function ed(e){let t=ja(e),n=e.captionProfile??{},r={...n,...t.family!==void 0?{fontFamily:t.family}:{fontFamily:void 0}};return qt(r).map(a=>({...a,path:n[a.field]!==void 0?`captionProfile.${a.field}`:t.path}))}var RA=Object.freeze([400,500,600,700,800,900]);var ut=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function td(e,t,n){let r;for(let a of At(e)?.faces??[]){if((a.style??Pn)!==n)continue;let[i,c=i]=a.weight.split(/\s+/).map(Number);if(i===void 0||!Number.isFinite(i)||!Number.isFinite(c))continue;let u=Math.min(Math.max(t,i),c),f=Math.abs(u-t),l=r===void 0?1/0:Math.abs(r-t);(r===void 0||f<l||f===l&&u>r)&&(r=u)}return r}function NA(e,t,n){let r=At(e);if(!r)return;let a=[],i=n;i==="italic"&&!r.faces.some(u=>u.style==="italic")&&(i="normal",a.push("italicWithoutFace"));let c=t;if(!Kr(e,t,i)){let u=td(e,t,i);u!==void 0&&(c=u,a.push("fontWeightToShippedFace"))}return{weight:c,style:i,rules:a}}function bt(e,t){e.includes(t)||e.push(t)}function Va(e,t){let n=[],r=e;for(;;){let a=r;for(let i of qt({...t,...a}))if(i.field==="emphasisFontStyle"){let{emphasisFontStyle:c,...u}=a;a=t?.emphasisFontStyle==="italic"?{...u,emphasisFontStyle:"normal"}:u,bt(n,"italicWithoutFace")}else if(i.field==="fontWeight"||i.field==="emphasisFontWeight"){let c=td(i.face.family,i.face.weight,i.face.style);if(c===void 0||c===i.face.weight)continue;a={...a,[i.field]:c},bt(n,"fontWeightToShippedFace")}if(a===r)return{value:r,rules:n};r=a}}function OA(e){let t=[];if(!ut(e))return{value:e,rules:t};let n=e,r;if(ut(e.style)){let a=Va(e.style);a.rules.forEach(i=>bt(t,i)),r=a.value,r!==e.style&&(n={...n,style:r})}if(Array.isArray(e.layouts)){let a=!1,i=e.layouts.map(c=>{if(!ut(c)||!ut(c.style))return c;let u=Va(c.style,r);return u.rules.forEach(f=>bt(t,f)),u.value===c.style?c:(a=!0,{...c,style:u.value})});a&&(n={...n,layouts:i})}return{value:n,rules:t}}var vA=[{family:"fontFamily",weight:"fontWeight",style:"fontStyle"},{family:"emphasisFontFamily",weight:"emphasisFontWeight",style:"emphasisFontStyle"}];function Wa(e,t){if(Array.isArray(e)){let n=!1,r=e.map(a=>{let i=Wa(a,t);return i!==a&&(n=!0),i});return n?r:e}return ut(e)?FA(e,t):e}function FA(e,t){let n=e;for(let[r,a]of Object.entries(e)){let i=Wa(a,t);i!==a&&(n={...n,[r]:i})}for(let r of vA){let a=n[r.family];if(typeof a!="string"||a.startsWith("$brand:")||a.includes("${"))continue;let i=Ju(a),c=n[r.weight],u=typeof c=="number"?c:400,f=n[r.style]==="italic"?"italic":"normal",l=NA(i,u,f);if(l){if(l.style!==f){let{[r.style]:d,...p}=n;n=p}l.weight!==u&&(n={...n,[r.weight]:l.weight}),l.rules.forEach(d=>bt(t,d))}}return n}function nd(e){let t=[];return{value:Wa(e,t),rules:t}}function Qr(e){let t=[];if(!ut(e))return{value:e,rules:t};let n=e;for(let[r,a]of Object.entries(e)){let i=r==="captions"?OA(a):nd(a);i.rules.forEach(c=>bt(t,c)),i.value!==a&&(n={...n,[r]:i.value})}return{value:n,rules:t}}function DA(e){let t=n=>ut(n)&&typeof n.fontFamily=="string"?n.fontFamily:void 0;return{fontFamily:t(e.bodyFont)??t(e.headingFont)}}function $a(e){let t=[];if(!ut(e))return{value:e,rules:t};let{captionProfile:n,...r}=e,a=nd(r);a.rules.forEach(c=>bt(t,c));let i=n;if(ut(n)){let c=Va(n,DA(e));c.rules.forEach(u=>bt(t,u)),i=c.value}return a.value===r&&i===n?{value:e,rules:t}:{value:n===void 0?a.value:{...a.value,captionProfile:i},rules:t}}var JN=new Set([...Yu,...Gu].map(e=>e.toLowerCase()));var _e=o.string();var rd=o.discriminatedUnion("mode",[o.object({mode:o.literal("frame-center")}),o.object({mode:o.literal("point"),x:o.number().min(0).max(1),y:o.number().min(0).max(1)}),o.object({mode:o.literal("face"),faceId:o.string().min(1),shotScale:o.enum(["close","standard","wide"]).optional()}),o.object({mode:o.literal("all-faces")}),o.object({mode:o.literal("active-speaker")})]),od=o.object({startSec:o.number().nonnegative().describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:o.number().positive().describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:rd.describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:o.string().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:o.number().min(.1).max(1).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale`: a face-tracked shot is sized EITHER by the editorial scale (shotScale, calibrated to the detected face) OR by an explicit zoom \u2014 never both."),ease:o.object({in:o.number().nonnegative().describe("Ease-IN ramp DURATION in seconds at the segment START."),out:o.number().nonnegative().describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:o.object({x:o.number().min(-.3).max(.3).describe("Horizontal nudge, source-normalized (+ = right)."),y:o.number().min(-.3).max(.3).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")}),ad=od.refine(e=>!(e.focus.mode==="face"&&e.focus.shotScale!==void 0&&e.zoom!==void 0),{message:"a face segment takes EITHER focus.shotScale (editorial scale, calibrated to the detected face) OR an explicit zoom \u2014 never both; shotScale wins at bake time and the zoom would be silently discarded",path:["zoom"]}),Ya=o.object({segments:o.array(ad).min(1)});function Se(e){return e>=48&&e<=57}function et(e){return Se(e)||e>=65&&e<=70||e>=97&&e<=102}function Jr(e){return e>=65&&e<=90}function MA(e){return e>=97&&e<=122}function BA(e){return Jr(e)||MA(e)}function LA(e){return e>=128}function zr(e){return BA(e)||LA(e)||e===95}function Xr(e){return zr(e)||Se(e)||e===45}function PA(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function Un(e){return e===10||e===13||e===12}function tt(e){return Un(e)||e===32||e===9}function ke(e,t){return!(e!==92||Un(t)||t===0)}function Zr(e,t,n){return e===45?zr(t)||t===45||ke(t,n):zr(e)?!0:e===92?ke(e,t):!1}function qr(e,t,n){return e===43||e===45?Se(t)?2:t===46&&Se(n)?3:0:e===46?Se(t)?2:0:Se(e)?1:0}function eo(e){return e===65279||e===65534?1:0}var Ga=new Array(128),HA=128,jn=130,Ka=131,to=132,Qa=133;for(let e=0;e<Ga.length;e++)Ga[e]=tt(e)&&jn||Se(e)&&Ka||zr(e)&&to||PA(e)&&Qa||e||HA;function no(e){return e<128?Ga[e]:to}function en(e,t){return t<e.length?e.charCodeAt(t):0}function ro(e,t,n){return n===13&&en(e,t+1)===10?2:1}function Ja(e,t,n){let r=e.charCodeAt(t);return Jr(r)&&(r=r|32),r===n}function Bt(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let a=t;a<n;a++){let i=r.charCodeAt(a-t),c=e.charCodeAt(a);if(Jr(c)&&(c=c|32),c!==i)return!1}return!0}function id(e,t){for(;t>=0&&tt(e.charCodeAt(t));t--);return t+1}function Vn(e,t){for(;t<e.length&&tt(e.charCodeAt(t));t++);return t}function za(e,t){for(;t<e.length&&Se(e.charCodeAt(t));t++);return t}function dt(e,t){if(t+=2,et(en(e,t-1))){for(let r=Math.min(e.length,t+5);t<r&&et(en(e,t));t++);let n=en(e,t);tt(n)&&(t+=ro(e,t,n))}return t}function Wn(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!Xr(n)){if(ke(n,en(e,t+1))){t=dt(e,t)-1;continue}break}}return t}function oo(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),Se(n)&&(t=za(e,t+1),n=e.charCodeAt(t)),n===46&&Se(e.charCodeAt(t+1))&&(t+=2,t=za(e,t)),Ja(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),Se(n)&&(t=za(e,t+1+r+1))}return t}function ao(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}ke(n,en(e,t+1))&&(t=dt(e,t))}return t}function io(e){if(e.length===1&&!et(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var tn=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function nn(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}var sd=10,UA=12,cd=13;function ld(e){let t=e.source,n=t.length,r=t.length>0?eo(t.charCodeAt(0)):0,a=nn(e.lines,n),i=nn(e.columns,n),c=e.startLine,u=e.startColumn;for(let f=r;f<n;f++){let l=t.charCodeAt(f);a[f]=c,i[f]=u++,(l===sd||l===cd||l===UA)&&(l===cd&&f+1<n&&t.charCodeAt(f+1)===sd&&(f++,a[f]=c,i[f]=u),c++,u=1)}a[n]=c,i[n]=u,e.lines=a,e.columns=i,e.computed=!0}var so=class{constructor(t,n,r,a){this.setSource(t,n,r,a),this.lines=null,this.columns=null}setSource(t="",n=0,r=1,a=1){this.source=t,this.startOffset=n,this.startLine=r,this.startColumn=a,this.computed=!1}getLocation(t,n){return this.computed||ld(this),{source:n,offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}getLocationRange(t,n,r){return this.computed||ld(this),{source:r,start:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]},end:{offset:this.startOffset+n,line:this.lines[n],column:this.columns[n]}}}};var We=16777215,$e=24,Yn=1,lo=2,yt=new Uint8Array(32);yt[2]=22;yt[21]=22;yt[19]=20;yt[23]=24;var Ye=new Uint8Array(32);Ye[2]=Yn;Ye[21]=Yn;Ye[19]=Yn;Ye[23]=Yn;Ye[22]=lo;Ye[20]=lo;Ye[24]=lo;function ud(e,t,n){return e<t?t:e>n?n:e}var co=class{constructor(t,n){this.setSource(t,n)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(t="",n=()=>{}){t=String(t||"");let r=t.length,a=nn(this.offsetAndType,t.length+1),i=nn(this.balance,t.length+1),c=0,u=-1,f=0,l=t.length;this.offsetAndType=null,this.balance=null,i.fill(0),n(t,(d,p,A)=>{let E=c++;if(a[E]=d<<$e|A,u===-1&&(u=p),i[E]=l,d===f){let N=i[l];i[l]=E,l=N,f=yt[a[N]>>$e]}else this.isBlockOpenerTokenType(d)&&(l=E,f=yt[d])}),a[c]=0<<$e|r,i[c]=c;for(let d=0;d<c;d++){let p=i[d];if(p<=d){let A=i[p];A!==d&&(i[d]=A)}else p>c&&(i[d]=c)}this.source=t,this.firstCharOffset=u===-1?0:u,this.tokenCount=c,this.offsetAndType=a,this.balance=i,this.reset(),this.next()}lookupType(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t]>>$e:0}lookupTypeNonSC(t){for(let n=this.tokenIndex;n<this.tokenCount;n++){let r=this.offsetAndType[n]>>$e;if(r!==13&&r!==25&&t--===0)return r}return 0}lookupOffset(t){return t+=this.tokenIndex,t<this.tokenCount?this.offsetAndType[t-1]&We:this.source.length}lookupOffsetNonSC(t){for(let n=this.tokenIndex;n<this.tokenCount;n++){let r=this.offsetAndType[n]>>$e;if(r!==13&&r!==25&&t--===0)return n-this.tokenIndex}return 0}lookupValue(t,n){return t+=this.tokenIndex,t<this.tokenCount?Bt(this.source,this.offsetAndType[t-1]&We,this.offsetAndType[t]&We,n):!1}getTokenStart(t){return t===this.tokenIndex?this.tokenStart:t>0?t<this.tokenCount?this.offsetAndType[t-1]&We:this.offsetAndType[this.tokenCount]&We:this.firstCharOffset}getTokenEnd(t){return t===this.tokenIndex?this.tokenEnd:this.offsetAndType[ud(t,0,this.tokenCount)]&We}getTokenType(t){return t===this.tokenIndex?this.tokenType:this.offsetAndType[ud(t,0,this.tokenCount)]>>$e}substrToCursor(t){return this.source.substring(t,this.tokenStart)}isBlockOpenerTokenType(t){return Ye[t]===Yn}isBlockCloserTokenType(t){return Ye[t]===lo}getBlockTokenPairIndex(t){let n=this.getTokenType(t);if(Ye[n]===1){let r=this.balance[t],a=this.getTokenType(r);return yt[n]===a?r:-1}else if(Ye[n]===2){let r=this.balance[t],a=this.getTokenType(r);return yt[a]===n?r:-1}return-1}isBalanceEdge(t){return this.balance[this.tokenIndex]<t}isDelim(t,n){return n?this.lookupType(n)===9&&this.source.charCodeAt(this.lookupOffset(n))===t:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===t}skip(t){let n=this.tokenIndex+t;n<this.tokenCount?(this.tokenIndex=n,this.tokenStart=this.offsetAndType[n-1]&We,n=this.offsetAndType[n],this.tokenType=n>>$e,this.tokenEnd=n&We):(this.tokenIndex=this.tokenCount,this.next())}next(){let t=this.tokenIndex+1;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.tokenEnd,t=this.offsetAndType[t],this.tokenType=t>>$e,this.tokenEnd=t&We):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(t,n){let r=t,a=0,i=0;e:for(;r<this.tokenCount;r++){if(a=this.balance[r],a<t)break e;switch(i=r>0?this.offsetAndType[r-1]&We:this.firstCharOffset,n(this.source.charCodeAt(i))){case 1:break e;case 2:r++;break e;default:this.isBlockOpenerTokenType(this.offsetAndType[r]>>$e)&&(r=a)}}this.skip(r-this.tokenIndex)}forEachToken(t){for(let n=0,r=this.firstCharOffset;n<this.tokenCount;n++){let a=r,i=this.offsetAndType[n],c=i&We,u=i>>$e;r=c,t(u,a,c,n)}}dump(){let t=new Array(this.tokenCount);return this.forEachToken((n,r,a,i)=>{t[i]={idx:i,type:tn[n],chunk:this.source.substring(r,a),balance:this.balance[i]}}),t}};function md(e,t){function n(p){return p<u?e.charCodeAt(p):0}function r(){if(l=oo(e,l),Zr(n(l),n(l+1),n(l+2))){d=12,l=Wn(e,l);return}if(n(l)===37){d=11,l++;return}d=10}function a(){let p=l;if(l=Wn(e,l),Bt(e,p,l,"url")&&n(l)===40){if(l=Vn(e,l+1),n(l)===34||n(l)===39){d=2,l=p+4;return}c();return}if(n(l)===40){d=2,l++;return}d=1}function i(p){for(p||(p=n(l++)),d=5;l<e.length;l++){let A=e.charCodeAt(l);switch(no(A)){case p:l++;return;case jn:if(Un(A)){l+=ro(e,l,A),d=6;return}break;case 92:if(l===e.length-1)break;let E=n(l+1);Un(E)?l+=ro(e,l+1,E):ke(A,E)&&(l=dt(e,l)-1);break}}}function c(){for(d=7,l=Vn(e,l);l<e.length;l++){let p=e.charCodeAt(l);switch(no(p)){case 41:l++;return;case jn:if(l=Vn(e,l),n(l)===41||l>=e.length){l<e.length&&l++;return}l=ao(e,l),d=8;return;case 34:case 39:case 40:case Qa:l=ao(e,l),d=8;return;case 92:if(ke(p,n(l+1))){l=dt(e,l)-1;break}l=ao(e,l),d=8;return}}}e=String(e||"");let u=e.length,f=eo(n(0)),l=f,d;for(;l<u;){let p=e.charCodeAt(l);switch(no(p)){case jn:d=13,l=Vn(e,l+1);break;case 34:i();break;case 35:Xr(n(l+1))||ke(n(l+1),n(l+2))?(d=4,l=Wn(e,l+1)):(d=9,l++);break;case 39:i();break;case 40:d=21,l++;break;case 41:d=22,l++;break;case 43:qr(p,n(l+1),n(l+2))?r():(d=9,l++);break;case 44:d=18,l++;break;case 45:qr(p,n(l+1),n(l+2))?r():n(l+1)===45&&n(l+2)===62?(d=15,l=l+3):Zr(p,n(l+1),n(l+2))?a():(d=9,l++);break;case 46:qr(p,n(l+1),n(l+2))?r():(d=9,l++);break;case 47:n(l+1)===42?(d=25,l=e.indexOf("*/",l+2),l=l===-1?e.length:l+2):(d=9,l++);break;case 58:d=16,l++;break;case 59:d=17,l++;break;case 60:n(l+1)===33&&n(l+2)===45&&n(l+3)===45?(d=14,l=l+4):(d=9,l++);break;case 64:Zr(n(l+1),n(l+2),n(l+3))?(d=3,l=Wn(e,l+1)):(d=9,l++);break;case 91:d=19,l++;break;case 92:ke(p,n(l+1))?a():(d=9,l++);break;case 93:d=20,l++;break;case 123:d=23,l++;break;case 125:d=24,l++;break;case Ka:r();break;case to:a();break;default:d=9,l++}t(d,f,f=l)}}var ti={};L(ti,{generate:()=>$A,name:()=>VA,parse:()=>ei,structure:()=>WA});var rt=43,Fe=45,uo=110,Ut=!0,jA=!1;function mo(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===rt||r===Fe)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)Se(this.charCodeAt(n))||this.error("Integer is expected",n)}function cn(e){return mo.call(this,0,e)}function Et(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case uo:n="N is expected";break;case Fe:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+e)}}function qa(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(rt,e)||this.isDelim(Fe,e)){t=this.isDelim(rt,e)?rt:Fe;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),cn.call(this,Ut))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==rt&&n!==Fe&&this.error("Number sign is expected")),cn.call(this,t!==0),t===Fe?"-"+this.consume(10):this.consume(10)}var VA="AnPlusB",WA={a:[String,null],b:[String,null]};function ei(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)cn.call(this,jA),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Fe))switch(t="-1",Et.call(this,1,uo),this.tokenEnd-this.tokenStart){case 2:this.next(),n=qa.call(this);break;case 3:Et.call(this,2,Fe),this.next(),this.skipSC(),cn.call(this,Ut),n="-"+this.consume(10);break;default:Et.call(this,2,Fe),mo.call(this,3,Ut),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(rt)&&this.lookupType(1)===1){let r=0;switch(t="1",this.isDelim(rt)&&(r=1,this.next()),Et.call(this,0,uo),this.tokenEnd-this.tokenStart){case 1:this.next(),n=qa.call(this);break;case 2:Et.call(this,1,Fe),this.next(),this.skipSC(),cn.call(this,Ut),n="-"+this.consume(10);break;default:Et.call(this,1,Fe),mo.call(this,2,Ut),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),a=r===rt||r===Fe,i=this.tokenStart+a;for(;i<this.tokenEnd&&Se(this.charCodeAt(i));i++);i===this.tokenStart+a&&this.error("Integer is expected",this.tokenStart+a),Et.call(this,i-this.tokenStart,uo),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=qa.call(this)):(Et.call(this,i-this.tokenStart+1,Fe),i+2===this.tokenEnd?(this.next(),this.skipSC(),cn.call(this,Ut),n="-"+this.consume(10)):(mo.call(this,i-this.tokenStart+2,Ut),this.next(),n=this.substrToCursor(i+1)))}else this.error();return t!==null&&t.charCodeAt(0)===rt&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===rt&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function $A(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let n=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}var ri={};L(ri,{generate:()=>zA,name:()=>GA,parse:()=>ni,structure:()=>QA,walkContext:()=>KA});function pd(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function YA(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}var GA="Atrule",KA="atrule",QA={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function ni(e=!1){let t=this.tokenStart,n,r,a=null,i=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?a=this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),pd):a=pd.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this,e):i=this.Block(YA.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:a,block:i}}function zA(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var ai={};L(ai,{generate:()=>qA,name:()=>JA,parse:()=>oi,structure:()=>ZA,walkContext:()=>XA});var JA="AtrulePrelude",XA="atrulePrelude",ZA={children:[[]]};function oi(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function qA(e){this.children(e)}var ci={};L(ci,{generate:()=>sb,name:()=>ab,parse:()=>si,structure:()=>ib});var eb=36,fd=42,po=61,tb=94,ii=124,nb=126;function rb(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(fd)?(t=!0,this.next()):this.isDelim(ii)||this.eat(1),this.isDelim(ii)?this.charCodeAt(this.tokenStart+1)!==po?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function ob(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==po&&t!==nb&&t!==tb&&t!==eb&&t!==fd&&t!==ii&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==po&&(this.isDelim(po)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var ab="AttributeSelector",ib={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function si(){let e=this.tokenStart,t,n=null,r=null,a=null;return this.eat(19),this.skipSC(),t=rb.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=ob.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(a=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:a}}function sb(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}var ui={};L(ui,{generate:()=>pb,name:()=>ub,parse:()=>li,structure:()=>mb,walkContext:()=>db});var cb=38;function Ad(){return this.Raw(null,!0)}function hd(){return this.parseWithFallback(this.Rule,Ad)}function gd(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function lb(){if(this.tokenType===17)return gd.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,gd);return this.tokenType===17&&this.next(),e}var ub="Block",db="block",mb={children:[["Atrule","Rule","Declaration"]]};function li(e){let t=e?lb:hd,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),Ad));break;default:e&&this.isDelim(cb)?r.push(hd.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function pb(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var mi={};L(mi,{generate:()=>gb,name:()=>fb,parse:()=>di,structure:()=>hb});var fb="Brackets",hb={children:[[]]};function di(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function gb(e){this.token(9,"["),this.children(e),this.token(9,"]")}var fi={};L(fi,{generate:()=>yb,name:()=>Ab,parse:()=>pi,structure:()=>bb});var Ab="CDC",bb=[];function pi(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function yb(){this.token(15,"-->")}var gi={};L(gi,{generate:()=>Tb,name:()=>Eb,parse:()=>hi,structure:()=>Sb});var Eb="CDO",Sb=[];function hi(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function Tb(){this.token(14,"<!--")}var bi={};L(bi,{generate:()=>_b,name:()=>Cb,parse:()=>Ai,structure:()=>Ib});var xb=46,Cb="ClassSelector",Ib={name:String};function Ai(){return this.eatDelim(xb),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function _b(e){this.token(9,"."),this.token(1,e.name)}var Ei={};L(Ei,{generate:()=>vb,name:()=>Nb,parse:()=>yi,structure:()=>Ob});var kb=43,bd=47,wb=62,Rb=126,Nb="Combinator",Ob={name:String};function yi(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case wb:case kb:case Rb:this.next();break;case bd:this.next(),this.eatIdent("deep"),this.eatDelim(bd);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function vb(e){this.tokenize(e.name)}var Ti={};L(Ti,{generate:()=>Lb,name:()=>Mb,parse:()=>Si,structure:()=>Bb});var Fb=42,Db=47,Mb="Comment",Bb={value:String};function Si(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===Fb&&this.charCodeAt(t-1)===Db&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Lb(e){this.token(25,"/*"+e.value+"*/")}var Ci={};L(Ci,{generate:()=>Vb,name:()=>Hb,parse:()=>xi,structure:()=>Ub});var Pb=new Set([16,22,0]),Hb="Condition",Ub={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};function yd(e){return this.lookupTypeNonSC(1)===1&&Pb.has(this.lookupTypeNonSC(2))?this.Feature(e):this.FeatureRange(e)}var jb={media:yd,container:yd,supports(){return this.SupportsDeclaration()}};function xi(e="media"){let t=this.createList();e:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t.push(this.Identifier());break;case 21:{let n=this.parseWithFallback(()=>jb[e].call(this,e),()=>null);n||(n=this.parseWithFallback(()=>{this.eat(21);let r=this.Condition(e);return this.eat(22),r},()=>this.GeneralEnclosed(e))),t.push(n);break}case 2:{let n=this.parseWithFallback(()=>this.FeatureFunction(e),()=>null);n||(n=this.GeneralEnclosed(e)),t.push(n);break}default:break e}return t.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(t),kind:e,children:t}}function Vb(e){e.children.forEach(t=>{t.type==="Condition"?(this.token(21,"("),this.node(t),this.token(22,")")):this.node(t)})}var _i={};L(_i,{generate:()=>ey,name:()=>Xb,parse:()=>Ii,structure:()=>qb,walkContext:()=>Zb});var Ed=45;function Sd(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Ed&&e.charCodeAt(t+1)===Ed}var xd=33,Wb=35,$b=36,Yb=38,Gb=42,Kb=43,Td=47;function Qb(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function zb(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function Jb(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(xd)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}var Xb="Declaration",Zb="declaration",qb={important:[Boolean,String],property:String,value:["Value","Raw"]};function Ii(){let e=this.tokenStart,t=this.tokenIndex,n=ty.call(this),r=Sd(n),a=r?this.parseCustomProperty:this.parseValue,i=r?zb:Qb,c=!1,u;this.skipSC(),this.eat(16);let f=this.tokenIndex;if(r||this.skipSC(),a?u=this.parseWithFallback(Jb,i):u=i.call(this,this.tokenIndex),r&&u.type==="Value"&&u.children.isEmpty){for(let l=f-this.tokenIndex;l<=0;l++)if(this.lookupType(l)===13){u.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(xd)&&(c=ny.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:c,property:n,value:u}}function ey(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function ty(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case Gb:case $b:case Kb:case Wb:case Yb:this.next();break;case Td:this.next(),this.isDelim(Td)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function ny(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}var Ri={};L(Ri,{generate:()=>iy,name:()=>oy,parse:()=>wi,structure:()=>ay});var ry=38;function ki(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}var oy="DeclarationList",ay={children:[["Declaration","Atrule","Rule"]]};function wi(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),ki));break;default:this.isDelim(ry)?e.push(this.parseWithFallback(this.Rule,ki)):e.push(this.parseWithFallback(this.Declaration,ki))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function iy(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}var Oi={};L(Oi,{generate:()=>ly,name:()=>sy,parse:()=>Ni,structure:()=>cy});var sy="Dimension",cy={value:String,unit:String};function Ni(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function ly(e){this.token(12,e.value+e.unit)}var Fi={};L(Fi,{generate:()=>py,name:()=>dy,parse:()=>vi,structure:()=>my});var uy=47,dy="Feature",my={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]};function vi(e){let t=this.tokenStart,n,r=null;if(this.eat(21),this.skipSC(),n=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?r=this.Ratio():r=this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;case 2:r=this.parseWithFallback(()=>{let a=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(uy)&&this.error(),a},()=>this.Ratio());break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eof||this.eat(22),{type:"Feature",loc:this.getLocation(t,this.tokenStart),kind:e,name:n,value:r}}function py(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var Mi={};L(Mi,{generate:()=>Ay,name:()=>fy,parse:()=>Di,structure:()=>hy});var fy="FeatureFunction",hy={kind:String,feature:String,value:["Declaration","Selector"]};function gy(e,t){let r=(this.features[e]||{})[t];return typeof r!="function"&&this.error(`Unknown feature ${t}()`),r}function Di(e="unknown"){let t=this.tokenStart,n=this.consumeFunctionName(),r=gy.call(this,e,n.toLowerCase());this.skipSC();let a=this.parseWithFallback(()=>{let i=this.tokenIndex,c=r.call(this);return this.eof===!1&&this.isBalanceEdge(i)===!1&&this.error(),c},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:"FeatureFunction",loc:this.getLocation(t,this.tokenStart),kind:e,feature:n,value:a}}function Ay(e){this.token(2,e.feature+"("),this.node(e.value),this.token(22,")")}var Pi={};L(Pi,{generate:()=>Ty,name:()=>Ey,parse:()=>Li,structure:()=>Sy});var Cd=47,by=60,Id=61,yy=62,Ey="FeatureRange",Sy={kind:String,left:["Identifier","Number","Dimension","Ratio","Function"],leftComparison:String,middle:["Identifier","Number","Dimension","Ratio","Function"],rightComparison:[String,null],right:["Identifier","Number","Dimension","Ratio","Function",null]};function Bi(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(Cd,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(Cd)&&this.error(),e},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}function _d(e){if(this.skipSC(),this.isDelim(by)||this.isDelim(yy)){let t=this.source[this.tokenStart];return this.next(),this.isDelim(Id)?(this.next(),t+"="):t}if(this.isDelim(Id))return"=";this.error(`Expected ${e?'":", ':""}"<", ">", "=" or ")"`)}function Li(e="unknown"){let t=this.tokenStart;this.skipSC(),this.eat(21);let n=Bi.call(this),r=_d.call(this,n.type==="Identifier"),a=Bi.call(this),i=null,c=null;return this.lookupNonWSType(0)!==22&&(i=_d.call(this),c=Bi.call(this)),this.skipSC(),this.eat(22),{type:"FeatureRange",loc:this.getLocation(t,this.tokenStart),kind:e,left:n,leftComparison:r,middle:a,rightComparison:i,right:c}}function Ty(e){this.token(21,"("),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(22,")")}var Ui={};L(Ui,{generate:()=>_y,name:()=>xy,parse:()=>Hi,structure:()=>Iy,walkContext:()=>Cy});var xy="Function",Cy="function",Iy={name:String,children:[[]]};function Hi(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),a=r.toLowerCase(),i;return i=t.hasOwnProperty(a)?t[a].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:i}}function _y(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var Vi={};L(Vi,{generate:()=>Ry,name:()=>ky,parse:()=>ji,structure:()=>wy});var ky="GeneralEnclosed",wy={kind:String,function:[String,null],children:[[]]};function ji(e){let t=this.tokenStart,n=null;this.tokenType===2?n=this.consumeFunctionName():this.eat(21);let r=this.parseWithFallback(()=>{let a=this.tokenIndex,i=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(a)===!1&&this.error(),i},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:"GeneralEnclosed",loc:this.getLocation(t,this.tokenStart),kind:e,function:n,children:r}}function Ry(e){e.function?this.token(2,e.function+"("):this.token(21,"("),this.children(e),this.token(22,")")}var $i={};L($i,{generate:()=>Fy,name:()=>Oy,parse:()=>Wi,structure:()=>vy,xxx:()=>Ny});var Ny="XXX",Oy="Hash",vy={value:String};function Wi(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Fy(e){this.token(4,"#"+e.value)}var Gi={};L(Gi,{generate:()=>By,name:()=>Dy,parse:()=>Yi,structure:()=>My});var Dy="Identifier",My={name:String};function Yi(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function By(e){this.token(1,e.name)}var Qi={};L(Qi,{generate:()=>Hy,name:()=>Ly,parse:()=>Ki,structure:()=>Py});var Ly="IdSelector",Py={name:String};function Ki(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Hy(e){this.token(9,"#"+e.name)}var Ji={};L(Ji,{generate:()=>Wy,name:()=>jy,parse:()=>zi,structure:()=>Vy});var Uy=46,jy="Layer",Vy={name:String};function zi(){let e=this.tokenStart,t=this.consume(1);for(;this.isDelim(Uy);)this.eat(9),t+="."+this.consume(1);return{type:"Layer",loc:this.getLocation(e,this.tokenStart),name:t}}function Wy(e){this.tokenize(e.name)}var Zi={};L(Zi,{generate:()=>Gy,name:()=>$y,parse:()=>Xi,structure:()=>Yy});var $y="LayerList",Yy={children:[["Layer"]]};function Xi(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(e),children:e}}function Gy(e){this.children(e,()=>this.token(18,","))}var es={};L(es,{generate:()=>zy,name:()=>Ky,parse:()=>qi,structure:()=>Qy});var Ky="MediaQuery",Qy={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]};function qi(){let e=this.tokenStart,t=null,n=null,r=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let a=this.consume(1),i=a.toLowerCase();switch(i==="not"||i==="only"?(this.skipSC(),t=i,n=this.consume(1)):n=a,this.lookupTypeNonSC(0)){case 1:{this.skipSC(),this.eatIdent("and"),r=this.Condition("media");break}case 23:case 17:case 18:case 0:break;default:this.error("Identifier or parenthesis is expected")}}else switch(this.tokenType){case 1:case 21:case 2:{r=this.Condition("media");break}case 23:case 17:case 0:break;default:this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocation(e,this.tokenStart),modifier:t,mediaType:n,condition:r}}function zy(e){e.mediaType?(e.modifier&&this.token(1,e.modifier),this.token(1,e.mediaType),e.condition&&(this.token(1,"and"),this.node(e.condition))):e.condition&&this.node(e.condition)}var ns={};L(ns,{generate:()=>Zy,name:()=>Jy,parse:()=>ts,structure:()=>Xy});var Jy="MediaQueryList",Xy={children:[["MediaQuery"]]};function ts(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function Zy(e){this.children(e,()=>this.token(18,","))}var os={};L(os,{generate:()=>nE,name:()=>eE,parse:()=>rs,structure:()=>tE});var qy=38,eE="NestingSelector",tE={};function rs(){let e=this.tokenStart;return this.eatDelim(qy),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function nE(){this.token(9,"&")}var is={};L(is,{generate:()=>aE,name:()=>rE,parse:()=>as,structure:()=>oE});var rE="Nth",oE={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function as(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:r,selector:n}}function aE(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}var cs={};L(cs,{generate:()=>cE,name:()=>iE,parse:()=>ss,structure:()=>sE});var iE="Number",sE={value:String};function ss(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function cE(e){this.token(10,e.value)}var us={};L(us,{generate:()=>dE,name:()=>lE,parse:()=>ls,structure:()=>uE});var lE="Operator",uE={value:String};function ls(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function dE(e){this.tokenize(e.value)}var ms={};L(ms,{generate:()=>fE,name:()=>mE,parse:()=>ds,structure:()=>pE});var mE="Parentheses",pE={children:[[]]};function ds(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function fE(e){this.token(21,"("),this.children(e),this.token(22,")")}var fs={};L(fs,{generate:()=>AE,name:()=>hE,parse:()=>ps,structure:()=>gE});var hE="Percentage",gE={value:String};function ps(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function AE(e){this.token(11,e.value+"%")}var gs={};L(gs,{generate:()=>SE,name:()=>bE,parse:()=>hs,structure:()=>EE,walkContext:()=>yE});var bE="PseudoClassSelector",yE="function",EE={name:String,children:[["Raw"],null]};function hs(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function SE(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var bs={};L(bs,{generate:()=>IE,name:()=>TE,parse:()=>As,structure:()=>CE,walkContext:()=>xE});var TE="PseudoElementSelector",xE="function",CE={name:String,children:[["Raw"],null]};function As(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function IE(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var Es={};L(Es,{generate:()=>wE,name:()=>_E,parse:()=>ys,structure:()=>kE});var kd=47;function wd(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}var _E="Ratio",kE={left:["Number","Function"],right:["Number","Function",null]};function ys(){let e=this.tokenStart,t=wd.call(this),n=null;return this.skipSC(),this.isDelim(kd)&&(this.eatDelim(kd),n=wd.call(this)),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function wE(e){this.node(e.left),this.token(9,"/"),e.right?this.node(e.right):this.node(10,1)}var Ts={};L(Ts,{generate:()=>vE,name:()=>NE,parse:()=>Ss,structure:()=>OE});function RE(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var NE="Raw",OE={value:String};function Ss(e,t){let n=this.getTokenStart(this.tokenIndex),r;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),t&&this.tokenStart>n?r=RE.call(this):r=this.tokenStart,{type:"Raw",loc:this.getLocation(n,r),value:this.substring(n,r)}}function vE(e){this.tokenize(e.value)}var Cs={};L(Cs,{generate:()=>LE,name:()=>DE,parse:()=>xs,structure:()=>BE,walkContext:()=>ME});function Rd(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function FE(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}var DE="Rule",ME="rule",BE={prelude:["SelectorList","Raw"],block:["Block"]};function xs(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(FE,Rd):n=Rd.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function LE(e){this.node(e.prelude),this.node(e.block)}var _s={};L(_s,{generate:()=>UE,name:()=>PE,parse:()=>Is,structure:()=>HE});var PE="Scope",HE={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]};function Is(){let e=null,t=null;this.skipSC();let n=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat(21),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:"Scope",loc:this.getLocation(n,this.tokenStart),root:e,limit:t}}function UE(e){e.root&&(this.token(21,"("),this.node(e.root),this.token(22,")")),e.limit&&(this.token(1,"to"),this.token(21,"("),this.node(e.limit),this.token(22,")"))}var ws={};L(ws,{generate:()=>WE,name:()=>jE,parse:()=>ks,structure:()=>VE});var jE="Selector",VE={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator"]]};function ks(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function WE(e){this.children(e)}var Ns={};L(Ns,{generate:()=>KE,name:()=>$E,parse:()=>Rs,structure:()=>GE,walkContext:()=>YE});var $E="SelectorList",YE="selector",GE={children:[["Selector","Raw"]]};function Rs(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function KE(e){this.children(e,()=>this.token(18,","))}var Fs={};L(Fs,{generate:()=>XE,name:()=>zE,parse:()=>vs,structure:()=>JE});var Os=92,Nd=34,Od=39;function fo(e){let t=e.length,n=e.charCodeAt(0),r=n===Nd||n===Od?1:0,a=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let c=r;c<=a;c++){let u=e.charCodeAt(c);if(u===Os){if(c===a){c!==t-1&&(i=e.substr(c+1));break}if(u=e.charCodeAt(++c),ke(Os,u)){let f=c-1,l=dt(e,f);c=l-1,i+=io(e.substring(f+1,l))}else u===13&&e.charCodeAt(c+1)===10&&c++}else i+=e[c]}return i}function vd(e,t){let n=t?"'":'"',r=t?Od:Nd,a="",i=!1;for(let c=0;c<e.length;c++){let u=e.charCodeAt(c);if(u===0){a+="\uFFFD";continue}if(u<=31||u===127){a+="\\"+u.toString(16),i=!0;continue}u===r||u===Os?(a+="\\"+e.charAt(c),i=!1):(i&&(et(u)||tt(u))&&(a+=" "),a+=e.charAt(c),i=!1)}return n+a+n}var zE="String",JE={value:String};function vs(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:fo(this.consume(5))}}function XE(e){this.token(5,vd(e.value))}var Ms={};L(Ms,{generate:()=>nS,name:()=>qE,parse:()=>Ds,structure:()=>tS,walkContext:()=>eS});var ZE=33;function Fd(){return this.Raw(null,!1)}var qE="StyleSheet",eS="stylesheet",tS={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function Ds(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==ZE){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,Fd);break;default:n=this.parseWithFallback(this.Rule,Fd)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function nS(e){this.children(e)}var Ls={};L(Ls,{generate:()=>aS,name:()=>rS,parse:()=>Bs,structure:()=>oS});var rS="SupportsDeclaration",oS={declaration:"Declaration"};function Bs(){let e=this.tokenStart;this.eat(21),this.skipSC();let t=this.Declaration();return this.eof||this.eat(22),{type:"SupportsDeclaration",loc:this.getLocation(e,this.tokenStart),declaration:t}}function aS(e){this.token(21,"("),this.node(e.declaration),this.token(22,")")}var Us={};L(Us,{generate:()=>lS,name:()=>sS,parse:()=>Hs,structure:()=>cS});var iS=42,Dd=124;function Ps(){this.tokenType!==1&&this.isDelim(iS)===!1&&this.error("Identifier or asterisk is expected"),this.next()}var sS="TypeSelector",cS={name:String};function Hs(){let e=this.tokenStart;return this.isDelim(Dd)?(this.next(),Ps.call(this)):(Ps.call(this),this.isDelim(Dd)&&(this.next(),Ps.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function lS(e){this.tokenize(e.name)}var Ws={};L(Ws,{generate:()=>fS,name:()=>mS,parse:()=>Vs,structure:()=>pS});var Md=43,Bd=45,js=63;function Gn(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let a=this.charCodeAt(r);if(a===Bd&&t&&n!==0)return Gn.call(this,e+n+1,!1),-1;et(a)||this.error(t&&n!==0?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function ho(e){let t=0;for(;this.isDelim(js);)++t>e&&this.error("Too many question marks"),this.next()}function uS(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===Md?"Plus sign":"Hyphen minus")+" is expected")}function dS(){let e=0;switch(this.tokenType){case 10:if(e=Gn.call(this,1,!0),this.isDelim(js)){ho.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){uS.call(this,Bd),Gn.call(this,1,!1);break}break;case 12:e=Gn.call(this,1,!0),e>0&&ho.call(this,6-e);break;default:if(this.eatDelim(Md),this.tokenType===1){e=Gn.call(this,0,!0),e>0&&ho.call(this,6-e);break}if(this.isDelim(js)){this.next(),ho.call(this,5);break}this.error("Hex digit or question mark is expected")}}var mS="UnicodeRange",pS={value:String};function Vs(){let e=this.tokenStart;return this.eatIdent("u"),dS.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function fS(e){this.tokenize(e.value)}var Gs={};L(Gs,{generate:()=>TS,name:()=>ES,parse:()=>Ys,structure:()=>SS});var hS=32,$s=92,gS=34,AS=39,bS=40,Ld=41;function Pd(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===Ld?t-2:t-1,a="";for(;n<r&&tt(e.charCodeAt(n));)n++;for(;n<r&&tt(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let c=e.charCodeAt(i);if(c===$s){if(i===r){i!==t-1&&(a=e.substr(i+1));break}if(c=e.charCodeAt(++i),ke($s,c)){let u=i-1,f=dt(e,u);i=f-1,a+=io(e.substring(u+1,f))}else c===13&&e.charCodeAt(i+1)===10&&i++}else a+=e[i]}return a}function Hd(e){let t="",n=!1;for(let r=0;r<e.length;r++){let a=e.charCodeAt(r);if(a===0){t+="\uFFFD";continue}if(a<=31||a===127){t+="\\"+a.toString(16),n=!0;continue}a===hS||a===$s||a===gS||a===AS||a===bS||a===Ld?(t+="\\"+e.charAt(r),n=!1):(n&&et(a)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}var ES="Url",SS={value:String};function Ys(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Pd(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=fo(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function TS(e){this.token(7,Hd(e.value))}var Qs={};L(Qs,{generate:()=>IS,name:()=>xS,parse:()=>Ks,structure:()=>CS});var xS="Value",CS={children:[[]]};function Ks(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function IS(e){this.children(e)}var Js={};L(Js,{generate:()=>RS,name:()=>kS,parse:()=>zs,structure:()=>wS});var _S=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),kS="WhiteSpace",wS={value:String};function zs(){return this.eat(13),_S}function RS(e){this.token(13,e.value)}var ln=null,Kn=class e{static createItem(t){return{prev:null,next:null,data:t}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return e.createItem(t)}allocateCursor(t,n){let r;return ln!==null?(r=ln,ln=ln.cursor,r.prev=t,r.next=n,r.cursor=this.cursor):r={prev:t,next:n,cursor:this.cursor},this.cursor=r,r}releaseCursor(){let{cursor:t}=this;this.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=ln,ln=t}updateCursors(t,n,r,a){let{cursor:i}=this;for(;i!==null;)i.prev===t&&(i.prev=n),i.next===r&&(i.next=a),i=i.cursor}*[Symbol.iterator](){for(let t=this.head;t!==null;t=t.next)yield t.data}get size(){let t=0;for(let n=this.head;n!==null;n=n.next)t++;return t}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let n=null;this.head=null;for(let r of t){let a=e.createItem(r);n!==null?n.next=a:this.head=a,a.prev=n,n=a}return this.tail=n,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(t,n=this){let r=this.allocateCursor(null,this.head);for(;r.next!==null;){let a=r.next;r.next=a.next,t.call(n,a.data,a,this)}this.releaseCursor()}forEachRight(t,n=this){let r=this.allocateCursor(this.tail,null);for(;r.prev!==null;){let a=r.prev;r.prev=a.prev,t.call(n,a.data,a,this)}this.releaseCursor()}reduce(t,n,r=this){let a=this.allocateCursor(null,this.head),i=n,c;for(;a.next!==null;)c=a.next,a.next=c.next,i=t.call(r,i,c.data,c,this);return this.releaseCursor(),i}reduceRight(t,n,r=this){let a=this.allocateCursor(this.tail,null),i=n,c;for(;a.prev!==null;)c=a.prev,a.prev=c.prev,i=t.call(r,i,c.data,c,this);return this.releaseCursor(),i}some(t,n=this){for(let r=this.head;r!==null;r=r.next)if(t.call(n,r.data,r,this))return!0;return!1}map(t,n=this){let r=new e;for(let a=this.head;a!==null;a=a.next)r.appendData(t.call(n,a.data,a,this));return r}filter(t,n=this){let r=new e;for(let a=this.head;a!==null;a=a.next)t.call(n,a.data,a,this)&&r.appendData(a.data);return r}nextUntil(t,n,r=this){if(t===null)return;let a=this.allocateCursor(null,t);for(;a.next!==null;){let i=a.next;if(a.next=i.next,n.call(r,i.data,i,this))break}this.releaseCursor()}prevUntil(t,n,r=this){if(t===null)return;let a=this.allocateCursor(t,null);for(;a.prev!==null;){let i=a.prev;if(a.prev=i.prev,n.call(r,i.data,i,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let t=new e;for(let n of this)t.appendData(n);return t}prepend(t){return this.updateCursors(null,t,this.head,t),this.head!==null?(this.head.prev=t,t.next=this.head):this.tail=t,this.head=t,this}prependData(t){return this.prepend(e.createItem(t))}append(t){return this.insert(t)}appendData(t){return this.insert(e.createItem(t))}insert(t,n=null){if(n!==null)if(this.updateCursors(n.prev,t,n,t),n.prev===null){if(this.head!==n)throw new Error("before doesn't belong to list");this.head=t,n.prev=t,t.next=n,this.updateCursors(null,t)}else n.prev.next=t,t.prev=n.prev,n.prev=t,t.next=n;else this.updateCursors(this.tail,t,null,t),this.tail!==null?(this.tail.next=t,t.prev=this.tail):this.head=t,this.tail=t;return this}insertData(t,n){return this.insert(e.createItem(t),n)}remove(t){if(this.updateCursors(t,t.prev,t,t.next),t.prev!==null)t.prev.next=t.next;else{if(this.head!==t)throw new Error("item doesn't belong to list");this.head=t.next}if(t.next!==null)t.next.prev=t.prev;else{if(this.tail!==t)throw new Error("item doesn't belong to list");this.tail=t.prev}return t.prev=null,t.next=null,t}push(t){this.insert(e.createItem(t))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(t){this.prepend(e.createItem(t))}shift(){return this.head!==null?this.remove(this.head):null}prependList(t){return this.insertList(t,this.head)}appendList(t){return this.insertList(t)}insertList(t,n){return t.head===null?this:(n!=null?(this.updateCursors(n.prev,t.tail,n,t.head),n.prev!==null?(n.prev.next=t.head,t.head.prev=n.prev):this.head=t.head,n.prev=t.tail,t.tail.next=n):(this.updateCursors(this.tail,t.tail,null,t.head),this.tail!==null?(this.tail.next=t.head,t.head.prev=this.tail):this.head=t.head,this.tail=t.tail),t.head=null,t.tail=null,this)}replace(t,n){"head"in n?this.insertList(n,t):this.insert(n,t),this.remove(t)}};function Ud(e,t){let n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
54
- `)}})}var Xs=100,jd=60,Vd=" ";function Wd({source:e,line:t,column:n,baseLine:r,baseColumn:a},i){function c(N,C){return l.slice(N,C).map((M,I)=>String(N+I+1).padStart(A)+" |"+M).join(`
55
- `)}let u=`
56
- `.repeat(Math.max(r-1,0)),f=" ".repeat(Math.max(a-1,0)),l=(u+f+e).split(/\r\n?|\n|\f/),d=Math.max(1,t-i)-1,p=Math.min(t+i,l.length+1),A=Math.max(4,String(p).length)+1,E=0;n+=(Vd.length-1)*(l[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>Xs&&(E=n-jd+3,n=jd-2);for(let N=d;N<=p;N++)N>=0&&N<l.length&&(l[N]=l[N].replace(/\t/g,Vd),l[N]=(E>0&&l[N].length>E?"\u2026":"")+l[N].substr(E,Xs-2)+(l[N].length>E+Xs-1?"\u2026":""));return[c(d,t),new Array(n+A+2).join("-")+"^",c(t,p)].filter(Boolean).join(`
57
- `).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}function Zs(e,t,n,r,a,i=1,c=1){return Object.assign(Ud("SyntaxError",e),{source:t,offset:n,line:r,column:a,sourceFragment(f){return Wd({source:t,line:r,column:a,baseLine:i,baseColumn:c},isNaN(f)?0:f)},get formattedMessage(){return`Parse error: ${e}
58
- `+Wd({source:t,line:r,column:a,baseLine:i,baseColumn:c},2)}})}function $d(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let a=e.getNode.call(this,r);if(a===void 0)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,a,t,r),n=!1),t.push(a)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var un=()=>{},NS=33,OS=35,qs=59,Yd=123,Gd=0,vS={createList(){return[]},createSingleNodeList(e){return[e]},getFirstListNode(e){return e&&e[0]||null},getLastListNode(e){return e&&e.length>0?e[e.length-1]:null}},FS={createList(){return new Kn},createSingleNodeList(e){return new Kn().appendData(e)},getFirstListNode(e){return e&&e.first},getLastListNode(e){return e&&e.last}};function DS(e){return function(){return this[e]()}}function ec(e){let t=Object.create(null);for(let n of Object.keys(e)){let r=e[n],a=r.parse||r;a&&(t[n]=a)}return t}function MS(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:ec(e.atrule),pseudo:ec(e.pseudo),node:ec(e.node)};for(let[n,r]of Object.entries(e.parseContext))switch(typeof r){case"function":t.context[n]=r;break;case"string":t.context[n]=DS(r);break}return{config:t,...t,...t.node}}function Kd(e){let t="",n="<unknown>",r=!1,a=un,i=!1,c=new so,u=Object.assign(new co,MS(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:$d,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(d){return d===Yd?1:0},consumeUntilLeftCurlyBracketOrSemicolon(d){return d===Yd||d===qs?1:0},consumeUntilExclamationMarkOrSemicolon(d){return d===NS||d===qs?1:0},consumeUntilSemicolonIncluded(d){return d===qs?2:0},createList:un,createSingleNodeList:un,getFirstListNode:un,getLastListNode:un,parseWithFallback(d,p){let A=this.tokenIndex;try{return d.call(this)}catch(E){if(i)throw E;this.skip(A-this.tokenIndex);let N=p.call(this);return i=!0,a(E,N),i=!1,N}},lookupNonWSType(d){let p;do if(p=this.lookupType(d++),p!==13&&p!==25)return p;while(p!==Gd);return Gd},charCodeAt(d){return d>=0&&d<t.length?t.charCodeAt(d):0},substring(d,p){return t.substring(d,p)},substrToCursor(d){return this.source.substring(d,this.tokenStart)},cmpChar(d,p){return Ja(t,d,p)},cmpStr(d,p,A){return Bt(t,d,p,A)},consume(d){let p=this.tokenStart;return this.eat(d),this.substrToCursor(p)},consumeFunctionName(){let d=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),d},consumeNumber(d){let p=t.substring(this.tokenStart,oo(t,this.tokenStart));return this.eat(d),p},eat(d){if(this.tokenType!==d){let p=tn[d].slice(0,-6).replace(/-/g," ").replace(/^./,N=>N.toUpperCase()),A=`${/[[\](){}]/.test(p)?`"${p}"`:p} is expected`,E=this.tokenStart;switch(d){case 1:this.tokenType===2||this.tokenType===7?(E=this.tokenEnd-1,A="Identifier is expected but function found"):A="Identifier is expected";break;case 4:this.isDelim(OS)&&(this.next(),E++,A="Name is expected");break;case 11:this.tokenType===10&&(E=this.tokenEnd,A="Percent sign is expected");break}this.error(A,E)}this.next()},eatIdent(d){(this.tokenType!==1||this.lookupValue(0,d)===!1)&&this.error(`Identifier "${d}" is expected`),this.next()},eatDelim(d){this.isDelim(d)||this.error(`Delim "${String.fromCharCode(d)}" is expected`),this.next()},getLocation(d,p){return r?c.getLocationRange(d,p,n):null},getLocationFromList(d){if(r){let p=this.getFirstListNode(d),A=this.getLastListNode(d);return c.getLocationRange(p!==null?p.loc.start.offset-c.startOffset:this.tokenStart,A!==null?A.loc.end.offset-c.startOffset:this.tokenStart,n)}return null},error(d,p){let A=typeof p<"u"&&p<t.length?c.getLocation(p):this.eof?c.getLocation(id(t,t.length-1)):c.getLocation(this.tokenStart);throw new Zs(d||"Unexpected input",t,A.offset,A.line,A.column,c.startLine,c.startColumn)}}),f=()=>({filename:n,source:t,tokenCount:u.tokenCount,getTokenType:d=>u.getTokenType(d),getTokenTypeName:d=>tn[u.getTokenType(d)],getTokenStart:d=>u.getTokenStart(d),getTokenEnd:d=>u.getTokenEnd(d),getTokenValue:d=>u.source.substring(u.getTokenStart(d),u.getTokenEnd(d)),substring:(d,p)=>u.source.substring(d,p),balance:u.balance.subarray(0,u.tokenCount+1),isBlockOpenerTokenType:u.isBlockOpenerTokenType,isBlockCloserTokenType:u.isBlockCloserTokenType,getBlockTokenPairIndex:d=>u.getBlockTokenPairIndex(d),getLocation:d=>c.getLocation(d,n),getRangeLocation:(d,p)=>c.getLocationRange(d,p,n)});return Object.assign(function(d,p){t=d,p=p||{},u.setSource(t,md),c.setSource(t,p.offset,p.line,p.column),n=p.filename||"<unknown>",r=!!p.positions,a=typeof p.onParseError=="function"?p.onParseError:un,i=!1,u.parseAtrulePrelude="parseAtrulePrelude"in p?!!p.parseAtrulePrelude:!0,u.parseRulePrelude="parseRulePrelude"in p?!!p.parseRulePrelude:!0,u.parseValue="parseValue"in p?!!p.parseValue:!0,u.parseCustomProperty="parseCustomProperty"in p?!!p.parseCustomProperty:!1;let{context:A="default",list:E=!0,onComment:N,onToken:C}=p;if(!(A in u.context))throw new Error("Unknown context `"+A+"`");Object.assign(u,E?FS:vS),Array.isArray(C)?u.forEachToken((I,k,D)=>{C.push({type:I,start:k,end:D})}):typeof C=="function"&&u.forEachToken(C.bind(f())),typeof N=="function"&&u.forEachToken((I,k,D)=>{if(I===25){let H=u.getLocation(k,D),q=Bt(t,D-2,D,"*/")?t.slice(k+2,D-2):t.slice(k+2,D);N(q,H)}});let M=u.context[A].call(u,p);return u.eof||u.error(),M},{SyntaxError:Zs,config:u.config})}var tc={};L(tc,{AtrulePrelude:()=>zd,Selector:()=>Xd,Value:()=>tm});var BS=35,LS=42,Qd=43,PS=45,HS=47,US=117;function Qn(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,US)&&this.cmpChar(this.tokenStart+1,Qd)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===HS||t===LS||t===Qd||t===PS)return this.Operator();t===BS&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var zd={getNode:Qn};var jS=35,VS=38,WS=42,$S=43,YS=47,Jd=46,GS=62,KS=124,QS=126;function zS(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function JS(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Jd&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case $S:case GS:case QS:case YS:return this.Combinator();case Jd:return this.ClassSelector();case WS:case KS:return this.TypeSelector();case jS:return this.IdSelector();case VS:return this.NestingSelector()}break}}}var Xd={onWhiteSpace:zS,getNode:JS};function Zd(){return this.createSingleNodeList(this.Raw(null,!1))}function qd(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type==="Value"&&n.children.isEmpty){for(let r=t-this.tokenIndex;r<=0;r++)if(this.lookupType(r)===13){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(n)}return e}function em(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var tm={getNode:Qn,onWhiteSpace(e,t){em(e)&&(e.value=" "+e.value),em(t.last)&&(t.last.value+=" ")},expression:Zd,var:qd};var XS=new Set(["none","and","not","or"]),nm={parse:{prelude(){let e=this.createList();if(this.tokenType===1){let t=this.substring(this.tokenStart,this.tokenEnd);XS.has(t.toLowerCase())||e.push(this.Identifier())}return e.push(this.Condition("container")),e},block(e=!1){return this.Block(e)}}};var rm={parse:{prelude:null,block(){return this.Block(!0)}}};function nc(e,t){return this.parseWithFallback(()=>{try{return e.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},t||(()=>this.Raw(null,!0)))}var om={layer(){this.skipSC();let e=this.createList(),t=nc.call(this,this.Layer);return(t.type!=="Raw"||t.value!=="")&&e.push(t),e},supports(){this.skipSC();let e=this.createList(),t=nc.call(this,this.Declaration,()=>nc.call(this,()=>this.Condition("supports")));return(t.type!=="Raw"||t.value!=="")&&e.push(t),e}},am={parse:{prelude(){let e=this.createList();switch(this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer")?e.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer(")&&e.push(this.Function(null,om)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"supports(")&&e.push(this.Function(null,om)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}};var im={parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}};var sm={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}};var cm={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};var lm={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};var um={parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(e=!1){return this.Block(e)}}};var dm={parse:{prelude:null,block(e=!1){return this.Block(e)}}};var mm={parse:{prelude(){return this.createSingleNodeList(this.Condition("supports"))},block(e=!1){return this.Block(e)}}};var pm={container:nm,"font-face":rm,import:am,layer:im,media:sm,nest:cm,page:lm,scope:um,"starting-style":dm,supports:mm};function fm(){let e=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 1:e.push(this.Identifier());break;case 5:e.push(this.String());break;case 18:e.push(this.Operator());break;case 22:break e;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return e}var jt={parse(){return this.createSingleNodeList(this.SelectorList())}},rc={parse(){return this.createSingleNodeList(this.Selector())}},ZS={parse(){return this.createSingleNodeList(this.Identifier())}},qS={parse:fm},go={parse(){return this.createSingleNodeList(this.Nth())}},hm={dir:ZS,has:jt,lang:qS,matches:jt,is:jt,"-moz-any":jt,"-webkit-any":jt,where:jt,not:jt,"nth-child":go,"nth-last-child":go,"nth-last-of-type":go,"nth-of-type":go,slotted:rc,host:rc,"host-context":rc};var oc={};L(oc,{AnPlusB:()=>ei,Atrule:()=>ni,AtrulePrelude:()=>oi,AttributeSelector:()=>si,Block:()=>li,Brackets:()=>di,CDC:()=>pi,CDO:()=>hi,ClassSelector:()=>Ai,Combinator:()=>yi,Comment:()=>Si,Condition:()=>xi,Declaration:()=>Ii,DeclarationList:()=>wi,Dimension:()=>Ni,Feature:()=>vi,FeatureFunction:()=>Di,FeatureRange:()=>Li,Function:()=>Hi,GeneralEnclosed:()=>ji,Hash:()=>Wi,IdSelector:()=>Ki,Identifier:()=>Yi,Layer:()=>zi,LayerList:()=>Xi,MediaQuery:()=>qi,MediaQueryList:()=>ts,NestingSelector:()=>rs,Nth:()=>as,Number:()=>ss,Operator:()=>ls,Parentheses:()=>ds,Percentage:()=>ps,PseudoClassSelector:()=>hs,PseudoElementSelector:()=>As,Ratio:()=>ys,Raw:()=>Ss,Rule:()=>xs,Scope:()=>Is,Selector:()=>ks,SelectorList:()=>Rs,String:()=>vs,StyleSheet:()=>Ds,SupportsDeclaration:()=>Bs,TypeSelector:()=>Hs,UnicodeRange:()=>Vs,Url:()=>Ys,Value:()=>Ks,WhiteSpace:()=>zs});var gm={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",condition(e){return this.Condition(e.kind)},rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:tc,atrule:pm,pseudo:hm,node:oc};var Am=Kd(gm);var{hasOwnProperty:ac}=Object.prototype,zn=function(){};function bm(e){return typeof e=="function"?e:zn}function ym(e,t){return function(n,r,a){n.type===t&&e.call(this,n,r,a)}}function e0(e,t){let n=t.structure,r=[];for(let a in n){if(ac.call(n,a)===!1)continue;let i=n[a],c={name:a,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let u of i)u===null?c.nullable=!0:typeof u=="string"?c.type="node":Array.isArray(u)&&(c.type="list");c.type&&r.push(c)}return r.length?{context:t.walkContext,fields:r}:null}function t0(e){let t={};for(let n in e.node)if(ac.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=e0(n,r)}return t}function Em(e,t){let n=e.fields.slice(),r=e.context,a=typeof r=="string";return t&&n.reverse(),function(i,c,u,f){let l;a&&(l=c[r],c[r]=i);for(let d of n){let p=i[d.name];if(!d.nullable||p){if(d.type==="list"){if(t?p.reduceRight(f,!1):p.reduce(f,!1))return!0}else if(u(p))return!0}}a&&(c[r]=l)}}function Sm({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:a}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:a}}}function Tm(e){let t=t0(e),n={},r={},a=Symbol("break-walk"),i=Symbol("skip-node");for(let l in t)ac.call(t,l)&&t[l]!==null&&(n[l]=Em(t[l],!1),r[l]=Em(t[l],!0));let c=Sm(n),u=Sm(r),f=function(l,d){function p(I,k,D){let H=A.call(M,I,k,D);return H===a?!0:H===i?!1:!!(N.hasOwnProperty(I.type)&&N[I.type](I,M,p,C)||E.call(M,I,k,D)===a)}let A=zn,E=zn,N=n,C=(I,k,D,H)=>I||p(k,D,H),M={break:a,skip:i,root:l,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof d=="function")A=d;else if(d&&(A=bm(d.enter),E=bm(d.leave),d.reverse&&(N=r),d.visit)){if(c.hasOwnProperty(d.visit))N=d.reverse?u[d.visit]:c[d.visit];else if(!t.hasOwnProperty(d.visit))throw new Error("Bad value `"+d.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");A=ym(A,d.visit),E=ym(E,d.visit)}if(A===zn&&E===zn)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");p(l)};return f.break=a,f.skip=i,f.find=function(l,d){let p=null;return f(l,function(A,E,N){if(d.call(this,A,E,N))return p=A,a}),p},f.findLast=function(l,d){let p=null;return f(l,{reverse:!0,enter(A,E,N){if(d.call(this,A,E,N))return p=A,a}}),p},f.findAll=function(l,d){let p=[];return f(l,function(A,E,N){d.call(this,A,E,N)&&p.push(A)}),p},f}var ic={};L(ic,{AnPlusB:()=>ti,Atrule:()=>ri,AtrulePrelude:()=>ai,AttributeSelector:()=>ci,Block:()=>ui,Brackets:()=>mi,CDC:()=>fi,CDO:()=>gi,ClassSelector:()=>bi,Combinator:()=>Ei,Comment:()=>Ti,Condition:()=>Ci,Declaration:()=>_i,DeclarationList:()=>Ri,Dimension:()=>Oi,Feature:()=>Fi,FeatureFunction:()=>Mi,FeatureRange:()=>Pi,Function:()=>Ui,GeneralEnclosed:()=>Vi,Hash:()=>$i,IdSelector:()=>Qi,Identifier:()=>Gi,Layer:()=>Ji,LayerList:()=>Zi,MediaQuery:()=>es,MediaQueryList:()=>ns,NestingSelector:()=>os,Nth:()=>is,Number:()=>cs,Operator:()=>us,Parentheses:()=>ms,Percentage:()=>fs,PseudoClassSelector:()=>gs,PseudoElementSelector:()=>bs,Ratio:()=>Es,Raw:()=>Ts,Rule:()=>Cs,Scope:()=>_s,Selector:()=>ws,SelectorList:()=>Ns,String:()=>Fs,StyleSheet:()=>Ms,SupportsDeclaration:()=>Ls,TypeSelector:()=>Us,UnicodeRange:()=>Ws,Url:()=>Gs,Value:()=>Qs,WhiteSpace:()=>Js});var xm={node:ic};var Cm=Tm(xm);var n0=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),z="\uFFFD",m;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(m||(m={}));var Te={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ao(e){return e>=55296&&e<=57343}function Im(e){return e>=56320&&e<=57343}function _m(e,t){return(e-55296)*1024+9216+t}function bo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function yo(e){return e>=64976&&e<=65007||n0.has(e)}var y;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(y||(y={}));var o0=65536,Eo=class{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=o0,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){let{line:r,col:a,offset:i}=this,c=a+n,u=i+n;return{code:t,startLine:r,endLine:r,startCol:c,endCol:c,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){let n=this.html.charCodeAt(this.pos+1);if(Im(n))return this.pos++,this._addGap(),_m(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(y.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){let n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;let r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ao(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){bo(t)?this._err(y.controlCharacterInInputStream):yo(t)&&this._err(y.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}};var $;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})($||($={}));function So(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var i0=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function km(e){return e>=55296&&e<=57343||e>1114111?65533:i0.get(e)??e}function wm(e){let t=atob(e),n=t.length&-2,r=new Uint16Array(n/2);for(let a=0,i=0;a<n;a+=2){let c=t.charCodeAt(a),u=t.charCodeAt(a+1);r[i++]=c|u<<8}return r}var sc=wm("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");var Ae;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ae||(Ae={}));var re;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(re||(re={}));var Rm=32;function cc(e){return e>=re.ZERO&&e<=re.NINE}function s0(e){return e>=re.UPPER_A&&e<=re.UPPER_F||e>=re.LOWER_A&&e<=re.LOWER_F}function c0(e){return e>=re.UPPER_A&&e<=re.UPPER_Z||e>=re.LOWER_A&&e<=re.LOWER_Z||cc(e)}function l0(e){return e===re.EQUALS||c0(e)}var de;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(de||(de={}));var ot;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ot||(ot={}));var To=class{decodeTree;emitCodePoint;errors;constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r}state=de.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=ot.Strict;runConsumed=0;startEntity(t){this.decodeMode=t,this.state=de.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(t,n){switch(this.state){case de.EntityStart:return t.charCodeAt(n)===re.NUM?(this.state=de.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=de.NamedEntity,this.stateNamedEntity(t,n));case de.NumericStart:return this.stateNumericStart(t,n);case de.NumericDecimal:return this.stateNumericDecimal(t,n);case de.NumericHex:return this.stateNumericHex(t,n);case de.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Rm)===re.LOWER_X?(this.state=de.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=de.NumericDecimal,this.stateNumericDecimal(t,n))}stateNumericHex(t,n){for(;n<t.length;){let r=t.charCodeAt(n);if(cc(r)||s0(r)){let a=r<=re.NINE?r-re.ZERO:(r|Rm)-re.LOWER_A+10;this.result=this.result*16+a,this.consumed++,n++}else return this.emitNumericEntity(r,3)}return-1}stateNumericDecimal(t,n){for(;n<t.length;){let r=t.charCodeAt(n);if(cc(r))this.result=this.result*10+(r-re.ZERO),this.consumed++,n++;else return this.emitNumericEntity(r,2)}return-1}emitNumericEntity(t,n){if(this.consumed<=n)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===re.SEMI)this.consumed+=1;else if(this.decodeMode===ot.Strict)return 0;return this.emitCodePoint(km(this.result),this.consumed),this.errors&&(t!==re.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){let{decodeTree:r}=this,a=r[this.treeIndex],i=(a&Ae.VALUE_LENGTH)>>14;for(;n<t.length;){if(i===0&&(a&Ae.FLAG13)!==0){let u=(a&Ae.BRANCH_LENGTH)>>7;if(this.runConsumed===0){let f=a&Ae.JUMP_TABLE;if(t.charCodeAt(n)!==f)return this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}for(;this.runConsumed<u;){if(n>=t.length)return-1;let f=this.runConsumed-1,l=r[this.treeIndex+1+(f>>1)],d=f%2===0?l&255:l>>8&255;if(t.charCodeAt(n)!==d)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(u>>1),a=r[this.treeIndex],i=(a&Ae.VALUE_LENGTH)>>14}if(n>=t.length)break;let c=t.charCodeAt(n);if(c===re.SEMI&&i!==0&&(a&Ae.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);if(this.treeIndex=u0(r,a,this.treeIndex+Math.max(1,i),c),this.treeIndex<0)return this.result===0||this.decodeMode===ot.Attribute&&(i===0||l0(c))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],i=(a&Ae.VALUE_LENGTH)>>14,i!==0){if(c===re.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ot.Strict&&(a&Ae.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}n++,this.excess++}return-1}emitNotTerminatedNamedEntity(){let{result:t,decodeTree:n}=this,r=(n[t]&Ae.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){let{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~(Ae.VALUE_LENGTH|Ae.FLAG13):a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){switch(this.state){case de.NamedEntity:return this.result!==0&&(this.decodeMode!==ot.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case de.NumericDecimal:return this.emitNumericEntity(0,2);case de.NumericHex:return this.emitNumericEntity(0,3);case de.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case de.EntityStart:return 0}}};function u0(e,t,n,r){let a=(t&Ae.BRANCH_LENGTH)>>7,i=t&Ae.JUMP_TABLE;if(a===0)return i!==0&&r===i?n:-1;if(i){let l=r-i;return l<0||l>=a?-1:e[n+l]-1}let c=a+1>>1,u=0,f=a-1;for(;u<=f;){let l=u+f>>>1,d=l>>1,A=e[n+d]>>(l&1)*8&255;if(A<r)u=l+1;else if(A>r)f=l-1;else return e[n+c+l]}return-1}var x;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(x||(x={}));var pt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(pt||(pt={}));var xe;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(xe||(xe={}));var b;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(b||(b={}));var s;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(s||(s={}));var d0=new Map([[b.A,s.A],[b.ADDRESS,s.ADDRESS],[b.ANNOTATION_XML,s.ANNOTATION_XML],[b.APPLET,s.APPLET],[b.AREA,s.AREA],[b.ARTICLE,s.ARTICLE],[b.ASIDE,s.ASIDE],[b.B,s.B],[b.BASE,s.BASE],[b.BASEFONT,s.BASEFONT],[b.BGSOUND,s.BGSOUND],[b.BIG,s.BIG],[b.BLOCKQUOTE,s.BLOCKQUOTE],[b.BODY,s.BODY],[b.BR,s.BR],[b.BUTTON,s.BUTTON],[b.CAPTION,s.CAPTION],[b.CENTER,s.CENTER],[b.CODE,s.CODE],[b.COL,s.COL],[b.COLGROUP,s.COLGROUP],[b.DD,s.DD],[b.DESC,s.DESC],[b.DETAILS,s.DETAILS],[b.DIALOG,s.DIALOG],[b.DIR,s.DIR],[b.DIV,s.DIV],[b.DL,s.DL],[b.DT,s.DT],[b.EM,s.EM],[b.EMBED,s.EMBED],[b.FIELDSET,s.FIELDSET],[b.FIGCAPTION,s.FIGCAPTION],[b.FIGURE,s.FIGURE],[b.FONT,s.FONT],[b.FOOTER,s.FOOTER],[b.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[b.FORM,s.FORM],[b.FRAME,s.FRAME],[b.FRAMESET,s.FRAMESET],[b.H1,s.H1],[b.H2,s.H2],[b.H3,s.H3],[b.H4,s.H4],[b.H5,s.H5],[b.H6,s.H6],[b.HEAD,s.HEAD],[b.HEADER,s.HEADER],[b.HGROUP,s.HGROUP],[b.HR,s.HR],[b.HTML,s.HTML],[b.I,s.I],[b.IMG,s.IMG],[b.IMAGE,s.IMAGE],[b.INPUT,s.INPUT],[b.IFRAME,s.IFRAME],[b.KEYGEN,s.KEYGEN],[b.LABEL,s.LABEL],[b.LI,s.LI],[b.LINK,s.LINK],[b.LISTING,s.LISTING],[b.MAIN,s.MAIN],[b.MALIGNMARK,s.MALIGNMARK],[b.MARQUEE,s.MARQUEE],[b.MATH,s.MATH],[b.MENU,s.MENU],[b.META,s.META],[b.MGLYPH,s.MGLYPH],[b.MI,s.MI],[b.MO,s.MO],[b.MN,s.MN],[b.MS,s.MS],[b.MTEXT,s.MTEXT],[b.NAV,s.NAV],[b.NOBR,s.NOBR],[b.NOFRAMES,s.NOFRAMES],[b.NOEMBED,s.NOEMBED],[b.NOSCRIPT,s.NOSCRIPT],[b.OBJECT,s.OBJECT],[b.OL,s.OL],[b.OPTGROUP,s.OPTGROUP],[b.OPTION,s.OPTION],[b.P,s.P],[b.PARAM,s.PARAM],[b.PLAINTEXT,s.PLAINTEXT],[b.PRE,s.PRE],[b.RB,s.RB],[b.RP,s.RP],[b.RT,s.RT],[b.RTC,s.RTC],[b.RUBY,s.RUBY],[b.S,s.S],[b.SCRIPT,s.SCRIPT],[b.SEARCH,s.SEARCH],[b.SECTION,s.SECTION],[b.SELECT,s.SELECT],[b.SOURCE,s.SOURCE],[b.SMALL,s.SMALL],[b.SPAN,s.SPAN],[b.STRIKE,s.STRIKE],[b.STRONG,s.STRONG],[b.STYLE,s.STYLE],[b.SUB,s.SUB],[b.SUMMARY,s.SUMMARY],[b.SUP,s.SUP],[b.TABLE,s.TABLE],[b.TBODY,s.TBODY],[b.TEMPLATE,s.TEMPLATE],[b.TEXTAREA,s.TEXTAREA],[b.TFOOT,s.TFOOT],[b.TD,s.TD],[b.TH,s.TH],[b.THEAD,s.THEAD],[b.TITLE,s.TITLE],[b.TR,s.TR],[b.TRACK,s.TRACK],[b.TT,s.TT],[b.U,s.U],[b.UL,s.UL],[b.SVG,s.SVG],[b.VAR,s.VAR],[b.WBR,s.WBR],[b.XMP,s.XMP]]);function Vt(e){var t;return(t=d0.get(e))!==null&&t!==void 0?t:s.UNKNOWN}var w=s,Nm={[x.HTML]:new Set([w.ADDRESS,w.APPLET,w.AREA,w.ARTICLE,w.ASIDE,w.BASE,w.BASEFONT,w.BGSOUND,w.BLOCKQUOTE,w.BODY,w.BR,w.BUTTON,w.CAPTION,w.CENTER,w.COL,w.COLGROUP,w.DD,w.DETAILS,w.DIR,w.DIV,w.DL,w.DT,w.EMBED,w.FIELDSET,w.FIGCAPTION,w.FIGURE,w.FOOTER,w.FORM,w.FRAME,w.FRAMESET,w.H1,w.H2,w.H3,w.H4,w.H5,w.H6,w.HEAD,w.HEADER,w.HGROUP,w.HR,w.HTML,w.IFRAME,w.IMG,w.INPUT,w.LI,w.LINK,w.LISTING,w.MAIN,w.MARQUEE,w.MENU,w.META,w.NAV,w.NOEMBED,w.NOFRAMES,w.NOSCRIPT,w.OBJECT,w.OL,w.P,w.PARAM,w.PLAINTEXT,w.PRE,w.SCRIPT,w.SECTION,w.SELECT,w.SOURCE,w.STYLE,w.SUMMARY,w.TABLE,w.TBODY,w.TD,w.TEMPLATE,w.TEXTAREA,w.TFOOT,w.TH,w.THEAD,w.TITLE,w.TR,w.TRACK,w.UL,w.WBR,w.XMP]),[x.MATHML]:new Set([w.MI,w.MO,w.MN,w.MS,w.MTEXT,w.ANNOTATION_XML]),[x.SVG]:new Set([w.TITLE,w.FOREIGN_OBJECT,w.DESC]),[x.XLINK]:new Set,[x.XML]:new Set,[x.XMLNS]:new Set},Jn=new Set([w.H1,w.H2,w.H3,w.H4,w.H5,w.H6]),Xv=new Set([b.STYLE,b.SCRIPT,b.XMP,b.IFRAME,b.NOEMBED,b.NOFRAMES,b.PLAINTEXT]);var h;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(h||(h={}));var be={DATA:h.DATA,RCDATA:h.RCDATA,RAWTEXT:h.RAWTEXT,SCRIPT_DATA:h.SCRIPT_DATA,PLAINTEXT:h.PLAINTEXT,CDATA_SECTION:h.CDATA_SECTION};function p0(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function Xn(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function f0(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function St(e){return f0(e)||Xn(e)}function Om(e){return St(e)||p0(e)}function xo(e){return e+32}function Fm(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function vm(e){return Fm(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function h0(e){return e===m.NULL?y.nullCharacterReference:e>1114111?y.characterReferenceOutsideUnicodeRange:Ao(e)?y.surrogateCharacterReference:yo(e)?y.noncharacterCharacterReference:bo(e)||e===m.CARRIAGE_RETURN?y.controlCharacterReference:null}var Zn=class{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=h.DATA,this.returnState=h.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Eo(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new To(sc,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(y.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(y.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{let a=h0(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:$.START_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:$.END_TAG,tagName:"",tagID:s.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:$.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:$.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;let r=this.currentToken;if(So(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){let a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(y.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let t=this.currentToken;this.prepareToken(t),t.tagID=Vt(t.tagName),t.type===$.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(y.endTagWithAttributes),t.selfClosing&&this._err(y.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case $.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case $.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case $.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:$.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){let n=Fm(t)?$.WHITESPACE_CHARACTER:t===m.NULL?$.NULL_CHARACTER:$.CHARACTER;this._appendCharToCurrentCharacterToken(n,t<65536?String.fromCharCode(t):String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken($.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=h.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ot.Attribute:ot.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===h.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case h.DATA:{this._stateData(t);break}case h.RCDATA:{this._stateRcdata(t);break}case h.RAWTEXT:{this._stateRawtext(t);break}case h.SCRIPT_DATA:{this._stateScriptData(t);break}case h.PLAINTEXT:{this._statePlaintext(t);break}case h.TAG_OPEN:{this._stateTagOpen(t);break}case h.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case h.TAG_NAME:{this._stateTagName(t);break}case h.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case h.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case h.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case h.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case h.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case h.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case h.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case h.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case h.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case h.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case h.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case h.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case h.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case h.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case h.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case h.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case h.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case h.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case h.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case h.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case h.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case h.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case h.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case h.BOGUS_COMMENT:{this._stateBogusComment(t);break}case h.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case h.COMMENT_START:{this._stateCommentStart(t);break}case h.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case h.COMMENT:{this._stateComment(t);break}case h.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case h.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case h.COMMENT_END:{this._stateCommentEnd(t);break}case h.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case h.DOCTYPE:{this._stateDoctype(t);break}case h.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case h.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case h.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case h.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case h.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case h.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case h.CDATA_SECTION:{this._stateCdataSection(t);break}case h.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case h.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case h.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case h.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=h.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(y.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=h.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(y.unexpectedNullCharacter),this._emitChars(z);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=h.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(y.unexpectedNullCharacter),this._emitChars(z);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(y.unexpectedNullCharacter),this._emitChars(z);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(y.unexpectedNullCharacter),this._emitChars(z);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(St(t))this._createStartTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=h.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=h.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(y.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(y.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(y.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=h.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(St(t))this._createEndTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(y.missingEndTagName),this.state=h.DATA;break}case m.EOF:{this._err(y.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(y.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=h.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(y.unexpectedNullCharacter),n.tagName+=z;break}case m.EOF:{this._err(y.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Xn(t)?xo(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=h.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){St(t)?(this.state=h.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=h.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=h.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=h.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===m.SOLIDUS?this.state=h.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){St(t)?(this.state=h.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case m.SOLIDUS:{this.state=h.SCRIPT_DATA_END_TAG_OPEN;break}case m.EXCLAMATION_MARK:{this.state=h.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=h.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){St(t)?(this.state=h.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===m.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(y.unexpectedNullCharacter),this._emitChars(z);break}case m.EOF:{this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(y.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(z);break}case m.EOF:{this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(y.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(z);break}case m.EOF:{this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:St(t)?(this._emitChars("<"),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){St(t)?(this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Te.SCRIPT,!1)&&vm(this.preprocessor.peek(Te.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Te.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(y.unexpectedNullCharacter),this._emitChars(z);break}case m.EOF:{this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(y.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(z);break}case m.EOF:{this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(y.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(z);break}case m.EOF:{this._err(y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.SOLIDUS?(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Te.SCRIPT,!1)&&vm(this.preprocessor.peek(Te.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Te.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(y.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=h.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(y.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(y.unexpectedNullCharacter),this.currentAttr.name+=z;break}default:this.currentAttr.name+=String.fromCodePoint(Xn(t)?xo(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(y.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=h.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=h.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(y.missingAttributeValue),this.state=h.DATA,this.emitCurrentTagToken();break}default:this.state=h.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(y.unexpectedNullCharacter),this.currentAttr.value+=z;break}case m.EOF:{this._err(y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(y.unexpectedNullCharacter),this.currentAttr.value+=z;break}case m.EOF:{this._err(y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(y.unexpectedNullCharacter),this.currentAttr.value+=z;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(y.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(y.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=h.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(y.eofInTag),this._emitEOFToken();break}default:this._err(y.missingWhitespaceBetweenAttributes),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{let n=this.currentToken;n.selfClosing=!0,this.state=h.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(y.eofInTag),this._emitEOFToken();break}default:this._err(y.unexpectedSolidusInTag),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){let n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(y.unexpectedNullCharacter),n.data+=z;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Te.DASH_DASH,!0)?(this._createCommentToken(Te.DASH_DASH.length+1),this.state=h.COMMENT_START):this._consumeSequenceIfMatch(Te.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Te.DOCTYPE.length+1),this.state=h.DOCTYPE):this._consumeSequenceIfMatch(Te.CDATA_START,!0)?this.inForeignNode?this.state=h.CDATA_SECTION:(this._err(y.cdataInHtmlContent),this._createCommentToken(Te.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=h.BOGUS_COMMENT):this._ensureHibernation()||(this._err(y.incorrectlyOpenedComment),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=h.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(y.abruptClosingOfEmptyComment),this.state=h.DATA;let n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){let n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(y.abruptClosingOfEmptyComment),this.state=h.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateComment(t){let n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=h.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=h.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(y.unexpectedNullCharacter),n.data+=z;break}case m.EOF:{this._err(y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){let n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=h.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=h.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=h.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(y.nestedComment),this.state=h.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){let n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case m.EOF:{this._err(y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){let n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=h.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){let n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{n.data+="--!",this.state=h.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(y.incorrectlyClosedComment),this.state=h.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(y.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=h.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(y.eofInDoctype),this._createDoctypeToken(null);let n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(y.missingWhitespaceBeforeDoctypeName),this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Xn(t))this._createDoctypeToken(String.fromCharCode(xo(t))),this.state=h.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(y.unexpectedNullCharacter),this._createDoctypeToken(z),this.state=h.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(y.missingDoctypeName),this._createDoctypeToken(null);let n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=h.DATA;break}case m.EOF:{this._err(y.eofInDoctype),this._createDoctypeToken(null);let n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=h.DOCTYPE_NAME}}_stateDoctypeName(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=h.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(y.unexpectedNullCharacter),n.name+=z;break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Xn(t)?xo(t):t)}}_stateAfterDoctypeName(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Te.PUBLIC,!1)?this.state=h.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Te.SYSTEM,!1)?this.state=h.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(y.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(y.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(y.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(y.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(y.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(y.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(y.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){let n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(y.unexpectedNullCharacter),n.publicId+=z;break}case m.GREATER_THAN_SIGN:{this._err(y.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=h.DATA;break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){let n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(y.unexpectedNullCharacter),n.publicId+=z;break}case m.GREATER_THAN_SIGN:{this._err(y.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=h.DATA;break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=h.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(y.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(y.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(y.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(y.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(y.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){let n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(y.unexpectedNullCharacter),n.systemId+=z;break}case m.GREATER_THAN_SIGN:{this._err(y.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=h.DATA;break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){let n=this.currentToken;switch(t){case m.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(y.unexpectedNullCharacter),n.systemId+=z;break}case m.GREATER_THAN_SIGN:{this._err(y.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=h.DATA;break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){let n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=h.DATA;break}case m.EOF:{this._err(y.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(y.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){let n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=h.DATA;break}case m.NULL:{this._err(y.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}default:}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=h.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(y.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=h.CDATA_SECTION_END:(this._emitChars("]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=h.DATA;break}case m.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Om(this.preprocessor.peek(1))?h.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Om(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(y.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};var Lm=new Set([s.DD,s.DT,s.LI,s.OPTGROUP,s.OPTION,s.P,s.RB,s.RP,s.RT,s.RTC]),Dm=new Set([...Lm,s.CAPTION,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]),Co=new Set([s.APPLET,s.CAPTION,s.HTML,s.MARQUEE,s.OBJECT,s.TABLE,s.TD,s.TEMPLATE,s.TH]),g0=new Set([...Co,s.OL,s.UL]),A0=new Set([...Co,s.BUTTON]),Mm=new Set([s.ANNOTATION_XML,s.MI,s.MN,s.MO,s.MS,s.MTEXT]),Bm=new Set([s.DESC,s.FOREIGN_OBJECT,s.TITLE]),b0=new Set([s.TR,s.TEMPLATE,s.HTML]),y0=new Set([s.TBODY,s.TFOOT,s.THEAD,s.TEMPLATE,s.HTML]),E0=new Set([s.TABLE,s.TEMPLATE,s.HTML]),S0=new Set([s.TD,s.TH]),Io=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=s.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===s.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===x.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){let r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){let a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==x.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){let n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){let n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){let r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Jn,x.HTML)}popUntilTableCellPopped(){this.popUntilPopped(S0,x.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){let r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(E0,x.HTML)}clearBackToTableBodyContext(){this.clearBackTo(y0,x.HTML)}clearBackToTableRowContext(){this.clearBackTo(b0,x.HTML)}remove(t){let n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===s.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===s.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){let a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case x.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case x.SVG:{if(Bm.has(a))return!1;break}case x.MATHML:{if(Mm.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Co)}hasInListItemScope(t){return this.hasInDynamicScope(t,g0)}hasInButtonScope(t){return this.hasInDynamicScope(t,A0)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){let n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case x.HTML:{if(Jn.has(n))return!0;if(Co.has(n))return!1;break}case x.SVG:{if(Bm.has(n))return!1;break}case x.MATHML:{if(Mm.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===x.HTML)switch(this.tagIDs[n]){case t:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===x.HTML)switch(this.tagIDs[t]){case s.TBODY:case s.THEAD:case s.TFOOT:return!0;case s.TABLE:case s.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===x.HTML)switch(this.tagIDs[n]){case t:return!0;case s.OPTION:case s.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Lm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Dm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Dm.has(this.currentTagId);)this.pop()}};var Qe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Qe||(Qe={}));var Pm={type:Qe.Marker},_o=class{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){let r=[],a=n.length,i=this.treeAdapter.getTagName(t),c=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){let f=this.entries[u];if(f.type===Qe.Marker)break;let{element:l}=f;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===c){let d=this.treeAdapter.getAttrList(l);d.length===a&&r.push({idx:u,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<3)return;let n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<3)return;let a=new Map(n.map(c=>[c.name,c.value])),i=0;for(let c=0;c<r.length;c++){let u=r[c];u.attrs.every(f=>a.get(f.name)===f.value)&&(i+=1,i>=3&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Pm)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Qe.Element,element:t,token:n})}insertElementAfterBookmark(t,n){let r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Qe.Element,element:t,token:n})}removeEntry(t){let n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){let t=this.entries.indexOf(Pm);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){let n=this.entries.find(r=>r.type===Qe.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Qe.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Qe.Element&&n.element===t)}};var ze={createDocument(){return{nodeName:"#document",mode:xe.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{let i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ze.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(ze.isTextNode(n)){n.value+=t;return}}ze.appendChild(e,ze.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ze.isTextNode(r)?r.value+=t:ze.insertBefore(e,ze.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};var Um="html",T0="about:legacy-compat",x0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",jm=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],C0=[...jm,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],I0=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Vm=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],_0=[...Vm,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Hm(e,t){return t.some(n=>e.startsWith(n))}function Wm(e){return e.name===Um&&e.publicId===null&&(e.systemId===null||e.systemId===T0)}function $m(e){if(e.name!==Um)return xe.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===x0)return xe.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),I0.has(n))return xe.QUIRKS;let r=t===null?C0:jm;if(Hm(n,r))return xe.QUIRKS;if(r=t===null?Vm:_0,Hm(n,r))return xe.LIMITED_QUIRKS}return xe.NO_QUIRKS}var Ym={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},w0="definitionurl",R0="definitionURL",N0=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),O0=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:x.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:x.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:x.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:x.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:x.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:x.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:x.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:x.XML}],["xml:space",{prefix:"xml",name:"space",namespace:x.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:x.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:x.XMLNS}]]),v0=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),F0=new Set([s.B,s.BIG,s.BLOCKQUOTE,s.BODY,s.BR,s.CENTER,s.CODE,s.DD,s.DIV,s.DL,s.DT,s.EM,s.EMBED,s.H1,s.H2,s.H3,s.H4,s.H5,s.H6,s.HEAD,s.HR,s.I,s.IMG,s.LI,s.LISTING,s.MENU,s.META,s.NOBR,s.OL,s.P,s.PRE,s.RUBY,s.S,s.SMALL,s.SPAN,s.STRONG,s.STRIKE,s.SUB,s.SUP,s.TABLE,s.TT,s.U,s.UL,s.VAR]);function Gm(e){let t=e.tagID;return t===s.FONT&&e.attrs.some(({name:r})=>r===pt.COLOR||r===pt.SIZE||r===pt.FACE)||F0.has(t)}function lc(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===w0){e.attrs[t].name=R0;break}}function uc(e){for(let t=0;t<e.attrs.length;t++){let n=N0.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ko(e){for(let t=0;t<e.attrs.length;t++){let n=O0.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Km(e){let t=v0.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Vt(e.tagName))}function D0(e,t){return t===x.MATHML&&(e===s.MI||e===s.MO||e===s.MN||e===s.MS||e===s.MTEXT)}function M0(e,t,n){if(t===x.MATHML&&e===s.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===pt.ENCODING){let a=n[r].value.toLowerCase();return a===Ym.TEXT_HTML||a===Ym.APPLICATION_XML}}return t===x.SVG&&(e===s.FOREIGN_OBJECT||e===s.DESC||e===s.TITLE)}function Qm(e,t,n,r){return(!r||r===x.HTML)&&M0(e,t,n)||(!r||r===x.MATHML)&&D0(e,t)}var B0="hidden",L0=8,P0=3,g;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(g||(g={}));var H0={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},qm=new Set([s.TABLE,s.TBODY,s.TFOOT,s.THEAD,s.TR]),Jm={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ze,onParseError:null},ir=class{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=g.INITIAL,this.originalInsertionMode=g.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Jm,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Zn(this.options,this),this.activeFormattingElements=new _o(this.treeAdapter),this.fragmentContextID=r?Vt(this.treeAdapter.getTagName(r)):s.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Io(this.document,this.treeAdapter,this)}static parse(t,n){let r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){let r={...Jm,...n};t??(t=r.treeAdapter.createElement(b.TEMPLATE,x.HTML,[]));let a=r.treeAdapter.createElement("documentmock",x.HTML,[]),i=new this(r,a,t);return i.fragmentContextID===s.TEMPLATE&&i.tmplInsertionModeStack.unshift(g.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;let i=(a=t.location)!==null&&a!==void 0?a:H0,c={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(c)}onItemPush(t,n,r){var a,i;(i=(a=this.treeAdapter).onItemPush)===null||i===void 0||i.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let i,c;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,c=this.fragmentContextID):{current:i,currentTagId:c}=this.openElements,this._setContextModes(i,c)}}_setContextModes(t,n){let r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===x.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,x.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=g.TEXT}switchToPlaintextParsing(){this.insertionMode=g.TEXT,this.originalInsertionMode=g.IN_BODY,this.tokenizer.state=be.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===b.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==x.HTML))switch(this.fragmentContextID){case s.TITLE:case s.TEXTAREA:{this.tokenizer.state=be.RCDATA;break}case s.STYLE:case s.XMP:case s.IFRAME:case s.NOEMBED:case s.NOFRAMES:case s.NOSCRIPT:{this.tokenizer.state=be.RAWTEXT;break}case s.SCRIPT:{this.tokenizer.state=be.SCRIPT_DATA;break}case s.PLAINTEXT:{this.tokenizer.state=be.PLAINTEXT;break}default:}}_setDocumentType(t){let n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){let c=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));c&&this.treeAdapter.setNodeSourceCodeLocation(c,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){let r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{let r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){let r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){let r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){let r=this.treeAdapter.createElement(t,x.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){let n=this.treeAdapter.createElement(t.tagName,x.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){let t=this.treeAdapter.createElement(b.HTML,x.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,s.HTML)}_appendCommentNode(t,n){let r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;let a=this.treeAdapter.getChildNodes(n),i=r?a.lastIndexOf(r):a.length,c=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(c)){let{endLine:f,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(c,{endLine:f,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(c,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){let r=n.location,a=this.treeAdapter.getTagName(t),i=n.type===$.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===s.SVG&&this.treeAdapter.getTagName(n)===b.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===x.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===s.MGLYPH||t.tagID===s.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,x.HTML)}_processToken(t){switch(t.type){case $.CHARACTER:{this.onCharacter(t);break}case $.NULL_CHARACTER:{this.onNullCharacter(t);break}case $.COMMENT:{this.onComment(t);break}case $.DOCTYPE:{this.onDoctype(t);break}case $.START_TAG:{this._processStartTag(t);break}case $.END_TAG:{this.onEndTag(t);break}case $.EOF:{this.onEof(t);break}case $.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){let a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return Qm(t,a,i,r)}_reconstructActiveFormattingElements(){let t=this.activeFormattingElements.entries.length;if(t){let n=this.activeFormattingElements.entries.findIndex(a=>a.type===Qe.Marker||this.openElements.contains(a.element)),r=n===-1?t-1:n-1;for(let a=r;a>=0;a--){let i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=g.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(s.P),this.openElements.popUntilTagNamePopped(s.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case s.TR:{this.insertionMode=g.IN_ROW;return}case s.TBODY:case s.THEAD:case s.TFOOT:{this.insertionMode=g.IN_TABLE_BODY;return}case s.CAPTION:{this.insertionMode=g.IN_CAPTION;return}case s.COLGROUP:{this.insertionMode=g.IN_COLUMN_GROUP;return}case s.TABLE:{this.insertionMode=g.IN_TABLE;return}case s.BODY:{this.insertionMode=g.IN_BODY;return}case s.FRAMESET:{this.insertionMode=g.IN_FRAMESET;return}case s.SELECT:{this._resetInsertionModeForSelect(t);return}case s.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case s.HTML:{this.insertionMode=this.headElement?g.AFTER_HEAD:g.BEFORE_HEAD;return}case s.TD:case s.TH:{if(t>0){this.insertionMode=g.IN_CELL;return}break}case s.HEAD:{if(t>0){this.insertionMode=g.IN_HEAD;return}break}}this.insertionMode=g.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){let r=this.openElements.tagIDs[n];if(r===s.TEMPLATE)break;if(r===s.TABLE){this.insertionMode=g.IN_SELECT_IN_TABLE;return}}this.insertionMode=g.IN_SELECT}_isElementCausesFosterParenting(t){return qm.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){let n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case s.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===x.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case s.TABLE:{let r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){let n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){let r=this.treeAdapter.getNamespaceURI(t);return Nm[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hx(this,t);return}switch(this.insertionMode){case g.INITIAL:{qn(this,t);break}case g.BEFORE_HTML:{tr(this,t);break}case g.BEFORE_HEAD:{nr(this,t);break}case g.IN_HEAD:{rr(this,t);break}case g.IN_HEAD_NO_SCRIPT:{or(this,t);break}case g.AFTER_HEAD:{ar(this,t);break}case g.IN_BODY:case g.IN_CAPTION:case g.IN_CELL:case g.IN_TEMPLATE:{tp(this,t);break}case g.TEXT:case g.IN_SELECT:case g.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case g.IN_TABLE:case g.IN_TABLE_BODY:case g.IN_ROW:{dc(this,t);break}case g.IN_TABLE_TEXT:{sp(this,t);break}case g.IN_COLUMN_GROUP:{Ro(this,t);break}case g.AFTER_BODY:{No(this,t);break}case g.AFTER_AFTER_BODY:{wo(this,t);break}default:}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fx(this,t);return}switch(this.insertionMode){case g.INITIAL:{qn(this,t);break}case g.BEFORE_HTML:{tr(this,t);break}case g.BEFORE_HEAD:{nr(this,t);break}case g.IN_HEAD:{rr(this,t);break}case g.IN_HEAD_NO_SCRIPT:{or(this,t);break}case g.AFTER_HEAD:{ar(this,t);break}case g.TEXT:{this._insertCharacters(t);break}case g.IN_TABLE:case g.IN_TABLE_BODY:case g.IN_ROW:{dc(this,t);break}case g.IN_COLUMN_GROUP:{Ro(this,t);break}case g.AFTER_BODY:{No(this,t);break}case g.AFTER_AFTER_BODY:{wo(this,t);break}default:}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){mc(this,t);return}switch(this.insertionMode){case g.INITIAL:case g.BEFORE_HTML:case g.BEFORE_HEAD:case g.IN_HEAD:case g.IN_HEAD_NO_SCRIPT:case g.AFTER_HEAD:case g.IN_BODY:case g.IN_TABLE:case g.IN_CAPTION:case g.IN_COLUMN_GROUP:case g.IN_TABLE_BODY:case g.IN_ROW:case g.IN_CELL:case g.IN_SELECT:case g.IN_SELECT_IN_TABLE:case g.IN_TEMPLATE:case g.IN_FRAMESET:case g.AFTER_FRAMESET:{mc(this,t);break}case g.IN_TABLE_TEXT:{er(this,t);break}case g.AFTER_BODY:{G0(this,t);break}case g.AFTER_AFTER_BODY:case g.AFTER_AFTER_FRAMESET:{K0(this,t);break}default:}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case g.INITIAL:{Q0(this,t);break}case g.BEFORE_HEAD:case g.IN_HEAD:case g.IN_HEAD_NO_SCRIPT:case g.AFTER_HEAD:{this._err(t,y.misplacedDoctype);break}case g.IN_TABLE_TEXT:{er(this,t);break}default:}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,y.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?gx(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case g.INITIAL:{qn(this,t);break}case g.BEFORE_HTML:{z0(this,t);break}case g.BEFORE_HEAD:{X0(this,t);break}case g.IN_HEAD:{Je(this,t);break}case g.IN_HEAD_NO_SCRIPT:{eT(this,t);break}case g.AFTER_HEAD:{nT(this,t);break}case g.IN_BODY:{ye(this,t);break}case g.IN_TABLE:{dn(this,t);break}case g.IN_TABLE_TEXT:{er(this,t);break}case g.IN_CAPTION:{ZT(this,t);break}case g.IN_COLUMN_GROUP:{gc(this,t);break}case g.IN_TABLE_BODY:{Fo(this,t);break}case g.IN_ROW:{Do(this,t);break}case g.IN_CELL:{tx(this,t);break}case g.IN_SELECT:{up(this,t);break}case g.IN_SELECT_IN_TABLE:{rx(this,t);break}case g.IN_TEMPLATE:{ax(this,t);break}case g.AFTER_BODY:{sx(this,t);break}case g.IN_FRAMESET:{cx(this,t);break}case g.AFTER_FRAMESET:{ux(this,t);break}case g.AFTER_AFTER_BODY:{mx(this,t);break}case g.AFTER_AFTER_FRAMESET:{px(this,t);break}default:}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Ax(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case g.INITIAL:{qn(this,t);break}case g.BEFORE_HTML:{J0(this,t);break}case g.BEFORE_HEAD:{Z0(this,t);break}case g.IN_HEAD:{q0(this,t);break}case g.IN_HEAD_NO_SCRIPT:{tT(this,t);break}case g.AFTER_HEAD:{rT(this,t);break}case g.IN_BODY:{vo(this,t);break}case g.TEXT:{VT(this,t);break}case g.IN_TABLE:{sr(this,t);break}case g.IN_TABLE_TEXT:{er(this,t);break}case g.IN_CAPTION:{qT(this,t);break}case g.IN_COLUMN_GROUP:{ex(this,t);break}case g.IN_TABLE_BODY:{pc(this,t);break}case g.IN_ROW:{lp(this,t);break}case g.IN_CELL:{nx(this,t);break}case g.IN_SELECT:{dp(this,t);break}case g.IN_SELECT_IN_TABLE:{ox(this,t);break}case g.IN_TEMPLATE:{ix(this,t);break}case g.AFTER_BODY:{pp(this,t);break}case g.IN_FRAMESET:{lx(this,t);break}case g.AFTER_FRAMESET:{dx(this,t);break}case g.AFTER_AFTER_BODY:{wo(this,t);break}default:}}onEof(t){switch(this.insertionMode){case g.INITIAL:{qn(this,t);break}case g.BEFORE_HTML:{tr(this,t);break}case g.BEFORE_HEAD:{nr(this,t);break}case g.IN_HEAD:{rr(this,t);break}case g.IN_HEAD_NO_SCRIPT:{or(this,t);break}case g.AFTER_HEAD:{ar(this,t);break}case g.IN_BODY:case g.IN_TABLE:case g.IN_CAPTION:case g.IN_COLUMN_GROUP:case g.IN_TABLE_BODY:case g.IN_ROW:case g.IN_CELL:case g.IN_SELECT:case g.IN_SELECT_IN_TABLE:{ap(this,t);break}case g.TEXT:{WT(this,t);break}case g.IN_TABLE_TEXT:{er(this,t);break}case g.IN_TEMPLATE:{mp(this,t);break}case g.AFTER_BODY:case g.IN_FRAMESET:case g.AFTER_FRAMESET:case g.AFTER_AFTER_BODY:case g.AFTER_AFTER_FRAMESET:{hc(this,t);break}default:}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case g.IN_HEAD:case g.IN_HEAD_NO_SCRIPT:case g.AFTER_HEAD:case g.TEXT:case g.IN_COLUMN_GROUP:case g.IN_SELECT:case g.IN_SELECT_IN_TABLE:case g.IN_FRAMESET:case g.AFTER_FRAMESET:{this._insertCharacters(t);break}case g.IN_BODY:case g.IN_CAPTION:case g.IN_CELL:case g.IN_TEMPLATE:case g.AFTER_BODY:case g.AFTER_AFTER_BODY:case g.AFTER_AFTER_FRAMESET:{ep(this,t);break}case g.IN_TABLE:case g.IN_TABLE_BODY:case g.IN_ROW:{dc(this,t);break}case g.IN_TABLE_TEXT:{ip(this,t);break}default:}}};function U0(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):op(e,t),n}function j0(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function V0(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let i=0,c=a;c!==n;i++,c=a){a=e.openElements.getCommonAncestor(c);let u=e.activeFormattingElements.getElementEntry(c),f=u&&i>=P0;!u||f?(f&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(c)):(c=W0(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(c,r),r=c)}return r}function W0(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function $0(e,t,n){let r=e.treeAdapter.getTagName(t),a=Vt(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);a===s.TEMPLATE&&i===x.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Y0(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,a.tagID)}function fc(e,t){for(let n=0;n<L0;n++){let r=U0(e,t);if(!r)break;let a=j0(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;let i=V0(e,a,r.element),c=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),c&&$0(e,c,i),Y0(e,a,r)}}function mc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function G0(e,t){e._appendCommentNode(t,e.openElements.items[0])}function K0(e,t){e._appendCommentNode(t,e.document)}function hc(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){let i=e.openElements.items[1],c=e.treeAdapter.getNodeSourceCodeLocation(i);c&&!c.endTag&&e._setEndLocation(i,t)}}}}function Q0(e,t){e._setDocumentType(t);let n=t.forceQuirks?xe.QUIRKS:$m(t);Wm(t)||e._err(t,y.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=g.BEFORE_HTML}function qn(e,t){e._err(t,y.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,xe.QUIRKS),e.insertionMode=g.BEFORE_HTML,e._processToken(t)}function z0(e,t){t.tagID===s.HTML?(e._insertElement(t,x.HTML),e.insertionMode=g.BEFORE_HEAD):tr(e,t)}function J0(e,t){let n=t.tagID;(n===s.HTML||n===s.HEAD||n===s.BODY||n===s.BR)&&tr(e,t)}function tr(e,t){e._insertFakeRootElement(),e.insertionMode=g.BEFORE_HEAD,e._processToken(t)}function X0(e,t){switch(t.tagID){case s.HTML:{ye(e,t);break}case s.HEAD:{e._insertElement(t,x.HTML),e.headElement=e.openElements.current,e.insertionMode=g.IN_HEAD;break}default:nr(e,t)}}function Z0(e,t){let n=t.tagID;n===s.HEAD||n===s.BODY||n===s.HTML||n===s.BR?nr(e,t):e._err(t,y.endTagWithoutMatchingOpenElement)}function nr(e,t){e._insertFakeElement(b.HEAD,s.HEAD),e.headElement=e.openElements.current,e.insertionMode=g.IN_HEAD,e._processToken(t)}function Je(e,t){switch(t.tagID){case s.HTML:{ye(e,t);break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:{e._appendElement(t,x.HTML),t.ackSelfClosing=!0;break}case s.TITLE:{e._switchToTextParsing(t,be.RCDATA);break}case s.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,be.RAWTEXT):(e._insertElement(t,x.HTML),e.insertionMode=g.IN_HEAD_NO_SCRIPT);break}case s.NOFRAMES:case s.STYLE:{e._switchToTextParsing(t,be.RAWTEXT);break}case s.SCRIPT:{e._switchToTextParsing(t,be.SCRIPT_DATA);break}case s.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=g.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(g.IN_TEMPLATE);break}case s.HEAD:{e._err(t,y.misplacedStartTagForHeadElement);break}default:rr(e,t)}}function q0(e,t){switch(t.tagID){case s.HEAD:{e.openElements.pop(),e.insertionMode=g.AFTER_HEAD;break}case s.BODY:case s.BR:case s.HTML:{rr(e,t);break}case s.TEMPLATE:{Wt(e,t);break}default:e._err(t,y.endTagWithoutMatchingOpenElement)}}function Wt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==s.TEMPLATE&&e._err(t,y.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,y.endTagWithoutMatchingOpenElement)}function rr(e,t){e.openElements.pop(),e.insertionMode=g.AFTER_HEAD,e._processToken(t)}function eT(e,t){switch(t.tagID){case s.HTML:{ye(e,t);break}case s.BASEFONT:case s.BGSOUND:case s.HEAD:case s.LINK:case s.META:case s.NOFRAMES:case s.STYLE:{Je(e,t);break}case s.NOSCRIPT:{e._err(t,y.nestedNoscriptInHead);break}default:or(e,t)}}function tT(e,t){switch(t.tagID){case s.NOSCRIPT:{e.openElements.pop(),e.insertionMode=g.IN_HEAD;break}case s.BR:{or(e,t);break}default:e._err(t,y.endTagWithoutMatchingOpenElement)}}function or(e,t){let n=t.type===$.EOF?y.openElementsLeftAfterEof:y.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=g.IN_HEAD,e._processToken(t)}function nT(e,t){switch(t.tagID){case s.HTML:{ye(e,t);break}case s.BODY:{e._insertElement(t,x.HTML),e.framesetOk=!1,e.insertionMode=g.IN_BODY;break}case s.FRAMESET:{e._insertElement(t,x.HTML),e.insertionMode=g.IN_FRAMESET;break}case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{e._err(t,y.abandonedHeadElementChild),e.openElements.push(e.headElement,s.HEAD),Je(e,t),e.openElements.remove(e.headElement);break}case s.HEAD:{e._err(t,y.misplacedStartTagForHeadElement);break}default:ar(e,t)}}function rT(e,t){switch(t.tagID){case s.BODY:case s.HTML:case s.BR:{ar(e,t);break}case s.TEMPLATE:{Wt(e,t);break}default:e._err(t,y.endTagWithoutMatchingOpenElement)}}function ar(e,t){e._insertFakeElement(b.BODY,s.BODY),e.insertionMode=g.IN_BODY,Oo(e,t)}function Oo(e,t){switch(t.type){case $.CHARACTER:{tp(e,t);break}case $.WHITESPACE_CHARACTER:{ep(e,t);break}case $.COMMENT:{mc(e,t);break}case $.START_TAG:{ye(e,t);break}case $.END_TAG:{vo(e,t);break}case $.EOF:{ap(e,t);break}default:}}function ep(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function tp(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function oT(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function aT(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function iT(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,x.HTML),e.insertionMode=g.IN_FRAMESET)}function sT(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,x.HTML)}function cT(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Jn.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,x.HTML)}function lT(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,x.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function uT(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,x.HTML),n||(e.formElement=e.openElements.current))}function dT(e,t){e.framesetOk=!1;let n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){let a=e.openElements.tagIDs[r];if(n===s.LI&&a===s.LI||(n===s.DD||n===s.DT)&&(a===s.DD||a===s.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==s.ADDRESS&&a!==s.DIV&&a!==s.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,x.HTML)}function mT(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,x.HTML),e.tokenizer.state=be.PLAINTEXT}function pT(e,t){e.openElements.hasInScope(s.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,x.HTML),e.framesetOk=!1}function fT(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(b.A);n&&(fc(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,x.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,x.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gT(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(s.NOBR)&&(fc(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,x.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function AT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,x.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function bT(e,t){e.treeAdapter.getDocumentMode(e.document)!==xe.QUIRKS&&e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._insertElement(t,x.HTML),e.framesetOk=!1,e.insertionMode=g.IN_TABLE}function np(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,x.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function rp(e){let t=So(e,pt.TYPE);return t!=null&&t.toLowerCase()===B0}function yT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,x.HTML),rp(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ET(e,t){e._appendElement(t,x.HTML),t.ackSelfClosing=!0}function ST(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._appendElement(t,x.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TT(e,t){t.tagName=b.IMG,t.tagID=s.IMG,np(e,t)}function xT(e,t){e._insertElement(t,x.HTML),e.skipNextNewLine=!0,e.tokenizer.state=be.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=g.TEXT}function CT(e,t){e.openElements.hasInButtonScope(s.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function IT(e,t){e.framesetOk=!1,e._switchToTextParsing(t,be.RAWTEXT)}function Xm(e,t){e._switchToTextParsing(t,be.RAWTEXT)}function _T(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,x.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===g.IN_TABLE||e.insertionMode===g.IN_CAPTION||e.insertionMode===g.IN_TABLE_BODY||e.insertionMode===g.IN_ROW||e.insertionMode===g.IN_CELL?g.IN_SELECT_IN_TABLE:g.IN_SELECT}function kT(e,t){e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,x.HTML)}function wT(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,x.HTML)}function RT(e,t){e.openElements.hasInScope(s.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(s.RTC),e._insertElement(t,x.HTML)}function NT(e,t){e._reconstructActiveFormattingElements(),lc(t),ko(t),t.selfClosing?e._appendElement(t,x.MATHML):e._insertElement(t,x.MATHML),t.ackSelfClosing=!0}function OT(e,t){e._reconstructActiveFormattingElements(),uc(t),ko(t),t.selfClosing?e._appendElement(t,x.SVG):e._insertElement(t,x.SVG),t.ackSelfClosing=!0}function Zm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,x.HTML)}function ye(e,t){switch(t.tagID){case s.I:case s.S:case s.B:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.SMALL:case s.STRIKE:case s.STRONG:{hT(e,t);break}case s.A:{fT(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{cT(e,t);break}case s.P:case s.DL:case s.OL:case s.UL:case s.DIV:case s.DIR:case s.NAV:case s.MAIN:case s.MENU:case s.ASIDE:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.DETAILS:case s.ADDRESS:case s.ARTICLE:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{sT(e,t);break}case s.LI:case s.DD:case s.DT:{dT(e,t);break}case s.BR:case s.IMG:case s.WBR:case s.AREA:case s.EMBED:case s.KEYGEN:{np(e,t);break}case s.HR:{ST(e,t);break}case s.RB:case s.RTC:{wT(e,t);break}case s.RT:case s.RP:{RT(e,t);break}case s.PRE:case s.LISTING:{lT(e,t);break}case s.XMP:{CT(e,t);break}case s.SVG:{OT(e,t);break}case s.HTML:{oT(e,t);break}case s.BASE:case s.LINK:case s.META:case s.STYLE:case s.TITLE:case s.SCRIPT:case s.BGSOUND:case s.BASEFONT:case s.TEMPLATE:{Je(e,t);break}case s.BODY:{aT(e,t);break}case s.FORM:{uT(e,t);break}case s.NOBR:{gT(e,t);break}case s.MATH:{NT(e,t);break}case s.TABLE:{bT(e,t);break}case s.INPUT:{yT(e,t);break}case s.PARAM:case s.TRACK:case s.SOURCE:{ET(e,t);break}case s.IMAGE:{TT(e,t);break}case s.BUTTON:{pT(e,t);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{AT(e,t);break}case s.IFRAME:{IT(e,t);break}case s.SELECT:{_T(e,t);break}case s.OPTION:case s.OPTGROUP:{kT(e,t);break}case s.NOEMBED:case s.NOFRAMES:{Xm(e,t);break}case s.FRAMESET:{iT(e,t);break}case s.TEXTAREA:{xT(e,t);break}case s.NOSCRIPT:{e.options.scriptingEnabled?Xm(e,t):Zm(e,t);break}case s.PLAINTEXT:{mT(e,t);break}case s.COL:case s.TH:case s.TD:case s.TR:case s.HEAD:case s.FRAME:case s.TBODY:case s.TFOOT:case s.THEAD:case s.CAPTION:case s.COLGROUP:break;default:Zm(e,t)}}function vT(e,t){if(e.openElements.hasInScope(s.BODY)&&(e.insertionMode=g.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function FT(e,t){e.openElements.hasInScope(s.BODY)&&(e.insertionMode=g.AFTER_BODY,pp(e,t))}function DT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function MT(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(s.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(s.FORM):n&&e.openElements.remove(n))}function BT(e){e.openElements.hasInButtonScope(s.P)||e._insertFakeElement(b.P,s.P),e._closePElement()}function LT(e){e.openElements.hasInListItemScope(s.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(s.LI),e.openElements.popUntilTagNamePopped(s.LI))}function PT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function HT(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function UT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function jT(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(b.BR,s.BR),e.openElements.pop(),e.framesetOk=!1}function op(e,t){let n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){let i=e.openElements.items[a],c=e.openElements.tagIDs[a];if(r===c&&(r!==s.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,c))break}}function vo(e,t){switch(t.tagID){case s.A:case s.B:case s.I:case s.S:case s.U:case s.EM:case s.TT:case s.BIG:case s.CODE:case s.FONT:case s.NOBR:case s.SMALL:case s.STRIKE:case s.STRONG:{fc(e,t);break}case s.P:{BT(e);break}case s.DL:case s.UL:case s.OL:case s.DIR:case s.DIV:case s.NAV:case s.PRE:case s.MAIN:case s.MENU:case s.ASIDE:case s.BUTTON:case s.CENTER:case s.FIGURE:case s.FOOTER:case s.HEADER:case s.HGROUP:case s.DIALOG:case s.ADDRESS:case s.ARTICLE:case s.DETAILS:case s.SEARCH:case s.SECTION:case s.SUMMARY:case s.LISTING:case s.FIELDSET:case s.BLOCKQUOTE:case s.FIGCAPTION:{DT(e,t);break}case s.LI:{LT(e);break}case s.DD:case s.DT:{PT(e,t);break}case s.H1:case s.H2:case s.H3:case s.H4:case s.H5:case s.H6:{HT(e);break}case s.BR:{jT(e);break}case s.BODY:{vT(e,t);break}case s.HTML:{FT(e,t);break}case s.FORM:{MT(e);break}case s.APPLET:case s.OBJECT:case s.MARQUEE:{UT(e,t);break}case s.TEMPLATE:{Wt(e,t);break}default:op(e,t)}}function ap(e,t){e.tmplInsertionModeStack.length>0?mp(e,t):hc(e,t)}function VT(e,t){var n;t.tagID===s.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function WT(e,t){e._err(t,y.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function dc(e,t){if(e.openElements.currentTagId!==void 0&&qm.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=g.IN_TABLE_TEXT,t.type){case $.CHARACTER:{sp(e,t);break}case $.WHITESPACE_CHARACTER:{ip(e,t);break}}else cr(e,t)}function $T(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,x.HTML),e.insertionMode=g.IN_CAPTION}function YT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,x.HTML),e.insertionMode=g.IN_COLUMN_GROUP}function GT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.COLGROUP,s.COLGROUP),e.insertionMode=g.IN_COLUMN_GROUP,gc(e,t)}function KT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,x.HTML),e.insertionMode=g.IN_TABLE_BODY}function QT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(b.TBODY,s.TBODY),e.insertionMode=g.IN_TABLE_BODY,Fo(e,t)}function zT(e,t){e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function JT(e,t){rp(t)?e._appendElement(t,x.HTML):cr(e,t),t.ackSelfClosing=!0}function XT(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,x.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function dn(e,t){switch(t.tagID){case s.TD:case s.TH:case s.TR:{QT(e,t);break}case s.STYLE:case s.SCRIPT:case s.TEMPLATE:{Je(e,t);break}case s.COL:{GT(e,t);break}case s.FORM:{XT(e,t);break}case s.TABLE:{zT(e,t);break}case s.TBODY:case s.TFOOT:case s.THEAD:{KT(e,t);break}case s.INPUT:{JT(e,t);break}case s.CAPTION:{$T(e,t);break}case s.COLGROUP:{YT(e,t);break}default:cr(e,t)}}function sr(e,t){switch(t.tagID){case s.TABLE:{e.openElements.hasInTableScope(s.TABLE)&&(e.openElements.popUntilTagNamePopped(s.TABLE),e._resetInsertionMode());break}case s.TEMPLATE:{Wt(e,t);break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:cr(e,t)}}function cr(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Oo(e,t),e.fosterParentingEnabled=n}function ip(e,t){e.pendingCharacterTokens.push(t)}function sp(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function er(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)cr(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var cp=new Set([s.CAPTION,s.COL,s.COLGROUP,s.TBODY,s.TD,s.TFOOT,s.TH,s.THEAD,s.TR]);function ZT(e,t){let n=t.tagID;cp.has(n)?e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=g.IN_TABLE,dn(e,t)):ye(e,t)}function qT(e,t){let n=t.tagID;switch(n){case s.CAPTION:case s.TABLE:{e.openElements.hasInTableScope(s.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(s.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=g.IN_TABLE,n===s.TABLE&&sr(e,t));break}case s.BODY:case s.COL:case s.COLGROUP:case s.HTML:case s.TBODY:case s.TD:case s.TFOOT:case s.TH:case s.THEAD:case s.TR:break;default:vo(e,t)}}function gc(e,t){switch(t.tagID){case s.HTML:{ye(e,t);break}case s.COL:{e._appendElement(t,x.HTML),t.ackSelfClosing=!0;break}case s.TEMPLATE:{Je(e,t);break}default:Ro(e,t)}}function ex(e,t){switch(t.tagID){case s.COLGROUP:{e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=g.IN_TABLE);break}case s.TEMPLATE:{Wt(e,t);break}case s.COL:break;default:Ro(e,t)}}function Ro(e,t){e.openElements.currentTagId===s.COLGROUP&&(e.openElements.pop(),e.insertionMode=g.IN_TABLE,e._processToken(t))}function Fo(e,t){switch(t.tagID){case s.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,x.HTML),e.insertionMode=g.IN_ROW;break}case s.TH:case s.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(b.TR,s.TR),e.insertionMode=g.IN_ROW,Do(e,t);break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=g.IN_TABLE,dn(e,t));break}default:dn(e,t)}}function pc(e,t){let n=t.tagID;switch(t.tagID){case s.TBODY:case s.TFOOT:case s.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=g.IN_TABLE);break}case s.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=g.IN_TABLE,sr(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:case s.TR:break;default:sr(e,t)}}function Do(e,t){switch(t.tagID){case s.TH:case s.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,x.HTML),e.insertionMode=g.IN_CELL,e.activeFormattingElements.insertMarker();break}case s.CAPTION:case s.COL:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=g.IN_TABLE_BODY,Fo(e,t));break}default:dn(e,t)}}function lp(e,t){switch(t.tagID){case s.TR:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=g.IN_TABLE_BODY);break}case s.TABLE:{e.openElements.hasInTableScope(s.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=g.IN_TABLE_BODY,pc(e,t));break}case s.TBODY:case s.TFOOT:case s.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(s.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=g.IN_TABLE_BODY,pc(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:case s.TD:case s.TH:break;default:sr(e,t)}}function tx(e,t){let n=t.tagID;cp.has(n)?(e.openElements.hasInTableScope(s.TD)||e.openElements.hasInTableScope(s.TH))&&(e._closeTableCell(),Do(e,t)):ye(e,t)}function nx(e,t){let n=t.tagID;switch(n){case s.TD:case s.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=g.IN_ROW);break}case s.TABLE:case s.TBODY:case s.TFOOT:case s.THEAD:case s.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),lp(e,t));break}case s.BODY:case s.CAPTION:case s.COL:case s.COLGROUP:case s.HTML:break;default:vo(e,t)}}function up(e,t){switch(t.tagID){case s.HTML:{ye(e,t);break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e._insertElement(t,x.HTML);break}case s.OPTGROUP:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._insertElement(t,x.HTML);break}case s.HR:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop(),e._appendElement(t,x.HTML),t.ackSelfClosing=!0;break}case s.INPUT:case s.KEYGEN:case s.TEXTAREA:case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),t.tagID!==s.SELECT&&e._processStartTag(t));break}case s.SCRIPT:case s.TEMPLATE:{Je(e,t);break}default:}}function dp(e,t){switch(t.tagID){case s.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===s.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===s.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===s.OPTGROUP&&e.openElements.pop();break}case s.OPTION:{e.openElements.currentTagId===s.OPTION&&e.openElements.pop();break}case s.SELECT:{e.openElements.hasInSelectScope(s.SELECT)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode());break}case s.TEMPLATE:{Wt(e,t);break}default:}}function rx(e,t){let n=t.tagID;n===s.CAPTION||n===s.TABLE||n===s.TBODY||n===s.TFOOT||n===s.THEAD||n===s.TR||n===s.TD||n===s.TH?(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e._processStartTag(t)):up(e,t)}function ox(e,t){let n=t.tagID;n===s.CAPTION||n===s.TABLE||n===s.TBODY||n===s.TFOOT||n===s.THEAD||n===s.TR||n===s.TD||n===s.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(s.SELECT),e._resetInsertionMode(),e.onEndTag(t)):dp(e,t)}function ax(e,t){switch(t.tagID){case s.BASE:case s.BASEFONT:case s.BGSOUND:case s.LINK:case s.META:case s.NOFRAMES:case s.SCRIPT:case s.STYLE:case s.TEMPLATE:case s.TITLE:{Je(e,t);break}case s.CAPTION:case s.COLGROUP:case s.TBODY:case s.TFOOT:case s.THEAD:{e.tmplInsertionModeStack[0]=g.IN_TABLE,e.insertionMode=g.IN_TABLE,dn(e,t);break}case s.COL:{e.tmplInsertionModeStack[0]=g.IN_COLUMN_GROUP,e.insertionMode=g.IN_COLUMN_GROUP,gc(e,t);break}case s.TR:{e.tmplInsertionModeStack[0]=g.IN_TABLE_BODY,e.insertionMode=g.IN_TABLE_BODY,Fo(e,t);break}case s.TD:case s.TH:{e.tmplInsertionModeStack[0]=g.IN_ROW,e.insertionMode=g.IN_ROW,Do(e,t);break}default:e.tmplInsertionModeStack[0]=g.IN_BODY,e.insertionMode=g.IN_BODY,ye(e,t)}}function ix(e,t){t.tagID===s.TEMPLATE&&Wt(e,t)}function mp(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(s.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):hc(e,t)}function sx(e,t){t.tagID===s.HTML?ye(e,t):No(e,t)}function pp(e,t){var n;if(t.tagID===s.HTML){if(e.fragmentContext||(e.insertionMode=g.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===s.HTML){e._setEndLocation(e.openElements.items[0],t);let r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else No(e,t)}function No(e,t){e.insertionMode=g.IN_BODY,Oo(e,t)}function cx(e,t){switch(t.tagID){case s.HTML:{ye(e,t);break}case s.FRAMESET:{e._insertElement(t,x.HTML);break}case s.FRAME:{e._appendElement(t,x.HTML),t.ackSelfClosing=!0;break}case s.NOFRAMES:{Je(e,t);break}default:}}function lx(e,t){t.tagID===s.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==s.FRAMESET&&(e.insertionMode=g.AFTER_FRAMESET))}function ux(e,t){switch(t.tagID){case s.HTML:{ye(e,t);break}case s.NOFRAMES:{Je(e,t);break}default:}}function dx(e,t){t.tagID===s.HTML&&(e.insertionMode=g.AFTER_AFTER_FRAMESET)}function mx(e,t){t.tagID===s.HTML?ye(e,t):wo(e,t)}function wo(e,t){e.insertionMode=g.IN_BODY,Oo(e,t)}function px(e,t){switch(t.tagID){case s.HTML:{ye(e,t);break}case s.NOFRAMES:{Je(e,t);break}default:}}function fx(e,t){t.chars=z,e._insertCharacters(t)}function hx(e,t){e._insertCharacters(t),e.framesetOk=!1}function fp(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==x.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function gx(e,t){if(Gm(t))fp(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===x.MATHML?lc(t):r===x.SVG&&(Km(t),uc(t)),ko(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Ax(e,t){if(t.tagID===s.P||t.tagID===s.BR){fp(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===x.HTML){e._endTagOutsideForeignContent(t);break}let a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}var xF=new Set([b.AREA,b.BASE,b.BASEFONT,b.BGSOUND,b.BR,b.COL,b.EMBED,b.FRAME,b.HR,b.IMG,b.INPUT,b.KEYGEN,b.LINK,b.META,b.PARAM,b.SOURCE,b.TRACK,b.WBR]);function hp(e,t,n){typeof e=="string"&&(n=t,t=e,e=null);let r=ir.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}function Ac(e){return e.trim().startsWith("#")}function yx(e){return[...e.matchAll(/url\(\s*(['"]?)(.*?)\1\s*\)/gi)].map(t=>t[2]??"")}function Ex(e){return yx(e).some(t=>!Ac(t))}var Sx=["abbr","address","article","aside","b","bdi","bdo","blockquote","br","button","caption","cite","code","col","colgroup","data","dd","del","dfn","div","dl","dt","em","figcaption","figure","footer","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","ins","kbd","label","li","main","mark","meter","nav","ol","p","pre","progress","q","rp","rt","ruby","s","samp","section","small","span","strong","style","sub","sup","table","tbody","td","tfoot","th","thead","time","tr","u","ul","var","wbr"],Tx=["svg","g","defs","symbol","use","title","desc","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","textpath","lineargradient","radialgradient","stop","clippath","mask","pattern","marker","filter","feblend","fecolormatrix","fecomponenttransfer","fecomposite","feconvolvematrix","fediffuselighting","fedisplacementmap","fedistantlight","fedropshadow","feflood","fefunca","fefuncb","fefuncg","fefuncr","fegaussianblur","femerge","femergenode","femorphology","feoffset","fepointlight","fespecularlighting","fespotlight","fetile","feturbulence"],xx=new Set([...Sx,...Tx]),Cx=new Set(["action","data","formaction","href","poster","src","srcset"]),Ix=new Set(["clip-path","cursor","fill","filter","marker","marker-end","marker-mid","marker-start","mask","stroke"]);function gp(e,t){let n;try{n=Am(e,{context:t})}catch(a){return`contains invalid CSS: ${String(a)}`}let r=null;return Cm(n,a=>{r||(a.type==="Url"&&!Ac(a.value)?r="contains a CSS url() asset reference":a.type==="Atrule"&&["import","font-face"].includes(a.name.toLowerCase())&&(r=`contains a forbidden CSS @${a.name} rule`))}),r}function Ap(e){if(e.nodeName==="#comment"||e.nodeName==="#text")return null;if("tagName"in e){let t=e.tagName.toLowerCase();if(!xx.has(t))return`contains <${e.tagName}>, which a card may not use`;for(let n of e.attrs){let r=n.name.toLowerCase();if(r.startsWith("on"))return`contains the event handler '${n.name}'`;if(Cx.has(r)&&!Ac(n.value))return`contains a ${n.name} reference outside the card`;if(r==="style"){let a=gp(n.value,"declarationList");if(a)return a}if(Ix.has(r)&&Ex(n.value))return`contains a ${n.name} url() reference outside the card`}if(t==="style"){let n=e.childNodes.filter(a=>a.nodeName==="#text").map(a=>a.value).join(""),r=gp(n,"stylesheet");if(r)return r}}if("childNodes"in e)for(let t of e.childNodes){let n=Ap(t);if(n)return n}return null}function _x(e){for(let t of hp(e).childNodes){let n=Ap(t);if(n)return n}return null}var mn=o.string().min(1).superRefine((e,t)=>{let n=_x(e);n&&t.addIssue({code:"custom",message:`Card HTML ${n}.`})});var yc=o.object({aspectRatio:o.enum(["16:9","9:16","1:1","4:5"]),fps:o.union([o.literal(24),o.literal(25),o.literal(30),o.literal(60)]).optional(),resolution:o.enum(["hd","fhd","4k"]).optional(),platform:o.string().optional()}),xp=o.object({start:o.number().nonnegative(),end:o.number().nonnegative()}),kx=o.object({start:o.number().nonnegative(),end:o.number().nonnegative(),reason:o.string().optional()}),wx=o.object({kind:o.literal("media"),mediaId:_e,trim:xp.optional(),excludedRanges:o.array(kx).optional(),volume:o.number().min(0).max(4).optional(),muted:o.boolean().optional(),playbackRate:o.number().positive().optional(),sync:o.enum(["video","independent"]).optional(),kenBurns:o.enum(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:o.number().optional(),fadeInMs:o.number().nonnegative().optional(),fadeOutMs:o.number().nonnegative().optional(),loop:o.boolean().optional(),audioRole:o.enum(["sfx","music","vo","ambience"]).optional(),duck:o.object({duckDb:o.number().max(0),attackMs:o.number().nonnegative(),releaseMs:o.number().nonnegative(),windows:o.array(o.object({startMs:o.number(),endMs:o.number()})).optional()}).optional(),anchor:o.object({clipId:o.string().min(1),offsetMs:o.number()}).optional(),reframe:Ya.optional()}),Rx=o.object({kind:o.literal("component"),componentId:o.string().min(1),props:o.record(o.string(),o.unknown()),assets:o.record(o.string().min(1),o.string().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:o.enum(["front","behind-subject"]).optional()}),Nx=o.object({kind:o.literal("overlay"),primitiveId:o.string().min(1),params:o.record(o.string(),o.unknown()),zPlane:o.enum(["front","behind-subject"]).optional(),anchor:o.object({space:o.literal("scene"),x:o.number().min(0).max(1),y:o.number().min(0).max(1)}).optional(),parallax:o.number().min(-.3).max(.3).optional()}),Ox=o.object({kind:o.literal("effect"),primitiveId:o.string().min(1),params:o.record(o.string(),o.unknown()).optional()}),vx=o.object({kind:o.literal("card"),html:mn,tokens:o.record(o.string(),o.string()).optional(),zPlane:o.literal("front").optional()}),Fx=o.object({kind:o.literal("composition"),compositionId:o.string().min(1),trim:xp.optional()}).strict(),Dx=o.discriminatedUnion("kind",[wx,Rx,Nx,Ox,vx,Fx]),Mx=o.object({type:o.string().min(1),duration:o.number().positive()}),Cp=-1,Ip=2,bp=e=>`position.${e} is a FRACTION of the frame (0.5 = centre, 0 to 1 inside it, ${Cp} to ${Ip} with entrance/exit overshoot) \u2014 px values are not accepted`,Mo=e=>o.number().min(Cp,bp(e)).max(Ip,bp(e)),Bx=o.object({x:Mo("x"),y:Mo("y")}).describe("Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."),Bo=o.object({x:o.number().min(0).max(1),y:o.number().min(0).max(1),w:o.number().positive().max(1),h:o.number().positive().max(1)}),_p=Bo.refine(e=>e.x+e.w<=1&&e.y+e.h<=1,"captions style.region must fit within the normalized frame"),Lx=o.enum(["cover","contain"]),Px=o.enum(["visible","hidden"]),Hx=o.object({primitiveId:o.string().min(1),params:o.record(o.string(),o.unknown()).optional()}),Ux=o.union([o.enum(["linear","ease","easeIn","easeOut","easeInOut"]),o.object({cubicBezier:o.tuple([o.number(),o.number(),o.number(),o.number()])}).strict()]),jx=o.object({time:o.number().nonnegative(),value:o.number(),easing:Ux.optional()}).strict(),Vx=o.array(jx).min(2),yp=["opacity","scale","rotation","position.x","position.y","volume"],Wx={opacity:o.number().min(0,"opacity is 0 to 1").max(1,"opacity is 0 to 1"),scale:o.number().positive("scale is a multiplier and must be > 0"),rotation:o.number(),"position.x":Mo("x"),"position.y":Mo("y"),volume:o.number().min(0,"volume is 0 to 4").max(4,"volume is 0 to 4")},$x=o.object({id:o.string().min(1),startTime:o.number().nonnegative(),duration:o.number().positive(),source:Dx,kind:o.enum(["video","audio","image","overlay","effect"]).optional(),opacity:o.number().min(0).max(1).optional(),scale:o.number().positive().optional(),rotation:o.number().optional(),position:Bx.optional(),region:Bo.optional(),fit:Lx.optional(),captionVisibility:Px.optional().describe("Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over."),effects:o.array(Hx).optional(),transitionIn:Mx.optional(),linkGroupId:o.string().min(1).optional(),animate:o.record(o.string(),Vx).superRefine((e,t)=>{for(let[n,r]of Object.entries(e)){if(!yp.includes(n)){t.addIssue({code:o.ZodIssueCode.custom,path:[n],message:`"${n}" is not an animatable param (${yp.join(", ")})`});continue}let a=Wx[n];r.forEach((i,c)=>{let u=a.safeParse(i.value);u.success||t.addIssue({code:o.ZodIssueCode.custom,path:[n,c,"value"],message:u.error.issues[0]?.message??`invalid ${n} keyframe value`})})}}).describe("Keyframe channels, clip-relative seconds. Each channel's values use the SAME unit as the scalar it animates: `opacity` 0 to 1, `scale` a multiplier (>0), `rotation` degrees, `position.x`/`position.y` a FRACTION of the frame like `position` (0.5 = centre; NOT pixels), `volume` 0 to 4.").optional()}).strict(),Yx=o.object({id:o.string().min(1),startTime:o.number().nonnegative(),duration:o.number().positive()}).strict(),Gx=o.unknown().transform((e,t)=>{let r=(!!e&&typeof e=="object"&&"source"in e?$x:Yx).safeParse(e);return r.success?r.data:(t.issues.push(...r.error.issues),o.NEVER)}),Kx=o.object({id:o.string().min(1),kind:o.enum(["video","audio","image","overlay","effect"]),name:o.string().optional(),enabled:o.boolean().optional(),volume:o.number().min(0).max(4).optional(),contents:o.array(Gx)}).strict(),Qx=o.object({id:o.string().min(1),startTime:o.number().nonnegative(),endTime:o.number().nonnegative().optional(),kind:o.string().min(1),name:o.string().optional(),metadata:o.record(o.string(),o.unknown()).optional()}).strict(),zx=o.object({public:o.boolean().optional(),readerOrgIds:o.array(o.string()).optional(),writerOrgIds:o.array(o.string()).optional()}),Jx=o.object({type:o.string().min(1),source:o.string().optional(),notes:o.string().optional()}),Xx=o.object({audioDescriptionTrackId:o.string().optional(),captionsTrackId:o.string().optional(),signLanguageTrackId:o.string().optional(),notes:o.string().optional()}),Zx=o.object({text:o.string().min(1),startMs:o.number().nonnegative().describe("Word start on the composition timeline, in milliseconds."),endMs:o.number().nonnegative().describe("Word end on the composition timeline, in milliseconds."),emphasis:o.boolean().optional(),annotate:o.enum(["circle","underline"]).optional()}),bc=o.object({fontFamily:o.string().min(1).optional(),fontSize:o.number().min(1,"captions style.fontSize is PERCENT of composition height (1-15, default 5) \u2014 px values are not accepted").max(15,"captions style.fontSize is PERCENT of composition height (1-15, default 5) \u2014 px values are not accepted").optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:o.number().int().min(100).max(900).optional(),color:o.string().min(1).optional(),highlightColor:o.string().min(1).optional(),backgroundColor:o.string().optional(),plate:o.enum(["glass","solid","none"]).optional(),position:o.enum(["top","center","bottom"]).optional(),region:_p.optional().describe("Optional caption layout box {x,y,w,h} in normalized output-frame coordinates. Overrides position; text starts at its top edge and wraps/pages within its width and height."),textTransform:o.enum(["none","uppercase","capitalize"]).optional(),letterSpacing:o.number().min(-5).max(20).optional().describe("Base caption glyph spacing in pixels."),wordGapEm:o.number().min(0).max(2).optional().describe("Gap between caption runs as a multiple of base font size; default 0.35."),lineGapEm:o.number().min(0).max(2).optional().describe("Gap between caption lines as a multiple of base font size; default 0.25."),emphasisColor:o.string().optional(),emphasisGradient:o.string().optional(),emphasisScale:o.number().positive().optional(),emphasisFontFamily:o.string().optional(),emphasisFontWeight:o.number().int().min(100).max(900).optional(),emphasisTextTransform:o.enum(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:o.number().optional(),emphasisFontStyle:o.enum(["normal","italic"]).optional(),entrance:o.enum(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:o.number().nonnegative().optional(),entranceStaggerMs:o.number().nonnegative().optional(),exitMs:o.number().nonnegative().optional(),emphasisPlate:o.boolean().optional(),emphasisPlateColor:o.string().optional(),emphasisPlateTextColor:o.string().optional(),emphasisPlateAltColor:o.string().optional(),emphasisPlateAltTextColor:o.string().optional(),emphasisPlateRadius:o.number().nonnegative().optional(),emphasisPlatePadX:o.number().optional(),emphasisPlatePadY:o.number().optional(),emphasisPlateReveal:o.boolean().optional().describe("Grow a shared emphasis plate as saved words appear while reserving its final layout width."),annotationColor:o.string().optional(),annotationStrokeWidth:o.number().min(.5).max(12).optional().describe("Annotation stroke width in its 100\xD7100 SVG coordinate system; default 4."),annotationTexture:o.enum(["clean","pencil"]).optional().describe("Native annotation stroke finish; default clean."),maxWidthPercent:o.number().positive().max(100,"captions style.maxWidthPercent is % of composition width (max 100)").optional()}),qx=bc.pick({fontFamily:!0,fontSize:!0,fontWeight:!0,color:!0,highlightColor:!0,backgroundColor:!0,plate:!0,textTransform:!0,letterSpacing:!0,wordGapEm:!0,lineGapEm:!0,emphasisColor:!0,emphasisScale:!0,emphasisFontFamily:!0,emphasisFontWeight:!0,emphasisTextTransform:!0,emphasisLetterSpacing:!0,emphasisFontStyle:!0,emphasisPlate:!0,emphasisPlateColor:!0,emphasisPlateTextColor:!0,emphasisPlateAltColor:!0,emphasisPlateAltTextColor:!0,emphasisPlateRadius:!0,emphasisPlatePadX:!0,emphasisPlatePadY:!0,emphasisPlateReveal:!0,annotationColor:!0,annotationStrokeWidth:!0,annotationTexture:!0,entrance:!0,entranceMs:!0,entranceStaggerMs:!0,exitMs:!0}).strict(),eC=o.object({segmentIndex:o.number().int().nonnegative(),wordStartIndex:o.number().int().nonnegative(),wordEndIndex:o.number().int().positive().describe("Exclusive word index in the saved caption segment."),region:_p,scale:o.number().min(.25).max(4).optional(),rotation:o.number().min(-45).max(45).optional(),style:qx.optional(),holdThroughWordIndex:o.number().int().nonnegative().optional().describe("Inclusive saved-word index in this segment. The layout stays visible until that word ends."),wordMarks:o.array(o.object({wordIndex:o.number().int().nonnegative(),emphasis:o.boolean().optional(),annotate:o.enum(["circle","underline"]).nullable().optional()}).strict()).optional()}).strict(),Ep=eC.extend({wordSignature:o.string().regex(/^[a-f0-9]{64}$/)});function tC(e){let t=JSON.stringify(e.map(n=>({text:n.text,startMs:n.startMs,endMs:n.endMs,emphasis:n.emphasis??null,annotate:n.annotate??null})));return $l(Yl(new TextEncoder().encode(t)))}function nC(e,t,n=!1){let r=[],a=new Set;return t.forEach((i,c)=>{let u=e[i.segmentIndex]?.words;if(!u){r.push({index:c,field:"segmentIndex",message:"caption layout segment does not exist"});return}if(i.wordStartIndex>=i.wordEndIndex||i.wordEndIndex>u.length){r.push({index:c,field:"wordEndIndex",message:"caption layout word range is outside its segment"});return}let f=i.holdThroughWordIndex??i.wordEndIndex-1;(f<i.wordEndIndex-1||f>=u.length)&&r.push({index:c,field:"holdThroughWordIndex",message:"caption layout hold must reference this or a later word in the same segment"});let l=new Set;for(let d of i.wordMarks??[])(d.wordIndex<i.wordStartIndex||d.wordIndex>=i.wordEndIndex||l.has(d.wordIndex))&&r.push({index:c,field:"wordMarks",message:"caption layout word marks must be unique words inside the layout range"}),l.add(d.wordIndex);for(let d=i.wordStartIndex;d<i.wordEndIndex;d++){let p=`${i.segmentIndex}:${d}`;a.has(p)&&r.push({index:c,field:"wordStartIndex",message:"caption layout word ranges must not overlap"}),a.add(p)}n&&"wordSignature"in i&&i.wordSignature!==tC(u)&&r.push({index:c,field:"wordSignature",message:"caption layout is stale for these saved transcript words; reapply setCaptionLayouts"})}),r}var Sp=o.object({words:o.array(Zx)}),Tp=o.enum(["front","behind-subject"]).optional(),rC=o.discriminatedUnion("source",[o.object({source:o.literal("derived"),from:o.object({clipId:o.string()}),segments:o.array(Sp),style:bc.optional(),layouts:o.array(Ep).optional(),zPlane:Tp}),o.object({source:o.literal("authored"),segments:o.array(Sp),style:bc.optional(),layouts:o.array(Ep).optional(),zPlane:Tp})]).superRefine((e,t)=>{if(e.style)for(let n of qt(e.style))t.addIssue({code:"custom",path:["style",n.field],message:n.message});for(let n of nC(e.segments,e.layouts??[],!0))t.addIssue({code:"custom",path:["layouts",n.index,n.field],message:n.message});for(let[n,r]of(e.layouts??[]).entries())for(let a of qt({...e.style,...r.style}))t.addIssue({code:"custom",path:["layouts",n,"style",a.field],message:a.message})});function oC(e){let t=[];return e.tracks.forEach((n,r)=>{n.contents.forEach((a,i)=>{!("source"in a)||a.captionVisibility===void 0||(n.kind!=="video"||a.source.kind!=="media")&&t.push({trackIndex:r,contentIndex:i})})}),t}var lr=o.object({v:o.literal(1,{error:e=>e.input===void 0?'Missing version envelope: add top-level "v": 1 to the composition.':`Invalid version envelope: top-level "v" must be the literal 1 (got ${JSON.stringify(e.input)}).`}),format:yc,tracks:o.array(Kx),markers:o.array(Qx).optional(),captions:rC.optional(),sourceSuggestionId:o.string().optional(),license:Jx.optional(),licenseVerification:o.enum(["attested","cueframe-verified","third-party-verified"]).optional(),accessibility:Xx.optional(),ownerOrgId:o.string().optional(),acl:zx.optional()}).strict().superRefine((e,t)=>{for(let n of oC(e))t.addIssue({code:"custom",path:["tracks",n.trackIndex,"contents",n.contentIndex,"captionVisibility"],message:"captionVisibility is supported only on video media clips"})}),aC=o.enum(["user","agent","import"]),KF=o.object({id:o.string().min(1),compositionId:_e,predecessorId:o.string().optional(),createdAt:o.number(),etag:o.string().min(1),authorKind:aC,authorId:o.string().optional(),composition:lr});var iC="gp-1",Lo=o.literal(iC),kp=Bo,$t=o.enum(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),Ec=o.object({headline:o.string().max(120).optional(),sub:o.string().max(200).optional(),value:o.string().max(40).optional(),label:o.string().max(80).optional(),items:o.array(o.string().max(80)).max(8).optional(),series:o.array(o.object({label:o.string().max(40),value:o.string().max(16)})).max(8).optional()}).strict(),sC=o.object({id:o.string().min(1),atSec:o.number().min(0),durSec:o.number().positive(),role:$t,copy:Ec,intent:o.string().min(1).max(400),priority:o.number().int().min(0).max(10).default(5)}).strict(),cC=o.object({version:Lo,beats:o.array(sC)}).strict(),lC=o.enum(["headline","value","label","sublabel","logo","accent-shape","backdrop"]),uC=o.enum(["heading","body","accent","surface","on-accent","on-surface"]),dC=o.enum(["front","behind-subject"]),mC=o.object({elId:o.string().min(1),role:lC,box:kp,styleRole:uC,z:dC.default("front"),text:o.string().max(200).optional(),typeScaleStep:o.number().int().min(0).max(8).optional()}).strict(),pn=1e-6,pC=(e,t)=>e.x<t.x+t.w-pn&&e.x+e.w>t.x+pn&&e.y<t.y+t.h-pn&&e.y+e.h>t.y+pn,fC=o.object({version:Lo,beatId:o.string().min(1),frame:o.object({w:o.number().positive(),h:o.number().positive()}).strict(),keepOut:o.array(kp),safe:o.object({titleSafe:o.number().min(0).max(1),actionSafe:o.number().min(0).max(1)}).strict(),elements:o.array(mC),dropped:o.object({reason:o.string().min(1)}).strict().optional()}).strict().superRefine((e,t)=>{for(let n of e.elements){if(n.z==="behind-subject")continue;let r=n.box;(r.x+r.w>1+pn||r.y+r.h>1+pn)&&t.addIssue({code:o.ZodIssueCode.custom,message:`element ${n.elId} box spills past the frame`,path:["elements"]});for(let a of e.keepOut)pC(r,a)&&t.addIssue({code:o.ZodIssueCode.custom,message:`element ${n.elId} overlaps a face keep-out (text on the speaker)`,path:["elements"]})}}),hC=o.enum(["reveal","fade","rise","count-up","wipe"]),gC=o.enum(["pulse","underline","color-shift"]),AC=o.enum(["fade","fall","wipe","cut"]),bC=o.enum(["spring","ease-out","ease-in-out","linear"]),yC=o.object({type:hC,atMs:o.number().min(0),durMs:o.number().positive(),ease:bC.default("spring"),stagger:o.number().min(0).optional()}).strict(),EC=o.object({type:gC,atMs:o.number().min(0),durMs:o.number().positive()}).strict(),SC=o.object({type:AC,atMs:o.number().min(0),durMs:o.number().positive()}).strict(),TC=o.object({elId:o.string().min(1),enter:yC,emphasis:EC.optional(),exit:SC.optional()}).strict(),xC=o.object({version:Lo,beatId:o.string().min(1),elements:o.array(TC)}).strict(),qF=o.object({version:Lo,content:cC,layouts:o.array(fC),motions:o.array(xC)}).strict();var CC=o.discriminatedUnion("kind",[o.object({kind:o.literal("face"),faceId:o.string().min(1)}),o.object({kind:o.literal("all-faces")}),o.object({kind:o.literal("frame-center")}),o.object({kind:o.literal("active-speaker")}),o.object({kind:o.literal("point"),x:o.number().min(0).max(1),y:o.number().min(0).max(1)})]),IC=o.object({startSec:o.number().nonnegative(),endSec:o.number().positive(),action:o.enum(["frame","keep","trim"]).describe("'frame' = SHOW this span cropped/tracked per `subject`. 'keep' = SHOW this span as-is, no reframe (footage with nothing to track). 'trim' = DELETE this span from the output entirely \u2014 trimmed footage never appears."),subject:CC.optional(),shotScale:o.enum(["close","standard","wide"]).optional(),zoomScale:o.number().min(.4).max(1).optional(),verticalBias:o.number().min(-.3).max(.3).optional(),lateralBias:o.number().min(-.3).max(.3).optional(),intent:o.string().optional()}).refine(e=>e.action!=="frame"||e.subject!==void 0,{message:"frame segment requires a subject \u2014 for footage with no trackable subject use action:'keep' (shown as-is); do NOT trim spans you want shown"}).refine(e=>e.action!=="keep"||e.subject===void 0,{message:"keep segment shows footage as-is \u2014 it takes no subject (use action:'frame' to track one)"}).refine(e=>e.shotScale===void 0||e.zoomScale===void 0,{message:"framing segment takes EITHER shotScale (editorial scale \u2014 the bake calibrates the zoom to the detected face) OR zoomScale (an explicit fraction of the frame), never both: shotScale wins and the zoomScale would be silently discarded",path:["zoomScale"]}),_C=o.object({startSec:o.number().nonnegative(),endSec:o.number().positive(),reason:o.string().min(1)}),kC=o.object({id:o.string().min(1),atSec:o.number().nonnegative(),durSec:o.number().positive(),kind:o.enum(["broll","audio","sfx","music","ambience","gif","image"]),source:o.enum(["find","generate"]),intent:o.string().min(1),resolvedMediaId:o.string().optional()}),wC=o.object({id:o.string().min(1),atSec:o.number().nonnegative(),durSec:o.number().positive(),role:$t,copy:Ec,intent:o.string().min(1)}),RC=o.object({startSec:o.number().nonnegative(),endSec:o.number().nonnegative().optional(),kind:o.string().min(1),name:o.string().optional()}),rD=o.object({framing:o.array(IC).min(1),cuts:o.array(_C).optional(),captions:o.object({styleIntent:o.string().optional()}).optional(),assets:o.array(kC).optional(),graphics:o.array(wC).optional(),markers:o.array(RC).optional()});var NC=o.union([o.enum(["linear","ease","ease-in","ease-out","ease-in-out"]),o.object({kind:o.literal("cubic-bezier"),x1:o.number().min(0).max(1),y1:o.number(),x2:o.number().min(0).max(1),y2:o.number()})]),at=o.string().min(1),Sc=o.union([o.object({kind:o.literal("system"),family:o.string().min(1),weight:o.number().int().min(1).max(1e3).optional(),style:o.enum(["normal","italic"]).optional()}),o.object({kind:o.literal("web"),family:o.string().min(1),url:o.string().url().optional(),weight:o.number().int().min(1).max(1e3).optional(),style:o.enum(["normal","italic"]).optional()}),o.object({kind:o.literal("uploaded"),fontId:_e,family:o.string().optional(),weight:o.number().int().min(1).max(1e3).optional(),style:o.enum(["normal","italic"]).optional()})]),OC=o.object({primary:o.string().min(1),secondary:o.string().optional(),accent:o.string().min(1),background:o.string().min(1),text:o.string().min(1),textMuted:o.string().optional(),border:o.string().optional(),surface:o.string().optional(),card:o.string().optional(),gridLine:o.string().optional(),accentMuted:o.string().optional(),textOnAccent:o.string().optional(),textOnSurface:o.string().optional()}),vC=o.object({heading:Sc,body:Sc.optional(),caption:Sc.optional()}),FC=o.object({base:o.number().positive().optional(),lg:o.number().positive().optional(),sm:o.number().positive().optional()}),DC=o.object({fontSizeHeading:o.number().positive().optional(),fontSizeBody:o.number().positive().optional(),fontSizeLabel:o.number().positive().optional(),borderRadius:o.number().nonnegative().optional()}),MC=o.object({duration:o.number().positive().optional(),easing:NC.optional(),entrance:o.enum(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:o.number().nonnegative().optional(),exitMs:o.number().nonnegative().optional()}),Rp=o.enum(["tl","tr","bl","br"]),BC=o.object({src:o.string().min(1),alt:o.string().optional(),placement:Rp.optional(),sizePct:o.number().positive().optional()}),wp=o.object({kind:o.enum(["card","video"]),src:o.string().min(1).optional(),title:o.string().optional(),subtitle:o.string().optional(),durationMs:o.number().positive().optional()}),LC=o.object({src:o.string().min(1),opacity:o.number().min(0).max(1).optional(),placement:Rp.optional()}),PC=o.discriminatedUnion("kind",[o.object({kind:o.literal("card"),html:mn,tokens:o.record(o.string(),o.string()).optional()}),o.object({kind:o.literal("overlay"),primitiveId:o.string().min(1),params:o.record(o.string(),o.unknown()).optional()}),o.object({kind:o.literal("component"),componentId:o.string().min(1),props:o.record(o.string(),o.unknown()).optional()})]),Tc=o.enum(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),HC=o.object({id:o.string().min(1).max(40),observed:o.string().min(1).max(500),body:PC,motion:o.object({preset:Tc,enterMs:o.number().int().min(0).max(5e3).optional(),exitMs:o.number().int().min(0).max(5e3).optional(),staggerMs:o.number().int().min(0).max(2e3).optional(),confidence:o.enum(["high","low"]).optional()}).optional(),role:$t,zone:o.object({x:o.number(),y:o.number(),w:o.number(),h:o.number()}).optional(),evidence:o.array(o.number().int().min(0)).max(24).optional(),diffScore:o.number().min(0).max(1).optional(),coverage:o.enum(["reproduced","approximated","skipped"]),skipReason:o.string().max(300).optional()}),UC=o.object({public:o.boolean().optional(),readerOrgIds:o.array(o.string()).optional(),writerOrgIds:o.array(o.string()).optional()}),jC=o.object({type:o.string().min(1),source:o.string().optional(),notes:o.string().optional()}),uD=o.object({id:o.string().min(1),name:o.string().min(1),colors:OC,fonts:vC,syncCaptions:o.boolean().optional(),spacing:FC.optional(),sizing:DC.optional(),motion:MC.optional(),captionProfile:o.object({color:o.string().optional(),highlightColor:o.string().optional(),emphasisColor:o.string().optional(),plate:o.enum(["glass","solid","none"]).optional(),entrance:o.enum(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:o.number().optional(),entranceStaggerMs:o.number().optional(),exitMs:o.number().optional(),fontFamily:o.string().optional(),fontWeight:o.number().int().min(100).max(900).multipleOf(100).optional(),emphasisFontFamily:o.string().optional(),emphasisScale:o.number().positive().optional(),emphasisFontWeight:o.number().int().min(100).max(900).optional(),emphasisFontStyle:o.enum(["normal","italic"]).optional(),emphasisTextTransform:o.enum(["none","uppercase"]).optional(),emphasisLetterSpacing:o.number().optional(),emphasisPlate:o.boolean().optional(),emphasisPlateColor:o.string().optional(),emphasisPlateTextColor:o.string().optional()}).optional(),exemplarKeys:o.array(o.string().min(1)).max(24).optional(),contactSheetKey:o.string().min(1).optional(),motifs:o.array(HC).max(24).optional(),styleRubric:o.string().max(4e3).optional(),density:o.object({graphicsPerMin:o.number().min(0).max(60),maxSimultaneous:o.number().int().min(1).max(6)}).optional(),inspiration:o.object({sources:o.array(o.string()).min(1).max(24),extractedAt:o.number(),extractionVersion:o.string().min(1).max(60)}).optional(),logo:BC.optional(),intro:wp.optional(),outro:wp.optional(),watermark:LC.optional(),audio:o.object({sfxIntensity:o.enum(["off","light","standard","dense"]).optional(),musicEnabled:o.boolean().optional(),musicMood:o.string().max(300).optional(),sonicLogo:o.object({ref:at,placement:o.enum(["intro","outro","both"]),offsetMs:o.number().int().min(0).max(1e4).optional()}).optional(),uiSoundSet:o.object({tick:at.optional(),pop:at.optional(),impact:at.optional(),confirm:at.optional(),error:at.optional(),whoosh:at.optional(),riser:at.optional()}).optional(),bedStyle:o.object({bedId:at.optional(),genre:o.string().max(120).optional(),bpmRange:o.object({min:o.number(),max:o.number()}).optional()}).optional(),ambiencePreference:o.object({ref:at}).nullable().optional()}).optional(),license:jC.optional(),licenseVerification:o.enum(["attested","cueframe-verified","third-party-verified"]).optional(),ownerOrgId:o.string().optional(),acl:UC.optional()}).superRefine((e,t)=>{for(let n of ed(e))t.addIssue({code:"custom",path:n.path.split("."),message:n.message})});var hD=o.object({id:_e,name:o.string().min(1),defaultFormat:yc.optional(),palConformDefault:o.union([o.literal(24),o.literal(30)]).optional(),activeCompositionId:_e.nullable().optional(),brandKitId:o.string().optional(),ownerOrgId:o.string().optional(),createdAt:o.number(),updatedAt:o.number()});var VC=o.enum(["main","wide","facecam","screen","audio"]),WC=o.object({mediaId:_e,role:VC,label:o.string().optional()}),$C=o.object({videoRole:o.enum(["main","wide","facecam","screen"]),audioRole:o.literal("audio")}),yD=o.object({id:_e,name:o.string().min(1),members:o.array(WC).nonempty(),mux:o.array($C).optional(),ownerOrgId:o.string().optional(),createdAt:o.number(),updatedAt:o.number()});var xD=o.enum(["render.completed","media.transcribed","media.completed","composition.updated"]),YC=o.enum(["pending","delivering","delivered","failed","exhausted"]),CD=o.object({id:_e,url:o.string().url(),events:o.array(o.string().min(1)).nonempty(),signingKeyId:o.string().optional(),headers:o.record(o.string(),o.string()).optional(),enabled:o.boolean().optional(),ownerOrgId:o.string().optional(),createdAt:o.number(),updatedAt:o.number()}),ID=o.object({id:o.string().min(1),webhookId:_e,event:o.string().min(1),payload:o.record(o.string(),o.unknown()),status:YC,attemptCount:o.number().int().nonnegative(),responseStatus:o.number().int().optional(),responseBody:o.string().optional(),error:o.string().optional(),createdAt:o.number(),deliveredAt:o.number().optional()});var Np=o.object({fontFamily:o.string().min(1,"fontFamily: non-empty string"),fontWeight:o.number()}),GC=o.discriminatedUnion("kind",[o.object({kind:o.literal("card"),html:mn,tokens:o.record(o.string(),o.string()).optional()}),o.object({kind:o.literal("overlay"),primitiveId:o.string().min(1),params:o.record(o.string(),o.unknown()).optional()}),o.object({kind:o.literal("component"),componentId:o.string().min(1),props:o.record(o.string(),o.unknown()).optional()})]),KC=o.object({id:o.string().min(1).max(40),observed:o.string().min(1).max(500),body:GC,motion:o.object({preset:Tc,enterMs:o.number().int().min(0).max(5e3).optional(),exitMs:o.number().int().min(0).max(5e3).optional(),staggerMs:o.number().int().min(0).max(2e3).optional(),confidence:o.enum(["high","low"]).optional()}).optional(),role:o.enum($t.options),zone:o.object({x:o.number(),y:o.number(),w:o.number(),h:o.number()}).optional(),evidence:o.array(o.number().int().min(0)).max(24).optional(),diffScore:o.number().min(0).max(1).optional(),coverage:o.enum(["reproduced","approximated","skipped"]),skipReason:o.string().max(300).optional()}),it=o.string().min(1),QC=o.object({sfxIntensity:o.enum(["off","light","standard","dense"]).optional(),musicEnabled:o.boolean().optional(),musicMood:o.string().max(300).optional(),sonicLogo:o.object({ref:it,placement:o.enum(["intro","outro","both"]),offsetMs:o.number().int().min(0).max(1e4).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:o.object({tick:it.optional(),pop:it.optional(),impact:it.optional(),confirm:it.optional(),error:it.optional(),whoosh:it.optional(),riser:it.optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:o.object({bedId:it.optional(),genre:o.string().max(120).optional(),bpmRange:o.object({min:o.number(),max:o.number()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:o.object({ref:it}).nullable().optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}),Op=e=>o.object({kind:o.enum(["card","video"]),src:o.string().min(1,`${e}.src: non-empty string`).optional(),title:o.string().optional(),subtitle:o.string().optional(),durationMs:o.number().optional()}),zC={kitId:o.string().min(1,"kitId: non-empty string required").max(200,"kitId: exceeds max length of 200").refine(e=>e.trim().length>0,"kitId: non-empty string required"),name:o.string().min(1,"name: non-empty string required").max(200,"name: exceeds max length of 200").refine(e=>e.trim().length>0,"name: non-empty string required"),description:o.string().max(2e3).optional(),tagline:o.string().max(500).optional(),secondaryTagline:o.string().max(500).optional(),colors:o.object({primary:o.string().min(1,"colors.primary: non-empty string"),secondary:o.string().min(1,"colors.secondary: non-empty string"),accent:o.string().min(1,"colors.accent: non-empty string"),background:o.string().min(1,"colors.background: non-empty string"),text:o.string().min(1,"colors.text: non-empty string")}),extraColors:o.array(o.object({hex:o.string().min(1,"extraColors[].hex: non-empty string"),label:o.string().min(1,"extraColors[].label: non-empty string"),usage:o.string().optional()})).optional(),headingFont:Np,bodyFont:Np,voiceGuidelines:o.string().max(5e3).optional(),syncCaptions:o.boolean().optional(),captionProfile:o.object({fontFamily:o.string().optional(),fontSize:o.number().optional(),fontWeight:o.number().optional(),color:o.string().optional(),highlightColor:o.string().optional(),backgroundColor:o.string().optional(),plate:o.enum(["glass","solid","none"]).optional(),position:o.enum(["top","center","bottom"]).optional(),textTransform:o.enum(["none","uppercase"]).optional(),entrance:o.enum(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:o.number().optional(),entranceStaggerMs:o.number().optional(),exitMs:o.number().optional(),emphasisColor:o.string().optional(),emphasisScale:o.number().optional(),emphasisFontFamily:o.string().optional(),emphasisFontWeight:o.number().optional(),emphasisFontStyle:o.enum(["normal","italic"]).optional(),emphasisTextTransform:o.enum(["none","uppercase"]).optional(),emphasisLetterSpacing:o.number().optional(),emphasisPlate:o.boolean().optional(),emphasisPlateColor:o.string().optional(),emphasisPlateTextColor:o.string().optional()}).optional(),motion:o.object({duration:o.number().optional(),easing:o.union([o.enum(["linear","ease","ease-in","ease-out","ease-in-out"]),o.object({kind:o.literal("cubic-bezier"),x1:o.number(),y1:o.number(),x2:o.number(),y2:o.number()})]).optional(),entrance:o.enum(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:o.number().optional(),exitMs:o.number().optional()}).optional(),logo:o.object({src:o.string().min(1,"logo.src: non-empty string"),alt:o.string().optional(),placement:o.enum(["tl","tr","bl","br"]).optional(),sizePct:o.number().optional()}).optional(),intro:Op("intro").optional(),outro:Op("outro").optional(),watermark:o.object({src:o.string().min(1,"watermark.src: non-empty string"),opacity:o.number().min(0).max(1).optional(),placement:o.enum(["tl","tr","bl","br"]).optional()}).optional(),spacing:o.object({base:o.number().optional(),lg:o.number().optional(),sm:o.number().optional()}).optional(),sizing:o.object({fontSizeHeading:o.number().optional(),fontSizeBody:o.number().optional(),fontSizeLabel:o.number().optional(),borderRadius:o.number().optional()}).optional(),audio:QC.optional(),motifs:o.array(KC).max(24).optional(),styleRubric:o.string().max(4e3).optional(),density:o.object({graphicsPerMin:o.number().min(0).max(60),maxSimultaneous:o.number().int().min(1).max(6)}).optional(),inspiration:o.object({sources:o.array(o.string()).min(1).max(24),extractedAt:o.number(),extractionVersion:o.string().min(1).max(60)}).optional()},vp=o.strictObject(zC);var JC=1048576,XC=/^[a-f0-9]{12}$/,ZC=o.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/),qC=o.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/,"slug must be kebab-case").max(80),eI=o.object({url:o.string().url(),sha256:o.string().regex(/^[a-f0-9]{64}$/),mimeType:o.literal("video/mp4"),bakeVersion:o.string().min(1),presenceFraction:o.number().min(0).max(1).optional()}).strict(),Yt={name:ZC,required:o.boolean(),label:o.string().max(120).optional()},tI=o.discriminatedUnion("type",[o.object({...Yt,type:o.literal("string"),default:o.string().optional(),maxLength:o.number().int().positive().optional()}).strict(),o.object({...Yt,type:o.literal("number"),default:o.number().optional(),min:o.number().optional(),max:o.number().optional()}).strict(),o.object({...Yt,type:o.literal("color"),default:o.string().optional()}).strict(),o.object({...Yt,type:o.literal("url"),default:o.string().optional()}).strict(),o.object({...Yt,type:o.literal("enum"),options:o.array(o.string().min(1)).min(1),default:o.string().optional()}).strict().superRefine((e,t)=>{e.default!==void 0&&!e.options.includes(e.default)&&t.addIssue({code:"custom",path:["default"],message:`${e.name}: enum default must be one of options`})}),o.object({...Yt,type:o.literal("boolean"),default:o.boolean().optional()}).strict(),o.object({...Yt,type:o.literal("media"),kind:o.enum(["video","image","audio"]),default:o.string().optional(),prepared:o.object({mattes:o.record(o.string().regex(XC,"mattes keys are 12 lowercase hex chars"),eI).optional()}).strict().optional(),sample:o.object({url:o.string().url().startsWith("https://"),sha256:o.string().regex(/^[a-f0-9]{64}$/,"sample sha256 is 64 hex chars"),mimeType:o.string().min(1),durationSec:o.number().positive().optional()}).strict().optional()}).strict()]),nI=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function fn(e,t){switch(e.type){case"string":return typeof t!="string"?{ok:!1,reason:"expected a string"}:e.maxLength!==void 0&&t.length>e.maxLength?{ok:!1,reason:`longer than ${e.maxLength}`}:{ok:!0,value:t};case"number":{let n=typeof t=="string"&&t.trim()!==""?Number(t):t;return typeof n!="number"||Number.isNaN(n)?{ok:!1,reason:"expected a number"}:e.min!==void 0&&n<e.min?{ok:!1,reason:`below ${e.min}`}:e.max!==void 0&&n>e.max?{ok:!1,reason:`above ${e.max}`}:{ok:!0,value:n}}case"color":return typeof t=="string"&&/^#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/.test(t)?{ok:!0,value:t}:{ok:!1,reason:"expected #rrggbb"};case"url":{try{let{protocol:n}=new URL(String(t));if(n==="https:"||n==="http:")return{ok:!0,value:String(t)}}catch{}return{ok:!1,reason:"expected an http(s) URL"}}case"enum":return typeof t=="string"&&e.options.includes(t)?{ok:!0,value:t}:{ok:!1,reason:`expected one of ${e.options.join(", ")}`};case"boolean":return typeof t=="boolean"?{ok:!0,value:t}:t==="true"||t==="false"?{ok:!0,value:t==="true"}:{ok:!1,reason:"expected true or false"};case"media":return typeof t=="string"&&t.length>0?{ok:!0,value:t}:{ok:!1,reason:"expected a media id"}}}var Fp=vp.superRefine((e,t)=>{let n={logo:e.logo?.src,watermark:e.watermark?.src,intro:e.intro?.src,outro:e.outro?.src};for(let[r,a]of Object.entries(n))a!==void 0&&!a.startsWith("https://")&&t.addIssue({code:"custom",path:[r,"src"],message:`${r}.src must be an https URL; a template kit never names a storage key`})}),rI=o.object({label:o.string().min(1).max(120),values:o.record(o.string(),o.unknown()),brandKit:Fp.optional(),gallery:o.object({poster:o.string().url().optional(),render:o.string().url().optional(),description:o.string().max(2e3).optional()}).strict().optional()}).strict(),oI=o.object({source:Pr,name:o.string().min(1).max(120),description:o.string().min(1).max(2e3),category:o.enum(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),propSchema:o.record(o.string(),o.unknown())}).strict(),aI=o.object({v:o.literal(1),slug:qC,name:o.string().min(1).max(120),description:o.string().max(2e3).optional(),composition:lr,parameters:o.array(tI).superRefine((e,t)=>{let n=new Set;e.forEach((r,a)=>{let i=c=>t.addIssue({code:"custom",path:[a],message:`${r.name}: ${c}`});if(n.has(r.name)&&i("duplicate parameter"),n.add(r.name),r.type==="number"&&r.min!==void 0&&r.max!==void 0&&r.min>r.max&&i("min is above max"),r.type==="enum")for(let c of new Set(r.options.filter((u,f)=>r.options.indexOf(u)!==f)))i(`duplicate option ${c}`);if(r.default!==void 0&&r.type!=="media"&&r.type!=="enum"){let c=fn(r,r.default);c.ok||i(`default ${c.reason}`)}})}),components:o.record(o.string(),oI),brandKit:Fp.optional(),rubric:o.string().optional(),provenance:o.object({label:o.string(),href:o.string().url().optional(),notes:o.string().optional()}).strict().optional(),gallery:o.object({status:o.enum(["published","draft"]),category:o.string().optional(),format:o.string().optional(),duration:o.string().optional(),render:o.string().url().optional(),poster:o.string().url().optional(),prompt:o.string().optional(),details:o.array(o.string()).optional(),transcriptExcerpt:o.string().nullable().optional(),loop:o.boolean().optional()}).strict().optional(),presets:o.record(o.string().regex(nI,"preset names are kebab-case"),rI).optional()}).strict().superRefine((e,t)=>{let n=new Map(e.parameters.map(r=>[r.name,r]));for(let[r,a]of Object.entries(e.presets??{}))for(let[i,c]of Object.entries(a.values)){let u=n.get(i);if(!u){t.addIssue({code:"custom",path:["presets",r,"values",i],message:`preset ${r} names undeclared parameter ${i}`});continue}if(u.type==="media"){t.addIssue({code:"custom",path:["presets",r,"values",i],message:`preset ${r}: ${i} is a media parameter; presets never carry media`});continue}let f=fn(u,c);f.ok||t.addIssue({code:"custom",path:["presets",r,"values",i],message:`preset ${r}: ${i} ${f.reason}`})}}),we=class extends Error{constructor(n,r,a=[]){super(r);this.code=n;this.fields=a}code;fields};function iI(e){if(e===null||typeof e!="object"||Array.isArray(e))return e;let t=e,n=t,r=Qr(t.composition).value;r!==t.composition&&(n={...n,composition:r});let a=$a(t.brandKit).value;a!==t.brandKit&&(n={...n,brandKit:a});let i=t.presets;if(i!==null&&typeof i=="object"&&!Array.isArray(i)){let c=!1,u=Object.fromEntries(Object.entries(i).map(([f,l])=>{if(l===null||typeof l!="object"||Array.isArray(l))return[f,l];let d=$a(l.brandKit).value;return d===l.brandKit?[f,l]:(c=!0,[f,{...l,brandKit:d}])}));c&&(n={...n,presets:u})}return n}function Po(e){let t=new TextEncoder().encode(JSON.stringify(e)).byteLength;if(t>JC)throw new we("payload_too_large",`template document exceeds 1 MiB (${t} bytes)`);let n=aI.safeParse(iI(e));if(!n.success)throw new we("template_values_invalid",n.error.issues.map(r=>`${r.path.join(".")}: ${r.message}`).join("; "));return n.data}function ur(e){return dr.parse(e)}function xc(e,t){for(let n of e)t(n),n.kind==="group"&&xc(n.children,t)}function hn(e){let t=[];return xc(e.layers,n=>{if(!(!("surfaces"in n)||n.surfaces===void 0))for(let r of Object.values(n.surfaces))r.source==="image"&&!t.includes(r.assetSlot)&&t.push(r.assetSlot)}),t}function Cc(e){let t=[];return xc(e.layers,n=>{if(!(!("surfaces"in n)||n.surfaces===void 0))for(let r of Object.values(n.surfaces))r.source==="video"&&!t.includes(r.mediaId)&&t.push(r.mediaId)}),t}var wc=2,Dp=32,Mp=4,sI=256,Bp=2048,Lp=32,Rc=Math.PI/10,Nc=4*Math.PI/9,cI=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,Hp=/^[A-Za-z_][A-Za-z0-9_-]*$/,Up=["background","surface","text","textMuted","accent","accentStrong","accentSoft","success","warning","danger"],jp=["heading","body","caption"],Vp=Up.map(e=>`$brand:colors.${e}`),Wp=jp.map(e=>`$brand:fonts.${e}`),lI=o.string().regex(/^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,"Expected #rrggbb or #rrggbbaa."),uI=o.enum(Vp),bn=o.union([lI,uI]),dI=o.enum(Wp),mI=/^[A-Za-z0-9][A-Za-z0-9 _.\-]*$/,pI=o.string().min(1).max(128).regex(mI),fI=o.union([pI,dI]),Tt=o.string().min(1).max(64).regex(cI),hI=o.string().min(1).max(64).regex(Hp,'Expected a slot name: a letter or underscore followed by letters, digits, "_" or "-".').describe("Image asset slot name bound by the clip assets map; never a URL."),ae=o.number().min(0).max(1),gn=o.tuple([o.number(),o.number(),o.number()]),Ic=o.lazy(()=>o.union([o.null(),o.boolean(),o.number(),o.string(),o.array(Ic),o.record(o.string(),Ic)])),gI=o.object({width:o.number().int().min(16).max(8192),height:o.number().int().min(16).max(8192)}).strict(),AI=o.object({position:gn.optional(),rotation:gn.optional(),fov:o.number().min(Rc).max(Nc).optional()}).strict(),zD=o.object({position:gn,rotation:gn,fov:o.number().min(Rc).max(Nc)}).strict(),yn=o.object({position:gn.default([0,0,0]),rotation:gn.default([0,0,0]),scale:o.number().positive().default(1)}).strict().default({position:[0,0,0],rotation:[0,0,0],scale:1}),bI=o.object({at:ae,color:bn}).strict(),Pp=o.array(bI).min(2).max(8).superRefine((e,t)=>{for(let n=1;n<e.length;n+=1)e[n].at<=e[n-1].at&&t.addIssue({code:"custom",path:[n,"at"],message:"Gradient stops must be strictly increasing."})}),yI=o.discriminatedUnion("kind",[o.object({kind:o.literal("transparent")}).strict(),o.object({kind:o.literal("solid"),color:bn}).strict(),o.object({kind:o.literal("linear"),angle:o.number().default(0),stops:Pp}).strict(),o.object({kind:o.literal("radial"),at:o.tuple([ae,ae]).default([.5,.5]),stops:Pp}).strict()]),EI=o.object({source:o.literal("image"),assetSlot:hI}).strict(),SI=o.object({source:o.literal("color"),color:bn}).strict(),TI=o.object({source:o.literal("component"),component:o.object({version:o.literal(1),componentId:o.string().min(1).max(256),sourceVersionId:o.string().regex(/^[a-f0-9]{64}$/)}).strict(),captureFrame:o.number().int().min(0),layout:o.object({width:o.number().int().positive(),height:o.number().int().positive()}).strict(),bakeScale:o.union([o.literal(2),o.literal(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:o.record(o.string(),Ic).optional()}).strict(),xI=o.object({source:o.literal("video"),mediaId:o.string().min(1).max(256),startFrame:o.number().int().min(0).default(0),endFrame:o.number().int().positive().optional()}).strict().superRefine((e,t)=>{e.endFrame!==void 0&&e.endFrame<=e.startFrame&&t.addIssue({code:"custom",path:["endFrame"],message:"endFrame must be greater than startFrame (the exclusive source-frame trim)."})}),Oc=o.discriminatedUnion("source",[EI,SI,TI,xI]),CI=["roughness","metalness","clearcoat","clearcoatRoughness","anisotropy","anisotropyRotation","ior","reflectivity"],II=o.object({role:o.string().min(1).max(64),type:o.enum(["physical","unlit"]),color:bn.optional(),roughness:ae.optional(),metalness:ae.optional(),clearcoat:ae.optional(),clearcoatRoughness:ae.optional(),anisotropy:ae.optional(),anisotropyRotation:o.number().optional(),ior:o.number().min(1).max(2.333).optional(),reflectivity:ae.optional()}).strict().superRefine((e,t)=>{if(e.type==="unlit")for(let n of CI)e[n]!==void 0&&t.addIssue({code:"custom",path:[n],message:`${n} is physical-only and cannot be set on an unlit material.`})}),Ho=o.array(II).max(16).optional(),vc=o.record(o.string(),Oc).optional(),_I=o.object({text:o.string().min(1).max(512).regex(/^[^\r\n]+$/,"A run may not contain a line break."),color:bn.optional(),emphasis:o.boolean().optional()}).strict(),kI=o.object({runs:o.array(_I).min(1).max(16)}).strict(),$p={id:Tt,kind:o.literal("text"),opacity:ae.default(1),lines:o.array(kI).min(1).max(24),fontFamily:fI,fontWeight:o.number().int().min(100).max(900),fontStyle:o.enum(["normal","italic"]),fontSize:o.number().min(8).max(800),lineHeight:o.number().min(.6).max(3).default(1.2),letterSpacing:o.number().min(-20).max(40).default(0),align:o.enum(["left","center","right"]).default("center"),maxWidth:o.number().positive().optional(),color:bn},wI=o.lazy(()=>o.object({kind:o.literal("group"),id:Tt,transform:yn,opacity:ae.default(1),children:o.array(Yp).min(1).max(16)}).strict()),RI=o.object({kind:o.literal("laptop"),id:Tt,transform:yn,opacity:ae.default(1),width:o.number().min(200).max(4e3),openAngle:o.number().min(0).max(Math.PI),materials:Ho,surfaces:vc}).strict(),NI=o.object({kind:o.literal("phone"),id:Tt,transform:yn,opacity:ae.default(1),width:o.number().min(80).max(2e3),materials:Ho,surfaces:vc}).strict(),OI=o.object({kind:o.literal("slab"),id:Tt,transform:yn,opacity:ae.default(1),width:o.number().min(40).max(8e3),height:o.number().min(40).max(8e3),thickness:o.number().min(4).max(200).default(32),cornerRadius:o.number().min(0).default(32),edgeRadius:o.number().min(0).default(15),finish:o.enum(["satin","brushed"]).default("satin"),materials:Ho,surfaces:vc}).strict().superRefine((e,t)=>{e.cornerRadius>Math.min(e.width,e.height)/2&&t.addIssue({code:"custom",path:["cornerRadius"],message:"cornerRadius cannot exceed half the shorter face side."}),e.edgeRadius>e.thickness/2&&t.addIssue({code:"custom",path:["edgeRadius"],message:"edgeRadius cannot exceed thickness/2."})}),vI=o.object({kind:o.literal("page"),id:Tt,transform:yn,opacity:ae.default(1),width:o.number().min(40).max(8e3),height:o.number().min(40).max(8e3),fit:o.enum(["contain","cover"]).default("contain"),transparency:o.enum(["straight","premultiplied","opaque"]).default("straight"),depthWrite:o.boolean().default(!0),backface:o.enum(["hidden","visible"]).default("hidden"),materials:Ho,surfaces:o.record(o.string(),Oc)}).strict(),FI=o.object({...$p,space:o.literal("world"),transform:yn}).strict(),DI=o.object({...$p,space:o.literal("screen"),x:o.number(),y:o.number(),rotation:o.number().default(0),scale:o.number().positive().default(1)}).strict(),Yp=o.lazy(()=>o.union([wI,RI,NI,OI,vI,FI,DI])),MI=o.discriminatedUnion("kind",[o.object({kind:o.literal("linear")}).strict(),o.object({kind:o.literal("hold")}).strict(),o.object({kind:o.literal("bezier"),x1:ae,y1:o.number().min(-4).max(5),x2:ae,y2:o.number().min(-4).max(5)}).strict()]),BI=o.object({at:ae,value:o.number(),easing:MI.optional()}).strict(),LI=o.array(BI).min(1).max(sI).superRefine((e,t)=>{e[0]?.easing!==void 0&&t.addIssue({code:"custom",path:[0,"easing"],message:"The first keyframe has no arriving segment; easing is not authorable here."});for(let n=1;n<e.length;n+=1)e[n].at<=e[n-1].at&&t.addIssue({code:"custom",path:[n,"at"],message:"Keyframe times must be strictly increasing."})}),Gp=["positionX","positionY","positionZ","rotationX","rotationY","rotationZ","fov"],Fc=["positionX","positionY","positionZ","rotationX","rotationY","rotationZ","scale","opacity"],Kp=[...Fc,"openAngle"],Qp=["x","y","rotation","scale","opacity"],zp=["intensity"],Jp=["distance","range","maxBlur"],PI=[...new Set([...Gp,...Fc,...Kp,...Qp,...zp,...Jp])],HI=o.discriminatedUnion("kind",[o.object({kind:o.literal("camera")}).strict(),o.object({kind:o.literal("layer"),layerId:Tt}).strict(),o.object({kind:o.literal("environment")}).strict(),o.object({kind:o.literal("focus")}).strict()]),UI=o.object({target:HI,property:o.enum(PI),keyframes:LI}).strict(),jI=o.object({distance:o.number().positive(),range:o.number().positive(),maxBlur:o.number().min(0).max(64)}).strict(),VI=o.object({grain:o.number().min(0).max(.5).default(0),vignette:ae.default(0),focus:jI.nullable().default(null)}).strict().default({grain:0,vignette:0,focus:null}),WI=o.object({kind:o.literal("studio").optional(),lightingProfile:o.enum(["studio","studio-edge"]).default("studio"),preset:o.enum(["soft","key","rim"]).default("soft"),intensity:o.number().min(0).default(1),floorY:o.number().default(-420),shadowOpacity:ae.default(.5)}).strict(),$I=o.object({kind:o.literal("photographic-studio-v1")}).strict(),YI=o.union([WI,$I]),GI=o.object({kind:o.literal("minSeparation"),objects:o.array(Tt).min(2),gap:o.number().positive()}).strict();function Xp(e,t=["layers"],n=0,r=[]){return e.forEach((a,i)=>{let c=[...t,i],u=a.kind==="group"?n+1:n;r.push({node:a,path:c,groupDepth:u}),a.kind==="group"&&Xp(a.children,[...c,"children"],u,r)}),r}var KI=Object.freeze({laptop:["screen"],phone:["screen"],slab:["front"],page:["content"]}),QI=Object.freeze({laptop:["base","lid","keyboard","trackpad","bezel","screen","glass"],phone:["shell","screen","glass"],slab:["body","face"],page:["base"]});function zI(e){return e.kind==="text"&&e.space==="screen"?Qp:e.kind==="laptop"?Kp:Fc}function JI(e,t){return e==="camera"&&t==="fov"?{min:Rc,max:Nc}:e==="layer"&&t==="scale"?{exclusiveMin:0}:e==="layer"&&t==="opacity"?{min:0,max:1}:e==="layer"&&t==="openAngle"?{min:0,max:Math.PI}:e==="environment"&&t==="intensity"?{min:0}:e==="focus"&&t==="maxBlur"?{min:0,max:64}:e==="focus"?{exclusiveMin:0}:{}}function XI(e,t){return e.min!==void 0&&t<e.min||e.exclusiveMin!==void 0&&t<=e.exclusiveMin||e.max!==void 0&&t>e.max}var ZI=o.object({version:o.literal(wc),referenceSize:gI,camera:AI.optional(),environment:YI.default({lightingProfile:"studio",preset:"soft",intensity:1,floorY:-420,shadowOpacity:.5}),backdrop:yI.default({kind:"transparent"}),layers:o.array(Yp).min(1),animation:o.array(UI).default([]),post:VI,constraints:o.array(GI).default([])}).strict().transform(e=>{let t=e.camera?.fov??40*Math.PI/180;return{...e,camera:{position:e.camera?.position??[0,0,e.referenceSize.height/(2*Math.tan(t/2))],rotation:e.camera?.rotation??[0,0,0],fov:t}}}),Zp=ZI.superRefine((e,t)=>{let n=Xp(e.layers);n.length>Dp&&t.addIssue({code:"custom",path:["layers"],message:`The flattened scene has ${n.length} layers; the limit is ${Dp}.`});let r=new Map,a=0;for(let u of n){let{node:f,path:l,groupDepth:d}=u;if(d>Mp&&t.addIssue({code:"custom",path:l,message:`Group depth ${d} exceeds the limit ${Mp}.`}),r.has(f.id)?t.addIssue({code:"custom",path:[...l,"id"],message:`Duplicate layer id "${f.id}".`}):r.set(f.id,f),"surfaces"in f&&f.surfaces!==void 0){let p=f.kind,A=KI[p]??[];for(let E of Object.keys(f.surfaces))a+=1,A.includes(E)||t.addIssue({code:"custom",path:[...l,"surfaces",E],message:`Unknown ${f.kind} surface slot "${E}"; legal slots: ${A.join(", ")||"(none)"}.`});f.kind==="page"&&f.surfaces.content===void 0&&t.addIssue({code:"custom",path:[...l,"surfaces","content"],message:"A page requires its content surface."})}if("materials"in f&&f.materials!==void 0){let p=f.kind,A=QI[p]??[],E=new Set;f.materials.forEach((N,C)=>{A.includes(N.role)||t.addIssue({code:"custom",path:[...l,"materials",C,"role"],message:`Unknown ${f.kind} material role "${N.role}"; legal roles: ${A.join(", ")}.`}),E.has(N.role)&&t.addIssue({code:"custom",path:[...l,"materials",C,"role"],message:`Duplicate material override for role "${N.role}".`}),E.add(N.role)})}}a>Lp&&t.addIssue({code:"custom",path:["layers"],message:`The flattened scene binds ${a} surfaces; the limit is ${Lp}.`});let i=new Set,c=0;e.animation.forEach((u,f)=>{c+=u.keyframes.length;let l,d;u.target.kind==="camera"?l=Gp:u.target.kind==="environment"?l=e.environment.kind==="photographic-studio-v1"?[]:zp:u.target.kind==="focus"?(l=Jp,e.post.focus===null&&t.addIssue({code:"custom",path:["animation",f,"target"],message:"A focus channel requires post.focus."})):(d=r.get(u.target.layerId),l=d===void 0?[]:zI(d),d===void 0&&t.addIssue({code:"custom",path:["animation",f,"target","layerId"],message:`Unknown layer "${u.target.layerId}".`})),l.includes(u.property)||t.addIssue({code:"custom",path:["animation",f,"property"],message:`"${u.property}" cannot be animated on this target; legal properties: ${l.join(", ")||"(none)"}.`});let p=u.target.kind==="layer"?`layer:${u.target.layerId}`:u.target.kind,A=`${p}|${u.property}`;i.has(A)&&t.addIssue({code:"custom",path:["animation",f],message:`Duplicate channel for ${p}.${u.property}.`}),i.add(A);let E=JI(u.target.kind,u.property);u.keyframes.forEach((N,C)=>{XI(E,N.value)&&t.addIssue({code:"custom",path:["animation",f,"keyframes",C,"value"],message:`${u.property} is outside its authored bounds.`})})}),c>Bp&&t.addIssue({code:"custom",path:["animation"],message:`The shot has ${c} keyframes; the limit is ${Bp}.`}),e.constraints.forEach((u,f)=>{let l=new Set;u.objects.forEach((d,p)=>{r.has(d)||t.addIssue({code:"custom",path:["constraints",f,"objects",p],message:`Unknown constrained object "${d}".`}),l.has(d)&&t.addIssue({code:"custom",path:["constraints",f,"objects",p],message:`Duplicate constrained object "${d}".`}),l.add(d)})})}),qI=["light","lights","lighting","lightingProfile","intensity","lightIntensity","lightPosition","lightColor","lightColour","slabEdgeLighting","slabEdgeBoost","slabSideLighting","slabSideIntensity","edgeLight","edgeLighting","rimLight","castShadow","shadowOpacity"];function mr(e,t,n,r){throw new o.ZodError([{code:"custom",path:t,message:`${e}: ${n}`,input:r}])}function qp(e,t=["layers"]){Array.isArray(e)&&e.forEach((n,r)=>{if(n===null||typeof n!="object"||Array.isArray(n))return;let a=n;for(let i of qI)Object.prototype.hasOwnProperty.call(a,i)&&mr("scene_object_light_field_unsupported",[...t,r,i],`No object carries "${i}". Choose a shot-level environment lighting profile.`,a[i]);a.kind==="group"&&qp(a.children,[...t,r,"children"])})}function me(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function _c(e,t=[]){if(typeof e=="number"){if(!Number.isFinite(e))throw new o.ZodError([{code:"custom",path:t,message:"Expected a finite number.",input:e}]);return}if(Array.isArray(e)){e.forEach((r,a)=>_c(r,[...t,a]));return}let n=me(e);if(n!==null)for(let[r,a]of Object.entries(n))_c(a,[...t,r])}function Y(e,t,n){let r=me(e);if(r===null)return;let a=Object.keys(r).find(i=>!t.includes(i));if(a!==void 0)throw new o.ZodError([{code:"custom",path:[...n,a],message:`Unrecognized field "${a}".`,input:r[a]}])}function De(e,t,n){let r=me(e);if(r===null)return;let a=t.find(i=>r[i]===void 0);if(a!==void 0)throw new o.ZodError([{code:"custom",path:[...n,a],message:`Required field "${a}" is missing.`,input:void 0}])}function An(e,t){if(typeof e=="string"&&e.startsWith("$brand:")&&!Vp.includes(e))throw new o.ZodError([{code:"custom",path:t,message:`scene_brand_token_unresolved: "${e}" is not a scene colour token; supported roles: ${Up.join(", ")}.`,input:e}])}function kc(e,t){Y(e,["position","rotation","scale"],t)}function e_(e,t){Y(e,["role","type","color","roughness","metalness","clearcoat","clearcoatRoughness","anisotropy","anisotropyRotation","ior","reflectivity"],t),An(me(e)?.color,[...t,"color"])}function t_(e,t){let n=me(e);if(n!==null)switch(De(n,["source"],t),n.source){case"image":Y(n,["source","assetSlot"],t),De(n,["assetSlot"],t);break;case"color":Y(n,["source","color"],t),De(n,["color"],t),An(n.color,[...t,"color"]);break;case"component":Y(n,["source","component","captureFrame","layout","bakeScale","params"],t),De(n,["component","captureFrame","layout"],t),De(n.component,["version","componentId","sourceVersionId"],[...t,"component"]),De(n.layout,["width","height"],[...t,"layout"]),Y(n.component,["version","componentId","sourceVersionId"],[...t,"component"]),Y(n.layout,["width","height"],[...t,"layout"]);break;case"video":Y(n,["source","mediaId","startFrame","endFrame"],t),De(n,["mediaId"],t);break;default:break}}function n_(e,t){let n=["kind","space","id","opacity","lines","fontFamily","fontWeight","fontStyle","fontSize","lineHeight","letterSpacing","align","maxWidth","color"];if(Y(e,e.space==="screen"?[...n,"x","y","rotation","scale"]:[...n,"transform"],t),De(e,["kind","space","id","lines","fontFamily","fontWeight","fontStyle","fontSize","color",...e.space==="screen"?["x","y"]:[]],t),An(e.color,[...t,"color"]),typeof e.fontFamily=="string"&&e.fontFamily.startsWith("$brand:")&&!Wp.includes(e.fontFamily))throw new o.ZodError([{code:"custom",path:[...t,"fontFamily"],message:`scene_brand_token_unresolved: "${e.fontFamily}" is not a scene font token; supported roles: ${jp.join(", ")}.`,input:e.fontFamily}]);e.space==="world"&&kc(e.transform,[...t,"transform"]),Array.isArray(e.lines)&&e.lines.forEach((r,a)=>{let i=[...t,"lines",a];Y(r,["runs"],i);let c=me(r)?.runs;Array.isArray(c)&&c.forEach((u,f)=>{let l=[...i,"runs",f];Y(u,["text","color","emphasis"],l),An(me(u)?.color,[...l,"color"])})})}function ef(e,t=["layers"]){Array.isArray(e)&&e.forEach((n,r)=>{let a=me(n);if(a===null)return;let i=[...t,r];if(typeof a.kind!="string"||!["group","laptop","phone","slab","page","text"].includes(a.kind))throw new o.ZodError([{code:"custom",path:[...i,"kind"],message:"Expected a supported scene object kind.",input:a.kind}]);if(a.kind==="text"&&a.space!=="world"&&a.space!=="screen")throw new o.ZodError([{code:"custom",path:[...i,"space"],message:'Text space must be "world" or "screen".',input:a.space}]);switch(a.kind){case"group":Y(a,["kind","id","transform","opacity","children"],i),kc(a.transform,[...i,"transform"]),De(a,["id","children"],i),ef(a.children,[...i,"children"]);return;case"laptop":Y(a,["kind","id","transform","opacity","width","openAngle","materials","surfaces"],i),De(a,["id","width","openAngle"],i);break;case"phone":Y(a,["kind","id","transform","opacity","width","materials","surfaces"],i),De(a,["id","width"],i);break;case"slab":Y(a,["kind","id","transform","opacity","width","height","thickness","cornerRadius","edgeRadius","finish","materials","surfaces"],i),De(a,["id","width","height"],i);break;case"page":Y(a,["kind","id","transform","opacity","width","height","fit","transparency","depthWrite","backface","materials","surfaces"],i),De(a,["id","width","height","surfaces"],i);break;case"text":n_(a,i);return;default:return}kc(a.transform,[...i,"transform"]),Array.isArray(a.materials)&&a.materials.forEach((u,f)=>e_(u,[...i,"materials",f]));let c=me(a.surfaces);if(c!==null)for(let[u,f]of Object.entries(c))t_(f,[...i,"surfaces",u])})}function r_(e){_c(e),Y(e,["version","referenceSize","camera","environment","backdrop","layers","animation","post","constraints"],[]),Y(e.referenceSize,["width","height"],["referenceSize"]),Y(e.camera,["position","rotation","fov"],["camera"]);let t=me(e.environment);t!==null&&Y(t,t.kind==="photographic-studio-v1"?["kind"]:["kind","lightingProfile","preset","intensity","floorY","shadowOpacity"],["environment"]);let n=me(e.backdrop);n!==null&&(n.kind==="transparent"&&Y(n,["kind"],["backdrop"]),n.kind==="solid"&&(Y(n,["kind","color"],["backdrop"]),An(n.color,["backdrop","color"])),n.kind==="linear"&&Y(n,["kind","angle","stops"],["backdrop"]),n.kind==="radial"&&Y(n,["kind","at","stops"],["backdrop"]),Array.isArray(n.stops)&&n.stops.forEach((a,i)=>{Y(a,["at","color"],["backdrop","stops",i]),An(me(a)?.color,["backdrop","stops",i,"color"])})),ef(e.layers),Array.isArray(e.animation)&&e.animation.forEach((a,i)=>{let c=me(a);if(c===null)return;let u=["animation",i];Y(c,["target","property","keyframes"],u);let f=me(c.target);Y(f,f?.kind==="layer"?["kind","layerId"]:["kind"],[...u,"target"]),Array.isArray(c.keyframes)&&c.keyframes.forEach((l,d)=>{let p=[...u,"keyframes",d],A=me(l);Y(A,["at","value","easing"],p);let E=me(A?.easing);E!==null&&Y(E,E.kind==="bezier"?["kind","x1","y1","x2","y2"]:["kind"],[...p,"easing"])})});let r=me(e.post);Y(r,["grain","vignette","focus"],["post"]),Y(me(r?.focus),["distance","range","maxBlur"],["post","focus"]),Array.isArray(e.constraints)&&e.constraints.forEach((a,i)=>Y(a,["kind","objects","gap"],["constraints",i]))}function o_(e){if(e===null||typeof e!="object"||Array.isArray(e))return;let t=e;t.version!==wc&&mr("scene_spec_version_unsupported",["version"],`Scene version ${String(t.version)} is unsupported; this runtime accepts version 2.`,t.version);let n=t.environment;if(n!=null&&typeof n=="object"){let r=n,a=r.kind;if(a!==void 0&&a!=="studio"&&a!=="photographic-studio-v1"&&mr("scene_rig_unsupported",["environment","kind"],`Unsupported rig ${JSON.stringify(a)}; use "studio" or "photographic-studio-v1".`,a),a==="photographic-studio-v1"){let i=Object.keys(r).find(c=>c!=="kind");i!==void 0&&mr("scene_photographic_rig_field_unsupported",["environment",i],"photographic-studio-v1 is fixed and accepts only its kind.",r[i])}else r.lightingProfile!==void 0&&r.lightingProfile!=="studio"&&r.lightingProfile!=="studio-edge"&&mr("scene_lighting_profile_unsupported",["environment","lightingProfile"],'Supported profiles are "studio" and "studio-edge".',r.lightingProfile)}qp(t.layers),r_(t)}var a_=o.unknown().superRefine((e,t)=>{try{o_(e)}catch(n){if(!(n instanceof o.ZodError))throw n;for(let r of n.issues)t.addIssue(r)}}),dr=a_.pipe(Zp),i_="A version-2 scene shot: a self-contained 3D world-object shot that scene.add / scene.update materializes into an ordinary component clip. The shot owns its layers, camera, lighting, backdrop and normalized local animation; the composition owns start, duration, ordering, cuts and transitions. Coordinates are REFERENCE PIXELS: origin at frame centre, +X right, +Y down, +Z toward the viewer. referenceSize must have the SAME aspect ratio as the composition format; mismatch fails instead of cropping. At equal aspect ratio the shot scales uniformly by outputWidth/referenceWidth. A segment's easing belongs to the keyframe it ARRIVES at; the first keyframe has no easing. Authoring limits: 32 layers, 4 devices, 16 distinct image slots, 256 keyframes per channel, 2048 keyframes per shot. Version 2 supports nested groups, procedural slab/page/phone/laptop objects, screen- and world-space text, admitted image/component/video surfaces, fixed photographic and generated studio environments, transparent/solid/linear/radial backdrops, constraints, focus, grain and vignette. Raw HTML, custom shader props, imported GLB models, arbitrary external HDR environments, skeletal animation and physics are refused with an exact field path.",JD={...o.toJSONSchema(Zp,{target:"draft-2020-12",io:"input"}),description:i_};var s_={positionX:["position",0],positionY:["position",1],positionZ:["position",2],rotationX:["rotation",0],rotationY:["rotation",1],rotationZ:["rotation",2]},qD=Object.keys(s_);var En={position:[0,0,0],rotation:[0,0,0],scale:1},tf=ur({version:2,referenceSize:{width:1920,height:1080},environment:{kind:"photographic-studio-v1"},backdrop:{kind:"solid",color:"$brand:colors.background"},layers:[{kind:"group",id:"cards",transform:En,children:[{kind:"slab",id:"hero",transform:En,width:720,height:900,finish:"satin",surfaces:{front:{source:"component",component:{version:1,componentId:"hero-card",sourceVersionId:"0".repeat(64)},captureFrame:12,layout:{width:720,height:900}}}},{kind:"page",id:"page",transform:{...En,position:[760,0,-20]},width:640,height:800,surfaces:{content:{source:"image",assetSlot:"page"}}}]}],animation:[{target:{kind:"layer",layerId:"cards"},property:"rotationY",keyframes:[{at:0,value:0},{at:1,value:Math.PI*6,easing:{kind:"linear"}}]}]}),nf=ur({version:2,referenceSize:{width:1920,height:1080},environment:{kind:"photographic-studio-v1"},backdrop:{kind:"solid",color:"$brand:colors.background"},layers:[{kind:"page",id:"near",transform:{...En,position:[-320,0,600]},width:720,height:900,surfaces:{content:{source:"image",assetSlot:"near"}}},{kind:"page",id:"mid",transform:{...En,position:[280,0,-200]},width:720,height:900,surfaces:{content:{source:"image",assetSlot:"mid"}}},{kind:"page",id:"far",transform:{...En,position:[-160,0,-1200]},width:720,height:900,surfaces:{content:{source:"image",assetSlot:"far"}}}],animation:[{target:{kind:"camera"},property:"positionZ",keyframes:[{at:0,value:1800},{at:1,value:-900,easing:{kind:"bezier",x1:.4,y1:0,x2:.2,y2:1}}]},{target:{kind:"camera"},property:"positionX",keyframes:[{at:0,value:-240},{at:1,value:240,easing:{kind:"linear"}}]},{target:{kind:"layer",layerId:"near"},property:"positionZ",keyframes:[{at:0,value:600},{at:1,value:1500,easing:{kind:"linear"}}]},{target:{kind:"layer",layerId:"mid"},property:"positionZ",keyframes:[{at:0,value:-200},{at:1,value:260,easing:{kind:"linear"}}]},{target:{kind:"layer",layerId:"far"},property:"positionZ",keyframes:[{at:0,value:-1200},{at:1,value:-1020,easing:{kind:"linear"}}]}]}),aM=[{id:"world-objects",title:"World objects",summary:"Nested satin card and fitted page.",slots:hn(tf),spec:tf},{id:"camera-tunnel",title:"Camera travel through depth bands",summary:"Camera positionZ forward travel plus lateral positionX, over three image planes each animating positionZ at its own rate.",slots:hn(nf),spec:nf}];var sM=Object.freeze({face2xBytes:21758960,face3xBytes:48955600,generatedRigAndFocusBaselineBytes:90779744,transitionOverlapBytes:366506528,corrective2x:Object.freeze({bakeScale:null,layoutWidth:828,layoutHeight:1168}),corrective3x:Object.freeze({bakeScale:2,layoutWidth:812,layoutHeight:1147})});var d_=Object.freeze({laptop:1954,phone:3136,slab:5486,page:2}),mM=Object.freeze({rgba8:4,rgba16f:8,rgba32f:16,depth24:4});var m_="photographic-studio-v1",p_="environments/brown_photostudio_02.hdr",f_="469abc5e6035b6c450bae8adbb448f8d1fa7c51d9e384e501516c28352c91b58";var h_="three-0.183.2-fromEquirectangular-cubeuv256-v1";var g_=Object.freeze([Object.freeze([2e3,350,-700]),Object.freeze([-2e3,350,-700])]),A_=Object.freeze({sourceRgba16f:1024*512*8,pmremTargetRgba16f:768*1024*8,pmremTransientRgba16f:768*1024*8,preparationPeak:1024*512*8+2*768*1024*8,retained:768*1024*8}),hM=Object.freeze({rigId:m_,hdri:Object.freeze({path:p_,sha256:f_,bytes:1648130}),pmremVersion:h_,lightingVersion:1,studioPreset:"soft",hemisphere:Object.freeze({skyColor:"#ffffff",groundColor:"#202024",intensity:.7}),studioLights:Object.freeze([Object.freeze({role:"key",position:Object.freeze([700,1100,1300]),intensity:1.6,castShadow:!1}),Object.freeze({role:"fill",position:Object.freeze([-1100,400,900]),intensity:.9,castShadow:!1}),Object.freeze({role:"rim",position:Object.freeze([0,1300,-1900]),intensity:1,castShadow:!1})]),edgeLights:Object.freeze(g_.map(e=>Object.freeze({position:e,intensity:26,castShadow:!1}))),environmentIntensity:1,floor:"none",shadows:"none",gpuBytes:A_});var Uo=/^\{\{([A-Za-z_][A-Za-z0-9_]*)\}\}$/,rf=/\\\{\{|\{\{([A-Za-z_][A-Za-z0-9_]*)\}\}/g,b_=["source.props","source.params","source.html","source.tokens","source.mediaId","source.assets","metadata","text"],y_=/^(tracks\.\d+\.contents\.\d+\.(source\.props|source\.params|metadata)|markers\.\d+\.metadata)(\.|$)/,E_=/^tracks\.\d+\.contents\.\d+\.source\.html$/,S_=/^tracks\.\d+\.contents\.\d+\.source\.(mediaId|assets\.[^.]+)$/,Dc=Symbol("omit");function T_(e){let t=e.join(".");if(/^captions\./.test(t)&&/\.text$/.test(t)||/^markers\.\d+\.metadata\b/.test(t))return!0;let n=t.match(/^tracks\.\d+\.contents\.\d+\.(.*)$/);return!!n&&b_.some(r=>n[1]===r||n[1].startsWith(r+"."))}function x_(e){let t=[],n=(r,a)=>{if(typeof r=="string"){let i=r.match(Uo);if(i){t.push({path:a,name:i[1],wholeLeaf:!0});return}for(let c of r.matchAll(rf))c[1]!==void 0&&t.push({path:a,name:c[1],wholeLeaf:!1})}else if(Array.isArray(r))r.forEach((i,c)=>n(i,[...a,String(c)]));else if(r&&typeof r=="object")for(let[i,c]of Object.entries(r))n(c,[...a,i])};return n(e.composition,[]),t}function C_(e,t,n){let r=e.components[t.source?.componentId];if(r)return{kind:r.source.manifest.assets[n]?.kind};let a=t.source?.props?.scene;if(a===void 0)return{};let i=dr.safeParse(a);return i.success?{kind:hn(i.data).includes(n)?"image":Cc(i.data).includes(n)?"video":void 0}:{error:`clip ${t.id} props.scene is not a scene-shot spec`}}function jo(e){let t=new Map(e.parameters.map(i=>[i.name,i])),n=x_(e),r=new Set(n.map(i=>i.name)),a=[];for(let i of n){let c=t.get(i.name);if(!c)continue;let u=i.path.join("."),f=u.match(S_);if(c.type!=="media"){f&&a.push(`${i.name}: ${u} takes a media parameter`);continue}if(!f||!i.wholeLeaf){a.push(`${i.name}: media parameters bind only as a whole-leaf mediaId or asset slot`);continue}let l=e.composition.tracks[Number(i.path[1])].contents[Number(i.path[3])];if(f[1]==="mediaId"){c.required?l.kind!==c.kind&&a.push(`${i.name}: clip ${l.id} is ${l.kind}, parameter is ${c.kind}`):a.push(`${i.name}: a clip's mediaId needs a required media parameter`);continue}let d=i.path[i.path.length-1],p=C_(e,l,d);p.error?a.push(`${i.name}: ${p.error}`):p.kind!==c.kind&&a.push(`${i.name}: slot ${d} of ${l.source.componentId} is ${p.kind??"undeclared"}, parameter is ${c.kind}`)}return{undeclared:[...new Set(n.filter(i=>!t.has(i.name)).map(i=>i.name))],unused:e.parameters.filter(i=>!r.has(i.name)).map(i=>i.name),misplaced:n.filter(i=>!T_(i.path)).map(i=>i.path.join(".")),mediaSiteErrors:a}}var I_=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");function Mc(e,t,n,r={}){let{undeclared:a,misplaced:i,mediaSiteErrors:c}=jo(e);if(a.length)throw new we("template_parameter_undeclared",`undeclared: ${a.join(", ")}`);if(i.length||c.length)throw new we("template_values_invalid",[...i.map(I=>`reference outside a string leaf: ${I}`),...c].join("; "));let u=new Map(e.parameters.map(I=>[I.name,I])),f=[...Object.keys(t).filter(I=>u.get(I)===void 0||u.get(I).type==="media"),...Object.keys(n).filter(I=>u.get(I)?.type!=="media")];if(f.length)throw new we("template_parameter_undeclared",`not declared by this template: ${f.join(", ")}`,f.map(I=>({param:I,reason:"not declared"})));let l={};if(r.preset!==void 0){let I=e.presets?.[r.preset];if(!I)throw new we("template_values_invalid",`unknown preset ${r.preset}`,[{param:"preset",reason:`unknown preset ${r.preset}`}]);l=I.values}let d={...l,...t},p=[],A=new Map,E=new Map;for(let I of e.parameters){if(I.type==="media"){let H=n[I.name];if(!H){I.required&&p.push({param:I.name,reason:"required"});continue}if(H.kind!==I.kind)throw new we("template_media_kind_mismatch",`${I.name}: expected ${I.kind}, got ${H.kind}`,[{param:I.name,reason:`expected ${I.kind}`}]);A.set(I.name,H.mediaId),E.set(H.mediaId,H);continue}let k=d[I.name];if(k===void 0){I.default!==void 0?A.set(I.name,I.default):I.required&&p.push({param:I.name,reason:"required"});continue}let D=fn(I,k);D.ok?A.set(I.name,D.value):p.push({param:I.name,reason:D.reason})}for(let I of e.composition.tracks)for(let k of I.contents){let D=k.source,H=typeof D?.mediaId=="string"?D.mediaId.match(Uo)?.[1]:void 0,q=H?n[H]:void 0;if(q?.durationSec===void 0||q.kind==="image"||D.loop)continue;let Ee=(D.excludedRanges??[]).reduce((Ft,ht)=>Ft+Math.max(0,ht.end-ht.start),0),je=D.trim?D.trim.end:k.duration*(D.playbackRate??1)+Ee;je<=q.durationSec||p.push({param:H,reason:D.trim?`media is ${q.durationSec}s, template trims to ${D.trim.end}s`:`media is ${q.durationSec}s, clip needs ${je}s`})}if(p.length)throw new we("template_values_invalid",p.map(I=>`${I.param}: ${I.reason}`).join("; "),p);let N=(I,k)=>{if(typeof I=="string"){let D=k.join("."),H=Ee=>E_.test(D)?I_(String(Ee)):String(Ee),q=I.match(Uo);if(q){let Ee=A.get(q[1]);return Ee===void 0?Dc:y_.test(D)?Ee:H(Ee)}return I.replace(rf,(Ee,je)=>je===void 0?"{{":H(A.get(je)??""))}return Array.isArray(I)?I.map((D,H)=>{let q=N(D,[...k,String(H)]);return q===Dc&&p.push({param:String(D).match(Uo)[1],reason:"required: it fills an array element"}),q}):I&&typeof I=="object"?Object.fromEntries(Object.entries(I).map(([D,H])=>[D,N(H,[...k,D])]).filter(([,D])=>D!==Dc)):I},C=Qr(N(e.composition,[])).value;if(p.length)throw new we("template_values_invalid",p.map(I=>`${I.param}: ${I.reason}`).join("; "),p);for(let I of C.tracks)for(let k of I.contents)E.get(k.source?.mediaId)?.kind==="image"&&(delete k.source.trim,delete k.source.excludedRanges,delete k.source.playbackRate,delete k.source.reframe);let M=lr.safeParse(C);if(!M.success)throw new we("template_values_invalid",`bound composition is invalid: ${M.error.issues.map(I=>`${I.path.join(".")}: ${I.message}`).join("; ")}`);return C}var nB=Object.freeze([{name:"red",rgb:[230,40,40]},{name:"green",rgb:[40,200,60]},{name:"blue",rgb:[40,80,230]},{name:"yellow",rgb:[240,220,40]},{name:"magenta",rgb:[220,40,220]},{name:"cyan",rgb:[40,210,220]},{name:"orange",rgb:[245,140,30]},{name:"violet",rgb:[130,60,200]}]),rB=Object.freeze({probeTolerance:36,minFullResPixels:400,lowFullResPixels:4096,diffThreshold:24,stillDiff:.002,blankShare:.999,blankSpread:8,blankFraction:.2,seamRatio:2.5});var __=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},Vo=__;var k_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},of=k_;var w_=e=>Vo(of[e.toLowerCase()],6),af=w_;var R_=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,N_=e=>{let t;return(t=e.match(R_))?Vo(parseInt(t[1],16),t[1].length):void 0},sf=N_;var Ce="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",mB=`(?:${Ce}|none)`,Gt=`${Ce}%`,pB=`(?:${Ce}%|none)`,pr=`(?:${Ce}%|${Ce})`,O_=`(?:${Ce}%|${Ce}|none)`,cf=`(?:${Ce}(deg|grad|rad|turn)|${Ce})`,fB=`(?:${Ce}(deg|grad|rad|turn)|${Ce}|none)`,xt="\\s*,\\s*";var hB=new RegExp("^"+O_+"$");var v_=new RegExp(`^rgba?\\(\\s*${Ce}${xt}${Ce}${xt}${Ce}\\s*(?:,\\s*${pr}\\s*)?\\)$`),F_=new RegExp(`^rgba?\\(\\s*${Gt}${xt}${Gt}${xt}${Gt}\\s*(?:,\\s*${pr}\\s*)?\\)$`),D_=e=>{let t={mode:"rgb"},n;if(n=e.match(v_))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(F_))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))),t},lf=D_;var M_=(e,t)=>e===void 0?void 0:typeof e!="object"?df(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,uf=M_;var B_=(e="rgb")=>t=>(t=uf(t,e))!==void 0?t.mode===e?t:Xe[t.mode][e]?Xe[t.mode][e](t):e==="rgb"?Xe[t.mode].rgb(t):Xe.rgb[e](Xe[t.mode].rgb(t)):void 0,fr=B_;var Xe={},mf={},hr=[],Bc={},L_=e=>e,G=e=>(Xe[e.mode]={...Xe[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Xe[t]||(Xe[t]={}),Xe[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=L_)}),mf[e.mode]=e,(e.parse||[]).forEach(t=>{P_(t,e.mode)}),fr(e.mode)),pf=e=>mf[e],P_=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Bc[e]=t}else typeof e=="function"&&hr.indexOf(e)<0&&hr.push(e)};var Lc=/[^\x00-\x7F]|[a-zA-Z_]/,H_=/[^\x00-\x7F]|[-\w]/,_={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},P=0;function Wo(e){let t=e[P],n=e[P+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[P+2]):t==="."?/\d/.test(n):/\d/.test(t)}function Pc(e){if(P>=e.length)return!1;let t=e[P];if(Lc.test(t))return!0;if(t==="-"){if(e.length-P<2)return!1;let n=e[P+1];return!!(n==="-"||Lc.test(n))}return!1}var U_={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function gr(e){let t="";if((e[P]==="-"||e[P]==="+")&&(t+=e[P++]),t+=$o(e),e[P]==="."&&/\d/.test(e[P+1])&&(t+=e[P++]+$o(e)),(e[P]==="e"||e[P]==="E")&&((e[P+1]==="-"||e[P+1]==="+")&&/\d/.test(e[P+2])?t+=e[P++]+e[P++]+$o(e):/\d/.test(e[P+1])&&(t+=e[P++]+$o(e))),Pc(e)){let n=Yo(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:_.Hue,value:t*U_[n]}:void 0}return e[P]==="%"?(P++,{type:_.Percentage,value:+t}):{type:_.Number,value:+t}}function $o(e){let t="";for(;/\d/.test(e[P]);)t+=e[P++];return t}function Yo(e){let t="";for(;P<e.length&&H_.test(e[P]);)t+=e[P++];return t}function j_(e){let t=Yo(e);return e[P]==="("?(P++,{type:_.Function,value:t}):t==="none"?{type:_.None,value:void 0}:{type:_.Ident,value:t}}function V_(e=""){let t=e.trim(),n=[],r;for(P=0;P<t.length;){if(r=t[P++],r===`
59
- `||r===" "||r===" "){for(;P<t.length&&(t[P]===`
60
- `||t[P]===" "||t[P]===" ");)P++;continue}if(r===",")return;if(r===")"){n.push({type:_.ParenClose});continue}if(r==="+"){if(P--,Wo(t)){n.push(gr(t));continue}return}if(r==="-"){if(P--,Wo(t)){n.push(gr(t));continue}if(Pc(t)){n.push({type:_.Ident,value:Yo(t)});continue}return}if(r==="."){if(P--,Wo(t)){n.push(gr(t));continue}return}if(r==="/"){for(;P<t.length&&(t[P]===`
61
- `||t[P]===" "||t[P]===" ");)P++;let a;if(Wo(t)&&(a=gr(t),a.type!==_.Hue)){n.push({type:_.Alpha,value:a});continue}if(Pc(t)&&Yo(t)==="none"){n.push({type:_.Alpha,value:{type:_.None,value:void 0}});continue}return}if(/\d/.test(r)){P--,n.push(gr(t));continue}if(Lc.test(r)){P--,n.push(j_(t));continue}return}return n}function W_(e){e._i=0;let t=e[e._i++];if(!t||t.type!==_.Function||t.value!=="color"||(t=e[e._i++],t.type!==_.Ident))return;let n=Bc[t.value];if(!n)return;let r={mode:n},a=ff(e,!1);if(!a)return;let i=pf(n).channels;for(let c=0,u,f;c<i.length;c++)u=a[c],f=i[c],u.type!==_.None&&(r[f]=u.type===_.Number?u.value:u.value/100,f==="alpha"&&(r[f]=Math.max(0,Math.min(1,r[f]))));return r}function ff(e,t){let n=[],r;for(;e._i<e.length;){if(r=e[e._i++],r.type===_.None||r.type===_.Number||r.type===_.Alpha||r.type===_.Percentage||t&&r.type===_.Hue){n.push(r);continue}if(r.type===_.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==_.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:_.None,value:void 0}),n.every(a=>a.type!==_.Alpha)?n:void 0}}function $_(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==_.Function)return;let r=ff(e,t);if(r)return r.unshift(n.value),r}var Y_=e=>{if(typeof e!="string")return;let t=V_(e),n=t?$_(t,!0):void 0,r,a=0,i=hr.length;for(;a<i;)if((r=hr[a++](e,n))!==void 0)return r;return t?W_(t):void 0},df=Y_;function G_(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let n={mode:"rgb"},[,r,a,i,c]=t;if(!(r.type===_.Hue||a.type===_.Hue||i.type===_.Hue))return r.type!==_.None&&(n.r=r.type===_.Number?r.value/255:r.value/100),a.type!==_.None&&(n.g=a.type===_.Number?a.value/255:a.value/100),i.type!==_.None&&(n.b=i.type===_.Number?i.value/255:i.value/100),c.type!==_.None&&(n.alpha=Math.min(1,Math.max(0,c.type===_.Number?c.value:c.value/100))),n}var hf=G_;var K_=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,gf=K_;var Af=(e,t,n)=>e+n*(t-e);var Q_=e=>{let t=[];for(let n=0;n<e.length-1;n++){let r=e[n],a=e[n+1];r===void 0&&a===void 0?t.push(void 0):r!==void 0&&a!==void 0?t.push([r,a]):t.push(r!==void 0?[r,r]:[a,a])}return t},bf=e=>t=>{let n=Q_(t);return r=>{let a=r*n.length,i=r>=1?n.length-1:Math.max(Math.floor(a),0),c=n[i];return c===void 0?void 0:e(c[0],c[1],a-i)}};var R=bf(Af);var V=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e};var z_={mode:"rgb",channels:["r","g","b","alpha"],parse:[hf,sf,lf,af,gf,"srgb"],serialize:"srgb",interpolate:{r:R,g:R,b:R,alpha:{use:R,fixup:V}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Pe=z_;var Hc=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),J_=e=>{let t=Hc(e.r),n=Hc(e.g),r=Hc(e.b),a={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Uc=J_;var jc=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),X_=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a={mode:"a98",r:jc(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:jc(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:jc(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(a.alpha=r),a},Vc=X_;var Wc=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Z_=({r:e,g:t,b:n,alpha:r})=>{let a={mode:"lrgb",r:Wc(e),g:Wc(t),b:Wc(n)};return r!==void 0&&(a.alpha=r),a},He=Z_;var q_=e=>{let{r:t,g:n,b:r,alpha:a}=He(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return a!==void 0&&(i.alpha=a),i},Re=q_;var $c=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},ek=({r:e,g:t,b:n,alpha:r},a="rgb")=>{let i={mode:a,r:$c(e),g:$c(t),b:$c(n)};return r!==void 0&&(i.alpha=r),i},Ue=ek;var tk=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Ue({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(a.alpha=r),a},Ne=tk;var nk={...Pe,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Vc(Re(e)),xyz65:Vc},toMode:{rgb:e=>Ne(Uc(e)),xyz65:Uc}},yf=nk;var rk=e=>(e=e%360)<0?e+360:e,K=rk;var ok=(e,t)=>e.map((n,r,a)=>{if(n===void 0)return n;let i=K(n);return r===0||e[r-1]===void 0?i:t(i-K(a[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),pe=e=>ok(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var ie=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ef=Math.PI/180,Sf=180/Math.PI;var Tf=ie[3]*ie[4],xf=ie[1]*ie[4],Cf=ie[1]*ie[2]-ie[0]*ie[3],ak=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=(Cf*n+e*Tf-t*xf)/(Cf+Tf-xf),i=n-a,c=(ie[4]*(t-a)-ie[2]*i)/ie[3],u={mode:"cubehelix",l:a,s:a===0||a===1?void 0:Math.sqrt(i*i+c*c)/(ie[4]*a*(1-a))};return u.s&&(u.h=Math.atan2(c,i)*Sf-120),r!==void 0&&(u.alpha=r),u},If=ak;var ik=({h:e,s:t,l:n,alpha:r})=>{let a={mode:"rgb"};e=(e===void 0?0:e+120)*Ef,n===void 0&&(n=0);let i=t===void 0?0:t*n*(1-n),c=Math.cos(e),u=Math.sin(e);return a.r=n+i*(ie[0]*c+ie[1]*u),a.g=n+i*(ie[2]*c+ie[3]*u),a.b=n+i*(ie[4]*c+ie[5]*u),r!==void 0&&(a.alpha=r),a},_f=ik;var Ct=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=K(e.h),r=K(t.h),a=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*a},kf=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=K(e.h),r=K(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},It=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=K(e.h),r=K(t.h),a=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*a};var fe=e=>{let t=e.reduce((r,a)=>{if(a!==void 0){let i=a*Math.PI/180;r.sin+=Math.sin(i),r.cos+=Math.cos(i)}return r},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n};var sk={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:If},toMode:{rgb:_f},interpolate:{h:{use:R,fixup:pe},s:R,l:R,alpha:{use:R,fixup:V}},difference:{h:Ct},average:{h:fe}},wf=sk;var ck=({l:e,a:t,b:n,alpha:r},a="lch")=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),c={mode:a,l:e,c:i};return i&&(c.h=K(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(c.alpha=r),c},Me=ck;var lk=({l:e,c:t,h:n,alpha:r},a="lab")=>{n===void 0&&(n=0);let i={mode:a,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},Be=lk;var Go=Math.pow(29,3)/Math.pow(3,3),Ko=Math.pow(6,3)/Math.pow(29,3);var Z={X:.9642956764295677,Y:1,Z:.8251046025104602},_t={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},wL=Math.pow(29,3)/Math.pow(3,3),RL=Math.pow(6,3)/Math.pow(29,3);var Yc=e=>Math.pow(e,3)>Ko?Math.pow(e,3):(116*e-16)/Go,uk=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=(e+16)/116,i=t/500+a,c=a-n/200,u={mode:"xyz65",x:Yc(i)*_t.X,y:Yc(a)*_t.Y,z:Yc(c)*_t.Z};return r!==void 0&&(u.alpha=r),u},Qo=uk;var dk=e=>Ne(Qo(e)),kt=dk;var Gc=e=>e>Ko?Math.cbrt(e):(Go*e+16)/116,mk=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Gc(e/_t.X),i=Gc(t/_t.Y),c=Gc(n/_t.Z),u={mode:"lab65",l:116*i-16,a:500*(a-i),b:200*(i-c)};return r!==void 0&&(u.alpha=r),u},zo=mk;var pk=e=>{let t=zo(Re(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},wt=pk;var Kt=.14444444444444443*Math.PI,Sn=Math.cos(Kt),Tn=Math.sin(Kt),Jo=100/Math.log(139/100);var fk=({l:e,c:t,h:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a={mode:"lab65",l:(Math.exp(e*1/Jo)-1)/.0039},i=(Math.exp(.0435*t*1*1)-1)/.075,c=i*Math.cos(n/180*Math.PI-Kt),u=i*Math.sin(n/180*Math.PI-Kt);return a.a=c*Sn-u/.83*Tn,a.b=c*Tn+u/.83*Sn,r!==void 0&&(a.alpha=r),a},br=fk;var hk=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=t*Sn+n*Tn,i=.83*(n*Sn-t*Tn),c=Math.sqrt(a*a+i*i),u={mode:"dlch",l:Jo/1*Math.log(1+.0039*e),c:Math.log(1+.075*c)/(.0435*1*1)};return u.c&&(u.h=K((Math.atan2(i,a)+Kt)/Math.PI*180)),r!==void 0&&(u.alpha=r),u},yr=hk;var Rf=e=>br(Me(e,"dlch")),Nf=e=>Be(yr(e),"dlab"),gk={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Rf,rgb:e=>kt(Rf(e))},fromMode:{lab65:Nf,rgb:e=>Nf(wt(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:R,a:R,b:R,alpha:{use:R,fixup:V}}},Of=gk;var Ak={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:br,dlab:e=>Be(e,"dlab"),rgb:e=>kt(br(e))},fromMode:{lab65:yr,dlab:e=>Me(e,"dlch"),rgb:e=>yr(wt(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:R,c:R,h:{use:R,fixup:pe},alpha:{use:R,fixup:V}},difference:{h:It},average:{h:fe}},vf=Ak;function Qc({h:e,s:t,i:n,alpha:r}){e=K(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n*(1+t*(3/(2-a)-1)),g:n*(1+t*(3*(1-a)/(2-a)-1)),b:n*(1-t)};break;case 1:i={r:n*(1+t*(3*(1-a)/(2-a)-1)),g:n*(1+t*(3/(2-a)-1)),b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n*(1+t*(3/(2-a)-1)),b:n*(1+t*(3*(1-a)/(2-a)-1))};break;case 3:i={r:n*(1-t),g:n*(1+t*(3*(1-a)/(2-a)-1)),b:n*(1+t*(3/(2-a)-1))};break;case 4:i={r:n*(1+t*(3*(1-a)/(2-a)-1)),g:n*(1-t),b:n*(1+t*(3/(2-a)-1))};break;case 5:i={r:n*(1+t*(3/(2-a)-1)),g:n*(1-t),b:n*(1+t*(3*(1-a)/(2-a)-1))};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function zc({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.max(e,t,n),i=Math.min(e,t,n),c={mode:"hsi",s:e+t+n===0?0:1-3*i/(e+t+n),i:(e+t+n)/3};return a-i!==0&&(c.h=(a===e?(t-n)/(a-i)+(t<n)*6:a===t?(n-e)/(a-i)+2:(e-t)/(a-i)+4)*60),r!==void 0&&(c.alpha=r),c}var bk={mode:"hsi",toMode:{rgb:Qc},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:zc},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:R,fixup:pe},s:R,i:R,alpha:{use:R,fixup:V}},difference:{h:Ct},average:{h:fe}},Ff=bk;function Jc({h:e,s:t,l:n,alpha:r}){e=K(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let a=n+t*(n<.5?n:1-n),i=a-(a-n)*2*Math.abs(e/60%2-1),c;switch(Math.floor(e/60)){case 0:c={r:a,g:i,b:2*n-a};break;case 1:c={r:i,g:a,b:2*n-a};break;case 2:c={r:2*n-a,g:a,b:i};break;case 3:c={r:2*n-a,g:i,b:a};break;case 4:c={r:i,g:2*n-a,b:a};break;case 5:c={r:a,g:2*n-a,b:i};break;default:c={r:2*n-a,g:2*n-a,b:2*n-a}}return c.mode="rgb",r!==void 0&&(c.alpha=r),c}function Xc({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.max(e,t,n),i=Math.min(e,t,n),c={mode:"hsl",s:a===i?0:(a-i)/(1-Math.abs(a+i-1)),l:.5*(a+i)};return a-i!==0&&(c.h=(a===e?(t-n)/(a-i)+(t<n)*6:a===t?(n-e)/(a-i)+2:(e-t)/(a-i)+4)*60),r!==void 0&&(c.alpha=r),c}var yk=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},Df=yk;var Ek=new RegExp(`^hsla?\\(\\s*${cf}${xt}${Gt}${xt}${Gt}\\s*(?:,\\s*${pr}\\s*)?\\)$`),Sk=e=>{let t=e.match(Ek);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=Df(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))),n},Mf=Sk;function Tk(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let n={mode:"hsl"},[,r,a,i,c]=t;if(r.type!==_.None){if(r.type===_.Percentage)return;n.h=r.value}if(a.type!==_.None){if(a.type===_.Hue)return;n.s=a.value/100}if(i.type!==_.None){if(i.type===_.Hue)return;n.l=i.value/100}return c.type!==_.None&&(n.alpha=Math.min(1,Math.max(0,c.type===_.Number?c.value:c.value/100))),n}var Bf=Tk;var xk={mode:"hsl",toMode:{rgb:Jc},fromMode:{rgb:Xc},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Bf,Mf],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:R,fixup:pe},s:R,l:R,alpha:{use:R,fixup:V}},difference:{h:Ct},average:{h:fe}},Xo=xk;function Er({h:e,s:t,v:n,alpha:r}){e=K(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n,g:n*(1-t*a),b:n*(1-t)};break;case 1:i={r:n*(1-t*a),g:n,b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n,b:n*(1-t*a)};break;case 3:i={r:n*(1-t),g:n*(1-t*a),b:n};break;case 4:i={r:n*(1-t*a),g:n*(1-t),b:n};break;case 5:i={r:n,g:n*(1-t),b:n*(1-t*a)};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function Sr({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.max(e,t,n),i=Math.min(e,t,n),c={mode:"hsv",s:a===0?0:1-i/a,v:a};return a-i!==0&&(c.h=(a===e?(t-n)/(a-i)+(t<n)*6:a===t?(n-e)/(a-i)+2:(e-t)/(a-i)+4)*60),r!==void 0&&(c.alpha=r),c}var Ck={mode:"hsv",toMode:{rgb:Er},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Sr},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:R,fixup:pe},s:R,v:R,alpha:{use:R,fixup:V}},difference:{h:Ct},average:{h:fe}},Zo=Ck;function Zc({h:e,w:t,b:n,alpha:r}){if(t===void 0&&(t=0),n===void 0&&(n=0),t+n>1){let a=t+n;t/=a,n/=a}return Er({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function qc(e){let t=Sr(e);if(t===void 0)return;let n=t.s!==void 0?t.s:0,r=t.v!==void 0?t.v:0,a={mode:"hwb",w:(1-n)*r,b:1-r};return t.h!==void 0&&(a.h=t.h),t.alpha!==void 0&&(a.alpha=t.alpha),a}function Ik(e,t){if(!t||t[0]!=="hwb")return;let n={mode:"hwb"},[,r,a,i,c]=t;if(r.type!==_.None){if(r.type===_.Percentage)return;n.h=r.value}if(a.type!==_.None){if(a.type===_.Hue)return;n.w=a.value/100}if(i.type!==_.None){if(i.type===_.Hue)return;n.b=i.value/100}return c.type!==_.None&&(n.alpha=Math.min(1,Math.max(0,c.type===_.Number?c.value:c.value/100))),n}var Lf=Ik;var _k={mode:"hwb",toMode:{rgb:Zc},fromMode:{rgb:qc},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Lf],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:R,fixup:pe},w:R,b:R,alpha:{use:R,fixup:V}},difference:{h:kf},average:{h:fe}},Pf=_k;var xn=.1593017578125,Hf=78.84375,Cn=.8359375,In=18.8515625,_n=18.6875;function qo(e){if(e<0)return 0;let t=Math.pow(e,1/Hf);return 1e4*Math.pow(Math.max(0,t-Cn)/(In-_n*t),1/xn)}function ea(e){if(e<0)return 0;let t=Math.pow(e/1e4,xn);return Math.pow((Cn+In*t)/(1+_n*t),Hf)}var el=e=>Math.max(e/203,0),wk=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=qo(e+.008609037037932761*t+.11102962500302593*n),i=qo(e-.00860903703793275*t-.11102962500302599*n),c=qo(e+.5600313357106791*t-.32062717498731885*n),u={mode:"xyz65",x:el(2.070152218389422*a-1.3263473389671556*i+.2066510476294051*c),y:el(.3647385209748074*a+.680566024947227*i-.0453045459220346*c),z:el(-.049747207535812*a-.0492609666966138*i+1.1880659249923042*c)};return r!==void 0&&(u.alpha=r),u},tl=wk;var nl=(e=0)=>Math.max(e*203,0),Rk=({x:e,y:t,z:n,alpha:r})=>{let a=nl(e),i=nl(t),c=nl(n),u=ea(.3592832590121217*a+.6976051147779502*i-.0358915932320289*c),f=ea(-.1920808463704995*a+1.1004767970374323*i+.0753748658519118*c),l=ea(.0070797844607477*a+.0748396662186366*i+.8433265453898765*c),d=.5*u+.5*f,p=1.61376953125*u-3.323486328125*f+1.709716796875*l,A=4.378173828125*u-4.24560546875*f-.132568359375*l,E={mode:"itp",i:d,t:p,p:A};return r!==void 0&&(E.alpha=r),E},rl=Rk;var Nk={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:tl,rgb:e=>Ne(tl(e))},fromMode:{xyz65:rl,rgb:e=>rl(Re(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:R,t:R,p:R,alpha:{use:R,fixup:V}}},Uf=Nk;var Ok=134.03437499999998,vk=16295499532821565e-27,ol=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,xn);return Math.pow((Cn+In*t)/(1+_n*t),Ok)},al=(e=0)=>Math.max(e*203,0),Fk=({x:e,y:t,z:n,alpha:r})=>{e=al(e),t=al(t),n=al(n);let a=1.15*e-.15*n,i=.66*t+.34*e,c=ol(.41478972*a+.579999*i+.014648*n),u=ol(-.20151*a+1.120649*i+.0531008*n),f=ol(-.0166008*a+.2648*i+.6684799*n),l=(c+u)/2,d={mode:"jab",j:.44*l/(1-.56*l)-vk,a:3.524*c-4.066708*u+.542708*f,b:.199076*c+1.096799*u-1.295875*f};return r!==void 0&&(d.alpha=r),d},ta=Fk;var Dk=134.03437499999998,jf=16295499532821565e-27,il=e=>{if(e<0)return 0;let t=Math.pow(e,1/Dk);return 1e4*Math.pow((Cn-t)/(_n*t-In),1/xn)},sl=e=>e/203,Mk=({j:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=(e+jf)/(.44+.56*(e+jf)),i=il(a+.13860504*t+.058047316*n),c=il(a-.13860504*t-.058047316*n),u=il(a-.096019242*t-.8118919*n),f={mode:"xyz65",x:sl(1.661373024652174*i-.914523081304348*c+.23136208173913045*u),y:sl(-.3250758611844533*i+1.571847026732543*c-.21825383453227928*u),z:sl(-.090982811*i-.31272829*c+1.5227666*u)};return r!==void 0&&(f.alpha=r),f},na=Mk;var Bk=e=>{let t=ta(Re(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ra=Bk;var Lk=e=>Ne(na(e)),oa=Lk;var Pk={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:ra,xyz65:ta},toMode:{rgb:oa,xyz65:na},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:R,a:R,b:R,alpha:{use:R,fixup:V}}},Vf=Pk;var Hk=({j:e,a:t,b:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.sqrt(t*t+n*n),i={mode:"jch",j:e,c:a};return a&&(i.h=K(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},cl=Hk;var Uk=({j:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let a={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(a.alpha=r),a},ll=Uk;var jk={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:ll,rgb:e=>oa(ll(e))},fromMode:{rgb:e=>cl(ra(e)),jab:cl},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:R,fixup:pe},c:R,j:R,alpha:{use:R,fixup:V}},difference:{h:It},average:{h:fe}},Wf=jk;var Rt=Math.pow(29,3)/Math.pow(3,3),kn=Math.pow(6,3)/Math.pow(29,3);var ul=e=>Math.pow(e,3)>kn?Math.pow(e,3):(116*e-16)/Rt,Vk=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=(e+16)/116,i=t/500+a,c=a-n/200,u={mode:"xyz50",x:ul(i)*Z.X,y:ul(a)*Z.Y,z:ul(c)*Z.Z};return r!==void 0&&(u.alpha=r),u},wn=Vk;var Wk=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Ue({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(a.alpha=r),a},st=Wk;var $k=e=>st(wn(e)),aa=$k;var Yk=e=>{let{r:t,g:n,b:r,alpha:a}=He(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return a!==void 0&&(i.alpha=a),i},ct=Yk;var dl=e=>e>kn?Math.cbrt(e):(Rt*e+16)/116,Gk=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=dl(e/Z.X),i=dl(t/Z.Y),c=dl(n/Z.Z),u={mode:"lab",l:116*i-16,a:500*(a-i),b:200*(i-c)};return r!==void 0&&(u.alpha=r),u},Rn=Gk;var Kk=e=>{let t=Rn(ct(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ia=Kk;function Qk(e,t){if(!t||t[0]!=="lab")return;let n={mode:"lab"},[,r,a,i,c]=t;if(!(r.type===_.Hue||a.type===_.Hue||i.type===_.Hue))return r.type!==_.None&&(n.l=Math.min(Math.max(0,r.value),100)),a.type!==_.None&&(n.a=a.type===_.Number?a.value:a.value*125/100),i.type!==_.None&&(n.b=i.type===_.Number?i.value:i.value*125/100),c.type!==_.None&&(n.alpha=Math.min(1,Math.max(0,c.type===_.Number?c.value:c.value/100))),n}var $f=Qk;var zk={mode:"lab",toMode:{xyz50:wn,rgb:aa},fromMode:{xyz50:Rn,rgb:ia},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[$f],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:R,a:R,b:R,alpha:{use:R,fixup:V}}},Nn=zk;var Jk={...Nn,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Qo,rgb:kt},fromMode:{xyz65:zo,rgb:wt},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Yf=Jk;function Xk(e,t){if(!t||t[0]!=="lch")return;let n={mode:"lch"},[,r,a,i,c]=t;if(r.type!==_.None){if(r.type===_.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(a.type!==_.None&&(n.c=Math.max(0,a.type===_.Number?a.value:a.value*150/100)),i.type!==_.None){if(i.type===_.Percentage)return;n.h=i.value}return c.type!==_.None&&(n.alpha=Math.min(1,Math.max(0,c.type===_.Number?c.value:c.value/100))),n}var Gf=Xk;var Zk={mode:"lch",toMode:{lab:Be,rgb:e=>aa(Be(e))},fromMode:{rgb:e=>Me(ia(e)),lab:Me},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Gf],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:R,fixup:pe},c:R,l:R,alpha:{use:R,fixup:V}},difference:{h:It},average:{h:fe}},On=Zk;var qk={...On,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Be(e,"lab65"),rgb:e=>kt(Be(e,"lab65"))},fromMode:{rgb:e=>Me(wt(e),"lch65"),lab65:e=>Me(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},Kf=qk;var ew=({l:e,u:t,v:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.sqrt(t*t+n*n),i={mode:"lchuv",l:e,c:a};return a&&(i.h=K(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},ml=ew;var tw=({l:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let a={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(a.alpha=r),a},pl=tw;var Qf=(e,t,n)=>4*e/(e+15*t+3*n),zf=(e,t,n)=>9*t/(e+15*t+3*n),nw=Qf(Z.X,Z.Y,Z.Z),rw=zf(Z.X,Z.Y,Z.Z),ow=e=>e<=kn?Rt*e:116*Math.cbrt(e)-16,aw=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=ow(t/Z.Y),i=Qf(e,t,n),c=zf(e,t,n);!isFinite(i)||!isFinite(c)?a=i=c=0:(i=13*a*(i-nw),c=13*a*(c-rw));let u={mode:"luv",l:a,u:i,v:c};return r!==void 0&&(u.alpha=r),u},Tr=aw;var iw=(e,t,n)=>4*e/(e+15*t+3*n),sw=(e,t,n)=>9*t/(e+15*t+3*n),cw=iw(Z.X,Z.Y,Z.Z),lw=sw(Z.X,Z.Y,Z.Z),uw=({l:e,u:t,v:n,alpha:r})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let a=t/(13*e)+cw,i=n/(13*e)+lw,c=Z.Y*(e<=8?e/Rt:Math.pow((e+16)/116,3)),u=c*(9*a)/(4*i),f=c*(12-3*a-20*i)/(4*i),l={mode:"xyz50",x:u,y:c,z:f};return r!==void 0&&(l.alpha=r),l},xr=uw;var dw=e=>ml(Tr(ct(e))),mw=e=>st(xr(pl(e))),pw={mode:"lchuv",toMode:{luv:pl,rgb:mw},fromMode:{rgb:dw,luv:ml},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:R,fixup:pe},c:R,l:R,alpha:{use:R,fixup:V}},difference:{h:It},average:{h:fe}},Jf=pw;var fw={...Pe,mode:"lrgb",toMode:{rgb:Ue},fromMode:{rgb:He},parse:["srgb-linear"],serialize:"srgb-linear"},Xf=fw;var hw={mode:"luv",toMode:{xyz50:xr,rgb:e=>st(xr(e))},fromMode:{xyz50:Tr,rgb:e=>Tr(ct(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:R,u:R,v:R,alpha:{use:R,fixup:V}}},Zf=hw;var gw=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*n),i=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*n),c=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*n),u={mode:"oklab",l:.210454268309314*a+.7936177747023054*i-.0040720430116193*c,a:1.9779985324311684*a-2.42859224204858*i+.450593709617411*c,b:.0259040424655478*a+.7827717124575296*i-.8086757549230774*c};return r!==void 0&&(u.alpha=r),u},sa=gw;var Aw=e=>{let t=sa(He(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Nt=Aw;var bw=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.pow(e+.3963377773761749*t+.2158037573099136*n,3),i=Math.pow(e-.1055613458156586*t-.0638541728258133*n,3),c=Math.pow(e-.0894841775298119*t-1.2914855480194092*n,3),u={mode:"lrgb",r:4.076741636075957*a-3.3077115392580616*i+.2309699031821044*c,g:-1.2684379732850317*a+2.6097573492876887*i-.3413193760026573*c,b:-.0041960761386756*a-.7034186179359362*i+1.7076146940746117*c};return r!==void 0&&(u.alpha=r),u},lt=bw;var yw=e=>Ue(lt(e)),Ot=yw;function Cr(e){let r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function Qt(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function Ew(e,t){let n,r,a,i,c,u,f,l;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,a=.59662641,i=.75515197,c=.56771245,u=4.0767416621,f=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,a=.08285427,i=.1254107,c=.14503204,u=-1.2684380046,f=2.6097574011,l=-.3413193965):(n=1.35733652,r=-.00915799,a=-1.1513021,i=-.50559606,c=.00692167,u=-.0041960863,f=-.7034186147,l=1.707614701);let d=n+r*e+a*t+i*e*e+c*e*t,p=.3963377774*e+.2158037573*t,A=-.1055613458*e-.0638541728*t,E=-.0894841775*e-1.291485548*t;{let N=1+d*p,C=1+d*A,M=1+d*E,I=N*N*N,k=C*C*C,D=M*M*M,H=3*p*N*N,q=3*A*C*C,Ee=3*E*M*M,je=6*p*p*N,Ft=6*A*A*C,ht=6*E*E*M,zt=u*I+f*k+l*D,Dt=u*H+f*q+l*Ee,Fn=u*je+f*Ft+l*ht;d=d-zt*Dt/(Dt*Dt-.5*zt*Fn)}return d}function fl(e,t){let n=Ew(e,t),r=lt({l:1,a:n*e,b:n*t}),a=Math.cbrt(1/Math.max(r.r,r.g,r.b)),i=a*n;return[a,i]}function Sw(e,t,n,r,a,i=null){i||(i=fl(e,t));let c;if((n-a)*i[1]-(i[0]-a)*r<=0)c=i[1]*a/(r*i[0]+i[1]*(a-n));else{c=i[1]*(a-1)/(r*(i[0]-1)+i[1]*(a-n));{let u=n-a,f=r,l=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,p=-.0894841775*e-1.291485548*t,A=u+f*l,E=u+f*d,N=u+f*p;{let C=a*(1-c)+c*n,M=c*r,I=C+M*l,k=C+M*d,D=C+M*p,H=I*I*I,q=k*k*k,Ee=D*D*D,je=3*A*I*I,Ft=3*E*k*k,ht=3*N*D*D,zt=6*A*A*I,Dt=6*E*E*k,Fn=6*N*N*D,vl=4.0767416621*H-3.3077115913*q+.2309699292*Ee-1,ga=4.0767416621*je-3.3077115913*Ft+.2309699292*ht,Zh=4.0767416621*zt-3.3077115913*Dt+.2309699292*Fn,Fl=ga/(ga*ga-.5*vl*Zh),Aa=-vl*Fl,Dl=-1.2684380046*H+2.6097574011*q-.3413193965*Ee-1,ba=-1.2684380046*je+2.6097574011*Ft-.3413193965*ht,qh=-1.2684380046*zt+2.6097574011*Dt-.3413193965*Fn,Ml=ba/(ba*ba-.5*Dl*qh),ya=-Dl*Ml,Bl=-.0041960863*H-.7034186147*q+1.707614701*Ee-1,Ea=-.0041960863*je-.7034186147*Ft+1.707614701*ht,eg=-.0041960863*zt-.7034186147*Dt+1.707614701*Fn,Ll=Ea/(Ea*Ea-.5*Bl*eg),Sa=-Bl*Ll;Aa=Fl>=0?Aa:1e6,ya=Ml>=0?ya:1e6,Sa=Ll>=0?Sa:1e6,c+=Math.min(Aa,Math.min(ya,Sa))}}}return c}function Ir(e,t,n=null){n||(n=fl(e,t));let r=n[0],a=n[1];return[a/r,a/(1-r)]}function ca(e,t,n){let r=fl(t,n),a=Sw(t,n,e,1,e,r),i=Ir(t,n,r),c=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),u=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),f=a/Math.min(e*i[0],(1-e)*i[1]),l=e*c,d=(1-e)*u,p=.9*f*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(d*d*d*d))));return l=e*.4,d=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(d*d))),p,a]}function la(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,a={mode:"okhsl",l:Cr(t)};e.alpha!==void 0&&(a.alpha=e.alpha);let i=Math.sqrt(n*n+r*r);if(!i)return a.s=0,a;let[c,u,f]=ca(t,n/i,r/i),l;if(i<u){let d=0,p=.8*c,A=1-p/u;l=(i-d)/(p+A*(i-d))*.8}else{let d=u,p=.2*u*u*1.25*1.25/c,A=1-p/(f-u);l=.8+.2*((i-d)/(p+A*(i-d)))}return l&&(a.s=l,a.h=K(Math.atan2(r,n)*180/Math.PI)),a}function ua(e){let t=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,r=e.l!==void 0?e.l:0,a={mode:"oklab",l:Qt(r)};if(e.alpha!==void 0&&(a.alpha=e.alpha),!n||r===1)return a.a=a.b=0,a;let i=Math.cos(t/180*Math.PI),c=Math.sin(t/180*Math.PI),[u,f,l]=ca(a.l,i,c),d,p,A,E;n<.8?(d=1.25*n,p=0,A=.8*u,E=1-A/f):(d=5*(n-.8),p=f,A=.2*f*f*1.25*1.25/u,E=1-A/(l-f));let N=p+d*A/(1-E*d);return a.a=N*i,a.b=N*c,a}var Tw={...Xo,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:la,rgb:e=>la(Nt(e))},toMode:{oklab:ua,rgb:e=>Ot(ua(e))}},qf=Tw;function da(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,a=Math.sqrt(n*n+r*r),i=a?n/a:1,c=a?r/a:1,[u,f]=Ir(i,c),l=.5,d=1-l/u,p=f/(a+t*f),A=p*t,E=p*a,N=Qt(A),C=E*N/A,M=lt({l:N,a:i*C,b:c*C}),I=Math.cbrt(1/Math.max(M.r,M.g,M.b,0));t=t/I,a=a/I*Cr(t)/t,t=Cr(t);let k={mode:"okhsv",s:a?(l+f)*E/(f*l+f*d*E):0,v:t?t/A:0};return k.s&&(k.h=K(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(k.alpha=e.alpha),k}function ma(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let n=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,a=e.v!==void 0?e.v:0,i=Math.cos(n/180*Math.PI),c=Math.sin(n/180*Math.PI),[u,f]=Ir(i,c),l=.5,d=1-l/u,p=1-r*l/(l+f-f*d*r),A=r*f*l/(l+f-f*d*r),E=Qt(p),N=A*E/p,C=lt({l:E,a:i*N,b:c*N}),M=Math.cbrt(1/Math.max(C.r,C.g,C.b,0)),I=Qt(a*p),k=A*I/p;return t.l=I*M,t.a=k*i*M,t.b=k*c*M,t}var xw={...Zo,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:da,rgb:e=>da(Nt(e))},toMode:{oklab:ma,rgb:e=>Ot(ma(e))}},eh=xw;function Cw(e,t){if(!t||t[0]!=="oklab")return;let n={mode:"oklab"},[,r,a,i,c]=t;if(!(r.type===_.Hue||a.type===_.Hue||i.type===_.Hue))return r.type!==_.None&&(n.l=Math.min(Math.max(0,r.type===_.Number?r.value:r.value/100),1)),a.type!==_.None&&(n.a=a.type===_.Number?a.value:a.value*.4/100),i.type!==_.None&&(n.b=i.type===_.Number?i.value:i.value*.4/100),c.type!==_.None&&(n.alpha=Math.min(1,Math.max(0,c.type===_.Number?c.value:c.value/100))),n}var th=Cw;var Iw={...Nn,mode:"oklab",toMode:{lrgb:lt,rgb:Ot},fromMode:{lrgb:sa,rgb:Nt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[th],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},nh=Iw;function _w(e,t){if(!t||t[0]!=="oklch")return;let n={mode:"oklch"},[,r,a,i,c]=t;if(r.type!==_.None){if(r.type===_.Hue)return;n.l=Math.min(Math.max(0,r.type===_.Number?r.value:r.value/100),1)}if(a.type!==_.None&&(n.c=Math.max(0,a.type===_.Number?a.value:a.value*.4/100)),i.type!==_.None){if(i.type===_.Percentage)return;n.h=i.value}return c.type!==_.None&&(n.alpha=Math.min(1,Math.max(0,c.type===_.Number?c.value:c.value/100))),n}var rh=_w;var kw={...On,mode:"oklch",toMode:{oklab:e=>Be(e,"oklab"),rgb:e=>Ot(Be(e,"oklab"))},fromMode:{rgb:e=>Me(Nt(e),"oklch"),oklab:e=>Me(e,"oklch")},parse:[rh],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},oh=kw;var ww=e=>{let{r:t,g:n,b:r,alpha:a}=He(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return a!==void 0&&(i.alpha=a),i},hl=ww;var Rw=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=Ue({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(a.alpha=r),a},gl=Rw;var Nw={...Pe,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>gl(Re(e)),xyz65:gl},toMode:{rgb:e=>Ne(hl(e)),xyz65:hl}},ah=Nw;var Al=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},Ow=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a={mode:"prophoto",r:Al(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:Al(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:Al(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(a.alpha=r),a},bl=Ow;var yl=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},vw=e=>{let t=yl(e.r),n=yl(e.g),r=yl(e.b),a={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(a.alpha=e.alpha),a},El=vw;var Fw={...Pe,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:bl,rgb:e=>bl(ct(e))},toMode:{xyz50:El,rgb:e=>st(El(e))}},ih=Fw;var sh=1.09929682680944,Dw=.018053968510807,Sl=e=>{let t=Math.abs(e);return t>Dw?(Math.sign(e)||1)*(sh*Math.pow(t,.45)-(sh-1)):4.5*e},Mw=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a={mode:"rec2020",r:Sl(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Sl(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Sl(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(a.alpha=r),a},Tl=Mw;var ch=1.09929682680944,Bw=.018053968510807,xl=(e=0)=>{let t=Math.abs(e);return t<Bw*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+ch-1)/ch,1/.45)},Lw=e=>{let t=xl(e.r),n=xl(e.g),r=xl(e.b),a={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Cl=Lw;var Pw={...Pe,mode:"rec2020",fromMode:{xyz65:Tl,rgb:e=>Tl(Re(e))},toMode:{xyz65:Cl,rgb:e=>Ne(Cl(e))},parse:["rec2020"],serialize:"rec2020"},lh=Pw;var ft=.0037930732552754493,pa=Math.cbrt(ft);var Il=e=>Math.cbrt(e)-pa,Hw=e=>{let{r:t,g:n,b:r,alpha:a}=He(e),i=Il(.3*t+.622*n+.078*r+ft),c=Il(.23*t+.692*n+.078*r+ft),u=Il(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+ft),f={mode:"xyb",x:(i-c)/2,y:(i+c)/2,b:u-(i+c)/2};return a!==void 0&&(f.alpha=a),f},uh=Hw;var _l=e=>Math.pow(e+pa,3),Uw=({x:e,y:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a=_l(e+t)-ft,i=_l(t-e)-ft,c=_l(n+t)-ft,u=Ue({r:11.031566904639861*a-9.866943908131562*i-.16462299650829934*c,g:-3.2541473810744237*a+4.418770377582723*i-.16462299650829934*c,b:-3.6588512867136815*a+2.7129230459360922*i+1.9459282407775895*c});return r!==void 0&&(u.alpha=r),u},dh=Uw;var jw={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:dh},fromMode:{rgb:uh},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:R,y:R,b:R,alpha:{use:R,fixup:V}}},mh=jw;var Vw={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:st,lab:Rn},fromMode:{rgb:ct,lab:wn},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:R,y:R,z:R,alpha:{use:R,fixup:V}}},ph=Vw;var Ww=e=>{let{x:t,y:n,z:r,alpha:a}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return a!==void 0&&(i.alpha=a),i},fh=Ww;var $w=e=>{let{x:t,y:n,z:r,alpha:a}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return a!==void 0&&(i.alpha=a),i},hh=$w;var Yw={mode:"xyz65",toMode:{rgb:Ne,xyz50:fh},fromMode:{rgb:Re,xyz50:hh},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:R,y:R,z:R,alpha:{use:R,fixup:V}}},gh=Yw;var Gw=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(a.alpha=r),a},Ah=Gw;var Kw=({y:e,i:t,q:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let a={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(a.alpha=r),a},bh=Kw;var Qw={mode:"yiq",toMode:{rgb:bh},fromMode:{rgb:Ah},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:R,i:R,q:R,alpha:{use:R,fixup:V}}},yh=Qw;var bj=G(yf),yj=G(wf),Ej=G(Of),Sj=G(vf),Tj=G(Ff),xj=G(Xo),Cj=G(Zo),Ij=G(Pf),_j=G(Uf),kj=G(Vf),wj=G(Wf),Rj=G(Nn),Nj=G(Yf),Oj=G(On),vj=G(Kf),Fj=G(Jf),Dj=G(Xf),Mj=G(Zf),Bj=G(qf),Lj=G(eh),Pj=G(nh),Hj=G(oh),Uj=G(ah),jj=G(ih),Vj=G(lh),Wj=G(Pe),$j=G(mh),Yj=G(ph),Gj=G(gh),Kj=G(yh);var Ze={body:7,nonBody:4.5,headline:3},vn={onDark:"#FFFFFF",onLight:"#0A0A0A"};var zw=fr("rgb");function wl(e){let t=zw(e);return t?[Math.round(t.r*255),Math.round(t.g*255),Math.round(t.b*255)]:[0,0,0]}function fa(e,t,n){let[r,a,i]=wl(e),[c,u,f]=wl(t),l=Math.max(0,Math.min(1,n)),d=1-l,p=Math.round(r*d+c*l),A=Math.round(a*d+u*l),E=Math.round(i*d+f*l);return"#"+[p,A,E].map(N=>N.toString(16).padStart(2,"0")).join("")}function kl(e){let t=Math.max(0,Math.min(255,e))/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Rl(e){let[t,n,r]=wl(e);return .2126*kl(t)+.7152*kl(n)+.0722*kl(r)}function Eh(e,t){let n=Math.max(0,Math.min(1,e)),r=Math.max(0,Math.min(1,t));return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function _r(e,t){return Eh(Rl(e),Rl(t))}function vt(e,t,n){return _r(e,t)>=n?e:[e,vn.onDark,vn.onLight].reduce((a,i)=>_r(i,t)>_r(a,t)?i:a)}function Jw(e,t){let n=vt(e,t,Ze.body);return _r(n,t)>=Ze.body?{captionScrim:t,captionFg:n}:{captionScrim:vn.onLight,captionFg:vn.onDark}}function Sh(e){let t=e.background,n=vt(e.text,t,Ze.body),r=e.accent,{captionScrim:a,captionFg:i}=Jw(e.text,t),c=fa(t,n,.06),u=fa(t,n,.1),f=fa(t,n,.08),l=fa(r,t,.35),d=vt(n,r,Ze.body),p=vt(n,c,Ze.body);return{background:t,text:n,textMuted:vt(e.text,t,Ze.nonBody),accent:r,captionScrim:a,captionFg:i,surface:c,card:u,gridLine:f,accentMuted:l,textOnAccent:d,textOnSurface:p}}var Xw="br",Zw=8,qw=1500,eR=.5,tR="br";function Th(e){if(!e)return;let t=e.durationMs??(e.kind==="card"?qw:void 0);return{kind:e.kind,...e.src!=null?{src:e.src}:{},...e.title!=null?{title:e.title}:{},...e.subtitle!=null?{subtitle:e.subtitle}:{},...t!=null?{durationMs:t}:{}}}function nR(e,t){let n=Sh({background:e.colors.background,text:e.colors.text,accent:e.colors.accent}),r={primary:e.colors.primary??e.colors.accent,secondary:e.colors.secondary??e.colors.accent,accent:e.colors.accent,accentStrong:e.colors.primary??e.colors.accent,accentSoft:e.colors.accentMuted??n.accentMuted,success:"#22c55e",warning:"#f59e0b",danger:"#ef4444",background:n.background,text:n.text,textMuted:e.colors.textMuted??vt(xh(n.text,n.background,.4),n.background,Ze.nonBody),border:e.colors.border??xh(n.text,n.background,.15),textOnMedia:n.captionFg,surface:e.colors.surface??n.surface,card:e.colors.card??n.card,gridLine:e.colors.gridLine??n.gridLine,accentMuted:e.colors.accentMuted??n.accentMuted,textOnAccent:e.colors.textOnAccent??n.textOnAccent,textOnSurface:e.colors.textOnSurface??n.textOnSurface},a={heading:e.fonts.heading,body:e.fonts.body??e.fonts.heading,caption:Ua(e.fonts).ref},i={base:e.spacing?.base??t*.03,lg:e.spacing?.lg??t*.06,sm:e.spacing?.sm??t*.015},c={fontSizeHeading:e.sizing?.fontSizeHeading??t*.06,fontSizeBody:e.sizing?.fontSizeBody??t*.035,fontSizeLabel:e.sizing?.fontSizeLabel??t*.025,borderRadius:e.sizing?.borderRadius??t*.01},u={duration:e.motion?.duration??200,easing:e.motion?.easing??"ease-out",entrance:e.motion?.entrance??"none",staggerMs:e.motion?.staggerMs??90,exitMs:e.motion?.exitMs??0},f=ja(e).family,l=e.captionProfile,d=I=>l?.plate==="none"?I:vt(I,n.captionScrim,Ze.body),p={fg:l?.emphasisColor?d(l.emphasisColor):n.captionFg,scrim:n.captionScrim,...l?.color?{color:d(l.color)}:{},...l?.highlightColor?{highlightColor:d(l.highlightColor)}:{},...l?.plate?{plate:l.plate}:{},...l?.entrance?{entrance:l.entrance}:{},...l?.entranceMs!=null?{entranceMs:l.entranceMs}:{},...l?.entranceStaggerMs!=null?{entranceStaggerMs:l.entranceStaggerMs}:{},...l?.exitMs!=null?{exitMs:l.exitMs}:{},...f?{fontFamily:f}:{},...l?.fontWeight!=null?{fontWeight:l.fontWeight}:{},...l?.emphasisFontFamily?{emphasisFontFamily:l.emphasisFontFamily}:{},...l?.emphasisScale!=null?{emphasisScale:l.emphasisScale}:{},...l?.emphasisFontWeight!=null?{emphasisFontWeight:l.emphasisFontWeight}:{},...l?.emphasisFontStyle?{emphasisFontStyle:l.emphasisFontStyle}:{},...l?.emphasisTextTransform?{emphasisTextTransform:l.emphasisTextTransform}:{},...l?.emphasisLetterSpacing!=null?{emphasisLetterSpacing:l.emphasisLetterSpacing}:{},...l?.emphasisPlate!=null?{emphasisPlate:l.emphasisPlate}:{},...l?.emphasisPlateColor?{emphasisPlateColor:l.emphasisPlateColor}:{},...l?.emphasisPlateTextColor?{emphasisPlateTextColor:l.emphasisPlateTextColor}:{}},A=e.logo?{src:e.logo.src,...e.logo.alt!=null?{alt:e.logo.alt}:{},placement:e.logo.placement??Xw,sizePct:e.logo.sizePct??Zw}:void 0,E=Th(e.intro),N=Th(e.outro),C=e.watermark?{src:e.watermark.src,opacity:e.watermark.opacity??eR,placement:e.watermark.placement??tR}:void 0,M=e.exemplarKeys&&e.exemplarKeys.length>0?{exemplarKeys:e.exemplarKeys,...e.contactSheetKey?{contactSheetKey:e.contactSheetKey}:{},motifs:e.motifs??[],...e.styleRubric?{styleRubric:e.styleRubric}:{},...e.density?{density:e.density}:{}}:void 0;return{id:e.id,name:e.name,...e.syncCaptions!==void 0?{syncCaptions:e.syncCaptions}:{},colors:r,caption:p,fonts:a,spacing:i,sizing:c,motion:u,...A?{logo:A}:{},...E?{intro:E}:{},...N?{outro:N}:{},...C?{watermark:C}:{},...M?{language:M}:{},...e.audio?{audio:e.audio}:{}}}var rR=["colors","caption","fonts","spacing","sizing","motion"],oR={id:"reference",name:"reference",colors:{primary:"#3b82f6",accent:"#22c55e",background:"#0b0b0f",text:"#f5f5f7"},fonts:{heading:{kind:"system",family:"Inter"}}},aR=1920;function Ih(e,t,n){if(e!=null){if(typeof e=="object"){if(Array.isArray(e))return;for(let[r,a]of Object.entries(e))Ih(a,t?`${t}.${r}`:r,n);return}n.push(t)}}function iR(){let e=nR(oR,aR),t=[];for(let n of rR)Ih(e[n],n,t);return t.map(n=>`$brand:${n}`).sort()}var iV=Object.freeze(iR());function xh(e,t,n){let r=Ch(e),a=Ch(t);if(!r||!a)return e;let i=Math.max(0,Math.min(1,n)),c=1-i,u=Math.round(r.r*c+a.r*i),f=Math.round(r.g*c+a.g*i),l=Math.round(r.b*c+a.b*i);return"#"+[u,f,l].map(d=>d.toString(16).padStart(2,"0")).join("")}function Ch(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();if(!t.startsWith("#"))return null;let n=t.slice(1);return n.length===3?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16)}:n.length===6?{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16)}:null}var ha="birefnet-portrait-coview-h264-v14-rvm-2026.08.27";var uR=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,dR=/^[a-z0-9]{28,40}$/,_h="https://raw.githubusercontent.com/cueframe-ai/cueframe-templates/main",mR=3e3,pR=60*6e4;function wh(e){let t=Nl(e);if(e.endsWith(".cueframe")||kh(t))return{kind:"file",path:t};if(dR.test(e)&&!e.includes("-"))return{kind:"org",id:e};if(uR.test(e))return{kind:"slug",slug:e};throw new Error(`"${e}" is not a .cueframe file, a catalog slug, or a template id.`)}function fR(e){let t=e.indexOf("=");if(t<=0)throw new Error(`--media takes name=<file|https url|sample|media:<id>>, got "${e}".`);let n=e.slice(0,t),r=e.slice(t+1);if(r==="sample")return{name:n,value:{sample:!0}};if(/^media:[A-Za-z0-9_-]+$/.test(r))return{name:n,value:{mediaId:r.slice(6)}};if(/^https:\/\//.test(r))return{name:n,value:{url:r}};if(/^[a-z]+:\/\//.test(r))throw new Error(`--media ${n}: only https URLs can be imported, got "${r}".`);return{name:n,file:Nl(r)}}function hR(e){let t={};for(let n of e){let r=n.indexOf("=");if(r<=0)throw new Error(`--values takes name=value, got "${n}".`);t[n.slice(0,r)]=n.slice(r+1)}return t}function gR(e,t){let n={},r=[],a=new Map(e.parameters.map(i=>[i.name,i]));for(let[i,c]of Object.entries(t)){let u=a.get(i);if(!u){r.push(`${i}: not a parameter of ${e.slug}`);continue}if(u.type==="media"){r.push(`${i}: a media parameter; pass it with --media`);continue}let f=u.type==="number"?c.trim()===""?c:Number(c):u.type==="boolean"?c==="true"?!0:c==="false"?!1:c:c,l=fn(u,f);l.ok?n[i]=l.value:r.push(`${i}: ${l.reason}`)}return{values:n,problems:r}}function AR(e){let t=[],n=jo(e);n.undeclared.length&&t.push(`undeclared parameters: ${n.undeclared.join(", ")}`),n.misplaced.length&&t.push(`references outside a string leaf: ${n.misplaced.join(", ")}`),t.push(...n.mediaSiteErrors);let r={};for(let a of e.parameters)if(a.type==="media"){for(let[i,c]of Object.entries(a.prepared?.mattes??{}))c.bakeVersion!==ha&&t.push(`${a.name}: matte ${i} is ${c.bakeVersion}, the kernel bakes ${ha}`);if(!a.sample){a.required&&t.push(`media parameter ${a.name} has no sample`);continue}r[a.name]={mediaId:`sample:${a.name}`,kind:a.kind,...a.sample.durationSec!==void 0?{durationSec:a.sample.durationSec}:{}}}if(t.length)return t;for(let a of[void 0,...Object.keys(e.presets??{})])try{Mc(e,{},r,a===void 0?{}:{preset:a})}catch(i){t.push(`preset ${a??"(none)"}: ${i instanceof Error?i.message:String(i)}`)}return t}async function Rh(e,t){if(e.kind==="file"){let r=JSON.parse(await lR(e.path,"utf8"));if(r?.v!==1||typeof r.slug!="string")throw new Error(`${e.path} is not a CueFrame template document (v: 1, slug).`);return r}if(e.kind==="slug"){let r=await fetch(`${_h}/templates.json`,{headers:{accept:"application/json"}});if(!r.ok)throw new Error(`The public template catalog answered ${r.status}.`);let a=await r.json();if(a.schemaVersion!==2||!Array.isArray(a.templates))throw new Error("The public template catalog is not schemaVersion 2.");let i=a.templates.find(d=>d.slug===e.slug);if(!i)throw new Error(`The public catalog has no template "${e.slug}".`);if(typeof i.documentSha256!="string"||!/^[a-f0-9]{64}$/.test(i.documentSha256))throw new Error(`The public catalog has no document digest for "${e.slug}".`);let c=`${_h}/artifacts/${i.documentSha256}.cueframe`,u=await fetch(c,{headers:{accept:"application/json"}});if(!u.ok)throw new Error(`The public catalog has no template "${e.slug}" (${u.status}).`);let f=await u.text();if(sR("sha256").update(f).digest("hex")!==i.documentSha256)throw new Error(`The template ${e.slug} changed since the catalog was read. Retry after the catalog refreshes.`);let l=JSON.parse(f);if(l.slug!==e.slug)throw new Error(`The catalog document for ${e.slug} names ${String(l.slug)}.`);return l}return U(t),(await Mt(`/v1/templates/${encodeURIComponent(e.id)}`)).document}async function bR(e,t){return Po(await Rh(e,t))}async function Nh(e,t){let n=Date.now(),r=e.stage;for(;e.status==="preparing";)Date.now()-n>pR&&(v(t,"template_instantiate",new Error(`Template job ${e.jobId} is still preparing after an hour. Reconnect with its job id.`),T.ApiServerError),S(T.ApiServerError)),await new Promise(a=>setTimeout(a,mR)),e=await Mt(`/v1/template-jobs/${encodeURIComponent(e.jobId)}`),e.stage!==r&&(r=e.stage,O(t,"template_job_progress",{jobId:e.jobId,projectId:e.projectId,stage:e.stage}));return e}async function Oh(e,t){U(t.target);let n=await Mt(`/v1/template-jobs/${encodeURIComponent(e)}`);return t.wait&&(n=await Nh(n,t)),j(t,n,()=>console.log(`${n.status} \xB7 ${n.stage}${n.projectId?` \xB7 project ${n.projectId}`:""}`)),t.wait&&n.status!=="ready"&&(v(t,n.errorCode??"template_instantiate",new Error(n.errorMessage??`Template job ${n.jobId} ${n.status}.`),T.ApiServerError),S(T.ApiServerError)),n}async function vh(e,t){let n,r;try{n=wh(e),r=await Rh(n,t.target)}catch(f){v(t,"template_read",f,T.UserError),S(T.UserError)}let a=r?.slug,i;try{let f=Po(r);a=f.slug,i=AR(f)}catch(f){i=[`does not parse: ${f instanceof Error?f.message:String(f)}`]}let c=typeof a=="string"?a:e,u={template:n.kind==="file"?n.path:e,slug:c,ok:i.length===0,problems:i};return j(t,u,()=>{if(i.length===0){console.log(`ok ${c}`);return}console.error(`FAIL ${c}`);for(let f of i)console.error(` ${f}`)}),i.length&&S(T.UserError),u}async function Fh(e,t){let n,r,a,i;try{n=wh(e),r=await bR(n,t.target),a=t.media.map(fR),i=hR(t.values)}catch(k){v(t,"template_read",k,T.UserError),S(T.UserError)}let{values:c,problems:u}=gR(r,i),f=new Map(r.parameters.filter(k=>k.type==="media").map(k=>[k.name,k]));for(let k of a){let D=f.get(k.name);D?k.value&&"sample"in k.value&&!D.sample?u.push(`${k.name}: the template has no sample for it`):k.file&&!kh(k.file)&&u.push(`${k.name}: file not found: ${k.file}`):u.push(`${k.name}: not a media parameter of ${r.slug}`)}t.preset!==void 0&&!r.presets?.[t.preset]&&u.push(`preset ${t.preset}: not one of ${Object.keys(r.presets??{}).join(", ")||"(none)"}`);for(let[k,D]of f)D.required&&!a.some(H=>H.name===k)&&u.push(`${k}: required; pass --media ${k}=<file|https url|media:<id>${D.sample?"|sample":""}>`);u.length&&(v(t,"template_inputs",new Error(u.join(`
62
- `)),T.UserError),S(T.UserError));let l=n.kind==="file"?n.path:e;if(t.dryRun){let k={};for(let H of a){let q=f.get(H.name);k[H.name]={mediaId:`dry_run:${H.name}`,kind:q.kind,...q.sample?.durationSec!==void 0?{durationSec:q.sample.durationSec}:{}}}try{Mc(r,c,k,t.preset?{preset:t.preset}:{})}catch(H){v(t,"template_inputs",H,T.UserError),S(T.UserError)}let D={template:l,slug:r.slug,target:t.target,values:c,media:a.map(H=>H.file??H.value),preset:t.preset??null,render:t.render,output:Nl(t.out),wouldRun:[...n.kind==="file"?["publish the document to your org"]:[],...a.filter(H=>H.file).map(H=>`upload ${H.name}`),"start template preparation job","wait for the ready project",...t.render?["render and download MP4"]:[]]};return j(t,D,()=>console.log(`[dry-run] Template inputs bind. Would create a project from ${r.name}.`)),D}O(t,"template_run_prepare",{template:l,slug:r.slug,target:t.target,preset:t.preset??null}),U(t.target);let d=n.kind==="file"?"":n.kind==="slug"?n.slug:n.id;if(n.kind==="file")try{let k=await Mt("/v1/templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({document:r})});d=k.id,O(t,"template_published",{templateId:d,version:k.version})}catch(k){v(t,"template_publish",k,F(k)),S(F(k))}let p={};for(let k of a){if(k.value){p[k.name]=k.value;continue}let D=await $r(k.file,{target:t.target,analyze:!1,json:t.json});if(!D)throw new Error(`Template run stopped before CueFrame returned a media id for ${k.name}.`);p[k.name]={mediaId:D.mediaItemId}}U(t.target);let A=JSON.stringify({projectName:r.name,values:c,media:p,...t.preset?{preset:t.preset}:{},...t.brandKitId?{brandKitId:t.brandKitId}:{}}),E,N=t.idempotencyKey??cR();O(t,"template_job_request",{templateId:d,idempotencyKey:N});try{E=await Ie(`/v1/templates/${encodeURIComponent(d)}/instantiate`,{method:"POST",headers:{"content-type":"application/json","Idempotency-Key":N},body:A})}catch(k){v(t,"template_instantiate",k,F(k)),S(F(k))}if(E.status>=400){let k=E.body,D=Object.assign(new Error(k?.error?.message??E.statusText),{code:k?.error?.code,status:E.status,details:k?.error?.details});v(t,"template_instantiate",D,se(E.status)),S(se(E.status))}let C=E.body;O(t,"template_job_started",{jobId:C.jobId,projectId:C.projectId,stage:C.stage}),C=await Nh(C,t),(C.status!=="ready"||!C.projectId)&&(v(t,C.errorCode??"template_instantiate",new Error(C.errorMessage??`Template job ${C.jobId} ${C.status}.`),T.ApiServerError),S(T.ApiServerError)),O(t,"template_job_complete",{jobId:C.jobId,projectId:C.projectId});let M=t.render?await Gr(C.projectId,{target:t.target,out:t.out,json:t.json}):void 0,I={template:l,slug:r.slug,templateId:d,jobId:C.jobId,projectId:C.projectId,media:p,...M?{renderId:M.renderId,outputPath:M.outputPath}:{}};return O(t,"template_run_complete",I),t.json||j(t,I,()=>{console.log(`
63
- Project ${C.projectId} created from ${r.name}.`),M&&console.log(`Output: ${M.outputPath}`)}),I}import yR from"open";import{createAuthClient as ER}from"better-auth/client";import{deviceAuthorizationClient as SR}from"better-auth/client/plugins";async function Dh(e){let t=Xt(e.target),n=ER({baseURL:t,fetchOptions:{headers:Nr()},plugins:[SR()]}),r=ce("Requesting device code\u2026",e.json),a;try{let{data:l,error:d}=await n.device.code({client_id:"cueframe-cli",scope:"openid profile email"});(d||!l)&&(r.fail(`Could not start login: ${d?.message??"unknown error"}`),S(T.NetworkError)),a=l}catch(l){r.fail(`Could not start login: ${l instanceof Error?l.message:String(l)}`),S(T.NetworkError)}r.succeed("Device code issued");let i=a.verification_uri_complete??a.verification_uri;Ve("",e),Ve(` Visit: ${i}`,e),Ve(` Code: ${a.user_code}`,e),Ve("",e);try{await yR(i)}catch{}let c=ce("Waiting for approval in browser\u2026",e.json),u=Date.now()+a.expires_in*1e3,f=a.interval*1e3;for(;Date.now()<u;){await new Promise(l=>setTimeout(l,f));try{let{data:l,error:d}=await n.device.token({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:a.device_code,client_id:"cueframe-cli"});if(l?.access_token){let E=l.access_token;Rr(E,e.target,e.url),c.succeed(`Logged in. Token saved for target "${e.target}".`),j(e,{ok:!0,target:e.target,apiUrl:t},()=>{});return}let p=l??d,A=p?.error;A==="authorization_pending"||(A==="slow_down"?f+=5e3:A==="access_denied"?(c.fail("Access denied in the browser."),S(T.UserError)):A==="expired_token"?(c.fail("Device code expired before approval. Run `cueframe login` again."),S(T.UserError)):A&&(c.fail(`Login failed: ${p?.error_description??A}`),S(T.ApiClientError)))}catch{}}c.fail("Timed out waiting for approval. Run `cueframe login` again."),S(T.UserError)}import{readFileSync as TR}from"fs";var Mh=new Set(["GET","POST","PUT","PATCH","DELETE"]);async function Ph(e,t,n){let r=e.toUpperCase();Mh.has(r)||(v(n,"api",new Error(`Unsupported method: ${e}. Allowed: ${[...Mh].join(", ")}.`),T.UserError),S(T.UserError)),t.startsWith("/")||(v(n,"api",new Error(`Path must start with '/'. Got: ${t}`),T.UserError),S(T.UserError)),U(n.target);let a=CR(n.header??[]),i=await IR(n.body,r);i!==void 0&&!a.has("content-type")&&a.set("content-type","application/json");let c;try{c=await Ie(t,{method:r,headers:a,body:i})}catch(f){v(n,"api",f,F(f)),S(F(f))}xR(c,{include:!!n.include,json:!!n.json,method:r,path:t});let u=se(c.status);u!==T.Success&&v(n,"api",Object.assign(new Error(`${r} ${t} \u2192 ${c.status} ${c.statusText}`),{code:c.body?.error?.code,status:c.status}),u),process.exitCode=u}function xR(e,{include:t,json:n,method:r,path:a}){if(n){console.log(JSON.stringify({status:e.status,statusText:e.statusText,headers:e.headers,body:e.body}));return}if(t){process.stdout.write(`HTTP/1.1 ${e.status} ${e.statusText}
64
- `);for(let[i,c]of Object.entries(e.headers))process.stdout.write(`${i}: ${c}
115
+ Re-fetch via GET /v1/projects/${e}/renders/${o} once the URL is signed.`),E(P.ApiServerError));let u=await ml(f.outputUrl,t.out??`./reel-${o.slice(0,8)}.mp4`,t.json);return F(t,"render_complete",{renderId:o,projectId:e,outputUrl:f.outputUrl,outputExpiresAt:f.outputExpiresAt,duration:f.duration,outputPath:u}),{renderId:o,projectId:e,outputUrl:f.outputUrl,outputExpiresAt:f.outputExpiresAt,duration:f.duration,outputPath:u}}import{existsSync as lz}from"fs";import{createHash as bwe,randomUUID as Swe}from"crypto";import{readFile as ywe}from"fs/promises";import{resolve as ll}from"path";function cz(e){let t=e;if(!t||t.v!==1||typeof t.slug!="string")throw new Error("Not a CueFrame template document (v: 1, slug).");return{v:1,slug:t.slug,name:typeof t.name=="string"?t.name:t.slug,parameters:Array.isArray(t.parameters)?t.parameters:[],presets:t.presets}}function dz(e,t){return e==="number"?t.trim()===""?t:Number(t):e==="boolean"?t==="true"?!0:t==="false"?!1:t:t}var vwe=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,wwe=/^[a-z0-9]{28,40}$/,pz="https://raw.githubusercontent.com/cueframe-ai/cueframe-templates/main",Rwe=3e3,Iwe=60*6e4;function uz(e){let t=ll(e);if(e.endsWith(".cueframe")||lz(t))return{kind:"file",path:t};if(wwe.test(e)&&!e.includes("-"))return{kind:"org",id:e};if(vwe.test(e))return{kind:"slug",slug:e};throw new Error(`"${e}" is not a .cueframe file, a catalog slug, or a template id.`)}function Mwe(e){let t=e.indexOf("=");if(t<=0)throw new Error(`--media takes name=<file|https url|sample|media:<id>>, got "${e}".`);let i=e.slice(0,t),a=e.slice(t+1);if(a==="sample")return{name:i,value:{sample:!0}};if(/^media:[A-Za-z0-9_-]+$/.test(a))return{name:i,value:{mediaId:a.slice(6)}};if(/^https:\/\//.test(a))return{name:i,value:{url:a}};if(/^[a-z]+:\/\//.test(a))throw new Error(`--media ${i}: only https URLs can be imported, got "${a}".`);return{name:i,file:ll(a)}}function Owe(e){let t={};for(let i of e){let a=i.indexOf("=");if(a<=0)throw new Error(`--values takes name=value, got "${i}".`);t[i.slice(0,a)]=i.slice(a+1)}return t}function $we(e,t){let i={},a=[],o=new Map(e.parameters.map(r=>[r.name,r]));for(let[r,d]of Object.entries(t)){let p=o.get(r);if(!p){a.push(`${r}: not a parameter of ${e.slug}`);continue}if(p.type==="media"){a.push(`${r}: a media parameter; pass it with --media`);continue}i[r]=dz(p.type,d)}return{values:i,problems:a}}function Twe(e){let t=e.param?`${e.param}: ${e.message}`:e.message;return e.code?`${t} (${e.code})`:t}async function fz(e,t,i){X(t);let a=await ft("/v1/templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({document:e,dryRun:!0,...i})});if(!Array.isArray(a?.problems))throw Object.assign(new Error("The server did not answer a dry run: no problems list came back. The CueFrame API at this target may not support template validation yet."),{code:"template_dry_run_unsupported",exitCode:P.ApiServerError});return a.ok?[]:a.problems.map(Twe)}async function mz(e,t,i,a){let o={},r=new Map(t.parameters.map(p=>[p.name,p]));for(let p of i.mediaArgs)p.value&&"mediaId"in p.value?o[p.name]={mediaId:p.value.mediaId}:r.get(p.name)?.sample&&(o[p.name]={sample:!0});let d;try{d=await fz(e,a.target,{values:i.values,media:o,...i.preset?{preset:i.preset}:{}})}catch(p){let f=W(p);B(a,"template_validate",p,f),E(f)}d.length&&(B(a,"template_inputs",new Error(d.join(`
116
+ `)),P.UserError),E(P.UserError))}async function hz(e,t){if(e.kind==="file"){let a=JSON.parse(await ywe(e.path,"utf8"));if(a?.v!==1||typeof a.slug!="string")throw new Error(`${e.path} is not a CueFrame template document (v: 1, slug).`);return a}if(e.kind==="slug"){let a=await fetch(`${pz}/templates.json`,{headers:{accept:"application/json"}});if(!a.ok)throw new Error(`The public template catalog answered ${a.status}.`);let o=await a.json();if(o.schemaVersion!==2||!Array.isArray(o.templates))throw new Error("The public template catalog is not schemaVersion 2.");let r=o.templates.find(g=>g.slug===e.slug);if(!r)throw new Error(`The public catalog has no template "${e.slug}".`);if(typeof r.documentSha256!="string"||!/^[a-f0-9]{64}$/.test(r.documentSha256))throw new Error(`The public catalog has no document digest for "${e.slug}".`);let d=`${pz}/artifacts/${r.documentSha256}.cueframe`,p=await fetch(d,{headers:{accept:"application/json"}});if(!p.ok)throw new Error(`The public catalog has no template "${e.slug}" (${p.status}).`);let f=await p.text();if(bwe("sha256").update(f).digest("hex")!==r.documentSha256)throw new Error(`The template ${e.slug} changed since the catalog was read. Retry after the catalog refreshes.`);let u=JSON.parse(f);if(u.slug!==e.slug)throw new Error(`The catalog document for ${e.slug} names ${String(u.slug)}.`);return u}return X(t),(await ft(`/v1/templates/${encodeURIComponent(e.id)}`)).document}async function gz(e,t){let i=Date.now(),a=e.stage;for(;e.status==="preparing";)Date.now()-i>Iwe&&(B(t,"template_instantiate",new Error(`Template job ${e.jobId} is still preparing after an hour. Reconnect with its job id.`),P.ApiServerError),E(P.ApiServerError)),await new Promise(o=>setTimeout(o,Rwe)),e=await ft(`/v1/template-jobs/${encodeURIComponent(e.jobId)}`),e.stage!==a&&(a=e.stage,F(t,"template_job_progress",{jobId:e.jobId,projectId:e.projectId,stage:e.stage}));return e}async function xz(e,t){X(t.target);let i=await ft(`/v1/template-jobs/${encodeURIComponent(e)}`);return t.wait&&(i=await gz(i,t)),ee(t,i,()=>console.log(`${i.status} \xB7 ${i.stage}${i.projectId?` \xB7 project ${i.projectId}`:""}`)),t.wait&&i.status!=="ready"&&(B(t,i.errorCode??"template_instantiate",new Error(i.errorMessage??`Template job ${i.jobId} ${i.status}.`),P.ApiServerError),E(P.ApiServerError)),i}async function zz(e,t){let i,a;try{i=uz(e),a=await hz(i,t.target)}catch(f){B(t,"template_read",f,P.UserError),E(P.UserError)}let o;try{o=await fz(a,t.target)}catch(f){let u=W(f);B(t,"template_validate",f,u),E(u)}let r=a?.slug,d=typeof r=="string"?r:e,p={template:i.kind==="file"?i.path:e,slug:d,ok:o.length===0,problems:o};return ee(t,p,()=>{if(o.length===0){console.log(`ok ${d}`);return}console.error(`FAIL ${d}`);for(let f of o)console.error(` ${f}`)}),o.length&&E(P.UserError),p}async function bz(e,t){let i,a,o,r,d;try{i=uz(e),a=await hz(i,t.target),o=cz(a),r=t.media.map(Mwe),d=Owe(t.values)}catch(V){B(t,"template_read",V,P.UserError),E(P.UserError)}let{values:p,problems:f}=$we(o,d),u=new Map(o.parameters.filter(V=>V.type==="media").map(V=>[V.name,V]));for(let V of r){let H=u.get(V.name);H?V.value&&"sample"in V.value&&!H.sample?f.push(`${V.name}: the template has no sample for it`):V.file&&!lz(V.file)&&f.push(`${V.name}: file not found: ${V.file}`):f.push(`${V.name}: not a media parameter of ${o.slug}`)}t.preset!==void 0&&!o.presets?.[t.preset]&&f.push(`preset ${t.preset}: not one of ${Object.keys(o.presets??{}).join(", ")||"(none)"}`);for(let[V,H]of u)H.required&&!r.some(se=>se.name===V)&&f.push(`${V}: required; pass --media ${V}=<file|https url|media:<id>${H.sample?"|sample":""}>`);f.length&&(B(t,"template_inputs",new Error(f.join(`
117
+ `)),P.UserError),E(P.UserError));let g=i.kind==="file"?i.path:e;if(t.dryRun){await mz(a,o,{values:p,mediaArgs:r,preset:t.preset},t);let V={template:g,slug:o.slug,target:t.target,values:p,media:r.map(H=>H.file??H.value),preset:t.preset??null,render:t.render,output:ll(t.out),wouldRun:[...i.kind==="file"?["publish the document to your org"]:[],...r.filter(H=>H.file).map(H=>`upload ${H.name}`),"start template preparation job","wait for the ready project",...t.render?["render and download MP4"]:[]]};return ee(t,V,()=>console.log(`[dry-run] Template inputs bind. Would create a project from ${o.name}.`)),V}F(t,"template_run_prepare",{template:g,slug:o.slug,target:t.target,preset:t.preset??null}),X(t.target);let S=i.kind==="file"?"":i.kind==="slug"?i.slug:i.id;if(i.kind==="file"){await mz(a,o,{values:p,mediaArgs:r,preset:t.preset},t);try{let V=await ft("/v1/templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({document:a})});S=V.id,F(t,"template_published",{templateId:S,version:V.version})}catch(V){B(t,"template_publish",V,W(V)),E(W(V))}}let y={};for(let V of r){if(V.value){y[V.name]=V.value;continue}let H=await za(V.file,{target:t.target,analyze:!1,json:t.json});if(!H)throw new Error(`Template run stopped before CueFrame returned a media id for ${V.name}.`);y[V.name]={mediaId:H.mediaItemId}}X(t.target);let w=JSON.stringify({projectName:o.name,values:p,media:y,...t.preset?{preset:t.preset}:{},...t.brandKitId?{brandKitId:t.brandKitId}:{}}),O,T=t.idempotencyKey??Swe();F(t,"template_job_request",{templateId:S,idempotencyKey:T});try{O=await Le(`/v1/templates/${encodeURIComponent(S)}/instantiate`,{method:"POST",headers:{"content-type":"application/json","Idempotency-Key":T},body:w})}catch(V){B(t,"template_instantiate",V,W(V)),E(W(V))}if(O.status>=400){let V=O.body,H=Object.assign(new Error(V?.error?.message??O.statusText),{code:V?.error?.code,status:O.status,details:V?.error?.details});B(t,"template_instantiate",H,be(O.status)),E(be(O.status))}let j=O.body;F(t,"template_job_started",{jobId:j.jobId,projectId:j.projectId,stage:j.stage}),j=await gz(j,t),(j.status!=="ready"||!j.projectId)&&(B(t,j.errorCode??"template_instantiate",new Error(j.errorMessage??`Template job ${j.jobId} ${j.status}.`),P.ApiServerError),E(P.ApiServerError)),F(t,"template_job_complete",{jobId:j.jobId,projectId:j.projectId});let Z=t.render?await Sa(j.projectId,{target:t.target,out:t.out,json:t.json}):void 0,U={template:g,slug:o.slug,templateId:S,jobId:j.jobId,projectId:j.projectId,media:y,...Z?{renderId:Z.renderId,outputPath:Z.outputPath}:{}};return F(t,"template_run_complete",U),t.json||ee(t,U,()=>{console.log(`
118
+ Project ${j.projectId} created from ${o.name}.`),Z&&console.log(`Output: ${Z.outputPath}`)}),U}import kwe from"open";import{createAuthClient as Cwe}from"better-auth/client";import{deviceAuthorizationClient as Dwe}from"better-auth/client/plugins";async function Sz(e){let t=Ht(e.target),i=Cwe({baseURL:t,fetchOptions:{headers:Xn()},plugins:[Dwe()]}),a=Se("Requesting device code\u2026",e.json),o;try{let{data:u,error:g}=await i.device.code({client_id:"cueframe-cli",scope:"openid profile email"});(g||!u)&&(a.fail(`Could not start login: ${g?.message??"unknown error"}`),E(P.NetworkError)),o=u}catch(u){a.fail(`Could not start login: ${u instanceof Error?u.message:String(u)}`),E(P.NetworkError)}a.succeed("Device code issued");let r=o.verification_uri_complete??o.verification_uri;Ke("",e),Ke(` Visit: ${r}`,e),Ke(` Code: ${o.user_code}`,e),Ke("",e);try{await kwe(r)}catch{}let d=Se("Waiting for approval in browser\u2026",e.json),p=Date.now()+o.expires_in*1e3,f=o.interval*1e3;for(;Date.now()<p;){await new Promise(u=>setTimeout(u,f));try{let{data:u,error:g}=await i.device.token({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:o.device_code,client_id:"cueframe-cli"});if(u?.access_token){let w=u.access_token;Kn(w,e.target,e.url),d.succeed(`Logged in. Token saved for target "${e.target}".`),ee(e,{ok:!0,target:e.target,apiUrl:t},()=>{});return}let S=u??g,y=S?.error;y==="authorization_pending"||(y==="slow_down"?f+=5e3:y==="access_denied"?(d.fail("Access denied in the browser."),E(P.UserError)):y==="expired_token"?(d.fail("Device code expired before approval. Run `cueframe login` again."),E(P.UserError)):y&&(d.fail(`Login failed: ${S?.error_description??y}`),E(P.ApiClientError)))}catch{}}d.fail("Timed out waiting for approval. Run `cueframe login` again."),E(P.UserError)}import{readFileSync as _we}from"fs";var yz=new Set(["GET","POST","PUT","PATCH","DELETE"]);async function Rz(e,t,i){let a=e.toUpperCase();yz.has(a)||(B(i,"api",new Error(`Unsupported method: ${e}. Allowed: ${[...yz].join(", ")}.`),P.UserError),E(P.UserError)),t.startsWith("/")||(B(i,"api",new Error(`Path must start with '/'. Got: ${t}`),P.UserError),E(P.UserError)),X(i.target);let o=Ewe(i.header??[]),r=await Pwe(i.body,a);r!==void 0&&!o.has("content-type")&&o.set("content-type","application/json");let d;try{d=await Le(t,{method:a,headers:o,body:r})}catch(f){B(i,"api",f,W(f)),E(W(f))}jwe(d,{include:!!i.include,json:!!i.json,method:a,path:t});let p=be(d.status);p!==P.Success&&B(i,"api",Object.assign(new Error(`${a} ${t} \u2192 ${d.status} ${d.statusText}`),{code:d.body?.error?.code,status:d.status}),p),process.exitCode=p}function jwe(e,{include:t,json:i,method:a,path:o}){if(i){console.log(JSON.stringify({status:e.status,statusText:e.statusText,headers:e.headers,body:e.body}));return}if(t){process.stdout.write(`HTTP/1.1 ${e.status} ${e.statusText}
119
+ `);for(let[r,d]of Object.entries(e.headers))process.stdout.write(`${r}: ${d}
65
120
  `);process.stdout.write(`
66
- `),Bh(e.body,e.status>=400);return}if(e.status===204||e.body===null){console.error(`${r} ${a} \u2192 ${e.status} (no content)`);return}Bh(e.body,e.status>=400)}function Bh(e,t){let n=t?process.stderr:process.stdout;e!=null&&(typeof e=="string"?n.write(e.endsWith(`
121
+ `),vz(e.body,e.status>=400);return}if(e.status===204||e.body===null){console.error(`${a} ${o} \u2192 ${e.status} (no content)`);return}vz(e.body,e.status>=400)}function vz(e,t){let i=t?process.stderr:process.stdout;e!=null&&(typeof e=="string"?i.write(e.endsWith(`
67
122
  `)?e:e+`
68
- `):n.write(JSON.stringify(e,null,2)+`
69
- `))}function CR(e){let t=new Headers;for(let n of e){let r=n.indexOf(":");r===-1&&(console.error(`Invalid --header (expected "Name: value"): ${n}`),S(T.UserError));let a=n.slice(0,r).trim(),i=n.slice(r+1).trim();t.set(a,i)}return t}async function IR(e,t){if(e){if(e.startsWith("@")){let n=e.slice(1);return n==="-"?Lh():TR(n,"utf-8")}return e}if(!(t==="GET"||t==="DELETE")&&!process.stdin.isTTY)return Lh()}async function Lh(){let e=[];for await(let t of process.stdin)e.push(Buffer.isBuffer(t)?t:Buffer.from(t));return Buffer.concat(e).toString("utf-8")}var Hh=/#\/components\/schemas\/([A-Za-z0-9_]+)/g;function _R(e,t){let n=new Set,r=[t];for(;r.length;){let a=r.pop();if(n.has(a)||!(a in e))continue;n.add(a);let i=JSON.stringify(e[a]),c;for(Hh.lastIndex=0;c=Hh.exec(i);)r.push(c[1])}return n}function kR(e){let t=e?.paths??{};for(let n of Object.values(t))if(n?.put?.operationId==="putComposition"){let r=n.put?.requestBody?.content?.["application/json"]?.schema?.$ref,a=typeof r=="string"?r.match(/#\/components\/schemas\/(.+)$/):null;if(a)return a[1]}return null}async function Uh(e,t){e!=="composition"&&(console.error(`Unknown schema '${e}'. Supported: composition.`),S(T.UserError)),Pl({baseUrl:Xt(t.target),headers:Nr()});let n;try{n=await Ie("/v1/openapi.json",{method:"GET"})}catch(l){v(t,"schema",l,T.NetworkError),S(T.NetworkError)}if(n.status>=400){let l=se(n.status);v(t,"schema",new Error(`Failed to fetch /v1/openapi.json (${n.status})`),l),S(l)}let r=n.body,a=r?.components?.schemas??{},i=kR(r);(!i||!(i in a))&&(v(t,"schema",new Error("Could not locate the composition schema in openapi.json (putComposition body ref not found)."),T.ApiServerError),S(T.ApiServerError));let c=_R(a,i);c.delete(i);let u={};for(let l of[...c].sort())u[l]=a[l];let f={name:i,schema:a[i],referenced:u};j(t,f,()=>{console.log(JSON.stringify(f,null,2))})}import{writeFileSync as wR}from"fs";import{resolve as RR}from"path";var jh=1800*1e3,NR=5e3;async function Ol(e,t){X(t.projectId,"projectId",t),X(t.suggestionId,"suggestionId",t),U(t.target),O(t,"export_prepare",{projectId:t.projectId,suggestionId:t.suggestionId,format:e,target:t.target});let n=ce(`Queuing ${e} export\u2026`,t.json),r;try{r=(await(e==="fcpxml"?wr.createFcpxmlExport:wr.createPremiereExport)(t.projectId,{clipSuggestionId:t.suggestionId})).id,n.succeed(`Export queued: ${r}`)}catch(f){n.fail(`Failed: ${ee(f)}`),oe(t,"export_prepare",f,F(f)),S(F(f))}if(O(t,"export_queued",{exportId:r,projectId:t.projectId,format:e}),!t.wait){Ve(`Poll status with: cueframe api GET /v1/projects/${t.projectId}/exports/${r}`,t);return}let a=await OR(t.projectId,r,t);a.kind==="failed"&&(v(t,"export_progress",Object.assign(new Error(a.message),a.error?{details:a.error}:{}),T.ApiServerError),t.json||console.error(`Export failed: ${a.message}`),S(T.ApiServerError)),a.outputUrl||(v(t,"export_complete",new Error("Export reported complete but no outputUrl was returned."),T.ApiServerError),t.json||console.error(`Export reported complete but no outputUrl was returned.
70
- Export ID: ${r}
71
- Re-fetch via GET /v1/projects/${t.projectId}/exports/${r}.`),S(T.ApiServerError));let c=t.out??`./export-${r.slice(0,8)}.zip`,u=await vR(a.outputUrl,c,t.json);O(t,"export_complete",{exportId:r,projectId:t.projectId,format:e,outputUrl:a.outputUrl,outputExpiresAt:a.outputExpiresAt,outputSizeBytes:a.outputSizeBytes,trimCacheHit:a.trimCacheHit,outputPath:u})}async function OR(e,t,n){let r=Date.now()+(n.timeoutMs??jh),a=n.pollIntervalMs??NR,i=Date.now(),c=ce("Exporting\u2026",n.json);try{for(;Date.now()<r;){let u;try{u=await wr.getExport(e,t)}catch(d){if(d instanceof Le&&d.status>=500){await Vh(a);continue}throw c.fail(`Failed to poll: ${ee(d)}`),d}let f=Math.round((Date.now()-i)/1e3),l=Math.round((u.progress??0)*100);if(c.text=`Exporting\u2026 ${u.status}${l>0?` \xB7 ${l}%`:""} (${f}s)`,O(n,"export_progress",{exportId:t,status:u.status,progress:u.progress,elapsedSec:f}),u.status==="complete")return c.succeed(`Export complete (${f}s)`),{kind:"complete",outputUrl:u.outputUrl??null,outputExpiresAt:u.outputExpiresAt??null,outputSizeBytes:u.outputSizeBytes??null,trimCacheHit:u.trimCacheHit??null};if(u.status==="error"||u.status==="cancelled"){let d=u.error?.message??`Export ${u.status}`;return c.fail(d),{kind:"failed",message:d,error:u.error?{phase:u.error.phase,retryable:!!u.error.retryable}:null}}await Vh(a)}return c.fail(`Timed out waiting for export (${Math.round((Date.now()-i)/1e3)}s)`),{kind:"failed",message:`Timed out after ${Math.round((n.timeoutMs??jh)/1e3)}s`,error:null}}catch(u){v(n,"export_progress",u,F(u)),S(F(u))}}async function vR(e,t,n){let r=RR(t),a=ce(`Downloading \u2192 ${r}\u2026`,n);try{let i=await fetch(e);if(!i.ok)throw new Error(`HTTP ${i.status}`);let c=Buffer.from(await i.arrayBuffer());return wR(r,c),a.succeed(`Saved: ${r} (${(c.length/1024/1024).toFixed(1)} MB)`),r}catch(i){a.fail(`Download failed: ${ee(i)}`),n||console.error(`
72
- Export URL (7-day TTL): ${e}`),S(T.NetworkError)}}function Vh(e){return new Promise(t=>setTimeout(t,e))}async function Wh(e){U(e.target),O(e,"sessions_list_prepare",{});try{let t=await Dn.listSessions();O(e,"sessions_list_complete",{count:t.data.length}),j(e,t,()=>{if(t.data.length===0){console.log("No sessions yet. Create one with `cueframe sessions create --name <n> --files <mediaId:role> \u2026`");return}for(let n of t.data){let r=n.muxStatus??"pending";console.log(`${n.id} ${n.fileCount} files mux:${r} ${n.name}`)}t.pagination.hasMore&&console.log(`# more \u2014 pass --after ${t.pagination.nextCursor} (raw via \`cueframe api\`)`)})}catch(t){v(e,"sessions_list",t,F(t)),S(F(t))}}async function $h(e,t){X(e,"sessionId",t),U(t.target),O(t,"sessions_get_prepare",{sessionId:e});try{let n=await Dn.getSession(e);O(t,"sessions_get_complete",{sessionId:e}),j(t,n,()=>{console.log(JSON.stringify(n,null,2))})}catch(n){v(t,"sessions_get",n,F(n)),S(F(n))}}async function Yh(e){e.name||(console.error("--name is required"),S(T.UserError)),(!e.files||e.files.length===0)&&(console.error("At least one --file <mediaId:role> is required"),S(T.UserError));let t=e.files.map((n,r)=>{let a=n.indexOf(":");return a===-1&&(console.error(`--file[${r}] must be <mediaId>:<role>. Got: ${n}`),S(T.UserError)),{mediaId:n.slice(0,a).trim(),role:n.slice(a+1).trim()}});U(e.target),O(e,"sessions_create_prepare",{name:e.name,fileCount:t.length});try{let n=await Dn.createSession({name:e.name,files:t});O(e,"sessions_create_complete",{sessionId:n.id}),j(e,n,()=>{console.log(`Session created: ${n.id}`),console.log(JSON.stringify(n,null,2))})}catch(n){v(e,"sessions_create",n,F(n)),S(F(n))}}async function Gh(e,t){X(e,"sessionId",t),U(t.target),O(t,"sessions_delete_prepare",{sessionId:e});try{await Dn.deleteSession(e),O(t,"sessions_delete_complete",{sessionId:e}),j(t,{ok:!0,sessionId:e},()=>{console.log(`Session ${e} deleted.`)})}catch(n){v(t,"sessions_delete",n,F(n)),S(F(n))}}function Kh(e){let t=e.commands.map(Kh);return{name:e.name(),description:e.description(),arguments:e.registeredArguments.map(n=>({name:n.name(),required:n.required,description:n.description})),options:e.options.map(n=>({flags:n.flags,description:n.description,...n.defaultValue!==void 0?{default:n.defaultValue}:{}})),...t.length>0?{subcommands:t}:{}}}function Qh(e,t){let n=e.commands.map(Kh);if(t.json){O(t,"describe_complete",{name:e.name(),version:e.version()??null,commands:n});return}console.log(`${e.name()} ${e.version()??""}`.trim());for(let r of n){console.log(`
73
- ${r.name} \u2014 ${r.description}`);for(let a of r.subcommands??[])console.log(` ${r.name} ${a.name} \u2014 ${a.description}`)}}var zh=["prod","dev","local"];function he(e){if(e===void 0)return"prod";if(zh.includes(e))return e;console.error(`Invalid --target ${e}. Allowed: ${zh.join(", ")}.`),S(T.UserError)}function Jh(e){if(!e)return;let t=parseInt(e,10);if(t===24||t===25||t===30||t===60)return t;console.error(`Invalid --fps ${e}. Allowed: 24, 25, 30, 60.`),S(T.UserError)}async function Xh(){let e=new FR;e.name("cueframe").description("AI-assisted video editing and rendering").version("0.4.10").option("--json","Emit a structured JSON document on stdout instead of human-formatted output. Spinners are silenced.").option("--dry-run","Validate inputs and report what would happen \u2014 no API calls, no mutations. Applies to upload, analyze, project create, render.");let t=()=>e.opts();e.command("install").description('One-line setup: wire the CueFrame MCP server into every installed agent (Claude Code / Cursor / Codex) and install the agent skills. No API key \u2014 auth is a browser "Allow" on first call.').option("-t, --target <target>","Target environment: prod (default), dev, local").option("-f, --force","Replace locally changed or untracked skills, retaining backups").action(p=>nu({json:t().json,target:he(p.target),dryRun:t().dryRun,force:p.force})),e.command("init").description("Scaffold a CueFrame component workspace (cueframe.json + components dir) in the current repo, so `new component` has a home and the render harness can discover it.").action(()=>au({json:t().json,dryRun:t().dryRun})),e.command("new").description("Scaffold new owned source in the component workspace").command("component").description("Scaffold a blank custom component in cueframe/components/<name>").argument("<name>","Component id (e.g. my-badge)").option("-f, --force","Overwrite an existing non-empty component dir").action((p,A)=>bu(p,{json:t().json,dryRun:t().dryRun,force:A.force})),e.command("push").description("Publish a locally-authored component (cueframe/components/<id>/index.tsx) to CueFrame so it renders server-side. Upserts by id.").argument("[id]","Component id to push (omit and use `cueframe sync` to push all)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((p,A)=>Tu(p,{target:he(A.target),json:t().json})),e.command("sync").description("Publish EVERY component in the workspace (cueframe/components/*) to CueFrame. Upserts each by id.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(p=>xu({target:he(p.target),json:t().json}));let r=e.command("keys").description("Manage API keys. `keys create` mints a scoped key \u2014 run `cueframe login` first (keys cannot mint keys).");r.command("create").description("Mint a scoped API key (cf_*). Requires a logged-in session.").requiredOption("-n, --name <name>","Key name, e.g. ci-runner").option("-s, --scope <scope>","Comma-separated resource:actions, e.g. media:rw,projects:rw,renders:rw (resources: media,sessions,projects,renders,webhooks; actions r/w)").option("--preset <preset>","Scope preset instead of --scope: readonly (read all) | editall (read+write all)").option("--expires <days>","Expire after N days (default: never)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(p=>Iu({...p,target:he(p.target),json:t().json})),r.command("list").description("List your API keys.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(p=>_u({target:he(p.target),json:t().json})),r.command("revoke").description("Revoke an API key by id.").argument("<keyId>","Key id (from `cueframe keys list`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((p,A)=>ku(p,{target:he(A.target),json:t().json})),e.command("login").description("Browser-mediated sign-in (OAuth device flow). Recommended for laptops.").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--url <url>","Override the API base URL (advanced)").action(p=>Dh({...p,target:he(p.target),json:t().json})),e.command("auth").description("Save a static API key (cf_live_\u2026 / cf_test_\u2026). Use for CI / headless environments.").argument("<api-key>","Your CueFrame API key").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--url <url>","Override the API base URL (advanced)").action((p,A)=>{let E=he(A.target);Wl(p),Rr(p,E,A.url),t().json?console.log(JSON.stringify({ok:!0,target:E},null,2)):console.log(`API key saved for target "${E}"`)}),e.command("list").description("List projects").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-n, --limit <n>","Max projects to show","10").action(p=>wu({target:he(p.target),limit:parseInt(p.limit),json:t().json}));let a=e.command("project").description("Project commands");a.command("create").description("Create a new project. With --from-suggestion, atomically build the composition from a clip suggestion in one round-trip \u2014 the project is then immediately renderable via `cueframe render <projectId>`.").requiredOption("-n, --name <name>","Project name").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9","9:16").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("--brand-kit <id>","Bind a brand kit id to the project").option("--from-suggestion <sug>","Clip suggestion publicId (sug_\u2026) \u2014 atomically builds the composition after project creation so render needs no further args").option("--cheap","With --from-suggestion: use the deterministic translator (no LLM, ~100ms) instead of the AI authoring pass. Useful for tests / programmatic flows.").action(async p=>{await Hu({name:p.name,target:he(p.target),aspect:p.aspect,fps:Jh(p.fps),resolution:p.resolution,brandKitId:p.brandKit,fromSuggestion:p.fromSuggestion,cheap:p.cheap,json:t().json,dryRun:t().dryRun})}),a.command("delete").description("Permanently delete a project (irreversible cleanup \u2014 removes the composition and render history).").argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((p,A)=>Uu(p,{target:he(A.target),json:t().json})),e.command("media").description("Media library cleanup commands").command("delete").description("Permanently delete a media item (irreversible cleanup \u2014 removes the source and its derived assets).").argument("<mediaId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((p,A)=>ju(p,{target:he(A.target),json:t().json})),e.command("upload").description("Upload a video file and process it").argument("<file>","Path to video file").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --analyze","Run clip analysis after processing completes").option("-r, --audio-role <role>","Declare the audio role (vo|music|sfx|ambience) \u2014 routes ingest enrichment: vo\u2192transcript, music\u2192beat grid, sfx/ambience\u2192envelope").action(async(p,A)=>{await $r(p,{target:he(A.target),analyze:A.analyze,audioRole:A.audioRole,json:t().json,dryRun:t().dryRun})}),e.command("analyze").description("Trigger AI clip suggestion analysis for a media item").argument("<mediaItemId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-w, --wait","Wait for analysis to complete and show results").action((p,A)=>Gl(p,{target:he(A.target),wait:A.wait,json:t().json,dryRun:t().dryRun})),e.command("clips").description("List AI-generated clip suggestions for a media item").argument("[mediaItemId]","Media item ID (omit to list your media library)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((p,A)=>Fu(p,{target:he(A.target),json:t().json}));let c=e.command("template").description("Run or validate a CueFrame template document (.cueframe), from the public catalog or your org");c.command("run").description("Start a template preparation job, wait for the ready project, and render").argument("<template>","Catalog slug (cueframe-ai/cueframe-templates), a template id in your org, or a local .cueframe document").option("-m, --media <name=source...>","A media parameter: name=<file|https url|sample|media:<id>> (repeatable)",[]).option("-v, --values <name=value...>","A parameter value: name=value (repeatable); coerced by the document",[]).option("-p, --preset <name>","A preset of the document; its values fill what --values leaves out").option("--brand-kit <id>","Apply with one of your org brand kits instead of the template's").option("--idempotency-key <key>","Reuse this key to safely retry a start request whose response was lost").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output MP4 path","./template-output.mp4").option("--no-render","Create the editable project without rendering it").action(async(p,A)=>{await Fh(p,{media:A.media,values:A.values,preset:A.preset,brandKitId:A.brandKit,idempotencyKey:A.idempotencyKey,out:A.out,target:he(A.target),render:A.render!==!1,json:t().json,dryRun:t().dryRun})}),c.command("status").description("Read a template preparation job; use --wait to reconnect until it is ready").argument("<jobId>","Job id returned by template run").option("--wait","Poll until ready, failed, or cancelled").option("-t, --target <target>","Target environment: prod (default), dev, local").action(async(p,A)=>{await Oh(p,{target:he(A.target),json:t().json,wait:A.wait})}),c.command("validate").description("Check a template document offline: its references, every preset bound with the sample media, its prepared mattes. No account needed for a file or a catalog slug.").argument("<template>","Catalog slug, a template id in your org, or a local .cueframe document").option("-t, --target <target>","Target environment (only for a template id in your org): prod (default), dev, local").action(async(p,A)=>{await vh(p,{target:he(A.target),json:t().json})});let u=e.command("render").description("Render a project to MP4 (queues, watches via SSE, downloads). Renders whatever composition is saved on the project \u2014 build it first via `project create --from-suggestion` or `composition from-suggestion`.").allowExcessArguments(!1).argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9 (defaults to project format)").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("-o, --out <path>","Output file path (default: ./reel-<id>.mp4)").option("--idempotency-key <key>",'Override the auto-derived Idempotency-Key. Default: sha256("render:<projectId>:<currentCompositionETag>"). Pass a fresh UUID to force a new render row.').option("--priority <p>","Routing intent: interactive (low-latency, access-gated), standard (default), background (lowest queue weight).").option("--intent <i>","Encode-quality hint: preview (fast / low-bitrate, for editor scrubbing) or final (default, full Format).").action(async(p,A)=>{await Gr(p,{target:A.target,aspect:A.aspect,fps:Jh(A.fps),resolution:A.resolution,out:A.out,json:t().json,dryRun:t().dryRun,...A.idempotencyKey?{idempotencyKey:A.idempotencyKey}:{},...A.priority?{priority:A.priority}:{},...A.intent?{intent:A.intent}:{}})});e.command("api").description("Raw API call against the v1 surface (escape hatch \u2014 like `gh api`).").argument("<method>","HTTP method: GET, POST, PUT, PATCH, DELETE").argument("<path>","API path starting with /v1, e.g. /v1/projects").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-b, --body <body>","Request body (inline JSON, @file.json to read from disk, @- for stdin)").option("-H, --header <header...>",'Additional header (repeatable), e.g. -H "If-Match: \\"abc\\""').option("-i, --include","Include response status line + headers in stdout (curl-style). Lets agents read ETag etc.").action((p,A,E)=>Ph(p,A,{target:E.target,body:E.body,header:E.header,include:E.include,json:t().json})),e.command("schema").description("Print the live composition wire schema from the server (/v1/openapi.json) \u2014 discover the contract instead of guessing.").argument("[resource]","Schema to print (currently: composition)","composition").option("-t, --target <target>","Target environment: prod (default), dev, local").action((p,A)=>Uh(p,{target:A.target,json:t().json}));let f=e.command("composition").description("Read/write a project's composition. ETag is threaded automatically.");f.command("validate").description("Validate a composition body against the live schema WITHOUT saving or rendering. Returns per-field errors \u2014 author safely before paying for a render.").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(async p=>{await Bu({target:p.target,body:p.body,json:t().json})}),f.command("get").description("Fetch the project's composition and ETag").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((p,A)=>Du(p,{target:A.target,json:t().json})),f.command("put").description("Replace the composition. GETs ETag first for safe concurrent writes.").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), dev, local").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite \u2014 may clobber concurrent edits)").action(async(p,A)=>{await Mu(p,{target:A.target,body:A.body,ifMatch:A.ifMatch,force:A.force,json:t().json})}),f.command("from-suggestion").description("Build the composition from an existing clip suggestion").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--format <json>",`Optional format override, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`).option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite)").action((p,A)=>Yr(p,{target:A.target,suggestionId:A.suggestion,format:A.format,ifMatch:A.ifMatch,force:A.force,json:t().json})),u.command("watch").description("Reattach to an existing render and stream progress to terminal state").argument("<renderId>","Render ID (from `cueframe render` output)").requiredOption("-p, --project <projectId>","Project the render belongs to").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--no-download","Print the MP4 URL but skip downloading the file").option("-o, --out <path>","Output file path when downloading (default: ./reel-<id>.mp4)").action((p,A,E)=>{let N=E?.parent?.opts?.()?.target??A.target;return Wu(p,{target:N,project:A.project,out:A.out,download:A.download!==!1,json:t().json})});let l=e.command("export").description("Hand the timeline off to a real NLE (Final Cut Pro / Premiere Pro)");l.command("fcpxml").description("Build a Final Cut Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((p,A)=>Ol("fcpxml",{target:A.target,projectId:p,suggestionId:A.suggestion,out:A.out,wait:A.wait,json:t().json})),l.command("premiere").description("Build a Premiere Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((p,A)=>Ol("premiere",{target:A.target,projectId:p,suggestionId:A.suggestion,out:A.out,wait:A.wait,json:t().json}));let d=e.command("sessions").description("Multi-file ingest sessions (camera A/B/screen \u2192 muxed composition)");d.command("list").description("List sessions in this org").option("-t, --target <target>","Target environment: prod (default), dev, local").action(p=>Wh({target:p.target,json:t().json})),d.command("get").description("Get a single session by ID").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((p,A)=>$h(p,{target:A.target,json:t().json})),d.command("create").description("Create a session from one or more media files").requiredOption("-n, --name <name>","Session name").requiredOption("-f, --file <entry...>","Each entry is <mediaId>:<role> (repeatable)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(p=>Yh({target:p.target,name:p.name,files:p.file,json:t().json})),d.command("delete").description("Delete a session (server checks for compositions referencing it)").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((p,A)=>Gh(p,{target:A.target,json:t().json})),e.command("describe").description("Print the CLI command tree as structured JSON (agent introspection)").action(()=>Qh(e,{json:t().json}));try{await e.parseAsync()}catch(p){let A=F(p);v(t(),"cli",Object.assign(new Error(ee(p)),{code:p?.code,status:p?.status}),A),S(A)}}await Xh();
123
+ `):i.write(JSON.stringify(e,null,2)+`
124
+ `))}function Ewe(e){let t=new Headers;for(let i of e){let a=i.indexOf(":");a===-1&&(console.error(`Invalid --header (expected "Name: value"): ${i}`),E(P.UserError));let o=i.slice(0,a).trim(),r=i.slice(a+1).trim();t.set(o,r)}return t}async function Pwe(e,t){if(e){if(e.startsWith("@")){let i=e.slice(1);return i==="-"?wz():_we(i,"utf-8")}return e}if(!(t==="GET"||t==="DELETE")&&!process.stdin.isTTY)return wz()}async function wz(){let e=[];for await(let t of process.stdin)e.push(Buffer.isBuffer(t)?t:Buffer.from(t));return Buffer.concat(e).toString("utf-8")}var Iz=/#\/components\/schemas\/([A-Za-z0-9_]+)/g;function Lwe(e,t){let i=new Set,a=[t];for(;a.length;){let o=a.pop();if(i.has(o)||!(o in e))continue;i.add(o);let r=JSON.stringify(e[o]),d;for(Iz.lastIndex=0;d=Iz.exec(r);)a.push(d[1])}return i}function Vwe(e){let t=e?.paths??{};for(let i of Object.values(t))if(i?.put?.operationId==="putComposition"){let a=i.put?.requestBody?.content?.["application/json"]?.schema?.$ref,o=typeof a=="string"?a.match(/#\/components\/schemas\/(.+)$/):null;if(o)return o[1]}return null}async function Mz(e,t){e!=="composition"&&(console.error(`Unknown schema '${e}'. Supported: composition.`),E(P.UserError)),gl({baseUrl:Ht(t.target),headers:Xn()});let i;try{i=await Le("/v1/openapi.json",{method:"GET"})}catch(u){B(t,"schema",u,P.NetworkError),E(P.NetworkError)}if(i.status>=400){let u=be(i.status);B(t,"schema",new Error(`Failed to fetch /v1/openapi.json (${i.status})`),u),E(u)}let a=i.body,o=a?.components?.schemas??{},r=Vwe(a);(!r||!(r in o))&&(B(t,"schema",new Error("Could not locate the composition schema in openapi.json (putComposition body ref not found)."),P.ApiServerError),E(P.ApiServerError));let d=Lwe(o,r);d.delete(r);let p={};for(let u of[...d].sort())p[u]=o[u];let f={name:r,schema:o[r],referenced:p};ee(t,f,()=>{console.log(JSON.stringify(f,null,2))})}import{writeFileSync as Awe}from"fs";import{resolve as Fwe}from"path";var Oz=1800*1e3,Uwe=5e3;async function ul(e,t){ue(t.projectId,"projectId",t),ue(t.suggestionId,"suggestionId",t),X(t.target),F(t,"export_prepare",{projectId:t.projectId,suggestionId:t.suggestionId,format:e,target:t.target});let i=Se(`Queuing ${e} export\u2026`,t.json),a;try{a=(await(e==="fcpxml"?Jn.createFcpxmlExport:Jn.createPremiereExport)(t.projectId,{clipSuggestionId:t.suggestionId})).id,i.succeed(`Export queued: ${a}`)}catch(f){i.fail(`Failed: ${ge(f)}`),ze(t,"export_prepare",f,W(f)),E(W(f))}if(F(t,"export_queued",{exportId:a,projectId:t.projectId,format:e}),!t.wait){Ke(`Poll status with: cueframe api GET /v1/projects/${t.projectId}/exports/${a}`,t);return}let o=await Nwe(t.projectId,a,t);o.kind==="failed"&&(B(t,"export_progress",Object.assign(new Error(o.message),o.error?{details:o.error}:{}),P.ApiServerError),t.json||console.error(`Export failed: ${o.message}`),E(P.ApiServerError)),o.outputUrl||(B(t,"export_complete",new Error("Export reported complete but no outputUrl was returned."),P.ApiServerError),t.json||console.error(`Export reported complete but no outputUrl was returned.
125
+ Export ID: ${a}
126
+ Re-fetch via GET /v1/projects/${t.projectId}/exports/${a}.`),E(P.ApiServerError));let d=t.out??`./export-${a.slice(0,8)}.zip`,p=await qwe(o.outputUrl,d,t.json);F(t,"export_complete",{exportId:a,projectId:t.projectId,format:e,outputUrl:o.outputUrl,outputExpiresAt:o.outputExpiresAt,outputSizeBytes:o.outputSizeBytes,trimCacheHit:o.trimCacheHit,outputPath:p})}async function Nwe(e,t,i){let a=Date.now()+(i.timeoutMs??Oz),o=i.pollIntervalMs??Uwe,r=Date.now(),d=Se("Exporting\u2026",i.json);try{for(;Date.now()<a;){let p;try{p=await Jn.getExport(e,t)}catch(g){if(g instanceof We&&g.status>=500){await $z(o);continue}throw d.fail(`Failed to poll: ${ge(g)}`),g}let f=Math.round((Date.now()-r)/1e3),u=Math.round((p.progress??0)*100);if(d.text=`Exporting\u2026 ${p.status}${u>0?` \xB7 ${u}%`:""} (${f}s)`,F(i,"export_progress",{exportId:t,status:p.status,progress:p.progress,elapsedSec:f}),p.status==="complete")return d.succeed(`Export complete (${f}s)`),{kind:"complete",outputUrl:p.outputUrl??null,outputExpiresAt:p.outputExpiresAt??null,outputSizeBytes:p.outputSizeBytes??null,trimCacheHit:p.trimCacheHit??null};if(p.status==="error"||p.status==="cancelled"){let g=p.error?.message??`Export ${p.status}`;return d.fail(g),{kind:"failed",message:g,error:p.error?{phase:p.error.phase,retryable:!!p.error.retryable}:null}}await $z(o)}return d.fail(`Timed out waiting for export (${Math.round((Date.now()-r)/1e3)}s)`),{kind:"failed",message:`Timed out after ${Math.round((i.timeoutMs??Oz)/1e3)}s`,error:null}}catch(p){B(i,"export_progress",p,W(p)),E(W(p))}}async function qwe(e,t,i){let a=Fwe(t),o=Se(`Downloading \u2192 ${a}\u2026`,i);try{let r=await fetch(e);if(!r.ok)throw new Error(`HTTP ${r.status}`);let d=Buffer.from(await r.arrayBuffer());return Awe(a,d),o.succeed(`Saved: ${a} (${(d.length/1024/1024).toFixed(1)} MB)`),a}catch(r){o.fail(`Download failed: ${ge(r)}`),i||console.error(`
127
+ Export URL (7-day TTL): ${e}`),E(P.NetworkError)}}function $z(e){return new Promise(t=>setTimeout(t,e))}async function Tz(e){X(e.target),F(e,"sessions_list_prepare",{});try{let t=await Wo.listSessions();F(e,"sessions_list_complete",{count:t.data.length}),ee(e,t,()=>{if(t.data.length===0){console.log("No sessions yet. Create one with `cueframe sessions create --name <n> --files <mediaId:role> \u2026`");return}for(let i of t.data){let a=i.muxStatus??"pending";console.log(`${i.id} ${i.fileCount} files mux:${a} ${i.name}`)}t.pagination.hasMore&&console.log(`# more \u2014 pass --after ${t.pagination.nextCursor} (raw via \`cueframe api\`)`)})}catch(t){B(e,"sessions_list",t,W(t)),E(W(t))}}async function kz(e,t){ue(e,"sessionId",t),X(t.target),F(t,"sessions_get_prepare",{sessionId:e});try{let i=await Wo.getSession(e);F(t,"sessions_get_complete",{sessionId:e}),ee(t,i,()=>{console.log(JSON.stringify(i,null,2))})}catch(i){B(t,"sessions_get",i,W(i)),E(W(i))}}async function Cz(e){e.name||(console.error("--name is required"),E(P.UserError)),(!e.files||e.files.length===0)&&(console.error("At least one --file <mediaId:role> is required"),E(P.UserError));let t=e.files.map((i,a)=>{let o=i.indexOf(":");return o===-1&&(console.error(`--file[${a}] must be <mediaId>:<role>. Got: ${i}`),E(P.UserError)),{mediaId:i.slice(0,o).trim(),role:i.slice(o+1).trim()}});X(e.target),F(e,"sessions_create_prepare",{name:e.name,fileCount:t.length});try{let i=await Wo.createSession({name:e.name,files:t});F(e,"sessions_create_complete",{sessionId:i.id}),ee(e,i,()=>{console.log(`Session created: ${i.id}`),console.log(JSON.stringify(i,null,2))})}catch(i){B(e,"sessions_create",i,W(i)),E(W(i))}}async function Dz(e,t){ue(e,"sessionId",t),X(t.target),F(t,"sessions_delete_prepare",{sessionId:e});try{await Wo.deleteSession(e),F(t,"sessions_delete_complete",{sessionId:e}),ee(t,{ok:!0,sessionId:e},()=>{console.log(`Session ${e} deleted.`)})}catch(i){B(t,"sessions_delete",i,W(i)),E(W(i))}}function _z(e){let t=e.commands.map(_z);return{name:e.name(),description:e.description(),arguments:e.registeredArguments.map(i=>({name:i.name(),required:i.required,description:i.description})),options:e.options.map(i=>({flags:i.flags,description:i.description,...i.defaultValue!==void 0?{default:i.defaultValue}:{}})),...t.length>0?{subcommands:t}:{}}}function jz(e,t){let i=e.commands.map(_z);if(t.json){F(t,"describe_complete",{name:e.name(),version:e.version()??null,commands:i});return}console.log(`${e.name()} ${e.version()??""}`.trim());for(let a of i){console.log(`
128
+ ${a.name} \u2014 ${a.description}`);for(let o of a.subcommands??[])console.log(` ${a.name} ${o.name} \u2014 ${o.description}`)}}var Ez=["prod","local"];function Me(e){if(e===void 0)return"prod";if(Ez.includes(e))return e;console.error(`Invalid --target ${e}. Allowed: ${Ez.join(", ")}.`),E(P.UserError)}function Pz(e){if(!e)return;let t=parseInt(e,10);if(t===24||t===25||t===30||t===60)return t;console.error(`Invalid --fps ${e}. Allowed: 24, 25, 30, 60.`),E(P.UserError)}async function Lz(){let e=new Bwe;e.name("cueframe").description("AI-assisted video editing and rendering").version("0.7.0").option("--json","Emit a structured JSON document on stdout instead of human-formatted output. Spinners are silenced.").option("--dry-run","Report what would happen without mutating anything; `template run` asks the API to bind the inputs without storing a template. Applies to upload, analyze, project create, render, template run.");let t=()=>e.opts();e.command("install").description('One-line setup: wire the CueFrame MCP server into every installed agent (Claude Code / Cursor / Codex) and install the agent skills. No API key \u2014 auth is a browser "Allow" on first call.').option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-f, --force","Replace locally changed or untracked skills, retaining backups").action(S=>Dl({json:t().json,target:Me(S.target),dryRun:t().dryRun,force:S.force})),e.command("init").description("Scaffold a CueFrame component workspace (cueframe.json + components dir) in the current repo, so `new component` has a home and the render harness can discover it.").action(()=>El({json:t().json,dryRun:t().dryRun})),e.command("new").description("Scaffold new owned source in the component workspace").command("component").description("Scaffold a blank custom component in cueframe/components/<name>").argument("<name>","Component id (e.g. my-badge)").option("-f, --force","Overwrite an existing non-empty component dir").action((S,y)=>Ex(S,{json:t().json,dryRun:t().dryRun,force:y.force})),e.command("push").description("Publish a locally-authored component (cueframe/components/<id>/index.tsx) to CueFrame so it renders server-side. Upserts by id.").argument("[id]","Component id to push (omit and use `cueframe sync` to push all)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((S,y)=>Ax(S,{target:Me(y.target),json:t().json})),e.command("sync").description("Publish EVERY component in the workspace (cueframe/components/*) to CueFrame. Upserts each by id.").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(S=>Fx({target:Me(S.target),json:t().json}));let a=e.command("keys").description("Manage API keys. `keys create` mints a scoped key \u2014 run `cueframe login` first (keys cannot mint keys).");a.command("create").description("Mint a scoped API key (cf_*). Requires a logged-in session.").requiredOption("-n, --name <name>","Key name, e.g. ci-runner").option("-s, --scope <scope>","Comma-separated resource:actions, e.g. media:rw,projects:rw,renders:rw (resources: media,sessions,projects,renders,webhooks; actions r/w)").option("--preset <preset>","Scope preset instead of --scope: readonly (read all) | editall (read+write all)").option("--expires <days>","Expire after N days (default: never)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(S=>Nx({...S,target:Me(S.target),json:t().json})),a.command("list").description("List your API keys.").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(S=>qx({target:Me(S.target),json:t().json})),a.command("revoke").description("Revoke an API key by id.").argument("<keyId>","Key id (from `cueframe keys list`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((S,y)=>Bx(S,{target:Me(y.target),json:t().json})),e.command("login").description("Browser-mediated sign-in (OAuth device flow). Recommended for laptops.").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("--url <url>","Override the API base URL (advanced)").action(S=>Sz({...S,target:Me(S.target),json:t().json})),e.command("auth").description("Save a static API key (cf_live_\u2026 / cf_test_\u2026). Use for CI / headless environments.").argument("<api-key>","Your CueFrame API key").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("--url <url>","Override the API base URL (advanced)").action((S,y)=>{let w=Me(y.target);yl(S),Kn(S,w,y.url),t().json?console.log(JSON.stringify({ok:!0,target:w},null,2)):console.log(`API key saved for target "${w}"`)}),e.command("list").description("List projects").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-n, --limit <n>","Max projects to show","10").action(S=>Wx({target:Me(S.target),limit:parseInt(S.limit),json:t().json}));let o=e.command("project").description("Project commands");o.command("create").description("Create a new project. With --from-suggestion, atomically build the composition from a clip suggestion in one round-trip \u2014 the project is then immediately renderable via `cueframe render <projectId>`.").requiredOption("-n, --name <name>","Project name").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9","9:16").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("--brand-kit <id>","Bind a brand kit id to the project").option("--from-suggestion <sug>","Clip suggestion publicId (sug_\u2026) \u2014 atomically builds the composition after project creation so render needs no further args").option("--cheap","With --from-suggestion: use the deterministic translator (no LLM, ~100ms) instead of the AI authoring pass. Useful for tests / programmatic flows.").action(async S=>{await oz({name:S.name,target:Me(S.target),aspect:S.aspect,fps:Pz(S.fps),resolution:S.resolution,brandKitId:S.brandKit,fromSuggestion:S.fromSuggestion,cheap:S.cheap,json:t().json,dryRun:t().dryRun})}),o.command("delete").description("Permanently delete a project (irreversible cleanup \u2014 removes the composition and render history).").argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((S,y)=>nz(S,{target:Me(y.target),json:t().json})),e.command("media").description("Media library cleanup commands").command("delete").description("Permanently delete a media item (irreversible cleanup \u2014 removes the source and its derived assets).").argument("<mediaId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((S,y)=>rz(S,{target:Me(y.target),json:t().json})),e.command("upload").description("Upload a video file and process it").argument("<file>","Path to video file").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-a, --analyze","Run clip analysis after processing completes").option("-r, --audio-role <role>","Declare the audio role (vo|music|sfx|ambience) \u2014 routes ingest enrichment: vo\u2192transcript, music\u2192beat grid, sfx/ambience\u2192envelope").action(async(S,y)=>{await za(S,{target:Me(y.target),analyze:y.analyze,audioRole:y.audioRole,json:t().json,dryRun:t().dryRun})}),e.command("analyze").description("Trigger AI clip suggestion analysis for a media item").argument("<mediaItemId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-w, --wait","Wait for analysis to complete and show results").action((S,y)=>vl(S,{target:Me(y.target),wait:y.wait,json:t().json,dryRun:t().dryRun})),e.command("clips").description("List AI-generated clip suggestions for a media item").argument("[mediaItemId]","Media item ID (omit to list your media library)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((S,y)=>Kx(S,{target:Me(y.target),json:t().json}));let d=e.command("template").description("Run or validate a CueFrame template document (.cueframe), from the public catalog or your org");d.command("run").description("Start a template preparation job, wait for the ready project, and render").argument("<template>","Catalog slug (cueframe-ai/cueframe-templates), a template id in your org, or a local .cueframe document").option("-m, --media <name=source...>","A media parameter: name=<file|https url|sample|media:<id>> (repeatable)",[]).option("-v, --values <name=value...>","A parameter value: name=value (repeatable); coerced by the document",[]).option("-p, --preset <name>","A preset of the document; its values fill what --values leaves out").option("--brand-kit <id>","Apply with one of your org brand kits instead of the template's").option("--idempotency-key <key>","Reuse this key to safely retry a start request whose response was lost").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-o, --out <path>","Output MP4 path","./template-output.mp4").option("--no-render","Create the editable project without rendering it").action(async(S,y)=>{await bz(S,{media:y.media,values:y.values,preset:y.preset,brandKitId:y.brandKit,idempotencyKey:y.idempotencyKey,out:y.out,target:Me(y.target),render:y.render!==!1,json:t().json,dryRun:t().dryRun})}),d.command("status").description("Read a template preparation job; use --wait to reconnect until it is ready").argument("<jobId>","Job id returned by template run").option("--wait","Poll until ready, failed, or cancelled").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(async(S,y)=>{await xz(S,{target:Me(y.target),json:t().json,wait:y.wait})}),d.command("validate").description("Check a template document: its references, every preset bound with the sample media, its prepared mattes. Runs on the CueFrame API with your key; nothing is stored.").argument("<template>","Catalog slug, a template id in your org, or a local .cueframe document").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(async(S,y)=>{await zz(S,{target:Me(y.target),json:t().json})});let p=e.command("render").description("Render a project to MP4 (queues, watches via SSE, downloads). Renders whatever composition is saved on the project \u2014 build it first via `project create --from-suggestion` or `composition from-suggestion`.").allowExcessArguments(!1).argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9 (defaults to project format)").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("-o, --out <path>","Output file path (default: ./reel-<id>.mp4)").option("--idempotency-key <key>",'Override the auto-derived Idempotency-Key. Default: sha256("render:<projectId>:<currentCompositionETag>"). Pass a fresh UUID to force a new render row.').option("--priority <p>","Routing intent: interactive (low-latency, access-gated), standard (default), background (lowest queue weight).").option("--intent <i>","Encode-quality hint: preview (fast / low-bitrate, for editor scrubbing) or final (default, full Format).").action(async(S,y)=>{await Sa(S,{target:y.target,aspect:y.aspect,fps:Pz(y.fps),resolution:y.resolution,out:y.out,json:t().json,dryRun:t().dryRun,...y.idempotencyKey?{idempotencyKey:y.idempotencyKey}:{},...y.priority?{priority:y.priority}:{},...y.intent?{intent:y.intent}:{}})});e.command("api").description("Raw API call against the v1 surface (escape hatch \u2014 like `gh api`).").argument("<method>","HTTP method: GET, POST, PUT, PATCH, DELETE").argument("<path>","API path starting with /v1, e.g. /v1/projects").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-b, --body <body>","Request body (inline JSON, @file.json to read from disk, @- for stdin)").option("-H, --header <header...>",'Additional header (repeatable), e.g. -H "If-Match: \\"abc\\""').option("-i, --include","Include response status line + headers in stdout (curl-style). Lets agents read ETag etc.").action((S,y,w)=>Rz(S,y,{target:w.target,body:w.body,header:w.header,include:w.include,json:t().json})),e.command("schema").description("Print the live composition wire schema from the server (/v1/openapi.json) \u2014 discover the contract instead of guessing.").argument("[resource]","Schema to print (currently: composition)","composition").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((S,y)=>Mz(S,{target:y.target,json:t().json}));let f=e.command("composition").description("Read/write a project's composition. ETag is threaded automatically.");f.command("validate").description("Validate a composition body against the live schema WITHOUT saving or rendering. Returns per-field errors \u2014 author safely before paying for a render.").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(async S=>{await Qx({target:S.target,body:S.body,json:t().json})}),f.command("get").description("Fetch the project's composition and ETag").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((S,y)=>Xx(S,{target:y.target,json:t().json})),f.command("put").description("Replace the composition. GETs ETag first for safe concurrent writes.").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite \u2014 may clobber concurrent edits)").action(async(S,y)=>{await Yx(S,{target:y.target,body:y.body,ifMatch:y.ifMatch,force:y.force,json:t().json})}),f.command("from-suggestion").description("Build the composition from an existing clip suggestion").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("--format <json>",`Optional format override, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`).option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite)").action((S,y)=>ba(S,{target:y.target,suggestionId:y.suggestion,format:y.format,ifMatch:y.ifMatch,force:y.force,json:t().json})),p.command("watch").description("Reattach to an existing render and stream progress to terminal state").argument("<renderId>","Render ID (from `cueframe render` output)").requiredOption("-p, --project <projectId>","Project the render belongs to").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("--no-download","Print the MP4 URL but skip downloading the file").option("-o, --out <path>","Output file path when downloading (default: ./reel-<id>.mp4)").action((S,y,w)=>{let O=w?.parent?.opts?.()?.target??y.target;return az(S,{target:O,project:y.project,out:y.out,download:y.download!==!1,json:t().json})});let u=e.command("export").description("Hand the timeline off to a real NLE (Final Cut Pro / Premiere Pro)");u.command("fcpxml").description("Build a Final Cut Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((S,y)=>ul("fcpxml",{target:y.target,projectId:S,suggestionId:y.suggestion,out:y.out,wait:y.wait,json:t().json})),u.command("premiere").description("Build a Premiere Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((S,y)=>ul("premiere",{target:y.target,projectId:S,suggestionId:y.suggestion,out:y.out,wait:y.wait,json:t().json}));let g=e.command("sessions").description("Multi-file ingest sessions (camera A/B/screen \u2192 muxed composition)");g.command("list").description("List sessions in this org").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(S=>Tz({target:S.target,json:t().json})),g.command("get").description("Get a single session by ID").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((S,y)=>kz(S,{target:y.target,json:t().json})),g.command("create").description("Create a session from one or more media files").requiredOption("-n, --name <name>","Session name").requiredOption("-f, --file <entry...>","Each entry is <mediaId>:<role> (repeatable)").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action(S=>Cz({target:S.target,name:S.name,files:S.file,json:t().json})),g.command("delete").description("Delete a session (server checks for compositions referencing it)").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), local. CUEFRAME_API_URL overrides the host.").action((S,y)=>Dz(S,{target:y.target,json:t().json})),e.command("describe").description("Print the CLI command tree as structured JSON (agent introspection)").action(()=>jz(e,{json:t().json}));try{await e.parseAsync()}catch(S){let y=W(S);B(t(),"cli",Object.assign(new Error(ge(S)),{code:S?.code,status:S?.status}),y),E(y)}}await Lz();