litedbmodel-gen 0.5.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-SEGVTWSK.js +44 -0
- package/dist/cli.js +7367 -14
- package/dist/cli.js.map +1 -1
- package/dist/{dsl-4DLYIQ4T.js → dsl-4XI72SJ5.js} +8 -6
- package/dist/dsl-4XI72SJ5.js.map +1 -0
- package/dist/index.js +44869 -13
- package/dist/index.js.map +1 -1
- package/dist/litedbmodel-gen.bundle.mjs +1704 -0
- package/dist/litedbmodel-gen.bundle.mjs.map +7 -0
- package/package.json +15 -10
- package/dist/chunk-2H7UOFLK.js +0 -11
- package/dist/dsl-4DLYIQ4T.js.map +0 -1
- /package/dist/{chunk-2H7UOFLK.js.map → chunk-SEGVTWSK.js.map} +0 -0
|
@@ -0,0 +1,1704 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
var ak=Object.create;var ts=Object.defineProperty;var sk=Object.getOwnPropertyDescriptor;var ck=Object.getOwnPropertyNames;var lk=Object.getPrototypeOf,uk=Object.prototype.hasOwnProperty;var Ue=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var S=(e,t)=>()=>(e&&(t=e(e=0)),t);var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oe=(e,t)=>{for(var r in t)ts(e,r,{get:t[r],enumerable:!0})},dk=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ck(t))!uk.call(e,n)&&n!==r&&ts(e,n,{get:()=>t[n],enumerable:!(i=sk(t,n))||i.enumerable});return e};var Xm=(e,t,r)=>(r=e!=null?ak(lk(e)):{},dk(t||!e||!e.__esModule?ts(r,"default",{value:e,enumerable:!0}):r,e));var Pn=E(vs=>{var ni=class extends Error{constructor(t,r,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},gs=class extends ni{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};vs.CommanderError=ni;vs.InvalidArgumentError=gs});var ri=E(bs=>{var{InvalidArgumentError:P0}=Pn(),ys=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new P0(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,i):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function z0(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}bs.Argument=ys;bs.humanReadableArgName=z0});var xs=E($s=>{var{humanReadableArgName:N0}=ri(),_s=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden),i=t._getHelpCommand();return i&&!i._hidden&&r.push(i),this.sortSubcommands&&r.sort((n,o)=>n.name().localeCompare(o.name())),r}compareOptions(t,r){let i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(t).localeCompare(i(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),i=t._getHelpOption();if(i&&!i.hidden){let n=i.short&&t._findOption(i.short),o=i.long&&t._findOption(i.long);!n&&!o?r.push(i):i.long&&!o?r.push(t.createOption(i.long,i.description)):i.short&&!n&&r.push(t.createOption(i.short,i.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let i=t.parent;i;i=i.parent){let n=i.options.filter(o=>!o.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(i=>N0(i)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let i="";for(let n=t.parent;n;n=n.parent)i=n.name()+" "+i;return i+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0){let i=`(${r.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let i=`(${r.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}formatItemList(t,r,i){return r.length===0?[]:[i.styleTitle(t),...r,""]}groupItems(t,r,i){let n=new Map;return t.forEach(o=>{let a=i(o);n.has(a)||n.set(a,[])}),r.forEach(o=>{let a=i(o);n.has(a)||n.set(a,[]),n.get(a).push(o)}),n}formatHelp(t,r){let i=r.padWidth(t,r),n=r.helpWidth??80;function o(d,f){return r.formatItem(d,i,f,r)}let a=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],s=r.commandDescription(t);s.length>0&&(a=a.concat([r.boxWrap(r.styleCommandDescription(s),n),""]));let c=r.visibleArguments(t).map(d=>o(r.styleArgumentTerm(r.argumentTerm(d)),r.styleArgumentDescription(r.argumentDescription(d))));if(a=a.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(t.options,r.visibleOptions(t),d=>d.helpGroupHeading??"Options:").forEach((d,f)=>{let p=d.map(g=>o(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));a=a.concat(this.formatItemList(f,p,r))}),r.showGlobalOptions){let d=r.visibleGlobalOptions(t).map(f=>o(r.styleOptionTerm(r.optionTerm(f)),r.styleOptionDescription(r.optionDescription(f))));a=a.concat(this.formatItemList("Global Options:",d,r))}return this.groupItems(t.commands,r.visibleCommands(t),d=>d.helpGroup()||"Commands:").forEach((d,f)=>{let p=d.map(g=>o(r.styleSubcommandTerm(r.subcommandTerm(g)),r.styleSubcommandDescription(r.subcommandDescription(g))));a=a.concat(this.formatItemList(f,p,r))}),a.join(`
|
|
5
|
+
`)}displayWidth(t){return ng(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,i,n){let a=" ".repeat(2);if(!i)return a+t;let s=t.padEnd(r+t.length-n.displayWidth(t)),c=2,u=(this.helpWidth??80)-r-c-2,d;return u<this.minWidthToWrap||n.preformatted(i)?d=i:d=n.boxWrap(i,u).replace(/\n/g,`
|
|
6
|
+
`+" ".repeat(r+c)),a+s+" ".repeat(c)+d.replace(/\n/g,`
|
|
7
|
+
${a}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let i=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,o=[];return i.forEach(a=>{let s=a.match(n);if(s===null){o.push("");return}let c=[s.shift()],l=this.displayWidth(c[0]);s.forEach(u=>{let d=this.displayWidth(u);if(l+d<=r){c.push(u),l+=d;return}o.push(c.join(""));let f=u.trimStart();c=[f],l=this.displayWidth(f)}),o.push(c.join(""))}),o.join(`
|
|
8
|
+
`)}};function ng(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}$s.Help=_s;$s.stripColor=ng});var Is=E(Ss=>{var{InvalidArgumentError:C0}=Pn(),ws=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let i=j0(t);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new C0(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,i):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?rg(this.name().replace(/^no-/,"")):rg(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ks=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(t,r){let i=r.attributeName();if(!this.dualOptions.has(i))return!0;let n=this.negativeOptions.get(i).presetArg,o=n!==void 0?n:!1;return r.negate===(o===t)}};function rg(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function j0(e){let t,r,i=/^-[^-]$/,n=/^--[^-]/,o=e.split(/[ |,]+/).concat("guard");if(i.test(o[0])&&(t=o.shift()),n.test(o[0])&&(r=o.shift()),!t&&i.test(o[0])&&(t=o.shift()),!t&&n.test(o[0])&&(t=r,r=o.shift()),o[0].startsWith("-")){let a=o[0],s=`option creation failed due to '${a}' in option flags '${e}'`;throw/^-[^-][^-]/.test(a)?new Error(`${s}
|
|
9
|
+
- a short flag is a single dash and a single character
|
|
10
|
+
- either use a single dash and a single character (for a short flag)
|
|
11
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):i.test(a)?new Error(`${s}
|
|
12
|
+
- too many short flags`):n.test(a)?new Error(`${s}
|
|
13
|
+
- too many long flags`):new Error(`${s}
|
|
14
|
+
- unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}Ss.Option=ws;Ss.DualOptions=ks});var og=E(ig=>{function D0(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let i=0;i<=e.length;i++)r[i]=[i];for(let i=0;i<=t.length;i++)r[0][i]=i;for(let i=1;i<=t.length;i++)for(let n=1;n<=e.length;n++){let o=1;e[n-1]===t[i-1]?o=0:o=1,r[n][i]=Math.min(r[n-1][i]+1,r[n][i-1]+1,r[n-1][i-1]+o),n>1&&i>1&&e[n-1]===t[i-2]&&e[n-2]===t[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+1))}return r[e.length][t.length]}function U0(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(a=>a.slice(2)));let i=[],n=3,o=.4;return t.forEach(a=>{if(a.length<=1)return;let s=D0(e,a),c=Math.max(e.length,a.length);(c-s)/c>o&&(s<n?(n=s,i=[a]):s===n&&i.push(a))}),i.sort((a,s)=>a.localeCompare(s)),r&&(i=i.map(a=>`--${a}`)),i.length>1?`
|
|
15
|
+
(Did you mean one of ${i.join(", ")}?)`:i.length===1?`
|
|
16
|
+
(Did you mean ${i[0]}?)`:""}ig.suggestSimilar=U0});var lg=E(Ps=>{var L0=Ue("node:events").EventEmitter,Os=Ue("node:child_process"),Re=Ue("node:path"),ii=Ue("node:fs"),V=Ue("node:process"),{Argument:R0,humanReadableArgName:M0}=ri(),{CommanderError:As}=Pn(),{Help:F0,stripColor:Z0}=xs(),{Option:ag,DualOptions:q0}=Is(),{suggestSimilar:sg}=og(),Es=class e extends L0{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>V.stdout.write(r),writeErr:r=>V.stderr.write(r),outputError:(r,i)=>i(r),getOutHelpWidth:()=>V.stdout.isTTY?V.stdout.columns:void 0,getErrHelpWidth:()=>V.stderr.isTTY?V.stderr.columns:void 0,getOutHasColors:()=>Ts()??(V.stdout.isTTY&&V.stdout.hasColors?.()),getErrHasColors:()=>Ts()??(V.stderr.isTTY&&V.stderr.hasColors?.()),stripColor:r=>Z0(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,i){let n=r,o=i;typeof n=="object"&&n!==null&&(o=n,n=null),o=o||{};let[,a,s]=t.match(/([^ ]+) *(.*)/),c=this.createCommand(a);return n&&(c.description(n),c._executableHandler=!0),o.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(o.noHelp||o.hidden),c._executableFile=o.executableFile||null,s&&c.arguments(s),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),n?this:c}createCommand(t){return new e(t)}createHelp(){return Object.assign(new F0,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
17
|
+
- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new R0(t,r)}argument(t,r,i,n){let o=this.createArgument(t,r);return typeof i=="function"?o.default(n).argParser(i):o.default(i),this.addArgument(o),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=t??"help [command]",[,n,o]=i.match(/([^ ]+) *(.*)/),a=r??"display help for command",s=this.createCommand(n);return s.helpOption(!1),o&&s.arguments(o),a&&s.description(a),this._addImplicitHelpCommand=!0,this._helpCommand=s,(t||r)&&this._initCommandGroup(s),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let i=["preSubcommand","preAction","postAction"];if(!i.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
|
|
18
|
+
Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,i){this._exitCallback&&this._exitCallback(new As(t,r,i)),V.exit(t)}action(t){let r=i=>{let n=this.registeredArguments.length,o=i.slice(0,n);return this._storeOptionsAsProperties?o[n]=this:o[n]=this.opts(),o.push(this),t.apply(this,o)};return this._actionHandler=r,this}createOption(t,r){return new ag(t,r)}_callParseArg(t,r,i,n){try{return t.parseArg(r,i)}catch(o){if(o.code==="commander.invalidArgument"){let a=`${n} ${o.message}`;this.error(a,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let i=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
|
|
19
|
+
- already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),i=r(t).find(n=>this._findCommand(n));if(i){let n=r(this._findCommand(i)).join("|"),o=r(t).join("|");throw new Error(`cannot add command '${o}' as already have command '${n}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),i=t.attributeName();if(t.negate){let o=t.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(i,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(i,t.defaultValue,"default");let n=(o,a,s)=>{o==null&&t.presetArg!==void 0&&(o=t.presetArg);let c=this.getOptionValue(i);o!==null&&t.parseArg?o=this._callParseArg(t,o,c,a):o!==null&&t.variadic&&(o=t._collectValue(o,c)),o==null&&(t.negate?o=!1:t.isBoolean()||t.optional?o=!0:o=""),this.setOptionValueWithSource(i,o,s)};return this.on("option:"+r,o=>{let a=`error: option '${t.flags}' argument '${o}' is invalid.`;n(o,a,"cli")}),t.envVar&&this.on("optionEnv:"+r,o=>{let a=`error: option '${t.flags}' value '${o}' from env '${t.envVar}' is invalid.`;n(o,a,"env")}),this}_optionEx(t,r,i,n,o){if(typeof r=="object"&&r instanceof ag)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(r,i);if(a.makeOptionMandatory(!!t.mandatory),typeof n=="function")a.default(o).argParser(n);else if(n instanceof RegExp){let s=n;n=(c,l)=>{let u=s.exec(c);return u?u[0]:l},a.default(o).argParser(n)}else a.default(n);return this.addOption(a)}option(t,r,i,n){return this._optionEx({},t,r,i,n)}requiredOption(t,r,i,n){return this._optionEx({mandatory:!0},t,r,i,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,i){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=i,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(t)!==void 0&&(r=i.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){V.versions?.electron&&(r.from="electron");let n=V.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=V.argv),this.rawArgs=t.slice();let i;switch(r.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2);break;case"electron":V.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break;case"eval":i=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(t,r){this._prepareForParse();let i=this._prepareUserArgs(t,r);return this._parseCommand([],i),this}async parseAsync(t,r){this._prepareForParse();let i=this._prepareUserArgs(t,r);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
20
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,i){if(ii.existsSync(t))return;let n=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${t}' does not exist
|
|
21
|
+
- if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
22
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
23
|
+
- ${n}`;throw new Error(o)}_executeSubCommand(t,r){r=r.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function o(u,d){let f=Re.resolve(u,d);if(ii.existsSync(f))return f;if(n.includes(Re.extname(d)))return;let p=n.find(g=>ii.existsSync(`${f}${g}`));if(p)return`${f}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=t._executableFile||`${this._name}-${t._name}`,s=this._executableDir||"";if(this._scriptPath){let u;try{u=ii.realpathSync(this._scriptPath)}catch{u=this._scriptPath}s=Re.resolve(Re.dirname(u),s)}if(s){let u=o(s,a);if(!u&&!t._executableFile&&this._scriptPath){let d=Re.basename(this._scriptPath,Re.extname(this._scriptPath));d!==this._name&&(u=o(s,`${d}-${t._name}`))}a=u||a}i=n.includes(Re.extname(a));let c;V.platform!=="win32"?i?(r.unshift(a),r=cg(V.execArgv).concat(r),c=Os.spawn(V.argv[0],r,{stdio:"inherit"})):c=Os.spawn(a,r,{stdio:"inherit"}):(this._checkForMissingExecutable(a,s,t._name),r.unshift(a),r=cg(V.execArgv).concat(r),c=Os.spawn(V.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{V.on(d,()=>{c.killed===!1&&c.exitCode===null&&c.kill(d)})});let l=this._exitCallback;c.on("close",u=>{u=u??1,l?l(new As(u,"commander.executeSubCommandAsync","(close)")):V.exit(u)}),c.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(a,s,t._name);else if(u.code==="EACCES")throw new Error(`'${a}' not executable`);if(!l)V.exit(1);else{let d=new As(1,"commander.executeSubCommandAsync","(error)");d.nestedError=u,l(d)}}),this.runningCommand=c}_dispatchSubcommand(t,r,i){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,n,"preSubcommand"),o=this._chainOrCall(o,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(i));else return n._parseCommand(r,i)}),o}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(i,n,o)=>{let a=n;if(n!==null&&i.parseArg){let s=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;a=this._callParseArg(i,n,o,s)}return a};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((i,n)=>{let o=i.defaultValue;i.variadic?n<this.args.length?(o=this.args.slice(n),i.parseArg&&(o=o.reduce((a,s)=>t(i,s,a),i.defaultValue))):o===void 0&&(o=[]):n<this.args.length&&(o=this.args[n],i.parseArg&&(o=t(i,o,i.defaultValue))),r[n]=o}),this.processedArgs=r}_chainOrCall(t,r){return t?.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let i=t,n=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(a=>{n.push({hookedCommand:o,callback:a})})}),r==="postAction"&&n.reverse(),n.forEach(o=>{i=this._chainOrCall(i,()=>o.callback(o.hookedCommand,this))}),i}_chainOrCallSubCommandHook(t,r,i){let n=t;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(o=>{n=this._chainOrCall(n,()=>o(this,r))}),n}_parseCommand(t,r){let i=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(i.operands),r=i.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(o,t,r)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent?.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=t.find(o=>i.conflictsWith.includes(o.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],i=[],n=r;function o(u){return u.length>1&&u[0]==="-"}let a=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(d=>d.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,s=null,c=null,l=0;for(;l<t.length||c;){let u=c??t[l++];if(c=null,u==="--"){n===i&&n.push(u),n.push(...t.slice(l));break}if(s&&(!o(u)||a(u))){this.emit(`option:${s.name()}`,u);continue}if(s=null,o(u)){let d=this._findOption(u);if(d){if(d.required){let f=t[l++];f===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,f)}else if(d.optional){let f=null;l<t.length&&(!o(t[l])||a(t[l]))&&(f=t[l++]),this.emit(`option:${d.name()}`,f)}else this.emit(`option:${d.name()}`);s=d.variadic?d:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let d=this._findOption(`-${u[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,u.slice(2)):(this.emit(`option:${d.name()}`),c=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let d=u.indexOf("="),f=this._findOption(u.slice(0,d));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,u.slice(d+1));continue}}if(n===r&&o(u)&&!(this.commands.length===0&&a(u))&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(u)){r.push(u),i.push(...t.slice(l));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u,...t.slice(l));break}else if(this._defaultCommandName){i.push(u,...t.slice(l));break}}if(this._passThroughOptions){n.push(u,...t.slice(l));break}n.push(u)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let i=0;i<r;i++){let n=this.options[i].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
|
|
24
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
25
|
+
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
26
|
+
`),this.outputHelp({error:!0}));let i=r||{},n=i.exitCode||1,o=i.code||"commander.error";this._exit(n,o,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in V.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,V.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new q0(this.options),r=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&r(i.attributeName())&&t.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let i=a=>{let s=a.attributeName(),c=this.getOptionValue(s),l=this.options.find(d=>d.negate&&s===d.attributeName()),u=this.options.find(d=>!d.negate&&s===d.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:u||a},n=a=>{let s=i(a),c=s.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${s.envVar}'`:`option '${s.flags}'`},o=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],o=this;do{let a=o.createHelp().visibleOptions(o).filter(s=>s.long).map(s=>s.long);n=n.concat(a),o=o.parent}while(o&&!o._enablePositionalOptions);r=sg(t,n)}let i=`error: unknown option '${t}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,i=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${i} but got ${t.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(o=>{n.push(o.name()),o.alias()&&n.push(o.alias())}),r=sg(t,n)}let i=`error: unknown command '${t}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(t,r,i){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",i=i||"output the version number";let n=this.createOption(r,i);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
|
|
27
|
+
`),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(t);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(i=>M0(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=Re.basename(t,Re.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),i=this._getOutputContext(t);r.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let n=r.formatHelp(this,r);return i.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,i,n,o;return r?(i=s=>this._outputConfiguration.writeErr(s),n=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(i=s=>this._outputConfiguration.writeOut(s),n=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:s=>(n||(s=this._outputConfiguration.stripColor(s)),i(s)),hasColors:n,helpWidth:o}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let i=this._getOutputContext(t),n={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let o=this.helpInformation({error:i.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(V.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let i=["beforeAll","before","after","afterAll"];if(!i.includes(t))throw new Error(`Unexpected value for position to addHelpText.
|
|
28
|
+
Expecting one of '${i.join("', '")}'`);let n=`${t}Help`;return this.on(n,o=>{let a;typeof r=="function"?a=r({error:o.error,command:o.command}):a=r,a&&o.write(`${a}
|
|
29
|
+
`)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function cg(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,i="127.0.0.1",n="9229",o;return(o=t.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?n=o[3]:i=o[3]):(o=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],i=o[3],n=o[4]),r&&n!=="0"?`${r}=${i}:${parseInt(n)+1}`:t})}function Ts(){if(V.env.NO_COLOR||V.env.FORCE_COLOR==="0"||V.env.FORCE_COLOR==="false")return!1;if(V.env.FORCE_COLOR||V.env.CLICOLOR_FORCE!==void 0)return!0}Ps.Command=Es;Ps.useColor=Ts});var pg=E(we=>{var{Argument:ug}=ri(),{Command:zs}=lg(),{CommanderError:V0,InvalidArgumentError:dg}=Pn(),{Help:B0}=xs(),{Option:fg}=Is();we.program=new zs;we.createCommand=e=>new zs(e);we.createOption=(e,t)=>new fg(e,t);we.createArgument=(e,t)=>new ug(e,t);we.Command=zs;we.Option=fg;we.Argument=ug;we.Help=B0;we.CommanderError=V0;we.InvalidArgumentError=dg;we.InvalidOptionArgumentError=dg});var $g={};oe($g,{MockAdapter:()=>K0});var K0,xg=S(()=>{K0=class{responses;defaultLatencyMs;constructor(e){this.responses=e?.responses??{},this.defaultLatencyMs=e?.defaultLatencyMs??0}async send(e,t){let i=e.match(/## Task: (\S+)/)?.[1]??"unknown",o=e.match(/## User Request\n\n([\s\S]*?)(?:\n\n---|$)/)?.[1]?.trim()??"";this.defaultLatencyMs>0&&await new Promise(s=>setTimeout(s,this.defaultLatencyMs));let a=this.responses[i];return a?a(o):`Task "${i}" completed but no structured output available.`}}});var kg={};oe(kg,{CursorSdkAdapter:()=>G0});function J0(e){return{beforeShellExecution:t=>{let r=e.beforeShellExecution(t);return Ns(r,"beforeShellExecution",t.command)},preToolUse:t=>{let r=e.preToolUse(t),i=t.tool_input?.file_path??t.tool_input?.path??t.tool_name;return Ns(r,"preToolUse",i)},afterFileEdit:t=>{let r=e.afterFileEdit(t);return Ns(r,"afterFileEdit",t.file_path)}}}function Ns(e,t,r){return e.permission==="deny"?(process.stderr.write(`[guardrail:deny] ${t}: ${r??"(unknown)"} \u2014 ${e.user_message??"no reason"}
|
|
30
|
+
`),{permissionDecision:"deny",userMessage:e.user_message,agentMessage:e.agent_message}):e.additionalContext?{additionalContext:e.additionalContext}:{}}var G0,Sg=S(()=>{G0=class wg{agent;constructor(t){this.agent=t}async collectStream(t){let r="";for await(let i of t.stream())if(i.type==="assistant"&&i.message?.content)for(let n of i.message.content)n.type==="text"&&n.text&&(r+=n.text);return r}async send(t,r){let i=await this.agent.send(t);return this.collectStream(i)}async followUp(t){let r=await this.agent.send(t);return this.collectStream(r)}static async create(t){let{Agent:r}=await import("@cursor/sdk"),i={model:{id:t.model??"composer-2"},local:{cwd:t.cwd??process.cwd()}};t.apiKey&&(i.apiKey=t.apiKey),t.guardrailHooks&&Object.assign(i,J0(t.guardrailHooks));let n=await r.create(i);return new wg(n)}}});var Og={};oe(Og,{ClaudeAgentSdkAdapter:()=>H0});function W0(e){return{PreToolUse:[{hooks:[r=>{let i=r.tool_input,n=r.tool_name;if(n==="Bash"||n==="Shell"){let a=i?.command??i?.input;if(a){let s=e.beforeShellExecution({command:a});if(s.permission==="deny")return{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:s.user_message??s.agent_message};if(s.additionalContext)return{hookEventName:"PreToolUse",additionalContext:s.additionalContext}}}let o=i?.file_path??i?.path;if(o){let a=e.preToolUse({tool_name:n,tool_input:{file_path:o}});if(a.permission==="deny")return{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:a.user_message??a.agent_message};if(a.additionalContext)return{hookEventName:"PreToolUse",additionalContext:a.additionalContext}}return{hookEventName:"PreToolUse"}}]}]}}var H0,Ag=S(()=>{H0=class Ig{cwd;model;tools;permissionMode;maxTurns;guardrailHooks;lastSessionId=null;queryFn=null;constructor(t={}){this.cwd=t.cwd??process.cwd(),this.model=t.model,this.tools=t.tools,this.permissionMode=t.permissionMode??"bypassPermissions",this.maxTurns=t.maxTurns,this.guardrailHooks=t.guardrailHooks}async resolveQueryFn(){if(this.queryFn)return this.queryFn;let t=await import("@anthropic-ai/claude-agent-sdk");return this.queryFn=t.query,this.queryFn}buildOptions(t,r){let i={cwd:this.cwd,permissionMode:this.permissionMode,allowDangerouslySkipPermissions:this.permissionMode==="bypassPermissions"};return this.model&&(i.model=this.model),this.maxTurns&&(i.maxTurns=this.maxTurns),this.tools?i.tools=this.tools:i.tools=t?["Read","Glob","Grep"]:["Read","Glob","Grep","Edit","Write","Bash"],r&&(i.resume=r),this.guardrailHooks&&(i.hooks=W0(this.guardrailHooks)),i}async runQuery(t,r){let n=(await this.resolveQueryFn())({prompt:t,options:r}),o="",a="";for await(let s of n)if(s.type==="result"){if(a=s.session_id??a,s.subtype==="success")o=s.result;else if(s.subtype==="error")throw new Error(`Claude Agent SDK error: ${s.error}`)}return{text:o,sessionId:a}}async send(t,r){this.lastSessionId=null;let i=this.buildOptions(r.readonly),{text:n,sessionId:o}=await this.runQuery(t,i);return this.lastSessionId=o,n}async followUp(t){if(!this.lastSessionId)throw new Error("followUp() called before send() \u2014 no active session");let r=this.buildOptions(!1,this.lastSessionId),{text:i,sessionId:n}=await this.runQuery(t,r);return this.lastSessionId=n,i}async sendExecution(t){this.lastSessionId=null;let r=this.buildOptions(t.options.readonly),{text:i,sessionId:n}=await this.runQuery(t.prompt,r);return this.lastSessionId=n,i}static withQueryFn(t,r){let i=new Ig(r);return i.queryFn=t,i}}});var Tg={};oe(Tg,{OpenAIAgentsSdkAdapter:()=>X0});function Y0(e){return[{name:"contract-runtime-guardrail",execute:async({input:t})=>{let r=typeof t=="string"?t:JSON.stringify(t),i=e.runChecks({command:r}),n=i.filter(o=>!o.passed&&o.action==="block");return{outputInfo:{results:i},tripwireTriggered:n.length>0}}}]}var X0,Pg=S(()=>{X0=class Eg{model;maxTurns;guardrailHooks;tools;agentName;signal;lastResponseId=null;lastAgent=null;AgentClass=null;runFn=null;constructor(t={}){this.model=t.model,this.maxTurns=t.maxTurns,this.guardrailHooks=t.guardrailHooks,this.tools=t.tools,this.agentName=t.agentName??"contract-agent",this.signal=t.signal}async resolveSdk(){if(this.AgentClass&&this.runFn)return{Agent:this.AgentClass,run:this.runFn};let t=await import("@openai/agents");return this.AgentClass=t.Agent,this.runFn=t.run,{Agent:this.AgentClass,run:this.runFn}}createAgent(t,r,i){let n={name:this.agentName,instructions:r};return this.model&&(n.model=this.model),this.tools&&(n.tools=this.tools),this.guardrailHooks&&(n.inputGuardrails=Y0(this.guardrailHooks)),new t(n)}buildRunOptions(t){let r={};return this.maxTurns!==void 0&&(r.maxTurns=this.maxTurns),this.signal&&(r.signal=this.signal),t&&(r.previousResponseId=t),r}extractOutput(t){if(typeof t.finalOutput=="string")return t.finalOutput;if(t.finalOutput!==void 0&&t.finalOutput!==null)return JSON.stringify(t.finalOutput,null,2);if(t.newItems){let r=[];for(let i of t.newItems)if(i.type==="message_output_item"||i.type==="text"){let n=i.rawItem;if(n?.content){let o=n.content;if(Array.isArray(o))for(let a of o)typeof a=="object"&&a!==null&&"text"in a&&r.push(a.text);else typeof o=="string"&&r.push(o)}}if(r.length>0)return r.join(`
|
|
31
|
+
`)}return""}async send(t,r){this.lastResponseId=null,this.lastAgent=null;let{Agent:i,run:n}=await this.resolveSdk(),o=this.createAgent(i,t,r.readonly),a=this.buildRunOptions(),s=await n(o,t,a);return this.lastResponseId=s.lastResponseId??null,this.lastAgent=o,this.extractOutput(s)}async followUp(t){if(!this.lastResponseId)throw new Error("followUp() called before send() \u2014 no active session");let{run:r}=await this.resolveSdk(),i=this.lastAgent,n=this.buildRunOptions(this.lastResponseId),o=await r(i,t,n);return this.lastResponseId=o.lastResponseId??this.lastResponseId,this.extractOutput(o)}async sendExecution(t){this.lastResponseId=null,this.lastAgent=null;let{Agent:r,run:i}=await this.resolveSdk(),n=this.createAgent(r,t.prompt,t.options.readonly),o=this.buildRunOptions(),a=await i(n,t.prompt,o);return this.lastResponseId=a.lastResponseId??null,this.lastAgent=n,this.extractOutput(a)}static withRunFn(t,r,i){let n=new Eg(i);return n.AgentClass=t,n.runFn=r,n}}});var Ng={};oe(Ng,{GeminiSdkAdapter:()=>Q0});function Cs(e){if(e.text)return e.text;if(e.candidates?.length){let t=e.candidates[0].content?.parts;if(t?.length)return t.map(r=>r.text??"").join("")}return""}function js(e){let t=e.candidates?.[0];if(t?.finishReason==="SAFETY"){let r=t.safetyRatings?.filter(i=>i.probability==="HIGH").map(i=>i.category).join(", ");throw new Error(`Gemini response blocked by safety filters: ${r||"unknown category"}`)}}var Q0,Cg=S(()=>{Q0=class zg{apiKey;model;systemInstruction;temperature;maxOutputTokens;guardrailHooks;lastChat=null;client=null;ClientClass=null;constructor(t={}){this.apiKey=t.apiKey,this.model=t.model??"gemini-2.5-flash",this.systemInstruction=t.systemInstruction,this.temperature=t.temperature,this.maxOutputTokens=t.maxOutputTokens,this.guardrailHooks=t.guardrailHooks}async resolveClient(){if(this.client)return this.client;if(!this.ClientClass){let r=await import("@google/genai");this.ClientClass=r.GoogleGenAI}let t=this.apiKey??process.env.GEMINI_API_KEY;if(!t)throw new Error("GEMINI_API_KEY environment variable or apiKey config is required for the Gemini adapter");return this.client=new this.ClientClass({apiKey:t}),this.client}buildGenerationConfig(){let t={};return this.systemInstruction&&(t.systemInstruction=this.systemInstruction),this.temperature!==void 0&&(t.temperature=this.temperature),this.maxOutputTokens!==void 0&&(t.maxOutputTokens=this.maxOutputTokens),t}createChat(t){return t.chats.create({model:this.model,config:this.buildGenerationConfig()})}async send(t,r){this.lastChat=null;let i=await this.resolveClient(),n=this.createChat(i),o=await n.sendMessage({message:t});return js(o),this.lastChat=n,Cs(o)}async followUp(t){if(!this.lastChat)throw new Error("followUp() called before send() \u2014 no active session");let r=await this.lastChat.sendMessage({message:t});return js(r),Cs(r)}async sendExecution(t){this.lastChat=null;let r=await this.resolveClient(),i=this.createChat(r),n=await i.sendMessage({message:t.prompt});return js(n),this.lastChat=i,Cs(n)}static withClient(t,r){let i=new zg(r);return i.client=t,i}}});var eI,tI,jg,Dg=S(()=>{"use strict";eI={id:"litedbmodel-auditor",role_name:"litedbmodel Audit Analyst",purpose:`Audits TypeScript source code that uses the litedbmodel ORM to detect common anti-patterns that cause data-integrity problems, performance degradation, or correctness bugs. Reads project files using file tools to find all litedbmodel usage sites.
|
|
32
|
+
The eight canonical anti-patterns to detect:
|
|
33
|
+
(1) LOOP_CREATE \u2014 Model.create() inside a loop; use createMany instead.
|
|
34
|
+
(2) DELETE_REINSERT \u2014 full delete then re-insert; use upsert instead.
|
|
35
|
+
(3) MISSING_IDEMPOTENCY \u2014 bare create() that throws on duplicate rows.
|
|
36
|
+
(4) AGGREGATE_SKIP \u2014 inserting un-aggregated data that needs group-by first.
|
|
37
|
+
(5) OVER_DELETE \u2014 delete with overly broad conditions.
|
|
38
|
+
(6) MISSING_LOCK \u2014 concurrent-write path without forUpdate: true.
|
|
39
|
+
(7) UNIQUE_MISSING \u2014 onConflict used without a DB UNIQUE constraint.
|
|
40
|
+
(8) N_PLUS_ONE \u2014 find/findOne called inside a loop.
|
|
41
|
+
|
|
42
|
+
litedbmodel API reference (for remediation guidance):
|
|
43
|
+
Model.create(cols, opts?) \u2014 opts: { returning, onConflict, onConflictIgnore, onConflictUpdate }
|
|
44
|
+
Model.createMany(rows, opts?) \u2014 batch INSERT with same opts.
|
|
45
|
+
Model.find(conds, opts?) \u2014 opts: { order, limit, offset, forUpdate }
|
|
46
|
+
Model.findOne(conds, opts?) \u2014 single-row SELECT.
|
|
47
|
+
Model.findById(pkeyResult) \u2014 find by PkeyResult object.
|
|
48
|
+
Model.update(conds, vals, opts?) \u2014 UPDATE matching rows.
|
|
49
|
+
Model.updateMany(rows, opts?) \u2014 bulk UPDATE; opts: { keyColumns }
|
|
50
|
+
Model.delete(conds, opts?) \u2014 DELETE matching rows.
|
|
51
|
+
DBModel.transaction(fn, opts?) \u2014 opts: { retryOnError, retryLimit }
|
|
52
|
+
SKIP \u2014 exclude a condition or column dynamically.
|
|
53
|
+
sql tagged template \u2014 operator-based conditions.
|
|
54
|
+
forUpdate: true \u2014 SELECT FOR UPDATE (must be inside a transaction).
|
|
55
|
+
onConflict + onConflictUpdate \u2014 upsert (target column must have UNIQUE/PK).
|
|
56
|
+
onConflict + onConflictIgnore \u2014 insert-or-ignore.
|
|
57
|
+
|
|
58
|
+
Produces structured findings (AgentAuditResult shape) with severity, category, location, message, and actionable remediation referencing the correct litedbmodel API.`,mode:"read-only",dispatch_only:!1,can_read_artifacts:[],can_write_artifacts:[],can_execute_tools:[],can_invoke_agents:[],can_return_handoffs:["litedbmodel-audit-result"],responsibilities:["Read project source files using file tools to find all litedbmodel model import sites and usage.","Classify each usage occurrence against the eight anti-pattern categories.","Assign severity \u2014 info/warning/error/critical \u2014 based on data-integrity and performance impact.","Provide specific remediation guidance referencing the correct litedbmodel API.","Compute an overall riskLevel reflecting the most severe finding.","Return a findings array even when it is empty (no issues found)."],constraints:["Do not suggest API methods that are not part of the documented litedbmodel interface.","Do not mutate, write, or propose direct file changes; only produce findings.","Stop and escalate if the source exceeds 200 KB or contains no litedbmodel import statements."],rules:[{id:"R-AUDIT-001",description:"Always recommend Model.createMany() as the replacement for any loop body that contains a Model.create() call.",severity:"mandatory"},{id:"R-AUDIT-002",description:"When a delete-then-reinsert pattern is detected, recommend Model.createMany() with onConflict + onConflictUpdate as the idiomatic upsert replacement.",severity:"mandatory"},{id:"R-AUDIT-003",description:"Whenever onConflict / onConflictUpdate is recommended, note that the target column(s) must carry a UNIQUE or PRIMARY KEY constraint in the database schema.",severity:"mandatory"},{id:"R-AUDIT-004",description:"N+1 findings must include the batch alternative: find() with an IN-equivalent condition, createMany(), or updateMany().",severity:"mandatory"},{id:"R-AUDIT-005",description:"Race-condition findings in concurrent-write paths must recommend findOne/find with forUpdate: true inside DBModel.transaction().",severity:"mandatory"}],escalation_criteria:[{condition:"The provided source code exceeds 200 KB in total size.",action:"stop_and_report"},{condition:"The provided source code contains no litedbmodel import statements and cannot be meaningfully audited.",action:"stop_and_report"}]},tI={id:"litedbmodel-implementer",role_name:"litedbmodel Implementation Engineer",purpose:`Implements litedbmodel DBModel-based business logic directly in the user's project by reading model definitions and SQL schema from the filesystem, then writing TypeScript source files. Proactively applies all litedbmodel best-practice patterns from the start: Model.createMany() for batch inserts, onConflict+onConflictUpdate for idempotent upserts, forUpdate: true for concurrent-safe reads, and DBModel.transaction() for multi-step operations. Never produces code that contains any of the eight canonical anti-patterns.
|
|
59
|
+
litedbmodel API reference (use ONLY these \u2014 never invent methods):
|
|
60
|
+
Model.create(cols, opts?) \u2014 single INSERT.
|
|
61
|
+
opts: { returning, onConflict, onConflictIgnore, onConflictUpdate }
|
|
62
|
+
Model.createMany(rows, opts?) \u2014 batch INSERT with same opts.
|
|
63
|
+
Model.find(conds, opts?) \u2014 SELECT.
|
|
64
|
+
opts: { order, limit, offset, forUpdate }
|
|
65
|
+
Model.findOne(conds, opts?) \u2014 single-row SELECT.
|
|
66
|
+
Model.findById(pkeyResult) \u2014 find by PkeyResult object.
|
|
67
|
+
Model.update(conds, vals, opts?) \u2014 UPDATE matching rows.
|
|
68
|
+
Model.updateMany(rows, opts?) \u2014 bulk UPDATE.
|
|
69
|
+
opts: { keyColumns }
|
|
70
|
+
Model.delete(conds, opts?) \u2014 DELETE matching rows.
|
|
71
|
+
Model.query(sql, params) \u2014 raw SQL returning typed model instances.
|
|
72
|
+
DBModel.execute(sql) \u2014 raw SQL for DDL/maintenance (no model instances).
|
|
73
|
+
DBModel.transaction(fn, opts?) \u2014 transaction wrapper.
|
|
74
|
+
opts: { retryOnError, retryLimit }
|
|
75
|
+
SKIP \u2014 exclude a condition or column dynamically.
|
|
76
|
+
sql tagged template \u2014 operator-based conditions.
|
|
77
|
+
Column references: sql\`\${Model.col} > \${val}\`
|
|
78
|
+
IS NULL: sql\`\${Model.col} IS NULL\`
|
|
79
|
+
IN: [sql\`\${Model.col} IN (?)\`, [...values]]
|
|
80
|
+
forUpdate: true \u2014 SELECT FOR UPDATE (must be inside a transaction).
|
|
81
|
+
onConflict + onConflictUpdate \u2014 upsert.
|
|
82
|
+
Target column(s) must have UNIQUE or PRIMARY KEY constraint.
|
|
83
|
+
onConflict + onConflictIgnore \u2014 insert-or-ignore.
|
|
84
|
+
Same constraint requirement.
|
|
85
|
+
Column references are symbol-based: Model.column_name (not strings).
|
|
86
|
+
Conditions are type-safe tuples: [[Model.col, value], ...].`,mode:"read-write",dispatch_only:!1,can_read_artifacts:[],can_write_artifacts:[],can_execute_tools:[],can_invoke_agents:[],can_return_handoffs:["litedbmodel-implement-result"],responsibilities:["Step 1: Use Glob to find model definition files matching the models glob pattern in the user request. Read each matched file to extract model classes, column definitions, and table names.","Step 2: Read the target file specified in the user request. Examine its current content. If it contains only stubs, TODOs, or empty class bodies, you MUST write the full implementation.","Step 3: Use Edit or Write tool to add the implementation directly to the target file. You MUST actually modify the file on disk. Never claim 'implementation is already present' unless the function body you just read contains real business logic \u2014 not stubs or TODOs.","Apply correct patterns proactively \u2014 never generate loop-inside-create, delete-reinsert, bare non-idempotent create, or N+1 patterns.","Surface design concerns (missing UNIQUE constraints, missing transactions, ambiguous schema) as findings with severity info or warning."],constraints:["Only reference model classes and columns that exist in the project's model definition files.","Never invent or fabricate litedbmodel API methods not listed in the API reference above.","Keep all generated TypeScript strict-mode compliant.","If the model/schema context is insufficient, list the missing information explicitly and stop."],rules:[{id:"R-IMPL-001",description:"Never generate a for/while loop body that calls Model.create(). Always use Model.createMany() for batch writes.",severity:"mandatory"},{id:"R-IMPL-002",description:"Idempotent single-row writes must pass onConflict with either onConflictIgnore: true or onConflictUpdate: [...] to Model.create(). Bare Model.create() that can throw on duplicate keys is forbidden.",severity:"mandatory"},{id:"R-IMPL-003",description:"Multi-step read-modify-write sequences must be wrapped in DBModel.transaction() to prevent partial updates.",severity:"mandatory"},{id:"R-IMPL-004",description:"Any read that is immediately followed by a conditional write in a concurrent context must use findOne/find with forUpdate: true inside a transaction.",severity:"mandatory"},{id:"R-IMPL-005",description:"Whenever onConflict is generated, add a code comment noting that the referenced column(s) must have a UNIQUE or PRIMARY KEY constraint.",severity:"mandatory"}],escalation_criteria:[{condition:"The feature description is too ambiguous to be mapped to any model class in the project.",action:"stop_and_report"},{condition:"No model definitions or SQL schema found in the project and the feature requires specific column knowledge.",action:"stop_and_report"}]},jg={"litedbmodel-auditor":eI,"litedbmodel-implementer":tI}});var nI,rI,Ug,Lg=S(()=>{"use strict";nI={id:"audit-litedbmodel-usage",description:"Audit TypeScript source files that import or use litedbmodel model classes. Detect the eight canonical anti-patterns (LOOP_CREATE, DELETE_REINSERT, MISSING_IDEMPOTENCY, AGGREGATE_SKIP, OVER_DELETE, MISSING_LOCK, UNIQUE_MISSING, N_PLUS_ONE) and return structured findings with severity ratings and remediation guidance referencing the correct litedbmodel API.",target_agent:"litedbmodel-auditor",allowed_from_agents:["litedbmodel-auditor"],workflow:"audit-workflow",invocation_handoff:"litedbmodel-audit-request",result_handoff:"litedbmodel-audit-result",input_artifacts:[],responsibilities:["Parse the provided source code for litedbmodel model import sites and all subsequent usages.","Classify each usage occurrence against the eight anti-pattern categories.","Return findings conforming to the litedbmodel-audit-result schema."],completion_criteria:["All litedbmodel usage sites in the provided code have been inspected.","The findings array is populated (may be empty when no issues are found).","The riskLevel field reflects the highest-severity finding present.","Each finding with severity >= warning includes a recommendation field referencing the correct litedbmodel API method."],optional:!1,model_class:"standard"},rI={id:"implement-litedbmodel-feature",description:"Implement a litedbmodel-based business feature by reading model definitions and writing TypeScript code directly to the target file. The agent uses file tools (Glob, Read, Edit, Write) to operate on the user's project, proactively avoiding all eight litedbmodel anti-patterns.",target_agent:"litedbmodel-implementer",allowed_from_agents:["litedbmodel-implementer"],workflow:"implement-workflow",invocation_handoff:"litedbmodel-implement-request",result_handoff:"litedbmodel-implement-result",input_artifacts:[],responsibilities:["Parse the feature description to identify the required data operations.","Read model definition files using Glob + Read to understand available models, columns, and constraints.","Read the target file to understand its current state.","Write the implementation to the target file using Edit or Write tools.","Apply best-practice patterns proactively (createMany, upsert, forUpdate, transaction) so that no anti-pattern appears in the written code.","Report what was changed in the changedFiles array."],completion_criteria:["The target file has been modified on disk via file tools.","Written code uses only documented litedbmodel API methods.","None of the eight anti-patterns appear in the written code.","The changedFiles array lists every file that was created or updated.","If schema context is insufficient, missing information is listed in the findings array and the agent stops."],optional:!1,model_class:"thinking"},Ug={"audit-litedbmodel-usage":nI,"implement-litedbmodel-feature":rI}});function h(e,t,r){function i(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let l=a.prototype,u=Object.keys(l);for(let d=0;d<u.length;d++){let f=u[d];f in s||(s[f]=l[f].bind(s))}}let n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(s){var c;let l=r?.Parent?new o:this;i(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function Y(e){return e&&Object.assign(ht,e),ht}var Rg,Ds,Us,Ie,Je,ht,gt=S(()=>{Ds=Object.freeze({status:"aborted"});Us=Symbol("zod_brand"),Ie=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Je=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Rg=globalThis).__zod_globalConfig??(Rg.__zod_globalConfig={});ht=globalThis.__zod_globalConfig});var k={};oe(k,{BIGINT_FORMAT_RANGES:()=>Js,Class:()=>Rs,NUMBER_FORMAT_RANGES:()=>Ks,aborted:()=>Ye,allowsEval:()=>Zs,assert:()=>cI,assertEqual:()=>iI,assertIs:()=>aI,assertNever:()=>sI,assertNotEqual:()=>oI,assignProp:()=>We,base64ToUint8Array:()=>Fg,base64urlToUint8Array:()=>SI,cached:()=>Dt,captureStackTrace:()=>ai,cleanEnum:()=>kI,cleanRegex:()=>Cn,clone:()=>ue,cloneDef:()=>uI,createTransparentProxy:()=>gI,defineLazy:()=>M,esc:()=>oi,escapeRegex:()=>ke,explicitlyAborted:()=>Gs,extend:()=>bI,finalizeIssue:()=>de,floatSafeRemainder:()=>Ms,getElementAtPath:()=>dI,getEnumValues:()=>Nn,getLengthableOrigin:()=>Un,getParsedType:()=>hI,getSizableOrigin:()=>Dn,hexToUint8Array:()=>OI,isObject:()=>vt,isPlainObject:()=>He,issue:()=>Ut,joinValues:()=>y,jsonStringifyReplacer:()=>jt,merge:()=>$I,mergeDefs:()=>Me,normalizeParams:()=>I,nullish:()=>Ge,numKeys:()=>mI,objectClone:()=>lI,omit:()=>yI,optionalKeys:()=>Bs,parsedType:()=>x,partial:()=>xI,pick:()=>vI,prefixIssues:()=>he,primitiveTypes:()=>Vs,promiseAllObject:()=>fI,propertyKeyTypes:()=>jn,randomString:()=>pI,required:()=>wI,safeExtend:()=>_I,shallowClone:()=>qs,slugify:()=>Fs,stringifyPrimitive:()=>$,uint8ArrayToBase64:()=>Zg,uint8ArrayToBase64url:()=>II,uint8ArrayToHex:()=>AI,unwrapMessage:()=>zn});function iI(e){return e}function oI(e){return e}function aI(e){}function sI(e){throw new Error("Unexpected value in exhaustive check")}function cI(e){}function Nn(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function y(e,t="|"){return e.map(r=>$(r)).join(t)}function jt(e,t){return typeof t=="bigint"?t.toString():t}function Dt(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Ge(e){return e==null}function Cn(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Ms(e,t){let r=e/t,i=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}function M(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Mg)return i===void 0&&(i=Mg,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function lI(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function We(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Me(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function uI(e){return Me(e._zod.def)}function dI(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function fI(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function pI(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function oi(e){return JSON.stringify(e)}function Fs(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function vt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function He(e){if(vt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(vt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function qs(e){return He(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function mI(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function ke(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ue(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function I(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function gI(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function $(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Bs(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function vI(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Me(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return We(this,"shape",a),a},checks:[]});return ue(e,o)}function yI(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Me(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return We(this,"shape",a),a},checks:[]});return ue(e,o)}function bI(e,t){if(!He(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Me(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return We(this,"shape",o),o}});return ue(e,n)}function _I(e,t){if(!He(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Me(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return We(this,"shape",i),i}});return ue(e,r)}function $I(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Me(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return We(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ue(e,r)}function xI(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Me(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(r)for(let l in r){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(let l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return We(this,"shape",c),c},checks:[]});return ue(t,a)}function wI(e,t,r){let i=Me(t._zod.def,{get shape(){let n=t._zod.def.shape,o={...n};if(r)for(let a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(let a in n)o[a]=new e({type:"nonoptional",innerType:n[a]});return We(this,"shape",o),o}});return ue(t,i)}function Ye(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Gs(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function he(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function zn(e){return typeof e=="string"?e:e?.message}function de(e,t,r){let i=e.message?e.message:zn(e.inst?._zod.def?.error?.(e))??zn(t?.error?.(e))??zn(r.customError?.(e))??zn(r.localeError?.(e))??"Invalid input",{inst:n,continue:o,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function Dn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Un(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function x(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Ut(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function kI(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Fg(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Zg(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function SI(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Fg(t+r)}function II(e){return Zg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function OI(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function AI(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Mg,ai,Zs,hI,jn,Vs,Ks,Js,Rs,C=S(()=>{gt();Mg=Symbol("evaluating");ai="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Zs=Dt(()=>{if(ht.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});hI=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},jn=new Set(["string","number","symbol"]),Vs=new Set(["string","number","bigint","boolean","symbol","undefined"]);Ks={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]},Js={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Rs=class{constructor(...t){}}});function Rn(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Mn(e,t=r=>r.message){let r={_errors:[]},i=(n,o=[])=>{for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,l=0;for(;l<s.length;){let u=s[l];l===s.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(t(a))):c[u]=c[u]||{_errors:[]},c=c[u],l++}}}};return i(e),r}function Ws(e,t=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var a,s;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>i({issues:l},[...o,...c.path]));else if(c.code==="invalid_key")i({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")i({issues:c.issues},[...o,...c.path]);else{let l=[...o,...c.path];if(l.length===0){r.errors.push(t(c));continue}let u=r,d=0;for(;d<l.length;){let f=l[d],p=d===l.length-1;typeof f=="string"?(u.properties??(u.properties={}),(a=u.properties)[f]??(a[f]={errors:[]}),u=u.properties[f]):(u.items??(u.items=[]),(s=u.items)[f]??(s[f]={errors:[]}),u=u.items[f]),p&&u.errors.push(t(c)),d++}}};return i(e),r}function Vg(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Hs(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${Vg(i.path)}`);return t.join(`
|
|
87
|
+
`)}var qg,Ln,ge,Ys=S(()=>{gt();C();qg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,jt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ln=h("$ZodError",qg),ge=h("$ZodError",qg,{Parent:Error})});var Lt,si,Rt,ci,Mt,Xs,Ft,Qs,li,TI,ui,PI,di,zI,fi,NI,pi,CI,mi,jI,hi,DI,gi,UI,ec=S(()=>{gt();Ys();C();Lt=e=>(t,r,i,n)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ie;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>de(c,o,Y())));throw ai(s,n?.callee),s}return a.value},si=Lt(ge),Rt=e=>async(t,r,i,n)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>de(c,o,Y())));throw ai(s,n?.callee),s}return a.value},ci=Rt(ge),Mt=e=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Ie;return o.issues.length?{success:!1,error:new(e??Ln)(o.issues.map(a=>de(a,n,Y())))}:{success:!0,data:o.value}},Xs=Mt(ge),Ft=e=>async(t,r,i)=>{let n=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>de(a,n,Y())))}:{success:!0,data:o.value}},Qs=Ft(ge),li=e=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Lt(e)(t,r,n)},TI=li(ge),ui=e=>(t,r,i)=>Lt(e)(t,r,i),PI=ui(ge),di=e=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Rt(e)(t,r,n)},zI=di(ge),fi=e=>async(t,r,i)=>Rt(e)(t,r,i),NI=fi(ge),pi=e=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Mt(e)(t,r,n)},CI=pi(ge),mi=e=>(t,r,i)=>Mt(e)(t,r,i),jI=mi(ge),hi=e=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Ft(e)(t,r,n)},DI=hi(ge),gi=e=>async(t,r,i)=>Ft(e)(t,r,i),UI=gi(ge)});var _e={};oe(_e,{base64:()=>gc,base64url:()=>vi,bigint:()=>wc,boolean:()=>Sc,browserEmail:()=>BI,cidrv4:()=>mc,cidrv6:()=>hc,cuid:()=>tc,cuid2:()=>nc,date:()=>bc,datetime:()=>$c,domain:()=>GI,duration:()=>sc,e164:()=>yc,email:()=>lc,emoji:()=>uc,extendedDuration:()=>LI,guid:()=>cc,hex:()=>WI,hostname:()=>JI,html5Email:()=>ZI,httpProtocol:()=>vc,idnEmail:()=>VI,integer:()=>kc,ipv4:()=>dc,ipv6:()=>fc,ksuid:()=>oc,lowercase:()=>Ac,mac:()=>pc,md5_base64:()=>YI,md5_base64url:()=>XI,md5_hex:()=>HI,nanoid:()=>ac,null:()=>Ic,number:()=>yi,rfc5322Email:()=>qI,sha1_base64:()=>eO,sha1_base64url:()=>tO,sha1_hex:()=>QI,sha256_base64:()=>rO,sha256_base64url:()=>iO,sha256_hex:()=>nO,sha384_base64:()=>aO,sha384_base64url:()=>sO,sha384_hex:()=>oO,sha512_base64:()=>lO,sha512_base64url:()=>uO,sha512_hex:()=>cO,string:()=>xc,time:()=>_c,ulid:()=>rc,undefined:()=>Oc,unicodeEmail:()=>Bg,uppercase:()=>Ec,uuid:()=>yt,uuid4:()=>RI,uuid6:()=>MI,uuid7:()=>FI,xid:()=>ic});function uc(){return new RegExp(KI,"u")}function Jg(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _c(e){return new RegExp(`^${Jg(e)}$`)}function $c(e){let t=Jg({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Kg}T(?:${i})$`)}function Fn(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Zn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var tc,nc,rc,ic,oc,ac,sc,LI,cc,yt,RI,MI,FI,lc,ZI,qI,Bg,VI,BI,KI,dc,fc,pc,mc,hc,gc,vi,JI,GI,vc,yc,Kg,bc,xc,wc,kc,yi,Sc,Ic,Oc,Ac,Ec,WI,HI,YI,XI,QI,eO,tO,nO,rO,iO,oO,aO,sO,cO,lO,uO,bi=S(()=>{C();tc=/^[cC][0-9a-z]{6,}$/,nc=/^[0-9a-z]+$/,rc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ic=/^[0-9a-vA-V]{20}$/,oc=/^[A-Za-z0-9]{27}$/,ac=/^[a-zA-Z0-9_-]{21}$/,sc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,LI=/^[-+]?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)?)??$/,cc=/^([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})$/,yt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,RI=yt(4),MI=yt(6),FI=yt(7),lc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ZI=/^[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])?)*$/,qI=/^(([^<>()\[\]\\.,;:\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,}))$/,Bg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,VI=Bg,BI=/^[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])?)*$/,KI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";dc=/^(?:(?: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])$/,fc=/^(([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}|:))$/,pc=e=>{let t=ke(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},mc=/^((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])$/,hc=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,gc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vi=/^[A-Za-z0-9_-]*$/,JI=/^(?=.{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])?)*\.?$/,GI=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,vc=/^https?$/,yc=/^\+[1-9]\d{6,14}$/,Kg="(?:(?:\\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])))",bc=new RegExp(`^${Kg}$`);xc=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},wc=/^-?\d+n?$/,kc=/^-?\d+$/,yi=/^-?\d+(?:\.\d+)?$/,Sc=/^(?:true|false)$/i,Ic=/^null$/i,Oc=/^undefined$/i,Ac=/^[^A-Z]*$/,Ec=/^[^a-z]*$/,WI=/^[0-9a-fA-F]*$/;HI=/^[0-9a-fA-F]{32}$/,YI=Fn(22,"=="),XI=Zn(22),QI=/^[0-9a-fA-F]{40}$/,eO=Fn(27,"="),tO=Zn(27),nO=/^[0-9a-fA-F]{64}$/,rO=Fn(43,"="),iO=Zn(43),oO=/^[0-9a-fA-F]{96}$/,aO=Fn(64,""),sO=Zn(64),cO=/^[0-9a-fA-F]{128}$/,lO=Fn(86,"=="),uO=Zn(86)});function Gg(e,t,r){e.issues.length&&t.issues.push(...he(r,e.issues))}var W,Wg,_i,$i,Tc,Pc,zc,Nc,Cc,jc,Dc,Uc,Lc,Zt,Rc,Mc,Fc,Zc,qc,Vc,Bc,Kc,Jc,xi=S(()=>{gt();bi();C();W=h("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Wg={number:"number",bigint:"bigint",object:"date"},_i=h("$ZodCheckLessThan",(e,t)=>{W.init(e,t);let r=Wg[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$i=h("$ZodCheckGreaterThan",(e,t)=>{W.init(e,t);let r=Wg[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tc=h("$ZodCheckMultipleOf",(e,t)=>{W.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Ms(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Pc=h("$ZodCheckNumberFormat",(e,t)=>{W.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Ks[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=o,r&&(s.pattern=kc)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),zc=h("$ZodCheckBigIntFormat",(e,t)=>{W.init(e,t);let[r,i]=Js[t.format];e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Nc=h("$ZodCheckMaxSize",(e,t)=>{var r;W.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ge(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;n.size<=t.maximum||i.issues.push({origin:Dn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Cc=h("$ZodCheckMinSize",(e,t)=>{var r;W.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ge(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;n.size>=t.minimum||i.issues.push({origin:Dn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),jc=h("$ZodCheckSizeEquals",(e,t)=>{var r;W.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ge(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{let n=i.value,o=n.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:Dn(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Dc=h("$ZodCheckMaxLength",(e,t)=>{var r;W.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ge(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;if(n.length<=t.maximum)return;let a=Un(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Uc=h("$ZodCheckMinLength",(e,t)=>{var r;W.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ge(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;if(n.length>=t.minimum)return;let a=Un(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Lc=h("$ZodCheckLengthEquals",(e,t)=>{var r;W.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ge(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{let n=i.value,o=n.length;if(o===t.length)return;let a=Un(n),s=o>t.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Zt=h("$ZodCheckStringFormat",(e,t)=>{var r,i;W.init(e,t),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Rc=h("$ZodCheckRegex",(e,t)=>{Zt.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Mc=h("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ac),Zt.init(e,t)}),Fc=h("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ec),Zt.init(e,t)}),Zc=h("$ZodCheckIncludes",(e,t)=>{W.init(e,t);let r=ke(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),qc=h("$ZodCheckStartsWith",(e,t)=>{W.init(e,t);let r=new RegExp(`^${ke(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Vc=h("$ZodCheckEndsWith",(e,t)=>{W.init(e,t);let r=new RegExp(`.*${ke(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});Bc=h("$ZodCheckProperty",(e,t)=>{W.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Gg(n,r,t.property));Gg(i,r,t.property)}}),Kc=h("$ZodCheckMimeType",(e,t)=>{W.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Jc=h("$ZodCheckOverwrite",(e,t)=>{W.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var qn,Gc=S(()=>{qn=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
|
|
88
|
+
`).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
|
|
89
|
+
`))}}});var Wc,Hc=S(()=>{Wc={major:4,minor:4,patch:3}});function yl(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function dv(e){if(!vi.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return yl(r)}function fv(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}function Yg(e,t,r){e.issues.length&&t.issues.push(...he(r,e.issues)),t.value[r]=e.value}function Ii(e,t,r,i,n,o){let a=r in i;if(e.issues.length){if(n&&o&&!a)return;t.issues.push(...he(r,e.issues))}if(!a&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function pv(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=Bs(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function mv(e,t,r,i,n,o){let a=[],s=n.keySet,c=n.catchall._zod,l=c.def.type,u=c.optin==="optional",d=c.optout==="optional";for(let f in t){if(f==="__proto__"||s.has(f))continue;if(l==="never"){a.push(f);continue}let p=c.run({value:t[f],issues:[]},i);p instanceof Promise?e.push(p.then(g=>Ii(g,r,f,t,u,d))):Ii(p,r,f,t,u,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}function Xg(e,t,r,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let n=e.filter(o=>!Ye(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>de(a,i,Y())))}),t)}function Qg(e,t,r,i){let n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>de(a,i,Y())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}function Yc(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(He(e)&&He(t)){let r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(let o of i){let a=Yc(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],o=t[i],a=Yc(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ev(e,t,r){let i=new Map,n;for(let s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let c of s.keys)i.has(c)||i.set(c,{}),i.get(c).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)i.has(c)||i.set(c,{}),i.get(c).r=!0;else e.issues.push(s);let o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&n&&e.issues.push({...n,keys:o}),Ye(e))return e;let a=Yc(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}function tv(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function nv(e,t,r){e.issues.length&&t.issues.push(...he(r,e.issues)),t.value[r]=e.value}function rv(e,t,r,i,n){for(let o=0;o<r.length;o++){let a=e[o],s=o<i.length;if(a.issues.length){if(!s&&o>=n){t.value.length=o;break}t.issues.push(...he(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(r[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}function iv(e,t,r,i,n,o,a){e.issues.length&&(jn.has(typeof i)?r.issues.push(...he(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(s=>de(s,a,Y()))})),t.issues.length&&(jn.has(typeof i)?r.issues.push(...he(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(s=>de(s,a,Y()))})),r.value.set(e.value,t.value)}function ov(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function av(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function sv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function cv(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function wi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}function ki(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>Si(e,o,t.out,r)):Si(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>Si(e,o,t.in,r)):Si(e,n,t.in,r)}}function Si(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}function lv(e){return e.value=Object.freeze(e.value),e}function uv(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(Ut(n))}}var L,bt,J,Xc,Qc,el,tl,nl,rl,il,ol,al,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,vl,bl,_l,$l,xl,wl,Oi,kl,Vn,Ai,Sl,Il,Ol,Al,El,Tl,Pl,zl,Nl,Cl,hv,jl,Bn,Dl,Ul,Ll,Ei,Rl,Ml,Fl,Zl,ql,Vl,Bl,Ti,Kl,Jl,Gl,Wl,Hl,Yl,Xl,Ql,Pi,Kn,eu,tu,nu,ru,iu,ou,au,su=S(()=>{xi();gt();Gc();ec();bi();C();Hc();C();L=h("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Wc;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let n of i)for(let o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(a,s,c)=>{let l=Ye(a),u;for(let d of s){if(d._zod.def.when){if(Gs(a)||!d._zod.def.when(a))continue}else if(l)continue;let f=a.issues.length,p=d._zod.check(a);if(p instanceof Promise&&c?.async===!1)throw new Ie;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,a.issues.length!==f&&(l||(l=Ye(a,f)))});else{if(a.issues.length===f)continue;l||(l=Ye(a,f))}}return u?u.then(()=>a):a},o=(a,s,c)=>{if(Ye(a))return a.aborted=!0,a;let l=n(s,i,c);if(l instanceof Promise){if(c.async===!1)throw new Ie;return l.then(u=>e._zod.parse(u,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(u=>o(u,a,s)):o(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Ie;return c.then(l=>n(l,i,s))}return n(c,i,s)}}M(e,"~standard",()=>({validate:n=>{try{let o=Xs(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Qs(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),bt=h("$ZodString",(e,t)=>{L.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??xc(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),J=h("$ZodStringFormat",(e,t)=>{Zt.init(e,t),bt.init(e,t)}),Xc=h("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=cc),J.init(e,t)}),Qc=h("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=yt(i))}else t.pattern??(t.pattern=yt());J.init(e,t)}),el=h("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=lc),J.init(e,t)}),tl=h("$ZodURL",(e,t)=>{J.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===vc.source&&!/^https?:\/\//i.test(i)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),nl=h("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=uc()),J.init(e,t)}),rl=h("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ac),J.init(e,t)}),il=h("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tc),J.init(e,t)}),ol=h("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=nc),J.init(e,t)}),al=h("$ZodULID",(e,t)=>{t.pattern??(t.pattern=rc),J.init(e,t)}),sl=h("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ic),J.init(e,t)}),cl=h("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=oc),J.init(e,t)}),ll=h("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=$c(t)),J.init(e,t)}),ul=h("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=bc),J.init(e,t)}),dl=h("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=_c(t)),J.init(e,t)}),fl=h("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=sc),J.init(e,t)}),pl=h("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=dc),J.init(e,t),e._zod.bag.format="ipv4"}),ml=h("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fc),J.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),hl=h("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=pc(t.delimiter)),J.init(e,t),e._zod.bag.format="mac"}),gl=h("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=mc),J.init(e,t)}),vl=h("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=hc),J.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[n,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});bl=h("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=gc),J.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{yl(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});_l=h("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=vi),J.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{dv(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),$l=h("$ZodE164",(e,t)=>{t.pattern??(t.pattern=yc),J.init(e,t)});xl=h("$ZodJWT",(e,t)=>{J.init(e,t),e._zod.check=r=>{fv(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),wl=h("$ZodCustomStringFormat",(e,t)=>{J.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Oi=h("$ZodNumber",(e,t)=>{L.init(e,t),e._zod.pattern=e._zod.bag.pattern??yi,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),kl=h("$ZodNumberFormat",(e,t)=>{Pc.init(e,t),Oi.init(e,t)}),Vn=h("$ZodBoolean",(e,t)=>{L.init(e,t),e._zod.pattern=Sc,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Ai=h("$ZodBigInt",(e,t)=>{L.init(e,t),e._zod.pattern=wc,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Sl=h("$ZodBigIntFormat",(e,t)=>{zc.init(e,t),Ai.init(e,t)}),Il=h("$ZodSymbol",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Ol=h("$ZodUndefined",(e,t)=>{L.init(e,t),e._zod.pattern=Oc,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Al=h("$ZodNull",(e,t)=>{L.init(e,t),e._zod.pattern=Ic,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),El=h("$ZodAny",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),Tl=h("$ZodUnknown",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),Pl=h("$ZodNever",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),zl=h("$ZodVoid",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Nl=h("$ZodDate",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});Cl=h("$ZodArray",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let o=[];for(let a=0;a<n.length;a++){let s=n[a],c=t.element._zod.run({value:s,issues:[]},i);c instanceof Promise?o.push(c.then(l=>Yg(l,r,a))):Yg(c,r,a)}return o.length?Promise.all(o).then(()=>r):r}});hv=h("$ZodObject",(e,t)=>{if(L.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let i=Dt(()=>pv(t));M(e._zod,"propValues",()=>{let s=t.shape,c={};for(let l in s){let u=s[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(let d of u.values)c[l].add(d)}}return c});let n=vt,o=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=i.value);let l=s.value;if(!n(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let u=[],d=a.shape;for(let f of a.keys){let p=d[f],g=p._zod.optin==="optional",m=p._zod.optout==="optional",v=p._zod.run({value:l[f],issues:[]},c);v instanceof Promise?u.push(v.then(A=>Ii(A,s,f,l,g,m))):Ii(v,s,f,l,g,m)}return o?mv(u,l,s,c,i.value,e):u.length?Promise.all(u).then(()=>s):s}}),jl=h("$ZodObjectJIT",(e,t)=>{hv.init(e,t);let r=e._zod.parse,i=Dt(()=>pv(t)),n=f=>{let p=new qn(["shape","payload","ctx"]),g=i.value,m=N=>{let T=oi(N);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};p.write("const input = payload.value;");let v=Object.create(null),A=0;for(let N of g.keys)v[N]=`key_${A++}`;p.write("const newResult = {};");for(let N of g.keys){let T=v[N],O=oi(N),P=f[N],D=P?._zod?.optin==="optional",w=P?._zod?.optout==="optional";p.write(`const ${T} = ${m(N)};`),D&&w?p.write(`
|
|
90
|
+
if (${T}.issues.length) {
|
|
91
|
+
if (${O} in input) {
|
|
92
|
+
payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
93
|
+
...iss,
|
|
94
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
95
|
+
})));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (${T}.value === undefined) {
|
|
100
|
+
if (${O} in input) {
|
|
101
|
+
newResult[${O}] = undefined;
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
newResult[${O}] = ${T}.value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
`):D?p.write(`
|
|
108
|
+
if (${T}.issues.length) {
|
|
109
|
+
payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
110
|
+
...iss,
|
|
111
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
112
|
+
})));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (${T}.value === undefined) {
|
|
116
|
+
if (${O} in input) {
|
|
117
|
+
newResult[${O}] = undefined;
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
newResult[${O}] = ${T}.value;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
`):p.write(`
|
|
124
|
+
const ${T}_present = ${O} in input;
|
|
125
|
+
if (${T}.issues.length) {
|
|
126
|
+
payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
127
|
+
...iss,
|
|
128
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
129
|
+
})));
|
|
130
|
+
}
|
|
131
|
+
if (!${T}_present && !${T}.issues.length) {
|
|
132
|
+
payload.issues.push({
|
|
133
|
+
code: "invalid_type",
|
|
134
|
+
expected: "nonoptional",
|
|
135
|
+
input: undefined,
|
|
136
|
+
path: [${O}]
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (${T}_present) {
|
|
141
|
+
if (${T}.value === undefined) {
|
|
142
|
+
newResult[${O}] = undefined;
|
|
143
|
+
} else {
|
|
144
|
+
newResult[${O}] = ${T}.value;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
`)}p.write("payload.value = newResult;"),p.write("return payload;");let _=p.compile();return(N,T)=>_(f,N,T)},o,a=vt,s=!ht.jitless,l=s&&Zs.value,u=t.catchall,d;e._zod.parse=(f,p)=>{d??(d=i.value);let g=f.value;return a(g)?s&&l&&p?.async===!1&&p.jitless!==!0?(o||(o=n(t.shape)),f=o(f,p),u?mv([],g,f,p,d,e):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});Bn=h("$ZodUnion",(e,t)=>{L.init(e,t),M(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),M(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),M(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),M(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${i.map(n=>Cn(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},n);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(s=>Xg(s,i,e,n)):Xg(a,i,e,n)}});Dl=h("$ZodXor",(e,t)=>{Bn.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},n);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>Qg(s,i,e,n)):Qg(a,i,e,n)}}),Ul=h("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Bn.init(e,t);let r=e._zod.parse;M(e._zod,"propValues",()=>{let n={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(let l of c)n[s].add(l)}}return n});let i=Dt(()=>{let n=t.options,o=new Map;for(let a of n){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});e._zod.parse=(n,o)=>{let a=n.value;if(!vt(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(n,o):t.unionFallback||o.direction==="backward"?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),n)}}),Ll=h("$ZodIntersection",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,l])=>ev(r,c,l)):ev(r,o,a)}});Ei=h("$ZodTuple",(e,t)=>{L.init(e,t);let r=t.items;e._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=tv(r,"optin"),c=tv(r,"optout");if(!t.rest){if(o.length<s)return i.issues.push({code:"too_small",minimum:s,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>r.length&&i.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:o,inst:e,origin:"array"})}let l=new Array(r.length);for(let u=0;u<r.length;u++){let d=r[u]._zod.run({value:o[u],issues:[]},n);d instanceof Promise?a.push(d.then(f=>{l[u]=f})):l[u]=d}if(t.rest){let u=r.length-1,d=o.slice(r.length);for(let f of d){u++;let p=t.rest._zod.run({value:f,issues:[]},n);p instanceof Promise?a.push(p.then(g=>nv(g,i,u))):nv(p,i,u)}}return a.length?Promise.all(a).then(()=>rv(l,i,r,o,c)):rv(l,i,r,o,c)}});Rl=h("$ZodRecord",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!He(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let o=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.add(typeof l=="number"?l.toString():l);let u=t.keyType._zod.run({value:l,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>de(p,i,Y())),input:l,path:[l],inst:e});continue}let d=u.value,f=t.valueType._zod.run({value:n[l],issues:[]},i);f instanceof Promise?o.push(f.then(p=>{p.issues.length&&r.issues.push(...he(l,p.issues)),r.value[d]=p.value})):(f.issues.length&&r.issues.push(...he(l,f.issues)),r.value[d]=f.value)}let c;for(let l in n)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&yi.test(s)&&c.issues.length){let d=t.keyType._zod.run({value:Number(s),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>de(d,i,Y())),input:s,path:[s],inst:e});continue}let u=t.valueType._zod.run({value:n[s],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...he(s,d.issues)),r.value[c.value]=d.value})):(u.issues.length&&r.issues.push(...he(s,u.issues)),r.value[c.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Ml=h("$ZodMap",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let o=[];r.value=new Map;for(let[a,s]of n){let c=t.keyType._zod.run({value:a,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([u,d])=>{iv(u,d,r,a,n,e,i)})):iv(c,l,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});Fl=h("$ZodSet",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let a of n){let s=t.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(c=>ov(c,r))):ov(s,r)}return o.length?Promise.all(o).then(()=>r):r}});Zl=h("$ZodEnum",(e,t)=>{L.init(e,t);let r=Nn(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>jn.has(typeof n)).map(n=>typeof n=="string"?ke(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),ql=h("$ZodLiteral",(e,t)=>{if(L.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?ke(i):i?ke(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),Vl=h("$ZodFile",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Bl=h("$ZodTransform",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Je(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r.fallback=!0,r));if(n instanceof Promise)throw new Ie;return r.value=n,r.fallback=!0,r}});Ti=h("$ZodOptional",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.optout="optional",M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),M(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Cn(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let n=r.value,o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(a=>av(a,n)):av(o,n)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Kl=h("$ZodExactOptional",(e,t)=>{Ti.init(e,t),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Jl=h("$ZodNullable",(e,t)=>{L.init(e,t),M(e._zod,"optin",()=>t.innerType._zod.optin),M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Cn(r.source)}|null)$`):void 0}),M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Gl=h("$ZodDefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>sv(o,t)):sv(n,t)}});Wl=h("$ZodPrefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Hl=h("$ZodNonOptional",(e,t)=>{L.init(e,t),M(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>cv(o,e)):cv(n,e)}});Yl=h("$ZodSuccess",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Je("ZodSuccess");let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Xl=h("$ZodCatch",(e,t)=>{L.init(e,t),e._zod.optin="optional",M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>de(a,i,Y()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>de(o,i,Y()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Ql=h("$ZodNaN",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Pi=h("$ZodPipe",(e,t)=>{L.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>wi(a,t.in,i)):wi(o,t.in,i)}let n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>wi(o,t.out,i)):wi(n,t.out,i)}});Kn=h("$ZodCodec",(e,t)=>{L.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>ki(a,t,i)):ki(o,t,i)}else{let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>ki(a,t,i)):ki(o,t,i)}}});eu=h("$ZodPreprocess",(e,t)=>{Pi.init(e,t)}),tu=h("$ZodReadonly",(e,t)=>{L.init(e,t),M(e._zod,"propValues",()=>t.innerType._zod.propValues),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"optin",()=>t.innerType?._zod?.optin),M(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(lv):lv(n)}});nu=h("$ZodTemplateLiteral",(e,t)=>{L.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a))}else if(i===null||Vs.has(typeof i))r.push(ke(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),ru=h("$ZodFunction",(e,t)=>(L.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=e._def.input?si(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?si(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=e._def.input?await ci(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await ci(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Ei({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),iu=h("$ZodPromise",(e,t)=>{L.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),ou=h("$ZodLazy",(e,t)=>{L.init(e,t),M(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),M(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),M(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),M(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),M(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),au=h("$ZodCustom",(e,t)=>{W.init(e,t),L.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>uv(o,r,i,e));uv(n,r,i,e)}})});function gv(){return{localeError:fO()}}var fO,vv=S(()=>{C();fO=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\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 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return n.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 ${$(n.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: ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()} ${a.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${n.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${y(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.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 ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function yv(){return{localeError:pO()}}var pO,bv=S(()=>{C();pO=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${$(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function _v(e,t,r,i){let n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}function $v(){return{localeError:mO()}}var mO,xv=S(()=>{C();mO=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return n.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 ${$(n.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 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=_v(s,a.unit.one,a.unit.few,a.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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.maximum.toString()} ${c}`}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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=_v(s,a.unit.one,a.unit.few,a.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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${y(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function wv(){return{localeError:hO()}}var hO,kv=S(()=>{C();hO=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${$(n.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 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.maximum.toString()} ${a.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 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.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 "${o.prefix}"`;if(o.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 "${o.suffix}"`;if(o.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 "${o.includes}"`;if(o.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 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${y(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function Sv(){return{localeError:gO()}}var gO,Iv=S(()=>{C();gO=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${$(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${y(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}}});function Ov(){return{localeError:vO()}}var vO,Av=S(()=>{C();vO=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${$(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${y(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}}});function Ev(){return{localeError:yO()}}var yO,Tv=S(()=>{C();yO=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={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-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${$(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}}});function Pv(){return{localeError:bO()}}var bO,zv=S(()=>{C();bO=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={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",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${$(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function Nv(){return{localeError:_O()}}var _O,Cv=S(()=>{C();_O=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={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",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return typeof n.expected=="string"&&/^[A-Z]/.test(n.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 ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\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 ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return n.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 ${$(n.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 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${n.maximum.toString()} ${a.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 ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${n.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${y(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.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 ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}}});function zi(){return{localeError:$O()}}var $O,cu=S(()=>{C();$O=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={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",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${$(n.values[0])}`:`Invalid option: expected one of ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}}});function jv(){return{localeError:xO()}}var xO,Dv=S(()=>{C();xO=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${$(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}}});function Uv(){return{localeError:wO()}}var wO,Lv=S(()=>{C();wO=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"entrada"},i={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 n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${$(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}}});function Rv(){return{localeError:kO()}}var kO,Mv=S(()=>{C();kO=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \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 ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${$(n.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 ${y(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.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 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${y(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.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 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function Fv(){return{localeError:SO()}}var SO,Zv=S(()=>{C();SO=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={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",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${$(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${y(n.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 qv(){return{localeError:IO()}}var IO,Vv=S(()=>{C();IO=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",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",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",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",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:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${$(n.values[0])} attendu`:`Option invalide : une valeur parmi ${y(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function Bv(){return{localeError:OO()}}var OO,Kv=S(()=>{C();OO=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${$(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${y(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function Jv(){return{localeError:AO()}}var AO,Gv=S(()=>{C();AO=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=l=>l?e[l]:void 0,i=l=>{let u=r(l);return u?u.label:l??e.unknown.label},n=l=>`\u05D4${i(l)}`,o=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=l=>l?t[l]??null:null,s={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"},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"},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"},jwt:{label:"JWT",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"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let u=l.expected,d=c[u??""]??i(u),f=x(l.input),p=c[f]??e[f]?.label??f;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(l.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 ${$(l.values[0])}`;let u=l.values.map(p=>$(p));if(l.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 ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.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 ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let g=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(l.origin==="array"||l.origin==="set"){let g=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",m=l.inclusive?`${l.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${m}`.trim()}let f=l.inclusive?"<=":"<",p=o(l.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${l.maximum.toString()}`}case"too_small":{let u=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let g=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(l.origin==="array"||l.origin==="set"){let g=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let v=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`}let m=l.inclusive?`${l.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${m}`.trim()}let f=l.inclusive?">=":">",p=o(l.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${l.minimum.toString()}`}case"invalid_format":{let u=l;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.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 ${u.pattern}`;let d=s[u.format],f=d?.label??u.format,g=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${g}`}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 ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${y(l.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${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function Wv(){return{localeError:EO()}}var EO,Hv=S(()=>{C();EO=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={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",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={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 n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${$(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${r[o.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${y(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[n.origin]??n.origin}`;default:return"Neispravan unos"}}}});function Yv(){return{localeError:TO()}}var TO,Xv=S(()=>{C();TO=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${$(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function Qv(e,t,r){return Math.abs(e)===1?t:r}function qt(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}function ey(){return{localeError:PO()}}var PO,ty=S(()=>{C();PO=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\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 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return n.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 ${$(n.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 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Qv(s,a.unit.one,a.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 ${qt(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.maximum.toString()} ${c}`}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 ${qt(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Qv(s,a.unit.one,a.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 ${qt(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.minimum.toString()} ${c}`}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 ${qt(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.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 ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??n.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 ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${y(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${qt(n.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 ${qt(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function ny(){return{localeError:zO()}}var zO,ry=S(()=>{C();zO=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${$(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}}});function iy(){return{localeError:NO()}}var NO,oy=S(()=>{C();NO=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${$(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${y(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}}});function ay(){return{localeError:CO()}}var CO,sy=S(()=>{C();CO=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={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",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${$(n.values[0])}`:`Opzione non valida: atteso uno tra ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${y(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}}});function cy(){return{localeError:jO()}}var jO,ly=S(()=>{C();jO=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${$(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${y(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.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${n.keys.length>1?"\u7FA4":""}: ${y(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function uy(){return{localeError:DO()}}var DO,dy=S(()=>{C();DO=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={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 n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\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 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return n.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 ${$(n.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 ${y(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\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 ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.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 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"-\u10D8\u10D7`:o.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 "${o.suffix}"-\u10D8\u10D7`:o.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 "${o.includes}"-\u10E1`:o.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 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??n.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 ${n.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${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${y(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.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 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function Ni(){return{localeError:UO()}}var UO,lu=S(()=>{C();UO=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={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 n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\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 ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return n.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 ${$(n.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 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${y(n.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 ${n.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 ${n.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 fy(){return Ni()}var py=S(()=>{lu()});function my(){return{localeError:LO()}}var LO,hy=S(()=>{C();LO=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${$(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${y(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${a}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${y(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function gy(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}function vy(){return{localeError:RO()}}var Jn,RO,yy=S(()=>{C();Jn=e=>e.charAt(0).toUpperCase()+e.slice(1);RO=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,o,a,s){let c=e[n]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let r={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",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",jwt:"JWT",template_literal:"\u012Fvestis"},i={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 n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${$(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${y(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,a=t(n.origin,gy(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Jn(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Jn(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,a=t(n.origin,gy(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Jn(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Jn(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${y(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${Jn(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function by(){return{localeError:MO()}}var MO,_y=S(()=>{C();MO=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${$(n.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 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.maximum.toString()} ${a.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`Invalid ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`${n.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"}: ${y(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.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 ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function $y(){return{localeError:FO()}}var FO,xy=S(()=>{C();FO=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={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",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${$(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${y(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}}});function wy(){return{localeError:ZO()}}var ZO,ky=S(()=>{C();ZO=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={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",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${$(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}}});function Sy(){return{localeError:qO()}}var qO,Iy=S(()=>{C();qO=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={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-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${$(n.values[0])}`:`Ugyldig valg: forventet en av ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}}});function Oy(){return{localeError:VO()}}var VO,Ay=S(()=>{C();VO=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={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",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${$(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function Ey(){return{localeError:BO()}}var BO,Ty=S(()=>{C();BO=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${$(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${y(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${y(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.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 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function Py(){return{localeError:KO()}}var KO,zy=S(()=>{C();KO=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${$(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function Ny(){return{localeError:JO()}}var JO,Cy=S(()=>{C();JO=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de 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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${$(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${y(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}}});function jy(){return{localeError:GO()}}var GO,Dy=S(()=>{C();GO=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={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",jwt:"JWT",template_literal:"intrare"},i={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 n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${$(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${r[o.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${y(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}}});function Uy(e,t,r,i){let n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}function Ly(){return{localeError:WO()}}var WO,Ry=S(()=>{C();WO=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${$(n.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 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Uy(s,a.unit.one,a.unit.few,a.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.maximum.toString()} ${c}`}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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Uy(s,a.unit.one,a.unit.few,a.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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.minimum.toString()} ${c}`}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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${y(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.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 My(){return{localeError:HO()}}var HO,Fy=S(()=>{C();HO=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={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",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${$(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${y(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}}});function Zy(){return{localeError:YO()}}var YO,qy=S(()=>{C();YO=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={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-intervall",ipv6:"IPv6-intervall",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",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${$(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${y(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function Vy(){return{localeError:XO()}}var XO,By=S(()=>{C();XO=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\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 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return n.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 ${$(n.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 ${y(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} ${a.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\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 ${n.origin} ${o}${n.minimum.toString()} ${a.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 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.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 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.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${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.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`${n.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 Ky(){return{localeError:QO()}}var QO,Jy=S(()=>{C();QO=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={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",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)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={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 n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\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 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${$(n.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 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.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 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.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 ${n.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: ${y(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.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 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function Gy(){return{localeError:eA()}}var eA,Wy=S(()=>{C();eA=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${$(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function Ci(){return{localeError:tA()}}var tA,uu=S(()=>{C();tA=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.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 ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\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 ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return n.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 ${$(n.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 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${n.maximum.toString()} ${a.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${y(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.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 Hy(){return Ci()}var Yy=S(()=>{uu()});function Xy(){return{localeError:nA()}}var nA,Qy=S(()=>{C();nA=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={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",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",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${$(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${y(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.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${n.keys.length>1?"\u0632":""}: ${y(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function eb(){return{localeError:rA()}}var rA,tb=S(()=>{C();rA=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={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",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${$(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function nb(){return{localeError:iA()}}var iA,rb=S(()=>{C();iA=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${$(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${y(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.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 ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function ib(){return{localeError:oA()}}var oA,ob=S(()=>{C();oA=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${$(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${y(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function ab(){return{localeError:aA()}}var aA,sb=S(()=>{C();aA=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${$(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${y(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function cb(){return{localeError:sA()}}var sA,lb=S(()=>{C();sA=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={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",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",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=x(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${$(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${y(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{let o=n;return o.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 "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${y(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.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 ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var Gn={};oe(Gn,{ar:()=>gv,az:()=>yv,be:()=>$v,bg:()=>wv,ca:()=>Sv,cs:()=>Ov,da:()=>Ev,de:()=>Pv,el:()=>Nv,en:()=>zi,eo:()=>jv,es:()=>Uv,fa:()=>Rv,fi:()=>Fv,fr:()=>qv,frCA:()=>Bv,he:()=>Jv,hr:()=>Wv,hu:()=>Yv,hy:()=>ey,id:()=>ny,is:()=>iy,it:()=>ay,ja:()=>cy,ka:()=>uy,kh:()=>fy,km:()=>Ni,ko:()=>my,lt:()=>vy,mk:()=>by,ms:()=>$y,nl:()=>wy,no:()=>Sy,ota:()=>Oy,pl:()=>Py,ps:()=>Ey,pt:()=>Ny,ro:()=>jy,ru:()=>Ly,sl:()=>My,sv:()=>Zy,ta:()=>Vy,th:()=>Ky,tr:()=>Gy,ua:()=>Hy,uk:()=>Ci,ur:()=>Xy,uz:()=>eb,vi:()=>nb,yo:()=>cb,zhCN:()=>ib,zhTW:()=>ab});var du=S(()=>{vv();bv();xv();kv();Iv();Av();Tv();zv();Cv();cu();Dv();Lv();Mv();Zv();Vv();Kv();Gv();Hv();Xv();ty();ry();oy();sy();ly();dy();py();lu();hy();yy();_y();xy();ky();Iy();Ay();Ty();zy();Cy();Dy();Ry();Fy();qy();By();Jy();Wy();Yy();uu();Qy();tb();rb();ob();sb();lb()});function Di(){return new ji}var ub,fu,pu,ji,re,Wn=S(()=>{fu=Symbol("ZodOutput"),pu=Symbol("ZodInput"),ji=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(ub=globalThis).__zod_globalRegistry??(ub.__zod_globalRegistry=Di());re=globalThis.__zod_globalRegistry});function mu(e,t){return new e({type:"string",...I(t)})}function hu(e,t){return new e({type:"string",coerce:!0,...I(t)})}function Ui(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...I(t)})}function Hn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...I(t)})}function Li(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...I(t)})}function Ri(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...I(t)})}function Mi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...I(t)})}function Fi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...I(t)})}function Yn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...I(t)})}function Zi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...I(t)})}function qi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...I(t)})}function Vi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...I(t)})}function Bi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...I(t)})}function Ki(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...I(t)})}function Ji(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...I(t)})}function Gi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...I(t)})}function Wi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...I(t)})}function Hi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...I(t)})}function gu(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...I(t)})}function Yi(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...I(t)})}function Xi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...I(t)})}function Qi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...I(t)})}function eo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...I(t)})}function to(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...I(t)})}function no(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...I(t)})}function yu(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...I(t)})}function bu(e,t){return new e({type:"string",format:"date",check:"string_format",...I(t)})}function _u(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...I(t)})}function $u(e,t){return new e({type:"string",format:"duration",check:"string_format",...I(t)})}function xu(e,t){return new e({type:"number",checks:[],...I(t)})}function wu(e,t){return new e({type:"number",coerce:!0,checks:[],...I(t)})}function ku(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...I(t)})}function Su(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...I(t)})}function Iu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...I(t)})}function Ou(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...I(t)})}function Au(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...I(t)})}function Eu(e,t){return new e({type:"boolean",...I(t)})}function Tu(e,t){return new e({type:"boolean",coerce:!0,...I(t)})}function Pu(e,t){return new e({type:"bigint",...I(t)})}function zu(e,t){return new e({type:"bigint",coerce:!0,...I(t)})}function Nu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...I(t)})}function Cu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...I(t)})}function ju(e,t){return new e({type:"symbol",...I(t)})}function Du(e,t){return new e({type:"undefined",...I(t)})}function Uu(e,t){return new e({type:"null",...I(t)})}function Lu(e){return new e({type:"any"})}function Ru(e){return new e({type:"unknown"})}function Mu(e,t){return new e({type:"never",...I(t)})}function Fu(e,t){return new e({type:"void",...I(t)})}function Zu(e,t){return new e({type:"date",...I(t)})}function qu(e,t){return new e({type:"date",coerce:!0,...I(t)})}function Vu(e,t){return new e({type:"nan",...I(t)})}function Pe(e,t){return new _i({check:"less_than",...I(t),value:e,inclusive:!1})}function $e(e,t){return new _i({check:"less_than",...I(t),value:e,inclusive:!0})}function ze(e,t){return new $i({check:"greater_than",...I(t),value:e,inclusive:!1})}function fe(e,t){return new $i({check:"greater_than",...I(t),value:e,inclusive:!0})}function ro(e){return ze(0,e)}function io(e){return Pe(0,e)}function oo(e){return $e(0,e)}function ao(e){return fe(0,e)}function Xe(e,t){return new Tc({check:"multiple_of",...I(t),value:e})}function Qe(e,t){return new Nc({check:"max_size",...I(t),maximum:e})}function Ne(e,t){return new Cc({check:"min_size",...I(t),minimum:e})}function _t(e,t){return new jc({check:"size_equals",...I(t),size:e})}function $t(e,t){return new Dc({check:"max_length",...I(t),maximum:e})}function Fe(e,t){return new Uc({check:"min_length",...I(t),minimum:e})}function xt(e,t){return new Lc({check:"length_equals",...I(t),length:e})}function Vt(e,t){return new Rc({check:"string_format",format:"regex",...I(t),pattern:e})}function Bt(e){return new Mc({check:"string_format",format:"lowercase",...I(e)})}function Kt(e){return new Fc({check:"string_format",format:"uppercase",...I(e)})}function Jt(e,t){return new Zc({check:"string_format",format:"includes",...I(t),includes:e})}function Gt(e,t){return new qc({check:"string_format",format:"starts_with",...I(t),prefix:e})}function Wt(e,t){return new Vc({check:"string_format",format:"ends_with",...I(t),suffix:e})}function so(e,t,r){return new Bc({check:"property",property:e,schema:t,...I(r)})}function Ht(e,t){return new Kc({check:"mime_type",mime:e,...I(t)})}function Oe(e){return new Jc({check:"overwrite",tx:e})}function Yt(e){return Oe(t=>t.normalize(e))}function Xt(){return Oe(e=>e.trim())}function Qt(){return Oe(e=>e.toLowerCase())}function en(){return Oe(e=>e.toUpperCase())}function tn(){return Oe(e=>Fs(e))}function Bu(e,t,r){return new e({type:"array",element:t,...I(r)})}function lA(e,t,r){return new e({type:"union",options:t,...I(r)})}function uA(e,t,r){return new e({type:"union",options:t,inclusive:!1,...I(r)})}function dA(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...I(i)})}function fA(e,t,r){return new e({type:"intersection",left:t,right:r})}function pA(e,t,r,i){let n=r instanceof L,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...I(o)})}function mA(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...I(i)})}function hA(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...I(i)})}function gA(e,t,r){return new e({type:"set",valueType:t,...I(r)})}function vA(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...I(r)})}function yA(e,t,r){return new e({type:"enum",entries:t,...I(r)})}function bA(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...I(r)})}function Ku(e,t){return new e({type:"file",...I(t)})}function _A(e,t){return new e({type:"transform",transform:t})}function $A(e,t){return new e({type:"optional",innerType:t})}function xA(e,t){return new e({type:"nullable",innerType:t})}function wA(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():qs(r)}})}function kA(e,t,r){return new e({type:"nonoptional",innerType:t,...I(r)})}function SA(e,t){return new e({type:"success",innerType:t})}function IA(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function OA(e,t,r){return new e({type:"pipe",in:t,out:r})}function AA(e,t){return new e({type:"readonly",innerType:t})}function EA(e,t,r){return new e({type:"template_literal",parts:t,...I(r)})}function TA(e,t){return new e({type:"lazy",getter:t})}function PA(e,t){return new e({type:"promise",innerType:t})}function Ju(e,t,r){let i=I(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Gu(e,t,r){return new e({type:"custom",check:"custom",fn:t,...I(r)})}function Wu(e,t){let r=db(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(Ut(n,i.value,r._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(Ut(o))}},e(i.value,i)),t);return r}function db(e,t){let r=new W({check:"custom",...I(t)});return r._zod.check=e,r}function Hu(e){let t=new W({check:"describe"});return t._zod.onattach=[r=>{let i=re.get(r)??{};re.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function Yu(e){let t=new W({check:"meta"});return t._zod.onattach=[r=>{let i=re.get(r)??{};re.add(r,{...i,...e})}],t._zod.check=()=>{},t}function Xu(e,t){let r=I(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(p=>typeof p=="string"?p.toLowerCase():p),n=n.map(p=>typeof p=="string"?p.toLowerCase():p));let o=new Set(i),a=new Set(n),s=e.Codec??Kn,c=e.Boolean??Vn,l=e.String??bt,u=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),f=new s({type:"pipe",in:u,out:d,transform:((p,g)=>{let m=p;return r.case!=="sensitive"&&(m=m.toLowerCase()),o.has(m)?!0:a.has(m)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:g.value,inst:f,continue:!1}),{})}),reverseTransform:((p,g)=>p===!0?i[0]||"true":n[0]||"false"),error:r.error});return f}function nn(e,t,r,i={}){let n=I(i),o={...I(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}var vu,fb=S(()=>{xi();Wn();su();C();vu={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function et(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??re,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function B(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,u);else{let f=a.schema,p=t.processors[n.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);p(e,t,f,u)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),B(d,t,u),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&pe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function tt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=i.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,f=e.external.uri??(g=>g);if(d)return{ref:f(d)};let p=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=p,{defId:p,ref:`${f("__shared")}#/${s}/${p}`}}if(a[1]===r)return{ref:"#"};let l=`#/${s}/`,u=a[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+u}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=n(a);s.def={...s.schema},l&&(s.defId=l);let u=s.schema;for(let d in u)delete u[d];u.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
149
|
+
|
|
150
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){o(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&e.reused==="ref"){o(a);continue}}}function nt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){i(d);let p=e.seen.get(d),g=p.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(g)):Object.assign(l,g),Object.assign(l,u),s._zod.parent===d)for(let v in l)v==="$ref"||v==="allOf"||v in u||delete l[v];if(g.$ref&&p.def)for(let v in l)v==="$ref"||v==="allOf"||v in p.def&&JSON.stringify(l[v])===JSON.stringify(p.def[v])&&delete l[v]}let f=s._zod.parent;if(f&&f!==d){i(f);let p=e.seen.get(f);if(p?.schema.$ref&&(l.$ref=p.schema.$ref,p.def))for(let g in l)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(l[g])===JSON.stringify(p.def[g])&&delete l[g]}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())i(s[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&n.id===o&&delete n.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:rn(t,"input",e.processors),output:rn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function pe(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return pe(i.element,r);if(i.type==="set")return pe(i.valueType,r);if(i.type==="lazy")return pe(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return pe(i.innerType,r);if(i.type==="intersection")return pe(i.left,r)||pe(i.right,r);if(i.type==="record"||i.type==="map")return pe(i.keyType,r)||pe(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:pe(i.in,r)||pe(i.out,r);if(i.type==="object"){for(let n in i.shape)if(pe(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(pe(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(pe(n,r))return!0;return!!(i.rest&&pe(i.rest,r))}return!1}var Qu,rn,Xn=S(()=>{Wn();Qu=(e,t={})=>r=>{let i=et({...r,processors:t});return B(e,i),tt(i,e),nt(i,e)},rn=(e,t,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},a=et({...n??{},target:o,io:t,processors:r});return B(e,a),tt(a,e),nt(a,e)}});function fo(e,t){if("_idmap"in e){let i=e,n=et({...t,processors:co}),o={};for(let c of i._idmap.entries()){let[l,u]=c;B(u,n)}let a={},s={registry:i,uri:t?.uri,defs:o};n.external=s;for(let c of i._idmap.entries()){let[l,u]=c;tt(n,u),a[l]=nt(n,u)}if(Object.keys(o).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let r=et({...t,processors:co});return B(e,r),tt(r,e),nt(r,e)}var zA,ed,td,nd,rd,id,od,ad,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,vd,yd,bd,_d,$d,xd,wd,kd,lo,Sd,Id,Od,Ad,Ed,Td,Pd,zd,Nd,Cd,jd,uo,Dd,co,Qn=S(()=>{Xn();C();zA={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ed=(e,t,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),s&&(n.format=zA[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let u=[...c];u.length===1?n.pattern=u[0].source:u.length>1&&(n.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},td=(e,t,r,i)=>{let n=r,{minimum:o,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number";let d=typeof u=="number"&&u>=(o??Number.NEGATIVE_INFINITY),f=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";d?p?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u:typeof o=="number"&&(n.minimum=o),f?p?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(n.multipleOf=c)},nd=(e,t,r,i)=>{r.type="boolean"},rd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},id=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},od=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},ad=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},sd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},cd=(e,t,r,i)=>{r.not={}},ld=(e,t,r,i)=>{},ud=(e,t,r,i)=>{},dd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},fd=(e,t,r,i)=>{let n=e._zod.def,o=Nn(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},pd=(e,t,r,i)=>{let n=e._zod.def,o=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},md=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},hd=(e,t,r,i)=>{let n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},gd=(e,t,r,i)=>{let n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),c?c.length===1?(o.contentMediaType=c[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(n,o)},vd=(e,t,r,i)=>{r.type="boolean"},yd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},bd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},_d=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},$d=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},xd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},wd=(e,t,r,i)=>{let n=r,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=B(o.element,t,{...i,path:[...i.path,"items"]})},kd=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object",n.properties={};let a=o.shape;for(let l in a)n.properties[l]=B(a[l],t,{...i,path:[...i.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(l=>{let u=o.shape[l]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(n.required=Array.from(c)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=B(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},lo=(e,t,r,i)=>{let n=e._zod.def,o=n.inclusive===!1,a=n.options.map((s,c)=>B(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},Sd=(e,t,r,i)=>{let n=e._zod.def,o=B(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=B(n.right,t,{...i,path:[...i.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];r.allOf=c},Id=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((f,p)=>B(f,t,{...i,path:[...i.path,a,p]})),l=o.rest?B(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),n.minItems=c.length,l||(n.maxItems=c.length)):(n.items=c,l&&(n.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(n.minItems=u),typeof d=="number"&&(n.maxItems=d)},Od=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object";let a=o.keyType,c=a._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let u=B(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let d of c)n.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=B(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=B(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=a._zod.values;if(l){let u=[...l].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(n.required=u)}},Ad=(e,t,r,i)=>{let n=e._zod.def,o=B(n.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Ed=(e,t,r,i)=>{let n=e._zod.def;B(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},Td=(e,t,r,i)=>{let n=e._zod.def;B(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Pd=(e,t,r,i)=>{let n=e._zod.def;B(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},zd=(e,t,r,i)=>{let n=e._zod.def;B(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Nd=(e,t,r,i)=>{let n=e._zod.def,o=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?n.out:n.in:n.out;B(a,t,i);let s=t.seen.get(e);s.ref=a},Cd=(e,t,r,i)=>{let n=e._zod.def;B(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},jd=(e,t,r,i)=>{let n=e._zod.def;B(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},uo=(e,t,r,i)=>{let n=e._zod.def;B(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},Dd=(e,t,r,i)=>{let n=e._zod.innerType;B(n,t,i);let o=t.seen.get(e);o.ref=n},co={string:ed,number:td,boolean:nd,bigint:rd,symbol:id,null:od,undefined:ad,void:sd,never:cd,any:ld,unknown:ud,date:dd,enum:fd,literal:pd,nan:md,template_literal:hd,file:gd,success:vd,custom:yd,function:bd,transform:_d,map:$d,set:xd,array:wd,object:kd,union:lo,intersection:Sd,tuple:Id,record:Od,nullable:Ad,nonoptional:Ed,default:Td,prefault:Pd,catch:zd,pipe:Nd,readonly:Cd,promise:jd,optional:uo,lazy:Dd}});var po,pb=S(()=>{Qn();Xn();po=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=et({processors:co,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return B(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),tt(this.ctx,t);let i=nt(this.ctx,t),{"~standard":n,...o}=i;return o}}});var mb={};var hb=S(()=>{});var Ze={};oe(Ze,{$ZodAny:()=>El,$ZodArray:()=>Cl,$ZodAsyncError:()=>Ie,$ZodBase64:()=>bl,$ZodBase64URL:()=>_l,$ZodBigInt:()=>Ai,$ZodBigIntFormat:()=>Sl,$ZodBoolean:()=>Vn,$ZodCIDRv4:()=>gl,$ZodCIDRv6:()=>vl,$ZodCUID:()=>il,$ZodCUID2:()=>ol,$ZodCatch:()=>Xl,$ZodCheck:()=>W,$ZodCheckBigIntFormat:()=>zc,$ZodCheckEndsWith:()=>Vc,$ZodCheckGreaterThan:()=>$i,$ZodCheckIncludes:()=>Zc,$ZodCheckLengthEquals:()=>Lc,$ZodCheckLessThan:()=>_i,$ZodCheckLowerCase:()=>Mc,$ZodCheckMaxLength:()=>Dc,$ZodCheckMaxSize:()=>Nc,$ZodCheckMimeType:()=>Kc,$ZodCheckMinLength:()=>Uc,$ZodCheckMinSize:()=>Cc,$ZodCheckMultipleOf:()=>Tc,$ZodCheckNumberFormat:()=>Pc,$ZodCheckOverwrite:()=>Jc,$ZodCheckProperty:()=>Bc,$ZodCheckRegex:()=>Rc,$ZodCheckSizeEquals:()=>jc,$ZodCheckStartsWith:()=>qc,$ZodCheckStringFormat:()=>Zt,$ZodCheckUpperCase:()=>Fc,$ZodCodec:()=>Kn,$ZodCustom:()=>au,$ZodCustomStringFormat:()=>wl,$ZodDate:()=>Nl,$ZodDefault:()=>Gl,$ZodDiscriminatedUnion:()=>Ul,$ZodE164:()=>$l,$ZodEmail:()=>el,$ZodEmoji:()=>nl,$ZodEncodeError:()=>Je,$ZodEnum:()=>Zl,$ZodError:()=>Ln,$ZodExactOptional:()=>Kl,$ZodFile:()=>Vl,$ZodFunction:()=>ru,$ZodGUID:()=>Xc,$ZodIPv4:()=>pl,$ZodIPv6:()=>ml,$ZodISODate:()=>ul,$ZodISODateTime:()=>ll,$ZodISODuration:()=>fl,$ZodISOTime:()=>dl,$ZodIntersection:()=>Ll,$ZodJWT:()=>xl,$ZodKSUID:()=>cl,$ZodLazy:()=>ou,$ZodLiteral:()=>ql,$ZodMAC:()=>hl,$ZodMap:()=>Ml,$ZodNaN:()=>Ql,$ZodNanoID:()=>rl,$ZodNever:()=>Pl,$ZodNonOptional:()=>Hl,$ZodNull:()=>Al,$ZodNullable:()=>Jl,$ZodNumber:()=>Oi,$ZodNumberFormat:()=>kl,$ZodObject:()=>hv,$ZodObjectJIT:()=>jl,$ZodOptional:()=>Ti,$ZodPipe:()=>Pi,$ZodPrefault:()=>Wl,$ZodPreprocess:()=>eu,$ZodPromise:()=>iu,$ZodReadonly:()=>tu,$ZodRealError:()=>ge,$ZodRecord:()=>Rl,$ZodRegistry:()=>ji,$ZodSet:()=>Fl,$ZodString:()=>bt,$ZodStringFormat:()=>J,$ZodSuccess:()=>Yl,$ZodSymbol:()=>Il,$ZodTemplateLiteral:()=>nu,$ZodTransform:()=>Bl,$ZodTuple:()=>Ei,$ZodType:()=>L,$ZodULID:()=>al,$ZodURL:()=>tl,$ZodUUID:()=>Qc,$ZodUndefined:()=>Ol,$ZodUnion:()=>Bn,$ZodUnknown:()=>Tl,$ZodVoid:()=>zl,$ZodXID:()=>sl,$ZodXor:()=>Dl,$brand:()=>Us,$constructor:()=>h,$input:()=>pu,$output:()=>fu,Doc:()=>qn,JSONSchema:()=>mb,JSONSchemaGenerator:()=>po,NEVER:()=>Ds,TimePrecision:()=>vu,_any:()=>Lu,_array:()=>Bu,_base64:()=>Qi,_base64url:()=>eo,_bigint:()=>Pu,_boolean:()=>Eu,_catch:()=>IA,_check:()=>db,_cidrv4:()=>Yi,_cidrv6:()=>Xi,_coercedBigint:()=>zu,_coercedBoolean:()=>Tu,_coercedDate:()=>qu,_coercedNumber:()=>wu,_coercedString:()=>hu,_cuid:()=>Vi,_cuid2:()=>Bi,_custom:()=>Ju,_date:()=>Zu,_decode:()=>ui,_decodeAsync:()=>fi,_default:()=>wA,_discriminatedUnion:()=>dA,_e164:()=>to,_email:()=>Ui,_emoji:()=>Zi,_encode:()=>li,_encodeAsync:()=>di,_endsWith:()=>Wt,_enum:()=>vA,_file:()=>Ku,_float32:()=>Su,_float64:()=>Iu,_gt:()=>ze,_gte:()=>fe,_guid:()=>Hn,_includes:()=>Jt,_int:()=>ku,_int32:()=>Ou,_int64:()=>Nu,_intersection:()=>fA,_ipv4:()=>Wi,_ipv6:()=>Hi,_isoDate:()=>bu,_isoDateTime:()=>yu,_isoDuration:()=>$u,_isoTime:()=>_u,_jwt:()=>no,_ksuid:()=>Gi,_lazy:()=>TA,_length:()=>xt,_literal:()=>bA,_lowercase:()=>Bt,_lt:()=>Pe,_lte:()=>$e,_mac:()=>gu,_map:()=>hA,_max:()=>$e,_maxLength:()=>$t,_maxSize:()=>Qe,_mime:()=>Ht,_min:()=>fe,_minLength:()=>Fe,_minSize:()=>Ne,_multipleOf:()=>Xe,_nan:()=>Vu,_nanoid:()=>qi,_nativeEnum:()=>yA,_negative:()=>io,_never:()=>Mu,_nonnegative:()=>ao,_nonoptional:()=>kA,_nonpositive:()=>oo,_normalize:()=>Yt,_null:()=>Uu,_nullable:()=>xA,_number:()=>xu,_optional:()=>$A,_overwrite:()=>Oe,_parse:()=>Lt,_parseAsync:()=>Rt,_pipe:()=>OA,_positive:()=>ro,_promise:()=>PA,_property:()=>so,_readonly:()=>AA,_record:()=>mA,_refine:()=>Gu,_regex:()=>Vt,_safeDecode:()=>mi,_safeDecodeAsync:()=>gi,_safeEncode:()=>pi,_safeEncodeAsync:()=>hi,_safeParse:()=>Mt,_safeParseAsync:()=>Ft,_set:()=>gA,_size:()=>_t,_slugify:()=>tn,_startsWith:()=>Gt,_string:()=>mu,_stringFormat:()=>nn,_stringbool:()=>Xu,_success:()=>SA,_superRefine:()=>Wu,_symbol:()=>ju,_templateLiteral:()=>EA,_toLowerCase:()=>Qt,_toUpperCase:()=>en,_transform:()=>_A,_trim:()=>Xt,_tuple:()=>pA,_uint32:()=>Au,_uint64:()=>Cu,_ulid:()=>Ki,_undefined:()=>Du,_union:()=>lA,_unknown:()=>Ru,_uppercase:()=>Kt,_url:()=>Yn,_uuid:()=>Li,_uuidv4:()=>Ri,_uuidv6:()=>Mi,_uuidv7:()=>Fi,_void:()=>Fu,_xid:()=>Ji,_xor:()=>uA,clone:()=>ue,config:()=>Y,createStandardJSONSchemaMethod:()=>rn,createToJSONSchemaMethod:()=>Qu,decode:()=>PI,decodeAsync:()=>NI,describe:()=>Hu,encode:()=>TI,encodeAsync:()=>zI,extractDefs:()=>tt,finalize:()=>nt,flattenError:()=>Rn,formatError:()=>Mn,globalConfig:()=>ht,globalRegistry:()=>re,initializeContext:()=>et,isValidBase64:()=>yl,isValidBase64URL:()=>dv,isValidJWT:()=>fv,locales:()=>Gn,meta:()=>Yu,parse:()=>si,parseAsync:()=>ci,prettifyError:()=>Hs,process:()=>B,regexes:()=>_e,registry:()=>Di,safeDecode:()=>jI,safeDecodeAsync:()=>UI,safeEncode:()=>CI,safeEncodeAsync:()=>DI,safeParse:()=>Xs,safeParseAsync:()=>Qs,toDotPath:()=>Vg,toJSONSchema:()=>fo,treeifyError:()=>Ws,util:()=>k,version:()=>Wc});var xe=S(()=>{gt();ec();Ys();su();xi();Hc();C();bi();du();Wn();Gc();fb();Xn();Qn();pb();hb()});var mo={};oe(mo,{endsWith:()=>Wt,gt:()=>ze,gte:()=>fe,includes:()=>Jt,length:()=>xt,lowercase:()=>Bt,lt:()=>Pe,lte:()=>$e,maxLength:()=>$t,maxSize:()=>Qe,mime:()=>Ht,minLength:()=>Fe,minSize:()=>Ne,multipleOf:()=>Xe,negative:()=>io,nonnegative:()=>ao,nonpositive:()=>oo,normalize:()=>Yt,overwrite:()=>Oe,positive:()=>ro,property:()=>so,regex:()=>Vt,size:()=>_t,slugify:()=>tn,startsWith:()=>Gt,toLowerCase:()=>Qt,toUpperCase:()=>en,trim:()=>Xt,uppercase:()=>Kt});var ho=S(()=>{xe()});var on={};oe(on,{ZodISODate:()=>vo,ZodISODateTime:()=>go,ZodISODuration:()=>bo,ZodISOTime:()=>yo,date:()=>Ld,datetime:()=>Ud,duration:()=>Md,time:()=>Rd});function Ud(e){return yu(go,e)}function Ld(e){return bu(vo,e)}function Rd(e){return _u(yo,e)}function Md(e){return $u(bo,e)}var go,vo,yo,bo,er=S(()=>{xe();nr();go=h("ZodISODateTime",(e,t)=>{ll.init(e,t),G.init(e,t)});vo=h("ZodISODate",(e,t)=>{ul.init(e,t),G.init(e,t)});yo=h("ZodISOTime",(e,t)=>{dl.init(e,t),G.init(e,t)});bo=h("ZodISODuration",(e,t)=>{fl.init(e,t),G.init(e,t)})});var gb,CA,ve,Fd=S(()=>{xe();xe();C();gb=(e,t)=>{Ln.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Mn(e,r)},flatten:{value:r=>Rn(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,jt,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,jt,2)}},isEmpty:{get(){return e.issues.length===0}}})},CA=h("ZodError",gb),ve=h("ZodError",gb,{Parent:Error})});var Zd,qd,Vd,Bd,Kd,Jd,Gd,Wd,Hd,Yd,Xd,Qd,ef=S(()=>{xe();Fd();Zd=Lt(ve),qd=Rt(ve),Vd=Mt(ve),Bd=Ft(ve),Kd=li(ve),Jd=ui(ve),Gd=di(ve),Wd=fi(ve),Hd=pi(ve),Yd=mi(ve),Xd=hi(ve),Qd=gi(ve)});var tr={};oe(tr,{ZodAny:()=>lf,ZodArray:()=>pf,ZodBase64:()=>jo,ZodBase64URL:()=>Do,ZodBigInt:()=>fn,ZodBigIntFormat:()=>Ro,ZodBoolean:()=>dn,ZodCIDRv4:()=>No,ZodCIDRv6:()=>Co,ZodCUID:()=>Io,ZodCUID2:()=>Oo,ZodCatch:()=>jf,ZodCodec:()=>mr,ZodCustom:()=>hr,ZodCustomStringFormat:()=>ln,ZodDate:()=>lr,ZodDefault:()=>Ef,ZodDiscriminatedUnion:()=>hf,ZodE164:()=>Uo,ZodEmail:()=>wo,ZodEmoji:()=>ko,ZodEnum:()=>sn,ZodExactOptional:()=>If,ZodFile:()=>kf,ZodFunction:()=>Bf,ZodGUID:()=>ir,ZodIPv4:()=>Po,ZodIPv6:()=>zo,ZodIntersection:()=>gf,ZodJWT:()=>Lo,ZodKSUID:()=>To,ZodLazy:()=>Zf,ZodLiteral:()=>wf,ZodMAC:()=>tf,ZodMap:()=>$f,ZodNaN:()=>Uf,ZodNanoID:()=>So,ZodNever:()=>df,ZodNonOptional:()=>Bo,ZodNull:()=>sf,ZodNullable:()=>Af,ZodNumber:()=>un,ZodNumberFormat:()=>kt,ZodObject:()=>dr,ZodOptional:()=>Vo,ZodPipe:()=>pr,ZodPrefault:()=>Pf,ZodPreprocess:()=>Lf,ZodPromise:()=>Vf,ZodReadonly:()=>Rf,ZodRecord:()=>an,ZodSet:()=>xf,ZodString:()=>cn,ZodStringFormat:()=>G,ZodSuccess:()=>Cf,ZodSymbol:()=>of,ZodTemplateLiteral:()=>Ff,ZodTransform:()=>Sf,ZodTuple:()=>yf,ZodType:()=>R,ZodULID:()=>Ao,ZodURL:()=>cr,ZodUUID:()=>Ce,ZodUndefined:()=>af,ZodUnion:()=>fr,ZodUnknown:()=>uf,ZodVoid:()=>ff,ZodXID:()=>Eo,ZodXor:()=>mf,_ZodString:()=>xo,_default:()=>Tf,_function:()=>k_,any:()=>t_,array:()=>ur,base64:()=>Lb,base64url:()=>Rb,bigint:()=>Hb,boolean:()=>rf,catch:()=>Df,check:()=>S_,cidrv4:()=>Db,cidrv6:()=>Ub,codec:()=>__,cuid:()=>Ab,cuid2:()=>Eb,custom:()=>I_,date:()=>r_,describe:()=>O_,discriminatedUnion:()=>l_,e164:()=>Mb,email:()=>yb,emoji:()=>Ib,enum:()=>Zo,exactOptional:()=>Of,file:()=>g_,float32:()=>Kb,float64:()=>Jb,function:()=>k_,guid:()=>bb,hash:()=>Bb,hex:()=>Vb,hostname:()=>qb,httpUrl:()=>Sb,instanceof:()=>E_,int:()=>_o,int32:()=>Gb,int64:()=>Yb,intersection:()=>vf,invertCodec:()=>$_,ipv4:()=>Nb,ipv6:()=>jb,json:()=>P_,jwt:()=>Fb,keyof:()=>i_,ksuid:()=>zb,lazy:()=>qf,literal:()=>h_,looseObject:()=>s_,looseRecord:()=>d_,mac:()=>Cb,map:()=>f_,meta:()=>A_,nan:()=>b_,nanoid:()=>Ob,nativeEnum:()=>m_,never:()=>Mo,nonoptional:()=>Nf,null:()=>cf,nullable:()=>ar,nullish:()=>v_,number:()=>nf,object:()=>o_,optional:()=>or,partialRecord:()=>u_,pipe:()=>$o,prefault:()=>zf,preprocess:()=>z_,promise:()=>w_,readonly:()=>Mf,record:()=>_f,refine:()=>Kf,set:()=>p_,strictObject:()=>a_,string:()=>rr,stringFormat:()=>Zb,stringbool:()=>T_,success:()=>y_,superRefine:()=>Jf,symbol:()=>Qb,templateLiteral:()=>x_,transform:()=>qo,tuple:()=>bf,uint32:()=>Wb,uint64:()=>Xb,ulid:()=>Tb,undefined:()=>e_,union:()=>Fo,unknown:()=>wt,url:()=>kb,uuid:()=>_b,uuidv4:()=>$b,uuidv6:()=>xb,uuidv7:()=>wb,void:()=>n_,xid:()=>Pb,xor:()=>c_});function sr(e,t,r){let i=Object.getPrototypeOf(e),n=vb.get(i);if(n||(n=new Set,vb.set(i,n)),!n.has(t)){n.add(t);for(let o in r){let a=r[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}function rr(e){return mu(cn,e)}function yb(e){return Ui(wo,e)}function bb(e){return Hn(ir,e)}function _b(e){return Li(Ce,e)}function $b(e){return Ri(Ce,e)}function xb(e){return Mi(Ce,e)}function wb(e){return Fi(Ce,e)}function kb(e){return Yn(cr,e)}function Sb(e){return Yn(cr,{protocol:_e.httpProtocol,hostname:_e.domain,...k.normalizeParams(e)})}function Ib(e){return Zi(ko,e)}function Ob(e){return qi(So,e)}function Ab(e){return Vi(Io,e)}function Eb(e){return Bi(Oo,e)}function Tb(e){return Ki(Ao,e)}function Pb(e){return Ji(Eo,e)}function zb(e){return Gi(To,e)}function Nb(e){return Wi(Po,e)}function Cb(e){return gu(tf,e)}function jb(e){return Hi(zo,e)}function Db(e){return Yi(No,e)}function Ub(e){return Xi(Co,e)}function Lb(e){return Qi(jo,e)}function Rb(e){return eo(Do,e)}function Mb(e){return to(Uo,e)}function Fb(e){return no(Lo,e)}function Zb(e,t,r={}){return nn(ln,e,t,r)}function qb(e){return nn(ln,"hostname",_e.hostname,e)}function Vb(e){return nn(ln,"hex",_e.hex,e)}function Bb(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=_e[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return nn(ln,i,n,t)}function nf(e){return xu(un,e)}function _o(e){return ku(kt,e)}function Kb(e){return Su(kt,e)}function Jb(e){return Iu(kt,e)}function Gb(e){return Ou(kt,e)}function Wb(e){return Au(kt,e)}function rf(e){return Eu(dn,e)}function Hb(e){return Pu(fn,e)}function Yb(e){return Nu(Ro,e)}function Xb(e){return Cu(Ro,e)}function Qb(e){return ju(of,e)}function e_(e){return Du(af,e)}function cf(e){return Uu(sf,e)}function t_(){return Lu(lf)}function wt(){return Ru(uf)}function Mo(e){return Mu(df,e)}function n_(e){return Fu(ff,e)}function r_(e){return Zu(lr,e)}function ur(e,t){return Bu(pf,e,t)}function i_(e){let t=e._zod.def.shape;return Zo(Object.keys(t))}function o_(e,t){let r={type:"object",shape:e??{},...k.normalizeParams(t)};return new dr(r)}function a_(e,t){return new dr({type:"object",shape:e,catchall:Mo(),...k.normalizeParams(t)})}function s_(e,t){return new dr({type:"object",shape:e,catchall:wt(),...k.normalizeParams(t)})}function Fo(e,t){return new fr({type:"union",options:e,...k.normalizeParams(t)})}function c_(e,t){return new mf({type:"union",options:e,inclusive:!1,...k.normalizeParams(t)})}function l_(e,t,r){return new hf({type:"union",options:t,discriminator:e,...k.normalizeParams(r)})}function vf(e,t){return new gf({type:"intersection",left:e,right:t})}function bf(e,t,r){let i=t instanceof L,n=i?r:t,o=i?t:null;return new yf({type:"tuple",items:e,rest:o,...k.normalizeParams(n)})}function _f(e,t,r){return!t||!t._zod?new an({type:"record",keyType:rr(),valueType:e,...k.normalizeParams(t)}):new an({type:"record",keyType:e,valueType:t,...k.normalizeParams(r)})}function u_(e,t,r){let i=ue(e);return i._zod.values=void 0,new an({type:"record",keyType:i,valueType:t,...k.normalizeParams(r)})}function d_(e,t,r){return new an({type:"record",keyType:e,valueType:t,mode:"loose",...k.normalizeParams(r)})}function f_(e,t,r){return new $f({type:"map",keyType:e,valueType:t,...k.normalizeParams(r)})}function p_(e,t){return new xf({type:"set",valueType:e,...k.normalizeParams(t)})}function Zo(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new sn({type:"enum",entries:r,...k.normalizeParams(t)})}function m_(e,t){return new sn({type:"enum",entries:e,...k.normalizeParams(t)})}function h_(e,t){return new wf({type:"literal",values:Array.isArray(e)?e:[e],...k.normalizeParams(t)})}function g_(e){return Ku(kf,e)}function qo(e){return new Sf({type:"transform",transform:e})}function or(e){return new Vo({type:"optional",innerType:e})}function Of(e){return new If({type:"optional",innerType:e})}function ar(e){return new Af({type:"nullable",innerType:e})}function v_(e){return or(ar(e))}function Tf(e,t){return new Ef({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():k.shallowClone(t)}})}function zf(e,t){return new Pf({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():k.shallowClone(t)}})}function Nf(e,t){return new Bo({type:"nonoptional",innerType:e,...k.normalizeParams(t)})}function y_(e){return new Cf({type:"success",innerType:e})}function Df(e,t){return new jf({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function b_(e){return Vu(Uf,e)}function $o(e,t){return new pr({type:"pipe",in:e,out:t})}function __(e,t,r){return new mr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function $_(e){let t=e._zod.def;return new mr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Mf(e){return new Rf({type:"readonly",innerType:e})}function x_(e,t){return new Ff({type:"template_literal",parts:e,...k.normalizeParams(t)})}function qf(e){return new Zf({type:"lazy",getter:e})}function w_(e){return new Vf({type:"promise",innerType:e})}function k_(e){return new Bf({type:"function",input:Array.isArray(e?.input)?bf(e?.input):e?.input??ur(wt()),output:e?.output??wt()})}function S_(e){let t=new W({check:"custom"});return t._zod.check=e,t}function I_(e,t){return Ju(hr,e??(()=>!0),t)}function Kf(e,t={}){return Gu(hr,e,t)}function Jf(e,t){return Wu(e,t)}function E_(e,t={}){let r=new hr({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...k.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}function P_(e){let t=qf(()=>Fo([rr(e),nf(),rf(),cf(),ur(t),_f(rr(),t)]));return t}function z_(e,t){return new Lf({type:"pipe",in:qo(e),out:t})}var vb,R,xo,cn,G,wo,ir,Ce,cr,ko,So,Io,Oo,Ao,Eo,To,Po,tf,zo,No,Co,jo,Do,Uo,Lo,ln,un,kt,dn,fn,Ro,of,af,sf,lf,uf,df,ff,lr,pf,dr,fr,mf,hf,gf,yf,an,$f,xf,sn,wf,kf,Sf,Vo,If,Af,Ef,Pf,Bo,Cf,jf,Uf,pr,mr,Lf,Rf,Ff,Zf,Vf,Bf,hr,O_,A_,T_,nr=S(()=>{xe();xe();Qn();Xn();ho();er();ef();vb=new WeakMap;R=h("ZodType",(e,t)=>(L.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:rn(e,"input"),output:rn(e,"output")}}),e.toJSONSchema=Qu(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>Zd(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Vd(e,r,i),e.parseAsync=async(r,i)=>qd(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Bd(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>Kd(e,r,i),e.decode=(r,i)=>Jd(e,r,i),e.encodeAsync=async(r,i)=>Gd(e,r,i),e.decodeAsync=async(r,i)=>Wd(e,r,i),e.safeEncode=(r,i)=>Hd(e,r,i),e.safeDecode=(r,i)=>Yd(e,r,i),e.safeEncodeAsync=async(r,i)=>Xd(e,r,i),e.safeDecodeAsync=async(r,i)=>Qd(e,r,i),sr(e,"ZodType",{check(...r){let i=this.def;return this.clone(k.mergeDefs(i,{checks:[...i.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return ue(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check(Kf(r,i))},superRefine(r,i){return this.check(Jf(r,i))},overwrite(r){return this.check(Oe(r))},optional(){return or(this)},exactOptional(){return Of(this)},nullable(){return ar(this)},nullish(){return or(ar(this))},nonoptional(r){return Nf(this,r)},array(){return ur(this)},or(r){return Fo([this,r])},and(r){return vf(this,r)},transform(r){return $o(this,qo(r))},default(r){return Tf(this,r)},prefault(r){return zf(this,r)},catch(r){return Df(this,r)},pipe(r){return $o(this,r)},readonly(){return Mf(this)},describe(r){let i=this.clone();return re.add(i,{description:r}),i},meta(...r){if(r.length===0)return re.get(this);let i=this.clone();return re.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return re.get(e)?.description},configurable:!0}),e)),xo=h("_ZodString",(e,t)=>{bt.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,n,o)=>ed(e,i,n,o);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,sr(e,"_ZodString",{regex(...i){return this.check(Vt(...i))},includes(...i){return this.check(Jt(...i))},startsWith(...i){return this.check(Gt(...i))},endsWith(...i){return this.check(Wt(...i))},min(...i){return this.check(Fe(...i))},max(...i){return this.check($t(...i))},length(...i){return this.check(xt(...i))},nonempty(...i){return this.check(Fe(1,...i))},lowercase(i){return this.check(Bt(i))},uppercase(i){return this.check(Kt(i))},trim(){return this.check(Xt())},normalize(...i){return this.check(Yt(...i))},toLowerCase(){return this.check(Qt())},toUpperCase(){return this.check(en())},slugify(){return this.check(tn())}})}),cn=h("ZodString",(e,t)=>{bt.init(e,t),xo.init(e,t),e.email=r=>e.check(Ui(wo,r)),e.url=r=>e.check(Yn(cr,r)),e.jwt=r=>e.check(no(Lo,r)),e.emoji=r=>e.check(Zi(ko,r)),e.guid=r=>e.check(Hn(ir,r)),e.uuid=r=>e.check(Li(Ce,r)),e.uuidv4=r=>e.check(Ri(Ce,r)),e.uuidv6=r=>e.check(Mi(Ce,r)),e.uuidv7=r=>e.check(Fi(Ce,r)),e.nanoid=r=>e.check(qi(So,r)),e.guid=r=>e.check(Hn(ir,r)),e.cuid=r=>e.check(Vi(Io,r)),e.cuid2=r=>e.check(Bi(Oo,r)),e.ulid=r=>e.check(Ki(Ao,r)),e.base64=r=>e.check(Qi(jo,r)),e.base64url=r=>e.check(eo(Do,r)),e.xid=r=>e.check(Ji(Eo,r)),e.ksuid=r=>e.check(Gi(To,r)),e.ipv4=r=>e.check(Wi(Po,r)),e.ipv6=r=>e.check(Hi(zo,r)),e.cidrv4=r=>e.check(Yi(No,r)),e.cidrv6=r=>e.check(Xi(Co,r)),e.e164=r=>e.check(to(Uo,r)),e.datetime=r=>e.check(Ud(r)),e.date=r=>e.check(Ld(r)),e.time=r=>e.check(Rd(r)),e.duration=r=>e.check(Md(r))});G=h("ZodStringFormat",(e,t)=>{J.init(e,t),xo.init(e,t)}),wo=h("ZodEmail",(e,t)=>{el.init(e,t),G.init(e,t)});ir=h("ZodGUID",(e,t)=>{Xc.init(e,t),G.init(e,t)});Ce=h("ZodUUID",(e,t)=>{Qc.init(e,t),G.init(e,t)});cr=h("ZodURL",(e,t)=>{tl.init(e,t),G.init(e,t)});ko=h("ZodEmoji",(e,t)=>{nl.init(e,t),G.init(e,t)});So=h("ZodNanoID",(e,t)=>{rl.init(e,t),G.init(e,t)});Io=h("ZodCUID",(e,t)=>{il.init(e,t),G.init(e,t)});Oo=h("ZodCUID2",(e,t)=>{ol.init(e,t),G.init(e,t)});Ao=h("ZodULID",(e,t)=>{al.init(e,t),G.init(e,t)});Eo=h("ZodXID",(e,t)=>{sl.init(e,t),G.init(e,t)});To=h("ZodKSUID",(e,t)=>{cl.init(e,t),G.init(e,t)});Po=h("ZodIPv4",(e,t)=>{pl.init(e,t),G.init(e,t)});tf=h("ZodMAC",(e,t)=>{hl.init(e,t),G.init(e,t)});zo=h("ZodIPv6",(e,t)=>{ml.init(e,t),G.init(e,t)});No=h("ZodCIDRv4",(e,t)=>{gl.init(e,t),G.init(e,t)});Co=h("ZodCIDRv6",(e,t)=>{vl.init(e,t),G.init(e,t)});jo=h("ZodBase64",(e,t)=>{bl.init(e,t),G.init(e,t)});Do=h("ZodBase64URL",(e,t)=>{_l.init(e,t),G.init(e,t)});Uo=h("ZodE164",(e,t)=>{$l.init(e,t),G.init(e,t)});Lo=h("ZodJWT",(e,t)=>{xl.init(e,t),G.init(e,t)});ln=h("ZodCustomStringFormat",(e,t)=>{wl.init(e,t),G.init(e,t)});un=h("ZodNumber",(e,t)=>{Oi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,n,o)=>td(e,i,n,o),sr(e,"ZodNumber",{gt(i,n){return this.check(ze(i,n))},gte(i,n){return this.check(fe(i,n))},min(i,n){return this.check(fe(i,n))},lt(i,n){return this.check(Pe(i,n))},lte(i,n){return this.check($e(i,n))},max(i,n){return this.check($e(i,n))},int(i){return this.check(_o(i))},safe(i){return this.check(_o(i))},positive(i){return this.check(ze(0,i))},nonnegative(i){return this.check(fe(0,i))},negative(i){return this.check(Pe(0,i))},nonpositive(i){return this.check($e(0,i))},multipleOf(i,n){return this.check(Xe(i,n))},step(i,n){return this.check(Xe(i,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});kt=h("ZodNumberFormat",(e,t)=>{kl.init(e,t),un.init(e,t)});dn=h("ZodBoolean",(e,t)=>{Vn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nd(e,r,i,n)});fn=h("ZodBigInt",(e,t)=>{Ai.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,n,o)=>rd(e,i,n,o),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.gt=(i,n)=>e.check(ze(i,n)),e.gte=(i,n)=>e.check(fe(i,n)),e.min=(i,n)=>e.check(fe(i,n)),e.lt=(i,n)=>e.check(Pe(i,n)),e.lte=(i,n)=>e.check($e(i,n)),e.max=(i,n)=>e.check($e(i,n)),e.positive=i=>e.check(ze(BigInt(0),i)),e.negative=i=>e.check(Pe(BigInt(0),i)),e.nonpositive=i=>e.check($e(BigInt(0),i)),e.nonnegative=i=>e.check(fe(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(Xe(i,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});Ro=h("ZodBigIntFormat",(e,t)=>{Sl.init(e,t),fn.init(e,t)});of=h("ZodSymbol",(e,t)=>{Il.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>id(e,r,i,n)});af=h("ZodUndefined",(e,t)=>{Ol.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ad(e,r,i,n)});sf=h("ZodNull",(e,t)=>{Al.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>od(e,r,i,n)});lf=h("ZodAny",(e,t)=>{El.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ld(e,r,i,n)});uf=h("ZodUnknown",(e,t)=>{Tl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ud(e,r,i,n)});df=h("ZodNever",(e,t)=>{Pl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cd(e,r,i,n)});ff=h("ZodVoid",(e,t)=>{zl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sd(e,r,i,n)});lr=h("ZodDate",(e,t)=>{Nl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,n,o)=>dd(e,i,n,o),e.min=(i,n)=>e.check(fe(i,n)),e.max=(i,n)=>e.check($e(i,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});pf=h("ZodArray",(e,t)=>{Cl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wd(e,r,i,n),e.element=t.element,sr(e,"ZodArray",{min(r,i){return this.check(Fe(r,i))},nonempty(r){return this.check(Fe(1,r))},max(r,i){return this.check($t(r,i))},length(r,i){return this.check(xt(r,i))},unwrap(){return this.element}})});dr=h("ZodObject",(e,t)=>{jl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>kd(e,r,i,n),k.defineLazy(e,"shape",()=>t.shape),sr(e,"ZodObject",{keyof(){return Zo(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:wt()})},loose(){return this.clone({...this._zod.def,catchall:wt()})},strict(){return this.clone({...this._zod.def,catchall:Mo()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return k.extend(this,r)},safeExtend(r){return k.safeExtend(this,r)},merge(r){return k.merge(this,r)},pick(r){return k.pick(this,r)},omit(r){return k.omit(this,r)},partial(...r){return k.partial(Vo,this,r[0])},required(...r){return k.required(Bo,this,r[0])}})});fr=h("ZodUnion",(e,t)=>{Bn.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lo(e,r,i,n),e.options=t.options});mf=h("ZodXor",(e,t)=>{fr.init(e,t),Dl.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lo(e,r,i,n),e.options=t.options});hf=h("ZodDiscriminatedUnion",(e,t)=>{fr.init(e,t),Ul.init(e,t)});gf=h("ZodIntersection",(e,t)=>{Ll.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sd(e,r,i,n)});yf=h("ZodTuple",(e,t)=>{Ei.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Id(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});an=h("ZodRecord",(e,t)=>{Rl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Od(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});$f=h("ZodMap",(e,t)=>{Ml.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$d(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Ne(...r)),e.nonempty=r=>e.check(Ne(1,r)),e.max=(...r)=>e.check(Qe(...r)),e.size=(...r)=>e.check(_t(...r))});xf=h("ZodSet",(e,t)=>{Fl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xd(e,r,i,n),e.min=(...r)=>e.check(Ne(...r)),e.nonempty=r=>e.check(Ne(1,r)),e.max=(...r)=>e.check(Qe(...r)),e.size=(...r)=>e.check(_t(...r))});sn=h("ZodEnum",(e,t)=>{Zl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(i,n,o)=>fd(e,i,n,o),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let o={};for(let a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new sn({...t,checks:[],...k.normalizeParams(n),entries:o})},e.exclude=(i,n)=>{let o={...t.entries};for(let a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new sn({...t,checks:[],...k.normalizeParams(n),entries:o})}});wf=h("ZodLiteral",(e,t)=>{ql.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>pd(e,r,i,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});kf=h("ZodFile",(e,t)=>{Vl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>gd(e,r,i,n),e.min=(r,i)=>e.check(Ne(r,i)),e.max=(r,i)=>e.check(Qe(r,i)),e.mime=(r,i)=>e.check(Ht(Array.isArray(r)?r:[r],i))});Sf=h("ZodTransform",(e,t)=>{Bl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_d(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Je(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(k.issue(o,r.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(k.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});Vo=h("ZodOptional",(e,t)=>{Ti.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});If=h("ZodExactOptional",(e,t)=>{Kl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Af=h("ZodNullable",(e,t)=>{Jl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ad(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Ef=h("ZodDefault",(e,t)=>{Gl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Td(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Pf=h("ZodPrefault",(e,t)=>{Wl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Bo=h("ZodNonOptional",(e,t)=>{Hl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ed(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Cf=h("ZodSuccess",(e,t)=>{Yl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});jf=h("ZodCatch",(e,t)=>{Xl.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Uf=h("ZodNaN",(e,t)=>{Ql.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>md(e,r,i,n)});pr=h("ZodPipe",(e,t)=>{Pi.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nd(e,r,i,n),e.in=t.in,e.out=t.out});mr=h("ZodCodec",(e,t)=>{pr.init(e,t),Kn.init(e,t)});Lf=h("ZodPreprocess",(e,t)=>{pr.init(e,t),eu.init(e,t)}),Rf=h("ZodReadonly",(e,t)=>{tu.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Cd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Ff=h("ZodTemplateLiteral",(e,t)=>{nu.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>hd(e,r,i,n)});Zf=h("ZodLazy",(e,t)=>{ou.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dd(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});Vf=h("ZodPromise",(e,t)=>{iu.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Bf=h("ZodFunction",(e,t)=>{ru.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bd(e,r,i,n)});hr=h("ZodCustom",(e,t)=>{au.init(e,t),R.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yd(e,r,i,n)});O_=Hu,A_=Yu;T_=(...e)=>Xu({Codec:mr,Boolean:dn,String:cn},...e)});function UA(e){Y({customError:e})}function LA(){return Y().customError}var DA,Gf,N_=S(()=>{xe();DA={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"};Gf||(Gf={})});function MA(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function FA(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function C_(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return z.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return z.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let o=FA(n,t),a=se(o,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return z.null();if(n.length===0)return z.never();if(n.length===1)return z.literal(n[0]);if(n.every(a=>typeof a=="string"))return z.enum(n);let o=n.map(a=>z.literal(a));return o.length<2?o[0]:z.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return z.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(o=>{let a={...e,type:o};return C_(a,t)});return n.length===0?z.never():n.length===1?n[0]:z.union(n)}if(!r)return z.any();let i;switch(r){case"string":{let n=z.string();if(e.format){let o=e.format;o==="email"?n=n.check(z.email()):o==="uri"||o==="uri-reference"?n=n.check(z.url()):o==="uuid"||o==="guid"?n=n.check(z.uuid()):o==="date-time"?n=n.check(z.iso.datetime()):o==="date"?n=n.check(z.iso.date()):o==="time"?n=n.check(z.iso.time()):o==="duration"?n=n.check(z.iso.duration()):o==="ipv4"?n=n.check(z.ipv4()):o==="ipv6"?n=n.check(z.ipv6()):o==="mac"?n=n.check(z.mac()):o==="cidr"?n=n.check(z.cidrv4()):o==="cidr-v6"?n=n.check(z.cidrv6()):o==="base64"?n=n.check(z.base64()):o==="base64url"?n=n.check(z.base64url()):o==="e164"?n=n.check(z.e164()):o==="jwt"?n=n.check(z.jwt()):o==="emoji"?n=n.check(z.emoji()):o==="nanoid"?n=n.check(z.nanoid()):o==="cuid"?n=n.check(z.cuid()):o==="cuid2"?n=n.check(z.cuid2()):o==="ulid"?n=n.check(z.ulid()):o==="xid"?n=n.check(z.xid()):o==="ksuid"&&(n=n.check(z.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?z.number().int():z.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=z.boolean();break}case"null":{i=z.null();break}case"object":{let n={},o=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(o)){let u=se(l,t);n[c]=a.has(c)?u:u.optional()}if(e.propertyNames){let c=se(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?se(e.additionalProperties,t):z.any();if(Object.keys(n).length===0){i=z.record(c,l);break}let u=z.object(n).passthrough(),d=z.looseRecord(c,l);i=z.intersection(u,d);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),u=[];for(let f of l){let p=se(c[f],t),g=z.string().regex(new RegExp(f));u.push(z.looseRecord(g,p))}let d=[];if(Object.keys(n).length>0&&d.push(z.object(n).passthrough()),d.push(...u),d.length===0)i=z.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=z.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)f=z.intersection(f,d[p]);i=f}break}let s=z.object(n);e.additionalProperties===!1?i=s.strict():typeof e.additionalProperties=="object"?i=s.catchall(se(e.additionalProperties,t)):i=s.passthrough();break}case"array":{let n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){let a=n.map(c=>se(c,t)),s=o&&typeof o=="object"&&!Array.isArray(o)?se(o,t):void 0;s?i=z.tuple(a).rest(s):i=z.tuple(a),typeof e.minItems=="number"&&(i=i.check(z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(z.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(c=>se(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?se(e.additionalItems,t):void 0;s?i=z.tuple(a).rest(s):i=z.tuple(a),typeof e.minItems=="number"&&(i=i.check(z.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(z.maxLength(e.maxItems)))}else if(o!==void 0){let a=se(o,t),s=z.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=z.array(z.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}function se(e,t){if(typeof e=="boolean")return e?z.any():z.never();let r=C_(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>se(l,t)),c=z.union(s);r=i?z.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>se(l,t)),c=z.xor(s);r=i?z.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:z.any();else{let s=i?r:se(e.allOf[0],t),c=i?0:1;for(let l=c;l<e.allOf.length;l++)s=z.intersection(s,se(e.allOf[l],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=z.nullable(r)),e.readOnly===!0&&(r=z.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);for(let s of Object.keys(e))RA.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function j_(e,t){if(typeof e=="boolean")return e?z.any():z.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=MA(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??re};return se(r,o)}var z,RA,D_=S(()=>{Wn();ho();er();nr();z={...tr,...mo,iso:on},RA=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"])});var Wf={};oe(Wf,{bigint:()=>BA,boolean:()=>VA,date:()=>KA,number:()=>qA,string:()=>ZA});function ZA(e){return hu(cn,e)}function qA(e){return wu(un,e)}function VA(e){return Tu(dn,e)}function BA(e){return zu(fn,e)}function KA(e){return qu(lr,e)}var U_=S(()=>{xe();nr()});var b={};oe(b,{$brand:()=>Us,$input:()=>pu,$output:()=>fu,NEVER:()=>Ds,TimePrecision:()=>vu,ZodAny:()=>lf,ZodArray:()=>pf,ZodBase64:()=>jo,ZodBase64URL:()=>Do,ZodBigInt:()=>fn,ZodBigIntFormat:()=>Ro,ZodBoolean:()=>dn,ZodCIDRv4:()=>No,ZodCIDRv6:()=>Co,ZodCUID:()=>Io,ZodCUID2:()=>Oo,ZodCatch:()=>jf,ZodCodec:()=>mr,ZodCustom:()=>hr,ZodCustomStringFormat:()=>ln,ZodDate:()=>lr,ZodDefault:()=>Ef,ZodDiscriminatedUnion:()=>hf,ZodE164:()=>Uo,ZodEmail:()=>wo,ZodEmoji:()=>ko,ZodEnum:()=>sn,ZodError:()=>CA,ZodExactOptional:()=>If,ZodFile:()=>kf,ZodFirstPartyTypeKind:()=>Gf,ZodFunction:()=>Bf,ZodGUID:()=>ir,ZodIPv4:()=>Po,ZodIPv6:()=>zo,ZodISODate:()=>vo,ZodISODateTime:()=>go,ZodISODuration:()=>bo,ZodISOTime:()=>yo,ZodIntersection:()=>gf,ZodIssueCode:()=>DA,ZodJWT:()=>Lo,ZodKSUID:()=>To,ZodLazy:()=>Zf,ZodLiteral:()=>wf,ZodMAC:()=>tf,ZodMap:()=>$f,ZodNaN:()=>Uf,ZodNanoID:()=>So,ZodNever:()=>df,ZodNonOptional:()=>Bo,ZodNull:()=>sf,ZodNullable:()=>Af,ZodNumber:()=>un,ZodNumberFormat:()=>kt,ZodObject:()=>dr,ZodOptional:()=>Vo,ZodPipe:()=>pr,ZodPrefault:()=>Pf,ZodPreprocess:()=>Lf,ZodPromise:()=>Vf,ZodReadonly:()=>Rf,ZodRealError:()=>ve,ZodRecord:()=>an,ZodSet:()=>xf,ZodString:()=>cn,ZodStringFormat:()=>G,ZodSuccess:()=>Cf,ZodSymbol:()=>of,ZodTemplateLiteral:()=>Ff,ZodTransform:()=>Sf,ZodTuple:()=>yf,ZodType:()=>R,ZodULID:()=>Ao,ZodURL:()=>cr,ZodUUID:()=>Ce,ZodUndefined:()=>af,ZodUnion:()=>fr,ZodUnknown:()=>uf,ZodVoid:()=>ff,ZodXID:()=>Eo,ZodXor:()=>mf,_ZodString:()=>xo,_default:()=>Tf,_function:()=>k_,any:()=>t_,array:()=>ur,base64:()=>Lb,base64url:()=>Rb,bigint:()=>Hb,boolean:()=>rf,catch:()=>Df,check:()=>S_,cidrv4:()=>Db,cidrv6:()=>Ub,clone:()=>ue,codec:()=>__,coerce:()=>Wf,config:()=>Y,core:()=>Ze,cuid:()=>Ab,cuid2:()=>Eb,custom:()=>I_,date:()=>r_,decode:()=>Jd,decodeAsync:()=>Wd,describe:()=>O_,discriminatedUnion:()=>l_,e164:()=>Mb,email:()=>yb,emoji:()=>Ib,encode:()=>Kd,encodeAsync:()=>Gd,endsWith:()=>Wt,enum:()=>Zo,exactOptional:()=>Of,file:()=>g_,flattenError:()=>Rn,float32:()=>Kb,float64:()=>Jb,formatError:()=>Mn,fromJSONSchema:()=>j_,function:()=>k_,getErrorMap:()=>LA,globalRegistry:()=>re,gt:()=>ze,gte:()=>fe,guid:()=>bb,hash:()=>Bb,hex:()=>Vb,hostname:()=>qb,httpUrl:()=>Sb,includes:()=>Jt,instanceof:()=>E_,int:()=>_o,int32:()=>Gb,int64:()=>Yb,intersection:()=>vf,invertCodec:()=>$_,ipv4:()=>Nb,ipv6:()=>jb,iso:()=>on,json:()=>P_,jwt:()=>Fb,keyof:()=>i_,ksuid:()=>zb,lazy:()=>qf,length:()=>xt,literal:()=>h_,locales:()=>Gn,looseObject:()=>s_,looseRecord:()=>d_,lowercase:()=>Bt,lt:()=>Pe,lte:()=>$e,mac:()=>Cb,map:()=>f_,maxLength:()=>$t,maxSize:()=>Qe,meta:()=>A_,mime:()=>Ht,minLength:()=>Fe,minSize:()=>Ne,multipleOf:()=>Xe,nan:()=>b_,nanoid:()=>Ob,nativeEnum:()=>m_,negative:()=>io,never:()=>Mo,nonnegative:()=>ao,nonoptional:()=>Nf,nonpositive:()=>oo,normalize:()=>Yt,null:()=>cf,nullable:()=>ar,nullish:()=>v_,number:()=>nf,object:()=>o_,optional:()=>or,overwrite:()=>Oe,parse:()=>Zd,parseAsync:()=>qd,partialRecord:()=>u_,pipe:()=>$o,positive:()=>ro,prefault:()=>zf,preprocess:()=>z_,prettifyError:()=>Hs,promise:()=>w_,property:()=>so,readonly:()=>Mf,record:()=>_f,refine:()=>Kf,regex:()=>Vt,regexes:()=>_e,registry:()=>Di,safeDecode:()=>Yd,safeDecodeAsync:()=>Qd,safeEncode:()=>Hd,safeEncodeAsync:()=>Xd,safeParse:()=>Vd,safeParseAsync:()=>Bd,set:()=>p_,setErrorMap:()=>UA,size:()=>_t,slugify:()=>tn,startsWith:()=>Gt,strictObject:()=>a_,string:()=>rr,stringFormat:()=>Zb,stringbool:()=>T_,success:()=>y_,superRefine:()=>Jf,symbol:()=>Qb,templateLiteral:()=>x_,toJSONSchema:()=>fo,toLowerCase:()=>Qt,toUpperCase:()=>en,transform:()=>qo,treeifyError:()=>Ws,trim:()=>Xt,tuple:()=>bf,uint32:()=>Wb,uint64:()=>Xb,ulid:()=>Tb,undefined:()=>e_,union:()=>Fo,unknown:()=>wt,uppercase:()=>Kt,url:()=>kb,util:()=>k,uuid:()=>_b,uuidv4:()=>$b,uuidv6:()=>xb,uuidv7:()=>wb,void:()=>n_,xid:()=>Pb,xor:()=>c_});var Hf=S(()=>{xe();nr();ho();Fd();ef();N_();xe();cu();xe();Qn();D_();du();er();er();U_();Y(zi())});var Yf=S(()=>{Hf();Hf()});var L_,R_,M_,F_,Z_,q_,V_=S(()=>{"use strict";Yf();L_=b.object({userRequest:b.string()}),R_=b.object({userRequest:b.string()}),M_=b.object({summary:b.string(),riskLevel:b.enum(["low","medium","high","critical"]),findings:b.array(b.object({id:b.string().optional(),severity:b.enum(["info","warning","error","critical"]),category:b.string(),target:b.string().optional(),location:b.string().optional(),message:b.string(),recommendation:b.string().optional(),confidence:b.number().min(0).max(1).optional(),evidence:b.array(b.object({type:b.string(),content:b.string(),source:b.string().optional()})).optional(),details:b.record(b.string(),b.unknown()).optional()})),recommendedActions:b.array(b.object({kind:b.enum(["run_command","edit_file","review","confirm","block","ignore"]),title:b.string(),command:b.string().optional(),target:b.string().optional(),rationale:b.string().optional()})).optional(),metadata:b.object({tool:b.string().optional(),command:b.string().optional(),version:b.string().optional(),generatedAt:b.string().optional(),adapter:b.string().optional(),model:b.string().optional()}).optional()}),F_=b.object({summary:b.string(),riskLevel:b.enum(["low","medium","high","critical"]),findings:b.array(b.object({id:b.string().optional(),severity:b.enum(["info","warning","error","critical"]),category:b.string(),target:b.string().optional(),location:b.string().optional(),message:b.string(),recommendation:b.string().optional(),confidence:b.number().min(0).max(1).optional(),evidence:b.array(b.object({type:b.string(),content:b.string(),source:b.string().optional()})).optional(),details:b.record(b.string(),b.unknown()).optional()})),recommendedActions:b.array(b.object({kind:b.enum(["run_command","edit_file","review","confirm","block","ignore"]),title:b.string(),command:b.string().optional(),target:b.string().optional(),rationale:b.string().optional()})).optional(),changedFiles:b.array(b.object({path:b.string(),action:b.enum(["created","updated"]),rationale:b.string().optional()})),dependencies:b.array(b.string()).optional(),notes:b.string().optional(),metadata:b.object({tool:b.string().optional(),command:b.string().optional(),version:b.string().optional(),generatedAt:b.string().optional(),adapter:b.string().optional(),model:b.string().optional()}).optional()}),Z_={"litedbmodel-audit-request":L_,"litedbmodel-implement-request":R_,"litedbmodel-audit-result":M_,"litedbmodel-implement-result":F_},q_={litedbmodelAuditRequest(e){return{type:"litedbmodel-audit-request",version:1,payload:L_.parse(e)}},litedbmodelImplementRequest(e){return{type:"litedbmodel-implement-request",version:1,payload:R_.parse(e)}},litedbmodelAuditResult(e){return{type:"litedbmodel-audit-result",version:1,payload:M_.parse(e)}},litedbmodelImplementResult(e){return{type:"litedbmodel-implement-result",version:1,payload:F_.parse(e)}}}});var B_,K_=S(()=>{"use strict";B_={}});var J_={};oe(J_,{agentRegistry:()=>jg,handoffSchemas:()=>Z_,handoffs:()=>q_,taskRegistry:()=>Ug,workflowRegistry:()=>B_});var G_=S(()=>{"use strict";Dg();Lg();V_();K_()});var Z=E(ie=>{"use strict";var Xf=Symbol.for("yaml.alias"),W_=Symbol.for("yaml.document"),Ko=Symbol.for("yaml.map"),H_=Symbol.for("yaml.pair"),Qf=Symbol.for("yaml.scalar"),Jo=Symbol.for("yaml.seq"),qe=Symbol.for("yaml.node.type"),JA=e=>!!e&&typeof e=="object"&&e[qe]===Xf,GA=e=>!!e&&typeof e=="object"&&e[qe]===W_,WA=e=>!!e&&typeof e=="object"&&e[qe]===Ko,HA=e=>!!e&&typeof e=="object"&&e[qe]===H_,Y_=e=>!!e&&typeof e=="object"&&e[qe]===Qf,YA=e=>!!e&&typeof e=="object"&&e[qe]===Jo;function X_(e){if(e&&typeof e=="object")switch(e[qe]){case Ko:case Jo:return!0}return!1}function XA(e){if(e&&typeof e=="object")switch(e[qe]){case Xf:case Ko:case Qf:case Jo:return!0}return!1}var QA=e=>(Y_(e)||X_(e))&&!!e.anchor;ie.ALIAS=Xf;ie.DOC=W_;ie.MAP=Ko;ie.NODE_TYPE=qe;ie.PAIR=H_;ie.SCALAR=Qf;ie.SEQ=Jo;ie.hasAnchor=QA;ie.isAlias=JA;ie.isCollection=X_;ie.isDocument=GA;ie.isMap=WA;ie.isNode=XA;ie.isPair=HA;ie.isScalar=Y_;ie.isSeq=YA});var gr=E(ep=>{"use strict";var te=Z(),ye=Symbol("break visit"),Q_=Symbol("skip children"),je=Symbol("remove node");function Go(e,t){let r=e$(t);te.isDocument(e)?pn(null,e.contents,r,Object.freeze([e]))===je&&(e.contents=null):pn(null,e,r,Object.freeze([]))}Go.BREAK=ye;Go.SKIP=Q_;Go.REMOVE=je;function pn(e,t,r,i){let n=t$(e,t,r,i);if(te.isNode(n)||te.isPair(n))return n$(e,i,n),pn(e,n,r,i);if(typeof n!="symbol"){if(te.isCollection(t)){i=Object.freeze(i.concat(t));for(let o=0;o<t.items.length;++o){let a=pn(o,t.items[o],r,i);if(typeof a=="number")o=a-1;else{if(a===ye)return ye;a===je&&(t.items.splice(o,1),o-=1)}}}else if(te.isPair(t)){i=Object.freeze(i.concat(t));let o=pn("key",t.key,r,i);if(o===ye)return ye;o===je&&(t.key=null);let a=pn("value",t.value,r,i);if(a===ye)return ye;a===je&&(t.value=null)}}return n}async function Wo(e,t){let r=e$(t);te.isDocument(e)?await mn(null,e.contents,r,Object.freeze([e]))===je&&(e.contents=null):await mn(null,e,r,Object.freeze([]))}Wo.BREAK=ye;Wo.SKIP=Q_;Wo.REMOVE=je;async function mn(e,t,r,i){let n=await t$(e,t,r,i);if(te.isNode(n)||te.isPair(n))return n$(e,i,n),mn(e,n,r,i);if(typeof n!="symbol"){if(te.isCollection(t)){i=Object.freeze(i.concat(t));for(let o=0;o<t.items.length;++o){let a=await mn(o,t.items[o],r,i);if(typeof a=="number")o=a-1;else{if(a===ye)return ye;a===je&&(t.items.splice(o,1),o-=1)}}}else if(te.isPair(t)){i=Object.freeze(i.concat(t));let o=await mn("key",t.key,r,i);if(o===ye)return ye;o===je&&(t.key=null);let a=await mn("value",t.value,r,i);if(a===ye)return ye;a===je&&(t.value=null)}}return n}function e$(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function t$(e,t,r,i){if(typeof r=="function")return r(e,t,i);if(te.isMap(t))return r.Map?.(e,t,i);if(te.isSeq(t))return r.Seq?.(e,t,i);if(te.isPair(t))return r.Pair?.(e,t,i);if(te.isScalar(t))return r.Scalar?.(e,t,i);if(te.isAlias(t))return r.Alias?.(e,t,i)}function n$(e,t,r){let i=t[t.length-1];if(te.isCollection(i))i.items[e]=r;else if(te.isPair(i))e==="key"?i.key=r:i.value=r;else if(te.isDocument(i))i.contents=r;else{let n=te.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}ep.visit=Go;ep.visitAsync=Wo});var tp=E(i$=>{"use strict";var r$=Z(),eE=gr(),tE={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},nE=e=>e.replace(/[!,[\]{}]/g,t=>tE[t]),vr=class e{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,r)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let i=t.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[o,a]=i;return this.tags[o]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[o]=i;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let a=/^\d+\.\d+$/.test(o);return r(6,`Unsupported YAML version ${o}`,a),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let a=t.slice(2,-1);return a==="!"||a==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),a)}let[,i,n]=t.match(/^(.*!)([^!]*)$/s);n||r(`The ${t} tag has no suffix`);let o=this.tags[i];if(o)try{return o+decodeURIComponent(n)}catch(a){return r(String(a)),null}return i==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[r,i]of Object.entries(this.tags))if(t.startsWith(i))return r+nE(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(t&&i.length>0&&r$.isNode(t.contents)){let o={};eE.visit(t.contents,(a,s)=>{r$.isNode(s)&&s.tag&&(o[s.tag]=!0)}),n=Object.keys(o)}else n=[];for(let[o,a]of i)o==="!!"&&a==="tag:yaml.org,2002:"||(!t||n.some(s=>s.startsWith(a)))&&r.push(`%TAG ${o} ${a}`);return r.join(`
|
|
151
|
+
`)}};vr.defaultYaml={explicit:!1,version:"1.2"};vr.defaultTags={"!!":"tag:yaml.org,2002:"};i$.Directives=vr});var Ho=E(yr=>{"use strict";var o$=Z(),rE=gr();function iE(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(r)}return!0}function a$(e){let t=new Set;return rE.visit(e,{Value(r,i){i.anchor&&t.add(i.anchor)}}),t}function s$(e,t){for(let r=1;;++r){let i=`${e}${r}`;if(!t.has(i))return i}}function oE(e,t){let r=[],i=new Map,n=null;return{onAnchor:o=>{r.push(o),n??(n=a$(e));let a=s$(t,n);return n.add(a),a},setAnchors:()=>{for(let o of r){let a=i.get(o);if(typeof a=="object"&&a.anchor&&(o$.isScalar(a.node)||o$.isCollection(a.node)))a.node.anchor=a.anchor;else{let s=new Error("Failed to resolve repeated object (this should not happen)");throw s.source=o,s}}},sourceObjects:i}}yr.anchorIsValid=iE;yr.anchorNames=a$;yr.createNodeAnchors=oE;yr.findNewAnchor=s$});var np=E(c$=>{"use strict";function br(e,t,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,o=i.length;n<o;++n){let a=i[n],s=br(e,i,String(n),a);s===void 0?delete i[n]:s!==a&&(i[n]=s)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let o=i.get(n),a=br(e,i,n,o);a===void 0?i.delete(n):a!==o&&i.set(n,a)}else if(i instanceof Set)for(let n of Array.from(i)){let o=br(e,i,n,n);o===void 0?i.delete(n):o!==n&&(i.delete(n),i.add(o))}else for(let[n,o]of Object.entries(i)){let a=br(e,i,n,o);a===void 0?delete i[n]:a!==o&&(i[n]=a)}return e.call(t,r,i)}c$.applyReviver=br});var rt=E(u$=>{"use strict";var aE=Z();function l$(e,t,r){if(Array.isArray(e))return e.map((i,n)=>l$(i,String(n),r));if(e&&typeof e.toJSON=="function"){if(!r||!aE.hasAnchor(e))return e.toJSON(t,r);let i={aliasCount:0,count:1,res:void 0};r.anchors.set(e,i),r.onCreate=o=>{i.res=o,delete r.onCreate};let n=e.toJSON(t,r);return r.onCreate&&r.onCreate(n),n}return typeof e=="bigint"&&!r?.keep?Number(e):e}u$.toJS=l$});var Yo=E(f$=>{"use strict";var sE=np(),d$=Z(),cE=rt(),rp=class{constructor(t){Object.defineProperty(this,d$.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:o}={}){if(!d$.isDocument(t))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:t,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},s=cE.toJS(this,"",a);if(typeof n=="function")for(let{count:c,res:l}of a.anchors.values())n(l,c);return typeof o=="function"?sE.applyReviver(o,{"":s},"",s):s}};f$.NodeBase=rp});var _r=E(p$=>{"use strict";var lE=Ho(),uE=gr(),hn=Z(),dE=Yo(),fE=rt(),ip=class extends dE.NodeBase{constructor(t){super(hn.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],uE.visit(t,{Node:(o,a)=>{(hn.isAlias(a)||hn.hasAnchor(a))&&i.push(a)}}),r&&(r.aliasResolveCache=i));let n;for(let o of i){if(o===this)break;o.anchor===this.source&&(n=o)}return n}toJSON(t,r){if(!r)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:o}=r,a=this.resolve(n,r);if(!a){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let s=i.get(a);if(s||(fE.toJS(a,null,r),s=i.get(a)),s?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(s.count+=1,s.aliasCount===0&&(s.aliasCount=Xo(n,a,i)),s.count*s.aliasCount>o)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return s.res}toString(t,r,i){let n=`*${this.source}`;if(t){if(lE.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${n} `}return n}};function Xo(e,t,r){if(hn.isAlias(t)){let i=t.resolve(e),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(hn.isCollection(t)){let i=0;for(let n of t.items){let o=Xo(e,n,r);o>i&&(i=o)}return i}else if(hn.isPair(t)){let i=Xo(e,t.key,r),n=Xo(e,t.value,r);return Math.max(i,n)}return 1}p$.Alias=ip});var Q=E(op=>{"use strict";var pE=Z(),mE=Yo(),hE=rt(),gE=e=>!e||typeof e!="function"&&typeof e!="object",it=class extends mE.NodeBase{constructor(t){super(pE.SCALAR),this.value=t}toJSON(t,r){return r?.keep?this.value:hE.toJS(this.value,t,r)}toString(){return String(this.value)}};it.BLOCK_FOLDED="BLOCK_FOLDED";it.BLOCK_LITERAL="BLOCK_LITERAL";it.PLAIN="PLAIN";it.QUOTE_DOUBLE="QUOTE_DOUBLE";it.QUOTE_SINGLE="QUOTE_SINGLE";op.Scalar=it;op.isScalarValue=gE});var $r=E(h$=>{"use strict";var vE=_r(),St=Z(),m$=Q(),yE="tag:yaml.org,2002:";function bE(e,t,r){if(t){let i=r.filter(o=>o.tag===t),n=i.find(o=>!o.format)??i[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(i=>i.identify?.(e)&&!i.format)}function _E(e,t,r){if(St.isDocument(e)&&(e=e.contents),St.isNode(e))return e;if(St.isPair(e)){let d=r.schema[St.MAP].createNode?.(r.schema,null,r);return d.items.push(e),d}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:o,schema:a,sourceObjects:s}=r,c;if(i&&e&&typeof e=="object"){if(c=s.get(e),c)return c.anchor??(c.anchor=n(e)),new vE.Alias(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith("!!")&&(t=yE+t.slice(2));let l=bE(e,t,a.tags);if(!l){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let d=new m$.Scalar(e);return c&&(c.node=d),d}l=e instanceof Map?a[St.MAP]:Symbol.iterator in Object(e)?a[St.SEQ]:a[St.MAP]}o&&(o(l),delete r.onTagObj);let u=l?.createNode?l.createNode(r.schema,e,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,e,r):new m$.Scalar(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}h$.createNode=_E});var ea=E(Qo=>{"use strict";var $E=$r(),De=Z(),xE=Yo();function ap(e,t,r){let i=r;for(let n=t.length-1;n>=0;--n){let o=t[n];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let a=[];a[o]=i,i=a}else i=new Map([[o,i]])}return $E.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var g$=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,sp=class extends xE.NodeBase{constructor(t,r){super(t),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(t){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(r.schema=t),r.items=r.items.map(i=>De.isNode(i)||De.isPair(i)?i.clone(t):i),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(g$(t))this.add(r);else{let[i,...n]=t,o=this.get(i,!0);if(De.isCollection(o))o.addIn(n,r);else if(o===void 0&&this.schema)this.set(i,ap(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(t){let[r,...i]=t;if(i.length===0)return this.delete(r);let n=this.get(r,!0);if(De.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(t,r){let[i,...n]=t,o=this.get(i,!0);return n.length===0?!r&&De.isScalar(o)?o.value:o:De.isCollection(o)?o.getIn(n,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!De.isPair(r))return!1;let i=r.value;return i==null||t&&De.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){let[r,...i]=t;if(i.length===0)return this.has(r);let n=this.get(r,!0);return De.isCollection(n)?n.hasIn(i):!1}setIn(t,r){let[i,...n]=t;if(n.length===0)this.set(i,r);else{let o=this.get(i,!0);if(De.isCollection(o))o.setIn(n,r);else if(o===void 0&&this.schema)this.set(i,ap(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};Qo.Collection=sp;Qo.collectionFromPath=ap;Qo.isEmptyPath=g$});var xr=E(ta=>{"use strict";var wE=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function cp(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var kE=(e,t,r)=>e.endsWith(`
|
|
152
|
+
`)?cp(r,t):r.includes(`
|
|
153
|
+
`)?`
|
|
154
|
+
`+cp(r,t):(e.endsWith(" ")?"":" ")+r;ta.indentComment=cp;ta.lineComment=kE;ta.stringifyComment=wE});var y$=E(wr=>{"use strict";var SE="flow",lp="block",na="quoted";function IE(e,t,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:o=20,onFold:a,onOverflow:s}={}){if(!n||n<0)return e;n<o&&(o=0);let c=Math.max(1+o,1+n-t.length);if(e.length<=c)return e;let l=[],u={},d=n-t.length;typeof i=="number"&&(i>n-Math.max(2,o)?l.push(0):d=n-i);let f,p,g=!1,m=-1,v=-1,A=-1;r===lp&&(m=v$(e,m,t.length),m!==-1&&(d=m+c));for(let N;N=e[m+=1];){if(r===na&&N==="\\"){switch(v=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}A=m}if(N===`
|
|
155
|
+
`)r===lp&&(m=v$(e,m,t.length)),d=m+t.length+c,f=void 0;else{if(N===" "&&p&&p!==" "&&p!==`
|
|
156
|
+
`&&p!==" "){let T=e[m+1];T&&T!==" "&&T!==`
|
|
157
|
+
`&&T!==" "&&(f=m)}if(m>=d)if(f)l.push(f),d=f+c,f=void 0;else if(r===na){for(;p===" "||p===" ";)p=N,N=e[m+=1],g=!0;let T=m>A+1?m-2:v-1;if(u[T])return e;l.push(T),u[T]=!0,d=T+c,f=void 0}else g=!0}p=N}if(g&&s&&s(),l.length===0)return e;a&&a();let _=e.slice(0,l[0]);for(let N=0;N<l.length;++N){let T=l[N],O=l[N+1]||e.length;T===0?_=`
|
|
158
|
+
${t}${e.slice(0,O)}`:(r===na&&u[T]&&(_+=`${e[T]}\\`),_+=`
|
|
159
|
+
${t}${e.slice(T+1,O)}`)}return _}function v$(e,t,r){let i=t,n=t+1,o=e[n];for(;o===" "||o===" ";)if(t<n+r)o=e[++t];else{do o=e[++t];while(o&&o!==`
|
|
160
|
+
`);i=t,n=t+1,o=e[n]}return i}wr.FOLD_BLOCK=lp;wr.FOLD_FLOW=SE;wr.FOLD_QUOTED=na;wr.foldFlowLines=IE});var Sr=E(b$=>{"use strict";var Ae=Q(),ot=y$(),ia=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),oa=e=>/^(%|---|\.\.\.)/m.test(e);function OE(e,t,r){if(!t||t<0)return!1;let i=t-r,n=e.length;if(n<=i)return!1;for(let o=0,a=0;o<n;++o)if(e[o]===`
|
|
161
|
+
`){if(o-a>i)return!0;if(a=o+1,n-a<=i)return!1}return!0}function kr(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:i}=t,n=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(oa(e)?" ":""),a="",s=0;for(let c=0,l=r[c];l;l=r[++c])if(l===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(a+=r.slice(s,c)+"\\ ",c+=1,s=c,l="\\"),l==="\\")switch(r[c+1]){case"u":{a+=r.slice(s,c);let u=r.substr(c+2,4);switch(u){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:u.substr(0,2)==="00"?a+="\\x"+u.substr(2):a+=r.substr(c,6)}c+=5,s=c+1}break;case"n":if(i||r[c+2]==='"'||r.length<n)c+=1;else{for(a+=r.slice(s,c)+`
|
|
162
|
+
|
|
163
|
+
`;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)a+=`
|
|
164
|
+
`,c+=2;a+=o,r[c+2]===" "&&(a+="\\"),c+=1,s=c+1}break;default:c+=1}return a=s?a+r.slice(s):r,i?a:ot.foldFlowLines(a,o,ot.FOLD_QUOTED,ia(t,!1))}function up(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
165
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return kr(e,t);let r=t.indent||(oa(e)?" ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
166
|
+
${r}`)+"'";return t.implicitKey?i:ot.foldFlowLines(i,r,ot.FOLD_FLOW,ia(t,!1))}function gn(e,t){let{singleQuote:r}=t.options,i;if(r===!1)i=kr;else{let n=e.includes('"'),o=e.includes("'");n&&!o?i=up:o&&!n?i=kr:i=r?up:kr}return i(e,t)}var dp;try{dp=new RegExp(`(^|(?<!
|
|
167
|
+
))
|
|
168
|
+
+(?!
|
|
169
|
+
|$)`,"g")}catch{dp=/\n+(?!\n|$)/g}function ra({comment:e,type:t,value:r},i,n,o){let{blockQuote:a,commentString:s,lineWidth:c}=i.options;if(!a||/\n[\t ]+$/.test(r))return gn(r,i);let l=i.indent||(i.forceBlockIndent||oa(r)?" ":""),u=a==="literal"?!0:a==="folded"||t===Ae.Scalar.BLOCK_FOLDED?!1:t===Ae.Scalar.BLOCK_LITERAL?!0:!OE(r,c,l.length);if(!r)return u?`|
|
|
170
|
+
`:`>
|
|
171
|
+
`;let d,f;for(f=r.length;f>0;--f){let O=r[f-1];if(O!==`
|
|
172
|
+
`&&O!==" "&&O!==" ")break}let p=r.substring(f),g=p.indexOf(`
|
|
173
|
+
`);g===-1?d="-":r===p||g!==p.length-1?(d="+",o&&o()):d="",p&&(r=r.slice(0,-p.length),p[p.length-1]===`
|
|
174
|
+
`&&(p=p.slice(0,-1)),p=p.replace(dp,`$&${l}`));let m=!1,v,A=-1;for(v=0;v<r.length;++v){let O=r[v];if(O===" ")m=!0;else if(O===`
|
|
175
|
+
`)A=v;else break}let _=r.substring(0,A<v?A+1:v);_&&(r=r.substring(_.length),_=_.replace(/\n+/g,`$&${l}`));let T=(m?l?"2":"1":"")+d;if(e&&(T+=" "+s(e.replace(/ ?[\r\n]+/g," ")),n&&n()),!u){let O=r.replace(/\n+/g,`
|
|
176
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),P=!1,D=ia(i,!0);a!=="folded"&&t!==Ae.Scalar.BLOCK_FOLDED&&(D.onOverflow=()=>{P=!0});let w=ot.foldFlowLines(`${_}${O}${p}`,l,ot.FOLD_BLOCK,D);if(!P)return`>${T}
|
|
177
|
+
${l}${w}`}return r=r.replace(/\n+/g,`$&${l}`),`|${T}
|
|
178
|
+
${l}${_}${r}${p}`}function AE(e,t,r,i){let{type:n,value:o}=e,{actualString:a,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&o.includes(`
|
|
179
|
+
`)||u&&/[[\]{},]/.test(o))return gn(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return s||u||!o.includes(`
|
|
180
|
+
`)?gn(o,t):ra(e,t,r,i);if(!s&&!u&&n!==Ae.Scalar.PLAIN&&o.includes(`
|
|
181
|
+
`))return ra(e,t,r,i);if(oa(o)){if(c==="")return t.forceBlockIndent=!0,ra(e,t,r,i);if(s&&c===l)return gn(o,t)}let d=o.replace(/\n+/g,`$&
|
|
182
|
+
${c}`);if(a){let f=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(d),{compat:p,tags:g}=t.doc.schema;if(g.some(f)||p?.some(f))return gn(o,t)}return s?d:ot.foldFlowLines(d,c,ot.FOLD_FLOW,ia(t,!1))}function EE(e,t,r,i){let{implicitKey:n,inFlow:o}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==Ae.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(s=Ae.Scalar.QUOTE_DOUBLE);let c=u=>{switch(u){case Ae.Scalar.BLOCK_FOLDED:case Ae.Scalar.BLOCK_LITERAL:return n||o?gn(a.value,t):ra(a,t,r,i);case Ae.Scalar.QUOTE_DOUBLE:return kr(a.value,t);case Ae.Scalar.QUOTE_SINGLE:return up(a.value,t);case Ae.Scalar.PLAIN:return AE(a,t,r,i);default:return null}},l=c(s);if(l===null){let{defaultKeyType:u,defaultStringType:d}=t.options,f=n&&u||d;if(l=c(f),l===null)throw new Error(`Unsupported default string type ${f}`)}return l}b$.stringifyString=EE});var Ir=E(fp=>{"use strict";var TE=Ho(),at=Z(),PE=xr(),zE=Sr();function NE(e,t){let r=Object.assign({blockQuote:!0,commentString:PE.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function CE(e,t){if(t.tag){let n=e.filter(o=>o.tag===t.tag);if(n.length>0)return n.find(o=>o.format===t.format)??n[0]}let r,i;if(at.isScalar(t)){i=t.value;let n=e.filter(o=>o.identify?.(i));if(n.length>1){let o=n.filter(a=>a.test);o.length>0&&(n=o)}r=n.find(o=>o.format===t.format)??n.find(o=>!o.format)}else i=t,r=e.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!r){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return r}function jE(e,t,{anchors:r,doc:i}){if(!i.directives)return"";let n=[],o=(at.isScalar(e)||at.isCollection(e))&&e.anchor;o&&TE.anchorIsValid(o)&&(r.add(o),n.push(`&${o}`));let a=e.tag??(t.default?null:t.tag);return a&&n.push(i.directives.tagString(a)),n.join(" ")}function DE(e,t,r,i){if(at.isPair(e))return e.toString(t,r,i);if(at.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let n,o=at.isNode(e)?e:t.doc.createNode(e,{onTagObj:c=>n=c});n??(n=CE(t.doc.schema.tags,o));let a=jE(o,n,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);let s=typeof n.stringify=="function"?n.stringify(o,t,r,i):at.isScalar(o)?zE.stringifyString(o,t,r,i):o.toString(t,r,i);return a?at.isScalar(o)||s[0]==="{"||s[0]==="["?`${a} ${s}`:`${a}
|
|
183
|
+
${t.indent}${s}`:s}fp.createStringifyContext=NE;fp.stringify=DE});var w$=E(x$=>{"use strict";var Ve=Z(),_$=Q(),$$=Ir(),Or=xr();function UE({key:e,value:t},r,i,n){let{allNullValues:o,doc:a,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=r,f=Ve.isNode(e)&&e.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(Ve.isCollection(e)||!Ve.isNode(e)&&typeof e=="object"){let D="With simple keys, collection cannot be used as a key value";throw new Error(D)}}let p=!d&&(!e||f&&t==null&&!r.inFlow||Ve.isCollection(e)||(Ve.isScalar(e)?e.type===_$.Scalar.BLOCK_FOLDED||e.type===_$.Scalar.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(d||!o),indent:s+c});let g=!1,m=!1,v=$$.stringify(e,r,()=>g=!0,()=>m=!0);if(!p&&!r.inFlow&&v.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(o||t==null)return g&&i&&i(),v===""?"?":p?`? ${v}`:v}else if(o&&!d||t==null&&p)return v=`? ${v}`,f&&!g?v+=Or.lineComment(v,r.indent,l(f)):m&&n&&n(),v;g&&(f=null),p?(f&&(v+=Or.lineComment(v,r.indent,l(f))),v=`? ${v}
|
|
184
|
+
${s}:`):(v=`${v}:`,f&&(v+=Or.lineComment(v,r.indent,l(f))));let A,_,N;Ve.isNode(t)?(A=!!t.spaceBefore,_=t.commentBefore,N=t.comment):(A=!1,_=null,N=null,t&&typeof t=="object"&&(t=a.createNode(t))),r.implicitKey=!1,!p&&!f&&Ve.isScalar(t)&&(r.indentAtStart=v.length+1),m=!1,!u&&c.length>=2&&!r.inFlow&&!p&&Ve.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let T=!1,O=$$.stringify(t,r,()=>T=!0,()=>m=!0),P=" ";if(f||A||_){if(P=A?`
|
|
185
|
+
`:"",_){let D=l(_);P+=`
|
|
186
|
+
${Or.indentComment(D,r.indent)}`}O===""&&!r.inFlow?P===`
|
|
187
|
+
`&&N&&(P=`
|
|
188
|
+
|
|
189
|
+
`):P+=`
|
|
190
|
+
${r.indent}`}else if(!p&&Ve.isCollection(t)){let D=O[0],w=O.indexOf(`
|
|
191
|
+
`),U=w!==-1,q=r.inFlow??t.flow??t.items.length===0;if(U||!q){let H=!1;if(U&&(D==="&"||D==="!")){let F=O.indexOf(" ");D==="&"&&F!==-1&&F<w&&O[F+1]==="!"&&(F=O.indexOf(" ",F+1)),(F===-1||w<F)&&(H=!0)}H||(P=`
|
|
192
|
+
${r.indent}`)}}else(O===""||O[0]===`
|
|
193
|
+
`)&&(P="");return v+=P+O,r.inFlow?T&&i&&i():N&&!T?v+=Or.lineComment(v,r.indent,l(N)):m&&n&&n(),v}x$.stringifyPair=UE});var mp=E(pp=>{"use strict";var k$=Ue("process");function LE(e,...t){e==="debug"&&console.log(...t)}function RE(e,t){(e==="debug"||e==="warn")&&(typeof k$.emitWarning=="function"?k$.emitWarning(t):console.warn(t))}pp.debug=LE;pp.warn=RE});var ua=E(la=>{"use strict";var ca=Z(),S$=Q(),aa="<<",sa={identify:e=>e===aa||typeof e=="symbol"&&e.description===aa,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new S$.Scalar(Symbol(aa)),{addToJSMap:I$}),stringify:()=>aa},ME=(e,t)=>(sa.identify(t)||ca.isScalar(t)&&(!t.type||t.type===S$.Scalar.PLAIN)&&sa.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===sa.tag&&r.default);function I$(e,t,r){let i=O$(e,r);if(ca.isSeq(i))for(let n of i.items)hp(e,t,n);else if(Array.isArray(i))for(let n of i)hp(e,t,n);else hp(e,t,i)}function hp(e,t,r){let i=O$(e,r);if(!ca.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,e,Map);for(let[o,a]of n)t instanceof Map?t.has(o)||t.set(o,a):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function O$(e,t){return e&&ca.isAlias(t)?t.resolve(e.doc,e):t}la.addMergeToJSMap=I$;la.isMergeKey=ME;la.merge=sa});var vp=E(T$=>{"use strict";var FE=mp(),A$=ua(),ZE=Ir(),E$=Z(),gp=rt();function qE(e,t,{key:r,value:i}){if(E$.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,i);else if(A$.isMergeKey(e,r))A$.addMergeToJSMap(e,t,i);else{let n=gp.toJS(r,"",e);if(t instanceof Map)t.set(n,gp.toJS(i,n,e));else if(t instanceof Set)t.add(n);else{let o=VE(r,n,e),a=gp.toJS(i,o,e);o in t?Object.defineProperty(t,o,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[o]=a}}return t}function VE(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(E$.isNode(e)&&r?.doc){let i=ZE.createStringifyContext(r.doc,{});i.anchors=new Set;for(let o of r.anchors.keys())i.anchors.add(o.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=e.toString(i);if(!r.mapKeyWarned){let o=JSON.stringify(n);o.length>40&&(o=o.substring(0,36)+'..."'),FE.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}T$.addPairToJSMap=qE});var st=E(yp=>{"use strict";var P$=$r(),BE=w$(),KE=vp(),da=Z();function JE(e,t,r){let i=P$.createNode(e,void 0,r),n=P$.createNode(t,void 0,r);return new fa(i,n)}var fa=class e{constructor(t,r=null){Object.defineProperty(this,da.NODE_TYPE,{value:da.PAIR}),this.key=t,this.value=r}clone(t){let{key:r,value:i}=this;return da.isNode(r)&&(r=r.clone(t)),da.isNode(i)&&(i=i.clone(t)),new e(r,i)}toJSON(t,r){let i=r?.mapAsMap?new Map:{};return KE.addPairToJSMap(r,i,this)}toString(t,r,i){return t?.doc?BE.stringifyPair(this,t,r,i):JSON.stringify(this)}};yp.Pair=fa;yp.createPair=JE});var bp=E(N$=>{"use strict";var It=Z(),z$=Ir(),pa=xr();function GE(e,t,r){return(t.inFlow??e.flow?HE:WE)(e,t,r)}function WE({comment:e,items:t},r,{blockItemPrefix:i,flowChars:n,itemIndent:o,onChompKeep:a,onComment:s}){let{indent:c,options:{commentString:l}}=r,u=Object.assign({},r,{indent:o,type:null}),d=!1,f=[];for(let g=0;g<t.length;++g){let m=t[g],v=null;if(It.isNode(m))!d&&m.spaceBefore&&f.push(""),ma(r,f,m.commentBefore,d),m.comment&&(v=m.comment);else if(It.isPair(m)){let _=It.isNode(m.key)?m.key:null;_&&(!d&&_.spaceBefore&&f.push(""),ma(r,f,_.commentBefore,d))}d=!1;let A=z$.stringify(m,u,()=>v=null,()=>d=!0);v&&(A+=pa.lineComment(A,o,l(v))),d&&v&&(d=!1),f.push(i+A)}let p;if(f.length===0)p=n.start+n.end;else{p=f[0];for(let g=1;g<f.length;++g){let m=f[g];p+=m?`
|
|
194
|
+
${c}${m}`:`
|
|
195
|
+
`}}return e?(p+=`
|
|
196
|
+
`+pa.indentComment(l(e),c),s&&s()):d&&a&&a(),p}function HE({items:e},t,{flowChars:r,itemIndent:i}){let{indent:n,indentStep:o,flowCollectionPadding:a,options:{commentString:s}}=t;i+=o;let c=Object.assign({},t,{indent:i,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let g=0;g<e.length;++g){let m=e[g],v=null;if(It.isNode(m))m.spaceBefore&&d.push(""),ma(t,d,m.commentBefore,!1),m.comment&&(v=m.comment);else if(It.isPair(m)){let _=It.isNode(m.key)?m.key:null;_&&(_.spaceBefore&&d.push(""),ma(t,d,_.commentBefore,!1),_.comment&&(l=!0));let N=It.isNode(m.value)?m.value:null;N?(N.comment&&(v=N.comment),N.commentBefore&&(l=!0)):m.value==null&&_?.comment&&(v=_.comment)}v&&(l=!0);let A=z$.stringify(m,c,()=>v=null);l||(l=d.length>u||A.includes(`
|
|
197
|
+
`)),g<e.length-1?A+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(l||(l=d.reduce((_,N)=>_+N.length+2,2)+(A.length+2)>t.options.lineWidth)),l&&(A+=",")),v&&(A+=pa.lineComment(A,i,s(v))),d.push(A),u=d.length}let{start:f,end:p}=r;if(d.length===0)return f+p;if(!l){let g=d.reduce((m,v)=>m+v.length+2,2);l=t.options.lineWidth>0&&g>t.options.lineWidth}if(l){let g=f;for(let m of d)g+=m?`
|
|
198
|
+
${o}${n}${m}`:`
|
|
199
|
+
`;return`${g}
|
|
200
|
+
${n}${p}`}else return`${f}${a}${d.join(" ")}${a}${p}`}function ma({indent:e,options:{commentString:t}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let o=pa.indentComment(t(i),e);r.push(o.trimStart())}}N$.stringifyCollection=GE});var lt=E($p=>{"use strict";var YE=bp(),XE=vp(),QE=ea(),ct=Z(),ha=st(),eT=Q();function Ar(e,t){let r=ct.isScalar(t)?t.value:t;for(let i of e)if(ct.isPair(i)&&(i.key===t||i.key===r||ct.isScalar(i.key)&&i.key.value===r))return i}var _p=class extends QE.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(ct.MAP,t),this.items=[]}static from(t,r,i){let{keepUndefined:n,replacer:o}=i,a=new this(t),s=(c,l)=>{if(typeof o=="function")l=o.call(r,c,l);else if(Array.isArray(o)&&!o.includes(c))return;(l!==void 0||n)&&a.items.push(ha.createPair(c,l,i))};if(r instanceof Map)for(let[c,l]of r)s(c,l);else if(r&&typeof r=="object")for(let c of Object.keys(r))s(c,r[c]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,r){let i;ct.isPair(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new ha.Pair(t,t?.value):i=new ha.Pair(t.key,t.value);let n=Ar(this.items,i.key),o=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);ct.isScalar(n.value)&&eT.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(o){let a=this.items.findIndex(s=>o(i,s)<0);a===-1?this.items.push(i):this.items.splice(a,0,i)}else this.items.push(i)}delete(t){let r=Ar(this.items,t);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(t,r){let n=Ar(this.items,t)?.value;return(!r&&ct.isScalar(n)?n.value:n)??void 0}has(t){return!!Ar(this.items,t)}set(t,r){this.add(new ha.Pair(t,r),!0)}toJSON(t,r,i){let n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(let o of this.items)XE.addPairToJSMap(r,n,o);return n}toString(t,r,i){if(!t)return JSON.stringify(this);for(let n of this.items)if(!ct.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),YE.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:r})}};$p.YAMLMap=_p;$p.findPair=Ar});var vn=E(j$=>{"use strict";var tT=Z(),C$=lt(),nT={collection:"map",default:!0,nodeClass:C$.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){return tT.isMap(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>C$.YAMLMap.from(e,t,r)};j$.map=nT});var ut=E(D$=>{"use strict";var rT=$r(),iT=bp(),oT=ea(),va=Z(),aT=Q(),sT=rt(),xp=class extends oT.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(va.SEQ,t),this.items=[]}add(t){this.items.push(t)}delete(t){let r=ga(t);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(t,r){let i=ga(t);if(typeof i!="number")return;let n=this.items[i];return!r&&va.isScalar(n)?n.value:n}has(t){let r=ga(t);return typeof r=="number"&&r<this.items.length}set(t,r){let i=ga(t);if(typeof i!="number")throw new Error(`Expected a valid index, not ${t}.`);let n=this.items[i];va.isScalar(n)&&aT.isScalarValue(r)?n.value=r:this.items[i]=r}toJSON(t,r){let i=[];r?.onCreate&&r.onCreate(i);let n=0;for(let o of this.items)i.push(sT.toJS(o,String(n++),r));return i}toString(t,r,i){return t?iT.stringifyCollection(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(t,r,i){let{replacer:n}=i,o=new this(t);if(r&&Symbol.iterator in Object(r)){let a=0;for(let s of r){if(typeof n=="function"){let c=r instanceof Set?s:String(a++);s=n.call(r,c,s)}o.items.push(rT.createNode(s,void 0,i))}}return o}};function ga(e){let t=va.isScalar(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}D$.YAMLSeq=xp});var yn=E(L$=>{"use strict";var cT=Z(),U$=ut(),lT={collection:"seq",default:!0,nodeClass:U$.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){return cT.isSeq(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>U$.YAMLSeq.from(e,t,r)};L$.seq=lT});var Er=E(R$=>{"use strict";var uT=Sr(),dT={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,i){return t=Object.assign({actualString:!0},t),uT.stringifyString(e,t,r,i)}};R$.string=dT});var ya=E(Z$=>{"use strict";var M$=Q(),F$={identify:e=>e==null,createNode:()=>new M$.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new M$.Scalar(null),stringify:({source:e},t)=>typeof e=="string"&&F$.test.test(e)?e:t.options.nullStr};Z$.nullTag=F$});var wp=E(V$=>{"use strict";var fT=Q(),q$={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new fT.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&q$.test.test(e)){let i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?r.options.trueStr:r.options.falseStr}};V$.boolTag=q$});var bn=E(B$=>{"use strict";function pT({format:e,minFractionDigits:t,tag:r,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let o=Object.is(i,-0)?"-0":JSON.stringify(i);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let a=o.indexOf(".");a<0&&(a=o.length,o+=".");let s=t-(o.length-a-1);for(;s-- >0;)o+="0"}return o}B$.stringifyNumber=pT});var Sp=E(ba=>{"use strict";var mT=Q(),kp=bn(),hT={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:kp.stringifyNumber},gT={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():kp.stringifyNumber(e)}},vT={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new mT.Scalar(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:kp.stringifyNumber};ba.float=vT;ba.floatExp=gT;ba.floatNaN=hT});var Op=E($a=>{"use strict";var K$=bn(),_a=e=>typeof e=="bigint"||Number.isInteger(e),Ip=(e,t,r,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),r);function J$(e,t,r){let{value:i}=e;return _a(i)&&i>=0?r+i.toString(t):K$.stringifyNumber(e)}var yT={identify:e=>_a(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Ip(e,2,8,r),stringify:e=>J$(e,8,"0o")},bT={identify:_a,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Ip(e,0,10,r),stringify:K$.stringifyNumber},_T={identify:e=>_a(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Ip(e,2,16,r),stringify:e=>J$(e,16,"0x")};$a.int=bT;$a.intHex=_T;$a.intOct=yT});var W$=E(G$=>{"use strict";var $T=vn(),xT=ya(),wT=yn(),kT=Er(),ST=wp(),Ap=Sp(),Ep=Op(),IT=[$T.map,wT.seq,kT.string,xT.nullTag,ST.boolTag,Ep.intOct,Ep.int,Ep.intHex,Ap.floatNaN,Ap.floatExp,Ap.float];G$.schema=IT});var X$=E(Y$=>{"use strict";var OT=Q(),AT=vn(),ET=yn();function H$(e){return typeof e=="bigint"||Number.isInteger(e)}var xa=({value:e})=>JSON.stringify(e),TT=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:xa},{identify:e=>e==null,createNode:()=>new OT.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:xa},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:xa},{identify:H$,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>H$(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:xa}],PT={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},zT=[AT.map,ET.seq].concat(TT,PT);Y$.schema=zT});var Pp=E(Q$=>{"use strict";var Tr=Ue("buffer"),Tp=Q(),NT=Sr(),CT={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Tr.Buffer=="function")return Tr.Buffer.from(e,"base64");if(typeof atob=="function"){let r=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(r.length);for(let n=0;n<r.length;++n)i[n]=r.charCodeAt(n);return i}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},i,n,o){if(!r)return"";let a=r,s;if(typeof Tr.Buffer=="function")s=a instanceof Tr.Buffer?a.toString("base64"):Tr.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<a.length;++l)c+=String.fromCharCode(a[l]);s=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Tp.Scalar.BLOCK_LITERAL),t!==Tp.Scalar.QUOTE_DOUBLE){let c=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(s.length/c),u=new Array(l);for(let d=0,f=0;d<l;++d,f+=c)u[d]=s.substr(f,c);s=u.join(t===Tp.Scalar.BLOCK_LITERAL?`
|
|
201
|
+
`:" ")}return NT.stringifyString({comment:e,type:t,value:s},i,n,o)}};Q$.binary=CT});var Sa=E(ka=>{"use strict";var wa=Z(),zp=st(),jT=Q(),DT=ut();function ex(e,t){if(wa.isSeq(e))for(let r=0;r<e.items.length;++r){let i=e.items[r];if(!wa.isPair(i)){if(wa.isMap(i)){i.items.length>1&&t("Each pair must have its own sequence indicator");let n=i.items[0]||new zp.Pair(new jT.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
|
|
202
|
+
${n.key.commentBefore}`:i.commentBefore),i.comment){let o=n.value??n.key;o.comment=o.comment?`${i.comment}
|
|
203
|
+
${o.comment}`:i.comment}i=n}e.items[r]=wa.isPair(i)?i:new zp.Pair(i)}}else t("Expected a sequence for this tag");return e}function tx(e,t,r){let{replacer:i}=r,n=new DT.YAMLSeq(e);n.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof i=="function"&&(a=i.call(t,String(o++),a));let s,c;if(Array.isArray(a))if(a.length===2)s=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let l=Object.keys(a);if(l.length===1)s=l[0],c=a[s];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else s=a;n.items.push(zp.createPair(s,c,r))}return n}var UT={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ex,createNode:tx};ka.createPairs=tx;ka.pairs=UT;ka.resolvePairs=ex});var jp=E(Cp=>{"use strict";var nx=Z(),Np=rt(),Pr=lt(),LT=ut(),rx=Sa(),Ot=class e extends LT.YAMLSeq{constructor(){super(),this.add=Pr.YAMLMap.prototype.add.bind(this),this.delete=Pr.YAMLMap.prototype.delete.bind(this),this.get=Pr.YAMLMap.prototype.get.bind(this),this.has=Pr.YAMLMap.prototype.has.bind(this),this.set=Pr.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON(t,r){if(!r)return super.toJSON(t);let i=new Map;r?.onCreate&&r.onCreate(i);for(let n of this.items){let o,a;if(nx.isPair(n)?(o=Np.toJS(n.key,"",r),a=Np.toJS(n.value,o,r)):o=Np.toJS(n,"",r),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,a)}return i}static from(t,r,i){let n=rx.createPairs(t,r,i),o=new this;return o.items=n.items,o}};Ot.tag="tag:yaml.org,2002:omap";var RT={collection:"seq",identify:e=>e instanceof Map,nodeClass:Ot,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=rx.resolvePairs(e,t),i=[];for(let{key:n}of r.items)nx.isScalar(n)&&(i.includes(n.value)?t(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new Ot,r)},createNode:(e,t,r)=>Ot.from(e,t,r)};Cp.YAMLOMap=Ot;Cp.omap=RT});var cx=E(Dp=>{"use strict";var ix=Q();function ox({value:e,source:t},r){return t&&(e?ax:sx).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}var ax={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ix.Scalar(!0),stringify:ox},sx={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ix.Scalar(!1),stringify:ox};Dp.falseTag=sx;Dp.trueTag=ax});var lx=E(Ia=>{"use strict";var MT=Q(),Up=bn(),FT={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Up.stringifyNumber},ZT={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Up.stringifyNumber(e)}},qT={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new MT.Scalar(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let i=e.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:Up.stringifyNumber};Ia.float=qT;Ia.floatExp=ZT;Ia.floatNaN=FT});var dx=E(Nr=>{"use strict";var ux=bn(),zr=e=>typeof e=="bigint"||Number.isInteger(e);function Oa(e,t,r,{intAsBigInt:i}){let n=e[0];if((n==="-"||n==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let a=BigInt(e);return n==="-"?BigInt(-1)*a:a}let o=parseInt(e,r);return n==="-"?-1*o:o}function Lp(e,t,r){let{value:i}=e;if(zr(i)){let n=i.toString(t);return i<0?"-"+r+n.substr(1):r+n}return ux.stringifyNumber(e)}var VT={identify:zr,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Oa(e,2,2,r),stringify:e=>Lp(e,2,"0b")},BT={identify:zr,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Oa(e,1,8,r),stringify:e=>Lp(e,8,"0")},KT={identify:zr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Oa(e,0,10,r),stringify:ux.stringifyNumber},JT={identify:zr,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Oa(e,2,16,r),stringify:e=>Lp(e,16,"0x")};Nr.int=KT;Nr.intBin=VT;Nr.intHex=JT;Nr.intOct=BT});var Mp=E(Rp=>{"use strict";var Ta=Z(),Aa=st(),Ea=lt(),At=class e extends Ea.YAMLMap{constructor(t){super(t),this.tag=e.tag}add(t){let r;Ta.isPair(t)?r=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?r=new Aa.Pair(t.key,null):r=new Aa.Pair(t,null),Ea.findPair(this.items,r.key)||this.items.push(r)}get(t,r){let i=Ea.findPair(this.items,t);return!r&&Ta.isPair(i)?Ta.isScalar(i.key)?i.key.value:i.key:i}set(t,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let i=Ea.findPair(this.items,t);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new Aa.Pair(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(t,r,i){let{replacer:n}=i,o=new this(t);if(r&&Symbol.iterator in Object(r))for(let a of r)typeof n=="function"&&(a=n.call(r,a,a)),o.items.push(Aa.createPair(a,null,i));return o}};At.tag="tag:yaml.org,2002:set";var GT={collection:"map",identify:e=>e instanceof Set,nodeClass:At,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>At.from(e,t,r),resolve(e,t){if(Ta.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new At,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};Rp.YAMLSet=At;Rp.set=GT});var Zp=E(Pa=>{"use strict";var WT=bn();function Fp(e,t){let r=e[0],i=r==="-"||r==="+"?e.substring(1):e,n=a=>t?BigInt(a):Number(a),o=i.replace(/_/g,"").split(":").reduce((a,s)=>a*n(60)+n(s),n(0));return r==="-"?n(-1)*o:o}function fx(e){let{value:t}=e,r=a=>a;if(typeof t=="bigint")r=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return WT.stringifyNumber(e);let i="";t<0&&(i="-",t*=r(-1));let n=r(60),o=[t%n];return t<60?o.unshift(0):(t=(t-o[0])/n,o.unshift(t%n),t>=60&&(t=(t-o[0])/n,o.unshift(t))),i+o.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var HT={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>Fp(e,r),stringify:fx},YT={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Fp(e,!1),stringify:fx},px={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(px.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,i,n,o,a,s]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0,l=Date.UTC(r,i-1,n,o||0,a||0,s||0,c),u=t[8];if(u&&u!=="Z"){let d=Fp(u,!1);Math.abs(d)<30&&(d*=60),l-=6e4*d}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Pa.floatTime=YT;Pa.intTime=HT;Pa.timestamp=px});var gx=E(hx=>{"use strict";var XT=vn(),QT=ya(),eP=yn(),tP=Er(),nP=Pp(),mx=cx(),qp=lx(),za=dx(),rP=ua(),iP=jp(),oP=Sa(),aP=Mp(),Vp=Zp(),sP=[XT.map,eP.seq,tP.string,QT.nullTag,mx.trueTag,mx.falseTag,za.intBin,za.intOct,za.int,za.intHex,qp.floatNaN,qp.floatExp,qp.float,nP.binary,rP.merge,iP.omap,oP.pairs,aP.set,Vp.intTime,Vp.floatTime,Vp.timestamp];hx.schema=sP});var Ix=E(Jp=>{"use strict";var _x=vn(),cP=ya(),$x=yn(),lP=Er(),uP=wp(),Bp=Sp(),Kp=Op(),dP=W$(),fP=X$(),xx=Pp(),Cr=ua(),wx=jp(),kx=Sa(),vx=gx(),Sx=Mp(),Na=Zp(),yx=new Map([["core",dP.schema],["failsafe",[_x.map,$x.seq,lP.string]],["json",fP.schema],["yaml11",vx.schema],["yaml-1.1",vx.schema]]),bx={binary:xx.binary,bool:uP.boolTag,float:Bp.float,floatExp:Bp.floatExp,floatNaN:Bp.floatNaN,floatTime:Na.floatTime,int:Kp.int,intHex:Kp.intHex,intOct:Kp.intOct,intTime:Na.intTime,map:_x.map,merge:Cr.merge,null:cP.nullTag,omap:wx.omap,pairs:kx.pairs,seq:$x.seq,set:Sx.set,timestamp:Na.timestamp},pP={"tag:yaml.org,2002:binary":xx.binary,"tag:yaml.org,2002:merge":Cr.merge,"tag:yaml.org,2002:omap":wx.omap,"tag:yaml.org,2002:pairs":kx.pairs,"tag:yaml.org,2002:set":Sx.set,"tag:yaml.org,2002:timestamp":Na.timestamp};function mP(e,t,r){let i=yx.get(t);if(i&&!e)return r&&!i.includes(Cr.merge)?i.concat(Cr.merge):i.slice();let n=i;if(!n)if(Array.isArray(e))n=[];else{let o=Array.from(yx.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(let o of e)n=n.concat(o);else typeof e=="function"&&(n=e(n.slice()));return r&&(n=n.concat(Cr.merge)),n.reduce((o,a)=>{let s=typeof a=="string"?bx[a]:a;if(!s){let c=JSON.stringify(a),l=Object.keys(bx).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return o.includes(s)||o.push(s),o},[])}Jp.coreKnownTags=pP;Jp.getTags=mP});var Hp=E(Ox=>{"use strict";var Gp=Z(),hP=vn(),gP=yn(),vP=Er(),Ca=Ix(),yP=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,Wp=class e{constructor({compat:t,customTags:r,merge:i,resolveKnownTags:n,schema:o,sortMapEntries:a,toStringDefaults:s}){this.compat=Array.isArray(t)?Ca.getTags(t,"compat"):t?Ca.getTags(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=n?Ca.coreKnownTags:{},this.tags=Ca.getTags(r,this.name,i),this.toStringOptions=s??null,Object.defineProperty(this,Gp.MAP,{value:hP.map}),Object.defineProperty(this,Gp.SCALAR,{value:vP.string}),Object.defineProperty(this,Gp.SEQ,{value:gP.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?yP:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};Ox.Schema=Wp});var Ex=E(Ax=>{"use strict";var bP=Z(),Yp=Ir(),jr=xr();function _P(e,t){let r=[],i=t.directives===!0;if(t.directives!==!1&&e.directives){let c=e.directives.toString(e);c?(r.push(c),i=!0):e.directives.docStart&&(i=!0)}i&&r.push("---");let n=Yp.createStringifyContext(e,t),{commentString:o}=n.options;if(e.commentBefore){r.length!==1&&r.unshift("");let c=o(e.commentBefore);r.unshift(jr.indentComment(c,""))}let a=!1,s=null;if(e.contents){if(bP.isNode(e.contents)){if(e.contents.spaceBefore&&i&&r.push(""),e.contents.commentBefore){let u=o(e.contents.commentBefore);r.push(jr.indentComment(u,""))}n.forceBlockIndent=!!e.comment,s=e.contents.comment}let c=s?void 0:()=>a=!0,l=Yp.stringify(e.contents,n,()=>s=null,c);s&&(l+=jr.lineComment(l,"",o(s))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push(Yp.stringify(e.contents,n));if(e.directives?.docEnd)if(e.comment){let c=o(e.comment);c.includes(`
|
|
204
|
+
`)?(r.push("..."),r.push(jr.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=e.comment;c&&a&&(c=c.replace(/^\n+/,"")),c&&((!a||s)&&r[r.length-1]!==""&&r.push(""),r.push(jr.indentComment(o(c),"")))}return r.join(`
|
|
205
|
+
`)+`
|
|
206
|
+
`}Ax.stringifyDocument=_P});var Dr=E(Tx=>{"use strict";var $P=_r(),_n=ea(),Se=Z(),xP=st(),wP=rt(),kP=Hp(),SP=Ex(),Xp=Ho(),IP=np(),OP=$r(),Qp=tp(),em=class e{constructor(t,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Se.NODE_TYPE,{value:Se.DOC});let n=null;typeof r=="function"||Array.isArray(r)?n=r:i===void 0&&r&&(i=r,r=void 0);let o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=o;let{version:a}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Qp.Directives({version:a}),this.setSchema(a,i),this.contents=t===void 0?null:this.createNode(t,n,i)}clone(){let t=Object.create(e.prototype,{[Se.NODE_TYPE]:{value:Se.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Se.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){$n(this.contents)&&this.contents.add(t)}addIn(t,r){$n(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){let i=Xp.anchorNames(this);t.anchor=!r||i.has(r)?Xp.findNewAnchor(r||"a",i):r}return new $P.Alias(t.anchor)}createNode(t,r,i){let n;if(typeof r=="function")t=r.call({"":t},"",t),n=r;else if(Array.isArray(r)){let v=_=>typeof _=="number"||_ instanceof String||_ instanceof Number,A=r.filter(v).map(String);A.length>0&&(r=r.concat(A)),n=r}else i===void 0&&r&&(i=r,r=void 0);let{aliasDuplicateObjects:o,anchorPrefix:a,flow:s,keepUndefined:c,onTagObj:l,tag:u}=i??{},{onAnchor:d,setAnchors:f,sourceObjects:p}=Xp.createNodeAnchors(this,a||"a"),g={aliasDuplicateObjects:o??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:p},m=OP.createNode(t,u,g);return s&&Se.isCollection(m)&&(m.flow=!0),f(),m}createPair(t,r,i={}){let n=this.createNode(t,null,i),o=this.createNode(r,null,i);return new xP.Pair(n,o)}delete(t){return $n(this.contents)?this.contents.delete(t):!1}deleteIn(t){return _n.isEmptyPath(t)?this.contents==null?!1:(this.contents=null,!0):$n(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Se.isCollection(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return _n.isEmptyPath(t)?!r&&Se.isScalar(this.contents)?this.contents.value:this.contents:Se.isCollection(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Se.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){return _n.isEmptyPath(t)?this.contents!==void 0:Se.isCollection(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=_n.collectionFromPath(this.schema,[t],r):$n(this.contents)&&this.contents.set(t,r)}setIn(t,r){_n.isEmptyPath(t)?this.contents=r:this.contents==null?this.contents=_n.collectionFromPath(this.schema,Array.from(t),r):$n(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Qp.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Qp.Directives({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(i)this.schema=new kP.Schema(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:o,reviver:a}={}){let s={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},c=wP.toJS(this.contents,r??"",s);if(typeof o=="function")for(let{count:l,res:u}of s.anchors.values())o(u,l);return typeof a=="function"?IP.applyReviver(a,{"":c},"",c):c}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let r=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return SP.stringifyDocument(this,t)}};function $n(e){if(Se.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}Tx.Document=em});var Rr=E(Lr=>{"use strict";var Ur=class extends Error{constructor(t,r,i,n){super(),this.name=t,this.code=i,this.message=n,this.pos=r}},tm=class extends Ur{constructor(t,r,i){super("YAMLParseError",t,r,i)}},nm=class extends Ur{constructor(t,r,i){super("YAMLWarning",t,r,i)}},AP=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(s=>t.linePos(s));let{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let o=n-1,a=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(o>=60&&a.length>80){let s=Math.min(o-39,a.length-79);a="\u2026"+a.substring(s),o-=s-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(a.substring(0,o))){let s=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);s.length>80&&(s=s.substring(0,79)+`\u2026
|
|
207
|
+
`),a=s+a}if(/[^ ]/.test(a)){let s=1,c=r.linePos[1];c?.line===i&&c.col>n&&(s=Math.max(1,Math.min(c.col-n,80-o)));let l=" ".repeat(o)+"^".repeat(s);r.message+=`:
|
|
208
|
+
|
|
209
|
+
${a}
|
|
210
|
+
${l}
|
|
211
|
+
`}};Lr.YAMLError=Ur;Lr.YAMLParseError=tm;Lr.YAMLWarning=nm;Lr.prettifyError=AP});var Mr=E(Px=>{"use strict";function EP(e,{flow:t,indicator:r,next:i,offset:n,onError:o,parentIndent:a,startOnNewline:s}){let c=!1,l=s,u=s,d="",f="",p=!1,g=!1,m=null,v=null,A=null,_=null,N=null,T=null,O=null;for(let w of e)switch(g&&(w.type!=="space"&&w.type!=="newline"&&w.type!=="comma"&&o(w.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(l&&w.type!=="comment"&&w.type!=="newline"&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),w.type){case"space":!t&&(r!=="doc-start"||i?.type!=="flow-collection")&&w.source.includes(" ")&&(m=w),u=!0;break;case"comment":{u||o(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let U=w.source.substring(1)||" ";d?d+=f+U:d=U,f="",l=!1;break}case"newline":l?d?d+=w.source:(!T||r!=="seq-item-ind")&&(c=!0):f+=w.source,l=!0,p=!0,(v||A)&&(_=w),u=!0;break;case"anchor":v&&o(w,"MULTIPLE_ANCHORS","A node can have at most one anchor"),w.source.endsWith(":")&&o(w.offset+w.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=w,O??(O=w.offset),l=!1,u=!1,g=!0;break;case"tag":{A&&o(w,"MULTIPLE_TAGS","A node can have at most one tag"),A=w,O??(O=w.offset),l=!1,u=!1,g=!0;break}case r:(v||A)&&o(w,"BAD_PROP_ORDER",`Anchors and tags must be after the ${w.source} indicator`),T&&o(w,"UNEXPECTED_TOKEN",`Unexpected ${w.source} in ${t??"collection"}`),T=w,l=r==="seq-item-ind"||r==="explicit-key-ind",u=!1;break;case"comma":if(t){N&&o(w,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),N=w,l=!1,u=!1;break}default:o(w,"UNEXPECTED_TOKEN",`Unexpected ${w.type} token`),l=!1,u=!1}let P=e[e.length-1],D=P?P.offset+P.source.length:n;return g&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&o(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(l&&m.indent<=a||i?.type==="block-map"||i?.type==="block-seq")&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:N,found:T,spaceBefore:c,comment:d,hasNewline:p,anchor:v,tag:A,newlineAfterProp:_,end:D,start:O??D}}Px.resolveProps=EP});var ja=E(zx=>{"use strict";function rm(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
212
|
+
`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(rm(t.key)||rm(t.value))return!0}return!1;default:return!0}}zx.containsNewline=rm});var im=E(Nx=>{"use strict";var TP=ja();function PP(e,t,r){if(t?.type==="flow-collection"){let i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&TP.containsNewline(t)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Nx.flowIndentCheck=PP});var om=E(jx=>{"use strict";var Cx=Z();function zP(e,t,r){let{uniqueKeys:i}=e.options;if(i===!1)return!1;let n=typeof i=="function"?i:(o,a)=>o===a||Cx.isScalar(o)&&Cx.isScalar(a)&&o.value===a.value;return t.some(o=>n(o.key,r))}jx.mapIncludes=zP});var Fx=E(Mx=>{"use strict";var Dx=st(),NP=lt(),Ux=Mr(),CP=ja(),Lx=im(),jP=om(),Rx="All mapping items must start at the same column";function DP({composeNode:e,composeEmptyNode:t},r,i,n,o){let a=o?.nodeClass??NP.YAMLMap,s=new a(r.schema);r.atRoot&&(r.atRoot=!1);let c=i.offset,l=null;for(let u of i.items){let{start:d,key:f,sep:p,value:g}=u,m=Ux.resolveProps(d,{indicator:"explicit-key-ind",next:f??p?.[0],offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0}),v=!m.found;if(v){if(f&&(f.type==="block-seq"?n(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in f&&f.indent!==i.indent&&n(c,"BAD_INDENT",Rx)),!m.anchor&&!m.tag&&!p){l=m.end,m.comment&&(s.comment?s.comment+=`
|
|
213
|
+
`+m.comment:s.comment=m.comment);continue}(m.newlineAfterProp||CP.containsNewline(f))&&n(f??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==i.indent&&n(c,"BAD_INDENT",Rx);r.atKey=!0;let A=m.end,_=f?e(r,f,m,n):t(r,A,d,null,m,n);r.schema.compat&&Lx.flowIndentCheck(i.indent,f,n),r.atKey=!1,jP.mapIncludes(r,s.items,_)&&n(A,"DUPLICATE_KEY","Map keys must be unique");let N=Ux.resolveProps(p??[],{indicator:"map-value-ind",next:g,offset:_.range[2],onError:n,parentIndent:i.indent,startOnNewline:!f||f.type==="block-scalar"});if(c=N.end,N.found){v&&(g?.type==="block-map"&&!N.hasNewline&&n(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&m.start<N.found.offset-1024&&n(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let T=g?e(r,g,N,n):t(r,c,p,null,N,n);r.schema.compat&&Lx.flowIndentCheck(i.indent,g,n),c=T.range[2];let O=new Dx.Pair(_,T);r.options.keepSourceTokens&&(O.srcToken=u),s.items.push(O)}else{v&&n(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),N.comment&&(_.comment?_.comment+=`
|
|
214
|
+
`+N.comment:_.comment=N.comment);let T=new Dx.Pair(_);r.options.keepSourceTokens&&(T.srcToken=u),s.items.push(T)}}return l&&l<c&&n(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[i.offset,c,l??c],s}Mx.resolveBlockMap=DP});var qx=E(Zx=>{"use strict";var UP=ut(),LP=Mr(),RP=im();function MP({composeNode:e,composeEmptyNode:t},r,i,n,o){let a=o?.nodeClass??UP.YAMLSeq,s=new a(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=i.offset,l=null;for(let{start:u,value:d}of i.items){let f=LP.resolveProps(u,{indicator:"seq-item-ind",next:d,offset:c,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!f.found)if(f.anchor||f.tag||d)d?.type==="block-seq"?n(f.end,"BAD_INDENT","All sequence items must start at the same column"):n(c,"MISSING_CHAR","Sequence item without - indicator");else{l=f.end,f.comment&&(s.comment=f.comment);continue}let p=d?e(r,d,f,n):t(r,f.end,u,null,f,n);r.schema.compat&&RP.flowIndentCheck(i.indent,d,n),c=p.range[2],s.items.push(p)}return s.range=[i.offset,c,l??c],s}Zx.resolveBlockSeq=MP});var xn=E(Vx=>{"use strict";function FP(e,t,r,i){let n="";if(e){let o=!1,a="";for(let s of e){let{source:c,type:l}=s;switch(l){case"space":o=!0;break;case"comment":{r&&!o&&i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=c.substring(1)||" ";n?n+=a+u:n=u,a="";break}case"newline":n&&(a+=c),o=!0;break;default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=c.length}}return{comment:n,offset:t}}Vx.resolveEnd=FP});var Gx=E(Jx=>{"use strict";var ZP=Z(),qP=st(),Bx=lt(),VP=ut(),BP=xn(),Kx=Mr(),KP=ja(),JP=om(),am="Block collections are not allowed within flow collections",sm=e=>e&&(e.type==="block-map"||e.type==="block-seq");function GP({composeNode:e,composeEmptyNode:t},r,i,n,o){let a=i.start.source==="{",s=a?"flow map":"flow sequence",c=o?.nodeClass??(a?Bx.YAMLMap:VP.YAMLSeq),l=new c(r.schema);l.flow=!0;let u=r.atRoot;u&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let d=i.offset+i.start.source.length;for(let v=0;v<i.items.length;++v){let A=i.items[v],{start:_,key:N,sep:T,value:O}=A,P=Kx.resolveProps(_,{flow:s,indicator:"explicit-key-ind",next:N??T?.[0],offset:d,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!P.found){if(!P.anchor&&!P.tag&&!T&&!O){v===0&&P.comma?n(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`):v<i.items.length-1&&n(P.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${s}`),P.comment&&(l.comment?l.comment+=`
|
|
215
|
+
`+P.comment:l.comment=P.comment),d=P.end;continue}!a&&r.options.strict&&KP.containsNewline(N)&&n(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(v===0)P.comma&&n(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);else if(P.comma||n(P.start,"MISSING_CHAR",`Missing , between ${s} items`),P.comment){let D="";e:for(let w of _)switch(w.type){case"comma":case"space":break;case"comment":D=w.source.substring(1);break e;default:break e}if(D){let w=l.items[l.items.length-1];ZP.isPair(w)&&(w=w.value??w.key),w.comment?w.comment+=`
|
|
216
|
+
`+D:w.comment=D,P.comment=P.comment.substring(D.length+1)}}if(!a&&!T&&!P.found){let D=O?e(r,O,P,n):t(r,P.end,T,null,P,n);l.items.push(D),d=D.range[2],sm(O)&&n(D.range,"BLOCK_IN_FLOW",am)}else{r.atKey=!0;let D=P.end,w=N?e(r,N,P,n):t(r,D,_,null,P,n);sm(N)&&n(w.range,"BLOCK_IN_FLOW",am),r.atKey=!1;let U=Kx.resolveProps(T??[],{flow:s,indicator:"map-value-ind",next:O,offset:w.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(U.found){if(!a&&!P.found&&r.options.strict){if(T)for(let F of T){if(F===U.found)break;if(F.type==="newline"){n(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}P.start<U.found.offset-1024&&n(U.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else O&&("source"in O&&O.source?.[0]===":"?n(O,"MISSING_CHAR",`Missing space after : in ${s}`):n(U.start,"MISSING_CHAR",`Missing , or : between ${s} items`));let q=O?e(r,O,U,n):U.found?t(r,U.end,T,null,U,n):null;q?sm(O)&&n(q.range,"BLOCK_IN_FLOW",am):U.comment&&(w.comment?w.comment+=`
|
|
217
|
+
`+U.comment:w.comment=U.comment);let H=new qP.Pair(w,q);if(r.options.keepSourceTokens&&(H.srcToken=A),a){let F=l;JP.mapIncludes(r,F.items,w)&&n(D,"DUPLICATE_KEY","Map keys must be unique"),F.items.push(H)}else{let F=new Bx.YAMLMap(r.schema);F.flow=!0,F.items.push(H);let es=(q??w).range;F.range=[w.range[0],es[1],es[2]],l.items.push(F)}d=q?q.range[2]:U.end}}let f=a?"}":"]",[p,...g]=i.end,m=d;if(p?.source===f)m=p.offset+p.source.length;else{let v=s[0].toUpperCase()+s.substring(1),A=u?`${v} must end with a ${f}`:`${v} in block collection must be sufficiently indented and end with a ${f}`;n(d,u?"MISSING_CHAR":"BAD_INDENT",A),p&&p.source.length!==1&&g.unshift(p)}if(g.length>0){let v=BP.resolveEnd(g,m,r.options.strict,n);v.comment&&(l.comment?l.comment+=`
|
|
218
|
+
`+v.comment:l.comment=v.comment),l.range=[i.offset,m,v.offset]}else l.range=[i.offset,m,m];return l}Jx.resolveFlowCollection=GP});var Hx=E(Wx=>{"use strict";var WP=Z(),HP=Q(),YP=lt(),XP=ut(),QP=Fx(),ez=qx(),tz=Gx();function cm(e,t,r,i,n,o){let a=r.type==="block-map"?QP.resolveBlockMap(e,t,r,i,o):r.type==="block-seq"?ez.resolveBlockSeq(e,t,r,i,o):tz.resolveFlowCollection(e,t,r,i,o),s=a.constructor;return n==="!"||n===s.tagName?(a.tag=s.tagName,a):(n&&(a.tag=n),a)}function nz(e,t,r,i,n){let o=i.tag,a=o?t.directives.tagName(o.source,f=>n(o,"TAG_RESOLVE_FAILED",f)):null;if(r.type==="block-seq"){let{anchor:f,newlineAfterProp:p}=i,g=f&&o?f.offset>o.offset?f:o:f??o;g&&(!p||p.offset<g.offset)&&n(g,"MISSING_CHAR","Missing newline after block sequence props")}let s=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!o||!a||a==="!"||a===YP.YAMLMap.tagName&&s==="map"||a===XP.YAMLSeq.tagName&&s==="seq")return cm(e,t,r,n,a);let c=t.schema.tags.find(f=>f.tag===a&&f.collection===s);if(!c){let f=t.schema.knownTags[a];if(f?.collection===s)t.schema.tags.push(Object.assign({},f,{default:!1})),c=f;else return f?n(o,"BAD_COLLECTION_TYPE",`${f.tag} used for ${s} collection, but expects ${f.collection??"scalar"}`,!0):n(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),cm(e,t,r,n,a)}let l=cm(e,t,r,n,a,c),u=c.resolve?.(l,f=>n(o,"TAG_RESOLVE_FAILED",f),t.options)??l,d=WP.isNode(u)?u:new HP.Scalar(u);return d.range=l.range,d.tag=a,c?.format&&(d.format=c.format),d}Wx.composeCollection=nz});var um=E(Yx=>{"use strict";var lm=Q();function rz(e,t,r){let i=t.offset,n=iz(t,e.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let o=n.mode===">"?lm.Scalar.BLOCK_FOLDED:lm.Scalar.BLOCK_LITERAL,a=t.source?oz(t.source):[],s=a.length;for(let m=a.length-1;m>=0;--m){let v=a[m][1];if(v===""||v==="\r")s=m;else break}if(s===0){let m=n.chomp==="+"&&a.length>0?`
|
|
219
|
+
`.repeat(Math.max(1,a.length-1)):"",v=i+n.length;return t.source&&(v+=t.source.length),{value:m,type:o,comment:n.comment,range:[i,v,v]}}let c=t.indent+n.indent,l=t.offset+n.length,u=0;for(let m=0;m<s;++m){let[v,A]=a[m];if(A===""||A==="\r")n.indent===0&&v.length>c&&(c=v.length);else{v.length<c&&r(l+v.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(c=v.length),u=m,c===0&&!e.atRoot&&r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=v.length+A.length+1}for(let m=a.length-1;m>=s;--m)a[m][0].length>c&&(s=m+1);let d="",f="",p=!1;for(let m=0;m<u;++m)d+=a[m][0].slice(c)+`
|
|
220
|
+
`;for(let m=u;m<s;++m){let[v,A]=a[m];l+=v.length+A.length+1;let _=A[A.length-1]==="\r";if(_&&(A=A.slice(0,-1)),A&&v.length<c){let T=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(l-A.length-(_?2:1),"BAD_INDENT",T),v=""}o===lm.Scalar.BLOCK_LITERAL?(d+=f+v.slice(c)+A,f=`
|
|
221
|
+
`):v.length>c||A[0]===" "?(f===" "?f=`
|
|
222
|
+
`:!p&&f===`
|
|
223
|
+
`&&(f=`
|
|
224
|
+
|
|
225
|
+
`),d+=f+v.slice(c)+A,f=`
|
|
226
|
+
`,p=!0):A===""?f===`
|
|
227
|
+
`?d+=`
|
|
228
|
+
`:f=`
|
|
229
|
+
`:(d+=f+A,f=" ",p=!1)}switch(n.chomp){case"-":break;case"+":for(let m=s;m<a.length;++m)d+=`
|
|
230
|
+
`+a[m][0].slice(c);d[d.length-1]!==`
|
|
231
|
+
`&&(d+=`
|
|
232
|
+
`);break;default:d+=`
|
|
233
|
+
`}let g=i+n.length+t.source.length;return{value:d,type:o,comment:n.comment,range:[i,g,g]}}function iz({offset:e,props:t},r,i){if(t[0].type!=="block-scalar-header")return i(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=t[0],o=n[0],a=0,s="",c=-1;for(let f=1;f<n.length;++f){let p=n[f];if(!s&&(p==="-"||p==="+"))s=p;else{let g=Number(p);!a&&g?a=g:c===-1&&(c=e+f)}}c!==-1&&i(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let l=!1,u="",d=n.length;for(let f=1;f<t.length;++f){let p=t[f];switch(p.type){case"space":l=!0;case"newline":d+=p.source.length;break;case"comment":r&&!l&&i(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=p.source.length,u=p.source.substring(1);break;case"error":i(p,"UNEXPECTED_TOKEN",p.message),d+=p.source.length;break;default:{let g=`Unexpected token in block scalar header: ${p.type}`;i(p,"UNEXPECTED_TOKEN",g);let m=p.source;m&&typeof m=="string"&&(d+=m.length)}}}return{mode:o,indent:a,chomp:s,comment:u,length:d}}function oz(e){let t=e.split(/\n( *)/),r=t[0],i=r.match(/^( *)/),o=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let a=1;a<t.length;a+=2)o.push([t[a],t[a+1]]);return o}Yx.resolveBlockScalar=rz});var fm=E(Qx=>{"use strict";var dm=Q(),az=xn();function sz(e,t,r){let{offset:i,type:n,source:o,end:a}=e,s,c,l=(f,p,g)=>r(i+f,p,g);switch(n){case"scalar":s=dm.Scalar.PLAIN,c=cz(o,l);break;case"single-quoted-scalar":s=dm.Scalar.QUOTE_SINGLE,c=lz(o,l);break;case"double-quoted-scalar":s=dm.Scalar.QUOTE_DOUBLE,c=uz(o,l);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+o.length,i+o.length]}}let u=i+o.length,d=az.resolveEnd(a,u,t,r);return{value:c,type:s,comment:d.comment,range:[i,u,d.offset]}}function cz(e,t){let r="";switch(e[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Xx(e)}function lz(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Xx(e.slice(1,-1)).replace(/''/g,"'")}function Xx(e){let t,r;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
234
|
+
`,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
235
|
+
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=t.exec(e);if(!i)return e;let n=i[1],o=" ",a=t.lastIndex;for(r.lastIndex=a;i=r.exec(e);)i[1]===""?o===`
|
|
236
|
+
`?n+=o:o=`
|
|
237
|
+
`:(n+=o+i[1],o=" "),a=r.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=a,i=s.exec(e),n+o+(i?.[1]??"")}function uz(e,t){let r="";for(let i=1;i<e.length-1;++i){let n=e[i];if(!(n==="\r"&&e[i+1]===`
|
|
238
|
+
`))if(n===`
|
|
239
|
+
`){let{fold:o,offset:a}=dz(e,i);r+=o,i=a}else if(n==="\\"){let o=e[++i],a=fz[o];if(a)r+=a;else if(o===`
|
|
240
|
+
`)for(o=e[i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="\r"&&e[i+1]===`
|
|
241
|
+
`)for(o=e[++i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="x"||o==="u"||o==="U"){let s=o==="x"?2:o==="u"?4:8;r+=pz(e,i+1,s,t),i+=s}else{let s=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),r+=s}}else if(n===" "||n===" "){let o=i,a=e[i+1];for(;a===" "||a===" ";)a=e[++i+1];a!==`
|
|
242
|
+
`&&!(a==="\r"&&e[i+2]===`
|
|
243
|
+
`)&&(r+=i>o?e.slice(o,i+1):n)}else r+=n}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function dz(e,t){let r="",i=e[t+1];for(;(i===" "||i===" "||i===`
|
|
244
|
+
`||i==="\r")&&!(i==="\r"&&e[t+2]!==`
|
|
245
|
+
`);)i===`
|
|
246
|
+
`&&(r+=`
|
|
247
|
+
`),t+=1,i=e[t+1];return r||(r=" "),{fold:r,offset:t}}var fz={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
248
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function pz(e,t,r,i){let n=e.substr(t,r),a=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(a)}catch{let s=e.substr(t-2,r+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}}Qx.resolveFlowScalar=sz});var nw=E(tw=>{"use strict";var Et=Z(),ew=Q(),mz=um(),hz=fm();function gz(e,t,r,i){let{value:n,type:o,comment:a,range:s}=t.type==="block-scalar"?mz.resolveBlockScalar(e,t,i):hz.resolveFlowScalar(t,e.options.strict,i),c=r?e.directives.tagName(r.source,d=>i(r,"TAG_RESOLVE_FAILED",d)):null,l;e.options.stringKeys&&e.atKey?l=e.schema[Et.SCALAR]:c?l=vz(e.schema,n,c,r,i):t.type==="scalar"?l=yz(e,n,t,i):l=e.schema[Et.SCALAR];let u;try{let d=l.resolve(n,f=>i(r??t,"TAG_RESOLVE_FAILED",f),e.options);u=Et.isScalar(d)?d:new ew.Scalar(d)}catch(d){let f=d instanceof Error?d.message:String(d);i(r??t,"TAG_RESOLVE_FAILED",f),u=new ew.Scalar(n)}return u.range=s,u.source=n,o&&(u.type=o),c&&(u.tag=c),l.format&&(u.format=l.format),a&&(u.comment=a),u}function vz(e,t,r,i,n){if(r==="!")return e[Et.SCALAR];let o=[];for(let s of e.tags)if(!s.collection&&s.tag===r)if(s.default&&s.test)o.push(s);else return s;for(let s of o)if(s.test?.test(t))return s;let a=e.knownTags[r];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[Et.SCALAR])}function yz({atKey:e,directives:t,schema:r},i,n,o){let a=r.tags.find(s=>(s.default===!0||e&&s.default==="key")&&s.test?.test(i))||r[Et.SCALAR];if(r.compat){let s=r.compat.find(c=>c.default&&c.test?.test(i))??r[Et.SCALAR];if(a.tag!==s.tag){let c=t.tagString(a.tag),l=t.tagString(s.tag),u=`Value may be parsed as either ${c} or ${l}`;o(n,"TAG_RESOLVE_FAILED",u,!0)}}return a}tw.composeScalar=gz});var iw=E(rw=>{"use strict";function bz(e,t,r){if(t){r??(r=t.length);for(let i=r-1;i>=0;--i){let n=t[i];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++i];n?.type==="space";)e+=n.source.length,n=t[++i];break}}return e}rw.emptyScalarPosition=bz});var sw=E(mm=>{"use strict";var _z=_r(),$z=Z(),xz=Hx(),ow=nw(),wz=xn(),kz=iw(),Sz={composeNode:aw,composeEmptyNode:pm};function aw(e,t,r,i){let n=e.atKey,{spaceBefore:o,comment:a,anchor:s,tag:c}=r,l,u=!0;switch(t.type){case"alias":l=Iz(e,t,i),(s||c)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=ow.composeScalar(e,t,c,i),s&&(l.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=xz.composeCollection(Sz,e,t,r,i),s&&(l.anchor=s.source.substring(1))}catch(d){let f=d instanceof Error?d.message:String(d);i(t,"RESOURCE_EXHAUSTION",f)}break;default:{let d=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",d),u=!1}}return l??(l=pm(e,t.offset,void 0,null,r,i)),s&&l.anchor===""&&i(s,"BAD_ALIAS","Anchor cannot be an empty string"),n&&e.options.stringKeys&&(!$z.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&i(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(l.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?l.comment=a:l.commentBefore=a),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function pm(e,t,r,i,{spaceBefore:n,comment:o,anchor:a,tag:s,end:c},l){let u={type:"scalar",offset:kz.emptyScalarPosition(t,r,i),indent:-1,source:""},d=ow.composeScalar(e,u,s,l);return a&&(d.anchor=a.source.substring(1),d.anchor===""&&l(a,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=c),d}function Iz({options:e},{offset:t,source:r,end:i},n){let o=new _z.Alias(r.substring(1));o.source===""&&n(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&n(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=t+r.length,s=wz.resolveEnd(i,a,e.strict,n);return o.range=[t,a,s.offset],s.comment&&(o.comment=s.comment),o}mm.composeEmptyNode=pm;mm.composeNode=aw});var uw=E(lw=>{"use strict";var Oz=Dr(),cw=sw(),Az=xn(),Ez=Mr();function Tz(e,t,{offset:r,start:i,value:n,end:o},a){let s=Object.assign({_directives:t},e),c=new Oz.Document(void 0,s),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=Ez.resolveProps(i,{indicator:"doc-start",next:n??o?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});u.found&&(c.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&a(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=n?cw.composeNode(l,n,u,a):cw.composeEmptyNode(l,u.end,i,null,u,a);let d=c.contents.range[2],f=Az.resolveEnd(o,d,!1,a);return f.comment&&(c.comment=f.comment),c.range=[r,d,f.offset],c}lw.composeDoc=Tz});var gm=E(pw=>{"use strict";var Pz=Ue("process"),zz=tp(),Nz=Dr(),Fr=Rr(),dw=Z(),Cz=uw(),jz=xn();function Zr(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function fw(e){let t="",r=!1,i=!1;for(let n=0;n<e.length;++n){let o=e[n];switch(o[0]){case"#":t+=(t===""?"":i?`
|
|
249
|
+
|
|
250
|
+
`:`
|
|
251
|
+
`)+(o.substring(1)||" "),r=!0,i=!1;break;case"%":e[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:t,afterEmptyLine:i}}var hm=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,o)=>{let a=Zr(r);o?this.warnings.push(new Fr.YAMLWarning(a,i,n)):this.errors.push(new Fr.YAMLParseError(a,i,n))},this.directives=new zz.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,r){let{comment:i,afterEmptyLine:n}=fw(this.prelude);if(i){let o=t.contents;if(r)t.comment=t.comment?`${t.comment}
|
|
252
|
+
${i}`:i;else if(n||t.directives.docStart||!o)t.commentBefore=i;else if(dw.isCollection(o)&&!o.flow&&o.items.length>0){let a=o.items[0];dw.isPair(a)&&(a=a.key);let s=a.commentBefore;a.commentBefore=s?`${i}
|
|
253
|
+
${s}`:i}else{let a=o.commentBefore;o.commentBefore=a?`${i}
|
|
254
|
+
${a}`:i}}if(r){for(let o=0;o<this.errors.length;++o)t.errors.push(this.errors[o]);for(let o=0;o<this.warnings.length;++o)t.warnings.push(this.warnings[o])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:fw(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,r=!1,i=-1){for(let n of t)yield*this.next(n);yield*this.end(r,i)}*next(t){switch(Pz.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(r,i,n)=>{let o=Zr(t);o[0]+=r,this.onError(o,"BAD_DIRECTIVE",i,n)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let r=Cz.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let r=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new Fr.YAMLParseError(Zr(t),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Fr.YAMLParseError(Zr(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let r=jz.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
|
|
255
|
+
${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Fr.YAMLParseError(Zr(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let i=Object.assign({_directives:this.directives},this.options),n=new Nz.Document(void 0,i);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}};pw.Composer=hm});var gw=E(Da=>{"use strict";var Dz=um(),Uz=fm(),Lz=Rr(),mw=Sr();function Rz(e,t=!0,r){if(e){let i=(n,o,a)=>{let s=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(r)r(s,o,a);else throw new Lz.YAMLParseError([s,s+1],o,a)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Uz.resolveFlowScalar(e,t,i);case"block-scalar":return Dz.resolveBlockScalar({options:{strict:t}},e,i)}}return null}function Mz(e,t){let{implicitKey:r=!1,indent:i,inFlow:n=!1,offset:o=-1,type:a="PLAIN"}=t,s=mw.stringifyString({type:a,value:e},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:"newline",offset:-1,indent:i,source:`
|
|
256
|
+
`}];switch(s[0]){case"|":case">":{let l=s.indexOf(`
|
|
257
|
+
`),u=s.substring(0,l),d=s.substring(l+1)+`
|
|
258
|
+
`,f=[{type:"block-scalar-header",offset:o,indent:i,source:u}];return hw(f,c)||f.push({type:"newline",offset:-1,indent:i,source:`
|
|
259
|
+
`}),{type:"block-scalar",offset:o,indent:i,props:f,source:d}}case'"':return{type:"double-quoted-scalar",offset:o,indent:i,source:s,end:c};case"'":return{type:"single-quoted-scalar",offset:o,indent:i,source:s,end:c};default:return{type:"scalar",offset:o,indent:i,source:s,end:c}}}function Fz(e,t,r={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:o=!1,type:a}=r,s="indent"in e?e.indent:null;if(i&&typeof s=="number"&&(s+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let l=e.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let c=mw.stringifyString({type:a,value:t},{implicitKey:n||s===null,indent:s!==null&&s>0?" ".repeat(s):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Zz(e,c);break;case'"':vm(e,c,"double-quoted-scalar");break;case"'":vm(e,c,"single-quoted-scalar");break;default:vm(e,c,"scalar")}}function Zz(e,t){let r=t.indexOf(`
|
|
260
|
+
`),i=t.substring(0,r),n=t.substring(r+1)+`
|
|
261
|
+
`;if(e.type==="block-scalar"){let o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=i,e.source=n}else{let{offset:o}=e,a="indent"in e?e.indent:-1,s=[{type:"block-scalar-header",offset:o,indent:a,source:i}];hw(s,"end"in e?e.end:void 0)||s.push({type:"newline",offset:-1,indent:a,source:`
|
|
262
|
+
`});for(let c of Object.keys(e))c!=="type"&&c!=="offset"&&delete e[c];Object.assign(e,{type:"block-scalar",indent:a,props:s,source:n})}}function hw(e,t){if(t)for(let r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function vm(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{let i=e.props.slice(1),n=t.length;e.props[0].type==="block-scalar-header"&&(n-=e.props[0].source.length);for(let o of i)o.offset+=n;delete e.props,Object.assign(e,{type:r,source:t,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
|
|
263
|
+
`};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{let i="indent"in e?e.indent:-1,n="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:r,indent:i,source:t,end:n})}}}Da.createScalarToken=Mz;Da.resolveAsScalar=Rz;Da.setScalarValue=Fz});var yw=E(vw=>{"use strict";var qz=e=>"type"in e?La(e):Ua(e);function La(e){switch(e.type){case"block-scalar":{let t="";for(let r of e.props)t+=La(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(let r of e.items)t+=Ua(r);return t}case"flow-collection":{let t=e.start.source;for(let r of e.items)t+=Ua(r);for(let r of e.end)t+=r.source;return t}case"document":{let t=Ua(e);if(e.end)for(let r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let r of e.end)t+=r.source;return t}}}function Ua({start:e,key:t,sep:r,value:i}){let n="";for(let o of e)n+=o.source;if(t&&(n+=La(t)),r)for(let o of r)n+=o.source;return i&&(n+=La(i)),n}vw.stringify=qz});var xw=E($w=>{"use strict";var ym=Symbol("break visit"),Vz=Symbol("skip children"),bw=Symbol("remove item");function Tt(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),_w(Object.freeze([]),e,t)}Tt.BREAK=ym;Tt.SKIP=Vz;Tt.REMOVE=bw;Tt.itemAtPath=(e,t)=>{let r=e;for(let[i,n]of t){let o=r?.[i];if(o&&"items"in o)r=o.items[n];else return}return r};Tt.parentCollection=(e,t)=>{let r=Tt.itemAtPath(e,t.slice(0,-1)),i=t[t.length-1][0],n=r?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function _w(e,t,r){let i=r(t,e);if(typeof i=="symbol")return i;for(let n of["key","value"]){let o=t[n];if(o&&"items"in o){for(let a=0;a<o.items.length;++a){let s=_w(Object.freeze(e.concat([[n,a]])),o.items[a],r);if(typeof s=="number")a=s-1;else{if(s===ym)return ym;s===bw&&(o.items.splice(a,1),a-=1)}}typeof i=="function"&&n==="key"&&(i=i(t,e))}}return typeof i=="function"?i(t,e):i}$w.visit=Tt});var Ra=E(be=>{"use strict";var bm=gw(),Bz=yw(),Kz=xw(),_m="\uFEFF",$m="",xm="",wm="",Jz=e=>!!e&&"items"in e,Gz=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Wz(e){switch(e){case _m:return"<BOM>";case $m:return"<DOC>";case xm:return"<FLOW_END>";case wm:return"<SCALAR>";default:return JSON.stringify(e)}}function Hz(e){switch(e){case _m:return"byte-order-mark";case $m:return"doc-mode";case xm:return"flow-error-end";case wm:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
264
|
+
`:case`\r
|
|
265
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}be.createScalarToken=bm.createScalarToken;be.resolveAsScalar=bm.resolveAsScalar;be.setScalarValue=bm.setScalarValue;be.stringify=Bz.stringify;be.visit=Kz.visit;be.BOM=_m;be.DOCUMENT=$m;be.FLOW_END=xm;be.SCALAR=wm;be.isCollection=Jz;be.isScalar=Gz;be.prettyToken=Wz;be.tokenType=Hz});var Im=E(kw=>{"use strict";var qr=Ra();function Ee(e){switch(e){case void 0:case" ":case`
|
|
266
|
+
`:case"\r":case" ":return!0;default:return!1}}var ww=new Set("0123456789ABCDEFabcdef"),Yz=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ma=new Set(",[]{}"),Xz=new Set(` ,[]{}
|
|
267
|
+
\r `),km=e=>!e||Xz.has(e),Sm=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,r=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,r=this.buffer[t];for(;r===" "||r===" ";)r=this.buffer[++t];return!r||r==="#"||r===`
|
|
268
|
+
`?!0:r==="\r"?this.buffer[t+1]===`
|
|
269
|
+
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let r=this.buffer[t];if(this.indentNext>0){let i=0;for(;r===" ";)r=this.buffer[++i+t];if(r==="\r"){let n=this.buffer[i+t+1];if(n===`
|
|
270
|
+
`||!n&&!this.atEnd)return t+i+1}return r===`
|
|
271
|
+
`||i>=this.indentNext||!r&&!this.atEnd?t+i:-1}if(r==="-"||r==="."){let i=this.buffer.substr(t,3);if((i==="---"||i==="...")&&Ee(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
272
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===qr.BOM&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let r=t.length,i=t.indexOf("#");for(;i!==-1;){let o=t[i-1];if(o===" "||o===" "){r=i-1;break}else i=t.indexOf("#",i+1)}for(;;){let o=t[r-1];if(o===" "||o===" ")r-=1;else break}let n=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-r),yield*this.pushNewline(),"stream"}return yield qr.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&Ee(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ee(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Ee(r)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(t[r]){case"#":yield*this.pushCount(t.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(km),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,r,i=-1;do t=yield*this.pushNewline(),t>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(t+r>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&Ee(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield qr.FLOW_END,yield*this.parseLineStart();let o=0;for(;n[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),n[o]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(km),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||Ee(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let t=this.charAt(0),r=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let o=0;for(;this.buffer[r-1-o]==="\\";)o+=1;if(o%2===0)break;r=this.buffer.indexOf('"',r+1)}let i=this.buffer.substring(0,r),n=i.indexOf(`
|
|
273
|
+
`,this.pos);if(n!==-1){for(;n!==-1;){let o=this.continueScalar(n+1);if(o===-1)break;n=i.indexOf(`
|
|
274
|
+
`,o)}n!==-1&&(r=n-(i[n-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){let r=this.buffer[++t];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Ee(r)||r==="#")}*parseBlockScalar(){let t=this.pos-1,r=0,i;e:for(let o=this.pos;i=this.buffer[o];++o)switch(i){case" ":r+=1;break;case`
|
|
275
|
+
`:t=o,r=0;break;case"\r":{let a=this.buffer[o+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
276
|
+
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
|
|
277
|
+
`,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
|
|
278
|
+
`;)i=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)do{let o=t-1,a=this.buffer[o];a==="\r"&&(a=this.buffer[--o]);let s=o;for(;a===" ";)a=this.buffer[--o];if(a===`
|
|
279
|
+
`&&o>=this.pos&&o+1+r>s)t=o;else break}while(!0);return yield qr.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,r=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let o=this.buffer[i+1];if(Ee(o)||t&&Ma.has(o))break;r=i}else if(Ee(n)){let o=this.buffer[i+1];if(n==="\r"&&(o===`
|
|
280
|
+
`?(i+=1,n=`
|
|
281
|
+
`,o=this.buffer[i+1]):r=i),o==="#"||t&&Ma.has(o))break;if(n===`
|
|
282
|
+
`){let a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(t&&Ma.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield qr.SCALAR,yield*this.pushToIndex(r+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,r){let i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(km),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,i=this.charAt(1);if(Ee(i)||r&&Ma.has(i)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,r=this.buffer[t];for(;!Ee(r)&&r!==">";)r=this.buffer[++t];return yield*this.pushToIndex(r===">"?t+1:t,!1)}else{let t=this.pos+1,r=this.buffer[t];for(;r;)if(Yz.has(r))r=this.buffer[++t];else if(r==="%"&&ww.has(this.buffer[t+1])&&ww.has(this.buffer[t+2]))r=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===`
|
|
283
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
284
|
+
`?yield*this.pushCount(2):0}*pushSpaces(t){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||t&&i===" ");let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(t){let r=this.pos,i=this.buffer[r];for(;!t(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};kw.Lexer=Sm});var Am=E(Sw=>{"use strict";var Om=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let r=0,i=this.lineStarts.length;for(;r<i;){let o=r+i>>1;this.lineStarts[o]<t?r=o+1:i=o}if(this.lineStarts[r]===t)return{line:r+1,col:1};if(r===0)return{line:0,col:t};let n=this.lineStarts[r-1];return{line:r,col:t-n+1}}}};Sw.LineCounter=Om});var Tm=E(Tw=>{"use strict";var Qz=Ue("process"),Iw=Ra(),eN=Im();function dt(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function Ow(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Ew(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Fa(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function wn(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function Za(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function Aw(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!dt(t.start,"explicit-key-ind")&&!dt(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,Ew(t.value)?t.value.end?Za(t.value.end,t.sep):t.value.end=t.sep:Za(t.start,t.sep),delete t.sep)}var Em=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new eN.Lexer,this.onNewLine=t}*parse(t,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(t,r))yield*this.next(i);r||(yield*this.end())}*next(t){if(this.source=t,Qz.env.LOG_TOKENS&&console.log("|",Iw.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let r=Iw.tokenType(t);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let i=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let t=this.peek(1);if(this.type==="doc-end"&&t?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let r=t??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let i=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in i?i.indent:0:r.type==="flow-collection"&&i.type==="document"&&(r.indent=0),r.type==="flow-collection"&&Aw(r),i.type){case"document":i.value=r;break;case"block-scalar":i.props.push(r);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=r;else{Object.assign(n,{key:r,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:r}):n.value=r;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:r,sep:[]}):n.sep?n.value=r:Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let n=r.items[r.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Ow(n.start)===-1&&(r.indent===0||n.start.every(o=>o.type!=="comment"||o.indent<r.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{Ow(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}let r=this.startBlockValue(t);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){let r=Fa(this.peek(2)),i=wn(r),n;t.end?(n=t.end,n.push(this.sourceToken),delete t.end):n=[this.sourceToken];let o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
|
|
285
|
+
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
286
|
+
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let r=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,t.indent)){let n=t.items[t.items.length-2]?.value?.end;if(Array.isArray(n)){Za(n,r.start),n.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let i=!this.onKeyLine&&this.indent===t.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",o=[];if(n&&r.sep&&!r.value){let a=[];for(let s=0;s<r.sep.length;++s){let c=r.sep[s];switch(c.type){case"newline":a.push(s);break;case"space":break;case"comment":c.indent>t.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(o.push(this.sourceToken),t.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):n||r.value?(o.push(this.sourceToken),t.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(dt(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Ew(r.key)&&!dt(r.sep,"newline")){let a=wn(r.start),s=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:s,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(dt(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=wn(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?t.items.push({start:o,key:null,sep:[this.sourceToken]}):dt(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);n||r.value?(t.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(t);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!dt(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&t.items.push({start:o});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let r=t.items[t.items.length-1];switch(this.type){case"newline":if(r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,t.indent)){let n=t.items[t.items.length-2]?.value?.end;if(Array.isArray(n)){Za(n,r.start),n.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=t.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;r.value||dt(r.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>t.indent){let i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let r=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?t.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!r||r.value?t.items.push({start:[],key:n,sep:[]}):r.sep?this.stack.push(n):Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=Fa(i),o=wn(n);Aw(t);let a=t.end.splice(1,t.end.length);a.push(this.sourceToken);let s={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let r=this.source.indexOf(`
|
|
287
|
+
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
288
|
+
`,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=Fa(t),i=wn(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=Fa(t),i=wn(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Tw.Parser=Em});var jw=E(Br=>{"use strict";var Pw=gm(),tN=Dr(),Vr=Rr(),nN=mp(),rN=Z(),iN=Am(),zw=Tm();function Nw(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new iN.LineCounter||null,prettyErrors:t}}function oN(e,t={}){let{lineCounter:r,prettyErrors:i}=Nw(t),n=new zw.Parser(r?.addNewLine),o=new Pw.Composer(t),a=Array.from(o.compose(n.parse(e)));if(i&&r)for(let s of a)s.errors.forEach(Vr.prettifyError(e,r)),s.warnings.forEach(Vr.prettifyError(e,r));return a.length>0?a:Object.assign([],{empty:!0},o.streamInfo())}function Cw(e,t={}){let{lineCounter:r,prettyErrors:i}=Nw(t),n=new zw.Parser(r?.addNewLine),o=new Pw.Composer(t),a=null;for(let s of o.compose(n.parse(e),!0,e.length))if(!a)a=s;else if(a.options.logLevel!=="silent"){a.errors.push(new Vr.YAMLParseError(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(a.errors.forEach(Vr.prettifyError(e,r)),a.warnings.forEach(Vr.prettifyError(e,r))),a}function aN(e,t,r){let i;typeof t=="function"?i=t:r===void 0&&t&&typeof t=="object"&&(r=t);let n=Cw(e,r);if(!n)return null;if(n.warnings.forEach(o=>nN.warn(n.options.logLevel,o)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}function sN(e,t,r){let i=null;if(typeof t=="function"||Array.isArray(t)?i=t:r===void 0&&t&&(r=t),typeof r=="string"&&(r=r.length),typeof r=="number"){let n=Math.round(r);r=n<1?void 0:n>8?{indent:8}:{indent:n}}if(e===void 0){let{keepUndefined:n}=r??t??{};if(!n)return}return rN.isDocument(e)&&!i?e.toString(r):new tN.Document(e,i,r).toString(r)}Br.parse=aN;Br.parseAllDocuments=oN;Br.parseDocument=Cw;Br.stringify=sN});var Uw=E(K=>{"use strict";var cN=gm(),lN=Dr(),uN=Hp(),Pm=Rr(),dN=_r(),ft=Z(),fN=st(),pN=Q(),mN=lt(),hN=ut(),gN=Ra(),vN=Im(),yN=Am(),bN=Tm(),qa=jw(),Dw=gr();K.Composer=cN.Composer;K.Document=lN.Document;K.Schema=uN.Schema;K.YAMLError=Pm.YAMLError;K.YAMLParseError=Pm.YAMLParseError;K.YAMLWarning=Pm.YAMLWarning;K.Alias=dN.Alias;K.isAlias=ft.isAlias;K.isCollection=ft.isCollection;K.isDocument=ft.isDocument;K.isMap=ft.isMap;K.isNode=ft.isNode;K.isPair=ft.isPair;K.isScalar=ft.isScalar;K.isSeq=ft.isSeq;K.Pair=fN.Pair;K.Scalar=pN.Scalar;K.YAMLMap=mN.YAMLMap;K.YAMLSeq=hN.YAMLSeq;K.CST=gN;K.Lexer=vN.Lexer;K.LineCounter=yN.LineCounter;K.Parser=bN.Parser;K.parse=qa.parse;K.parseAllDocuments=qa.parseAllDocuments;K.parseDocument=qa.parseDocument;K.stringify=qa.stringify;K.visit=Dw.visit;K.visitAsync=Dw.visitAsync});import{existsSync as qw}from"fs";import{readdir as EN}from"fs/promises";import{resolve as Vw,join as TN}from"path";function zm(e){return e._def?.checks??[]}function _N(e){let t=Ba(e),r=[];if(t instanceof b.ZodString){let i=t;i.minLength!=null&&r.push(`min: ${i.minLength}`),i.maxLength!=null&&r.push(`max: ${i.maxLength}`);for(let n of zm(t)){n.kind==="min"&&r.push(`min: ${n.value}`),n.kind==="max"&&r.push(`max: ${n.value}`),n.kind==="regex"&&n.regex&&r.push(`regex: ${n.regex}`);let o=n._zod?.def;o?.format==="regex"&&o.pattern instanceof RegExp&&r.push(`regex: ${o.pattern}`)}}else if(t instanceof b.ZodNumber){let i=!1;for(let n of zm(t)){n.kind==="int"&&(i=!0),n.kind==="min"&&r.push(`min: ${n.value}`),n.kind==="max"&&r.push(`max: ${n.value}`),n.isInt&&(i=!0);let o=n._zod?.def;o?.check==="number_format"&&o.format==="safeint"&&(i=!0),o?.check==="greater_than"&&r.push(`min: ${o.value}`),o?.check==="less_than"&&r.push(`max: ${o.value}`)}i&&r.unshift("int")}else if(t instanceof b.ZodArray)for(let i of zm(t)){i.kind==="min"&&r.push(`min: ${i.value}`),i.kind==="max"&&r.push(`max: ${i.value}`);let n=i._zod?.def;n?.check==="min_length"&&r.push(`min: ${n.minimum}`),n?.check==="max_length"&&r.push(`max: ${n.maximum}`)}return r.length>0?r.join(", "):void 0}function Cm(e){if(e instanceof b.ZodString)return"string";if(e instanceof b.ZodNumber)return"number";if(e instanceof b.ZodBoolean)return"boolean";if(e instanceof b.ZodEnum)return`enum(${e.options.join(", ")})`;if(e instanceof b.ZodLiteral)return`"${String(e._def.values[0])}"`;if(e instanceof b.ZodArray){let t=e._def.element;return`${Cm(t)}[]`}return e instanceof b.ZodObject?"object":e instanceof b.ZodOptional?Cm(e._def.innerType):e instanceof b.ZodRecord?"Record<string, unknown>":"unknown"}function Ba(e){return e instanceof b.ZodOptional?e._def.innerType:e}function $N(e){let t=Ba(e);return t instanceof b.ZodArray?t._def.element:null}function Rw(e){let t=null;return e instanceof b.ZodObject&&(t=e.shape),t?Object.entries(t).map(([r,i])=>{let n=i instanceof b.ZodOptional,o=n?i._def.innerType:i,a=o.description??i.description;return{name:r,type:Cm(i),required:!n,description:a,constraints:_N(o)}}):null}function Gr(e){let t=[];return jm(e,"",t),t.join(`
|
|
289
|
+
|
|
290
|
+
`)}function jm(e,t,r){let i=Rw(e);if(!i||i.length===0)return;let n=t?`**${t}**
|
|
291
|
+
|
|
292
|
+
`:"",o="| Field | Type | Required | Constraints | Description |",a="|-------|------|----------|-------------|-------------|",s=i.map(l=>`| ${l.name} | ${l.type} | ${l.required?"Yes":"No"} | ${l.constraints??""} | ${l.description??""} |`);r.push(`${n}${[o,a,...s].join(`
|
|
293
|
+
`)}`);let c=e instanceof b.ZodObject?e.shape:null;if(c)for(let l of i){let u=c[l.name],d=Ba(u);if(d instanceof b.ZodObject)jm(d,t?`${t}.${l.name}`:l.name,r);else if(d instanceof b.ZodArray){let f=d._def.element;f instanceof b.ZodObject&&jm(f,t?`${t}.${l.name}[]`:`${l.name}[]`,r)}}}function Ka(e,t=3){return Dm(e,0,t)}function Dm(e,t,r){let i=Rw(e);if(!i||i.length===0)return"";let n=" ".repeat(t),o=[];for(let a of i){let c=(e instanceof b.ZodObject?e.shape:null)?.[a.name];if(a.type.endsWith("[]")){o.push(`${n}${a.name}:`);let l=c?$N(c):null;if(l&&l instanceof b.ZodObject&&t<r){let u=Dm(l,t+2,r);if(u){let d=" ".repeat(t+2),f=u.split(`
|
|
294
|
+
`);o.push(`${n} - ${f[0].slice(d.length)}`);for(let p=1;p<f.length;p++)o.push(`${n} ${f[p].slice(d.length)}`)}else o.push(`${n} - key: "value"`)}else a.type==="string[]"?o.push(`${n} - "example"`):o.push(`${n} - key: "value"`)}else if(a.type==="object"&&t<r){let l=c?Ba(c):null;if(l&&l instanceof b.ZodObject){o.push(`${n}${a.name}:`);let u=Dm(l,t+1,r);u?o.push(u):o.push(`${n} key: "value"`)}else o.push(`${n}${a.name}:`),o.push(`${n} key: "value"`)}else if(a.type==="string")o.push(`${n}${a.name}: "..."`);else if(a.type==="number")o.push(`${n}${a.name}: 0`);else if(a.type==="boolean")o.push(`${n}${a.name}: false`);else if(a.type.startsWith("enum(")){let l=a.type.slice(5,-1).split(", ");o.push(`${n}${a.name}: "${l[0]}"`)}else o.push(`${n}${a.name}: "..."`)}return o.join(`
|
|
295
|
+
`)}function Kr(e,t,r,i){let n=[];if(n.push(`# Role: ${e.role_name}
|
|
296
|
+
|
|
297
|
+
${e.purpose}`),e.responsibilities.length>0&&n.push(`## Responsibilities
|
|
298
|
+
|
|
299
|
+
${e.responsibilities.map(c=>`- ${c}`).join(`
|
|
300
|
+
`)}`),e.constraints.length>0&&n.push(`## Constraints
|
|
301
|
+
|
|
302
|
+
${e.constraints.map(c=>`- ${c}`).join(`
|
|
303
|
+
`)}`),e.rules&&e.rules.length>0){let c=e.rules.map(l=>`- **${l.id}** [${l.severity}]: ${l.description}`);n.push(`## Rules
|
|
304
|
+
|
|
305
|
+
${c.join(`
|
|
306
|
+
`)}`)}if(n.push(`## Task: ${t.id}
|
|
307
|
+
|
|
308
|
+
${t.description}`),t.completion_criteria.length>0&&n.push(`## Completion Criteria
|
|
309
|
+
|
|
310
|
+
${t.completion_criteria.map(c=>`- ${c}`).join(`
|
|
311
|
+
`)}`),r.handoff_input){let c=r.handoff_input,l=typeof c.payload=="string"?c.payload:Va.stringify(c.payload);n.push(`## User Request
|
|
312
|
+
|
|
313
|
+
${r.user_request}`),n.push(`## Handoff Input (${c.type})
|
|
314
|
+
|
|
315
|
+
\`\`\`yaml
|
|
316
|
+
${l}\`\`\``)}else n.push(`## User Request
|
|
317
|
+
|
|
318
|
+
${r.user_request}`);r.prior_context&&n.push(`## Prior Context
|
|
319
|
+
|
|
320
|
+
${r.prior_context}`),r.relevant_paths&&r.relevant_paths.length>0&&n.push(`## Relevant Files
|
|
321
|
+
|
|
322
|
+
${r.relevant_paths.map(c=>`- ${c}`).join(`
|
|
323
|
+
`)}`),r.acceptance_criteria&&r.acceptance_criteria.length>0&&n.push(`## Acceptance Criteria
|
|
324
|
+
|
|
325
|
+
${r.acceptance_criteria.map(c=>`- ${c}`).join(`
|
|
326
|
+
`)}`);let o=t.result_handoff,a=i?.handoffSchemas?.[o],s=`## Required Output Format
|
|
327
|
+
|
|
328
|
+
Return your result as a YAML block matching the "${o}" schema.`;if(a){let c=Gr(a);c&&(s+=`
|
|
329
|
+
|
|
330
|
+
${c}`);let l=Ka(a);l&&(s+=`
|
|
331
|
+
|
|
332
|
+
Example:
|
|
333
|
+
|
|
334
|
+
\`\`\`yaml
|
|
335
|
+
${l}
|
|
336
|
+
\`\`\``)}else s+=" Include all required fields.";if(n.push(s),i?.retry){let c=i.retry,l=`## Recovery Instructions
|
|
337
|
+
|
|
338
|
+
If the task fails due to: "${c.condition}"
|
|
339
|
+
\u2192 Apply the recovery approach from task "${c.fix_task}"`;c.revalidate_task&&(l+=`
|
|
340
|
+
\u2192 Then revalidate using task "${c.revalidate_task}"`),n.push(l)}return n.join(`
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
`)}function Lm(e){let t=e.match(/```ya?ml\n([\s\S]*?)```/);if(t)try{return Va.parse(t[1])}catch{}let r=e.match(/```json\n([\s\S]*?)```/);if(r)try{return JSON.parse(r[1])}catch{}try{return JSON.parse(e)}catch{}return null}function Lw(e,t,r){if(!e.trim())return{status:"error",message:"Agent returned empty output"};let i=Lm(e);if(!i)return{status:"validation_error",errors:new b.ZodError([{code:"custom",message:"Could not extract structured result from agent output",path:[]}]),raw:e};let n=r[t.result_handoff];if(!n)return{status:"success",data:i,raw:e};let o=n.safeParse(i);if(!o.success)return{status:"validation_error",errors:o.error,raw:e};let a=o.data;return a.escalation_needed===!0?{status:"escalation",reason:a.escalation_reasons??"Agent requested escalation",raw:e}:{status:"success",data:o.data,raw:e}}function Rm(e,t,r){let i=[];i.push("Your previous response could not be validated. The task work itself is fine \u2014 please re-output only the structured result block in the correct format."),t.status==="validation_error"?i.push(`Validation errors:
|
|
345
|
+
${t.errors.message}`):t.status==="error"&&i.push(`Error: ${t.message}`);let n=e.result_handoff,o=r?.handoffSchemas?.[n],a=`Required format: Return your result as a YAML block matching the "${n}" schema.`;if(o){let s=Gr(o);s&&(a+=`
|
|
346
|
+
|
|
347
|
+
${s}`);let c=Ka(o);c&&(a+=`
|
|
348
|
+
|
|
349
|
+
Example:
|
|
350
|
+
|
|
351
|
+
\`\`\`yaml
|
|
352
|
+
${c}
|
|
353
|
+
\`\`\``)}else a+=" Include all required fields.";return i.push(a),i.join(`
|
|
354
|
+
|
|
355
|
+
`)}function xN(e,t){return e.status==="validation_error"?"follow_up":e.status==="error"&&e.message==="Agent returned empty output"?"retry":"abort"}async function Mm(e,t,r,i){let n=i?.taskRegistry??{},o=i?.agentRegistry??{},a=i?.handoffSchemas??{},s=n[t];if(!s)return{outcome:{status:"error",message:`Unknown task: ${t}`},follow_ups_used:0,retries_used:0};let c=o[s.target_agent];if(!c)return{outcome:{status:"error",message:`Unknown agent: ${s.target_agent}`},follow_ups_used:0,retries_used:0};let l=await ce.runBeforeTask(t,r);if(l===null)return{outcome:{status:"error",message:`Task "${t}" skipped by plugin`},follow_ups_used:0,retries_used:0};let u=ce.applyContextEnhancers(t,l),d={handoffSchemas:a,retry:i?.retry},f={agent:c,task:s,context:u,options:d},p=ce.applyPromptBuilder(f)??Kr(c,s,u,d);p=ce.applyPromptEnhancers(t,p,u);let g=c.mode==="read-only",m=i?.maxFollowUps??2,v=i?.maxRetries??0,A=i?.decideRetryStrategy??xN,_=0,N=0,T;try{e.sendExecution?T=await e.sendExecution({agentId:c.id,taskId:t,prompt:p,handoff:a[s.result_handoff]?{type:s.result_handoff,payload:void 0}:void 0,schema:a[s.result_handoff]?{handoffType:s.result_handoff,zodSchema:a[s.result_handoff],promptDescription:Gr(a[s.result_handoff])}:void 0,context:u,options:{readonly:g,maxFollowUps:m,attempt:0}}):T=await e.send(p,{readonly:g})}catch(P){return{outcome:{status:"error",message:`SDK error: ${P.message}`},follow_ups_used:0,retries_used:0}}let O=Lw(T,s,a);for(O=await ce.runAfterTask(t,O);O.status==="validation_error"||O.status==="error";){let P=await A(O,{followUps:_,retries:N});if(P==="abort")break;let D=P;if(D==="follow_up"&&_>=m&&(D="retry"),D==="retry"&&N>=v)break;if(D==="follow_up"){_++;let w=Rm(s,O,d);try{if(e.followUp)T=await e.followUp(w);else{let U={...l,prior_context:(l.prior_context??"")+`
|
|
356
|
+
|
|
357
|
+
--- FollowUp ${_} ---
|
|
358
|
+
${w}`},q=Kr(c,s,U,d);q=ce.applyPromptEnhancers(t,q,U),T=await e.send(q,{readonly:g})}}catch(U){O={status:"error",message:`SDK error on followUp ${_}: ${U.message}`};continue}}else{N++;let w={...l,prior_context:(l.prior_context??"")+`
|
|
359
|
+
|
|
360
|
+
--- Full Retry ${N} ---
|
|
361
|
+
Previous attempt failed: `+(O.status==="validation_error"?`Validation errors: ${O.errors.message}`:O.status==="error"?O.message:"unknown")+`
|
|
362
|
+
Please re-execute the entire task.`},U=Kr(c,s,w);U=ce.applyPromptEnhancers(t,U,w);try{T=await e.send(U,{readonly:g})}catch(q){O={status:"error",message:`SDK error on retry ${N}: ${q.message}`};continue}}O=Lw(T,s,a),O=await ce.runAfterTask(t,O)}return{outcome:O,follow_ups_used:_,retries_used:N}}function wN(e){return typeof e=="function"&&!("send"in e)}function kN(e){if(wN(e)){let t=e();if(t&&typeof t.then=="function")throw new Error("ModelAwareSdkAdapterFactory returned a Promise for the default adapter. Use a synchronous factory or pre-resolve the default adapter.");return{adapter:t,factory:e}}return{adapter:e,factory:void 0}}function SN(e){let t;if(e.handoff){let n=e.handoff;t=e.user_request?e.user_request:typeof n.payload=="string"?n.payload:JSON.stringify(n.payload,null,2)}else t=e.user_request??"";let r=e.context,i={...r?.variables};return r?.cwd&&(i.cwd=r.cwd),r?.environment&&(i.environment=r.environment),r?.artifacts&&(i.artifacts=r.artifacts),{workflowId:e.workflow,options:{user_request:t,maxFollowUps:e.runtime?.maxFollowUps,maxRetries:e.runtime?.maxRetries,variables:Object.keys(i).length>0?i:void 0,onGate:e.hooks?.onGate,onStepComplete:e.hooks?.onStepComplete,onOptionalStep:e.hooks?.onOptionalStep}}}async function Fm(e,t,r,i){let{adapter:n,factory:o}=kN(e),a,s,c,l;if(typeof t=="string")a=t,s=r,c=i;else{let P=SN(t);a=P.workflowId,s=P.options,c=r,l=t.handoff}if(l&&c?.handoffSchemas){let P=c.handoffSchemas[l.type];if(P){let D=P.safeParse(l.payload);if(!D.success)return{workflow_id:a,status:"error",steps:[],total_elapsed_ms:0,error_message:`Input handoff validation failed for "${l.type}": ${D.error.message}`}}}let d=(c?.workflowRegistry??{})[a];if(!d)return{workflow_id:a,status:"error",steps:[],total_elapsed_ms:0,error_message:`Unknown workflow: ${a}`};await ce.runBeforeWorkflow(a,s.user_request);let f=Date.now(),p=P=>{let D=d.steps[P];return D.type==="delegate"?D.task:`gate:${D.gate_kind}`},g=d.steps.map((P,D)=>P.depends_on!==void 0?P.depends_on.map(w=>{let U=d.steps.findIndex((q,H)=>H<D&&p(H)===w);if(U===-1)throw new Error(`depends_on "${w}" in step ${D} (${p(D)}) not found among preceding steps`);return U}):D===0?[]:Array.from({length:D},(w,U)=>U)),m=new Set,v=new Array(d.steps.length),A=new Array(d.steps.length).fill(""),_;function N(P){let D=g[P];return D.length===0?"":D.filter(w=>m.has(w)).map(w=>A[w]).filter(Boolean).join("")}async function T(P,D){let w=d.steps[P],U=Date.now();if(w.type==="gate")return IN(w,Object.values(v).filter(Boolean),s,P,D);if(w.optional){let F={user_request:s.user_request,prior_context:N(P),variables:s.variables};if(!(s.onOptionalStep?await s.onOptionalStep(w,F):!1))return{step_index:P,task_id:w.task,outcome:{status:"skipped"},follow_ups_used:0,retries_used:0,elapsed_ms:Date.now()-U}}let q={user_request:s.user_request,prior_context:N(P),variables:s.variables,...l?{handoff_input:l}:{}},H=await Mm(D,w.task,q,{maxFollowUps:s.maxFollowUps??w.max_follow_ups??2,maxRetries:s.maxRetries??w.max_retries??0,taskRegistry:c?.taskRegistry,agentRegistry:c?.agentRegistry,handoffSchemas:c?.handoffSchemas,retry:w.retry});return{step_index:P,task_id:w.task,outcome:H.outcome,follow_ups_used:H.follow_ups_used,retries_used:H.retries_used,elapsed_ms:Date.now()-U}}for(;m.size<d.steps.length;){let P=[];for(let w=0;w<d.steps.length;w++)m.has(w)||g[w].every(U=>m.has(U))&&P.push(w);if(P.length===0){_={workflow_id:d.id,status:"error",steps:v.filter(Boolean),total_elapsed_ms:Date.now()-f,error_message:"Dependency cycle detected: no steps are ready to execute"};break}let D=await Promise.all(P.map(async w=>{let U=d.steps[w],q=U.type==="delegate"?c?.taskRegistry?.[U.task]?.model_class:void 0,H;if(P.length>1&&o){let F=o(q);H=F&&typeof F.then=="function"?await F:F}else if(q&&o){let F=o(q);H=F&&typeof F.then=="function"?await F:F}else H=n;return T(w,H)}));for(let w=0;w<P.length;w++){let U=P[w],q=D[w],H=d.steps[U];if(v[U]=q,m.add(U),AN(s,d.id,U,H,q),q.outcome.status==="success"){let F=q.outcome.data;A[U]=`
|
|
363
|
+
|
|
364
|
+
--- Step ${U+1}: ${p(U)} ---
|
|
365
|
+
`+(typeof F=="string"?F:JSON.stringify(F,null,2))}if(q.outcome.status==="gate_rejected")_={workflow_id:d.id,status:"gate_rejected",steps:v.filter(Boolean),total_elapsed_ms:Date.now()-f};else if(q.outcome.status==="escalation")_={workflow_id:d.id,status:"escalated",steps:v.filter(Boolean),total_elapsed_ms:Date.now()-f,escalation_reason:q.outcome.reason};else if(q.outcome.status==="error"||q.outcome.status==="validation_error"){let F=H.type==="delegate"?H.task:H.gate_kind;_={workflow_id:d.id,status:"escalated",steps:v.filter(Boolean),total_elapsed_ms:Date.now()-f,escalation_reason:`Task "${F}" failed after ${q.follow_ups_used} follow-ups and ${q.retries_used} retries`}}}if(_)break}let O=_??{workflow_id:d.id,status:"completed",steps:v.filter(Boolean),total_elapsed_ms:Date.now()-f};return await ce.runAfterWorkflow(d.id,O),O}async function IN(e,t,r,i,n){let o=Date.now();if(r.onGate){let a=await r.onGate(e.gate_kind,e.description,t);return{step_index:i,gate_kind:e.gate_kind,outcome:{status:a?"gate_approved":"gate_rejected"},follow_ups_used:0,retries_used:0,elapsed_ms:Date.now()-o}}if(n&&e.description){let a=await ON(n,e,t);return{step_index:i,gate_kind:e.gate_kind,outcome:{status:a?"gate_approved":"gate_rejected"},follow_ups_used:0,retries_used:0,elapsed_ms:Date.now()-o}}return{step_index:i,gate_kind:e.gate_kind,outcome:{status:"gate_approved"},follow_ups_used:0,retries_used:0,elapsed_ms:Date.now()-o}}async function ON(e,t,r){let i=r.map(o=>{let a=o.task_id??o.gate_kind??`step_${o.step_index}`,s="data"in o.outcome?o.outcome.data:void 0;return`- ${a}: status=${o.outcome.status}${s?`, data=${typeof s=="string"?s:JSON.stringify(s)}`:""}`}).join(`
|
|
366
|
+
`),n=Zm(t,i);try{let o=await e.send(n,{readonly:!0});return qm(o)}catch{return!1}}function Zm(e,t){return`You are a gate evaluator in a workflow pipeline. Your job is to decide whether the workflow should proceed based on prior step results.
|
|
367
|
+
|
|
368
|
+
## Gate
|
|
369
|
+
- kind: ${e.gate_kind}
|
|
370
|
+
- condition: ${e.description}
|
|
371
|
+
|
|
372
|
+
## Prior Step Results
|
|
373
|
+
${t||"(no prior results)"}
|
|
374
|
+
|
|
375
|
+
## Instructions
|
|
376
|
+
Evaluate whether the gate condition is satisfied based on the prior step results.
|
|
377
|
+
Respond with ONLY a JSON object (no markdown fences, no extra text):
|
|
378
|
+
|
|
379
|
+
{"approved": true, "reason": "brief explanation"}
|
|
380
|
+
|
|
381
|
+
or
|
|
382
|
+
|
|
383
|
+
{"approved": false, "reason": "brief explanation"}`}function qm(e){let t=e.match(/\{[\s\S]*?"approved"\s*:\s*(true|false)[\s\S]*?\}/);if(t)try{return JSON.parse(t[0]).approved===!0}catch{}let r=e.toLowerCase();return r.includes('"approved": true')||r.includes('"approved":true')?!0:(r.includes('"approved": false')||r.includes('"approved":false'),!1)}function AN(e,t,r,i,n){e.onStepComplete?.({workflow_id:t,step_index:r,step_type:i.type,task_id:i.type==="delegate"?i.task:void 0,gate_kind:i.type==="gate"?i.gate_kind:void 0,outcome_status:n.outcome.status,follow_ups_used:n.follow_ups_used,retries_used:n.retries_used,elapsed_ms:n.elapsed_ms})}function Jr(e){return e.filter(t=>!t.passed&&t.action==="block")}function Vm(e){return e.filter(t=>!t.passed&&t.action==="warn")}function Mw(e){return e.some(t=>!t.passed&&t.action==="block")}function Nm(e){return{guardrail_id:e.guardrail_id,passed:!e.matched,action:e.action,message:e.matched?e.message:""}}function Fw(e){function t(o){let a=[];return o.command&&(a.push(...e.checkCommand(o.command)),a.push(...ce.evaluateCommandGuardrails(o.command).map(Nm))),o.filePath&&(a.push(...e.checkFilePath(o.filePath)),a.push(...ce.evaluateFilePathGuardrails(o.filePath).map(Nm))),o.filePath&&o.content&&(a.push(...e.checkContent(o.filePath,o.content)),a.push(...ce.evaluateFileContentGuardrails(o.filePath,o.content).map(Nm))),a}function r(o){let a=o.command??"";if(!a)return{};let s=t({command:a}),c=Jr(s),l=Vm(s);if(c.length>0){let u=c.map(d=>`[${d.guardrail_id}] ${d.message}`).join(`
|
|
384
|
+
`);return{permission:"deny",user_message:u,agent_message:u}}return l.length>0?{additionalContext:l.map(u=>`[${u.guardrail_id}] ${u.message}`).join(`
|
|
385
|
+
`)}:{}}function i(o){let a=o.tool_input?.file_path??o.tool_input?.path??"";if(!a)return{};let s=t({filePath:a}),c=Jr(s);if(c.length>0){let l=c.map(u=>`[${u.guardrail_id}] ${u.message}`).join(`
|
|
386
|
+
`);return{permission:"deny",user_message:l,agent_message:l}}return{}}function n(o){let a=o.file_path??"",s=o.content??"";if(!a)return{};let c=t({filePath:a,content:s}),l=Jr(c);if(l.length>0){let u=l.map(d=>`[${d.guardrail_id}] ${d.message}`).join(`
|
|
387
|
+
`);return{permission:"deny",user_message:u,agent_message:u}}return{}}return{beforeShellExecution:r,preToolUse:i,afterFileEdit:n,runChecks:t}}function Zw(e){return{workflow(t){return new Bm(e.adapter,t,e.registries)}}}function zN(e){return typeof e=="object"&&e!==null&&typeof e.id=="string"}async function NN(e){return qw(e)?(await EN(e,{withFileTypes:!0})).filter(r=>r.isFile()&&PN.some(i=>r.name.endsWith(i))&&!r.name.startsWith("_")&&!r.name.endsWith(".d.ts")&&!r.name.endsWith(".test.ts")&&!r.name.endsWith(".spec.ts")).map(r=>Vw(e,r.name)):[]}async function Bw(e){let t=await import(new URL(`file://${e}`).href),r=0;for(let i of Object.values(t))if(zN(i))try{ce.register(i),r++}catch{}return r}async function Km(e,t){let r={loaded:0,files:[],errors:[]};for(let i of e){let n=Vw(t,i);if(!qw(n)){r.errors.push({file:i,error:`File not found: ${n}`});continue}try{let o=await Bw(n);r.loaded+=o,r.files.push(n)}catch(o){r.errors.push({file:i,error:o.message})}}return r}async function Jm(e){let t={loaded:0,files:[],errors:[]},r=await NN(e);for(let i of r)try{let n=await Bw(i);t.loaded+=n,t.files.push(i)}catch(n){t.errors.push({file:i,error:n.message})}return t}async function Kw(e){if(e.pluginPaths&&e.pluginPaths.length>0)return Km(e.pluginPaths,e.projectDir);let t=TN(e.projectDir,"src","plugins");return Jm(t)}var Va,Um,ce,Bm,PN,Jw=S(()=>{Yf();Va=Xm(Uw(),1),Um=class{plugins=[];register(e){if(this.plugins.some(t=>t.id===e.id))throw new Error(`Plugin "${e.id}" is already registered`);this.plugins.push(e)}getAll(){return this.plugins}async runBeforeTask(e,t){let r=t;for(let i of this.plugins)!i.beforeTask||r===null||(r=await i.beforeTask(e,r));return r}async runAfterTask(e,t){let r=t;for(let i of this.plugins)i.afterTask&&(r=await i.afterTask(e,r));return r}applyContextEnhancers(e,t){let r=t;for(let i of this.plugins)i.contextEnhancer&&(r=i.contextEnhancer(e,r));return r}applyPromptBuilder(e){for(let t of this.plugins){if(!t.promptBuilder)continue;let r=t.promptBuilder(e);if(r!==null)return r}return null}applyPromptEnhancers(e,t,r){let i=t;for(let n of this.plugins)n.promptEnhancer&&(i=n.promptEnhancer(e,i,r));return i}evaluateCommandGuardrails(e){let t=[];for(let r of this.plugins)r.customGuardrails?.evaluateCommand&&t.push(...r.customGuardrails.evaluateCommand(e));return t}evaluateFilePathGuardrails(e){let t=[];for(let r of this.plugins)r.customGuardrails?.evaluateFilePath&&t.push(...r.customGuardrails.evaluateFilePath(e));return t}evaluateFileContentGuardrails(e,t){let r=[];for(let i of this.plugins)i.customGuardrails?.evaluateFileContent&&r.push(...i.customGuardrails.evaluateFileContent(e,t));return r}async runBeforeWorkflow(e,t){for(let r of this.plugins)r.beforeWorkflow&&await r.beforeWorkflow(e,t)}async runAfterWorkflow(e,t){for(let r of this.plugins)r.afterWorkflow&&await r.afterWorkflow(e,t)}},ce=new Um;Bm=class{adapter;invocation;registries;constructor(e,t,r){this.adapter=e,this.invocation={workflow:t},this.registries=r}handoff(e){return this.invocation={...this.invocation,handoff:e},this}request(e){return this.invocation={...this.invocation,user_request:e},this}maxFollowUps(e){return this.invocation={...this.invocation,runtime:{...this.invocation.runtime,maxFollowUps:e}},this}maxRetries(e){return this.invocation={...this.invocation,runtime:{...this.invocation.runtime,maxRetries:e}},this}onStepComplete(e){return this.invocation={...this.invocation,hooks:{...this.invocation.hooks,onStepComplete:e}},this}onGate(e){return this.invocation={...this.invocation,hooks:{...this.invocation.hooks,onGate:e}},this}onOptionalStep(e){return this.invocation={...this.invocation,hooks:{...this.invocation.hooks,onOptionalStep:e}},this}async run(){return Fm(this.adapter,this.invocation,this.registries)}},PN=[".ts",".js",".mts",".mjs"]});function Gw(e,t){let r=e.indexOf(":");if(r===-1)return{adapter:t,model:e||void 0};let i=e.slice(0,r)||t,n=e.slice(r+1)||void 0;return{adapter:i,model:n}}function Ww(e){let t=e.env??process.env;return{resolve(r){let i={adapter:e.fallbackAdapter,model:e.fallbackModel};if(!r)return i;let n=t[CN[r]];if(n)return Gw(n,e.fallbackAdapter);let o=t[Ja];if(o)return Gw(o,e.fallbackAdapter);let a=e.modelMapping?.[r];return a?{adapter:a.adapter,model:a.model}:i}}}var Ja,CN,Hw=S(()=>{Ja="AGENT_RUNTIME_MODEL",CN={fast:`${Ja}_FAST`,standard:`${Ja}_STANDARD`,thinking:`${Ja}_THINKING`}});var Yw={};oe(Yw,{PluginRegistry:()=>Um,WorkflowBuilder:()=>Bm,buildGateEvaluationPrompt:()=>Zm,buildRetryFollowUp:()=>Rm,buildTaskPrompt:()=>Kr,createGuardrailHooks:()=>Fw,createModelResolver:()=>Ww,createRuntime:()=>Zw,extractStructuredResult:()=>Lm,getBlockingViolations:()=>Jr,getWarnings:()=>Vm,hasBlockingViolation:()=>Mw,loadPlugins:()=>Kw,loadPluginsFromDirectory:()=>Jm,loadPluginsFromPaths:()=>Km,parseGateEvaluationResponse:()=>qm,pluginRegistry:()=>ce,runTask:()=>Mm,runWorkflow:()=>Fm,zodSchemaToPromptDescription:()=>Gr,zodSchemaToYamlExample:()=>Ka});var Xw=S(()=>{Jw();Hw()});import{readFileSync as Qa,writeFileSync as Hm,existsSync as Wr,mkdirSync as VN,copyFileSync as BN}from"fs";import{resolve as kn,dirname as ik,join as Ym}from"path";import{fileURLToPath as KN}from"url";function mh(e){return typeof e>"u"||e===null}function fk(e){return typeof e=="object"&&e!==null}function pk(e){return Array.isArray(e)?e:mh(e)?[]:[e]}function mk(e,t){var r,i,n,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)n=o[r],e[n]=t[n];return e}function hk(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function gk(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var vk=mh,yk=fk,bk=pk,_k=hk,$k=gk,xk=mk,ee={isNothing:vk,isObject:yk,toArray:bk,repeat:_k,isNegativeZero:$k,extend:xk};function hh(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
388
|
+
|
|
389
|
+
`+e.mark.snippet),i+" "+r):i}function In(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=hh(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}In.prototype=Object.create(Error.prototype);In.prototype.constructor=In;In.prototype.toString=function(t){return this.name+": "+hh(this,t)};var le=In;function ns(e,t,r,i,n){var o="",a="",s=Math.floor(n/2)-1;return i-t>s&&(o=" ... ",t=i-s+o.length),r-i>s&&(a=" ...",r=i+s-a.length),{str:o+e.slice(t,r).replace(/\t/g,"\u2192")+a,pos:i-t+o.length}}function rs(e,t){return ee.repeat(" ",t-e.length)+e}function wk(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],o,a=-1;o=r.exec(e.buffer);)n.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s="",c,l,u=Math.min(e.line+t.linesAfter,n.length).toString().length,d=t.maxLength-(t.indent+u+3);for(c=1;c<=t.linesBefore&&!(a-c<0);c++)l=ns(e.buffer,i[a-c],n[a-c],e.position-(i[a]-i[a-c]),d),s=ee.repeat(" ",t.indent)+rs((e.line-c+1).toString(),u)+" | "+l.str+`
|
|
390
|
+
`+s;for(l=ns(e.buffer,i[a],n[a],e.position,d),s+=ee.repeat(" ",t.indent)+rs((e.line+1).toString(),u)+" | "+l.str+`
|
|
391
|
+
`,s+=ee.repeat("-",t.indent+u+3+l.pos)+`^
|
|
392
|
+
`,c=1;c<=t.linesAfter&&!(a+c>=n.length);c++)l=ns(e.buffer,i[a+c],n[a+c],e.position-(i[a]-i[a+c]),d),s+=ee.repeat(" ",t.indent)+rs((e.line+c+1).toString(),u)+" | "+l.str+`
|
|
393
|
+
`;return s.replace(/\n$/,"")}var kk=wk,Sk=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ik=["scalar","sequence","mapping"];function Ok(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function Ak(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Sk.indexOf(r)===-1)throw new le('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Ok(t.styleAliases||null),Ik.indexOf(this.kind)===-1)throw new le('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var ne=Ak;function Qm(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(n=a)}),r[n]=i}),r}function Ek(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}function os(e){return this.extend(e)}os.prototype.extend=function(t){var r=[],i=[];if(t instanceof ne)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new le("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof ne))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new le("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new le("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof ne))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(os.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Qm(n,"implicit"),n.compiledExplicit=Qm(n,"explicit"),n.compiledTypeMap=Ek(n.compiledImplicit,n.compiledExplicit),n};var gh=os,vh=new ne("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),yh=new ne("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),bh=new ne("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),_h=new gh({explicit:[vh,yh,bh]});function Tk(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Pk(){return null}function zk(e){return e===null}var $h=new ne("tag:yaml.org,2002:null",{kind:"scalar",resolve:Tk,construct:Pk,predicate:zk,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Nk(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Ck(e){return e==="true"||e==="True"||e==="TRUE"}function jk(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var xh=new ne("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Nk,construct:Ck,predicate:jk,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Dk(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Uk(e){return 48<=e&&e<=55}function Lk(e){return 48<=e&&e<=57}function Rk(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Dk(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!Uk(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!Lk(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function Mk(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function Fk(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!ee.isNegativeZero(e)}var wh=new ne("tag:yaml.org,2002:int",{kind:"scalar",resolve:Rk,construct:Mk,predicate:Fk,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Zk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function qk(e){return!(e===null||!Zk.test(e)||e[e.length-1]==="_")}function Vk(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var Bk=/^[-+]?[0-9]+e/;function Kk(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ee.isNegativeZero(e))return"-0.0";return r=e.toString(10),Bk.test(r)?r.replace("e",".e"):r}function Jk(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||ee.isNegativeZero(e))}var kh=new ne("tag:yaml.org,2002:float",{kind:"scalar",resolve:qk,construct:Vk,predicate:Jk,represent:Kk,defaultStyle:"lowercase"}),Sh=_h.extend({implicit:[$h,xh,wh,kh]}),Ih=Sh,Oh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ah=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Gk(e){return e===null?!1:Oh.exec(e)!==null||Ah.exec(e)!==null}function Wk(e){var t,r,i,n,o,a,s,c=0,l=null,u,d,f;if(t=Oh.exec(e),t===null&&(t=Ah.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(o=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]==="-"&&(l=-l)),f=new Date(Date.UTC(r,i,n,o,a,s,c)),l&&f.setTime(f.getTime()-l),f}function Hk(e){return e.toISOString()}var Eh=new ne("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Gk,construct:Wk,instanceOf:Date,represent:Hk});function Yk(e){return e==="<<"||e===null}var Th=new ne("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Yk}),us=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
394
|
+
\r`;function Xk(e){if(e===null)return!1;var t,r,i=0,n=e.length,o=us;for(r=0;r<n;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function Qk(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=us,a=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|o.indexOf(i.charAt(t));return r=n%4*6,r===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):r===18?(s.push(a>>10&255),s.push(a>>2&255)):r===12&&s.push(a>>4&255),new Uint8Array(s)}function eS(e){var t="",r=0,i,n,o=e.length,a=us;for(i=0;i<o;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return n=o%3,n===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):n===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):n===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function tS(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ph=new ne("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Xk,construct:Qk,predicate:tS,represent:eS}),nS=Object.prototype.hasOwnProperty,rS=Object.prototype.toString;function iS(e){if(e===null)return!0;var t=[],r,i,n,o,a,s=e;for(r=0,i=s.length;r<i;r+=1){if(n=s[r],a=!1,rS.call(n)!=="[object Object]")return!1;for(o in n)if(nS.call(n,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function oS(e){return e!==null?e:[]}var zh=new ne("tag:yaml.org,2002:omap",{kind:"sequence",resolve:iS,construct:oS}),aS=Object.prototype.toString;function sS(e){if(e===null)return!0;var t,r,i,n,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],aS.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[t]=[n[0],i[n[0]]]}return!0}function cS(e){if(e===null)return[];var t,r,i,n,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],n=Object.keys(i),o[t]=[n[0],i[n[0]]];return o}var Nh=new ne("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:sS,construct:cS}),lS=Object.prototype.hasOwnProperty;function uS(e){if(e===null)return!0;var t,r=e;for(t in r)if(lS.call(r,t)&&r[t]!==null)return!1;return!0}function dS(e){return e!==null?e:{}}var Ch=new ne("tag:yaml.org,2002:set",{kind:"mapping",resolve:uS,construct:dS}),ds=Ih.extend({implicit:[Eh,Th],explicit:[Ph,zh,Nh,Ch]}),Ke=Object.prototype.hasOwnProperty,Hr=1,jh=2,Dh=3,Yr=4,is=1,fS=2,eh=3,pS=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,mS=/[\x85\u2028\u2029]/,hS=/[,\[\]\{\}]/,Uh=/^(?:!|!!|![a-z\-]+!)$/i,Lh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function th(e){return Object.prototype.toString.call(e)}function Te(e){return e===10||e===13}function mt(e){return e===9||e===32}function me(e){return e===9||e===32||e===10||e===13}function zt(e){return e===44||e===91||e===93||e===123||e===125}function gS(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function vS(e){return e===120?2:e===117?4:e===85?8:0}function yS(e){return 48<=e&&e<=57?e-48:-1}function nh(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
395
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function bS(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Rh(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var Mh=new Array(256),Fh=new Array(256);for(pt=0;pt<256;pt++)Mh[pt]=nh(pt)?1:0,Fh[pt]=nh(pt);var pt;function _S(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ds,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Zh(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=kk(r),new le(t,r)}function j(e,t){throw Zh(e,t)}function Xr(e,t){e.onWarning&&e.onWarning.call(null,Zh(e,t))}var rh={YAML:function(t,r,i){var n,o,a;t.version!==null&&j(t,"duplication of %YAML directive"),i.length!==1&&j(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&j(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),a=parseInt(n[2],10),o!==1&&j(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Xr(t,"unsupported YAML version of the document")},TAG:function(t,r,i){var n,o;i.length!==2&&j(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],Uh.test(n)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),Ke.call(t.tagMap,n)&&j(t,'there is a previously declared suffix for "'+n+'" tag handle'),Lh.test(o)||j(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{j(t,"tag prefix is malformed: "+o)}t.tagMap[n]=o}};function Be(e,t,r,i){var n,o,a,s;if(t<r){if(s=e.input.slice(t,r),i)for(n=0,o=s.length;n<o;n+=1)a=s.charCodeAt(n),a===9||32<=a&&a<=1114111||j(e,"expected valid JSON character");else pS.test(s)&&j(e,"the stream contains non-printable characters");e.result+=s}}function ih(e,t,r,i){var n,o,a,s;for(ee.isObject(r)||j(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,s=n.length;a<s;a+=1)o=n[a],Ke.call(t,o)||(Rh(t,o,r[o]),i[o]=!0)}function Nt(e,t,r,i,n,o,a,s,c){var l,u;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,u=n.length;l<u;l+=1)Array.isArray(n[l])&&j(e,"nested arrays are not supported inside keys"),typeof n=="object"&&th(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&th(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,u=o.length;l<u;l+=1)ih(e,t,o[l],r);else ih(e,t,o,r);else!e.json&&!Ke.call(r,n)&&Ke.call(t,n)&&(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,j(e,"duplicated mapping key")),Rh(t,n,o),delete r[n];return t}function fs(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):j(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function X(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;mt(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Te(n))for(fs(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Xr(e,"deficient indentation"),i}function ti(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||me(r)))}function ps(e,t){t===1?e.result+=" ":t>1&&(e.result+=ee.repeat(`
|
|
396
|
+
`,t-1))}function $S(e,t,r){var i,n,o,a,s,c,l,u,d=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),me(p)||zt(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=e.input.charCodeAt(e.position+1),me(n)||r&&zt(n)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,s=!1;p!==0;){if(p===58){if(n=e.input.charCodeAt(e.position+1),me(n)||r&&zt(n))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),me(i))break}else{if(e.position===e.lineStart&&ti(e)||r&&zt(p))break;if(Te(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,X(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=l,e.lineIndent=u;break}}s&&(Be(e,o,a,!1),ps(e,e.line-c),o=a=e.position,s=!1),mt(p)||(a=e.position+1),p=e.input.charCodeAt(++e.position)}return Be(e,o,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function xS(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Be(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Te(r)?(Be(e,i,n,!0),ps(e,X(e,!1,t)),i=n=e.position):e.position===e.lineStart&&ti(e)?j(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);j(e,"unexpected end of the stream within a single quoted scalar")}function wS(e,t){var r,i,n,o,a,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Be(e,r,e.position,!0),e.position++,!0;if(s===92){if(Be(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),Te(s))X(e,!1,t);else if(s<256&&Mh[s])e.result+=Fh[s],e.position++;else if((a=vS(s))>0){for(n=a,o=0;n>0;n--)s=e.input.charCodeAt(++e.position),(a=gS(s))>=0?o=(o<<4)+a:j(e,"expected hexadecimal character");e.result+=bS(o),e.position++}else j(e,"unknown escape sequence");r=i=e.position}else Te(s)?(Be(e,r,i,!0),ps(e,X(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ti(e)?j(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}j(e,"unexpected end of the stream within a double quoted scalar")}function kS(e,t){var r=!0,i,n,o,a=e.tag,s,c=e.anchor,l,u,d,f,p,g=Object.create(null),m,v,A,_;if(_=e.input.charCodeAt(e.position),_===91)u=93,p=!1,s=[];else if(_===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),_=e.input.charCodeAt(++e.position);_!==0;){if(X(e,!0,t),_=e.input.charCodeAt(e.position),_===u)return e.position++,e.tag=a,e.anchor=c,e.kind=p?"mapping":"sequence",e.result=s,!0;r?_===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),v=m=A=null,d=f=!1,_===63&&(l=e.input.charCodeAt(e.position+1),me(l)&&(d=f=!0,e.position++,X(e,!0,t))),i=e.line,n=e.lineStart,o=e.position,Ct(e,t,Hr,!1,!0),v=e.tag,m=e.result,X(e,!0,t),_=e.input.charCodeAt(e.position),(f||e.line===i)&&_===58&&(d=!0,_=e.input.charCodeAt(++e.position),X(e,!0,t),Ct(e,t,Hr,!1,!0),A=e.result),p?Nt(e,s,g,v,m,A,i,n,o):d?s.push(Nt(e,null,g,v,m,A,i,n,o)):s.push(m),X(e,!0,t),_=e.input.charCodeAt(e.position),_===44?(r=!0,_=e.input.charCodeAt(++e.position)):r=!1}j(e,"unexpected end of the stream within a flow collection")}function SS(e,t){var r,i,n=is,o=!1,a=!1,s=t,c=0,l=!1,u,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)is===n?n=d===43?eh:fS:j(e,"repeat of a chomping mode identifier");else if((u=yS(d))>=0)u===0?j(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?j(e,"repeat of an indentation width identifier"):(s=t+u-1,a=!0);else break;if(mt(d)){do d=e.input.charCodeAt(++e.position);while(mt(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Te(d)&&d!==0)}for(;d!==0;){for(fs(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>s&&(s=e.lineIndent),Te(d)){c++;continue}if(e.lineIndent<s){n===eh?e.result+=ee.repeat(`
|
|
397
|
+
`,o?1+c:c):n===is&&o&&(e.result+=`
|
|
398
|
+
`);break}for(i?mt(d)?(l=!0,e.result+=ee.repeat(`
|
|
399
|
+
`,o?1+c:c)):l?(l=!1,e.result+=ee.repeat(`
|
|
400
|
+
`,c+1)):c===0?o&&(e.result+=" "):e.result+=ee.repeat(`
|
|
401
|
+
`,c):e.result+=ee.repeat(`
|
|
402
|
+
`,o?1+c:c),o=!0,a=!0,c=0,r=e.position;!Te(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Be(e,r,e.position,!1)}return!0}function oh(e,t){var r,i=e.tag,n=e.anchor,o=[],a,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!me(a))));){if(s=!0,e.position++,X(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Ct(e,t,Dh,!1,!0),o.push(e.result),X(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)j(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=o,!0):!1}function IS(e,t,r){var i,n,o,a,s,c,l=e.tag,u=e.anchor,d={},f=Object.create(null),p=null,g=null,m=null,v=!1,A=!1,_;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),_=e.input.charCodeAt(e.position);_!==0;){if(!v&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,j(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(_===63||_===58)&&me(i))_===63?(v&&(Nt(e,d,f,p,g,null,a,s,c),p=g=m=null),A=!0,v=!0,n=!0):v?(v=!1,n=!0):j(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,_=i;else{if(a=e.line,s=e.lineStart,c=e.position,!Ct(e,r,jh,!1,!0))break;if(e.line===o){for(_=e.input.charCodeAt(e.position);mt(_);)_=e.input.charCodeAt(++e.position);if(_===58)_=e.input.charCodeAt(++e.position),me(_)||j(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(Nt(e,d,f,p,g,null,a,s,c),p=g=m=null),A=!0,v=!1,n=!1,p=e.tag,g=e.result;else if(A)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=u,!0}else if(A)j(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=u,!0}if((e.line===o||e.lineIndent>t)&&(v&&(a=e.line,s=e.lineStart,c=e.position),Ct(e,t,Yr,!0,n)&&(v?g=e.result:m=e.result),v||(Nt(e,d,f,p,g,m,a,s,c),p=g=m=null),X(e,!0,-1),_=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&_!==0)j(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&Nt(e,d,f,p,g,null,a,s,c),A&&(e.tag=l,e.anchor=u,e.kind="mapping",e.result=d),A}function OS(e){var t,r=!1,i=!1,n,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&j(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):j(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!me(a);)a===33&&(i?j(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Uh.test(n)||j(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),hS.test(o)&&j(e,"tag suffix cannot contain flow indicator characters")}o&&!Lh.test(o)&&j(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{j(e,"tag name is malformed: "+o)}return r?e.tag=o:Ke.call(e.tagMap,n)?e.tag=e.tagMap[n]+o:n==="!"?e.tag="!"+o:n==="!!"?e.tag="tag:yaml.org,2002:"+o:j(e,'undeclared tag handle "'+n+'"'),!0}function AS(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&j(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!me(r)&&!zt(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function ES(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!me(i)&&!zt(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&j(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ke.call(e.anchorMap,r)||j(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],X(e,!0,-1),!0}function Ct(e,t,r,i,n){var o,a,s,c=1,l=!1,u=!1,d,f,p,g,m,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=s=Yr===r||Dh===r,i&&X(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;OS(e)||AS(e);)X(e,!0,-1)?(l=!0,s=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&(s=l||n),(c===1||Yr===r)&&(Hr===r||jh===r?m=t:m=t+1,v=e.position-e.lineStart,c===1?s&&(oh(e,v)||IS(e,v,m))||kS(e,m)?u=!0:(a&&SS(e,m)||xS(e,m)||wS(e,m)?u=!0:ES(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&j(e,"alias node should not have any properties")):$S(e,m,Hr===r)&&(u=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&oh(e,v))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&j(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(g=e.implicitTypes[d],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ke.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,p=e.typeMap.multi[e.kind||"fallback"],d=0,f=p.length;d<f;d+=1)if(e.tag.slice(0,p[d].tag.length)===p[d].tag){g=p[d];break}g||j(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&j(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):j(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||u}function TS(e){var t=e.position,r,i,n,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(X(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!me(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&j(e,"directive name must not be less than one character in length");a!==0;){for(;mt(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Te(a));break}if(Te(a))break;for(r=e.position;a!==0&&!me(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}a!==0&&fs(e),Ke.call(rh,i)?rh[i](e,i,n):Xr(e,'unknown document directive "'+i+'"')}if(X(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,X(e,!0,-1)):o&&j(e,"directives end mark is expected"),Ct(e,e.lineIndent-1,Yr,!1,!0),X(e,!0,-1),e.checkLineBreaks&&mS.test(e.input.slice(t,e.position))&&Xr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ti(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,X(e,!0,-1));return}if(e.position<e.length-1)j(e,"end of the stream or a document separator is expected");else return}function qh(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
403
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new _S(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,j(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)TS(r);return r.documents}function PS(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=qh(e,r);if(typeof t!="function")return i;for(var n=0,o=i.length;n<o;n+=1)t(i[n])}function zS(e,t){var r=qh(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new le("expected a single document in the stream, but found more")}}var NS=PS,CS=zS,Vh={loadAll:NS,load:CS},Bh=Object.prototype.toString,Kh=Object.prototype.hasOwnProperty,ms=65279,jS=9,On=10,DS=13,US=32,LS=33,RS=34,as=35,MS=37,FS=38,ZS=39,qS=42,Jh=44,VS=45,Qr=58,BS=61,KS=62,JS=63,GS=64,Gh=91,Wh=93,WS=96,Hh=123,HS=124,Yh=125,ae={};ae[0]="\\0";ae[7]="\\a";ae[8]="\\b";ae[9]="\\t";ae[10]="\\n";ae[11]="\\v";ae[12]="\\f";ae[13]="\\r";ae[27]="\\e";ae[34]='\\"';ae[92]="\\\\";ae[133]="\\N";ae[160]="\\_";ae[8232]="\\L";ae[8233]="\\P";var YS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],XS=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function QS(e,t){var r,i,n,o,a,s,c;if(t===null)return{};for(r={},i=Object.keys(t),n=0,o=i.length;n<o;n+=1)a=i[n],s=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap.fallback[a],c&&Kh.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[a]=s;return r}function e0(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new le("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+ee.repeat("0",i-t.length)+t}var t0=1,An=2;function n0(e){this.schema=e.schema||ds,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=ee.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=QS(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?An:t0,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ah(e,t){for(var r=ee.repeat(" ",t),i=0,n=-1,o="",a,s=e.length;i<s;)n=e.indexOf(`
|
|
404
|
+
`,i),n===-1?(a=e.slice(i),i=s):(a=e.slice(i,n+1),i=n+1),a.length&&a!==`
|
|
405
|
+
`&&(o+=r),o+=a;return o}function ss(e,t){return`
|
|
406
|
+
`+ee.repeat(" ",e.indent*t)}function r0(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function ei(e){return e===US||e===jS}function En(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ms||65536<=e&&e<=1114111}function sh(e){return En(e)&&e!==ms&&e!==DS&&e!==On}function ch(e,t,r){var i=sh(e),n=i&&!ei(e);return(r?i:i&&e!==Jh&&e!==Gh&&e!==Wh&&e!==Hh&&e!==Yh)&&e!==as&&!(t===Qr&&!n)||sh(t)&&!ei(t)&&e===as||t===Qr&&n}function i0(e){return En(e)&&e!==ms&&!ei(e)&&e!==VS&&e!==JS&&e!==Qr&&e!==Jh&&e!==Gh&&e!==Wh&&e!==Hh&&e!==Yh&&e!==as&&e!==FS&&e!==qS&&e!==LS&&e!==HS&&e!==BS&&e!==KS&&e!==ZS&&e!==RS&&e!==MS&&e!==GS&&e!==WS}function o0(e){return!ei(e)&&e!==Qr}function Sn(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function Xh(e){var t=/^\n* /;return t.test(e)}var Qh=1,cs=2,eg=3,tg=4,Pt=5;function a0(e,t,r,i,n,o,a,s){var c,l=0,u=null,d=!1,f=!1,p=i!==-1,g=-1,m=i0(Sn(e,0))&&o0(Sn(e,e.length-1));if(t||a)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Sn(e,c),!En(l))return Pt;m=m&&ch(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Sn(e,c),l===On)d=!0,p&&(f=f||c-g-1>i&&e[g+1]!==" ",g=c);else if(!En(l))return Pt;m=m&&ch(l,u,s),u=l}f=f||p&&c-g-1>i&&e[g+1]!==" "}return!d&&!f?m&&!a&&!n(e)?Qh:o===An?Pt:cs:r>9&&Xh(e)?Pt:a?o===An?Pt:cs:f?tg:eg}function s0(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===An?'""':"''";if(!e.noCompatMode&&(YS.indexOf(t)!==-1||XS.test(t)))return e.quotingType===An?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=i||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return r0(e,l)}switch(a0(t,s,e.indent,a,c,e.quotingType,e.forceQuotes&&!i,n)){case Qh:return t;case cs:return"'"+t.replace(/'/g,"''")+"'";case eg:return"|"+lh(t,e.indent)+uh(ah(t,o));case tg:return">"+lh(t,e.indent)+uh(ah(c0(t,a),o));case Pt:return'"'+l0(t)+'"';default:throw new le("impossible error: invalid scalar style")}})()}function lh(e,t){var r=Xh(e)?String(t):"",i=e[e.length-1]===`
|
|
407
|
+
`,n=i&&(e[e.length-2]===`
|
|
408
|
+
`||e===`
|
|
409
|
+
`),o=n?"+":i?"":"-";return r+o+`
|
|
410
|
+
`}function uh(e){return e[e.length-1]===`
|
|
411
|
+
`?e.slice(0,-1):e}function c0(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var l=e.indexOf(`
|
|
412
|
+
`);return l=l!==-1?l:e.length,r.lastIndex=l,dh(e.slice(0,l),t)})(),n=e[0]===`
|
|
413
|
+
`||e[0]===" ",o,a;a=r.exec(e);){var s=a[1],c=a[2];o=c[0]===" ",i+=s+(!n&&!o&&c!==""?`
|
|
414
|
+
`:"")+dh(c,t),n=o}return i}function dh(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,o,a=0,s=0,c="";i=r.exec(e);)s=i.index,s-n>t&&(o=a>n?a:s,c+=`
|
|
415
|
+
`+e.slice(n,o),n=o+1),a=s;return c+=`
|
|
416
|
+
`,e.length-n>t&&a>n?c+=e.slice(n,a)+`
|
|
417
|
+
`+e.slice(a+1):c+=e.slice(n),c.slice(1)}function l0(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Sn(e,n),i=ae[r],!i&&En(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||e0(r);return t}function u0(e,t,r){var i="",n=e.tag,o,a,s;for(o=0,a=r.length;o<a;o+=1)s=r[o],e.replacer&&(s=e.replacer.call(r,String(o),s)),(Le(e,t,s,!1,!1)||typeof s>"u"&&Le(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function fh(e,t,r,i){var n="",o=e.tag,a,s,c;for(a=0,s=r.length;a<s;a+=1)c=r[a],e.replacer&&(c=e.replacer.call(r,String(a),c)),(Le(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Le(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=ss(e,t)),e.dump&&On===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}function d0(e,t,r){var i="",n=e.tag,o=Object.keys(r),a,s,c,l,u;for(a=0,s=o.length;a<s;a+=1)u="",i!==""&&(u+=", "),e.condenseFlow&&(u+='"'),c=o[a],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),Le(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Le(e,t,l,!1,!1)&&(u+=e.dump,i+=u));e.tag=n,e.dump="{"+i+"}"}function f0(e,t,r,i){var n="",o=e.tag,a=Object.keys(r),s,c,l,u,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new le("sortKeys must be a boolean or a function");for(s=0,c=a.length;s<c;s+=1)f="",(!i||n!=="")&&(f+=ss(e,t)),l=a[s],u=r[l],e.replacer&&(u=e.replacer.call(r,l,u)),Le(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&On===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=ss(e,t)),Le(e,t+1,u,!0,d)&&(e.dump&&On===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=o,e.dump=n||"{}"}function ph(e,t,r){var i,n,o,a,s,c;for(n=r?e.explicitTypes:e.implicitTypes,o=0,a=n.length;o<a;o+=1)if(s=n[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,Bh.call(s.represent)==="[object Function]")i=s.represent(t,c);else if(Kh.call(s.represent,c))i=s.represent[c](t,c);else throw new le("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}function Le(e,t,r,i,n,o,a){e.tag=null,e.dump=r,ph(e,r,!1)||ph(e,r,!0);var s=Bh.call(e.dump),c=i,l;i&&(i=e.flowLevel<0||e.flowLevel>t);var u=s==="[object Object]"||s==="[object Array]",d,f;if(u&&(d=e.duplicates.indexOf(r),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(f0(e,t,e.dump,n),f&&(e.dump="&ref_"+d+e.dump)):(d0(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?fh(e,t-1,e.dump,n):fh(e,t,e.dump,n),f&&(e.dump="&ref_"+d+e.dump)):(u0(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&s0(e,e.dump,t,o,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new le("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}function p0(e,t){var r=[],i=[],n,o;for(ls(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}function ls(e,t,r){var i,n,o;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,o=e.length;n<o;n+=1)ls(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)ls(e[i[n]],t,r)}function m0(e,t){t=t||{};var r=new n0(t);r.noRefs||p0(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Le(r,0,i,!0,!0)?r.dump+`
|
|
418
|
+
`:""}var h0=m0,g0={dump:h0};function hs(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var v0=ne,y0=gh,b0=_h,_0=Sh,$0=Ih,x0=ds,w0=Vh.load,k0=Vh.loadAll,S0=g0.dump,I0=le,O0={binary:Ph,float:kh,map:bh,null:$h,pairs:Nh,set:Ch,timestamp:Eh,bool:xh,int:wh,merge:Th,omap:zh,seq:yh,str:vh},A0=hs("safeLoad","load"),E0=hs("safeLoadAll","loadAll"),T0=hs("safeDump","dump"),Tn={Type:v0,Schema:y0,FAILSAFE_SCHEMA:b0,JSON_SCHEMA:_0,CORE_SCHEMA:$0,DEFAULT_SCHEMA:x0,load:w0,loadAll:k0,dump:S0,YAMLException:I0,types:O0,safeLoad:A0,safeLoadAll:E0,safeDump:T0};var mg=Xm(pg(),1),{program:d1,createCommand:f1,createArgument:p1,createOption:m1,CommanderError:h1,InvalidArgumentError:g1,InvalidOptionArgumentError:v1,Command:hg,Argument:y1,Option:b1,Help:_1}=mg.default;var gg=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
|
|
419
|
+
cli_contracts: 0.1.0
|
|
420
|
+
|
|
421
|
+
info:
|
|
422
|
+
title: litedbmodel-gen CLI
|
|
423
|
+
version: 0.2.0
|
|
424
|
+
description: >-
|
|
425
|
+
embedoc-based model code generator for litedbmodel.
|
|
426
|
+
Parses SQL DDL (PostgreSQL / MySQL / SQLite) and generates
|
|
427
|
+
TypeScript column definitions that stay in sync with your schema.
|
|
428
|
+
license:
|
|
429
|
+
name: MIT
|
|
430
|
+
contact:
|
|
431
|
+
name: foo-ogawa
|
|
432
|
+
url: https://github.com/foo-ogawa/litedbmodel.ts
|
|
433
|
+
|
|
434
|
+
artifact_slots:
|
|
435
|
+
sql-schemas:
|
|
436
|
+
direction: read
|
|
437
|
+
description: SQL DDL files for schema parsing
|
|
438
|
+
embedoc-config:
|
|
439
|
+
direction: readwrite
|
|
440
|
+
description: embedoc.config.yaml configuration (read and updated during init)
|
|
441
|
+
generated-models:
|
|
442
|
+
direction: write
|
|
443
|
+
description: Generated TypeScript model definitions
|
|
444
|
+
|
|
445
|
+
command_sets:
|
|
446
|
+
litedbmodel-gen:
|
|
447
|
+
summary: embedoc-based model code generator for litedbmodel.
|
|
448
|
+
executable: litedbmodel-gen
|
|
449
|
+
|
|
450
|
+
global_options:
|
|
451
|
+
- name: version
|
|
452
|
+
aliases: [V]
|
|
453
|
+
description: Print version and exit.
|
|
454
|
+
schema:
|
|
455
|
+
type: boolean
|
|
456
|
+
|
|
457
|
+
- name: help
|
|
458
|
+
aliases: [h]
|
|
459
|
+
description: Show help and exit.
|
|
460
|
+
schema:
|
|
461
|
+
type: boolean
|
|
462
|
+
|
|
463
|
+
commands:
|
|
464
|
+
# \u2500\u2500 init \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
465
|
+
init:
|
|
466
|
+
summary: Set up litedbmodel-gen in an embedoc project.
|
|
467
|
+
description: >-
|
|
468
|
+
Registers the sql_schema datasource, litedbmodel_columns renderer,
|
|
469
|
+
and model.hbs template into an existing embedoc project.
|
|
470
|
+
Copies the starter Handlebars template, updates
|
|
471
|
+
.embedoc/renderers/index.ts and .embedoc/datasources/index.ts,
|
|
472
|
+
and adds a schema datasource entry to embedoc.config.yaml.
|
|
473
|
+
usage:
|
|
474
|
+
- litedbmodel-gen init
|
|
475
|
+
- litedbmodel-gen init path/to/embedoc.config.yaml
|
|
476
|
+
|
|
477
|
+
arguments:
|
|
478
|
+
- name: config
|
|
479
|
+
index: 0
|
|
480
|
+
required: false
|
|
481
|
+
description: >-
|
|
482
|
+
Path to embedoc.config.yaml.
|
|
483
|
+
Defaults to embedoc.config.yaml in the current directory.
|
|
484
|
+
schema:
|
|
485
|
+
type: string
|
|
486
|
+
default: embedoc.config.yaml
|
|
487
|
+
file:
|
|
488
|
+
mode: read
|
|
489
|
+
exists: true
|
|
490
|
+
media_type: application/yaml
|
|
491
|
+
encoding: utf-8
|
|
492
|
+
|
|
493
|
+
exits:
|
|
494
|
+
'0':
|
|
495
|
+
description: >-
|
|
496
|
+
litedbmodel-gen set up successfully.
|
|
497
|
+
Template copied, renderers/datasources registered,
|
|
498
|
+
and embedoc config updated.
|
|
499
|
+
stdout:
|
|
500
|
+
format: text
|
|
501
|
+
files:
|
|
502
|
+
- path: .embedoc/templates/model.hbs
|
|
503
|
+
required: false
|
|
504
|
+
media_type: text/x-handlebars-template
|
|
505
|
+
encoding: utf-8
|
|
506
|
+
description: Starter Handlebars template for model files (skipped if already exists).
|
|
507
|
+
|
|
508
|
+
'1':
|
|
509
|
+
description: >-
|
|
510
|
+
Setup failed due to an unexpected file operation error.
|
|
511
|
+
stderr:
|
|
512
|
+
format: text
|
|
513
|
+
|
|
514
|
+
'3':
|
|
515
|
+
description: >-
|
|
516
|
+
Input validation failed. The specified embedoc.config.yaml
|
|
517
|
+
path was not found. Run "npx embedoc init" first.
|
|
518
|
+
stderr:
|
|
519
|
+
format: json
|
|
520
|
+
|
|
521
|
+
x-agent:
|
|
522
|
+
riskLevel: low
|
|
523
|
+
requiresConfirmation: false
|
|
524
|
+
idempotent: true
|
|
525
|
+
sideEffects:
|
|
526
|
+
- file_write
|
|
527
|
+
recommendedBeforeUse:
|
|
528
|
+
- Run "npx embedoc init" first to create embedoc.config.yaml.
|
|
529
|
+
|
|
530
|
+
# \u2500\u2500 audit \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
531
|
+
audit:
|
|
532
|
+
summary: Audit litedbmodel usage code for common anti-patterns.
|
|
533
|
+
description: >-
|
|
534
|
+
Scans TypeScript source files that import or use litedbmodel models,
|
|
535
|
+
detecting anti-patterns such as loop-insert (use createMany),
|
|
536
|
+
delete-then-reinsert (use upsert), N+1 queries, missing idempotency
|
|
537
|
+
guards, missing UNIQUE constraints for onConflict, over-broad deletes,
|
|
538
|
+
and missing forUpdate in concurrent-write paths.
|
|
539
|
+
Returns structured findings with severity ratings and remediation
|
|
540
|
+
guidance referencing the correct litedbmodel API.
|
|
541
|
+
usage:
|
|
542
|
+
- litedbmodel-gen audit
|
|
543
|
+
- litedbmodel-gen audit src/
|
|
544
|
+
- litedbmodel-gen audit src/services/user-service.ts --fail-on warning --report-format text
|
|
545
|
+
|
|
546
|
+
arguments:
|
|
547
|
+
- name: target
|
|
548
|
+
index: 0
|
|
549
|
+
required: false
|
|
550
|
+
description: >-
|
|
551
|
+
File or directory path to audit.
|
|
552
|
+
Defaults to the current working directory.
|
|
553
|
+
schema:
|
|
554
|
+
type: string
|
|
555
|
+
default: "."
|
|
556
|
+
|
|
557
|
+
options:
|
|
558
|
+
- name: adapter
|
|
559
|
+
description: LLM adapter to use for the audit.
|
|
560
|
+
schema:
|
|
561
|
+
type: string
|
|
562
|
+
enum: [mock, cursor, claude, openai, gemini]
|
|
563
|
+
default: mock
|
|
564
|
+
|
|
565
|
+
- name: model
|
|
566
|
+
description: Model name override for the selected adapter.
|
|
567
|
+
schema:
|
|
568
|
+
type: string
|
|
569
|
+
|
|
570
|
+
- name: dry-run
|
|
571
|
+
description: Output the constructed prompt without calling the LLM.
|
|
572
|
+
schema:
|
|
573
|
+
type: boolean
|
|
574
|
+
default: false
|
|
575
|
+
|
|
576
|
+
- name: fail-on
|
|
577
|
+
description: >-
|
|
578
|
+
Minimum finding severity that causes exit code 10.
|
|
579
|
+
Findings below this threshold are still reported.
|
|
580
|
+
schema:
|
|
581
|
+
type: string
|
|
582
|
+
enum: [warning, error, critical]
|
|
583
|
+
default: error
|
|
584
|
+
|
|
585
|
+
- name: output
|
|
586
|
+
aliases: [o]
|
|
587
|
+
description: Write the report to a file instead of stdout.
|
|
588
|
+
schema:
|
|
589
|
+
type: string
|
|
590
|
+
file:
|
|
591
|
+
mode: write
|
|
592
|
+
|
|
593
|
+
- name: report-format
|
|
594
|
+
description: Output format for the audit report.
|
|
595
|
+
schema:
|
|
596
|
+
type: string
|
|
597
|
+
enum: [json, text, yaml]
|
|
598
|
+
default: json
|
|
599
|
+
|
|
600
|
+
x-agent:
|
|
601
|
+
riskLevel: low
|
|
602
|
+
requiresConfirmation: false
|
|
603
|
+
idempotent: true
|
|
604
|
+
sideEffects: [network]
|
|
605
|
+
sideEffectNote: >-
|
|
606
|
+
Makes network calls to the configured LLM provider when adapter is
|
|
607
|
+
not "mock". Writes to the filesystem only when --output is specified.
|
|
608
|
+
safeDryRunOption: dry-run
|
|
609
|
+
expectedDurationMs: 120000
|
|
610
|
+
retryableExitCodes: [1, 12]
|
|
611
|
+
|
|
612
|
+
exits:
|
|
613
|
+
'0':
|
|
614
|
+
description: >-
|
|
615
|
+
Audit completed. No findings at or above the --fail-on threshold.
|
|
616
|
+
stdout:
|
|
617
|
+
format: json
|
|
618
|
+
schema:
|
|
619
|
+
$ref: '#/components/schemas/AgentAuditResult'
|
|
620
|
+
'1':
|
|
621
|
+
description: General error (unexpected exception or I/O failure).
|
|
622
|
+
stderr:
|
|
623
|
+
format: text
|
|
624
|
+
'3':
|
|
625
|
+
description: >-
|
|
626
|
+
Input validation failed (target path not found, no TypeScript
|
|
627
|
+
files found at path).
|
|
628
|
+
stderr:
|
|
629
|
+
format: json
|
|
630
|
+
'10':
|
|
631
|
+
description: >-
|
|
632
|
+
Blocking findings detected at or above the --fail-on threshold.
|
|
633
|
+
stdout:
|
|
634
|
+
format: json
|
|
635
|
+
schema:
|
|
636
|
+
$ref: '#/components/schemas/AgentAuditResult'
|
|
637
|
+
'11':
|
|
638
|
+
description: agent-contracts-runtime package is not installed.
|
|
639
|
+
stderr:
|
|
640
|
+
format: json
|
|
641
|
+
'12':
|
|
642
|
+
description: >-
|
|
643
|
+
Adapter initialization failed (missing API key or invalid
|
|
644
|
+
configuration).
|
|
645
|
+
stderr:
|
|
646
|
+
format: json
|
|
647
|
+
|
|
648
|
+
# \u2500\u2500 implement \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
649
|
+
implement:
|
|
650
|
+
summary: Implement a feature using litedbmodel best practices.
|
|
651
|
+
description: >-
|
|
652
|
+
Reads the project's model definitions, then implements the described
|
|
653
|
+
feature directly in the target source file(s), applying litedbmodel
|
|
654
|
+
best-practice patterns: createMany for batch inserts, upsert with
|
|
655
|
+
onConflict/onConflictUpdate for idempotent writes, forUpdate for
|
|
656
|
+
concurrent-safe reads, and DBModel.transaction for multi-step
|
|
657
|
+
operations. Avoids all eight common litedbmodel anti-patterns.
|
|
658
|
+
Requires an agentic adapter (claude/cursor) that can read and
|
|
659
|
+
write project files.
|
|
660
|
+
usage:
|
|
661
|
+
- >-
|
|
662
|
+
litedbmodel-gen implement
|
|
663
|
+
"Add syncNutrientSummary in src/services/meal.service.ts"
|
|
664
|
+
--target src/services/meal.service.ts
|
|
665
|
+
--models "src/models/**/*.ts"
|
|
666
|
+
--adapter claude
|
|
667
|
+
- >-
|
|
668
|
+
litedbmodel-gen implement
|
|
669
|
+
"Add bulk upsert for order items"
|
|
670
|
+
--target src/services/order.service.ts
|
|
671
|
+
--adapter claude
|
|
672
|
+
|
|
673
|
+
arguments:
|
|
674
|
+
- name: description
|
|
675
|
+
index: 0
|
|
676
|
+
required: true
|
|
677
|
+
description: >-
|
|
678
|
+
Natural-language description of the feature to implement.
|
|
679
|
+
Should specify the function name, target file, and business logic.
|
|
680
|
+
schema:
|
|
681
|
+
type: string
|
|
682
|
+
|
|
683
|
+
options:
|
|
684
|
+
- name: target
|
|
685
|
+
aliases: [t]
|
|
686
|
+
description: >-
|
|
687
|
+
Target source file(s) to create or edit. The agent reads these
|
|
688
|
+
files to understand existing code and writes the implementation
|
|
689
|
+
to them.
|
|
690
|
+
schema:
|
|
691
|
+
type: string
|
|
692
|
+
|
|
693
|
+
- name: models
|
|
694
|
+
description: >-
|
|
695
|
+
Glob pattern for model definition files. The agent reads these
|
|
696
|
+
to understand available models, columns, and relations.
|
|
697
|
+
schema:
|
|
698
|
+
type: string
|
|
699
|
+
default: "models/**/*.ts"
|
|
700
|
+
|
|
701
|
+
- name: adapter
|
|
702
|
+
description: LLM adapter to use for code generation.
|
|
703
|
+
schema:
|
|
704
|
+
type: string
|
|
705
|
+
enum: [mock, cursor, claude, openai, gemini]
|
|
706
|
+
default: mock
|
|
707
|
+
|
|
708
|
+
- name: model
|
|
709
|
+
description: Model name override for the selected adapter.
|
|
710
|
+
schema:
|
|
711
|
+
type: string
|
|
712
|
+
|
|
713
|
+
- name: dry-run
|
|
714
|
+
description: Output the constructed prompt without calling the LLM.
|
|
715
|
+
schema:
|
|
716
|
+
type: boolean
|
|
717
|
+
default: false
|
|
718
|
+
|
|
719
|
+
- name: fail-on
|
|
720
|
+
description: >-
|
|
721
|
+
Minimum finding severity that causes exit code 10.
|
|
722
|
+
Design concerns (info/warning) are still reported at exit 0.
|
|
723
|
+
schema:
|
|
724
|
+
type: string
|
|
725
|
+
enum: [warning, error, critical]
|
|
726
|
+
default: error
|
|
727
|
+
|
|
728
|
+
- name: output
|
|
729
|
+
aliases: [o]
|
|
730
|
+
description: Write the report to a file instead of stdout.
|
|
731
|
+
schema:
|
|
732
|
+
type: string
|
|
733
|
+
file:
|
|
734
|
+
mode: write
|
|
735
|
+
|
|
736
|
+
- name: report-format
|
|
737
|
+
description: Output format for the implementation report.
|
|
738
|
+
schema:
|
|
739
|
+
type: string
|
|
740
|
+
enum: [json, text, yaml]
|
|
741
|
+
default: json
|
|
742
|
+
|
|
743
|
+
x-agent:
|
|
744
|
+
riskLevel: high
|
|
745
|
+
requiresConfirmation: true
|
|
746
|
+
idempotent: false
|
|
747
|
+
sideEffects: [network, filesystem_write]
|
|
748
|
+
sideEffectNote: >-
|
|
749
|
+
The agent reads project files and writes implementation code
|
|
750
|
+
directly to the target source file(s). Uses an agentic adapter
|
|
751
|
+
(claude/cursor) with file read/write tools.
|
|
752
|
+
safeDryRunOption: dry-run
|
|
753
|
+
expectedDurationMs: 120000
|
|
754
|
+
retryableExitCodes: [1, 12]
|
|
755
|
+
|
|
756
|
+
exits:
|
|
757
|
+
'0':
|
|
758
|
+
description: >-
|
|
759
|
+
Implementation written to target files successfully with no
|
|
760
|
+
design concerns at or above the --fail-on threshold.
|
|
761
|
+
stdout:
|
|
762
|
+
format: json
|
|
763
|
+
schema:
|
|
764
|
+
$ref: '#/components/schemas/LitedbmodelImplementResult'
|
|
765
|
+
'1':
|
|
766
|
+
description: General error (unexpected exception or I/O failure).
|
|
767
|
+
stderr:
|
|
768
|
+
format: text
|
|
769
|
+
'3':
|
|
770
|
+
description: >-
|
|
771
|
+
Input validation failed (missing description or unreadable
|
|
772
|
+
model files).
|
|
773
|
+
stderr:
|
|
774
|
+
format: json
|
|
775
|
+
'10':
|
|
776
|
+
description: >-
|
|
777
|
+
Implementation written but design concerns at or above the
|
|
778
|
+
--fail-on threshold were detected.
|
|
779
|
+
stdout:
|
|
780
|
+
format: json
|
|
781
|
+
schema:
|
|
782
|
+
$ref: '#/components/schemas/LitedbmodelImplementResult'
|
|
783
|
+
'11':
|
|
784
|
+
description: agent-contracts-runtime package is not installed.
|
|
785
|
+
stderr:
|
|
786
|
+
format: json
|
|
787
|
+
'12':
|
|
788
|
+
description: >-
|
|
789
|
+
Adapter initialization failed (missing API key or invalid
|
|
790
|
+
configuration).
|
|
791
|
+
stderr:
|
|
792
|
+
format: json
|
|
793
|
+
|
|
794
|
+
components:
|
|
795
|
+
schemas:
|
|
796
|
+
AgentEvidence:
|
|
797
|
+
type: object
|
|
798
|
+
required: [type, content]
|
|
799
|
+
properties:
|
|
800
|
+
type:
|
|
801
|
+
type: string
|
|
802
|
+
description: Evidence category (e.g. code_snippet, log_line, metric).
|
|
803
|
+
content:
|
|
804
|
+
type: string
|
|
805
|
+
description: The evidence body.
|
|
806
|
+
source:
|
|
807
|
+
type: string
|
|
808
|
+
description: File path, URL, or identifier of the evidence source.
|
|
809
|
+
|
|
810
|
+
AgentFinding:
|
|
811
|
+
type: object
|
|
812
|
+
required: [severity, category, message]
|
|
813
|
+
properties:
|
|
814
|
+
id:
|
|
815
|
+
type: string
|
|
816
|
+
description: Optional stable identifier for the finding.
|
|
817
|
+
severity:
|
|
818
|
+
type: string
|
|
819
|
+
enum: [info, warning, error, critical]
|
|
820
|
+
category:
|
|
821
|
+
type: string
|
|
822
|
+
description: Domain-specific vocabulary label (e.g. LOOP_CREATE, N_PLUS_ONE).
|
|
823
|
+
target:
|
|
824
|
+
type: string
|
|
825
|
+
description: Symbol, class, or function where the finding applies.
|
|
826
|
+
location:
|
|
827
|
+
type: string
|
|
828
|
+
description: File path and optional line reference.
|
|
829
|
+
message:
|
|
830
|
+
type: string
|
|
831
|
+
description: Human-readable description of the finding.
|
|
832
|
+
recommendation:
|
|
833
|
+
type: string
|
|
834
|
+
description: Actionable fix referencing the correct litedbmodel API.
|
|
835
|
+
confidence:
|
|
836
|
+
type: number
|
|
837
|
+
minimum: 0
|
|
838
|
+
maximum: 1
|
|
839
|
+
description: Model confidence in the finding (0\u20131).
|
|
840
|
+
evidence:
|
|
841
|
+
type: array
|
|
842
|
+
items:
|
|
843
|
+
$ref: '#/components/schemas/AgentEvidence'
|
|
844
|
+
details:
|
|
845
|
+
type: object
|
|
846
|
+
description: Arbitrary additional structured detail.
|
|
847
|
+
|
|
848
|
+
AgentRecommendedAction:
|
|
849
|
+
type: object
|
|
850
|
+
required: [kind, title]
|
|
851
|
+
properties:
|
|
852
|
+
kind:
|
|
853
|
+
type: string
|
|
854
|
+
enum: [run_command, edit_file, review, confirm, block, ignore]
|
|
855
|
+
title:
|
|
856
|
+
type: string
|
|
857
|
+
description: Short imperative label for the action.
|
|
858
|
+
command:
|
|
859
|
+
type: string
|
|
860
|
+
description: Shell command to run (for kind=run_command).
|
|
861
|
+
target:
|
|
862
|
+
type: string
|
|
863
|
+
description: File or symbol to edit/review.
|
|
864
|
+
rationale:
|
|
865
|
+
type: string
|
|
866
|
+
description: Why this action is recommended.
|
|
867
|
+
|
|
868
|
+
AgentAuditResult:
|
|
869
|
+
type: object
|
|
870
|
+
required: [summary, riskLevel, findings]
|
|
871
|
+
properties:
|
|
872
|
+
summary:
|
|
873
|
+
type: string
|
|
874
|
+
description: One-paragraph summary of the audit result.
|
|
875
|
+
riskLevel:
|
|
876
|
+
type: string
|
|
877
|
+
enum: [low, medium, high, critical]
|
|
878
|
+
description: Overall risk level reflecting the highest-severity finding.
|
|
879
|
+
findings:
|
|
880
|
+
type: array
|
|
881
|
+
items:
|
|
882
|
+
$ref: '#/components/schemas/AgentFinding'
|
|
883
|
+
recommendedActions:
|
|
884
|
+
type: array
|
|
885
|
+
items:
|
|
886
|
+
$ref: '#/components/schemas/AgentRecommendedAction'
|
|
887
|
+
metadata:
|
|
888
|
+
type: object
|
|
889
|
+
properties:
|
|
890
|
+
tool:
|
|
891
|
+
type: string
|
|
892
|
+
command:
|
|
893
|
+
type: string
|
|
894
|
+
version:
|
|
895
|
+
type: string
|
|
896
|
+
generatedAt:
|
|
897
|
+
type: string
|
|
898
|
+
adapter:
|
|
899
|
+
type: string
|
|
900
|
+
model:
|
|
901
|
+
type: string
|
|
902
|
+
|
|
903
|
+
FileChange:
|
|
904
|
+
type: object
|
|
905
|
+
required: [path, action]
|
|
906
|
+
properties:
|
|
907
|
+
path:
|
|
908
|
+
type: string
|
|
909
|
+
description: Relative file path that was created or modified.
|
|
910
|
+
action:
|
|
911
|
+
type: string
|
|
912
|
+
enum: [created, updated]
|
|
913
|
+
description: Whether the file was newly created or updated.
|
|
914
|
+
rationale:
|
|
915
|
+
type: string
|
|
916
|
+
description: Why this file was changed.
|
|
917
|
+
|
|
918
|
+
LitedbmodelImplementResult:
|
|
919
|
+
allOf:
|
|
920
|
+
- $ref: '#/components/schemas/AgentAuditResult'
|
|
921
|
+
- type: object
|
|
922
|
+
required: [changedFiles]
|
|
923
|
+
properties:
|
|
924
|
+
changedFiles:
|
|
925
|
+
type: array
|
|
926
|
+
description: Files that the agent created or modified.
|
|
927
|
+
items:
|
|
928
|
+
$ref: '#/components/schemas/FileChange'
|
|
929
|
+
dependencies:
|
|
930
|
+
type: array
|
|
931
|
+
description: npm packages required but not yet in the project.
|
|
932
|
+
items:
|
|
933
|
+
type: string
|
|
934
|
+
notes:
|
|
935
|
+
type: string
|
|
936
|
+
description: Additional integration instructions.
|
|
937
|
+
`,vg=`{
|
|
938
|
+
"cli_contracts": "0.1.0",
|
|
939
|
+
"info": {
|
|
940
|
+
"title": "litedbmodel-gen CLI",
|
|
941
|
+
"version": "0.2.0",
|
|
942
|
+
"description": "embedoc-based model code generator for litedbmodel. Parses SQL DDL (PostgreSQL / MySQL / SQLite) and generates TypeScript column definitions that stay in sync with your schema.",
|
|
943
|
+
"license": {
|
|
944
|
+
"name": "MIT"
|
|
945
|
+
},
|
|
946
|
+
"contact": {
|
|
947
|
+
"name": "foo-ogawa",
|
|
948
|
+
"url": "https://github.com/foo-ogawa/litedbmodel.ts"
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
"artifact_slots": {
|
|
952
|
+
"sql-schemas": {
|
|
953
|
+
"direction": "read",
|
|
954
|
+
"description": "SQL DDL files for schema parsing"
|
|
955
|
+
},
|
|
956
|
+
"embedoc-config": {
|
|
957
|
+
"direction": "readwrite",
|
|
958
|
+
"description": "embedoc.config.yaml configuration (read and updated during init)"
|
|
959
|
+
},
|
|
960
|
+
"generated-models": {
|
|
961
|
+
"direction": "write",
|
|
962
|
+
"description": "Generated TypeScript model definitions"
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
"command_sets": {
|
|
966
|
+
"litedbmodel-gen": {
|
|
967
|
+
"summary": "embedoc-based model code generator for litedbmodel.",
|
|
968
|
+
"executable": "litedbmodel-gen",
|
|
969
|
+
"global_options": [
|
|
970
|
+
{
|
|
971
|
+
"name": "version",
|
|
972
|
+
"aliases": [
|
|
973
|
+
"V"
|
|
974
|
+
],
|
|
975
|
+
"description": "Print version and exit.",
|
|
976
|
+
"schema": {
|
|
977
|
+
"type": "boolean"
|
|
978
|
+
}
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"name": "help",
|
|
982
|
+
"aliases": [
|
|
983
|
+
"h"
|
|
984
|
+
],
|
|
985
|
+
"description": "Show help and exit.",
|
|
986
|
+
"schema": {
|
|
987
|
+
"type": "boolean"
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
],
|
|
991
|
+
"commands": {
|
|
992
|
+
"init": {
|
|
993
|
+
"summary": "Set up litedbmodel-gen in an embedoc project.",
|
|
994
|
+
"description": "Registers the sql_schema datasource, litedbmodel_columns renderer, and model.hbs template into an existing embedoc project. Copies the starter Handlebars template, updates .embedoc/renderers/index.ts and .embedoc/datasources/index.ts, and adds a schema datasource entry to embedoc.config.yaml.",
|
|
995
|
+
"usage": [
|
|
996
|
+
"litedbmodel-gen init",
|
|
997
|
+
"litedbmodel-gen init path/to/embedoc.config.yaml"
|
|
998
|
+
],
|
|
999
|
+
"arguments": [
|
|
1000
|
+
{
|
|
1001
|
+
"name": "config",
|
|
1002
|
+
"index": 0,
|
|
1003
|
+
"required": false,
|
|
1004
|
+
"description": "Path to embedoc.config.yaml. Defaults to embedoc.config.yaml in the current directory.",
|
|
1005
|
+
"schema": {
|
|
1006
|
+
"type": "string",
|
|
1007
|
+
"default": "embedoc.config.yaml"
|
|
1008
|
+
},
|
|
1009
|
+
"file": {
|
|
1010
|
+
"mode": "read",
|
|
1011
|
+
"exists": true,
|
|
1012
|
+
"media_type": "application/yaml",
|
|
1013
|
+
"encoding": "utf-8"
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
],
|
|
1017
|
+
"exits": {
|
|
1018
|
+
"0": {
|
|
1019
|
+
"description": "litedbmodel-gen set up successfully. Template copied, renderers/datasources registered, and embedoc config updated.",
|
|
1020
|
+
"stdout": {
|
|
1021
|
+
"format": "text"
|
|
1022
|
+
},
|
|
1023
|
+
"files": [
|
|
1024
|
+
{
|
|
1025
|
+
"path": ".embedoc/templates/model.hbs",
|
|
1026
|
+
"required": false,
|
|
1027
|
+
"media_type": "text/x-handlebars-template",
|
|
1028
|
+
"encoding": "utf-8",
|
|
1029
|
+
"description": "Starter Handlebars template for model files (skipped if already exists)."
|
|
1030
|
+
}
|
|
1031
|
+
]
|
|
1032
|
+
},
|
|
1033
|
+
"1": {
|
|
1034
|
+
"description": "Setup failed due to an unexpected file operation error.",
|
|
1035
|
+
"stderr": {
|
|
1036
|
+
"format": "text"
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
"3": {
|
|
1040
|
+
"description": "Input validation failed. The specified embedoc.config.yaml path was not found. Run \\"npx embedoc init\\" first.",
|
|
1041
|
+
"stderr": {
|
|
1042
|
+
"format": "json"
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
"x-agent": {
|
|
1047
|
+
"riskLevel": "low",
|
|
1048
|
+
"requiresConfirmation": false,
|
|
1049
|
+
"idempotent": true,
|
|
1050
|
+
"sideEffects": [
|
|
1051
|
+
"file_write"
|
|
1052
|
+
],
|
|
1053
|
+
"recommendedBeforeUse": [
|
|
1054
|
+
"Run \\"npx embedoc init\\" first to create embedoc.config.yaml."
|
|
1055
|
+
]
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
"audit": {
|
|
1059
|
+
"summary": "Audit litedbmodel usage code for common anti-patterns.",
|
|
1060
|
+
"description": "Scans TypeScript source files that import or use litedbmodel models, detecting anti-patterns such as loop-insert (use createMany), delete-then-reinsert (use upsert), N+1 queries, missing idempotency guards, missing UNIQUE constraints for onConflict, over-broad deletes, and missing forUpdate in concurrent-write paths. Returns structured findings with severity ratings and remediation guidance referencing the correct litedbmodel API.",
|
|
1061
|
+
"usage": [
|
|
1062
|
+
"litedbmodel-gen audit",
|
|
1063
|
+
"litedbmodel-gen audit src/",
|
|
1064
|
+
"litedbmodel-gen audit src/services/user-service.ts --fail-on warning --report-format text"
|
|
1065
|
+
],
|
|
1066
|
+
"arguments": [
|
|
1067
|
+
{
|
|
1068
|
+
"name": "target",
|
|
1069
|
+
"index": 0,
|
|
1070
|
+
"required": false,
|
|
1071
|
+
"description": "File or directory path to audit. Defaults to the current working directory.",
|
|
1072
|
+
"schema": {
|
|
1073
|
+
"type": "string",
|
|
1074
|
+
"default": "."
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
],
|
|
1078
|
+
"options": [
|
|
1079
|
+
{
|
|
1080
|
+
"name": "adapter",
|
|
1081
|
+
"description": "LLM adapter to use for the audit.",
|
|
1082
|
+
"schema": {
|
|
1083
|
+
"type": "string",
|
|
1084
|
+
"enum": [
|
|
1085
|
+
"mock",
|
|
1086
|
+
"cursor",
|
|
1087
|
+
"claude",
|
|
1088
|
+
"openai",
|
|
1089
|
+
"gemini"
|
|
1090
|
+
],
|
|
1091
|
+
"default": "mock"
|
|
1092
|
+
}
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"name": "model",
|
|
1096
|
+
"description": "Model name override for the selected adapter.",
|
|
1097
|
+
"schema": {
|
|
1098
|
+
"type": "string"
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"name": "dry-run",
|
|
1103
|
+
"description": "Output the constructed prompt without calling the LLM.",
|
|
1104
|
+
"schema": {
|
|
1105
|
+
"type": "boolean",
|
|
1106
|
+
"default": false
|
|
1107
|
+
}
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
"name": "fail-on",
|
|
1111
|
+
"description": "Minimum finding severity that causes exit code 10. Findings below this threshold are still reported.",
|
|
1112
|
+
"schema": {
|
|
1113
|
+
"type": "string",
|
|
1114
|
+
"enum": [
|
|
1115
|
+
"warning",
|
|
1116
|
+
"error",
|
|
1117
|
+
"critical"
|
|
1118
|
+
],
|
|
1119
|
+
"default": "error"
|
|
1120
|
+
}
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"name": "output",
|
|
1124
|
+
"aliases": [
|
|
1125
|
+
"o"
|
|
1126
|
+
],
|
|
1127
|
+
"description": "Write the report to a file instead of stdout.",
|
|
1128
|
+
"schema": {
|
|
1129
|
+
"type": "string"
|
|
1130
|
+
},
|
|
1131
|
+
"file": {
|
|
1132
|
+
"mode": "write"
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
"name": "report-format",
|
|
1137
|
+
"description": "Output format for the audit report.",
|
|
1138
|
+
"schema": {
|
|
1139
|
+
"type": "string",
|
|
1140
|
+
"enum": [
|
|
1141
|
+
"json",
|
|
1142
|
+
"text",
|
|
1143
|
+
"yaml"
|
|
1144
|
+
],
|
|
1145
|
+
"default": "json"
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
],
|
|
1149
|
+
"x-agent": {
|
|
1150
|
+
"riskLevel": "low",
|
|
1151
|
+
"requiresConfirmation": false,
|
|
1152
|
+
"idempotent": true,
|
|
1153
|
+
"sideEffects": [
|
|
1154
|
+
"network"
|
|
1155
|
+
],
|
|
1156
|
+
"sideEffectNote": "Makes network calls to the configured LLM provider when adapter is not \\"mock\\". Writes to the filesystem only when --output is specified.",
|
|
1157
|
+
"safeDryRunOption": "dry-run",
|
|
1158
|
+
"expectedDurationMs": 120000,
|
|
1159
|
+
"retryableExitCodes": [
|
|
1160
|
+
1,
|
|
1161
|
+
12
|
|
1162
|
+
]
|
|
1163
|
+
},
|
|
1164
|
+
"exits": {
|
|
1165
|
+
"0": {
|
|
1166
|
+
"description": "Audit completed. No findings at or above the --fail-on threshold.",
|
|
1167
|
+
"stdout": {
|
|
1168
|
+
"format": "json",
|
|
1169
|
+
"schema": {
|
|
1170
|
+
"$ref": "#/components/schemas/AgentAuditResult"
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
"1": {
|
|
1175
|
+
"description": "General error (unexpected exception or I/O failure).",
|
|
1176
|
+
"stderr": {
|
|
1177
|
+
"format": "text"
|
|
1178
|
+
}
|
|
1179
|
+
},
|
|
1180
|
+
"3": {
|
|
1181
|
+
"description": "Input validation failed (target path not found, no TypeScript files found at path).",
|
|
1182
|
+
"stderr": {
|
|
1183
|
+
"format": "json"
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
"10": {
|
|
1187
|
+
"description": "Blocking findings detected at or above the --fail-on threshold.",
|
|
1188
|
+
"stdout": {
|
|
1189
|
+
"format": "json",
|
|
1190
|
+
"schema": {
|
|
1191
|
+
"$ref": "#/components/schemas/AgentAuditResult"
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
},
|
|
1195
|
+
"11": {
|
|
1196
|
+
"description": "agent-contracts-runtime package is not installed.",
|
|
1197
|
+
"stderr": {
|
|
1198
|
+
"format": "json"
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
"12": {
|
|
1202
|
+
"description": "Adapter initialization failed (missing API key or invalid configuration).",
|
|
1203
|
+
"stderr": {
|
|
1204
|
+
"format": "json"
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
},
|
|
1209
|
+
"implement": {
|
|
1210
|
+
"summary": "Implement a feature using litedbmodel best practices.",
|
|
1211
|
+
"description": "Reads the project's model definitions, then implements the described feature directly in the target source file(s), applying litedbmodel best-practice patterns: createMany for batch inserts, upsert with onConflict/onConflictUpdate for idempotent writes, forUpdate for concurrent-safe reads, and DBModel.transaction for multi-step operations. Avoids all eight common litedbmodel anti-patterns. Requires an agentic adapter (claude/cursor) that can read and write project files.",
|
|
1212
|
+
"usage": [
|
|
1213
|
+
"litedbmodel-gen implement \\"Add syncNutrientSummary in src/services/meal.service.ts\\" --target src/services/meal.service.ts --models \\"src/models/**/*.ts\\" --adapter claude",
|
|
1214
|
+
"litedbmodel-gen implement \\"Add bulk upsert for order items\\" --target src/services/order.service.ts --adapter claude"
|
|
1215
|
+
],
|
|
1216
|
+
"arguments": [
|
|
1217
|
+
{
|
|
1218
|
+
"name": "description",
|
|
1219
|
+
"index": 0,
|
|
1220
|
+
"required": true,
|
|
1221
|
+
"description": "Natural-language description of the feature to implement. Should specify the function name, target file, and business logic.",
|
|
1222
|
+
"schema": {
|
|
1223
|
+
"type": "string"
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
],
|
|
1227
|
+
"options": [
|
|
1228
|
+
{
|
|
1229
|
+
"name": "target",
|
|
1230
|
+
"aliases": [
|
|
1231
|
+
"t"
|
|
1232
|
+
],
|
|
1233
|
+
"description": "Target source file(s) to create or edit. The agent reads these files to understand existing code and writes the implementation to them.",
|
|
1234
|
+
"schema": {
|
|
1235
|
+
"type": "string"
|
|
1236
|
+
}
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"name": "models",
|
|
1240
|
+
"description": "Glob pattern for model definition files. The agent reads these to understand available models, columns, and relations.",
|
|
1241
|
+
"schema": {
|
|
1242
|
+
"type": "string",
|
|
1243
|
+
"default": "models/**/*.ts"
|
|
1244
|
+
}
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"name": "adapter",
|
|
1248
|
+
"description": "LLM adapter to use for code generation.",
|
|
1249
|
+
"schema": {
|
|
1250
|
+
"type": "string",
|
|
1251
|
+
"enum": [
|
|
1252
|
+
"mock",
|
|
1253
|
+
"cursor",
|
|
1254
|
+
"claude",
|
|
1255
|
+
"openai",
|
|
1256
|
+
"gemini"
|
|
1257
|
+
],
|
|
1258
|
+
"default": "mock"
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
"name": "model",
|
|
1263
|
+
"description": "Model name override for the selected adapter.",
|
|
1264
|
+
"schema": {
|
|
1265
|
+
"type": "string"
|
|
1266
|
+
}
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"name": "dry-run",
|
|
1270
|
+
"description": "Output the constructed prompt without calling the LLM.",
|
|
1271
|
+
"schema": {
|
|
1272
|
+
"type": "boolean",
|
|
1273
|
+
"default": false
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"name": "fail-on",
|
|
1278
|
+
"description": "Minimum finding severity that causes exit code 10. Design concerns (info/warning) are still reported at exit 0.",
|
|
1279
|
+
"schema": {
|
|
1280
|
+
"type": "string",
|
|
1281
|
+
"enum": [
|
|
1282
|
+
"warning",
|
|
1283
|
+
"error",
|
|
1284
|
+
"critical"
|
|
1285
|
+
],
|
|
1286
|
+
"default": "error"
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
"name": "output",
|
|
1291
|
+
"aliases": [
|
|
1292
|
+
"o"
|
|
1293
|
+
],
|
|
1294
|
+
"description": "Write the report to a file instead of stdout.",
|
|
1295
|
+
"schema": {
|
|
1296
|
+
"type": "string"
|
|
1297
|
+
},
|
|
1298
|
+
"file": {
|
|
1299
|
+
"mode": "write"
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
"name": "report-format",
|
|
1304
|
+
"description": "Output format for the implementation report.",
|
|
1305
|
+
"schema": {
|
|
1306
|
+
"type": "string",
|
|
1307
|
+
"enum": [
|
|
1308
|
+
"json",
|
|
1309
|
+
"text",
|
|
1310
|
+
"yaml"
|
|
1311
|
+
],
|
|
1312
|
+
"default": "json"
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
],
|
|
1316
|
+
"x-agent": {
|
|
1317
|
+
"riskLevel": "high",
|
|
1318
|
+
"requiresConfirmation": true,
|
|
1319
|
+
"idempotent": false,
|
|
1320
|
+
"sideEffects": [
|
|
1321
|
+
"network",
|
|
1322
|
+
"filesystem_write"
|
|
1323
|
+
],
|
|
1324
|
+
"sideEffectNote": "The agent reads project files and writes implementation code directly to the target source file(s). Uses an agentic adapter (claude/cursor) with file read/write tools.",
|
|
1325
|
+
"safeDryRunOption": "dry-run",
|
|
1326
|
+
"expectedDurationMs": 120000,
|
|
1327
|
+
"retryableExitCodes": [
|
|
1328
|
+
1,
|
|
1329
|
+
12
|
|
1330
|
+
]
|
|
1331
|
+
},
|
|
1332
|
+
"exits": {
|
|
1333
|
+
"0": {
|
|
1334
|
+
"description": "Implementation written to target files successfully with no design concerns at or above the --fail-on threshold.",
|
|
1335
|
+
"stdout": {
|
|
1336
|
+
"format": "json",
|
|
1337
|
+
"schema": {
|
|
1338
|
+
"$ref": "#/components/schemas/LitedbmodelImplementResult"
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
"1": {
|
|
1343
|
+
"description": "General error (unexpected exception or I/O failure).",
|
|
1344
|
+
"stderr": {
|
|
1345
|
+
"format": "text"
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
"3": {
|
|
1349
|
+
"description": "Input validation failed (missing description or unreadable model files).",
|
|
1350
|
+
"stderr": {
|
|
1351
|
+
"format": "json"
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
"10": {
|
|
1355
|
+
"description": "Implementation written but design concerns at or above the --fail-on threshold were detected.",
|
|
1356
|
+
"stdout": {
|
|
1357
|
+
"format": "json",
|
|
1358
|
+
"schema": {
|
|
1359
|
+
"$ref": "#/components/schemas/LitedbmodelImplementResult"
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
"11": {
|
|
1364
|
+
"description": "agent-contracts-runtime package is not installed.",
|
|
1365
|
+
"stderr": {
|
|
1366
|
+
"format": "json"
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
"12": {
|
|
1370
|
+
"description": "Adapter initialization failed (missing API key or invalid configuration).",
|
|
1371
|
+
"stderr": {
|
|
1372
|
+
"format": "json"
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
"components": {
|
|
1381
|
+
"schemas": {
|
|
1382
|
+
"AgentEvidence": {
|
|
1383
|
+
"type": "object",
|
|
1384
|
+
"required": [
|
|
1385
|
+
"type",
|
|
1386
|
+
"content"
|
|
1387
|
+
],
|
|
1388
|
+
"properties": {
|
|
1389
|
+
"type": {
|
|
1390
|
+
"type": "string",
|
|
1391
|
+
"description": "Evidence category (e.g. code_snippet, log_line, metric)."
|
|
1392
|
+
},
|
|
1393
|
+
"content": {
|
|
1394
|
+
"type": "string",
|
|
1395
|
+
"description": "The evidence body."
|
|
1396
|
+
},
|
|
1397
|
+
"source": {
|
|
1398
|
+
"type": "string",
|
|
1399
|
+
"description": "File path, URL, or identifier of the evidence source."
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
},
|
|
1403
|
+
"AgentFinding": {
|
|
1404
|
+
"type": "object",
|
|
1405
|
+
"required": [
|
|
1406
|
+
"severity",
|
|
1407
|
+
"category",
|
|
1408
|
+
"message"
|
|
1409
|
+
],
|
|
1410
|
+
"properties": {
|
|
1411
|
+
"id": {
|
|
1412
|
+
"type": "string",
|
|
1413
|
+
"description": "Optional stable identifier for the finding."
|
|
1414
|
+
},
|
|
1415
|
+
"severity": {
|
|
1416
|
+
"type": "string",
|
|
1417
|
+
"enum": [
|
|
1418
|
+
"info",
|
|
1419
|
+
"warning",
|
|
1420
|
+
"error",
|
|
1421
|
+
"critical"
|
|
1422
|
+
]
|
|
1423
|
+
},
|
|
1424
|
+
"category": {
|
|
1425
|
+
"type": "string",
|
|
1426
|
+
"description": "Domain-specific vocabulary label (e.g. LOOP_CREATE, N_PLUS_ONE)."
|
|
1427
|
+
},
|
|
1428
|
+
"target": {
|
|
1429
|
+
"type": "string",
|
|
1430
|
+
"description": "Symbol, class, or function where the finding applies."
|
|
1431
|
+
},
|
|
1432
|
+
"location": {
|
|
1433
|
+
"type": "string",
|
|
1434
|
+
"description": "File path and optional line reference."
|
|
1435
|
+
},
|
|
1436
|
+
"message": {
|
|
1437
|
+
"type": "string",
|
|
1438
|
+
"description": "Human-readable description of the finding."
|
|
1439
|
+
},
|
|
1440
|
+
"recommendation": {
|
|
1441
|
+
"type": "string",
|
|
1442
|
+
"description": "Actionable fix referencing the correct litedbmodel API."
|
|
1443
|
+
},
|
|
1444
|
+
"confidence": {
|
|
1445
|
+
"type": "number",
|
|
1446
|
+
"minimum": 0,
|
|
1447
|
+
"maximum": 1,
|
|
1448
|
+
"description": "Model confidence in the finding (0\u20131)."
|
|
1449
|
+
},
|
|
1450
|
+
"evidence": {
|
|
1451
|
+
"type": "array",
|
|
1452
|
+
"items": {
|
|
1453
|
+
"$ref": "#/components/schemas/AgentEvidence"
|
|
1454
|
+
}
|
|
1455
|
+
},
|
|
1456
|
+
"details": {
|
|
1457
|
+
"type": "object",
|
|
1458
|
+
"description": "Arbitrary additional structured detail."
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
"AgentRecommendedAction": {
|
|
1463
|
+
"type": "object",
|
|
1464
|
+
"required": [
|
|
1465
|
+
"kind",
|
|
1466
|
+
"title"
|
|
1467
|
+
],
|
|
1468
|
+
"properties": {
|
|
1469
|
+
"kind": {
|
|
1470
|
+
"type": "string",
|
|
1471
|
+
"enum": [
|
|
1472
|
+
"run_command",
|
|
1473
|
+
"edit_file",
|
|
1474
|
+
"review",
|
|
1475
|
+
"confirm",
|
|
1476
|
+
"block",
|
|
1477
|
+
"ignore"
|
|
1478
|
+
]
|
|
1479
|
+
},
|
|
1480
|
+
"title": {
|
|
1481
|
+
"type": "string",
|
|
1482
|
+
"description": "Short imperative label for the action."
|
|
1483
|
+
},
|
|
1484
|
+
"command": {
|
|
1485
|
+
"type": "string",
|
|
1486
|
+
"description": "Shell command to run (for kind=run_command)."
|
|
1487
|
+
},
|
|
1488
|
+
"target": {
|
|
1489
|
+
"type": "string",
|
|
1490
|
+
"description": "File or symbol to edit/review."
|
|
1491
|
+
},
|
|
1492
|
+
"rationale": {
|
|
1493
|
+
"type": "string",
|
|
1494
|
+
"description": "Why this action is recommended."
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
"AgentAuditResult": {
|
|
1499
|
+
"type": "object",
|
|
1500
|
+
"required": [
|
|
1501
|
+
"summary",
|
|
1502
|
+
"riskLevel",
|
|
1503
|
+
"findings"
|
|
1504
|
+
],
|
|
1505
|
+
"properties": {
|
|
1506
|
+
"summary": {
|
|
1507
|
+
"type": "string",
|
|
1508
|
+
"description": "One-paragraph summary of the audit result."
|
|
1509
|
+
},
|
|
1510
|
+
"riskLevel": {
|
|
1511
|
+
"type": "string",
|
|
1512
|
+
"enum": [
|
|
1513
|
+
"low",
|
|
1514
|
+
"medium",
|
|
1515
|
+
"high",
|
|
1516
|
+
"critical"
|
|
1517
|
+
],
|
|
1518
|
+
"description": "Overall risk level reflecting the highest-severity finding."
|
|
1519
|
+
},
|
|
1520
|
+
"findings": {
|
|
1521
|
+
"type": "array",
|
|
1522
|
+
"items": {
|
|
1523
|
+
"$ref": "#/components/schemas/AgentFinding"
|
|
1524
|
+
}
|
|
1525
|
+
},
|
|
1526
|
+
"recommendedActions": {
|
|
1527
|
+
"type": "array",
|
|
1528
|
+
"items": {
|
|
1529
|
+
"$ref": "#/components/schemas/AgentRecommendedAction"
|
|
1530
|
+
}
|
|
1531
|
+
},
|
|
1532
|
+
"metadata": {
|
|
1533
|
+
"type": "object",
|
|
1534
|
+
"properties": {
|
|
1535
|
+
"tool": {
|
|
1536
|
+
"type": "string"
|
|
1537
|
+
},
|
|
1538
|
+
"command": {
|
|
1539
|
+
"type": "string"
|
|
1540
|
+
},
|
|
1541
|
+
"version": {
|
|
1542
|
+
"type": "string"
|
|
1543
|
+
},
|
|
1544
|
+
"generatedAt": {
|
|
1545
|
+
"type": "string"
|
|
1546
|
+
},
|
|
1547
|
+
"adapter": {
|
|
1548
|
+
"type": "string"
|
|
1549
|
+
},
|
|
1550
|
+
"model": {
|
|
1551
|
+
"type": "string"
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
"FileChange": {
|
|
1558
|
+
"type": "object",
|
|
1559
|
+
"required": [
|
|
1560
|
+
"path",
|
|
1561
|
+
"action"
|
|
1562
|
+
],
|
|
1563
|
+
"properties": {
|
|
1564
|
+
"path": {
|
|
1565
|
+
"type": "string",
|
|
1566
|
+
"description": "Relative file path that was created or modified."
|
|
1567
|
+
},
|
|
1568
|
+
"action": {
|
|
1569
|
+
"type": "string",
|
|
1570
|
+
"enum": [
|
|
1571
|
+
"created",
|
|
1572
|
+
"updated"
|
|
1573
|
+
],
|
|
1574
|
+
"description": "Whether the file was newly created or updated."
|
|
1575
|
+
},
|
|
1576
|
+
"rationale": {
|
|
1577
|
+
"type": "string",
|
|
1578
|
+
"description": "Why this file was changed."
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
},
|
|
1582
|
+
"LitedbmodelImplementResult": {
|
|
1583
|
+
"allOf": [
|
|
1584
|
+
{
|
|
1585
|
+
"$ref": "#/components/schemas/AgentAuditResult"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"type": "object",
|
|
1589
|
+
"required": [
|
|
1590
|
+
"changedFiles"
|
|
1591
|
+
],
|
|
1592
|
+
"properties": {
|
|
1593
|
+
"changedFiles": {
|
|
1594
|
+
"type": "array",
|
|
1595
|
+
"description": "Files that the agent created or modified.",
|
|
1596
|
+
"items": {
|
|
1597
|
+
"$ref": "#/components/schemas/FileChange"
|
|
1598
|
+
}
|
|
1599
|
+
},
|
|
1600
|
+
"dependencies": {
|
|
1601
|
+
"type": "array",
|
|
1602
|
+
"description": "npm packages required but not yet in the project.",
|
|
1603
|
+
"items": {
|
|
1604
|
+
"type": "string"
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
"notes": {
|
|
1608
|
+
"type": "string",
|
|
1609
|
+
"description": "Additional integration instructions."
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
]
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
}`;function yg(e,t){let r=new hg;return r.name("litedbmodel-gen").version(t,"-V, --version").description("embedoc-based model code generator for litedbmodel."),r.command("init").description("Set up litedbmodel-gen in an embedoc project.").argument("[config]","Path to embedoc.config.yaml. Defaults to embedoc.config.yaml in the current directory.").action(async(i,n,o)=>{await e.init(i,{},o.optsWithGlobals())}),r.command("audit").description("Audit litedbmodel usage code for common anti-patterns.").argument("[target]","File or directory path to audit. Defaults to the current working directory.").option("--adapter <value>","LLM adapter to use for the audit.","mock").option("--model <value>","Model name override for the selected adapter.").option("--dry-run","Output the constructed prompt without calling the LLM.",!1).option("--fail-on <value>","Minimum finding severity that causes exit code 10. Findings below this threshold are still reported.","error").option("-o, --output <value>","Write the report to a file instead of stdout.").option("--report-format <value>","Output format for the audit report.","json").option("--show-prompt","Output the constructed prompt without calling the LLM API.",!1).action(async(i,n,o)=>{if(n.showPrompt){let a=await e.audit(i,n,o.optsWithGlobals());typeof a=="string"&&process.stdout.write(a+`
|
|
1618
|
+
`);return}await e.audit(i,n,o.optsWithGlobals())}),r.command("implement").description("Implement a feature using litedbmodel best practices.").argument("<description>","Natural-language description of the feature to implement. Should specify the function name, target file, and business logic.").option("-t, --target <value>","Target source file(s) to create or edit. The agent reads these files to understand existing code and writes the implementation to them.").option("--models <value>","Glob pattern for model definition files. The agent reads these to understand available models, columns, and relations.","models/**/*.ts").option("--adapter <value>","LLM adapter to use for code generation.","mock").option("--model <value>","Model name override for the selected adapter.").option("--dry-run","Output the constructed prompt without calling the LLM.",!1).option("--fail-on <value>","Minimum finding severity that causes exit code 10. Design concerns (info/warning) are still reported at exit 0.","error").option("-o, --output <value>","Write the report to a file instead of stdout.").option("--report-format <value>","Output format for the implementation report.","json").option("--show-prompt","Output the constructed prompt without calling the LLM API.",!1).action(async(i,n,o)=>{if(n.showPrompt){let a=await e.implement(i,n,o.optsWithGlobals());typeof a=="string"&&process.stdout.write(a+`
|
|
1619
|
+
`);return}await e.implement(i,n,o.optsWithGlobals())}),r.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(i,n,o)=>{i.length===0&&!n.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
|
|
1620
|
+
`),process.exit(2));let a=n.format||"yaml",s=JSON.parse(vg),c=n.all?[]:i;if(c.length===0)if(a==="json"){let l={};n.includeMeta&&(l._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:s.cli_contracts??"0.1.0",commands:["litedbmodel-gen.init","litedbmodel-gen.audit","litedbmodel-gen.implement"]}),Object.assign(l,s),process.stdout.write(JSON.stringify(l,null,2)+`
|
|
1621
|
+
`)}else{let l=[];if(l.push("# litedbmodel-gen extract"),l.push("# source: embedded"),l.push("# type: cli-contracts/command-extract"),n.includeMeta){l.push("---"),l.push("source: embedded"),l.push("type: cli-contracts/command-extract"),l.push("extractedAt: "+new Date().toISOString()),l.push("spec_version: "+(s.cli_contracts??"0.1.0")),l.push("commands:");for(let u of["litedbmodel-gen.init","litedbmodel-gen.audit","litedbmodel-gen.implement"])l.push(" - "+u)}l.push("---"),l.push(gg),process.stdout.write(l.join(`
|
|
1622
|
+
`)+`
|
|
1623
|
+
`)}else{let l={cli_contracts:s.cli_contracts,info:s.info,command_sets:{}},u=l.command_sets;for(let[d,f]of Object.entries(s.command_sets??{})){let p=f.commands;if(!p)continue;let g={};for(let[m,v]of Object.entries(p)){let A=d+"."+m;c.some(_=>_===m||_===A||m.startsWith(_+"."))&&(g[m]=v)}if(Object.keys(g).length>0){let m={...f};m.commands=g,u[d]=m}}s.components&&(l.components=s.components),process.stdout.write(JSON.stringify(l,null,2)+`
|
|
1624
|
+
`)}process.exit(0)}),r}import{existsSync as MN,writeFileSync as FN}from"fs";import{resolve as ek}from"path";function bg(e){return["# litedbmodel Code Audit Request",`## Target
|
|
1625
|
+
|
|
1626
|
+
Read all TypeScript source files at \`${e.targetPath}\` using your file tools. Find every file that imports or uses litedbmodel models, and audit each usage against the eight anti-pattern categories defined in your instructions.`].join(`
|
|
1627
|
+
|
|
1628
|
+
`)}function _g(e){let t=[];return t.push("# litedbmodel Implementation Request"),t.push(""),t.push(`## Feature Description
|
|
1629
|
+
|
|
1630
|
+
${e.description}`),t.push(""),t.push("## Parameters"),t.push(""),t.push(`- **Models glob**: \`${e.modelsGlob}\``),e.targetPath&&t.push(`- **Target file**: \`${e.targetPath}\``),t.join(`
|
|
1631
|
+
`)}async function jN(e,t){let r=e.toLowerCase();try{switch(r){case"mock":{let i=await Promise.resolve().then(()=>(xg(),$g));return new i.MockAdapter({defaultLatencyMs:0,responses:t.mockResponses??{}})}case"cursor":{let i=await Promise.resolve().then(()=>(Sg(),kg)),n=process.env.CURSOR_API_KEY;return i.CursorSdkAdapter.create({apiKey:n,...t.model?{model:t.model}:{},...t.cwd?{cwd:t.cwd}:{}})}case"claude":{let i=await Promise.resolve().then(()=>(Ag(),Og));return new i.ClaudeAgentSdkAdapter({...t.model?{model:t.model}:{},...t.cwd?{cwd:t.cwd}:{}})}case"openai":{let i=await Promise.resolve().then(()=>(Pg(),Tg));return new i.OpenAIAgentsSdkAdapter({...t.model?{model:t.model}:{}})}case"gemini":{let i=await Promise.resolve().then(()=>(Cg(),Ng));return new i.GeminiSdkAdapter({apiKey:process.env.GEMINI_API_KEY,...t.model?{model:t.model}:{}})}default:throw Object.assign(new Error(`Unknown adapter: "${e}". Valid values: mock, cursor, claude, openai, gemini`),{exitCode:12})}}catch(i){let n=i;throw n.exitCode===12?i:Object.assign(new Error(`Failed to initialise adapter "${e}": ${n.message??String(i)}. Ensure the SDK package is installed and the required API key is set.`),{exitCode:12})}}async function DN(){try{let e=await Promise.resolve().then(()=>(G_(),J_));return{agentRegistry:e.agentRegistry??{},taskRegistry:e.taskRegistry??{},handoffSchemas:e.handoffSchemas??{},workflowRegistry:e.workflowRegistry??{}}}catch(e){let t=e.message??String(e);return process.stderr.write(`[litedbmodel-gen] warning: generated DSL registries could not be loaded \u2014 running without schema contracts. Run: npx agent-runtime generate
|
|
1632
|
+
Cause: ${t}
|
|
1633
|
+
`),{agentRegistry:{},taskRegistry:{},handoffSchemas:{},workflowRegistry:{}}}}async function Ga(e,t,r,i){let n,o;try{let f=await Promise.resolve().then(()=>(Xw(),Yw));n=f.runTask,o=f.buildTaskPrompt}catch{throw Object.assign(new Error("agent-contracts-runtime is not installed. Run: npm install --save-dev agent-contracts-runtime"),{exitCode:11})}let a=await DN();if(i.dryRun){let f=a.taskRegistry[t],p=f?.target_agent,g=p?a.agentRegistry[p]:void 0;if(!f||!g)throw Object.assign(new Error(`DSL registry missing task "${t}" or its target agent. Run: npx agent-runtime generate`),{exitCode:1});let m=o(g,f,{user_request:e},{handoffSchemas:a.handoffSchemas});return{taskId:t,data:null,raw:"",prompt:m,dryRun:!0,status:"success",followUpsUsed:0,retriesUsed:0}}let s=await jN(r.adapter??"mock",r),c=await n(s,t,{user_request:e},{maxFollowUps:3,maxRetries:1,...a}),{outcome:l,follow_ups_used:u,retries_used:d}=c;return l.data!==void 0?{taskId:t,data:l.data,raw:l.raw??"",prompt:e,dryRun:!1,status:"success",followUpsUsed:u,retriesUsed:d}:Array.isArray(l.errors)?{taskId:t,data:null,raw:l.raw??"",prompt:e,dryRun:!1,status:"validation_error",errorMessage:l.errors.join("; "),followUpsUsed:u,retriesUsed:d}:typeof l.reason=="string"?{taskId:t,data:null,raw:l.raw??"",prompt:e,dryRun:!1,status:"escalation",errorMessage:l.reason,followUpsUsed:u,retriesUsed:d}:{taskId:t,data:null,raw:"",prompt:e,dryRun:!1,status:"error",errorMessage:typeof l.message=="string"?l.message:"Unknown agent error",followUpsUsed:u,retriesUsed:d}}var UN=["info","warning","error","critical"];function Qw(e){let t=UN.indexOf(e);return t===-1?0:t}function Wa(e,t){if(e.dryRun)return 0;if(e.status==="error"||e.status==="escalation"||e.status==="validation_error"||e.status!=="success"||!e.data)return 1;let r=Qw(t.failOn??"error");return e.data.findings.some(n=>Qw(n.severity)>=r)?10:0}function LN(e){switch(e){case"critical":return"\u2716";case"error":return"\u2716";case"warning":return"\u26A0";case"info":return"\u2139";default:return"\xB7"}}function Ha(e){if(e.dryRun)return`[DRY RUN \u2014 prompt only, LLM was not called]
|
|
1634
|
+
|
|
1635
|
+
${e.prompt}`;if(e.status!=="success"||!e.data)return`litedbmodel-gen agent error
|
|
1636
|
+
Status : ${e.status}
|
|
1637
|
+
Message : ${e.errorMessage??"unknown error"}
|
|
1638
|
+
`;let t=e.data,r=[];if(r.push(`Summary : ${t.summary}`),r.push(`Risk level: ${t.riskLevel.toUpperCase()}`),t.findings.length===0)r.push(`
|
|
1639
|
+
\u2714 No issues found.`);else{r.push(`
|
|
1640
|
+
Findings (${t.findings.length}):
|
|
1641
|
+
`);for(let i of t.findings){let n=LN(i.severity);r.push(` ${n} [${i.severity.toUpperCase()}] ${i.category}${i.target?` \u2014 ${i.target}`:""}`),i.location&&r.push(` Location : ${i.location}`),r.push(` Message : ${i.message}`),i.recommendation&&r.push(` Recommendation: ${i.recommendation}`),i.confidence!==void 0&&r.push(` Confidence : ${Math.round(i.confidence*100)}%`)}}if(t.recommendedActions&&t.recommendedActions.length>0){r.push(`
|
|
1642
|
+
Recommended Actions:
|
|
1643
|
+
`);for(let i of t.recommendedActions)r.push(` \u2192 [${i.kind}] ${i.title}`),i.command&&r.push(` $ ${i.command}`),i.target&&r.push(` Target: ${i.target}`),i.rationale&&r.push(` ${i.rationale}`)}if(RN(t)){if(t.changedFiles.length>0){r.push(`
|
|
1644
|
+
Changed Files (${t.changedFiles.length}):
|
|
1645
|
+
`);for(let i of t.changedFiles)r.push(` [${i.action.toUpperCase()}] ${i.path}`),i.rationale&&r.push(` ${i.rationale}`)}t.dependencies&&t.dependencies.length>0&&r.push(`
|
|
1646
|
+
Required dependencies:
|
|
1647
|
+
npm install ${t.dependencies.join(" ")}`),t.notes&&r.push(`
|
|
1648
|
+
Notes:
|
|
1649
|
+
${t.notes}`)}if(t.metadata){let i=t.metadata;r.push(`
|
|
1650
|
+
Generated at ${i.generatedAt??"\u2014"} by ${i.tool??"litedbmodel-gen"} (adapter: ${i.adapter??"\u2014"}, model: ${i.model??"\u2014"})`)}return r.join(`
|
|
1651
|
+
`)}function Ya(e){return e.dryRun?JSON.stringify({dryRun:!0,prompt:e.prompt},null,2):JSON.stringify(e.data,null,2)}function Xa(e){return e.dryRun?Tn.dump({dryRun:!0,prompt:e.prompt}):Tn.dump(e.data,{lineWidth:120})}function RN(e){return e!==null&&typeof e=="object"&&"changedFiles"in e&&Array.isArray(e.changedFiles)}async function tk(e,t){let r=ek(e??".");if(!MN(r)){let u={error:"target_not_found",message:`Target path not found: ${r}`,target:r};(t.reportFormat??"json")==="json"?process.stderr.write(JSON.stringify(u,null,2)+`
|
|
1652
|
+
`):process.stderr.write(`Error: target path not found: ${r}
|
|
1653
|
+
`),process.exit(3)}let i=bg({targetPath:r}),n=t.adapter??"mock",o={adapter:n,model:t.model,cwd:process.cwd(),...n==="mock"?{mockResponses:{"audit-litedbmodel-usage":()=>JSON.stringify({summary:"Mock audit completed. No issues found.",riskLevel:"low",findings:[],metadata:{tool:"litedbmodel-gen",command:"audit",adapter:"mock"}})}}:{}},a={dryRun:t.dryRun??!1,failOn:t.failOn??"error"},s;try{s=await Ga(i,"audit-litedbmodel-usage",o,a)}catch(u){let d=u,f=d.exitCode??1;if(f===11||f===12){let p={error:"agent_error",exitCode:f,message:d.message??String(u)};process.stderr.write(JSON.stringify(p,null,2)+`
|
|
1654
|
+
`),process.exit(f)}process.stderr.write(`Error: ${d.message??String(u)}
|
|
1655
|
+
`),process.exit(1)}let c=t.reportFormat??"json",l;if(c==="text"?l=Ha(s):c==="yaml"?l=Xa(s):l=Ya(s),t.output){let u=ek(t.output);FN(u,l+`
|
|
1656
|
+
`,"utf-8"),process.stderr.write(`Report written to: ${u}
|
|
1657
|
+
`)}else process.stdout.write(l+`
|
|
1658
|
+
`);process.exit(Wa(s,a))}import{writeFileSync as ZN}from"fs";import{resolve as qN}from"path";async function nk(e,t){if(!e||e.trim().length===0){let u={error:"missing_description",message:'A feature description is required. Example: litedbmodel-gen implement "Sync order items from API"'};process.stderr.write(JSON.stringify(u,null,2)+`
|
|
1659
|
+
`),process.exit(3)}let r=process.cwd(),i=_g({description:e.trim(),modelsGlob:t.models??"models/**/*.ts",targetPath:t.target,cwd:r}),n=t.adapter??"mock",o={adapter:n,model:t.model,cwd:r,...n==="mock"?{mockResponses:{"implement-litedbmodel-feature":()=>JSON.stringify({summary:"Mock implementation completed.",riskLevel:"low",findings:[],changedFiles:t.target?[{path:t.target,action:"updated",rationale:"Mock implementation"}]:[],metadata:{tool:"litedbmodel-gen",command:"implement",adapter:"mock"}})}}:{}},a={dryRun:t.dryRun??!1,failOn:t.failOn??"error"},s;try{s=await Ga(i,"implement-litedbmodel-feature",o,a)}catch(u){let d=u,f=d.exitCode??1;if(f===11||f===12){let p={error:"agent_error",exitCode:f,message:d.message??String(u)};process.stderr.write(JSON.stringify(p,null,2)+`
|
|
1660
|
+
`),process.exit(f)}process.stderr.write(`Error: ${d.message??String(u)}
|
|
1661
|
+
`),process.exit(1)}let c=t.reportFormat??"json",l;if(c==="text"?l=Ha(s):c==="yaml"?l=Xa(s):l=Ya(s),t.output){let u=qN(t.output);ZN(u,l+`
|
|
1662
|
+
`,"utf-8"),process.stderr.write(`Report written to: ${u}
|
|
1663
|
+
`)}else process.stdout.write(l+`
|
|
1664
|
+
`);process.exit(Wa(s,a))}var JN={version:"0.6.1"},GN=KN(import.meta.url),rk=ik(GN);function WN(e){let t=ik(e),r=Qa(e,"utf-8"),i=Tn.load(r)??{},n=kn(t,i.renderers_dir??".embedoc/renderers"),o=kn(t,i.datasources_dir??".embedoc/datasources"),a=kn(t,i.templates_dir??".embedoc/templates");return{renderersDir:n,datasourcesDir:o,templatesDir:a}}var HN={audit:async(e,t)=>{await tk(e,{adapter:t.adapter,model:t.model,dryRun:t.dryRun,failOn:t.failOn,output:t.output,reportFormat:t.reportFormat})},implement:async(e,t)=>{await nk(e,{target:t.target,models:t.models,adapter:t.adapter,model:t.model,dryRun:t.dryRun,failOn:t.failOn,output:t.output,reportFormat:t.reportFormat})},init:async e=>{let t=e??"embedoc.config.yaml",r=kn(t);Wr(r)||(process.stderr.write(JSON.stringify({error:"config_not_found",message:`${t} not found. Run "npx embedoc init" first.`},null,2)+`
|
|
1665
|
+
`),process.exit(3));let i=WN(r);console.log(`Setting up litedbmodel-gen...
|
|
1666
|
+
`),YN(i.templatesDir),QN(i.renderersDir),e1(i.datasourcesDir),t1(r),console.log(`
|
|
1667
|
+
Done! Next steps:`),console.log(" 1. Edit embedoc.config.yaml \u2014 set path/database in the schema datasource"),console.log(" 2. npx embedoc generate --datasource schema (create model files)"),console.log(" 3. npx embedoc build (fill in column definitions)")}};function YN(e){VN(e,{recursive:!0});let t=Ym(e,"model.hbs");if(Wr(t)){console.log(` skip ${t} (already exists)`);return}let r=XN();BN(r,t),console.log(` create ${t}`)}function XN(){let e=[kn(rk,"..","templates","model.hbs"),kn(rk,"templates","model.hbs")];for(let t of e)if(Wr(t))return t;throw new Error("Could not find model.hbs template in package")}function QN(e){let t=Ym(e,"index.ts");if(!Wr(t)){console.error(` warn ${t} not found, skipping renderers setup`);return}let r=Qa(t,"utf-8");if(r.includes("litedbmodel-gen")){console.log(` skip ${t} (already configured)`);return}let i="import { litedbmodelColumns } from 'litedbmodel-gen';",n=` litedbmodel_columns: {
|
|
1668
|
+
...litedbmodelColumns,
|
|
1669
|
+
dependsOn: ['schema'],
|
|
1670
|
+
},`;if(r.includes("import ")){let o=r.lastIndexOf("import "),a=r.indexOf(`
|
|
1671
|
+
`,o);r=r.slice(0,a+1)+i+`
|
|
1672
|
+
`+r.slice(a+1)}else r=i+`
|
|
1673
|
+
|
|
1674
|
+
`+r;r=ok(r,"embeds",n),Hm(t,r,"utf-8"),console.log(` update ${t}`)}function e1(e){let t=Ym(e,"index.ts");if(!Wr(t)){console.error(` warn ${t} not found, skipping datasources setup`);return}let r=Qa(t,"utf-8");if(r.includes("litedbmodel-gen")){console.log(` skip ${t} (already configured)`);return}let i="import { sqlSchema } from 'litedbmodel-gen';",n=" sql_schema: sqlSchema,";if(r.includes("import ")){let o=r.lastIndexOf("import "),a=r.indexOf(`
|
|
1675
|
+
`,o);r=r.slice(0,a+1)+i+`
|
|
1676
|
+
`+r.slice(a+1)}else r=i+`
|
|
1677
|
+
|
|
1678
|
+
`+r;r=ok(r,"datasourceTypes",n),Hm(t,r,"utf-8"),console.log(` update ${t}`)}function ok(e,t,r){let i=new RegExp(`(export\\s+const\\s+${t}\\s*=\\s*\\{)([^}]*)(\\})`),n=e.match(i);if(!n)return e;let[,o,a,s]=n,c=a.replace(/\s+/g," ").trim(),l;return c===""||c.startsWith("//")?l=`
|
|
1679
|
+
${r}
|
|
1680
|
+
`:l=a.trimEnd()+`
|
|
1681
|
+
`+r+`
|
|
1682
|
+
`,e.replace(i,`${o}${l}${s}`)}function t1(e){let t=Qa(e,"utf-8");if(t.includes("sql_schema")){console.log(" skip embedoc.config.yaml (sql_schema already configured)");return}let r=` schema:
|
|
1683
|
+
type: sql_schema
|
|
1684
|
+
path: "./db/schema.sql"
|
|
1685
|
+
database: PostgreSQL
|
|
1686
|
+
generators:
|
|
1687
|
+
- output_path: "./models/{model_class}.ts"
|
|
1688
|
+
template: model.hbs
|
|
1689
|
+
overwrite: false`;if(t.includes("datasources: {}"))t=t.replace("datasources: {}",`datasources:
|
|
1690
|
+
`+r);else if(t.includes("datasources:")){let i=t.indexOf("datasources:"),n=t.indexOf(`
|
|
1691
|
+
`,i);t=t.slice(0,n+1)+r+`
|
|
1692
|
+
`+t.slice(n+1)}else t+=`
|
|
1693
|
+
datasources:
|
|
1694
|
+
`+r+`
|
|
1695
|
+
`;if(!t.includes("models/**/*.ts")){let i=` - pattern: "./models/**/*.ts"
|
|
1696
|
+
comment_style: block`;if(t.includes("targets:")){let n=t.indexOf("targets:"),o=t.indexOf(`
|
|
1697
|
+
`,n);t=t.slice(0,o+1)+i+`
|
|
1698
|
+
`+t.slice(o+1)}}Hm(e,t,"utf-8"),console.log(" update embedoc.config.yaml")}yg(HN,JN.version).parse();
|
|
1699
|
+
/*! Bundled license information:
|
|
1700
|
+
|
|
1701
|
+
js-yaml/dist/js-yaml.mjs:
|
|
1702
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
1703
|
+
*/
|
|
1704
|
+
//# sourceMappingURL=litedbmodel-gen.bundle.mjs.map
|