cueframe 0.4.3 → 0.4.5
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/README.md +41 -1
- package/dist/analyze-243KHBHH.js +2 -0
- package/dist/chunk-MCQRX24V.js +2 -0
- package/dist/chunk-YKPEHNKM.js +12 -0
- package/dist/cueframe.js +109 -40
- package/{skills → dist/skills}/add-music-bed/SKILL.md +6 -16
- package/{skills → dist/skills}/brand-reel/SKILL.md +6 -16
- package/{skills → dist/skills}/clip-a-talking-head/SKILL.md +12 -17
- package/{skills → dist/skills}/composing-video/SKILL.md +20 -8
- package/{skills → dist/skills}/cueframe-brand-demo/SKILL.md +5 -0
- package/{skills → dist/skills}/cueframe-cli/SKILL.md +26 -3
- package/dist/skills/cueframe-component-authoring/SKILL.md +167 -0
- package/{skills → dist/skills}/cueframe-compose-loop/SKILL.md +38 -30
- package/dist/skills/cueframe-compose-loop/references/preview-workflow.md +37 -0
- package/dist/skills/cueframe-connect/SKILL.md +45 -0
- package/{skills → dist/skills}/cueframe-product-video/SKILL.md +19 -2
- package/dist/skills/cueframe-scene-shot/SKILL.md +66 -0
- package/{skills → dist/skills}/cueframe-storyboard/SKILL.md +6 -1
- package/{skills → dist/skills}/every-format-from-one-edit/SKILL.md +5 -16
- package/{skills → dist/skills}/extracting-brand-kits/SKILL.md +6 -3
- package/{skills → dist/skills}/launch-video/SKILL.md +5 -16
- package/{skills → dist/skills}/make-a-social-reel/SKILL.md +5 -15
- package/{skills → dist/skills}/rebrand-a-video/SKILL.md +5 -16
- package/{skills → dist/skills}/video-craft-standards/SKILL.md +6 -0
- package/dist/supportedAgents.js +1 -1
- package/package.json +18 -15
- package/dist/analyze-4EGOBMRV.js +0 -2
- package/dist/chunk-3QSA3EBY.js +0 -2
- package/dist/chunk-QKQNZIRI.js +0 -12
- package/skills/_connect.md +0 -12
- package/skills/cueframe-component-authoring/SKILL.md +0 -68
package/dist/cueframe.js
CHANGED
|
@@ -1,30 +1,95 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{A as
|
|
3
|
-
|
|
4
|
-
`,n=t.match(/^---\n[\s\S]*?\n---\n/);return n?`${n[0]}
|
|
5
|
-
|
|
6
|
-
${t}`}function on(t){let e=rn();e||(x(t,"install",new Error("Bundled skills/ directory not found"),p.UserError),m(p.UserError));let r=new Date().toISOString().slice(0,10),n=[],o=[];for(let s of Kr(e)){let i=Je(e,s,"SKILL.md");if(!ut(i))continue;let a=Je(Xr(),".claude","skills",s),u=Je(a,"SKILL.md");if(ut(u)&&!t.force){o.push(u);continue}Jr(a,{recursive:!0}),Hr(u,nn(Gr(i,"utf8"),r),"utf8"),n.push(u)}return{installed:n,skipped:o}}function sn(t){return(en[t]?.supportedTransports??[]).includes("http")}async function an(t){return(await It()).map(r=>{if(!sn(r))return{agent:r,wired:!1,error:"speaks stdio only \u2014 CueFrame\u2019s MCP server is remote HTTP"};try{let n=tn(r,Ge,{type:"http",url:t});return{agent:r,wired:n.success,path:n.path,error:n.error}}catch(n){return{agent:r,wired:!1,error:n instanceof Error?n.message:String(n)}}})}async function Pt(t){let e=`${Ce(t.target)}/v1/mcp`;if(t.dryRun){let s=await It();$(t,{ok:!0,dryRun:!0,mcpUrl:e,wouldWire:s,serverName:Ge},()=>{console.log(`Would wire MCP server "${Ge}" \u2192 ${e} into:`),s.length===0&&console.log(" (no agents detected on this machine)");for(let i of s)console.log(` \u2192 ${i}`);console.log("Would install the CueFrame agent skills into ~/.claude/skills"),console.log("Dry run \u2014 nothing was written.")});return}let r=await an(e),{installed:n,skipped:o}=on(t);n.length===0&&o.length===0&&r.length===0&&(x(t,"install",new Error("No agents detected and no skills found \u2014 nothing to install"),p.UserError),m(p.UserError)),$(t,{ok:!0,mcpUrl:e,agents:r,skills:n,skipped:o},()=>{if(console.log(`\u2713 CueFrame MCP server (${e})`),r.length===0)console.log(" No agents detected on this machine. Add it manually:"),console.log(` claude mcp add --transport http ${Ge} ${e}`),console.log(` \u2026or add the MCP server ${e} as a custom connector.`);else for(let s of r)console.log(s.wired?` \u2192 wired ${s.agent}`:` \u2717 ${s.agent}: ${s.error??"failed"}`);console.log(`\u2713 Installed ${n.length} CueFrame skill(s) into ~/.claude/skills`),o.length>0&&console.log(` ${o.length} skipped (already present \u2014 rerun with --force)`),r.some(s=>s.wired&&s.agent==="claude-code")||(console.log(" Note: only Claude Code reads that directory. Your other agents get the"),console.log(" same verbs as MCP tools from the server above \u2014 nothing else to install.")),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 lt,mkdirSync as cn,readFileSync as Mt,writeFileSync as mt}from"fs";import{join as ft}from"path";var Nt="cueframe.json",dn="cueframe/components",He=".cueframe/";function un(t,e){let r=ft(t,".gitignore");if(lt(r)){let n=Mt(r,"utf8"),o=n.split(`
|
|
7
|
-
|
|
2
|
+
import{A as G,B as Ce,C as at,D as we,E as $h,a as We,b as bh,c as rt,d as Sh,e as zh,f as vh,g as wh,h as Ih,i as Ot,j as Tn,k as Mt,l as fo,m as kh,n as yr,o as j,p as J,q as je,r as L,s as go,t as Ph,u as Cn,v as ae,w as ze,x as Re,y as B,z as pe}from"./chunk-YKPEHNKM.js";import{a as Tz,b as It,c as Cz}from"./chunk-MCQRX24V.js";var QS=Tz(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});function hce(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}var wt=class{constructor(e,t,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=n}},ur=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function qe(r,e){let{line:t,column:n,index:o}=r;return new wt(t,n+e,o+e)}var IS="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",fce={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:IS},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:IS}},kS={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},ra=r=>r.type==="UpdateExpression"?kS.UpdateExpression[`${r.prefix}`]:kS[r.type],gce={AccessorIsGenerator:({kind:r})=>`A ${r}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:r})=>`Missing initializer in ${r} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:r})=>`\`${r}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:r,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
3
|
+
- Did you mean \`export { '${r}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:r})=>`'${r==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:r})=>`Unsyntactic ${r==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:r})=>`A string literal cannot be used as an imported binding.
|
|
4
|
+
- Did you mean \`import { "${r}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:r})=>`Expected number in radix ${r}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:r})=>`Escape sequence in keyword ${r}.`,InvalidIdentifier:({identifierName:r})=>`Invalid identifier ${r}.`,InvalidLhs:({ancestor:r})=>`Invalid left-hand side in ${ra(r)}.`,InvalidLhsBinding:({ancestor:r})=>`Binding invalid left-hand side in ${ra(r)}.`,InvalidLhsOptionalChaining:({ancestor:r})=>`Invalid optional chaining in the left-hand side of ${ra(r)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:r})=>`Unexpected character '${r}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:r})=>`Private name #${r} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:r})=>`Label '${r}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:r})=>`This experimental syntax requires enabling the parser plugin: ${r.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:r})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${r.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:r})=>`Duplicate key "${r}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:r})=>`An export name cannot include a lone surrogate, found '\\u${r.toString(16)}'.`,ModuleExportUndefined:({localName:r})=>`Export '${r}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:r})=>`Private names are only allowed in property accesses (\`obj.#${r}\`) or in \`in\` expressions (\`#${r} in obj\`).`,PrivateNameRedeclaration:({identifierName:r})=>`Duplicate private name #${r}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:r})=>`Unexpected keyword '${r}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:r})=>`Unexpected reserved word '${r}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:r,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${r?`, expected "${r}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:r,onlyValidPropertyName:e})=>`The only valid meta property for ${r} is ${r}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:r})=>`Identifier '${r}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},xce={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:r})=>`Assigning to '${r}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:r})=>`Binding '${r}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},yce={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:r})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(r)}\`.`},bce=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Sce=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:r})=>`Invalid topic token ${r}. In order to use ${r} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${r}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:r})=>`Hack-style pipe body cannot be an unparenthesized ${ra({type:r})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'}),zce={UnsupportedBind:"Binding should be performed on object property.",UnsupportedBindRHS:"The right-hand side of binding can not be super or import."},vce=["message"];function PS(r,e,t){Object.defineProperty(r,e,{enumerable:!1,configurable:!0,value:t})}function wce({toMessage:r,code:e,reasonCode:t,syntaxPlugin:n}){let o=t==="MissingPlugin"||t==="MissingOneOfPlugins",i={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};return i[t]&&(t=i[t]),function s(c,u){let m=new SyntaxError;return m.code=e,m.reasonCode=t,m.loc=c,m.pos=c.index,m.syntaxPlugin=n,o&&(m.missingPlugin=u.missingPlugin),PS(m,"clone",function(g={}){var y;let{line:S,column:w,index:$}=(y=g.loc)!=null?y:c;return s(new wt(S,w,$),Object.assign({},u,g.details))}),PS(m,"details",u),Object.defineProperty(m,"message",{configurable:!0,get(){let h=`${r(u)} (${c.line}:${c.column})`;return this.message=h,h},set(h){Object.defineProperty(this,"message",{value:h,writable:!0})}}),m}}function ut(r,e){if(Array.isArray(r))return n=>ut(n,r[0]);let t={};for(let n of Object.keys(r)){let o=r[n],i=typeof o=="string"?{message:()=>o}:typeof o=="function"?{message:o}:o,{message:s}=i,c=hce(i,vce),u=typeof s=="string"?()=>s:s;t[n]=wce(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:u},e?{syntaxPlugin:e}:{},c))}return t}var k=Object.assign({},ut(fce),ut(gce),ut(xce),ut(yce),ut`pipelineOperator`(Sce),ut`functionBind`(zce));function Ice(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function kce(r){let e=Ice();if(r==null)return e;if(r.annexB!=null&&r.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let t of Object.keys(e))r[t]!=null&&(e[t]=r[t]);if(e.startLine===1)r.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:r.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((r.startColumn==null||r.startIndex==null)&&r.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(r.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(r.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(r.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}var{defineProperty:Pce}=Object,$S=(r,e)=>{r&&Pce(r,e,{enumerable:!1,value:r[e]})};function gn(r){return $S(r.loc.start,"index"),$S(r.loc.end,"index"),r}var $ce=r=>class extends r{parse(){let t=gn(super.parse());return this.optionFlags&256&&(t.tokens=t.tokens.map(gn)),t}parseRegExpLiteral({pattern:t,flags:n}){let o=null;try{o=new RegExp(t,n)}catch{}let i=this.estreeParseLiteral(o);return i.regex={pattern:t,flags:n},i}parseBigIntLiteral(t){let n;try{n=BigInt(t)}catch{n=null}let o=this.estreeParseLiteral(n);return o.bigint=String(o.value||t),o}parseDecimalLiteral(t){let o=this.estreeParseLiteral(null);return o.decimal=String(o.value||t),o}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}parseStringLiteral(t){return this.estreeParseLiteral(t)}parseNumericLiteral(t){return this.estreeParseLiteral(t)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(t){return this.estreeParseLiteral(t)}estreeParseChainExpression(t,n){let o=this.startNodeAtNode(t);return o.expression=t,this.finishNodeAt(o,"ChainExpression",n)}directiveToStmt(t){let n=t.value;delete t.value,this.castNodeTo(n,"Literal"),n.raw=n.extra.raw,n.value=n.extra.expressionValue;let o=this.castNodeTo(t,"ExpressionStatement");return o.expression=n,o.directive=n.extra.rawValue,delete n.extra,o}fillOptionalPropertiesForTSESLint(t){}cloneEstreeStringLiteral(t){let{start:n,end:o,loc:i,range:s,raw:c,value:u}=t,m=Object.create(t.constructor.prototype);return m.type="Literal",m.start=n,m.end=o,m.loc=i,m.range=s,m.raw=c,m.value=u,m}initFunction(t,n){super.initFunction(t,n),t.expression=!1}checkDeclaration(t){t!=null&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){var n;return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&!((n=t.expression.extra)!=null&&n.parenthesized)}parseBlockBody(t,n,o,i,s){super.parseBlockBody(t,n,o,i,s);let c=t.directives.map(u=>this.directiveToStmt(u));t.body=c.concat(t.body),delete t.directives}parsePrivateName(){let t=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(t):t}convertPrivateNameToPrivateIdentifier(t){let n=super.getPrivateNameSV(t);return delete t.id,t.name=n,this.castNodeTo(t,"PrivateIdentifier")}isPrivateName(t){return this.getPluginOption("estree","classFeatures")?t.type==="PrivateIdentifier":super.isPrivateName(t)}getPrivateNameSV(t){return this.getPluginOption("estree","classFeatures")?t.name:super.getPrivateNameSV(t)}parseLiteral(t,n){let o=super.parseLiteral(t,n);return o.raw=o.extra.raw,delete o.extra,o}parseFunctionBody(t,n,o=!1){super.parseFunctionBody(t,n,o),t.expression=t.body.type!=="BlockStatement"}parseMethod(t,n,o,i,s,c,u=!1){let m=this.startNode();m.kind=t.kind,m=super.parseMethod(m,n,o,i,s,c,u),delete m.kind;let{typeParameters:h}=t;h&&(delete t.typeParameters,m.typeParameters=h,this.resetStartLocationFromNode(m,h));let g=this.castNodeTo(m,"FunctionExpression");return t.value=g,c==="ClassPrivateMethod"&&(t.computed=!1),c==="ObjectMethod"?(t.kind==="method"&&(t.kind="init"),t.shorthand=!1,this.finishNode(t,"Property")):this.finishNode(t,"MethodDefinition")}nameIsConstructor(t){return t.type==="Literal"?t.value==="constructor":super.nameIsConstructor(t)}parseClassProperty(...t){let n=super.parseClassProperty(...t);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(n,"PropertyDefinition"),n}parseClassPrivateProperty(...t){let n=super.parseClassPrivateProperty(...t);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(n,"PropertyDefinition"),n.computed=!1),n}parseClassAccessorProperty(t){let n=super.parseClassAccessorProperty(t);return this.getPluginOption("estree","classFeatures")&&(n.abstract&&this.hasPlugin("typescript")?(delete n.abstract,this.castNodeTo(n,"TSAbstractAccessorProperty")):this.castNodeTo(n,"AccessorProperty")),n}parseObjectProperty(t,n,o,i){let s=super.parseObjectProperty(t,n,o,i);return s&&(s.kind="init",this.castNodeTo(s,"Property")),s}finishObjectProperty(t){return t.kind="init",this.finishNode(t,"Property")}isValidLVal(t,n,o,i){return t==="Property"?"value":super.isValidLVal(t,n,o,i)}isAssignable(t,n){return t!=null&&this.isObjectProperty(t)?this.isAssignable(t.value,n):super.isAssignable(t,n)}toAssignable(t,n=!1){if(t!=null&&this.isObjectProperty(t)){let{key:o,value:i}=t;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(i,n)}else super.toAssignable(t,n)}toAssignableObjectExpressionProp(t,n,o){t.type==="Property"&&(t.kind==="get"||t.kind==="set")?this.raise(k.PatternHasAccessor,t.key):t.type==="Property"&&t.method?this.raise(k.PatternHasMethod,t.key):super.toAssignableObjectExpressionProp(t,n,o)}finishCallExpression(t,n){let o=super.finishCallExpression(t,n);if(o.callee.type==="Import"){var i,s;this.castNodeTo(o,"ImportExpression"),o.source=o.arguments[0],o.options=(i=o.arguments[1])!=null?i:null,o.attributes=(s=o.arguments[1])!=null?s:null,delete o.arguments,delete o.callee}else o.type==="OptionalCallExpression"?this.castNodeTo(o,"CallExpression"):o.optional=!1;return o}toReferencedArguments(t){t.type!=="ImportExpression"&&super.toReferencedArguments(t)}parseExport(t,n){let o=this.state.lastTokStartLoc,i=super.parseExport(t,n);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":i.specifiers.length===1&&i.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(i,"ExportAllDeclaration"),i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{var s;let{declaration:c}=i;c?.type==="ClassDeclaration"&&((s=c.decorators)==null?void 0:s.length)>0&&c.start===i.start&&this.resetStartLocation(i,o)}break}return i}stopParseSubscript(t,n){let o=super.stopParseSubscript(t,n);return n.optionalChainMember?this.estreeParseChainExpression(o,t.loc.end):o}parseMember(t,n,o,i,s){let c=super.parseMember(t,n,o,i,s);return c.type==="OptionalMemberExpression"?this.castNodeTo(c,"MemberExpression"):c.optional=!1,c}isOptionalMemberExpression(t){return t.type==="ChainExpression"?t.expression.type==="MemberExpression":super.isOptionalMemberExpression(t)}hasPropertyAsPrivateName(t){return t.type==="ChainExpression"&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isObjectProperty(t){return t.type==="Property"&&t.kind==="init"&&!t.method}isObjectMethod(t){return t.type==="Property"&&(t.method||t.kind==="get"||t.kind==="set")}castNodeTo(t,n){let o=super.castNodeTo(t,n);return this.fillOptionalPropertiesForTSESLint(o),o}cloneIdentifier(t){let n=super.cloneIdentifier(t);return this.fillOptionalPropertiesForTSESLint(n),n}cloneStringLiteral(t){return t.type==="Literal"?this.cloneEstreeStringLiteral(t):super.cloneStringLiteral(t)}finishNodeAt(t,n,o){return gn(super.finishNodeAt(t,n,o))}finishNode(t,n){let o=super.finishNode(t,n);return this.fillOptionalPropertiesForTSESLint(o),o}resetStartLocation(t,n){super.resetStartLocation(t,n),gn(t)}resetEndLocation(t,n=this.state.lastTokEndLoc){super.resetEndLocation(t,n),gn(t)}},uo=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}},ue={brace:new uo("{"),j_oTag:new uo("<tag"),j_cTag:new uo("</tag"),j_expr:new uo("<tag>...</tag>",!0)};ue.template=new uo("`",!0);var ne=!0,q=!0,um=!0,xn=!0,Zt=!0,Tce=!0,sa=class{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop!=null?t.binop:null,this.updateContext=null}},Fm=new Map;function le(r,e={}){e.keyword=r;let t=X(r,e);return Fm.set(r,t),t}function Be(r,e){return X(r,{beforeExpr:ne,binop:e})}var zn=-1,Tt=[],Nm=[],Vm=[],Um=[],Bm=[],qm=[];function X(r,e={}){var t,n,o,i;return++zn,Nm.push(r),Vm.push((t=e.binop)!=null?t:-1),Um.push((n=e.beforeExpr)!=null?n:!1),Bm.push((o=e.startsExpr)!=null?o:!1),qm.push((i=e.prefix)!=null?i:!1),Tt.push(new sa(r,e)),zn}function se(r,e={}){var t,n,o,i;return++zn,Fm.set(r,zn),Nm.push(r),Vm.push((t=e.binop)!=null?t:-1),Um.push((n=e.beforeExpr)!=null?n:!1),Bm.push((o=e.startsExpr)!=null?o:!1),qm.push((i=e.prefix)!=null?i:!1),Tt.push(new sa("name",e)),zn}var Cce={bracketL:X("[",{beforeExpr:ne,startsExpr:q}),bracketHashL:X("#[",{beforeExpr:ne,startsExpr:q}),bracketBarL:X("[|",{beforeExpr:ne,startsExpr:q}),bracketR:X("]"),bracketBarR:X("|]"),braceL:X("{",{beforeExpr:ne,startsExpr:q}),braceBarL:X("{|",{beforeExpr:ne,startsExpr:q}),braceHashL:X("#{",{beforeExpr:ne,startsExpr:q}),braceR:X("}"),braceBarR:X("|}"),parenL:X("(",{beforeExpr:ne,startsExpr:q}),parenR:X(")"),comma:X(",",{beforeExpr:ne}),semi:X(";",{beforeExpr:ne}),colon:X(":",{beforeExpr:ne}),doubleColon:X("::",{beforeExpr:ne}),dot:X("."),question:X("?",{beforeExpr:ne}),questionDot:X("?."),arrow:X("=>",{beforeExpr:ne}),template:X("template"),ellipsis:X("...",{beforeExpr:ne}),backQuote:X("`",{startsExpr:q}),dollarBraceL:X("${",{beforeExpr:ne,startsExpr:q}),templateTail:X("...`",{startsExpr:q}),templateNonTail:X("...${",{beforeExpr:ne,startsExpr:q}),at:X("@"),hash:X("#",{startsExpr:q}),interpreterDirective:X("#!..."),eq:X("=",{beforeExpr:ne,isAssign:xn}),assign:X("_=",{beforeExpr:ne,isAssign:xn}),slashAssign:X("_=",{beforeExpr:ne,isAssign:xn}),xorAssign:X("_=",{beforeExpr:ne,isAssign:xn}),moduloAssign:X("_=",{beforeExpr:ne,isAssign:xn}),incDec:X("++/--",{prefix:Zt,postfix:Tce,startsExpr:q}),bang:X("!",{beforeExpr:ne,prefix:Zt,startsExpr:q}),tilde:X("~",{beforeExpr:ne,prefix:Zt,startsExpr:q}),doubleCaret:X("^^",{startsExpr:q}),doubleAt:X("@@",{startsExpr:q}),pipeline:Be("|>",0),nullishCoalescing:Be("??",1),logicalOR:Be("||",1),logicalAND:Be("&&",2),bitwiseOR:Be("|",3),bitwiseXOR:Be("^",4),bitwiseAND:Be("&",5),equality:Be("==/!=/===/!==",6),lt:Be("</>/<=/>=",7),gt:Be("</>/<=/>=",7),relational:Be("</>/<=/>=",7),bitShift:Be("<</>>/>>>",8),bitShiftL:Be("<</>>/>>>",8),bitShiftR:Be("<</>>/>>>",8),plusMin:X("+/-",{beforeExpr:ne,binop:9,prefix:Zt,startsExpr:q}),modulo:X("%",{binop:10,startsExpr:q}),star:X("*",{binop:10}),slash:Be("/",10),exponent:X("**",{beforeExpr:ne,binop:11,rightAssociative:!0}),_in:le("in",{beforeExpr:ne,binop:7}),_instanceof:le("instanceof",{beforeExpr:ne,binop:7}),_break:le("break"),_case:le("case",{beforeExpr:ne}),_catch:le("catch"),_continue:le("continue"),_debugger:le("debugger"),_default:le("default",{beforeExpr:ne}),_else:le("else",{beforeExpr:ne}),_finally:le("finally"),_function:le("function",{startsExpr:q}),_if:le("if"),_return:le("return",{beforeExpr:ne}),_switch:le("switch"),_throw:le("throw",{beforeExpr:ne,prefix:Zt,startsExpr:q}),_try:le("try"),_var:le("var"),_const:le("const"),_with:le("with"),_new:le("new",{beforeExpr:ne,startsExpr:q}),_this:le("this",{startsExpr:q}),_super:le("super",{startsExpr:q}),_class:le("class",{startsExpr:q}),_extends:le("extends",{beforeExpr:ne}),_export:le("export"),_import:le("import",{startsExpr:q}),_null:le("null",{startsExpr:q}),_true:le("true",{startsExpr:q}),_false:le("false",{startsExpr:q}),_typeof:le("typeof",{beforeExpr:ne,prefix:Zt,startsExpr:q}),_void:le("void",{beforeExpr:ne,prefix:Zt,startsExpr:q}),_delete:le("delete",{beforeExpr:ne,prefix:Zt,startsExpr:q}),_do:le("do",{isLoop:um,beforeExpr:ne}),_for:le("for",{isLoop:um}),_while:le("while",{isLoop:um}),_as:se("as",{startsExpr:q}),_assert:se("assert",{startsExpr:q}),_async:se("async",{startsExpr:q}),_await:se("await",{startsExpr:q}),_defer:se("defer",{startsExpr:q}),_from:se("from",{startsExpr:q}),_get:se("get",{startsExpr:q}),_let:se("let",{startsExpr:q}),_meta:se("meta",{startsExpr:q}),_of:se("of",{startsExpr:q}),_sent:se("sent",{startsExpr:q}),_set:se("set",{startsExpr:q}),_source:se("source",{startsExpr:q}),_static:se("static",{startsExpr:q}),_using:se("using",{startsExpr:q}),_yield:se("yield",{startsExpr:q}),_asserts:se("asserts",{startsExpr:q}),_checks:se("checks",{startsExpr:q}),_exports:se("exports",{startsExpr:q}),_global:se("global",{startsExpr:q}),_implements:se("implements",{startsExpr:q}),_intrinsic:se("intrinsic",{startsExpr:q}),_infer:se("infer",{startsExpr:q}),_is:se("is",{startsExpr:q}),_mixins:se("mixins",{startsExpr:q}),_proto:se("proto",{startsExpr:q}),_require:se("require",{startsExpr:q}),_satisfies:se("satisfies",{startsExpr:q}),_keyof:se("keyof",{startsExpr:q}),_readonly:se("readonly",{startsExpr:q}),_unique:se("unique",{startsExpr:q}),_abstract:se("abstract",{startsExpr:q}),_declare:se("declare",{startsExpr:q}),_enum:se("enum",{startsExpr:q}),_module:se("module",{startsExpr:q}),_namespace:se("namespace",{startsExpr:q}),_interface:se("interface",{startsExpr:q}),_type:se("type",{startsExpr:q}),_opaque:se("opaque",{startsExpr:q}),name:X("name",{startsExpr:q}),placeholder:X("%%",{startsExpr:q}),string:X("string",{startsExpr:q}),num:X("num",{startsExpr:q}),bigint:X("bigint",{startsExpr:q}),decimal:X("decimal",{startsExpr:q}),regexp:X("regexp",{startsExpr:q}),privateName:X("#name",{startsExpr:q}),eof:X("eof"),jsxName:X("jsxName"),jsxText:X("jsxText",{beforeExpr:ne}),jsxTagStart:X("jsxTagStart",{startsExpr:q}),jsxTagEnd:X("jsxTagEnd")};function me(r){return r>=93&&r<=133}function Oce(r){return r<=92}function mt(r){return r>=58&&r<=133}function FS(r){return r>=58&&r<=137}function Mce(r){return Um[r]}function bn(r){return Bm[r]}function Rce(r){return r>=29&&r<=33}function TS(r){return r>=129&&r<=131}function Ece(r){return r>=90&&r<=92}function Wm(r){return r>=58&&r<=92}function Dce(r){return r>=39&&r<=59}function Ace(r){return r===34}function _ce(r){return qm[r]}function Lce(r){return r>=121&&r<=123}function jce(r){return r>=124&&r<=130}function Kt(r){return Nm[r]}function na(r){return Vm[r]}function Fce(r){return r===57}function aa(r){return r>=24&&r<=25}function $t(r){return Tt[r]}Tt[8].updateContext=r=>{r.pop()};Tt[5].updateContext=Tt[7].updateContext=Tt[23].updateContext=r=>{r.push(ue.brace)};Tt[22].updateContext=r=>{r[r.length-1]===ue.template?r.pop():r.push(ue.template)};Tt[143].updateContext=r=>{r.push(ue.j_expr,ue.j_oTag)};var Zm="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",NS="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Nce=new RegExp("["+Zm+"]"),Vce=new RegExp("["+Zm+NS+"]");Zm=NS=null;var VS=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Uce=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function ym(r,e){let t=65536;for(let n=0,o=e.length;n<o;n+=2){if(t+=e[n],t>r)return!1;if(t+=e[n+1],t>=r)return!0}return!1}function vt(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&Nce.test(String.fromCharCode(r)):ym(r,VS)}function mo(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&Vce.test(String.fromCharCode(r)):ym(r,VS)||ym(r,Uce)}var Gm={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Bce=new Set(Gm.keyword),qce=new Set(Gm.strict),Wce=new Set(Gm.strictBind);function US(r,e){return e&&r==="await"||r==="enum"}function BS(r,e){return US(r,e)||qce.has(r)}function qS(r){return Wce.has(r)}function WS(r,e){return BS(r,e)||qS(r)}function Zce(r){return Bce.has(r)}function Gce(r,e,t){return r===64&&e===64&&vt(t)}var Kce=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Jce(r){return Kce.has(r)}var vn=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}},wn=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&128)return!0;if(t&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new vn(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,n){let o=this.currentScope();if(t&8||t&16){this.checkRedeclarationInScope(o,e,t,n);let i=o.names.get(e)||0;t&16?i=i|4:(o.firstLexicalName||(o.firstLexicalName=e),i=i|2),o.names.set(e,i),t&8&&this.maybeExportDefined(o,e)}else if(t&4)for(let i=this.scopeStack.length-1;i>=0&&(o=this.scopeStack[i],this.checkRedeclarationInScope(o,e,t,n),o.names.set(e,(o.names.get(e)||0)|1),this.maybeExportDefined(o,e),!(o.flags&1667));--i);this.parser.inModule&&o.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,n,o){this.isRedeclaredInScope(e,t,n)&&this.parser.raise(k.VarRedeclaration,o,{identifierName:t})}isRedeclaredInScope(e,t,n){if(!(n&1))return!1;if(n&8)return e.names.has(t);let o=e.names.get(t)||0;return n&16?(o&2)>0||!this.treatFunctionsAsVarInScope(e)&&(o&1)>0:(o&2)>0&&!(e.flags&8&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(o&4)>0}checkLocalExport(e){let{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1667)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1731&&!(t&4))return t}}},bm=class extends vn{constructor(...e){super(...e),this.declareFunctions=new Set}},Sm=class extends wn{createScope(e){return new bm(e)}declareName(e,t,n){let o=this.currentScope();if(t&2048){this.checkRedeclarationInScope(o,e,t,n),this.maybeExportDefined(o,e),o.declareFunctions.add(e);return}super.declareName(e,t,n)}isRedeclaredInScope(e,t,n){if(super.isRedeclaredInScope(e,t,n))return!0;if(n&2048&&!e.declareFunctions.has(t)){let o=e.names.get(t);return(o&4)>0||(o&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},Hce=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Y=ut`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:r})=>`Cannot overwrite reserved type ${r}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:r,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${r} = true,\` or \`${r} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:r,enumName:e})=>`Enum member names need to be unique, but the name \`${r}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:r})=>`Enum \`${r}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:r,enumName:e})=>`Enum type \`${r}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:r})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${r}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:r,memberName:e,explicitType:t})=>`Enum \`${r}\` has type \`${t}\`, so the initializer of \`${e}\` needs to be a ${t} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:r,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${r}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:r,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${r}\`.`,EnumInvalidMemberName:({enumName:r,memberName:e,suggestion:t})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${t}\`, in enum \`${r}\`.`,EnumNumberMemberNotInitialized:({enumName:r,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${r}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:r})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${r}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:r})=>`Unexpected reserved type ${r}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:r,suggestion:e})=>`\`declare export ${r}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Xce(r){return r.type==="DeclareExportAllDeclaration"||r.type==="DeclareExportDeclaration"&&(!r.declaration||r.declaration.type!=="TypeAlias"&&r.declaration.type!=="InterfaceDeclaration")}function CS(r){return r.importKind==="type"||r.importKind==="typeof"}var Yce={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Qce(r,e){let t=[],n=[];for(let o=0;o<r.length;o++)(e(r[o],o,r)?t:n).push(r[o]);return[t,n]}var epe=/\*?\s*@((?:no)?flow)\b/,tpe=r=>class extends r{constructor(...t){super(...t),this.flowPragma=void 0}getScopeHandler(){return Sm}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(t,n){t!==134&&t!==13&&t!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(t,n)}addComment(t){if(this.flowPragma===void 0){let n=epe.exec(t.value);if(n)if(n[1]==="flow")this.flowPragma="flow";else if(n[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(t)}flowParseTypeInitialiser(t){let n=this.state.inType;this.state.inType=!0,this.expect(t||14);let o=this.flowParseType();return this.state.inType=n,o}flowParsePredicate(){let t=this.startNode(),n=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>n.index+1&&this.raise(Y.UnexpectedSpaceBetweenModuloChecks,n),this.eat(10)?(t.value=super.parseExpression(),this.expect(11),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let t=this.state.inType;this.state.inType=!0,this.expect(14);let n=null,o=null;return this.match(54)?(this.state.inType=t,o=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=t,this.match(54)&&(o=this.flowParsePredicate())),[n,o]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();let n=t.id=this.parseIdentifier(),o=this.startNode(),i=this.startNode();this.match(47)?o.typeParameters=this.flowParseTypeParameterDeclaration():o.typeParameters=null,this.expect(10);let s=this.flowParseFunctionTypeParams();return o.params=s.params,o.rest=s.rest,o.this=s._this,this.expect(11),[o.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(o,"FunctionTypeAnnotation"),n.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(n),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.loc.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,n){if(this.match(80))return this.flowParseDeclareClass(t);if(this.match(68))return this.flowParseDeclareFunction(t);if(this.match(74))return this.flowParseDeclareVariable(t);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(t):(n&&this.raise(Y.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(t));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(t);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(t);if(this.isContextual(129))return this.flowParseDeclareInterface(t);if(this.match(82))return this.flowParseDeclareExportDeclaration(t,n);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(t.id.name,5,t.id.loc.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(134)?t.id=super.parseExprAtom():t.id=this.parseIdentifier();let n=t.body=this.startNode(),o=n.body=[];for(this.expect(5);!this.match(8);){let c=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Y.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),o.push(super.parseImport(c))):(this.expectContextual(125,Y.UnsupportedStatementInDeclareModule),o.push(this.flowParseDeclare(c,!0)))}this.scope.exit(),this.expect(8),this.finishNode(n,"BlockStatement");let i=null,s=!1;return o.forEach(c=>{Xce(c)?(i==="CommonJS"&&this.raise(Y.AmbiguousDeclareModuleKind,c),i="ES"):c.type==="DeclareModuleExports"&&(s&&this.raise(Y.DuplicateDeclareModuleExports,c),i==="ES"&&this.raise(Y.AmbiguousDeclareModuleKind,c),i="CommonJS",s=!0)}),t.kind=i||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,n){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!n){let o=this.state.value;throw this.raise(Y.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:o,suggestion:Yce[o]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return t=this.parseExport(t,null),t.type==="ExportNamedDeclaration"?(t.default=!1,delete t.exportKind,this.castNodeTo(t,"DeclareExportDeclaration")):this.castNodeTo(t,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual(111),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){this.next();let n=this.flowParseTypeAlias(t);return this.castNodeTo(n,"DeclareTypeAlias"),n}flowParseDeclareOpaqueType(t){this.next();let n=this.flowParseOpaqueType(t,!0);return this.castNodeTo(n,"DeclareOpaqueType"),n}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t,!1),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,n){if(t.id=this.flowParseRestrictedIdentifier(!n,!0),this.scope.declareName(t.id.name,n?17:8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(!n&&this.eat(12));if(n){if(t.implements=[],t.mixins=[],this.eatContextual(117))do t.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do t.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}t.body=this.flowParseObjectType({allowStatic:n,allowExact:!1,allowSpread:!1,allowProto:n,allowInexact:!1})}flowParseInterfaceExtends(){let t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t,!1),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){t==="_"&&this.raise(Y.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(t,n,o){Hce.has(t)&&this.raise(o?Y.AssignReservedType:Y.UnexpectedReservedType,n,{reservedType:t})}flowParseRestrictedIdentifierName(t,n){return this.checkReservedType(this.state.value,this.state.startLoc,n),this.parseIdentifierName(t)}flowParseRestrictedIdentifier(t,n){let o=this.startNode(),i=this.flowParseRestrictedIdentifierName(t,n);return this.createIdentifier(o,i)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,n){return this.expectContextual(130),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(14)&&(t.supertype=this.flowParseTypeInitialiser(14)),t.impltype=null,n||(t.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameterBound(){if(this.match(14)||this.isContextual(81)){let t=this.startNode();return this.next(),t.typeAnnotation=this.flowParseType(),this.finishNode(t,"TypeAnnotation")}}flowParseTypeParameter(t=!1){let n=this.state.startLoc,o=this.startNode(),i=this.flowParseVariance();return o.name=this.flowParseRestrictedIdentifierName(),o.variance=i,o.bound=this.flowParseTypeParameterBound(),this.match(29)?(this.eat(29),o.default=this.flowParseType()):t&&this.raise(Y.MissingTypeParamDefault,n),this.finishNode(o,"TypeParameter")}flowParseTypeParameterDeclaration(){let t=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let o=!1;do{let i=this.flowParseTypeParameter(o);n.params.push(i),i.default&&(o=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=t,this.finishNode(n,"TypeParameterDeclaration")}flowInTopLevelContext(t){if(this.curContext()!==ue.brace){let n=this.state.context;this.state.context=[n[0]];try{return t()}finally{this.state.context=n}}else return t()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let t=this.startNode(),n=this.state.inType;return this.state.inType=!0,t.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let o=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)t.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=o}),this.state.inType=n,!this.state.inType&&this.curContext()===ue.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let t=this.startNode(),n=this.state.inType;for(t.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=n,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){let t=this.startNode();if(this.expectContextual(129),t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,n,o){return t.static=n,this.lookahead().type===14?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(3),t.value=this.flowParseTypeInitialiser(),t.variance=o,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,n){return t.static=n,t.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start))):(t.method=!1,this.eat(17)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,n){let o=this.startNode();return t.static=n,t.value=this.flowParseObjectTypeMethodish(o),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:n,allowSpread:o,allowProto:i,allowInexact:s}){let c=this.state.inType;this.state.inType=!0;let u=this.startNode();u.callProperties=[],u.properties=[],u.indexers=[],u.internalSlots=[];let m,h,g=!1;for(n&&this.match(6)?(this.expect(6),m=9,h=!0):(this.expect(5),m=8,h=!1),u.exact=h;!this.match(m);){let S=!1,w=null,$=null,E=this.startNode();if(i&&this.isContextual(118)){let F=this.lookahead();F.type!==14&&F.type!==17&&(this.next(),w=this.state.startLoc,t=!1)}if(t&&this.isContextual(106)){let F=this.lookahead();F.type!==14&&F.type!==17&&(this.next(),S=!0)}let V=this.flowParseVariance();if(this.eat(0))w!=null&&this.unexpected(w),this.eat(0)?(V&&this.unexpected(V.loc.start),u.internalSlots.push(this.flowParseObjectTypeInternalSlot(E,S))):u.indexers.push(this.flowParseObjectTypeIndexer(E,S,V));else if(this.match(10)||this.match(47))w!=null&&this.unexpected(w),V&&this.unexpected(V.loc.start),u.callProperties.push(this.flowParseObjectTypeCallProperty(E,S));else{let F="init";if(this.isContextual(99)||this.isContextual(104)){let re=this.lookahead();FS(re.type)&&(F=this.state.value,this.next())}let H=this.flowParseObjectTypeProperty(E,S,w,V,F,o,s??!h);H===null?(g=!0,$=this.state.lastTokStartLoc):u.properties.push(H)}this.flowObjectTypeSemicolon(),$&&!this.match(8)&&!this.match(9)&&this.raise(Y.UnexpectedExplicitInexactInObject,$)}this.expect(m),o&&(u.inexact=g);let y=this.finishNode(u,"ObjectTypeAnnotation");return this.state.inType=c,y}flowParseObjectTypeProperty(t,n,o,i,s,c,u){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(c?u||this.raise(Y.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Y.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(Y.InexactVariance,i),null):(c||this.raise(Y.UnexpectedSpreadType,this.state.lastTokStartLoc),o!=null&&this.unexpected(o),i&&this.raise(Y.SpreadVariance,i),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));{t.key=this.flowParseObjectPropertyKey(),t.static=n,t.proto=o!=null,t.kind=s;let m=!1;return this.match(47)||this.match(10)?(t.method=!0,o!=null&&this.unexpected(o),i&&this.unexpected(i.loc.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start)),(s==="get"||s==="set")&&this.flowCheckGetterSetterParams(t),!c&&t.key.name==="constructor"&&t.value.this&&this.raise(Y.ThisParamBannedInConstructor,t.value.this)):(s!=="init"&&this.unexpected(),t.method=!1,this.eat(17)&&(m=!0),t.value=this.flowParseTypeInitialiser(),t.variance=i),t.optional=m,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){let n=t.kind==="get"?0:1,o=t.value.params.length+(t.value.rest?1:0);t.value.this&&this.raise(t.kind==="get"?Y.GetterMayNotHaveThisParam:Y.SetterMayNotHaveThisParam,t.value.this),o!==n&&this.raise(t.kind==="get"?k.BadGetterArity:k.BadSetterArity,t),t.kind==="set"&&t.value.rest&&this.raise(k.BadSetterRestParameter,t)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(t,n){t??(t=this.state.startLoc);let o=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let i=this.startNodeAt(t);i.qualification=o,i.id=this.flowParseRestrictedIdentifier(!0),o=this.finishNode(i,"QualifiedTypeIdentifier")}return o}flowParseGenericType(t,n){let o=this.startNodeAt(t);return o.typeParameters=null,o.id=this.flowParseQualifiedTypeIdentifier(t,n),this.match(47)&&(o.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(o,"GenericTypeAnnotation")}flowParseTypeofType(){let t=this.startNode();return this.expect(87),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){let t=this.startNode();for(t.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(t.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let n=null,o=!1,i=null,s=this.startNode(),c=this.lookahead(),u=this.state.type===78;return c.type===14||c.type===17?(u&&!t&&this.raise(Y.ThisParamMustBeFirst,s),n=this.parseIdentifier(u),this.eat(17)&&(o=!0,u&&this.raise(Y.ThisParamMayNotBeOptional,s)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),s.name=n,s.optional=o,s.typeAnnotation=i,this.finishNode(s,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){let n=this.startNodeAt(t.loc.start);return n.name=null,n.optional=!1,n.typeAnnotation=t,this.finishNode(n,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let n=null,o=null;for(this.match(78)&&(o=this.flowParseFunctionTypeParam(!0),o.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n=this.flowParseFunctionTypeParam(!1)),{params:t,rest:n,_this:o}}flowIdentToTypeAnnotation(t,n,o){switch(o.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(o.name),this.flowParseGenericType(t,o)}}flowParsePrimaryType(){let t=this.state.startLoc,n=this.startNode(),o,i,s=!1,c=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=c,i;case 47:{let u=this.startNode();return u.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),o=this.flowParseFunctionTypeParams(),u.params=o.params,u.rest=o.rest,u.this=o._this,this.expect(11),this.expect(19),u.returnType=this.flowParseType(),this.finishNode(u,"FunctionTypeAnnotation")}case 10:{let u=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(me(this.state.type)||this.match(78)){let m=this.lookahead().type;s=m!==17&&m!==14}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=c,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?o=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):o=this.flowParseFunctionTypeParams(),u.params=o.params,u.rest=o.rest,u.this=o._this,this.expect(11),this.expect(19),u.returnType=this.flowParseType(),u.typeParameters=null,this.finishNode(u,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(Y.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Wm(this.state.type)){let u=Kt(this.state.type);return this.next(),super.createIdentifier(n,u)}else if(me(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,n,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let t=this.state.startLoc,n=this.flowParsePrimaryType(),o=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(t),s=this.eat(18);o=o||s,this.expect(0),!s&&this.match(3)?(i.elementType=n,this.next(),n=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=n,i.indexType=this.flowParseType(),this.expect(3),o?(i.optional=s,n=this.finishNode(i,"OptionalIndexedAccessType")):n=this.finishNode(i,"IndexedAccessType"))}return n}flowParsePrefixType(){let t=this.startNode();return this.eat(17)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let n=this.startNodeAt(t.loc.start);return n.params=[this.reinterpretTypeAsFunctionTypeParam(t)],n.rest=null,n.this=null,n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){let t=this.startNode();this.eat(45);let n=this.flowParseAnonFunctionWithoutParens();for(t.types=[n];this.eat(45);)t.types.push(this.flowParseAnonFunctionWithoutParens());return t.types.length===1?n:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){let t=this.startNode();this.eat(43);let n=this.flowParseIntersectionType();for(t.types=[n];this.eat(43);)t.types.push(this.flowParseIntersectionType());return t.types.length===1?n:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){let t=this.state.inType;this.state.inType=!0;let n=this.flowParseUnionType();return this.state.inType=t,n}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let t=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(t,n)}else return this.flowParseType()}flowParseTypeAnnotation(){let t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){let t=this.startNode(),n=this.parseIdentifierName();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(t,n)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(53)?(t=this.startNode(),this.state.value==="+"?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")):t}parseFunctionBody(t,n,o=!1){if(n){this.forwardNoArrowParamsConversionAt(t,()=>super.parseFunctionBody(t,!0,o));return}super.parseFunctionBody(t,!1,o)}parseFunctionBodyAndFinish(t,n,o=!1){if(this.match(14)){let i=this.startNode();[i.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=i.typeAnnotation?this.finishNode(i,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(t,n,o)}parseStatementLike(t){if(this.state.strict&&this.isContextual(129)){let o=this.lookahead();if(mt(o.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let o=this.startNode();return this.next(),this.flowParseEnumDeclaration(o)}let n=super.parseStatementLike(t);return this.flowPragma===void 0&&!this.isValidDirective(n)&&(this.flowPragma=null),n}parseExpressionStatement(t,n,o){if(n.type==="Identifier"){if(n.name==="declare"){if(this.match(80)||me(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(t)}else if(me(this.state.type)){if(n.name==="interface")return this.flowParseInterface(t);if(n.name==="type")return this.flowParseTypeAlias(t);if(n.name==="opaque")return this.flowParseOpaqueType(t,!1)}}return super.parseExpressionStatement(t,n,o)}shouldParseExportDeclaration(){let{type:t}=this.state;return t===126||TS(t)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:t}=this.state;return t===126||TS(t)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,n,o){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){let y=this.lookaheadCharCode();if(y===44||y===61||y===58||y===41)return this.setOptionalParametersError(o),t}this.expect(17);let i=this.state.clone(),s=this.state.noArrowAt,c=this.startNodeAt(n),{consequent:u,failed:m}=this.tryParseConditionalConsequent(),[h,g]=this.getArrowLikeExpressions(u);if(m||g.length>0){let y=[...s];if(g.length>0){this.state=i,this.state.noArrowAt=y;for(let S=0;S<g.length;S++)y.push(g[S].start);({consequent:u,failed:m}=this.tryParseConditionalConsequent()),[h,g]=this.getArrowLikeExpressions(u)}m&&h.length>1&&this.raise(Y.AmbiguousConditionalArrow,i.startLoc),m&&h.length===1&&(this.state=i,y.push(h[0].start),this.state.noArrowAt=y,{consequent:u,failed:m}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(u,!0),this.state.noArrowAt=s,this.expect(14),c.test=t,c.consequent=u,c.alternate=this.forwardNoArrowParamsConversionAt(c,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(c,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let t=this.parseMaybeAssignAllowIn(),n=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:n}}getArrowLikeExpressions(t,n){let o=[t],i=[];for(;o.length!==0;){let s=o.pop();s.type==="ArrowFunctionExpression"&&s.body.type!=="BlockStatement"?(s.typeParameters||!s.returnType?this.finishArrowValidation(s):i.push(s),o.push(s.body)):s.type==="ConditionalExpression"&&(o.push(s.consequent),o.push(s.alternate))}return n?(i.forEach(s=>this.finishArrowValidation(s)),[i,[]]):Qce(i,s=>s.params.every(c=>this.isAssignable(c,!0)))}finishArrowValidation(t){var n;this.toAssignableList(t.params,(n=t.extra)==null?void 0:n.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,n){let o;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),o=n(),this.state.noArrowParamsConversionAt.pop()):o=n(),o}parseParenItem(t,n){let o=super.parseParenItem(t,n);if(this.eat(17)&&(o.optional=!0,this.resetEndLocation(t)),this.match(14)){let i=this.startNodeAt(n);return i.expression=o,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return o}assertModuleNodeAllowed(t){t.type==="ImportDeclaration"&&(t.importKind==="type"||t.importKind==="typeof")||t.type==="ExportNamedDeclaration"&&t.exportKind==="type"||t.type==="ExportAllDeclaration"&&t.exportKind==="type"||super.assertModuleNodeAllowed(t)}parseExportDeclaration(t){if(this.isContextual(130)){t.exportKind="type";let n=this.startNode();return this.next(),this.match(5)?(t.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(t),null):this.flowParseTypeAlias(n)}else if(this.isContextual(131)){t.exportKind="type";let n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}else if(this.isContextual(129)){t.exportKind="type";let n=this.startNode();return this.next(),this.flowParseInterface(n)}else if(this.isContextual(126)){t.exportKind="value";let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}else return super.parseExportDeclaration(t)}eatExportStar(t){return super.eatExportStar(t)?!0:this.isContextual(130)&&this.lookahead().type===55?(t.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(t){let{startLoc:n}=this.state,o=super.maybeParseExportNamespaceSpecifier(t);return o&&t.exportKind==="type"&&this.unexpected(n),o}parseClassId(t,n,o){super.parseClassId(t,n,o),this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,n,o){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(t,n))return;n.declare=!0}super.parseClassMember(t,n,o),n.declare&&(n.type!=="ClassProperty"&&n.type!=="ClassPrivateProperty"&&n.type!=="PropertyDefinition"?this.raise(Y.DeclareClassElement,i):n.value&&this.raise(Y.DeclareClassFieldInitializer,n.value))}isIterator(t){return t==="iterator"||t==="asyncIterator"}readIterator(){let t=super.readWord1(),n="@@"+t;(!this.isIterator(t)||!this.state.inType)&&this.raise(k.InvalidIdentifier,this.state.curPosition(),{identifierName:n}),this.finishToken(132,n)}getTokenFromCode(t){let n=this.input.charCodeAt(this.state.pos+1);t===123&&n===124?this.finishOp(6,2):this.state.inType&&(t===62||t===60)?this.finishOp(t===62?48:47,1):this.state.inType&&t===63?n===46?this.finishOp(18,2):this.finishOp(17,1):Gce(t,n,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t)}isAssignable(t,n){return t.type==="TypeCastExpression"?this.isAssignable(t.expression,n):super.isAssignable(t,n)}toAssignable(t,n=!1){!n&&t.type==="AssignmentExpression"&&t.left.type==="TypeCastExpression"&&(t.left=this.typeCastToParameter(t.left)),super.toAssignable(t,n)}toAssignableList(t,n,o){for(let i=0;i<t.length;i++){let s=t[i];s?.type==="TypeCastExpression"&&(t[i]=this.typeCastToParameter(s))}super.toAssignableList(t,n,o)}toReferencedList(t,n){for(let i=0;i<t.length;i++){var o;let s=t[i];s&&s.type==="TypeCastExpression"&&!((o=s.extra)!=null&&o.parenthesized)&&(t.length>1||!n)&&this.raise(Y.TypeCastInPattern,s.typeAnnotation)}return t}parseArrayLike(t,n,o){let i=super.parseArrayLike(t,n,o);return o!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(t,n,o,i){return t==="TypeCastExpression"||super.isValidLVal(t,n,o,i)}parseClassProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(14)&&super.isNonstaticConstructor(t)}pushClassMethod(t,n,o,i,s,c){if(n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,n,o,i,s,c),n.params&&s){let u=n.params;u.length>0&&this.isThisParam(u[0])&&this.raise(Y.ThisParamBannedInConstructor,n)}else if(n.type==="MethodDefinition"&&s&&n.value.params){let u=n.value.params;u.length>0&&this.isThisParam(u[0])&&this.raise(Y.ThisParamBannedInConstructor,n)}}pushClassPrivateMethod(t,n,o,i){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,n,o,i)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&(this.match(47)||this.match(51))&&(t.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let n=t.implements=[];do{let o=this.startNode();o.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?o.typeParameters=this.flowParseTypeParameterInstantiation():o.typeParameters=null,n.push(this.finishNode(o,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);let n=this.getObjectOrClassMethodParams(t);if(n.length>0){let o=n[0];this.isThisParam(o)&&t.kind==="get"?this.raise(Y.GetterMayNotHaveThisParam,o):this.isThisParam(o)&&this.raise(Y.SetterMayNotHaveThisParam,o)}}parsePropertyNamePrefixOperator(t){t.variance=this.flowParseVariance()}parseObjPropValue(t,n,o,i,s,c,u){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance;let m;this.match(47)&&!c&&(m=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let h=super.parseObjPropValue(t,n,o,i,s,c,u);return m&&((h.value||h).typeParameters=m),h}parseFunctionParamType(t){return this.eat(17)&&(t.type!=="Identifier"&&this.raise(Y.PatternIsOptional,t),this.isThisParam(t)&&this.raise(Y.ThisParamMayNotBeOptional,t),t.optional=!0),this.match(14)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(Y.ThisParamAnnotationRequired,t),this.match(29)&&this.isThisParam(t)&&this.raise(Y.ThisParamNoDefault,t),this.resetEndLocation(t),t}parseMaybeDefault(t,n){let o=super.parseMaybeDefault(t,n);return o.type==="AssignmentPattern"&&o.typeAnnotation&&o.right.start<o.typeAnnotation.start&&this.raise(Y.TypeBeforeInitializer,o.typeAnnotation),o}checkImportReflection(t){super.checkImportReflection(t),t.module&&t.importKind!=="value"&&this.raise(Y.ImportReflectionHasImportType,t.specifiers[0].loc.start)}parseImportSpecifierLocal(t,n,o){n.local=CS(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(n,o))}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){if(!t)return!0;let n=this.lookaheadCharCode();return n===123||n===42}return!t&&this.isContextual(87)}applyImportPhase(t,n,o,i){if(super.applyImportPhase(t,n,o,i),n){if(!o&&this.match(65))return;t.exportKind=o==="type"?o:"value"}else o==="type"&&this.match(55)&&this.unexpected(),t.importKind=o==="type"||o==="typeof"?o:"value"}parseImportSpecifier(t,n,o,i,s){let c=t.imported,u=null;c.type==="Identifier"&&(c.name==="type"?u="type":c.name==="typeof"&&(u="typeof"));let m=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let g=this.parseIdentifier(!0);u!==null&&!mt(this.state.type)?(t.imported=g,t.importKind=u,t.local=this.cloneIdentifier(g)):(t.imported=c,t.importKind=null,t.local=this.parseIdentifier())}else{if(u!==null&&mt(this.state.type))t.imported=this.parseIdentifier(!0),t.importKind=u;else{if(n)throw this.raise(k.ImportBindingIsString,t,{importName:c.value});t.imported=c,t.importKind=null}this.eatContextual(93)?t.local=this.parseIdentifier():(m=!0,t.local=this.cloneIdentifier(t.imported))}let h=CS(t);return o&&h&&this.raise(Y.ImportTypeShorthandOnlyInPureImport,t),(o||h)&&this.checkReservedType(t.local.name,t.local.loc.start,!0),m&&!o&&!h&&this.checkReservedWord(t.local.name,t.loc.start,!0,!0),this.finishImportSpecifier(t,"ImportSpecifier")}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(t,n){let o=t.kind;o!=="get"&&o!=="set"&&this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,n)}parseVarId(t,n){super.parseVarId(t,n),this.match(14)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,n){if(this.match(14)){let o=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=o}return super.parseAsyncArrowFromCallExpression(t,n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,n){var o;let i=null,s;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),s=this.tryParse(()=>super.parseMaybeAssign(t,n),i),!s.error)return s.node;let{context:m}=this.state,h=m[m.length-1];(h===ue.j_oTag||h===ue.j_expr)&&m.pop()}if((o=s)!=null&&o.error||this.match(47)){var c,u;i=i||this.state.clone();let m,h=this.tryParse(y=>{var S;m=this.flowParseTypeParameterDeclaration();let w=this.forwardNoArrowParamsConversionAt(m,()=>{let E=super.parseMaybeAssign(t,n);return this.resetStartLocationFromNode(E,m),E});(S=w.extra)!=null&&S.parenthesized&&y();let $=this.maybeUnwrapTypeCastExpression(w);return $.type!=="ArrowFunctionExpression"&&y(),$.typeParameters=m,this.resetStartLocationFromNode($,m),w},i),g=null;if(h.node&&this.maybeUnwrapTypeCastExpression(h.node).type==="ArrowFunctionExpression"){if(!h.error&&!h.aborted)return h.node.async&&this.raise(Y.UnexpectedTypeParameterBeforeAsyncArrowFunction,m),h.node;g=h.node}if((c=s)!=null&&c.node)return this.state=s.failState,s.node;if(g)return this.state=h.failState,g;throw(u=s)!=null&&u.thrown?s.error:h.thrown?h.error:this.raise(Y.UnexpectedTokenAfterTypeParameter,m)}return super.parseMaybeAssign(t,n)}parseArrow(t){if(this.match(14)){let n=this.tryParse(()=>{let o=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=o,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),i});if(n.thrown)return null;n.error&&(this.state=n.failState),t.returnType=n.node.typeAnnotation?this.finishNode(n.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(14)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,n){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?t.params=n:super.setArrowFunctionParameters(t,n)}checkParams(t,n,o,i=!0){if(!(o&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start)))){for(let s=0;s<t.params.length;s++)this.isThisParam(t.params[s])&&s>0&&this.raise(Y.ThisParamMustBeFirst,t.params[s]);super.checkParams(t,n,o,i)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(t,n,o){if(t.type==="Identifier"&&t.name==="async"&&this.state.noArrowAt.includes(n.index)){this.next();let i=this.startNodeAt(n);i.callee=t,i.arguments=super.parseCallExpressionArguments(),t=this.finishNode(i,"CallExpression")}else if(t.type==="Identifier"&&t.name==="async"&&this.match(47)){let i=this.state.clone(),s=this.tryParse(u=>this.parseAsyncArrowWithTypeParameters(n)||u(),i);if(!s.error&&!s.aborted)return s.node;let c=this.tryParse(()=>super.parseSubscripts(t,n,o),i);if(c.node&&!c.error)return c.node;if(s.node)return this.state=s.failState,s.node;if(c.node)return this.state=c.failState,c.node;throw s.error||c.error}return super.parseSubscripts(t,n,o)}parseSubscript(t,n,o,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,o)return i.stop=!0,t;this.next();let s=this.startNodeAt(n);return s.callee=t,s.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),s.arguments=this.parseCallExpressionArguments(),s.optional=!0,this.finishCallExpression(s,!0)}else if(!o&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let s=this.startNodeAt(n);s.callee=t;let c=this.tryParse(()=>(s.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),s.arguments=super.parseCallExpressionArguments(),i.optionalChainMember&&(s.optional=!1),this.finishCallExpression(s,i.optionalChainMember)));if(c.node)return c.error&&(this.state=c.failState),c.node}return super.parseSubscript(t,n,o,i)}parseNewCallee(t){super.parseNewCallee(t);let n=null;this.shouldParseTypes()&&this.match(47)&&(n=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),t.typeArguments=n}parseAsyncArrowWithTypeParameters(t){let n=this.startNodeAt(t);if(this.parseFunctionParams(n,!1),!!this.parseArrow(n))return super.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(t){let n=this.input.charCodeAt(this.state.pos+1);if(t===42&&n===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(t)}readToken_pipe_amp(t){let n=this.input.charCodeAt(this.state.pos+1);if(t===124&&n===125){this.finishOp(9,2);return}super.readToken_pipe_amp(t)}parseTopLevel(t,n){let o=super.parseTopLevel(t,n);return this.state.hasFlowComment&&this.raise(Y.UnterminatedFlowComment,this.state.curPosition()),o}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Y.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let t=this.skipFlowComment();t&&(this.state.pos+=t,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:t}=this.state,n=2;for(;[32,9].includes(this.input.charCodeAt(t+n));)n++;let o=this.input.charCodeAt(n+t),i=this.input.charCodeAt(n+t+1);return o===58&&i===58?n+2:this.input.slice(n+t,n+t+12)==="flow-include"?n+12:o===58&&i!==58?n:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(k.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:n,memberName:o}){this.raise(Y.EnumBooleanMemberNotInitialized,t,{memberName:o,enumName:n})}flowEnumErrorInvalidMemberInitializer(t,n){return this.raise(n.explicitType?n.explicitType==="symbol"?Y.EnumInvalidMemberInitializerSymbolType:Y.EnumInvalidMemberInitializerPrimaryType:Y.EnumInvalidMemberInitializerUnknownType,t,n)}flowEnumErrorNumberMemberNotInitialized(t,n){this.raise(Y.EnumNumberMemberNotInitialized,t,n)}flowEnumErrorStringMemberInconsistentlyInitialized(t,n){this.raise(Y.EnumStringMemberInconsistentlyInitialized,t,n)}flowEnumMemberInit(){let t=this.state.startLoc,n=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let o=this.parseNumericLiteral(this.state.value);return n()?{type:"number",loc:o.loc.start,value:o}:{type:"invalid",loc:t}}case 134:{let o=this.parseStringLiteral(this.state.value);return n()?{type:"string",loc:o.loc.start,value:o}:{type:"invalid",loc:t}}case 85:case 86:{let o=this.parseBooleanLiteral(this.match(85));return n()?{type:"boolean",loc:o.loc.start,value:o}:{type:"invalid",loc:t}}default:return{type:"invalid",loc:t}}}flowEnumMemberRaw(){let t=this.state.startLoc,n=this.parseIdentifier(!0),o=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:t};return{id:n,init:o}}flowEnumCheckExplicitTypeMismatch(t,n,o){let{explicitType:i}=n;i!==null&&i!==o&&this.flowEnumErrorInvalidMemberInitializer(t,n)}flowEnumMembers({enumName:t,explicitType:n}){let o=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},s=!1;for(;!this.match(8);){if(this.eat(21)){s=!0;break}let c=this.startNode(),{id:u,init:m}=this.flowEnumMemberRaw(),h=u.name;if(h==="")continue;/^[a-z]/.test(h)&&this.raise(Y.EnumInvalidMemberName,u,{memberName:h,suggestion:h[0].toUpperCase()+h.slice(1),enumName:t}),o.has(h)&&this.raise(Y.EnumDuplicateMemberName,u,{memberName:h,enumName:t}),o.add(h);let g={enumName:t,explicitType:n,memberName:h};switch(c.id=u,m.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(m.loc,g,"boolean"),c.init=m.value,i.booleanMembers.push(this.finishNode(c,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(m.loc,g,"number"),c.init=m.value,i.numberMembers.push(this.finishNode(c,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(m.loc,g,"string"),c.init=m.value,i.stringMembers.push(this.finishNode(c,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(m.loc,g);case"none":switch(n){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(m.loc,g);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(m.loc,g);break;default:i.defaultedMembers.push(this.finishNode(c,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:s}}flowEnumStringMembers(t,n,{enumName:o}){if(t.length===0)return n;if(n.length===0)return t;if(n.length>t.length){for(let i of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:o});return n}else{for(let i of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:o});return t}}flowEnumParseExplicitType({enumName:t}){if(!this.eatContextual(102))return null;if(!me(this.state.type))throw this.raise(Y.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:t});let{value:n}=this.state;return this.next(),n!=="boolean"&&n!=="number"&&n!=="string"&&n!=="symbol"&&this.raise(Y.EnumInvalidExplicitType,this.state.startLoc,{enumName:t,invalidEnumType:n}),n}flowEnumBody(t,n){let o=n.name,i=n.loc.start,s=this.flowEnumParseExplicitType({enumName:o});this.expect(5);let{members:c,hasUnknownMembers:u}=this.flowEnumMembers({enumName:o,explicitType:s});switch(t.hasUnknownMembers=u,s){case"boolean":return t.explicitType=!0,t.members=c.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=c.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(c.stringMembers,c.defaultedMembers,{enumName:o}),this.expect(8),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=c.defaultedMembers,this.expect(8),this.finishNode(t,"EnumSymbolBody");default:{let m=()=>(t.members=[],this.expect(8),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;let h=c.booleanMembers.length,g=c.numberMembers.length,y=c.stringMembers.length,S=c.defaultedMembers.length;if(!h&&!g&&!y&&!S)return m();if(!h&&!g)return t.members=this.flowEnumStringMembers(c.stringMembers,c.defaultedMembers,{enumName:o}),this.expect(8),this.finishNode(t,"EnumStringBody");if(!g&&!y&&h>=S){for(let w of c.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(w.loc.start,{enumName:o,memberName:w.id.name});return t.members=c.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody")}else if(!h&&!y&&g>=S){for(let w of c.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(w.loc.start,{enumName:o,memberName:w.id.name});return t.members=c.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody")}else return this.raise(Y.EnumInconsistentMemberValues,i,{enumName:o}),m()}}}flowParseEnumDeclaration(t){let n=this.parseIdentifier();return t.id=n,t.body=this.flowEnumBody(this.startNode(),n),this.finishNode(t,"EnumDeclaration")}jsxParseOpeningElementAfterName(t){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(t.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(t)}isLookaheadToken_lt(){let t=this.nextTokenStart();if(this.input.charCodeAt(t)===60){let n=this.input.charCodeAt(t+1);return n!==60&&n!==61}return!1}reScan_lt_gt(){let{type:t}=this.state;t===47?(this.state.pos-=1,this.readToken_lt()):t===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===51?(this.state.pos-=2,this.finishOp(47,1),47):t}maybeUnwrapTypeCastExpression(t){return t.type==="TypeCastExpression"?t.expression:t}},ope={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},rpe=/\r\n|[\r\n\u2028\u2029]/,ta=new RegExp(rpe.source,"g");function dr(r){switch(r){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function OS(r,e,t){for(let n=e;n<t;n++)if(dr(r.charCodeAt(n)))return!0;return!1}var mm=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,hm=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function npe(r){switch(r){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var lo=ut`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:r})=>`Expected corresponding JSX closing tag for <${r}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:r,HTMLEntity:e})=>`Unexpected token \`${r}\`. Did you mean \`${e}\` or \`{'${r}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Gt(r){return r?r.type==="JSXOpeningFragment"||r.type==="JSXClosingFragment":!1}function pr(r){if(r.type==="JSXIdentifier")return r.name;if(r.type==="JSXNamespacedName")return r.namespace.name+":"+r.name.name;if(r.type==="JSXMemberExpression")return pr(r.object)+"."+pr(r.property);throw new Error("Node had unexpected type: "+r.type)}var ipe=r=>class extends r{jsxReadToken(){let t="",n=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(lo.UnterminatedJsxContent,this.state.startLoc);let o=this.input.charCodeAt(this.state.pos);switch(o){case 60:case 123:if(this.state.pos===this.state.start){o===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(o);return}t+=this.input.slice(n,this.state.pos),this.finishToken(142,t);return;case 38:t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos;break;default:dr(o)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!0),n=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){let n=this.input.charCodeAt(this.state.pos),o;return++this.state.pos,n===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,o=t?`
|
|
5
|
+
`:`\r
|
|
6
|
+
`):o=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,o}jsxReadString(t){let n="",o=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(k.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===t)break;i===38?(n+=this.input.slice(o,this.state.pos),n+=this.jsxReadEntity(),o=this.state.pos):dr(i)?(n+=this.input.slice(o,this.state.pos),n+=this.jsxReadNewLine(!1),o=this.state.pos):++this.state.pos}n+=this.input.slice(o,this.state.pos++),this.finishToken(134,n)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let n=10;this.codePointAtPos(this.state.pos)===120&&(n=16,++this.state.pos);let o=this.readInt(n,void 0,!1,"bail");if(o!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(o)}else{let n=0,o=!1;for(;n++<10&&this.state.pos<this.length&&!(o=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(o){let i=this.input.slice(t,this.state.pos),s=ope[i];if(++this.state.pos,s)return s}}return this.state.pos=t,"&"}jsxReadWord(){let t,n=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(mo(t)||t===45);this.finishToken(141,this.input.slice(n,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(141)?t.name=this.state.value:Wm(this.state.type)?t.name=Kt(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,n=this.jsxParseIdentifier();if(!this.eat(14))return n;let o=this.startNodeAt(t);return o.namespace=n,o.name=this.jsxParseIdentifier(),this.finishNode(o,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,n=this.jsxParseNamespacedName();if(n.type==="JSXNamespacedName")return n;for(;this.eat(16);){let o=this.startNodeAt(t);o.object=n,o.property=this.jsxParseIdentifier(),n=this.finishNode(o,"JSXMemberExpression")}return n}jsxParseAttributeValue(){let t;switch(this.state.type){case 5:return t=this.startNode(),this.setContext(ue.brace),this.next(),t=this.jsxParseExpressionContainer(t,ue.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(lo.AttributeIsEmpty,t),t;case 143:case 134:return this.parseExprAtom();default:throw this.raise(lo.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(ue.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,n){if(this.match(8))t.expression=this.jsxParseEmptyExpression();else{let o=this.parseExpression();t.expression=o}return this.setContext(n),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){let t=this.startNode();return this.match(5)?(this.setContext(ue.brace),this.next(),this.expect(21),t.argument=this.parseMaybeAssignAllowIn(),this.setContext(ue.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t){let n=this.startNodeAt(t);return this.eat(144)?this.finishNode(n,"JSXOpeningFragment"):(n.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(n))}jsxParseOpeningElementAfterName(t){let n=[];for(;!this.match(56)&&!this.match(144);)n.push(this.jsxParseAttribute());return t.attributes=n,t.selfClosing=this.eat(56),this.expect(144),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){let n=this.startNodeAt(t);return this.eat(144)?this.finishNode(n,"JSXClosingFragment"):(n.name=this.jsxParseElementName(),this.expect(144),this.finishNode(n,"JSXClosingElement"))}jsxParseElementAt(t){let n=this.startNodeAt(t),o=[],i=this.jsxParseOpeningElementAt(t),s=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 143:if(t=this.state.startLoc,this.next(),this.eat(56)){s=this.jsxParseClosingElementAt(t);break e}o.push(this.jsxParseElementAt(t));break;case 142:o.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let c=this.startNode();this.setContext(ue.brace),this.next(),this.match(21)?o.push(this.jsxParseSpreadChild(c)):o.push(this.jsxParseExpressionContainer(c,ue.j_expr));break}default:this.unexpected()}Gt(i)&&!Gt(s)&&s!==null?this.raise(lo.MissingClosingTagFragment,s):!Gt(i)&&Gt(s)?this.raise(lo.MissingClosingTagElement,s,{openingTagName:pr(i.name)}):!Gt(i)&&!Gt(s)&&pr(s.name)!==pr(i.name)&&this.raise(lo.MissingClosingTagElement,s,{openingTagName:pr(i.name)})}if(Gt(i)?(n.openingFragment=i,n.closingFragment=s):(n.openingElement=i,n.closingElement=s),n.children=o,this.match(47))throw this.raise(lo.UnwrappedAdjacentJSXElements,this.state.startLoc);return Gt(i)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){let t=this.state.startLoc;return this.next(),this.jsxParseElementAt(t)}setContext(t){let{context:n}=this.state;n[n.length-1]=t}parseExprAtom(t){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(t)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(t){let n=this.curContext();if(n===ue.j_expr){this.jsxReadToken();return}if(n===ue.j_oTag||n===ue.j_cTag){if(vt(t)){this.jsxReadWord();return}if(t===62){++this.state.pos,this.finishToken(144);return}if((t===34||t===39)&&n===ue.j_oTag){this.jsxReadString(t);return}}if(t===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(t)}updateContext(t){let{context:n,type:o}=this.state;if(o===56&&t===143)n.splice(-2,2,ue.j_cTag),this.state.canStartJSXElement=!1;else if(o===143)n.push(ue.j_oTag);else if(o===144){let i=n[n.length-1];i===ue.j_oTag&&t===56||i===ue.j_cTag?(n.pop(),this.state.canStartJSXElement=n[n.length-1]===ue.j_expr):(this.setContext(ue.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Mce(o)}},zm=class extends vn{constructor(...e){super(...e),this.tsNames=new Map}},vm=class extends wn{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new zm(e)}enter(e){e===1024&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e===1024&&this.importsStack.pop(),e}hasImport(e,t){let n=this.importsStack.length;if(this.importsStack[n-1].has(e))return!0;if(!t&&n>1){for(let o=0;o<n-1;o++)if(this.importsStack[o].has(e))return!0}return!1}declareName(e,t,n){if(t&4096){this.hasImport(e,!0)&&this.parser.raise(k.VarRedeclaration,n,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let o=this.currentScope(),i=o.tsNames.get(e)||0;if(t&1024){this.maybeExportDefined(o,e),o.tsNames.set(e,i|16);return}super.declareName(e,t,n),t&2&&(t&1||(this.checkRedeclarationInScope(o,e,t,n),this.maybeExportDefined(o,e)),i=i|1),t&256&&(i=i|2),t&512&&(i=i|4),t&128&&(i=i|8),i&&o.tsNames.set(e,i)}isRedeclaredInScope(e,t,n){let o=e.tsNames.get(t);if((o&2)>0){if(n&256){let i=!!(n&512),s=(o&4)>0;return i!==s}return!0}return n&128&&(o&8)>0?e.names.get(t)&2?!!(n&1):!1:n&2&&(o&1)>0?!0:super.isRedeclaredInScope(e,t,n)}checkLocalExport(e){let{name:t}=e;if(this.hasImport(t))return;let n=this.scopeStack.length;for(let o=n-1;o>=0;o--){let s=this.scopeStack[o].tsNames.get(t);if((s&1)>0||(s&16)>0)return}super.checkLocalExport(e)}},wm=class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function ia(r,e){return(r?2:0)|(e?1:0)}var Im=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[t,n]=e;if(!this.hasPlugin(t))return!1;let o=this.plugins.get(t);for(let i of Object.keys(n))if(o?.[i]!==n[i])return!1;return!0}}getPluginOption(e,t){var n;return(n=this.plugins.get(e))==null?void 0:n[t]}};function ZS(r,e){r.trailingComments===void 0?r.trailingComments=e:r.trailingComments.unshift(...e)}function spe(r,e){r.leadingComments===void 0?r.leadingComments=e:r.leadingComments.unshift(...e)}function In(r,e){r.innerComments===void 0?r.innerComments=e:r.innerComments.unshift(...e)}function lt(r,e,t){let n=null,o=e.length;for(;n===null&&o>0;)n=e[--o];n===null||n.start>t.start?In(r,t.comments):ZS(n,t.comments)}var km=class extends Im{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:t}=this.state,n=t.length;if(n===0)return;let o=n-1,i=t[o];i.start===e.end&&(i.leadingNode=e,o--);let{start:s}=e;for(;o>=0;o--){let c=t[o],u=c.end;if(u>s)c.containingNode=e,this.finalizeComment(c),t.splice(o,1);else{u===s&&(c.trailingNode=e);break}}}finalizeComment(e){var t;let{comments:n}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&ZS(e.leadingNode,n),e.trailingNode!==null&&spe(e.trailingNode,n);else{let o=e.containingNode,i=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(i)-1)===44)switch(o.type){case"ObjectExpression":case"ObjectPattern":lt(o,o.properties,e);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":lt(o,o.arguments,e);break;case"ImportExpression":lt(o,[o.source,(t=o.options)!=null?t:null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":lt(o,o.params,e);break;case"ArrayExpression":case"ArrayPattern":lt(o,o.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":lt(o,o.specifiers,e);break;case"TSEnumDeclaration":lt(o,o.members,e);break;case"TSEnumBody":lt(o,o.members,e);break;case"TSInterfaceBody":lt(o,o.body,e);break;default:{if(o.type==="RecordExpression"){lt(o,o.properties,e);break}if(o.type==="TupleExpression"){lt(o,o.elements,e);break}In(o,n)}}else In(o,n)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:n}=t;if(n===0)return;let o=t[n-1];o.leadingNode===e&&(o.leadingNode=null)}takeSurroundingComments(e,t,n){let{commentStack:o}=this.state,i=o.length;if(i===0)return;let s=i-1;for(;s>=0;s--){let c=o[s],u=c.end;if(c.start===n)c.leadingNode=e;else if(u===t)c.trailingNode=e;else if(u<t)break}}},Pm=class r{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[ue.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:t,startIndex:n,startLine:o,startColumn:i}){this.strict=e===!1?!1:e===!0?!0:t==="module",this.startIndex=n,this.curLine=o,this.lineStart=-i,this.startLoc=this.endLoc=new wt(o,i,n)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new wt(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let e=new r;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},ape=function(e){return e>=48&&e<=57},MS={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},oa={bin:r=>r===48||r===49,oct:r=>r>=48&&r<=55,dec:r=>r>=48&&r<=57,hex:r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102};function RS(r,e,t,n,o,i){let s=t,c=n,u=o,m="",h=null,g=t,{length:y}=e;for(;;){if(t>=y){i.unterminated(s,c,u),m+=e.slice(g,t);break}let S=e.charCodeAt(t);if(cpe(r,S,e,t)){m+=e.slice(g,t);break}if(S===92){m+=e.slice(g,t);let w=ppe(e,t,n,o,r==="template",i);w.ch===null&&!h?h={pos:t,lineStart:n,curLine:o}:m+=w.ch,{pos:t,lineStart:n,curLine:o}=w,g=t}else S===8232||S===8233?(++t,++o,n=t):S===10||S===13?r==="template"?(m+=e.slice(g,t)+`
|
|
7
|
+
`,++t,S===13&&e.charCodeAt(t)===10&&++t,++o,g=n=t):i.unterminated(s,c,u):++t}return{pos:t,str:m,firstInvalidLoc:h,lineStart:n,curLine:o,containsInvalid:!!h}}function cpe(r,e,t,n){return r==="template"?e===96||e===36&&t.charCodeAt(n+1)===123:e===(r==="double"?34:39)}function ppe(r,e,t,n,o,i){let s=!o;e++;let c=m=>({pos:e,ch:m,lineStart:t,curLine:n}),u=r.charCodeAt(e++);switch(u){case 110:return c(`
|
|
8
|
+
`);case 114:return c("\r");case 120:{let m;return{code:m,pos:e}=$m(r,e,t,n,2,!1,s,i),c(m===null?null:String.fromCharCode(m))}case 117:{let m;return{code:m,pos:e}=KS(r,e,t,n,s,i),c(m===null?null:String.fromCodePoint(m))}case 116:return c(" ");case 98:return c("\b");case 118:return c("\v");case 102:return c("\f");case 13:r.charCodeAt(e)===10&&++e;case 10:t=e,++n;case 8232:case 8233:return c("");case 56:case 57:if(o)return c(null);i.strictNumericEscape(e-1,t,n);default:if(u>=48&&u<=55){let m=e-1,g=/^[0-7]+/.exec(r.slice(m,e+2))[0],y=parseInt(g,8);y>255&&(g=g.slice(0,-1),y=parseInt(g,8)),e+=g.length-1;let S=r.charCodeAt(e);if(g!=="0"||S===56||S===57){if(o)return c(null);i.strictNumericEscape(m,t,n)}return c(String.fromCharCode(y))}return c(String.fromCharCode(u))}}function $m(r,e,t,n,o,i,s,c){let u=e,m;return{n:m,pos:e}=GS(r,e,t,n,16,o,i,!1,c,!s),m===null&&(s?c.invalidEscapeSequence(u,t,n):e=u-1),{code:m,pos:e}}function GS(r,e,t,n,o,i,s,c,u,m){let h=e,g=o===16?MS.hex:MS.decBinOct,y=o===16?oa.hex:o===10?oa.dec:o===8?oa.oct:oa.bin,S=!1,w=0;for(let $=0,E=i??1/0;$<E;++$){let V=r.charCodeAt(e),F;if(V===95&&c!=="bail"){let H=r.charCodeAt(e-1),re=r.charCodeAt(e+1);if(c){if(Number.isNaN(re)||!y(re)||g.has(H)||g.has(re)){if(m)return{n:null,pos:e};u.unexpectedNumericSeparator(e,t,n)}}else{if(m)return{n:null,pos:e};u.numericSeparatorInEscapeSequence(e,t,n)}++e;continue}if(V>=97?F=V-97+10:V>=65?F=V-65+10:ape(V)?F=V-48:F=1/0,F>=o){if(F<=9&&m)return{n:null,pos:e};if(F<=9&&u.invalidDigit(e,t,n,o))F=0;else if(s)F=0,S=!0;else break}++e,w=w*o+F}return e===h||i!=null&&e-h!==i||S?{n:null,pos:e}:{n:w,pos:e}}function KS(r,e,t,n,o,i){let s=r.charCodeAt(e),c;if(s===123){if(++e,{code:c,pos:e}=$m(r,e,t,n,r.indexOf("}",e)-e,!0,o,i),++e,c!==null&&c>1114111)if(o)i.invalidCodePoint(e,t,n);else return{code:null,pos:e}}else({code:c,pos:e}=$m(r,e,t,n,4,!1,o,i));return{code:c,pos:e}}function yn(r,e,t){return new wt(t,r-e,r)}var dpe=new Set([103,109,115,105,121,117,100,118]),zt=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new ur(e.startLoc,e.endLoc)}},Tm=class extends km{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(n,o,i,s)=>this.optionFlags&2048?(this.raise(k.InvalidDigit,yn(n,o,i),{radix:s}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(k.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(k.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(k.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(k.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(n,o,i)=>{this.recordStrictModeErrors(k.StrictNumericEscape,yn(n,o,i))},unterminated:(n,o,i)=>{throw this.raise(k.UnterminatedString,yn(n-1,o,i))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(k.StrictNumericEscape),unterminated:(n,o,i)=>{throw this.raise(k.UnterminatedTemplate,yn(n,o,i))}}),this.state=new Pm,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new zt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return mm.lastIndex=e,mm.test(this.input)?mm.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return hm.lastIndex=e,hm.test(this.input)?hm.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let n=this.input.charCodeAt(e);(n&64512)===56320&&(t=65536+((t&1023)<<10)+(n&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,n])=>this.raise(t,n)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let n=this.state.pos,o=this.input.indexOf(e,n+2);if(o===-1)throw this.raise(k.UnterminatedComment,this.state.curPosition());for(this.state.pos=o+e.length,ta.lastIndex=n+2;ta.test(this.input)&&ta.lastIndex<=o;)++this.state.curLine,this.state.lineStart=ta.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(n+2,o),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(o+e.length),loc:new ur(t,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(i),i}skipLineComment(e){let t=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let o=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!dr(o)&&++this.state.pos<this.length;)o=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,c={type:"CommentLine",value:this.input.slice(t+e,i),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(i),loc:new ur(n,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(c),c}skipSpace(){let e=this.state.pos,t=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let o=this.skipBlockComment("*/");o!==void 0&&(this.addComment(o),t?.push(o));break}case 47:{let o=this.skipLineComment(2);o!==void 0&&(this.addComment(o),t?.push(o));break}default:break e}break;default:if(npe(n))++this.state.pos;else if(n===45&&!this.inModule&&this.optionFlags&8192){let o=this.state.pos;if(this.input.charCodeAt(o+1)===45&&this.input.charCodeAt(o+2)===62&&(e===0||this.state.lineStart>e)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),t?.push(i))}else break e}else if(n===60&&!this.inModule&&this.optionFlags&8192){let o=this.state.pos;if(this.input.charCodeAt(o+1)===33&&this.input.charCodeAt(o+2)===45&&this.input.charCodeAt(o+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),t?.push(i))}else break e}else break e}}if(t?.length>0){let n=this.state.pos,o={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(n),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(o)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(n)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(k.UnexpectedDigitAfterHash,this.state.curPosition());if(t===123||t===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(t===123?k.RecordExpressionHashIncorrectStartSyntaxType:k.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,t===123?this.finishToken(7):this.finishToken(1)}else vt(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let t=this.state.pos;for(this.state.pos+=1;!dr(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let n=this.input.slice(t+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(e){let t=e===42?55:54,n=1,o=this.input.charCodeAt(this.state.pos+1);e===42&&o===42&&(n++,o=this.input.charCodeAt(this.state.pos+2),t=57),o===61&&!this.state.inType&&(n++,t=e===37?33:30),this.finishOp(t,n)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(e===124?41:42,2);return}if(e===124){if(t===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&t===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(k.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&t===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(k.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(t===61){this.finishOp(30,2);return}this.finishOp(e===124?43:45,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(32,2):e===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.finishOp(34,2);return}t===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(t===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===62){let n=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+n)===61){this.finishOp(30,n+1);return}this.finishOp(52,n);return}if(t===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&t===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(e===61?29:35,1)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);e===63?t===61?this.finishOp(30,3):this.finishOp(40,2):e===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(k.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(k.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let t=this.input.charCodeAt(this.state.pos+1);if(t===120||t===88){this.readRadixNumber(16);return}if(t===111||t===79){this.readRadixNumber(8);return}if(t===98||t===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(vt(e)){this.readWord(e);return}}throw this.raise(k.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){let n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)}readRegexp(){let e=this.state.startLoc,t=this.state.start+1,n,o,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(k.UnterminatedRegExp,qe(e,1));let m=this.input.charCodeAt(i);if(dr(m))throw this.raise(k.UnterminatedRegExp,qe(e,1));if(n)n=!1;else{if(m===91)o=!0;else if(m===93&&o)o=!1;else if(m===47&&!o)break;n=m===92}}let s=this.input.slice(t,i);++i;let c="",u=()=>qe(e,i+2-t);for(;i<this.length;){let m=this.codePointAtPos(i),h=String.fromCharCode(m);if(dpe.has(m))m===118?c.includes("u")&&this.raise(k.IncompatibleRegExpUVFlags,u()):m===117&&c.includes("v")&&this.raise(k.IncompatibleRegExpUVFlags,u()),c.includes(h)&&this.raise(k.DuplicateRegExpFlags,u());else if(mo(m)||m===92)this.raise(k.MalformedRegExpFlags,u());else break;++i,c+=h}this.state.pos=i,this.finishToken(138,{pattern:s,flags:c})}readInt(e,t,n=!1,o=!0){let{n:i,pos:s}=GS(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,n,o,this.errorHandlers_readInt,!1);return this.state.pos=s,i}readRadixNumber(e){let t=this.state.pos,n=this.state.curPosition(),o=!1;this.state.pos+=2;let i=this.readInt(e);i==null&&this.raise(k.InvalidDigit,qe(n,2),{radix:e});let s=this.input.charCodeAt(this.state.pos);if(s===110)++this.state.pos,o=!0;else if(s===109)throw this.raise(k.InvalidDecimal,n);if(vt(this.codePointAtPos(this.state.pos)))throw this.raise(k.NumberIdentifier,this.state.curPosition());if(o){let c=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,c);return}this.finishToken(135,i)}readNumber(e){let t=this.state.pos,n=this.state.curPosition(),o=!1,i=!1,s=!1,c=!1;!e&&this.readInt(10)===null&&this.raise(k.InvalidNumber,this.state.curPosition());let u=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(u){let S=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(k.StrictOctalLiteral,n),!this.state.strict){let w=S.indexOf("_");w>0&&this.raise(k.ZeroDigitNumericSeparator,qe(n,w))}c=u&&!/[89]/.test(S)}let m=this.input.charCodeAt(this.state.pos);if(m===46&&!c&&(++this.state.pos,this.readInt(10),o=!0,m=this.input.charCodeAt(this.state.pos)),(m===69||m===101)&&!c&&(m=this.input.charCodeAt(++this.state.pos),(m===43||m===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(k.InvalidOrMissingExponent,n),o=!0,s=!0,m=this.input.charCodeAt(this.state.pos)),m===110&&((o||u)&&this.raise(k.InvalidBigIntLiteral,n),++this.state.pos,i=!0),m===109){this.expectPlugin("decimal",this.state.curPosition()),(s||u)&&this.raise(k.InvalidDecimal,n),++this.state.pos;var h=!0}if(vt(this.codePointAtPos(this.state.pos)))throw this.raise(k.NumberIdentifier,this.state.curPosition());let g=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(i){this.finishToken(136,g);return}if(h){this.finishToken(137,g);return}let y=c?parseInt(g,8):parseFloat(g);this.finishToken(135,y)}readCodePoint(e){let{code:t,pos:n}=KS(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=n,t}readString(e){let{str:t,pos:n,curLine:o,lineStart:i}=RS(e===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=i,this.state.curLine=o,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:n,pos:o,curLine:i,lineStart:s}=RS("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=o+1,this.state.lineStart=s,this.state.curLine=i,n&&(this.state.firstInvalidTemplateEscapePos=new wt(n.curLine,n.pos-n.lineStart,this.sourceToOffsetPos(n.pos))),this.input.codePointAt(o)===96?this.finishToken(24,n?null:e+t+"`"):(this.state.pos++,this.finishToken(25,n?null:e+t+"${"))}recordStrictModeErrors(e,t){let n=t.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(e,t):this.state.strictErrors.set(n,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",n=this.state.pos,o=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let i=this.codePointAtPos(this.state.pos);if(mo(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,t+=this.input.slice(o,this.state.pos);let s=this.state.curPosition(),c=this.state.pos===n?vt:mo;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(k.MissingUnicodeEscape,this.state.curPosition()),o=this.state.pos-1;continue}++this.state.pos;let u=this.readCodePoint(!0);u!==null&&(c(u)||this.raise(k.EscapedCharNotAnIdentifier,s),t+=String.fromCodePoint(u)),o=this.state.pos}else break}return t+this.input.slice(o,this.state.pos)}readWord(e){let t=this.readWord1(e),n=Fm.get(t);n!==void 0?this.finishToken(n,Kt(n)):this.finishToken(132,t)}checkKeywordEscapes(){let{type:e}=this.state;Wm(e)&&this.state.containsEsc&&this.raise(k.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Kt(e)})}raise(e,t,n={}){let o=t instanceof wt?t:t.loc.start,i=e(o,n);if(!(this.optionFlags&2048))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(e,t,n={}){let o=t instanceof wt?t:t.loc.start,i=o.index,s=this.state.errors;for(let c=s.length-1;c>=0;c--){let u=s[c];if(u.loc.index===i)return s[c]=e(o,n);if(u.loc.index<i)break}return this.raise(e,t,n)}updateContext(e){}unexpected(e,t){throw this.raise(k.UnexpectedToken,e??this.state.startLoc,{expected:t?Kt(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(k.MissingPlugin,t??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(t=>this.hasPlugin(t)))throw this.raise(k.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,n,o)=>{this.raise(e,yn(t,n,o))}}},Cm=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Om=class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Cm)}exit(){let e=this.stack.pop(),t=this.current();for(let[n,o]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(n)||t.undefinedPrivateNames.set(n,o):this.parser.raise(k.InvalidPrivateFieldResolution,o,{identifierName:n})}declarePrivateName(e,t,n){let{privateNames:o,loneAccessors:i,undefinedPrivateNames:s}=this.current(),c=o.has(e);if(t&3){let u=c&&i.get(e);if(u){let m=u&4,h=t&4,g=u&3,y=t&3;c=g===y||m!==h,c||i.delete(e)}else c||i.set(e,t)}c&&this.parser.raise(k.PrivateNameRedeclaration,n,{identifierName:e}),o.add(e),s.delete(e)}usePrivateName(e,t){let n;for(n of this.stack)if(n.privateNames.has(e))return;n?n.undefinedPrivateNames.set(e,t):this.parser.raise(k.InvalidPrivateFieldResolution,t,{identifierName:e})}},mr=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},ca=class extends mr{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,t){let n=t.index;this.declarationErrors.set(n,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},Mm=class{constructor(e){this.parser=void 0,this.stack=[new mr],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let n=t.loc.start,{stack:o}=this,i=o.length-1,s=o[i];for(;!s.isCertainlyParameterDeclaration();){if(s.canBeArrowParameterDeclaration())s.recordDeclarationError(e,n);else return;s=o[--i]}this.parser.raise(e,n)}recordArrowParameterBindingError(e,t){let{stack:n}=this,o=n[n.length-1],i=t.loc.start;if(o.isCertainlyParameterDeclaration())this.parser.raise(e,i);else if(o.canBeArrowParameterDeclaration())o.recordDeclarationError(e,i);else return}recordAsyncArrowParametersError(e){let{stack:t}=this,n=t.length-1,o=t[n];for(;o.canBeArrowParameterDeclaration();)o.type===2&&o.recordDeclarationError(k.AwaitBindingIdentifier,e),o=t[--n]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(([n,o])=>{this.parser.raise(n,o);let i=e.length-2,s=e[i];for(;s.canBeArrowParameterDeclaration();)s.clearDeclarationError(o.index),s=e[--i]})}};function lpe(){return new mr(3)}function upe(){return new ca(1)}function mpe(){return new ca(2)}function JS(){return new mr}var Rm=class extends Tm{addExtra(e,t,n,o=!0){if(!e)return;let{extra:i}=e;i==null&&(i={},e.extra=i),o?i[t]=n:Object.defineProperty(i,t,{enumerable:o,value:n})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){let n=this.input.charCodeAt(e+t.length);return!(mo(n)||(n&64512)===55296)}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,t){if(!this.eatContextual(e)){if(t!=null)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return OS(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return OS(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(k.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let n={node:null};try{let o=e((i=null)=>{throw n.node=i,n});if(this.state.errors.length>t.errors.length){let i=this.state;return this.state=t,this.state.tokensLength=i.tokensLength,{node:o,error:i.errors[t.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:o,error:null,thrown:!1,aborted:!1,failState:null}}catch(o){let i=this.state;if(this.state=t,o instanceof SyntaxError)return{node:null,error:o,thrown:!0,aborted:!1,failState:i};if(o===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:i};throw o}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:o,privateKeyLoc:i,optionalParametersLoc:s,voidPatternLoc:c}=e,u=!!n||!!o||!!s||!!i||!!c;if(!t)return u;n!=null&&this.raise(k.InvalidCoverInitializedName,n),o!=null&&this.raise(k.DuplicateProto,o),i!=null&&this.raise(k.UnexpectedPrivateField,i),s!=null&&this.unexpected(s),c!=null&&this.raise(k.InvalidCoverDiscardElement,c)}isLiteralPropertyName(){return FS(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){let t=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let o=this.inModule;this.inModule=e;let i=this.scope,s=this.getScopeHandler();this.scope=new s(this,e);let c=this.prodParam;this.prodParam=new wm;let u=this.classScope;this.classScope=new Om(this);let m=this.expressionScope;return this.expressionScope=new Mm(this),()=>{this.state.labels=t,this.exportedIdentifiers=n,this.inModule=o,this.scope=i,this.prodParam=c,this.classScope=u,this.expressionScope=m}}enterInitialScopes(){let e=0;(this.inModule||this.optionFlags&1)&&(e|=2),this.optionFlags&32&&(e|=1);let t=!this.inModule&&this.options.sourceType==="commonjs";(t||this.optionFlags&2)&&(e|=4),this.prodParam.enter(e);let n=t?514:1;this.optionFlags&4&&(n|=512),this.scope.enter(n)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin("destructuringPrivate",t)}},lr=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}},hr=class{constructor(e,t,n){this.type="",this.start=t,this.end=0,this.loc=new ur(n),e?.optionFlags&128&&(this.range=[t,0]),e!=null&&e.filename&&(this.loc.filename=e.filename)}},Em=hr.prototype;Em.__clone=function(){let r=new hr(void 0,this.start,this.loc.start),e=Object.keys(this);for(let t=0,n=e.length;t<n;t++){let o=e[t];o!=="leadingComments"&&o!=="trailingComments"&&o!=="innerComments"&&(r[o]=this[o])}return r};var Dm=class extends Rm{startNode(){let e=this.state.startLoc;return new hr(this,e.index,e)}startNodeAt(e){return new hr(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,n){return e.type=t,e.end=n.index,e.loc.end=n,this.optionFlags&128&&(e.range[1]=n.index),this.optionFlags&4096&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.optionFlags&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.optionFlags&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){let{type:t,start:n,end:o,loc:i,range:s,name:c}=e,u=Object.create(Em);return u.type=t,u.start=n,u.end=o,u.loc=i,u.range=s,u.name=c,e.extra&&(u.extra=e.extra),u}cloneStringLiteral(e){let{type:t,start:n,end:o,loc:i,range:s,extra:c}=e,u=Object.create(Em);return u.type=t,u.start=n,u.end=o,u.loc=i,u.range=s,u.extra=c,u.value=e.value,u}},Am=r=>r.type==="ParenthesizedExpression"?Am(r.expression):r,_m=class extends Dm{toAssignable(e,t=!1){var n,o;let i;switch((e.type==="ParenthesizedExpression"||(n=e.extra)!=null&&n.parenthesized)&&(i=Am(e),t?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(k.InvalidParenthesizedAssignment,e):i.type!=="CallExpression"&&i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(k.InvalidParenthesizedAssignment,e):this.raise(k.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let c=0,u=e.properties.length,m=u-1;c<u;c++){var s;let h=e.properties[c],g=c===m;this.toAssignableObjectExpressionProp(h,g,t),g&&h.type==="RestElement"&&(s=e.extra)!=null&&s.trailingCommaLoc&&this.raise(k.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:c,value:u}=e;this.isPrivateName(c)&&this.classScope.usePrivateName(this.getPrivateNameSV(c),c.loc.start),this.toAssignable(u,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(e,"ArrayPattern"),this.toAssignableList(e.elements,(o=e.extra)==null?void 0:o.trailingCommaLoc,t);break;case"AssignmentExpression":e.operator!=="="&&this.raise(k.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,e.left.type==="VoidPattern"&&this.raise(k.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(i,t);break}}toAssignableObjectExpressionProp(e,t,n){if(e.type==="ObjectMethod")this.raise(e.kind==="get"||e.kind==="set"?k.PatternHasAccessor:k.PatternHasMethod,e.key);else if(e.type==="SpreadElement"){this.castNodeTo(e,"RestElement");let o=e.argument;this.checkToRestConversion(o,!1),this.toAssignable(o,n),t||this.raise(k.RestTrailingComma,e)}else this.toAssignable(e,n)}toAssignableList(e,t,n){let o=e.length-1;for(let i=0;i<=o;i++){let s=e[i];s&&(this.toAssignableListItem(e,i,n),s.type==="RestElement"&&(i<o?this.raise(k.RestTrailingComma,s):t&&this.raise(k.RestTrailingComma,t)))}}toAssignableListItem(e,t,n){let o=e[t];if(o.type==="SpreadElement"){this.castNodeTo(o,"RestElement");let i=o.argument;this.checkToRestConversion(i,!0),this.toAssignable(i,n)}else this.toAssignable(o,n)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let n=e.properties.length-1;return e.properties.every((o,i)=>o.type!=="ObjectMethod"&&(i===n||o.type!=="SpreadElement")&&this.isAssignable(o))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(n=>n===null||this.isAssignable(n));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let n of e)n?.type==="ArrayExpression"&&this.toReferencedListDeep(n.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();this.next();let t=this.parseBindingAtom();return t.type==="VoidPattern"&&this.raise(k.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,t,n){let o=n&1,i=[],s=!0;for(;!this.eat(e);)if(s?s=!1:this.expect(12),o&&this.match(12))i.push(null);else{if(this.eat(e))break;if(this.match(21)){let c=this.parseRestBinding();if((this.hasPlugin("flow")||n&2)&&(c=this.parseFunctionParamType(c)),i.push(c),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let c=[];if(n&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(k.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)c.push(this.parseDecorator());i.push(this.parseBindingElement(n,c))}}return i}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(e.argument=this.parseVoidPattern(null),this.raise(k.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let{type:e,startLoc:t}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return e===139?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,t,!1,!1,!0,!1)}parseBindingElement(e,t){let n=this.parseMaybeDefault();return(this.hasPlugin("flow")||e&2)&&this.parseFunctionParamType(n),t.length&&(n.decorators=t,this.resetStartLocationFromNode(n,t[0])),this.parseMaybeDefault(n.loc.start,n)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??(e=this.state.startLoc),t=t??this.parseBindingAtom(),!this.eat(29))return t;let n=this.startNodeAt(e);return t.type==="VoidPattern"&&this.raise(k.VoidPatternInitializer,t),n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(e,t,n,o){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!t&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(e){return e.type==="OptionalMemberExpression"}checkLVal(e,t,n=64,o=!1,i=!1,s=!1,c=!1){var u;let m=e.type;if(this.isObjectMethod(e))return;let h=this.isOptionalMemberExpression(e);if(h||m==="MemberExpression"){h&&(this.expectPlugin("optionalChainingAssign",e.loc.start),t.type!=="AssignmentExpression"&&this.raise(k.InvalidLhsOptionalChaining,e,{ancestor:t})),n!==64&&this.raise(k.InvalidPropertyBindingPattern,e);return}if(m==="Identifier"){this.checkIdentifier(e,n,i);let{name:V}=e;o&&(o.has(V)?this.raise(k.ParamDupe,e):o.add(V));return}else m==="VoidPattern"&&t.type==="CatchClause"&&this.raise(k.VoidPatternCatchClauseParam,e);let g=Am(e);c||(c=g.type==="CallExpression"&&(g.callee.type==="Import"||g.callee.type==="Super"));let y=this.isValidLVal(m,c,!(s||(u=e.extra)!=null&&u.parenthesized)&&t.type==="AssignmentExpression",n);if(y===!0)return;if(y===!1){let V=n===64?k.InvalidLhs:k.InvalidLhsBinding;this.raise(V,e,{ancestor:t});return}let S,w;typeof y=="string"?(S=y,w=m==="ParenthesizedExpression"):[S,w]=y;let $=m==="ArrayPattern"||m==="ObjectPattern"?{type:m}:t,E=e[S];if(Array.isArray(E))for(let V of E)V&&this.checkLVal(V,$,n,o,i,w,!0);else E&&this.checkLVal(E,$,n,o,i,w,c)}checkIdentifier(e,t,n=!1){this.state.strict&&(n?WS(e.name,this.inModule):qS(e.name))&&(t===64?this.raise(k.StrictEvalArguments,e,{referenceName:e.name}):this.raise(k.StrictEvalArgumentsBinding,e,{bindingName:e.name})),t&8192&&e.name==="let"&&this.raise(k.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(k.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?k.RestTrailingComma:k.ElementAfterRest,this.state.startLoc),!0):!1}},fm=/in(?:stanceof)?|as|satisfies/y;function hpe(r){if(r==null)throw new Error(`Unexpected ${r} value.`);return r}function ES(r){if(!r)throw new Error("Assert fail")}var Z=ut`typescript`({AbstractMethodHasImplementation:({methodName:r})=>`Method '${r}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:r})=>`Property '${r}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:r})=>`'declare' is not allowed in ${r}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:r})=>`Accessibility modifier already seen: '${r}'.`,DuplicateModifier:({modifier:r})=>`Duplicate modifier: '${r}'.`,EmptyHeritageClauseType:({token:r})=>`'${r}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:r})=>`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:r})=>`Index signatures cannot have an accessibility modifier ('${r}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:r})=>`'${r}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:r=>`'${r}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:r})=>`'${r}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:r})=>`'${r}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:r})=>`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:r=>`'${r}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:r})=>`'${r[0]}' modifier must precede '${r[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:r})=>`Private elements cannot have an accessibility modifier ('${r}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:r})=>`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:r})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`,UsingDeclarationInAmbientContext:r=>`'${r}' declarations are not allowed in ambient contexts.`});function fpe(r){switch(r){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function DS(r){return r==="private"||r==="public"||r==="protected"}function gpe(r){return r==="in"||r==="out"}var xpe=r=>class extends r{constructor(...t){super(...t),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:Z.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:Z.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:Z.InvalidModifierOnTypeParameter})}getScopeHandler(){return vm}tsIsIdentifier(){return me(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(t,n,o){if(!me(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(t.includes(i)){if(o&&this.match(106)||n&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:t,disallowedModifiers:n,stopOnStartOfClassStaticBlock:o,errorTemplate:i=Z.InvalidModifierOnTypeMember},s){let c=(m,h,g,y)=>{h===g&&s[y]&&this.raise(Z.InvalidModifiersOrder,m,{orderedModifiers:[g,y]})},u=(m,h,g,y)=>{(s[g]&&h===y||s[y]&&h===g)&&this.raise(Z.IncompatibleModifiers,m,{modifiers:[g,y]})};for(;;){let{startLoc:m}=this.state,h=this.tsParseModifier(t.concat(n??[]),o,s.static);if(!h)break;DS(h)?s.accessibility?this.raise(Z.DuplicateAccessibilityModifier,m,{modifier:h}):(c(m,h,h,"override"),c(m,h,h,"static"),c(m,h,h,"readonly"),s.accessibility=h):gpe(h)?(s[h]&&this.raise(Z.DuplicateModifier,m,{modifier:h}),s[h]=!0,c(m,h,"in","out")):(hasOwnProperty.call(s,h)?this.raise(Z.DuplicateModifier,m,{modifier:h}):(c(m,h,"static","readonly"),c(m,h,"static","override"),c(m,h,"override","readonly"),c(m,h,"abstract","override"),u(m,h,"declare","override"),u(m,h,"static","abstract")),s[h]=!0),n!=null&&n.includes(h)&&this.raise(i,m,{modifier:h})}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(t,n){let o=[];for(;!this.tsIsListTerminator(t);)o.push(n());return o}tsParseDelimitedList(t,n,o){return hpe(this.tsParseDelimitedListWorker(t,n,!0,o))}tsParseDelimitedListWorker(t,n,o,i){let s=[],c=-1;for(;!this.tsIsListTerminator(t);){c=-1;let u=n();if(u==null)return;if(s.push(u),this.eat(12)){c=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(t))break;o&&this.expect(12);return}return i&&(i.value=c),s}tsParseBracketedList(t,n,o,i,s){i||(o?this.expect(0):this.expect(47));let c=this.tsParseDelimitedList(t,n,s);return o?this.expect(3):this.expect(48),c}tsParseImportType(){let t=this.startNode();return this.expect(83),this.expect(10),this.match(134)?t.argument=this.parseStringLiteral(this.state.value):(this.raise(Z.UnsupportedImportTypeArgument,this.state.startLoc),t.argument=super.parseExprAtom()),this.eat(12)?t.options=this.tsParseImportTypeOptions():t.options=null,this.expect(11),this.eat(16)&&(t.qualifier=this.tsParseEntityName(3)),this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseImportTypeOptions(){let t=this.startNode();this.expect(5);let n=this.startNode();return this.isContextual(76)?(n.method=!1,n.key=this.parseIdentifier(!0),n.computed=!1,n.shorthand=!1):this.unexpected(null,76),this.expect(14),n.value=this.tsParseImportTypeWithPropertyValue(),t.properties=[this.finishObjectProperty(n)],this.eat(12),this.expect(8),this.finishNode(t,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let t=this.startNode(),n=[];for(this.expect(5);!this.match(8);){let o=this.state.type;me(o)||o===134?n.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return t.properties=n,this.next(),this.finishNode(t,"ObjectExpression")}tsParseEntityName(t){let n;if(t&1&&this.match(78))if(t&2)n=this.parseIdentifier(!0);else{let o=this.startNode();this.next(),n=this.finishNode(o,"ThisExpression")}else n=this.parseIdentifier(!!(t&1));for(;this.eat(16);){let o=this.startNodeAtNode(n);o.left=n,o.right=this.parseIdentifier(!!(t&1)),n=this.finishNode(o,"TSQualifiedName")}return n}tsParseTypeReference(){let t=this.startNode();return t.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();let n=this.startNodeAtNode(t);return n.parameterName=t,n.typeAnnotation=this.tsParseTypeAnnotation(!1),n.asserts=!1,this.finishNode(n,"TSTypePredicate")}tsParseThisTypeNode(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){let t=this.startNode();return this.expect(87),this.match(83)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(t){let n=this.startNode();return t(n),n.name=this.tsParseTypeParameterName(),n.constraint=this.tsEatThenParseType(81),n.default=this.tsEatThenParseType(29),this.finishNode(n,"TSTypeParameter")}tsTryParseTypeParameters(t){if(this.match(47))return this.tsParseTypeParameters(t)}tsParseTypeParameters(t){let n=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let o={value:-1};return n.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,t),!1,!0,o),n.params.length===0&&this.raise(Z.EmptyTypeParameters,n),o.value!==-1&&this.addExtra(n,"trailingComma",o.value),this.finishNode(n,"TSTypeParameterDeclaration")}tsFillSignature(t,n){let o=t===19,i="parameters",s="typeAnnotation";n.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),n[i]=this.tsParseBindingListForSignature(),o?n[s]=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(n[s]=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){let t=super.parseBindingList(11,41,2);for(let n of t){let{type:o}=n;(o==="AssignmentPattern"||o==="TSParameterProperty")&&this.raise(Z.UnsupportedSignatureParameterKind,n,{type:o})}return t}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(t,n){return this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon(),this.finishNode(n,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),me(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(t){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let n=this.parseIdentifier();n.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(n),this.expect(3),t.parameters=[n];let o=this.tsTryParseTypeAnnotation();return o&&(t.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,n){if(this.eat(17)&&(t.optional=!0),this.match(10)||this.match(47)){n&&this.raise(Z.ReadonlyForMethodSignature,t);let o=t;o.kind&&this.match(47)&&this.raise(Z.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,o),this.tsParseTypeMemberSemicolon();let i="parameters",s="typeAnnotation";if(o.kind==="get")o[i].length>0&&(this.raise(k.BadGetterArity,this.state.curPosition()),this.isThisParam(o[i][0])&&this.raise(Z.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(o.kind==="set"){if(o[i].length!==1)this.raise(k.BadSetterArity,this.state.curPosition());else{let c=o[i][0];this.isThisParam(c)&&this.raise(Z.AccessorCannotDeclareThisParameter,this.state.curPosition()),c.type==="Identifier"&&c.optional&&this.raise(Z.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),c.type==="RestElement"&&this.raise(Z.SetAccessorCannotHaveRestParameter,this.state.curPosition())}o[s]&&this.raise(Z.SetAccessorCannotHaveReturnType,o[s])}else o.kind="method";return this.finishNode(o,"TSMethodSignature")}else{let o=t;n&&(o.readonly=!0);let i=this.tsTryParseTypeAnnotation();return i&&(o.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(o,"TSPropertySignature")}}tsParseTypeMember(){let t=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(77)){let o=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(o,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},t);let n=this.tsTryParseIndexSignature(t);return n||(super.parsePropertyName(t),!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.tsTokenCanFollowModifier()&&(t.kind=t.key.name,super.parsePropertyName(t),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){let t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),t}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let t=this.startNode();this.expect(5),this.match(53)?(t.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(t.readonly=!0),this.expect(0);let n=this.startNode();return n.name=this.tsParseTypeParameterName(),n.constraint=this.tsExpectThenParseType(58),t.typeParameter=this.finishNode(n,"TSTypeParameter"),t.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(t.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(t,"TSMappedType")}tsParseTupleType(){let t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let n=!1;return t.elementTypes.forEach(o=>{let{type:i}=o;n&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&o.optional)&&this.raise(Z.OptionalTypeBeforeRequired,o),n||(n=i==="TSNamedTupleMember"&&o.optional||i==="TSOptionalType")}),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){let t=this.state.startLoc,n=this.eat(21),{startLoc:o}=this.state,i,s,c,u,h=mt(this.state.type)?this.lookaheadCharCode():null;if(h===58)i=!0,c=!1,s=this.parseIdentifier(!0),this.expect(14),u=this.tsParseType();else if(h===63){c=!0;let g=this.state.value,y=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,s=this.createIdentifier(this.startNodeAt(o),g),this.expect(17),this.expect(14),u=this.tsParseType()):(i=!1,u=y,this.expect(17))}else u=this.tsParseType(),c=this.eat(17),i=this.eat(14);if(i){let g;s?(g=this.startNodeAt(o),g.optional=c,g.label=s,g.elementType=u,this.eat(17)&&(g.optional=!0,this.raise(Z.TupleOptionalAfterType,this.state.lastTokStartLoc))):(g=this.startNodeAt(o),g.optional=c,this.raise(Z.InvalidTupleMemberLabel,u),g.label=u,g.elementType=this.tsParseType()),u=this.finishNode(g,"TSNamedTupleMember")}else if(c){let g=this.startNodeAt(o);g.typeAnnotation=u,u=this.finishNode(g,"TSOptionalType")}if(n){let g=this.startNodeAt(t);g.typeAnnotation=u,u=this.finishNode(g,"TSRestType")}return u}tsParseParenthesizedType(){let t=this.startNode();return this.expect(10),t.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,n){let o=this.startNode();return t==="TSConstructorType"&&(o.abstract=!!n,n&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,o)),this.finishNode(o,t)}tsParseLiteralTypeNode(){let t=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:t.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){let t=this.startNode();return t.literal=super.parseTemplate(!1),this.finishNode(t,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let t=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let t=this.startNode(),n=this.lookahead();return n.type!==135&&n.type!==136&&this.unexpected(),t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:t}=this.state;if(me(t)||t===88||t===84){let n=t===88?"TSVoidKeyword":t===84?"TSNullKeyword":fpe(this.state.value);if(n!==void 0&&this.lookaheadCharCode()!==46){let o=this.startNode();return this.next(),this.finishNode(o,n)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:t}=this.state,n=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let o=this.startNodeAt(t);o.elementType=n,this.expect(3),n=this.finishNode(o,"TSArrayType")}else{let o=this.startNodeAt(t);o.objectType=n,o.indexType=this.tsParseType(),this.expect(3),n=this.finishNode(o,"TSIndexedAccessType")}return n}tsParseTypeOperator(){let t=this.startNode(),n=this.state.value;return this.next(),t.operator=n,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),n==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Z.UnexpectedReadonly,t)}}tsParseInferType(){let t=this.startNode();this.expectContextual(115);let n=this.startNode();return n.name=this.tsParseTypeParameterName(),n.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),t.typeParameter=this.finishNode(n,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let t=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return t}}tsParseTypeOperatorOrHigher(){return Lce(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(t,n,o){let i=this.startNode(),s=this.eat(o),c=[];do c.push(n());while(this.eat(o));return c.length===1&&!s?c[0]:(i.types=c,this.finishNode(i,t))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(me(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:t}=this.state,n=t.length;try{return this.parseObjectLike(8,!0),t.length===n}catch{return!1}}if(this.match(0)){this.next();let{errors:t}=this.state,n=t.length;try{return super.parseBindingList(3,93,1),t.length===n}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType(()=>{let n=this.startNode();this.expect(t);let o=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let u=this.tsParseThisTypeOrThisTypePredicate();return u.type==="TSThisType"?(o.parameterName=u,o.asserts=!0,o.typeAnnotation=null,u=this.finishNode(o,"TSTypePredicate")):(this.resetStartLocationFromNode(u,o),u.asserts=!0),n.typeAnnotation=u,this.finishNode(n,"TSTypeAnnotation")}let s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return i?(o.parameterName=this.parseIdentifier(),o.asserts=i,o.typeAnnotation=null,n.typeAnnotation=this.finishNode(o,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,n);let c=this.tsParseTypeAnnotation(!1);return o.parameterName=s,o.typeAnnotation=c,o.asserts=i,n.typeAnnotation=this.finishNode(o,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let t=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let t=this.state.containsEsc;return this.next(),!me(this.state.type)&&!this.match(78)?!1:(t&&this.raise(k.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(t=!0,n=this.startNode()){return this.tsInType(()=>{t&&this.expect(14),n.typeAnnotation=this.tsParseType()}),this.finishNode(n,"TSTypeAnnotation")}tsParseType(){ES(this.state.inType);let t=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return t;let n=this.startNodeAtNode(t);return n.checkType=t,n.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),n.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),n.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(n,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Z.ReservedTypeAssertion,this.state.startLoc);let t=this.startNode();return t.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){let n=this.state.startLoc,o=this.tsParseDelimitedList("HeritageClauseElement",()=>{let i=this.startNode();return i.expression=this.tsParseEntityName(3),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")});return o.length||this.raise(Z.EmptyHeritageClauseType,n,{token:t}),o}tsParseInterfaceDeclaration(t,n={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),n.declare&&(t.declare=!0),me(this.state.type)?(t.id=this.parseIdentifier(),this.checkIdentifier(t.id,130)):(t.id=null,this.raise(Z.MissingInterfaceName,this.state.startLoc)),t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(t.extends=this.tsParseHeritageClause("extends"));let o=this.startNode();return o.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(o,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkIdentifier(t.id,2),t.typeAnnotation=this.tsInType(()=>{if(t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let n=this.startNode();return this.next(),this.finishNode(n,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInTopLevelContext(t){if(this.curContext()!==ue.brace){let n=this.state.context;this.state.context=[n[0]];try{return t()}finally{this.state.context=n}}else return t()}tsInType(t){let n=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=n}}tsInDisallowConditionalTypesContext(t){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return t()}finally{this.state.inDisallowConditionalTypesContext=n}}tsInAllowConditionalTypesContext(t){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return t()}finally{this.state.inDisallowConditionalTypesContext=n}}tsEatThenParseType(t){if(this.match(t))return this.tsNextThenParseType()}tsExpectThenParseType(t){return this.tsInType(()=>(this.expect(t),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let t=this.startNode();return t.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(t.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,n={}){return n.const&&(t.const=!0),n.declare&&(t.declare=!0),this.expectContextual(126),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,t.const?8971:8459),this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumDeclaration")}tsParseEnumBody(){let t=this.startNode();return this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumBody")}tsParseModuleBlock(){let t=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,n=!1){if(t.id=this.parseIdentifier(),n||this.checkIdentifier(t.id,1024),this.eat(16)){let o=this.startNode();this.tsParseModuleOrNamespaceDeclaration(o,!0),t.body=o}else this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual(112)?(t.kind="global",t.global=!0,t.id=this.parseIdentifier()):this.match(134)?(t.kind="module",t.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,n,o){t.isExport=o||!1,t.id=n||this.parseIdentifier(),this.checkIdentifier(t.id,4096),this.expect(29);let i=this.tsParseModuleReference();return t.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(Z.ImportAliasHasImportType,i),t.moduleReference=i,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let t=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),t.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){let n=this.state.clone(),o=t();return this.state=n,o}tsTryParseAndCatch(t){let n=this.tryParse(o=>t()||o());if(!(n.aborted||!n.node))return n.error&&(this.state=n.failState),n.node}tsTryParse(t){let n=this.state.clone(),o=t();if(o!==void 0&&o!==!1)return o;this.state=n}tsTryParseDeclare(t){if(this.isLineTerminator())return;let n=this.state.type;return this.tsInAmbientContext(()=>{switch(n){case 68:return t.declare=!0,super.parseFunctionStatement(t,!1,!1);case 80:return t.declare=!0,this.parseClass(t,!0,!1);case 126:return this.tsParseEnumDeclaration(t,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(t);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(t.declare=!0,this.parseVarStatement(t,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(t,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(Z.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.parseVarStatement(t,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(Z.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.next(),this.parseVarStatement(t,"await using",!0);break;case 129:{let o=this.tsParseInterfaceDeclaration(t,{declare:!0});if(o)return o}default:if(me(n))return this.tsParseDeclaration(t,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(t,n,o,i){switch(n){case 124:if(this.tsCheckLineTerminator(o)&&(this.match(80)||me(this.state.type)))return this.tsParseAbstractDeclaration(t,i);break;case 127:if(this.tsCheckLineTerminator(o)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(t);if(me(this.state.type))return t.kind="module",this.tsParseModuleOrNamespaceDeclaration(t)}break;case 128:if(this.tsCheckLineTerminator(o)&&me(this.state.type))return t.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(t);break;case 130:if(this.tsCheckLineTerminator(o)&&me(this.state.type))return this.tsParseTypeAliasDeclaration(t);break}}tsCheckLineTerminator(t){return t?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t){if(!this.match(47))return;let n=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let o=this.tsTryParseAndCatch(()=>{let i=this.startNodeAt(t);return i.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(i),i.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),i});if(this.state.maybeInArrowParameters=n,!!o)return super.parseArrowExpression(o,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let t=this.startNode();return t.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),t.params.length===0?this.raise(Z.EmptyTypeArguments,t):!this.state.inType&&this.curContext()===ue.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return jce(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(t,n){let o=n.length?n[0].loc.start:this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let s=i.accessibility,c=i.override,u=i.readonly;!(t&4)&&(s||u||c)&&this.raise(Z.UnexpectedParameterModifier,o);let m=this.parseMaybeDefault();t&2&&this.parseFunctionParamType(m);let h=this.parseMaybeDefault(m.loc.start,m);if(s||u||c){let g=this.startNodeAt(o);return n.length&&(g.decorators=n),s&&(g.accessibility=s),u&&(g.readonly=u),c&&(g.override=c),h.type!=="Identifier"&&h.type!=="AssignmentPattern"&&this.raise(Z.UnsupportedParameterPropertyKind,g),g.parameter=h,this.finishNode(g,"TSParameterProperty")}return n.length&&(m.decorators=n),h}isSimpleParameter(t){return t.type==="TSParameterProperty"&&super.isSimpleParameter(t.parameter)||super.isSimpleParameter(t)}tsDisallowOptionalPattern(t){for(let n of t.params)n.type!=="Identifier"&&n.optional&&!this.state.isAmbientContext&&this.raise(Z.PatternIsOptional,n)}setArrowFunctionParameters(t,n,o){super.setArrowFunctionParameters(t,n,o),this.tsDisallowOptionalPattern(t)}parseFunctionBodyAndFinish(t,n,o=!1){this.match(14)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let i=n==="FunctionDeclaration"?"TSDeclareFunction":n==="ClassMethod"||n==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(t,i):i==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(Z.DeclareFunctionHasImplementation,t),t.declare)?super.parseFunctionBodyAndFinish(t,i,o):(this.tsDisallowOptionalPattern(t),super.parseFunctionBodyAndFinish(t,n,o))}registerFunctionStatementId(t){!t.body&&t.id?this.checkIdentifier(t.id,1024):super.registerFunctionStatementId(t)}tsCheckForInvalidTypeCasts(t){t.forEach(n=>{n?.type==="TSTypeCastExpression"&&this.raise(Z.UnexpectedTypeAnnotation,n.typeAnnotation)})}toReferencedList(t,n){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(t,n,o){let i=super.parseArrayLike(t,n,o);return i.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(i.elements),i}parseSubscript(t,n,o,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let c=this.startNodeAt(n);return c.expression=t,this.finishNode(c,"TSNonNullExpression")}let s=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(o)return i.stop=!0,t;i.optionalChainMember=s=!0,this.next()}if(this.match(47)||this.match(51)){let c,u=this.tsTryParseAndCatch(()=>{if(!o&&this.atPossibleAsyncArrow(t)){let y=this.tsTryParseGenericAsyncArrowFunction(n);if(y)return i.stop=!0,y}let m=this.tsParseTypeArgumentsInExpression();if(!m)return;if(s&&!this.match(10)){c=this.state.curPosition();return}if(aa(this.state.type)){let y=super.parseTaggedTemplateExpression(t,n,i);return y.typeParameters=m,y}if(!o&&this.eat(10)){let y=this.startNodeAt(n);return y.callee=t,y.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(y.arguments),y.typeParameters=m,i.optionalChainMember&&(y.optional=s),this.finishCallExpression(y,i.optionalChainMember)}let h=this.state.type;if(h===48||h===52||h!==10&&h!==93&&h!==120&&bn(h)&&!this.hasPrecedingLineBreak())return;let g=this.startNodeAt(n);return g.expression=t,g.typeParameters=m,this.finishNode(g,"TSInstantiationExpression")});if(c&&this.unexpected(c,10),u)return u.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(Z.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(u.expression=super.stopParseSubscript(t,i))),u}return super.parseSubscript(t,n,o,i)}parseNewCallee(t){var n;super.parseNewCallee(t);let{callee:o}=t;o.type==="TSInstantiationExpression"&&!((n=o.extra)!=null&&n.parenthesized)&&(t.typeParameters=o.typeParameters,t.callee=o.expression)}parseExprOp(t,n,o){let i;if(na(58)>o&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let s=this.startNodeAt(n);return s.expression=t,s.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(k.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(s,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(s,n,o)}return super.parseExprOp(t,n,o)}checkReservedWord(t,n,o,i){this.state.isAmbientContext||super.checkReservedWord(t,n,o,i)}checkImportReflection(t){super.checkImportReflection(t),t.module&&t.importKind!=="value"&&this.raise(Z.ImportReflectionHasImportType,t.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){let n=this.lookaheadCharCode();return t?n===123||n===42:n!==61}return!t&&this.isContextual(87)}applyImportPhase(t,n,o,i){super.applyImportPhase(t,n,o,i),n?t.exportKind=o==="type"?"type":"value":t.importKind=o==="type"||o==="typeof"?o:"value"}parseImport(t){if(this.match(134))return t.importKind="value",super.parseImport(t);let n;if(me(this.state.type)&&this.lookaheadCharCode()===61)return t.importKind="value",this.tsParseImportEqualsDeclaration(t);if(this.isContextual(130)){let o=this.parseMaybeImportPhase(t,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(t,o);n=super.parseImportSpecifiersAndAfter(t,o)}else n=super.parseImport(t);return n.importKind==="type"&&n.specifiers.length>1&&n.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(Z.TypeImportCannotSpecifyDefaultAndNamed,n),n}parseExport(t,n){if(this.match(83)){let o=t;this.next();let i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(o,!1):o.importKind="value",this.tsParseImportEqualsDeclaration(o,i,!0)}else if(this.eat(29)){let o=t;return o.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(o,"TSExportAssignment")}else if(this.eatContextual(93)){let o=t;return this.expectContextual(128),o.id=this.parseIdentifier(),this.semicolon(),this.finishNode(o,"TSNamespaceExportDeclaration")}else return super.parseExport(t,n)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0)}if(this.match(129)){let t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t}return super.parseExportDefaultExpression()}parseVarStatement(t,n,o=!1){let{isAmbientContext:i}=this.state,s=super.parseVarStatement(t,n,o||i);if(!i)return s;if(!t.declare&&(n==="using"||n==="await using"))return this.raiseOverwrite(Z.UsingDeclarationInAmbientContext,t,n),s;for(let{id:c,init:u}of s.declarations)u&&(n==="var"||n==="let"||c.typeAnnotation?this.raise(Z.InitializerNotAllowedInAmbientContext,u):bpe(u,this.hasPlugin("estree"))||this.raise(Z.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,u));return s}parseStatementContent(t,n){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let o=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(o,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let o=this.state.type,i=this.startNode();this.next();let s=o===125?this.tsTryParseDeclare(i):this.tsParseAbstractDeclaration(i,n);return s?(o===125&&(s.declare=!0),s):(i.expression=this.createIdentifier(this.startNodeAt(i.loc.start),o===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(i,"ExpressionStatement"))}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let i=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(i)}break}case 129:{let o=this.tsParseInterfaceDeclaration(this.startNode());if(o)return o;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let o=this.startNode();return this.next(),this.tsParseDeclaration(o,127,!1,n)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let o=this.startNode();return this.next(),this.tsParseDeclaration(o,128,!1,n)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let o=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(o)}break}}return super.parseStatementContent(t,n)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(t,n){return n.some(o=>DS(o)?t.accessibility===o:!!t[o])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(t,n,o){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:Z.InvalidModifierOnTypeParameterPositions},n);let s=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(n,i)&&this.raise(Z.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(t,n)):this.parseClassMemberWithIsStatic(t,n,o,!!n.static)};n.declare?this.tsInAmbientContext(s):s()}parseClassMemberWithIsStatic(t,n,o,i){let s=this.tsTryParseIndexSignature(n);if(s){t.body.push(s),n.abstract&&this.raise(Z.IndexSignatureHasAbstract,n),n.accessibility&&this.raise(Z.IndexSignatureHasAccessibility,n,{modifier:n.accessibility}),n.declare&&this.raise(Z.IndexSignatureHasDeclare,n),n.override&&this.raise(Z.IndexSignatureHasOverride,n);return}!this.state.inAbstractClass&&n.abstract&&this.raise(Z.NonAbstractClassHasAbstractMethod,n),n.override&&(o.hadSuperClass||this.raise(Z.OverrideNotInSubClass,n)),super.parseClassMemberWithIsStatic(t,n,o,i)}parsePostMemberNameModifiers(t){this.eat(17)&&(t.optional=!0),t.readonly&&this.match(10)&&this.raise(Z.ClassMethodHasReadonly,t),t.declare&&this.match(10)&&this.raise(Z.ClassMethodHasDeclare,t)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(t,n,o){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){let i=this.lookaheadCharCode();if(i===44||i===61||i===58||i===41)return this.setOptionalParametersError(o),t}return super.parseConditional(t,n,o)}parseParenItem(t,n){let o=super.parseParenItem(t,n);if(this.eat(17)&&(o.optional=!0,this.resetEndLocation(t)),this.match(14)){let i=this.startNodeAt(n);return i.expression=t,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return t}parseExportDeclaration(t){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(t));let n=this.state.startLoc,o=this.eatContextual(125);if(o&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(Z.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let s=me(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(t);return s?((s.type==="TSInterfaceDeclaration"||s.type==="TSTypeAliasDeclaration"||o)&&(t.exportKind="type"),o&&s.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(s,n),s.declare=!0),s):null}parseClassId(t,n,o,i){if((!n||o)&&this.isContextual(113))return;super.parseClassId(t,n,o,t.declare?1024:8331);let s=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);s&&(t.typeParameters=s)}parseClassPropertyAnnotation(t){t.optional||(this.eat(35)?t.definite=!0:this.eat(17)&&(t.optional=!0));let n=this.tsTryParseTypeAnnotation();n&&(t.typeAnnotation=n)}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&!(t.readonly&&!t.typeAnnotation)&&this.match(29)&&this.raise(Z.DeclareClassFieldHasInitializer,this.state.startLoc),t.abstract&&this.match(29)){let{key:n}=t;this.raise(Z.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:n.type==="Identifier"&&!t.computed?n.name:`[${this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end))}]`})}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(Z.PrivateElementHasAbstract,t),t.accessibility&&this.raise(Z.PrivateElementHasAccessibility,t,{modifier:t.accessibility}),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}parseClassAccessorProperty(t){return this.parseClassPropertyAnnotation(t),t.optional&&this.raise(Z.AccessorCannotBeOptional,t),super.parseClassAccessorProperty(t)}pushClassMethod(t,n,o,i,s,c){let u=this.tsTryParseTypeParameters(this.tsParseConstModifier);u&&s&&this.raise(Z.ConstructorHasTypeParameters,u);let{declare:m=!1,kind:h}=n;m&&(h==="get"||h==="set")&&this.raise(Z.DeclareAccessor,n,{kind:h}),u&&(n.typeParameters=u),super.pushClassMethod(t,n,o,i,s,c)}pushClassPrivateMethod(t,n,o,i){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(n.typeParameters=s),super.pushClassPrivateMethod(t,n,o,i)}declareClassPrivateMethodInScope(t,n){t.type!=="TSDeclareMethod"&&(t.type==="MethodDefinition"&&t.value.body==null||super.declareClassPrivateMethodInScope(t,n))}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass)if(t.superClass.type==="TSInstantiationExpression"){let n=t.superClass,o=n.expression;this.takeSurroundingComments(o,o.start,o.end);let i=n.typeParameters;this.takeSurroundingComments(i,i.start,i.end),t.superClass=o,t.superTypeParameters=i}else(this.match(47)||this.match(51))&&(t.superTypeParameters=this.tsParseTypeArgumentsInExpression());this.eatContextual(113)&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,n,o,i,s,c,u){let m=this.tsTryParseTypeParameters(this.tsParseConstModifier);return m&&(t.typeParameters=m),super.parseObjPropValue(t,n,o,i,s,c,u)}parseFunctionParams(t,n){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&(t.typeParameters=o),super.parseFunctionParams(t,n)}parseVarId(t,n){super.parseVarId(t,n),t.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(t.definite=!0);let o=this.tsTryParseTypeAnnotation();o&&(t.id.typeAnnotation=o,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,n){return this.match(14)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,n)}parseMaybeAssign(t,n){var o,i,s,c,u;let m,h,g;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(m=this.state.clone(),h=this.tryParse(()=>super.parseMaybeAssign(t,n),m),!h.error)return h.node;let{context:w}=this.state,$=w[w.length-1];($===ue.j_oTag||$===ue.j_expr)&&w.pop()}if(!((o=h)!=null&&o.error)&&!this.match(47))return super.parseMaybeAssign(t,n);(!m||m===this.state)&&(m=this.state.clone());let y,S=this.tryParse(w=>{var $,E;y=this.tsParseTypeParameters(this.tsParseConstModifier);let V=super.parseMaybeAssign(t,n);return(V.type!=="ArrowFunctionExpression"||($=V.extra)!=null&&$.parenthesized)&&w(),((E=y)==null?void 0:E.params.length)!==0&&this.resetStartLocationFromNode(V,y),V.typeParameters=y,V},m);if(!S.error&&!S.aborted)return y&&this.reportReservedArrowTypeParam(y),S.node;if(!h&&(ES(!this.hasPlugin("jsx")),g=this.tryParse(()=>super.parseMaybeAssign(t,n),m),!g.error))return g.node;if((i=h)!=null&&i.node)return this.state=h.failState,h.node;if(S.node)return this.state=S.failState,y&&this.reportReservedArrowTypeParam(y),S.node;if((s=g)!=null&&s.node)return this.state=g.failState,g.node;throw((c=h)==null?void 0:c.error)||S.error||((u=g)==null?void 0:u.error)}reportReservedArrowTypeParam(t){var n;t.params.length===1&&!t.params[0].constraint&&!((n=t.extra)!=null&&n.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Z.ReservedArrowTypeParam,t)}parseMaybeUnary(t,n){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(t,n)}parseArrow(t){if(this.match(14)){let n=this.tryParse(o=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&o(),i});if(n.aborted)return;n.thrown||(n.error&&(this.state=n.failState),t.returnType=n.node)}return super.parseArrow(t)}parseFunctionParamType(t){this.eat(17)&&(t.optional=!0);let n=this.tsTryParseTypeAnnotation();return n&&(t.typeAnnotation=n),this.resetEndLocation(t),t}isAssignable(t,n){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,n);case"TSParameterProperty":return!0;default:return super.isAssignable(t,n)}}toAssignable(t,n=!1){switch(t.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(t,n);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":n?this.expressionScope.recordArrowParameterBindingError(Z.UnexpectedTypeCastInParameter,t):this.raise(Z.UnexpectedTypeCastInParameter,t),this.toAssignable(t.expression,n);break;case"AssignmentExpression":!n&&t.left.type==="TSTypeCastExpression"&&(t.left=this.typeCastToParameter(t.left));default:super.toAssignable(t,n)}}toAssignableParenthesizedExpression(t,n){switch(t.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(t.expression,n);break;default:super.toAssignable(t,n)}}checkToRestConversion(t,n){switch(t.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(t.expression,!1);break;default:super.checkToRestConversion(t,n)}}isValidLVal(t,n,o,i){switch(t){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!o)&&["expression",!0];default:return super.isValidLVal(t,n,o,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(t,n){if(this.match(47)||this.match(51)){let o=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(t,n);return i.typeParameters=o,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(t,n)}checkCommaAfterRest(t){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===t?(this.next(),!1):super.checkCommaAfterRest(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(t,n){let o=super.parseMaybeDefault(t,n);return o.type==="AssignmentPattern"&&o.typeAnnotation&&o.right.start<o.typeAnnotation.start&&this.raise(Z.TypeAnnotationAfterAssign,o.typeAnnotation),o}getTokenFromCode(t){if(this.state.inType){if(t===62){this.finishOp(48,1);return}if(t===60){this.finishOp(47,1);return}}super.getTokenFromCode(t)}reScan_lt_gt(){let{type:t}=this.state;t===47?(this.state.pos-=1,this.readToken_lt()):t===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===51?(this.state.pos-=2,this.finishOp(47,1),47):t}toAssignableListItem(t,n,o){let i=t[n];i.type==="TSTypeCastExpression"&&(t[n]=this.typeCastToParameter(i)),super.toAssignableListItem(t,n,o)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}shouldParseArrow(t){return this.match(14)?t.every(n=>this.isAssignable(n,!0)):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.match(47)||this.match(51)){let n=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());n&&(t.typeParameters=n)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){let n=super.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t)[0];return i&&this.isThisParam(i)?n+1:n}parseCatchClauseParam(){let t=super.parseCatchClauseParam(),n=this.tsTryParseTypeAnnotation();return n&&(t.typeAnnotation=n,this.resetEndLocation(t)),t}tsInAmbientContext(t){let{isAmbientContext:n,strict:o}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return t()}finally{this.state.isAmbientContext=n,this.state.strict=o}}parseClass(t,n,o){let i=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,n,o)}finally{this.state.inAbstractClass=i}}tsParseAbstractDeclaration(t,n){if(this.match(80))return t.abstract=!0,this.maybeTakeDecorators(n,this.parseClass(t,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(t.abstract=!0,this.raise(Z.NonClassMethodPropertyHasAbstractModifier,t),this.tsParseInterfaceDeclaration(t));throw this.unexpected(null,80)}parseMethod(t,n,o,i,s,c,u){let m=super.parseMethod(t,n,o,i,s,c,u);if((m.abstract||m.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?m.value:m).body){let{key:y}=m;this.raise(Z.AbstractMethodHasImplementation,m,{methodName:y.type==="Identifier"&&!m.computed?y.name:`[${this.input.slice(this.offsetToSourcePos(y.start),this.offsetToSourcePos(y.end))}]`})}return m}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(t,n,o,i){return!n&&i?(this.parseTypeOnlyImportExportSpecifier(t,!1,o),this.finishNode(t,"ExportSpecifier")):(t.exportKind="value",super.parseExportSpecifier(t,n,o,i))}parseImportSpecifier(t,n,o,i,s){return!n&&i?(this.parseTypeOnlyImportExportSpecifier(t,!0,o),this.finishNode(t,"ImportSpecifier")):(t.importKind="value",super.parseImportSpecifier(t,n,o,i,o?4098:4096))}parseTypeOnlyImportExportSpecifier(t,n,o){let i=n?"imported":"local",s=n?"local":"exported",c=t[i],u,m=!1,h=!0,g=c.loc.start;if(this.isContextual(93)){let S=this.parseIdentifier();if(this.isContextual(93)){let w=this.parseIdentifier();mt(this.state.type)?(m=!0,c=S,u=n?this.parseIdentifier():this.parseModuleExportName(),h=!1):(u=w,h=!1)}else mt(this.state.type)?(h=!1,u=n?this.parseIdentifier():this.parseModuleExportName()):(m=!0,c=S)}else mt(this.state.type)&&(m=!0,n?(c=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(c.name,c.loc.start,!0,!0)):c=this.parseModuleExportName());m&&o&&this.raise(n?Z.TypeModifierIsUsedInTypeImports:Z.TypeModifierIsUsedInTypeExports,g),t[i]=c,t[s]=u;let y=n?"importKind":"exportKind";t[y]=m?"type":"value",h&&this.eatContextual(93)&&(t[s]=n?this.parseIdentifier():this.parseModuleExportName()),t[s]||(t[s]=this.cloneIdentifier(t[i])),n&&this.checkIdentifier(t[s],m?4098:4096)}fillOptionalPropertiesForTSESLint(t){var n,o,i,s,c,u,m,h,g,y,S,w,$,E,V,F,H,re,ye,ce,Me,Ct,fr,gr,xr,Pn,$n,Ym,Qm,eh,th,oh,rh,nh,ih,sh,ah,ch,ph,dh,lh,uh,mh,hh,fh,gh,xh,yh;switch(t.type){case"ExpressionStatement":(n=t.directive)!=null||(t.directive=void 0);return;case"RestElement":t.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":(o=t.decorators)!=null||(t.decorators=[]),(i=t.optional)!=null||(t.optional=!1),(s=t.typeAnnotation)!=null||(t.typeAnnotation=void 0);return;case"TSParameterProperty":(c=t.accessibility)!=null||(t.accessibility=void 0),(u=t.decorators)!=null||(t.decorators=[]),(m=t.override)!=null||(t.override=!1),(h=t.readonly)!=null||(t.readonly=!1),(g=t.static)!=null||(t.static=!1);return;case"TSEmptyBodyFunctionExpression":t.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":(y=t.declare)!=null||(t.declare=!1),(S=t.returnType)!=null||(t.returnType=void 0),(w=t.typeParameters)!=null||(t.typeParameters=void 0);return;case"Property":($=t.optional)!=null||(t.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":(E=t.optional)!=null||(t.optional=!1);case"TSIndexSignature":(V=t.accessibility)!=null||(t.accessibility=void 0),(F=t.readonly)!=null||(t.readonly=!1),(H=t.static)!=null||(t.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":(re=t.declare)!=null||(t.declare=!1),(ye=t.definite)!=null||(t.definite=!1),(ce=t.readonly)!=null||(t.readonly=!1),(Me=t.typeAnnotation)!=null||(t.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":(Ct=t.accessibility)!=null||(t.accessibility=void 0),(fr=t.decorators)!=null||(t.decorators=[]),(gr=t.override)!=null||(t.override=!1),(xr=t.optional)!=null||(t.optional=!1);return;case"ClassExpression":(Pn=t.id)!=null||(t.id=null);case"ClassDeclaration":($n=t.abstract)!=null||(t.abstract=!1),(Ym=t.declare)!=null||(t.declare=!1),(Qm=t.decorators)!=null||(t.decorators=[]),(eh=t.implements)!=null||(t.implements=[]),(th=t.superTypeArguments)!=null||(t.superTypeArguments=void 0),(oh=t.typeParameters)!=null||(t.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":(rh=t.declare)!=null||(t.declare=!1);return;case"VariableDeclarator":(nh=t.definite)!=null||(t.definite=!1);return;case"TSEnumDeclaration":(ih=t.const)!=null||(t.const=!1),(sh=t.declare)!=null||(t.declare=!1);return;case"TSEnumMember":(ah=t.computed)!=null||(t.computed=!1);return;case"TSImportType":(ch=t.qualifier)!=null||(t.qualifier=null),(ph=t.options)!=null||(t.options=null);return;case"TSInterfaceDeclaration":(dh=t.declare)!=null||(t.declare=!1),(lh=t.extends)!=null||(t.extends=[]);return;case"TSMappedType":(uh=t.optional)!=null||(t.optional=!1),(mh=t.readonly)!=null||(t.readonly=void 0);return;case"TSModuleDeclaration":(hh=t.declare)!=null||(t.declare=!1),(fh=t.global)!=null||(t.global=t.kind==="global");return;case"TSTypeParameter":(gh=t.const)!=null||(t.const=!1),(xh=t.in)!=null||(t.in=!1),(yh=t.out)!=null||(t.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(t,n){if(vt(t)){if(fm.lastIndex=n,fm.test(this.input)){let o=this.codePointAtPos(fm.lastIndex);if(!mo(o)&&o!==92)return!1}return!0}else return t===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let t=this.nextTokenInLineStart(),n=this.codePointAtPos(t);return this.chStartsBindingIdentifierAndNotRelationalOperator(n,t)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let t=this.nextTokenInLineStart(),n=this.codePointAtPos(t);return this.chStartsBindingIdentifier(n,t)||n===34||n===39}};function ype(r){if(r.type!=="MemberExpression")return!1;let{computed:e,property:t}=r;return e&&t.type!=="StringLiteral"&&(t.type!=="TemplateLiteral"||t.expressions.length>0)?!1:XS(r.object)}function bpe(r,e){var t;let{type:n}=r;if((t=r.extra)!=null&&t.parenthesized)return!1;if(e){if(n==="Literal"){let{value:o}=r;if(typeof o=="string"||typeof o=="boolean")return!0}}else if(n==="StringLiteral"||n==="BooleanLiteral")return!0;return!!(HS(r,e)||Spe(r,e)||n==="TemplateLiteral"&&r.expressions.length===0||ype(r))}function HS(r,e){return e?r.type==="Literal"&&(typeof r.value=="number"||"bigint"in r):r.type==="NumericLiteral"||r.type==="BigIntLiteral"}function Spe(r,e){if(r.type==="UnaryExpression"){let{operator:t,argument:n}=r;if(t==="-"&&HS(n,e))return!0}return!1}function XS(r){return r.type==="Identifier"?!0:r.type!=="MemberExpression"||r.computed?!1:XS(r.object)}var AS=ut`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),zpe=r=>class extends r{parsePlaceholder(t){if(this.match(133)){let n=this.startNode();return this.next(),this.assertNoSpace(),n.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(n,t)}}finishPlaceholder(t,n){let o=t;return(!o.expectedNode||!o.type)&&(o=this.finishNode(o,"Placeholder")),o.expectedNode=n,o}getTokenFromCode(t){t===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(t)}parseExprAtom(t){return this.parsePlaceholder("Expression")||super.parseExprAtom(t)}parseIdentifier(t){return this.parsePlaceholder("Identifier")||super.parseIdentifier(t)}checkReservedWord(t,n,o,i){t!==void 0&&super.checkReservedWord(t,n,o,i)}cloneIdentifier(t){let n=super.cloneIdentifier(t);return n.type==="Placeholder"&&(n.expectedNode=t.expectedNode),n}cloneStringLiteral(t){return t.type==="Placeholder"?this.cloneIdentifier(t):super.cloneStringLiteral(t)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(t,n,o,i){return t==="Placeholder"||super.isValidLVal(t,n,o,i)}toAssignable(t,n){t&&t.type==="Placeholder"&&t.expectedNode==="Expression"?t.expectedNode="Pattern":super.toAssignable(t,n)}chStartsBindingIdentifier(t,n){if(super.chStartsBindingIdentifier(t,n))return!0;let o=this.nextTokenStart();return this.input.charCodeAt(o)===37&&this.input.charCodeAt(o+1)===37}verifyBreakContinue(t,n){var o;((o=t.label)==null?void 0:o.type)!=="Placeholder"&&super.verifyBreakContinue(t,n)}parseExpressionStatement(t,n){var o;if(n.type!=="Placeholder"||(o=n.extra)!=null&&o.parenthesized)return super.parseExpressionStatement(t,n);if(this.match(14)){let s=t;return s.label=this.finishPlaceholder(n,"Identifier"),this.next(),s.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(s,"LabeledStatement")}this.semicolon();let i=t;return i.name=n.name,this.finishPlaceholder(i,"Statement")}parseBlock(t,n,o){return this.parsePlaceholder("BlockStatement")||super.parseBlock(t,n,o)}parseFunctionId(t){return this.parsePlaceholder("Identifier")||super.parseFunctionId(t)}parseClass(t,n,o){let i=n?"ClassDeclaration":"ClassExpression";this.next();let s=this.state.strict,c=this.parsePlaceholder("Identifier");if(c)if(this.match(81)||this.match(133)||this.match(5))t.id=c;else{if(o||!n)return t.id=null,t.body=this.finishPlaceholder(c,"ClassBody"),this.finishNode(t,i);throw this.raise(AS.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(t,n,o);return super.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!t.superClass,s),this.finishNode(t,i)}parseExport(t,n){let o=this.parsePlaceholder("Identifier");if(!o)return super.parseExport(t,n);let i=t;if(!this.isContextual(98)&&!this.match(12))return i.specifiers=[],i.source=null,i.declaration=this.finishPlaceholder(o,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let s=this.startNode();return s.exported=o,i.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(i,n)}isExportDefaultSpecifier(){if(this.match(65)){let t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(Kt(133),this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t,n){var o;return(o=t.specifiers)!=null&&o.length?!0:super.maybeParseExportDefaultSpecifier(t,n)}checkExport(t){let{specifiers:n}=t;n!=null&&n.length&&(t.specifiers=n.filter(o=>o.exported.type==="Placeholder")),super.checkExport(t),t.specifiers=n}parseImport(t){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseImport(t);if(t.specifiers=[],!this.isContextual(98)&&!this.match(12))return t.source=this.finishPlaceholder(n,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");let o=this.startNodeAtNode(n);return o.local=n,t.specifiers.push(this.finishNode(o,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)),this.expectContextual(98),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(AS.UnexpectedSpace,this.state.lastTokEndLoc)}},vpe=r=>class extends r{parseV8Intrinsic(){if(this.match(54)){let t=this.state.startLoc,n=this.startNode();if(this.next(),me(this.state.type)){let o=this.parseIdentifierName(),i=this.createIdentifier(n,o);if(this.castNodeTo(i,"V8IntrinsicIdentifier"),this.match(10))return i}this.unexpected(t)}}parseExprAtom(t){return this.parseV8Intrinsic()||super.parseExprAtom(t)}},_S=["minimal","fsharp","hack","smart"],LS=["^^","@@","^","%","#"];function wpe(r){if(r.has("decorators")){if(r.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let n=r.get("decorators").decoratorsBeforeExport;if(n!=null&&typeof n!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let o=r.get("decorators").allowCallParenthesized;if(o!=null&&typeof o!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(r.has("flow")&&r.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(r.has("placeholders")&&r.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(r.has("pipelineOperator")){var e;let n=r.get("pipelineOperator").proposal;if(!_S.includes(n)){let o=_S.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${o}.`)}if(n==="hack"){var t;if(r.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(r.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let o=r.get("pipelineOperator").topicToken;if(!LS.includes(o)){let i=LS.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(o==="#"&&((t=r.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}else if(n==="smart"&&((e=r.get("recordAndTuple"))==null?void 0:e.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}if(r.has("moduleAttributes")){if(r.has("deprecatedImportAssert")||r.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(r.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(r.has("importAssertions")&&r.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(r.has("deprecatedImportAssert")||r.has("importAttributes")&&r.get("importAttributes").deprecatedAssertSyntax&&r.set("deprecatedImportAssert",{}),r.has("recordAndTuple")){let n=r.get("recordAndTuple").syntaxType;if(n!=null){let o=["hash","bar"];if(!o.includes(n))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+o.map(i=>`'${i}'`).join(", "))}}if(r.has("asyncDoExpressions")&&!r.has("doExpressions")){let n=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw n.missingPlugins="doExpressions",n}if(r.has("optionalChainingAssign")&&r.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(r.has("discardBinding")&&r.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}var YS={estree:$ce,jsx:ipe,flow:tpe,typescript:xpe,v8intrinsic:vpe,placeholders:zpe},Ipe=Object.keys(YS),Lm=class extends _m{checkProto(e,t,n,o){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return n;let i=e.key;return(i.type==="Identifier"?i.name:i.value)==="__proto__"?t?(this.raise(k.RecordNoProto,i),!0):(n&&(o?o.doubleProtoLoc===null&&(o.doubleProtoLoc=i.loc.start):this.raise(k.DuplicateProto,i)),!0):n}shouldExitDescending(e,t){return e.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(k.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(140))throw this.raise(k.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&256&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){let t=this.state.startLoc,n=this.parseMaybeAssign(e);if(this.match(12)){let o=this.startNodeAt(t);for(o.expressions=[n];this.eat(12);)o.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(o.expressions),this.finishNode(o,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd(()=>this.parseMaybeAssign(e,t))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){let n=this.state.startLoc,o=this.isContextual(108);if(o&&this.prodParam.hasYield){this.next();let u=this.parseYield(n);return t&&(u=t.call(this,u,n)),u}let i;e?i=!1:(e=new lr,i=!0);let{type:s}=this.state;(s===10||me(s))&&(this.state.potentialArrowAt=this.state.start);let c=this.parseMaybeConditional(e);if(t&&(c=t.call(this,c,n)),Rce(this.state.type)){let u=this.startNodeAt(n),m=this.state.value;if(u.operator=m,this.match(29)){this.toAssignable(c,!0),u.left=c;let h=n.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=h&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=h&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=h&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=h&&(e.voidPatternLoc=null)}else u.left=c;return this.next(),u.right=this.parseMaybeAssign(),this.checkLVal(c,this.finishNode(u,"AssignmentExpression"),void 0,void 0,void 0,void 0,m==="||="||m==="&&="||m==="??="),u}else i&&this.checkExpressionErrors(e,!0);if(o){let{type:u}=this.state;if((this.hasPlugin("v8intrinsic")?bn(u):bn(u)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(k.YieldNotInGeneratorFunction,n),this.parseYield(n)}return c}parseMaybeConditional(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,o=this.parseExprOps(e);return this.shouldExitDescending(o,n)?o:this.parseConditional(o,t,e)}parseConditional(e,t,n){if(this.eat(17)){let o=this.startNodeAt(t);return o.test=e,o.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),o.alternate=this.parseMaybeAssign(),this.finishNode(o,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,o=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(o,n)?o:this.parseExprOp(o,t,-1)}parseExprOp(e,t,n){if(this.isPrivateName(e)){let i=this.getPrivateNameSV(e);(n>=na(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(k.PrivateInExpectedIn,e,{identifierName:i}),this.classScope.usePrivateName(i,e.loc.start)}let o=this.state.type;if(Dce(o)&&(this.prodParam.hasIn||!this.match(58))){let i=na(o);if(i>n){if(o===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let s=this.startNodeAt(t);s.left=e,s.operator=this.state.value;let c=o===41||o===42,u=o===40;if(u&&(i=na(42)),this.next(),o===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(k.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);s.right=this.parseExprOpRightExpr(o,i);let m=this.finishNode(s,c||u?"LogicalExpression":"BinaryExpression"),h=this.state.type;if(u&&(h===41||h===42)||c&&h===40)throw this.raise(k.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(m,t,n)}}return e}parseExprOpRightExpr(e,t){let n=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(k.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),n)});default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,Fce(e)?t-1:t)}parseHackPipeBody(){var e;let{startLoc:t}=this.state,n=this.parseMaybeAssign();return bce.has(n.type)&&!((e=n.extra)!=null&&e.parenthesized)&&this.raise(k.PipeUnparenthesizedBody,t,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(k.PipeTopicUnused,t),n}checkExponentialAfterUnary(e){this.match(57)&&this.raise(k.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){let n=this.state.startLoc,o=this.isContextual(96);if(o&&this.recordAwaitIfAllowed()){this.next();let u=this.parseAwait(n);return t||this.checkExponentialAfterUnary(u),u}let i=this.match(34),s=this.startNode();if(_ce(this.state.type)){s.operator=this.state.value,s.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let u=this.match(89);if(this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&u){let m=s.argument;m.type==="Identifier"?this.raise(k.StrictDelete,s):this.hasPropertyAsPrivateName(m)&&this.raise(k.DeletePrivateField,s)}if(!i)return t||this.checkExponentialAfterUnary(s),this.finishNode(s,"UnaryExpression")}let c=this.parseUpdate(s,i,e);if(o){let{type:u}=this.state;if((this.hasPlugin("v8intrinsic")?bn(u):bn(u)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(k.AwaitNotInAsyncContext,n),this.parseAwait(n)}return c}parseUpdate(e,t,n){if(t){let s=e;return this.checkLVal(s.argument,this.finishNode(s,"UpdateExpression")),e}let o=this.state.startLoc,i=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return i;for(;Ace(this.state.type)&&!this.canInsertSemicolon();){let s=this.startNodeAt(o);s.operator=this.state.value,s.prefix=!1,s.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(s,"UpdateExpression"))}return i}parseExprSubscripts(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,o=this.parseExprAtom(e);return this.shouldExitDescending(o,n)?o:this.parseSubscripts(o,t)}parseSubscripts(e,t,n){let o={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,t,n,o),o.maybeAsyncArrow=!1;while(!o.stop);return e}parseSubscript(e,t,n,o){let{type:i}=this.state;if(!n&&i===15)return this.parseBind(e,t,o);if(aa(i))return this.parseTaggedTemplateExpression(e,t,o);let s=!1;if(i===18){if(n&&(this.raise(k.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,o);o.optionalChainMember=s=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,o,s);{let c=this.eat(0);return c||s||this.eat(16)?this.parseMember(e,t,o,c,s):this.stopParseSubscript(e,o)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,n,o,i){let s=this.startNodeAt(t);return s.object=e,s.computed=o,o?(s.property=this.parseExpression(),this.expect(3)):this.match(139)?(e.type==="Super"&&this.raise(k.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),n.optionalChainMember?(s.optional=i,this.finishNode(s,"OptionalMemberExpression")):this.finishNode(s,"MemberExpression")}parseBind(e,t,n){let o=this.startNodeAt(t);o.object=e,this.next();let i=this.match(83),s=this.parseNoCallExpr();if(s.type==="Super"||i&&s.type==="ImportExpression"||s.type==="Import")throw this.raise(k.UnsupportedBindRHS,s);return o.callee=s,n.stop=!0,this.parseSubscripts(this.finishNode(o,"BindExpression"),t,!1)}parseCoverCallAndAsyncArrowHead(e,t,n,o){let i=this.state.maybeInArrowParameters,s=null;this.state.maybeInArrowParameters=!0,this.next();let c=this.startNodeAt(t);c.callee=e;let{maybeAsyncArrow:u,optionalChainMember:m}=n;u&&(this.expressionScope.enter(mpe()),s=new lr),m&&(c.optional=o),o?c.arguments=this.parseCallExpressionArguments():c.arguments=this.parseCallExpressionArguments(e.type!=="Super",c,s);let h=this.finishCallExpression(c,m);return u&&this.shouldParseAsyncArrow()&&!o?(n.stop=!0,this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),h=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),h)):(u&&(this.checkExpressionErrors(s,!0),this.expressionScope.exit()),this.toReferencedArguments(h)),this.state.maybeInArrowParameters=i,h}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,n){let o=this.startNodeAt(t);return o.tag=e,o.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(k.OptionalChainingNoTemplate,t),this.finishNode(o,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type==="Import")if(e.arguments.length===0||e.arguments.length>2)this.raise(k.ImportCallArity,e);else for(let n of e.arguments)n.type==="SpreadElement"&&this.raise(k.ImportCallSpreadArgument,n);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,n){let o=[],i=!0,s=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(i)i=!1;else if(this.expect(12),this.match(11)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}o.push(this.parseExprListItem(11,!1,n,e))}return this.state.inFSharpPipelineDirectBody=s,o}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var n;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,(n=t.extra)==null?void 0:n.trailingCommaLoc),t.innerComments&&In(e,t.innerComments),t.callee.trailingComments&&In(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,n=null,{type:o}=this.state;switch(o){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(10)?this.optionFlags&512?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(k.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let i=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(i)}case 0:return this.parseArrayLike(3,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let i=t.callee=this.parseNoCallExpr();if(i.type==="MemberExpression")return this.finishNode(t,"BindExpression");throw this.raise(k.UnsupportedBind,i)}case 139:return this.raise(k.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.parseTopicReference(i);throw this.unexpected()}case 47:{let i=this.input.codePointAt(this.nextTokenStart());throw vt(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(o===137)return this.parseDecimalLiteral(this.state.value);if(o===2||o===1)return this.parseArrayLike(this.state.type===2?4:3,!0);if(o===6||o===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0);if(me(o)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,s=this.state.containsEsc,c=this.parseIdentifier();if(!s&&c.name==="async"&&!this.canInsertSemicolon()){let{type:u}=this.state;if(u===68)return this.resetPreviousNodeTrailingComments(c),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(c));if(me(u))return i&&this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(c)):c;if(u===90)return this.resetPreviousNodeTrailingComments(c),this.parseDo(this.startNodeAtNode(c),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(c),[c],!1)):c}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=qe(this.state.endLoc,-1),this.parseTopicReference(n);throw this.unexpected()}parseTopicReference(e){let t=this.startNode(),n=this.state.startLoc,o=this.state.type;return this.next(),this.finishTopicReference(t,n,e,o)}finishTopicReference(e,t,n,o){if(this.testTopicReferenceConfiguration(n,t,o))return n==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(k.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(k.PrimaryTopicNotAllowed,t),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference"));throw this.raise(k.PipeTopicUnconfiguredToken,t,{token:Kt(o)})}testTopicReferenceConfiguration(e,t,n){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Kt(n)}]);case"smart":return n===27;default:throw this.raise(k.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(ia(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(k.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let n=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=n,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.optionFlags&16||this.raise(k.SuperNotAllowed,e):this.scope.allowSuper||this.optionFlags&16||this.raise(k.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(k.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(qe(this.state.startLoc,1)),n=this.state.value;return this.next(),e.id=this.createIdentifier(t,n),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,n){e.meta=t;let o=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==n||o)&&this.raise(k.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:n}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}else{let t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(k.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,n){return this.addExtra(n,"rawValue",e),this.addExtra(n,"raw",this.input.slice(this.offsetToSourcePos(n.start),this.state.end)),n.value=e,this.next(),this.finishNode(n,t)}parseLiteral(e,t){let n=this.startNode();return this.parseLiteralAtNode(e,t,n)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let t=this.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t=this.state.startLoc,n;this.next(),this.expressionScope.enter(upe());let o=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let s=this.state.startLoc,c=[],u=new lr,m=!0,h,g;for(;!this.match(11);){if(m)m=!1;else if(this.expect(12,u.optionalParametersLoc===null?null:u.optionalParametersLoc),this.match(11)){g=this.state.startLoc;break}if(this.match(21)){let w=this.state.startLoc;if(h=this.state.startLoc,c.push(this.parseParenItem(this.parseRestBinding(),w)),!this.checkCommaAfterRest(41))break}else c.push(this.parseMaybeAssignAllowInOrVoidPattern(11,u,this.parseParenItem))}let y=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=o,this.state.inFSharpPipelineDirectBody=i;let S=this.startNodeAt(t);return e&&this.shouldParseArrow(c)&&(S=this.parseArrow(S))?(this.checkDestructuringPrivate(u),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(S,c,!1),S):(this.expressionScope.exit(),c.length||this.unexpected(this.state.lastTokStartLoc),g&&this.unexpected(g),h&&this.unexpected(h),this.checkExpressionErrors(u,!0),this.toReferencedListDeep(c,!0),c.length>1?(n=this.startNodeAt(s),n.expressions=c,this.finishNode(n,"SequenceExpression"),this.resetEndLocation(n,y)):n=c[0],this.wrapParenthesis(t,n))}wrapParenthesis(e,t){if(!(this.optionFlags&1024))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let n=this.startNodeAt(e);return n.expression=t,this.finishNode(n,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let n=this.parseMetaProperty(e,t,"target");return this.scope.allowNewTarget||this.raise(k.UnexpectedNewTarget,n),n}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){let t=this.match(83),n=this.parseNoCallExpr();e.callee=n,(t&&n.type==="ImportExpression"||n.type==="Import")&&this.raise(k.ImportCallNotNewExpression,n),n.type==="Super"&&this.raise(k.SuperCallNotNewExpression,n)}parseTemplateElement(e){let{start:t,startLoc:n,end:o,value:i}=this.state,s=t+1,c=this.startNodeAt(qe(n,1));i===null&&(e||this.raise(k.InvalidEscapeSequenceTemplate,qe(this.state.firstInvalidTemplateEscapePos,1)));let u=this.match(24),m=u?-1:-2,h=o+m;c.value={raw:this.input.slice(s,h).replace(/\r\n?/g,`
|
|
9
|
+
`),cooked:i===null?null:i.slice(1,m)},c.tail=u,this.next();let g=this.finishNode(c,"TemplateElement");return this.resetEndLocation(g,qe(this.state.lastTokEndLoc,m)),g}parseTemplate(e){let t=this.startNode(),n=this.parseTemplateElement(e),o=[n],i=[];for(;!n.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),o.push(n=this.parseTemplateElement(e));return t.expressions=i,t.quasis=o,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,n,o){n&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=!1,c=!0,u=this.startNode();for(u.properties=[],this.next();!this.match(e);){if(c)c=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(u);break}let h;t?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(o),s=this.checkProto(h,n,s,o)),n&&!this.isObjectProperty(h)&&h.type!=="SpreadElement"&&this.raise(k.InvalidRecordProperty,h),h.shorthand&&this.addExtra(h,"shorthand",!0),u.properties.push(h)}this.next(),this.state.inFSharpPipelineDirectBody=i;let m="ObjectExpression";return t?m="ObjectPattern":n&&(m="RecordExpression"),this.finishNode(u,m)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(k.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());let n=this.startNode(),o=!1,i=!1,s;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,e&&(s=this.state.startLoc);let c=this.eat(55);this.parsePropertyNamePrefixOperator(n);let u=this.state.containsEsc;if(this.parsePropertyName(n,e),!c&&!u&&this.maybeAsyncOrAccessorProp(n)){let{key:m}=n,h=m.name;h==="async"&&!this.hasPrecedingLineBreak()&&(o=!0,this.resetPreviousNodeTrailingComments(m),c=this.eat(55),this.parsePropertyName(n)),(h==="get"||h==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(m),n.kind=h,this.match(55)&&(c=!0,this.raise(k.AccessorIsGenerator,this.state.curPosition(),{kind:h}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,s,c,o,!1,i,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;let n=this.getGetterSetterExpectedParamCount(e),o=this.getObjectOrClassMethodParams(e);o.length!==n&&this.raise(e.kind==="get"?k.BadGetterArity:k.BadSetterArity,e),e.kind==="set"&&((t=o[o.length-1])==null?void 0:t.type)==="RestElement"&&this.raise(k.BadSetterRestParameter,e)}parseObjectMethod(e,t,n,o,i){if(i){let s=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(s),s}if(n||t||this.match(10))return o&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,n,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,n,o){if(e.shorthand=!1,this.eat(14))return e.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,o),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),n)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(29)){let i=this.state.startLoc;o!=null?o.shorthandAssignLoc===null&&(o.shorthandAssignLoc=i):this.raise(k.InvalidCoverInitializedName,i),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,n,o,i,s,c){let u=this.parseObjectMethod(e,n,o,i,s)||this.parseObjectProperty(e,t,i,c);return u||this.unexpected(),u}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:o}=this.state,i;if(mt(n))i=this.parseIdentifier(!0);else switch(n){case 135:i=this.parseNumericLiteral(o);break;case 134:i=this.parseStringLiteral(o);break;case 136:i=this.parseBigIntLiteral(o);break;case 139:{let s=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=s):this.raise(k.UnexpectedPrivateField,s),i=this.parsePrivateName();break}default:if(n===137){i=this.parseDecimalLiteral(o);break}this.unexpected()}e.key=i,n!==139&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,n,o,i,s,c=!1){this.initFunction(e,n),e.generator=t,this.scope.enter(530|(c?576:0)|(i?32:0)),this.prodParam.enter(ia(n,e.generator)),this.parseFunctionParams(e,o);let u=this.parseFunctionBodyAndFinish(e,s,!0);return this.prodParam.exit(),this.scope.exit(),u}parseArrayLike(e,t,n){t&&this.expectPlugin("recordAndTuple");let o=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!t,n,i),this.state.inFSharpPipelineDirectBody=o,this.finishNode(i,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,n,o){this.scope.enter(518);let i=ia(n,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,n);let s=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,o)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=s,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,n){this.toAssignableList(t,n,!1),e.params=t}parseFunctionBodyAndFinish(e,t,n=!1){return this.parseFunctionBody(e,!1,n),this.finishNode(e,t)}parseFunctionBody(e,t,n=!1){let o=t&&!this.match(5);if(this.expressionScope.enter(JS()),o)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let i=this.state.strict,s=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,c=>{let u=!this.isSimpleParamList(e.params);c&&u&&this.raise(k.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?e.key.loc.end:e);let m=!i&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!n&&!u,t,m),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,m)}),this.prodParam.exit(),this.state.labels=s}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let t=0,n=e.length;t<n;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,n,o=!0){let i=!t&&new Set,s={type:"FormalParameters"};for(let c of e.params)this.checkLVal(c,s,5,i,o)}parseExprList(e,t,n,o){let i=[],s=!0;for(;!this.eat(e);){if(s)s=!1;else if(this.expect(12),this.match(e)){o&&this.addTrailingCommaExtraToNode(o),this.next();break}i.push(this.parseExprListItem(e,t,n))}return i}parseExprListItem(e,t,n,o){let i;if(this.match(12))t||this.raise(k.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(n),s)}else if(this.match(17)){this.expectPlugin("partialApplication"),o||this.raise(k.UnexpectedArgumentPlaceholder,this.state.startLoc);let s=this.startNode();this.next(),i=this.finishNode(s,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowInOrVoidPattern(e,n,this.parseParenItem);return i}parseIdentifier(e){let t=this.startNode(),n=this.parseIdentifierName(e);return this.createIdentifier(t,n)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}createIdentifierAt(e,t,n){return e.name=t,e.loc.identifierName=t,this.finishNodeAt(e,"Identifier",n)}parseIdentifierName(e){let t,{startLoc:n,type:o}=this.state;mt(o)?t=this.state.value:this.unexpected();let i=Oce(o);return e?i&&this.replaceToken(132):this.checkReservedWord(t,n,i,!1),this.next(),t}checkReservedWord(e,t,n,o){if(e.length>10||!Jce(e))return;if(n&&Zce(e)){this.raise(k.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?o?WS:BS:US)(e,this.inModule)){this.raise(k.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(k.YieldBindingIdentifier,t);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(k.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise(k.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(k.ArgumentsInClass,t);return}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(k.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(k.ObsoleteAwaitStar,t),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===53||e===10||e===0||aa(e)||e===102&&!this.state.containsEsc||e===138||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(e){let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(k.YieldInParameter,t);let n=!1,o=null;if(!this.hasPrecedingLineBreak())switch(n=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!n)break;default:o=this.parseMaybeAssign()}return t.delegate=n,t.argument=o,this.finishNode(t,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(k.ImportCallArity,e)}}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&e.type==="SequenceExpression"&&this.raise(k.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let n=this.startNodeAt(t);return n.callee=e,this.finishNode(n,"PipelineBareFunction")}else{let n=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),n.expression=e,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(k.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(k.PipelineTopicUnused,e)}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}else return e()}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(t|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(t&-9);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let o=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=n,o}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{n()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");let t=this.startNode();return e!=null&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,t,n){if(t!=null&&this.match(88)){let o=this.lookaheadCharCode();if(o===44||o===(e===3?93:e===8?125:41)||o===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,n)}parsePropertyNamePrefixOperator(e){}},gm={kind:1},kpe={kind:2},Ppe=/[\uD800-\uDFFF]/u,xm=/in(?:stanceof)?/y;function $pe(r,e,t){for(let n=0;n<r.length;n++){let o=r[n],{type:i}=o;if(typeof i=="number"){if(i===139){let{loc:s,start:c,value:u,end:m}=o,h=c+1,g=qe(s.start,1);r.splice(n,1,new zt({type:$t(27),value:"#",start:c,end:h,startLoc:s.start,endLoc:g}),new zt({type:$t(132),value:u,start:h,end:m,startLoc:g,endLoc:s.end})),n++;continue}if(aa(i)){let{loc:s,start:c,value:u,end:m}=o,h=c+1,g=qe(s.start,1),y;e.charCodeAt(c-t)===96?y=new zt({type:$t(22),value:"`",start:c,end:h,startLoc:s.start,endLoc:g}):y=new zt({type:$t(8),value:"}",start:c,end:h,startLoc:s.start,endLoc:g});let S,w,$,E;i===24?(w=m-1,$=qe(s.end,-1),S=u===null?null:u.slice(1,-1),E=new zt({type:$t(22),value:"`",start:w,end:m,startLoc:$,endLoc:s.end})):(w=m-2,$=qe(s.end,-2),S=u===null?null:u.slice(1,-2),E=new zt({type:$t(23),value:"${",start:w,end:m,startLoc:$,endLoc:s.end})),r.splice(n,1,y,new zt({type:$t(20),value:S,start:h,end:w,startLoc:g,endLoc:$}),E),n+=2;continue}o.type=$t(i)}}return r}var jm=class extends Lm{parseTopLevel(e,t){return e.program=this.parseProgram(t,140,this.options.sourceType==="module"?"module":"script"),e.comments=this.comments,this.optionFlags&256&&(e.tokens=$pe(this.tokens,this.input,this.startIndex)),this.finishNode(e,"File")}parseProgram(e,t,n){if(e.sourceType=n,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[i,s]of Array.from(this.scope.undefinedExports))this.raise(k.ModuleExportUndefined,s,{localName:i});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let o;return t===140?o=this.finishNode(e,"Program"):o=this.finishNodeAt(e,"Program",qe(this.state.startLoc,-1)),o}stmtToDirective(e){let t=this.castNodeTo(e,"Directive"),n=this.castNodeTo(e.expression,"DirectiveLiteral"),o=n.value,i=this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end)),s=n.value=i.slice(1,-1);return this.addExtra(n,"raw",i),this.addExtra(n,"rawValue",s),this.addExtra(n,"expressionValue",o),t.value=n,delete e.expression,t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){let n=this.lookaheadCharCodeSince(e+2);if(n!==61&&n!==58&&n!==59)return!1}return!!(this.chStartsBindingIdentifier(t,e)||this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(96))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(vt(e)){if(xm.lastIndex=t,xm.test(this.input)){let n=this.codePointAtPos(xm.lastIndex);if(!mo(n)&&n!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return t===123||this.chStartsBindingIdentifier(t,e)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let n=this.state.type,o=this.startNode(),i=!!(e&2),s=!!(e&4),c=e&1;switch(n){case 60:return this.parseBreakContinueStatement(o,!0);case 63:return this.parseBreakContinueStatement(o,!1);case 64:return this.parseDebuggerStatement(o);case 90:return this.parseDoWhileStatement(o);case 91:return this.parseForStatement(o);case 68:if(this.lookaheadCharCode()===46)break;return s||this.raise(this.state.strict?k.StrictFunction:this.options.annexB?k.SloppyFunctionAnnexB:k.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(o,!1,!i&&s);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,o),!0);case 69:return this.parseIfStatement(o);case 70:return this.parseReturnStatement(o);case 71:return this.parseSwitchStatement(o);case 72:return this.parseThrowStatement(o);case 73:return this.parseTryStatement(o);case 96:if(this.isAwaitUsing())return this.allowsUsing()?i?this.recordAwaitIfAllowed()||this.raise(k.AwaitUsingNotInAsyncContext,o):this.raise(k.UnexpectedLexicalDeclaration,o):this.raise(k.UnexpectedUsingDeclaration,o),this.next(),this.parseVarStatement(o,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?i||this.raise(k.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(k.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(o,"using");case 100:{if(this.state.containsEsc)break;let h=this.nextTokenStart(),g=this.codePointAtPos(h);if(g!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(g,h)&&g!==123))break}case 75:i||this.raise(k.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let h=this.state.value;return this.parseVarStatement(o,h)}case 92:return this.parseWhileStatement(o);case 76:return this.parseWithStatement(o);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(o);case 83:{let h=this.lookaheadCharCode();if(h===40||h===46)break}case 82:{!(this.optionFlags&8)&&!c&&this.raise(k.UnexpectedImportExport,this.state.startLoc),this.next();let h;return n===83?h=this.parseImport(o):h=this.parseExport(o,t),this.assertModuleNodeAllowed(h),h}default:if(this.isAsyncFunction())return i||this.raise(k.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(o,!0,!i&&s)}let u=this.state.value,m=this.parseExpression();return me(n)&&m.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(o,u,m,e):this.parseExpressionStatement(o,m,t)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(k.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(e,t,n){if(e){var o;(o=t.decorators)!=null&&o.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(k.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),n&&this.resetStartLocationFromNode(n,t)}return t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do t.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(k.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(k.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t=this.state.startLoc,n;if(this.match(10)){let o=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(o,n);let i=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(n,o),this.getPluginOption("decorators","allowCallParenthesized")===!1&&e.expression!==n&&this.raise(k.DecoratorArgumentsOutsideParentheses,i)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let o=this.startNodeAt(t);o.object=n,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),o.property=this.parsePrivateName()):o.property=this.parseIdentifier(!0),o.computed=!1,n=this.finishNode(o,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(n,t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(10)){let n=this.startNodeAt(t);return n.callee=e,n.arguments=this.parseCallExpressionArguments(),this.toReferencedList(n.arguments),this.finishNode(n,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let n;for(n=0;n<this.state.labels.length;++n){let o=this.state.labels[n];if((e.label==null||o.name===e.label.name)&&(o.kind!=null&&(t||o.kind===1)||e.label&&t))break}if(n===this.state.labels.length){let o=t?"BreakStatement":"ContinueStatement";this.raise(k.IllegalBreakContinue,e,{type:o})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(gm),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(gm);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return t!==null&&this.unexpected(t),this.parseFor(e,null);let n=this.isContextual(100);{let u=this.isAwaitUsing(),m=u||this.isForUsing(),h=n&&this.hasFollowingBindingAtom()||m;if(this.match(74)||this.match(75)||h){let g=this.startNode(),y;u?(y="await using",this.recordAwaitIfAllowed()||this.raise(k.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):y=this.state.value,this.next(),this.parseVar(g,!0,y);let S=this.finishNode(g,"VariableDeclaration"),w=this.match(58);return w&&m&&this.raise(k.ForInUsing,S),(w||this.isContextual(102))&&S.declarations.length===1?this.parseForIn(e,S,t):(t!==null&&this.unexpected(t),this.parseFor(e,S))}}let o=this.isContextual(95),i=new lr,s=this.parseExpression(!0,i),c=this.isContextual(102);if(c&&(n&&this.raise(k.ForOfLet,s),t===null&&o&&s.type==="Identifier"&&this.raise(k.ForOfAsync,s)),c||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(s,!0);let u=c?"ForOfStatement":"ForInStatement";return this.checkLVal(s,{type:u}),this.parseForIn(e,s,t)}else this.checkExpressionErrors(i,!0);return t!==null&&this.unexpected(t),this.parseFor(e,s)}parseFunctionStatement(e,t,n){return this.next(),this.parseFunction(e,1|(n?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(k.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t=e.cases=[];this.expect(5),this.state.labels.push(kpe),this.scope.enter(256);let n;for(let o;!this.match(8);)if(this.match(61)||this.match(65)){let i=this.match(61);n&&this.finishNode(n,"SwitchCase"),t.push(n=this.startNode()),n.consequent=[],this.next(),i?n.test=this.parseExpression():(o&&this.raise(k.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),o=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(k.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(k.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,n=!1){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(gm),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(k.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,n,o){for(let s of this.state.labels)s.name===t&&this.raise(k.LabelRedeclaration,n,{labelName:t});let i=Ece(this.state.type)?1:this.match(71)?2:null;for(let s=this.state.labels.length-1;s>=0;s--){let c=this.state.labels[s];if(c.statementStart===e.start)c.statementStart=this.sourceToOffsetPos(this.state.start),c.kind=i;else break}return this.state.labels.push({name:t,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=o&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,n){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,n){let o=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(o,e,!1,8,n),t&&this.scope.exit(),this.finishNode(o,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,t,n,o,i){let s=e.body=[],c=e.directives=[];this.parseBlockOrModuleBlockBody(s,t?c:void 0,n,o,i)}parseBlockOrModuleBlockBody(e,t,n,o,i){let s=this.state.strict,c=!1,u=!1;for(;!this.match(o);){let m=n?this.parseModuleItem():this.parseStatementListItem();if(t&&!u){if(this.isValidDirective(m)){let h=this.stmtToDirective(m);t.push(h),!c&&h.value.value==="use strict"&&(c=!0,this.setStrict(!0));continue}u=!0,this.state.strictErrors.clear()}e.push(m)}i?.call(this,c),s||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,n){let o=this.match(58);return this.next(),o?n!==null&&this.unexpected(n):e.await=n!==null,t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!o||!this.options.annexB||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(k.ForInOfLoopInitializer,t,{type:o?"ForInStatement":"ForOfStatement"}),t.type==="AssignmentPattern"&&this.raise(k.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=o?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,o?"ForInStatement":"ForOfStatement")}parseVar(e,t,n,o=!1){let i=e.declarations=[];for(e.kind=n;;){let s=this.startNode();if(this.parseVarId(s,n),s.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,s.init===null&&!o&&(s.id.type!=="Identifier"&&!(t&&(this.match(58)||this.isContextual(102)))?this.raise(k.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(k.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),i.push(this.finishNode(s,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){let n=this.parseBindingAtom();t==="using"||t==="await using"?(n.type==="ArrayPattern"||n.type==="ObjectPattern")&&this.raise(k.UsingDeclarationHasBindingPattern,n.loc.start):n.type==="VoidPattern"&&this.raise(k.UnexpectedVoidPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},t==="var"?5:8201),e.id=n}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let n=t&2,o=!!(t&1),i=o&&!(t&4),s=!!(t&8);this.initFunction(e,s),this.match(55)&&(n&&this.raise(k.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),o&&(e.id=this.parseFunctionId(i));let c=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(ia(s,e.generator)),o||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,o?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),o&&!n&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=c,e}parseFunctionId(e){return e||me(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(lpe()),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,t,n){this.next();let o=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,o),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:e},o=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(o.length>0)throw this.raise(k.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){o.push(this.parseDecorator());continue}let s=this.startNode();o.length&&(s.decorators=o,this.resetStartLocationFromNode(s,o[0]),o=[]),this.parseClassMember(i,s,n),s.kind==="constructor"&&s.decorators&&s.decorators.length>0&&this.raise(k.DecoratorConstructor,s)}}),this.state.strict=t,this.next(),o.length)throw this.raise(k.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(e,t){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let o=t;return o.kind="method",o.computed=!1,o.key=n,o.static=!1,this.pushClassMethod(e,o,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let o=t;return o.computed=!1,o.key=n,o.static=!1,e.body.push(this.parseClassProperty(o)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(e,t,n){let o=this.isContextual(106);if(o){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5)){this.parseClassStaticBlock(e,t);return}}this.parseClassMemberWithIsStatic(e,t,n,o)}parseClassMemberWithIsStatic(e,t,n,o){let i=t,s=t,c=t,u=t,m=t,h=i,g=i;if(t.static=o,this.parsePropertyNamePrefixOperator(t),this.eat(55)){h.kind="method";let V=this.match(139);if(this.parseClassElementName(h),this.parsePostMemberNameModifiers(h),V){this.pushClassPrivateMethod(e,s,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(k.ConstructorIsGenerator,i.key),this.pushClassMethod(e,i,!0,!1,!1,!1);return}let y=!this.state.containsEsc&&me(this.state.type),S=this.parseClassElementName(t),w=y?S.name:null,$=this.isPrivateName(S),E=this.state.startLoc;if(this.parsePostMemberNameModifiers(g),this.isClassMethod()){if(h.kind="method",$){this.pushClassPrivateMethod(e,s,!1,!1);return}let V=this.isNonstaticConstructor(i),F=!1;V&&(i.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(k.DuplicateConstructor,S),V&&this.hasPlugin("typescript")&&t.override&&this.raise(k.OverrideOnConstructor,S),n.hadConstructor=!0,F=n.hadSuperClass),this.pushClassMethod(e,i,!1,!1,V,F)}else if(this.isClassProperty())$?this.pushClassPrivateProperty(e,u):this.pushClassProperty(e,c);else if(w==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(S);let V=this.eat(55);g.optional&&this.unexpected(E),h.kind="method";let F=this.match(139);this.parseClassElementName(h),this.parsePostMemberNameModifiers(g),F?this.pushClassPrivateMethod(e,s,V,!0):(this.isNonstaticConstructor(i)&&this.raise(k.ConstructorIsAsync,i.key),this.pushClassMethod(e,i,V,!0,!1,!1))}else if((w==="get"||w==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(S),h.kind=w;let V=this.match(139);this.parseClassElementName(i),V?this.pushClassPrivateMethod(e,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(k.ConstructorIsAccessor,i.key),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(w==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(S);let V=this.match(139);this.parseClassElementName(c),this.pushClassAccessorProperty(e,m,V)}else this.isLineTerminator()?$?this.pushClassPrivateProperty(e,u):this.pushClassProperty(e,c):this.unexpected()}parseClassElementName(e){let{type:t,value:n}=this.state;if((t===132||t===134)&&e.static&&n==="prototype"&&this.raise(k.StaticPrototype,this.state.startLoc),t===139){n==="constructor"&&this.raise(k.ConstructorClassPrivateField,this.state.startLoc);let o=this.parsePrivateName();return e.key=o,o}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){var n;this.scope.enter(720);let o=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=o,e.body.push(this.finishNode(t,"StaticBlock")),(n=t.decorators)!=null&&n.length&&this.raise(k.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(k.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let n=this.parseClassPrivateProperty(t);e.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(e,t,n){!n&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise(k.ConstructorClassField,t.key);let o=this.parseClassAccessorProperty(t);e.body.push(o),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(o.key),0,o.key.loc.start)}pushClassMethod(e,t,n,o,i,s){e.body.push(this.parseMethod(t,n,o,i,s,"ClassMethod",!0))}pushClassPrivateMethod(e,t,n,o){let i=this.parseMethod(t,n,o,!1,!1,"ClassPrivateMethod",!0);e.body.push(i);let s=i.kind==="get"?i.static?6:2:i.kind==="set"?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,s)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(JS()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,n,o=8331){if(me(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,o);else if(n||!t)e.id=null;else throw this.raise(k.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let n=this.parseMaybeImportPhase(e,!0),o=this.maybeParseExportDefaultSpecifier(e,n),i=!o||this.eat(12),s=i&&this.eatExportStar(e),c=s&&this.maybeParseExportNamespaceSpecifier(e),u=i&&(!c||this.eat(12)),m=o||s;if(s&&!c){if(o&&this.unexpected(),t)throw this.raise(k.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}let h=this.maybeParseExportNamedSpecifiers(e);o&&i&&!s&&!h&&this.unexpected(null,5),c&&u&&this.unexpected(null,98);let g;if(m||h){if(g=!1,t)throw this.raise(k.UnsupportedDecoratorExport,e);this.parseExportFrom(e,m)}else g=this.maybeParseExportDeclaration(e);if(m||h||g){var y;let S=e;if(this.checkExport(S,!0,!1,!!S.source),((y=S.declaration)==null?void 0:y.type)==="ClassDeclaration")this.maybeTakeDecorators(t,S.declaration,S);else if(t)throw this.raise(k.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(S,"ExportNamedDeclaration")}if(this.eat(65)){let S=e,w=this.parseExportDefaultExpression();if(S.declaration=w,w.type==="ClassDeclaration")this.maybeTakeDecorators(t,w,S);else if(t)throw this.raise(k.UnsupportedDecoratorExport,e);return this.checkExport(S,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(S,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.loc.start);let n=t||this.parseIdentifier(!0),o=this.startNodeAtNode(n);return o.exported=n,e.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var t,n;(n=(t=e).specifiers)!=null||(t.specifiers=[]);let o=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),o.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(o,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){let t=e;t.specifiers||(t.specifiers=[]);let n=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(n)),t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")?e.assertions=[]:e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(k.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(k.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(me(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){let o=this.nextTokenStart(),i=this.input.charCodeAt(o);if(i===123||this.chStartsBindingIdentifier(i,o)&&!this.input.startsWith("from",o))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),n=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||me(this.state.type)&&n)return!0;if(this.match(65)&&n){let o=this.input.charCodeAt(this.nextTokenStartSince(t+4));return o===34||o===39}return!1}parseExportFrom(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(k.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()?(this.raise(k.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(k.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,t,n,o){if(t){var i;if(n){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var s;let c=e.declaration;c.type==="Identifier"&&c.name==="from"&&c.end-c.start===4&&!((s=c.extra)!=null&&s.parenthesized)&&this.raise(k.ExportDefaultFromAsIdentifier,c)}}else if((i=e.specifiers)!=null&&i.length)for(let c of e.specifiers){let{exported:u}=c,m=u.type==="Identifier"?u.name:u.value;if(this.checkDuplicateExports(c,m),!o&&c.local){let{local:h}=c;h.type!=="Identifier"?this.raise(k.ExportBindingIsString,c,{localName:h.value,exportName:m}):(this.checkReservedWord(h.name,h.loc.start,!0,!1),this.scope.checkLocalExport(h))}}else if(e.declaration){let c=e.declaration;if(c.type==="FunctionDeclaration"||c.type==="ClassDeclaration"){let{id:u}=c;if(!u)throw new Error("Assertion failure");this.checkDuplicateExports(e,u.name)}else if(c.type==="VariableDeclaration")for(let u of c.declarations)this.checkDeclaration(u.id)}}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(let t of e.properties)this.checkDeclaration(t);else if(e.type==="ArrayPattern")for(let t of e.elements)t&&this.checkDeclaration(t);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&(t==="default"?this.raise(k.DuplicateDefaultExport,e):this.raise(k.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let o=this.isContextual(130),i=this.match(134),s=this.startNode();s.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(s,i,e,o))}return t}parseExportSpecifier(e,t,n,o){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let e=this.parseStringLiteral(this.state.value),t=Ppe.exec(e.value);return t&&this.raise(k.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions!=null?e.assertions.some(({key:t,value:n})=>n.value==="json"&&(t.type==="Identifier"?t.name==="type":t.value==="type")):!1}checkImportReflection(e){let{specifiers:t}=e,n=t.length===1?t[0].type:null;if(e.phase==="source")n!=="ImportDefaultSpecifier"&&this.raise(k.SourcePhaseImportRequiresDefault,t[0].loc.start);else if(e.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise(k.DeferImportRequiresNamespace,t[0].loc.start);else if(e.module){var o;n!=="ImportDefaultSpecifier"&&this.raise(k.ImportReflectionNotBinding,t[0].loc.start),((o=e.assertions)==null?void 0:o.length)>0&&this.raise(k.ImportReflectionHasAssertion,t[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!=="ExportAllDeclaration"){let{specifiers:t}=e;if(t!=null){let n=t.find(o=>{let i;if(o.type==="ExportSpecifier"?i=o.local:o.type==="ImportSpecifier"&&(i=o.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});n!==void 0&&this.raise(k.ImportJSONBindingNotDefault,n.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(e,t,n,o){t||(n==="module"?(this.expectPlugin("importReflection",o),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),n==="source"?(this.expectPlugin("sourcePhaseImports",o),e.phase="source"):n==="defer"?(this.expectPlugin("deferredImportEvaluation",o),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let n=this.startNode(),o=this.parseIdentifierName(!0),{type:i}=this.state;return(mt(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.applyImportPhase(e,t,o,n.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(n,o))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return me(t)?t!==98||this.lookaheadCharCode()===102:t!==12}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let o=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),i=o&&this.maybeParseStarImportSpecifier(e);return o&&!i&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){var t;return(t=e.specifiers)!=null||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,n){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,n))}finishImportSpecifier(e,t,n=8201){return this.checkLVal(e.local,{type:t},n),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let n=this.startNode(),o=this.state.value;if(t.has(o)&&this.raise(k.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:o}),t.add(o),this.match(134)?n.key=this.parseStringLiteral(o):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(k.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!=="type"&&this.raise(k.ModuleAttributeDifferentFromType,n.key),t.has(n.key.name)&&this.raise(k.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),t.add(n.key.name),this.expect(14),!this.match(134))throw this.raise(k.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t;var n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?(t=this.parseModuleAttributes(),this.addExtra(e,"deprecatedWithLegacySyntax",!0)):t=this.parseImportAttributes(),n=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(k.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),t=this.parseImportAttributes()):t=[];!n&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let n=this.startNodeAtNode(t);return n.local=t,e.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}else if(mt(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(k.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),o=this.match(134),i=this.isContextual(130);n.imported=this.parseModuleExportName();let s=this.parseImportSpecifier(n,o,e.importKind==="type"||e.importKind==="typeof",i,void 0);e.specifiers.push(s)}}parseImportSpecifier(e,t,n,o,i){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:s}=e;if(t)throw this.raise(k.ImportBindingIsString,e,{importName:s.value});this.checkReservedWord(s.name,e.loc.start,!0,!0),e.local||(e.local=this.cloneIdentifier(s))}return this.finishImportSpecifier(e,"ImportSpecifier",i)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}},pa=class extends jm{constructor(e,t,n){let o=kce(e);super(o,t),this.options=o,this.initializeScopes(),this.plugins=n,this.filename=o.sourceFilename,this.startIndex=o.startIndex;let i=0;o.allowAwaitOutsideFunction&&(i|=1),o.allowReturnOutsideFunction&&(i|=2),o.allowImportExportEverywhere&&(i|=8),o.allowSuperOutsideMethod&&(i|=16),o.allowUndeclaredExports&&(i|=64),o.allowNewTargetOutsideFunction&&(i|=4),o.allowYieldOutsideFunction&&(i|=32),o.ranges&&(i|=128),o.tokens&&(i|=256),o.createImportExpressions&&(i|=512),o.createParenthesizedExpressions&&(i|=1024),o.errorRecovery&&(i|=2048),o.attachComment&&(i|=4096),o.annexB&&(i|=8192),this.optionFlags=i}getScopeHandler(){return wn}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=null;let n=this.parseTopLevel(e,t);return n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}};function Tpe(r,e){var t;if(((t=e)==null?void 0:t.sourceType)==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";let n=Sn(e,r),o=n.parse();if(n.sawUnambiguousESM)return o;if(n.ambiguousScriptDifferentAst)try{return e.sourceType="script",Sn(e,r).parse()}catch{}else o.program.sourceType="script";return o}catch(n){try{return e.sourceType="script",Sn(e,r).parse()}catch{}throw n}}else return Sn(e,r).parse()}function Cpe(r,e){let t=Sn(e,r);return t.options.strictMode&&(t.state.strict=!0),t.getExpression()}function Ope(r){let e={};for(let t of Object.keys(r))e[t]=$t(r[t]);return e}var Mpe=Ope(Cce);function Sn(r,e){let t=pa,n=new Map;if(r!=null&&r.plugins){for(let o of r.plugins){let i,s;typeof o=="string"?i=o:[i,s]=o,n.has(i)||n.set(i,s||{})}wpe(n),t=Rpe(n)}return new t(r,e,n)}var jS=new Map;function Rpe(r){let e=[];for(let o of Ipe)r.has(o)&&e.push(o);let t=e.join("|"),n=jS.get(t);if(!n){n=pa;for(let o of e)n=YS[o](n);jS.set(t,n)}return n}kn.parse=Tpe;kn.parseExpression=Cpe;kn.tokTypes=Mpe});import{Command as tde}from"commander";import{existsSync as _z}from"fs";import{homedir as Ah}from"os";import{dirname as Lz,join as fa}from"path";import{fileURLToPath as jz}from"url";import{agents as Fz,detectGlobalAgents as _h,upsertServer as Nz}from"add-mcp";import{createHash as Oz,randomUUID as Th}from"crypto";import{chmodSync as Mz,existsSync as Rz,lstatSync as ma,mkdirSync as da,readFileSync as Mh,readdirSync as Rh,renameSync as la,writeFileSync as Ch}from"fs";import{dirname as On,join as ht}from"path";var ha=".cueframe-install.json";function Eh(r){return Oz("sha256").update(r).digest("hex")}function Oh(r){let e=new Map;function t(n){let o=ht(r,n),i=ma(o);if(i.isSymbolicLink())throw new Error(`Skill package contains a symbolic link: ${o}`);if(i.isDirectory())for(let s of Rh(o).sort())!n&&s===ha||t(n?`${n}/${s}`:s);else if(i.isFile())e.set(n,{bytes:Mh(o),mode:i.mode&511});else throw new Error(`Unsupported skill package entry: ${o}`)}return t(""),e}function ua(r){return Object.fromEntries([...r].map(([e,t])=>[e,`${t.mode}:${Eh(t.bytes)}`]))}function Ez(r,e){let t=Object.keys(r).sort();return JSON.stringify(t)===JSON.stringify(Object.keys(e).sort())&&t.every(n=>r[n]===e[n])}function Dz(r,e){try{let t=ht(r,ha);if(!ma(t).isFile())return;let n=JSON.parse(Mh(t,"utf8"));return n.version!==1||typeof n.sourceHash!="string"||!n.files||!Ez(n.files,ua(e))?void 0:n}catch{return}}function Az(r,e){let t=`> Installed ${e} by \`npx -y cueframe install\`. Run it again to refresh
|
|
10
|
+
> unchanged managed skills. Locally edited or untracked packages are preserved;
|
|
11
|
+
> inspect reported conflicts before using \`--force\` (which makes a backup).
|
|
12
|
+
`,n=r.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n/);return n?`${n[0]}
|
|
13
|
+
${t}${r.slice(n[0].length)}`:`${t}
|
|
14
|
+
${r}`}function Dh(r,e,t={}){let n={installed:[],unchanged:[],skipped:[],backups:[]},o=t.today??new Date().toISOString().slice(0,10),i=Rh(r).sort().flatMap(s=>{let c=ht(r,s);if(!Rz(ht(c,"SKILL.md")))return[];let u=Oh(c),m=Eh(JSON.stringify(ua(u))),h=u.get("SKILL.md");return u.set("SKILL.md",{...h,bytes:Buffer.from(Az(h.bytes.toString("utf8"),o))}),[{name:s,files:u,sourceHash:m}]});for(let s of new Set(e))for(let{name:c,files:u,sourceHash:m}of i){let h=ht(s,c),g=ht(h,"SKILL.md"),y=!1;try{ma(h),y=!0}catch(E){if(E.code!=="ENOENT")throw E}if(y&&!t.force){let E;try{E=Dz(h,Oh(h))}catch{}if(!E){n.skipped.push(g);continue}if(E.sourceHash===m){n.unchanged.push(g);continue}}let S=ht(On(s),"cueframe-skill-staging",`${c}-${Th()}`);for(let[E,V]of u){let F=ht(S,E);da(On(F),{recursive:!0}),Ch(F,V.bytes),Mz(F,V.mode)}let w={version:1,sourceHash:m,files:ua(u)};Ch(ht(S,ha),JSON.stringify(w,null,2)+`
|
|
15
|
+
`),da(s,{recursive:!0});let $;y&&($=ht(On(s),"cueframe-skill-backups",`${c}-${Th()}`),da(On($),{recursive:!0}),la(h,$));try{la(S,h)}catch(E){throw $&&la($,h),E}$&&n.backups.push({skill:g,path:$}),n.installed.push(g)}return n}var Mn="cueframe",Vz=fa(Lz(jz(import.meta.url)),"skills");function Uz(r){return(Fz[r]?.supportedTransports??[]).includes("http")}async function Bz(r){return(await _h()).map(t=>{if(!Uz(t))return{agent:t,wired:!1,error:"speaks stdio only \u2014 CueFrame\u2019s MCP server is remote HTTP"};try{let n=Nz(t,Mn,{type:"http",url:r});return{agent:t,wired:n.success,path:n.path,error:n.error}}catch(n){return{agent:t,wired:!1,error:n instanceof Error?n.message:String(n)}}})}async function Lh(r,e=Vz){let t=`${go(r.target)}/v1/mcp`,n=[fa(Ah(),".agents","skills"),fa(Ah(),".claude","skills")];if(r.dryRun){let m=await _h();pe(r,{ok:!0,dryRun:!0,mcpUrl:t,wouldWire:m,serverName:Mn,skillDirectories:n},()=>{console.log(`Would wire MCP server "${Mn}" \u2192 ${t} into:`),m.length===0&&console.log(" (no agents detected on this machine)");for(let h of m)console.log(` \u2192 ${h}`);console.log("Would install/refresh CueFrame skills in ~/.agents/skills and ~/.claude/skills"),console.log("Dry run \u2014 nothing was written.")});return}_z(e)||(G(r,"install",new Error("Bundled skills/ directory not found"),j.UserError),L(j.UserError));let o=await Bz(t),{installed:i,unchanged:s,skipped:c,backups:u}=Dh(e,n,r);i.length===0&&s.length===0&&c.length===0&&o.length===0&&(G(r,"install",new Error("No agents detected and no skills found \u2014 nothing to install"),j.UserError),L(j.UserError)),pe(r,{ok:!0,mcpUrl:t,agents:o,skills:i,unchanged:s,skipped:c,backups:u,skillDirectories:n},()=>{if(console.log(`\u2713 CueFrame MCP server (${t})`),o.length===0)console.log(" No agents detected on this machine. Add it manually:"),console.log(` claude mcp add --transport http ${Mn} ${t}`),console.log(` \u2026or add the MCP server ${t} as a custom connector.`);else for(let m of o)console.log(m.wired?` \u2192 wired ${m.agent}`:` \u2717 ${m.agent}: ${m.error??"failed"}`);if(console.log(`\u2713 Installed/refreshed ${i.length} CueFrame skill copies in ~/.agents/skills and ~/.claude/skills`),s.length>0&&console.log(` ${s.length} already current`),c.length>0){console.log(` ${c.length} preserved (locally changed or untracked; review before --force)`);for(let m of c)console.log(` ${m}`)}for(let m of u)console.log(` Backup: ${m.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 ga,mkdirSync as qz,readFileSync as Fh,writeFileSync as xa}from"fs";import{join as ya}from"path";var jh="cueframe.json",Wz="cueframe/components",Rn=".cueframe/";function Zz(r,e){let t=ya(r,".gitignore");if(ga(t)){let n=Fh(t,"utf8"),o=n.split(`
|
|
16
|
+
`).map(i=>i.trim());if(o.includes(Rn)||o.includes(".cueframe"))return!1;if(!e){let i=n.endsWith(`
|
|
8
17
|
`)||n.length===0?"":`
|
|
9
|
-
`;
|
|
18
|
+
`;xa(t,`${n}${i}
|
|
10
19
|
# CueFrame derived render cache (regenerated; never authored)
|
|
11
|
-
${
|
|
12
|
-
`)}return!0}return e||
|
|
13
|
-
${
|
|
14
|
-
`),!0}function
|
|
15
|
-
`);let i=ft(e,s),a=lt(i);!a&&!r&&cn(i,{recursive:!0});let u=un(e,r);$(t,{ok:!0,dryRun:r,root:e,manifest:{path:n,created:!o},componentsDir:s,componentsDirCreated:!a,gitignoreUpdated:u},()=>{console.log(`\u2713 ${r?"Would initialize":"Initialized"} CueFrame workspace at ${e}`),console.log(` ${o?"kept":"created"} ${Nt} (componentsDir: ${s})`),console.log(` ${a?"exists":"created"} ${s}/`),u&&console.log(` gitignored ${He}`),console.log("Next: cueframe eject <primitive> or cueframe new component <name>")})}import{existsSync as Ro,mkdirSync as Oo,readFileSync as Ao,readdirSync as Io,writeFileSync as Yt}from"fs";import{join as Xt}from"path";import{existsSync as tt,readFileSync as ko,readdirSync as bo,statSync as Eo}from"fs";import{dirname as So,join as Ne,parse as Co}from"path";var Le={};qr(Le,{BRAND:()=>Mn,DIRTY:()=>de,EMPTY_PATH:()=>pn,INVALID:()=>w,NEVER:()=>wo,OK:()=>F,ParseStatus:()=>M,Schema:()=>E,ZodAny:()=>ae,ZodArray:()=>re,ZodBigInt:()=>le,ZodBoolean:()=>me,ZodBranded:()=>Fe,ZodCatch:()=>be,ZodDate:()=>fe,ZodDefault:()=>ke,ZodDiscriminatedUnion:()=>Xe,ZodEffects:()=>q,ZodEnum:()=>xe,ZodError:()=>L,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>et,ZodIntersection:()=>ye,ZodIssueCode:()=>f,ZodLazy:()=>ve,ZodLiteral:()=>_e,ZodMap:()=>Ae,ZodNaN:()=>Pe,ZodNativeEnum:()=>we,ZodNever:()=>G,ZodNull:()=>ge,ZodNullable:()=>Y,ZodNumber:()=>ue,ZodObject:()=>z,ZodOptional:()=>V,ZodParsedType:()=>y,ZodPipeline:()=>De,ZodPromise:()=>ce,ZodReadonly:()=>Ee,ZodRecord:()=>Qe,ZodSchema:()=>E,ZodSet:()=>Ie,ZodString:()=>ie,ZodSymbol:()=>Re,ZodTransformer:()=>q,ZodTuple:()=>K,ZodType:()=>E,ZodUndefined:()=>pe,ZodUnion:()=>he,ZodUnknown:()=>te,ZodVoid:()=>Oe,addIssueToContext:()=>g,any:()=>Bn,array:()=>Hn,bigint:()=>Ln,boolean:()=>Gt,coerce:()=>xo,custom:()=>Bt,date:()=>zn,datetimeRegex:()=>Wt,defaultErrorMap:()=>Q,discriminatedUnion:()=>Qn,effect:()=>mo,enum:()=>co,function:()=>so,getErrorMap:()=>je,getParsedType:()=>H,instanceof:()=>Fn,intersection:()=>eo,isAborted:()=>Ke,isAsync:()=>Te,isDirty:()=>Ye,isValid:()=>se,late:()=>Un,lazy:()=>io,literal:()=>ao,makeIssue:()=>Ue,map:()=>no,nan:()=>Dn,nativeEnum:()=>uo,never:()=>Jn,null:()=>Vn,nullable:()=>po,number:()=>Jt,object:()=>Kn,objectUtil:()=>pt,oboolean:()=>_o,onumber:()=>vo,optional:()=>fo,ostring:()=>yo,pipeline:()=>ho,preprocess:()=>go,promise:()=>lo,quotelessJson:()=>ln,record:()=>ro,set:()=>oo,setErrorMap:()=>fn,strictObject:()=>Yn,string:()=>qt,symbol:()=>Zn,transformer:()=>mo,tuple:()=>to,undefined:()=>Wn,union:()=>Xn,unknown:()=>qn,util:()=>j,void:()=>Gn});var j;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let i of o)s[i]=i;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(let a of s)i[a]=o[a];return t.objectValues(i)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},t.find=(o,s)=>{for(let i of o)if(s(i))return i},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(j||(j={}));var pt;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(pt||(pt={}));var y=j.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),H=t=>{switch(typeof t){case"undefined":return y.undefined;case"string":return y.string;case"number":return Number.isNaN(t)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(t)?y.array:t===null?y.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?y.promise:typeof Map<"u"&&t instanceof Map?y.map:typeof Set<"u"&&t instanceof Set?y.set:typeof Date<"u"&&t instanceof Date?y.date:y.object;default:return y.unknown}};var f=j.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ln=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),L=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(let i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,u=0;for(;u<i.path.length;){let d=i.path[u];u===i.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(r(i))):a[d]=a[d]||{_errors:[]},a=a[d],u++}}};return o(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,j.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};L.create=t=>new L(t);var mn=(t,e)=>{let r;switch(t.code){case f.invalid_type:t.received===y.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case f.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,j.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:r=`Unrecognized key(s) in object: ${j.joinValues(t.keys,", ")}`;break;case f.invalid_union:r="Invalid input";break;case f.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${j.joinValues(t.options)}`;break;case f.invalid_enum_value:r=`Invalid enum value. Expected ${j.joinValues(t.options)}, received '${t.received}'`;break;case f.invalid_arguments:r="Invalid function arguments";break;case f.invalid_return_type:r="Invalid function return type";break;case f.invalid_date:r="Invalid date";break;case f.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:j.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case f.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case f.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case f.custom:r="Invalid input";break;case f.invalid_intersection_types:r="Intersection results could not be merged";break;case f.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case f.not_finite:r="Number must be finite";break;default:r=e.defaultError,j.assertNever(t)}return{message:r}},Q=mn;var Ft=Q;function fn(t){Ft=t}function je(){return Ft}var Ue=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="",u=n.filter(d=>!!d).slice().reverse();for(let d of u)a=d(i,{data:e,defaultError:a}).message;return{...o,path:s,message:a}},pn=[];function g(t,e){let r=je(),n=Ue({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Q?void 0:Q].filter(o=>!!o)});t.common.issues.push(n)}var M=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return w;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,i=await o.value;n.push({key:s,value:i})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return w;s.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[s.value]=i.value)}return{status:e.value,value:n}}},w=Object.freeze({status:"aborted"}),de=t=>({status:"dirty",value:t}),F=t=>({status:"valid",value:t}),Ke=t=>t.status==="aborted",Ye=t=>t.status==="dirty",se=t=>t.status==="valid",Te=t=>typeof Promise<"u"&&t instanceof Promise;var v;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(v||(v={}));var B=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Dt=(t,e)=>{if(se(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new L(t.common.issues);return this._error=r,this._error}}};function b(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(i,a)=>{let{message:u}=t;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:u??r??a.defaultError}},description:o}}var E=class{get description(){return this._def.description}_getType(e){return H(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:H(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new M,ctx:{common:e.parent.common,data:e.data,parsedType:H(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Te(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:H(e)},o=this._parseSync({data:e,path:n.path,parent:n});return Dt(n,o)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:H(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return se(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>se(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:H(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(Te(o)?o:Promise.resolve(o));return Dt(n,s)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let i=e(o),a=()=>s.addIssue({code:f.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new q({schema:this,typeName:k.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return V.create(this,this._def)}nullable(){return Y.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return re.create(this)}promise(){return ce.create(this,this._def)}or(e){return he.create([this,e],this._def)}and(e){return ye.create(this,e,this._def)}transform(e){return new q({...b(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ke({...b(this._def),innerType:this,defaultValue:r,typeName:k.ZodDefault})}brand(){return new Fe({typeName:k.ZodBranded,type:this,...b(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new be({...b(this._def),innerType:this,catchValue:r,typeName:k.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return De.create(this,e)}readonly(){return Ee.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},gn=/^c[^\s-]{8,}$/i,hn=/^[0-9a-z]+$/,yn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vn=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_n=/^[a-z0-9_-]{21}$/i,xn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,wn=/^[-+]?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)?)??$/,kn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gt,En=/^(?:(?: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])$/,Sn=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Cn=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,jn=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Tn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$n=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,zt="((\\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])))",Rn=new RegExp(`^${zt}$`);function Zt(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function On(t){return new RegExp(`^${Zt(t)}$`)}function Wt(t){let e=`${zt}T${Zt(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function An(t,e){return!!((e==="v4"||!e)&&En.test(t)||(e==="v6"||!e)&&Cn.test(t))}function In(t,e){if(!xn.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function Pn(t,e){return!!((e==="v4"||!e)&&Sn.test(t)||(e==="v6"||!e)&&jn.test(t))}var ie=class t extends E{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){let s=this._getOrReturnCtx(e);return g(s,{code:f.invalid_type,expected:y.string,received:s.parsedType}),w}let n=new M,o;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),g(o,{code:f.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),g(o,{code:f.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let i=e.data.length>s.value,a=e.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(e,o),i?g(o,{code:f.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&g(o,{code:f.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")kn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"email",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")gt||(gt=new RegExp(bn,"u")),gt.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"emoji",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")vn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"uuid",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")_n.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"nanoid",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")gn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"cuid",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")hn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"cuid2",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")yn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"ulid",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),g(o,{validation:"url",code:f.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"regex",code:f.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Wt(s).test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Rn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?On(s).test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?wn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"duration",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?An(e.data,s.version)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"ip",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?In(e.data,s.alg)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"jwt",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Pn(e.data,s.version)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"cidr",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Tn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"base64",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?$n.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"base64url",code:f.invalid_string,message:s.message}),n.dirty()):j.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:f.invalid_string,...v.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...v.errToObj(e)})}url(e){return this._addCheck({kind:"url",...v.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...v.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...v.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...v.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...v.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...v.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...v.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...v.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...v.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...v.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...v.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...v.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...v.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...v.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...v.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...v.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...v.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...v.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...v.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...v.errToObj(r)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ie.create=t=>new ie({checks:[],typeName:k.ZodString,coerce:t?.coerce??!1,...b(t)});function Nn(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),i=Number.parseInt(e.toFixed(o).replace(".",""));return s%i/10**o}var ue=class t extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==y.number){let s=this._getOrReturnCtx(e);return g(s,{code:f.invalid_type,expected:y.number,received:s.parsedType}),w}let n,o=new M;for(let s of this._def.checks)s.kind==="int"?j.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:f.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Nn(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:f.not_finite,message:s.message}),o.dirty()):j.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,v.toString(r))}gt(e,r){return this.setLimit("min",e,!1,v.toString(r))}lte(e,r){return this.setLimit("max",e,!0,v.toString(r))}lt(e,r){return this.setLimit("max",e,!1,v.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:v.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:v.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:v.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&j.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};ue.create=t=>new ue({checks:[],typeName:k.ZodNumber,coerce:t?.coerce||!1,...b(t)});var le=class t extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==y.bigint)return this._getInvalidInput(e);let n,o=new M;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):j.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return g(r,{code:f.invalid_type,expected:y.bigint,received:r.parsedType}),w}gte(e,r){return this.setLimit("min",e,!0,v.toString(r))}gt(e,r){return this.setLimit("min",e,!1,v.toString(r))}lte(e,r){return this.setLimit("max",e,!0,v.toString(r))}lt(e,r){return this.setLimit("max",e,!1,v.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:v.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};le.create=t=>new le({checks:[],typeName:k.ZodBigInt,coerce:t?.coerce??!1,...b(t)});var me=class extends E{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.boolean,received:n.parsedType}),w}return F(e.data)}};me.create=t=>new me({typeName:k.ZodBoolean,coerce:t?.coerce||!1,...b(t)});var fe=class t extends E{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){let s=this._getOrReturnCtx(e);return g(s,{code:f.invalid_type,expected:y.date,received:s.parsedType}),w}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return g(s,{code:f.invalid_date}),w}let n=new M,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),g(o,{code:f.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),g(o,{code:f.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):j.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:v.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:v.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};fe.create=t=>new fe({checks:[],coerce:t?.coerce||!1,typeName:k.ZodDate,...b(t)});var Re=class extends E{_parse(e){if(this._getType(e)!==y.symbol){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.symbol,received:n.parsedType}),w}return F(e.data)}};Re.create=t=>new Re({typeName:k.ZodSymbol,...b(t)});var pe=class extends E{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.undefined,received:n.parsedType}),w}return F(e.data)}};pe.create=t=>new pe({typeName:k.ZodUndefined,...b(t)});var ge=class extends E{_parse(e){if(this._getType(e)!==y.null){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.null,received:n.parsedType}),w}return F(e.data)}};ge.create=t=>new ge({typeName:k.ZodNull,...b(t)});var ae=class extends E{constructor(){super(...arguments),this._any=!0}_parse(e){return F(e.data)}};ae.create=t=>new ae({typeName:k.ZodAny,...b(t)});var te=class extends E{constructor(){super(...arguments),this._unknown=!0}_parse(e){return F(e.data)}};te.create=t=>new te({typeName:k.ZodUnknown,...b(t)});var G=class extends E{_parse(e){let r=this._getOrReturnCtx(e);return g(r,{code:f.invalid_type,expected:y.never,received:r.parsedType}),w}};G.create=t=>new G({typeName:k.ZodNever,...b(t)});var Oe=class extends E{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.void,received:n.parsedType}),w}return F(e.data)}};Oe.create=t=>new Oe({typeName:k.ZodVoid,...b(t)});var re=class t extends E{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==y.array)return g(r,{code:f.invalid_type,expected:y.array,received:r.parsedType}),w;if(o.exactLength!==null){let i=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(i||a)&&(g(r,{code:i?f.too_big:f.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(g(r,{code:f.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(g(r,{code:f.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>o.type._parseAsync(new B(r,i,r.path,a)))).then(i=>M.mergeArray(n,i));let s=[...r.data].map((i,a)=>o.type._parseSync(new B(r,i,r.path,a)));return M.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:v.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:v.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:v.toString(r)}})}nonempty(e){return this.min(1,e)}};re.create=(t,e)=>new re({type:t,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...b(e)});function $e(t){if(t instanceof z){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=V.create($e(n))}return new z({...t._def,shape:()=>e})}else return t instanceof re?new re({...t._def,type:$e(t.element)}):t instanceof V?V.create($e(t.unwrap())):t instanceof Y?Y.create($e(t.unwrap())):t instanceof K?K.create(t.items.map(e=>$e(e))):t}var z=class t extends E{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=j.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==y.object){let d=this._getOrReturnCtx(e);return g(d,{code:f.invalid_type,expected:y.object,received:d.parsedType}),w}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof G&&this._def.unknownKeys==="strip"))for(let d in o.data)i.includes(d)||a.push(d);let u=[];for(let d of i){let c=s[d],l=o.data[d];u.push({key:{status:"valid",value:d},value:c._parse(new B(o,l,o.path,d)),alwaysSet:d in o.data})}if(this._def.catchall instanceof G){let d=this._def.unknownKeys;if(d==="passthrough")for(let c of a)u.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(d==="strict")a.length>0&&(g(o,{code:f.unrecognized_keys,keys:a}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let c of a){let l=o.data[c];u.push({key:{status:"valid",value:c},value:d._parse(new B(o,l,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let d=[];for(let c of u){let l=await c.key,S=await c.value;d.push({key:l,value:S,alwaysSet:c.alwaysSet})}return d}).then(d=>M.mergeObjectSync(n,d)):M.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return v.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:v.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:k.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of j.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of j.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return $e(this)}partial(e){let r={};for(let n of j.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of j.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof V;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return Vt(j.objectKeys(this.shape))}};z.create=(t,e)=>new z({shape:()=>t,unknownKeys:"strip",catchall:G.create(),typeName:k.ZodObject,...b(e)});z.strictCreate=(t,e)=>new z({shape:()=>t,unknownKeys:"strict",catchall:G.create(),typeName:k.ZodObject,...b(e)});z.lazycreate=(t,e)=>new z({shape:t,unknownKeys:"strip",catchall:G.create(),typeName:k.ZodObject,...b(e)});var he=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=s.map(a=>new L(a.ctx.common.issues));return g(r,{code:f.invalid_union,unionErrors:i}),w}if(r.common.async)return Promise.all(n.map(async s=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let s,i=[];for(let u of n){let d={...r,common:{...r.common,issues:[]},parent:null},c=u._parseSync({data:r.data,path:r.path,parent:d});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(u=>new L(u));return g(r,{code:f.invalid_union,unionErrors:a}),w}}get options(){return this._def.options}};he.create=(t,e)=>new he({options:t,typeName:k.ZodUnion,...b(e)});var ee=t=>t instanceof ve?ee(t.schema):t instanceof q?ee(t.innerType()):t instanceof _e?[t.value]:t instanceof xe?t.options:t instanceof we?j.objectValues(t.enum):t instanceof ke?ee(t._def.innerType):t instanceof pe?[void 0]:t instanceof ge?[null]:t instanceof V?[void 0,...ee(t.unwrap())]:t instanceof Y?[null,...ee(t.unwrap())]:t instanceof Fe||t instanceof Ee?ee(t.unwrap()):t instanceof be?ee(t._def.innerType):[],Xe=class t extends E{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.object)return g(r,{code:f.invalid_type,expected:y.object,received:r.parsedType}),w;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(g(r,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),w)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let i=ee(s.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of i){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,s)}}return new t({typeName:k.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...b(n)})}};function ht(t,e){let r=H(t),n=H(e);if(t===e)return{valid:!0,data:t};if(r===y.object&&n===y.object){let o=j.objectKeys(e),s=j.objectKeys(t).filter(a=>o.indexOf(a)!==-1),i={...t,...e};for(let a of s){let u=ht(t[a],e[a]);if(!u.valid)return{valid:!1};i[a]=u.data}return{valid:!0,data:i}}else if(r===y.array&&n===y.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s<t.length;s++){let i=t[s],a=e[s],u=ht(i,a);if(!u.valid)return{valid:!1};o.push(u.data)}return{valid:!0,data:o}}else return r===y.date&&n===y.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var ye=class extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,i)=>{if(Ke(s)||Ke(i))return w;let a=ht(s.value,i.value);return a.valid?((Ye(s)||Ye(i))&&r.dirty(),{status:r.value,value:a.data}):(g(n,{code:f.invalid_intersection_types}),w)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};ye.create=(t,e,r)=>new ye({left:t,right:e,typeName:k.ZodIntersection,...b(r)});var K=class t extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.array)return g(n,{code:f.invalid_type,expected:y.array,received:n.parsedType}),w;if(n.data.length<this._def.items.length)return g(n,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),w;!this._def.rest&&n.data.length>this._def.items.length&&(g(n,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((i,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new B(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>M.mergeArray(r,i)):M.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};K.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new K({items:t,typeName:k.ZodTuple,rest:null,...b(e)})};var Qe=class t extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.object)return g(n,{code:f.invalid_type,expected:y.object,received:n.parsedType}),w;let o=[],s=this._def.keyType,i=this._def.valueType;for(let a in n.data)o.push({key:s._parse(new B(n,a,n.path,a)),value:i._parse(new B(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?M.mergeObjectAsync(r,o):M.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof E?new t({keyType:e,valueType:r,typeName:k.ZodRecord,...b(n)}):new t({keyType:ie.create(),valueType:e,typeName:k.ZodRecord,...b(r)})}},Ae=class extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.map)return g(n,{code:f.invalid_type,expected:y.map,received:n.parsedType}),w;let o=this._def.keyType,s=this._def.valueType,i=[...n.data.entries()].map(([a,u],d)=>({key:o._parse(new B(n,a,n.path,[d,"key"])),value:s._parse(new B(n,u,n.path,[d,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of i){let d=await u.key,c=await u.value;if(d.status==="aborted"||c.status==="aborted")return w;(d.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(d.value,c.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of i){let d=u.key,c=u.value;if(d.status==="aborted"||c.status==="aborted")return w;(d.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(d.value,c.value)}return{status:r.value,value:a}}}};Ae.create=(t,e,r)=>new Ae({valueType:e,keyType:t,typeName:k.ZodMap,...b(r)});var Ie=class t extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.set)return g(n,{code:f.invalid_type,expected:y.set,received:n.parsedType}),w;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(g(n,{code:f.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(g(n,{code:f.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function i(u){let d=new Set;for(let c of u){if(c.status==="aborted")return w;c.status==="dirty"&&r.dirty(),d.add(c.value)}return{status:r.value,value:d}}let a=[...n.data.values()].map((u,d)=>s._parse(new B(n,u,n.path,d)));return n.common.async?Promise.all(a).then(u=>i(u)):i(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:v.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:v.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Ie.create=(t,e)=>new Ie({valueType:t,minSize:null,maxSize:null,typeName:k.ZodSet,...b(e)});var et=class t extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.function)return g(r,{code:f.invalid_type,expected:y.function,received:r.parsedType}),w;function n(a,u){return Ue({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,je(),Q].filter(d=>!!d),issueData:{code:f.invalid_arguments,argumentsError:u}})}function o(a,u){return Ue({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,je(),Q].filter(d=>!!d),issueData:{code:f.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof ce){let a=this;return F(async function(...u){let d=new L([]),c=await a._def.args.parseAsync(u,s).catch(I=>{throw d.addIssue(n(u,I)),d}),l=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(l,s).catch(I=>{throw d.addIssue(o(l,I)),d})})}else{let a=this;return F(function(...u){let d=a._def.args.safeParse(u,s);if(!d.success)throw new L([n(u,d.error)]);let c=Reflect.apply(i,this,d.data),l=a._def.returns.safeParse(c,s);if(!l.success)throw new L([o(c,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:K.create(e).rest(te.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||K.create([]).rest(te.create()),returns:r||te.create(),typeName:k.ZodFunction,...b(n)})}},ve=class extends E{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ve.create=(t,e)=>new ve({getter:t,typeName:k.ZodLazy,...b(e)});var _e=class extends E{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return g(r,{received:r.data,code:f.invalid_literal,expected:this._def.value}),w}return{status:"valid",value:e.data}}get value(){return this._def.value}};_e.create=(t,e)=>new _e({value:t,typeName:k.ZodLiteral,...b(e)});function Vt(t,e){return new xe({values:t,typeName:k.ZodEnum,...b(e)})}var xe=class t extends E{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return g(r,{expected:j.joinValues(n),received:r.parsedType,code:f.invalid_type}),w}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return g(r,{received:r.data,code:f.invalid_enum_value,options:n}),w}return F(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};xe.create=Vt;var we=class extends E{_parse(e){let r=j.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==y.string&&n.parsedType!==y.number){let o=j.objectValues(r);return g(n,{expected:j.joinValues(o),received:n.parsedType,code:f.invalid_type}),w}if(this._cache||(this._cache=new Set(j.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=j.objectValues(r);return g(n,{received:n.data,code:f.invalid_enum_value,options:o}),w}return F(e.data)}get enum(){return this._def.values}};we.create=(t,e)=>new we({values:t,typeName:k.ZodNativeEnum,...b(e)});var ce=class extends E{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.promise&&r.common.async===!1)return g(r,{code:f.invalid_type,expected:y.promise,received:r.parsedType}),w;let n=r.parsedType===y.promise?r.data:Promise.resolve(r.data);return F(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ce.create=(t,e)=>new ce({type:t,typeName:k.ZodPromise,...b(e)});var q=class extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:i=>{g(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let i=o.transform(n.data,s);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return w;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?w:u.status==="dirty"?de(u.value):r.value==="dirty"?de(u.value):u});{if(r.value==="aborted")return w;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?w:a.status==="dirty"?de(a.value):r.value==="dirty"?de(a.value):a}}if(o.type==="refinement"){let i=a=>{let u=o.refinement(a,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?w:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?w:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!se(i))return w;let a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>se(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:r.value,value:a})):w);j.assertNever(o)}};q.create=(t,e,r)=>new q({schema:t,typeName:k.ZodEffects,effect:e,...b(r)});q.createWithPreprocess=(t,e,r)=>new q({schema:e,effect:{type:"preprocess",transform:t},typeName:k.ZodEffects,...b(r)});var V=class extends E{_parse(e){return this._getType(e)===y.undefined?F(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};V.create=(t,e)=>new V({innerType:t,typeName:k.ZodOptional,...b(e)});var Y=class extends E{_parse(e){return this._getType(e)===y.null?F(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Y.create=(t,e)=>new Y({innerType:t,typeName:k.ZodNullable,...b(e)});var ke=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===y.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ke.create=(t,e)=>new ke({innerType:t,typeName:k.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...b(e)});var be=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Te(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};be.create=(t,e)=>new be({innerType:t,typeName:k.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...b(e)});var Pe=class extends E{_parse(e){if(this._getType(e)!==y.nan){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.nan,received:n.parsedType}),w}return{status:"valid",value:e.data}}};Pe.create=t=>new Pe({typeName:k.ZodNaN,...b(t)});var Mn=Symbol("zod_brand"),Fe=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},De=class t extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?w:s.status==="dirty"?(r.dirty(),de(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?w:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:k.ZodPipeline})}},Ee=class extends E{_parse(e){let r=this._def.innerType._parse(e),n=o=>(se(o)&&(o.value=Object.freeze(o.value)),o);return Te(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};Ee.create=(t,e)=>new Ee({innerType:t,typeName:k.ZodReadonly,...b(e)});function Lt(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Bt(t,e={},r){return t?ae.create().superRefine((n,o)=>{let s=t(n);if(s instanceof Promise)return s.then(i=>{if(!i){let a=Lt(e,n),u=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:u})}});if(!s){let i=Lt(e,n),a=i.fatal??r??!0;o.addIssue({code:"custom",...i,fatal:a})}}):ae.create()}var Un={object:z.lazycreate},k;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(k||(k={}));var Fn=(t,e={message:`Input not instance of ${t.name}`})=>Bt(r=>r instanceof t,e),qt=ie.create,Jt=ue.create,Dn=Pe.create,Ln=le.create,Gt=me.create,zn=fe.create,Zn=Re.create,Wn=pe.create,Vn=ge.create,Bn=ae.create,qn=te.create,Jn=G.create,Gn=Oe.create,Hn=re.create,Kn=z.create,Yn=z.strictCreate,Xn=he.create,Qn=Xe.create,eo=ye.create,to=K.create,ro=Qe.create,no=Ae.create,oo=Ie.create,so=et.create,io=ve.create,ao=_e.create,co=xe.create,uo=we.create,lo=ce.create,mo=q.create,fo=V.create,po=Y.create,go=q.createWithPreprocess,ho=De.create,yo=()=>qt().optional(),vo=()=>Jt().optional(),_o=()=>Gt().optional(),xo={string:(t=>ie.create({...t,coerce:!0})),number:(t=>ue.create({...t,coerce:!0})),boolean:(t=>me.create({...t,coerce:!0})),bigint:(t=>le.create({...t,coerce:!0})),date:(t=>fe.create({...t,coerce:!0}))};var wo=w;var jo="cueframe/components";var To="cueframe.json",$o=Le.object({componentsDir:Le.string().min(1).default(jo)}).passthrough();function ze(t){let e=t,r=Co(e).root;for(;;){let n=Ne(e,To);if(tt(n)){let o=ko(n,"utf8"),s=$o.parse(JSON.parse(o));return{root:e,manifest:s}}if(e===r)return null;e=So(e)}}function Ht(t){return Ne(t.root,t.manifest.componentsDir)}function rt(t,e){return Ne(Ht(t),e)}function Kt(t){let e=Ht(t);return tt(e)?bo(e).filter(r=>{let n=Ne(e,r);return Eo(n).isDirectory()?tt(Ne(n,"index.tsx"))&&tt(Ne(n,"config.ts")):!1}).sort():[]}var Po="cueframe.json";function No(t){return t.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}function Mo(t){return t.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function yt(t,e){x(t,"new_component",new Error(e),p.UserError),m(p.UserError)}function Uo(t,e){return`import React from 'react';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
${Rn}
|
|
21
|
+
`)}return!0}return e||xa(t,`# CueFrame derived render cache (regenerated; never authored)
|
|
22
|
+
${Rn}
|
|
23
|
+
`),!0}function Nh(r){let e=process.cwd(),t=r.dryRun??!1;B(r,"init_prepare",{cwd:e,dryRun:t});let n=ya(e,jh),o=ga(n),i=Wz;if(o)try{let m=JSON.parse(Fh(n,"utf8"));typeof m.componentsDir=="string"&&m.componentsDir.length>0&&(i=m.componentsDir)}catch{}else t||xa(n,`${JSON.stringify({componentsDir:i},null,2)}
|
|
24
|
+
`);let s=ya(e,i),c=ga(s);!c&&!t&&qz(s,{recursive:!0});let u=Zz(e,t);pe(r,{ok:!0,dryRun:t,root:e,manifest:{path:n,created:!o},componentsDir:i,componentsDirCreated:!c,gitignoreUpdated:u},()=>{console.log(`\u2713 ${t?"Would initialize":"Initialized"} CueFrame workspace at ${e}`),console.log(` ${o?"kept":"created"} ${jh} (componentsDir: ${i})`),console.log(` ${c?"exists":"created"} ${i}/`),u&&console.log(` gitignored ${Rn}`),console.log("Next: cueframe eject <primitive> or cueframe new component <name>")})}import{existsSync as yie,mkdirSync as bie,readFileSync as Sie,readdirSync as zie,writeFileSync as ub}from"fs";import{join as mb}from"path";import{existsSync as Rs,readFileSync as vk,readdirSync as wk,statSync as Ik}from"fs";import{dirname as kk,join as Yo,parse as Pk}from"path";var l={};It(l,{$brand:()=>Da,$input:()=>rd,$output:()=>od,NEVER:()=>Ea,TimePrecision:()=>md,ZodAny:()=>Hl,ZodArray:()=>eu,ZodBase64:()=>ws,ZodBase64URL:()=>Is,ZodBigInt:()=>Jo,ZodBigIntFormat:()=>$s,ZodBoolean:()=>Ko,ZodCIDRv4:()=>zs,ZodCIDRv6:()=>vs,ZodCUID:()=>hs,ZodCUID2:()=>fs,ZodCatch:()=>bu,ZodCodec:()=>on,ZodCompileAsyncError:()=>pt,ZodCompileUnsupportedError:()=>de,ZodCreditCard:()=>Zl,ZodCustom:()=>rn,ZodCustomStringFormat:()=>Zo,ZodDate:()=>Xr,ZodDefault:()=>mu,ZodDiscriminatedUnion:()=>ou,ZodE164:()=>ks,ZodEmail:()=>ds,ZodEmoji:()=>us,ZodEnum:()=>qo,ZodError:()=>QI,ZodExactOptional:()=>Os,ZodFile:()=>pu,ZodFirstPartyTypeKind:()=>Mu,ZodFunction:()=>Tu,ZodGUID:()=>ls,ZodIPv4:()=>bs,ZodIPv6:()=>Ss,ZodISODate:()=>Ut,ZodISODateTime:()=>Vt,ZodISODuration:()=>qt,ZodISOTime:()=>Bt,ZodIntersection:()=>ru,ZodIssueCode:()=>ok,ZodJWT:()=>Ps,ZodKSUID:()=>ys,ZodLazy:()=>Pu,ZodLiteral:()=>cu,ZodMAC:()=>Wl,ZodMap:()=>su,ZodNaN:()=>zu,ZodNanoID:()=>ms,ZodNever:()=>Yl,ZodNonOptional:()=>Ms,ZodNull:()=>Jl,ZodNullable:()=>uu,ZodNumber:()=>Go,ZodNumberFormat:()=>po,ZodObject:()=>Yr,ZodOptional:()=>en,ZodPipe:()=>tn,ZodPrefault:()=>fu,ZodPreprocess:()=>vu,ZodPromise:()=>$u,ZodReadonly:()=>wu,ZodRealError:()=>Xe,ZodRecord:()=>Bo,ZodSet:()=>au,ZodString:()=>Wo,ZodStringFormat:()=>xe,ZodSuccess:()=>yu,ZodSymbol:()=>Gl,ZodTemplateLiteral:()=>ku,ZodTransform:()=>du,ZodTuple:()=>iu,ZodType:()=>oe,ZodULID:()=>gs,ZodURL:()=>Hr,ZodUUID:()=>yt,ZodUndefined:()=>Kl,ZodUnion:()=>Qr,ZodUnknown:()=>Xl,ZodVoid:()=>Ql,ZodXID:()=>xs,ZodXor:()=>tu,_ZodString:()=>ps,_default:()=>hu,_function:()=>Jx,any:()=>Mx,array:()=>b,base64:()=>mx,base64url:()=>hx,bigint:()=>Px,boolean:()=>M,catch:()=>Su,check:()=>Hx,cidrv4:()=>lx,cidrv6:()=>ux,clone:()=>he,codec:()=>Wx,coerce:()=>Ru,compile:()=>ad,config:()=>Te,core:()=>Pt,creditCard:()=>gx,cuid:()=>rx,cuid2:()=>nx,custom:()=>Xx,date:()=>Rx,decode:()=>jl,decodeAsync:()=>Nl,deepPartial:()=>py,describe:()=>Yx,discriminatedUnion:()=>Ax,e164:()=>fx,email:()=>Kg,emoji:()=>tx,encode:()=>Ll,encodeAsync:()=>Fl,endsWith:()=>Do,enum:()=>f,exactOptional:()=>lu,file:()=>Vx,flattenError:()=>Tr,float32:()=>vx,float64:()=>wx,formatError:()=>Cr,fromJSONSchema:()=>ay,function:()=>Jx,getDiscriminatedOption:()=>Tp,getErrorMap:()=>nk,globalRegistry:()=>_e,gt:()=>gt,gte:()=>tt,guid:()=>Jg,hash:()=>zx,hex:()=>Sx,hostname:()=>bx,httpUrl:()=>ex,includes:()=>Ro,input:()=>ly,instanceof:()=>ey,int:()=>z,int32:()=>Ix,int64:()=>$x,intersection:()=>nu,invertCodec:()=>Zx,ipv4:()=>cx,ipv6:()=>dx,iso:()=>nn,json:()=>oy,jwt:()=>xx,keyof:()=>Ex,ksuid:()=>ax,lazy:()=>Ho,length:()=>so,literal:()=>x,locales:()=>Vr,looseObject:()=>Wt,looseRecord:()=>Lx,lowercase:()=>Oo,lt:()=>ft,lte:()=>et,mac:()=>px,map:()=>jx,maxLength:()=>io,maxSize:()=>Lt,memoizer:()=>Fr,meta:()=>Qx,mime:()=>Ao,minLength:()=>kt,minSize:()=>xt,multipleOf:()=>_t,nan:()=>qx,nanoid:()=>ox,nativeEnum:()=>Nx,negative:()=>Hi,never:()=>Ts,nonnegative:()=>Yi,nonoptional:()=>xu,nonpositive:()=>Xi,normalize:()=>_o,null:()=>K,nullable:()=>Jr,nullish:()=>Ux,number:()=>p,object:()=>R,optional:()=>ao,output:()=>uy,overwrite:()=>dt,parse:()=>El,parseAsync:()=>Dl,partialRecord:()=>_x,pipe:()=>cs,positive:()=>Ji,prefault:()=>gu,preprocess:()=>ry,prettifyError:()=>Fa,promise:()=>Kx,properties:()=>es,property:()=>Qi,readonly:()=>Iu,record:()=>P,refine:()=>Cu,regex:()=>Co,regexes:()=>Ne,registry:()=>Pi,safeDecode:()=>Ul,safeDecodeAsync:()=>ql,safeEncode:()=>Vl,safeEncodeAsync:()=>Bl,safeParse:()=>Al,safeParseAsync:()=>_l,set:()=>Fx,setErrorMap:()=>rk,size:()=>no,slugify:()=>No,startsWith:()=>Eo,strictObject:()=>d,string:()=>a,stringFormat:()=>yx,stringbool:()=>ty,success:()=>Bx,superRefine:()=>Ou,symbol:()=>Cx,templateLiteral:()=>Gx,toJSONSchema:()=>ns,toLowerCase:()=>jo,toUpperCase:()=>Fo,toZod:()=>br,transform:()=>Cs,treeifyError:()=>ja,trim:()=>Lo,tuple:()=>U,uint32:()=>kx,uint64:()=>Tx,ulid:()=>ix,undefined:()=>Ox,union:()=>v,unknown:()=>O,uppercase:()=>Mo,url:()=>ke,util:()=>_,uuid:()=>Hg,uuidv4:()=>Xg,uuidv6:()=>Yg,uuidv7:()=>Qg,validate:()=>Ua,validateAsync:()=>Ba,void:()=>Le,xid:()=>sx,xor:()=>Dx});var Pt={};It(Pt,{$ZodAny:()=>Sp,$ZodArray:()=>kp,$ZodAsyncError:()=>Je,$ZodBase64:()=>pp,$ZodBase64URL:()=>dp,$ZodBigInt:()=>hi,$ZodBigIntFormat:()=>gp,$ZodBoolean:()=>Ar,$ZodCIDRv4:()=>ap,$ZodCIDRv6:()=>cp,$ZodCUID:()=>Jc,$ZodCUID2:()=>Hc,$ZodCatch:()=>qp,$ZodCheck:()=>be,$ZodCheckBigIntFormat:()=>Ic,$ZodCheckEndsWith:()=>_c,$ZodCheckGreaterThan:()=>Yn,$ZodCheckIncludes:()=>Dc,$ZodCheckLengthEquals:()=>Oc,$ZodCheckLessThan:()=>Xn,$ZodCheckLowerCase:()=>Rc,$ZodCheckMaxLength:()=>Tc,$ZodCheckMaxSize:()=>kc,$ZodCheckMimeType:()=>Lc,$ZodCheckMinLength:()=>Cc,$ZodCheckMinSize:()=>Pc,$ZodCheckMultipleOf:()=>vc,$ZodCheckNumberFormat:()=>wc,$ZodCheckOverwrite:()=>jc,$ZodCheckProperty:()=>Qn,$ZodCheckRegex:()=>Mc,$ZodCheckSizeEquals:()=>$c,$ZodCheckStartsWith:()=>Ac,$ZodCheckStringFormat:()=>Po,$ZodCheckUpperCase:()=>Ec,$ZodCodec:()=>Lr,$ZodCreditCard:()=>up,$ZodCustom:()=>Xp,$ZodCustomStringFormat:()=>hp,$ZodCyclicError:()=>Si,$ZodDate:()=>Ip,$ZodDefault:()=>Np,$ZodDiscriminatedUnion:()=>Cp,$ZodE164:()=>lp,$ZodEmail:()=>Bc,$ZodEmoji:()=>Gc,$ZodEncodeError:()=>Dt,$ZodEnum:()=>Dp,$ZodError:()=>$r,$ZodExactOptional:()=>jp,$ZodFile:()=>_p,$ZodFunction:()=>Jp,$ZodGUID:()=>Vc,$ZodIPv4:()=>np,$ZodIPv6:()=>ip,$ZodISODate:()=>tp,$ZodISODateTime:()=>ep,$ZodISODuration:()=>rp,$ZodISOTime:()=>op,$ZodIntersection:()=>Op,$ZodJWT:()=>mp,$ZodKSUID:()=>Qc,$ZodLazy:()=>jr,$ZodLiteral:()=>Ap,$ZodMAC:()=>sp,$ZodMap:()=>Rp,$ZodNaN:()=>Wp,$ZodNanoID:()=>Kc,$ZodNever:()=>vp,$ZodNonOptional:()=>Up,$ZodNull:()=>bp,$ZodNullable:()=>Fp,$ZodNumber:()=>mi,$ZodNumberFormat:()=>fp,$ZodObject:()=>yf,$ZodObjectJIT:()=>Pp,$ZodOptional:()=>gi,$ZodPipe:()=>xi,$ZodPrefault:()=>Vp,$ZodPreprocess:()=>Zp,$ZodPromise:()=>Hp,$ZodReadonly:()=>Gp,$ZodRealError:()=>He,$ZodRecord:()=>Mp,$ZodRegistry:()=>ki,$ZodSet:()=>Ep,$ZodString:()=>Qt,$ZodStringFormat:()=>ge,$ZodSuccess:()=>Bp,$ZodSymbol:()=>xp,$ZodTemplateLiteral:()=>Kp,$ZodTransform:()=>Lp,$ZodTuple:()=>fi,$ZodType:()=>te,$ZodULID:()=>Xc,$ZodURL:()=>Zc,$ZodUUID:()=>Uc,$ZodUndefined:()=>yp,$ZodUnion:()=>_r,$ZodUnknown:()=>zp,$ZodVoid:()=>wp,$ZodXID:()=>Yc,$ZodXor:()=>$p,$brand:()=>Da,$constructor:()=>T,$input:()=>rd,$output:()=>od,Doc:()=>Yt,INVALID:()=>Qe,JSONSchema:()=>Wg,JSONSchemaGenerator:()=>is,NEVER:()=>Ea,TimePrecision:()=>md,URL_BAD_FORMAT:()=>qc,URL_UNPARSEABLE:()=>Wc,ZodCompileAsyncError:()=>pt,ZodCompileUnsupportedError:()=>de,_any:()=>Od,_array:()=>Ld,_base64:()=>Wi,_base64url:()=>Zi,_bigint:()=>wd,_boolean:()=>zd,_catch:()=>BI,_check:()=>jg,_cidrv4:()=>Bi,_cidrv6:()=>qi,_coercedBigint:()=>Id,_coercedBoolean:()=>vd,_coercedDate:()=>Ad,_coercedNumber:()=>fd,_coercedString:()=>dd,_creditCard:()=>ud,_cuid:()=>_i,_cuid2:()=>Li,_custom:()=>Fd,_date:()=>Dd,_decode:()=>Vn,_decodeAsync:()=>Bn,_default:()=>NI,_discriminatedUnion:()=>TI,_e164:()=>Gi,_email:()=>Ti,_emoji:()=>Di,_encode:()=>Nn,_encodeAsync:()=>Un,_endsWith:()=>Do,_enum:()=>DI,_file:()=>jd,_float32:()=>xd,_float64:()=>yd,_gt:()=>gt,_gte:()=>tt,_guid:()=>Ci,_includes:()=>Ro,_int:()=>gd,_int32:()=>bd,_int64:()=>kd,_intersection:()=>CI,_ipv4:()=>Vi,_ipv6:()=>Ui,_isoDate:()=>qr,_isoDateTime:()=>Br,_isoDuration:()=>Zr,_isoTime:()=>Wr,_jwt:()=>Ki,_ksuid:()=>Ni,_lazy:()=>GI,_length:()=>so,_literal:()=>_I,_lowercase:()=>Oo,_lt:()=>ft,_lte:()=>et,_mac:()=>ld,_map:()=>RI,_max:()=>et,_maxLength:()=>io,_maxSize:()=>Lt,_mime:()=>Ao,_min:()=>tt,_minLength:()=>kt,_minSize:()=>xt,_multipleOf:()=>_t,_nan:()=>_d,_nanoid:()=>Ai,_nativeEnum:()=>AI,_negative:()=>Hi,_never:()=>Rd,_nonnegative:()=>Yi,_nonoptional:()=>VI,_nonpositive:()=>Xi,_normalize:()=>_o,_null:()=>Cd,_nullable:()=>FI,_number:()=>hd,_optional:()=>jI,_overwrite:()=>dt,_parse:()=>vo,_parseAsync:()=>wo,_pipe:()=>qI,_positive:()=>Ji,_promise:()=>KI,_properties:()=>es,_property:()=>Qi,_readonly:()=>WI,_record:()=>MI,_refine:()=>Nd,_regex:()=>Co,_safeDecode:()=>Wn,_safeDecodeAsync:()=>Gn,_safeEncode:()=>qn,_safeEncodeAsync:()=>Zn,_safeParse:()=>Io,_safeParseAsync:()=>ko,_set:()=>EI,_size:()=>no,_slugify:()=>No,_startsWith:()=>Eo,_string:()=>pd,_stringFormat:()=>Vo,_stringbool:()=>qd,_success:()=>UI,_superRefine:()=>Vd,_symbol:()=>$d,_templateLiteral:()=>ZI,_toLowerCase:()=>jo,_toUpperCase:()=>Fo,_transform:()=>LI,_trim:()=>Lo,_tuple:()=>OI,_uint32:()=>Sd,_uint64:()=>Pd,_ulid:()=>ji,_undefined:()=>Td,_union:()=>PI,_unknown:()=>Md,_uppercase:()=>Mo,_url:()=>Ur,_uuid:()=>Oi,_uuidv4:()=>Mi,_uuidv6:()=>Ri,_uuidv7:()=>Ei,_void:()=>Ed,_xid:()=>Fi,_xor:()=>$I,clone:()=>he,compile:()=>ad,compileFn:()=>$i,config:()=>Te,createStandardJSONSchemaMethod:()=>Uo,createToJSONSchemaMethod:()=>Zd,decode:()=>Ev,decodeAsync:()=>Av,describe:()=>Ud,encode:()=>Rv,encodeAsync:()=>Dv,extractDefs:()=>Ft,finalize:()=>Nt,flattenError:()=>Tr,formatError:()=>Cr,getDiscriminatedOption:()=>Tp,globalConfig:()=>Ae,globalRegistry:()=>_e,handleUnrepresentable:()=>Ee,initializeContext:()=>jt,isBackEdge:()=>zi,isRecursiveSchema:()=>td,isValidBase64:()=>Dr,isValidBase64URL:()=>di,isValidCIDRv6:()=>pi,isValidCreditCard:()=>li,isValidIPv6:()=>Er,isValidJWT:()=>ui,locales:()=>Vr,memoizer:()=>Fr,mergeValues:()=>$o,meta:()=>Bd,parse:()=>jn,parseAsync:()=>Fn,parseURLObject:()=>ii,prettifyError:()=>Fa,process:()=>fe,regexes:()=>Ne,registry:()=>Pi,safeDecode:()=>Lv,safeDecodeAsync:()=>Fv,safeEncode:()=>_v,safeEncodeAsync:()=>jv,safeParse:()=>Na,safeParseAsync:()=>Va,standardProps:()=>ni,stripTabAndNewline:()=>si,toDotPath:()=>Kh,toJSONSchema:()=>ns,toZod:()=>br,treeifyError:()=>ja,urlHostnameOk:()=>ai,urlProtocolOk:()=>ci,util:()=>_,validate:()=>Ua,validateAsync:()=>Ba,version:()=>Fc});var _={};It(_,{BIGINT_FORMAT_RANGES:()=>$a,CONSTANT_CATCH:()=>_n,Class:()=>Sa,NUMBER_FORMAT_RANGES:()=>Pa,aborted:()=>Et,allowsEval:()=>wa,assert:()=>Xz,assertEqual:()=>Gz,assertIs:()=>Jz,assertNever:()=>Hz,assertNotEqual:()=>Kz,assignProp:()=>$e,attachSchema:()=>An,base64ToUint8Array:()=>Uh,base64urlToUint8Array:()=>fv,cached:()=>So,captureStackTrace:()=>Dn,cleanEnum:()=>hv,cleanRegex:()=>zr,clone:()=>he,cloneDef:()=>Qz,codePointLength:()=>Ht,constantCatch:()=>Ma,createTransparentProxy:()=>iv,defineLazy:()=>za,defineLazyInternal:()=>ie,esc:()=>Ze,escapeRegex:()=>it,explicitlyAborted:()=>Ta,extend:()=>cv,finalizeIssue:()=>Ke,floatSafeRemainder:()=>vr,getElementAtPath:()=>ev,getEnumValues:()=>Sr,getLengthableOrigin:()=>Pr,getParsedType:()=>nv,getSizableOrigin:()=>kr,hexToUint8Array:()=>xv,hide:()=>Oa,installLazyProp:()=>vv,isObject:()=>Jt,isPlainObject:()=>nt,issue:()=>zo,joinValues:()=>C,jsonStringifyReplacer:()=>bo,members:()=>Ca,merge:()=>dv,mergeDefs:()=>ct,normalizeParams:()=>N,nullish:()=>En,numKeys:()=>rv,objectClone:()=>Yz,omit:()=>av,optionalKeys:()=>ka,own:()=>yo,parsedType:()=>A,partial:()=>lv,pick:()=>sv,prefixIssues:()=>Ge,primitiveTypes:()=>Ia,promiseAllObject:()=>tv,propertyKeyTypes:()=>Ir,randomString:()=>ov,required:()=>uv,safeExtend:()=>pv,shallowClone:()=>wr,slugify:()=>va,stringifyPrimitive:()=>D,toZod:()=>br,uint8ArrayToBase64:()=>Bh,uint8ArrayToBase64url:()=>gv,uint8ArrayToHex:()=>yv,unwrapMessage:()=>xo});function Gz(r){return r}function Kz(r){return r}function br(){return r=>r}function Jz(r){}function Hz(r){throw new Error("Unexpected value in exhaustive check")}function Xz(r){}function Sr(r){let e=Object.values(r).filter(n=>typeof n=="number");return Object.entries(r).filter(([n,o])=>e.indexOf(+n)===-1).map(([n,o])=>o)}function C(r,e="|"){return r.map(t=>D(t)).join(e)}function bo(r,e){return typeof e=="bigint"?e.toString():e}function So(r){return{get value(){{let t=r();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function En(r){return r==null}function zr(r){let e=r.startsWith("^")?1:0,t=r.endsWith("$")?r.length-1:r.length;return r.slice(e,t)}function vr(r,e){let t=r/e,n=Math.round(t),o=4*Number.EPSILON*Math.max(Math.abs(t),1);return Math.abs(t-n)<o?0:t-n}var Vh=Symbol("evaluating");function za(r,e,t){let n;Object.defineProperty(r,e,{get(){if(n!==Vh)return n===void 0&&(n=Vh,n=t()),n},set(o){Object.defineProperty(r,e,{value:o})},configurable:!0})}function Yz(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function $e(r,e,t){Object.defineProperty(r,e,{value:t,writable:!0,enumerable:!0,configurable:!0})}function ct(...r){let e={};for(let t of r){let n=Object.getOwnPropertyDescriptors(t);Object.assign(e,n)}return Object.defineProperties({},e)}function Qz(r){return ct(r._zod.def)}function ev(r,e){return e?e.reduce((t,n)=>t?.[n],r):r}function tv(r){let e=Object.keys(r),t=e.map(n=>r[n]);return Promise.all(t).then(n=>{let o={};for(let i=0;i<e.length;i++)o[e[i]]=n[i];return o})}function ov(r=10){let e="abcdefghijklmnopqrstuvwxyz",t="";for(let n=0;n<r;n++)t+=e[Math.floor(Math.random()*e.length)];return t}function Ze(r){return JSON.stringify(r)}function va(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dn="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function Jt(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var wa=So(()=>{if(Ae.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let r=Function;return new r(""),!0}catch{return!1}});function nt(r){if(Jt(r)===!1)return!1;let e=r.constructor;if(e===void 0||typeof e!="function")return!0;let t=e.prototype;return!(Jt(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function wr(r){return nt(r)?{...r}:Array.isArray(r)?[...r]:r instanceof Map?new Map(r):r instanceof Set?new Set(r):r}function rv(r){let e=0;for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&e++;return e}var nv=r=>{let e=typeof r;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(r)?"array":r===null?"null":r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?"promise":typeof Map<"u"&&r instanceof Map?"map":typeof Set<"u"&&r instanceof Set?"set":typeof Date<"u"&&r instanceof Date?"date":typeof File<"u"&&r instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Ir=new Set(["string","number","symbol"]),Ia=new Set(["string","number","bigint","boolean","symbol","undefined"]);function it(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function he(r,e,t){let n=new r._zod.constr(e??r._zod.def);return(!e||t?.parent)&&(n._zod.parent=r),n}function N(r){let e=r;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function iv(r){let e;return new Proxy({},{get(t,n,o){return e??(e=r()),Reflect.get(e,n,o)},set(t,n,o,i){return e??(e=r()),Reflect.set(e,n,o,i)},has(t,n){return e??(e=r()),Reflect.has(e,n)},deleteProperty(t,n){return e??(e=r()),Reflect.deleteProperty(e,n)},ownKeys(t){return e??(e=r()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(t,n){return e??(e=r()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(t,n,o){return e??(e=r()),Reflect.defineProperty(e,n,o)}})}function D(r){return typeof r=="bigint"?r.toString()+"n":typeof r=="string"?`"${r}"`:`${r}`}function ka(r){return Object.keys(r).filter(e=>r[e]._zod.optin!==void 0&&r[e]._zod.optout==="optional")}var Pa={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]},$a={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function sv(r,e){let t=r._zod.def,n=t.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=ct(r._zod.def,{get shape(){let s={};for(let c of Reflect.ownKeys(e)){if(!Object.prototype.hasOwnProperty.call(t.shape,c))throw new Error(`Unrecognized key: "${String(c)}"`);e[c]&&$e(s,c,t.shape[c])}return $e(this,"shape",s),s},checks:[]});return he(r,i)}function av(r,e){let t=r._zod.def,n=t.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=ct(r._zod.def,{get shape(){let s={...r._zod.def.shape};for(let c of Reflect.ownKeys(e)){if(!Object.prototype.hasOwnProperty.call(t.shape,c))throw new Error(`Unrecognized key: "${String(c)}"`);e[c]&&delete s[c]}return $e(this,"shape",s),s},checks:[]});return he(r,i)}function cv(r,e){if(!nt(e))throw new Error("Invalid input to extend: expected a plain object");let t=r._zod.def.checks;if(t&&t.length>0){let i=r._zod.def.shape;for(let s of Reflect.ownKeys(e))if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=ct(r._zod.def,{get shape(){let i={...r._zod.def.shape,...e};return $e(this,"shape",i),i}});return he(r,o)}function pv(r,e){if(!nt(e))throw new Error("Invalid input to safeExtend: expected a plain object");let t=ct(r._zod.def,{get shape(){let n={...r._zod.def.shape,...e};return $e(this,"shape",n),n}});return he(r,t)}function dv(r,e){if(!e?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(r._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let t=ct(r._zod.def,{get shape(){let n={...r._zod.def.shape,...e._zod.def.shape};return $e(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return he(r,t)}function lv(r,e,t,n="partial"){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);let c=ct(e._zod.def,{get shape(){let u=e._zod.def.shape,m={...u};if(t)for(let h of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(u,h))throw new Error(`Unrecognized key: "${String(h)}"`);t[h]&&(m[h]=r?new r({type:"optional",innerType:u[h]}):u[h])}else for(let h of Reflect.ownKeys(u))m[h]=r?new r({type:"optional",innerType:u[h]}):u[h];return $e(this,"shape",m),m},checks:[]});return he(e,c)}function uv(r,e,t){let n=ct(e._zod.def,{get shape(){let o=e._zod.def.shape,i={...o};if(t)for(let s of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(i,s))throw new Error(`Unrecognized key: "${String(s)}"`);t[s]&&(i[s]=new r({type:"nonoptional",innerType:o[s]}))}else for(let s of Reflect.ownKeys(o))i[s]=new r({type:"nonoptional",innerType:o[s]});return $e(this,"shape",i),i}});return he(e,n)}function Et(r,e=0){if(r.aborted===!0)return!0;for(let t=e;t<r.issues.length;t++)if(r.issues[t]?.continue!==!0)return!0;return!1}function Ta(r,e=0){if(r.aborted===!0)return!0;for(let t=e;t<r.issues.length;t++)if(r.issues[t]?.continue===!1)return!0;return!1}function Ge(r,e){return e.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(r),t})}function xo(r){return typeof r=="string"?r:r?.message}function An(r,e,t){var n;for(let o=e;o<r.length;o++)(n=r[o]).schema??(n.schema=t)}function Ke(r,e,t){var n;let o=r.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=r).schema??(n.schema=r.inst):r.schema=r.inst);let i=r.schema!==r.inst?r.schema?._zod.def?.error:void 0,s=r.message?r.message:xo(r.inst?._zod.def?.error?.(r))??xo(i?.(r))??xo(e?.error?.(r))??xo(t.customError?.(r))??xo(t.localeError?.(r))??"Invalid input",{inst:c,schema:u,continue:m,input:h,...g}=r;return g.path??(g.path=[]),g.message=s,e?.reportInput&&(g.input=h),g}function kr(r){return r instanceof Set?"set":r instanceof Map?"map":r instanceof File?"file":"unknown"}var mv=/[\uD800-\uDBFF]/;function Ht(r){let e=r.length;if(!mv.test(r))return e;let t=e;for(let n=0;n<e-1;n++)(r.charCodeAt(n)&64512)===55296&&(r.charCodeAt(n+1)&64512)===56320&&(t--,n++);return t}function Pr(r){return Array.isArray(r)?"array":typeof r=="string"?"string":"unknown"}function A(r){let e=typeof r;switch(e){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let t=r;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return e}function zo(...r){let[e,t,n]=r;return typeof e=="string"?{message:e,code:"custom",input:t,inst:n}:{...e}}function hv(r){return Object.entries(r).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Uh(r){let e=atob(r),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function Bh(r){let e="";for(let t=0;t<r.length;t++)e+=String.fromCharCode(r[t]);return btoa(e)}function fv(r){let e=r.replace(/-/g,"+").replace(/_/g,"/"),t="=".repeat((4-e.length%4)%4);return Uh(e+t)}function gv(r){return Bh(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function xv(r){let e=r.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=Number.parseInt(e.slice(n,n+2),16);return t}function yv(r){return Array.from(r).map(e=>e.toString(16).padStart(2,"0")).join("")}var Sa=class{constructor(...e){}};function Ca(r,e){for(let t in e){let n=Object.getOwnPropertyDescriptor(e,t);n.get?Object.defineProperty(r,t,{...n,enumerable:!1}):bv(r,t,n.value)}}function yo(r,e,t,n=!0){return Object.defineProperty(r,e,{configurable:!0,writable:!0,enumerable:n,value:t}),t}function Oa(r,e,t){return yo(r,e,t,!1)}function bv(r,e,t){Object.defineProperty(r,e,{configurable:!0,get(){return this==null?t:yo(this,e,t.bind(this))},set(n){yo(this,e,n)}})}function Sv(r,e){let t=Object.getPrototypeOf(r);return e in t?void 0:t}var ba,Rt=!1,zv={configurable:!0,get(){Rt=!0}};function ie(r,e,t){let n=Object.getPrototypeOf(r._zod);if(e in n&&ba!==r._zod){ba=void 0;return}ba=r._zod,Object.defineProperty(n,e,{configurable:!0,get(){Object.defineProperty(this,e,zv);let o=Rt;Rt=!1;try{let i=t(this);return Rt?delete this[e]:Object.defineProperty(this,e,{configurable:!0,writable:!0,value:i}),Rt=Rt||o,i}catch(i){throw delete this[e],Rt=Rt||o,i}},set(o){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:o})}})}function vv(r,e,t,n){let o=Sv(r,e);o&&Object.defineProperty(o,e,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,e,i),i.value=t(this),Object.defineProperty(this,e,i),i.value},set(i){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var _n="~constantCatch";function Ma(r){let e=()=>r;return e[_n]=!0,e}var qh,Ea=Object.freeze({status:"aborted"}),Ra={value:void 0,enumerable:!1},Wh="captureStackTrace"in Error?Error:null;function wv(r){let e=Wh;if(e){let t=e.stackTraceLimit;if(typeof t=="number"){try{e.stackTraceLimit=0}catch{return Wh=null,new r}try{return new r}finally{e.stackTraceLimit=t}}}return new r}function T(r,e,t,n){let o={};function i(y){this.def=y,this.constr=g,this.traits=new Set}i.prototype=o;let s=t,c=s&&new WeakSet;function u(y,S){if(!y._zod){Ra.value=new i(S);try{Object.defineProperty(y,"_zod",Ra)}finally{Ra.value=void 0}}if(y._zod.traits.has(r))return;if(y._zod.traits.add(r),e(y,S),c){let $=Object.getPrototypeOf(y),E=y._zod.constr.prototype,V=$;for(;V&&V!==E;)V=Object.getPrototypeOf(V);let F=V??$;c.has(F)||(c.add(F),Ca(F,s))}let w=g.prototype;for(let $ in w)Object.prototype.hasOwnProperty.call(w,$)&&($ in y||(y[$]=w[$].bind(y)))}let m=n?.Parent??Object;class h extends m{}Object.defineProperty(h,"name",{value:r});function g(y){let S=n?.Parent?wv(h):this;u(S,y);let w=S._zod.deferred;if(w){for(let E of w)E();S._zod.deferred=void 0}let $=globalThis.__zod_globalConfig?.postProcessor;return $&&$(S),S}return Object.defineProperty(g,"init",{value:u}),Object.defineProperty(g,Symbol.hasInstance,{value:y=>n?.Parent&&y instanceof n.Parent?!0:y?._zod?.traits?.has(r)}),Object.defineProperty(g,"name",{value:r}),g}var Da=Symbol("zod_brand"),Je=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Dt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(qh=globalThis).__zod_globalConfig??(qh.__zod_globalConfig={});var Ae=globalThis.__zod_globalConfig;function Te(r){return r&&Object.assign(Ae,r),Ae}function Iv(){let r=this._zod;return r.message??(r.message=JSON.stringify(r.def,bo,2)),r.message}function kv(r){this._zod.message=r}var Pv={get:Iv,set:kv,enumerable:!0,configurable:!0},_a={value:void 0,enumerable:!1},La={value:void 0,enumerable:!1},Zh=new WeakSet([Object.prototype,Error.prototype]),Gh=(r,e)=>{r.name="$ZodError",_a.value=r._zod,Object.defineProperty(r,"_zod",_a),La.value=e,Object.defineProperty(r,"issues",La),_a.value=void 0,La.value=void 0,Object.defineProperty(r,"message",Pv);let t=Object.getPrototypeOf(r);Zh.has(t)||(Zh.add(t),Object.defineProperty(t,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},$r=T("$ZodError",Gh),He=T("$ZodError",Gh,void 0,{Parent:Error});function $v(r,e,t){return Object.prototype.hasOwnProperty.call(r,e)||(e==="__proto__"?Object.defineProperty(r,e,{value:t(),writable:!0,enumerable:!0,configurable:!0}):r[e]=t()),r[e]}function Tr(r,e=t=>t.message){let t={},n=[];for(let o of r.issues)o.path.length>0?$v(t,o.path[0],()=>[]).push(e(o)):n.push(e(o));return{formErrors:n,fieldErrors:t}}function Cr(r,e=t=>t.message){let t={_errors:[]},n=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>n({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{let c=[...i,...s.path];if(c.length===0)t._errors.push(e(s));else{let u=t,m=0;for(;m<c.length;){let h=c[m],g=m===c.length-1;if(h==="_errors"){g&&u._errors.push(e(s)),m++;continue}Object.prototype.hasOwnProperty.call(u,h)||Object.defineProperty(u,h,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let y=u[h];g&&y._errors.push(e(s)),u=y,m++}}}};return n(r),t}function ja(r,e=t=>t.message){let t={errors:[]},n=(o,i=[])=>{var s;for(let c of o.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>n({issues:u},[...i,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...i,...c.path]);else{let u=[...i,...c.path];if(u.length===0){t.errors.push(e(c));continue}let m=t,h=0;for(;h<u.length;){let g=u[h],y=h===u.length-1;typeof g=="string"?(m.properties??(m.properties={}),Object.prototype.hasOwnProperty.call(m.properties,g)||Object.defineProperty(m.properties,g,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),m=m.properties[g]):(m.items??(m.items=[]),(s=m.items)[g]??(s[g]={errors:[]}),m=m.items[g]),y&&m.errors.push(e(c)),h++}}};return n(r),t}function Kh(r){let e=[],t=r.map(n=>typeof n=="object"?n.key:n);for(let n of t)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function Fa(r){let e=[],t=[...r.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of t)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${Kh(n.path)}`);return e.join(`
|
|
25
|
+
`)}function Ln(r,e){return{callee:e?.callee??r,Err:e?.Err}}var vo=r=>{let e=(t,n,o,i)=>{let s=o?{...o,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},s);if(c instanceof Promise)throw new Je;if(c.issues.length){let u=new(i?.Err??r)(c.issues.map(m=>Ke(m,s,Te())));throw Dn(u,i?.callee??e),u}return c.value};return e},jn=vo(He),wo=r=>{let e=async(t,n,o,i)=>{let s=o?{...o,async:!0}:{async:!0},c=t._zod.run({value:n,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let u=new(i?.Err??r)(c.issues.map(m=>Ke(m,s,Te())));throw Dn(u,i?.callee??e),u}return c.value};return e},Fn=wo(He),Io=r=>(e,t,n)=>{let o=n?{...n,async:!1}:{async:!1},i=e._zod.run({value:t,issues:[]},o);if(i instanceof Promise)throw new Je;return i.issues.length?{success:!1,error:new(r??$r)(i.issues.map(s=>Ke(s,o,Te())))}:{success:!0,data:i.value}},Na=Io(He),ko=r=>async(e,t,n)=>{let o=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new r(i.issues.map(s=>Ke(s,o,Te())))}:{success:!0,data:i.value}},Va=ko(He),Cv=Symbol.for("zod.compile.invalid"),Ov=Symbol.for("zod.compile.fallback"),Ua=((r,e,t)=>{let n=r._zod.bag.validator;return n!==void 0&&n(e)!==Cv?!0:Mv(r,e,t)});function Mv(r,e,t){let n=t?{...t,async:!1}:{async:!1},o=r._zod.bag.fallbackRun,i;if(o?(n[Ov]=!0,i=o({value:e,issues:[]},n)):i=r._zod.run({value:e,issues:[]},n),i instanceof Promise)throw new Je;return i.issues.length===0}var Ba=async(r,e,t)=>{let n=t?{...t,async:!0}:{async:!0},o=r._zod.run({value:e,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},Nn=r=>{let e=vo(r),t=(n,o,i,s)=>{let c=i?{...i,direction:"backward"}:{direction:"backward"};return e(n,o,c,Ln(t,s))};return t},Rv=Nn(He),Vn=r=>{let e=vo(r),t=(n,o,i,s)=>e(n,o,i,Ln(t,s));return t},Ev=Vn(He),Un=r=>{let e=wo(r),t=async(n,o,i,s)=>{let c=i?{...i,direction:"backward"}:{direction:"backward"};return await e(n,o,c,Ln(t,s))};return t},Dv=Un(He),Bn=r=>{let e=wo(r),t=async(n,o,i,s)=>await e(n,o,i,Ln(t,s));return t},Av=Bn(He),qn=r=>(e,t,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Io(r)(e,t,o)},_v=qn(He),Wn=r=>(e,t,n)=>Io(r)(e,t,n),Lv=Wn(He),Zn=r=>async(e,t,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return ko(r)(e,t,o)},jv=Zn(He),Gn=r=>async(e,t,n)=>ko(r)(e,t,n),Fv=Gn(He);var Ne={};It(Ne,{base64:()=>ac,base64url:()=>Kn,bigint:()=>hc,boolean:()=>fc,browserEmail:()=>Gv,cidrv4:()=>ic,cidrv6:()=>sc,creditCard:()=>Jn,cuid:()=>Wa,cuid2:()=>Za,date:()=>dc,datetime:()=>uc,domain:()=>Hv,duration:()=>Ya,e164:()=>pc,email:()=>ec,emoji:()=>tc,extendedDuration:()=>Nv,guid:()=>Qa,hex:()=>Yv,hostname:()=>Jv,html5Email:()=>qv,httpProtocol:()=>cc,idnEmail:()=>Zv,integer:()=>Or,ipv4:()=>oc,ipv6:()=>rc,ksuid:()=>Ja,lowercase:()=>yc,mac:()=>nc,md5_base64:()=>e0,md5_base64url:()=>t0,md5_hex:()=>Qv,nanoid:()=>Ha,nanoidOfLength:()=>Xa,null:()=>gc,number:()=>At,rfc5322Email:()=>Wv,sha1_base64:()=>r0,sha1_base64url:()=>n0,sha1_hex:()=>o0,sha256_base64:()=>s0,sha256_base64url:()=>a0,sha256_hex:()=>i0,sha384_base64:()=>p0,sha384_base64url:()=>d0,sha384_hex:()=>c0,sha512_base64:()=>u0,sha512_base64url:()=>m0,sha512_hex:()=>l0,string:()=>mc,time:()=>lc,ulid:()=>Ga,undefined:()=>xc,unicodeEmail:()=>Jh,uppercase:()=>bc,uuid:()=>Xt,uuid4:()=>Vv,uuid6:()=>Uv,uuid7:()=>Bv,xid:()=>Ka});var Wa=/^[cC][0-9a-z]{6,}$/,Za=/^[0-9a-z]+$/,Ga=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ka=/^[0-9a-vA-V]{20}$/,Ja=/^[A-Za-z0-9]{27}$/,Ha=/^[a-zA-Z0-9_-]{21}$/;function Xa(r){return new RegExp(`^[a-zA-Z0-9_-]{${r}}$`)}var Ya=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Nv=/^[-+]?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)?)??$/,Qa=/^([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})$/,Xt=r=>r?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${r}[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)$/,Vv=Xt(4),Uv=Xt(6),Bv=Xt(7),ec=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qv=/^[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])?)*$/,Wv=/^(([^<>()\[\]\\.,;:\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,}))$/,Jh=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Zv=Jh,Gv=/^[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])?)*$/,Kv="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function tc(){return new RegExp(Kv,"u")}var oc=/^(?:(?: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])$/,rc=/^(([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}|:))$/,nc=r=>{let e=it(r??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},ic=/^((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])$/,sc=/^(([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])$/,ac=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kn=/^[A-Za-z0-9_-]*$/,Jv=/^(?=.{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])?)*\.?$/,Hv=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,cc=/^https?$/,pc=/^\+[1-9]\d{6,14}$/,Jn=/^\d(?:[ -]?\d){11,18}$/,Hh="(?:(?:\\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 Xv(r){return new RegExp(`^${r}$`)}var dc=Xv(Hh);function qa(r){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof r.precision=="number"?r.precision===-1?`${e}`:r.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${r.precision}}`:r.seconds?`${e}:[0-5]\\d(?:\\.\\d+)?`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function lc(r){return new RegExp(`^${qa(r)}$`)}function uc(r){let e=["Z"];r.offset&&e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let t=`${qa({precision:r.precision,seconds:!0})}(?:${e.join("|")})`,n=r.local?`${t}|${qa({precision:r.precision})}`:t;return new RegExp(`^${Hh}T(?:${n})$`)}var mc=r=>{let e=r?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},hc=/^-?\d+n?$/,Or=/^-?\d+$/,At=/^-?\d+(?:\.\d+)?$/,fc=/^(?:true|false)$/i,gc=/^null$/i;var xc=/^undefined$/i;var yc=/^[^A-Z]*$/,bc=/^[^a-z]*$/,Yv=/^[0-9a-fA-F]*$/;function Mr(r,e){return new RegExp(`^[A-Za-z0-9+/]{${r}}${e}$`)}function Rr(r){return new RegExp(`^[A-Za-z0-9_-]{${r}}$`)}var Qv=/^[0-9a-fA-F]{32}$/,e0=Mr(22,"=="),t0=Rr(22),o0=/^[0-9a-fA-F]{40}$/,r0=Mr(27,"="),n0=Rr(27),i0=/^[0-9a-fA-F]{64}$/,s0=Mr(43,"="),a0=Rr(43),c0=/^[0-9a-fA-F]{96}$/,p0=Mr(64,""),d0=Rr(64),l0=/^[0-9a-fA-F]{128}$/,u0=Mr(86,"=="),m0=Rr(86);var be=T("$ZodCheck",(r,e)=>{var t;r._zod??(r._zod={}),r._zod.def=e,(t=r._zod).onattach??(t.onattach=[])}),Sc=r=>{let e=r.value;return!En(e)&&e.size!==void 0},zc=r=>{let e=r.value;return!En(e)&&e.length!==void 0},Hn={number:"number",bigint:"bigint",object:"date"},Xn=T("$ZodCheckLessThan",(r,e)=>{be.init(r,e);let t=Hn[typeof e.value];r._zod.onattach.push(n=>{let o=n._zod.bag,i=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?o.maximum=e.value:o.exclusiveMaximum=e.value)}),r._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:Hn[typeof n.value]??t,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:r,continue:!e.abort})}}),Yn=T("$ZodCheckGreaterThan",(r,e)=>{be.init(r,e);let t=Hn[typeof e.value];r._zod.onattach.push(n=>{let o=n._zod.bag,i=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),r._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:Hn[typeof n.value]??t,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:r,continue:!e.abort})}}),vc=T("$ZodCheckMultipleOf",(r,e)=>{be.init(r,e),r._zod.onattach.push(t=>{var n;(n=t._zod.bag).multipleOf??(n.multipleOf=e.value)}),r._zod.check=t=>{if(typeof t.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof t.value=="bigint"?e.value!==BigInt(0)&&t.value%e.value===BigInt(0):vr(t.value,e.value)===0)||t.issues.push({origin:typeof t.value,code:"not_multiple_of",divisor:e.value,input:t.value,inst:r,continue:!e.abort})}}),wc=T("$ZodCheckNumberFormat",(r,e)=>{be.init(r,e),e.format=e.format||"float64";let t=e.format?.includes("int"),n=t?"int":"number",[o,i]=Pa[e.format];r._zod.onattach.push(s=>{let c=s._zod.bag;c.format=e.format,c.minimum=o,c.maximum=i,t&&(c.pattern=Or)}),r._zod.check=s=>{let c=s.value;if(t){if(!Number.isInteger(c)){s.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:c,inst:r});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:n,inclusive:!0,continue:!e.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:n,inclusive:!0,continue:!e.abort});return}}c<o&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:r,continue:!e.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:r,continue:!e.abort})}}),Ic=T("$ZodCheckBigIntFormat",(r,e)=>{be.init(r,e);let[t,n]=$a[e.format];r._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,i.minimum=t,i.maximum=n}),r._zod.check=o=>{let i=o.value;i<t&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:t,inclusive:!0,inst:r,continue:!e.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:r,continue:!e.abort})}}),kc=T("$ZodCheckMaxSize",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=Sc),r._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(n._zod.bag.maximum=e.maximum)}),r._zod.check=n=>{let o=n.value;o.size<=e.maximum||n.issues.push({origin:kr(o),code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:r,continue:!e.abort})}}),Pc=T("$ZodCheckMinSize",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=Sc),r._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),r._zod.check=n=>{let o=n.value;o.size>=e.minimum||n.issues.push({origin:kr(o),code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:r,continue:!e.abort})}}),$c=T("$ZodCheckSizeEquals",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=Sc),r._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.size,o.maximum=e.size,o.size=e.size}),r._zod.check=n=>{let o=n.value,i=o.size;if(i===e.size)return;let s=i>e.size;n.issues.push({origin:kr(o),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:r,continue:!e.abort})}}),Tc=T("$ZodCheckMaxLength",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=zc),r._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(n._zod.bag.maximum=e.maximum)}),r._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>e.maximum?Ht(o):i)<=e.maximum)return;let c=Pr(o);n.issues.push({origin:c,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:r,continue:!e.abort})}}),Cc=T("$ZodCheckMinLength",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=zc),r._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),r._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>=e.minimum&&i<e.minimum*2?Ht(o):i)>=e.minimum)return;let c=Pr(o);n.issues.push({origin:c,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:r,continue:!e.abort})}}),Oc=T("$ZodCheckLengthEquals",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=zc),r._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),r._zod.check=n=>{let o=n.value,i=o.length,s=typeof o=="string"&&i>=e.length&&i<=e.length*2?Ht(o):i;if(s===e.length)return;let c=Pr(o),u=s>e.length;n.issues.push({origin:c,...u?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:r,continue:!e.abort})}}),Po=T("$ZodCheckStringFormat",(r,e)=>{var t,n;be.init(r,e),r._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(t=r._zod).check??(t.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:r,continue:!e.abort})}):(n=r._zod).check??(n.check=()=>{})}),Mc=T("$ZodCheckRegex",(r,e)=>{Po.init(r,e),r._zod.check=t=>{e.pattern.lastIndex=0,!e.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:e.pattern.toString(),inst:r,continue:!e.abort})}}),Rc=T("$ZodCheckLowerCase",(r,e)=>{e.pattern??(e.pattern=yc),Po.init(r,e)}),Ec=T("$ZodCheckUpperCase",(r,e)=>{e.pattern??(e.pattern=bc),Po.init(r,e)}),Dc=T("$ZodCheckIncludes",(r,e)=>{be.init(r,e);let t=it(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position},}${t}`:t);e.pattern=n,r._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),r._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:r,continue:!e.abort})}}),Ac=T("$ZodCheckStartsWith",(r,e)=>{be.init(r,e);let t=new RegExp(`^${it(e.prefix)}.*`);e.pattern??(e.pattern=t),r._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),r._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:r,continue:!e.abort})}}),_c=T("$ZodCheckEndsWith",(r,e)=>{be.init(r,e);let t=new RegExp(`.*${it(e.suffix)}$`);e.pattern??(e.pattern=t),r._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),r._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:r,continue:!e.abort})}});function Xh(r,e,t){r.issues.length&&e.issues.push(...Ge(t,r.issues))}var Qn=T("$ZodCheckProperty",(r,e)=>{be.init(r,e),r._zod.check=t=>{let n=e.schema._zod.run({value:t.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>Xh(o,t,e.property));Xh(n,t,e.property)}}),Lc=T("$ZodCheckMimeType",(r,e)=>{be.init(r,e);let t=new Set(e.mime);r._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),r._zod.check=n=>{t.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:r,continue:!e.abort})}}),jc=T("$ZodCheckOverwrite",(r,e)=>{be.init(r,e),r._zod.check=t=>{t.value=e.tx(t.value)}});var Yt=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
|
|
26
|
+
`).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
27
|
+
${t.join(`
|
|
28
|
+
`)}
|
|
29
|
+
};`)(...Object.values(this.closed))}};var Fc={major:4,minor:5,patch:4};var te=T("$ZodType",(r,e)=>{var t;r??(r={}),r._zod.def=e,r._zod.bag=r._zod.bag||{},r._zod.version=Fc;let n=r._zod.def.checks,o=r._zod.traits.has("$ZodCheck")?[r,...n??[]]:n?.length?[...n]:[];for(let i of o)for(let s of i._zod.onattach)s(r);if(o.length===0)(t=r._zod).deferred??(t.deferred=[]),r._zod.deferred?.push(()=>{r._zod.run=r._zod.parse});else{let i=(c,u,m)=>{if(c.memo)return c;let h=Et(c),g;for(let y of u){if(y._zod.def.when){if(Ta(c)||!y._zod.def.when(c))continue}else if(h)continue;let S=c.issues.length,w=y._zod.check(c);if(w instanceof Promise&&m?.async===!1)throw new Je;if(g||w instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await w,c.issues.length!==S&&(An(c.issues,S,r),h||(h=Et(c,S)))});else{if(c.issues.length===S)continue;An(c.issues,S,r),h||(h=Et(c,S))}}return g?g.then(()=>c):c},s=(c,u,m)=>{if(Et(c))return c.aborted=!0,c;let h=i(u,o,m);if(h instanceof Promise){if(m.async===!1)throw new Je;return h.then(g=>r._zod.parse(g,m))}return r._zod.parse(h,m)};r._zod.run=(c,u)=>{if(u.skipChecks)return r._zod.parse(c,u);if(u.direction==="backward"){let h=r._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return h instanceof Promise?h.then(g=>s(g,c,u)):s(h,c,u)}let m=r._zod.parse(c,u);if(m instanceof Promise){if(u.async===!1)throw new Je;return m.then(h=>i(h,o,u))}return i(m,o,u)}}},{get"~standard"(){return Oa(this,"~standard",ni(this))},set"~standard"(r){yo(this,"~standard",r)}}),Qh=r=>r.success?{value:r.data}:{issues:r.error?.issues};function ni(r){return{validate:e=>{try{return Qh(Na(r,e))}catch{return Va(r,e).then(Qh)}},vendor:"zod",version:1}}var Qt=T("$ZodString",(r,e)=>{te.init(r,e),r._zod.pattern=[...r?._zod.bag?.patterns??[]].pop()??mc(r._zod.bag),r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=String(t.value)}catch{}return typeof t.value=="string"||t.issues.push({expected:"string",code:"invalid_type",input:t.value,inst:r}),t}}),ge=T("$ZodStringFormat",(r,e)=>{Po.init(r,e),Qt.init(r,e)}),Vc=T("$ZodGUID",(r,e)=>{e.pattern??(e.pattern=Qa),ge.init(r,e)}),Uc=T("$ZodUUID",(r,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Xt(n))}else e.pattern??(e.pattern=Xt());ge.init(r,e)}),Bc=T("$ZodEmail",(r,e)=>{e.pattern??(e.pattern=ec),ge.init(r,e)}),qc=1,Wc=2;function ii(r,e){if(!e.normalize&&e.protocol?.source===cc.source&&!/^https?:\/\//i.test(r))return qc;try{return new URL(r)}catch{return Wc}}var h0=/[\t\n\r]/g;function si(r){return r.replace(h0,"")}function ai(r,e){return e.lastIndex=0,e.test(r.hostname)}function ci(r,e){return e.lastIndex=0,e.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)}var Zc=T("$ZodURL",(r,e)=>{ge.init(r,e),r._zod.check=t=>{try{let n=t.value.trim(),o=ii(n,e);if(o===qc){t.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:t.value,inst:r,continue:!e.abort});return}if(o===Wc){t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:r,continue:!e.abort});return}e.hostname&&!ai(o,e.hostname)&&t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:t.value,inst:r,continue:!e.abort}),e.protocol&&!ci(o,e.protocol)&&t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:t.value,inst:r,continue:!e.abort}),t.value=e.normalize?o.href:si(n);return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:r,continue:!e.abort})}}}),Gc=T("$ZodEmoji",(r,e)=>{e.pattern??(e.pattern=tc()),ge.init(r,e)}),Kc=T("$ZodNanoID",(r,e)=>{if(e.length!==void 0&&(!Number.isInteger(e.length)||e.length<1))throw new Error(`Invalid nanoid length: ${e.length}`);e.pattern??(e.pattern=e.length===void 0?Ha:Xa(e.length)),ge.init(r,e)}),Jc=T("$ZodCUID",(r,e)=>{e.pattern??(e.pattern=Wa),ge.init(r,e)}),Hc=T("$ZodCUID2",(r,e)=>{e.pattern??(e.pattern=Za),ge.init(r,e)}),Xc=T("$ZodULID",(r,e)=>{e.pattern??(e.pattern=Ga),ge.init(r,e)}),Yc=T("$ZodXID",(r,e)=>{e.pattern??(e.pattern=Ka),ge.init(r,e)}),Qc=T("$ZodKSUID",(r,e)=>{e.pattern??(e.pattern=Ja),ge.init(r,e)}),ep=T("$ZodISODateTime",(r,e)=>{e.pattern??(e.pattern=uc(e)),ge.init(r,e),(e.local||e.precision===-1)&&(r._zod.bag.laxFormat=!0,r._zod.onattach.push(t=>{t._zod.bag.laxFormat=!0}))}),tp=T("$ZodISODate",(r,e)=>{e.pattern??(e.pattern=dc),ge.init(r,e)}),op=T("$ZodISOTime",(r,e)=>{e.pattern??(e.pattern=lc(e)),ge.init(r,e)}),rp=T("$ZodISODuration",(r,e)=>{e.pattern??(e.pattern=Ya),ge.init(r,e)}),np=T("$ZodIPv4",(r,e)=>{e.pattern??(e.pattern=oc),ge.init(r,e),r._zod.bag.format="ipv4"}),f0=/^[0-9a-fA-F:.]+$/;function Er(r){if(!f0.test(r))return!1;try{return new URL(`http://[${r}]`),!0}catch{return!1}}var ip=T("$ZodIPv6",(r,e)=>{e.pattern??(e.pattern=rc),ge.init(r,e),r._zod.bag.format="ipv6",r._zod.check=t=>{Er(t.value)||t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:r,continue:!e.abort})}}),sp=T("$ZodMAC",(r,e)=>{e.pattern??(e.pattern=nc(e.delimiter)),ge.init(r,e),r._zod.bag.format="mac"}),ap=T("$ZodCIDRv4",(r,e)=>{e.pattern??(e.pattern=ic),ge.init(r,e)});function pi(r){let e=r.split("/");if(e.length!==2)return!1;let[t,n]=e;if(!n)return!1;let o=Number(n);return`${o}`!==n||o<0||o>128?!1:Er(t)}var cp=T("$ZodCIDRv6",(r,e)=>{e.pattern??(e.pattern=sc),ge.init(r,e),r._zod.check=t=>{pi(t.value)||t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:r,continue:!e.abort})}});function Dr(r){if(r==="")return!0;if(/\s/.test(r)||r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}var pp=T("$ZodBase64",(r,e)=>{e.pattern??(e.pattern=ac),ge.init(r,e),r._zod.bag.contentEncoding="base64",r._zod.check=t=>{Dr(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:r,continue:!e.abort})}});function di(r){if(!Kn.test(r))return!1;let e=r.replace(/[-_]/g,n=>n==="-"?"+":"/"),t=e.padEnd(Math.ceil(e.length/4)*4,"=");return Dr(t)}var dp=T("$ZodBase64URL",(r,e)=>{e.pattern??(e.pattern=Kn),ge.init(r,e),r._zod.bag.contentEncoding="base64url",r._zod.check=t=>{di(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:r,continue:!e.abort})}}),lp=T("$ZodE164",(r,e)=>{e.pattern??(e.pattern=pc),ge.init(r,e)}),g0=/[- ]/g;function x0(r){let e=r.length,t=1,n=0;for(;e;){let o=+r[--e];t^=1,n+=t?[0,2,4,6,8,1,3,5,7,9][o]:o}return n%10===0}function li(r){return Jn.test(r)?x0(r.replace(g0,"")):!1}var up=T("$ZodCreditCard",(r,e)=>{e.pattern??(e.pattern=Jn),ge.init(r,e),r._zod.check=t=>{li(t.value)||t.issues.push({code:"invalid_format",format:"credit_card",input:t.value,inst:r,continue:!e.abort})}});function ui(r,e=null){try{let t=r.split(".");if(t.length!==3)return!1;let[n]=t;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||e&&(!("alg"in o)||o.alg!==e))}catch{return!1}}var mp=T("$ZodJWT",(r,e)=>{ge.init(r,e),r._zod.check=t=>{ui(t.value,e.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:r,continue:!e.abort})}}),hp=T("$ZodCustomStringFormat",(r,e)=>{ge.init(r,e),r._zod.check=t=>{e.fn(t.value)||t.issues.push({code:"invalid_format",format:e.format,input:t.value,inst:r,continue:!e.abort})}}),mi=T("$ZodNumber",(r,e)=>{te.init(r,e),r._zod.pattern=r._zod.bag.pattern??At,r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=Number(t.value)}catch{}let o=t.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return t;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return t.issues.push({expected:"number",code:"invalid_type",input:o,inst:r,...i?{received:i}:{}}),t}}),fp=T("$ZodNumberFormat",(r,e)=>{wc.init(r,e),mi.init(r,e)}),Ar=T("$ZodBoolean",(r,e)=>{te.init(r,e),r._zod.pattern=fc,r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=!!t.value}catch{}let o=t.value;return typeof o=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:r}),t}}),hi=T("$ZodBigInt",(r,e)=>{te.init(r,e),r._zod.pattern=hc,r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=BigInt(t.value)}catch{}return typeof t.value=="bigint"||t.issues.push({expected:"bigint",code:"invalid_type",input:t.value,inst:r}),t}}),gp=T("$ZodBigIntFormat",(r,e)=>{Ic.init(r,e),hi.init(r,e)}),xp=T("$ZodSymbol",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{let o=t.value;return typeof o=="symbol"||t.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:r}),t}}),yp=T("$ZodUndefined",(r,e)=>{te.init(r,e),r._zod.pattern=xc,r._zod.values=new Set([void 0]),r._zod.parse=(t,n)=>{let o=t.value;return typeof o>"u"||t.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:r}),t}}),bp=T("$ZodNull",(r,e)=>{te.init(r,e),r._zod.pattern=gc,r._zod.values=new Set([null]),r._zod.parse=(t,n)=>{let o=t.value;return o===null||t.issues.push({expected:"null",code:"invalid_type",input:o,inst:r}),t}}),Sp=T("$ZodAny",(r,e)=>{te.init(r,e),r._zod.parse=t=>t}),zp=T("$ZodUnknown",(r,e)=>{te.init(r,e),r._zod.parse=t=>t}),vp=T("$ZodNever",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:r}),t)}),wp=T("$ZodVoid",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{let o=t.value;return typeof o>"u"||t.issues.push({expected:"void",code:"invalid_type",input:o,inst:r}),t}}),Ip=T("$ZodDate",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=new Date(t.value)}catch{}let o=t.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||t.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:r}),t}});function ef(r,e,t){r.issues.length&&e.issues.push(...Ge(t,r.issues)),e.value[t]=r.value}var kp=T("$ZodArray",(r,e)=>{te.init(r,e);let t=Ae.memoizer;t?.attach(r),r._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:r}),n;n.value=t?t.alloc(r,n,Array(i.length),o):Array(i.length);let s=[];for(let c=0;c<i.length;c++){let u=i[c],m=e.element._zod.run({value:u,issues:[]},o);m instanceof Promise?s.push(m.then(h=>ef(h,n,c))):ef(m,n,c)}return s.length?Promise.all(s).then(()=>n):n}});function ri(r,e,t,n,o,i){let s=t in n,c=i==="optional";if(!(!s&&c&&o==="optional")){if(r.issues.length){if(o!==void 0&&c&&!s)return;e.issues.push(...Ge(t,r.issues))}if(!s&&o===void 0){r.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[t]});return}r.value===void 0?s&&(e.value[t]=void 0):e.value[t]=r.value}}var y0=[];function gf(r){let e=Object.keys(r.shape),t=Object.getOwnPropertySymbols(r.shape),n=t.length?t:y0,o=n.length?[...e,...n]:e;for(let s of o)if(!r.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let i=ka(r.shape);return{...r,allKeys:o,symbolKeys:n,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(i)}}function xf(r,e,t,n,o,i){let s=[],c=o.keySet,u=o.catchall._zod,m=u.def.type,h=u.optin,g=u.optout;for(let y in e){if(c.has(y))continue;if(y==="__proto__"){m==="never"&&s.push(y);continue}if(m==="never"){s.push(y);continue}let S=u.run({value:e[y],issues:[]},n);S instanceof Promise?r.push(S.then(w=>ri(w,t,y,e,h,g))):ri(S,t,y,e,h,g)}return s.length&&t.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:i,continue:!0}),r.length?Promise.all(r).then(()=>t):t}var Nc=new WeakMap,yf=T("$ZodObject",(r,e)=>{if(te.init(r,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let u=e.shape;Nc.set(e,u),Object.defineProperty(e,"shape",{get:()=>{let m={...u};return Object.defineProperty(e,"shape",{value:m}),Nc.set(e,m),m}})}let n=So(()=>gf(e));ie(r,"propValues",u=>{let m=u.def.shape,h={};for(let g in m){let y=m[g]._zod;if(y.values){Object.prototype.hasOwnProperty.call(h,g)||$e(h,g,new Set);for(let S of y.values)h[g].add(S);y.optin!==void 0&&h[g].add(void 0)}}return h});let o=Jt,i=e.catchall,s,c=Ae.memoizer;c?.attach(r),r._zod.parse=(u,m)=>{s??(s=n.value);let h=u.value;if(!o(h))return u.issues.push({expected:"object",code:"invalid_type",input:h,inst:r}),u;u.value=c?c.alloc(r,u,{},m):{};let g=[],y=s.shape;for(let S of s.allKeys){if(S==="__proto__")continue;let w=y[S],$=w._zod.optin,E=w._zod.optout,V=w._zod.run({value:h[S],issues:[]},m);V instanceof Promise?g.push(V.then(F=>ri(F,u,S,h,$,E))):ri(V,u,S,h,$,E)}return i?xf(g,h,u,m,n.value,r):g.length?Promise.all(g).then(()=>u):u}}),Pp=T("$ZodObjectJIT",(r,e)=>{yf.init(r,e);let t=r._zod.parse,n=So(()=>gf(e)),o=Ae.memoizer,i=S=>{let w=n.value,$=w.symbolKeys,E=new Yt(["payload","ctx"],{shape:S,inst:r,memo:o,syms:$}),V=ye=>`shape[${ye}]._zod.run({ value: input[${ye}], issues: [] }, ctx)`,F=(ye,ce)=>`
|
|
30
|
+
for (let i = 0; i < ${ye}.issues.length; i++) {
|
|
31
|
+
const iss = ${ye}.issues[i];
|
|
32
|
+
iss.path = iss.path ? [${ce}, ...iss.path] : [${ce}];
|
|
33
|
+
payload.issues.push(iss);
|
|
34
|
+
}`;E.write("const input = payload.value;");let H=Object.create(null),re=0;for(let ye of w.allKeys)H[ye]=`key_${re++}`;E.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let ye of w.allKeys){if(ye==="__proto__")continue;let ce=H[ye],Me=typeof ye=="symbol"?`syms[${$.indexOf(ye)}]`:Ze(ye),Ct=`${Me} in input`,fr=S[ye],gr=fr?._zod?.optin,xr=gr!==void 0,Pn=fr?._zod?.optout==="optional";if(E.write(`const ${ce} = ${V(Me)};`),xr&&Pn){let $n=gr==="optional"?`${ce}_present`:`${ce}.value !== undefined || ${ce}_present`;E.write(`
|
|
35
|
+
const ${ce}_present = ${Ct};
|
|
36
|
+
if (!${ce}.issues.length || ${ce}_present) {
|
|
37
|
+
if (${ce}.issues.length) {${F(ce,Me)}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (${$n}) {
|
|
41
|
+
newResult[${Me}] = ${ce}.value;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
`)}else xr?E.write(`
|
|
46
|
+
if (${ce}.issues.length) {${F(ce,Me)}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (${ce}.value === undefined) {
|
|
50
|
+
if (${Ct}) {
|
|
51
|
+
newResult[${Me}] = undefined;
|
|
52
|
+
}
|
|
53
|
+
} else {
|
|
54
|
+
newResult[${Me}] = ${ce}.value;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
`):E.write(`
|
|
58
|
+
const ${ce}_present = ${Ct};
|
|
59
|
+
if (${ce}.issues.length) {${F(ce,Me)}
|
|
60
|
+
}
|
|
61
|
+
if (!${ce}_present && !${ce}.issues.length) {
|
|
62
|
+
payload.issues.push({
|
|
63
|
+
code: "invalid_type",
|
|
64
|
+
expected: "nonoptional",
|
|
65
|
+
input: undefined,
|
|
66
|
+
path: [${Me}]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (${ce}_present) {
|
|
71
|
+
newResult[${Me}] = ${ce}.value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
`)}return E.write("payload.value = newResult;"),E.write("return payload;"),E.compile()},s,c=Jt,u=!Ae.jitless,h=u&&wa.value,g=e.catchall,y;r._zod.parse=(S,w)=>{y??(y=n.value);let $=S.value;return c($)?u&&h&&w?.async===!1&&w.jitless!==!0?(s||(s=i(e.shape)),S=s(S,w),g?xf([],$,S,w,y,r):S):t(S,w):(S.issues.push({expected:"object",code:"invalid_type",input:$,inst:r}),S)}});function tf(r,e,t,n){for(let i of r)if(i.issues.length===0)return e.value=i.value,e;let o=r.filter(i=>!Et(i));return o.length===1?(e.value=o[0].value,o[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:t,errors:r.map(i=>i.issues.map(s=>Ke(s,n,Te())))}),e)}var _r=T("$ZodUnion",(r,e)=>{te.init(r,e),ie(r,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),ie(r,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ie(r,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),ie(r,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>zr(i.source)).join("|")})$`)}});let t=e.options.length===1?e.options[0]._zod.run:null;r._zod.parse=(n,o)=>{if(t)return t(n,o);let i=!1,s=[];for(let c of e.options){let u=c._zod.run({value:n.value,issues:[]},o);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(c=>tf(c,n,r,o)):tf(s,n,r,o)}});function of(r,e,t,n){let o=[];for(let i=0;i<r.length;i++)r[i].issues.length===0&&o.push(i);return o.length===1?(e.value=r[o[0]].value,e):(o.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:t,errors:r.map(i=>i.issues.map(s=>Ke(s,n,Te())))}):e.issues.push({code:"invalid_union",input:e.value,inst:t,errors:[],inclusive:!1,matches:o}),e)}var $p=T("$ZodXor",(r,e)=>{_r.init(r,e),e.inclusive=!1;let t=e.options.length===1?e.options[0]._zod.run:null;r._zod.parse=(n,o)=>{if(t)return t(n,o);let i=!1,s=[];for(let c of e.options){let u=c._zod.run({value:n.value,issues:[]},o);u instanceof Promise?(s.push(u),i=!0):s.push(u)}return i?Promise.all(s).then(c=>of(c,n,r,o)):of(s,n,r,o)}});function Tp(r,e){let t=r._zod,n=t.bag.optionsMap;if(!n){n=new Map;let{options:o,discriminator:i}=t.def;for(let s of o)for(let c of s._zod.propValues?.[i]??[])n.has(c)||n.set(c,s);t.bag.optionsMap=n}return n.get(e)}var Cp=T("$ZodDiscriminatedUnion",(r,e)=>{e.inclusive=!1,_r.init(r,e);let t=r._zod.parse;ie(r,"propValues",o=>{let i={};for(let s of o.def.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(s)}"`);for(let[u,m]of Object.entries(c)){Object.prototype.hasOwnProperty.call(i,u)||$e(i,u,new Set);for(let h of m)i[u].add(h)}}return i}),e.options.forEach((o,i)=>{let s=Nc.get(o._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,e.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let n=So(()=>{let o=e.options,i=new Map;for(let s of o){let c=s._zod.propValues?.[e.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});r._zod.parse=(o,i)=>{let s=o.value;if(!Jt(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:r}),o;let c=n.value.get(s?.[e.discriminator]);return c?c._zod.run(o,i):e.unionFallback||i.direction==="backward"?t(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(n.value.keys()),input:s,path:[e.discriminator],inst:r}),o)}}),Op=T("$ZodIntersection",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{let o=t.value,i=e.left._zod.run({value:o,issues:[]},n),s=e.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,m])=>rf(t,u,m)):rf(t,i,s)}});function $o(r,e){if(r===e)return{valid:!0,data:r};if(r instanceof Date&&e instanceof Date&&+r==+e)return{valid:!0,data:r};if(nt(r)&&nt(e)){let t=Object.keys(e),n=Object.keys(r).filter(i=>t.indexOf(i)!==-1),o={...r,...e};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let i of n){if(i==="__proto__")continue;let s=$o(r[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length)return{valid:!1,mergeErrorPath:[]};let t=[];for(let n=0;n<r.length;n++){let o=r[n],i=e[n],s=$o(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};t.push(s.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function rf(r,e,t){let n=new Map,o,i=new Map,s=(m,h)=>{let g;if(m.code==="unrecognized_keys"&&!m.path?.length)o??(o=m),g=m.keys;else if(m.code==="invalid_key"&&m.origin==="record"&&m.path?.length===1){let y=String(m.path[0]);i.has(y)||i.set(y,m),g=[y]}else return!1;for(let y of g)n.has(y)||n.set(y,{}),n.get(y)[h]=!0;return!0};for(let m of e.issues)s(m,"l")||r.issues.push(m);for(let m of t.issues)s(m,"r")||r.issues.push(m);let c=[...n].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(c.length){let m=o?c.filter(h=>o.keys.includes(h)):[];m.length&&r.issues.push({...o,keys:m});for(let h of c)!m.includes(h)&&i.has(h)&&r.issues.push(i.get(h))}let u=$o(e.value,t.value);if(!u.valid){if(Et(r))return r;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return r.value=u.data,r}var fi=T("$ZodTuple",(r,e)=>{te.init(r,e);let t=e.items,n=Ae.memoizer;n?.attach(r),r._zod.parse=(o,i)=>{let s=o.value;if(!Array.isArray(s))return o.issues.push({input:s,inst:r,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(r,o,[],i):[];let c=[],u=nf(t,"optin"),m=nf(t,"optout");if(!e.rest){if(s.length<u)return o.issues.push({code:"too_small",minimum:u,inclusive:!0,input:s,inst:r,origin:"array"}),o;s.length>t.length&&o.issues.push({code:"too_big",maximum:t.length,inclusive:!0,input:s,inst:r,origin:"array"})}let h=new Array(t.length);for(let g=0;g<t.length;g++){let y=t[g]._zod.run({value:s[g],issues:[]},i);y instanceof Promise?c.push(y.then(S=>{h[g]=S})):h[g]=y}if(e.rest){let g=t.length-1,y=s.slice(t.length);for(let S of y){g++;let w=e.rest._zod.run({value:S,issues:[]},i);w instanceof Promise?c.push(w.then($=>sf($,o,g))):sf(w,o,g)}}return c.length?Promise.all(c).then(()=>af(h,o,t,s,m)):af(h,o,t,s,m)}});function nf(r,e){for(let t=r.length-1;t>=0;t--)if(!(e==="optin"?r[t]._zod.optin!==void 0:r[t]._zod.optout==="optional"))return t+1;return 0}function sf(r,e,t){r.issues.length&&e.issues.push(...Ge(t,r.issues)),e.value[t]=r.value}function af(r,e,t,n,o){for(let i=0;i<t.length;i++){let s=r[i],c=i<n.length;if(!c&&i>=o&&t[i]._zod.optin==="optional"){e.value.length=i;break}if(s.issues.length){if(!c&&i>=o){e.value.length=i;break}e.issues.push(...Ge(i,s.issues))}e.value[i]=s.value}for(let i=e.value.length-1;i>=n.length&&(t[i]._zod.optout==="optional"&&e.value[i]===void 0);i--)e.value.length=i;return e}var Mp=T("$ZodRecord",(r,e)=>{te.init(r,e);let t=Ae.memoizer;t?.attach(r),r._zod.parse=(n,o)=>{let i=n.value;if(!nt(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:r}),n;let s=[],c=e.keyType._zod.values;if(c&&!e.partial){n.value=t?t.alloc(r,n,{},o):{};let u=new Set;for(let h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){if(u.add(typeof h=="number"?h.toString():h),h==="__proto__")continue;let g=e.keyType._zod.run({value:h,issues:[]},o);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(g.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(w=>Ke(w,o,Te())),input:h,path:[h],inst:r});continue}let y=g.value;if(y==="__proto__")continue;let S=e.valueType._zod.run({value:i[h],issues:[]},o);S instanceof Promise?s.push(S.then(w=>{w.issues.length&&n.issues.push(...Ge(h,w.issues)),n.value[y]=w.value})):(S.issues.length&&n.issues.push(...Ge(h,S.issues)),n.value[y]=S.value)}let m;for(let h in i)if(!u.has(h))if(e.mode==="loose"){if(h==="__proto__")continue;n.value[h]=i[h]}else m=m??[],m.push(h);m&&m.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:r,keys:m,continue:!0})}else{n.value=t?t.alloc(r,n,{},o):{};let u;for(let m of Reflect.ownKeys(i)){if(m==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,m))continue;let h=e.keyType._zod.run({value:m,issues:[]},o);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&At.test(m)&&h.issues.length){let w=e.keyType._zod.run({value:Number(m),issues:[]},o);if(w instanceof Promise)throw new Error("Async schemas not supported in object keys currently");w.issues.length===0&&(h=w)}if(h.issues.length){e.mode==="loose"?n.value[m]=i[m]:c?(u=u??[],u.push(m)):n.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(w=>Ke(w,o,Te())),input:m,path:[m],inst:r});continue}let y=h.value;if(y==="__proto__")continue;let S=e.valueType._zod.run({value:i[m],issues:[]},o);S instanceof Promise?s.push(S.then(w=>{w.issues.length&&n.issues.push(...Ge(m,w.issues)),n.value[y]=w.value})):(S.issues.length&&n.issues.push(...Ge(m,S.issues)),n.value[y]=S.value)}u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:r,keys:u,continue:!0})}return s.length?Promise.all(s).then(()=>n):n}}),Rp=T("$ZodMap",(r,e)=>{te.init(r,e);let t=Ae.memoizer;t?.attach(r),r._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:r}),n;let s=[];n.value=t?t.alloc(r,n,new Map,o):new Map;for(let[c,u]of i){let m=e.keyType._zod.run({value:c,issues:[]},o),h=e.valueType._zod.run({value:u,issues:[]},o);m instanceof Promise||h instanceof Promise?s.push(Promise.all([m,h]).then(([g,y])=>{cf(g,y,n,c,i,r,o)})):cf(m,h,n,c,i,r,o)}return s.length?Promise.all(s).then(()=>n):n}});function cf(r,e,t,n,o,i,s){r.issues.length&&(Ir.has(typeof n)?t.issues.push(...Ge(n,r.issues)):t.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:r.issues.map(c=>Ke(c,s,Te()))})),e.issues.length&&(Ir.has(typeof n)?t.issues.push(...Ge(n,e.issues)):t.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:e.issues.map(c=>Ke(c,s,Te()))})),t.value.set(r.value,e.value)}var Ep=T("$ZodSet",(r,e)=>{te.init(r,e);let t=Ae.memoizer;t?.attach(r),r._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:r,expected:"set",code:"invalid_type"}),n;let s=[];n.value=t?t.alloc(r,n,new Set,o):new Set;for(let c of i){let u=e.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise?s.push(u.then(m=>pf(m,n))):pf(u,n)}return s.length?Promise.all(s).then(()=>n):n}});function pf(r,e){r.issues.length&&e.issues.push(...r.issues),e.value.add(r.value)}var Dp=T("$ZodEnum",(r,e)=>{te.init(r,e);let t=Sr(e.entries),n=new Set(t);r._zod.values=n;let o=t.filter(i=>Ir.has(typeof i));r._zod.pattern=new RegExp(o.length?`^(${o.map(i=>it(i.toString())).join("|")})$`:"^[^\\s\\S]$"),r._zod.parse=(i,s)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:t,input:c,inst:r}),i}}),Ap=T("$ZodLiteral",(r,e)=>{te.init(r,e);let t=new Set(e.values);r._zod.values=t,r._zod.pattern=new RegExp(e.values.length?`^(${e.values.map(n=>typeof n=="string"?it(n):n?it(n.toString()):String(n)).join("|")})$`:"^[^\\s\\S]$"),r._zod.parse=(n,o)=>{let i=n.value;return t.has(i)||n.issues.push({code:"invalid_value",values:e.values,input:i,inst:r}),n}}),_p=T("$ZodFile",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{let o=t.value;return o instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:o,inst:r}),t}}),Lp=T("$ZodTransform",(r,e)=>{te.init(r,e),r._zod.optin="optional",Ae.memoizer?.guard(r),r._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Dt(r.constructor.name);let o=e.transform(t.value,t);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(t.value=s,t));if(o instanceof Promise)throw new Je;return t.value=o,t}});function df(r,e){return r.value=e.issues.length?void 0:e.value,r}var gi=T("$ZodOptional",(r,e)=>{te.init(r,e),ie(r,"optin",t=>t.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),r._zod.optout="optional",ie(r,"values",t=>{let n=t.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),ie(r,"pattern",t=>{let n=t.def.innerType._zod.pattern;return n?new RegExp(`^(${zr(n.source)})?$`):void 0}),r._zod.parse=(t,n)=>{if(t.value===void 0){if(e.innerType._zod.optin!=="defaulted")return t;let o=e.innerType._zod.run({value:t.value,issues:[]},n);return o instanceof Promise?o.then(i=>df(t,i)):df(t,o)}return e.innerType._zod.run(t,n)}}),jp=T("$ZodExactOptional",(r,e)=>{gi.init(r,e),ie(r,"values",t=>t.def.innerType._zod.values),ie(r,"pattern",t=>t.def.innerType._zod.pattern),r._zod.parse=(t,n)=>e.innerType._zod.run(t,n)}),Fp=T("$ZodNullable",(r,e)=>{te.init(r,e),ie(r,"optin",t=>t.def.innerType._zod.optin),ie(r,"optout",t=>t.def.innerType._zod.optout),ie(r,"pattern",t=>{let n=t.def.innerType._zod.pattern;return n?new RegExp(`^(${zr(n.source)}|null)$`):void 0}),ie(r,"values",t=>t.def.innerType._zod.values?new Set([...t.def.innerType._zod.values,null]):void 0),r._zod.parse=(t,n)=>t.value===null?t:e.innerType._zod.run(t,n)}),Np=T("$ZodDefault",(r,e)=>{te.init(r,e),r._zod.optin="defaulted",ie(r,"values",t=>t.def.innerType._zod.values),r._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);if(t.value===void 0)return t.value=e.defaultValue,t;let o=e.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>lf(i,e)):lf(o,e)}});function lf(r,e){return r.value===void 0&&(r.value=e.defaultValue),r}var Vp=T("$ZodPrefault",(r,e)=>{te.init(r,e),r._zod.optin="defaulted",ie(r,"values",t=>t.def.innerType._zod.values),r._zod.parse=(t,n)=>(n.direction==="backward"||t.value===void 0&&(t.value=e.defaultValue),e.innerType._zod.run(t,n))}),Up=T("$ZodNonOptional",(r,e)=>{te.init(r,e),ie(r,"values",t=>{let n=t.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),r._zod.parse=(t,n)=>{let o=e.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>uf(i,r)):uf(o,r)}});function uf(r,e){return!r.issues.length&&r.value===void 0&&r.issues.push({code:"invalid_type",expected:"nonoptional",input:r.value,inst:e}),r}var Bp=T("$ZodSuccess",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Dt("ZodSuccess");let o=e.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>(t.value=i.issues.length===0,t)):(t.value=o.issues.length===0,t)}});function mf(r,e,t,n){return e.issues.length?(r.value=t.catchValue({...e,value:r.value,error:{issues:e.issues.map(o=>Ke(o,n,Te()))},input:r.value}),r):(r.value=e.value,e.memo&&(r.memo=!0),r)}var qp=T("$ZodCatch",(r,e)=>{te.init(r,e),ie(r,"optin",t=>t.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ie(r,"optout",t=>t.def.innerType._zod.optout),ie(r,"values",t=>t.def.innerType._zod.values),r._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);let o=e.innerType._zod.run({value:t.value,issues:[]},n);return o instanceof Promise?o.then(i=>mf(t,i,e,n)):mf(t,o,e,n)}}),Wp=T("$ZodNaN",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>((typeof t.value!="number"||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:r,expected:"nan",code:"invalid_type"}),t)}),xi=T("$ZodPipe",(r,e)=>{te.init(r,e),ie(r,"values",t=>t.def.in._zod.values),ie(r,"optin",t=>t.def.in._zod.optin),ie(r,"optout",t=>t.def.out._zod.optout),ie(r,"propValues",t=>t.def.in._zod.propValues),r._zod.parse=(t,n)=>{if(n.direction==="backward"){let i=e.out._zod.run(t,n);return i instanceof Promise?i.then(s=>ei(s,e.in,n)):ei(i,e.in,n)}let o=e.in._zod.run(t,n);return o instanceof Promise?o.then(i=>ei(i,e.out,n)):ei(o,e.out,n)}});function ei(r,e,t){return r.issues.some(n=>n.code!=="unrecognized_keys")?(r.aborted=!0,r):e._zod.run({value:r.value,issues:r.issues},t)}var Lr=T("$ZodCodec",(r,e)=>{te.init(r,e),ie(r,"values",t=>t.def.in._zod.values),ie(r,"optin",t=>t.def.in._zod.optin),ie(r,"optout",t=>t.def.out._zod.optout),ie(r,"propValues",t=>t.def.in._zod.propValues),r._zod.parse=(t,n)=>{if((n.direction||"forward")==="forward"){let i=e.in._zod.run(t,n);return i instanceof Promise?i.then(s=>ti(s,e,n)):ti(i,e,n)}else{let i=e.out._zod.run(t,n);return i instanceof Promise?i.then(s=>ti(s,e,n)):ti(i,e,n)}}});function ti(r,e,t){if(r.issues.length)return r.aborted=!0,r;if((t.direction||"forward")==="forward"){let o=e.transform(r.value,r);return o instanceof Promise?o.then(i=>oi(r,i,e.out,t)):oi(r,o,e.out,t)}else{let o=e.reverseTransform(r.value,r);return o instanceof Promise?o.then(i=>oi(r,i,e.in,t)):oi(r,o,e.in,t)}}function oi(r,e,t,n){return r.issues.length?(r.aborted=!0,r):t._zod.run({value:e,issues:r.issues},n)}var Zp=T("$ZodPreprocess",(r,e)=>{xi.init(r,e)}),Gp=T("$ZodReadonly",(r,e)=>{te.init(r,e),ie(r,"propValues",t=>t.def.innerType._zod.propValues),ie(r,"values",t=>t.def.innerType._zod.values),ie(r,"optin",t=>t.def.innerType?._zod?.optin),ie(r,"optout",t=>t.def.innerType?._zod?.optout),r._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);let o=e.innerType._zod.run(t,n);return o instanceof Promise?o.then(hf):hf(o)}});function hf(r){return r.memo||(r.value=Object.freeze(r.value)),r}var Kp=T("$ZodTemplateLiteral",(r,e)=>{te.init(r,e);let t=[];for(let n of e.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let o=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!o)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let i=o.startsWith("^")?1:0,s=o.endsWith("$")?o.length-1:o.length;t.push(o.slice(i,s))}else if(n===null||Ia.has(typeof n))t.push(it(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);r._zod.pattern=new RegExp(`^${t.join("")}$`),r._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:r,expected:"string",code:"invalid_type"}),n):(r._zod.pattern.lastIndex=0,r._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:r,code:"invalid_format",format:e.format??"template_literal",pattern:r._zod.pattern.source}),n)}),Jp=T("$ZodFunction",(r,e)=>(te.init(r,e),Object.defineProperty(r,"_def",{value:e}),r._zod.def=e,r.implement=t=>{if(typeof t!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...n){let o=r._def.input?jn(r._def.input,n):n,i=Reflect.apply(t,this,o);return r._def.output?jn(r._def.output,i):i},"_zod",{value:r._zod,enumerable:!1})},r.implementAsync=t=>{if(typeof t!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...n){let o=r._def.input?await Fn(r._def.input,n):n,i=await Reflect.apply(t,this,o);return r._def.output?await Fn(r._def.output,i):i},"_zod",{value:r._zod,enumerable:!1})},r._zod.parse=(t,n)=>typeof t.value!="function"?(t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:r}),t):(r._def.output&&r._def.output._zod.def.type==="promise"?t.value=r.implementAsync(t.value):t.value=r.implement(t.value),t),r.input=(...t)=>{let n=r.constructor;return Array.isArray(t[0])?new n({type:"function",input:new fi({type:"tuple",items:t[0],rest:t[1]}),output:r._def.output}):new n({type:"function",input:t[0],output:r._def.output})},r.output=t=>{let n=r.constructor;return new n({type:"function",input:r._def.input,output:t})},r)),Hp=T("$ZodPromise",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>Promise.resolve(t.value).then(o=>e.innerType._zod.run({value:o,issues:[]},n))}),jr=T("$ZodLazy",(r,e)=>{te.init(r,e),za(r._zod,"innerType",()=>{let t=e;return t._cachedInner||(t._cachedInner=e.getter()),t._cachedInner}),ie(r,"pattern",t=>t.innerType?._zod?.pattern),ie(r,"propValues",t=>t.innerType?._zod?.propValues),ie(r,"optin",t=>t.innerType?._zod?.optin??void 0),ie(r,"optout",t=>t.innerType?._zod?.optout??void 0),r._zod.parse=(t,n)=>r._zod.innerType._zod.run(t,n)}),Xp=T("$ZodCustom",(r,e)=>{be.init(r,e),te.init(r,e),r._zod.parse=(t,n)=>t,r._zod.check=t=>{let n=t.value,o=e.fn(n);if(o instanceof Promise)return o.then(i=>ff(i,t,n,r));ff(o,t,n,r)}});function ff(r,e,t,n){if(!r){let o={code:"custom",input:t,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),e.issues.push(zo(o))}}var Si=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},Qp="~memo",Sf=[];function Yp(r){return r.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var zf=new WeakMap;function ed(r,e){let t=zf.get(r);if(t!==void 0)return t;if(e.has(r))return!0;e.add(r);let n=!1,o=c=>{!n&&c?._zod&&ed(c,e)&&(n=!0)},i=r._zod.def,s=i.type;switch(s){case"object":{for(let c of Reflect.ownKeys(i.shape))o(i.shape[c]);o(i.catchall);break}case"array":o(i.element);break;case"tuple":for(let c of i.items)o(c);o(i.rest);break;case"record":case"map":o(i.keyType),o(i.valueType);break;case"set":o(i.valueType);break;case"union":for(let c of i.options)o(c);break;case"intersection":o(i.left),o(i.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(i.innerType);break;case"pipe":o(i.in),o(i.out);break;case"function":o(i.input),o(i.output);break;case"lazy":o(r._zod.innerType);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 c in i){let u=Object.getOwnPropertyDescriptor(i,c);if(!u||u.get)continue;let m=u.value;if(!(!m||typeof m!="object")){if(m._zod)o(m);else if(Array.isArray(m))for(let h of m)o(h)}}}return e.delete(r),zf.set(r,n),n}function td(r){return ed(r,new Set)}function b0(r,e){let t=r.buckets.get(e);return t||(t=new Map,r.buckets.set(e,t)),t}var yi,bi=[],S0={alloc(r,e,t){let n=yi;if(!n)return t;yi=void 0;let o={value:t,issues:null};return n.set(e.value,o),bi.push(o),t},guard(r){var e;(e=r._zod).deferred??(e.deferred=[]),r._zod.deferred.push(()=>{let t=r._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&zi(i,o.value))throw new Si;return t(o,i)};r._zod.parse=n,r._zod.run===t&&(r._zod.run=n)})},attach(r){var e;let t,n,o;(e=r._zod).deferred??(e.deferred=[]),r._zod.deferred.push(()=>{let i=r._zod.parse,s=(c,u)=>{if(t===void 0&&(t=ed(r,new Set),!t))return r._zod.parse=i,r._zod.run===s&&(r._zod.run=i),i(c,u);let m=c.value;if(m===null||typeof m!="object")return i(c,u);let h=u[Qp];h||(h={buckets:new Map,backEdges:void 0},u[Qp]=h);let g;n===u?g=o:(g=b0(h,r),n=u,o=g);let y=g.get(m);if(y)return c.value=y.value,y.issues?y.issues.length&&c.issues.push(...Yp(y.issues)):(c.memo=!0,h.backEdges??(h.backEdges=new Set),h.backEdges.add(y.value)),c;yi=g;let S=bi.length,w=i(c,u);yi=void 0;let $=bi.length>S?bi.pop():void 0;return w instanceof Promise?w.then(E=>($&&($.issues=E.issues.length?Yp(E.issues):Sf),E)):($&&($.issues=w.issues.length?Yp(w.issues):Sf),w)};r._zod.parse=s,r._zod.run===i&&(r._zod.run=s)})}};function Fr(){return S0}function zi(r,e){let t=r[Qp]?.backEdges;return t!==void 0&&e!==null&&typeof e=="object"&&t.has(e)}var Vr={};It(Vr,{ar:()=>vf,az:()=>wf,be:()=>kf,bg:()=>Pf,bn:()=>$f,ca:()=>Tf,ckb:()=>Cf,cs:()=>Of,da:()=>Mf,de:()=>Rf,el:()=>Ef,en:()=>vi,eo:()=>Df,es:()=>Af,fa:()=>_f,fi:()=>Lf,fr:()=>jf,frCA:()=>Ff,gu:()=>Nf,he:()=>Vf,hi:()=>Uf,hr:()=>Bf,hu:()=>qf,hy:()=>Zf,id:()=>Gf,is:()=>Kf,it:()=>Jf,ja:()=>Hf,ka:()=>Xf,kh:()=>Yf,km:()=>wi,kn:()=>Qf,ko:()=>eg,lt:()=>og,mk:()=>rg,ms:()=>ng,ne:()=>ig,nl:()=>sg,nn:()=>ag,no:()=>cg,ota:()=>pg,pl:()=>lg,ps:()=>dg,pt:()=>ug,ptBR:()=>mg,ro:()=>hg,ru:()=>gg,sk:()=>xg,sl:()=>yg,sv:()=>bg,ta:()=>Sg,th:()=>zg,tk:()=>vg,tr:()=>wg,ua:()=>Ig,uk:()=>Ii,ur:()=>kg,uz:()=>Pg,vi:()=>$g,yo:()=>Og,zhCN:()=>Tg,zhTW:()=>Cg});var z0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\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 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}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: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?` \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"} ${i} ${o.maximum.toString()} ${s.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"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\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 ${i} ${o.minimum.toString()} ${s.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 ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`${t[i.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":""}: ${C(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 vf(){return{localeError:z0()}}var v0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${c}`}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: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${t[i.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":""}: ${C(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 wf(){return{localeError:v0()}}function If(r,e,t,n){let o=Math.abs(r),i=o%10,s=o%100;return s>=11&&s<=19?n:i===1?e:i>=2&&i<=4?t:n}var w0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);if(s){let c=Number(o.maximum),u=If(c,s.unit.one,s.unit.few,s.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 ${s.verb} ${i}${o.maximum.toString()} ${u}`}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 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);if(s){let c=Number(o.minimum),u=If(c,s.unit.one,s.unit.few,s.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 ${s.verb} ${i}${o.minimum.toString()} ${u}`}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 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${t[i.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"}: ${C(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 kf(){return{localeError:w0()}}var I0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\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 ${i}${o.maximum.toString()} ${s.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 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\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 ${i}${o.minimum.toString()} ${s.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 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.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 "${i.prefix}"`;if(i.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 "${i.suffix}"`;if(i.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 "${i.includes}"`;if(i.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 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${t[i.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":""}: ${C(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 Pf(){return{localeError:I0()}}var k0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${i}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${c}`}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: ${C(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 i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} ${s.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"} ${i}${o.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} ${s.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${i.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${t[i.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":""}: ${C(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(s=>`'${s}'`).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 $f(){return{localeError:k0()}}var P0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${c}`}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 ${C(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a m\xE0xim":"menys de",s=e(o.origin);return s?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${i} ${o.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(o.origin);return s?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${i} ${o.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${t[i.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":""}: ${C(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 Tf(){return{localeError:P0()}}var $0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s,u=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(h=>c.endsWith(h))?"\u06CC\u06D5":"\u06D5",m=/^[a-zA-Z]+$/.test(c);return s==="null"||s==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${i} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${c}${m?"":u}`}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 ${C(o.values,"|")}`;case"too_big":{let i=e(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} ${i.unit} ${i.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 i=e(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} ${i.unit} ${i.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 i=o;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${i.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:i.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 ${i.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${t[i.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: ${C(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(s=>`'${s}'`).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 Cf(){return{localeError:$0()}}var T0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${t[i.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: ${C(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 Of(){return{localeError:T0()}}var C0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"input"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${c}`:`Ugyldigt input: forventede ${i}, fik ${c}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${D(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin),c=n[o.origin]??o.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${i} ${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin),c=n[o.origin]??o.origin;return s?`For lille: forventede ${c} ${s.verb} ${i} ${o.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${t[i.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"}: ${C(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 Mf(){return{localeError:C0()}}var O0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${c}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${D(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${t[i.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"}: ${C(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 Rf(){return{localeError:O0()}}var M0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\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 ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\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 ${i}${o.maximum.toString()} ${s.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 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\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 ${i}${o.minimum.toString()} ${s.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 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${t[i.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"}: ${C(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 Ef(){return{localeError:M0()}}var R0=()=>{let r={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 e(i){return r[i]??null}let t={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:"credit card number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,s){return i==="number"&&typeof s=="number"&&!Number.isFinite(s)?String(s):n[i]??i}return i=>{switch(i.code){case"invalid_type":{let s=o(i.expected),c=A(i.input),u=o(c,i.input);return`Invalid input: expected ${s}, received ${u}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${D(i.values[0])}`:`Invalid option: expected one of ${C(i.values,"|")}`;case"too_big":{let s=i.exact?"exactly ":i.inclusive?"<=":"<",c=e(i.origin);return c?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${c.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{let s=i.exact?"exactly ":i.inclusive?">=":">",c=e(i.origin);return c?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${c.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${t[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(c=>`'${c}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function vi(){return{localeError:R0()}}var E0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${c}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${D(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${i}${o.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${t[i.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":""}: ${C(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 Df(){return{localeError:E0()}}var D0=()=>{let r={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"entrada"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin),c=n[o.origin]??o.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${i}${o.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin),c=n[o.origin]??o.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${i}${o.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${t[i.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":""}: ${C(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}};function Af(){return{localeError:D0()}}var A0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c} \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 ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \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 ${C(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.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 ${i}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${t[i.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: ${C(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 _f(){return{localeError:A0()}}var _0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${c}`}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: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${o.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${o.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${t[i.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"}: ${C(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 Lf(){return{localeError:_0()}}var L0=()=>{let r={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"entr\xE9e"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instance de ${o.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${c} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${D(o.values[0])} attendu`:`Option invalide : une valeur parmi ${C(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Trop grand : ${n[o.origin]??"valeur"} doit ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Trop petit : ${n[o.origin]??"valeur"} doit ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${i.pattern}`:`${t[i.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":""} : ${C(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 jf(){return{localeError:L0()}}var j0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${c}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${D(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u2264":"<",s=e(o.origin);return s?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u2265":">",s=e(o.origin);return s?`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${t[i.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":""} : ${C(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 Ff(){return{localeError:j0()}}var F0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${i}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${c}`}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: ${C(o.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} ${s.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"} ${i}${o.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} ${s.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${i.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${t[i.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":""}: ${C(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(s=>`'${s}'`).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 Nf(){return{localeError:F0()}}var N0=()=>{let r={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"}},e={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"}},t=m=>m?r[m]:void 0,n=m=>{let h=t(m);return h?h.label:m??r.unknown.label},o=m=>`\u05D4${n(m)}`,i=m=>(t(m)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=m=>m?e[m]??null:null,c={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"},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"}},u={nan:"NaN"};return m=>{switch(m.code){case"invalid_type":{let h=m.expected,g=u[h??""]??n(h),y=A(m.input),S=u[y]??r[y]?.label??y;return/^[A-Z]/.test(m.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${m.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${S}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}, \u05D4\u05EA\u05E7\u05D1\u05DC ${S}`}case"invalid_value":{if(m.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(m.values[0])}`;let h=m.values.map(S=>D(S));if(m.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 ${h[0]} \u05D0\u05D5 ${h[1]}`;let g=h[h.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 ${h.slice(0,-1).join(", ")} \u05D0\u05D5 ${g}`}case"too_big":{let h=s(m.origin),g=o(m.origin??"value");if(m.origin==="string")return`${h?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${m.maximum.toString()} ${h?.unit??""} ${m.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(m.origin==="number"){let w=m.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${m.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${m.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${w}`}if(m.origin==="array"||m.origin==="set"){let w=m.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",$=m.inclusive?`${m.maximum} ${h?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${m.maximum} ${h?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} ${w} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let y=m.inclusive?"<=":"<",S=i(m.origin??"value");return h?.unit?`${h.longLabel} \u05DE\u05D3\u05D9: ${g} ${S} ${y}${m.maximum.toString()} ${h.unit}`:`${h?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${g} ${S} ${y}${m.maximum.toString()}`}case"too_small":{let h=s(m.origin),g=o(m.origin??"value");if(m.origin==="string")return`${h?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${m.minimum.toString()} ${h?.unit??""} ${m.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(m.origin==="number"){let w=m.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${m.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${m.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${w}`}if(m.origin==="array"||m.origin==="set"){let w=m.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(m.minimum===1&&m.inclusive){let E=(m.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${w} \u05DC\u05D4\u05DB\u05D9\u05DC ${E}`}let $=m.inclusive?`${m.minimum} ${h?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${m.minimum} ${h?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${w} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let y=m.inclusive?">=":">",S=i(m.origin??"value");return h?.unit?`${h.shortLabel} \u05DE\u05D3\u05D9: ${g} ${S} ${y}${m.minimum.toString()} ${h.unit}`:`${h?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${g} ${S} ${y}${m.minimum.toString()}`}case"invalid_format":{let h=m;if(h.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${h.prefix}"`;if(h.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${h.suffix}"`;if(h.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${h.includes}"`;if(h.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 ${h.pattern}`;let g=c[h.format],y=g?.label??h.format,w=(g?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${y} \u05DC\u05D0 ${w}`}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 ${m.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${m.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${m.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${C(m.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(m.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Vf(){return{localeError:N0()}}var V0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\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 ${i}${o.maximum} ${s.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"} ${i}${o.maximum} \u0939\u094B`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\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 ${i}${o.minimum} ${s.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} ${i}${o.minimum} \u0939\u094B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${i.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${i.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${t[i.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":""}: ${C(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(s=>`'${s}'`).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 Uf(){return{localeError:V0()}}var U0=()=>{let r={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"unos"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${c}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${D(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin),c=n[o.origin]??o.origin;return s?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${i}${o.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin),c=n[o.origin]??o.origin;return s?`Premalo: o\u010Dekivano da ${c} ima ${i}${o.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${t[i.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"}: ${C(o.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[o.origin]??o.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[o.origin]??o.origin}`;default:return"Neispravan unos"}}};function Bf(){return{localeError:U0()}}var B0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${o.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${i}${o.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${t[i.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":""}: ${C(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 qf(){return{localeError:B0()}}function Wf(r,e,t){return Math.abs(r)===1?e:t}function To(r){if(!r)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],t=r[r.length-1];return r+(e.includes(t)?"\u0576":"\u0568")}var q0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\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 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);if(s){let c=Number(o.maximum),u=Wf(c,s.unit.one,s.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 ${To(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.maximum.toString()} ${u}`}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 ${To(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);if(s){let c=Number(o.minimum),u=Wf(c,s.unit.one,s.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 ${To(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.minimum.toString()} ${u}`}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 ${To(o.origin)} \u056C\u056B\u0576\u056B ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.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 ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${t[i.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":""}. ${C(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${To(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 ${To(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Zf(){return{localeError:q0()}}var W0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${i}, diterima ${c}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${D(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${t[i.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":""}: ${C(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 Gf(){return{localeError:W0()}}var Z0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${i}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${i}${o.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${t[i.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"}: ${C(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 Kf(){return{localeError:Z0()}}var G0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${c}`:`Input non valido: atteso ${i}, ricevuto ${c}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${D(o.values[0])}`:`Opzione non valida: atteso uno tra ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${t[i.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"}: ${C(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 Jf(){return{localeError:G0()}}var K0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\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: ${C(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(o.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(o.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${t[i.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":""}: ${C(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 Hf(){return{localeError:K0()}}var J0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\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 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}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 ${C(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\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"} ${s.verb} ${i}${o.maximum.toString()} ${s.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 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\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} ${s.verb} ${i}${o.minimum.toString()} ${s.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 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"-\u10D8\u10D7`:i.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 "${i.suffix}"-\u10D8\u10D7`:i.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 "${i.includes}"-\u10E1`:i.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 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${t[i.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"}: ${C(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 Xf(){return{localeError:J0()}}var H0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\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 ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()} ${s.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"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${t[i.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 ${C(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 wi(){return{localeError:H0()}}function Yf(){return wi()}var X0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${i}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\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 ${i}${o.maximum.toString()} ${s.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 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\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 ${i}${o.minimum.toString()} ${s.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 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${t[i.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":""}: ${C(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(s=>`'${s}'`).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 Qf(){return{localeError:X0()}}var Y0=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\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: ${C(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=e(o.origin),u=c?.unit??"\uC694\uC18C";return c?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${u} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${i}${s}`}case"too_small":{let i=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=e(o.origin),u=c?.unit??"\uC694\uC18C";return c?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${u} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${t[i.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: ${C(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 eg(){return{localeError:Y0()}}var Nr=r=>r.charAt(0).toUpperCase()+r.slice(1);function tg(r){let e=Math.abs(r),t=e%10,n=e%100;return n>=11&&n<=19||t===0?"many":t===1?"one":"few"}var Q0=()=>{let r={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 e(o,i,s,c){let u=r[o]??null;return u===null?u:{unit:u.unit[i],verb:u.verb[c][s?"inclusive":"notInclusive"]}}let t={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",jwt:"JWT",template_literal:"\u012Fvestis"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${D(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${C(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=n[o.origin]??o.origin,s=e(o.origin,tg(Number(o.maximum)),o.inclusive??!1,"smaller");if(s?.verb)return`${Nr(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.maximum.toString()} ${s.unit??"element\u0173"}`;let c=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Nr(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${o.maximum.toString()} ${s?.unit}`}case"too_small":{let i=n[o.origin]??o.origin,s=e(o.origin,tg(Number(o.minimum)),o.inclusive??!1,"bigger");if(s?.verb)return`${Nr(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.minimum.toString()} ${s.unit??"element\u0173"}`;let c=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Nr(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${o.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${t[i.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"}: ${C(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=n[o.origin]??o.origin;return`${Nr(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function og(){return{localeError:Q0()}}var ew=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\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 ${i}${o.maximum.toString()} ${s.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 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\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 ${i}${o.minimum.toString()} ${s.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 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`Invalid ${t[i.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"}: ${C(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 rg(){return{localeError:ew()}}var tw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${c}`:`Input tidak sah: dijangka ${i}, diterima ${c}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${D(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Terlalu besar: dijangka ${o.origin??"nilai"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Terlalu kecil: dijangka ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${t[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${C(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 ng(){return{localeError:tw()}}var ow=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} \u092E\u093E ${i}${o.maximum.toString()} ${s.unit} ${s.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} \u092E\u093E ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} ${i}${o.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${i.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${t[i.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":""}: ${C(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(s=>`'${s}'`).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 ig(){return{localeError:ow()}}var rw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${i}, ontving ${c}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${D(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin),c=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin),c=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${t[i.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":""}: ${C(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 sg(){return{localeError:rw()}}var nw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tal",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventa instanceof ${o.expected}, fekk ${c}`:`Ugyldig input: forventa ${i}, fekk ${c}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventa ${D(o.values[0])}`:`Ugyldig val: forventa eitt av ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${s.unit??"element"}`:`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${s.unit}`:`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${t[i.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"}: ${C(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 ag(){return{localeError:nw()}}var iw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${c}`:`Ugyldig input: forventet ${i}, fikk ${c}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${D(o.values[0])}`:`Ugyldig valg: forventet en av ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${t[i.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"}: ${C(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 cg(){return{localeError:iw()}}var sw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${c}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${D(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=o;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${t[i.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":""}: ${C(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 pg(){return{localeError:sw()}}var aw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \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 ${C(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.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 ${i}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${t[i.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"}: ${C(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 dg(){return{localeError:aw()}}var cw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${t[i.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":""}: ${C(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 lg(){return{localeError:cw()}}var pw=()=>{let r={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function e(s){return r[s]??null}let t={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",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tuplo",articles:n.masculine},record:{name:"registo",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"ficheiro",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(s,c){let u=o[s]??{name:`valor "${s}"`,articles:n.masculine};return`${u.articles[c]} ${u.name}`}return s=>{switch(s.code){case"invalid_type":{let c=i(s.expected,"indefinite"),u=A(s.input),m=i(u,"indefinite");return`Entrada inv\xE1lida: esperava ${c}, recebeu ${m}`}case"invalid_value":return s.values.length===1?`Entrada inv\xE1lida: esperava ${D(s.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${C(s.values,"|")}`;case"too_big":{let c=s.inclusive?"<=":"<",u=e(s.origin);return u?`Demasiado grande: esperava que ${i(s.origin,"definite")} tivesse ${c} ${s.maximum.toString()} ${u.unit??"elementos"}`:`Demasiado grande: esperava que ${i(s.origin,"definite")} fosse ${c} ${s.maximum.toString()}`}case"too_small":{let c=s.inclusive?">=":">",u=e(s.origin);return u?`Demasiado pequeno: esperava que ${i(s.origin,"definite")} tivesse ${c} ${s.minimum.toString()} ${u.unit??"elementos"}`:`Demasiado pequeno: esperava que ${i(s.origin,"definite")} fosse ${c} ${s.minimum.toString()}`}case"invalid_format":{let c=s;return c.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${c.prefix}"`:c.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${c.suffix}"`:c.format==="includes"?`Texto inv\xE1lido: deve incluir "${c.includes}"`:c.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${c.pattern}`:`Formato d${t[c.format]??s.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${s.divisor}`;case"unrecognized_keys":{let c=s.keys.length>1?"s":"";return`Chave${c} inv\xE1lida${c}: ${C(s.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(s.origin,"definite")}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${s.options.map(u=>`'${u}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(s.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function ug(){return{localeError:pw()}}var dw=()=>{let r={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function e(s){return r[s]??null}let t={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",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tupla",articles:n.feminine},record:{name:"registro",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"arquivo",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(s,c){let u=o[s]??{name:`valor "${s}"`,articles:n.masculine};return`${u.articles[c]} ${u.name}`}return s=>{switch(s.code){case"invalid_type":{let c=i(s.expected,"indefinite"),u=A(s.input),m=i(u,"indefinite");return`Entrada inv\xE1lida: esperava ${c}, recebeu ${m}`}case"invalid_value":return s.values.length===1?`Entrada inv\xE1lida: esperava ${D(s.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${C(s.values,"|")}`;case"too_big":{let c=s.inclusive?"<=":"<",u=e(s.origin);return u?`Grande demais: esperava que ${i(s.origin,"definite")} tivesse ${c} ${s.maximum.toString()} ${u.unit??"elementos"}`:`Grande demais: esperava que ${i(s.origin,"definite")} fosse ${c} ${s.maximum.toString()}`}case"too_small":{let c=s.inclusive?">=":">",u=e(s.origin);return u?`Pequeno demais: esperava que ${i(s.origin,"definite")} tivesse ${c} ${s.minimum.toString()} ${u.unit??"elementos"}`:`Pequeno demais: esperava que ${i(s.origin,"definite")} fosse ${c} ${s.minimum.toString()}`}case"invalid_format":{let c=s;return c.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${c.prefix}"`:c.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${c.suffix}"`:c.format==="includes"?`Texto inv\xE1lido: deve incluir "${c.includes}"`:c.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${c.pattern}`:`Formato d${t[c.format]??s.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${s.divisor}`;case"unrecognized_keys":{let c=s.keys.length>1?"s":"";return`Chave${c} inv\xE1lida${c}: ${C(s.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(s.origin,"definite")}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${s.options.map(u=>`'${u}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(s.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function mg(){return{localeError:dw()}}var lw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"intrare"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} s\u0103 fie ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Prea mic: a\u0219teptat ca ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${o.origin} s\u0103 fie ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${t[i.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: ${C(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 hg(){return{localeError:lw()}}function fg(r,e,t,n){let o=Math.abs(r),i=o%10,s=o%100;return s>=11&&s<=19?n:i===1?e:i>=2&&i<=4?t:n}var uw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);if(s){let c=Number(o.maximum),u=fg(c,s.unit.one,s.unit.few,s.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 ${i}${o.maximum.toString()} ${u}`}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 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);if(s){let c=Number(o.minimum),u=fg(c,s.unit.one,s.unit.few,s.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 ${i}${o.minimum.toString()} ${u}`}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 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${t[i.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":""}: ${C(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 gg(){return{localeError:uw()}}var mw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${o.expected}, obdr\u017Ean\xE9 ${c}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${i}, obdr\u017Ean\xE9 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.maximum.toString()} ${s.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.minimum.toString()} ${s.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${i.includes}"`:i.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${t[i.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: ${C(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 xg(){return{localeError:mw()}}var hw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${c}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${D(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${t[i.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"}: ${C(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 yg(){return{localeError:hw()}}var fw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${c}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${D(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${t[i.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"}: ${C(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 bg(){return{localeError:fw()}}var gw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"input"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\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 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}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 ${C(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\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"} ${i}${o.maximum.toString()} ${s.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"} ${i}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\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} ${i}${o.minimum.toString()} ${s.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} ${i}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.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 ${t[i.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":""}: ${C(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 Sg(){return{localeError:gw()}}var xw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={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 i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\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 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(o.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()} ${s.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${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(o.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.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 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${t[i.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: ${C(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 zg(){return{localeError:xw()}}var yw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u015Fablon"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return`N\xE4dogry baha: gara\u015Fylan ${i} \xFDerine ${c} 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: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()} ${s.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()} ${s.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`N\xE4dogry setir: "${i.prefix}" bilen ba\u015Flamaly`:i.format==="ends_with"?`N\xE4dogry setir: "${i.suffix}" bilen gutarmaly`:i.format==="includes"?`N\xE4dogry setir: "${i.includes}" saklamaly`:i.format==="regex"?`N\xE4dogry setir: ${i.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${t[i.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":""}: ${C(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 vg(){return{localeError:yw()}}var bw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${c}`}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: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${t[i.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":""}: ${C(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 wg(){return{localeError:bw()}}var Sw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\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 ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\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"} ${s.verb} ${i}${o.maximum.toString()} ${s.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 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\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} ${s.verb} ${i}${o.minimum.toString()} ${s.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 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${t[i.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":""}: ${C(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 Ii(){return{localeError:Sw()}}function Ig(){return Ii()}var zw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \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: ${C(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${o.maximum.toString()} ${s.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 ${i}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${i}${o.minimum.toString()} ${s.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 ${i}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${t[i.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":""}: ${C(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 kg(){return{localeError:zw()}}var vw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${c}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${D(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${t[i.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":""}: ${C(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 Pg(){return{localeError:vw()}}var ww=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${t[i.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: ${C(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 $g(){return{localeError:ww()}}var Iw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${t[i.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): ${C(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 Tg(){return{localeError:Iw()}}var kw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${t[i.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${C(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 Cg(){return{localeError:kw()}}var Pw=()=>{let r={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 e(o){return r[o]??null}let t={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",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=A(o.input),c=n[s]??s;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 ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${c}`}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 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${s.verb} ${i}${o.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${s.verb} ${i}${o.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.minimum}`}case"invalid_format":{let i=o;return i.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 "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${t[i.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: ${C(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 Og(){return{localeError:Pw()}}var Mg,od=Symbol("ZodOutput"),rd=Symbol("ZodInput"),ki=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Pi(){return new ki}(Mg=globalThis).__zod_globalRegistry??(Mg.__zod_globalRegistry=Pi());var _e=globalThis.__zod_globalRegistry;var Qe=Symbol.for("zod.compile.invalid"),Rg=Symbol.for("zod.compile.fallback"),pt=class extends Error{constructor(e="z.compile does not support async refinements, transforms, or checks"){super(e),this.name="ZodCompileAsyncError"}},de=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=t}};function Tw(r,e){try{return $i(r,{assertOnly:!0})}catch{return e}}function ad(r,e){try{let t=$i(r),n=he(r),o=r._zod.run,i=o.__originalRun??o,s=(c,u)=>{if(u?.async||u?.direction==="backward"||u?.skipChecks||u?.[Rg]||u&&zi(u,c.value))return i(c,u);let m=t(c.value);return m!==Qe?(c.value=m,c):(u&&(u[Rg]=!0),i(c,u))};return s.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=Tw(r,t),n._zod.run=s,o.__originalRun||Cw(n,r,t),n}catch(t){if(e?.strict)throw t;return r}}function Cw(r,e,t){let n=r,o=e;if(typeof o.safeParse=="function"){let i=o.safeParse;n.safeParse=(s,c)=>{let u=t(s);return u!==Qe?{success:!0,data:u}:i(s,c)}}if(typeof o.parse=="function"){let i=o.parse;n.parse=(s,c)=>{let u=t(s);return u!==Qe?u:i(s,c)}}}function $i(r,e){let t=!0;try{t=td(r)}catch{}if(t)throw new de("a schema whose subtree contains a reference cycle");let n={constants:new Map,constantCounter:0,varCounter:0},o=new Yt(["input"]),i=Ie(o,n,r,"input",!e?.assertOnly);o.write(i===null?"return true;":`return ${i};`);let s=["INVALID",...n.constants.keys()],c=[Qe,...n.constants.values()],u=o.content.join(`
|
|
75
|
+
`),m=e?.debug?s.length>0?`// Constants: ${s.join(", ")}
|
|
76
|
+
${u}`:u:"",h=Function,g=`return (input) => {
|
|
77
|
+
${u}
|
|
78
|
+
}`,y;try{y=new h(...s,g)(...c)}catch(S){throw new de(`this schema (generated code failed to evaluate: ${S.message})`)}return e?.debug&&(y.code=m),y}function Q(r,e){for(let[n,o]of r.constants)if(o===e)return n;let t=`c${r.constantCounter++}`;return r.constants.set(t,e),t}function ee(r){return`v${r.varCounter++}`}function Ow(r,e){let t=r._zod.run({value:e,issues:[]},{});if(t&&typeof t.then=="function")return Qe;let n=t;return n.issues.length===0?n.value:Qe}function Ve(r,e,t,n,o=!0){let i=r.content.length,s=e.constants.size,c=e.constantCounter,u=e.varCounter;try{return Ie(r,e,t,n,o)}catch(m){if(!(m instanceof de)||!m.islandable)throw m;if(r.content.length=i,e.constants.size>s){let h=Array.from(e.constants.keys()).slice(s);for(let g of h)e.constants.delete(g)}return e.constantCounter=c,e.varCounter=u,Mw(r,e,t,n)}}function Mw(r,e,t,n){let o=Q(e,t),i=Q(e,Ow),s=ee(e);return r.write(`const ${s} = ${i}(${o}, ${n});`),r.write(`if (${s} === INVALID) return INVALID;`),s}var Rw=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function Ew(r,e,t,n){let o=t._zod.def.checks;if(!o||o.length===0)return n;let i=n;for(let s of o){let c=s._zod.def;if(c.when&&!Rw.has(c.check))throw new de('check with a custom "when" condition');switch(c.check){case"greater_than":Dw(r,e,c,i);break;case"less_than":Aw(r,e,c,i);break;case"multiple_of":_w(r,e,c,i);break;case"number_format":_g(r,c,i);break;case"min_length":{let u=eo(c.minimum,"min_length"),m=nd(r,e,i,`${i}.length >= ${u} && ${i}.length < ${c.minimum*2}`);r.write(`if (${m} < ${u}) return INVALID;`);break}case"max_length":{let u=eo(c.maximum,"max_length"),m=nd(r,e,i,`${i}.length > ${u}`);r.write(`if (${m} > ${u}) return INVALID;`);break}case"length_equals":{let u=eo(c.length,"length_equals"),m=nd(r,e,i,`${i}.length >= ${u} && ${i}.length <= ${c.length*2}`);r.write(`if (${m} !== ${u}) return INVALID;`);break}case"min_size":r.write(`if (${i}.size < ${eo(c.minimum,"min_size")}) return INVALID;`);break;case"max_size":r.write(`if (${i}.size > ${eo(c.maximum,"max_size")}) return INVALID;`);break;case"size_equals":r.write(`if (${i}.size !== ${eo(c.size,"size_equals")}) return INVALID;`);break;case"string_format":i=Lg(r,e,c,i);break;case"custom":i=Vw(r,e,s,i);break;case"bigint_format":Lw(r,c,i);break;case"mime_type":jw(r,e,c,i);break;case"property":Fw(r,e,c,i);break;case"overwrite":{let u=ee(e);Nw(r,e,s,i,u),i=u;break}default:throw new de(`check type ${c.check}`)}}return i}function nd(r,e,t,n){let o=Q(e,Ht),i=ee(e);return r.write(`const ${i} = typeof ${t} === "string" && ${n} ? ${o}(${t}) : ${t}.length;`),i}function eo(r,e){if(typeof r!="number"||!Number.isFinite(r))throw new de(`${e} bound of type ${typeof r}`);return`${r}`}function Ag(r,e){if(typeof e=="bigint")return`${e}n`;if(typeof e=="number"){if(Number.isNaN(e))throw new de("comparison check with NaN bound");return`${e}`}if(e instanceof Date){if(Number.isNaN(e.getTime()))throw new de("comparison check with Invalid Date bound");return Q(r,e)}throw new de(`comparison check bound of type ${typeof e}`)}function Dw(r,e,t,n){let o=t.inclusive?"<":"<=";r.write(`if (${n} ${o} ${Ag(e,t.value)}) return INVALID;`)}function Aw(r,e,t,n){let o=t.inclusive?">":">=";r.write(`if (${n} ${o} ${Ag(e,t.value)}) return INVALID;`)}function _w(r,e,t,n){if(typeof t.value=="bigint"){if(t.value===BigInt(0))throw new de("multiple_of check with a zero divisor");r.write(`if (${n} % ${t.value}n !== 0n) return INVALID;`)}else{let o=Q(e,vr);r.write(`if (${o}(${n}, ${eo(t.value,"multiple_of")}) !== 0) return INVALID;`)}}function _g(r,e,t){let n=e.format;switch(n){case"safeint":r.write(`if (!Number.isSafeInteger(${t})) return INVALID;`);break;case"int32":r.write(`if (!Number.isInteger(${t}) || ${t} < -2147483648 || ${t} > 2147483647) return INVALID;`);break;case"uint32":r.write(`if (!Number.isInteger(${t}) || ${t} < 0 || ${t} > 4294967295) return INVALID;`);break;case"float32":r.write(`if (!Number.isFinite(${t}) || ${t} < -3.4028234663852886e38 || ${t} > 3.4028234663852886e38) return INVALID;`);break;case"float64":r.write(`if (!Number.isFinite(${t})) return INVALID;`);break;default:throw new de(`number format ${n}`)}}function Lw(r,e,t){let n=e.format;if(n)switch(n){case"int64":r.write(`if (${t} < -9223372036854775808n || ${t} > 9223372036854775807n) return INVALID;`);break;case"uint64":r.write(`if (${t} < 0n || ${t} > 18446744073709551615n) return INVALID;`);break;default:throw new de(`bigint format ${n}`)}}function jw(r,e,t,n){let o=t.mime;if(o&&o.length>0){let i=Q(e,new Set(o));r.write(`if (!${i}.has(${n}.type)) return INVALID;`)}}function Fw(r,e,t,n){let o=`${n}[${JSON.stringify(t.property)}]`;Ie(r,e,t.schema,o)}function Nw(r,e,t,n,o){let i=t._zod.def.tx;if(!i)throw new de("overwrite check without a transform function");if(ro(i))throw new pt("z.compile: async overwrite transforms are not supported");let s=Q(e,i);r.write(`const ${o} = ${s}(${n});`)}function id(){throw new Je}function cd(r){this.issues.push(r)}function Vw(r,e,t,n){let o=t._zod.def;if(o.fn){if(ro(o.fn))throw new pt("z.compile: async .refine() predicates are not supported");let i=Q(e,o.fn),s=Q(e,id),c=ee(e);return r.write(`const ${c} = ${i}(${n});`),r.write(`if (${c} instanceof Promise) ${s}();`),r.write(`if (!${c}) return INVALID;`),n}if(t._zod.check){if(ro(t._zod.check))throw new pt("z.compile: async .superRefine() / check functions are not supported");let i=t._zod.check,c=Q(e,m=>{let h={value:m,issues:[],addIssue:cd};return i(h)instanceof Promise&&id(),h.issues.length===0?h.value:Qe}),u=ee(e);return r.write(`const ${u} = ${c}(${n});`),r.write(`if (${u} === INVALID) return INVALID;`),u}throw new de("custom check without a predicate or check function")}var Uw=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 Lg(r,e,t,n){let o=t.format;if(o==="base64"){let u=Q(e,Dr);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(o==="base64url"){let u=Q(e,di);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(o==="jwt"){let u=Q(e,ui),m=Q(e,t.alg??null);return r.write(`if (!${u}(${n}, ${m})) return INVALID;`),n}if(o==="ipv6"){let u=Q(e,Er);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(o==="cidrv6"){let u=Q(e,pi);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(o==="credit_card"){let u=Q(e,li);return r.write(`if (!${u}(${n})) return INVALID;`),n}let i=t;if(o==="url"||o==="httpurl"||i.normalize||i.hostname!==void 0||i.protocol!==void 0){let u=Q(e,ii),m=Q(e,t),h=ee(e),g=ee(e);if(r.write(`const ${h} = ${n}.trim();`),r.write(`const ${g} = ${u}(${h}, ${m});`),r.write(`if (typeof ${g} === "number") return INVALID;`),i.hostname!==void 0){let w=Q(e,ai);r.write(`if (!${w}(${g}, ${m}.hostname)) return INVALID;`)}if(i.protocol!==void 0){let w=Q(e,ci);r.write(`if (!${w}(${g}, ${m}.protocol)) return INVALID;`)}let y=ee(e),S=i.normalize?`${g}.href`:`${Q(e,si)}(${h})`;return r.write(`const ${y} = ${S};`),y}let s=t.fn;if(s){if(ro(s))throw new de(`async string format ${o}`);let u=Q(e,s);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(Uw.has(o)&&t.pattern){let u=Q(e,t.pattern);return r.write(`${u}.lastIndex = 0;`),r.write(`if (!${u}.test(${n})) return INVALID;`),n}let c=t.format;switch(c){case"regex":throw new de("regex format without a pattern");case"lowercase":r.write(`if (${n} !== ${n}.toLowerCase()) return INVALID;`);break;case"uppercase":r.write(`if (${n} !== ${n}.toUpperCase()) return INVALID;`);break;case"includes":r.write(`if (!${n}.includes(${Ze(t.includes)})) return INVALID;`);break;case"starts_with":{let u=t.prefix;r.write(`if (${n}.slice(0, ${u.length}) !== ${Ze(u)}) return INVALID;`);break}case"ends_with":{let u=t.suffix;r.write(`if (${n}.slice(-${u.length}) !== ${Ze(u)}) return INVALID;`);break}default:throw new de(`string format ${c}`)}return n}function Ie(r,e,t,n,o=!0){let i=t._zod.def,s=i.type;if(i.coerce)throw new de(`coercion (z.coerce.${s}())`);let c=o||!!i.checks?.length,u;switch(s){case"string":u=Bw(r,e,t,n);break;case"number":u=qw(r,t,n);break;case"boolean":u=Ww(r,n);break;case"bigint":u=Zw(r,t,n);break;case"symbol":u=Gw(r,n);break;case"undefined":u=Kw(r,n);break;case"null":u=Jw(r,n);break;case"any":case"unknown":u=n;break;case"never":r.write("return INVALID;"),u=n;break;case"void":u=Hw(r,n);break;case"nan":u=Xw(r,n);break;case"date":u=Yw(r,n);break;case"object":u=Qw(r,e,t,n,c);break;case"optional":u=eI(r,e,t,n,c);break;case"nullable":u=rI(r,e,t,n,c);break;case"array":u=nI(r,e,t,n,c);break;case"literal":u=iI(r,e,t,n);break;case"enum":u=sI(r,e,t,n);break;case"readonly":{let m=Eg(r,e,t,n),h=ee(e);r.write(`const ${h} = Object.freeze(${m});`),u=h;break}case"success":Eg(r,e,t,n),u="true";break;case"default":case"prefault":u=aI(r,e,t,n);break;case"nonoptional":u=cI(r,e,t,n);break;case"tuple":u=pI(r,e,t,n);break;case"union":u=dI(r,e,t,n);break;case"intersection":u=mI(r,e,t,n);break;case"record":u=hI(r,e,t,n);break;case"map":u=gI(r,e,t,n);break;case"set":u=xI(r,e,t,n);break;case"file":u=yI(r,n);break;case"template_literal":u=bI(r,e,t,n);break;case"lazy":u=SI(r,e,t,n);break;case"pipe":u=zI(r,e,t,n);break;case"custom":u=vI(r,e,t,n);break;case"transform":u=kI(r,e,t,n);break;case"catch":u=II(r,e,t,n);break;default:throw new de(`schema type ${s}`)}return u===null?null:Ew(r,e,t,u)}function Bw(r,e,t,n){r.write(`if (typeof ${n} !== "string") return INVALID;`);let o=t._zod.def;return o.format===void 0?n:Lg(r,e,o,n)}function qw(r,e,t){r.write(`if (typeof ${t} !== "number" || !Number.isFinite(${t})) return INVALID;`);let n=e._zod.def;return n.check==="number_format"&&n.format&&_g(r,{format:n.format},t),t}function Ww(r,e){return r.write(`if (typeof ${e} !== "boolean") return INVALID;`),e}function Zw(r,e,t){r.write(`if (typeof ${t} !== "bigint") return INVALID;`);let n=e._zod.def;if(n.format)switch(n.format){case"int64":r.write(`if (${t} < -9223372036854775808n || ${t} > 9223372036854775807n) return INVALID;`);break;case"uint64":r.write(`if (${t} < 0n || ${t} > 18446744073709551615n) return INVALID;`);break}return t}function Gw(r,e){return r.write(`if (typeof ${e} !== "symbol") return INVALID;`),e}function Kw(r,e){return r.write(`if (${e} !== undefined) return INVALID;`),e}function Jw(r,e){return r.write(`if (${e} !== null) return INVALID;`),e}function Hw(r,e){return r.write(`if (${e} !== undefined) return INVALID;`),e}function Xw(r,e){return r.write(`if (typeof ${e} !== "number" || !Number.isNaN(${e})) return INVALID;`),e}function Yw(r,e){return r.write(`if (!(${e} instanceof Date) || Number.isNaN(${e}.getTime())) return INVALID;`),e}function Qw(r,e,t,n,o=!0){let i=t._zod.def;r.write(`if (typeof ${n} !== "object" || ${n} === null || Array.isArray(${n})) return INVALID;`);let s=i.shape,c=Object.keys(s),u=Object.getOwnPropertySymbols(s),m=u.length?[...c,...u]:c,h=F=>typeof F=="symbol"?Q(e,F):Ze(F),g=F=>typeof F=="symbol"?`[${h(F)}]`:Ze(F),y=s;if(c.includes("__proto__"))throw new de('object shape key "__proto__"');let S=new Map;for(let F of m){let H=y[F],re=h(F),ye=ee(e);if(r.write(`const ${ye} = ${n}[${re}];`),H._zod.optin!==void 0){let ce=ee(e);r.write(`let ${ce} = (() => {`),r.indented(Me=>{let Ct=Ve(Me,e,H,ye);Me.write(`return ${Ct};`)}),r.write("})();"),H._zod.optout==="optional"?(r.write(`if (${ce} === INVALID) {`),r.indented(Me=>{Me.write(`if (${re} in ${n}) return INVALID;`),Me.write(`${ce} = undefined;`)}),r.write("}")):r.write(`if (${ce} === INVALID) return INVALID;`),S.set(F,ce)}else{oI(H)&&r.write(`if (!(${re} in ${n})) return INVALID;`);let ce=Ve(r,e,H,ye,o);ce!==null&&S.set(F,ce)}}let w=i.catchall,$="none";if(w){let F=w._zod.def.type;if(F==="never"){let H=c.map(re=>`k !== ${Ze(re)}`).join(" && ")||"true";r.write(`for (const k in ${n}) {`),r.indented(re=>{re.write(`if (${H}) return INVALID;`)}),r.write("}")}else(F==="unknown"||F==="any")&&!w._zod.def.checks?.length?$="passthrough":$="schema"}let E=ee(e),V=m.some(F=>oo(y[F])||sd(y[F]));if(!o){if($==="schema"){let F=c.length>0?Q(e,new Set(c)):null;r.write(`for (const k in ${n}) {`),r.indented(H=>{H.write('if (k === "__proto__") continue;'),F&&H.write(`if (${F}.has(k)) continue;`);let re=ee(e);H.write(`const ${re} = ${n}[k];`),Ve(H,e,w,re,!1)}),r.write("}")}return null}if(V){r.write(`const ${E} = {};`);for(let F of m){let H=h(F),re=S.get(F);sd(y[F])?r.write(`if (${H} in ${n}) ${E}[${H}] = ${re};`):oo(y[F])?r.write(`if (${re} !== undefined || ${H} in ${n}) ${E}[${H}] = ${re};`):r.write(`${E}[${H}] = ${re};`)}}else{let F=m.map(H=>`${g(H)}: ${S.get(H)}`).join(", ");r.write(`const ${E} = { ${F} };`)}if($!=="none"){let F=c.length>0?Q(e,new Set(c)):null;r.write(`for (const k in ${n}) {`),r.indented(H=>{if(H.write('if (k === "__proto__") continue;'),F&&H.write(`if (${F}.has(k)) continue;`),$==="passthrough")H.write(`${E}[k] = ${n}[k];`);else{let re=ee(e);H.write(`const ${re} = ${n}[k];`);let ye=Ve(H,e,w,re);H.write(`${E}[k] = ${ye};`)}}),r.write("}")}return E}function eI(r,e,t,n,o=!0){let i=t._zod.def;if(tI(t))return Ie(r,e,i.innerType,n,o);if(i.innerType._zod.optin==="defaulted"){let c=ee(e),u=ee(e);return r.write(`let ${c};`),r.write(`if (${n} === undefined) {`),r.indented(m=>{m.write(`const ${u} = (() => {`),m.indented(h=>{let g=Ie(h,e,i.innerType,n);h.write(`return ${g};`)}),m.write("})();"),m.write(`if (${u} !== INVALID) ${c} = ${u};`)}),r.write("} else {"),r.indented(m=>{let h=Ie(m,e,i.innerType,n);m.write(`${c} = ${h};`)}),r.write("}"),c}let s=o?ee(e):null;return s&&r.write(`let ${s};`),r.write(`if (${n} !== undefined) {`),r.indented(c=>{let u=Ie(c,e,i.innerType,n,o);s&&u!==null&&c.write(`${s} = ${u};`)}),r.write("}"),s}function tI(r){return r._zod.traits?.has("$ZodExactOptional")===!0}function oI(r){return r._zod.optin===void 0&&to(r)}function to(r){if(r._zod.def.coerce)return!0;let e=r._zod.def;switch(e.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 e.innerType?to(e.innerType):!1;case"literal":return!!e.values?.includes(void 0);case"enum":return!!r._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return e.innerType?to(e.innerType):!0;case"catch":return!0;case"union":return e.options?e.options.some(to):!0;case"intersection":return!e.left||!e.right?!0:to(e.left)&&to(e.right);case"pipe":return e.in?to(e.in):!0;default:return!0}}function sd(r){return r._zod.optin==="optional"&&r._zod.optout==="optional"}function oo(r){let e=r._zod.def;switch(e.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!!e.values?.includes(void 0);case"enum":return!!r._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return e.innerType?oo(e.innerType):!0;case"union":return e.options?e.options.some(oo):!0;case"intersection":return!e.left||!e.right||oo(e.left)||oo(e.right);case"pipe":return e.out?oo(e.out):!0;default:return!0}}function rI(r,e,t,n,o=!0){let i=t._zod.def,s=o?ee(e):null;return s&&r.write(`let ${s} = null;`),r.write(`if (${n} !== null) {`),r.indented(c=>{let u=Ie(c,e,i.innerType,n,o);s&&u!==null&&c.write(`${s} = ${u};`)}),r.write("}"),s}function nI(r,e,t,n,o=!0){let i=t._zod.def;r.write(`if (!Array.isArray(${n})) return INVALID;`);let s=o?ee(e):null,c=ee(e),u=ee(e);return s&&r.write(`const ${s} = new Array(${n}.length);`),r.write(`for (let ${c} = 0; ${c} < ${n}.length; ${c}++) {`),r.indented(m=>{m.write(`const ${u} = ${n}[${c}];`);let h=Ve(m,e,i.element,u,o);s&&h!==null&&m.write(`${s}[${c}] = ${h};`)}),r.write("}"),s}function iI(r,e,t,n){let i=t._zod.def.values;if(i.length!==1){let c=Q(e,new Set(i));return r.write(`if (!${c}.has(${n})) return INVALID;`),n}let s=i[0];if(typeof s=="number"&&Number.isNaN(s)){let c=Q(e,new Set(i));return r.write(`if (!${c}.has(${n})) return INVALID;`),n}if(typeof s=="string")r.write(`if (${n} !== ${Ze(s)}) return INVALID;`);else if(typeof s=="number"||typeof s=="boolean")r.write(`if (${n} !== ${s}) return INVALID;`);else if(s===null)r.write(`if (${n} !== null) return INVALID;`);else if(s===void 0)r.write(`if (${n} !== undefined) return INVALID;`);else if(typeof s=="bigint")r.write(`if (${n} !== ${s}n) return INVALID;`);else throw new de(`literal type ${typeof s}`);return n}function sI(r,e,t,n){let o=t._zod.values;if(!o)throw new de("enum schema without enumerated values");let i=Q(e,o);return r.write(`if (!${i}.has(${n})) return INVALID;`),n}function Eg(r,e,t,n){let o=t._zod.def;return Ie(r,e,o.innerType,n)}function aI(r,e,t,n){let o=t._zod.def,s=Object.getOwnPropertyDescriptor(t._zod.def,"defaultValue")?()=>t._zod.def.defaultValue:void 0;if(t._zod.def.type==="prefault"){if(!s)return Ie(r,e,o.innerType,n);let u=Q(e,s),m=ee(e);return r.write(`let ${m} = ${n};`),r.write(`if (${n} === undefined) ${m} = ${u}();`),Ie(r,e,o.innerType,m)}let c=ee(e);if(s){let u=Q(e,s),m=Q(e,wr);r.write(`let ${c};`),r.write(`if (${n} === undefined) {`),r.indented(h=>{h.write(`${c} = ${m}(${u}());`)}),r.write("} else {"),r.indented(h=>{let g=Ie(h,e,o.innerType,n);h.write(`${c} = ${g} === undefined ? ${m}(${u}()) : ${g};`)}),r.write("}")}else r.write(`let ${c};`),r.write(`if (${n} !== undefined) {`),r.indented(u=>{let m=Ie(u,e,o.innerType,n);u.write(`${c} = ${m};`)}),r.write("}");return c}function cI(r,e,t,n){let o=t._zod.def,i=Ie(r,e,o.innerType,n),s=ee(e);return r.write(`const ${s} = ${i};`),r.write(`if (${s} === undefined) return INVALID;`),s}function pI(r,e,t,n){let o=t._zod.def,i=o.items,s=o.rest;r.write(`if (!Array.isArray(${n})) return INVALID;`);let c=Dg(i,"optin"),u=Dg(i,"optout");s?r.write(`if (${n}.length < ${c}) return INVALID;`):r.write(`if (${n}.length < ${c} || ${n}.length > ${i.length}) return INVALID;`);let m=ee(e);r.write(`const ${m} = [];`);for(let h=0;h<i.length;h++){let g=i[h];if(h>=u)r.write(`if (${m}.length === ${h}) {`),r.indented(y=>{y.write(`if (${h} < ${n}.length) {`),y.indented(S=>{let w=ee(e);S.write(`const ${w} = ${n}[${h}];`);let $=Ve(S,e,g,w);S.write(`${m}[${h}] = ${$};`)}),y.write("} else {"),y.indented(S=>{if(sd(g)){S.write(`${m}.length = ${h};`);return}let w=ee(e),$=ee(e);S.write(`const ${w} = undefined;`),S.write(`const ${$} = (() => {`),S.indented(E=>{let V=Ve(E,e,g,w);E.write(`return ${V};`)}),S.write("})();"),S.write(`if (${$} === INVALID || ${$} === undefined) ${m}.length = ${h};`),S.write(`else ${m}[${h}] = ${$};`)}),y.write("}")}),r.write("}");else{let y=ee(e);r.write(`const ${y} = ${n}[${h}];`);let S=Ve(r,e,g,y);r.write(`${m}[${h}] = ${S};`)}}if(s){let h=ee(e),g=ee(e);r.write(`for (let ${h} = ${i.length}; ${h} < ${n}.length; ${h}++) {`),r.indented(y=>{y.write(`const ${g} = ${n}[${h}];`);let S=Ve(y,e,s,g);y.write(`${m}[${h}] = ${S};`)}),r.write("}")}return m}function Dg(r,e){for(let t=r.length-1;t>=0;t--)if(!(e==="optin"?r[t]._zod.optin!==void 0:r[t]._zod.optout==="optional"))return t+1;return 0}function dI(r,e,t,n){let o=t._zod.def,i=o.options;if(o.discriminator)return lI(r,e,o,n);if(o.inclusive===!1)throw new de("exclusive unions (z.xor)");if(i.length===0)return r.write("return INVALID;"),n;if(i.length===1)return Ie(r,e,i[0],n);if(i.every(u=>u._zod.def.type==="literal"&&!u._zod.def.checks?.length)){let u=new Set(i.flatMap(h=>h._zod.def.values)),m=Q(e,u);return r.write(`if (!${m}.has(${n})) return INVALID;`),n}let c=ee(e);r.write(`let ${c};`);for(let u=0;u<i.length;u++){let m=i[u];u===0?r.write(`${c} = (() => {`):r.write(`if (${c} === INVALID) ${c} = (() => {`),r.indented(h=>{let g=Ie(h,e,m,n);h.write(`return ${g};`)}),r.write("})();")}return r.write(`if (${c} === INVALID) return INVALID;`),c}function lI(r,e,t,n){if(t.unionFallback)throw new de("discriminated union with unionFallback");if(t.options.length===0)return r.write("return INVALID;"),n;let o=ee(e),i=ee(e);r.write(`const ${o} = ${n}?.[${Ze(t.discriminator)}];`),r.write(`let ${i};`);let s=!0,c=new Set;for(let u of t.options){let m=u._zod.propValues?.[t.discriminator];if(!m||m.size===0)throw new de("discriminated union option without static discriminator values");for(let y of m){if(c.has(y))throw new de(`duplicate discriminator value ${String(y)}`);c.add(y)}let h=Array.from(m,y=>uI(e,o,y)),g=s?"if":"else if";r.write(`${g} (${h.join(" || ")}) {`),r.indented(y=>{let S=Ie(y,e,u,n);y.write(`${i} = ${S};`)}),r.write("}"),s=!1}return r.write("else { return INVALID; }"),i}function uI(r,e,t){if(typeof t=="string")return`${e} === ${Ze(t)}`;if(typeof t=="number")return Number.isNaN(t)?`Number.isNaN(${e})`:`${e} === ${t}`;if(typeof t=="boolean")return`${e} === ${t}`;if(t===null)return`${e} === null`;if(t===void 0)return`${e} === undefined`;if(typeof t=="bigint")return`${e} === ${t}n`;if(typeof t=="symbol"){let n=Q(r,t);return`${e} === ${n}`}throw new de(`literal discriminator value ${String(t)}`)}function mI(r,e,t,n){let o=t._zod.def,i=Ve(r,e,o.left,n),s=Ve(r,e,o.right,n),c=Q(e,$o),u=ee(e);return r.write(`const ${u} = ${c}(${i}, ${s});`),r.write(`if (!${u}.valid) return INVALID;`),`${u}.data`}function hI(r,e,t,n){let o=t._zod.def,i=Q(e,nt);r.write(`if (!${i}(${n})) return INVALID;`);let s=ee(e),c=ee(e),u=ee(e);r.write(`const ${s} = {};`);let m=o,h=m.partial?void 0:o.keyType._zod.values;if(h){let w=[];for(let E of h){if(!(typeof E=="string"||typeof E=="number"||typeof E=="symbol"))throw new de(`record key value ${String(E)}`);let V=typeof E=="number"?E.toString():E;if(V==="__proto__")throw new de('record key "__proto__"');w.push(V);let F=Q(e,E),H=Ie(r,e,o.keyType,F),re=ee(e);r.write(`const ${re} = ${n}[${fI(e,V)}];`);let ye=Ve(r,e,o.valueType,re);r.write(`${s}[${H}] = ${ye};`)}let $=Q(e,new Set(w));return r.write(`for (const ${c} in ${n}) {`),r.indented(E=>{E.write(`if (${$}.has(${c})) continue;`),m.mode==="loose"?E.write(`if (${c} !== "__proto__") ${s}[${c}] = ${n}[${c}];`):E.write("return INVALID;")}),r.write("}"),s}let g=o.keyType._zod.def;if(!(g.type==="string"&&g.format===void 0&&!g.coerce&&(g.checks?.length??0)===0)){let w=o.mode==="loose",$=Q(e,$i(o.keyType)),E=Q(e,At),V=Q(e,Object.prototype.propertyIsEnumerable),F=ee(e);return r.write(`for (const ${c} of Reflect.ownKeys(${n})) {`),r.indented(H=>{H.write(`if (${c} === "__proto__") continue;`),H.write(`if (!${V}.call(${n}, ${c})) continue;`),H.write(`let ${F} = ${$}(${c});`),H.write(`if (${F} === INVALID && typeof ${c} === "string" && ${E}.test(${c})) ${F} = ${$}(Number(${c}));`),w?H.write(`if (${F} === INVALID) { ${s}[${c}] = ${n}[${c}]; continue; }`):H.write(`if (${F} === INVALID) return INVALID;`),H.write(`if (${F} === "__proto__") continue;`);let re=ee(e);H.write(`const ${re} = ${n}[${c}];`);let ye=Ve(H,e,o.valueType,re);H.write(`${s}[${F}] = ${ye};`)}),r.write("}"),s}let S=Q(e,Object.prototype.propertyIsEnumerable);return r.write(`for (const ${c} of Reflect.ownKeys(${n})) {`),r.indented(w=>{w.write(`if (${c} === "__proto__") continue;`),w.write(`if (!${S}.call(${n}, ${c})) continue;`),w.write(`if (typeof ${c} !== "string") return INVALID;`),w.write(`const ${u} = ${n}[${c}];`);let $=Ve(w,e,o.valueType,u);w.write(`${s}[${c}] = ${$};`)}),r.write("}"),s}function fI(r,e){return typeof e=="string"?Ze(e):Q(r,e)}function gI(r,e,t,n){let o=t._zod.def;r.write(`if (!(${n} instanceof Map)) return INVALID;`);let i=ee(e),s=ee(e),c=ee(e);return r.write(`const ${i} = new Map();`),r.write(`for (const [${s}, ${c}] of ${n}) {`),r.indented(u=>{let m=Ie(u,e,o.keyType,s),h=Ie(u,e,o.valueType,c);u.write(`${i}.set(${m}, ${h});`)}),r.write("}"),i}function xI(r,e,t,n){let o=t._zod.def;r.write(`if (!(${n} instanceof Set)) return INVALID;`);let i=ee(e),s=ee(e);return r.write(`const ${i} = new Set();`),r.write(`for (const ${s} of ${n}) {`),r.indented(c=>{let u=Ie(c,e,o.valueType,s);c.write(`${i}.add(${u});`)}),r.write("}"),i}function yI(r,e){return r.write(`if (!(${e} instanceof File)) return INVALID;`),e}function bI(r,e,t,n){r.write(`if (typeof ${n} !== "string") return INVALID;`);let o=t._zod.pattern;if(o){let i=Q(e,o);r.write(`${i}.lastIndex = 0;`),r.write(`if (!${i}.test(${n})) return INVALID;`)}return n}function SI(r,e,t,n){let o=t._zod.def,i=Q(e,o.getter),s=Q(e,{parser:null});r.write(`if (!${s}.parser) {`),r.indented(u=>{u.write(`const inner = ${i}();`),u.write(`${s}.parser = function(input) {`),u.indented(m=>{m.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),m.write("return result.issues.length === 0 ? result.value : INVALID;")}),u.write("};")}),r.write("}");let c=ee(e);return r.write(`const ${c} = ${s}.parser(${n});`),r.write(`if (${c} === INVALID) return INVALID;`),c}function zI(r,e,t,n){let o=t._zod.def,i=Ie(r,e,o.in,n);if(o.transform){if(ro(o.transform))throw new pt("z.compile: async transforms in pipes are not supported");let s=o.transform,u=Q(e,h=>{let g={value:h,issues:[],addIssue:cd},y=s(h,g);return y instanceof Promise?Qe:g.issues.length===0?y:Qe}),m=ee(e);return r.write(`const ${m} = ${u}(${i});`),r.write(`if (${m} === INVALID) return INVALID;`),Ie(r,e,o.out,m)}else return Ie(r,e,o.out,i)}function ro(r){return typeof r=="function"&&(r.constructor.name==="AsyncFunction"||r[Symbol.toStringTag]==="AsyncFunction")}function vI(r,e,t,n){let o=t._zod.def;if(o.fn){if(ro(o.fn))throw new pt("z.compile: async custom predicates are not supported");let i=Q(e,o.fn),s=Q(e,id),c=ee(e);r.write(`const ${c} = ${i}(${n});`),r.write(`if (${c} instanceof Promise) ${s}();`),r.write(`if (!${c}) return INVALID;`)}else throw new de("custom schema without a predicate function");return n}function wI(r,e,t){let n=r._zod.run({value:t,issues:[]},{});if(n&&typeof n.then=="function")return Qe;let o=n;return o.issues.length===0?o.value:e()}function II(r,e,t,n){let o=t._zod.def;if(!o.catchValue[_n])throw new de("catch with a callback (only a constant catch value compiles)",!1);let i=ee(e);r.write(`let ${i} = (() => {`),r.indented(m=>{let h=Ve(m,e,o.innerType,n);m.write(`return ${h};`)}),r.write("})();");let s=Q(e,o.innerType),c=Q(e,o.catchValue),u=Q(e,wI);return r.write(`if (${i} === INVALID) {`),r.indented(m=>{m.write(`${i} = ${u}(${s}, ${c}, ${n});`),m.write(`if (${i} === INVALID) return INVALID;`)}),r.write("}"),i}function kI(r,e,t,n){let o=t._zod.def;if(o.transform){if(ro(o.transform))throw new pt("z.compile: async transforms are not supported");let i=o.transform,c=Q(e,m=>{let h={value:m,issues:[],addIssue:cd},g=i(m,h);return g instanceof Promise?Qe:h.issues.length===0?g:Qe}),u=ee(e);return r.write(`const ${u} = ${c}(${n});`),r.write(`if (${u} === INVALID) return INVALID;`),u}return n}function pd(r,e){return new r({type:"string",...N(e)})}function dd(r,e){return new r({type:"string",coerce:!0,...N(e)})}function Ti(r,e){return new r({type:"string",format:"email",check:"string_format",abort:!1,...N(e)})}function Ci(r,e){return new r({type:"string",format:"guid",check:"string_format",abort:!1,...N(e)})}function Oi(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,...N(e)})}function Mi(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...N(e)})}function Ri(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...N(e)})}function Ei(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...N(e)})}function Ur(r,e){return new r({type:"string",format:"url",check:"string_format",abort:!1,...N(e)})}function Di(r,e){return new r({type:"string",format:"emoji",check:"string_format",abort:!1,...N(e)})}function Ai(r,e){return new r({type:"string",format:"nanoid",check:"string_format",abort:!1,...N(e)})}function _i(r,e){return new r({type:"string",format:"cuid",check:"string_format",abort:!1,...N(e)})}function Li(r,e){return new r({type:"string",format:"cuid2",check:"string_format",abort:!1,...N(e)})}function ji(r,e){return new r({type:"string",format:"ulid",check:"string_format",abort:!1,...N(e)})}function Fi(r,e){return new r({type:"string",format:"xid",check:"string_format",abort:!1,...N(e)})}function Ni(r,e){return new r({type:"string",format:"ksuid",check:"string_format",abort:!1,...N(e)})}function Vi(r,e){return new r({type:"string",format:"ipv4",check:"string_format",abort:!1,...N(e)})}function Ui(r,e){return new r({type:"string",format:"ipv6",check:"string_format",abort:!1,...N(e)})}function ld(r,e){return new r({type:"string",format:"mac",check:"string_format",abort:!1,...N(e)})}function Bi(r,e){return new r({type:"string",format:"cidrv4",check:"string_format",abort:!1,...N(e)})}function qi(r,e){return new r({type:"string",format:"cidrv6",check:"string_format",abort:!1,...N(e)})}function Wi(r,e){return new r({type:"string",format:"base64",check:"string_format",abort:!1,...N(e)})}function Zi(r,e){return new r({type:"string",format:"base64url",check:"string_format",abort:!1,...N(e)})}function Gi(r,e){return new r({type:"string",format:"e164",check:"string_format",abort:!1,...N(e)})}function ud(r,e){return new r({type:"string",format:"credit_card",check:"string_format",abort:!1,...N(e)})}function Ki(r,e){return new r({type:"string",format:"jwt",check:"string_format",abort:!1,...N(e)})}var md={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Br(r,e){return new r({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...N(e)})}function qr(r,e){return new r({type:"string",format:"date",check:"string_format",...N(e)})}function Wr(r,e){return new r({type:"string",format:"time",check:"string_format",precision:null,...N(e)})}function Zr(r,e){return new r({type:"string",format:"duration",check:"string_format",...N(e)})}function hd(r,e){return new r({type:"number",checks:[],...N(e)})}function fd(r,e){return new r({type:"number",coerce:!0,checks:[],...N(e)})}function gd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"safeint",...N(e)})}function xd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"float32",...N(e)})}function yd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"float64",...N(e)})}function bd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"int32",...N(e)})}function Sd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"uint32",...N(e)})}function zd(r,e){return new r({type:"boolean",...N(e)})}function vd(r,e){return new r({type:"boolean",coerce:!0,...N(e)})}function wd(r,e){return new r({type:"bigint",...N(e)})}function Id(r,e){return new r({type:"bigint",coerce:!0,...N(e)})}function kd(r,e){return new r({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...N(e)})}function Pd(r,e){return new r({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...N(e)})}function $d(r,e){return new r({type:"symbol",...N(e)})}function Td(r,e){return new r({type:"undefined",...N(e)})}function Cd(r,e){return new r({type:"null",...N(e)})}function Od(r){return new r({type:"any"})}function Md(r){return new r({type:"unknown"})}function Rd(r,e){return new r({type:"never",...N(e)})}function Ed(r,e){return new r({type:"void",...N(e)})}function Dd(r,e){return new r({type:"date",...N(e)})}function Ad(r,e){return new r({type:"date",coerce:!0,...N(e)})}function _d(r,e){return new r({type:"nan",...N(e)})}function ft(r,e){return new Xn({check:"less_than",...N(e),value:r,inclusive:!1})}function et(r,e){return new Xn({check:"less_than",...N(e),value:r,inclusive:!0})}function gt(r,e){return new Yn({check:"greater_than",...N(e),value:r,inclusive:!1})}function tt(r,e){return new Yn({check:"greater_than",...N(e),value:r,inclusive:!0})}function Ji(r){return gt(0,r)}function Hi(r){return ft(0,r)}function Xi(r){return et(0,r)}function Yi(r){return tt(0,r)}function _t(r,e){return new vc({check:"multiple_of",...N(e),value:r})}function Lt(r,e){return new kc({check:"max_size",...N(e),maximum:r})}function xt(r,e){return new Pc({check:"min_size",...N(e),minimum:r})}function no(r,e){return new $c({check:"size_equals",...N(e),size:r})}function io(r,e){return new Tc({check:"max_length",...N(e),maximum:r})}function kt(r,e){return new Cc({check:"min_length",...N(e),minimum:r})}function so(r,e){return new Oc({check:"length_equals",...N(e),length:r})}function Co(r,e){return new Mc({check:"string_format",format:"regex",...N(e),pattern:r})}function Oo(r){return new Rc({check:"string_format",format:"lowercase",...N(r)})}function Mo(r){return new Ec({check:"string_format",format:"uppercase",...N(r)})}function Ro(r,e){return new Dc({check:"string_format",format:"includes",...N(e),includes:r})}function Eo(r,e){return new Ac({check:"string_format",format:"starts_with",...N(e),prefix:r})}function Do(r,e){return new _c({check:"string_format",format:"ends_with",...N(e),suffix:r})}function Qi(r,e,t){return new Qn({check:"property",property:r,schema:e,...N(t)})}function es(r){return Object.entries(r).map(([e,t])=>new Qn({check:"property",property:e,schema:t}))}function Ao(r,e){return new Lc({check:"mime_type",mime:r,...N(e)})}function dt(r){return new jc({check:"overwrite",tx:r})}function _o(r){return dt(e=>e.normalize(r))}function Lo(){return dt(r=>r.trim())}function jo(){return dt(r=>r.toLowerCase())}function Fo(){return dt(r=>r.toUpperCase())}function No(){return dt(r=>va(r))}function Ld(r,e,t){return new r({type:"array",element:e,...N(t)})}function PI(r,e,t){return new r({type:"union",options:e,...N(t)})}function $I(r,e,t){return new r({type:"union",options:e,inclusive:!1,...N(t)})}function TI(r,e,t,n){return new r({type:"union",options:t,discriminator:e,...N(n)})}function CI(r,e,t){return new r({type:"intersection",left:e,right:t})}function OI(r,e,t,n){let o=t instanceof te,i=o?n:t,s=o?t:null;return new r({type:"tuple",items:e,rest:s,...N(i)})}function MI(r,e,t,n){return new r({type:"record",keyType:e,valueType:t,...N(n)})}function RI(r,e,t,n){return new r({type:"map",keyType:e,valueType:t,...N(n)})}function EI(r,e,t){return new r({type:"set",valueType:e,...N(t)})}function DI(r,e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new r({type:"enum",entries:n,...N(t)})}function AI(r,e,t){return new r({type:"enum",entries:e,...N(t)})}function _I(r,e,t){return new r({type:"literal",values:Array.isArray(e)?e:[e],...N(t)})}function jd(r,e){return new r({type:"file",...N(e)})}function LI(r,e){return new r({type:"transform",transform:e})}function jI(r,e){return new r({type:"optional",innerType:e})}function FI(r,e){return new r({type:"nullable",innerType:e})}function NI(r,e,t){return new r({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():wr(t)}})}function VI(r,e,t){return new r({type:"nonoptional",innerType:e,...N(t)})}function UI(r,e){return new r({type:"success",innerType:e})}function BI(r,e,t){return new r({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Ma(t)})}function qI(r,e,t){return new r({type:"pipe",in:e,out:t})}function WI(r,e){return new r({type:"readonly",innerType:e})}function ZI(r,e,t){return new r({type:"template_literal",parts:e,...N(t)})}function GI(r,e){return new r({type:"lazy",getter:e})}function KI(r,e){return new r({type:"promise",innerType:e})}function Fd(r,e,t){let n=N(t);return n.abort??(n.abort=!0),new r({type:"custom",check:"custom",fn:e,...n})}function Nd(r,e,t){return new r({type:"custom",check:"custom",fn:e,...N(t)})}function Vd(r,e){let t=jg(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(zo(o,n.value,t._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(zo(i))}},r(n.value,n)),e);return t}function jg(r,e){let t=new be({check:"custom",...N(e)});return t._zod.check=r,t}function Ud(r){let e=new be({check:"describe"});return e._zod.onattach=[t=>{let n=_e.get(t)??{};_e.add(t,{...n,description:r})}],e._zod.check=()=>{},e}function Bd(r){let e=new be({check:"meta"});return e._zod.onattach=[t=>{let n=_e.get(t)??{};_e.add(t,{...n,...r})}],e._zod.check=()=>{},e}function qd(r,e){let t=N(e),n=t.truthy??["true","1","yes","on","y","enabled"],o=t.falsy??["false","0","no","off","n","disabled"];t.case!=="sensitive"&&(n=n.map(S=>typeof S=="string"?S.toLowerCase():S),o=o.map(S=>typeof S=="string"?S.toLowerCase():S));let i=new Set(n),s=new Set(o),c=r.Codec??Lr,u=r.Boolean??Ar,m=r.String??Qt,h=new m({type:"string",error:t.error}),g=new u({type:"boolean",error:t.error}),y=new c({type:"pipe",in:h,out:g,transform:((S,w)=>{let $=S;return t.case!=="sensitive"&&($=$.toLowerCase()),i.has($)?!0:s.has($)?!1:(w.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:w.value,inst:y,continue:!1}),{})}),reverseTransform:((S,w)=>S===!0?n[0]||"true":o[0]||"false"),error:t.error});return y._zod.bag.truthy=n,y._zod.bag.falsy=o,y._zod.bag.case=t.case??"insensitive",y}function Vo(r,e,t,n={}){let o=N(n),i={check:"string_format",type:"string",format:e,fn:typeof t=="function"?t:c=>t.test(c),...o};return t instanceof RegExp&&(i.pattern=t),new r(i)}function Gr(r,...e){for(let t of e)for(let n of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,n)&&$e(r,n,t[n]);return r}function jt(r){let e=r?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:r.processors??{},metadataRegistry:r?.metadata??_e,target:e,unrepresentable:r?.unrepresentable??"throw",override:r?.override??(()=>{}),io:r?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:r?.cycles??"ref",reused:r?.reused??"inline",intersections:[],deferred:[],external:r?.external??void 0}}function Ee(r,e,t,n,o){let i=typeof e.unrepresentable=="function"?e.unrepresentable({zodSchema:r,path:n.path,message:o}):e.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(t,i),!0}function fe(r,e,t={path:[],schemaPath:[]}){var n;let o=r._zod.def,i=e.seen.get(r);if(i)return i.count++,t.schemaPath.includes(r)&&(i.cycle=t.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:t.path};e.seen.set(r,s),e.sharedDefsExtractedFor=void 0,e.sharedEmitDoneFor=void 0;let c=r._zod.toJSONSchema?.();if(c)s.schema=c;else{let h={...t,schemaPath:[...t.schemaPath,r],path:t.path};if(r._zod.processJSONSchema)r._zod.processJSONSchema(e,s.schema,h);else{let y=s.schema,S=e.processors[o.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);S(r,e,y,h)}let g=r._zod.parent;g&&(s.ref||(s.ref=g),fe(g,e,h),e.seen.get(g).isParent=!0)}let u=e.metadataRegistry.get(r);return u&&Gr(s.schema,u),e.io==="input"&&Ue(r)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(r).schema}function Fg(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}function Ft(r,e){let t=r.seen.get(e);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");if(r.external&&r.sharedDefsExtractedFor===r.external)return;let n=new Map;for(let s of r.seen.entries()){let c=r.metadataRegistry.get(s[0])?.id;if(c){let u=n.get(c);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(c,s[0])}}let o=s=>{let c=r.target==="draft-2020-12"?"$defs":"definitions";if(r.external){let g=r.external.registry.get(s[0])?.id,y=r.external.uri??(w=>w);if(g)return{ref:y(g)};let S=s[1].defId??s[1].schema.id??`schema${r.counter++}`;return s[1].defId=S,{defId:S,ref:`${y("__shared")}#/${c}/${Fg(S)}`}}let u="#",m=`${u}/${c}/`;if(s[1]===t&&!s[1].schema.id)return{ref:u};let h=s[1].schema.id??`__schema${r.counter++}`;return{defId:h,ref:m+Fg(h)}},i=s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:u,defId:m}=o(s);c.def={...c.schema},m&&(c.defId=m);let h=c.schema;for(let g in h)delete h[g];h.$ref=u};if(r.cycles==="throw")for(let s of r.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
79
|
+
|
|
80
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of r.seen.entries()){let c=s[1];if(e===s[0]){i(s);continue}if(r.external){let m=r.external.registry.get(s[0])?.id;if(e!==s[0]&&m){i(s);continue}}if(r.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&r.reused==="ref"){i(s);continue}}r.external&&(r.sharedDefsExtractedFor=r.external)}function Ug(r){let e=r.anyOf;if(!Array.isArray(e)||e.length===0||r.type!==void 0)return;let t=[];for(let n of e){if(!n||typeof n!="object")return;Ug(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;t.includes(s)||t.push(s)}}delete r.anyOf,r.type=t.length===1?t[0]:t}var Bg=new Set(["type","properties","required","additionalProperties"]),Ng=["oneOf","anyOf"];function Vg(r){let e=r.additionalProperties;return e===void 0||e===!1||typeof e!="object"||e===null?null:Object.keys(e).length?e:null}function Wd(r){let e=[];for(let i of r){if(typeof i!="object"||i.type!=="object")return null;for(let s in i)if(!Bg.has(s))return null;e.push(i)}let t={},n=new Set;for(let i of e){for(let s in i.properties){if(Object.prototype.hasOwnProperty.call(t,s))continue;let c=[];for(let m of e){let h=m.properties?.[s]??Vg(m);h!=null&&(c.some(g=>JSON.stringify(g)===JSON.stringify(h))||c.push(h))}let u=c.length===1?c[0]:Wd(c)??{allOf:c};$e(t,s,u)}for(let s of i.required??[])n.add(s)}let o={type:"object",properties:t};if(n.size&&(o.required=[...n]),e.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let s of e){let c=Vg(s);c&&!i.some(u=>JSON.stringify(u)===JSON.stringify(c))&&i.push(c)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function JI(r){let e=r.allOf;if(!Array.isArray(e)||e.length<2)return;for(let o of Bg)if(o in r)return;let t=e.filter(o=>Ng.some(i=>Array.isArray(o[i]))),n=null;if(!t.length)n=Wd(e);else{let o=t[0],i=Ng.find(u=>Array.isArray(o[u]));if(Object.keys(o).length!==1)return;let s=e.filter(u=>u!==o),c=o[i].map(u=>Wd([...s,u]));if(c.some(u=>!u))return;n={[i]:c}}n&&(delete r.allOf,Gr(r,n))}function Nt(r,e){let t=r.seen.get(e);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=c=>{let u=r.seen.get(c);if(u.ref===null)return;let m=u.def??u.schema,h={...m},g=u.ref;if(u.ref=null,g){n(g);let S=r.seen.get(g),w=S.schema;if(w.$ref&&(r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(w)):Gr(m,w),Gr(m,h),c._zod.parent===g)for(let E in m)E==="$ref"||E==="allOf"||E in h||delete m[E];if(w.$ref&&S.def)for(let E in m)E==="$ref"||E==="allOf"||E in S.def&&JSON.stringify(m[E])===JSON.stringify(S.def[E])&&delete m[E]}let y=c._zod.parent;if(y&&y!==g){n(y);let S=r.seen.get(y);if(S?.schema.$ref&&(m.$ref=S.schema.$ref,S.def))for(let w in m)w==="$ref"||w==="allOf"||w in S.def&&JSON.stringify(m[w])===JSON.stringify(S.def[w])&&delete m[w]}r.override({zodSchema:c,jsonSchema:m,path:u.path??[]})};if(!r.external||r.sharedEmitDoneFor!==r.external){for(let c of[...r.seen.entries()].reverse())n(c[0]);if(r.target!=="openapi-3.0")for(let c of r.seen.entries())Ug(c[1].def??c[1].schema);for(let c of r.deferred)c();if(r.intersections.length){let c=new Map;for(let u of r.seen.values())for(let m of[u.schema,u.def]){let h=m?.allOf;if(!Array.isArray(h))continue;let g=c.get(h);g?g.push(m):c.set(h,[m])}for(let u of r.intersections)for(let m of c.get(u)??[])JI(m)}}let o={};if(r.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":r.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":r.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":r.target,r.external?.uri){let c=r.external.registry.get(e)?.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=r.external.uri(c)}Gr(o,t.defId?t.schema:t.def??t.schema);let i=r.metadataRegistry.get(e)?.id;i!==void 0&&o.id===i&&delete o.id;let s=r.external?.defs??{};if(!r.external||r.sharedEmitDoneFor!==r.external)for(let c of r.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,$e(s,u.defId,u.def))}r.external&&(r.sharedEmitDoneFor=r.external),r.external||Object.keys(s).length>0&&(r.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{let c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...e["~standard"],jsonSchema:{input:Uo(e,"input",r.processors),output:Uo(e,"output",r.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Ue(r,e){let t=e??{seen:new Set};if(t.seen.has(r))return!1;t.seen.add(r);let n=r._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Ue(n.element,t);if(n.type==="set")return Ue(n.valueType,t);if(n.type==="lazy")return Ue(n.getter(),t);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return Ue(n.innerType,t);if(n.type==="intersection")return Ue(n.left,t)||Ue(n.right,t);if(n.type==="record"||n.type==="map")return Ue(n.keyType,t)||Ue(n.valueType,t);if(n.type==="pipe")return r._zod.traits.has("$ZodCodec")?!0:Ue(n.in,t)||Ue(n.out,t);if(n.type==="object"){for(let o in n.shape)if(Ue(n.shape[o],t))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(Ue(o,t))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(Ue(o,t))return!0;return!!(n.rest&&Ue(n.rest,t))}return!1}var Zd=(r,e={})=>t=>{let n=jt({...t,processors:e});return fe(r,n),Ft(n,r),Nt(n,r)},Uo=(r,e,t={})=>n=>{let{libraryOptions:o,target:i}=n??{},s=jt({...o??{},target:i,io:e,processors:t});return fe(r,s),Ft(s,r),Nt(s,r)};var HI={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Jd=(r,e,t,n)=>{let o=t;o.type="string";let{minimum:i,maximum:s,format:c,patterns:u,contentEncoding:m,laxFormat:h}=r._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),c&&(o.format=HI[c]??c,o.format===""&&delete o.format,(c==="time"||h)&&delete o.format),m&&(o.contentEncoding=m),u&&u.size>0){let g=[...u];g.length===1?o.pattern=g[0].source:g.length>1&&(o.allOf=[...g.map(y=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},Hd=(r,e,t,n)=>{let o=t,{minimum:i,maximum:s,format:c,multipleOf:u,exclusiveMaximum:m,exclusiveMinimum:h}=r._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number";let g=typeof h=="number"&&h>=(i??Number.NEGATIVE_INFINITY),y=typeof m=="number"&&m<=(s??Number.POSITIVE_INFINITY),S=e.target==="draft-04"||e.target==="openapi-3.0";g?S?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h:typeof i=="number"&&(o.minimum=i),y?S?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof s=="number"&&(o.maximum=s),typeof u=="number"&&(Number.isFinite(u)&&u!==0?o.multipleOf=Math.abs(u):Ee(r,e,o,n,`A multipleOf divisor of ${u} cannot be represented in JSON Schema`))},Xd=(r,e,t,n)=>{t.type="boolean"},Yd=(r,e,t,n)=>{Ee(r,e,t,n,"BigInt cannot be represented in JSON Schema")},Qd=(r,e,t,n)=>{Ee(r,e,t,n,"Symbols cannot be represented in JSON Schema")},el=(r,e,t,n)=>{e.target==="openapi-3.0"?(t.type="string",t.nullable=!0,t.enum=[null]):t.type="null"},tl=(r,e,t,n)=>{Ee(r,e,t,n,"Undefined cannot be represented in JSON Schema")},ol=(r,e,t,n)=>{Ee(r,e,t,n,"Void cannot be represented in JSON Schema")},rl=(r,e,t,n)=>{t.not={}},nl=(r,e,t,n)=>{},il=(r,e,t,n)=>{},sl=(r,e,t,n)=>{Ee(r,e,t,n,"Date cannot be represented in JSON Schema")},al=(r,e,t,n)=>{let o=r._zod.def,i=Sr(o.entries);if(i.length===0){t.not={};return}i.every(s=>typeof s=="number")&&(t.type="number"),i.every(s=>typeof s=="string")&&(t.type="string"),t.enum=i},cl=(r,e,t,n)=>{let o=r._zod.def;if(o.values.length===0){t.not={};return}let i=[];for(let s of o.values)if(s===void 0){if(Ee(r,e,t,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s=="bigint"){if(Ee(r,e,t,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];t.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?t.enum=[s]:t.const=s}else i.every(s=>typeof s=="number")&&(t.type="number"),i.every(s=>typeof s=="string")&&(t.type="string"),i.every(s=>typeof s=="boolean")&&(t.type="boolean"),i.every(s=>s===null)&&(t.type="null"),t.enum=i},pl=(r,e,t,n)=>{Ee(r,e,t,n,"NaN cannot be represented in JSON Schema")},dl=(r,e,t,n)=>{let o=t,i=r._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},ll=(r,e,t,n)=>{let o=t,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=r._zod.bag;s!==void 0&&(i.minLength=s),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=u.map(m=>({contentMediaType:m}))):Object.assign(o,i)},ul=(r,e,t,n)=>{t.type="boolean"},ml=(r,e,t,n)=>{Ee(r,e,t,n,"Custom types cannot be represented in JSON Schema")},hl=(r,e,t,n)=>{Ee(r,e,t,n,"Function types cannot be represented in JSON Schema")},fl=(r,e,t,n)=>{Ee(r,e,t,n,"Transforms cannot be represented in JSON Schema")},gl=(r,e,t,n)=>{Ee(r,e,t,n,"Map cannot be represented in JSON Schema")},xl=(r,e,t,n)=>{Ee(r,e,t,n,"Set cannot be represented in JSON Schema")},yl=(r,e,t,n)=>{let o=t,i=r._zod.def,{minimum:s,maximum:c}=r._zod.bag;typeof s=="number"&&(o.minItems=s),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=fe(i.element,e,{...n,path:[...n.path,"items"]})};function Kr(r){let e=r._zod.def;return e.type==="pipe"&&e.in._zod.traits.has("$ZodTransform")?Kr(e.out):e.type==="catch"?Kr(e.innerType):r._zod.optin}var bl=(r,e,t,n)=>{let o=t,i=r._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&Ee(r,e,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let h in s)$e(o.properties,h,fe(s[h],e,{...n,path:[...n.path,"properties",h]}));let u=new Set(Object.keys(s)),m=new Set([...u].filter(h=>{let g=i.shape[h];return e.io==="input"?Kr(g)===void 0:g._zod.optout===void 0}));m.size>0&&(o.required=Array.from(m)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=fe(i.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(o.additionalProperties=!1)},os=(r,e,t,n)=>{let o=r._zod.def,i=o.inclusive===!1,s=o.options.map((c,u)=>fe(c,e,{...n,path:[...n.path,i?"oneOf":"anyOf",u]}));i?t.oneOf=s:t.anyOf=s},Sl=(r,e,t,n)=>{let o=r._zod.def,i=fe(o.left,e,{...n,path:[...n.path,"allOf",0]}),s=fe(o.right,e,{...n,path:[...n.path,"allOf",1]}),c=m=>"allOf"in m&&Object.keys(m).length===1,u=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];t.allOf=u,e.intersections.push(u)},zl=(r,e,t,n)=>{let o=t,i=r._zod.def;o.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",c=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map(($,E)=>fe($,e,{...n,path:[...n.path,s,E]})),m=i.rest?fe(i.rest,e,{...n,path:[...n.path,c,...e.target==="openapi-3.0"?[i.items.length]:[]]}):null,h=i.items.length;for(;h>0;){let $=i.items[h-1];if(!(e.io==="input"?Kr($)!==void 0:$._zod.optout==="optional"))break;h--}let g=i.items.length,y=!i.rest;e.target==="draft-2020-12"?(o.prefixItems=u,y?o.items=!1:m&&(o.items=m),h>0&&(o.minItems=h),y&&(o.maxItems=g)):e.target==="openapi-3.0"?(o.items={anyOf:u},m&&o.items.anyOf.push(m),h>0&&(o.minItems=h),y&&(o.maxItems=g)):(o.items=u,y?o.additionalItems=!1:m&&(o.additionalItems=m),h>0&&(o.minItems=h),y&&(o.maxItems=g));let{minimum:S,maximum:w}=r._zod.bag;typeof S=="number"&&(o.minItems=S),typeof w=="number"&&(o.maxItems=w)};function Gd(r,e,t){if(e.$ref){if(t.has(e))return e;t.add(e);let w=r.get(e)?.def;if(!w)return e;let $=Gd(r,w,t);return $===w?e:$}for(let w of["anyOf","oneOf"]){let $=e[w];if(!Array.isArray($))continue;let E=$.map(V=>Gd(r,V,t));E.some((V,F)=>V!==$[F])&&(e={...e,[w]:E})}let n=Array.isArray(e.type)?e.type:[e.type],o=!n.includes("string")&&n.some(w=>w==="number"||w==="integer"),i=e.enum??(e.const!==void 0?[e.const]:void 0);if(!o&&!i?.some(w=>typeof w=="number"))return e;let{minimum:s,maximum:c,exclusiveMinimum:u,exclusiveMaximum:m,multipleOf:h,format:g,id:y,...S}=e;return S.enum?S.enum=S.enum.map(w=>typeof w=="number"?String(w):w):typeof S.const=="number"&&(S.const=String(S.const)),o&&(S.type="string",i||(S.pattern=(n.includes("number")?At:Or).source)),S}var Kd=new WeakMap;function XI(r){let e=new Map;for(let n of r.seen.values())n.def&&!e.has(n.schema)&&e.set(n.schema,n);let t=new Map;for(let n of Kd.get(r)??[]){let o=r.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||t.has(i))continue;let s=Gd(e,i,new Set);s!==i&&t.set(i,s)}if(t.size)for(let n of r.seen.values())for(let o of[n.schema,n.def]){let i=o&&t.get(o.propertyNames);i&&(o.propertyNames=i)}}var vl=(r,e,t,n)=>{let o=t,i=r._zod.def;o.type="object";let s=i.keyType,u=s._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){let g=fe(i.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let y of u)$e(o.patternProperties,y.source,g)}else{if(e.target==="draft-07"||e.target==="draft-2020-12"){o.propertyNames=fe(i.keyType,e,{...n,path:[...n.path,"propertyNames"]});let g=Kd.get(e);g||(g=[],Kd.set(e,g),e.deferred.push(()=>XI(e))),g.push(r)}o.additionalProperties=fe(i.valueType,e,{...n,path:[...n.path,"additionalProperties"]})}let m=s._zod.values,h=e.io==="input"&&Kr(i.valueType)!==void 0;if(m&&!i.partial&&!h){let g=[...m].filter(y=>typeof y=="string"||typeof y=="number");g.length>0&&(o.required=g.map(String))}},wl=(r,e,t,n)=>{let o=r._zod.def,i=fe(o.innerType,e,n),s=e.seen.get(r);e.target==="openapi-3.0"?(s.ref=o.innerType,t.nullable=!0):t.anyOf=[i,{type:"null"}]},Il=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType},kl=Symbol();function qg(r,e,t,n,o){let i=!1,s=JSON.stringify(r,(c,u)=>typeof u!="bigint"?u:(i=!0,null));return i?(Ee(e,t,n,o,"BigInt defaults cannot be represented in JSON Schema"),kl):JSON.parse(s)}var Pl=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType;let s=qg(o.defaultValue,r,e,t,n);s!==kl&&(t.default=s)},$l=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);if(i.ref=o.innerType,e.io!=="input")return;let s=qg(o.defaultValue,r,e,t,n);s!==kl&&(t._prefault=s)},Tl=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{Ee(r,e,t,n,"Dynamic catch values are not supported in JSON Schema");return}t.default=s},Cl=(r,e,t,n)=>{let o=r._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=e.io==="input"?i?o.out:o.in:o.out;fe(s,e,n);let c=e.seen.get(r);c.ref=s},Ol=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType,t.readOnly=!0},Ml=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType},rs=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType},Rl=(r,e,t,n)=>{let o=r._zod.innerType;fe(o,e,n);let i=e.seen.get(r);i.ref=o},ts={string:Jd,number:Hd,boolean:Xd,bigint:Yd,symbol:Qd,null:el,undefined:tl,void:ol,never:rl,any:nl,unknown:il,date:sl,enum:al,literal:cl,nan:pl,template_literal:dl,file:ll,success:ul,custom:ml,function:hl,transform:fl,map:gl,set:xl,array:yl,object:bl,union:os,intersection:Sl,tuple:zl,record:vl,nullable:wl,nonoptional:Il,default:Pl,prefault:$l,catch:Tl,pipe:Cl,readonly:Ol,promise:Ml,optional:rs,lazy:Rl};function ns(r,e){if("_idmap"in r){let n=r,o=jt({...e,processors:ts}),i={};for(let u of n._idmap.entries()){let[m,h]=u;fe(h,o)}let s={},c={registry:n,uri:e?.uri,defs:i};o.external=c;for(let u of n._idmap.entries()){let[m,h]=u;Ft(o,h),$e(s,m,Nt(o,h))}if(Object.keys(i).length>0){let u=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:i}}return{schemas:s}}let t=jt({...e,processors:ts});return fe(r,t),Ft(t,r),Nt(t,r)}var is=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(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),this.ctx=jt({processors:ts,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return fe(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Ft(this.ctx,e);let n=Nt(this.ctx,e),{"~standard":o,...i}=n;return i}};var Wg={};var Xo={};It(Xo,{ZodAny:()=>Hl,ZodArray:()=>eu,ZodBase64:()=>ws,ZodBase64URL:()=>Is,ZodBigInt:()=>Jo,ZodBigIntFormat:()=>$s,ZodBoolean:()=>Ko,ZodCIDRv4:()=>zs,ZodCIDRv6:()=>vs,ZodCUID:()=>hs,ZodCUID2:()=>fs,ZodCatch:()=>bu,ZodCodec:()=>on,ZodCreditCard:()=>Zl,ZodCustom:()=>rn,ZodCustomStringFormat:()=>Zo,ZodDate:()=>Xr,ZodDefault:()=>mu,ZodDiscriminatedUnion:()=>ou,ZodE164:()=>ks,ZodEmail:()=>ds,ZodEmoji:()=>us,ZodEnum:()=>qo,ZodExactOptional:()=>Os,ZodFile:()=>pu,ZodFunction:()=>Tu,ZodGUID:()=>ls,ZodIPv4:()=>bs,ZodIPv6:()=>Ss,ZodISODate:()=>Ut,ZodISODateTime:()=>Vt,ZodISODuration:()=>qt,ZodISOTime:()=>Bt,ZodIntersection:()=>ru,ZodJWT:()=>Ps,ZodKSUID:()=>ys,ZodLazy:()=>Pu,ZodLiteral:()=>cu,ZodMAC:()=>Wl,ZodMap:()=>su,ZodNaN:()=>zu,ZodNanoID:()=>ms,ZodNever:()=>Yl,ZodNonOptional:()=>Ms,ZodNull:()=>Jl,ZodNullable:()=>uu,ZodNumber:()=>Go,ZodNumberFormat:()=>po,ZodObject:()=>Yr,ZodOptional:()=>en,ZodPipe:()=>tn,ZodPrefault:()=>fu,ZodPreprocess:()=>vu,ZodPromise:()=>$u,ZodReadonly:()=>wu,ZodRecord:()=>Bo,ZodSet:()=>au,ZodString:()=>Wo,ZodStringFormat:()=>xe,ZodSuccess:()=>yu,ZodSymbol:()=>Gl,ZodTemplateLiteral:()=>ku,ZodTransform:()=>du,ZodTuple:()=>iu,ZodType:()=>oe,ZodULID:()=>gs,ZodURL:()=>Hr,ZodUUID:()=>yt,ZodUndefined:()=>Kl,ZodUnion:()=>Qr,ZodUnknown:()=>Xl,ZodVoid:()=>Ql,ZodXID:()=>xs,ZodXor:()=>tu,_ZodString:()=>ps,_default:()=>hu,_function:()=>Jx,any:()=>Mx,array:()=>b,base64:()=>mx,base64url:()=>hx,bigint:()=>Px,boolean:()=>M,catch:()=>Su,check:()=>Hx,cidrv4:()=>lx,cidrv6:()=>ux,codec:()=>Wx,creditCard:()=>gx,cuid:()=>rx,cuid2:()=>nx,custom:()=>Xx,date:()=>Rx,describe:()=>Yx,discriminatedUnion:()=>Ax,e164:()=>fx,email:()=>Kg,emoji:()=>tx,enum:()=>f,exactOptional:()=>lu,file:()=>Vx,float32:()=>vx,float64:()=>wx,function:()=>Jx,guid:()=>Jg,hash:()=>zx,hex:()=>Sx,hostname:()=>bx,httpUrl:()=>ex,instanceof:()=>ey,int:()=>z,int32:()=>Ix,int64:()=>$x,intersection:()=>nu,invertCodec:()=>Zx,ipv4:()=>cx,ipv6:()=>dx,json:()=>oy,jwt:()=>xx,keyof:()=>Ex,ksuid:()=>ax,lazy:()=>Ho,literal:()=>x,looseObject:()=>Wt,looseRecord:()=>Lx,mac:()=>px,map:()=>jx,meta:()=>Qx,nan:()=>qx,nanoid:()=>ox,nativeEnum:()=>Nx,never:()=>Ts,nonoptional:()=>xu,null:()=>K,nullable:()=>Jr,nullish:()=>Ux,number:()=>p,object:()=>R,optional:()=>ao,partialRecord:()=>_x,pipe:()=>cs,prefault:()=>gu,preprocess:()=>ry,promise:()=>Kx,readonly:()=>Iu,record:()=>P,refine:()=>Cu,set:()=>Fx,strictObject:()=>d,string:()=>a,stringFormat:()=>yx,stringbool:()=>ty,success:()=>Bx,superRefine:()=>Ou,symbol:()=>Cx,templateLiteral:()=>Gx,transform:()=>Cs,tuple:()=>U,uint32:()=>kx,uint64:()=>Tx,ulid:()=>ix,undefined:()=>Ox,union:()=>v,unknown:()=>O,url:()=>ke,uuid:()=>Hg,uuidv4:()=>Xg,uuidv6:()=>Yg,uuidv7:()=>Qg,void:()=>Le,xid:()=>sx,xor:()=>Dx});var ss={};It(ss,{endsWith:()=>Do,gt:()=>gt,gte:()=>tt,includes:()=>Ro,length:()=>so,lowercase:()=>Oo,lt:()=>ft,lte:()=>et,maxLength:()=>io,maxSize:()=>Lt,mime:()=>Ao,minLength:()=>kt,minSize:()=>xt,multipleOf:()=>_t,negative:()=>Hi,nonnegative:()=>Yi,nonpositive:()=>Xi,normalize:()=>_o,overwrite:()=>dt,positive:()=>Ji,properties:()=>es,property:()=>Qi,regex:()=>Co,size:()=>no,slugify:()=>No,startsWith:()=>Eo,toLowerCase:()=>jo,toUpperCase:()=>Fo,trim:()=>Lo,uppercase:()=>Mo});var Zg=new WeakSet([Object.prototype,Error.prototype]);function as(r,e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t(this);return Object.defineProperty(this,e,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,e,{value:n,configurable:!0,writable:!0})}})}var Gg=(r,e)=>{$r.init(r,e),r.name="ZodError";let t=Object.getPrototypeOf(r);Zg.has(t)||(Zg.add(t),as(t,"format",n=>o=>Cr(n,o)),as(t,"flatten",n=>o=>Tr(n,o)),as(t,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,bo,2)}),as(t,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,bo,2)}),Object.defineProperty(t,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},QI=T("ZodError",Gg),Xe=T("ZodError",Gg,void 0,{Parent:Error});var El=vo(Xe),Dl=wo(Xe),Al=Io(Xe),_l=ko(Xe),Ll=Nn(Xe),jl=Vn(Xe),Fl=Un(Xe),Nl=Bn(Xe),Vl=qn(Xe),Ul=Wn(Xe),Bl=Zn(Xe),ql=Gn(Xe);function tk(){Ae.localeError||Te(vi())}function co(){Ae.memoizer||Te({memoizer:Fr()})}var oe=T("ZodType",(r,e)=>(tk(),te.init(r,e),r.def=e,r.type=e.type,r),{check(...r){let e=this.def;return this.clone(_.mergeDefs(e,{checks:[...e.checks??[],...r.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,e){return he(this,r,e)},brand(){return this},register(r,e){return r.add(this,e),this},refine(r,e){return this.check(Cu(r,e))},superRefine(r,e){return this.check(Ou(r,e))},overwrite(r){return this.check(dt(r))},optional(){return ao(this)},exactOptional(){return lu(this)},nullable(){return Jr(this)},nullish(){return ao(Jr(this))},nonoptional(r){return xu(this,r)},array(){return b(this)},or(r){return v([this,r])},and(r){return nu(this,r)},transform(r){return cs(this,Cs(r))},default(r){return hu(this,r)},prefault(r){return gu(this,r)},catch(r){return Su(this,r)},pipe(r){return cs(this,r)},readonly(){return Iu(this)},describe(r){let e=this.clone();return _e.add(e,{description:r}),e},meta(...r){if(r.length===0)return _e.get(this);let e=this.clone();return _e.add(e,r[0]),e},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r,...e){return e.length===0?r(this):r(this,...e)},get"~standard"(){return _.hide(this,"~standard",{...ni(this),jsonSchema:{input:Uo(this,"input"),output:Uo(this,"output")}})},set"~standard"(r){_.own(this,"~standard",r)},parse:function r(e,t){return El(this,e,t,{callee:r})},parseAsync:async function r(e,t){return await Dl(this,e,t,{callee:r})},safeParse(r,e){return Al(this,r,e)},async safeParseAsync(r,e){return _l(this,r,e)},get spa(){return this?.safeParseAsync},set spa(r){_.own(this,"spa",r)},encode:function r(e,t){return Ll(this,e,t,{callee:r})},decode:function r(e,t){return jl(this,e,t,{callee:r})},encodeAsync:async function r(e,t){return await Fl(this,e,t,{callee:r})},decodeAsync:async function r(e,t){return await Nl(this,e,t,{callee:r})},safeEncode(r,e){return Vl(this,r,e)},safeDecode(r,e){return Ul(this,r,e)},async safeEncodeAsync(r,e){return Bl(this,r,e)},async safeDecodeAsync(r,e){return ql(this,r,e)},toJSONSchema(r){return Zd(this,{})(r)},get description(){return _e.get(this)?.description},get _def(){return this._zod.def}}),ps=T("_ZodString",(r,e)=>{Qt.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>Jd(r,n,o,i);let t=r._zod.bag;r.format=t.format??null,r.minLength=t.minimum??null,r.maxLength=t.maximum??null},{regex(...r){return this.check(Co(...r))},includes(...r){return this.check(Ro(...r))},startsWith(...r){return this.check(Eo(...r))},endsWith(...r){return this.check(Do(...r))},min(...r){return this.check(kt(...r))},max(...r){return this.check(io(...r))},length(...r){return this.check(so(...r))},nonempty(...r){return this.check(kt(1,...r))},lowercase(r){return this.check(Oo(r))},uppercase(r){return this.check(Mo(r))},trim(){return this.check(Lo())},normalize(...r){return this.check(_o(...r))},toLowerCase(){return this.check(jo())},toUpperCase(){return this.check(Fo())},slugify(){return this.check(No())}}),Wo=T("ZodString",(r,e)=>{Qt.init(r,e),ps.init(r,e)},{email(r){return this.check(Ti(ds,r))},url(r){return this.check(Ur(Hr,r))},jwt(r){return this.check(Ki(Ps,r))},emoji(r){return this.check(Di(us,r))},guid(r){return this.check(Ci(ls,r))},uuid(r){return this.check(Oi(yt,r))},uuidv4(r){return this.check(Mi(yt,r))},uuidv6(r){return this.check(Ri(yt,r))},uuidv7(r){return this.check(Ei(yt,r))},nanoid(r){return this.check(Ai(ms,r))},cuid(r){return this.check(_i(hs,r))},cuid2(r){return this.check(Li(fs,r))},ulid(r){return this.check(ji(gs,r))},base64(r){return this.check(Wi(ws,r))},base64url(r){return this.check(Zi(Is,r))},xid(r){return this.check(Fi(xs,r))},ksuid(r){return this.check(Ni(ys,r))},ipv4(r){return this.check(Vi(bs,r))},ipv6(r){return this.check(Ui(Ss,r))},cidrv4(r){return this.check(Bi(zs,r))},cidrv6(r){return this.check(qi(vs,r))},e164(r){return this.check(Gi(ks,r))},datetime(r){return this.check(Br(Vt,r))},date(r){return this.check(qr(Ut,r))},time(r){return this.check(Wr(Bt,r))},duration(r){return this.check(Zr(qt,r))}});function a(r){return pd(Wo,r)}var xe=T("ZodStringFormat",(r,e)=>{ge.init(r,e),ps.init(r,e)}),Vt=T("ZodISODateTime",(r,e)=>{ep.init(r,e),xe.init(r,e)}),Ut=T("ZodISODate",(r,e)=>{tp.init(r,e),xe.init(r,e)}),Bt=T("ZodISOTime",(r,e)=>{op.init(r,e),xe.init(r,e)}),qt=T("ZodISODuration",(r,e)=>{rp.init(r,e),xe.init(r,e)}),ds=T("ZodEmail",(r,e)=>{Bc.init(r,e),xe.init(r,e)});function Kg(r){return Ti(ds,r)}var ls=T("ZodGUID",(r,e)=>{Vc.init(r,e),xe.init(r,e)});function Jg(r){return Ci(ls,r)}var yt=T("ZodUUID",(r,e)=>{Uc.init(r,e),xe.init(r,e)});function Hg(r){return Oi(yt,r)}function Xg(r){return Mi(yt,r)}function Yg(r){return Ri(yt,r)}function Qg(r){return Ei(yt,r)}var Hr=T("ZodURL",(r,e)=>{Zc.init(r,e),xe.init(r,e)});function ke(r){return Ur(Hr,r)}function ex(r){return Ur(Hr,{protocol:Ne.httpProtocol,hostname:Ne.domain,..._.normalizeParams(r)})}var us=T("ZodEmoji",(r,e)=>{Gc.init(r,e),xe.init(r,e)});function tx(r){return Di(us,r)}var ms=T("ZodNanoID",(r,e)=>{Kc.init(r,e),xe.init(r,e)});function ox(r){return Ai(ms,r)}var hs=T("ZodCUID",(r,e)=>{Jc.init(r,e),xe.init(r,e)});function rx(r){return _i(hs,r)}var fs=T("ZodCUID2",(r,e)=>{Hc.init(r,e),xe.init(r,e)});function nx(r){return Li(fs,r)}var gs=T("ZodULID",(r,e)=>{Xc.init(r,e),xe.init(r,e)});function ix(r){return ji(gs,r)}var xs=T("ZodXID",(r,e)=>{Yc.init(r,e),xe.init(r,e)});function sx(r){return Fi(xs,r)}var ys=T("ZodKSUID",(r,e)=>{Qc.init(r,e),xe.init(r,e)});function ax(r){return Ni(ys,r)}var bs=T("ZodIPv4",(r,e)=>{np.init(r,e),xe.init(r,e)});function cx(r){return Vi(bs,r)}var Wl=T("ZodMAC",(r,e)=>{sp.init(r,e),xe.init(r,e)});function px(r){return ld(Wl,r)}var Ss=T("ZodIPv6",(r,e)=>{ip.init(r,e),xe.init(r,e)});function dx(r){return Ui(Ss,r)}var zs=T("ZodCIDRv4",(r,e)=>{ap.init(r,e),xe.init(r,e)});function lx(r){return Bi(zs,r)}var vs=T("ZodCIDRv6",(r,e)=>{cp.init(r,e),xe.init(r,e)});function ux(r){return qi(vs,r)}var ws=T("ZodBase64",(r,e)=>{pp.init(r,e),xe.init(r,e)});function mx(r){return Wi(ws,r)}var Is=T("ZodBase64URL",(r,e)=>{dp.init(r,e),xe.init(r,e)});function hx(r){return Zi(Is,r)}var ks=T("ZodE164",(r,e)=>{lp.init(r,e),xe.init(r,e)});function fx(r){return Gi(ks,r)}var Zl=T("ZodCreditCard",(r,e)=>{up.init(r,e),xe.init(r,e)});function gx(r){return ud(Zl,r)}var Ps=T("ZodJWT",(r,e)=>{mp.init(r,e),xe.init(r,e)});function xx(r){return Ki(Ps,r)}var Zo=T("ZodCustomStringFormat",(r,e)=>{hp.init(r,e),xe.init(r,e)});function yx(r,e,t={}){return Vo(Zo,r,e,t)}function bx(r){return Vo(Zo,"hostname",Ne.hostname,r)}function Sx(r){return Vo(Zo,"hex",Ne.hex,r)}function zx(r,e){let t=e?.enc??"hex",n=`${r}_${t}`,o=Ne[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Vo(Zo,n,o,e)}var Go=T("ZodNumber",(r,e)=>{mi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>Hd(r,n,o,i);let t=r._zod.bag;r.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,r.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,r.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??.5),r.isFinite=!0,r.format=t.format??null},{gt(r,e){return this.check(gt(r,e))},gte(r,e){return this.check(tt(r,e))},min(r,e){return this.check(tt(r,e))},lt(r,e){return this.check(ft(r,e))},lte(r,e){return this.check(et(r,e))},max(r,e){return this.check(et(r,e))},int(r){return this.check(z(r))},safe(r){return this.check(z(r))},positive(r){return this.check(gt(0,r))},nonnegative(r){return this.check(tt(0,r))},negative(r){return this.check(ft(0,r))},nonpositive(r){return this.check(et(0,r))},multipleOf(r,e){return this.check(_t(r,e))},step(r,e){return this.check(_t(r,e))},finite(){return this}});function p(r){return hd(Go,r)}var po=T("ZodNumberFormat",(r,e)=>{fp.init(r,e),Go.init(r,e)});function z(r){return gd(po,r)}function vx(r){return xd(po,r)}function wx(r){return yd(po,r)}function Ix(r){return bd(po,r)}function kx(r){return Sd(po,r)}var Ko=T("ZodBoolean",(r,e)=>{Ar.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Xd(r,t,n,o)});function M(r){return zd(Ko,r)}var Jo=T("ZodBigInt",(r,e)=>{hi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>Yd(r,n,o,i);let t=r._zod.bag;r.minValue=t.minimum??null,r.maxValue=t.maximum??null,r.format=t.format??null},{gte(r,e){return this.check(tt(r,e))},min(r,e){return this.check(tt(r,e))},gt(r,e){return this.check(gt(r,e))},lt(r,e){return this.check(ft(r,e))},lte(r,e){return this.check(et(r,e))},max(r,e){return this.check(et(r,e))},positive(r){return this.check(gt(BigInt(0),r))},negative(r){return this.check(ft(BigInt(0),r))},nonpositive(r){return this.check(et(BigInt(0),r))},nonnegative(r){return this.check(tt(BigInt(0),r))},multipleOf(r,e){return this.check(_t(r,e))}});function Px(r){return wd(Jo,r)}var $s=T("ZodBigIntFormat",(r,e)=>{gp.init(r,e),Jo.init(r,e)});function $x(r){return kd($s,r)}function Tx(r){return Pd($s,r)}var Gl=T("ZodSymbol",(r,e)=>{xp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Qd(r,t,n,o)});function Cx(r){return $d(Gl,r)}var Kl=T("ZodUndefined",(r,e)=>{yp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>tl(r,t,n,o)});function Ox(r){return Td(Kl,r)}var Jl=T("ZodNull",(r,e)=>{bp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>el(r,t,n,o)});function K(r){return Cd(Jl,r)}var Hl=T("ZodAny",(r,e)=>{Sp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>nl(r,t,n,o)});function Mx(){return Od(Hl)}var Xl=T("ZodUnknown",(r,e)=>{zp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>il(r,t,n,o)});function O(){return Md(Xl)}var Yl=T("ZodNever",(r,e)=>{vp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>rl(r,t,n,o)});function Ts(r){return Rd(Yl,r)}var Ql=T("ZodVoid",(r,e)=>{wp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>ol(r,t,n,o)});function Le(r){return Ed(Ql,r)}var Xr=T("ZodDate",(r,e)=>{Ip.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>sl(r,n,o,i),r.min=(n,o)=>r.check(tt(n,o)),r.max=(n,o)=>r.check(et(n,o));let t=r._zod.bag;r.minDate=t.minimum?new Date(t.minimum):null,r.maxDate=t.maximum?new Date(t.maximum):null});function Rx(r){return Dd(Xr,r)}var eu=T("ZodArray",(r,e)=>{co(),kp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>yl(r,t,n,o),r.element=e.element},{min(r,e){return this.check(kt(r,e))},nonempty(r){return this.check(kt(1,r))},max(r,e){return this.check(io(r,e))},length(r,e){return this.check(so(r,e))},unwrap(){return this.element}});function b(r,e){return Ld(eu,r,e)}function Ex(r){let e=r._zod.def.shape;return f(Object.keys(e))}var Yr=T("ZodObject",(r,e)=>{co(),Pp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>bl(r,t,n,o),_.installLazyProp(r,"shape",t=>t._zod.def.shape,!1)},{keyof(){return f(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:O()})},loose(){return this.clone({...this._zod.def,catchall:O()})},strict(){return this.clone({...this._zod.def,catchall:Ts()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return _.extend(this,r)},safeExtend(r){return _.safeExtend(this,r)},merge(r){return _.merge(this,r)},pick(r){return _.pick(this,r)},omit(r){return _.omit(this,r)},partial(...r){return _.partial(en,this,r[0])},exactPartial(...r){return _.partial(Os,this,r[0],"exactPartial")},required(...r){return _.required(Ms,this,r[0])}});function R(r,e){let t={type:"object",shape:r??{},..._.normalizeParams(e)};return new Yr(t)}function d(r,e){return new Yr({type:"object",shape:r,catchall:Ts(),..._.normalizeParams(e)})}function Wt(r,e){return new Yr({type:"object",shape:r,catchall:O(),..._.normalizeParams(e)})}var Qr=T("ZodUnion",(r,e)=>{_r.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>os(r,t,n,o),r.options=e.options});function v(r,e){return new Qr({type:"union",options:r,..._.normalizeParams(e)})}var tu=T("ZodXor",(r,e)=>{Qr.init(r,e),$p.init(r,e),r._zod.processJSONSchema=(t,n,o)=>os(r,t,n,o),r.options=e.options});function Dx(r,e){return new tu({type:"union",options:r,inclusive:!1,..._.normalizeParams(e)})}var ou=T("ZodDiscriminatedUnion",(r,e)=>{Qr.init(r,e),Cp.init(r,e)});function Ax(r,e,t){return new ou({type:"union",options:e,discriminator:r,..._.normalizeParams(t)})}var ru=T("ZodIntersection",(r,e)=>{Op.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Sl(r,t,n,o)});function nu(r,e){return new ru({type:"intersection",left:r,right:e})}var iu=T("ZodTuple",(r,e)=>{co(),fi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>zl(r,t,n,o)},{rest(r){return this.clone({...this._zod.def,rest:r})},partial(){let r=this._zod.def;if(r.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...r,items:r.items.map(e=>new en({type:"optional",innerType:e}))})}});function U(r,e,t){let n=e instanceof te,o=n?t:e,i=n?e:null;return new iu({type:"tuple",items:r,rest:i,..._.normalizeParams(o)})}var Bo=T("ZodRecord",(r,e)=>{co(),Mp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>vl(r,t,n,o),r.keyType=e.keyType,r.valueType=e.valueType});function P(r,e,t){return!e||!e._zod?new Bo({type:"record",keyType:a(),valueType:r,..._.normalizeParams(e)}):new Bo({type:"record",keyType:r,valueType:e,..._.normalizeParams(t)})}function _x(r,e,t){return new Bo({type:"record",keyType:r,valueType:e,..._.normalizeParams(t),partial:!0})}function Lx(r,e,t){return new Bo({type:"record",keyType:r,valueType:e,mode:"loose",..._.normalizeParams(t)})}var su=T("ZodMap",(r,e)=>{co(),Rp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>gl(r,t,n,o),r.keyType=e.keyType,r.valueType=e.valueType,r.min=(...t)=>r.check(xt(...t)),r.nonempty=t=>r.check(xt(1,t)),r.max=(...t)=>r.check(Lt(...t)),r.size=(...t)=>r.check(no(...t))});function jx(r,e,t){return new su({type:"map",keyType:r,valueType:e,..._.normalizeParams(t)})}var au=T("ZodSet",(r,e)=>{co(),Ep.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>xl(r,t,n,o),r.min=(...t)=>r.check(xt(...t)),r.nonempty=t=>r.check(xt(1,t)),r.max=(...t)=>r.check(Lt(...t)),r.size=(...t)=>r.check(no(...t))});function Fx(r,e){return new au({type:"set",valueType:r,..._.normalizeParams(e)})}var qo=T("ZodEnum",(r,e)=>{Dp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>al(r,n,o,i),r.enum=e.entries,r.options=Object.values(e.entries);let t=new Set(Object.keys(e.entries));r.extract=(n,o)=>{let i={};for(let s of n)if(t.has(s))i[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new qo({...e,checks:[],..._.normalizeParams(o),entries:i})},r.exclude=(n,o)=>{let i={...e.entries};for(let s of n)if(t.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new qo({...e,checks:[],..._.normalizeParams(o),entries:i})}});function f(r,e){let t=Array.isArray(r)?Object.fromEntries(r.map(n=>[n,n])):r;return new qo({type:"enum",entries:t,..._.normalizeParams(e)})}function Nx(r,e){return new qo({type:"enum",entries:r,..._.normalizeParams(e)})}var cu=T("ZodLiteral",(r,e)=>{Ap.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>cl(r,t,n,o),r.values=new Set(e.values),Object.defineProperty(r,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function x(r,e){return new cu({type:"literal",values:Array.isArray(r)?r:[r],..._.normalizeParams(e)})}var pu=T("ZodFile",(r,e)=>{_p.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>ll(r,t,n,o),r.min=(t,n)=>r.check(xt(t,n)),r.max=(t,n)=>r.check(Lt(t,n)),r.mime=(t,n)=>r.check(Ao(Array.isArray(t)?t:[t],n))});function Vx(r){return jd(pu,r)}var du=T("ZodTransform",(r,e)=>{co(),Lp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>fl(r,t,n,o),r._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Dt(r.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(_.issue(i,t.value,e));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=t.value),s.inst??(s.inst=r),t.issues.push(_.issue(s))}};let o=e.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function Cs(r){return new du({type:"transform",transform:r})}var en=T("ZodOptional",(r,e)=>{gi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>rs(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function ao(r){return new en({type:"optional",innerType:r})}var Os=T("ZodExactOptional",(r,e)=>{jp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>rs(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function lu(r){return new Os({type:"optional",innerType:r})}var uu=T("ZodNullable",(r,e)=>{Fp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>wl(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function Jr(r){return new uu({type:"nullable",innerType:r})}function Ux(r){return ao(Jr(r))}var mu=T("ZodDefault",(r,e)=>{Np.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Pl(r,t,n,o),r.unwrap=()=>r._zod.def.innerType,r.removeDefault=r.unwrap});function hu(r,e){return new mu({type:"default",innerType:r,get defaultValue(){return typeof e=="function"?e():_.shallowClone(e)}})}var fu=T("ZodPrefault",(r,e)=>{Vp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>$l(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function gu(r,e){return new fu({type:"prefault",innerType:r,get defaultValue(){return typeof e=="function"?e():_.shallowClone(e)}})}var Ms=T("ZodNonOptional",(r,e)=>{Up.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Il(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function xu(r,e){return new Ms({type:"nonoptional",innerType:r,..._.normalizeParams(e)})}var yu=T("ZodSuccess",(r,e)=>{Bp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>ul(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function Bx(r){return new yu({type:"success",innerType:r})}var bu=T("ZodCatch",(r,e)=>{qp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Tl(r,t,n,o),r.unwrap=()=>r._zod.def.innerType,r.removeCatch=r.unwrap});function Su(r,e){return new bu({type:"catch",innerType:r,catchValue:typeof e=="function"?e:_.constantCatch(e)})}var zu=T("ZodNaN",(r,e)=>{Wp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>pl(r,t,n,o)});function qx(r){return _d(zu,r)}var tn=T("ZodPipe",(r,e)=>{xi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Cl(r,t,n,o),r.in=e.in,r.out=e.out});function cs(r,e){return new tn({type:"pipe",in:r,out:e})}var on=T("ZodCodec",(r,e)=>{tn.init(r,e),Lr.init(r,e)});function Wx(r,e,t){return new on({type:"pipe",in:r,out:e,transform:t.decode,reverseTransform:t.encode})}function Zx(r){let e=r._zod.def;return new on({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}var vu=T("ZodPreprocess",(r,e)=>{tn.init(r,e),Zp.init(r,e)}),wu=T("ZodReadonly",(r,e)=>{Gp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Ol(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function Iu(r){return new wu({type:"readonly",innerType:r})}var ku=T("ZodTemplateLiteral",(r,e)=>{Kp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>dl(r,t,n,o)});function Gx(r,e){return new ku({type:"template_literal",parts:r,..._.normalizeParams(e)})}var Pu=T("ZodLazy",(r,e)=>{jr.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Rl(r,t,n,o),r.unwrap=()=>r._zod.def.getter()});function Ho(r){return new Pu({type:"lazy",getter:r})}var $u=T("ZodPromise",(r,e)=>{Hp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Ml(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function Kx(r){return new $u({type:"promise",innerType:r})}var Tu=T("ZodFunction",(r,e)=>{Jp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>hl(r,t,n,o)});function Jx(r){return new Tu({type:"function",input:Array.isArray(r?.input)?U(r?.input):r?.input??b(O()),output:r?.output??O()})}var rn=T("ZodCustom",(r,e)=>{Xp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>ml(r,t,n,o)});function Hx(r){let e=new be({check:"custom"});return e._zod.check=r,e}function Xx(r,e){return Fd(rn,r??(()=>!0),e)}function Cu(r,e={}){return Nd(rn,r,e)}function Ou(r,e){return Vd(r,e)}var Yx=Ud,Qx=Bd;function ey(r,e={}){let t=new rn({type:"custom",check:"custom",fn:n=>n instanceof r,abort:!0,..._.normalizeParams(e)});return t._zod.bag.Class=r,t._zod.check=n=>{n.value instanceof r||n.issues.push({code:"invalid_type",expected:r.name,input:n.value,inst:t,path:[...t._zod.def.path??[]]})},t}var ty=(...r)=>qd({Codec:on,Boolean:Ko,String:Wo},...r);function oy(r){let e=Ho(()=>v([a(r),p(),M(),K(),b(e),P(a(),e)]));return e}function ry(r,e){return new vu({type:"pipe",in:Cs(r),out:e})}var ok={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 rk(r){Te({customError:r})}function nk(){return Te().customError}var Mu;Mu||(Mu={});var nn={};It(nn,{ZodISODate:()=>Ut,ZodISODateTime:()=>Vt,ZodISODuration:()=>qt,ZodISOTime:()=>Bt,date:()=>sk,datetime:()=>ik,duration:()=>ck,time:()=>ak});function ik(r){return Br(Vt,r)}function sk(r){return qr(Ut,r)}function ak(r){return Wr(Bt,r)}function ck(r){return Zr(qt,r)}var W={...Xo,...ss,iso:nn},pk=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 dk(r,e){let t=r.$schema;return t==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":t==="http://json-schema.org/draft-07/schema#"?"draft-7":t==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function ny(r,e){return r.map((t,n)=>n<e?t:t.optional())}function lk(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}function uk(r,e){if(!r.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let t=r.slice(1).split("/").filter(Boolean);if(t.length===0)return e.rootSchema;let n=e.version==="draft-2020-12"?"$defs":"definitions";if(t[0]===n){let o=t[1]===void 0?void 0:lk(t[1]);if(!o||!e.defs[o])throw new Error(`Reference not found: ${r}`);return e.defs[o]}throw new Error(`Reference not found: ${r}`)}function mk(r,e){return W.transform(n=>n).check(n=>{let o=n.value;if(!(typeof o!="object"||o===null||Array.isArray(o)))for(let i of Object.getOwnPropertyNames(o)){let s=e.safeParse(i);s.success||n.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:i,path:[i],continue:!0})}}).pipe(r)}function iy(r,e){if(r!==!1)return r===void 0||r===!0?W.any():Ye(r,e)}var hk=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function sy(r,e){if(r.not!==void 0){if(typeof r.not=="object"&&Object.keys(r.not).length===0)return W.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(r.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(r.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(r.if!==void 0||r.then!==void 0||r.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(r.dependentSchemas!==void 0||r.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(r.$ref){let o=r.$ref;if(e.refs.has(o))return e.refs.get(o);if(e.processing.has(o))return W.lazy(()=>{if(!e.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return e.refs.get(o)});e.processing.add(o);let i=uk(o,e),s=Ye(i,e);return e.refs.set(o,s),e.processing.delete(o),s}if(r.enum!==void 0){let o=r.enum;if(e.version==="openapi-3.0"&&r.nullable===!0&&o.length===1&&o[0]===null)return W.null();if(o.length===0)return W.never();if(o.length===1)return W.literal(o[0]);if(o.every(s=>typeof s=="string"))return W.enum(o);let i=o.map(s=>W.literal(s));return i.length<2?i[0]:W.union([i[0],i[1],...i.slice(2)])}if(r.const!==void 0)return W.literal(r.const);let t=r.type;if(Array.isArray(t)){let o=t.map(i=>{let s={...r,type:i};return sy(s,e)});return o.length===0?W.never():o.length===1?o[0]:W.union(o)}if(!t)return W.any();let n;switch(t){case"string":{let o=W.string();if(r.format){let i=r.format;i==="email"?o=o.check(W.email()):i==="uri"||i==="uri-reference"?o=o.check(W.url()):i==="uuid"||i==="guid"?o=o.check(W.uuid()):i==="date-time"?o=o.check(W.iso.datetime({offset:!0})):i==="date"?o=o.check(W.iso.date()):i==="time"?o=o.check(W.regex(hk)):i==="duration"?o=o.check(W.iso.duration()):i==="hostname"?o=o.check(W.hostname()):i==="ipv4"?o=o.check(W.ipv4()):i==="ipv6"?o=o.check(W.ipv6()):i==="mac"?o=o.check(W.mac()):i==="cidr"?o=o.check(W.cidrv4()):i==="cidr-v6"?o=o.check(W.cidrv6()):i==="base64"?o=o.check(W.base64()):i==="base64url"?o=o.check(W.base64url()):i==="e164"?o=o.check(W.e164()):i==="credit_card"?o=o.check(W.creditCard()):i==="jwt"?o=o.check(W.jwt()):i==="emoji"?o=o.check(W.emoji()):i==="nanoid"?o=o.check(W.nanoid()):i==="cuid"?o=o.check(W.cuid()):i==="cuid2"?o=o.check(W.cuid2()):i==="ulid"?o=o.check(W.ulid()):i==="xid"?o=o.check(W.xid()):i==="ksuid"&&(o=o.check(W.ksuid()))}typeof r.minLength=="number"&&(o=o.min(r.minLength)),typeof r.maxLength=="number"&&(o=o.max(r.maxLength)),r.pattern&&(o=o.regex(new RegExp(r.pattern))),n=o;break}case"number":case"integer":{let o=t==="integer"?W.number().int():W.number();typeof r.minimum=="number"&&r.exclusiveMinimum!==!0&&(o=o.min(r.minimum)),typeof r.maximum=="number"&&r.exclusiveMaximum!==!0&&(o=o.max(r.maximum)),typeof r.exclusiveMinimum=="number"?o=o.gt(r.exclusiveMinimum):r.exclusiveMinimum===!0&&typeof r.minimum=="number"&&(o=o.gt(r.minimum)),typeof r.exclusiveMaximum=="number"?o=o.lt(r.exclusiveMaximum):r.exclusiveMaximum===!0&&typeof r.maximum=="number"&&(o=o.lt(r.maximum)),typeof r.multipleOf=="number"&&(o=o.multipleOf(r.multipleOf)),n=o;break}case"boolean":{n=W.boolean();break}case"null":{n=W.null();break}case"object":{let o={},i=r.properties||{},s=new Set(r.required||[]),c=typeof r.additionalProperties=="object"?Ye(r.additionalProperties,e):void 0;for(let[u,m]of Object.entries(i)){let h=Ye(m,e);$e(o,u,s.has(u)?h:h.optional())}if(r.patternProperties){let u=r.patternProperties,m=Object.keys(u),h=[];for(let y of m){let S=Ye(u[y],e),w=W.string().regex(new RegExp(y));h.push(W.looseRecord(w,S))}let g=[];if(Object.keys(o).length>0&&g.push(W.object(o).passthrough()),g.push(...h),g.length===0)n=W.object({}).passthrough();else if(g.length===1)n=g[0];else{let y=W.intersection(g[0],g[1]);for(let S=2;S<g.length;S++)y=W.intersection(y,g[S]);n=y}if(r.additionalProperties===!1){let y=Object.keys(o),S=m.map($=>new RegExp($)),w=n;n=n.check($=>{if(!nt($.value))return;let E=[];for(let V of Object.keys($.value))y.includes(V)||S.some(F=>F.test(V))||E.push(V);E.length&&$.issues.push({code:"unrecognized_keys",keys:E,input:$.value,inst:w})})}}else{let u=W.object(o);r.additionalProperties===!1?n=u.strict():c?n=u.catchall(c):n=u.passthrough()}if(r.propertyNames!==void 0&&r.propertyNames!==!0){let u=typeof r.propertyNames=="object"&&r.propertyNames.type===void 0?{type:"string",...r.propertyNames}:r.propertyNames;n=mk(n,Ye(u,e))}break}case"array":{let o=r.prefixItems,i=r.items;if(o&&Array.isArray(o)){let s=typeof r.minItems=="number"?r.minItems:0,c=o.map(g=>Ye(g,e)),u=ny(c,s),m=Array.isArray(i)?void 0:iy(i,e),h=W.tuple(u);n=m?h.rest(m):h,typeof r.minItems=="number"&&(n=n.check(W.minLength(r.minItems))),typeof r.maxItems=="number"&&(n=n.check(W.maxLength(r.maxItems)))}else if(Array.isArray(i)){let s=typeof r.minItems=="number"?r.minItems:0,c=i.map(g=>Ye(g,e)),u=ny(c,s),m=iy(r.additionalItems,e),h=W.tuple(u);n=m?h.rest(m):h,typeof r.minItems=="number"&&(n=n.check(W.minLength(r.minItems))),typeof r.maxItems=="number"&&(n=n.check(W.maxLength(r.maxItems)))}else if(i!==void 0){let s=Ye(i,e),c=W.array(s);typeof r.minItems=="number"&&(c=c.min(r.minItems)),typeof r.maxItems=="number"&&(c=c.max(r.maxItems)),n=c}else n=W.array(W.any());break}default:throw new Error(`Unsupported type: ${t}`)}return n}function Ye(r,e){if(typeof r=="boolean")return r?W.any():W.never();let t=sy(r,e),n=r.type||r.enum!==void 0||r.const!==void 0;if(r.anyOf&&Array.isArray(r.anyOf)){let c=r.anyOf.map(m=>Ye(m,e)),u=W.union(c);t=n?W.intersection(t,u):u}if(r.oneOf&&Array.isArray(r.oneOf)){let c=r.oneOf.map(m=>Ye(m,e)),u=W.xor(c);t=n?W.intersection(t,u):u}if(r.allOf&&Array.isArray(r.allOf))if(r.allOf.length===0)t=n?t:W.any();else{let c=n?t:Ye(r.allOf[0],e),u=n?0:1;for(let m=u;m<r.allOf.length;m++)c=W.intersection(c,Ye(r.allOf[m],e));t=c}r.nullable===!0&&e.version==="openapi-3.0"&&(t=W.nullable(t)),r.readOnly===!0&&(t=W.readonly(t)),r.default!==void 0&&(t=t.default(r.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in r&&(o[c]=r[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in r&&(o[c]=r[c]);r.propertyNames!==void 0&&r.type==="object"&&r.$ref===void 0&&(o.propertyNames=r.propertyNames);for(let c of Object.keys(r))pk.has(c)||$e(o,c,r[c]);return Object.keys(o).length>0&&e.registry.add(t,o),r.description&&(t=t.describe(r.description)),t}function ay(r,e){if(typeof r=="boolean")return r?W.any():W.never();let t;try{t=JSON.parse(JSON.stringify(r))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=dk(t,e?.defaultTarget),o=t.$defs||t.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:t,registry:e?.registry??_e};return Ye(t,i)}var cy=Symbol("z.visit/resolving");function sn(r,e){let t=typeof e=="function"?e:(s,c)=>{let u=e[s._zod.def.type];return u?u(s,c):s},n=new Map;function o(s){let c=n.get(s);if(c===cy)return new jr({type:"lazy",getter:()=>n.get(s)});if(c!==void 0)return c;n.set(s,cy);let u=i(s),m=t(u,u!==s);return n.set(s,m),m}function i(s){let c=s._zod.def,u=c.type;switch(u){case"object":{let m=c.shape,h=Object.keys(m),g=!1,y={};for(let w of h){let $=o(m[w]);$!==m[w]&&(g=!0),y[w]=$}let S=c.catchall;return c.catchall&&(S=o(c.catchall),S!==c.catchall&&(g=!0)),g?he(s,{...c,shape:y,catchall:S}):s}case"array":{let m=o(c.element);return m===c.element?s:he(s,{...c,element:m})}case"tuple":{let m=c.items,h=!1,g=[];for(let S of m){let w=o(S);w!==S&&(h=!0),g.push(w)}let y=c.rest;return c.rest&&(y=o(c.rest),y!==c.rest&&(h=!0)),h?he(s,{...c,items:g,rest:y}):s}case"record":case"map":{let m=o(c.keyType),h=o(c.valueType);return m===c.keyType&&h===c.valueType?s:he(s,{...c,keyType:m,valueType:h})}case"set":{let m=o(c.valueType);return m===c.valueType?s:he(s,{...c,valueType:m})}case"union":{let m=c.options,h=!1,g=[];for(let y of m){let S=o(y);S!==y&&(h=!0),g.push(S)}return h?he(s,{...c,options:g}):s}case"intersection":{let m=o(c.left),h=o(c.right);return m===c.left&&h===c.right?s:he(s,{...c,left:m,right:h})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let m=o(c.innerType);return m===c.innerType?s:he(s,{...c,innerType:m})}case"pipe":{let m=o(c.in),h=o(c.out);return m===c.in&&h===c.out?s:he(s,{...c,in:m,out:h})}case"function":{let m=o(c.input),h=o(c.output);return m===c.input&&h===c.output?s:he(s,{...c,input:m,output:h})}case"lazy":{let m=c.getter,{_cachedInner:h,...g}=c;return he(s,{...g,getter:()=>o(m())})}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 s;default:return s}}return o(r)}function py(r){return sn(r,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:v(t.options)}})}function fk(r,e){if(!e?.length)return r;let t=r._zod.def;return he(r,ct(t,{checks:[...t.checks??[],...e]}),{parent:!0})}function dy(r){return fk(r.out,r.checks)}function gk(r){return r.in._zod.traits.has("$ZodTransform")?dy(r):r.in}function ly(r){return sn(r,{pipe:e=>gk(e._zod.def),default:(e,t)=>t?ao(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function uy(r){return sn(r,{pipe:e=>dy(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var Ru={};It(Ru,{bigint:()=>Sk,boolean:()=>bk,date:()=>zk,number:()=>yk,string:()=>xk});function xk(r){return dd(Wo,r)}function yk(r){return fd(Go,r)}function bk(r){return vd(Ko,r)}function Sk(r){return Id(Jo,r)}function zk(r){return Ad(Xr,r)}var $k="cueframe/components";var Tk="cueframe.json",Ck=l.object({componentsDir:l.string().min(1).default($k)}).passthrough();function an(r){let e=r,t=Pk(e).root;for(;;){let n=Yo(e,Tk);if(Rs(n)){let o=vk(n,"utf8"),i=Ck.parse(JSON.parse(o));return{root:e,manifest:i}}if(e===t)return null;e=kk(e)}}function my(r){return Yo(r.root,r.manifest.componentsDir)}function Es(r,e){return Yo(my(r),e)}function hy(r){let e=my(r);return Rs(e)?wk(e).filter(t=>{let n=Yo(e,t);return Ik(n).isDirectory()?Rs(Yo(n,"index.tsx"))&&Rs(Yo(n,"config.ts")):!1}).sort():[]}import{existsSync as fie,readFileSync as gie}from"fs";import{join as xie}from"path";var fy=d({featureId:a().describe("Stable billing feature id."),name:a().describe("Human-readable feature name."),type:f(["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:v([f(["cents","count","minutes","gb"]),K()]).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:M().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:M().nullable().describe("Metered only: the plan grants an effectively-unlimited allowance. null = unknown / boolean feature."),balance:p().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:p().nullable().describe("Metered only: the plan's included allowance (the period limit), in this feature's unit. null = unknown / boolean feature."),usage:p().nullable().describe("Metered only: amount consumed this period, in this feature's unit. null = unknown / boolean feature."),nextResetAt:p().nullable().describe("Metered only: epoch-ms when the period balance resets. null = unknown / no scheduled reset."),fundedBy:a().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:p().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:p().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 Ok=d({generationLimit:v([d({applies:M(),unit:x("cents_of_provider_cost"),cap:p().nullable(),spent:p().nullable(),remaining:p().nullable()}),K()]).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:a().describe("The org this API key is bound to \u2014 resolved server-side from the Authorization credential, NEVER from the request body/query."),displayName:a().nullable().describe("Org/customer display name from the billing record; null when not set or unknown."),plan:v([d({id:a().describe("Plan/product id (e.g. free, pro, business, studio)."),name:a().nullable().describe("Plan display name.")}),K()]).describe("The customer's current base plan/tier. null = unknown (billing not configured, or no active plan resolvable yet)."),entitlements:P(a(),fy).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:d({generateMediaUsdPerCall:p().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:M().describe("false = billing is not configured in this environment, so plan/entitlement values are best-effort and may be null (unknown), not authoritative.")}).describe("Account discovery for the authenticated key: identity + plan + entitlements + cost ceilings. Read this to see what your plan/credits allow before a metered call (create_render / compose / generate_media / create_brand_kit).");var Mk=0,Rk=9007199254740991,Ek=d({name:a().min(1),permissions:P(a(),b(f(["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:z().gt(Mk).max(Rk).optional().describe("Lifetime in seconds; omit for no expiry.")});var Dk=d({key:a().describe("The full secret key (cf_test_\u2026 / cf_live_\u2026). Shown ONCE \u2014 store it now."),id:a(),prefix:a(),start:a().describe("First chars of the key, for later identification.")});var gy=d({ref:a().describe("Placement handle: a pack soundId/bedId, or an org media id."),role:f(["vo","music","sfx","ambience"]).describe("Declared role for mix policy."),envelopeClass:f(["transient","sweep","ambient"]).describe("Coarse envelope shape \u2014 the browse grouping."),description:a(),durationSec:p(),evidence:d({envelopeClass:f(["transient","sweep","ambient"]),attackMs:p().optional(),spectralCentroidHz:p().optional(),meanVolumeDb:p().optional(),maxVolumeDb:p().optional()}).describe("Envelope probe evidence (always carries envelopeClass)."),source:f(["pack","org","generated"]).describe("Provenance discriminant."),license:a().describe('"CC0" (pack), "org-owned"/a CC token (org), or "generated".'),provenance:a().describe("Human-legible provenance (pack attribution / org-owned / generator + prompt)."),bpm:p().optional().describe("Tempo \u2014 present for music-role entries."),mood:b(a()).optional().describe("Editorial mood tags \u2014 present for pack music beds.")});var xy=d({id:a().describe("Billing catalog product id (e.g. pro, pro_yearly)."),tier:a().describe("Plan tier: pro | business | studio."),name:a(),interval:a().describe("month | year."),priceUsd:p().describe("Price in USD for the interval.")});var Ak=d({plans:b(xy).describe("Every purchasable {tier, interval} and its product id."),billingConfigured:M()});var _k=200,Lk=200,jk=2e3,Fk=500,Nk=500,Vk=5e3,Uk=0,Bk=1,qk=300,Wk=0,Zk=1e4,Gk=120,Kk=24,Jk=40,Hk=500,Xk=0,Yk=5e3,Qk=0,eP=5e3,tP=0,oP=2e3,rP=0,nP=9007199254740991,iP=24,sP=0,aP=1,cP=300,pP=24,dP=4e3,lP=0,uP=60,mP=6,hP=24,fP=60,yy=d({kitId:a().min(1).max(_k),name:a().min(1).max(Lk),description:a().max(jk).optional(),tagline:a().max(Fk).optional(),secondaryTagline:a().max(Nk).optional(),colors:d({primary:a().min(1),secondary:a().min(1),accent:a().min(1),background:a().min(1),text:a().min(1)}),extraColors:b(d({hex:a().min(1),label:a().min(1),usage:a().optional()})).optional(),headingFont:d({fontFamily:a().min(1),fontWeight:p()}),bodyFont:d({fontFamily:a().min(1),fontWeight:p()}),voiceGuidelines:a().max(Vk).optional(),syncCaptions:M().optional(),captionProfile:d({fontFamily:a().optional(),fontSize:p().optional(),fontWeight:p().optional(),color:a().optional(),highlightColor:a().optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase"]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().optional(),entranceStaggerMs:p().optional(),exitMs:p().optional(),emphasisColor:a().optional(),emphasisScale:p().optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:p().optional(),emphasisFontStyle:f(["normal","italic"]).optional(),emphasisTextTransform:f(["none","uppercase"]).optional(),emphasisLetterSpacing:p().optional(),emphasisPlate:M().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional()}).optional(),motion:d({duration:p().optional(),easing:v([f(["linear","ease","ease-in","ease-out","ease-in-out"]),d({kind:x("cubic-bezier"),x1:p(),y1:p(),x2:p(),y2:p()})]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:p().optional(),exitMs:p().optional()}).optional(),logo:d({src:a().min(1),alt:a().optional(),placement:f(["tl","tr","bl","br"]).optional(),sizePct:p().optional()}).optional(),intro:d({kind:f(["card","video"]),src:a().min(1).optional(),title:a().optional(),subtitle:a().optional(),durationMs:p().optional()}).optional(),outro:d({kind:f(["card","video"]),src:a().min(1).optional(),title:a().optional(),subtitle:a().optional(),durationMs:p().optional()}).optional(),watermark:d({src:a().min(1),opacity:p().min(Uk).max(Bk).optional(),placement:f(["tl","tr","bl","br"]).optional()}).optional(),spacing:d({base:p().optional(),lg:p().optional(),sm:p().optional()}).optional(),sizing:d({fontSizeHeading:p().optional(),fontSizeBody:p().optional(),fontSizeLabel:p().optional(),borderRadius:p().optional()}).optional(),audio:d({sfxIntensity:f(["off","light","standard","dense"]).optional(),musicEnabled:M().optional(),musicMood:a().max(qk).optional(),sonicLogo:d({ref:a().min(1),placement:f(["intro","outro","both"]),offsetMs:z().min(Wk).max(Zk).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:d({tick:a().min(1).optional(),pop:a().min(1).optional(),impact:a().min(1).optional(),confirm:a().min(1).optional(),error:a().min(1).optional(),whoosh:a().min(1).optional(),riser:a().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:d({bedId:a().min(1).optional(),genre:a().max(Gk).optional(),bpmRange:d({min:p(),max:p()}).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:v([d({ref:a().min(1)}),K()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional(),exemplarKeys:b(a().min(1)).max(Kk).optional(),contactSheetKey:a().min(1).optional(),motifs:b(d({id:a().min(1).max(Jk),observed:a().min(1).max(Hk),body:v([d({kind:x("card"),html:a().min(1),tokens:P(a(),a()).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:P(a(),O()).optional()}),d({kind:x("component"),componentId:a().min(1),props:P(a(),O()).optional()})]),motion:d({preset:f(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),enterMs:z().min(Xk).max(Yk).optional(),exitMs:z().min(Qk).max(eP).optional(),staggerMs:z().min(tP).max(oP).optional(),confidence:f(["high","low"]).optional()}).optional(),role:f(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),zone:d({x:p(),y:p(),w:p(),h:p()}).optional(),evidence:b(z().min(rP).max(nP)).max(iP).optional(),diffScore:p().min(sP).max(aP).optional(),coverage:f(["reproduced","approximated","skipped"]),skipReason:a().max(cP).optional()})).max(pP).optional(),styleRubric:a().max(dP).optional(),density:d({graphicsPerMin:p().min(lP).max(uP),maxSimultaneous:z().min(1).max(mP)}).optional(),inspiration:d({sources:b(a()).min(1).max(hP),extractedAt:p(),extractionVersion:a().min(1).max(fP)}).optional()}).describe("POST /brand-kits body. Org/user are server-resolved; never accepted from the body.");var gP=12,xP=d({motifId:a().min(1).optional(),limit:z().min(1).max(gP).optional()}).describe("POST /brand-kits/{id}/exemplars body \u2014 select which exemplar frames to presign.");var yP=-9007199254740991,bP=9007199254740991,SP=d({exemplars:b(d({index:z().min(yP).max(bP),url:a()})),contactSheetUrl:a().optional()});var zP=300,vP=0,wP=1e4,IP=120,kP=24,PP=40,$P=500,TP=0,CP=5e3,OP=0,MP=5e3,RP=0,EP=2e3,DP=0,AP=9007199254740991,_P=24,LP=0,jP=1,FP=300,NP=24,VP=4e3,UP=0,BP=60,qP=6,WP=24,ZP=60,cn=d({id:a(),name:a(),description:a().nullable(),tagline:a().nullable(),colors:P(a(),a()),extraColors:b(d({name:a(),value:a()})).optional(),fonts:d({heading:v([d({family:a(),weight:v([p(),a()]).optional()}),K()]),body:v([d({family:a(),weight:v([p(),a()]).optional()}),K()])}),voiceGuidelines:a().nullable(),captions:d({sync:M(),profile:v([P(a(),O()),K()])}),motion:d({duration:p().optional(),easing:v([f(["linear","ease","ease-in","ease-out","ease-in-out"]),d({kind:x("cubic-bezier"),x1:p(),y1:p(),x2:p(),y2:p()})]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:p().optional(),exitMs:p().optional()}).optional(),logo:d({src:a(),alt:a().optional(),placement:f(["tl","tr","bl","br"]).optional(),sizePct:p().optional()}).optional(),intro:d({kind:f(["card","video"]),src:a().optional(),title:a().optional(),subtitle:a().optional(),durationMs:p().optional()}).optional(),outro:d({kind:f(["card","video"]),src:a().optional(),title:a().optional(),subtitle:a().optional(),durationMs:p().optional()}).optional(),watermark:d({src:a(),opacity:p().optional(),placement:f(["tl","tr","bl","br"]).optional()}).optional(),spacing:d({base:p().optional(),lg:p().optional(),sm:p().optional()}).optional(),sizing:d({fontSizeHeading:p().optional(),fontSizeBody:p().optional(),fontSizeLabel:p().optional(),borderRadius:p().optional()}).optional(),audio:d({sfxIntensity:f(["off","light","standard","dense"]).optional(),musicEnabled:M().optional(),musicMood:a().max(zP).optional(),sonicLogo:d({ref:a().min(1),placement:f(["intro","outro","both"]),offsetMs:z().min(vP).max(wP).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:d({tick:a().min(1).optional(),pop:a().min(1).optional(),impact:a().min(1).optional(),confirm:a().min(1).optional(),error:a().min(1).optional(),whoosh:a().min(1).optional(),riser:a().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:d({bedId:a().min(1).optional(),genre:a().max(IP).optional(),bpmRange:d({min:p(),max:p()}).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:v([d({ref:a().min(1)}),K()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional(),exemplarKeys:b(a().min(1)).max(kP).optional(),contactSheetKey:a().min(1).optional(),motifs:b(d({id:a().min(1).max(PP),observed:a().min(1).max($P),body:v([d({kind:x("card"),html:a().min(1),tokens:P(a(),a()).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:P(a(),O()).optional()}),d({kind:x("component"),componentId:a().min(1),props:P(a(),O()).optional()})]),motion:d({preset:f(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),enterMs:z().min(TP).max(CP).optional(),exitMs:z().min(OP).max(MP).optional(),staggerMs:z().min(RP).max(EP).optional(),confidence:f(["high","low"]).optional()}).optional(),role:f(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),zone:d({x:p(),y:p(),w:p(),h:p()}).optional(),evidence:b(z().min(DP).max(AP)).max(_P).optional(),diffScore:p().min(LP).max(jP).optional(),coverage:f(["reproduced","approximated","skipped"]),skipReason:a().max(FP).optional()})).max(NP).optional(),styleRubric:a().max(VP).optional(),density:d({graphicsPerMin:p().min(UP).max(BP),maxSimultaneous:z().min(1).max(qP)}).optional(),inspiration:d({sources:b(a()).min(1).max(WP),extractedAt:p(),extractionVersion:a().min(1).max(ZP)}).optional(),createdAt:a(),updatedAt:a()}).describe("Brand kit response per \xA7Brand Kits.");var Pe=d({hasMore:M(),nextCursor:a().nullable(),prevCursor:a().nullable()}).describe("Cursor pagination metadata.");var GP=d({data:b(cn),pagination:Pe});var KP=300,Qo=d({music:d({enabled:M().describe("Whether the compose carries a music bed."),mood:a().max(KP).optional().describe("Freeform mood/genre prompt for the GENERATED bed (e.g. 'understated editorial, warm'). Ignored when mediaId pins a track."),mediaId:a().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:d({intensity:f(["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 JP=0,HP=0,XP=0,YP=80,QP=8,er=d({id:a().min(1),intent:a().min(1).describe("What this beat DOES editorially (hook the claim, prove it, CTA\u2026)."),durationSec:p().gt(JP).optional(),source:d({mediaId:a().min(1),startSec:p().min(HP),endSec:p().gt(XP)}).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:d({role:f(["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:b(a().min(1).max(YP)).max(QP).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 tr=f(["overlay","component","card","no-transitions"]);var e$=3,or=d({holdAt:b(f(["content","layout","motion"])).max(e$).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:M().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:f(["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 ve=d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional()}).describe("Output-format spec per \xA7Format.");var t$=200,o$=2e3,r$=500,n$=100,i$=0,s$=3600,a$=500,c$=500,p$=35,d$=500,l$=2e3,u$=24,m$=24,h$=12,f$=24,g$=0,x$=0,y$=0,b$=0,S$=0,z$=0,v$=0,w$=4,I$=0,k$=0,P$=0,$$=0,T$=0,C$=0,O$=0,M$=0,R$=0,E$=1,D$=0,A$=1,_$=.1,L$=1,j$=0,F$=0,N$=-.3,V$=.3,U$=-.3,B$=.3,q$=0,W$=1,Z$=0,G$=1,K$=-.3,J$=.3,H$=0,X$=1,Y$=0,Q$=0,eT=1,tT=0,oT=1,rT=0,nT=1,iT=0,sT=1,aT=0,cT=0,pT=2,dT=16,lT=8,uT=d({projectId:a().min(1),name:a().max(t$).optional(),goal:a().min(1).max(o$).describe("What the video must accomplish."),audience:a().max(r$).optional(),platform:a().max(n$).optional(),format:ve.optional(),durationSec:p().gt(i$).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:a().max(a$).optional(),cta:a().max(c$).optional(),locale:a().max(p$).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:a().max(d$).optional(),caption:a().max(l$).optional(),beats:b(er).max(u$).optional(),mustIncludes:b(a().min(1)).max(m$).optional(),references:b(a()).max(h$).optional(),captions:d({styleId:a().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:b(a().min(1)).max(f$).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:d({textAnimation:a().optional(),transitions:a().optional(),colorMood:a().optional(),captionStyle:a().optional()}).optional(),seededGraphics:b(d({id:a().min(1),startTime:p().min(g$).describe("Timeline start (seconds)."),duration:p().gt(x$).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(y$).describe("Source trim start (seconds)."),end:p().min(b$).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(S$),end:p().min(z$),reason:a().optional()})).optional(),volume:p().min(v$).max(w$).optional(),muted:M().optional(),playbackRate:p().gt(I$).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(k$).optional(),fadeOutMs:p().min(P$).optional(),loop:M().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max($$),attackMs:p().min(T$),releaseMs:p().min(C$),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(O$).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(M$).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(R$).max(E$),y:p().min(D$).max(A$)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("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:a().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:p().min(_$).max(L$).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:d({in:p().min(j$).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().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:d({x:p().min(N$).max(V$).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(U$).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()}),d({kind:x("component"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:P(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(q$).max(W$),y:p().min(Z$).max(G$)}).optional(),parallax:p().min(K$).max(J$).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:P(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().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:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().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. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:P(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(H$).max(X$).optional(),scale:p().gt(Y$).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(Q$).max(eT),y:p().min(tT).max(oT),w:p().gt(rT).max(nT),h:p().gt(iT).max(sT)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:P(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(aT)}).optional(),linkGroupId:a().min(1).optional(),animate:P(a(),b(d({time:p().min(cT),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(pT)).optional()})).max(dT).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:b(tr).max(lT).optional(),gates:or.optional(),audio:Qo.optional()});var mT=-9007199254740991,hT=9007199254740991,by=d({composeUsd:p(),renderUsdPerExport:p(),estimatedJourneyUsd:p().describe("compose + expected renders \u2014 relay this BEFORE composing."),revisionCyclesIncluded:z().min(mT).max(hT).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 fT=200,gT=2e3,xT=500,yT=100,bT=0,ST=3600,zT=500,vT=500,wT=35,IT=500,kT=2e3,PT=24,$T=24,TT=12,CT=24,OT=0,MT=0,RT=0,ET=0,DT=0,AT=0,_T=0,LT=4,jT=0,FT=0,NT=0,VT=0,UT=0,BT=0,qT=0,WT=0,ZT=0,GT=1,KT=0,JT=1,HT=.1,XT=1,YT=0,QT=0,e1=-.3,t1=.3,o1=-.3,r1=.3,n1=0,i1=1,s1=0,a1=1,c1=-.3,p1=.3,d1=0,l1=1,u1=0,m1=0,h1=1,f1=0,g1=1,x1=0,y1=1,b1=0,S1=1,z1=0,v1=0,w1=2,I1=16,k1=8,Eu=d({id:a(),projectId:a(),kind:f(["authored","clip"]).describe("authored = create_brief; clip = minted by suggest_briefs from an AI clip suggestion."),sourceSuggestionId:a().optional().describe("kind:'clip' provenance \u2014 the suggestion this Brief was minted from."),name:a().max(fT).optional(),goal:a().min(1).max(gT).describe("What the video must accomplish."),audience:a().max(xT).optional(),platform:a().max(yT).optional(),format:ve.optional(),durationSec:p().gt(bT).max(ST).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:a().max(zT).optional(),cta:a().max(vT).optional(),locale:a().max(wT).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:a().max(IT).optional(),caption:a().max(kT).optional(),beats:b(er).max(PT).optional(),mustIncludes:b(a().min(1)).max($T).optional(),references:b(a()).max(TT).optional(),captions:d({styleId:a().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:b(a().min(1)).max(CT).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:d({textAnimation:a().optional(),transitions:a().optional(),colorMood:a().optional(),captionStyle:a().optional()}).optional(),seededGraphics:b(d({id:a().min(1),startTime:p().min(OT).describe("Timeline start (seconds)."),duration:p().gt(MT).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(RT).describe("Source trim start (seconds)."),end:p().min(ET).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(DT),end:p().min(AT),reason:a().optional()})).optional(),volume:p().min(_T).max(LT).optional(),muted:M().optional(),playbackRate:p().gt(jT).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(FT).optional(),fadeOutMs:p().min(NT).optional(),loop:M().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(VT),attackMs:p().min(UT),releaseMs:p().min(BT),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(qT).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(WT).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(ZT).max(GT),y:p().min(KT).max(JT)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("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:a().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:p().min(HT).max(XT).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:d({in:p().min(YT).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(QT).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:d({x:p().min(e1).max(t1).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(o1).max(r1).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()}),d({kind:x("component"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:P(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(n1).max(i1),y:p().min(s1).max(a1)}).optional(),parallax:p().min(c1).max(p1).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:P(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().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:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().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. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:P(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(d1).max(l1).optional(),scale:p().gt(u1).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(m1).max(h1),y:p().min(f1).max(g1),w:p().gt(x1).max(y1),h:p().gt(b1).max(S1)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:P(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(z1)}).optional(),linkGroupId:a().min(1).optional(),animate:P(a(),b(d({time:p().min(v1),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(w1)).optional()})).max(I1).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:b(tr).max(k1).optional(),gates:or.optional(),audio:Qo.optional(),quote:by,createdAt:p(),updatedAt:p()});var P1=d({data:b(Eu),pagination:Pe});var $1=200,T1=2e3,C1=500,O1=100,M1=0,R1=3600,E1=500,D1=500,A1=35,_1=500,L1=2e3,j1=24,F1=24,N1=12,V1=24,U1=0,B1=0,q1=0,W1=0,Z1=0,G1=0,K1=0,J1=4,H1=0,X1=0,Y1=0,Q1=0,eC=0,tC=0,oC=0,rC=0,nC=0,iC=1,sC=0,aC=1,cC=.1,pC=1,dC=0,lC=0,uC=-.3,mC=.3,hC=-.3,fC=.3,gC=0,xC=1,yC=0,bC=1,SC=-.3,zC=.3,vC=0,wC=1,IC=0,kC=0,PC=1,$C=0,TC=1,CC=0,OC=1,MC=0,RC=1,EC=0,DC=0,AC=2,_C=16,LC=8,jC=d({name:a().max($1).optional(),goal:a().min(1).max(T1).optional().describe("What the video must accomplish."),audience:a().max(C1).optional(),platform:a().max(O1).optional(),format:ve.optional(),durationSec:p().gt(M1).max(R1).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:a().max(E1).optional(),cta:a().max(D1).optional(),locale:a().max(A1).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:a().max(_1).optional(),caption:a().max(L1).optional(),beats:b(er).max(j1).optional(),mustIncludes:b(a().min(1)).max(F1).optional(),references:b(a()).max(N1).optional(),captions:d({styleId:a().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:b(a().min(1)).max(V1).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:d({textAnimation:a().optional(),transitions:a().optional(),colorMood:a().optional(),captionStyle:a().optional()}).optional(),seededGraphics:b(d({id:a().min(1),startTime:p().min(U1).describe("Timeline start (seconds)."),duration:p().gt(B1).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(q1).describe("Source trim start (seconds)."),end:p().min(W1).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(Z1),end:p().min(G1),reason:a().optional()})).optional(),volume:p().min(K1).max(J1).optional(),muted:M().optional(),playbackRate:p().gt(H1).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(X1).optional(),fadeOutMs:p().min(Y1).optional(),loop:M().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(Q1),attackMs:p().min(eC),releaseMs:p().min(tC),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(oC).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(rC).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(nC).max(iC),y:p().min(sC).max(aC)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("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:a().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:p().min(cC).max(pC).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:d({in:p().min(dC).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(lC).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:d({x:p().min(uC).max(mC).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(hC).max(fC).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()}),d({kind:x("component"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:P(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(gC).max(xC),y:p().min(yC).max(bC)}).optional(),parallax:p().min(SC).max(zC).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:P(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().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:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().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. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:P(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(vC).max(wC).optional(),scale:p().gt(IC).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(kC).max(PC),y:p().min($C).max(TC),w:p().gt(CC).max(OC),h:p().gt(MC).max(RC)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:P(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(EC)}).optional(),linkGroupId:a().min(1).optional(),animate:P(a(),b(d({time:p().min(DC),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(AC)).optional()})).max(_C).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:b(tr).max(LC).optional(),gates:or.optional(),audio:Qo.optional()});var FC="month",NC=d({plan:f(["credit_pack_10","credit_pack_30","credit_pack_100"]).describe("Plan tier to subscribe to."),interval:f(["month","year"]).default(FC).describe("Billing interval: 'month' (monthly) or 'year' (annual, ~2 months free).")});var VC=d({url:a().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:a(),interval:a(),productId:a().describe("Resolved billing catalog product id.")});var UC=0,BC=9007199254740991,qC=2e3,Sy=d({anchor:v([d({beatId:a().min(1)}),d({timecodeMs:z().min(UC).max(BC)})]).describe("What the comment is about: a plan beat (content gate) or a timecode on the artifact (layout/motion gates)."),verdict:f(["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:a().max(qC).optional()});var Ds=d({thisStepUsd:p().describe("What approving costs NEXT (the render at the final gate; $0 earlier)."),jobSpendSoFarUsd:p().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:p().describe("The same journey number the Brief quoted.")});var As=f(["content","layout","motion"]);var WC=-9007199254740991,ZC=9007199254740991,GC=-9007199254740991,KC=9007199254740991,Du=d({id:a(),projectId:a(),composeJobId:a().optional(),briefId:a().optional(),kind:f(["gate","score"]),stage:As.optional(),version:z().min(WC).max(ZC),status:f(["awaiting","approved","revised","abandoned","expired","superseded"]),artifact:O().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:b(a()).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:O().optional().describe("Per-criterion scores + critique from the design loop / judge, incl. lock_violation entries."),quote:Ds.optional(),revisionCycle:z().min(GC).max(KC).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:O().optional().describe("The recorded decision {decision, comments?, globalNote?, decidedAt} once resolved."),reviewMode:f(["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:a().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:p(),updatedAt:p()});var JC=d({data:b(Du),pagination:Pe});var HC=24,XC=4e3,YC=d({decision:f(["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:b(Sy).max(HC).optional(),edits:O().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:a().max(XC).optional()}).describe("POST /checkpoints/:id/resume body \u2014 the A1 review grammar.");var QC=d({ok:x(!0)}).describe("POST /checkpoints/:id/resume response.");var ufe=d({ok:M()});var hfe=d({etag:a()});var eO=0,tO=64,oO=0,rO=64,nO=1,iO=0,sO=1,aO=1,cO=0,pO=1,rr=d({version:x(2),assets:P(a(),d({kind:f(["image","video","audio","data"]),required:M(),mimeTypes:b(a().min(1)).min(1).optional(),mediaDemand:v([d({mode:x("original")}),d({mode:x("tier"),tier:v([x(256),x(512),x(1024),x(2048)])}),d({mode:x("auto"),maxProjectedWidthRatio:p().gt(eO).max(tO),maxProjectedHeightRatio:p().gt(oO).max(rO),minVisibleSourceWidthRatio:p().gt(iO).max(sO).default(nO),minVisibleSourceHeightRatio:p().gt(cO).max(pO).default(aO)})]).optional()})),graphics:d({api:f(["canvas2d","webgl","webgl2","webgpu"]),required:x(!0),accelerationPreference:f(["hardware-preferred","software-allowed"])}),alphaPolicy:f(["requires-transparency","allows-opaque"]),sceneShot:d({version:x(2)}).optional()});var dO=200,lO=200,uO=2e3,mO=200,hO=0,zy=d({componentId:a().min(1).max(dO),tsxSource:a().min(1),name:a().min(1).max(lO),description:a().max(uO),category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),propSchema:P(a(),O()).optional(),origin:f(["customer-owned","server-native"]).optional(),ejectedFrom:a().max(mO).optional(),tokens:P(a(),O()).optional(),examples:b(P(a(),O())).optional(),durationInFrames:p().gt(hO).optional(),manifest:rr}).describe("POST /components body. Org/user are server-resolved; never accepted from the body.");var vy=d({clipSourceKind:f(["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:f(["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 wy=d({name:a(),mood:b(a()).optional(),params:P(a(),O()).optional(),description:a().optional()});var Iy=d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional()});var Au=d({id:a(),name:a(),description:a(),source:f(["default","installed"]).describe("'default' = built-in primitive (place by primitiveId); 'installed' = org-authored component (place by componentId)."),category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),kind:f(["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:a(),propSchema:P(a(),O()),propDefaults:P(a(),O()).optional(),textParam:a().nullish().describe("The param field that carries this primitive's primary text; null = no single text slot."),subtextParam:a().nullish().describe("The param field for secondary text (subtitle/byline); null = none."),format:Iy.optional(),durationInFrames:p().optional(),intent:a().optional().describe("Selection signal: a verb naming what this primitive accomplishes (e.g. 'product-trailer'). Match it to the beat you are authoring."),useWhen:a().optional().describe("When to use this \u2014 AND when not to. The negative guidance is load-bearing; read it before picking."),pairsWith:b(a()).optional().describe("Authoring guidance: ids of primitives that COMPOSE well with this one in the same edit."),avoidWith:b(a()).optional().describe("Authoring guidance: ids of primitives that CONFLICT with this one \u2014 do not place together."),tags:b(a()).optional().describe("Free-text search keywords."),mood:b(a()).optional().describe("Vibe/tone tags (e.g. 'cinematic', 'minimal'). Filter to match the edit's mood."),tier:f(["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:b(f(["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')."),examples:b(wy).optional(),fixedCopy:b(a()).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:b(d({param:a(),brandToken:a()})).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:vy.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:b(a()).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 ky=d({soundId:a().describe("Stable sound-pack item id."),family:f(["tick","pop","impact","confirm","error","whoosh","riser"]).describe("Editorial family the compose sfx pass binds by."),envelopeClass:f(["transient","sweep","ambient"]).describe("Coarse envelope shape \u2014 the browse grouping."),intensity:f(["subtle","standard","strong"]),durationSec:p().describe("Duration of the mastered asset (seconds)."),description:a().describe("One-line human-legible caption."),attribution:a().describe("CC0 provenance string.")});var fO=d({data:b(Au),pagination:Pe,brandTokens:b(a()).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:b(ky).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:b(gy).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 Py=d({artifactKind:x("image"),contentType:f(["image/png","image/jpeg"]),cached:M(),listUsd:p().optional().describe("List price charged for this delivered preview."),url:ke(),urlExpiresAt:a()});var $y=d({artifactKind:x("motion"),contentType:x("video/webm"),cached:M(),listUsd:p().optional().describe("List price charged for this delivered preview."),url:ke(),urlExpiresAt:a()});var Ty=v([Py,$y]);var gO=d({id:a(),name:a(),description:a(),source:f(["default","installed"]),tsxSource:a(),propSchema:P(a(),O()),origin:f(["customer-owned","server-native"]).optional(),ejectedFrom:a().optional(),tokens:P(a(),O()).optional(),examples:b(P(a(),O())).optional(),durationInFrames:p().optional(),manifest:rr}).describe("Installed component SOURCE (TSX) + ownership provenance per \xA7Components.");var xO=200,yO=2e3,bO=200,SO=0,zO=d({tsxSource:a().min(1).optional(),name:a().min(1).max(xO).optional(),description:a().max(yO).optional(),category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),propSchema:P(a(),O()).optional(),origin:f(["customer-owned","server-native"]).optional(),ejectedFrom:a().max(bO).optional(),tokens:P(a(),O()).optional(),examples:b(P(a(),O())).optional(),durationInFrames:p().gt(SO).optional(),manifest:rr.optional()}).describe("PUT /components/:id body. Org/user are server-resolved; never accepted from the body.");var vO=2e3,wO=5,IO=0,kO=0,PO=10,$O=-9007199254740991,TO=9007199254740991,CO=64,OO=3,MO=d({suggestionId:a().min(1).optional(),fromComposition:M().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:a().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:ve.optional().describe("Optional format override. Phase 2 ignores this \u2014 format precedence is project.compositionFormat \u2192 9:16 fhd 30fps default."),scope:O().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:a().max(vO).optional().describe("Structured critique block (per compose-api-contract.md decision #11). Capped at 2KB total; per-criterion blocks capped at 500 chars."),parentJobId:a().optional().describe("Pointer to the prior compose job this run iterates on. Surfaced on the resulting compose job as baselineComposeJobId."),maxCandidates:z().min(1).max(wO).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:p().gt(IO).optional().describe("Per-job budget cap (USD). Clamped at the route against the org's composeMaxBudgetUsdPerJob setting."),qualityThreshold:p().min(kO).max(PO).optional().describe("Composite-score accept threshold. Server default per contract."),seed:z().min($O).max(TO).optional().describe("Deterministic seed for replay."),clientNonce:a().max(CO).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:b(f(["content","layout","motion"])).max(OO).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 RO=d({composeJobId:a().describe("Opaque compose job id; pass to the SSE stream URL."),projectId:a(),status:f(["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:a().optional().describe("Relative SSE endpoint to stream this job's events (per compose-api-contract.md).")}).describe("POST /projects/:id/compose response.");var qfe=d({suggestionId:a().min(1),format:d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional(),platform:a().optional()}).optional()});var EO=0,DO=9007199254740991,Cy=d({mode:f(["advise","amend","explore"]),assessment:d({editorial:d({score:p(),grounding:f(["measured","judged"]),abstained:M(),reliability:p().optional()}),spatial:d({score:p(),grounding:f(["measured","judged"]),abstained:M(),reliability:p().optional()}),brand:d({score:p(),grounding:f(["measured","judged"]),abstained:M(),reliability:p().optional()}),caption:d({score:p(),grounding:f(["measured","judged"]),abstained:M(),reliability:p().optional()})}).optional().describe("Grounded critique of the CURRENT composition. Omitted for mode=advise."),proposals:b(d({label:a(),candidateIndex:z().min(EO).max(DO).optional().describe("Present for amend/explore \u2014 adopt via POST /compose/jobs/:jobId/select with this candidateIndex. Absent for advise."),changeSummary:b(a()).describe("Human-legible edit-pattern labels."),boundToEtag:a().optional().describe("The composition etag this proposal was computed against."),expectedDelta:P(a(),a()).optional().describe("Advisory per-criterion score lift; NOT authoritative pre-recalibration.")})),principles:b(a()).describe("Reusable, grounded lessons for the client's next authoring."),plan:O().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:a().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 AO=-9007199254740991,_O=9007199254740991,LO=0,jO=9007199254740991,FO=-9007199254740991,NO=9007199254740991,VO=d({composeJobId:a(),projectId:a(),status:f(["queued","running","awaiting_input","complete","failed","cancelled"]),error:a().nullable(),request:d({suggestionId:a().optional(),fromComposition:M().optional(),scope:O().optional(),critique:a().optional(),parentJobId:a().optional(),maxCandidates:z().min(AO).max(_O).optional(),budgetUsd:p().optional(),qualityThreshold:p().optional()}),candidates:b(O()),winner:v([d({candidateIndex:z().min(LO).max(jO),compositionRunId:a()}),K()]),listUsd:p().optional(),startedAt:p(),completedAt:p().nullable(),advisoryResult:Cy.optional(),checkpoint:d({checkpointId:a(),stage:f(["content","layout","motion"]),version:z().min(FO).max(NO)}).optional()});var Oy=d({composeJobId:a(),projectId:a(),status:f(["queued","running","awaiting_input","complete","failed","cancelled"]),suggestionId:a().optional(),createdAt:p(),completedAt:p().nullable()});var UO=d({jobs:b(Oy)});var BO=0,qO=9007199254740991,WO=d({candidateIndex:z().min(BO).max(qO),selectStrategy:f(["agent-authoritative","editor-merge","editor-replace"]),ifMatch:a().optional()}).describe("POST /projects/:id/compose/jobs/:jobId/select body.");var ZO=0,GO=9007199254740991,KO=d({newCompositionEtag:a(),mergeResult:d({replayedEdits:z().min(ZO).max(GO),droppedEdits:b(d({trackId:a(),clipId:a().optional(),wordStartMs:p().optional(),reason:f(["target_removed","conflict"])}))}).optional()}).describe("POST /projects/:id/compose/jobs/:jobId/select response.");var JO=0,HO=4,XO=0,YO=0,QO=0,eM=0,tM=0,oM=0,rM=0,nM=4,iM=0,sM=0,aM=0,cM=0,pM=0,dM=0,lM=0,uM=0,mM=0,hM=1,fM=0,gM=1,xM=.1,yM=1,bM=0,SM=0,zM=-.3,vM=.3,wM=-.3,IM=.3,kM=0,PM=1,$M=0,TM=1,CM=-.3,OM=.3,MM=0,RM=1,EM=0,DM=0,AM=1,_M=0,LM=1,jM=0,FM=1,NM=0,VM=1,UM=0,BM=0,qM=2,WM=0,ZM=0,GM=0,KM=0,JM=0,HM=0,XM=15,YM=100,QM=900,eR=0,tR=100,oR=900,rR=0,nR=0,iR=0,sR=0,aR=0,cR=100,pR=0,dR=0,lR=15,uR=100,mR=900,hR=0,fR=100,gR=900,xR=0,yR=0,bR=0,SR=0,zR=0,vR=100,_u=d({v:x(1),format:d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional(),platform:a().optional()}),tracks:b(d({id:a().min(1),kind:f(["video","audio","image","overlay","effect"]),name:a().optional(),enabled:M().optional(),volume:p().min(JO).max(HO).optional(),contents:b(v([d({id:a().min(1),startTime:p().min(XO).describe("Timeline start (seconds)."),duration:p().gt(YO).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(QO).describe("Source trim start (seconds)."),end:p().min(eM).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(tM),end:p().min(oM),reason:a().optional()})).optional(),volume:p().min(rM).max(nM).optional(),muted:M().optional(),playbackRate:p().gt(iM).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(sM).optional(),fadeOutMs:p().min(aM).optional(),loop:M().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(cM),attackMs:p().min(pM),releaseMs:p().min(dM),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(lM).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(uM).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(mM).max(hM),y:p().min(fM).max(gM)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("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:a().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:p().min(xM).max(yM).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:d({in:p().min(bM).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(SM).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:d({x:p().min(zM).max(vM).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(wM).max(IM).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()}),d({kind:x("component"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:P(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(kM).max(PM),y:p().min($M).max(TM)}).optional(),parallax:p().min(CM).max(OM).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:P(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().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:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().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. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:P(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(MM).max(RM).optional(),scale:p().gt(EM).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(DM).max(AM),y:p().min(_M).max(LM),w:p().gt(jM).max(FM),h:p().gt(NM).max(VM)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:P(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(UM)}).optional(),linkGroupId:a().min(1).optional(),animate:P(a(),b(d({time:p().min(BM),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(qM)).optional()}),d({id:a().min(1),startTime:p().min(WM).describe("Timeline start (seconds)."),duration:p().gt(ZM).describe("Gap duration (seconds).")})]))})),markers:b(d({id:a().min(1),startTime:p().min(GM),endTime:p().min(KM).optional(),kind:a().min(1),name:a().optional(),metadata:P(a(),O()).optional()})).optional(),captions:v([d({source:x("derived"),from:d({clipId:a()}),segments:b(d({words:b(d({text:a().min(1),startMs:p().min(JM).describe("Word start on the composition timeline, in milliseconds."),endMs:p().min(HM).describe("Word end on the composition timeline, in milliseconds."),emphasis:M().optional(),annotate:f(["circle","underline"]).optional()}))})),style:d({fontFamily:a().min(1).optional(),fontSize:p().min(1).max(XM).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:z().min(YM).max(QM).optional(),color:a().min(1).optional(),highlightColor:a().min(1).optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase","capitalize"]).optional(),emphasisColor:a().optional(),emphasisGradient:a().optional(),emphasisScale:p().gt(eR).optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:z().min(tR).max(oR).optional(),emphasisTextTransform:f(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:p().optional(),emphasisFontStyle:f(["normal","italic"]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().min(rR).optional(),entranceStaggerMs:p().min(nR).optional(),exitMs:p().min(iR).optional(),emphasisPlate:M().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional(),emphasisPlateAltColor:a().optional(),emphasisPlateAltTextColor:a().optional(),emphasisPlateRadius:p().min(sR).optional(),emphasisPlatePadX:p().optional(),emphasisPlatePadY:p().optional(),annotationColor:a().optional(),maxWidthPercent:p().gt(aR).max(cR).optional()}).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({source:x("authored"),segments:b(d({words:b(d({text:a().min(1),startMs:p().min(pR).describe("Word start on the composition timeline, in milliseconds."),endMs:p().min(dR).describe("Word end on the composition timeline, in milliseconds."),emphasis:M().optional(),annotate:f(["circle","underline"]).optional()}))})),style:d({fontFamily:a().min(1).optional(),fontSize:p().min(1).max(lR).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:z().min(uR).max(mR).optional(),color:a().min(1).optional(),highlightColor:a().min(1).optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase","capitalize"]).optional(),emphasisColor:a().optional(),emphasisGradient:a().optional(),emphasisScale:p().gt(hR).optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:z().min(fR).max(gR).optional(),emphasisTextTransform:f(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:p().optional(),emphasisFontStyle:f(["normal","italic"]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().min(xR).optional(),entranceStaggerMs:p().min(yR).optional(),exitMs:p().min(bR).optional(),emphasisPlate:M().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional(),emphasisPlateAltColor:a().optional(),emphasisPlateAltTextColor:a().optional(),emphasisPlateRadius:p().min(SR).optional(),emphasisPlatePadX:p().optional(),emphasisPlatePadY:p().optional(),annotationColor:a().optional(),maxWidthPercent:p().gt(zR).max(vR).optional()}).optional(),zPlane:f(["front","behind-subject"]).optional()})]).optional(),license:d({type:a().min(1),source:a().optional(),notes:a().optional()}).optional(),accessibility:d({audioDescriptionTrackId:a().optional(),captionsTrackId:a().optional(),signLanguageTrackId:a().optional(),notes:a().optional()}).optional()}).describe("Canonical composition wire shape (multi-track; carries reframe, captions, markers).");var Se=v([K(),M(),p(),a(),b(Ho(()=>Se)),P(a(),Ho(()=>Se))]);var wR=64,IR=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),kR=1,PR=0,$R=1,TR=0,CR=1,OR=200,MR=4e3,RR=0,ER=3.141592653589793,DR=64,AR=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),_R=0,LR=1,jR=0,FR=1,NR=0,VR=1,UR=0,BR=1,qR=0,WR=1,ZR=2.333,GR=0,KR=1,JR=16,HR=64,XR=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),YR=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),QR=256,e2=new RegExp("^[a-f0-9]{64}$"),t2=0,o2=9007199254740991,r2=0,n2=9007199254740991,i2=0,s2=9007199254740991,a2=256,c2=0,p2=0,d2=9007199254740991,l2=0,u2=9007199254740991,m2=64,h2=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),f2=1,g2=0,x2=1,y2=0,b2=1,S2=80,z2=2e3,v2=64,w2=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),I2=0,k2=1,P2=0,$2=1,T2=0,C2=1,O2=0,M2=1,R2=0,E2=1,D2=2.333,A2=0,_2=1,L2=16,j2=64,F2=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),N2=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),V2=256,U2=new RegExp("^[a-f0-9]{64}$"),B2=0,q2=9007199254740991,W2=0,Z2=9007199254740991,G2=0,K2=9007199254740991,J2=256,H2=0,X2=0,Y2=9007199254740991,Q2=0,eE=9007199254740991,tE=64,oE=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),rE=1,nE=0,iE=1,sE=0,aE=1,cE=40,pE=8e3,dE=40,lE=8e3,uE=32,mE=4,hE=200,fE=32,gE=0,xE=15,yE=0,bE="satin",SE=64,zE=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),vE=0,wE=1,IE=0,kE=1,PE=0,$E=1,TE=0,CE=1,OE=0,ME=1,RE=2.333,EE=0,DE=1,AE=16,_E=64,LE=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),jE=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),FE=256,NE=new RegExp("^[a-f0-9]{64}$"),VE=0,UE=9007199254740991,BE=0,qE=9007199254740991,WE=0,ZE=9007199254740991,GE=256,KE=0,JE=0,HE=9007199254740991,XE=0,YE=9007199254740991,QE=64,eD=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),tD=1,oD=0,rD=1,nD=0,iD=1,sD=40,aD=8e3,cD=40,pD=8e3,dD="contain",lD="straight",uD=!0,mD="hidden",hD=64,fD=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),gD=0,xD=1,yD=0,bD=1,SD=0,zD=1,vD=0,wD=1,ID=0,kD=1,PD=2.333,$D=0,TD=1,CD=16,OD=64,MD=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),RD=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),ED=256,DD=new RegExp("^[a-f0-9]{64}$"),AD=0,_D=9007199254740991,LD=0,jD=9007199254740991,FD=0,ND=9007199254740991,VD=256,UD=0,BD=0,qD=9007199254740991,WD=0,ZD=9007199254740991,GD=64,KD=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),JD=1,HD=0,XD=1,YD=512,QD=new RegExp("^[^\\r\\n]+$"),eA=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),tA=16,oA=24,rA=128,nA=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),iA=100,sA=900,aA=8,cA=800,pA=1.2,dA=.6,lA=3,uA=0,mA=-20,hA=40,fA="center",gA=0,xA=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),yA=1,bA=0,SA=64,zA=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),vA=1,wA=0,IA=1,kA=512,PA=new RegExp("^[^\\r\\n]+$"),$A=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),TA=16,CA=24,OA=128,MA=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),RA=100,EA=900,DA=8,AA=800,_A=1.2,LA=.6,jA=3,FA=0,NA=-20,VA=40,UA="center",BA=0,qA=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),WA=0,ZA=1,GA=0,My=v([d({kind:x("laptop"),id:a().min(1).max(wR).regex(IR),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(PR).default(kR)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(TR).max(CR).default($R),width:p().min(OR).max(MR),openAngle:p().min(RR).max(ER),materials:b(d({role:a().min(1).max(DR),type:f(["physical","unlit"]),color:v([a().regex(AR),f(["$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:p().min(_R).max(LR).optional(),metalness:p().min(jR).max(FR).optional(),clearcoat:p().min(NR).max(VR).optional(),clearcoatRoughness:p().min(UR).max(BR).optional(),anisotropy:p().min(qR).max(WR).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(ZR).optional(),reflectivity:p().min(GR).max(KR).optional()})).max(JR).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(HR).regex(XR).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(YR),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(QR),sourceVersionId:a().regex(e2)}),captureFrame:z().min(t2).max(o2),layout:d({width:z().gt(r2).max(n2),height:z().gt(i2).max(s2)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(a2),startFrame:z().min(p2).max(d2).default(c2),endFrame:z().gt(l2).max(u2).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(m2).regex(h2),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(g2).default(f2)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(y2).max(b2).default(x2),width:p().min(S2).max(z2),materials:b(d({role:a().min(1).max(v2),type:f(["physical","unlit"]),color:v([a().regex(w2),f(["$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:p().min(I2).max(k2).optional(),metalness:p().min(P2).max($2).optional(),clearcoat:p().min(T2).max(C2).optional(),clearcoatRoughness:p().min(O2).max(M2).optional(),anisotropy:p().min(R2).max(E2).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(D2).optional(),reflectivity:p().min(A2).max(_2).optional()})).max(L2).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(j2).regex(F2).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(N2),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(V2),sourceVersionId:a().regex(U2)}),captureFrame:z().min(B2).max(q2),layout:d({width:z().gt(W2).max(Z2),height:z().gt(G2).max(K2)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(J2),startFrame:z().min(X2).max(Y2).default(H2),endFrame:z().gt(Q2).max(eE).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(tE).regex(oE),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(nE).default(rE)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(sE).max(aE).default(iE),width:p().min(cE).max(pE),height:p().min(dE).max(lE),thickness:p().min(mE).max(hE).default(uE),cornerRadius:p().min(gE).default(fE),edgeRadius:p().min(yE).default(xE),finish:f(["satin","brushed"]).default(bE),materials:b(d({role:a().min(1).max(SE),type:f(["physical","unlit"]),color:v([a().regex(zE),f(["$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:p().min(vE).max(wE).optional(),metalness:p().min(IE).max(kE).optional(),clearcoat:p().min(PE).max($E).optional(),clearcoatRoughness:p().min(TE).max(CE).optional(),anisotropy:p().min(OE).max(ME).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(RE).optional(),reflectivity:p().min(EE).max(DE).optional()})).max(AE).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(_E).regex(LE).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(jE),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(FE),sourceVersionId:a().regex(NE)}),captureFrame:z().min(VE).max(UE),layout:d({width:z().gt(BE).max(qE),height:z().gt(WE).max(ZE)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(GE),startFrame:z().min(JE).max(HE).default(KE),endFrame:z().gt(XE).max(YE).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max(QE).regex(eD),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(oD).default(tD)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(nD).max(iD).default(rD),width:p().min(sD).max(aD),height:p().min(cD).max(pD),fit:f(["contain","cover"]).default(dD),transparency:f(["straight","premultiplied","opaque"]).default(lD),depthWrite:M().default(uD),backface:f(["hidden","visible"]).default(mD),materials:b(d({role:a().min(1).max(hD),type:f(["physical","unlit"]),color:v([a().regex(fD),f(["$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:p().min(gD).max(xD).optional(),metalness:p().min(yD).max(bD).optional(),clearcoat:p().min(SD).max(zD).optional(),clearcoatRoughness:p().min(vD).max(wD).optional(),anisotropy:p().min(ID).max(kD).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(PD).optional(),reflectivity:p().min($D).max(TD).optional()})).max(CD).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(OD).regex(MD).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(RD),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(ED),sourceVersionId:a().regex(DD)}),captureFrame:z().min(AD).max(_D),layout:d({width:z().gt(LD).max(jD),height:z().gt(FD).max(ND)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(VD),startFrame:z().min(BD).max(qD).default(UD),endFrame:z().gt(WD).max(ZD).optional()})]))}),d({id:a().min(1).max(GD).regex(KD),kind:x("text"),opacity:p().min(HD).max(XD).default(JD),lines:b(d({runs:b(d({text:a().min(1).max(YD).regex(QD),color:v([a().regex(eA),f(["$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:M().optional()})).min(1).max(tA)})).min(1).max(oA),fontFamily:v([a().min(1).max(rA).regex(nA),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(iA).max(sA),fontStyle:f(["normal","italic"]),fontSize:p().min(aA).max(cA),lineHeight:p().min(dA).max(lA).default(pA),letterSpacing:p().min(mA).max(hA).default(uA),align:f(["left","center","right"]).default(fA),maxWidth:p().gt(gA).optional(),color:v([a().regex(xA),f(["$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:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(bA).default(yA)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max(SA).regex(zA),kind:x("text"),opacity:p().min(wA).max(IA).default(vA),lines:b(d({runs:b(d({text:a().min(1).max(kA).regex(PA),color:v([a().regex($A),f(["$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:M().optional()})).min(1).max(TA)})).min(1).max(CA),fontFamily:v([a().min(1).max(OA).regex(MA),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(RA).max(EA),fontStyle:f(["normal","italic"]),fontSize:p().min(DA).max(AA),lineHeight:p().min(LA).max(jA).default(_A),letterSpacing:p().min(NA).max(VA).default(FA),align:f(["left","center","right"]).default(UA),maxWidth:p().gt(BA).optional(),color:v([a().regex(qA),f(["$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:x("screen"),x:p(),y:p(),rotation:p().default(WA),scale:p().gt(GA).default(ZA)})]);var KA=64,JA=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),HA=1,XA=0,YA=1,QA=0,e_=1,t_=16,o_=64,r_=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),n_=1,i_=0,s_=1,a_=0,c_=1,p_=200,d_=4e3,l_=0,u_=3.141592653589793,m_=64,h_=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),f_=0,g_=1,x_=0,y_=1,b_=0,S_=1,z_=0,v_=1,w_=0,I_=1,k_=2.333,P_=0,$_=1,T_=16,C_=64,O_=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),M_=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),R_=256,E_=new RegExp("^[a-f0-9]{64}$"),D_=0,A_=9007199254740991,__=0,L_=9007199254740991,j_=0,F_=9007199254740991,N_=256,V_=0,U_=0,B_=9007199254740991,q_=0,W_=9007199254740991,Z_=64,G_=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),K_=1,J_=0,H_=1,X_=0,Y_=1,Q_=80,eL=2e3,tL=64,oL=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),rL=0,nL=1,iL=0,sL=1,aL=0,cL=1,pL=0,dL=1,lL=0,uL=1,mL=2.333,hL=0,fL=1,gL=16,xL=64,yL=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),bL=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),SL=256,zL=new RegExp("^[a-f0-9]{64}$"),vL=0,wL=9007199254740991,IL=0,kL=9007199254740991,PL=0,$L=9007199254740991,TL=256,CL=0,OL=0,ML=9007199254740991,RL=0,EL=9007199254740991,DL=64,AL=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),_L=1,LL=0,jL=1,FL=0,NL=1,VL=40,UL=8e3,BL=40,qL=8e3,WL=32,ZL=4,GL=200,KL=32,JL=0,HL=15,XL=0,YL="satin",QL=64,ej=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),tj=0,oj=1,rj=0,nj=1,ij=0,sj=1,aj=0,cj=1,pj=0,dj=1,lj=2.333,uj=0,mj=1,hj=16,fj=64,gj=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),xj=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),yj=256,bj=new RegExp("^[a-f0-9]{64}$"),Sj=0,zj=9007199254740991,vj=0,wj=9007199254740991,Ij=0,kj=9007199254740991,Pj=256,$j=0,Tj=0,Cj=9007199254740991,Oj=0,Mj=9007199254740991,Rj=64,Ej=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Dj=1,Aj=0,_j=1,Lj=0,jj=1,Fj=40,Nj=8e3,Vj=40,Uj=8e3,Bj="contain",qj="straight",Wj=!0,Zj="hidden",Gj=64,Kj=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Jj=0,Hj=1,Xj=0,Yj=1,Qj=0,eF=1,tF=0,oF=1,rF=0,nF=1,iF=2.333,sF=0,aF=1,cF=16,pF=64,dF=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),lF=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),uF=256,mF=new RegExp("^[a-f0-9]{64}$"),hF=0,fF=9007199254740991,gF=0,xF=9007199254740991,yF=0,bF=9007199254740991,SF=256,zF=0,vF=0,wF=9007199254740991,IF=0,kF=9007199254740991,PF=64,$F=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),TF=1,CF=0,OF=1,MF=512,RF=new RegExp("^[^\\r\\n]+$"),EF=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),DF=16,AF=24,_F=128,LF=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),jF=100,FF=900,NF=8,VF=800,UF=1.2,BF=.6,qF=3,WF=0,ZF=-20,GF=40,KF="center",JF=0,HF=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),XF=1,YF=0,QF=64,e4=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),t4=1,o4=0,r4=1,n4=512,i4=new RegExp("^[^\\r\\n]+$"),s4=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),a4=16,c4=24,p4=128,d4=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),l4=100,u4=900,m4=8,h4=800,f4=1.2,g4=.6,x4=3,y4=0,b4=-20,S4=40,z4="center",v4=0,w4=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),I4=0,k4=1,P4=0,Ry=v([d({kind:x("group"),id:a().min(1).max(KA).regex(JA),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(XA).default(HA)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(QA).max(e_).default(YA),children:b(My).min(1).max(t_)}),d({kind:x("laptop"),id:a().min(1).max(o_).regex(r_),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(i_).default(n_)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(a_).max(c_).default(s_),width:p().min(p_).max(d_),openAngle:p().min(l_).max(u_),materials:b(d({role:a().min(1).max(m_),type:f(["physical","unlit"]),color:v([a().regex(h_),f(["$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:p().min(f_).max(g_).optional(),metalness:p().min(x_).max(y_).optional(),clearcoat:p().min(b_).max(S_).optional(),clearcoatRoughness:p().min(z_).max(v_).optional(),anisotropy:p().min(w_).max(I_).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(k_).optional(),reflectivity:p().min(P_).max($_).optional()})).max(T_).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(C_).regex(O_).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(M_),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(R_),sourceVersionId:a().regex(E_)}),captureFrame:z().min(D_).max(A_),layout:d({width:z().gt(__).max(L_),height:z().gt(j_).max(F_)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(N_),startFrame:z().min(U_).max(B_).default(V_),endFrame:z().gt(q_).max(W_).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(Z_).regex(G_),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(J_).default(K_)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(X_).max(Y_).default(H_),width:p().min(Q_).max(eL),materials:b(d({role:a().min(1).max(tL),type:f(["physical","unlit"]),color:v([a().regex(oL),f(["$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:p().min(rL).max(nL).optional(),metalness:p().min(iL).max(sL).optional(),clearcoat:p().min(aL).max(cL).optional(),clearcoatRoughness:p().min(pL).max(dL).optional(),anisotropy:p().min(lL).max(uL).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(mL).optional(),reflectivity:p().min(hL).max(fL).optional()})).max(gL).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(xL).regex(yL).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(bL),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(SL),sourceVersionId:a().regex(zL)}),captureFrame:z().min(vL).max(wL),layout:d({width:z().gt(IL).max(kL),height:z().gt(PL).max($L)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(TL),startFrame:z().min(OL).max(ML).default(CL),endFrame:z().gt(RL).max(EL).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(DL).regex(AL),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(LL).default(_L)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(FL).max(NL).default(jL),width:p().min(VL).max(UL),height:p().min(BL).max(qL),thickness:p().min(ZL).max(GL).default(WL),cornerRadius:p().min(JL).default(KL),edgeRadius:p().min(XL).default(HL),finish:f(["satin","brushed"]).default(YL),materials:b(d({role:a().min(1).max(QL),type:f(["physical","unlit"]),color:v([a().regex(ej),f(["$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:p().min(tj).max(oj).optional(),metalness:p().min(rj).max(nj).optional(),clearcoat:p().min(ij).max(sj).optional(),clearcoatRoughness:p().min(aj).max(cj).optional(),anisotropy:p().min(pj).max(dj).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(lj).optional(),reflectivity:p().min(uj).max(mj).optional()})).max(hj).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(fj).regex(gj).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(xj),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(yj),sourceVersionId:a().regex(bj)}),captureFrame:z().min(Sj).max(zj),layout:d({width:z().gt(vj).max(wj),height:z().gt(Ij).max(kj)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(Pj),startFrame:z().min(Tj).max(Cj).default($j),endFrame:z().gt(Oj).max(Mj).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max(Rj).regex(Ej),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(Aj).default(Dj)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(Lj).max(jj).default(_j),width:p().min(Fj).max(Nj),height:p().min(Vj).max(Uj),fit:f(["contain","cover"]).default(Bj),transparency:f(["straight","premultiplied","opaque"]).default(qj),depthWrite:M().default(Wj),backface:f(["hidden","visible"]).default(Zj),materials:b(d({role:a().min(1).max(Gj),type:f(["physical","unlit"]),color:v([a().regex(Kj),f(["$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:p().min(Jj).max(Hj).optional(),metalness:p().min(Xj).max(Yj).optional(),clearcoat:p().min(Qj).max(eF).optional(),clearcoatRoughness:p().min(tF).max(oF).optional(),anisotropy:p().min(rF).max(nF).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(iF).optional(),reflectivity:p().min(sF).max(aF).optional()})).max(cF).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(pF).regex(dF).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(lF),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(uF),sourceVersionId:a().regex(mF)}),captureFrame:z().min(hF).max(fF),layout:d({width:z().gt(gF).max(xF),height:z().gt(yF).max(bF)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(SF),startFrame:z().min(vF).max(wF).default(zF),endFrame:z().gt(IF).max(kF).optional()})]))}),d({id:a().min(1).max(PF).regex($F),kind:x("text"),opacity:p().min(CF).max(OF).default(TF),lines:b(d({runs:b(d({text:a().min(1).max(MF).regex(RF),color:v([a().regex(EF),f(["$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:M().optional()})).min(1).max(DF)})).min(1).max(AF),fontFamily:v([a().min(1).max(_F).regex(LF),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(jF).max(FF),fontStyle:f(["normal","italic"]),fontSize:p().min(NF).max(VF),lineHeight:p().min(BF).max(qF).default(UF),letterSpacing:p().min(ZF).max(GF).default(WF),align:f(["left","center","right"]).default(KF),maxWidth:p().gt(JF).optional(),color:v([a().regex(HF),f(["$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:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(YF).default(XF)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max(QF).regex(e4),kind:x("text"),opacity:p().min(o4).max(r4).default(t4),lines:b(d({runs:b(d({text:a().min(1).max(n4).regex(i4),color:v([a().regex(s4),f(["$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:M().optional()})).min(1).max(a4)})).min(1).max(c4),fontFamily:v([a().min(1).max(p4).regex(d4),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(l4).max(u4),fontStyle:f(["normal","italic"]),fontSize:p().min(m4).max(h4),lineHeight:p().min(g4).max(x4).default(f4),letterSpacing:p().min(b4).max(S4).default(y4),align:f(["left","center","right"]).default(z4),maxWidth:p().gt(v4).optional(),color:v([a().regex(w4),f(["$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:x("screen"),x:p(),y:p(),rotation:p().default(I4),scale:p().gt(P4).default(k4)})]);var $4=64,T4=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),C4=1,O4=0,M4=1,R4=0,E4=1,D4=16,A4=64,_4=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),L4=1,j4=0,F4=1,N4=0,V4=1,U4=200,B4=4e3,q4=0,W4=3.141592653589793,Z4=64,G4=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),K4=0,J4=1,H4=0,X4=1,Y4=0,Q4=1,eN=0,tN=1,oN=0,rN=1,nN=2.333,iN=0,sN=1,aN=16,cN=64,pN=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),dN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),lN=256,uN=new RegExp("^[a-f0-9]{64}$"),mN=0,hN=9007199254740991,fN=0,gN=9007199254740991,xN=0,yN=9007199254740991,bN=256,SN=0,zN=0,vN=9007199254740991,wN=0,IN=9007199254740991,kN=64,PN=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),$N=1,TN=0,CN=1,ON=0,MN=1,RN=80,EN=2e3,DN=64,AN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),_N=0,LN=1,jN=0,FN=1,NN=0,VN=1,UN=0,BN=1,qN=0,WN=1,ZN=2.333,GN=0,KN=1,JN=16,HN=64,XN=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),YN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),QN=256,eV=new RegExp("^[a-f0-9]{64}$"),tV=0,oV=9007199254740991,rV=0,nV=9007199254740991,iV=0,sV=9007199254740991,aV=256,cV=0,pV=0,dV=9007199254740991,lV=0,uV=9007199254740991,mV=64,hV=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),fV=1,gV=0,xV=1,yV=0,bV=1,SV=40,zV=8e3,vV=40,wV=8e3,IV=32,kV=4,PV=200,$V=32,TV=0,CV=15,OV=0,MV="satin",RV=64,EV=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),DV=0,AV=1,_V=0,LV=1,jV=0,FV=1,NV=0,VV=1,UV=0,BV=1,qV=2.333,WV=0,ZV=1,GV=16,KV=64,JV=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),HV=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),XV=256,YV=new RegExp("^[a-f0-9]{64}$"),QV=0,e6=9007199254740991,t6=0,o6=9007199254740991,r6=0,n6=9007199254740991,i6=256,s6=0,a6=0,c6=9007199254740991,p6=0,d6=9007199254740991,l6=64,u6=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),m6=1,h6=0,f6=1,g6=0,x6=1,y6=40,b6=8e3,S6=40,z6=8e3,v6="contain",w6="straight",I6=!0,k6="hidden",P6=64,$6=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),T6=0,C6=1,O6=0,M6=1,R6=0,E6=1,D6=0,A6=1,_6=0,L6=1,j6=2.333,F6=0,N6=1,V6=16,U6=64,B6=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),q6=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),W6=256,Z6=new RegExp("^[a-f0-9]{64}$"),G6=0,K6=9007199254740991,J6=0,H6=9007199254740991,X6=0,Y6=9007199254740991,Q6=256,e9=0,t9=0,o9=9007199254740991,r9=0,n9=9007199254740991,i9=64,s9=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),a9=1,c9=0,p9=1,d9=512,l9=new RegExp("^[^\\r\\n]+$"),u9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),m9=16,h9=24,f9=128,g9=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),x9=100,y9=900,b9=8,S9=800,z9=1.2,v9=.6,w9=3,I9=0,k9=-20,P9=40,$9="center",T9=0,C9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),O9=1,M9=0,R9=64,E9=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),D9=1,A9=0,_9=1,L9=512,j9=new RegExp("^[^\\r\\n]+$"),F9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),N9=16,V9=24,U9=128,B9=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),q9=100,W9=900,Z9=8,G9=800,K9=1.2,J9=.6,H9=3,X9=0,Y9=-20,Q9=40,eU="center",tU=0,oU=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),rU=0,nU=1,iU=0,Ey=v([d({kind:x("group"),id:a().min(1).max($4).regex(T4),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(O4).default(C4)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(R4).max(E4).default(M4),children:b(Ry).min(1).max(D4)}),d({kind:x("laptop"),id:a().min(1).max(A4).regex(_4),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(j4).default(L4)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(N4).max(V4).default(F4),width:p().min(U4).max(B4),openAngle:p().min(q4).max(W4),materials:b(d({role:a().min(1).max(Z4),type:f(["physical","unlit"]),color:v([a().regex(G4),f(["$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:p().min(K4).max(J4).optional(),metalness:p().min(H4).max(X4).optional(),clearcoat:p().min(Y4).max(Q4).optional(),clearcoatRoughness:p().min(eN).max(tN).optional(),anisotropy:p().min(oN).max(rN).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(nN).optional(),reflectivity:p().min(iN).max(sN).optional()})).max(aN).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(cN).regex(pN).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(dN),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(lN),sourceVersionId:a().regex(uN)}),captureFrame:z().min(mN).max(hN),layout:d({width:z().gt(fN).max(gN),height:z().gt(xN).max(yN)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(bN),startFrame:z().min(zN).max(vN).default(SN),endFrame:z().gt(wN).max(IN).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(kN).regex(PN),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(TN).default($N)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(ON).max(MN).default(CN),width:p().min(RN).max(EN),materials:b(d({role:a().min(1).max(DN),type:f(["physical","unlit"]),color:v([a().regex(AN),f(["$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:p().min(_N).max(LN).optional(),metalness:p().min(jN).max(FN).optional(),clearcoat:p().min(NN).max(VN).optional(),clearcoatRoughness:p().min(UN).max(BN).optional(),anisotropy:p().min(qN).max(WN).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(ZN).optional(),reflectivity:p().min(GN).max(KN).optional()})).max(JN).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(HN).regex(XN).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(YN),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(QN),sourceVersionId:a().regex(eV)}),captureFrame:z().min(tV).max(oV),layout:d({width:z().gt(rV).max(nV),height:z().gt(iV).max(sV)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(aV),startFrame:z().min(pV).max(dV).default(cV),endFrame:z().gt(lV).max(uV).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(mV).regex(hV),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(gV).default(fV)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(yV).max(bV).default(xV),width:p().min(SV).max(zV),height:p().min(vV).max(wV),thickness:p().min(kV).max(PV).default(IV),cornerRadius:p().min(TV).default($V),edgeRadius:p().min(OV).default(CV),finish:f(["satin","brushed"]).default(MV),materials:b(d({role:a().min(1).max(RV),type:f(["physical","unlit"]),color:v([a().regex(EV),f(["$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:p().min(DV).max(AV).optional(),metalness:p().min(_V).max(LV).optional(),clearcoat:p().min(jV).max(FV).optional(),clearcoatRoughness:p().min(NV).max(VV).optional(),anisotropy:p().min(UV).max(BV).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(qV).optional(),reflectivity:p().min(WV).max(ZV).optional()})).max(GV).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(KV).regex(JV).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(HV),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(XV),sourceVersionId:a().regex(YV)}),captureFrame:z().min(QV).max(e6),layout:d({width:z().gt(t6).max(o6),height:z().gt(r6).max(n6)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(i6),startFrame:z().min(a6).max(c6).default(s6),endFrame:z().gt(p6).max(d6).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max(l6).regex(u6),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(h6).default(m6)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(g6).max(x6).default(f6),width:p().min(y6).max(b6),height:p().min(S6).max(z6),fit:f(["contain","cover"]).default(v6),transparency:f(["straight","premultiplied","opaque"]).default(w6),depthWrite:M().default(I6),backface:f(["hidden","visible"]).default(k6),materials:b(d({role:a().min(1).max(P6),type:f(["physical","unlit"]),color:v([a().regex($6),f(["$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:p().min(T6).max(C6).optional(),metalness:p().min(O6).max(M6).optional(),clearcoat:p().min(R6).max(E6).optional(),clearcoatRoughness:p().min(D6).max(A6).optional(),anisotropy:p().min(_6).max(L6).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(j6).optional(),reflectivity:p().min(F6).max(N6).optional()})).max(V6).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(U6).regex(B6).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(q6),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(W6),sourceVersionId:a().regex(Z6)}),captureFrame:z().min(G6).max(K6),layout:d({width:z().gt(J6).max(H6),height:z().gt(X6).max(Y6)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(Q6),startFrame:z().min(t9).max(o9).default(e9),endFrame:z().gt(r9).max(n9).optional()})]))}),d({id:a().min(1).max(i9).regex(s9),kind:x("text"),opacity:p().min(c9).max(p9).default(a9),lines:b(d({runs:b(d({text:a().min(1).max(d9).regex(l9),color:v([a().regex(u9),f(["$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:M().optional()})).min(1).max(m9)})).min(1).max(h9),fontFamily:v([a().min(1).max(f9).regex(g9),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(x9).max(y9),fontStyle:f(["normal","italic"]),fontSize:p().min(b9).max(S9),lineHeight:p().min(v9).max(w9).default(z9),letterSpacing:p().min(k9).max(P9).default(I9),align:f(["left","center","right"]).default($9),maxWidth:p().gt(T9).optional(),color:v([a().regex(C9),f(["$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:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(M9).default(O9)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max(R9).regex(E9),kind:x("text"),opacity:p().min(A9).max(_9).default(D9),lines:b(d({runs:b(d({text:a().min(1).max(L9).regex(j9),color:v([a().regex(F9),f(["$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:M().optional()})).min(1).max(N9)})).min(1).max(V9),fontFamily:v([a().min(1).max(U9).regex(B9),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(q9).max(W9),fontStyle:f(["normal","italic"]),fontSize:p().min(Z9).max(G9),lineHeight:p().min(J9).max(H9).default(K9),letterSpacing:p().min(Y9).max(Q9).default(X9),align:f(["left","center","right"]).default(eU),maxWidth:p().gt(tU).optional(),color:v([a().regex(oU),f(["$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:x("screen"),x:p(),y:p(),rotation:p().default(rU),scale:p().gt(iU).default(nU)})]);var sU=64,aU=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),cU=1,pU=0,dU=1,lU=0,uU=1,mU=16,hU=64,fU=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),gU=1,xU=0,yU=1,bU=0,SU=1,zU=200,vU=4e3,wU=0,IU=3.141592653589793,kU=64,PU=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),$U=0,TU=1,CU=0,OU=1,MU=0,RU=1,EU=0,DU=1,AU=0,_U=1,LU=2.333,jU=0,FU=1,NU=16,VU=64,UU=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),BU=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),qU=256,WU=new RegExp("^[a-f0-9]{64}$"),ZU=0,GU=9007199254740991,KU=0,JU=9007199254740991,HU=0,XU=9007199254740991,YU=256,QU=0,e3=0,t3=9007199254740991,o3=0,r3=9007199254740991,n3=64,i3=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),s3=1,a3=0,c3=1,p3=0,d3=1,l3=80,u3=2e3,m3=64,h3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),f3=0,g3=1,x3=0,y3=1,b3=0,S3=1,z3=0,v3=1,w3=0,I3=1,k3=2.333,P3=0,$3=1,T3=16,C3=64,O3=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),M3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),R3=256,E3=new RegExp("^[a-f0-9]{64}$"),D3=0,A3=9007199254740991,_3=0,L3=9007199254740991,j3=0,F3=9007199254740991,N3=256,V3=0,U3=0,B3=9007199254740991,q3=0,W3=9007199254740991,Z3=64,G3=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),K3=1,J3=0,H3=1,X3=0,Y3=1,Q3=40,eB=8e3,tB=40,oB=8e3,rB=32,nB=4,iB=200,sB=32,aB=0,cB=15,pB=0,dB="satin",lB=64,uB=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),mB=0,hB=1,fB=0,gB=1,xB=0,yB=1,bB=0,SB=1,zB=0,vB=1,wB=2.333,IB=0,kB=1,PB=16,$B=64,TB=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),CB=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),OB=256,MB=new RegExp("^[a-f0-9]{64}$"),RB=0,EB=9007199254740991,DB=0,AB=9007199254740991,_B=0,LB=9007199254740991,jB=256,FB=0,NB=0,VB=9007199254740991,UB=0,BB=9007199254740991,qB=64,WB=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),ZB=1,GB=0,KB=1,JB=0,HB=1,XB=40,YB=8e3,QB=40,e5=8e3,t5="contain",o5="straight",r5=!0,n5="hidden",i5=64,s5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),a5=0,c5=1,p5=0,d5=1,l5=0,u5=1,m5=0,h5=1,f5=0,g5=1,x5=2.333,y5=0,b5=1,S5=16,z5=64,v5=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),w5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),I5=256,k5=new RegExp("^[a-f0-9]{64}$"),P5=0,$5=9007199254740991,T5=0,C5=9007199254740991,O5=0,M5=9007199254740991,R5=256,E5=0,D5=0,A5=9007199254740991,_5=0,L5=9007199254740991,j5=64,F5=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),N5=1,V5=0,U5=1,B5=512,q5=new RegExp("^[^\\r\\n]+$"),W5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Z5=16,G5=24,K5=128,J5=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),H5=100,X5=900,Y5=8,Q5=800,eq=1.2,tq=.6,oq=3,rq=0,nq=-20,iq=40,sq="center",aq=0,cq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),pq=1,dq=0,lq=64,uq=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),mq=1,hq=0,fq=1,gq=512,xq=new RegExp("^[^\\r\\n]+$"),yq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),bq=16,Sq=24,zq=128,vq=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),wq=100,Iq=900,kq=8,Pq=800,$q=1.2,Tq=.6,Cq=3,Oq=0,Mq=-20,Rq=40,Eq="center",Dq=0,Aq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),_q=0,Lq=1,jq=0,Dy=v([d({kind:x("group"),id:a().min(1).max(sU).regex(aU),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(pU).default(cU)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(lU).max(uU).default(dU),children:b(Ey).min(1).max(mU)}),d({kind:x("laptop"),id:a().min(1).max(hU).regex(fU),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(xU).default(gU)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(bU).max(SU).default(yU),width:p().min(zU).max(vU),openAngle:p().min(wU).max(IU),materials:b(d({role:a().min(1).max(kU),type:f(["physical","unlit"]),color:v([a().regex(PU),f(["$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:p().min($U).max(TU).optional(),metalness:p().min(CU).max(OU).optional(),clearcoat:p().min(MU).max(RU).optional(),clearcoatRoughness:p().min(EU).max(DU).optional(),anisotropy:p().min(AU).max(_U).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(LU).optional(),reflectivity:p().min(jU).max(FU).optional()})).max(NU).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(VU).regex(UU).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(BU),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(qU),sourceVersionId:a().regex(WU)}),captureFrame:z().min(ZU).max(GU),layout:d({width:z().gt(KU).max(JU),height:z().gt(HU).max(XU)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(YU),startFrame:z().min(e3).max(t3).default(QU),endFrame:z().gt(o3).max(r3).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(n3).regex(i3),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(a3).default(s3)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(p3).max(d3).default(c3),width:p().min(l3).max(u3),materials:b(d({role:a().min(1).max(m3),type:f(["physical","unlit"]),color:v([a().regex(h3),f(["$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:p().min(f3).max(g3).optional(),metalness:p().min(x3).max(y3).optional(),clearcoat:p().min(b3).max(S3).optional(),clearcoatRoughness:p().min(z3).max(v3).optional(),anisotropy:p().min(w3).max(I3).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(k3).optional(),reflectivity:p().min(P3).max($3).optional()})).max(T3).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(C3).regex(O3).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(M3),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(R3),sourceVersionId:a().regex(E3)}),captureFrame:z().min(D3).max(A3),layout:d({width:z().gt(_3).max(L3),height:z().gt(j3).max(F3)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(N3),startFrame:z().min(U3).max(B3).default(V3),endFrame:z().gt(q3).max(W3).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(Z3).regex(G3),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(J3).default(K3)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(X3).max(Y3).default(H3),width:p().min(Q3).max(eB),height:p().min(tB).max(oB),thickness:p().min(nB).max(iB).default(rB),cornerRadius:p().min(aB).default(sB),edgeRadius:p().min(pB).default(cB),finish:f(["satin","brushed"]).default(dB),materials:b(d({role:a().min(1).max(lB),type:f(["physical","unlit"]),color:v([a().regex(uB),f(["$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:p().min(mB).max(hB).optional(),metalness:p().min(fB).max(gB).optional(),clearcoat:p().min(xB).max(yB).optional(),clearcoatRoughness:p().min(bB).max(SB).optional(),anisotropy:p().min(zB).max(vB).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(wB).optional(),reflectivity:p().min(IB).max(kB).optional()})).max(PB).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max($B).regex(TB).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(CB),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(OB),sourceVersionId:a().regex(MB)}),captureFrame:z().min(RB).max(EB),layout:d({width:z().gt(DB).max(AB),height:z().gt(_B).max(LB)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(jB),startFrame:z().min(NB).max(VB).default(FB),endFrame:z().gt(UB).max(BB).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max(qB).regex(WB),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(GB).default(ZB)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(JB).max(HB).default(KB),width:p().min(XB).max(YB),height:p().min(QB).max(e5),fit:f(["contain","cover"]).default(t5),transparency:f(["straight","premultiplied","opaque"]).default(o5),depthWrite:M().default(r5),backface:f(["hidden","visible"]).default(n5),materials:b(d({role:a().min(1).max(i5),type:f(["physical","unlit"]),color:v([a().regex(s5),f(["$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:p().min(a5).max(c5).optional(),metalness:p().min(p5).max(d5).optional(),clearcoat:p().min(l5).max(u5).optional(),clearcoatRoughness:p().min(m5).max(h5).optional(),anisotropy:p().min(f5).max(g5).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(x5).optional(),reflectivity:p().min(y5).max(b5).optional()})).max(S5).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(z5).regex(v5).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(w5),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(I5),sourceVersionId:a().regex(k5)}),captureFrame:z().min(P5).max($5),layout:d({width:z().gt(T5).max(C5),height:z().gt(O5).max(M5)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(R5),startFrame:z().min(D5).max(A5).default(E5),endFrame:z().gt(_5).max(L5).optional()})]))}),d({id:a().min(1).max(j5).regex(F5),kind:x("text"),opacity:p().min(V5).max(U5).default(N5),lines:b(d({runs:b(d({text:a().min(1).max(B5).regex(q5),color:v([a().regex(W5),f(["$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:M().optional()})).min(1).max(Z5)})).min(1).max(G5),fontFamily:v([a().min(1).max(K5).regex(J5),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(H5).max(X5),fontStyle:f(["normal","italic"]),fontSize:p().min(Y5).max(Q5),lineHeight:p().min(tq).max(oq).default(eq),letterSpacing:p().min(nq).max(iq).default(rq),align:f(["left","center","right"]).default(sq),maxWidth:p().gt(aq).optional(),color:v([a().regex(cq),f(["$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:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(dq).default(pq)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max(lq).regex(uq),kind:x("text"),opacity:p().min(hq).max(fq).default(mq),lines:b(d({runs:b(d({text:a().min(1).max(gq).regex(xq),color:v([a().regex(yq),f(["$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:M().optional()})).min(1).max(bq)})).min(1).max(Sq),fontFamily:v([a().min(1).max(zq).regex(vq),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(wq).max(Iq),fontStyle:f(["normal","italic"]),fontSize:p().min(kq).max(Pq),lineHeight:p().min(Tq).max(Cq).default($q),letterSpacing:p().min(Mq).max(Rq).default(Oq),align:f(["left","center","right"]).default(Eq),maxWidth:p().gt(Dq).optional(),color:v([a().regex(Aq),f(["$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:x("screen"),x:p(),y:p(),rotation:p().default(_q),scale:p().gt(jq).default(Lq)})]);var Fq=64,Nq=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Vq=1,Uq=0,Bq=1,qq=0,Wq=1,Zq=16,Gq=64,Kq=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Jq=1,Hq=0,Xq=1,Yq=0,Qq=1,e7=200,t7=4e3,o7=0,r7=3.141592653589793,n7=64,i7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),s7=0,a7=1,c7=0,p7=1,d7=0,l7=1,u7=0,m7=1,h7=0,f7=1,g7=2.333,x7=0,y7=1,b7=16,S7=64,z7=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),v7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),w7=256,I7=new RegExp("^[a-f0-9]{64}$"),k7=0,P7=9007199254740991,$7=0,T7=9007199254740991,C7=0,O7=9007199254740991,M7=256,R7=0,E7=0,D7=9007199254740991,A7=0,_7=9007199254740991,L7=64,j7=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),F7=1,N7=0,V7=1,U7=0,B7=1,q7=80,W7=2e3,Z7=64,G7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),K7=0,J7=1,H7=0,X7=1,Y7=0,Q7=1,e8=0,t8=1,o8=0,r8=1,n8=2.333,i8=0,s8=1,a8=16,c8=64,p8=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),d8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),l8=256,u8=new RegExp("^[a-f0-9]{64}$"),m8=0,h8=9007199254740991,f8=0,g8=9007199254740991,x8=0,y8=9007199254740991,b8=256,S8=0,z8=0,v8=9007199254740991,w8=0,I8=9007199254740991,k8=64,P8=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),$8=1,T8=0,C8=1,O8=0,M8=1,R8=40,E8=8e3,D8=40,A8=8e3,_8=32,L8=4,j8=200,F8=32,N8=0,V8=15,U8=0,B8="satin",q8=64,W8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Z8=0,G8=1,K8=0,J8=1,H8=0,X8=1,Y8=0,Q8=1,eW=0,tW=1,oW=2.333,rW=0,nW=1,iW=16,sW=64,aW=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),cW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),pW=256,dW=new RegExp("^[a-f0-9]{64}$"),lW=0,uW=9007199254740991,mW=0,hW=9007199254740991,fW=0,gW=9007199254740991,xW=256,yW=0,bW=0,SW=9007199254740991,zW=0,vW=9007199254740991,wW=64,IW=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),kW=1,PW=0,$W=1,TW=0,CW=1,OW=40,MW=8e3,RW=40,EW=8e3,DW="contain",AW="straight",_W=!0,LW="hidden",jW=64,FW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),NW=0,VW=1,UW=0,BW=1,qW=0,WW=1,ZW=0,GW=1,KW=0,JW=1,HW=2.333,XW=0,YW=1,QW=16,eZ=64,tZ=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),oZ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),rZ=256,nZ=new RegExp("^[a-f0-9]{64}$"),iZ=0,sZ=9007199254740991,aZ=0,cZ=9007199254740991,pZ=0,dZ=9007199254740991,lZ=256,uZ=0,mZ=0,hZ=9007199254740991,fZ=0,gZ=9007199254740991,xZ=64,yZ=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),bZ=1,SZ=0,zZ=1,vZ=512,wZ=new RegExp("^[^\\r\\n]+$"),IZ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),kZ=16,PZ=24,$Z=128,TZ=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),CZ=100,OZ=900,MZ=8,RZ=800,EZ=1.2,DZ=.6,AZ=3,_Z=0,LZ=-20,jZ=40,FZ="center",NZ=0,VZ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),UZ=1,BZ=0,qZ=64,WZ=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),ZZ=1,GZ=0,KZ=1,JZ=512,HZ=new RegExp("^[^\\r\\n]+$"),XZ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),YZ=16,QZ=24,eG=128,tG=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),oG=100,rG=900,nG=8,iG=800,sG=1.2,aG=.6,cG=3,pG=0,dG=-20,lG=40,uG="center",mG=0,hG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),fG=0,gG=1,xG=0,Ay=v([d({kind:x("group"),id:a().min(1).max(Fq).regex(Nq),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(Uq).default(Vq)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(qq).max(Wq).default(Bq),children:b(Dy).min(1).max(Zq)}),d({kind:x("laptop"),id:a().min(1).max(Gq).regex(Kq),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(Hq).default(Jq)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(Yq).max(Qq).default(Xq),width:p().min(e7).max(t7),openAngle:p().min(o7).max(r7),materials:b(d({role:a().min(1).max(n7),type:f(["physical","unlit"]),color:v([a().regex(i7),f(["$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:p().min(s7).max(a7).optional(),metalness:p().min(c7).max(p7).optional(),clearcoat:p().min(d7).max(l7).optional(),clearcoatRoughness:p().min(u7).max(m7).optional(),anisotropy:p().min(h7).max(f7).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(g7).optional(),reflectivity:p().min(x7).max(y7).optional()})).max(b7).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(S7).regex(z7).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(v7),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(w7),sourceVersionId:a().regex(I7)}),captureFrame:z().min(k7).max(P7),layout:d({width:z().gt($7).max(T7),height:z().gt(C7).max(O7)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(M7),startFrame:z().min(E7).max(D7).default(R7),endFrame:z().gt(A7).max(_7).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(L7).regex(j7),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(N7).default(F7)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(U7).max(B7).default(V7),width:p().min(q7).max(W7),materials:b(d({role:a().min(1).max(Z7),type:f(["physical","unlit"]),color:v([a().regex(G7),f(["$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:p().min(K7).max(J7).optional(),metalness:p().min(H7).max(X7).optional(),clearcoat:p().min(Y7).max(Q7).optional(),clearcoatRoughness:p().min(e8).max(t8).optional(),anisotropy:p().min(o8).max(r8).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(n8).optional(),reflectivity:p().min(i8).max(s8).optional()})).max(a8).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(c8).regex(p8).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(d8),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(l8),sourceVersionId:a().regex(u8)}),captureFrame:z().min(m8).max(h8),layout:d({width:z().gt(f8).max(g8),height:z().gt(x8).max(y8)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(b8),startFrame:z().min(z8).max(v8).default(S8),endFrame:z().gt(w8).max(I8).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(k8).regex(P8),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(T8).default($8)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(O8).max(M8).default(C8),width:p().min(R8).max(E8),height:p().min(D8).max(A8),thickness:p().min(L8).max(j8).default(_8),cornerRadius:p().min(N8).default(F8),edgeRadius:p().min(U8).default(V8),finish:f(["satin","brushed"]).default(B8),materials:b(d({role:a().min(1).max(q8),type:f(["physical","unlit"]),color:v([a().regex(W8),f(["$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:p().min(Z8).max(G8).optional(),metalness:p().min(K8).max(J8).optional(),clearcoat:p().min(H8).max(X8).optional(),clearcoatRoughness:p().min(Y8).max(Q8).optional(),anisotropy:p().min(eW).max(tW).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(oW).optional(),reflectivity:p().min(rW).max(nW).optional()})).max(iW).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(sW).regex(aW).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(cW),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(pW),sourceVersionId:a().regex(dW)}),captureFrame:z().min(lW).max(uW),layout:d({width:z().gt(mW).max(hW),height:z().gt(fW).max(gW)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(xW),startFrame:z().min(bW).max(SW).default(yW),endFrame:z().gt(zW).max(vW).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max(wW).regex(IW),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(PW).default(kW)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(TW).max(CW).default($W),width:p().min(OW).max(MW),height:p().min(RW).max(EW),fit:f(["contain","cover"]).default(DW),transparency:f(["straight","premultiplied","opaque"]).default(AW),depthWrite:M().default(_W),backface:f(["hidden","visible"]).default(LW),materials:b(d({role:a().min(1).max(jW),type:f(["physical","unlit"]),color:v([a().regex(FW),f(["$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:p().min(NW).max(VW).optional(),metalness:p().min(UW).max(BW).optional(),clearcoat:p().min(qW).max(WW).optional(),clearcoatRoughness:p().min(ZW).max(GW).optional(),anisotropy:p().min(KW).max(JW).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(HW).optional(),reflectivity:p().min(XW).max(YW).optional()})).max(QW).optional(),surfaces:P(a(),v([d({source:x("image"),assetSlot:a().min(1).max(eZ).regex(tZ).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(oZ),f(["$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"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(rZ),sourceVersionId:a().regex(nZ)}),captureFrame:z().min(iZ).max(sZ),layout:d({width:z().gt(aZ).max(cZ),height:z().gt(pZ).max(dZ)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:P(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(lZ),startFrame:z().min(mZ).max(hZ).default(uZ),endFrame:z().gt(fZ).max(gZ).optional()})]))}),d({id:a().min(1).max(xZ).regex(yZ),kind:x("text"),opacity:p().min(SZ).max(zZ).default(bZ),lines:b(d({runs:b(d({text:a().min(1).max(vZ).regex(wZ),color:v([a().regex(IZ),f(["$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:M().optional()})).min(1).max(kZ)})).min(1).max(PZ),fontFamily:v([a().min(1).max($Z).regex(TZ),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(CZ).max(OZ),fontStyle:f(["normal","italic"]),fontSize:p().min(MZ).max(RZ),lineHeight:p().min(DZ).max(AZ).default(EZ),letterSpacing:p().min(LZ).max(jZ).default(_Z),align:f(["left","center","right"]).default(FZ),maxWidth:p().gt(NZ).optional(),color:v([a().regex(VZ),f(["$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:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(BZ).default(UZ)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max(qZ).regex(WZ),kind:x("text"),opacity:p().min(GZ).max(KZ).default(ZZ),lines:b(d({runs:b(d({text:a().min(1).max(JZ).regex(HZ),color:v([a().regex(XZ),f(["$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:M().optional()})).min(1).max(YZ)})).min(1).max(QZ),fontFamily:v([a().min(1).max(eG).regex(tG),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(oG).max(rG),fontStyle:f(["normal","italic"]),fontSize:p().min(nG).max(iG),lineHeight:p().min(aG).max(cG).default(sG),letterSpacing:p().min(dG).max(lG).default(pG),align:f(["left","center","right"]).default(uG),maxWidth:p().gt(mG).optional(),color:v([a().regex(hG),f(["$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:x("screen"),x:p(),y:p(),rotation:p().default(fG),scale:p().gt(xG).default(gG)})]);var yG=16,bG=8192,SG=16,zG=8192,vG=.3141592653589793,wG=1.3962634015954636,IG="studio",kG="soft",PG=1,$G=0,TG=-420,CG=.5,OG=0,MG=1,RG={lightingProfile:"studio",preset:"soft",intensity:1,floorY:-420,shadowOpacity:.5},EG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),DG=0,AG=0,_G=1,LG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),jG=2,FG=8,NG=0,VG=1,UG=0,BG=1,qG=0,WG=1,ZG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),GG=2,KG=8,JG={kind:"transparent"},HG=64,XG=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),YG=0,QG=1,eK=0,tK=1,oK=-4,rK=5,nK=0,iK=1,sK=-4,aK=5,cK=256,pK=[],dK=0,lK=0,uK=.5,mK=0,hK=0,fK=1,gK=0,xK=0,yK=0,bK=64,SK=null,zK={grain:0,vignette:0,focus:null},vK=64,wK=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),IK=2,kK=0,PK=[],Lu=d({version:x(2),referenceSize:d({width:z().min(yG).max(bG),height:z().min(SG).max(zG)}),camera:d({position:U([p(),p(),p()]).optional(),rotation:U([p(),p(),p()]).optional(),fov:p().min(vG).max(wG).optional()}).optional(),environment:v([d({kind:x("studio").optional(),lightingProfile:f(["studio","studio-edge"]).default(IG),preset:f(["soft","key","rim"]).default(kG),intensity:p().min($G).default(PG),floorY:p().default(TG),shadowOpacity:p().min(OG).max(MG).default(CG)}),d({kind:x("photographic-studio-v1")})]).default(RG),backdrop:v([d({kind:x("transparent")}),d({kind:x("solid"),color:v([a().regex(EG),f(["$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"])])}),d({kind:x("linear"),angle:p().default(DG),stops:b(d({at:p().min(AG).max(_G),color:v([a().regex(LG),f(["$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(jG).max(FG)}),d({kind:x("radial"),at:U([p().min(NG).max(VG),p().min(UG).max(BG)]).default([.5,.5]),stops:b(d({at:p().min(qG).max(WG),color:v([a().regex(ZG),f(["$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(GG).max(KG)})]).default(JG),layers:b(Ay).min(1),animation:b(d({target:v([d({kind:x("camera")}),d({kind:x("layer"),layerId:a().min(1).max(HG).regex(XG)}),d({kind:x("environment")}),d({kind:x("focus")})]),property:f(["positionX","positionY","positionZ","rotationX","rotationY","rotationZ","fov","scale","opacity","openAngle","x","y","rotation","intensity","distance","range","maxBlur"]),keyframes:b(d({at:p().min(YG).max(QG),value:p(),easing:v([d({kind:x("linear")}),d({kind:x("hold")}),d({kind:x("bezier"),x1:p().min(eK).max(tK),y1:p().min(oK).max(rK),x2:p().min(nK).max(iK),y2:p().min(sK).max(aK)})]).optional()})).min(1).max(cK)})).default(pK),post:d({grain:p().min(lK).max(uK).default(dK),vignette:p().min(hK).max(fK).default(mK),focus:v([d({distance:p().gt(gK),range:p().gt(xK),maxBlur:p().min(yK).max(bK)}),K()]).default(SK)}).default(zK),constraints:b(d({kind:x("minSeparation"),objects:b(a().min(1).max(vK).regex(wK)).min(IK),gap:p().gt(kK)})).default(PK)}).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 $K=0,ju=d({type:f(["cut","fade","dissolve","wipe"]),duration:p().min($K).optional()}).describe("Inter-scene transition.");var TK=0,CK=0,OK=0,MK=0,RK=0,EK=0,DK=0,AK=0,_K=0,LK=0,jK=0,FK=4,NK=0,VK=0,UK=0,BK=0,qK=0,WK=0,ZK=0,GK=0,KK=0,JK=1,HK=0,XK=1,YK=.1,QK=1,eJ=0,tJ=0,oJ=-.3,rJ=.3,nJ=-.3,iJ=.3,sJ=0,aJ=1,cJ=0,pJ=1,dJ=-.3,lJ=.3,uJ=0,mJ=1,hJ=0,fJ=0,gJ=1,xJ=0,yJ=1,bJ=0,SJ=1,zJ=0,vJ=1,wJ=0,IJ=0,kJ=2,PJ=0,$J=0,TJ=0,CJ=0,OJ=0,MJ=0,RJ=0,EJ=4,DJ=0,AJ=0,_J=0,LJ=0,jJ=0,FJ=0,NJ=0,VJ=0,UJ=0,BJ=1,qJ=0,WJ=1,ZJ=.1,GJ=1,KJ=0,JJ=0,HJ=-.3,XJ=.3,YJ=-.3,QJ=.3,eH=0,tH=1,oH=0,rH=1,nH=-.3,iH=.3,sH=0,aH=1,cH=0,pH=0,dH=1,lH=0,uH=1,mH=0,hH=1,fH=0,gH=1,xH=0,yH=0,bH=2,SH=0,zH=0,vH=0,wH=0,IH=0,kH=0,PH=0,$H=4,TH=0,CH=0,OH=0,MH=0,RH=0,EH=0,DH=0,AH=0,_H=0,LH=1,jH=0,FH=1,NH=.1,VH=1,UH=0,BH=0,qH=-.3,WH=.3,ZH=-.3,GH=.3,KH=0,JH=1,HH=0,XH=1,YH=-.3,QH=.3,eX=0,tX=1,oX=0,rX=0,nX=1,iX=0,sX=1,aX=0,cX=1,pX=0,dX=1,lX=0,uX=0,mX=2,hX=0,fX=0,gX=0,xX=0,yX=0,bX=0,SX=0,zX=1,vX=0,wX=1,IX=.1,kX=1,PX=0,$X=0,TX=-.3,CX=.3,OX=-.3,MX=.3,RX=15,EX=100,DX=900,AX=0,_X=100,LX=900,jX=0,FX=0,NX=0,VX=0,UX=0,BX=100,qX=0,WX=0,ZX=15,GX=100,KX=900,JX=0,HX=100,XX=900,YX=0,QX=0,eY=0,tY=0,oY=0,rY=100,nY=0,iY=0,sY=0,aY=2e3,Fu=v([d({type:x("scene.add"),clipId:a(),trackId:a().optional(),newTrack:M().optional(),newTrackId:a().optional(),startTime:p().min(TK),duration:p().gt(CK),scene:Lu,assets:P(a(),a()),transitionIn:ju.optional()}),d({type:x("scene.update"),clipId:a(),startTime:p().min(OK).optional(),duration:p().gt(MK).optional(),scene:Lu.optional(),assets:P(a(),a()).optional(),transitionIn:ju.optional()}),d({type:x("clip.add"),clip:d({id:a().min(1),startTime:p().min(RK).describe("Timeline start (seconds)."),duration:p().gt(EK).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(DK).describe("Source trim start (seconds)."),end:p().min(AK).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(_K),end:p().min(LK),reason:a().optional()})).optional(),volume:p().min(jK).max(FK).optional(),muted:M().optional(),playbackRate:p().gt(NK).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(VK).optional(),fadeOutMs:p().min(UK).optional(),loop:M().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(BK),attackMs:p().min(qK),releaseMs:p().min(WK),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(ZK).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(GK).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(KK).max(JK),y:p().min(HK).max(XK)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("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:a().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:p().min(YK).max(QK).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:d({in:p().min(eJ).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(tJ).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:d({x:p().min(oJ).max(rJ).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(nJ).max(iJ).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()}),d({kind:x("component"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:P(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(sJ).max(aJ),y:p().min(cJ).max(pJ)}).optional(),parallax:p().min(dJ).max(lJ).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:P(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().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:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().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. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:P(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(uJ).max(mJ).optional(),scale:p().gt(hJ).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(fJ).max(gJ),y:p().min(xJ).max(yJ),w:p().gt(bJ).max(SJ),h:p().gt(zJ).max(vJ)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:P(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(wJ)}).optional(),linkGroupId:a().min(1).optional(),animate:P(a(),b(d({time:p().min(IJ),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(kJ)).optional()}),trackId:a().optional(),newTrack:M().optional(),newTrackId:a().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."),d({type:x("clip.remove"),clipId:a()}).describe("Remove a clip by id (located across every track)."),d({type:x("clip.update"),clipId:a(),patch:d({id:a().min(1).optional(),startTime:p().min(PJ).optional().describe("Timeline start (seconds)."),duration:p().gt($J).optional().describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(TJ).describe("Source trim start (seconds)."),end:p().min(CJ).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(OJ),end:p().min(MJ),reason:a().optional()})).optional(),volume:p().min(RJ).max(EJ).optional(),muted:M().optional(),playbackRate:p().gt(DJ).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(AJ).optional(),fadeOutMs:p().min(_J).optional(),loop:M().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(LJ),attackMs:p().min(jJ),releaseMs:p().min(FJ),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(NJ).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(VJ).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(UJ).max(BJ),y:p().min(qJ).max(WJ)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("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:a().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:p().min(ZJ).max(GJ).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:d({in:p().min(KJ).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(JJ).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:d({x:p().min(HJ).max(XJ).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(YJ).max(QJ).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()}),d({kind:x("component"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:P(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(eH).max(tH),y:p().min(oH).max(rH)}).optional(),parallax:p().min(nH).max(iH).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:P(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().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:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().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. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:P(a(),a()).optional(),zPlane:x("front").optional()})]).optional(),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(sH).max(aH).optional(),scale:p().gt(cH).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(pH).max(dH),y:p().min(lH).max(uH),w:p().gt(mH).max(hH),h:p().gt(fH).max(gH)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:P(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(xH)}).optional(),linkGroupId:a().min(1).optional(),animate:P(a(),b(d({time:p().min(yH),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(bH)).optional()})}).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.)"),d({type:x("removeClipsByMediaId"),mediaId:a()}).describe("Remove EVERY clip sourced from a given mediaId (e.g. after deleting that media)."),d({type:x("loadOverlays"),clips:b(d({id:a().min(1),startTime:p().min(SH).describe("Timeline start (seconds)."),duration:p().gt(zH).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(vH).describe("Source trim start (seconds)."),end:p().min(wH).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(IH),end:p().min(kH),reason:a().optional()})).optional(),volume:p().min(PH).max($H).optional(),muted:M().optional(),playbackRate:p().gt(TH).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(CH).optional(),fadeOutMs:p().min(OH).optional(),loop:M().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(MH),attackMs:p().min(RH),releaseMs:p().min(EH),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(DH).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(AH).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(_H).max(LH),y:p().min(jH).max(FH)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("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:a().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:p().min(NH).max(VH).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:d({in:p().min(UH).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(BH).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:d({x:p().min(qH).max(WH).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(ZH).max(GH).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()}),d({kind:x("component"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:P(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(KH).max(JH),y:p().min(HH).max(XH)}).optional(),parallax:p().min(YH).max(QH).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:P(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:P(a(),O()),assets:P(a(),a().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:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().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. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:P(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(eX).max(tX).optional(),scale:p().gt(oX).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(rX).max(nX),y:p().min(iX).max(sX),w:p().gt(aX).max(cX),h:p().gt(pX).max(dX)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:P(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(lX)}).optional(),linkGroupId:a().min(1).optional(),animate:P(a(),b(d({time:p().min(uX),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(mX)).optional()}))}).describe("Replace the overlay channel wholesale with the given clips (bulk set, not a merge)."),d({type:x("addMarker"),marker:d({id:a().min(1),startTime:p().min(hX),endTime:p().min(fX).optional(),kind:a().min(1),name:a().optional(),metadata:P(a(),O()).optional()})}).describe("Add a timeline marker (a named time point/range; carry extensions in `metadata`)."),d({type:x("removeMarker"),markerId:a()}).describe("Remove a marker by id."),d({type:x("updateMarker"),markerId:a(),updates:d({id:a().min(1).optional(),startTime:p().min(gX).optional(),endTime:p().min(xX).optional(),kind:a().min(1).optional(),name:a().optional(),metadata:P(a(),O()).optional()})}).describe("Patch a marker's fields by id (partial merge)."),d({type:x("setCropIntents"),clipId:a(),segments:v([b(d({startSec:p().min(yX).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(bX).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(SX).max(zX),y:p().min(vX).max(wX)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("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:a().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:p().min(IX).max(kX).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:d({in:p().min(PX).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min($X).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:d({x:p().min(TX).max(CX).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(OX).max(MX).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.")})),K()])}).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."),d({type:x("setEffects"),clipId:a(),effects:b(d({primitiveId:a().min(1),params:P(a(),O()).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."),d({type:x("setCaptionStyle"),style:d({fontFamily:a().min(1).optional(),fontSize:p().min(1).max(RX).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:z().min(EX).max(DX).optional(),color:a().min(1).optional(),highlightColor:a().min(1).optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase","capitalize"]).optional(),emphasisColor:a().optional(),emphasisGradient:a().optional(),emphasisScale:p().gt(AX).optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:z().min(_X).max(LX).optional(),emphasisTextTransform:f(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:p().optional(),emphasisFontStyle:f(["normal","italic"]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().min(jX).optional(),entranceStaggerMs:p().min(FX).optional(),exitMs:p().min(NX).optional(),emphasisPlate:M().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional(),emphasisPlateAltColor:a().optional(),emphasisPlateAltTextColor:a().optional(),emphasisPlateRadius:p().min(VX).optional(),emphasisPlatePadX:p().optional(),emphasisPlatePadY:p().optional(),annotationColor:a().optional(),maxWidthPercent:p().gt(UX).max(BX).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."),d({type:x("setCaptionDepth"),zPlane:f(["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."),d({type:x("setCaptions"),segments:b(d({words:b(d({text:a().min(1),startMs:p().min(qX).describe("Word start on the composition timeline, in milliseconds."),endMs:p().min(WX).describe("Word end on the composition timeline, in milliseconds."),emphasis:M().optional(),annotate:f(["circle","underline"]).optional()}))})),style:d({fontFamily:a().min(1).optional(),fontSize:p().min(1).max(ZX).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:z().min(GX).max(KX).optional(),color:a().min(1).optional(),highlightColor:a().min(1).optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase","capitalize"]).optional(),emphasisColor:a().optional(),emphasisGradient:a().optional(),emphasisScale:p().gt(JX).optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:z().min(HX).max(XX).optional(),emphasisTextTransform:f(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:p().optional(),emphasisFontStyle:f(["normal","italic"]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().min(YX).optional(),entranceStaggerMs:p().min(QX).optional(),exitMs:p().min(eY).optional(),emphasisPlate:M().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional(),emphasisPlateAltColor:a().optional(),emphasisPlateAltTextColor:a().optional(),emphasisPlateRadius:p().min(tY).optional(),emphasisPlatePadX:p().optional(),emphasisPlatePadY:p().optional(),annotationColor:a().optional(),maxWidthPercent:p().gt(oY).max(rY).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."),d({type:x("captions.fromTranscript"),mediaId:a().min(1),window:d({startSec:p().min(nY),endSec:p().gt(iY)}).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."),d({type:x("applyMotionPreset"),clipId:a(),preset:a(),params:d({enterMs:p().optional(),exitMs:p().optional(),staggerMs:p().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."),d({type:x("materializeGrid"),clipId:a(),grid:f(["beat","word","shot"]),maxMarkers:z().gt(sY).max(aY).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).'),d({type:x("setFormat"),format:d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["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."),d({type:x("addTrack"),kind:f(["video","audio","image","overlay","effect"]),name:a().optional(),id:a().optional()}).describe("Add an EMPTY track of a given family (video|audio|image|overlay|effect). Optional pinned `id`."),d({type:x("removeTrack"),trackId:a()}).describe("Remove a track AND all its clips by id."),d({type:x("updateTrack"),trackId:a(),updates:d({name:a().optional(),enabled:M().optional()})}).describe("Patch a track's `name` / `enabled` by id."),d({type:x("reorderTracks"),fromIndex:p(),toIndex:p()}).describe("Move a track from one index to another (changes layer/compositing order)."),d({type:x("moveClipToTrack"),clipId:a(),targetTrackId:a(),newStartTime:p().optional()}).describe("Move a clip to another SAME-family track, optionally at a new `newStartTime`."),d({type:x("duplicateClip"),clipId:a(),newClipId:a().optional()}).describe("Duplicate a clip by id. Pin `newClipId` to make the copy's id deterministic (required for a clean undo/inverse)."),d({type:x("cutAndRipple"),start:p(),end:p()}).describe("Server-authoritative: delete the [start,end] time window (seconds) and ripple every downstream clip/marker/caption earlier to close the gap."),d({type:x("ripple"),time:p(),amount:p()}).describe("Server-authoritative: shift everything at/after `time` (seconds) by `amount` seconds (+ opens a gap, \u2212 closes one)."),d({type:x("addExcludedRange"),clipId:a(),sourceStart:p(),sourceEnd:p(),reason:a().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."),d({type:x("removeExcludedRange"),clipId:a(),rangeIdx:p()}).describe("Server-authoritative: remove a clip's previously-added excluded range by index (re-includes that span, ripples downstream).")]).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. Validated strictly server-side against the runtime CompositionOp vocabulary.");var cY=d({ops:b(Fu).min(1),if_match:a().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:M().optional().describe("When true, validate the batch (apply + projection accept/reject guards) WITHOUT persisting. Returns `{ valid, errors }` instead of applying."),session_id:a().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 pY=200,dY=d({name:a().min(1).max(pY).optional(),format:ve.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 lY=0,uY=9007199254740991,_y=d({compositionId:a(),format:ve,etag:a(),isActive:M(),updatedAt:p(),sceneCount:z().min(lY).max(uY)}).describe("A composition in a project, flagging the active one.");var mY=d({data:b(_y)}).describe("GET /projects/:id/compositions response.");var hY=2e3,fY=d({intent:a().min(1).max(hY).describe("Plain-English goal \u2014 what you're trying to achieve with this edit."),mode:f(["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:f(["editorial","spatial","brand","caption"]).optional().describe("Optional criterion to concentrate the advice on."),ifMatch:a().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 gY=d({consultJobId:a().describe("Opaque consult job id; poll it for the advisory result."),projectId:a(),status:f(["queued","failed"]).describe("queued = normal; failed = startup failed and the job is already terminal."),streamUrl:a().optional().describe("Relative SSE endpoint to stream this job's events.")}).describe("POST /projects/:id/consult response.");var Ly=d({faceId:a(),bbox:d({x:p(),y:p(),width:p(),height:p()}),speakingShare:p().optional()});var jy=d({detectorVersion:a().describe("Version of the face detector that produced this source-window roster."),window:d({startSec:p(),endSec:p()}),faces:b(Ly)});var Age=d({projectId:a().optional().describe("Optional project to scope the token to; omitted = org library.")});var Lge=d({projectId:a(),mediaId:a()});var xY=2048,Nge=d({videoUrl:ke().max(xY),format:ve.optional()});var yY=0,bY=10,SY=6,zY=d({criticId:a().min(1).describe("Stable client id; re-registering the same id UPSERTS."),label:a().min(1),tier:f(["rules","rubric","evaluator"]),floor:p().min(yY).max(bY).optional().describe("Score below this routes a refine like a built-in criterion. Defaults to 6."),rules:b(P(a(),O())).optional().describe('tier "rules": declarative ClientRule[] (data).'),rubric:a().optional().describe('tier "rubric": your criterion + description; scored as an extra column.'),referenceMediaIds:b(a()).max(SY).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:ke().optional().describe('tier "evaluator": your HTTPS webhook; CueFrame POSTs the artifact.')}).describe("Register a custom compose critic.");var _s=d({criticId:a(),label:a(),tier:f(["rules","rubric","evaluator"]),floor:p(),referenceMediaIds:b(a()).optional()}).describe("One registered critic (rubric/rules/url stay write-only \u2014 never echoed).");var vY=d({critics:b(_s)});var wY=d({id:a(),criticId:a(),tier:f(["rules","rubric","evaluator"]),secret:a().optional().describe("evaluator tier: Standard-Webhooks signing secret, returned ONCE.")}).describe("POST /critics response (evaluator secret present exactly once).");var IY=d({fromCompositionId:a().min(1).describe("Source composition to reframe a sibling from."),targetFormat:ve.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 kY=d({compositionId:a().describe("The new sibling composition's id.")}).describe("POST /projects/:id/compositions/derive response.");var Hge=d({error:d({code:a().describe("Stable machine-readable error code per \xA7Error Model."),message:a().describe("Human-readable message."),details:P(a(),O()).optional().describe("Optional context (currentEtag, projectIds, retryAfter, \u2026).")}).describe("Standard API error envelope.")}).describe("Error envelope used by every non-2xx response.");var nr=d({kind:f(["transcript","subjectTrack","matte"]),intent:d({kind:f(["whole","window"]),window:d({startSec:p(),endSec:p()}).optional().describe("The SOURCE window this fact covers, when it is scoped to a clip.")}),status:f(["pending","ready","failed"]),summary:d({presenceFraction:p().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:p().optional(),language:a().optional(),wordCount:p().optional(),durationSec:p().optional()}).optional(),charge:d({usd:p()}).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:d({code:a(),message:a()}).optional(),readyAt:p().optional()}).describe("One derived fact about a media item \u2014 computed once, charged at most once.");var ir=d({kind:f(["transcript","subjectTrack","matte"]),quotedUsd:p().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:M(),reason:a().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 Fy=v([d({kind:f(["subjectTrack","matte"]),scope:d({startSec:p(),endSec:p()}),state:f(["pending","ready","failed"]),fact:nr}),d({kind:f(["subjectTrack","matte"]),scope:d({startSec:p(),endSec:p()}),state:f(["available","unavailable"]),offer:ir})]).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 PY=24,$Y=d({count:z().min(1).max(PY),contentType:f(["image/jpeg","image/png"]).optional(),includeContactSheet:M().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 TY=d({batchId:a(),uploads:b(d({key:a(),url:a()})),contactSheetUpload:d({key:a(),url:a()}).optional(),expiresAt:a()});var CY=d({clipSuggestionId:a().min(1)}).describe("POST /projects/:id/exports/{fcpxml,premiere} body.");var Ny=d({phase:f(["trim","build","upload","trigger"]),message:a(),detail:a().optional(),retryable:M()});var Vy=f(["fcpxml","premiere"]);var Uy=f(["queued","trimming","building","uploading","complete","error","cancelled"]);var OY=0,MY=1,RY=d({id:a(),format:Vy,status:Uy,progress:p().min(OY).max(MY).describe("Fractional progress 0..1 across the trim/build/upload pipeline. Reaches 1 only on `complete`."),outputUrl:a().nullable(),outputExpiresAt:a().nullable(),outputSizeBytes:p().nullable(),outputDurationSec:p().nullable(),error:v([Ny,K()]).describe("Set when status is `error`; null otherwise. The phase field localizes the failure to trim / build / upload / trigger."),trimCacheHit:M().nullable(),clipSuggestionId:a().nullable(),createdAt:a(),updatedAt:a()}).describe("NLE export job response.");var EY=d({url:ke()}).describe("POST /brand-kits/extract body \u2014 the website URL to extract brand tokens from.");var By=d({colors:b(a()),fonts:b(a()),title:a().optional(),description:a().optional()}).describe("POST /brand-kits/extract response \u2014 extracted brand tokens (not persisted).");var DY=200,AY=0,_Y=50,LY=d({query:a().min(1).max(DY),perPage:z().gt(AY).max(_Y).optional()}).describe("POST /fonts/search body.");var jY=d({results:b(d({family:a(),category:a().optional(),variants:b(a()).optional(),cssUrl:a().optional(),previewText:a().optional()}))}).describe("POST /fonts/search response.");var xxe=d({composition:O()});var FY=0,NY=0,VY=20,UY=100,bxe=d({after:z().min(FY).optional(),before:z().min(NY).optional(),limit:z().min(1).max(UY).default(VY)});var zxe=Wt({});var BY=100,qY=-9007199254740991,WY=9007199254740991,ZY=-9007199254740991,GY=9007199254740991,wxe=d({limit:z().min(1).max(BY).optional(),after:a().optional(),projectId:a().optional(),jobId:a().optional(),from:z().min(qY).max(WY).optional(),to:z().min(ZY).max(GY).optional()});var kxe=d({deep:x("1").optional()});var KY=d({status:f(["ok","degraded"]),version:a(),checks:P(a(),d({ok:M(),detail:a().optional()})).optional()}).describe("Health probe response.");var qy=d({jobId:a().describe("Poll GET /v1/jobs/{jobId} / wait_job until terminal."),jobKey:a().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:a().describe("Job family, e.g. `verify` | `preview` | `brand_kit_extract`."),status:f(["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 JY=0,HY=9007199254740991,XY=0,YY=9007199254740991,Wy=d({geometry:d({scale:p(),compositionWidth:p().optional(),compositionHeight:p().optional(),width:p().optional(),height:p().optional()}),warnings:b(P(a(),O())).optional(),previewed:d({source:f(["inline","scratch","persisted"]),compositionId:a().optional(),etag:a().optional()}),listUsd:p().optional().describe("List price charged for this delivered capture."),artifacts:b(d({id:a(),beatSec:p(),bytes:z().gt(JY).max(HY),contentType:f(["image/png","image/jpeg"]),layers:d({video:a().nullable(),overlays:z().min(XY).max(YY)}),url:ke(),urlExpiresAt:a()}))});var Zy=d({perCriterion:O(),composite:p(),critique:a(),checkpointId:a(),beats:O().optional(),clientScores:b(O()).optional(),listUsd:p().optional().describe("List price charged for this delivered evaluation.")});var QY=d({id:a().describe("Job id \u2014 pass to GET /v1/jobs/{id} / wait_job."),jobKey:a().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:a().describe("Job family, e.g. `verify`."),status:f(["running","succeeded","failed","cancelled"]).describe("Poll until terminal (`succeeded` | `failed` | `cancelled`)."),progress:v([d({phase:a(),percent:p().optional(),message:a().optional()}),K()]).describe("Executor heartbeat while running; null when none reported."),result:v([v([Wy,Ty,Zy,By]),K()]).describe("Kind-specific payload when status is `succeeded`; null otherwise."),error:v([d({code:a(),message:a()}),K()]).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:a(),updatedAt:a(),completedAt:a().nullable()});var Gy=d({mediaId:a().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:a().describe("The media item's name, so a result is readable without a second call."),score:p().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:p().describe("Moment start, SECONDS from the media item's start."),endSec:p().describe("Moment end, SECONDS from the media item's start."),thumbUrl:a().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 eQ=d({results:b(Gy).describe("Matching moments, best first. Empty means nothing matched (when `indexing` is false) \u2014 the library was searched and came back empty-handed."),indexing:M().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 tQ=100,Fxe=d({limit:z().min(1).max(tQ).optional(),after:a().optional()});var oQ=100,Vxe=d({limit:z().min(1).max(oQ).optional(),after:a().optional(),projectId:a().optional(),kind:f(["authored","clip","all"]).optional()});var rQ=100,Bxe=d({category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),kind:f(["component","transition","scene"]).optional(),tier:f(["recommended","standard","niche"]).optional(),useCase:f(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"]).optional(),mood:a().optional(),q:a().optional(),intent:a().optional(),limit:z().min(1).max(rQ).optional(),after:a().optional()});var nQ=100,Wxe=d({limit:z().min(1).max(nQ).optional(),after:a().optional(),composeJobId:a().optional(),projectId:a().optional()});var Gxe=d({kind:f(["subjectTrack","matte"]).optional(),startSec:p().optional(),endSec:p().optional()});var iQ=100,Jxe=d({limit:z().min(1).max(iQ).optional(),after:a().optional(),kind:f(["video","audio","image","gif","asset","source","stock"]).optional(),source:f(["upload","generated","import-url","stock"]).optional(),tag:a().optional()});var sQ=100,Xxe=d({limit:z().min(1).max(sQ).optional(),after:a().optional(),platform:a().optional(),format:a().optional(),topic:a().optional()});var aQ=100,Qxe=d({limit:z().min(1).max(aQ).optional(),after:a().optional(),status:a().optional()});var cQ=100,tye=d({limit:z().min(1).max(cQ).optional(),after:a().optional()});var rye=d({groupId:a().min(1)});var pQ=100,iye=d({limit:z().min(1).max(pQ).optional(),after:a().optional()});var dQ=100,aye=d({limit:z().min(1).max(dQ).optional(),after:a().optional()});var lQ=0,uQ=0,mQ=d({startSec:p().min(lQ).describe("Source-in of the window to matte, in seconds into the underlying source."),endSec:p().gt(uQ).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 hQ=d({factId:a(),status:f(["pending","ready","failed"]),quotedUsd:p().describe("The server's price for this matte, in USD, quoted from the window duration."),alreadyExisted:M().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 Nu=d({mediaItemId:a(),language:a().nullable(),fullText:a(),utterances:b(P(a(),O())),data:b(P(a(),O())).optional(),pagination:Pe.optional()}).describe("Transcript response.");var fQ=d({mediaId:a(),durationSec:p().nullable(),width:p().nullable(),height:p().nullable(),thumbnail:v([d({url:a()}),K()]).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:d({status:f(["ready","not_detected"]),windows:b(jy)}),transcript:d({status:f(["ready","not_transcribed","unavailable"]),data:v([Nu,K()])}),beatGrid:v([d({bpm:p(),beatTimesMs:b(p()).describe("Beat onset times in MILLISECONDS \u2014 divide by 1000 for timeline startTime (composition timeline fields are seconds)."),confidence:p().describe("Rhythmic-periodicity strength (0\u20131). Trust the grid for cutting when high; a beatless bed reports low."),method:f(["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).")}),K()]).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:v([d({wordTimesMs:b(p()).describe("Word onset times in MILLISECONDS, in order \u2014 divide by 1000 for timeline startTime (composition timeline fields are seconds).")}),K()]).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:v([f(["vo","music","sfx","ambience"]),K()]).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:v([d({envelopeClass:f(["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:p().optional(),spectralCentroidHz:p().optional(),meanVolumeDb:p().optional(),maxVolumeDb:p().optional()}),K()]).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:b(nr).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:b(ir).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 gQ=d({id:a(),uploadUrl:ke(),expiresAt:a()}).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 xQ=0,yQ=0,bQ=d({kind:f(["subjectTrack","matte"]).describe("Which enhancement to buy. `transcript` is NOT purchasable here \u2014 it is delivered by the transcription pipeline."),intent:d({startSec:p().min(xQ),endSec:p().gt(yQ)}).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 SQ=d({factId:a(),status:f(["pending","ready","failed"]),quotedUsd:p(),alreadyExisted:M().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 zQ=d({facts:b(nr),offers:b(ir).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:Fy.optional()}).describe("Facts and offers for a media item, plus an exact-window resolution when requested.");var vQ=d({audioRole:f(["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 wQ=d({id:a(),status:f(["processing","complete"]),processingPhase:a()}).describe("POST /media/:id/finalize response: ingest triggered (audio/video \u2192 processing) or the item is immediately ready (image/asset \u2192 complete).");var IQ=1e4,kQ=d({generator:f(["text-to-video","text-to-image","image-to-video","text-to-music","text-to-speech","text-to-sfx","auto"]),prompt:a().min(1).max(IQ),style:P(a(),O()).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:d({firstFrameMediaId:a().optional(),lastFrameMediaId:a().optional(),imageMediaIds:b(a()).optional()}).optional()}).describe("POST /media/generate body.");var PQ=d({id:a(),status:x("generating"),estimateUsd:p().optional()}).describe("POST /media/generate response.");var $Q=2048,TQ=500,CQ=0,OQ=10737418240,MQ=d({url:ke().max($Q),filename:a().min(1).max(TQ),contentType:f(["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:z().gt(CQ).max(OQ).optional(),audioRole:f(["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 RQ=d({id:a(),status:x("importing")}).describe("POST /media/import response.");var Ky=d({phase:f(["idle","pending_import","pending_upload","uploading","extracting","loading_model","transcribing","proxy","embedding","analyzing","indexing","generating","rendering","processing","complete","error","cancelled"]),percent:p().nullish(),message:a().nullish(),error:a().nullish()}).describe("Processing status stored on mediaItems rows.");var Vu=d({id:a(),status:a(),source:f(["upload","generated","stock"]),name:a(),mimeType:a(),fileSize:p(),duration:p().nullable(),width:p().nullable(),height:p().nullable(),frameRate:p().nullable(),progress:v([d({phase:a(),percent:p().nullable()}),K()]),analysis:v([P(a(),O()),K()]),listUsd:p().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:a().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:a().nullable(),tags:v([b(a()),K()]),attribution:v([d({provider:f(["pexels","pixabay","freesound","klipy"]),externalId:a().nullable(),assetUrl:a().nullable(),license:a().nullable()}),K()]),processingStatus:v([Ky,K()]),createdAt:a(),updatedAt:a()}).describe("Media item response per \xA7Media.");var EQ=d({data:b(Vu),pagination:Pe});var DQ=500,AQ=0,_Q=10737418240,LQ=d({filename:a().min(1).max(DQ),contentType:f(["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:z().gt(AQ).max(_Q),projectId:a().min(1).optional()}).describe("POST /media upload initiation body.");var jQ=d({jobId:a(),status:a(),muxedItems:v([P(a(),a()),K()]).optional(),error:a().nullish(),startedAt:a().nullish(),completedAt:a().nullish()}).describe("Mux job response.");var Fye=d({sessionId:a()});var FQ=64,Vye=d({seedComposition:O().optional(),leaseJobId:a().min(1).max(FQ).optional()});var NQ=0,VQ=0,UQ=d({fromSec:p().min(NQ).describe("Window start, seconds into the composition."),toSec:p().gt(VQ).describe("Window end (exclusive), seconds."),compositionId:a().min(1).optional().describe("Target a specific composition; defaults to the project's active composition.")}).describe("POST /projects/:id/preview-clip body.");var BQ=0,qQ=9007199254740991,WQ=0,ZQ=9007199254740991,GQ=0,KQ=120,JQ=3600,qye=d({componentId:a().min(1),params:P(a(),O()).optional(),assets:P(a(),a().min(1)).optional().describe("Component asset-slot name to org mediaId. Every required manifest slot must be bound."),width:z().gt(BQ).max(qQ).optional(),height:z().gt(WQ).max(ZQ).optional(),fps:p().gt(GQ).max(KQ).optional().describe("Preview frame rate. When omitted, uses the project's format."),durationInFrames:z().min(1).max(JQ).optional().describe("Preview frame count. When omitted, uses the component's declared duration; required if the component has none.")});var HQ=.1,XQ=1,YQ=100,Zye=d({composition:O().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:a().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:a().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:b(p()).min(1),imageFormat:f(["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:p().min(HQ).max(XQ).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:z().min(1).max(YQ).optional().describe("JPEG quality (jpeg only). Default 70 \u2014 the quality the eval panel grades at.")});var QQ=300,eee=0,tee=1e4,oee=120,ree=d({brandKits:b(d({id:a(),name:a(),audio:d({sfxIntensity:f(["off","light","standard","dense"]).optional(),musicEnabled:M().optional(),musicMood:a().max(QQ).optional(),sonicLogo:d({ref:a().min(1),placement:f(["intro","outro","both"]),offsetMs:z().min(eee).max(tee).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:d({tick:a().min(1).optional(),pop:a().min(1).optional(),impact:a().min(1).optional(),confirm:a().min(1).optional(),error:a().min(1).optional(),whoosh:a().min(1).optional(),riser:a().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:d({bedId:a().min(1).optional(),genre:a().max(oee).optional(),bpmRange:d({min:p(),max:p()}).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:v([d({ref:a().min(1)}),K()]).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:b(_s).describe("Registered critics \u2014 run in the Director's gates AND score_composition."),references:b(d({mediaId:a(),name:a().optional(),thumbnailUrl:a().optional().describe("Presigned reference thumbnail (~1 week).")})).describe("The union of critic reference media \u2014 the org's visual standard, with provenance."),recentDecisions:b(d({checkpointId:a(),projectId:a(),kind:f(["gate","score"]),stage:f(["content","layout","motion"]).optional(),decision:a(),decidedAt:p()})).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 nee=0,iee=9007199254740991,Jy=d({hasComposition:M(),sceneCount:z().min(nee).max(iee),duration:p().nullable(),updatedAt:a().nullable()}).describe("Summary of a project's stored composition.");var Hy=d({id:a(),name:a(),kind:a().nullable(),durationSec:p().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:M().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 Xy=v([d({status:x("ready"),mediaId:a(),words:b(d({text:a(),start:p().describe("Word onset (SECONDS from source start)."),end:p().describe("Word end (SECONDS from source start).")}))}),d({status:x("unavailable"),mediaId:a()})]);var see=0,aee=0,cee=d({composition:v([_u,K()]).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:v([d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional(),platform:a().optional()}),K()]).describe("The composition's format, hoisted \u2014 the pixel frame every card/graphic must be authored against. Null whenever `composition` is null."),media:b(Hy).describe("The org's media library (most recent first, capped) \u2014 the pool this project can draw clips from."),transcript:v([Xy,K()]).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:v([cn,K()]).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:b(d({id:a().min(1),startTime:p().min(see),endTime:p().min(aee).optional(),kind:a().min(1),name:a().optional(),metadata:P(a(),O()).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 pee=200,dee=0,lee=0,uee=d({name:a().min(1).max(pee),description:a().optional(),format:ve.optional(),brandKitId:a().min(1).optional(),width:p().gt(dee).optional(),height:p().gt(lee).optional()}).describe("POST /projects body.");var Yy=v([d({id:a(),status:a(),createdAt:a(),outputUrl:a().nullable(),outputExpiresAt:a().nullable()}),K()]).describe("Most recent render for a project, if any.");var Uu=d({id:a(),name:a(),description:a().nullable(),format:v([ve,K()]),brandKitId:a().nullable(),activeCompositionId:a().nullable(),composition:Jy,lastRender:Yy,webUrl:a().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:a()}).describe("Project response per \xA7Projects.");var mee=d({data:b(Uu),pagination:Pe});var hee=200,fee=d({name:a().min(1).max(hee).optional(),description:a().optional(),format:ve.optional(),brandKitId:a().min(1).optional()}).describe("PATCH /projects/:id body.");var gee=d({clipSuggestionId:a().min(1).optional(),compositionId:a().min(1).optional().describe("Target a specific composition in the project; defaults to the project's active composition."),format:ve.optional(),priority:f(["interactive","standard","background"]).optional(),intent:f(["preview","final"]).optional(),brandKitId:v([a().min(1),K()]).optional()}).describe("POST /projects/:id/renders body.");var xee=d({manifestVersion:a().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:b(d({family:a().describe("The family name authoring accepts VERBATIM \u2014 card, caption and scene text alike."),weights:b(d({min:p(),max:p()})).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:b(f(["normal"])).describe("The styles bytes exist for. Always ['normal']: no bundled or aliased family ships an italic file, so fontStyle:'italic' over one is refused rather than slanted. Real italics come only from a brand-kit font asset."),captionDefaults:d({base:p(),emphasis:p()}).describe("The weights a caption is drawn at when the style names none."),origin:f(["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 yee=0,bee=9007199254740991,See=0,zee=9007199254740991,Qy=d({phase:f(["queued","validating","presigning","collecting-artifacts","resolving","detecting","baking-matte","translating","spawning","encoding","uploading"]),percent:p(),scenesCompleted:z().min(yee).max(bee).optional(),scenesTotal:z().min(See).max(zee).optional()}).describe("Non-terminal render progress; phase is one of the worker's emitted stages.");var Bu=d({id:a(),status:f(["queued","pending","rendering","complete","error","cancelled"]),progress:Qy.optional(),outputUrl:a().nullable(),outputExpiresAt:a().nullable(),error:a().nullable().describe("Human-readable failure message. Pair with `errorCode` for a stable, machine-readable code an agent runner can branch on."),errorCode:a().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:v([P(a(),O()),K()]).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:v([f(["authoring","transient","internal"]),K()]).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:M().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:a(),updatedAt:a().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:p().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:b(a()).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 vee=d({data:b(Bu),pagination:Pe});var wee=d({outputUrl:a(),outputExpiresAt:a()}).describe("POST /refresh-url response.");var Ls=d({candidateId:a(),provider:f(["pexels","pixabay","freesound","klipy"]),kind:f(["video","photo","sfx","gif"]),thumbnail:a(),previewUrl:a(),downloadUrl:a().optional(),duration:p().optional(),width:p().optional(),height:p().optional(),author:a(),authorUrl:a().optional(),assetUrl:a().optional(),license:a().optional()}).describe("A stock resource search candidate.");var Iee=d({kind:f(["sfx-pack","music-pack"]).optional(),id:a().min(1).optional(),projectId:a().min(1).optional(),candidateId:a().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 kee=d({id:a(),status:f(["importing","ready"])}).describe("POST /resources/import response.");var Pee=200,$ee=200,Tee=10,Cee=0,Oee=50,Mee=0,Ree=9007199254740991,Eee=0,Dee=9007199254740991,Aee=0,_ee=0,Lee=d({query:a().min(1).max(Pee).optional(),queries:b(a().min(1).max($ee)).min(1).max(Tee).optional(),kind:f(["video","photo","sfx","gif"]).optional(),provider:f(["pexels","pixabay","freesound","klipy"]).optional(),limit:z().gt(Cee).max(Oee).optional(),minWidth:z().gt(Mee).max(Ree).optional().describe("Video-only minimum selected-rendition width in pixels; smaller results are excluded."),minHeight:z().gt(Eee).max(Dee).optional().describe("Video-only minimum selected-rendition height in pixels; smaller results are excluded."),durationSec:d({min:p().min(Aee).optional(),max:p().gt(_ee).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 eb=d({query:a(),provider:f(["pexels","pixabay","freesound","klipy"]).optional(),kind:f(["video","photo","sfx","gif"]).optional(),candidates:b(Ls),error:a().optional()}).describe("One query's candidates within a batch search.");var jee=d({provider:f(["pexels","pixabay","freesound","klipy"]).optional(),kind:f(["video","photo","sfx","gif"]).optional(),candidates:b(Ls).optional(),results:b(eb).optional()}).describe("POST /resources/search response \u2014 `candidates` for one query, `results[]` for a batch.");var Fee=-9007199254740991,Nee=9007199254740991,Vee=d({ok:x(!0),stage:f(["content","layout","motion"]).optional(),version:z().min(Fee).max(Nee).optional(),composeJobId:a().optional()}).describe("Decision recorded; the run resumes (the SAME rail as POST /checkpoints/{id}/resume).");var Uee=-9007199254740991,Bee=9007199254740991,qee=-9007199254740991,Wee=9007199254740991,Zee=-9007199254740991,Gee=9007199254740991,Kee=d({id:a(),projectId:a(),composeJobId:a().optional(),briefId:a().optional(),kind:f(["gate","score"]),stage:As.optional(),version:z().min(Uee).max(Bee),status:f(["awaiting","approved","revised","abandoned","expired","superseded"]),artifact:O().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:b(a()).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:O().optional().describe("Per-criterion scores + critique from the design loop / judge, incl. lock_violation entries."),quote:Ds.optional(),revisionCycle:z().min(qee).max(Wee).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:O().optional().describe("The recorded decision {decision, comments?, globalNote?, decidedAt} once resolved."),reviewMode:f(["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:p(),updatedAt:p(),versionStack:b(d({id:a(),version:z().min(Zee).max(Gee),stage:f(["content","layout","motion"]).optional(),status:a(),decision:a().optional(),createdAt:p()})).describe("The run's v1\u2192vN gate history \u2014 per-version status + decision summaries.")});var Fbe=d({composition:O().optional().describe("The composition to judge. Absent \u21D2 the project's ACTIVE composition."),compositionId:a().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:a().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:a().optional(),brandContext:a().optional()});var Jee=10,Hee=25,Vbe=d({q:a().min(1),limit:z().min(1).max(Hee).default(Jee)});var tb=d({startSec:p(),endSec:p(),candidateId:a().describe("The chosen audio source (the clearest mic) for this span \u2192 programAudioSourceId."),reasons:b(a())});var ob=d({startSec:p(),endSec:p(),candidateId:a(),sourceInSec:p().describe("Chosen source window start (declared-offset resolved)."),sourceOutSec:p(),reasons:b(a())});var rb=d({candidateId:a().describe("Stable angle/source id. An unknown id is rejected, never remapped."),role:a().nullish().describe('Agent-declared semantic tag (e.g. "wide", "webcam").'),score:p().describe("The weighted prominence score (\u03A3 weights\xB7signal)."),contributions:P(a(),p()).describe("signalKey \u2192 weighted contribution (the agent reweights from this)."),reasons:b(a())});var nb=d({startSec:p().describe("Span start (output seconds)."),endSec:p().describe("Span end (output seconds)."),chosen:a().describe('The recommended candidateId, or "__hold__" (abstain).'),pacingNote:a().nullish().describe("Which mechanism produced the pick (argmax / hysteresis / override / hold \u2026)."),candidates:b(rb)});var Xee=d({projectId:a(),groupId:a(),selectorVersion:a(),signalVersions:P(a(),a()),moments:b(nb),recommendation:d({cutSchedule:b(ob),audioBed:b(tb).describe("Best-audio bed (instance #3): the clearest mic per span."),suppressedSwitches:b(d({atSec:p(),wouldHaveBeenCandidateId:a(),byScore:p(),blockedBy:a(),releaseAtSec:p().nullable()})).describe("Switches the stabilizer suppressed (the anti-ping-pong audit).")}),divergesFromComposition:M().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 Yee=0,Qee=0,ete=0,tte=0,ote=0,rte=d({groupId:a().min(1),weights:P(a(),p()).optional().describe("Sparse prominence weights (the taste knob, non-negative). Default = DOMINANCE_WEIGHTS."),minHoldSec:p().gt(Yee).optional(),enterSec:p().min(Qee).optional(),switchMargin:p().min(ete).optional(),cooldownSec:p().min(tte).optional(),maxHoldSec:p().gt(ote).optional(),lockSourceId:a().optional().describe("Pin a camera/angle for the whole timeline."),overrides:b(d({startSec:p(),endSec:p(),candidateId:a()})).optional()});var nte=200,ite=50,ste=20,ate=d({name:a().min(1).max(nte),files:b(d({mediaId:a().min(1),role:a().min(1).max(ite)})).min(1).max(ste)}).describe("POST /sessions body.");var ib=d({mediaId:a(),role:a(),status:a().nullable()}).describe("One file member of a session, with optional role + status.");var cte=0,pte=9007199254740991,sb=d({id:a(),name:a(),fileCount:z().min(cte).max(pte),muxStatus:a().nullable(),createdAt:a()}).describe("Session list summary (per list endpoint).");var dte=d({data:b(sb),pagination:Pe});var lte=d({id:a(),name:a(),files:b(ib),mux:d({status:a().nullable(),jobId:a().nullable(),muxedItems:v([P(a(),a()),K()]),error:a().nullable(),startedAt:a().nullable(),completedAt:a().nullable()}),createdAt:a()}).describe("Session response per \xA7Sessions.");var ab=d({name:a(),title:a(),description:a()}).describe("A CueFrame agent skill (metadata).");var ute=d({skills:b(ab)}).describe("GET /skills response \u2014 the available agent skills.");var mte=d({factId:a().describe("Opaque identifier for the derived fact."),status:f(["pending","ready","failed"]).describe("State of the fact right now. `ready` with `alreadyExisted` means the detection was already computed and is available immediately."),quotedUsd:p().describe("The server's price for this detection, in USD, quoted from the source duration. Zero is charged when `alreadyExisted` is true."),alreadyExisted:M().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 hte=0,fte=9007199254740991,cb=d({id:a(),briefId:a().nullable(),rank:z().gt(hte).max(fte),trim:d({start:p(),end:p()}),score:p(),title:a(),reason:a(),topic:a(),hook:a(),platforms:b(a()),format:a(),caption:a(),hashtags:b(a()),textOverlays:b(a()),editingNotes:a(),motionStyle:d({textAnimation:a(),transitions:a(),colorMood:a(),captionStyle:a()}),visualTreatment:b(d({time:v([p(),a()]),visual:a()})),brollSuggestions:b(d({moment:a(),searchTerms:b(a()),rationale:a()})),thumbnailConcept:a()}).describe("Single ranked clip suggestion.");var gte=d({status:f(["idle","generating","completed","failed"]),createdAt:a().nullable(),analyzedAt:a().nullable(),jobId:a().nullable(),topics:b(a()),suggestions:b(cb),pagination:Pe}).describe("GET /media/:id/suggestions envelope.");var xte=d({status:f(["queued","running","complete","failed"]),alreadyRunning:M().optional()}).describe("POST /media/:id/suggestions response.");var yte=1e3,bte=0,Ste=0,zte=256,vte=256,wte=0,Ite=0,kte=256,Pte=12e3,$te=d({words:b(d({text:a().min(1).max(yte),timelineStart:p().min(bte),timelineEnd:p().min(Ste),clipId:a().min(1).max(zte),poolItemId:a().min(1).max(vte),sourceStart:p().min(wte),sourceEnd:p().min(Ite),speakerId:v([a().max(kte),K()])})).min(1).max(Pte)}).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 Tte=0,Cte=9007199254740991,Ote=0,Mte=9007199254740991,Rte=0,Ete=9007199254740991,Dte=d({fillers:b(z().min(Tte).max(Cte)),silenceGaps:b(z().min(Ote).max(Mte)),emphasis:b(z().min(Rte).max(Ete))}).describe("CueFrame-model analysis of timeline word indices. Every returned index refers to the request's words array.");var Ate=64,_te=new RegExp("^[a-z][a-z0-9_]*$"),Lte=0,jte=1,Fte=500,Nte=10,Vte=d({scores:b(d({name:a().min(1).max(Ate).regex(_te),value:p().min(Lte).max(jte),comment:a().max(Fte).optional()})).min(1).max(Nte)}).describe("POST /traces/:traceId/scores body.");var Ute=-9007199254740991,Bte=9007199254740991,qte=d({accepted:z().min(Ute).max(Bte)}).describe("POST /traces/:traceId/scores response.");var Wte=0,Zte=0,Gte=d({task:f(["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:d({startSec:p().min(Wte).describe("Window start, SECONDS from the start of the media."),endSec:p().min(Zte).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 Kte=d({task:f(["summary","chapters","highlights"]).describe("Echo of the requested task \u2014 so a batched caller can pair answers to asks."),result:a().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 vSe=d({detector:f(["face","person"]).optional()});var Jte=-9007199254740991,Hte=9007199254740991,Xte=d({token:a(),expiresAt:z().min(Jte).max(Hte).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 pb=d({featureId:a().describe("The metered plan feature (exports, compose, compose_verify, \u2026)."),value:p().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:a().optional(),jobId:a().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:a().optional().describe("render | compose | consult_* | verify | preview | generate | suggestions | session_uptime | \u2026"),mediaItemId:a().optional().describe("The media item the job ran over, when it ran over one (suggestions, transcription). Resolve it with GET /v1/media/{id}."),listUsd:p().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:p().describe("Epoch-ms when the meter landed.")});var Yte=d({data:b(pb),pagination:Pe});var CSe=d({valid:M(),errors:b(d({code:a(),stage:a(),category:a(),retryable:M(),message:a(),fix:P(a(),O()).optional()})),advisories:b(d({rule:a(),criterion:a(),clipId:a().optional(),detail:a(),fix:a()})).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:b(a()).optional().describe("Non-blocking render-fidelity warnings detected before enqueue, including unavailable font families."),quote:d({thisStepUsd:p(),jobSpendSoFarUsd:p(),estimatedJourneyTotalUsd:p()}).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 bt=f(["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 Qte=0,eoe=6e4,toe=d({url:a().min(1),events:b(bt).min(1),settleMs:z().min(Qte).max(eoe).optional()}).describe("POST /webhooks body.");var ooe=0,roe=9007199254740991,noe=d({id:a(),url:ke(),events:b(bt),settleMs:z().min(ooe).max(roe),enabled:M(),status:f(["active","pending"]).describe("active = ownership verified + receiving events; pending = challenge not echoed, inactive."),secret:a().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:d({status:x("pending"),reason:a()}).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 ioe=d({delivery:P(a(),O()).describe("The shared HTTP envelope + headers + retry semantics."),signing:P(a(),O()).describe("Standard Webhooks signing: secret format, signed content, how to verify."),ownershipVerification:P(a(),O()).describe("The synchronous echo-the-token activation handshake + recovery."),events:b(d({event:bt,when:a(),data:P(a(),a())})).describe("Every subscribable event with its exact delivery `data` fields."),sample:P(a(),O()).describe("A fully-worked example delivery (headers + body).")}).describe("The webhook delivery/signing/verification contract, as data. Read this before building a receiver.");var soe=0,aoe=9007199254740991,coe=0,poe=9007199254740991,qu=d({id:a(),url:ke(),events:b(bt),settleMs:z().min(soe).max(aoe),enabled:M(),verificationStatus:f(["pending","verified"]).describe("pending = callback URL has not echoed the ownership challenge (receives no events); verified = ownership proven."),createdAt:a(),lastDeliveredAt:a().nullable(),lastFailedAt:a().nullable(),consecutiveFailures:z().min(coe).max(poe)}).describe("Webhook endpoint record (secret omitted after create).");var doe=d({data:b(qu),pagination:Pe});var loe=0,uoe=6e4,moe=d({url:a().min(1).optional(),events:b(bt).min(1).optional(),settleMs:z().min(loe).max(uoe).optional(),enabled:M().optional()}).describe("PATCH /webhooks/:id body.");var hoe=d({deliveryId:a(),status:x("queued")}).describe("POST /webhooks/:id/test response.");var foe=d({id:a(),status:f(["active","pending"]).describe("active = ownership verified + receiving events; pending = challenge not echoed."),verification:d({status:x("pending"),reason:a()}).optional().describe("Present only when the re-challenge did not verify; `reason` names why (see WebhookCreateResponse.verification).")}).describe("POST /webhooks/:id/verify response.");var goe=d({orgId:a(),permissions:P(a(),b(a())),keyId:a(),keyName:a()}).describe("Whoami response.");var KSe=d({x402Version:x(2),accepts:b(Wt({})).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:a().optional().describe("Human-readable reason.")}).describe("x402 v2 PaymentRequired challenge \u2014 the body of a 402 on a priced operation.");var xoe=100,yoe=-9007199254740991,boe=9007199254740991,Soe=-9007199254740991,zoe=9007199254740991,voe=R({limit:z().min(1).max(xoe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),projectId:a().optional().describe("Only events attributed to this project."),jobId:a().optional().describe('Only events produced by this job \u2014 how to answer "did my failed render post a charge?" for one run.'),from:z().min(yoe).max(boe).optional().describe("Period start, epoch milliseconds, INCLUSIVE."),to:z().min(Soe).max(zoe).optional().describe("Period end, epoch milliseconds, EXCLUSIVE.")});var woe=100,Ioe=R({limit:z().min(1).max(woe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var Wu=yy;var koe=R({id:a()});var Poe=R({id:a()});var $oe=100,Toe=R({limit:z().min(1).max($oe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),projectId:a().optional().describe("Scope to one project. Omit for every brief in the org."),kind:f(["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 Coe=R({id:a()});var Ooe=R({id:a()});var Moe=R({id:a()}),Roe=Le();var Eoe=R({id:a()});var Doe=R({id:a()});var Aoe=100,_oe=R({limit:z().min(1).max(Aoe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),composeJobId:a().optional().describe("Scope to ONE compose run \u2014 its v1\u2192vN gate history with per-version status and decisions."),projectId:a().optional().describe("Scope to everything reviewable in one project.")});var Loe=R({id:a()});var joe=R({id:a()});var Foe=R({id:a()}),Noe=d({suggestionId:a().min(1),format:d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional(),platform:a().optional()}).optional()}),Voe=O(),Uoe=R({id:a()}),Boe=100,qoe=R({limit:z().min(1).max(Boe).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),platform:a().optional().describe("Only suggestions cut for this delivery platform."),format:a().optional().describe("Only suggestions in this output format."),topic:a().optional().describe("Only suggestions matching this topic label.")});var Woe=R({id:a()});var Zoe=R({id:a()}),Goe=O();var Koe=100,Joe=R({category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional().describe("Filter to one category bucket (text|effects|transitions|layouts|backgrounds|ui-blocks|scenes)."),kind:f(["component","transition","scene"]).optional().describe("Filter by render kind (component|transition|scene)."),tier:f(["recommended","standard","niche"]).optional().describe("Filter by curation tier (recommended|standard|niche)."),useCase:f(["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:a().optional().describe("Filter to entries whose mood tags include this value (e.g. cinematic, minimal)."),q:a().optional().describe("Free-text match across id/name/description/intent/useWhen/tags/mood. Recommend-orders results."),intent:a().optional().describe("Alias of `q` framed as recommend-by-intent (e.g. intent=intro). Recommend-orders results."),limit:z().min(1).max(Koe).optional().describe("Page size (1..100). Omit to return the whole filtered catalog in one page."),after:a().optional().describe("Opaque cursor from a previous page's nextCursor (forward-only).")});var Zu=zy;var Hoe=R({id:a()});var Xoe=R({id:a()});var Yoe=R({id:a()});var Qoe=R({id:a()});var ere=R({id:a(),composeJobId:a()}),tre=O(),ore=R({id:a(),composeJobId:a()});var rre=R({id:a(),composeJobId:a()});var nre=R({id:a()});var ire=R({id:a(),composeJobId:a()});var sre=R({id:a()}),are=64,cre=d({seedComposition:O().optional(),leaseJobId:a().min(1).max(are).optional()}),pre=R({sessionId:a()}),dre=R({id:a(),sessionId:a()}),lre=R({composition:O()}),ure=R({id:a(),sessionId:a()}),mre=R({ok:M()}),hre=R({id:a(),sessionId:a()}),fre=R({etag:a()});var gre=R({id:a()});var xre=R({id:a()});var yre=O(),bre=R({id:a()});var Sre=Le(),zre=R({id:a()});var vre=R({id:a()});var wre=O(),Ire=R({id:a()});var kre=O(),Pre=R({id:a()});var $re=R({valid:M(),errors:b(R({code:a(),stage:a(),category:a(),retryable:M(),message:a(),fix:P(a(),O()).optional()})),advisories:b(R({rule:a(),criterion:a(),clipId:a().optional(),detail:a(),fix:a()})).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:b(a()).optional().describe("Non-blocking render-fidelity warnings detected before enqueue, including unavailable font families."),quote:R({thisStepUsd:p(),jobSpendSoFarUsd:p(),estimatedJourneyTotalUsd:p()}).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.")}),Tre=R({id:a(),compositionId:a()}),Cre=Le();var Ore=R({id:a()});var Mre=R({criticId:a()}),Rre=Le();var Ere=R({id:a()}),Dre=d({composition:O().optional().describe("The composition to judge. Absent \u21D2 the project's ACTIVE composition."),compositionId:a().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:a().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:a().optional(),brandContext:a().optional()});var Are=R({id:a()}),_re=.1,Lre=1,jre=100,Fre=d({composition:O().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:a().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:a().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:b(p()).min(1),imageFormat:f(["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:p().min(_re).max(Lre).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:z().min(1).max(jre).optional().describe("JPEG quality (jpeg only). Default 70 \u2014 the quality the eval panel grades at.")});var Nre=R({id:a()}),Vre=0,Ure=9007199254740991,Bre=0,qre=9007199254740991,Wre=0,Zre=120,Gre=3600,Kre=d({componentId:a().min(1),params:P(a(),O()).optional(),assets:P(a(),a().min(1)).optional().describe("Component asset-slot name to org mediaId. Every required manifest slot must be bound."),width:z().gt(Vre).max(Ure).optional(),height:z().gt(Bre).max(qre).optional(),fps:p().gt(Wre).max(Zre).optional().describe("Preview frame rate. When omitted, uses the project's format."),durationInFrames:z().min(1).max(Gre).optional().describe("Preview frame count. When omitted, uses the component's declared duration; required if the component has none.")});var Jre=R({id:a()});var Hre=R({id:a()});var Xre=R({id:a(),exportId:a()});var Yre=R({id:a(),exportId:a()});var Qre=R({deep:x("1").optional().describe("Pass `1` to run the deep dependency checks instead of the shallow liveness probe.")});var ene=Wt({});var tne=R({jobId:a()});var one=R({jobId:a()});var rne=10,nne=25,ine=R({q:a().min(1).describe("What the moment should look like, in plain language. Describe the IMAGE, not the words spoken."),limit:z().min(1).max(nne).default(rne).describe("Maximum moments to return. Default 10, maximum 25.")});var sne=d({projectId:a().optional().describe("Optional project to scope the token to; omitted = org library.")});var ane=100,cne=R({limit:z().min(1).max(ane).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),kind:f(["video","audio","image","gif","asset","source","stock"]).optional().describe("Filter to one media kind."),source:f(["upload","generated","import-url","stock"]).optional().describe("Filter by how the item entered the library."),tag:a().optional().describe("Filter to items carrying this EXACT tag (not a prefix or substring match).")});var pne=R({id:a()});var dne=R({id:a()}),lne=Le(),une=R({id:a()});var mne=R({id:a()}),hne=0,fne=0,gne=20,xne=100,yne=R({after:z().min(hne).optional().describe("Zero-based utterance cursor returned as pagination.nextCursor."),before:z().min(fne).optional().describe("Zero-based utterance cursor for a backward page. Do not combine with after."),limit:z().min(1).max(xne).default(gne).describe("Utterances per page.")});var bne=R({id:a()});var Sne=R({id:a()}),zne=R({detector:f(["face","person"]).optional().describe("Which detector to run. Defaults to `face`; an unknown value is refused, never defaulted.")});var vne=R({id:a()});var wne=R({id:a()}),Ine=R({kind:f(["subjectTrack","matte"]).optional().describe("Resolve one exact editor prerequisite. Requires startSec and endSec; the response includes the server-selected `exact` result."),startSec:p().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:p().optional().describe("Source-out of the clip's trim, in seconds. Must be sent WITH startSec.")});var kne=R({id:a()});var Pne=R({id:a()});var $ne=100,Tne=R({limit:z().min(1).max($ne).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var Cne=R({id:a()});var One=R({id:a()});var Mne=R({id:a()}),Rne=Le(),Ene=R({id:a()});var Dne=R({id:a()});var Ane=R({id:a()}),_ne=100,Lne=R({limit:z().min(1).max(_ne).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only."),status:a().optional().describe("Comma-separated render statuses to include (e.g. `error,cancelled`). Omit for every status.")});var jne=R({id:a()});var Fne=R({id:a(),renderId:a()});var Nne=R({id:a(),renderId:a()});var Vne=R({id:a(),renderId:a()});var Une=R({id:a(),renderId:a()});var Bne=R({id:a(),renderId:a()}),qne=O();var Wne=R({id:a()}),Zne=R({groupId:a().min(1).describe("The synced-angle group to score.")});var Gne=R({id:a()});var Kne=100,Jne=R({limit:z().min(1).max(Kne).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var Hne=R({id:a()});var Xne=R({id:a()}),Yne=Le(),Qne=R({id:a()});var eie=R({id:a()});var tie=R({name:a()}),oie=O();var rie=R({traceId:a()});var nie=100,iie=R({limit:z().min(1).max(nie).optional().describe("Page size (1..100), default 20. Out-of-range or unparseable clamps into the range."),after:a().optional().describe("Opaque cursor from the previous page's `pagination.nextCursor`. Forward-only.")});var sie=R({id:a()});var aie=R({id:a()});var cie=R({id:a()}),pie=Le(),die=R({id:a()});var lie=R({id:a()});var uie=2048,mie=d({videoUrl:ke().max(uie),format:ve.optional()}),hie=R({projectId:a(),mediaId:a()});var db={version:2,assets:{},graphics:{api:"canvas2d",required:!0,accelerationPreference:"software-allowed"},alphaPolicy:"requires-transparency"};function lb(r,e){let t=xie(r.root,"cueframe.json");if(!fie(t))throw Object.assign(new Error("No cueframe.json workspace manifest was found."),{code:"no_component_manifest"});let n=JSON.parse(gie(t,"utf8")),o=Zu.shape.manifest.safeParse(n.components?.[e]?.manifest);if(!o.success)throw Object.assign(new Error(`Component "${e}" has no valid contract-v2 manifest at cueframe.json components.${e}.manifest.`),{code:"no_component_manifest"});return o.data}var vie="cueframe.json";function wie(r){return r.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}function Iie(r){return r.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Gu(r,e){G(r,"new_component",new Error(e),j.UserError),L(j.UserError)}function kie(r,e){return`import React from 'react';
|
|
81
|
+
|
|
82
|
+
/** Custom CueFrame component. Mounted through component contract v2. Edit me. */
|
|
83
|
+
export default function ${e}({ params }: { durationInFrames: number; params: Record<string, unknown>; assets: Record<string, unknown>; render: { frame: number; fps: number; width: number; height: number; seed: string; colorSpace: 'srgb' } }) {
|
|
84
|
+
return <div style={{ width: '100%', height: '100%', display: 'grid', placeItems: 'center' }}>{String((params as { text?: unknown }).text ?? '${r}')}</div>;
|
|
20
85
|
}
|
|
21
|
-
`}function
|
|
86
|
+
`}function Pie(r,e){return`import { z } from 'zod';
|
|
22
87
|
import component from './index';
|
|
23
88
|
|
|
24
89
|
const paramsSchema = z.object({}).passthrough();
|
|
25
90
|
|
|
26
91
|
export const config = {
|
|
27
|
-
id: '${
|
|
92
|
+
id: '${r}',
|
|
28
93
|
component,
|
|
29
94
|
name: '${e}',
|
|
30
95
|
category: 'ui-blocks',
|
|
@@ -33,29 +98,33 @@ export const config = {
|
|
|
33
98
|
paramsSchema,
|
|
34
99
|
};
|
|
35
100
|
export default config;
|
|
36
|
-
`}function
|
|
37
|
-
`)}
|
|
101
|
+
`}function hb(r,e){we(r,"name",e);let t=e.dryRun??!1,n=e.force??!1,o=wie(r);o||Gu(e,`name "${r}" has no alphanumeric characters to form a component identifier.`);let i=Iie(r);B(e,"new_component_prepare",{name:r,dryRun:t,force:n});let s=an(process.cwd());s||Gu(e,"No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first to scaffold one.");let c=Es(s,r),u=yie(c);u&&zie(c).length>0&&!n&&Gu(e,`Component dir ${c} already exists and is non-empty. Pass --force to overwrite (this replaces local source).`);let m={"index.tsx":kie(r,o),"config.ts":Pie(r,i)};if(!t){bie(c,{recursive:!0});for(let[S,w]of Object.entries(m))ub(mb(c,S),w);let h=mb(s.root,vie),g=JSON.parse(Sie(h,"utf8")),y=g.components??{};y[r]={custom:!0,manifest:db},g.components=y,ub(h,`${JSON.stringify(g,null,2)}
|
|
102
|
+
`)}pe(e,{ok:!0,dryRun:t,name:r,component:o,dir:c,files:Object.keys(m),overwritten:u&&n},()=>{console.log(`\u2713 ${t?"Would scaffold":"Scaffolded"} custom component ${r} (${o}) into ${c}`);for(let g of Object.keys(m))console.log(` ${t?"would write":"wrote"} ${g}`);t||console.log(` stamped cueframe.json components.${r} (custom)`),console.log("Edit index.tsx, then `cueframe push "+r+"` to publish it to CueFrame.")})}import{existsSync as Fs,readFileSync as Ns}from"fs";import{join as Vs}from"path";import De from"typescript";var $ie="cueframe.json",Tie=["effects","transitions","text","layouts"];function Cie(r){return Tie.includes(r??"")?r:"layouts"}function Oie(r){let e=r;for(;De.isAsExpression(e)||De.isParenthesizedExpression(e)||typeof De.isSatisfiesExpression=="function"&&De.isSatisfiesExpression(e);)e=e.expression;return e}function Mie(r,e){for(let t of r.statements)if(De.isImportDeclaration(t)&&De.isStringLiteral(t.moduleSpecifier)&&t.moduleSpecifier.text===e)return!0;return!1}function fb(r,e){let t=De.createSourceFile(e,r,De.ScriptTarget.Latest,!0,De.ScriptKind.TS),n;for(let i of t.statements)if(De.isVariableStatement(i)){for(let s of i.declarationList.declarations)if(De.isIdentifier(s.name)&&s.name.text==="config"&&s.initializer){let c=Oie(s.initializer);De.isObjectLiteralExpression(c)&&(n=c)}if(n)break}let o={};if(!n)return o;for(let i of n.properties){if(!De.isPropertyAssignment(i)||!(De.isIdentifier(i.name)||De.isStringLiteral(i.name)))continue;let s=i.name.text;De.isStringLiteralLike(i.initializer)&&(s==="name"?o.name=i.initializer.text:s==="category"?o.category=i.initializer.text:s==="version"&&(o.version=i.initializer.text))}return o}function Rie(r){let e=Vs(r,"config.ts");if(!Fs(e))return{};let t=Ns(e,"utf8"),n=De.createSourceFile("config.ts",t,De.ScriptTarget.Latest,!0,De.ScriptKind.TS),o=Vs(r,"_config.ts");return Mie(n,"./_config")&&Fs(o)?fb(Ns(o,"utf8"),"_config.ts"):fb(t,"config.ts")}function Eie(r){return r.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Die(r,e){let t=Vs(r.root,$ie);if(Fs(t))try{let o=JSON.parse(Ns(t,"utf8")).components?.[e]?.ejectedFrom;return typeof o=="string"&&o.length>0?o:void 0}catch{return}}var js="none \u2014 params are unvalidated server-side";function gb(r){let e=r.code;return e==="no_component_source"||e==="no_component_manifest"?j.UserError:J(r)}async function xb(r,e,t){let n=Es(r,e),o=Vs(n,"index.tsx");if(!Fs(o))throw Object.assign(new Error(`Component "${e}" has no index.tsx at ${n}. Scaffold it first (cueframe eject / new component).`),{code:"no_component_source"});let i=Ns(o,"utf8"),s=Rie(n),c=s.name??Eie(e),u=Cie(s.category),m=Die(r,e),h=lb(r,e),g=`Custom component "${e}" pushed from the local CueFrame workspace.`,y={type:"object",properties:{}};B(t,"push_component",{id:e,name:c,category:u,version:s.version,ejectedFrom:m,propSchema:js});let S=!1;try{await Ot.getComponent(e),S=!0}catch(w){if(w instanceof We&&w.status===404)S=!1;else throw w}return S?(await Ot.updateComponent(e,{tsxSource:i,name:c,description:g,category:u,propSchema:y,origin:"customer-owned",manifest:h,...m?{ejectedFrom:m}:{}}),B(t,"pushed",{id:e,action:"updated"}),{id:e,action:"updated",name:c,category:u,propSchema:js}):(await Ot.createComponent({componentId:e,tsxSource:i,name:c,description:g,category:u,propSchema:y,origin:"customer-owned",manifest:h,...m?{ejectedFrom:m}:{}}),B(t,"pushed",{id:e,action:"created"}),{id:e,action:"created",name:c,category:u,propSchema:js})}async function yb(r,e){r||(G(e,"push",new Error("Pass a component id (cueframe push <id>), or use `cueframe sync` to push all."),j.UserError),L(j.UserError)),we(r,"id",e),ae(e.target);let t=an(process.cwd());t||(G(e,"push",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),j.UserError),L(j.UserError)),B(e,"push_prepare",{id:r,target:e.target});try{let n=await xb(t,r,e);pe(e,{ok:!0,target:e.target,...n},()=>{console.log(`\u2713 ${n.action} component ${n.id} (${n.name}) on CueFrame`),console.log(` propSchema: ${n.propSchema}`)})}catch(n){let o=gb(n);G(e,"push",n,o),L(o)}}async function bb(r){ae(r.target);let e=an(process.cwd());e||(G(r,"sync",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),j.UserError),L(j.UserError));let t=hy(e);B(r,"sync_prepare",{target:r.target,count:t.length,ids:t});let n=[],o=[];for(let i of t)try{n.push(await xb(e,i,r))}catch(s){let c=gb(s);Ce(r,"sync",s,c),o.push({id:i,error:s})}pe(r,{ok:o.length===0,target:r.target,pushed:n,failed:o.map(i=>({id:i.id,error:ze(i.error)}))},()=>{if(n.length===0&&o.length===0){console.log("No components to sync. Scaffold one with `cueframe eject` or `cueframe new component`.");return}for(let i of n)console.log(`\u2713 ${i.action} ${i.id} (${i.name})`);n.length>0&&console.log(` propSchema: ${js}`);for(let i of o)console.error(`\u2716 ${i.id}: ${ze(i.error)}`);console.log(`Synced ${n.length}/${t.length} component(s) to CueFrame.`)}),o.length>0&&L(J(o[0].error))}var Us=["media","sessions","projects","renders","webhooks"],Sb={readonly:Object.fromEntries(Us.map(r=>[r,["read"]])),editall:Object.fromEntries(Us.map(r=>[r,["read","write"]]))};function Aie(r){if(r.preset){let e=Sb[r.preset];return e||(console.error(`Unknown --preset "${r.preset}". Valid: ${Object.keys(Sb).join(", ")}.`),L(j.UserError)),e}if(r.scope)return _ie(r.scope);console.error("Provide --scope or --preset (e.g. --preset readonly | editall)."),L(j.UserError)}function _ie(r){let e={};for(let t of r.split(",").map(n=>n.trim()).filter(Boolean)){let[n,o]=t.split(":");(!n||!o)&&(console.error(`Invalid --scope "${t}". Use resource:rw (e.g. renders:rw,media:r).`),L(j.UserError)),Us.includes(n)||(console.error(`--scope "${t}": unknown resource "${n}". Valid: ${Us.join(", ")}.`),L(j.UserError));let i=[];/r/i.test(o)&&i.push("read"),/w/i.test(o)&&i.push("write"),i.length===0&&(console.error(`--scope "${t}": actions must include r and/or w.`),L(j.UserError)),e[n]=i}return Object.keys(e).length===0&&(console.error("--scope is required, e.g. --scope media:rw,projects:rw,renders:rw"),L(j.UserError)),e}async function zb(r){ae(r.target);let e=Aie(r),t={name:r.name,permissions:e};if(r.expires){let n=Number(r.expires);(!Number.isFinite(n)||n<=0)&&(console.error("--expires must be a positive number of days."),L(j.UserError)),t.expiresIn=Math.round(n*86400)}try{let n=await Sh("/v1/api-keys",{method:"POST",body:JSON.stringify(t),headers:{"content-type":"application/json"}});pe(r,{ok:!0,id:n.id,prefix:n.prefix,start:n.start,key:n.key},()=>{let o=Object.entries(e).map(([i,s])=>`${i}:${s.map(c=>c[0]).join("")}`).join(" ");console.log(`\u2713 API key "${r.name}" created \u2014 scopes: ${o}`),console.log(`
|
|
38
103
|
${n.key}
|
|
39
|
-
`),console.log(" Shown ONCE \u2014 store it now (paste it into your integration; not saved here).")})}catch(n){
|
|
40
|
-
Media item ID: ${
|
|
41
|
-
Media item ID: ${
|
|
42
|
-
Run \`cueframe analyze ${
|
|
43
|
-
`),
|
|
44
|
-
`))}function
|
|
45
|
-
${n.id} ${n.name}`),
|
|
46
|
-
${n.id} ${n.name} \u2190 composed from ${
|
|
47
|
-
Re-fetch via GET /v1/projects/${e.project}/renders/${
|
|
48
|
-
MP4 URL (1-hour TTL): ${
|
|
104
|
+
`),console.log(" Shown ONCE \u2014 store it now (paste it into your integration; not saved here).")})}catch(n){G(r,"keys_create",n,J(n)),L(J(n))}}async function vb(r){ae(r.target);let e;try{e=await rt("/api/auth/api-key/list",{method:"GET"})}catch(n){G(r,"keys_list",n,J(n)),L(J(n))}e.status>=400&&(G(r,"keys_list",new Error(`list failed (${e.status})`),je(e.status)),L(je(e.status)));let t=Array.isArray(e.body)?e.body:[];pe(r,{ok:!0,keys:t},()=>{if(t.length===0){console.log("No API keys.");return}for(let n of t)console.log(` ${n.id} ${n.name??"(unnamed)"} ${n.start??""}\u2026`)})}async function wb(r,e){ae(e.target);let t;try{t=await rt("/api/auth/api-key/delete",{method:"POST",body:JSON.stringify({keyId:r}),headers:{"content-type":"application/json"}})}catch(n){G(e,"keys_revoke",n,J(n)),L(J(n))}t.status>=400&&(G(e,"keys_revoke",new Error(`revoke failed (${t.status})`),je(t.status)),L(je(t.status))),pe(e,{ok:!0,revoked:r},()=>console.log(`\u2713 Revoked ${r}`))}async function Ib(r){ae(r.target),B(r,"list_prepare",{target:r.target});try{let e=await fo.listProjects(),t=r.limit,n=typeof t=="number"&&Number.isFinite(t)&&t>0?e.data.slice(0,t):e.data;if(B(r,"list_complete",{count:n.length,total:e.data.length,truncated:n.length<e.data.length,projects:n}),!r.json){if(e.data.length===0){console.log("No projects found.");return}for(let o of n){let i=new Date(o.createdAt).toLocaleDateString();console.log(` ${o.id} ${o.name} (${i})`)}n.length<e.data.length&&console.log(` \u2026 ${e.data.length-n.length} more (raise --limit to see all)`)}}catch(e){G(r,"list",e,J(e)),L(J(e))}}import{readFile as Lie,stat as jie}from"fs/promises";import{existsSync as Fie}from"fs";import{basename as Nie,extname as Vie}from"path";var Uie=4e3,kb=1800*1e3,Pb=5,$b={".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 Bie(r,e){let t=Vie(r).toLowerCase(),n=$b[t];if(!n){let o=new Error(`Unsupported file extension "${t||"(none)"}" for ${r}. Supported: ${Object.keys($b).join(", ")}.`);G(e,"preflight",o,j.UserError),L(j.UserError)}return n}var Tb=["vo","music","sfx","ambience"];async function Bs(r,e){Fie(r)||(G(e,"preflight",new Error(`File not found: ${r}`),j.UserError),L(j.UserError));let t=Nie(r),n=(await jie(r)).size,o=Bie(t,e);if(e.audioRole&&!Tb.includes(e.audioRole)){let $=new Error(`--audio-role must be one of ${Tb.join("|")} (got "${e.audioRole}")`);G(e,"preflight",$,j.UserError),L(j.UserError)}let i=e.audioRole;if(e.dryRun){B(e,"upload_dry_run",{file:t,sizeBytes:n,contentType:o,target:e.target,analyzeAfter:!!e.analyze,wouldCall:"POST /v1/media \u2192 presigned PUT \u2192 POST /v1/media/:id/finalize \u2192 poll processing"}),e.json||console.log(`[dry-run] Would upload ${t} (${(n/1024/1024).toFixed(1)} MB, ${o}) to ${e.target}.`);return}ae(e.target),B(e,"upload_prepare",{file:t,sizeBytes:n,contentType:o,target:e.target});let s=Re("Preparing upload\u2026",e.json),c,u;try{let $=await Mt.createMediaUpload({filename:t,contentType:o,size:n});c=$.id,u=$.uploadUrl,s.succeed("Ready"),B(e,"upload_ready",{mediaItemId:c})}catch($){s.fail(`Failed: ${ze($)}`),Ce(e,"upload_prepare",$,J($)),L(J($))}let m=Date.now(),h=Re(`Uploading ${t} (${(n/1024/1024).toFixed(1)} MB)\u2026`,e.json);try{let $=await Lie(r),E=await fetch(u,{method:"PUT",headers:{"Content-Type":o},body:$});if(!E.ok)throw new Error(`presigned PUT failed: ${E.status} ${E.statusText}`);await Mt.finalizeMedia(c,i?{audioRole:i}:{}),h.succeed(`Uploaded: ${t}`),B(e,"upload_complete",{mediaItemId:c,bytesUploaded:n,...i?{audioRole:i}:{},durationMs:Date.now()-m})}catch($){h.fail(`Upload failed: ${ze($)}`),Ce(e,"upload",$,j.NetworkError),L(j.NetworkError)}let g=Re("Processing (transcription)\u2026",e.json),y=Date.now(),S=null,w=0;for(;;){if(await new Promise($=>setTimeout($,Uie)),Date.now()-y>kb){let $=`Processing did not complete within ${Math.round(kb/6e4)}m. Media item ID: ${c}.`;g.fail($),Ce(e,"process",new Error($),j.ApiServerError),L(j.ApiServerError)}try{let $=await Mt.getMedia(c);w=0;let E=$?.processingStatus?.phase??"unknown",V=$?.processingStatus?.percent??null,F=Math.round((Date.now()-y)/1e3),H=V!=null?` \xB7 ${Math.round(V*100)}%`:"";if(g.text=`Processing\u2026 ${E}${H} (${F}s)`,B(e,"process_progress",{phase:E,percent:V,elapsedSec:F}),E==="complete"||E==="completed"){g.succeed(`Ready: ${c}`),S=$,B(e,"process_complete",{mediaItemId:c,durationMs:Date.now()-y,item:$});break}if(E==="error"){let re=$?.processingStatus?.error??"unknown error";g.fail(`Processing failed: ${re}`),Ce(e,"process",new Error(re),j.ApiServerError),L(j.ApiServerError)}}catch($){$ instanceof We&&[401,403,404].includes($.status)&&(g.fail(`Processing check failed: ${ze($)}`),Ce(e,"process",$,J($)),L(J($))),w++,w>=Pb&&(g.fail(`Processing check failed: ${ze($)}`),Ce(e,"process",new Error(`Processing status unreadable after ${Pb} consecutive failures: ${ze($)}`),J($)),L(J($)))}}if(e.analyze){at(`
|
|
105
|
+
Media item ID: ${c}`,e);let{analyzeCommand:$}=await import("./analyze-243KHBHH.js");return await $(c,{target:e.target,wait:!0,json:e.json}),{mediaItemId:c,item:S}}return e.json||pe(e,{mediaItemId:c,item:S},()=>{console.log(`
|
|
106
|
+
Media item ID: ${c}`),console.log(`
|
|
107
|
+
Run \`cueframe analyze ${c} --target ${e.target}\` to generate clip suggestions.`)}),{mediaItemId:c,item:S}}function Ku(r){let e=Math.floor(r/60),t=Math.floor(r%60);return`${e}:${String(t).padStart(2,"0")}`}async function Cb(r,e){r!==void 0&&we(r,"mediaItemId",e),ae(e.target),B(e,"clips_prepare",{target:e.target,mode:r?"suggestions":"media-list",...r?{mediaItemId:r}:{}});try{if(!r){let n=await Mt.listMedia();if(B(e,"clips_complete",{mode:"media-list",count:n.data.length,media:n.data}),!e.json){if(n.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 n.data){let i=o.duration?`${Ku(o.duration)} `:"",s=o.processingStatus?.phase??"unknown",c=s==="complete"?"":` [${s}]`;console.log(` ${o.id} ${o.name} ${i}${c}`)}}return}let t=await Ih.listMediaSuggestions(r);if(B(e,"clips_complete",{mode:"suggestions",mediaItemId:r,count:t.suggestions.length,suggestions:t.suggestions}),!e.json){if(t.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(`${t.suggestions.length} clip suggestion${t.suggestions.length!==1?"s":""}:`),console.log("");for(let n of t.suggestions){let o=`${Ku(n.trim.start)} \u2192 ${Ku(n.trim.end)}`,i=(n.trim.end-n.trim.start).toFixed(1);console.log(` ${n.id}`),console.log(` ${n.title}`),console.log(` ${o} (${i}s) ${n.format} score: ${n.score}`),n.reason&&console.log(` ${n.reason}`),console.log("")}}}catch(t){G(e,"clips",t,J(t)),L(J(t))}}import{readFileSync as qie}from"fs";async function Ob(r,e){we(r,"projectId",e),ae(e.target),B(e,"composition_get_prepare",{projectId:r});let t=await pn(`/v1/projects/${r}/composition`,{method:"GET"},e,"composition_get");t.status>=400&&(dn(t,e,"composition_get"),L(je(t.status)));let n=t.headers.etag,o=n&&Mb(n);B(e,"composition_get_complete",{projectId:r,etag:o,status:t.status}),pe(e,{etag:o,composition:t.body},()=>{o&&console.log(`# ETag: ${o}`),console.log(JSON.stringify(t.body,null,2))})}async function qs(r,e){we(r,"projectId",e),e.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),L(j.UserError)),ae(e.target);let t=await Ju(r,e),n=await Rb(e.body);B(e,"composition_put_prepare",{projectId:r,ifMatch:t});let o=new Headers({"content-type":"application/json","if-match":t}),i=await pn(`/v1/projects/${r}/composition`,{method:"PUT",headers:o,body:n},e,"composition_put");i.status>=400&&(dn(i,e,"composition_put"),L(je(i.status)));let s=i.headers.etag;return B(e,"composition_put_complete",{projectId:r,etag:s,status:i.status,response:i.body}),pe(e,{etag:s,response:i.body},()=>{console.log(`Composition saved (ETag: ${s??"unknown"}).`),i.body&&typeof i.body=="object"&&console.log(JSON.stringify(i.body,null,2))}),{etag:s,response:i.body}}async function Ws(r,e){we(r,"projectId",e),e.suggestionId||(console.error("--suggestion <suggestionId> is required"),L(j.UserError)),ae(e.target);let t=await Ju(r,e),n;if(e.format)try{n=JSON.parse(e.format)}catch{console.error(`--format must be JSON, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`),L(j.UserError)}let o=JSON.stringify({suggestionId:e.suggestionId,...n?{format:n}:{}});B(e,"composition_from_suggestion_prepare",{projectId:r,suggestionId:e.suggestionId,ifMatch:t});let i,s=t,c=0,u=3;for(;;){c++;let h=new Headers({"content-type":"application/json","if-match":s});if(i=await pn(`/v1/projects/${r}/composition/from-suggestion`,{method:"POST",headers:h,body:o},e,"composition_from_suggestion"),!(i.status===409&&i.body?.error?.code==="stale_etag"))break;if(c>u){B(e,"composition_from_suggestion_etag_retries_exhausted",{projectId:r,attempts:u});break}B(e,"composition_from_suggestion_etag_retry",{projectId:r,attempt:c,reason:"stale_etag"}),s=await Ju(r,e)}i.status>=400&&(dn(i,e,"composition_from_suggestion"),L(je(i.status)));let m=i.headers.etag;B(e,"composition_from_suggestion_complete",{projectId:r,suggestionId:e.suggestionId,etag:m,status:i.status,response:i.body,attempts:c}),pe(e,{etag:m,response:i.body},()=>{console.log(`Composition built from suggestion ${e.suggestionId} (ETag: ${m??"unknown"}).`),i.body&&typeof i.body=="object"&&console.log(JSON.stringify(i.body,null,2))})}async function Zs(r){r.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),L(j.UserError)),ae(r.target);let e=await Rb(r.body);B(r,"composition_validate_prepare",{});let t=new Headers({"content-type":"application/json"}),n=await pn("/v1/composition/validate",{method:"POST",headers:t,body:e},r,"composition_validate");return n.status>=400&&(dn(n,r,"composition_validate"),L(je(n.status))),B(r,"composition_validate_complete",{status:n.status}),pe(r,{valid:!0},()=>{console.log("\u2713 Composition is valid.")}),{valid:!0}}function Mb(r){return r.replace(/^W\//,"").replace(/-gzip(?=("?)$)/,"")}async function Ju(r,e){if(e.force)return"*";if(e.ifMatch)return e.ifMatch;let t=await pn(`/v1/projects/${r}/composition`,{method:"GET"},e,"composition_etag_fetch");if(t.status===404)return at("No existing composition; treating as create (If-Match: *).",e),"*";t.status>=400&&(dn(t,e,"composition_etag_fetch"),L(je(t.status)));let n=t.headers.etag;return n||(G(e,"composition_etag_fetch",new Error("Server returned no ETag on composition GET; cannot safely thread If-Match. Pass --force to overwrite anyway."),j.ApiServerError),L(j.ApiServerError)),Mb(n)}async function Rb(r){if(r.startsWith("@")){let e=r.slice(1);if(e==="-"){let t=[];for await(let n of process.stdin)t.push(Buffer.isBuffer(n)?n:Buffer.from(n));return Buffer.concat(t).toString("utf-8")}return qie(e,"utf-8")}return r}async function pn(r,e,t,n){try{return await rt(r,e)}catch(o){G(t,n,o,j.NetworkError),L(j.NetworkError)}}function dn(r,e,t){let n=r.body?.error,o=n?.code??"unknown",i=n?.message??r.statusText,s=Wie(o,r.status,n?.details),c=je(r.status);e.json?G(e,t,Object.assign(new Error(i),{code:o,status:r.status,details:n?.details,advice:s}),c):(process.stderr.write(`\u2716 ${t}: ${i} (${o}, ${r.status})
|
|
108
|
+
`),s&&process.stderr.write(` \u2192 ${s}
|
|
109
|
+
`))}function Wie(r,e,t){let n=new We(e,{code:r,message:"",details:t&&typeof t=="object"?t:void 0}),o=zh(n);return o||(e===404?"Project or composition not found. Run `cueframe list` to confirm the project ID; the composition may not yet exist.":null)}async function Gs(r){let e=r.aspect?{aspectRatio:r.aspect,fps:r.fps??30,resolution:r.resolution??"fhd"}:void 0;if(r.dryRun){if(B(r,"project_create_dry_run",{name:r.name,target:r.target,format:e??null,brandKitId:r.brandKitId??null,fromSuggestion:r.fromSuggestion??null,cheap:r.cheap??!1,wouldCall:r.fromSuggestion?r.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"}),!r.json){let o=r.cheap?" (--cheap: deterministic translator)":"";console.log(`[dry-run] Would create project "${r.name}" on ${r.target}`+(r.fromSuggestion?` from suggestion ${r.fromSuggestion}${o}.`:"."))}return}ae(r.target),B(r,"project_create_prepare",{name:r.name,target:r.target,fromSuggestion:r.fromSuggestion??null,brandKitId:r.brandKitId??null,cheap:r.cheap??!1});let t=Re(`Creating project "${r.name}"\u2026`,r.json),n;try{n=await fo.createProject({name:r.name,format:e,brandKitId:r.brandKitId}),t.succeed(`Created: ${n.id}`)}catch(o){t.fail(`Failed: ${ze(o)}`),Ce(r,"project_create",o,J(o)),L(J(o))}if(B(r,"project_create_complete",{project:n}),!r.json&&!r.fromSuggestion&&console.log(`
|
|
110
|
+
${n.id} ${n.name}`),r.fromSuggestion){let o=!1;if(o||await Ws(n.id,{target:r.target,suggestionId:r.fromSuggestion,json:r.json,force:!0}),!r.json){let i=o?"(composed)":"(translated)";console.log(`
|
|
111
|
+
${n.id} ${n.name} \u2190 composed from ${r.fromSuggestion} ${i}`)}}return n}async function Eb(r,e){we(r,"projectId",e),ae(e.target),B(e,"project_delete_prepare",{projectId:r});try{await fo.deleteProject(r),B(e,"project_delete_complete",{projectId:r}),pe(e,{ok:!0,projectId:r},()=>{console.log(`Project ${r} deleted.`)})}catch(t){G(e,"project_delete",t,J(t)),L(J(t))}}async function Db(r,e){we(r,"mediaId",e),ae(e.target),B(e,"media_delete_prepare",{mediaId:r});try{await Mt.deleteMedia(r),B(e,"media_delete_complete",{mediaId:r}),pe(e,{ok:!0,mediaId:r},()=>{console.log(`Media ${r} deleted.`)})}catch(t){G(e,"media_delete",t,J(t)),L(J(t))}}import{writeFileSync as Zie}from"fs";import{resolve as Gie}from"path";var Kie=1500,Jie=4e3,Hie=1800*1e3,Ab=5;async function Hu(r,e,t={}){let n=Date.now()+(t.timeoutMs??Hie),o=t.reconnectBackoffMs??Kie,i=Date.now(),s=0;for(;Date.now()<n;){let c=null,u=!1;try{for await(let m of vh(r,e)){if(s=0,m.event==="progress"){let h=Math.round((Date.now()-i)/1e3);if(t.spinner){let g=Math.round(m.data.percent*100);t.spinner.text=`Rendering\u2026 ${m.data.phase}${g>0?` \xB7 ${g}%`:""} (${h}s)`}t.onProgress?.({phase:m.data.phase,percent:m.data.percent,elapsedSec:h});continue}m.event==="complete"?c={kind:"complete",outputUrl:m.data.outputUrl,outputExpiresAt:m.data.outputExpiresAt,duration:m.data.duration}:c={kind:"failed",message:m.data.message};break}}catch(m){if(m instanceof We)u=!0;else{if(s++,s>=Ab)throw Object.assign(new Error(`Render stream unreachable after ${Ab} consecutive transport failures: ${m instanceof Error?m.message:String(m)}`),{cause:m});await new Promise(h=>setTimeout(h,o));continue}}if(c)return c;if(u){let m=await Xie(r,e);if(m)return m;await new Promise(h=>setTimeout(h,Jie));continue}await new Promise(m=>setTimeout(m,o))}return{kind:"failed",message:`Timed out waiting for render to reach a terminal state. Render ID: ${e}, Project ID: ${r}.`}}async function Xie(r,e){let t=await kh.getRender(r,e);return t.status==="complete"?{kind:"complete",outputUrl:t.outputUrl??null,outputExpiresAt:null,duration:null}:t.status==="error"||t.status==="cancelled"?{kind:"failed",message:t.error??`Render ${t.status}`}:null}async function _b(r,e){we(r,"renderId",e),we(e.project,"projectId",e),ae(e.target),B(e,"render_watch_prepare",{renderId:r,projectId:e.project,target:e.target});let t=Re(`Watching render ${r}\u2026`,e.json),n;try{n=await Hu(e.project,r,{spinner:t,onProgress:i=>B(e,"render_progress",{renderId:r,...i})})}catch(i){t.fail(`Failed to watch render: ${ze(i)}`),Ce(e,"render_watch",i,J(i)),L(J(i))}n.kind==="failed"&&(t.fail(n.message),Ce(e,"render_watch",new Error(n.message),j.ApiServerError),L(j.ApiServerError)),t.succeed(`Render complete (${r})`);let o=null;e.download&&n.outputUrl?o=await Xu(n.outputUrl,e.out??`./reel-${r.slice(0,8)}.mp4`,e.json):n.outputUrl||(G(e,"render_watch",new Error("Render reported complete but no outputUrl was returned."),j.ApiServerError),e.json||console.error(`Render reported complete but no outputUrl was returned.
|
|
112
|
+
Re-fetch via GET /v1/projects/${e.project}/renders/${r}.`),L(j.ApiServerError)),B(e,"render_complete",{renderId:r,projectId:e.project,outputUrl:n.outputUrl,outputExpiresAt:n.outputExpiresAt,duration:n.duration,outputPath:o}),e.json||(n.outputUrl&&console.log(`MP4 URL: ${n.outputUrl}`),n.outputExpiresAt&&console.log(`Expires: ${n.outputExpiresAt}`),n.duration!=null&&console.log(`Duration: ${n.duration}s`))}async function Xu(r,e,t){let n=Gie(e),o=Re(`Downloading \u2192 ${n}\u2026`,t);try{let i=await fetch(r);if(!i.ok)throw new Error(`HTTP ${i.status}`);let s=Buffer.from(await i.arrayBuffer());return Zie(n,s),o.succeed(`Saved: ${n} (${(s.length/1024/1024).toFixed(1)} MB)`),n}catch(i){o.fail(`Download failed: ${ze(i)}`),console.error(`
|
|
113
|
+
MP4 URL (1-hour TTL): ${r}`),L(j.NetworkError)}}async function Lb(r,e){let t=e.map(s=>s==null?"null":String(s)).join(":"),n=`${r}:${t}`,o=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(i),s=>s.toString(16).padStart(2,"0")).join("")}async function Yie(r){let e=await rt(`/v1/projects/${r}/composition`,{method:"GET"});return e.status===404?"no-composition":e.status>=400?"unknown-composition":e.headers.etag??"no-etag"}async function Ks(r,e){if(we(r,"projectId",e),e.dryRun){B(e,"render_dry_run",{projectId:r,target:e.target,wouldCall:"POST /v1/projects/:id/renders \u2192 SSE watch \u2192 download MP4"}),e.json||console.log(`[dry-run] Would render project ${r} on ${e.target}.`);return}ae(e.target),B(e,"render_prepare",{projectId:r,target:e.target});let t;try{t=e.idempotencyKey??await Lb("render",[r,await Yie(r)]),B(e,"idempotency_key",{scope:"render",key:t,overridden:!!e.idempotencyKey})}catch(h){t="",B(e,"idempotency_key",{scope:"render",key:null,skipped:!0,reason:h instanceof Error?h.message:String(h)})}let n=Re("Queuing render\u2026",e.json),o,i,s=!1;try{let h=e.aspect?{format:{aspectRatio:e.aspect,fps:e.fps??30,resolution:e.resolution??"fhd"}}:{};e.priority&&(h.priority=e.priority),e.intent&&(h.intent=e.intent);let g={"content-type":"application/json"};t&&(g["idempotency-key"]=t);let y=await rt(`/v1/projects/${r}/renders`,{method:"POST",headers:g,body:JSON.stringify(h)});if(y.status>=400){let w=y.body?.error;throw new We(y.status,{code:w?.code??"unknown",message:w?.message??y.statusText})}let S=y.body;o=S.id,i=S.status,s=y.headers["idempotency-replay"]==="true",n.succeed(s?`Render replayed: ${o} (status: ${i})`:`Render queued: ${o}`)}catch(h){n.fail(`Failed: ${ze(h)}`),Ce(e,"render_prepare",h,J(h)),L(J(h))}s?B(e,"render_idempotent_replay",{renderId:o,projectId:r,status:i,idempotencyKey:t}):B(e,"render_queued",{renderId:o,projectId:r});let c=Re("Rendering\u2026",e.json),u;try{u=await Hu(r,o,{spinner:c,onProgress:h=>B(e,"render_progress",{renderId:o,...h})})}catch(h){c.fail(`Failed to watch render: ${ze(h)}`),Ce(e,"render_progress",h,J(h)),L(J(h))}u.kind==="failed"&&(c.fail(u.message),Ce(e,"render_progress",new Error(u.message),j.ApiServerError),L(j.ApiServerError)),c.succeed("Render complete"),u.outputUrl||(G(e,"render_complete",new Error("Render reported complete but no outputUrl was returned."),j.ApiServerError),e.json||console.error(`Render reported complete but no outputUrl was returned.
|
|
49
114
|
Render ID: ${o}
|
|
50
|
-
Project ID: ${
|
|
51
|
-
Re-fetch via GET /v1/projects/${
|
|
52
|
-
`);for(let[s,i]of Object.entries(t.headers))process.stdout.write(`${s}: ${i}
|
|
115
|
+
Project ID: ${r}
|
|
116
|
+
Re-fetch via GET /v1/projects/${r}/renders/${o} once the URL is signed.`),L(j.ApiServerError));let m=await Xu(u.outputUrl,e.out??`./reel-${o.slice(0,8)}.mp4`,e.json);return B(e,"render_complete",{renderId:o,projectId:r,outputUrl:u.outputUrl,outputExpiresAt:u.outputExpiresAt,duration:u.duration,outputPath:m}),{renderId:o,projectId:r,outputUrl:u.outputUrl,outputExpiresAt:u.outputExpiresAt,duration:u.duration,outputPath:m}}import{existsSync as Js}from"fs";import{readFile as Qie}from"fs/promises";import{resolve as st}from"path";var Yu="REPLACE_WITH_MEDIA_ID";function sr(r,e,t=Yu){let n=0,o=s=>s===t?(n+=1,e):Array.isArray(s)?s.map(o):s&&typeof s=="object"?Object.fromEntries(Object.entries(s).map(([c,u])=>[c,o(u)])):s,i=o(r);if(n!==1)throw new Error(`Recipe must contain exactly one ${t} media value; found ${n}.`);return i}async function Qu(r,e){try{return JSON.parse(await Qie(r,"utf8"))}catch(t){G(e,"recipe_read",new Error(`Could not read valid JSON from ${r}: ${ze(t)}`),j.UserError),L(j.UserError)}}function jb(r,e,t){let n=r.recipe?.mediaSlots?.[0]?.projectMediaId;(!r.name||!r.composition||!n||!r.recipe?.cloudBrandKit)&&(G(t,"recipe_read",new Error(`${e} is a project, but not a portable CueFrame recipe template.`),j.UserError),L(j.UserError));let o=(r.recipe.components??[]).map(i=>{let s=i.componentId,c=i.sourceVersionId,u=s&&c?r.authoredComponents?.[s]?.versions?.[c]:void 0;return(!s||!c||!u||u.componentId!==s)&&(G(t,"recipe_read",new Error(`${e} has an invalid authored component reference.`),j.UserError),L(j.UserError)),{id:s,name:i.name||s,category:i.category??"layouts",source:u,propSchema:i.propSchema}});return{name:r.name,brandKit:r.recipe.cloudBrandKit,composition:r.composition,mediaPlaceholder:n,components:o}}async function ese(r,e){let t=st(r);if(t.endsWith(".cueframe"))return jb(await Qu(t,e),t,e);if(!Js(t)&&/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(r)){let s=`https://raw.githubusercontent.com/cueframe-ai/cueframe-recipes/main/${r}/recipe.cueframe`;try{let c=await fetch(s,{headers:{accept:"application/json"}});if(!c.ok)throw new Error(`${c.status} ${c.statusText}`);return jb(await c.json(),s,e)}catch(c){G(e,"recipe_fetch",new Error(`Could not load recipe "${r}" from cueframe-ai/cueframe-recipes: ${ze(c)}`),j.NetworkError),L(j.NetworkError)}}let n=t,[o,i]=await Promise.all([Qu(st(n,"brand-kit.json"),e),Qu(st(n,"composition.template.json"),e)]);return{name:n.split("/").pop()??o.name,brandKit:o,composition:i,mediaPlaceholder:Yu,components:[]}}async function tse(r,e){for(let t of r.components){let n={tsxSource:t.source.tsxSource,name:t.name,description:`Authored component installed from the ${r.name} CueFrame recipe.`,category:t.category,propSchema:t.propSchema??{type:"object",properties:{}},origin:"customer-owned",manifest:t.source.manifest},o=!1;try{await Ot.getComponent(t.id),o=!0}catch(i){if(!(i instanceof We)||i.status!==404)throw i}o?await Ot.updateComponent(t.id,n):await Ot.createComponent({componentId:t.id,...n}),B(e,"recipe_component_ready",{componentId:t.id,action:o?"updated":"created"})}}async function Fb(r){let e=await ese(r.directory,r);if(r.dryRun){sr(e.composition,"dry_run_media_id",e.mediaPlaceholder);let g={recipe:Js(st(r.directory))?st(r.directory):r.directory,media:st(r.media),target:r.target,render:r.render,output:st(r.out),wouldRun:["upload source media",...e.components.length>0?["install authored recipe components"]:[],"upsert recipe brand kit","create project","bind media to recipe composition","validate composition","save composition",...r.render?["render and download MP4"]:[]]};return pe(r,g,()=>console.log(`[dry-run] Recipe is valid. Would create ${e.name}.`)),g}B(r,"recipe_run_prepare",{recipe:Js(st(r.directory))?st(r.directory):r.directory,media:st(r.media),target:r.target});let t=await Bs(r.media,{target:r.target,analyze:!1,json:r.json});ae(r.target);try{await tse(e,r)}catch(g){G(r,"recipe_components",g,J(g)),L(J(g))}let n;try{n=await wh.createBrandKit(e.brandKit),B(r,"recipe_brand_kit_ready",{brandKitId:n.id})}catch(g){G(r,"recipe_brand_kit",g,J(g)),L(J(g))}let o=e.composition.format,i=await Gs({name:e.name,target:r.target,aspect:o?.aspectRatio,fps:o?.fps,resolution:o?.resolution,brandKitId:n.id,json:r.json});if(!t||!i)throw new Error("Recipe orchestration stopped before CueFrame returned the required media and project IDs.");let s=sr(e.composition,t.mediaItemId,e.mediaPlaceholder),c=JSON.stringify(s);await Zs({target:r.target,body:c,json:r.json});let u=await qs(i.id,{target:r.target,body:c,force:!0,json:r.json}),m=r.render?await Ks(i.id,{target:r.target,out:r.out,json:r.json}):void 0,h={recipe:Js(st(r.directory))?st(r.directory):r.directory,mediaItemId:t.mediaItemId,brandKitId:n.id,projectId:i.id,compositionEtag:u.etag,...m?{renderId:m.renderId,outputPath:m.outputPath}:{}};return B(r,"recipe_run_complete",h),r.json||pe(r,h,()=>{console.log(`
|
|
117
|
+
Recipe ready in project ${i.id}.`),m&&console.log(`Output: ${m.outputPath}`)}),h}import{readFile as az,writeFile as Lpe,rename as jpe,unlink as Fpe}from"fs/promises";import{randomUUID as Npe}from"crypto";import{resolve as cz}from"path";var Nb=["Inter","Space Mono","Montserrat","Roboto","Poppins","Oswald","Playfair Display","Bebas Neue","Instrument Serif","National Park","Bricolage Grotesque","Schibsted Grotesk"],Vb=["Georgia"],Ub=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"}],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"}],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}}}),em="normal";function Hs(r){return Ub[r]}function ose(r,e){let t=r.weight.split(/\s+/).map(Number);if(t.some(i=>!Number.isFinite(i)))return!1;if(t.length===1)return t[0]===e;let[n,o]=t;return e>=n&&e<=o}function Bb(r,e,t){if(t!==em)return!1;let n=Hs(r);return n?n.faces.some(o=>ose(o,e)):!1}function qb(r){let e=Hs(r);return e?e.faces.map(t=>t.weight.split(/\s+/).join("-")).join(", "):""}function Wb(r){return r.split(",").map(e=>e.trim().replace(/^['"]|['"]$/g,"").trim()).filter(Boolean)}var rse=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);var nse=new Map(Object.keys(Ub).map(r=>[r.toLowerCase(),r]));function Zb(r){if(typeof r!="string"||r.trim().length===0)return{kind:"default"};if(r.includes("$brand:")||r.includes("${"))return{kind:"unknown"};let e;for(let t of Wb(r)){let n=t.toLowerCase();if(rse.has(n))continue;let o=nse.get(n);if(!o)return{kind:"unknown"};e??=o}return e?{kind:"bundled",family:e}:{kind:"default"}}var Xs=Object.freeze({fontFamily:"Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,emphasisFontWeight:800,emphasisFontStyle:"normal"}),ise="Inter";function Gb(r){return typeof r!="string"||r.trim().length===0?{kind:"bundled",family:ise}:Zb(r)}function Kb(r){return(r.kind==="bundled"?Hs(r.family):void 0)?.captionDefaults??{base:Xs.fontWeight,emphasis:Xs.emphasisFontWeight}}function sse(r){let e=r.fontFamily??Xs.fontFamily,t=Gb(r.fontFamily),n=r.fontWeight??Kb(t).base,o=r.emphasisFontFamily,i=o??e,s=o===void 0?t:Gb(o),c=r.emphasisFontWeight??Kb(s).emphasis,u=r.emphasisFontStyle??Xs.emphasisFontStyle;return{base:{role:"base",field:"fontWeight",stack:e,resolved:t,weight:n,style:em,fromDefault:r.fontWeight===void 0},emphasis:{role:"emphasis",field:u==="italic"?"emphasisFontStyle":"emphasisFontWeight",stack:i,resolved:s,weight:c,style:u,fromDefault:u==="italic"?r.emphasisFontStyle===void 0:r.emphasisFontWeight===void 0}}}function ase(r){let{base:e,emphasis:t}=sse(r);return t.stack===e.stack&&t.weight===e.weight&&t.style===e.style?[e]:[e,t]}var W2e=Object.freeze(["fontWeight","emphasisFontWeight","emphasisFontStyle"]);function tm(r){return r.fromDefault?`no ${r.field} is authored, so the ${r.role} run is drawn at the default ${r.style==="italic"?`${r.field} "italic"`:r.weight}`:`${r.field} ${r.style==="italic"?'"italic"':r.weight} has no file behind it`}function cse(r){if(r.resolved.kind==="default"&&r.style==="italic")return{field:r.field,face:{family:r.stack,weight:r.weight,style:r.style},message:`font_not_reproducible \u2014 ${tm(r)}: "${r.stack}" names no font file the render bundle carries, and it ships no italic binary at all, so 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(r.resolved.kind!=="bundled")return null;let e={family:r.resolved.family,weight:r.weight,style:r.style};return r.style==="italic"?{field:r.field,face:e,message:`font_not_reproducible \u2014 ${tm(r)}: ${r.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.`}:Bb(r.resolved.family,r.weight,r.style)?null:{field:r.field,face:e,message:`font_not_reproducible \u2014 ${tm(r)}: ${r.resolved.family} ships ${qb(r.resolved.family)}. The render refuses a weight outside that range before capture rather than let the browser substitute a nearby file, so set ${r.field} to a weight the family covers, or pick a family whose files do.`}}function om(r){let e=[];for(let t of ase(r)){let n=cse(t);n&&e.push(n)}return e}var Z2e=Object.freeze(["fontFamily","fontWeight","emphasisFontFamily","emphasisFontWeight","emphasisFontStyle"]);function pse(r){return r.caption?{ref:r.caption,slot:"caption"}:r.body?{ref:r.body,slot:"body"}:{ref:r.heading,slot:"heading"}}function dse(r){let e=r.captionProfile?.fontFamily;if(e!==void 0)return{family:e,path:"captionProfile.fontFamily"};let{ref:t,slot:n}=pse(r.fonts);return{family:t?.family,path:`fonts.${n}`}}function Jb(r){let e=dse(r),t=r.captionProfile??{},n={...t,...e.family!==void 0?{fontFamily:e.family}:{fontFamily:void 0}};return om(n).map(o=>({...o,path:t[o.field]!==void 0?`captionProfile.${o.field}`:e.path}))}var G2e=Object.freeze([400,500,600,700,800,900]);var H2e=new Set([...Nb,...Vb].map(r=>r.toLowerCase()));var Oe=l.string();var Hb=l.discriminatedUnion("mode",[l.object({mode:l.literal("frame-center")}),l.object({mode:l.literal("point"),x:l.number().min(0).max(1),y:l.number().min(0).max(1)}),l.object({mode:l.literal("face"),faceId:l.string().min(1),shotScale:l.enum(["close","standard","wide"]).optional()}),l.object({mode:l.literal("all-faces")}),l.object({mode:l.literal("active-speaker")})]),Xb=l.object({startSec:l.number().nonnegative().describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:l.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:Hb.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:l.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:l.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:l.object({in:l.number().nonnegative().describe("Ease-IN ramp DURATION in seconds at the segment START."),out:l.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:l.object({x:l.number().min(-.3).max(.3).describe("Horizontal nudge, source-normalized (+ = right)."),y:l.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.")}),Yb=Xb.refine(r=>!(r.focus.mode==="face"&&r.focus.shotScale!==void 0&&r.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"]}),rm=l.object({segments:l.array(Yb).min(1)});var nm=l.object({aspectRatio:l.enum(["16:9","9:16","1:1","4:5"]),fps:l.union([l.literal(24),l.literal(25),l.literal(30),l.literal(60)]).optional(),resolution:l.enum(["hd","fhd","4k"]).optional(),platform:l.string().optional()}),rS=l.object({start:l.number().nonnegative(),end:l.number().nonnegative()}),lse=l.object({start:l.number().nonnegative(),end:l.number().nonnegative(),reason:l.string().optional()}),use=l.object({kind:l.literal("media"),mediaId:Oe,trim:rS.optional(),excludedRanges:l.array(lse).optional(),volume:l.number().min(0).max(4).optional(),muted:l.boolean().optional(),playbackRate:l.number().positive().optional(),sync:l.enum(["video","independent"]).optional(),kenBurns:l.enum(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:l.number().optional(),fadeInMs:l.number().nonnegative().optional(),fadeOutMs:l.number().nonnegative().optional(),loop:l.boolean().optional(),audioRole:l.enum(["sfx","music","vo","ambience"]).optional(),duck:l.object({duckDb:l.number().max(0),attackMs:l.number().nonnegative(),releaseMs:l.number().nonnegative(),windows:l.array(l.object({startMs:l.number(),endMs:l.number()})).optional()}).optional(),anchor:l.object({clipId:l.string().min(1),offsetMs:l.number()}).optional(),reframe:rm.optional()}),mse=l.object({kind:l.literal("component"),componentId:l.string().min(1),props:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),l.string().min(1)).optional(),zPlane:l.enum(["front","behind-subject"]).optional()}),hse=l.object({kind:l.literal("overlay"),primitiveId:l.string().min(1),params:l.record(l.string(),l.unknown()),zPlane:l.enum(["front","behind-subject"]).optional(),anchor:l.object({space:l.literal("scene"),x:l.number().min(0).max(1),y:l.number().min(0).max(1)}).optional(),parallax:l.number().min(-.3).max(.3).optional()}),fse=l.object({kind:l.literal("effect"),primitiveId:l.string().min(1),params:l.record(l.string(),l.unknown()).optional()}),gse=l.object({kind:l.literal("alpha-layer"),componentId:l.string().min(1),props:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),l.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:l.enum(["front","behind-subject"]).optional()}),xse=l.object({kind:l.literal("card"),html:l.string().min(1),tokens:l.record(l.string(),l.string()).optional(),zPlane:l.literal("front").optional()}),yse=l.object({kind:l.literal("composition"),compositionId:l.string().min(1),trim:rS.optional()}).strict(),bse=l.discriminatedUnion("kind",[use,mse,hse,fse,gse,xse,yse]),Sse=l.object({type:l.string().min(1),duration:l.number().positive()}),zse=l.object({x:l.number(),y:l.number()}),im=l.object({x:l.number().min(0).max(1),y:l.number().min(0).max(1),w:l.number().positive().max(1),h:l.number().positive().max(1)}),vse=l.enum(["cover","contain"]),wse=l.object({primitiveId:l.string().min(1),params:l.record(l.string(),l.unknown()).optional()}),Ise=l.union([l.enum(["linear","ease","easeIn","easeOut","easeInOut"]),l.object({cubicBezier:l.tuple([l.number(),l.number(),l.number(),l.number()])}).strict()]),kse=l.object({time:l.number().nonnegative(),value:l.number(),easing:Ise.optional()}).strict(),Pse=l.array(kse).min(2),Qb=["opacity","scale","rotation","position.x","position.y","volume"],$se=l.object({id:l.string().min(1),startTime:l.number().nonnegative(),duration:l.number().positive(),source:bse,kind:l.enum(["video","audio","image","overlay","effect"]).optional(),opacity:l.number().min(0).max(1).optional(),scale:l.number().positive().optional(),rotation:l.number().optional(),position:zse.optional(),region:im.optional(),fit:vse.optional(),effects:l.array(wse).optional(),transitionIn:Sse.optional(),linkGroupId:l.string().min(1).optional(),animate:l.record(l.string(),Pse).superRefine((r,e)=>{for(let t of Object.keys(r))Qb.includes(t)||e.addIssue({code:l.ZodIssueCode.custom,path:[t],message:`"${t}" is not an animatable param (${Qb.join(", ")})`})}).optional()}).strict(),Tse=l.object({id:l.string().min(1),startTime:l.number().nonnegative(),duration:l.number().positive()}).strict(),Cse=l.unknown().transform((r,e)=>{let n=(!!r&&typeof r=="object"&&"source"in r?$se:Tse).safeParse(r);return n.success?n.data:(e.issues.push(...n.error.issues),l.NEVER)}),Ose=l.object({id:l.string().min(1),kind:l.enum(["video","audio","image","overlay","effect"]),name:l.string().optional(),enabled:l.boolean().optional(),volume:l.number().min(0).max(4).optional(),contents:l.array(Cse)}).strict(),Mse=l.object({id:l.string().min(1),startTime:l.number().nonnegative(),endTime:l.number().nonnegative().optional(),kind:l.string().min(1),name:l.string().optional(),metadata:l.record(l.string(),l.unknown()).optional()}).strict(),Rse=l.object({public:l.boolean().optional(),readerOrgIds:l.array(l.string()).optional(),writerOrgIds:l.array(l.string()).optional()}),Ese=l.object({type:l.string().min(1),source:l.string().optional(),notes:l.string().optional()}),Dse=l.object({audioDescriptionTrackId:l.string().optional(),captionsTrackId:l.string().optional(),signLanguageTrackId:l.string().optional(),notes:l.string().optional()}),Ase=l.object({text:l.string().min(1),startMs:l.number().nonnegative().describe("Word start on the composition timeline, in milliseconds."),endMs:l.number().nonnegative().describe("Word end on the composition timeline, in milliseconds."),emphasis:l.boolean().optional(),annotate:l.enum(["circle","underline"]).optional()}),eS=l.object({fontFamily:l.string().min(1).optional(),fontSize:l.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:l.number().int().min(100).max(900).optional(),color:l.string().min(1).optional(),highlightColor:l.string().min(1).optional(),backgroundColor:l.string().optional(),plate:l.enum(["glass","solid","none"]).optional(),position:l.enum(["top","center","bottom"]).optional(),textTransform:l.enum(["none","uppercase","capitalize"]).optional(),emphasisColor:l.string().optional(),emphasisGradient:l.string().optional(),emphasisScale:l.number().positive().optional(),emphasisFontFamily:l.string().optional(),emphasisFontWeight:l.number().int().min(100).max(900).optional(),emphasisTextTransform:l.enum(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:l.number().optional(),emphasisFontStyle:l.enum(["normal","italic"]).optional(),entrance:l.enum(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:l.number().nonnegative().optional(),entranceStaggerMs:l.number().nonnegative().optional(),exitMs:l.number().nonnegative().optional(),emphasisPlate:l.boolean().optional(),emphasisPlateColor:l.string().optional(),emphasisPlateTextColor:l.string().optional(),emphasisPlateAltColor:l.string().optional(),emphasisPlateAltTextColor:l.string().optional(),emphasisPlateRadius:l.number().nonnegative().optional(),emphasisPlatePadX:l.number().optional(),emphasisPlatePadY:l.number().optional(),annotationColor:l.string().optional(),maxWidthPercent:l.number().positive().max(100,"captions style.maxWidthPercent is % of composition width (max 100)").optional()}),tS=l.object({words:l.array(Ase)}),oS=l.enum(["front","behind-subject"]).optional(),_se=l.discriminatedUnion("source",[l.object({source:l.literal("derived"),from:l.object({clipId:l.string()}),segments:l.array(tS),style:eS.optional(),zPlane:oS}),l.object({source:l.literal("authored"),segments:l.array(tS),style:eS.optional(),zPlane:oS})]).superRefine((r,e)=>{if(r.style)for(let t of om(r.style))e.addIssue({code:"custom",path:["style",t.field],message:t.message})});var ln=l.object({v:l.literal(1,{error:r=>r.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(r.input)}).`}),format:nm,tracks:l.array(Ose),markers:l.array(Mse).optional(),captions:_se.optional(),sourceSuggestionId:l.string().optional(),license:Ese.optional(),licenseVerification:l.enum(["attested","cueframe-verified","third-party-verified"]).optional(),accessibility:Dse.optional(),ownerOrgId:l.string().optional(),acl:Rse.optional()}).strict(),Lse=l.enum(["user","agent","import"]),hEe=l.object({id:l.string().min(1),compositionId:Oe,predecessorId:l.string().optional(),createdAt:l.number(),etag:l.string().min(1),authorKind:Lse,authorId:l.string().optional(),composition:ln});var jse="gp-1",Ys=l.literal(jse),nS=im,un=l.enum(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),sm=l.object({headline:l.string().max(120).optional(),sub:l.string().max(200).optional(),value:l.string().max(40).optional(),label:l.string().max(80).optional(),items:l.array(l.string().max(80)).max(8).optional(),series:l.array(l.object({label:l.string().max(40),value:l.string().max(16)})).max(8).optional()}).strict(),Fse=l.object({id:l.string().min(1),atSec:l.number().min(0),durSec:l.number().positive(),role:un,copy:sm,intent:l.string().min(1).max(400),priority:l.number().int().min(0).max(10).default(5)}).strict(),Nse=l.object({version:Ys,beats:l.array(Fse)}).strict(),Vse=l.enum(["headline","value","label","sublabel","logo","accent-shape","backdrop"]),Use=l.enum(["heading","body","accent","surface","on-accent","on-surface"]),Bse=l.enum(["front","behind-subject"]),qse=l.object({elId:l.string().min(1),role:Vse,box:nS,styleRole:Use,z:Bse.default("front"),text:l.string().max(200).optional(),typeScaleStep:l.number().int().min(0).max(8).optional()}).strict(),ar=1e-6,Wse=(r,e)=>r.x<e.x+e.w-ar&&r.x+r.w>e.x+ar&&r.y<e.y+e.h-ar&&r.y+r.h>e.y+ar,Zse=l.object({version:Ys,beatId:l.string().min(1),frame:l.object({w:l.number().positive(),h:l.number().positive()}).strict(),keepOut:l.array(nS),safe:l.object({titleSafe:l.number().min(0).max(1),actionSafe:l.number().min(0).max(1)}).strict(),elements:l.array(qse),dropped:l.object({reason:l.string().min(1)}).strict().optional()}).strict().superRefine((r,e)=>{for(let t of r.elements){if(t.z==="behind-subject")continue;let n=t.box;(n.x+n.w>1+ar||n.y+n.h>1+ar)&&e.addIssue({code:l.ZodIssueCode.custom,message:`element ${t.elId} box spills past the frame`,path:["elements"]});for(let o of r.keepOut)Wse(n,o)&&e.addIssue({code:l.ZodIssueCode.custom,message:`element ${t.elId} overlaps a face keep-out (text on the speaker)`,path:["elements"]})}}),Gse=l.enum(["reveal","fade","rise","count-up","wipe"]),Kse=l.enum(["pulse","underline","color-shift"]),Jse=l.enum(["fade","fall","wipe","cut"]),Hse=l.enum(["spring","ease-out","ease-in-out","linear"]),Xse=l.object({type:Gse,atMs:l.number().min(0),durMs:l.number().positive(),ease:Hse.default("spring"),stagger:l.number().min(0).optional()}).strict(),Yse=l.object({type:Kse,atMs:l.number().min(0),durMs:l.number().positive()}).strict(),Qse=l.object({type:Jse,atMs:l.number().min(0),durMs:l.number().positive()}).strict(),eae=l.object({elId:l.string().min(1),enter:Xse,emphasis:Yse.optional(),exit:Qse.optional()}).strict(),tae=l.object({version:Ys,beatId:l.string().min(1),elements:l.array(eae)}).strict(),SEe=l.object({version:Ys,content:Nse,layouts:l.array(Zse),motions:l.array(tae)}).strict();var oae=l.discriminatedUnion("kind",[l.object({kind:l.literal("face"),faceId:l.string().min(1)}),l.object({kind:l.literal("all-faces")}),l.object({kind:l.literal("frame-center")}),l.object({kind:l.literal("active-speaker")}),l.object({kind:l.literal("point"),x:l.number().min(0).max(1),y:l.number().min(0).max(1)})]),rae=l.object({startSec:l.number().nonnegative(),endSec:l.number().positive(),action:l.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:oae.optional(),shotScale:l.enum(["close","standard","wide"]).optional(),zoomScale:l.number().min(.4).max(1).optional(),verticalBias:l.number().min(-.3).max(.3).optional(),lateralBias:l.number().min(-.3).max(.3).optional(),intent:l.string().optional()}).refine(r=>r.action!=="frame"||r.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(r=>r.action!=="keep"||r.subject===void 0,{message:"keep segment shows footage as-is \u2014 it takes no subject (use action:'frame' to track one)"}).refine(r=>r.shotScale===void 0||r.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"]}),nae=l.object({startSec:l.number().nonnegative(),endSec:l.number().positive(),reason:l.string().min(1)}),iae=l.object({id:l.string().min(1),atSec:l.number().nonnegative(),durSec:l.number().positive(),kind:l.enum(["broll","audio","sfx","music","ambience","gif","image"]),source:l.enum(["find","generate"]),intent:l.string().min(1),resolvedMediaId:l.string().optional()}),sae=l.object({id:l.string().min(1),atSec:l.number().nonnegative(),durSec:l.number().positive(),role:un,copy:sm,intent:l.string().min(1)}),aae=l.object({startSec:l.number().nonnegative(),endSec:l.number().nonnegative().optional(),kind:l.string().min(1),name:l.string().optional()}),IEe=l.object({framing:l.array(rae).min(1),cuts:l.array(nae).optional(),captions:l.object({styleIntent:l.string().optional()}).optional(),assets:l.array(iae).optional(),graphics:l.array(sae).optional(),markers:l.array(aae).optional()});var cae=l.union([l.enum(["linear","ease","ease-in","ease-out","ease-in-out"]),l.object({kind:l.literal("cubic-bezier"),x1:l.number().min(0).max(1),y1:l.number(),x2:l.number().min(0).max(1),y2:l.number()})]),St=l.string().min(1),am=l.union([l.object({kind:l.literal("system"),family:l.string().min(1),weight:l.number().int().min(1).max(1e3).optional(),style:l.enum(["normal","italic"]).optional()}),l.object({kind:l.literal("web"),family:l.string().min(1),url:l.string().url().optional(),weight:l.number().int().min(1).max(1e3).optional(),style:l.enum(["normal","italic"]).optional()}),l.object({kind:l.literal("uploaded"),fontId:Oe,family:l.string().optional(),weight:l.number().int().min(1).max(1e3).optional(),style:l.enum(["normal","italic"]).optional()})]),pae=l.object({primary:l.string().min(1),secondary:l.string().optional(),accent:l.string().min(1),background:l.string().min(1),text:l.string().min(1),textMuted:l.string().optional(),border:l.string().optional(),surface:l.string().optional(),card:l.string().optional(),gridLine:l.string().optional(),accentMuted:l.string().optional(),textOnAccent:l.string().optional(),textOnSurface:l.string().optional()}),dae=l.object({heading:am,body:am.optional(),caption:am.optional()}),lae=l.object({base:l.number().positive().optional(),lg:l.number().positive().optional(),sm:l.number().positive().optional()}),uae=l.object({fontSizeHeading:l.number().positive().optional(),fontSizeBody:l.number().positive().optional(),fontSizeLabel:l.number().positive().optional(),borderRadius:l.number().nonnegative().optional()}),mae=l.object({duration:l.number().positive().optional(),easing:cae.optional(),entrance:l.enum(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:l.number().nonnegative().optional(),exitMs:l.number().nonnegative().optional()}),sS=l.enum(["tl","tr","bl","br"]),hae=l.object({src:l.string().min(1),alt:l.string().optional(),placement:sS.optional(),sizePct:l.number().positive().optional()}),iS=l.object({kind:l.enum(["card","video"]),src:l.string().min(1).optional(),title:l.string().optional(),subtitle:l.string().optional(),durationMs:l.number().positive().optional()}),fae=l.object({src:l.string().min(1),opacity:l.number().min(0).max(1).optional(),placement:sS.optional()}),gae=l.discriminatedUnion("kind",[l.object({kind:l.literal("card"),html:l.string().min(1),tokens:l.record(l.string(),l.string()).optional()}),l.object({kind:l.literal("overlay"),primitiveId:l.string().min(1),params:l.record(l.string(),l.unknown()).optional()}),l.object({kind:l.literal("component"),componentId:l.string().min(1),props:l.record(l.string(),l.unknown()).optional()})]),xae=l.enum(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),yae=l.object({id:l.string().min(1).max(40),observed:l.string().min(1).max(500),body:gae,motion:l.object({preset:xae,enterMs:l.number().int().min(0).max(5e3).optional(),exitMs:l.number().int().min(0).max(5e3).optional(),staggerMs:l.number().int().min(0).max(2e3).optional(),confidence:l.enum(["high","low"]).optional()}).optional(),role:un,zone:l.object({x:l.number(),y:l.number(),w:l.number(),h:l.number()}).optional(),evidence:l.array(l.number().int().min(0)).max(24).optional(),diffScore:l.number().min(0).max(1).optional(),coverage:l.enum(["reproduced","approximated","skipped"]),skipReason:l.string().max(300).optional()}),bae=l.object({public:l.boolean().optional(),readerOrgIds:l.array(l.string()).optional(),writerOrgIds:l.array(l.string()).optional()}),Sae=l.object({type:l.string().min(1),source:l.string().optional(),notes:l.string().optional()}),aS=l.object({id:l.string().min(1),name:l.string().min(1),colors:pae,fonts:dae,spacing:lae.optional(),sizing:uae.optional(),motion:mae.optional(),captionProfile:l.object({color:l.string().optional(),highlightColor:l.string().optional(),emphasisColor:l.string().optional(),plate:l.enum(["glass","solid","none"]).optional(),entrance:l.enum(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:l.number().optional(),entranceStaggerMs:l.number().optional(),exitMs:l.number().optional(),fontFamily:l.string().optional(),fontWeight:l.number().int().min(100).max(900).multipleOf(100).optional(),emphasisFontFamily:l.string().optional(),emphasisScale:l.number().positive().optional(),emphasisFontWeight:l.number().int().min(100).max(900).optional(),emphasisFontStyle:l.enum(["normal","italic"]).optional(),emphasisTextTransform:l.enum(["none","uppercase"]).optional(),emphasisLetterSpacing:l.number().optional(),emphasisPlate:l.boolean().optional(),emphasisPlateColor:l.string().optional(),emphasisPlateTextColor:l.string().optional()}).optional(),exemplarKeys:l.array(l.string().min(1)).max(24).optional(),contactSheetKey:l.string().min(1).optional(),motifs:l.array(yae).max(24).optional(),styleRubric:l.string().max(4e3).optional(),density:l.object({graphicsPerMin:l.number().min(0).max(60),maxSimultaneous:l.number().int().min(1).max(6)}).optional(),inspiration:l.object({sources:l.array(l.string()).min(1).max(24),extractedAt:l.number(),extractionVersion:l.string().min(1).max(60)}).optional(),logo:hae.optional(),intro:iS.optional(),outro:iS.optional(),watermark:fae.optional(),audio:l.object({sfxIntensity:l.enum(["off","light","standard","dense"]).optional(),musicEnabled:l.boolean().optional(),musicMood:l.string().max(300).optional(),sonicLogo:l.object({ref:St,placement:l.enum(["intro","outro","both"]),offsetMs:l.number().int().min(0).max(1e4).optional()}).optional(),uiSoundSet:l.object({tick:St.optional(),pop:St.optional(),impact:St.optional(),confirm:St.optional(),error:St.optional(),whoosh:St.optional(),riser:St.optional()}).optional(),bedStyle:l.object({bedId:St.optional(),genre:l.string().max(120).optional(),bpmRange:l.object({min:l.number(),max:l.number()}).optional()}).optional(),ambiencePreference:l.object({ref:St}).nullable().optional()}).optional(),license:Sae.optional(),licenseVerification:l.enum(["attested","cueframe-verified","third-party-verified"]).optional(),ownerOrgId:l.string().optional(),acl:bae.optional()}).superRefine((r,e)=>{for(let t of Jb(r))e.addIssue({code:"custom",path:t.path.split("."),message:t.message})});var zae=l.enum(["pending","uploading","analyzing","subsetting","ready","partial","failed"]),vae=l.object({weight:l.number().int().min(100).max(900),style:l.enum(["normal","italic"]),storageKey:l.string().min(1),byteSize:l.number().int().nonnegative().optional(),subsetComplete:l.boolean().optional()}),REe=l.object({id:l.string().min(1),family:l.string().min(1),status:zae,variants:l.array(vae).nonempty(),source:l.enum(["uploaded","system","web"]).optional(),license:l.object({type:l.string().min(1),source:l.string().optional(),notes:l.string().optional()}).optional(),createdAt:l.number().optional(),ownerOrgId:l.string().optional()});var wae=l.enum(["interactive","standard","background"]),Iae=l.enum(["preview","final"]),kae=l.enum(["offline","live"]),Pae=l.enum(["user","agent","cost_limit","superseded","source_removed","timeout","error"]),cS=l.enum(["pending","rendering","complete","error","cancelled"]),$ae=l.object({phase:l.string().min(1),percent:l.number().min(0).max(100),scenesTotal:l.number().int().positive().optional()}),Tae=l.object({package:l.string().min(1),name:l.string().min(1),version:l.string().min(1)}),Cae=l.object({mediaId:Oe,presignedUrl:l.string().url(),expiresAt:l.number().optional()}),Oae=l.object({composition:ln,brandKit:aS.optional(),mediaSources:l.array(Cae),registryPins:l.array(Tae),capturedAt:l.number()}),Mae=l.object({kind:l.literal("r2"),path:l.string().optional()}),Rae=l.object({kind:l.literal("s3"),credentialId:l.string().min(1),bucket:l.string().min(1),key:l.string().min(1),region:l.string().optional(),acl:l.string().optional()}),Eae=l.object({kind:l.literal("youtube"),credentialId:l.string().min(1),title:l.string().min(1),description:l.string().optional(),privacy:l.enum(["public","unlisted","private"]),tags:l.array(l.string()).optional()}),Dae=l.object({kind:l.literal("mux"),credentialId:l.string().min(1),passthrough:l.string().optional()}),Aae=l.object({kind:l.literal("webhook"),url:l.string().url(),signingKeyId:l.string().optional(),headers:l.record(l.string(),l.string()).optional()}),_ae=l.discriminatedUnion("kind",[Mae,Rae,Eae,Dae,Aae]),Lae=l.enum(["pending","uploading","delivered","failed"]),jae=l.object({destinationIndex:l.number().int().nonnegative(),status:Lae,url:l.string().url().optional(),deliveredAt:l.number().optional(),error:l.string().optional()}),jEe=l.object({id:Oe,projectId:Oe.optional(),compositionId:Oe,compositionVersionId:l.string().min(1),status:cS,progress:$ae.optional(),mode:kae.optional(),priority:wae,intent:Iae.optional(),snapshot:Oae.optional(),snapshotRef:l.string().optional(),outputUrl:l.string().url().optional(),outputExpiresAt:l.number().optional(),destinations:l.array(_ae).optional(),destinationResults:l.array(jae).optional(),cancelReason:Pae.optional(),error:l.object({code:l.string(),message:l.string(),details:l.record(l.string(),l.unknown()).optional()}).optional(),createdAt:l.number(),updatedAt:l.number()}),FEe=l.object({jobId:Oe,status:cS,percent:l.number().min(0).max(100).optional(),framesRendered:l.number().int().nonnegative().optional(),framesTotal:l.number().int().positive().optional()});var Fae=l.enum(["first-party","community-verified","community-unverified","user-private","sandbox","deprecated"]),Nae=l.enum(["2d","immersive","interactive"]),Vae=l.object({path:l.string().min(1),fallback:l.unknown()}),Uae=l.object({effectName:l.string().min(1),metadata:l.record(l.string(),l.unknown()).optional()}),Bae=l.object({description:l.string().optional(),use_when:l.array(l.string()).optional(),avoid_when:l.array(l.string()).optional(),vibe:l.array(l.string()).optional(),formats:l.array(l.string()).optional(),pairs_well_with:l.array(l.string()).optional(),exemplars:l.array(l.string()).optional()}),UEe=l.object({name:l.string().min(1),package:l.string().min(1),category:l.enum(["overlay","text","effect","transition","layout"]),version:l.string().min(1),origin:Fae,modes:l.array(Nae).optional(),paramsSchema:l.unknown(),varyingParams:l.array(l.string()).optional(),extends:l.string().optional(),tokens:l.array(Vae).optional(),otio:Uae.optional(),meta:Bae.optional()});var GEe=l.object({id:Oe,name:l.string().min(1),defaultFormat:nm.optional(),palConformDefault:l.union([l.literal(24),l.literal(30)]).optional(),activeCompositionId:Oe.nullable().optional(),brandKitId:l.string().optional(),ownerOrgId:l.string().optional(),createdAt:l.number(),updatedAt:l.number()});var qae=l.enum(["main","wide","facecam","screen","audio"]),Wae=l.object({mediaId:Oe,role:qae,label:l.string().optional()}),Zae=l.object({videoRole:l.enum(["main","wide","facecam","screen"]),audioRole:l.literal("audio")}),XEe=l.object({id:Oe,name:l.string().min(1),members:l.array(Wae).nonempty(),mux:l.array(Zae).optional(),ownerOrgId:l.string().optional(),createdAt:l.number(),updatedAt:l.number()});var tDe=l.enum(["render.completed","media.transcribed","media.completed","composition.updated"]),Gae=l.enum(["pending","delivering","delivered","failed","exhausted"]),oDe=l.object({id:Oe,url:l.string().url(),events:l.array(l.string().min(1)).nonempty(),signingKeyId:l.string().optional(),headers:l.record(l.string(),l.string()).optional(),enabled:l.boolean().optional(),ownerOrgId:l.string().optional(),createdAt:l.number(),updatedAt:l.number()}),rDe=l.object({id:l.string().min(1),webhookId:Oe,event:l.string().min(1),payload:l.record(l.string(),l.unknown()),status:Gae,attemptCount:l.number().int().nonnegative(),responseStatus:l.number().int().optional(),responseBody:l.string().optional(),error:l.string().optional(),createdAt:l.number(),deliveredAt:l.number().optional()});function hn(r){return"source"in r}function mn(r){return r.startTime+r.duration}function Kae(r){let e=[],t=[...r.contents].sort((n,o)=>n.startTime-o.startTime);for(let n=1;n<t.length;n++){let o=t[n-1],i=t[n];i.startTime<mn(o)&&e.push({code:"track_clips_overlap",message:`Track ${r.id}: items ${o.id} and ${i.id} overlap at [${i.startTime}, ${Math.min(mn(o),mn(i))})`,details:{trackId:r.id,clipAId:o.id,clipBId:i.id,overlapRange:[i.startTime,Math.min(mn(o),mn(i))]}})}return e}function Jae(r){let e=[];for(let t of r.contents){if(!hn(t))continue;Hae(r.kind,t.source.kind)||e.push({code:"clip_source_track_kind_mismatch",message:`Track ${r.id} (kind=${r.kind}) cannot hold TimelineClip ${t.id} (source.kind=${t.source.kind})`,details:{trackId:r.id,clipId:t.id,sourceKind:t.source.kind,trackKind:r.kind}})}return e}function Hae(r,e){switch(r){case"video":return e==="media"||e==="component"||e==="composition";case"audio":return e==="media"||e==="component";case"image":return e==="media"||e==="component";case"overlay":return e==="overlay"||e==="component"||e==="alpha-layer"||e==="card";case"effect":return e==="effect"}}function Xae(r){let e=[],t=[...r.contents].sort((n,o)=>n.startTime-o.startTime);for(let n=0;n<t.length;n++){let o=t[n];if(!hn(o)||!o.transitionIn)continue;let i=t[n-1];if(!i||!hn(i)){e.push({code:"transition_no_predecessor",message:`Track ${r.id}: TimelineClip ${o.id} has transitionIn but no TimelineClip predecessor`,details:{trackId:r.id,clipId:o.id}});continue}let s=o.transitionIn.duration,c=Math.min(i.duration,o.duration);s>c&&e.push({code:"transition_too_long",message:`Track ${r.id}: TimelineClip ${o.id} transitionIn.duration (${s}) exceeds available headroom (${c})`,details:{trackId:r.id,clipId:o.id,transitionDuration:s,available:c}})}return e}function Yae(r){let e=[];for(let t of r.contents){if(!hn(t)||t.source.kind!=="media")continue;let n=t.source.excludedRanges;if(!n||n.length===0)continue;let o=t.source.trim,i=o?.start??0,s=o?.end??i+t.duration,c=-1/0,u=0,m=!1;for(let y=0;y<n.length;y++){let S=n[y];if(S.end<=S.start){e.push({code:"excluded_range_invalid",message:`Track ${r.id}: TimelineClip ${t.id} excludedRanges[${y}] end (${S.end}) must be > start (${S.start})`,details:{trackId:r.id,clipId:t.id,index:y,start:S.start,end:S.end}}),m=!0;break}if(S.start<i||S.end>s){e.push({code:"excluded_range_out_of_bounds",message:`Track ${r.id}: TimelineClip ${t.id} excludedRanges[${y}] [${S.start}, ${S.end}] outside trim [${i}, ${s}]`,details:{trackId:r.id,clipId:t.id,index:y,start:S.start,end:S.end,trimStart:i,trimEnd:s}}),m=!0;break}if(S.start<c){e.push({code:"excluded_range_overlap",message:`Track ${r.id}: TimelineClip ${t.id} excludedRanges[${y}] overlaps preceding range (start ${S.start} < prevEnd ${c})`,details:{trackId:r.id,clipId:t.id,index:y,start:S.start,prevEnd:c}}),m=!0;break}c=S.end,u+=S.end-S.start}if(m)continue;let h=s-i,g=h-u;Math.abs(g-t.duration)>.001&&e.push({code:"excluded_range_duration_mismatch",message:`Track ${r.id}: TimelineClip ${t.id} duration (${t.duration}) \u2260 trimSpan (${h}) \u2212 \u03A3excluded (${u}) = ${g}`,details:{trackId:r.id,clipId:t.id,expected:g,actual:t.duration,trimSpan:h,totalExcluded:u}})}return e}function Qae(r){let e=[];for(let t of r.contents){if(!hn(t)||t.source.kind!=="media")continue;let n=t.source.trim;if(!n)continue;let o=t.source.playbackRate??1;if(!(o>0))continue;let i=t.source.excludedRanges;if(i&&i.length>0)continue;let s=n.end-n.start,c=s/o;Math.abs(c-t.duration)>.001&&e.push({code:"clip_duration_trim_mismatch",message:`Track ${r.id}: TimelineClip ${t.id} duration (${t.duration}) \u2260 trimSpan (${s}) \xF7 playbackRate (${o}) = ${c}`,details:{trackId:r.id,clipId:t.id,expected:c,actual:t.duration,trimSpan:s,playbackRate:o}})}return e}function ece(r){return[...Kae(r),...Jae(r),...Xae(r),...Yae(r),...Qae(r)]}function pS(r){let e=[];for(let t of r.tracks)e.push(...ece(t));return e}var fn=r=>r.endTime??r.startTime;function dS(r){let e=(r.markers??[]).filter(n=>n.kind==="scene").sort((n,o)=>n.startTime-o.startTime),t=[];for(let n=1;n<e.length;n++){let o=e[n-1],i=e[n];i.startTime<fn(o)&&t.push({code:"scene_marker_overlap",message:`Scene markers ${o.id} and ${i.id} overlap at [${i.startTime}, ${Math.min(fn(o),fn(i))})`,details:{markerAId:o.id,markerBId:i.id,overlapRange:[i.startTime,Math.min(fn(o),fn(i))]}})}return t}function lS(r){let e=new Map,t=[],n=(o,i)=>{let s=e.get(o);s?t.push({code:"composition_id_collision",message:`Id ${o} used by both ${s} and ${i}`,details:{id:o,existingKind:s,newKind:i}}):e.set(o,i)};for(let o of r.tracks){n(o.id,"track");for(let i of o.contents)n(i.id,"source"in i?"clip":"gap")}for(let o of r.markers??[])n(o.id,"marker");return t}function tce(r){let e=r.animate;if(!e)return[];let t=[];for(let[n,o]of Object.entries(e)){if(!o)continue;let i=[...o].sort((s,c)=>s.time-c.time);for(let s of i)s.time>r.duration+1e-6&&t.push({code:"varying_keyframe_time_out_of_range",message:`clip "${r.id}" animates "${n}" at ${s.time}s, past its own duration of ${r.duration}s \u2014 that keyframe can never be reached`,details:{clipId:r.id,param:n,time:s.time,duration:r.duration}});for(let s=1;s<i.length;s++)Math.abs(i[s].time-i[s-1].time)<1e-6&&t.push({code:"varying_keyframe_duplicate_time",message:`clip "${r.id}" has two "${n}" keyframes at ${i[s].time}s \u2014 the value at that instant is undefined`,details:{clipId:r.id,param:n,time:i[s].time}})}return t}function uS(r){let e=[];for(let t of r.tracks)for(let n of t.contents)"source"in n&&e.push(...tce(n));return e}function mS(r){return[...lS(r),...pS(r),...dS(r),...uS(r)]}var cm=2,oce=2,Qs=2,pm=l.enum(["image","video","audio","data"]),rce=l.union([l.literal(256),l.literal(512),l.literal(1024),l.literal(2048)]),nce=l.discriminatedUnion("mode",[l.object({mode:l.literal("original")}).strict(),l.object({mode:l.literal("tier"),tier:rce}).strict(),l.object({mode:l.literal("auto"),maxProjectedWidthRatio:l.number().positive().max(64),maxProjectedHeightRatio:l.number().positive().max(64),minVisibleSourceWidthRatio:l.number().positive().max(1).default(1),minVisibleSourceHeightRatio:l.number().positive().max(1).default(1)}).strict()]),ice=l.object({kind:pm,required:l.boolean(),mimeTypes:l.array(l.string().min(1)).min(1).optional(),mediaDemand:nce.optional()}).strict(),hS=l.enum(["canvas2d","webgl","webgl2","webgpu"]),dm=l.object({api:hS,required:l.literal(!0),accelerationPreference:l.enum(["hardware-preferred","software-allowed"])}).strict(),fS=l.object({version:l.literal(2)}).strict(),gS=l.enum(["angle","angle-egl","swangle","vulkan"]),xS=l.object({glBackend:gS,colorPipeline:l.literal("srgb"),sceneShot:fS.nullable()}).strict(),sce=l.object({webgl:l.string().min(1),renderer:l.string(),maxTextureSize:l.number().int().positive(),halfFloatColorTarget:l.string().min(1),glBackend:gS}).strict(),ace=l.object({loadedRuntimeIdentity:l.string().min(1),loadedDependencyIdentity:l.string().min(1),observedRasterAffectingFlags:l.object({browserArguments:l.array(l.string().min(1))}).strict(),browserProduct:l.string().min(1),browserVersion:l.string().min(1),browserExecutableSha256:l.string().regex(/^[a-f0-9]{64}$/),headless:l.boolean(),os:l.string().min(1),arch:l.string().min(1),deviceScaleFactor:l.number().positive(),colorProfile:l.string().min(1),actualGlBackend:l.string().min(1),actualRenderer:l.string().min(1),gpuIdentity:l.string().min(1).nullable()}).strict(),NDe=ace.omit({deviceScaleFactor:!0}).strict(),VDe=l.object({handle:l.string().min(1),mimeType:l.literal("image/png"),byteLength:l.number().int().positive(),width:l.number().int().positive(),height:l.number().int().positive(),encodedSha256:l.string().regex(/^[a-f0-9]{64}$/)}).strict(),UDe=l.object({sessionId:l.string().uuid(),requestId:l.number().int().nonnegative(),frame:l.number().int().nonnegative(),deviceScaleFactor:l.number().positive()}).strict(),yS=l.object({version:l.literal(cm),assets:l.record(l.string().min(1),ice),graphics:dm,alphaPolicy:l.enum(["requires-transparency","allows-opaque"]),sceneShot:fS.optional()}).strict(),BDe=Object.freeze({version:cm,assets:Object.freeze({}),graphics:Object.freeze({api:"canvas2d",required:!0,accelerationPreference:"software-allowed"}),alphaPolicy:"requires-transparency"}),ea=l.object({version:l.literal(cm),componentId:l.string().min(1).max(128).regex(/^[a-z0-9][a-z0-9._-]*$/),tsxSource:l.string().min(1),manifest:yS}).strict(),qDe=l.object({version:l.literal(1),sourceVersionId:l.string().regex(/^[a-f0-9]{64}$/)}).strict();var bS=l.object({handle:l.string().min(1).max(256),kind:pm,mimeType:l.string().min(1),contentSha256:l.string().regex(/^[a-f0-9]{64}$/),width:l.number().int().positive().optional(),height:l.number().int().positive().optional(),durationSec:l.number().positive().optional(),frameRate:l.number().positive().optional()}).strict(),cce=l.object({handle:l.string().min(1).max(256),kind:pm,mimeType:l.string().min(1),width:l.number().int().positive().optional(),height:l.number().int().positive().optional(),durationSec:l.number().positive().optional(),frameRate:l.number().positive().optional()}).strict(),pce=l.object({path:l.string().min(1)}).strict(),WDe=l.object({version:l.literal(oce),bundleId:l.string().regex(/^[a-f0-9]{64}$/),sourceVersionId:l.string().regex(/^[a-f0-9]{64}$/),runtimeDigest:l.string().min(1),dependencyLockDigest:l.string().regex(/^[a-f0-9]{64}$/),entrypoint:l.string().min(1),manifest:yS}).strict(),ZDe=l.object({version:l.literal(Qs),bundleId:l.string().regex(/^[a-f0-9]{64}$/),params:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),bS),width:l.number().int().positive(),height:l.number().int().positive(),fps:l.number().positive(),durationInFrames:l.number().int().positive(),alpha:l.boolean(),graphics:dm,seed:l.string().min(1),renderer:xS}).strict(),GDe=l.object({version:l.literal(Qs),source:ea,params:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),bS),width:l.number().int().positive(),height:l.number().int().positive(),fps:l.number().positive(),durationInFrames:l.number().int().positive(),codec:l.enum(["vp9","prores"]),runtimeDigest:l.string().min(1),dependencyLockDigest:l.string().regex(/^[a-f0-9]{64}$/),seed:l.string().min(1)}).strict(),KDe=l.object({version:l.literal(Qs),source:ea,params:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),cce),assetFiles:l.record(l.string().min(1),pce),width:l.number().int().positive(),height:l.number().int().positive(),fps:l.number().positive(),durationInFrames:l.number().int().positive(),codec:l.enum(["vp9","prores"]),runtimeDigest:l.string().min(1),dependencyLockDigest:l.string().regex(/^[a-f0-9]{64}$/),seed:l.string().min(1)}).strict(),dce=l.object({api:hS,acceleration:l.enum(["hardware","software"]),adapterName:l.string().min(1).optional(),deviceLost:l.literal(!1)}).strict(),JDe=l.object({version:l.literal(Qs),artifactId:l.string().regex(/^[a-f0-9]{64}$/),renderKey:l.string().regex(/^[a-f0-9]{64}$/),bundleId:l.string().regex(/^[a-f0-9]{64}$/),sourceVersionId:l.string().regex(/^[a-f0-9]{64}$/),runtimeDigest:l.string().min(1),outputSha256:l.string().regex(/^[a-f0-9]{64}$/),outputBytes:l.number().int().positive(),codec:l.enum(["png","vp9","prores"]),width:l.number().int().positive(),height:l.number().int().positive(),fps:l.number().positive(),durationInFrames:l.number().int().positive(),alpha:l.boolean(),requestedGraphics:dm,actualGraphics:dce,renderer:xS,host:sce.nullable()}).strict(),lce=["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_graphics_unavailable","component_graphics_mismatch","component_device_lost","component_output_invalid","component_conflict","component_scene_invalid"],HDe=l.enum(lce),cr=class extends Error{code;retryable;locator;constructor(e,t,n){super(t,n?.cause===void 0?void 0:{cause:n.cause}),this.name="ComponentRuntimeError",this.code=e,this.retryable=n?.retryable??!1,n?.locator&&(this.locator=n.locator)}};import{createHash as uce}from"crypto";function SS(r){return r.replace(/\r\n?/g,`
|
|
118
|
+
`).normalize("NFC")}function lm(r,e){if(r===null||typeof r=="boolean")return r;if(typeof r=="string")return SS(r);if(typeof r=="number"){if(!Number.isFinite(r))throw new TypeError("Canonical JSON does not support non-finite numbers.");return Object.is(r,-0)?0:r}if(typeof r!="object")throw new TypeError(`Canonical JSON does not support ${typeof r} values.`);if(e.has(r))throw new TypeError("Canonical JSON does not support cyclic values.");e.add(r);try{if(Array.isArray(r))return r.map(i=>lm(i,e));let t=Object.getPrototypeOf(r);if(t!==Object.prototype&&t!==null)throw new TypeError("Canonical JSON only supports plain objects.");let n=r,o={};for(let i of Object.keys(n).sort()){let s=n[i];if(s===void 0)throw new TypeError("Canonical JSON does not support undefined values.");o[SS(i)]=lm(s,e)}return o}finally{e.delete(r)}}function zS(r){return JSON.stringify(lm(r,new Set))}function vS(r){return zS(r)}function mce(r){return uce("sha256").update(r).digest("hex")}function wS(r){return mce(vS(r))}var oz=Cz(QS(),1);var Km=Object.freeze(["react","react/jsx-runtime","remotion","@remotion/media","@remotion/layout-utils","@remotion/transitions","@remotion/motion-blur","@remotion/noise","@remotion/paths","@remotion/shapes","@remotion/three","three","three/webgpu","three/tsl","@react-three/fiber","@cueframe/animate","gsap","postprocessing"]);var ez=new Set(Km),Epe=new Set(["Math.random","Date.now","performance.now","crypto.getRandomValues","crypto.randomUUID"]),Dpe=new Set(["Date","requestAnimationFrame","setTimeout","setInterval"]),Ape=new Set(["Audio","Html5Audio","Html5Video","OffthreadVideo","Video"]);function tz(r){let e=r.imported;return r.type!=="ImportSpecifier"||!e?null:e.type==="Identifier"&&typeof e.name=="string"?e.name:e.type==="StringLiteral"&&typeof e.value=="string"?e.value:null}function rz(r){if(!r||typeof r!="object")return null;let e=r;if(e.type==="Identifier"&&typeof e.name=="string")return e.name;if(e.type!=="MemberExpression"&&e.type!=="OptionalMemberExpression")return null;let t=rz(e.object);if(!t||!e.property||typeof e.property!="object")return null;let n=e.property,o=e.computed===!0?n.type==="StringLiteral"&&typeof n.value=="string"?n.value:null:n.type==="Identifier"&&typeof n.name=="string"?n.name:null;return o?`${t}.${o}`:null}function Jm(r){return rz(r)?.replace(/^(?:globalThis|window|self)\./,"")??null}function ot(r){throw new cr("component_import_denied",`Component import is not allowed: ${JSON.stringify(r)}.`)}function nz(r,e){let t,n=!1;try{t=(0,oz.parse)(r,{sourceType:"module",plugins:["jsx","typescript"],errorRecovery:!1})}catch(i){throw new cr("component_does_not_compile",i instanceof Error?i.message:String(i))}let o=i=>{if(!i||typeof i!="object")return;if(Array.isArray(i)){for(let u of i)o(u);return}let s=i,c=s.type;if((c==="ImportDeclaration"||c==="ExportNamedDeclaration"||c==="ExportAllDeclaration")&&s.source&&typeof s.source=="object"){let u=s.source.value;if(typeof u=="string"&&!ez.has(u)&&ot(u),(u==="remotion"||u==="@remotion/media")&&c==="ImportDeclaration"){let h=(Array.isArray(s.specifiers)?s.specifiers:[]).map(tz).find(g=>g!==null&&Ape.has(g));h&&ot(`${u}.${h}; use @cueframe/animate MediaTileScene`)}if(u==="@cueframe/animate"&&c==="ImportDeclaration"){let m=Array.isArray(s.specifiers)?s.specifiers:[];n||=m.map(tz).some(h=>h==="MediaTileScene"||h==="ImageTileScene")}}if(c==="ImportExpression"&&ot("dynamic import()"),c==="CallExpression"){let u=s.callee;u?.type==="Import"&&ot("dynamic import()"),u?.type==="Identifier"&&u.name==="require"&&ot("require()"),u?.type==="Identifier"&&typeof u.name=="string"&&Dpe.has(u.name)&&ot(`ambient ${u.name}`);let m=Jm(s.callee),h=Array.isArray(s.arguments)?s.arguments:[],g=h[0]?.type==="StringLiteral"?h[0].value:void 0;m==="document.createElement"&&(g==="video"||g==="audio")&&ot(`raw ${g} element; use @cueframe/animate MediaTileScene`)}if(c==="JSXOpeningElement"){let u=s.name;u?.type==="JSXIdentifier"&&(u.name==="video"||u.name==="audio")&&ot(`raw <${String(u.name)}> element; use @cueframe/animate MediaTileScene`)}if(c==="NewExpression"){let u=s.callee;u?.type==="Identifier"&&(u.name==="Date"||u.name==="Worker"||u.name==="SharedWorker")&&ot(`ambient ${String(u.name)}`)}if(c==="MemberExpression"||c==="OptionalMemberExpression"){let u=Jm(s);u&&Epe.has(u)&&ot(`ambient ${u}`)}if(c==="VariableDeclarator"){let u=Jm(s.init),m=s.id;u&&["Math","Date","performance","crypto"].includes(u)&&m?.type==="Identifier"&&ot(`ambient ${u} alias`),u==="Math"&&m?.type==="ObjectPattern"&&(Array.isArray(m.properties)?m.properties:[]).some(g=>{let y=g.key;return y?.name==="random"||y?.value==="random"})&&ot("ambient Math.random alias")}if(c==="TSImportType"){let u=s.argument;u?.type==="StringLiteral"&&typeof u.value=="string"&&!ez.has(u.value)&&ot(u.value)}for(let[u,m]of Object.entries(s))u==="loc"||u==="start"||u==="end"||u==="errors"||u==="comments"||o(m)};if(o(t),n&&e!==void 0&&e!=="webgl2")throw new cr("component_graphics_mismatch","MediaTileScene requires manifest.graphics.api to be webgl2.")}var ho=l.string().min(1),iz=l.enum(["image","video","audio","data"]),_pe=l.object({version:l.literal(1),project:l.object({version:l.literal(4),id:ho,name:ho,createdAt:l.number().finite(),modifiedAt:l.number().finite(),composition:ln,pool:l.array(l.object({id:ho,kind:iz}).passthrough()),authoredComponents:l.never().optional(),recipe:l.object({schemaVersion:l.literal(1),slug:l.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),mediaSlots:l.array(l.object({id:ho,projectMediaId:ho,kind:iz}).passthrough()).length(1),cloudBrandKit:Wu,components:l.array(l.object({componentId:ho,name:ho,category:l.enum(["effects","transitions","text","layouts"]),propSchema:l.record(l.string(),l.unknown()).optional(),sourceVersionId:l.never().optional()}).strict())}).passthrough()}).passthrough(),components:l.array(ea)}).strict();function Hm(r,e,t){let n=new Map;for(let o of r){let i=e(o);if(n.has(i))throw new Error(`Duplicate ${t}: ${i}`);n.set(i,o)}return n}function sz(r){let e=_pe.parse(r),t=mS(e.project.composition);if(t.length)throw new Error(t.map(S=>`${S.code}: ${S.message}`).join(`
|
|
119
|
+
`));let o=structuredClone(r).project,i=Hm(e.components,S=>S.componentId,"component source"),s=Hm(o.recipe.components,S=>S.componentId,"recipe component"),c=Hm(o.pool,S=>S.id,"pool media id");for(let S of o.recipe.mediaSlots)if(c.get(S.projectMediaId)?.kind!==S.kind)throw new Error(`Media slot ${S.id} must match a pool entry of kind ${S.kind}.`);let u=new Map;for(let[S,w]of i){if(!s.has(S))throw new Error(`Missing recipe metadata for component ${S}.`);if(Buffer.byteLength(w.tsxSource,"utf8")>5e5)throw new Error(`Component ${S} exceeds the recipe loader's 500000-byte source limit.`);nz(w.tsxSource,w.manifest.graphics.api),u.set(S,wS(w))}for(let S of s.keys())if(!i.has(S))throw new Error(`Missing source for component ${S}.`);for(let S of o.composition.tracks)for(let w of S.contents){if(!("source"in w))continue;let $=w.source;if($.kind==="media"&&!c.has($.mediaId))throw new Error(`Missing pool media ${$.mediaId}.`);if($.kind!=="component"&&$.kind!=="alpha-layer")continue;let E=i.get($.componentId);if(!E)throw new Error(`Missing source for placed component ${$.componentId}.`);if(Object.hasOwn($.props,"componentRef"))throw new Error(`Remove componentRef from ${w.id}; recipe pack owns source pinning.`);let V=$.assets??{};for(let[F,H]of Object.entries(E.manifest.assets))if(H.required&&!V[F])throw new Error(`Missing required asset ${$.componentId}.${F}.`);for(let[F,H]of Object.entries(V)){let re=E.manifest.assets[F];if(!re||c.get(H)?.kind!==re.kind)throw new Error(`Invalid asset binding ${$.componentId}.${F}: ${H}.`)}w.source={...$,props:{...$.props,componentRef:{version:1,sourceVersionId:u.get($.componentId)}}}}let m=Object.fromEntries([...i].map(([S,w])=>{let $=u.get(S);return[S,{headVersionId:$,versions:{[$]:w}}]})),h=o.recipe.mediaSlots[0].projectMediaId;sr(o.composition,h,h);let{recipe:g,...y}=o;return{...y,authoredComponents:m,recipe:{...g,components:g.components.map(({propSchema:S,...w})=>({...w,sourceVersionId:u.get(w.componentId),...S===void 0?{}:{propSchema:S}}))}}}async function pz(r){try{let e;if(r.body==="@-"){let s=[];for await(let c of process.stdin)s.push(Buffer.from(c));e=Buffer.concat(s).toString("utf8")}else e=r.body.startsWith("@")?await az(cz(r.body.slice(1)),"utf8"):r.body;let t=sz(JSON.parse(e)),n=cz(r.out),o=JSON.stringify(t,null,2)+`
|
|
120
|
+
`;if(r.check){if(await az(n,"utf8")!==o)throw new Error(`Stale generated file: ${n}`)}else if(!r.dryRun){let s=`${n}.${Npe()}.tmp`;try{await Lpe(s,o,{flag:"wx"}),await jpe(s,n)}finally{await Fpe(s).catch(c=>{if(c.code!=="ENOENT")throw c})}}let i={output:n,check:!!r.check,dryRun:!!r.dryRun,sourceVersions:Object.fromEntries(Object.entries(t.authoredComponents).map(([s,c])=>[s,c.headVersionId]))};return B(r,"recipe_pack_complete",i),r.json||console.log(`${r.check?"Checked":r.dryRun?"Validated":"Packed"} ${n}`),i}catch(e){G(r,"recipe_pack",e,j.UserError),L(j.UserError)}}import Vpe from"open";import{createAuthClient as Upe}from"better-auth/client";import{deviceAuthorizationClient as Bpe}from"better-auth/client/plugins";async function dz(r){let e=go(r.target),t=Upe({baseURL:e,plugins:[Bpe()]}),n=Re("Requesting device code\u2026",r.json),o;try{let{data:m,error:h}=await t.device.code({client_id:"cueframe-cli",scope:"openid profile email"});(h||!m)&&(n.fail(`Could not start login: ${h?.message??"unknown error"}`),L(j.NetworkError)),o=m}catch(m){n.fail(`Could not start login: ${m instanceof Error?m.message:String(m)}`),L(j.NetworkError)}n.succeed("Device code issued");let i=o.verification_uri_complete??o.verification_uri;at("",r),at(` Visit: ${i}`,r),at(` Code: ${o.user_code}`,r),at("",r);try{await Vpe(i)}catch{}let s=Re("Waiting for approval in browser\u2026",r.json),c=Date.now()+o.expires_in*1e3,u=o.interval*1e3;for(;Date.now()<c;){await new Promise(m=>setTimeout(m,u));try{let{data:m,error:h}=await t.device.token({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:o.device_code,client_id:"cueframe-cli"});if(m?.access_token){let S=m.access_token;Cn(S,r.target,r.url),s.succeed(`Logged in. Token saved for target "${r.target}".`),pe(r,{ok:!0,target:r.target,apiUrl:e},()=>{});return}let g=m??h,y=g?.error;y==="authorization_pending"||(y==="slow_down"?u+=5e3:y==="access_denied"?(s.fail("Access denied in the browser."),L(j.UserError)):y==="expired_token"?(s.fail("Device code expired before approval. Run `cueframe login` again."),L(j.UserError)):y&&(s.fail(`Login failed: ${g?.error_description??y}`),L(j.ApiClientError)))}catch{}}s.fail("Timed out waiting for approval. Run `cueframe login` again."),L(j.UserError)}import{readFileSync as qpe}from"fs";var lz=new Set(["GET","POST","PUT","PATCH","DELETE"]);async function hz(r,e,t){let n=r.toUpperCase();lz.has(n)||(G(t,"api",new Error(`Unsupported method: ${r}. Allowed: ${[...lz].join(", ")}.`),j.UserError),L(j.UserError)),e.startsWith("/")||(G(t,"api",new Error(`Path must start with '/'. Got: ${e}`),j.UserError),L(j.UserError)),ae(t.target);let o=Zpe(t.header??[]),i=await Gpe(t.body,n);i!==void 0&&!o.has("content-type")&&o.set("content-type","application/json");let s;try{s=await rt(e,{method:n,headers:o,body:i})}catch(u){G(t,"api",u,J(u)),L(J(u))}Wpe(s,{include:!!t.include,json:!!t.json,method:n,path:e});let c=je(s.status);c!==j.Success&&G(t,"api",Object.assign(new Error(`${n} ${e} \u2192 ${s.status} ${s.statusText}`),{code:s.body?.error?.code,status:s.status}),c),process.exitCode=c}function Wpe(r,{include:e,json:t,method:n,path:o}){if(t){console.log(JSON.stringify({status:r.status,statusText:r.statusText,headers:r.headers,body:r.body}));return}if(e){process.stdout.write(`HTTP/1.1 ${r.status} ${r.statusText}
|
|
121
|
+
`);for(let[i,s]of Object.entries(r.headers))process.stdout.write(`${i}: ${s}
|
|
53
122
|
`);process.stdout.write(`
|
|
54
|
-
`)
|
|
55
|
-
`)?
|
|
56
|
-
`):
|
|
57
|
-
`))}function
|
|
123
|
+
`),uz(r.body,r.status>=400);return}if(r.status===204||r.body===null){console.error(`${n} ${o} \u2192 ${r.status} (no content)`);return}uz(r.body,r.status>=400)}function uz(r,e){let t=e?process.stderr:process.stdout;r!=null&&(typeof r=="string"?t.write(r.endsWith(`
|
|
124
|
+
`)?r:r+`
|
|
125
|
+
`):t.write(JSON.stringify(r,null,2)+`
|
|
126
|
+
`))}function Zpe(r){let e=new Headers;for(let t of r){let n=t.indexOf(":");n===-1&&(console.error(`Invalid --header (expected "Name: value"): ${t}`),L(j.UserError));let o=t.slice(0,n).trim(),i=t.slice(n+1).trim();e.set(o,i)}return e}async function Gpe(r,e){if(r){if(r.startsWith("@")){let t=r.slice(1);return t==="-"?mz():qpe(t,"utf-8")}return r}if(!(e==="GET"||e==="DELETE")&&!process.stdin.isTTY)return mz()}async function mz(){let r=[];for await(let e of process.stdin)r.push(Buffer.isBuffer(e)?e:Buffer.from(e));return Buffer.concat(r).toString("utf-8")}var fz=/#\/components\/schemas\/([A-Za-z0-9_]+)/g;function Kpe(r,e){let t=new Set,n=[e];for(;n.length;){let o=n.pop();if(t.has(o)||!(o in r))continue;t.add(o);let i=JSON.stringify(r[o]),s;for(fz.lastIndex=0;s=fz.exec(i);)n.push(s[1])}return t}function Jpe(r){let e=r?.paths??{};for(let t of Object.values(e))if(t?.put?.operationId==="putComposition"){let n=t.put?.requestBody?.content?.["application/json"]?.schema?.$ref,o=typeof n=="string"?n.match(/#\/components\/schemas\/(.+)$/):null;if(o)return o[1]}return null}async function gz(r,e){r!=="composition"&&(console.error(`Unknown schema '${r}'. Supported: composition.`),L(j.UserError)),bh({baseUrl:go(e.target)});let t;try{t=await rt("/v1/openapi.json",{method:"GET"})}catch(m){G(e,"schema",m,j.NetworkError),L(j.NetworkError)}if(t.status>=400){let m=je(t.status);G(e,"schema",new Error(`Failed to fetch /v1/openapi.json (${t.status})`),m),L(m)}let n=t.body,o=n?.components?.schemas??{},i=Jpe(n);(!i||!(i in o))&&(G(e,"schema",new Error("Could not locate the composition schema in openapi.json (putComposition body ref not found)."),j.ApiServerError),L(j.ApiServerError));let s=Kpe(o,i);s.delete(i);let c={};for(let m of[...s].sort())c[m]=o[m];let u={name:i,schema:o[i],referenced:c};pe(e,u,()=>{console.log(JSON.stringify(u,null,2))})}import{writeFileSync as Hpe}from"fs";import{resolve as Xpe}from"path";var xz=1800*1e3,Ype=5e3;async function Xm(r,e){we(e.projectId,"projectId",e),we(e.suggestionId,"suggestionId",e),ae(e.target),B(e,"export_prepare",{projectId:e.projectId,suggestionId:e.suggestionId,format:r,target:e.target});let t=Re(`Queuing ${r} export\u2026`,e.json),n;try{n=(await(r==="fcpxml"?Tn.createFcpxmlExport:Tn.createPremiereExport)(e.projectId,{clipSuggestionId:e.suggestionId})).id,t.succeed(`Export queued: ${n}`)}catch(u){t.fail(`Failed: ${ze(u)}`),Ce(e,"export_prepare",u,J(u)),L(J(u))}if(B(e,"export_queued",{exportId:n,projectId:e.projectId,format:r}),!e.wait){at(`Poll status with: cueframe api GET /v1/projects/${e.projectId}/exports/${n}`,e);return}let o=await Qpe(e.projectId,n,e);o.kind==="failed"&&(G(e,"export_progress",Object.assign(new Error(o.message),o.error?{details:o.error}:{}),j.ApiServerError),e.json||console.error(`Export failed: ${o.message}`),L(j.ApiServerError)),o.outputUrl||(G(e,"export_complete",new Error("Export reported complete but no outputUrl was returned."),j.ApiServerError),e.json||console.error(`Export reported complete but no outputUrl was returned.
|
|
58
127
|
Export ID: ${n}
|
|
59
|
-
Re-fetch via GET /v1/projects/${e.projectId}/exports/${n}.`),
|
|
60
|
-
Export URL (7-day TTL): ${
|
|
61
|
-
${n.name} \u2014 ${n.description}`);for(let o of n.subcommands??[])console.log(` ${n.name} ${o.name} \u2014 ${o.description}`)}}var Zr=["prod","dev","local"];function D(t){if(t===void 0)return"prod";if(Zr.includes(t))return t;console.error(`Invalid --target ${t}. Allowed: ${Zr.join(", ")}.`),m(p.UserError)}function Wr(t){if(!t)return;let e=parseInt(t,10);if(e===24||e===30||e===60)return e;console.error(`Invalid --fps ${t}. Allowed: 24, 30, 60.`),m(p.UserError)}async function Vr(){let t=new Ss;t.name("cueframe").description("AI-assisted video editing and rendering").version("0.4.3").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 e=()=>t.opts();t.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","Overwrite skills that are already installed in ~/.claude/skills").action(c=>Pt({json:e().json,target:D(c.target),dryRun:e().dryRun,force:c.force})),t.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(()=>Ut({json:e().json,dryRun:e().dryRun})),t.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((c,l)=>Qt(c,{json:e().json,dryRun:e().dryRun,force:l.force})),t.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((c,l)=>rr(c,{target:D(l.target),json:e().json})),t.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(c=>nr({target:D(c.target),json:e().json}));let n=t.command("keys").description("Manage API keys. `keys create` mints a scoped key \u2014 run `cueframe login` first (keys cannot mint keys).");n.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(c=>sr({...c,target:D(c.target),json:e().json})),n.command("list").description("List your API keys.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(c=>ir({target:D(c.target),json:e().json})),n.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((c,l)=>ar(c,{target:D(l.target),json:e().json})),t.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(c=>jr({...c,target:D(c.target),json:e().json})),t.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((c,l)=>{let S=D(l.target);qe(c,S,l.url),e().json?console.log(JSON.stringify({ok:!0,target:S},null,2)):console.log(`API key saved for target "${S}"`)}),t.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(c=>cr({target:D(c.target),limit:parseInt(c.limit),json:e().json}));let o=t.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), 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("--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(c=>xr({name:c.name,target:D(c.target),aspect:c.aspect,fps:Wr(c.fps),resolution:c.resolution,fromSuggestion:c.fromSuggestion,cheap:c.cheap,json:e().json,dryRun:e().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), dev, local").action((c,l)=>wr(c,{target:D(l.target),json:e().json})),t.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((c,l)=>kr(c,{target:D(l.target),json:e().json})),t.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((c,l)=>fr(c,{target:D(l.target),analyze:l.analyze,audioRole:l.audioRole,json:e().json,dryRun:e().dryRun})),t.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((c,l)=>Ot(c,{target:D(l.target),wait:l.wait,json:e().json,dryRun:e().dryRun})),t.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((c,l)=>pr(c,{target:D(l.target),json:e().json}));let i=t.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((c,l)=>Cr(c,{target:l.target,aspect:l.aspect,fps:Wr(l.fps),resolution:l.resolution,out:l.out,json:e().json,dryRun:e().dryRun,...l.idempotencyKey?{idempotencyKey:l.idempotencyKey}:{},...l.priority?{priority:l.priority}:{},...l.intent?{intent:l.intent}:{}}));t.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((c,l,S)=>Or(c,l,{target:S.target,body:S.body,header:S.header,include:S.include,json:e().json})),t.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((c,l)=>Ir(c,{target:l.target,json:e().json}));let a=t.command("composition").description("Read/write a project's composition. ETag is threaded automatically.");a.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(c=>yr({target:c.target,body:c.body,json:e().json})),a.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((c,l)=>gr(c,{target:l.target,json:e().json})),a.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((c,l)=>hr(c,{target:l.target,body:l.body,ifMatch:l.ifMatch,force:l.force,json:e().json})),a.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((c,l)=>ct(c,{target:l.target,suggestionId:l.suggestion,format:l.format,ifMatch:l.ifMatch,force:l.force,json:e().json})),i.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((c,l,S)=>{let I=S?.parent?.opts?.()?.target??l.target;return Er(c,{target:I,project:l.project,out:l.out,download:l.download!==!1,json:e().json})});let u=t.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), 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((c,l)=>kt("fcpxml",{target:l.target,projectId:c,suggestionId:l.suggestion,out:l.out,wait:l.wait,json:e().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), 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((c,l)=>kt("premiere",{target:l.target,projectId:c,suggestionId:l.suggestion,out:l.out,wait:l.wait,json:e().json}));let d=t.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(c=>Mr({target:c.target,json:e().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((c,l)=>Ur(c,{target:l.target,json:e().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(c=>Fr({target:c.target,name:c.name,files:c.file,json:e().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((c,l)=>Dr(c,{target:l.target,json:e().json})),t.command("describe").description("Print the CLI command tree as structured JSON (agent introspection)").action(()=>zr(t,{json:e().json}));try{await t.parseAsync()}catch(c){let l=_(c);x(e(),"cli",Object.assign(new Error(O(c)),{code:c?.code,status:c?.status}),l),m(l)}}await Vr();
|
|
128
|
+
Re-fetch via GET /v1/projects/${e.projectId}/exports/${n}.`),L(j.ApiServerError));let s=e.out??`./export-${n.slice(0,8)}.zip`,c=await ede(o.outputUrl,s,e.json);B(e,"export_complete",{exportId:n,projectId:e.projectId,format:r,outputUrl:o.outputUrl,outputExpiresAt:o.outputExpiresAt,outputSizeBytes:o.outputSizeBytes,trimCacheHit:o.trimCacheHit,outputPath:c})}async function Qpe(r,e,t){let n=Date.now()+(t.timeoutMs??xz),o=t.pollIntervalMs??Ype,i=Date.now(),s=Re("Exporting\u2026",t.json);try{for(;Date.now()<n;){let c;try{c=await Tn.getExport(r,e)}catch(h){if(h instanceof We&&h.status>=500){await yz(o);continue}throw s.fail(`Failed to poll: ${ze(h)}`),h}let u=Math.round((Date.now()-i)/1e3),m=Math.round((c.progress??0)*100);if(s.text=`Exporting\u2026 ${c.status}${m>0?` \xB7 ${m}%`:""} (${u}s)`,B(t,"export_progress",{exportId:e,status:c.status,progress:c.progress,elapsedSec:u}),c.status==="complete")return s.succeed(`Export complete (${u}s)`),{kind:"complete",outputUrl:c.outputUrl??null,outputExpiresAt:c.outputExpiresAt??null,outputSizeBytes:c.outputSizeBytes??null,trimCacheHit:c.trimCacheHit??null};if(c.status==="error"||c.status==="cancelled"){let h=c.error?.message??`Export ${c.status}`;return s.fail(h),{kind:"failed",message:h,error:c.error?{phase:c.error.phase,retryable:!!c.error.retryable}:null}}await yz(o)}return s.fail(`Timed out waiting for export (${Math.round((Date.now()-i)/1e3)}s)`),{kind:"failed",message:`Timed out after ${Math.round((t.timeoutMs??xz)/1e3)}s`,error:null}}catch(c){G(t,"export_progress",c,J(c)),L(J(c))}}async function ede(r,e,t){let n=Xpe(e),o=Re(`Downloading \u2192 ${n}\u2026`,t);try{let i=await fetch(r);if(!i.ok)throw new Error(`HTTP ${i.status}`);let s=Buffer.from(await i.arrayBuffer());return Hpe(n,s),o.succeed(`Saved: ${n} (${(s.length/1024/1024).toFixed(1)} MB)`),n}catch(i){o.fail(`Download failed: ${ze(i)}`),t||console.error(`
|
|
129
|
+
Export URL (7-day TTL): ${r}`),L(j.NetworkError)}}function yz(r){return new Promise(e=>setTimeout(e,r))}async function bz(r){ae(r.target),B(r,"sessions_list_prepare",{});try{let e=await yr.listSessions();B(r,"sessions_list_complete",{count:e.data.length}),pe(r,e,()=>{if(e.data.length===0){console.log("No sessions yet. Create one with `cueframe sessions create --name <n> --files <mediaId:role> \u2026`");return}for(let t of e.data){let n=t.muxStatus??"pending";console.log(`${t.id} ${t.fileCount} files mux:${n} ${t.name}`)}e.pagination.hasMore&&console.log(`# more \u2014 pass --after ${e.pagination.nextCursor} (raw via \`cueframe api\`)`)})}catch(e){G(r,"sessions_list",e,J(e)),L(J(e))}}async function Sz(r,e){we(r,"sessionId",e),ae(e.target),B(e,"sessions_get_prepare",{sessionId:r});try{let t=await yr.getSession(r);B(e,"sessions_get_complete",{sessionId:r}),pe(e,t,()=>{console.log(JSON.stringify(t,null,2))})}catch(t){G(e,"sessions_get",t,J(t)),L(J(t))}}async function zz(r){r.name||(console.error("--name is required"),L(j.UserError)),(!r.files||r.files.length===0)&&(console.error("At least one --file <mediaId:role> is required"),L(j.UserError));let e=r.files.map((t,n)=>{let o=t.indexOf(":");return o===-1&&(console.error(`--file[${n}] must be <mediaId>:<role>. Got: ${t}`),L(j.UserError)),{mediaId:t.slice(0,o).trim(),role:t.slice(o+1).trim()}});ae(r.target),B(r,"sessions_create_prepare",{name:r.name,fileCount:e.length});try{let t=await yr.createSession({name:r.name,files:e});B(r,"sessions_create_complete",{sessionId:t.id}),pe(r,t,()=>{console.log(`Session created: ${t.id}`),console.log(JSON.stringify(t,null,2))})}catch(t){G(r,"sessions_create",t,J(t)),L(J(t))}}async function vz(r,e){we(r,"sessionId",e),ae(e.target),B(e,"sessions_delete_prepare",{sessionId:r});try{await yr.deleteSession(r),B(e,"sessions_delete_complete",{sessionId:r}),pe(e,{ok:!0,sessionId:r},()=>{console.log(`Session ${r} deleted.`)})}catch(t){G(e,"sessions_delete",t,J(t)),L(J(t))}}function wz(r){let e=r.commands.map(wz);return{name:r.name(),description:r.description(),arguments:r.registeredArguments.map(t=>({name:t.name(),required:t.required,description:t.description})),options:r.options.map(t=>({flags:t.flags,description:t.description,...t.defaultValue!==void 0?{default:t.defaultValue}:{}})),...e.length>0?{subcommands:e}:{}}}function Iz(r,e){let t=r.commands.map(wz);if(e.json){B(e,"describe_complete",{name:r.name(),version:r.version()??null,commands:t});return}console.log(`${r.name()} ${r.version()??""}`.trim());for(let n of t){console.log(`
|
|
130
|
+
${n.name} \u2014 ${n.description}`);for(let o of n.subcommands??[])console.log(` ${n.name} ${o.name} \u2014 ${o.description}`)}}var kz=["prod","dev","local"];function Fe(r){if(r===void 0)return"prod";if(kz.includes(r))return r;console.error(`Invalid --target ${r}. Allowed: ${kz.join(", ")}.`),L(j.UserError)}function Pz(r){if(!r)return;let e=parseInt(r,10);if(e===24||e===25||e===30||e===60)return e;console.error(`Invalid --fps ${r}. Allowed: 24, 25, 30, 60.`),L(j.UserError)}async function $z(){let r=new tde;r.name("cueframe").description("AI-assisted video editing and rendering").version("0.4.5").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 e=()=>r.opts();r.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(g=>Lh({json:e().json,target:Fe(g.target),dryRun:e().dryRun,force:g.force})),r.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(()=>Nh({json:e().json,dryRun:e().dryRun})),r.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((g,y)=>hb(g,{json:e().json,dryRun:e().dryRun,force:y.force})),r.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((g,y)=>yb(g,{target:Fe(y.target),json:e().json})),r.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(g=>bb({target:Fe(g.target),json:e().json}));let n=r.command("keys").description("Manage API keys. `keys create` mints a scoped key \u2014 run `cueframe login` first (keys cannot mint keys).");n.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(g=>zb({...g,target:Fe(g.target),json:e().json})),n.command("list").description("List your API keys.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>vb({target:Fe(g.target),json:e().json})),n.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((g,y)=>wb(g,{target:Fe(y.target),json:e().json})),r.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(g=>dz({...g,target:Fe(g.target),json:e().json})),r.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((g,y)=>{let S=Fe(y.target);Ph(g),Cn(g,S,y.url),e().json?console.log(JSON.stringify({ok:!0,target:S},null,2)):console.log(`API key saved for target "${S}"`)}),r.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(g=>Ib({target:Fe(g.target),limit:parseInt(g.limit),json:e().json}));let o=r.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), 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 g=>{await Gs({name:g.name,target:Fe(g.target),aspect:g.aspect,fps:Pz(g.fps),resolution:g.resolution,brandKitId:g.brandKit,fromSuggestion:g.fromSuggestion,cheap:g.cheap,json:e().json,dryRun:e().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), dev, local").action((g,y)=>Eb(g,{target:Fe(y.target),json:e().json})),r.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((g,y)=>Db(g,{target:Fe(y.target),json:e().json})),r.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(g,y)=>{await Bs(g,{target:Fe(y.target),analyze:y.analyze,audioRole:y.audioRole,json:e().json,dryRun:e().dryRun})}),r.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((g,y)=>$h(g,{target:Fe(y.target),wait:y.wait,json:e().json,dryRun:e().dryRun})),r.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((g,y)=>Cb(g,{target:Fe(y.target),json:e().json}));let s=r.command("recipe").description("Package or run a portable CueFrame recipe");s.command("pack").description("Validate, pin authored source, and package a recipe offline. No login, upload, compilation, or rendering.").requiredOption("-b, --body <json|@file|@->","Version-1 packaging input: project draft and bundled component sources; @- reads stdin").requiredOption("-o, --out <path>","Generated .cueframe project path (replaced on success)").option("--check","Check that the output is current without writing it").action(async g=>{await pz({...g,json:e().json,dryRun:e().dryRun})}),s.command("run").description("Upload the source, create the recipe project, validate it, and render it").argument("[recipe]","Recipe slug from cueframe-ai/cueframe-recipes, local .cueframe template, or legacy directory",".").requiredOption("-m, --media <path>","Source media file for the recipe").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output MP4 path","./recipe-output.mp4").option("--no-render","Create the editable project without rendering it").action(async(g,y)=>{await Fb({directory:g,media:y.media,out:y.out,target:Fe(y.target),render:y.render!==!1,json:e().json,dryRun:e().dryRun})});let c=r.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(g,y)=>{await Ks(g,{target:y.target,aspect:y.aspect,fps:Pz(y.fps),resolution:y.resolution,out:y.out,json:e().json,dryRun:e().dryRun,...y.idempotencyKey?{idempotencyKey:y.idempotencyKey}:{},...y.priority?{priority:y.priority}:{},...y.intent?{intent:y.intent}:{}})});r.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((g,y,S)=>hz(g,y,{target:S.target,body:S.body,header:S.header,include:S.include,json:e().json})),r.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((g,y)=>gz(g,{target:y.target,json:e().json}));let u=r.command("composition").description("Read/write a project's composition. ETag is threaded automatically.");u.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 g=>{await Zs({target:g.target,body:g.body,json:e().json})}),u.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((g,y)=>Ob(g,{target:y.target,json:e().json})),u.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(g,y)=>{await qs(g,{target:y.target,body:y.body,ifMatch:y.ifMatch,force:y.force,json:e().json})}),u.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((g,y)=>Ws(g,{target:y.target,suggestionId:y.suggestion,format:y.format,ifMatch:y.ifMatch,force:y.force,json:e().json})),c.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((g,y,S)=>{let w=S?.parent?.opts?.()?.target??y.target;return _b(g,{target:w,project:y.project,out:y.out,download:y.download!==!1,json:e().json})});let m=r.command("export").description("Hand the timeline off to a real NLE (Final Cut Pro / Premiere Pro)");m.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((g,y)=>Xm("fcpxml",{target:y.target,projectId:g,suggestionId:y.suggestion,out:y.out,wait:y.wait,json:e().json})),m.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((g,y)=>Xm("premiere",{target:y.target,projectId:g,suggestionId:y.suggestion,out:y.out,wait:y.wait,json:e().json}));let h=r.command("sessions").description("Multi-file ingest sessions (camera A/B/screen \u2192 muxed composition)");h.command("list").description("List sessions in this org").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>bz({target:g.target,json:e().json})),h.command("get").description("Get a single session by ID").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>Sz(g,{target:y.target,json:e().json})),h.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(g=>zz({target:g.target,name:g.name,files:g.file,json:e().json})),h.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((g,y)=>vz(g,{target:y.target,json:e().json})),r.command("describe").description("Print the CLI command tree as structured JSON (agent introspection)").action(()=>Iz(r,{json:e().json}));try{await r.parseAsync()}catch(g){let y=J(g);G(e(),"cli",Object.assign(new Error(ze(g)),{code:g?.code,status:g?.status}),y),L(y)}}await $z();
|