litedbmodel-gen 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-SEGVTWSK.js +44 -0
- package/dist/cli.js +7367 -14
- package/dist/cli.js.map +1 -1
- package/dist/{dsl-4DLYIQ4T.js → dsl-Y2OQL3GG.js} +2 -2
- package/dist/index.js +44869 -13
- package/dist/index.js.map +1 -1
- package/dist/litedbmodel-gen.bundle.mjs +1703 -0
- package/dist/litedbmodel-gen.bundle.mjs.map +7 -0
- package/package.json +13 -8
- package/dist/chunk-2H7UOFLK.js +0 -11
- /package/dist/{chunk-2H7UOFLK.js.map → chunk-SEGVTWSK.js.map} +0 -0
- /package/dist/{dsl-4DLYIQ4T.js.map → dsl-Y2OQL3GG.js.map} +0 -0
|
@@ -0,0 +1,1703 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
var tk=Object.create;var Xa=Object.defineProperty;var nk=Object.getOwnPropertyDescriptor;var rk=Object.getOwnPropertyNames;var ik=Object.getPrototypeOf,ok=Object.prototype.hasOwnProperty;var De=(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 I=(e,t)=>()=>(e&&(t=e(e=0)),t);var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ie=(e,t)=>{for(var r in t)Xa(e,r,{get:t[r],enumerable:!0})},ak=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of rk(t))!ok.call(e,n)&&n!==r&&Xa(e,n,{get:()=>t[n],enumerable:!(i=nk(t,n))||i.enumerable});return e};var Hm=(e,t,r)=>(r=e!=null?tk(ik(e)):{},ak(t||!e||!e.__esModule?Xa(r,"default",{value:e,enumerable:!0}):r,e));var Pn=T(ms=>{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}},ps=class extends ni{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};ms.CommanderError=ni;ms.InvalidArgumentError=ps});var ri=T(gs=>{var{InvalidArgumentError:I0}=Pn(),hs=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 I0(`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 O0(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}gs.Argument=hs;gs.humanReadableArgName=O0});var bs=T(ys=>{var{humanReadableArgName:A0}=ri(),vs=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=>A0(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 eg(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 eg(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}ys.Help=vs;ys.stripColor=eg});var ws=T(xs=>{var{InvalidArgumentError:E0}=Pn(),_s=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=T0(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 E0(`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?tg(this.name().replace(/^no-/,"")):tg(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}},$s=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 tg(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function T0(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}}xs.Option=_s;xs.DualOptions=$s});var rg=T(ng=>{function P0(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 z0(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=P0(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]}?)`:""}ng.suggestSimilar=z0});var sg=T(As=>{var N0=De("node:events").EventEmitter,ks=De("node:child_process"),Le=De("node:path"),ii=De("node:fs"),Z=De("node:process"),{Argument:C0,humanReadableArgName:j0}=ri(),{CommanderError:Ss}=Pn(),{Help:D0,stripColor:U0}=bs(),{Option:ig,DualOptions:L0}=ws(),{suggestSimilar:og}=rg(),Is=class e extends N0{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=>Z.stdout.write(r),writeErr:r=>Z.stderr.write(r),outputError:(r,i)=>i(r),getOutHelpWidth:()=>Z.stdout.isTTY?Z.stdout.columns:void 0,getErrHelpWidth:()=>Z.stderr.isTTY?Z.stderr.columns:void 0,getOutHasColors:()=>Os()??(Z.stdout.isTTY&&Z.stdout.hasColors?.()),getErrHasColors:()=>Os()??(Z.stderr.isTTY&&Z.stderr.hasColors?.()),stripColor:r=>U0(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 D0,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 C0(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 Ss(t,r,i)),Z.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 ig(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 ig)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){Z.versions?.electron&&(r.from="electron");let n=Z.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=Z.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":Z.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=Le.resolve(u,d);if(ii.existsSync(f))return f;if(n.includes(Le.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=Le.resolve(Le.dirname(u),s)}if(s){let u=o(s,a);if(!u&&!t._executableFile&&this._scriptPath){let d=Le.basename(this._scriptPath,Le.extname(this._scriptPath));d!==this._name&&(u=o(s,`${d}-${t._name}`))}a=u||a}i=n.includes(Le.extname(a));let c;Z.platform!=="win32"?i?(r.unshift(a),r=ag(Z.execArgv).concat(r),c=ks.spawn(Z.argv[0],r,{stdio:"inherit"})):c=ks.spawn(a,r,{stdio:"inherit"}):(this._checkForMissingExecutable(a,s,t._name),r.unshift(a),r=ag(Z.execArgv).concat(r),c=ks.spawn(Z.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{Z.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 Ss(u,"commander.executeSubCommandAsync","(close)")):Z.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)Z.exit(1);else{let d=new Ss(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 Z.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()}`,Z.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new L0(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=og(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=og(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=>j0(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=Le.basename(t,Le.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(Z.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 ag(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 Os(){if(Z.env.NO_COLOR||Z.env.FORCE_COLOR==="0"||Z.env.FORCE_COLOR==="false")return!1;if(Z.env.FORCE_COLOR||Z.env.CLICOLOR_FORCE!==void 0)return!0}As.Command=Is;As.useColor=Os});var dg=T(xe=>{var{Argument:cg}=ri(),{Command:Es}=sg(),{CommanderError:R0,InvalidArgumentError:lg}=Pn(),{Help:M0}=bs(),{Option:ug}=ws();xe.program=new Es;xe.createCommand=e=>new Es(e);xe.createOption=(e,t)=>new ug(e,t);xe.createArgument=(e,t)=>new cg(e,t);xe.Command=Es;xe.Option=ug;xe.Argument=cg;xe.Help=M0;xe.CommanderError=R0;xe.InvalidArgumentError=lg;xe.InvalidOptionArgumentError=lg});var bg={};ie(bg,{MockAdapter:()=>F0});var F0,_g=I(()=>{F0=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 xg={};ie(xg,{CursorSdkAdapter:()=>q0});function Z0(e){return{beforeShellExecution:t=>{let r=e.beforeShellExecution(t);return Ts(r)},preToolUse:t=>{let r=e.preToolUse(t);return Ts(r)},afterFileEdit:t=>{let r=e.afterFileEdit(t);return Ts(r)}}}function Ts(e){return e.permission==="deny"?{permissionDecision:"deny",userMessage:e.user_message,agentMessage:e.agent_message}:e.additionalContext?{additionalContext:e.additionalContext}:{}}var q0,wg=I(()=>{q0=class $g{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,Z0(t.guardrailHooks));let n=await r.create(i);return new $g(n)}}});var Sg={};ie(Sg,{ClaudeAgentSdkAdapter:()=>B0});function V0(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 B0,Ig=I(()=>{B0=class kg{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=V0(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 kg(r);return i.queryFn=t,i}}});var Ag={};ie(Ag,{OpenAIAgentsSdkAdapter:()=>K0});function J0(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 K0,Eg=I(()=>{K0=class Og{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=J0(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(`
|
|
30
|
+
`)}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 Og(i);return n.AgentClass=t,n.runFn=r,n}}});var Pg={};ie(Pg,{GeminiSdkAdapter:()=>G0});function Ps(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 zs(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 G0,zg=I(()=>{G0=class Tg{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 zs(o),this.lastChat=n,Ps(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 zs(r),Ps(r)}async sendExecution(t){this.lastChat=null;let r=await this.resolveClient(),i=this.createChat(r),n=await i.sendMessage({message:t.prompt});return zs(n),this.lastChat=i,Ps(n)}static withClient(t,r){let i=new Tg(r);return i.client=t,i}}});var W0,H0,Ng,Cg=I(()=>{"use strict";W0={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.
|
|
31
|
+
The eight canonical anti-patterns to detect:
|
|
32
|
+
(1) LOOP_CREATE \u2014 Model.create() inside a loop; use createMany instead.
|
|
33
|
+
(2) DELETE_REINSERT \u2014 full delete then re-insert; use upsert instead.
|
|
34
|
+
(3) MISSING_IDEMPOTENCY \u2014 bare create() that throws on duplicate rows.
|
|
35
|
+
(4) AGGREGATE_SKIP \u2014 inserting un-aggregated data that needs group-by first.
|
|
36
|
+
(5) OVER_DELETE \u2014 delete with overly broad conditions.
|
|
37
|
+
(6) MISSING_LOCK \u2014 concurrent-write path without forUpdate: true.
|
|
38
|
+
(7) UNIQUE_MISSING \u2014 onConflict used without a DB UNIQUE constraint.
|
|
39
|
+
(8) N_PLUS_ONE \u2014 find/findOne called inside a loop.
|
|
40
|
+
|
|
41
|
+
litedbmodel API reference (for remediation guidance):
|
|
42
|
+
Model.create(cols, opts?) \u2014 opts: { returning, onConflict, onConflictIgnore, onConflictUpdate }
|
|
43
|
+
Model.createMany(rows, opts?) \u2014 batch INSERT with same opts.
|
|
44
|
+
Model.find(conds, opts?) \u2014 opts: { order, limit, offset, forUpdate }
|
|
45
|
+
Model.findOne(conds, opts?) \u2014 single-row SELECT.
|
|
46
|
+
Model.findById(pkeyResult) \u2014 find by PkeyResult object.
|
|
47
|
+
Model.update(conds, vals, opts?) \u2014 UPDATE matching rows.
|
|
48
|
+
Model.updateMany(rows, opts?) \u2014 bulk UPDATE; opts: { keyColumns }
|
|
49
|
+
Model.delete(conds, opts?) \u2014 DELETE matching rows.
|
|
50
|
+
DBModel.transaction(fn, opts?) \u2014 opts: { retryOnError, retryLimit }
|
|
51
|
+
SKIP \u2014 exclude a condition or column dynamically.
|
|
52
|
+
sql tagged template \u2014 operator-based conditions.
|
|
53
|
+
forUpdate: true \u2014 SELECT FOR UPDATE (must be inside a transaction).
|
|
54
|
+
onConflict + onConflictUpdate \u2014 upsert (target column must have UNIQUE/PK).
|
|
55
|
+
onConflict + onConflictIgnore \u2014 insert-or-ignore.
|
|
56
|
+
|
|
57
|
+
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"}]},H0={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.
|
|
58
|
+
litedbmodel API reference (use ONLY these \u2014 never invent methods):
|
|
59
|
+
Model.create(cols, opts?) \u2014 single INSERT.
|
|
60
|
+
opts: { returning, onConflict, onConflictIgnore, onConflictUpdate }
|
|
61
|
+
Model.createMany(rows, opts?) \u2014 batch INSERT with same opts.
|
|
62
|
+
Model.find(conds, opts?) \u2014 SELECT.
|
|
63
|
+
opts: { order, limit, offset, forUpdate }
|
|
64
|
+
Model.findOne(conds, opts?) \u2014 single-row SELECT.
|
|
65
|
+
Model.findById(pkeyResult) \u2014 find by PkeyResult object.
|
|
66
|
+
Model.update(conds, vals, opts?) \u2014 UPDATE matching rows.
|
|
67
|
+
Model.updateMany(rows, opts?) \u2014 bulk UPDATE.
|
|
68
|
+
opts: { keyColumns }
|
|
69
|
+
Model.delete(conds, opts?) \u2014 DELETE matching rows.
|
|
70
|
+
Model.query(sql, params) \u2014 raw SQL returning typed model instances.
|
|
71
|
+
DBModel.execute(sql) \u2014 raw SQL for DDL/maintenance (no model instances).
|
|
72
|
+
DBModel.transaction(fn, opts?) \u2014 transaction wrapper.
|
|
73
|
+
opts: { retryOnError, retryLimit }
|
|
74
|
+
SKIP \u2014 exclude a condition or column dynamically.
|
|
75
|
+
sql tagged template \u2014 operator-based conditions.
|
|
76
|
+
Column references: sql\`\${Model.col} > \${val}\`
|
|
77
|
+
IS NULL: sql\`\${Model.col} IS NULL\`
|
|
78
|
+
IN: [sql\`\${Model.col} IN (?)\`, [...values]]
|
|
79
|
+
forUpdate: true \u2014 SELECT FOR UPDATE (must be inside a transaction).
|
|
80
|
+
onConflict + onConflictUpdate \u2014 upsert.
|
|
81
|
+
Target column(s) must have UNIQUE or PRIMARY KEY constraint.
|
|
82
|
+
onConflict + onConflictIgnore \u2014 insert-or-ignore.
|
|
83
|
+
Same constraint requirement.
|
|
84
|
+
Column references are symbol-based: Model.column_name (not strings).
|
|
85
|
+
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"}]},Ng={"litedbmodel-auditor":W0,"litedbmodel-implementer":H0}});var Y0,X0,jg,Dg=I(()=>{"use strict";Y0={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},X0={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},jg={"audit-litedbmodel-usage":Y0,"implement-litedbmodel-feature":X0}});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 G(e){return e&&Object.assign(mt,e),mt}var Ug,Ns,Cs,Se,Je,mt,ht=I(()=>{Ns=Object.freeze({status:"aborted"});Cs=Symbol("zod_brand"),Se=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"}};(Ug=globalThis).__zod_globalConfig??(Ug.__zod_globalConfig={});mt=globalThis.__zod_globalConfig});var S={};ie(S,{BIGINT_FORMAT_RANGES:()=>Vs,Class:()=>Ds,NUMBER_FORMAT_RANGES:()=>qs,aborted:()=>He,allowsEval:()=>Rs,assert:()=>rI,assertEqual:()=>Q0,assertIs:()=>tI,assertNever:()=>nI,assertNotEqual:()=>eI,assignProp:()=>Ge,base64ToUint8Array:()=>Rg,base64urlToUint8Array:()=>_I,cached:()=>Dt,captureStackTrace:()=>ai,cleanEnum:()=>bI,cleanRegex:()=>Cn,clone:()=>le,cloneDef:()=>oI,createTransparentProxy:()=>dI,defineLazy:()=>R,esc:()=>oi,escapeRegex:()=>we,explicitlyAborted:()=>Bs,extend:()=>mI,finalizeIssue:()=>ue,floatSafeRemainder:()=>Us,getElementAtPath:()=>aI,getEnumValues:()=>Nn,getLengthableOrigin:()=>Un,getParsedType:()=>uI,getSizableOrigin:()=>Dn,hexToUint8Array:()=>xI,isObject:()=>gt,isPlainObject:()=>We,issue:()=>Ut,joinValues:()=>y,jsonStringifyReplacer:()=>jt,merge:()=>gI,mergeDefs:()=>Re,normalizeParams:()=>O,nullish:()=>Ke,numKeys:()=>lI,objectClone:()=>iI,omit:()=>pI,optionalKeys:()=>Zs,parsedType:()=>k,partial:()=>vI,pick:()=>fI,prefixIssues:()=>me,primitiveTypes:()=>Fs,promiseAllObject:()=>sI,propertyKeyTypes:()=>jn,randomString:()=>cI,required:()=>yI,safeExtend:()=>hI,shallowClone:()=>Ms,slugify:()=>Ls,stringifyPrimitive:()=>$,uint8ArrayToBase64:()=>Mg,uint8ArrayToBase64url:()=>$I,uint8ArrayToHex:()=>wI,unwrapMessage:()=>zn});function Q0(e){return e}function eI(e){return e}function tI(e){}function nI(e){throw new Error("Unexpected value in exhaustive check")}function rI(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 Ke(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 Us(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 R(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Lg)return i===void 0&&(i=Lg,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function iI(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ge(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Re(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function oI(e){return Re(e._zod.def)}function aI(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function sI(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 cI(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 Ls(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function gt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function We(e){if(gt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(gt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ms(e){return We(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function lI(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function we(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function le(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function O(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 dI(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 Zs(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function fI(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=Re(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 Ge(this,"shape",a),a},checks:[]});return le(e,o)}function pI(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=Re(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 Ge(this,"shape",a),a},checks:[]});return le(e,o)}function mI(e,t){if(!We(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=Re(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ge(this,"shape",o),o}});return le(e,n)}function hI(e,t){if(!We(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Re(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ge(this,"shape",i),i}});return le(e,r)}function gI(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=Re(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Ge(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return le(e,r)}function vI(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=Re(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 Ge(this,"shape",c),c},checks:[]});return le(t,a)}function yI(e,t,r){let i=Re(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 Ge(this,"shape",o),o}});return le(t,i)}function He(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 Bs(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 me(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 ue(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 k(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 bI(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Rg(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 Mg(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function _I(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Rg(t+r)}function $I(e){return Mg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function xI(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 wI(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Lg,ai,Rs,uI,jn,Fs,qs,Vs,Ds,C=I(()=>{ht();Lg=Symbol("evaluating");ai="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Rs=Dt(()=>{if(mt.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});uI=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"]),Fs=new Set(["string","number","bigint","boolean","symbol","undefined"]);qs={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]},Vs={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Ds=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 Js(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 Zg(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 Ks(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 ${Zg(i.path)}`);return t.join(`
|
|
86
|
+
`)}var Fg,Ln,he,Gs=I(()=>{ht();C();Fg=(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",Fg),he=h("$ZodError",Fg,{Parent:Error})});var Lt,si,Rt,ci,Mt,Ws,Ft,Hs,li,SI,ui,II,di,OI,fi,AI,pi,EI,mi,TI,hi,PI,gi,zI,Ys=I(()=>{ht();Gs();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 Se;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>ue(c,o,G())));throw ai(s,n?.callee),s}return a.value},si=Lt(he),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=>ue(c,o,G())));throw ai(s,n?.callee),s}return a.value},ci=Rt(he),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 Se;return o.issues.length?{success:!1,error:new(e??Ln)(o.issues.map(a=>ue(a,n,G())))}:{success:!0,data:o.value}},Ws=Mt(he),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=>ue(a,n,G())))}:{success:!0,data:o.value}},Hs=Ft(he),li=e=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Lt(e)(t,r,n)},SI=li(he),ui=e=>(t,r,i)=>Lt(e)(t,r,i),II=ui(he),di=e=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Rt(e)(t,r,n)},OI=di(he),fi=e=>async(t,r,i)=>Rt(e)(t,r,i),AI=fi(he),pi=e=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Mt(e)(t,r,n)},EI=pi(he),mi=e=>(t,r,i)=>Mt(e)(t,r,i),TI=mi(he),hi=e=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Ft(e)(t,r,n)},PI=hi(he),gi=e=>async(t,r,i)=>Ft(e)(t,r,i),zI=gi(he)});var be={};ie(be,{base64:()=>pc,base64url:()=>vi,bigint:()=>_c,boolean:()=>xc,browserEmail:()=>MI,cidrv4:()=>dc,cidrv6:()=>fc,cuid:()=>Xs,cuid2:()=>Qs,date:()=>gc,datetime:()=>yc,domain:()=>qI,duration:()=>ic,e164:()=>hc,email:()=>ac,emoji:()=>sc,extendedDuration:()=>NI,guid:()=>oc,hex:()=>VI,hostname:()=>ZI,html5Email:()=>UI,httpProtocol:()=>mc,idnEmail:()=>RI,integer:()=>$c,ipv4:()=>cc,ipv6:()=>lc,ksuid:()=>nc,lowercase:()=>Sc,mac:()=>uc,md5_base64:()=>JI,md5_base64url:()=>KI,md5_hex:()=>BI,nanoid:()=>rc,null:()=>wc,number:()=>yi,rfc5322Email:()=>LI,sha1_base64:()=>WI,sha1_base64url:()=>HI,sha1_hex:()=>GI,sha256_base64:()=>XI,sha256_base64url:()=>QI,sha256_hex:()=>YI,sha384_base64:()=>tO,sha384_base64url:()=>nO,sha384_hex:()=>eO,sha512_base64:()=>iO,sha512_base64url:()=>oO,sha512_hex:()=>rO,string:()=>bc,time:()=>vc,ulid:()=>ec,undefined:()=>kc,unicodeEmail:()=>qg,uppercase:()=>Ic,uuid:()=>vt,uuid4:()=>CI,uuid6:()=>jI,uuid7:()=>DI,xid:()=>tc});function sc(){return new RegExp(FI,"u")}function Bg(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 vc(e){return new RegExp(`^${Bg(e)}$`)}function yc(e){let t=Bg({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(`^${Vg}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 Xs,Qs,ec,tc,nc,rc,ic,NI,oc,vt,CI,jI,DI,ac,UI,LI,qg,RI,MI,FI,cc,lc,uc,dc,fc,pc,vi,ZI,qI,mc,hc,Vg,gc,bc,_c,$c,yi,xc,wc,kc,Sc,Ic,VI,BI,JI,KI,GI,WI,HI,YI,XI,QI,eO,tO,nO,rO,iO,oO,bi=I(()=>{C();Xs=/^[cC][0-9a-z]{6,}$/,Qs=/^[0-9a-z]+$/,ec=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,tc=/^[0-9a-vA-V]{20}$/,nc=/^[A-Za-z0-9]{27}$/,rc=/^[a-zA-Z0-9_-]{21}$/,ic=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,NI=/^[-+]?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)?)??$/,oc=/^([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})$/,vt=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)$/,CI=vt(4),jI=vt(6),DI=vt(7),ac=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,UI=/^[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])?)*$/,LI=/^(([^<>()\[\]\\.,;:\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,}))$/,qg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,RI=qg,MI=/^[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])?)*$/,FI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";cc=/^(?:(?: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])$/,lc=/^(([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}|:))$/,uc=e=>{let t=we(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},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])\/([0-9]|[1-2][0-9]|3[0-2])$/,fc=/^(([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])$/,pc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vi=/^[A-Za-z0-9_-]*$/,ZI=/^(?=.{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])?)*\.?$/,qI=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,mc=/^https?$/,hc=/^\+[1-9]\d{6,14}$/,Vg="(?:(?:\\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])))",gc=new RegExp(`^${Vg}$`);bc=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},_c=/^-?\d+n?$/,$c=/^-?\d+$/,yi=/^-?\d+(?:\.\d+)?$/,xc=/^(?:true|false)$/i,wc=/^null$/i,kc=/^undefined$/i,Sc=/^[^A-Z]*$/,Ic=/^[^a-z]*$/,VI=/^[0-9a-fA-F]*$/;BI=/^[0-9a-fA-F]{32}$/,JI=Fn(22,"=="),KI=Zn(22),GI=/^[0-9a-fA-F]{40}$/,WI=Fn(27,"="),HI=Zn(27),YI=/^[0-9a-fA-F]{64}$/,XI=Fn(43,"="),QI=Zn(43),eO=/^[0-9a-fA-F]{96}$/,tO=Fn(64,""),nO=Zn(64),rO=/^[0-9a-fA-F]{128}$/,iO=Fn(86,"=="),oO=Zn(86)});function Jg(e,t,r){e.issues.length&&t.issues.push(...me(r,e.issues))}var K,Kg,_i,$i,Oc,Ac,Ec,Tc,Pc,zc,Nc,Cc,jc,Zt,Dc,Uc,Lc,Rc,Mc,Fc,Zc,qc,Vc,xi=I(()=>{ht();bi();C();K=h("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Kg={number:"number",bigint:"bigint",object:"date"},_i=h("$ZodCheckLessThan",(e,t)=>{K.init(e,t);let r=Kg[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)=>{K.init(e,t);let r=Kg[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})}}),Oc=h("$ZodCheckMultipleOf",(e,t)=>{K.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):Us(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})}}),Ac=h("$ZodCheckNumberFormat",(e,t)=>{K.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,o]=qs[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=$c)}),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})}}),Ec=h("$ZodCheckBigIntFormat",(e,t)=>{K.init(e,t);let[r,i]=Vs[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})}}),Tc=h("$ZodCheckMaxSize",(e,t)=>{var r;K.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ke(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})}}),Pc=h("$ZodCheckMinSize",(e,t)=>{var r;K.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ke(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})}}),zc=h("$ZodCheckSizeEquals",(e,t)=>{var r;K.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ke(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})}}),Nc=h("$ZodCheckMaxLength",(e,t)=>{var r;K.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ke(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})}}),Cc=h("$ZodCheckMinLength",(e,t)=>{var r;K.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ke(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})}}),jc=h("$ZodCheckLengthEquals",(e,t)=>{var r;K.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!Ke(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;K.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=()=>{})}),Dc=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})}}),Uc=h("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Sc),Zt.init(e,t)}),Lc=h("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ic),Zt.init(e,t)}),Rc=h("$ZodCheckIncludes",(e,t)=>{K.init(e,t);let r=we(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})}}),Mc=h("$ZodCheckStartsWith",(e,t)=>{K.init(e,t);let r=new RegExp(`^${we(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})}}),Fc=h("$ZodCheckEndsWith",(e,t)=>{K.init(e,t);let r=new RegExp(`.*${we(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})}});Zc=h("$ZodCheckProperty",(e,t)=>{K.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=>Jg(n,r,t.property));Jg(i,r,t.property)}}),qc=h("$ZodCheckMimeType",(e,t)=>{K.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})}}),Vc=h("$ZodCheckOverwrite",(e,t)=>{K.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var qn,Bc=I(()=>{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(`
|
|
87
|
+
`).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(`
|
|
88
|
+
`))}}});var Jc,Kc=I(()=>{Jc={major:4,minor:4,patch:3}});function hl(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function lv(e){if(!vi.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return hl(r)}function uv(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 Wg(e,t,r){e.issues.length&&t.issues.push(...me(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(...me(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 dv(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=Zs(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function fv(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 Hg(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=>!He(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=>ue(a,i,G())))}),t)}function Yg(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=>ue(a,i,G())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}function Gc(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(We(e)&&We(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=Gc(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=Gc(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 Xg(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}),He(e))return e;let a=Gc(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 Qg(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function ev(e,t,r){e.issues.length&&t.issues.push(...me(r,e.issues)),t.value[r]=e.value}function tv(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(...me(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 nv(e,t,r,i,n,o,a){e.issues.length&&(jn.has(typeof i)?r.issues.push(...me(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(s=>ue(s,a,G()))})),t.issues.length&&(jn.has(typeof i)?r.issues.push(...me(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(s=>ue(s,a,G()))})),r.value.set(e.value,t.value)}function rv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function iv(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function ov(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function av(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 sv(e){return e.value=Object.freeze(e.value),e}function cv(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 U,yt,B,Wc,Hc,Yc,Xc,Qc,el,tl,nl,rl,il,ol,al,sl,cl,ll,ul,dl,fl,pl,ml,gl,vl,yl,bl,_l,Oi,$l,Vn,Ai,xl,wl,kl,Sl,Il,Ol,Al,El,Tl,Pl,pv,zl,Bn,Nl,Cl,jl,Ei,Dl,Ul,Ll,Rl,Ml,Fl,Zl,Ti,ql,Vl,Bl,Jl,Kl,Gl,Wl,Hl,Pi,Jn,Yl,Xl,Ql,eu,tu,nu,ru,iu=I(()=>{xi();ht();Bc();Ys();bi();C();Kc();C();U=h("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Jc;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=He(a),u;for(let d of s){if(d._zod.def.when){if(Bs(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 Se;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,a.issues.length!==f&&(l||(l=He(a,f)))});else{if(a.issues.length===f)continue;l||(l=He(a,f))}}return u?u.then(()=>a):a},o=(a,s,c)=>{if(He(a))return a.aborted=!0,a;let l=n(s,i,c);if(l instanceof Promise){if(c.async===!1)throw new Se;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 Se;return c.then(l=>n(l,i,s))}return n(c,i,s)}}R(e,"~standard",()=>({validate:n=>{try{let o=Ws(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Hs(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),yt=h("$ZodString",(e,t)=>{U.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bc(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}}),B=h("$ZodStringFormat",(e,t)=>{Zt.init(e,t),yt.init(e,t)}),Wc=h("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=oc),B.init(e,t)}),Hc=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=vt(i))}else t.pattern??(t.pattern=vt());B.init(e,t)}),Yc=h("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ac),B.init(e,t)}),Xc=h("$ZodURL",(e,t)=>{B.init(e,t),e._zod.check=r=>{try{let i=r.value.trim();if(!t.normalize&&t.protocol?.source===mc.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})}}}),Qc=h("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=sc()),B.init(e,t)}),el=h("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=rc),B.init(e,t)}),tl=h("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Xs),B.init(e,t)}),nl=h("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Qs),B.init(e,t)}),rl=h("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ec),B.init(e,t)}),il=h("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tc),B.init(e,t)}),ol=h("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=nc),B.init(e,t)}),al=h("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=yc(t)),B.init(e,t)}),sl=h("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=gc),B.init(e,t)}),cl=h("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=vc(t)),B.init(e,t)}),ll=h("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ic),B.init(e,t)}),ul=h("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=cc),B.init(e,t),e._zod.bag.format="ipv4"}),dl=h("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=lc),B.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})}}}),fl=h("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=uc(t.delimiter)),B.init(e,t),e._zod.bag.format="mac"}),pl=h("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=dc),B.init(e,t)}),ml=h("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=fc),B.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})}}});gl=h("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=pc),B.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{hl(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});vl=h("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=vi),B.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{lv(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),yl=h("$ZodE164",(e,t)=>{t.pattern??(t.pattern=hc),B.init(e,t)});bl=h("$ZodJWT",(e,t)=>{B.init(e,t),e._zod.check=r=>{uv(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),_l=h("$ZodCustomStringFormat",(e,t)=>{B.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)=>{U.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}}),$l=h("$ZodNumberFormat",(e,t)=>{Ac.init(e,t),Oi.init(e,t)}),Vn=h("$ZodBoolean",(e,t)=>{U.init(e,t),e._zod.pattern=xc,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)=>{U.init(e,t),e._zod.pattern=_c,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}}),xl=h("$ZodBigIntFormat",(e,t)=>{Ec.init(e,t),Ai.init(e,t)}),wl=h("$ZodSymbol",(e,t)=>{U.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}}),kl=h("$ZodUndefined",(e,t)=>{U.init(e,t),e._zod.pattern=kc,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}}),Sl=h("$ZodNull",(e,t)=>{U.init(e,t),e._zod.pattern=wc,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}}),Il=h("$ZodAny",(e,t)=>{U.init(e,t),e._zod.parse=r=>r}),Ol=h("$ZodUnknown",(e,t)=>{U.init(e,t),e._zod.parse=r=>r}),Al=h("$ZodNever",(e,t)=>{U.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),El=h("$ZodVoid",(e,t)=>{U.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}}),Tl=h("$ZodDate",(e,t)=>{U.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}});Pl=h("$ZodArray",(e,t)=>{U.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=>Wg(l,r,a))):Wg(c,r,a)}return o.length?Promise.all(o).then(()=>r):r}});pv=h("$ZodObject",(e,t)=>{if(U.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(()=>dv(t));R(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=gt,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(E=>Ii(E,s,f,l,g,m))):Ii(v,s,f,l,g,m)}return o?fv(u,l,s,c,i.value,e):u.length?Promise.all(u).then(()=>s):s}}),zl=h("$ZodObjectJIT",(e,t)=>{pv.init(e,t);let r=e._zod.parse,i=Dt(()=>dv(t)),n=f=>{let p=new qn(["shape","payload","ctx"]),g=i.value,m=N=>{let w=oi(N);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};p.write("const input = payload.value;");let v=Object.create(null),E=0;for(let N of g.keys)v[N]=`key_${E++}`;p.write("const newResult = {};");for(let N of g.keys){let w=v[N],b=oi(N),z=f[N],D=z?._zod?.optin==="optional",A=z?._zod?.optout==="optional";p.write(`const ${w} = ${m(N)};`),D&&A?p.write(`
|
|
89
|
+
if (${w}.issues.length) {
|
|
90
|
+
if (${b} in input) {
|
|
91
|
+
payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
92
|
+
...iss,
|
|
93
|
+
path: iss.path ? [${b}, ...iss.path] : [${b}]
|
|
94
|
+
})));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (${w}.value === undefined) {
|
|
99
|
+
if (${b} in input) {
|
|
100
|
+
newResult[${b}] = undefined;
|
|
101
|
+
}
|
|
102
|
+
} else {
|
|
103
|
+
newResult[${b}] = ${w}.value;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
`):D?p.write(`
|
|
107
|
+
if (${w}.issues.length) {
|
|
108
|
+
payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
109
|
+
...iss,
|
|
110
|
+
path: iss.path ? [${b}, ...iss.path] : [${b}]
|
|
111
|
+
})));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (${w}.value === undefined) {
|
|
115
|
+
if (${b} in input) {
|
|
116
|
+
newResult[${b}] = undefined;
|
|
117
|
+
}
|
|
118
|
+
} else {
|
|
119
|
+
newResult[${b}] = ${w}.value;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
`):p.write(`
|
|
123
|
+
const ${w}_present = ${b} in input;
|
|
124
|
+
if (${w}.issues.length) {
|
|
125
|
+
payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
126
|
+
...iss,
|
|
127
|
+
path: iss.path ? [${b}, ...iss.path] : [${b}]
|
|
128
|
+
})));
|
|
129
|
+
}
|
|
130
|
+
if (!${w}_present && !${w}.issues.length) {
|
|
131
|
+
payload.issues.push({
|
|
132
|
+
code: "invalid_type",
|
|
133
|
+
expected: "nonoptional",
|
|
134
|
+
input: undefined,
|
|
135
|
+
path: [${b}]
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (${w}_present) {
|
|
140
|
+
if (${w}.value === undefined) {
|
|
141
|
+
newResult[${b}] = undefined;
|
|
142
|
+
} else {
|
|
143
|
+
newResult[${b}] = ${w}.value;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
`)}p.write("payload.value = newResult;"),p.write("return payload;");let x=p.compile();return(N,w)=>x(f,N,w)},o,a=gt,s=!mt.jitless,l=s&&Rs.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?fv([],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)=>{U.init(e,t),R(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),R(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),R(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),R(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=>Hg(s,i,e,n)):Hg(a,i,e,n)}});Nl=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=>Yg(s,i,e,n)):Yg(a,i,e,n)}}),Cl=h("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Bn.init(e,t);let r=e._zod.parse;R(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(!gt(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)}}),jl=h("$ZodIntersection",(e,t)=>{U.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])=>Xg(r,c,l)):Xg(r,o,a)}});Ei=h("$ZodTuple",(e,t)=>{U.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=Qg(r,"optin"),c=Qg(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=>ev(g,i,u))):ev(p,i,u)}}return a.length?Promise.all(a).then(()=>tv(l,i,r,o,c)):tv(l,i,r,o,c)}});Dl=h("$ZodRecord",(e,t)=>{U.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!We(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=>ue(p,i,G())),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(...me(l,p.issues)),r.value[d]=p.value})):(f.issues.length&&r.issues.push(...me(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=>ue(d,i,G())),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(...me(s,d.issues)),r.value[c.value]=d.value})):(u.issues.length&&r.issues.push(...me(s,u.issues)),r.value[c.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),Ul=h("$ZodMap",(e,t)=>{U.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])=>{nv(u,d,r,a,n,e,i)})):nv(c,l,r,a,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});Ll=h("$ZodSet",(e,t)=>{U.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=>rv(c,r))):rv(s,r)}return o.length?Promise.all(o).then(()=>r):r}});Rl=h("$ZodEnum",(e,t)=>{U.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"?we(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}}),Ml=h("$ZodLiteral",(e,t)=>{if(U.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"?we(i):i?we(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}}),Fl=h("$ZodFile",(e,t)=>{U.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}}),Zl=h("$ZodTransform",(e,t)=>{U.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 Se;return r.value=n,r.fallback=!0,r}});Ti=h("$ZodOptional",(e,t)=>{U.init(e,t),e._zod.optin="optional",e._zod.optout="optional",R(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),R(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=>iv(a,n)):iv(o,n)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),ql=h("$ZodExactOptional",(e,t)=>{Ti.init(e,t),R(e._zod,"values",()=>t.innerType._zod.values),R(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Vl=h("$ZodNullable",(e,t)=>{U.init(e,t),R(e._zod,"optin",()=>t.innerType._zod.optin),R(e._zod,"optout",()=>t.innerType._zod.optout),R(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Cn(r.source)}|null)$`):void 0}),R(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)}),Bl=h("$ZodDefault",(e,t)=>{U.init(e,t),e._zod.optin="optional",R(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=>ov(o,t)):ov(n,t)}});Jl=h("$ZodPrefault",(e,t)=>{U.init(e,t),e._zod.optin="optional",R(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))}),Kl=h("$ZodNonOptional",(e,t)=>{U.init(e,t),R(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=>av(o,e)):av(n,e)}});Gl=h("$ZodSuccess",(e,t)=>{U.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)}}),Wl=h("$ZodCatch",(e,t)=>{U.init(e,t),e._zod.optin="optional",R(e._zod,"optout",()=>t.innerType._zod.optout),R(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=>ue(a,i,G()))},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=>ue(o,i,G()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Hl=h("$ZodNaN",(e,t)=>{U.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)=>{U.init(e,t),R(e._zod,"values",()=>t.in._zod.values),R(e._zod,"optin",()=>t.in._zod.optin),R(e._zod,"optout",()=>t.out._zod.optout),R(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)}});Jn=h("$ZodCodec",(e,t)=>{U.init(e,t),R(e._zod,"values",()=>t.in._zod.values),R(e._zod,"optin",()=>t.in._zod.optin),R(e._zod,"optout",()=>t.out._zod.optout),R(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)}}});Yl=h("$ZodPreprocess",(e,t)=>{Pi.init(e,t)}),Xl=h("$ZodReadonly",(e,t)=>{U.init(e,t),R(e._zod,"propValues",()=>t.innerType._zod.propValues),R(e._zod,"values",()=>t.innerType._zod.values),R(e._zod,"optin",()=>t.innerType?._zod?.optin),R(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(sv):sv(n)}});Ql=h("$ZodTemplateLiteral",(e,t)=>{U.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||Fs.has(typeof i))r.push(we(`${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)}),eu=h("$ZodFunction",(e,t)=>(U.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)),tu=h("$ZodPromise",(e,t)=>{U.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),nu=h("$ZodLazy",(e,t)=>{U.init(e,t),R(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),R(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),R(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),R(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),R(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),ru=h("$ZodCustom",(e,t)=>{K.init(e,t),U.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=>cv(o,r,i,e));cv(n,r,i,e)}})});function mv(){return{localeError:sO()}}var sO,hv=I(()=>{C();sO=()=>{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=k(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 gv(){return{localeError:cO()}}var cO,vv=I(()=>{C();cO=()=>{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=k(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 yv(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 bv(){return{localeError:lO()}}var lO,_v=I(()=>{C();lO=()=>{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=k(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=yv(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=yv(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 $v(){return{localeError:uO()}}var uO,xv=I(()=>{C();uO=()=>{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=k(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 wv(){return{localeError:dO()}}var dO,kv=I(()=>{C();dO=()=>{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=k(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 Sv(){return{localeError:fO()}}var fO,Iv=I(()=>{C();fO=()=>{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=k(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 Ov(){return{localeError:pO()}}var pO,Av=I(()=>{C();pO=()=>{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=k(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 Ev(){return{localeError:mO()}}var mO,Tv=I(()=>{C();mO=()=>{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=k(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 Pv(){return{localeError:hO()}}var hO,zv=I(()=>{C();hO=()=>{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=k(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:gO()}}var gO,ou=I(()=>{C();gO=()=>{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=k(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 Nv(){return{localeError:vO()}}var vO,Cv=I(()=>{C();vO=()=>{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=k(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 jv(){return{localeError:yO()}}var yO,Dv=I(()=>{C();yO=()=>{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=k(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 Uv(){return{localeError:bO()}}var bO,Lv=I(()=>{C();bO=()=>{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=k(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 Rv(){return{localeError:_O()}}var _O,Mv=I(()=>{C();_O=()=>{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=k(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 Fv(){return{localeError:$O()}}var $O,Zv=I(()=>{C();$O=()=>{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=k(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 qv(){return{localeError:xO()}}var xO,Vv=I(()=>{C();xO=()=>{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=k(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 Bv(){return{localeError:wO()}}var wO,Jv=I(()=>{C();wO=()=>{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=k(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 Kv(){return{localeError:kO()}}var kO,Gv=I(()=>{C();kO=()=>{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=k(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 Wv(){return{localeError:SO()}}var SO,Hv=I(()=>{C();SO=()=>{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=k(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 Yv(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 Xv(){return{localeError:IO()}}var IO,Qv=I(()=>{C();IO=()=>{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=k(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=Yv(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=Yv(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 ey(){return{localeError:OO()}}var OO,ty=I(()=>{C();OO=()=>{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=k(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 ny(){return{localeError:AO()}}var AO,ry=I(()=>{C();AO=()=>{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=k(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 iy(){return{localeError:EO()}}var EO,oy=I(()=>{C();EO=()=>{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=k(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 ay(){return{localeError:TO()}}var TO,sy=I(()=>{C();TO=()=>{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=k(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 cy(){return{localeError:PO()}}var PO,ly=I(()=>{C();PO=()=>{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=k(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:zO()}}var zO,au=I(()=>{C();zO=()=>{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=k(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 uy(){return Ni()}var dy=I(()=>{au()});function fy(){return{localeError:NO()}}var NO,py=I(()=>{C();NO=()=>{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=k(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 my(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 hy(){return{localeError:CO()}}var Kn,CO,gy=I(()=>{C();Kn=e=>e.charAt(0).toUpperCase()+e.slice(1);CO=()=>{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=k(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,my(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Kn(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`${Kn(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,my(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Kn(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`${Kn(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`${Kn(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function vy(){return{localeError:jO()}}var jO,yy=I(()=>{C();jO=()=>{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=k(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 by(){return{localeError:DO()}}var DO,_y=I(()=>{C();DO=()=>{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=k(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 $y(){return{localeError:UO()}}var UO,xy=I(()=>{C();UO=()=>{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=k(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 wy(){return{localeError:LO()}}var LO,ky=I(()=>{C();LO=()=>{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=k(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 Sy(){return{localeError:RO()}}var RO,Iy=I(()=>{C();RO=()=>{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=k(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 Oy(){return{localeError:MO()}}var MO,Ay=I(()=>{C();MO=()=>{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=k(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 Ey(){return{localeError:FO()}}var FO,Ty=I(()=>{C();FO=()=>{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=k(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 Py(){return{localeError:ZO()}}var ZO,zy=I(()=>{C();ZO=()=>{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=k(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 Ny(){return{localeError:qO()}}var qO,Cy=I(()=>{C();qO=()=>{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=k(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 jy(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 Dy(){return{localeError:VO()}}var VO,Uy=I(()=>{C();VO=()=>{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=k(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=jy(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=jy(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 Ly(){return{localeError:BO()}}var BO,Ry=I(()=>{C();BO=()=>{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=k(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 My(){return{localeError:JO()}}var JO,Fy=I(()=>{C();JO=()=>{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=k(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 Zy(){return{localeError:KO()}}var KO,qy=I(()=>{C();KO=()=>{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=k(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 Vy(){return{localeError:GO()}}var GO,By=I(()=>{C();GO=()=>{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=k(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 Jy(){return{localeError:WO()}}var WO,Ky=I(()=>{C();WO=()=>{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=k(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:HO()}}var HO,su=I(()=>{C();HO=()=>{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=k(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 Gy(){return Ci()}var Wy=I(()=>{su()});function Hy(){return{localeError:YO()}}var YO,Yy=I(()=>{C();YO=()=>{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=k(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 Xy(){return{localeError:XO()}}var XO,Qy=I(()=>{C();XO=()=>{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=k(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 eb(){return{localeError:QO()}}var QO,tb=I(()=>{C();QO=()=>{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=k(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 nb(){return{localeError:eA()}}var eA,rb=I(()=>{C();eA=()=>{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=k(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 ib(){return{localeError:tA()}}var tA,ob=I(()=>{C();tA=()=>{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=k(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 ab(){return{localeError:nA()}}var nA,sb=I(()=>{C();nA=()=>{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=k(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={};ie(Gn,{ar:()=>mv,az:()=>gv,be:()=>bv,bg:()=>$v,ca:()=>wv,cs:()=>Sv,da:()=>Ov,de:()=>Ev,el:()=>Pv,en:()=>zi,eo:()=>Nv,es:()=>jv,fa:()=>Uv,fi:()=>Rv,fr:()=>Fv,frCA:()=>qv,he:()=>Bv,hr:()=>Kv,hu:()=>Wv,hy:()=>Xv,id:()=>ey,is:()=>ny,it:()=>iy,ja:()=>ay,ka:()=>cy,kh:()=>uy,km:()=>Ni,ko:()=>fy,lt:()=>hy,mk:()=>vy,ms:()=>by,nl:()=>$y,no:()=>wy,ota:()=>Sy,pl:()=>Ey,ps:()=>Oy,pt:()=>Py,ro:()=>Ny,ru:()=>Dy,sl:()=>Ly,sv:()=>My,ta:()=>Zy,th:()=>Vy,tr:()=>Jy,ua:()=>Gy,uk:()=>Ci,ur:()=>Hy,uz:()=>Xy,vi:()=>eb,yo:()=>ab,zhCN:()=>nb,zhTW:()=>ib});var cu=I(()=>{hv();vv();_v();xv();kv();Iv();Av();Tv();zv();ou();Cv();Dv();Lv();Mv();Zv();Vv();Jv();Gv();Hv();Qv();ty();ry();oy();sy();ly();dy();au();py();gy();yy();_y();xy();ky();Iy();Ay();Ty();zy();Cy();Uy();Ry();Fy();qy();By();Ky();Wy();su();Yy();Qy();tb();rb();ob();sb()});function Di(){return new ji}var cb,lu,uu,ji,ne,Wn=I(()=>{lu=Symbol("ZodOutput"),uu=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)}};(cb=globalThis).__zod_globalRegistry??(cb.__zod_globalRegistry=Di());ne=globalThis.__zod_globalRegistry});function du(e,t){return new e({type:"string",...O(t)})}function fu(e,t){return new e({type:"string",coerce:!0,...O(t)})}function Ui(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...O(t)})}function Hn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...O(t)})}function Li(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...O(t)})}function Ri(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...O(t)})}function Mi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...O(t)})}function Fi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...O(t)})}function Yn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...O(t)})}function Zi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...O(t)})}function qi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...O(t)})}function Vi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...O(t)})}function Bi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...O(t)})}function Ji(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...O(t)})}function Ki(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...O(t)})}function Gi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...O(t)})}function Wi(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...O(t)})}function Hi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...O(t)})}function pu(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...O(t)})}function Yi(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...O(t)})}function Xi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...O(t)})}function Qi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...O(t)})}function eo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...O(t)})}function to(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...O(t)})}function no(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...O(t)})}function hu(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...O(t)})}function gu(e,t){return new e({type:"string",format:"date",check:"string_format",...O(t)})}function vu(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...O(t)})}function yu(e,t){return new e({type:"string",format:"duration",check:"string_format",...O(t)})}function bu(e,t){return new e({type:"number",checks:[],...O(t)})}function _u(e,t){return new e({type:"number",coerce:!0,checks:[],...O(t)})}function $u(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...O(t)})}function xu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...O(t)})}function wu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...O(t)})}function ku(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...O(t)})}function Su(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...O(t)})}function Iu(e,t){return new e({type:"boolean",...O(t)})}function Ou(e,t){return new e({type:"boolean",coerce:!0,...O(t)})}function Au(e,t){return new e({type:"bigint",...O(t)})}function Eu(e,t){return new e({type:"bigint",coerce:!0,...O(t)})}function Tu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...O(t)})}function Pu(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...O(t)})}function zu(e,t){return new e({type:"symbol",...O(t)})}function Nu(e,t){return new e({type:"undefined",...O(t)})}function Cu(e,t){return new e({type:"null",...O(t)})}function ju(e){return new e({type:"any"})}function Du(e){return new e({type:"unknown"})}function Uu(e,t){return new e({type:"never",...O(t)})}function Lu(e,t){return new e({type:"void",...O(t)})}function Ru(e,t){return new e({type:"date",...O(t)})}function Mu(e,t){return new e({type:"date",coerce:!0,...O(t)})}function Fu(e,t){return new e({type:"nan",...O(t)})}function Te(e,t){return new _i({check:"less_than",...O(t),value:e,inclusive:!1})}function _e(e,t){return new _i({check:"less_than",...O(t),value:e,inclusive:!0})}function Pe(e,t){return new $i({check:"greater_than",...O(t),value:e,inclusive:!1})}function de(e,t){return new $i({check:"greater_than",...O(t),value:e,inclusive:!0})}function ro(e){return Pe(0,e)}function io(e){return Te(0,e)}function oo(e){return _e(0,e)}function ao(e){return de(0,e)}function Ye(e,t){return new Oc({check:"multiple_of",...O(t),value:e})}function Xe(e,t){return new Tc({check:"max_size",...O(t),maximum:e})}function ze(e,t){return new Pc({check:"min_size",...O(t),minimum:e})}function bt(e,t){return new zc({check:"size_equals",...O(t),size:e})}function _t(e,t){return new Nc({check:"max_length",...O(t),maximum:e})}function Me(e,t){return new Cc({check:"min_length",...O(t),minimum:e})}function $t(e,t){return new jc({check:"length_equals",...O(t),length:e})}function Vt(e,t){return new Dc({check:"string_format",format:"regex",...O(t),pattern:e})}function Bt(e){return new Uc({check:"string_format",format:"lowercase",...O(e)})}function Jt(e){return new Lc({check:"string_format",format:"uppercase",...O(e)})}function Kt(e,t){return new Rc({check:"string_format",format:"includes",...O(t),includes:e})}function Gt(e,t){return new Mc({check:"string_format",format:"starts_with",...O(t),prefix:e})}function Wt(e,t){return new Fc({check:"string_format",format:"ends_with",...O(t),suffix:e})}function so(e,t,r){return new Zc({check:"property",property:e,schema:t,...O(r)})}function Ht(e,t){return new qc({check:"mime_type",mime:e,...O(t)})}function Ie(e){return new Vc({check:"overwrite",tx:e})}function Yt(e){return Ie(t=>t.normalize(e))}function Xt(){return Ie(e=>e.trim())}function Qt(){return Ie(e=>e.toLowerCase())}function en(){return Ie(e=>e.toUpperCase())}function tn(){return Ie(e=>Ls(e))}function Zu(e,t,r){return new e({type:"array",element:t,...O(r)})}function iA(e,t,r){return new e({type:"union",options:t,...O(r)})}function oA(e,t,r){return new e({type:"union",options:t,inclusive:!1,...O(r)})}function aA(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...O(i)})}function sA(e,t,r){return new e({type:"intersection",left:t,right:r})}function cA(e,t,r,i){let n=r instanceof U,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...O(o)})}function lA(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...O(i)})}function uA(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...O(i)})}function dA(e,t,r){return new e({type:"set",valueType:t,...O(r)})}function fA(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...O(r)})}function pA(e,t,r){return new e({type:"enum",entries:t,...O(r)})}function mA(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...O(r)})}function qu(e,t){return new e({type:"file",...O(t)})}function hA(e,t){return new e({type:"transform",transform:t})}function gA(e,t){return new e({type:"optional",innerType:t})}function vA(e,t){return new e({type:"nullable",innerType:t})}function yA(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Ms(r)}})}function bA(e,t,r){return new e({type:"nonoptional",innerType:t,...O(r)})}function _A(e,t){return new e({type:"success",innerType:t})}function $A(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function xA(e,t,r){return new e({type:"pipe",in:t,out:r})}function wA(e,t){return new e({type:"readonly",innerType:t})}function kA(e,t,r){return new e({type:"template_literal",parts:t,...O(r)})}function SA(e,t){return new e({type:"lazy",getter:t})}function IA(e,t){return new e({type:"promise",innerType:t})}function Vu(e,t,r){let i=O(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Bu(e,t,r){return new e({type:"custom",check:"custom",fn:t,...O(r)})}function Ju(e,t){let r=lb(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 lb(e,t){let r=new K({check:"custom",...O(t)});return r._zod.check=e,r}function Ku(e){let t=new K({check:"describe"});return t._zod.onattach=[r=>{let i=ne.get(r)??{};ne.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function Gu(e){let t=new K({check:"meta"});return t._zod.onattach=[r=>{let i=ne.get(r)??{};ne.add(r,{...i,...e})}],t._zod.check=()=>{},t}function Wu(e,t){let r=O(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??Jn,c=e.Boolean??Vn,l=e.String??yt,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=O(i),o={...O(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 mu,ub=I(()=>{xi();Wn();iu();C();mu={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Qe(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??ne,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 q(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),q(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"&&fe(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 et(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>
|
|
148
|
+
|
|
149
|
+
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 tt(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 fe(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 fe(i.element,r);if(i.type==="set")return fe(i.valueType,r);if(i.type==="lazy")return fe(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 fe(i.innerType,r);if(i.type==="intersection")return fe(i.left,r)||fe(i.right,r);if(i.type==="record"||i.type==="map")return fe(i.keyType,r)||fe(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:fe(i.in,r)||fe(i.out,r);if(i.type==="object"){for(let n in i.shape)if(fe(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(fe(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(fe(n,r))return!0;return!!(i.rest&&fe(i.rest,r))}return!1}var Hu,rn,Xn=I(()=>{Wn();Hu=(e,t={})=>r=>{let i=Qe({...r,processors:t});return q(e,i),et(i,e),tt(i,e)},rn=(e,t,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},a=Qe({...n??{},target:o,io:t,processors:r});return q(e,a),et(a,e),tt(a,e)}});function fo(e,t){if("_idmap"in e){let i=e,n=Qe({...t,processors:co}),o={};for(let c of i._idmap.entries()){let[l,u]=c;q(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;et(n,u),a[l]=tt(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=Qe({...t,processors:co});return q(e,r),et(r,e),tt(r,e)}var OA,Yu,Xu,Qu,ed,td,nd,rd,id,od,ad,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,vd,yd,bd,_d,$d,lo,xd,wd,kd,Sd,Id,Od,Ad,Ed,Td,Pd,zd,uo,Nd,co,Qn=I(()=>{Xn();C();OA={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Yu=(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=OA[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}))])}},Xu=(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)},Qu=(e,t,r,i)=>{r.type="boolean"},ed=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},td=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},nd=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},rd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},id=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},od=(e,t,r,i)=>{r.not={}},ad=(e,t,r,i)=>{},sd=(e,t,r,i)=>{},cd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},ld=(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},ud=(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},dd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},fd=(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},pd=(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)},md=(e,t,r,i)=>{r.type="boolean"},hd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},gd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},vd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},yd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},bd=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},_d=(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=q(o.element,t,{...i,path:[...i.path,"items"]})},$d=(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]=q(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=q(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)=>q(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},xd=(e,t,r,i)=>{let n=e._zod.def,o=q(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=q(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},wd=(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)=>q(f,t,{...i,path:[...i.path,a,p]})),l=o.rest?q(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)},kd=(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=q(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=q(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=q(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)}},Sd=(e,t,r,i)=>{let n=e._zod.def,o=q(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"}]},Id=(e,t,r,i)=>{let n=e._zod.def;q(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},Od=(e,t,r,i)=>{let n=e._zod.def;q(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Ad=(e,t,r,i)=>{let n=e._zod.def;q(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)))},Ed=(e,t,r,i)=>{let n=e._zod.def;q(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},Td=(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;q(a,t,i);let s=t.seen.get(e);s.ref=a},Pd=(e,t,r,i)=>{let n=e._zod.def;q(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},zd=(e,t,r,i)=>{let n=e._zod.def;q(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},uo=(e,t,r,i)=>{let n=e._zod.def;q(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},Nd=(e,t,r,i)=>{let n=e._zod.innerType;q(n,t,i);let o=t.seen.get(e);o.ref=n},co={string:Yu,number:Xu,boolean:Qu,bigint:ed,symbol:td,null:nd,undefined:rd,void:id,never:od,any:ad,unknown:sd,date:cd,enum:ld,literal:ud,nan:dd,template_literal:fd,file:pd,success:md,custom:hd,function:gd,transform:vd,map:yd,set:bd,array:_d,object:$d,union:lo,intersection:xd,tuple:wd,record:kd,nullable:Sd,nonoptional:Id,default:Od,prefault:Ad,catch:Ed,pipe:Td,readonly:Pd,promise:zd,optional:uo,lazy:Nd}});var po,db=I(()=>{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=Qe({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 q(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)),et(this.ctx,t);let i=tt(this.ctx,t),{"~standard":n,...o}=i;return o}}});var fb={};var pb=I(()=>{});var Fe={};ie(Fe,{$ZodAny:()=>Il,$ZodArray:()=>Pl,$ZodAsyncError:()=>Se,$ZodBase64:()=>gl,$ZodBase64URL:()=>vl,$ZodBigInt:()=>Ai,$ZodBigIntFormat:()=>xl,$ZodBoolean:()=>Vn,$ZodCIDRv4:()=>pl,$ZodCIDRv6:()=>ml,$ZodCUID:()=>tl,$ZodCUID2:()=>nl,$ZodCatch:()=>Wl,$ZodCheck:()=>K,$ZodCheckBigIntFormat:()=>Ec,$ZodCheckEndsWith:()=>Fc,$ZodCheckGreaterThan:()=>$i,$ZodCheckIncludes:()=>Rc,$ZodCheckLengthEquals:()=>jc,$ZodCheckLessThan:()=>_i,$ZodCheckLowerCase:()=>Uc,$ZodCheckMaxLength:()=>Nc,$ZodCheckMaxSize:()=>Tc,$ZodCheckMimeType:()=>qc,$ZodCheckMinLength:()=>Cc,$ZodCheckMinSize:()=>Pc,$ZodCheckMultipleOf:()=>Oc,$ZodCheckNumberFormat:()=>Ac,$ZodCheckOverwrite:()=>Vc,$ZodCheckProperty:()=>Zc,$ZodCheckRegex:()=>Dc,$ZodCheckSizeEquals:()=>zc,$ZodCheckStartsWith:()=>Mc,$ZodCheckStringFormat:()=>Zt,$ZodCheckUpperCase:()=>Lc,$ZodCodec:()=>Jn,$ZodCustom:()=>ru,$ZodCustomStringFormat:()=>_l,$ZodDate:()=>Tl,$ZodDefault:()=>Bl,$ZodDiscriminatedUnion:()=>Cl,$ZodE164:()=>yl,$ZodEmail:()=>Yc,$ZodEmoji:()=>Qc,$ZodEncodeError:()=>Je,$ZodEnum:()=>Rl,$ZodError:()=>Ln,$ZodExactOptional:()=>ql,$ZodFile:()=>Fl,$ZodFunction:()=>eu,$ZodGUID:()=>Wc,$ZodIPv4:()=>ul,$ZodIPv6:()=>dl,$ZodISODate:()=>sl,$ZodISODateTime:()=>al,$ZodISODuration:()=>ll,$ZodISOTime:()=>cl,$ZodIntersection:()=>jl,$ZodJWT:()=>bl,$ZodKSUID:()=>ol,$ZodLazy:()=>nu,$ZodLiteral:()=>Ml,$ZodMAC:()=>fl,$ZodMap:()=>Ul,$ZodNaN:()=>Hl,$ZodNanoID:()=>el,$ZodNever:()=>Al,$ZodNonOptional:()=>Kl,$ZodNull:()=>Sl,$ZodNullable:()=>Vl,$ZodNumber:()=>Oi,$ZodNumberFormat:()=>$l,$ZodObject:()=>pv,$ZodObjectJIT:()=>zl,$ZodOptional:()=>Ti,$ZodPipe:()=>Pi,$ZodPrefault:()=>Jl,$ZodPreprocess:()=>Yl,$ZodPromise:()=>tu,$ZodReadonly:()=>Xl,$ZodRealError:()=>he,$ZodRecord:()=>Dl,$ZodRegistry:()=>ji,$ZodSet:()=>Ll,$ZodString:()=>yt,$ZodStringFormat:()=>B,$ZodSuccess:()=>Gl,$ZodSymbol:()=>wl,$ZodTemplateLiteral:()=>Ql,$ZodTransform:()=>Zl,$ZodTuple:()=>Ei,$ZodType:()=>U,$ZodULID:()=>rl,$ZodURL:()=>Xc,$ZodUUID:()=>Hc,$ZodUndefined:()=>kl,$ZodUnion:()=>Bn,$ZodUnknown:()=>Ol,$ZodVoid:()=>El,$ZodXID:()=>il,$ZodXor:()=>Nl,$brand:()=>Cs,$constructor:()=>h,$input:()=>uu,$output:()=>lu,Doc:()=>qn,JSONSchema:()=>fb,JSONSchemaGenerator:()=>po,NEVER:()=>Ns,TimePrecision:()=>mu,_any:()=>ju,_array:()=>Zu,_base64:()=>Qi,_base64url:()=>eo,_bigint:()=>Au,_boolean:()=>Iu,_catch:()=>$A,_check:()=>lb,_cidrv4:()=>Yi,_cidrv6:()=>Xi,_coercedBigint:()=>Eu,_coercedBoolean:()=>Ou,_coercedDate:()=>Mu,_coercedNumber:()=>_u,_coercedString:()=>fu,_cuid:()=>Vi,_cuid2:()=>Bi,_custom:()=>Vu,_date:()=>Ru,_decode:()=>ui,_decodeAsync:()=>fi,_default:()=>yA,_discriminatedUnion:()=>aA,_e164:()=>to,_email:()=>Ui,_emoji:()=>Zi,_encode:()=>li,_encodeAsync:()=>di,_endsWith:()=>Wt,_enum:()=>fA,_file:()=>qu,_float32:()=>xu,_float64:()=>wu,_gt:()=>Pe,_gte:()=>de,_guid:()=>Hn,_includes:()=>Kt,_int:()=>$u,_int32:()=>ku,_int64:()=>Tu,_intersection:()=>sA,_ipv4:()=>Wi,_ipv6:()=>Hi,_isoDate:()=>gu,_isoDateTime:()=>hu,_isoDuration:()=>yu,_isoTime:()=>vu,_jwt:()=>no,_ksuid:()=>Gi,_lazy:()=>SA,_length:()=>$t,_literal:()=>mA,_lowercase:()=>Bt,_lt:()=>Te,_lte:()=>_e,_mac:()=>pu,_map:()=>uA,_max:()=>_e,_maxLength:()=>_t,_maxSize:()=>Xe,_mime:()=>Ht,_min:()=>de,_minLength:()=>Me,_minSize:()=>ze,_multipleOf:()=>Ye,_nan:()=>Fu,_nanoid:()=>qi,_nativeEnum:()=>pA,_negative:()=>io,_never:()=>Uu,_nonnegative:()=>ao,_nonoptional:()=>bA,_nonpositive:()=>oo,_normalize:()=>Yt,_null:()=>Cu,_nullable:()=>vA,_number:()=>bu,_optional:()=>gA,_overwrite:()=>Ie,_parse:()=>Lt,_parseAsync:()=>Rt,_pipe:()=>xA,_positive:()=>ro,_promise:()=>IA,_property:()=>so,_readonly:()=>wA,_record:()=>lA,_refine:()=>Bu,_regex:()=>Vt,_safeDecode:()=>mi,_safeDecodeAsync:()=>gi,_safeEncode:()=>pi,_safeEncodeAsync:()=>hi,_safeParse:()=>Mt,_safeParseAsync:()=>Ft,_set:()=>dA,_size:()=>bt,_slugify:()=>tn,_startsWith:()=>Gt,_string:()=>du,_stringFormat:()=>nn,_stringbool:()=>Wu,_success:()=>_A,_superRefine:()=>Ju,_symbol:()=>zu,_templateLiteral:()=>kA,_toLowerCase:()=>Qt,_toUpperCase:()=>en,_transform:()=>hA,_trim:()=>Xt,_tuple:()=>cA,_uint32:()=>Su,_uint64:()=>Pu,_ulid:()=>Ji,_undefined:()=>Nu,_union:()=>iA,_unknown:()=>Du,_uppercase:()=>Jt,_url:()=>Yn,_uuid:()=>Li,_uuidv4:()=>Ri,_uuidv6:()=>Mi,_uuidv7:()=>Fi,_void:()=>Lu,_xid:()=>Ki,_xor:()=>oA,clone:()=>le,config:()=>G,createStandardJSONSchemaMethod:()=>rn,createToJSONSchemaMethod:()=>Hu,decode:()=>II,decodeAsync:()=>AI,describe:()=>Ku,encode:()=>SI,encodeAsync:()=>OI,extractDefs:()=>et,finalize:()=>tt,flattenError:()=>Rn,formatError:()=>Mn,globalConfig:()=>mt,globalRegistry:()=>ne,initializeContext:()=>Qe,isValidBase64:()=>hl,isValidBase64URL:()=>lv,isValidJWT:()=>uv,locales:()=>Gn,meta:()=>Gu,parse:()=>si,parseAsync:()=>ci,prettifyError:()=>Ks,process:()=>q,regexes:()=>be,registry:()=>Di,safeDecode:()=>TI,safeDecodeAsync:()=>zI,safeEncode:()=>EI,safeEncodeAsync:()=>PI,safeParse:()=>Ws,safeParseAsync:()=>Hs,toDotPath:()=>Zg,toJSONSchema:()=>fo,treeifyError:()=>Js,util:()=>S,version:()=>Jc});var $e=I(()=>{ht();Ys();Gs();iu();xi();Kc();C();bi();cu();Wn();Bc();ub();Xn();Qn();db();pb()});var mo={};ie(mo,{endsWith:()=>Wt,gt:()=>Pe,gte:()=>de,includes:()=>Kt,length:()=>$t,lowercase:()=>Bt,lt:()=>Te,lte:()=>_e,maxLength:()=>_t,maxSize:()=>Xe,mime:()=>Ht,minLength:()=>Me,minSize:()=>ze,multipleOf:()=>Ye,negative:()=>io,nonnegative:()=>ao,nonpositive:()=>oo,normalize:()=>Yt,overwrite:()=>Ie,positive:()=>ro,property:()=>so,regex:()=>Vt,size:()=>bt,slugify:()=>tn,startsWith:()=>Gt,toLowerCase:()=>Qt,toUpperCase:()=>en,trim:()=>Xt,uppercase:()=>Jt});var ho=I(()=>{$e()});var on={};ie(on,{ZodISODate:()=>vo,ZodISODateTime:()=>go,ZodISODuration:()=>bo,ZodISOTime:()=>yo,date:()=>jd,datetime:()=>Cd,duration:()=>Ud,time:()=>Dd});function Cd(e){return hu(go,e)}function jd(e){return gu(vo,e)}function Dd(e){return vu(yo,e)}function Ud(e){return yu(bo,e)}var go,vo,yo,bo,er=I(()=>{$e();nr();go=h("ZodISODateTime",(e,t)=>{al.init(e,t),J.init(e,t)});vo=h("ZodISODate",(e,t)=>{sl.init(e,t),J.init(e,t)});yo=h("ZodISOTime",(e,t)=>{cl.init(e,t),J.init(e,t)});bo=h("ZodISODuration",(e,t)=>{ll.init(e,t),J.init(e,t)})});var mb,EA,ge,Ld=I(()=>{$e();$e();C();mb=(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}}})},EA=h("ZodError",mb),ge=h("ZodError",mb,{Parent:Error})});var Rd,Md,Fd,Zd,qd,Vd,Bd,Jd,Kd,Gd,Wd,Hd,Yd=I(()=>{$e();Ld();Rd=Lt(ge),Md=Rt(ge),Fd=Mt(ge),Zd=Ft(ge),qd=li(ge),Vd=ui(ge),Bd=di(ge),Jd=fi(ge),Kd=pi(ge),Gd=mi(ge),Wd=hi(ge),Hd=gi(ge)});var tr={};ie(tr,{ZodAny:()=>af,ZodArray:()=>uf,ZodBase64:()=>jo,ZodBase64URL:()=>Do,ZodBigInt:()=>fn,ZodBigIntFormat:()=>Ro,ZodBoolean:()=>dn,ZodCIDRv4:()=>No,ZodCIDRv6:()=>Co,ZodCUID:()=>Io,ZodCUID2:()=>Oo,ZodCatch:()=>zf,ZodCodec:()=>mr,ZodCustom:()=>hr,ZodCustomStringFormat:()=>ln,ZodDate:()=>lr,ZodDefault:()=>If,ZodDiscriminatedUnion:()=>ff,ZodE164:()=>Uo,ZodEmail:()=>wo,ZodEmoji:()=>ko,ZodEnum:()=>sn,ZodExactOptional:()=>wf,ZodFile:()=>$f,ZodFunction:()=>Zf,ZodGUID:()=>ir,ZodIPv4:()=>Po,ZodIPv6:()=>zo,ZodIntersection:()=>pf,ZodJWT:()=>Lo,ZodKSUID:()=>To,ZodLazy:()=>Rf,ZodLiteral:()=>_f,ZodMAC:()=>Xd,ZodMap:()=>yf,ZodNaN:()=>Cf,ZodNanoID:()=>So,ZodNever:()=>cf,ZodNonOptional:()=>Bo,ZodNull:()=>rf,ZodNullable:()=>Sf,ZodNumber:()=>un,ZodNumberFormat:()=>wt,ZodObject:()=>dr,ZodOptional:()=>Vo,ZodPipe:()=>pr,ZodPrefault:()=>Af,ZodPreprocess:()=>jf,ZodPromise:()=>Ff,ZodReadonly:()=>Df,ZodRecord:()=>an,ZodSet:()=>bf,ZodString:()=>cn,ZodStringFormat:()=>J,ZodSuccess:()=>Pf,ZodSymbol:()=>tf,ZodTemplateLiteral:()=>Lf,ZodTransform:()=>xf,ZodTuple:()=>hf,ZodType:()=>L,ZodULID:()=>Ao,ZodURL:()=>cr,ZodUUID:()=>Ne,ZodUndefined:()=>nf,ZodUnion:()=>fr,ZodUnknown:()=>sf,ZodVoid:()=>lf,ZodXID:()=>Eo,ZodXor:()=>df,_ZodString:()=>xo,_default:()=>Of,_function:()=>x_,any:()=>Qb,array:()=>ur,base64:()=>Db,base64url:()=>Ub,bigint:()=>Gb,boolean:()=>ef,catch:()=>Nf,check:()=>w_,cidrv4:()=>Cb,cidrv6:()=>jb,codec:()=>y_,cuid:()=>Ib,cuid2:()=>Ob,custom:()=>k_,date:()=>t_,describe:()=>S_,discriminatedUnion:()=>s_,e164:()=>Lb,email:()=>gb,emoji:()=>kb,enum:()=>Zo,exactOptional:()=>kf,file:()=>m_,float32:()=>Vb,float64:()=>Bb,function:()=>x_,guid:()=>vb,hash:()=>qb,hex:()=>Zb,hostname:()=>Fb,httpUrl:()=>wb,instanceof:()=>O_,int:()=>_o,int32:()=>Jb,int64:()=>Wb,intersection:()=>mf,invertCodec:()=>b_,ipv4:()=>Pb,ipv6:()=>Nb,json:()=>E_,jwt:()=>Rb,keyof:()=>n_,ksuid:()=>Tb,lazy:()=>Mf,literal:()=>p_,looseObject:()=>o_,looseRecord:()=>l_,mac:()=>zb,map:()=>u_,meta:()=>I_,nan:()=>v_,nanoid:()=>Sb,nativeEnum:()=>f_,never:()=>Mo,nonoptional:()=>Tf,null:()=>of,nullable:()=>ar,nullish:()=>h_,number:()=>Qd,object:()=>r_,optional:()=>or,partialRecord:()=>c_,pipe:()=>$o,prefault:()=>Ef,preprocess:()=>T_,promise:()=>$_,readonly:()=>Uf,record:()=>vf,refine:()=>qf,set:()=>d_,strictObject:()=>i_,string:()=>rr,stringFormat:()=>Mb,stringbool:()=>A_,success:()=>g_,superRefine:()=>Vf,symbol:()=>Yb,templateLiteral:()=>__,transform:()=>qo,tuple:()=>gf,uint32:()=>Kb,uint64:()=>Hb,ulid:()=>Ab,undefined:()=>Xb,union:()=>Fo,unknown:()=>xt,url:()=>xb,uuid:()=>yb,uuidv4:()=>bb,uuidv6:()=>_b,uuidv7:()=>$b,void:()=>e_,xid:()=>Eb,xor:()=>a_});function sr(e,t,r){let i=Object.getPrototypeOf(e),n=hb.get(i);if(n||(n=new Set,hb.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 du(cn,e)}function gb(e){return Ui(wo,e)}function vb(e){return Hn(ir,e)}function yb(e){return Li(Ne,e)}function bb(e){return Ri(Ne,e)}function _b(e){return Mi(Ne,e)}function $b(e){return Fi(Ne,e)}function xb(e){return Yn(cr,e)}function wb(e){return Yn(cr,{protocol:be.httpProtocol,hostname:be.domain,...S.normalizeParams(e)})}function kb(e){return Zi(ko,e)}function Sb(e){return qi(So,e)}function Ib(e){return Vi(Io,e)}function Ob(e){return Bi(Oo,e)}function Ab(e){return Ji(Ao,e)}function Eb(e){return Ki(Eo,e)}function Tb(e){return Gi(To,e)}function Pb(e){return Wi(Po,e)}function zb(e){return pu(Xd,e)}function Nb(e){return Hi(zo,e)}function Cb(e){return Yi(No,e)}function jb(e){return Xi(Co,e)}function Db(e){return Qi(jo,e)}function Ub(e){return eo(Do,e)}function Lb(e){return to(Uo,e)}function Rb(e){return no(Lo,e)}function Mb(e,t,r={}){return nn(ln,e,t,r)}function Fb(e){return nn(ln,"hostname",be.hostname,e)}function Zb(e){return nn(ln,"hex",be.hex,e)}function qb(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=be[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return nn(ln,i,n,t)}function Qd(e){return bu(un,e)}function _o(e){return $u(wt,e)}function Vb(e){return xu(wt,e)}function Bb(e){return wu(wt,e)}function Jb(e){return ku(wt,e)}function Kb(e){return Su(wt,e)}function ef(e){return Iu(dn,e)}function Gb(e){return Au(fn,e)}function Wb(e){return Tu(Ro,e)}function Hb(e){return Pu(Ro,e)}function Yb(e){return zu(tf,e)}function Xb(e){return Nu(nf,e)}function of(e){return Cu(rf,e)}function Qb(){return ju(af)}function xt(){return Du(sf)}function Mo(e){return Uu(cf,e)}function e_(e){return Lu(lf,e)}function t_(e){return Ru(lr,e)}function ur(e,t){return Zu(uf,e,t)}function n_(e){let t=e._zod.def.shape;return Zo(Object.keys(t))}function r_(e,t){let r={type:"object",shape:e??{},...S.normalizeParams(t)};return new dr(r)}function i_(e,t){return new dr({type:"object",shape:e,catchall:Mo(),...S.normalizeParams(t)})}function o_(e,t){return new dr({type:"object",shape:e,catchall:xt(),...S.normalizeParams(t)})}function Fo(e,t){return new fr({type:"union",options:e,...S.normalizeParams(t)})}function a_(e,t){return new df({type:"union",options:e,inclusive:!1,...S.normalizeParams(t)})}function s_(e,t,r){return new ff({type:"union",options:t,discriminator:e,...S.normalizeParams(r)})}function mf(e,t){return new pf({type:"intersection",left:e,right:t})}function gf(e,t,r){let i=t instanceof U,n=i?r:t,o=i?t:null;return new hf({type:"tuple",items:e,rest:o,...S.normalizeParams(n)})}function vf(e,t,r){return!t||!t._zod?new an({type:"record",keyType:rr(),valueType:e,...S.normalizeParams(t)}):new an({type:"record",keyType:e,valueType:t,...S.normalizeParams(r)})}function c_(e,t,r){let i=le(e);return i._zod.values=void 0,new an({type:"record",keyType:i,valueType:t,...S.normalizeParams(r)})}function l_(e,t,r){return new an({type:"record",keyType:e,valueType:t,mode:"loose",...S.normalizeParams(r)})}function u_(e,t,r){return new yf({type:"map",keyType:e,valueType:t,...S.normalizeParams(r)})}function d_(e,t){return new bf({type:"set",valueType:e,...S.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,...S.normalizeParams(t)})}function f_(e,t){return new sn({type:"enum",entries:e,...S.normalizeParams(t)})}function p_(e,t){return new _f({type:"literal",values:Array.isArray(e)?e:[e],...S.normalizeParams(t)})}function m_(e){return qu($f,e)}function qo(e){return new xf({type:"transform",transform:e})}function or(e){return new Vo({type:"optional",innerType:e})}function kf(e){return new wf({type:"optional",innerType:e})}function ar(e){return new Sf({type:"nullable",innerType:e})}function h_(e){return or(ar(e))}function Of(e,t){return new If({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():S.shallowClone(t)}})}function Ef(e,t){return new Af({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():S.shallowClone(t)}})}function Tf(e,t){return new Bo({type:"nonoptional",innerType:e,...S.normalizeParams(t)})}function g_(e){return new Pf({type:"success",innerType:e})}function Nf(e,t){return new zf({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function v_(e){return Fu(Cf,e)}function $o(e,t){return new pr({type:"pipe",in:e,out:t})}function y_(e,t,r){return new mr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function b_(e){let t=e._zod.def;return new mr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Uf(e){return new Df({type:"readonly",innerType:e})}function __(e,t){return new Lf({type:"template_literal",parts:e,...S.normalizeParams(t)})}function Mf(e){return new Rf({type:"lazy",getter:e})}function $_(e){return new Ff({type:"promise",innerType:e})}function x_(e){return new Zf({type:"function",input:Array.isArray(e?.input)?gf(e?.input):e?.input??ur(xt()),output:e?.output??xt()})}function w_(e){let t=new K({check:"custom"});return t._zod.check=e,t}function k_(e,t){return Vu(hr,e??(()=>!0),t)}function qf(e,t={}){return Bu(hr,e,t)}function Vf(e,t){return Ju(e,t)}function O_(e,t={}){let r=new hr({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...S.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 E_(e){let t=Mf(()=>Fo([rr(e),Qd(),ef(),of(),ur(t),vf(rr(),t)]));return t}function T_(e,t){return new jf({type:"pipe",in:qo(e),out:t})}var hb,L,xo,cn,J,wo,ir,Ne,cr,ko,So,Io,Oo,Ao,Eo,To,Po,Xd,zo,No,Co,jo,Do,Uo,Lo,ln,un,wt,dn,fn,Ro,tf,nf,rf,af,sf,cf,lf,lr,uf,dr,fr,df,ff,pf,hf,an,yf,bf,sn,_f,$f,xf,Vo,wf,Sf,If,Af,Bo,Pf,zf,Cf,pr,mr,jf,Df,Lf,Rf,Ff,Zf,hr,S_,I_,A_,nr=I(()=>{$e();$e();Qn();Xn();ho();er();Yd();hb=new WeakMap;L=h("ZodType",(e,t)=>(U.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:rn(e,"input"),output:rn(e,"output")}}),e.toJSONSchema=Hu(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>Rd(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>Fd(e,r,i),e.parseAsync=async(r,i)=>Md(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Zd(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>qd(e,r,i),e.decode=(r,i)=>Vd(e,r,i),e.encodeAsync=async(r,i)=>Bd(e,r,i),e.decodeAsync=async(r,i)=>Jd(e,r,i),e.safeEncode=(r,i)=>Kd(e,r,i),e.safeDecode=(r,i)=>Gd(e,r,i),e.safeEncodeAsync=async(r,i)=>Wd(e,r,i),e.safeDecodeAsync=async(r,i)=>Hd(e,r,i),sr(e,"ZodType",{check(...r){let i=this.def;return this.clone(S.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 le(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check(qf(r,i))},superRefine(r,i){return this.check(Vf(r,i))},overwrite(r){return this.check(Ie(r))},optional(){return or(this)},exactOptional(){return kf(this)},nullable(){return ar(this)},nullish(){return or(ar(this))},nonoptional(r){return Tf(this,r)},array(){return ur(this)},or(r){return Fo([this,r])},and(r){return mf(this,r)},transform(r){return $o(this,qo(r))},default(r){return Of(this,r)},prefault(r){return Ef(this,r)},catch(r){return Nf(this,r)},pipe(r){return $o(this,r)},readonly(){return Uf(this)},describe(r){let i=this.clone();return ne.add(i,{description:r}),i},meta(...r){if(r.length===0)return ne.get(this);let i=this.clone();return ne.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 ne.get(e)?.description},configurable:!0}),e)),xo=h("_ZodString",(e,t)=>{yt.init(e,t),L.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Yu(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(Kt(...i))},startsWith(...i){return this.check(Gt(...i))},endsWith(...i){return this.check(Wt(...i))},min(...i){return this.check(Me(...i))},max(...i){return this.check(_t(...i))},length(...i){return this.check($t(...i))},nonempty(...i){return this.check(Me(1,...i))},lowercase(i){return this.check(Bt(i))},uppercase(i){return this.check(Jt(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)=>{yt.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(Ne,r)),e.uuidv4=r=>e.check(Ri(Ne,r)),e.uuidv6=r=>e.check(Mi(Ne,r)),e.uuidv7=r=>e.check(Fi(Ne,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(Ji(Ao,r)),e.base64=r=>e.check(Qi(jo,r)),e.base64url=r=>e.check(eo(Do,r)),e.xid=r=>e.check(Ki(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(Cd(r)),e.date=r=>e.check(jd(r)),e.time=r=>e.check(Dd(r)),e.duration=r=>e.check(Ud(r))});J=h("ZodStringFormat",(e,t)=>{B.init(e,t),xo.init(e,t)}),wo=h("ZodEmail",(e,t)=>{Yc.init(e,t),J.init(e,t)});ir=h("ZodGUID",(e,t)=>{Wc.init(e,t),J.init(e,t)});Ne=h("ZodUUID",(e,t)=>{Hc.init(e,t),J.init(e,t)});cr=h("ZodURL",(e,t)=>{Xc.init(e,t),J.init(e,t)});ko=h("ZodEmoji",(e,t)=>{Qc.init(e,t),J.init(e,t)});So=h("ZodNanoID",(e,t)=>{el.init(e,t),J.init(e,t)});Io=h("ZodCUID",(e,t)=>{tl.init(e,t),J.init(e,t)});Oo=h("ZodCUID2",(e,t)=>{nl.init(e,t),J.init(e,t)});Ao=h("ZodULID",(e,t)=>{rl.init(e,t),J.init(e,t)});Eo=h("ZodXID",(e,t)=>{il.init(e,t),J.init(e,t)});To=h("ZodKSUID",(e,t)=>{ol.init(e,t),J.init(e,t)});Po=h("ZodIPv4",(e,t)=>{ul.init(e,t),J.init(e,t)});Xd=h("ZodMAC",(e,t)=>{fl.init(e,t),J.init(e,t)});zo=h("ZodIPv6",(e,t)=>{dl.init(e,t),J.init(e,t)});No=h("ZodCIDRv4",(e,t)=>{pl.init(e,t),J.init(e,t)});Co=h("ZodCIDRv6",(e,t)=>{ml.init(e,t),J.init(e,t)});jo=h("ZodBase64",(e,t)=>{gl.init(e,t),J.init(e,t)});Do=h("ZodBase64URL",(e,t)=>{vl.init(e,t),J.init(e,t)});Uo=h("ZodE164",(e,t)=>{yl.init(e,t),J.init(e,t)});Lo=h("ZodJWT",(e,t)=>{bl.init(e,t),J.init(e,t)});ln=h("ZodCustomStringFormat",(e,t)=>{_l.init(e,t),J.init(e,t)});un=h("ZodNumber",(e,t)=>{Oi.init(e,t),L.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Xu(e,i,n,o),sr(e,"ZodNumber",{gt(i,n){return this.check(Pe(i,n))},gte(i,n){return this.check(de(i,n))},min(i,n){return this.check(de(i,n))},lt(i,n){return this.check(Te(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(Pe(0,i))},nonnegative(i){return this.check(de(0,i))},negative(i){return this.check(Te(0,i))},nonpositive(i){return this.check(_e(0,i))},multipleOf(i,n){return this.check(Ye(i,n))},step(i,n){return this.check(Ye(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});wt=h("ZodNumberFormat",(e,t)=>{$l.init(e,t),un.init(e,t)});dn=h("ZodBoolean",(e,t)=>{Vn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Qu(e,r,i,n)});fn=h("ZodBigInt",(e,t)=>{Ai.init(e,t),L.init(e,t),e._zod.processJSONSchema=(i,n,o)=>ed(e,i,n,o),e.gte=(i,n)=>e.check(de(i,n)),e.min=(i,n)=>e.check(de(i,n)),e.gt=(i,n)=>e.check(Pe(i,n)),e.gte=(i,n)=>e.check(de(i,n)),e.min=(i,n)=>e.check(de(i,n)),e.lt=(i,n)=>e.check(Te(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(Pe(BigInt(0),i)),e.negative=i=>e.check(Te(BigInt(0),i)),e.nonpositive=i=>e.check(_e(BigInt(0),i)),e.nonnegative=i=>e.check(de(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(Ye(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)=>{xl.init(e,t),fn.init(e,t)});tf=h("ZodSymbol",(e,t)=>{wl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>td(e,r,i,n)});nf=h("ZodUndefined",(e,t)=>{kl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rd(e,r,i,n)});rf=h("ZodNull",(e,t)=>{Sl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nd(e,r,i,n)});af=h("ZodAny",(e,t)=>{Il.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ad(e,r,i,n)});sf=h("ZodUnknown",(e,t)=>{Ol.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sd(e,r,i,n)});cf=h("ZodNever",(e,t)=>{Al.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>od(e,r,i,n)});lf=h("ZodVoid",(e,t)=>{El.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>id(e,r,i,n)});lr=h("ZodDate",(e,t)=>{Tl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(i,n,o)=>cd(e,i,n,o),e.min=(i,n)=>e.check(de(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});uf=h("ZodArray",(e,t)=>{Pl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_d(e,r,i,n),e.element=t.element,sr(e,"ZodArray",{min(r,i){return this.check(Me(r,i))},nonempty(r){return this.check(Me(1,r))},max(r,i){return this.check(_t(r,i))},length(r,i){return this.check($t(r,i))},unwrap(){return this.element}})});dr=h("ZodObject",(e,t)=>{zl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$d(e,r,i,n),S.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:xt()})},loose(){return this.clone({...this._zod.def,catchall:xt()})},strict(){return this.clone({...this._zod.def,catchall:Mo()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return S.extend(this,r)},safeExtend(r){return S.safeExtend(this,r)},merge(r){return S.merge(this,r)},pick(r){return S.pick(this,r)},omit(r){return S.omit(this,r)},partial(...r){return S.partial(Vo,this,r[0])},required(...r){return S.required(Bo,this,r[0])}})});fr=h("ZodUnion",(e,t)=>{Bn.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lo(e,r,i,n),e.options=t.options});df=h("ZodXor",(e,t)=>{fr.init(e,t),Nl.init(e,t),e._zod.processJSONSchema=(r,i,n)=>lo(e,r,i,n),e.options=t.options});ff=h("ZodDiscriminatedUnion",(e,t)=>{fr.init(e,t),Cl.init(e,t)});pf=h("ZodIntersection",(e,t)=>{jl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xd(e,r,i,n)});hf=h("ZodTuple",(e,t)=>{Ei.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wd(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});an=h("ZodRecord",(e,t)=>{Dl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>kd(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});yf=h("ZodMap",(e,t)=>{Ul.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yd(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(ze(...r)),e.nonempty=r=>e.check(ze(1,r)),e.max=(...r)=>e.check(Xe(...r)),e.size=(...r)=>e.check(bt(...r))});bf=h("ZodSet",(e,t)=>{Ll.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bd(e,r,i,n),e.min=(...r)=>e.check(ze(...r)),e.nonempty=r=>e.check(ze(1,r)),e.max=(...r)=>e.check(Xe(...r)),e.size=(...r)=>e.check(bt(...r))});sn=h("ZodEnum",(e,t)=>{Rl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(i,n,o)=>ld(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:[],...S.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:[],...S.normalizeParams(n),entries:o})}});_f=h("ZodLiteral",(e,t)=>{Ml.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ud(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]}})});$f=h("ZodFile",(e,t)=>{Fl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>pd(e,r,i,n),e.min=(r,i)=>e.check(ze(r,i)),e.max=(r,i)=>e.check(Xe(r,i)),e.mime=(r,i)=>e.check(Ht(Array.isArray(r)?r:[r],i))});xf=h("ZodTransform",(e,t)=>{Zl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vd(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(S.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(S.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),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});wf=h("ZodExactOptional",(e,t)=>{ql.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>uo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Sf=h("ZodNullable",(e,t)=>{Vl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});If=h("ZodDefault",(e,t)=>{Bl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Od(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Af=h("ZodPrefault",(e,t)=>{Jl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ad(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Bo=h("ZodNonOptional",(e,t)=>{Kl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Id(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Pf=h("ZodSuccess",(e,t)=>{Gl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>md(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});zf=h("ZodCatch",(e,t)=>{Wl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ed(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Cf=h("ZodNaN",(e,t)=>{Hl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dd(e,r,i,n)});pr=h("ZodPipe",(e,t)=>{Pi.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Td(e,r,i,n),e.in=t.in,e.out=t.out});mr=h("ZodCodec",(e,t)=>{pr.init(e,t),Jn.init(e,t)});jf=h("ZodPreprocess",(e,t)=>{pr.init(e,t),Yl.init(e,t)}),Df=h("ZodReadonly",(e,t)=>{Xl.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Lf=h("ZodTemplateLiteral",(e,t)=>{Ql.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fd(e,r,i,n)});Rf=h("ZodLazy",(e,t)=>{nu.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nd(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});Ff=h("ZodPromise",(e,t)=>{tu.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});Zf=h("ZodFunction",(e,t)=>{eu.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>gd(e,r,i,n)});hr=h("ZodCustom",(e,t)=>{ru.init(e,t),L.init(e,t),e._zod.processJSONSchema=(r,i,n)=>hd(e,r,i,n)});S_=Ku,I_=Gu;A_=(...e)=>Wu({Codec:mr,Boolean:dn,String:cn},...e)});function zA(e){G({customError:e})}function NA(){return G().customError}var PA,Bf,P_=I(()=>{$e();PA={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"};Bf||(Bf={})});function jA(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 DA(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 z_(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return P.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 P.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=DA(n,t),a=ae(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 P.null();if(n.length===0)return P.never();if(n.length===1)return P.literal(n[0]);if(n.every(a=>typeof a=="string"))return P.enum(n);let o=n.map(a=>P.literal(a));return o.length<2?o[0]:P.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return P.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(o=>{let a={...e,type:o};return z_(a,t)});return n.length===0?P.never():n.length===1?n[0]:P.union(n)}if(!r)return P.any();let i;switch(r){case"string":{let n=P.string();if(e.format){let o=e.format;o==="email"?n=n.check(P.email()):o==="uri"||o==="uri-reference"?n=n.check(P.url()):o==="uuid"||o==="guid"?n=n.check(P.uuid()):o==="date-time"?n=n.check(P.iso.datetime()):o==="date"?n=n.check(P.iso.date()):o==="time"?n=n.check(P.iso.time()):o==="duration"?n=n.check(P.iso.duration()):o==="ipv4"?n=n.check(P.ipv4()):o==="ipv6"?n=n.check(P.ipv6()):o==="mac"?n=n.check(P.mac()):o==="cidr"?n=n.check(P.cidrv4()):o==="cidr-v6"?n=n.check(P.cidrv6()):o==="base64"?n=n.check(P.base64()):o==="base64url"?n=n.check(P.base64url()):o==="e164"?n=n.check(P.e164()):o==="jwt"?n=n.check(P.jwt()):o==="emoji"?n=n.check(P.emoji()):o==="nanoid"?n=n.check(P.nanoid()):o==="cuid"?n=n.check(P.cuid()):o==="cuid2"?n=n.check(P.cuid2()):o==="ulid"?n=n.check(P.ulid()):o==="xid"?n=n.check(P.xid()):o==="ksuid"&&(n=n.check(P.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"?P.number().int():P.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=P.boolean();break}case"null":{i=P.null();break}case"object":{let n={},o=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(o)){let u=ae(l,t);n[c]=a.has(c)?u:u.optional()}if(e.propertyNames){let c=ae(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?ae(e.additionalProperties,t):P.any();if(Object.keys(n).length===0){i=P.record(c,l);break}let u=P.object(n).passthrough(),d=P.looseRecord(c,l);i=P.intersection(u,d);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),u=[];for(let f of l){let p=ae(c[f],t),g=P.string().regex(new RegExp(f));u.push(P.looseRecord(g,p))}let d=[];if(Object.keys(n).length>0&&d.push(P.object(n).passthrough()),d.push(...u),d.length===0)i=P.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=P.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)f=P.intersection(f,d[p]);i=f}break}let s=P.object(n);e.additionalProperties===!1?i=s.strict():typeof e.additionalProperties=="object"?i=s.catchall(ae(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=>ae(c,t)),s=o&&typeof o=="object"&&!Array.isArray(o)?ae(o,t):void 0;s?i=P.tuple(a).rest(s):i=P.tuple(a),typeof e.minItems=="number"&&(i=i.check(P.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(P.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(c=>ae(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?ae(e.additionalItems,t):void 0;s?i=P.tuple(a).rest(s):i=P.tuple(a),typeof e.minItems=="number"&&(i=i.check(P.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(P.maxLength(e.maxItems)))}else if(o!==void 0){let a=ae(o,t),s=P.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=P.array(P.any());break}default:throw new Error(`Unsupported type: ${r}`)}return i}function ae(e,t){if(typeof e=="boolean")return e?P.any():P.never();let r=z_(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=>ae(l,t)),c=P.union(s);r=i?P.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>ae(l,t)),c=P.xor(s);r=i?P.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:P.any();else{let s=i?r:ae(e.allOf[0],t),c=i?0:1;for(let l=c;l<e.allOf.length;l++)s=P.intersection(s,ae(e.allOf[l],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=P.nullable(r)),e.readOnly===!0&&(r=P.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))CA.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 N_(e,t){if(typeof e=="boolean")return e?P.any():P.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=jA(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??ne};return ae(r,o)}var P,CA,C_=I(()=>{Wn();ho();er();nr();P={...tr,...mo,iso:on},CA=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 Jf={};ie(Jf,{bigint:()=>MA,boolean:()=>RA,date:()=>FA,number:()=>LA,string:()=>UA});function UA(e){return fu(cn,e)}function LA(e){return _u(un,e)}function RA(e){return Ou(dn,e)}function MA(e){return Eu(fn,e)}function FA(e){return Mu(lr,e)}var j_=I(()=>{$e();nr()});var _={};ie(_,{$brand:()=>Cs,$input:()=>uu,$output:()=>lu,NEVER:()=>Ns,TimePrecision:()=>mu,ZodAny:()=>af,ZodArray:()=>uf,ZodBase64:()=>jo,ZodBase64URL:()=>Do,ZodBigInt:()=>fn,ZodBigIntFormat:()=>Ro,ZodBoolean:()=>dn,ZodCIDRv4:()=>No,ZodCIDRv6:()=>Co,ZodCUID:()=>Io,ZodCUID2:()=>Oo,ZodCatch:()=>zf,ZodCodec:()=>mr,ZodCustom:()=>hr,ZodCustomStringFormat:()=>ln,ZodDate:()=>lr,ZodDefault:()=>If,ZodDiscriminatedUnion:()=>ff,ZodE164:()=>Uo,ZodEmail:()=>wo,ZodEmoji:()=>ko,ZodEnum:()=>sn,ZodError:()=>EA,ZodExactOptional:()=>wf,ZodFile:()=>$f,ZodFirstPartyTypeKind:()=>Bf,ZodFunction:()=>Zf,ZodGUID:()=>ir,ZodIPv4:()=>Po,ZodIPv6:()=>zo,ZodISODate:()=>vo,ZodISODateTime:()=>go,ZodISODuration:()=>bo,ZodISOTime:()=>yo,ZodIntersection:()=>pf,ZodIssueCode:()=>PA,ZodJWT:()=>Lo,ZodKSUID:()=>To,ZodLazy:()=>Rf,ZodLiteral:()=>_f,ZodMAC:()=>Xd,ZodMap:()=>yf,ZodNaN:()=>Cf,ZodNanoID:()=>So,ZodNever:()=>cf,ZodNonOptional:()=>Bo,ZodNull:()=>rf,ZodNullable:()=>Sf,ZodNumber:()=>un,ZodNumberFormat:()=>wt,ZodObject:()=>dr,ZodOptional:()=>Vo,ZodPipe:()=>pr,ZodPrefault:()=>Af,ZodPreprocess:()=>jf,ZodPromise:()=>Ff,ZodReadonly:()=>Df,ZodRealError:()=>ge,ZodRecord:()=>an,ZodSet:()=>bf,ZodString:()=>cn,ZodStringFormat:()=>J,ZodSuccess:()=>Pf,ZodSymbol:()=>tf,ZodTemplateLiteral:()=>Lf,ZodTransform:()=>xf,ZodTuple:()=>hf,ZodType:()=>L,ZodULID:()=>Ao,ZodURL:()=>cr,ZodUUID:()=>Ne,ZodUndefined:()=>nf,ZodUnion:()=>fr,ZodUnknown:()=>sf,ZodVoid:()=>lf,ZodXID:()=>Eo,ZodXor:()=>df,_ZodString:()=>xo,_default:()=>Of,_function:()=>x_,any:()=>Qb,array:()=>ur,base64:()=>Db,base64url:()=>Ub,bigint:()=>Gb,boolean:()=>ef,catch:()=>Nf,check:()=>w_,cidrv4:()=>Cb,cidrv6:()=>jb,clone:()=>le,codec:()=>y_,coerce:()=>Jf,config:()=>G,core:()=>Fe,cuid:()=>Ib,cuid2:()=>Ob,custom:()=>k_,date:()=>t_,decode:()=>Vd,decodeAsync:()=>Jd,describe:()=>S_,discriminatedUnion:()=>s_,e164:()=>Lb,email:()=>gb,emoji:()=>kb,encode:()=>qd,encodeAsync:()=>Bd,endsWith:()=>Wt,enum:()=>Zo,exactOptional:()=>kf,file:()=>m_,flattenError:()=>Rn,float32:()=>Vb,float64:()=>Bb,formatError:()=>Mn,fromJSONSchema:()=>N_,function:()=>x_,getErrorMap:()=>NA,globalRegistry:()=>ne,gt:()=>Pe,gte:()=>de,guid:()=>vb,hash:()=>qb,hex:()=>Zb,hostname:()=>Fb,httpUrl:()=>wb,includes:()=>Kt,instanceof:()=>O_,int:()=>_o,int32:()=>Jb,int64:()=>Wb,intersection:()=>mf,invertCodec:()=>b_,ipv4:()=>Pb,ipv6:()=>Nb,iso:()=>on,json:()=>E_,jwt:()=>Rb,keyof:()=>n_,ksuid:()=>Tb,lazy:()=>Mf,length:()=>$t,literal:()=>p_,locales:()=>Gn,looseObject:()=>o_,looseRecord:()=>l_,lowercase:()=>Bt,lt:()=>Te,lte:()=>_e,mac:()=>zb,map:()=>u_,maxLength:()=>_t,maxSize:()=>Xe,meta:()=>I_,mime:()=>Ht,minLength:()=>Me,minSize:()=>ze,multipleOf:()=>Ye,nan:()=>v_,nanoid:()=>Sb,nativeEnum:()=>f_,negative:()=>io,never:()=>Mo,nonnegative:()=>ao,nonoptional:()=>Tf,nonpositive:()=>oo,normalize:()=>Yt,null:()=>of,nullable:()=>ar,nullish:()=>h_,number:()=>Qd,object:()=>r_,optional:()=>or,overwrite:()=>Ie,parse:()=>Rd,parseAsync:()=>Md,partialRecord:()=>c_,pipe:()=>$o,positive:()=>ro,prefault:()=>Ef,preprocess:()=>T_,prettifyError:()=>Ks,promise:()=>$_,property:()=>so,readonly:()=>Uf,record:()=>vf,refine:()=>qf,regex:()=>Vt,regexes:()=>be,registry:()=>Di,safeDecode:()=>Gd,safeDecodeAsync:()=>Hd,safeEncode:()=>Kd,safeEncodeAsync:()=>Wd,safeParse:()=>Fd,safeParseAsync:()=>Zd,set:()=>d_,setErrorMap:()=>zA,size:()=>bt,slugify:()=>tn,startsWith:()=>Gt,strictObject:()=>i_,string:()=>rr,stringFormat:()=>Mb,stringbool:()=>A_,success:()=>g_,superRefine:()=>Vf,symbol:()=>Yb,templateLiteral:()=>__,toJSONSchema:()=>fo,toLowerCase:()=>Qt,toUpperCase:()=>en,transform:()=>qo,treeifyError:()=>Js,trim:()=>Xt,tuple:()=>gf,uint32:()=>Kb,uint64:()=>Hb,ulid:()=>Ab,undefined:()=>Xb,union:()=>Fo,unknown:()=>xt,uppercase:()=>Jt,url:()=>xb,util:()=>S,uuid:()=>yb,uuidv4:()=>bb,uuidv6:()=>_b,uuidv7:()=>$b,void:()=>e_,xid:()=>Eb,xor:()=>a_});var Kf=I(()=>{$e();nr();ho();Ld();Yd();P_();$e();ou();$e();Qn();C_();cu();er();er();j_();G(zi())});var Gf=I(()=>{Kf();Kf()});var D_,U_,L_,R_,M_,F_,Z_=I(()=>{"use strict";Gf();D_=_.object({userRequest:_.string()}),U_=_.object({userRequest:_.string()}),L_=_.object({summary:_.string(),riskLevel:_.enum(["low","medium","high","critical"]),findings:_.array(_.object({id:_.string().optional(),severity:_.enum(["info","warning","error","critical"]),category:_.string(),target:_.string().optional(),location:_.string().optional(),message:_.string(),recommendation:_.string().optional(),confidence:_.number().optional(),evidence:_.array(_.object({type:_.string(),content:_.string(),source:_.string().optional()})).optional(),details:_.record(_.string(),_.unknown()).optional()})),recommendedActions:_.array(_.object({kind:_.enum(["run_command","edit_file","review","confirm","block","ignore"]),title:_.string(),command:_.string().optional(),target:_.string().optional(),rationale:_.string().optional()})).optional(),metadata:_.object({tool:_.string().optional(),command:_.string().optional(),version:_.string().optional(),generatedAt:_.string().optional(),adapter:_.string().optional(),model:_.string().optional()}).optional()}),R_=_.object({summary:_.string(),riskLevel:_.enum(["low","medium","high","critical"]),findings:_.array(_.object({id:_.string().optional(),severity:_.enum(["info","warning","error","critical"]),category:_.string(),target:_.string().optional(),location:_.string().optional(),message:_.string(),recommendation:_.string().optional(),confidence:_.number().optional(),evidence:_.array(_.object({type:_.string(),content:_.string(),source:_.string().optional()})).optional(),details:_.record(_.string(),_.unknown()).optional()})),recommendedActions:_.array(_.object({kind:_.enum(["run_command","edit_file","review","confirm","block","ignore"]),title:_.string(),command:_.string().optional(),target:_.string().optional(),rationale:_.string().optional()})).optional(),changedFiles:_.array(_.object({path:_.string(),action:_.enum(["created","updated"]),rationale:_.string().optional()})),dependencies:_.array(_.string()).optional(),notes:_.string().optional(),metadata:_.object({tool:_.string().optional(),command:_.string().optional(),version:_.string().optional(),generatedAt:_.string().optional(),adapter:_.string().optional(),model:_.string().optional()}).optional()}),M_={"litedbmodel-audit-request":D_,"litedbmodel-implement-request":U_,"litedbmodel-audit-result":L_,"litedbmodel-implement-result":R_},F_={litedbmodelAuditRequest(e){return{type:"litedbmodel-audit-request",version:1,payload:D_.parse(e)}},litedbmodelImplementRequest(e){return{type:"litedbmodel-implement-request",version:1,payload:U_.parse(e)}},litedbmodelAuditResult(e){return{type:"litedbmodel-audit-result",version:1,payload:L_.parse(e)}},litedbmodelImplementResult(e){return{type:"litedbmodel-implement-result",version:1,payload:R_.parse(e)}}}});var q_,V_=I(()=>{"use strict";q_={}});var B_={};ie(B_,{agentRegistry:()=>Ng,handoffSchemas:()=>M_,handoffs:()=>F_,taskRegistry:()=>jg,workflowRegistry:()=>q_});var J_=I(()=>{"use strict";Cg();Dg();Z_();V_()});var F=T(re=>{"use strict";var Wf=Symbol.for("yaml.alias"),K_=Symbol.for("yaml.document"),Jo=Symbol.for("yaml.map"),G_=Symbol.for("yaml.pair"),Hf=Symbol.for("yaml.scalar"),Ko=Symbol.for("yaml.seq"),Ze=Symbol.for("yaml.node.type"),ZA=e=>!!e&&typeof e=="object"&&e[Ze]===Wf,qA=e=>!!e&&typeof e=="object"&&e[Ze]===K_,VA=e=>!!e&&typeof e=="object"&&e[Ze]===Jo,BA=e=>!!e&&typeof e=="object"&&e[Ze]===G_,W_=e=>!!e&&typeof e=="object"&&e[Ze]===Hf,JA=e=>!!e&&typeof e=="object"&&e[Ze]===Ko;function H_(e){if(e&&typeof e=="object")switch(e[Ze]){case Jo:case Ko:return!0}return!1}function KA(e){if(e&&typeof e=="object")switch(e[Ze]){case Wf:case Jo:case Hf:case Ko:return!0}return!1}var GA=e=>(W_(e)||H_(e))&&!!e.anchor;re.ALIAS=Wf;re.DOC=K_;re.MAP=Jo;re.NODE_TYPE=Ze;re.PAIR=G_;re.SCALAR=Hf;re.SEQ=Ko;re.hasAnchor=GA;re.isAlias=ZA;re.isCollection=H_;re.isDocument=qA;re.isMap=VA;re.isNode=KA;re.isPair=BA;re.isScalar=W_;re.isSeq=JA});var gr=T(Yf=>{"use strict";var ee=F(),ve=Symbol("break visit"),Y_=Symbol("skip children"),Ce=Symbol("remove node");function Go(e,t){let r=X_(t);ee.isDocument(e)?pn(null,e.contents,r,Object.freeze([e]))===Ce&&(e.contents=null):pn(null,e,r,Object.freeze([]))}Go.BREAK=ve;Go.SKIP=Y_;Go.REMOVE=Ce;function pn(e,t,r,i){let n=Q_(e,t,r,i);if(ee.isNode(n)||ee.isPair(n))return e$(e,i,n),pn(e,n,r,i);if(typeof n!="symbol"){if(ee.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===ve)return ve;a===Ce&&(t.items.splice(o,1),o-=1)}}}else if(ee.isPair(t)){i=Object.freeze(i.concat(t));let o=pn("key",t.key,r,i);if(o===ve)return ve;o===Ce&&(t.key=null);let a=pn("value",t.value,r,i);if(a===ve)return ve;a===Ce&&(t.value=null)}}return n}async function Wo(e,t){let r=X_(t);ee.isDocument(e)?await mn(null,e.contents,r,Object.freeze([e]))===Ce&&(e.contents=null):await mn(null,e,r,Object.freeze([]))}Wo.BREAK=ve;Wo.SKIP=Y_;Wo.REMOVE=Ce;async function mn(e,t,r,i){let n=await Q_(e,t,r,i);if(ee.isNode(n)||ee.isPair(n))return e$(e,i,n),mn(e,n,r,i);if(typeof n!="symbol"){if(ee.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===ve)return ve;a===Ce&&(t.items.splice(o,1),o-=1)}}}else if(ee.isPair(t)){i=Object.freeze(i.concat(t));let o=await mn("key",t.key,r,i);if(o===ve)return ve;o===Ce&&(t.key=null);let a=await mn("value",t.value,r,i);if(a===ve)return ve;a===Ce&&(t.value=null)}}return n}function X_(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 Q_(e,t,r,i){if(typeof r=="function")return r(e,t,i);if(ee.isMap(t))return r.Map?.(e,t,i);if(ee.isSeq(t))return r.Seq?.(e,t,i);if(ee.isPair(t))return r.Pair?.(e,t,i);if(ee.isScalar(t))return r.Scalar?.(e,t,i);if(ee.isAlias(t))return r.Alias?.(e,t,i)}function e$(e,t,r){let i=t[t.length-1];if(ee.isCollection(i))i.items[e]=r;else if(ee.isPair(i))e==="key"?i.key=r:i.value=r;else if(ee.isDocument(i))i.contents=r;else{let n=ee.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}Yf.visit=Go;Yf.visitAsync=Wo});var Xf=T(n$=>{"use strict";var t$=F(),WA=gr(),HA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},YA=e=>e.replace(/[!,[\]{}]/g,t=>HA[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+YA(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&&t$.isNode(t.contents)){let o={};WA.visit(t.contents,(a,s)=>{t$.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(`
|
|
150
|
+
`)}};vr.defaultYaml={explicit:!1,version:"1.2"};vr.defaultTags={"!!":"tag:yaml.org,2002:"};n$.Directives=vr});var Ho=T(yr=>{"use strict";var r$=F(),XA=gr();function QA(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 i$(e){let t=new Set;return XA.visit(e,{Value(r,i){i.anchor&&t.add(i.anchor)}}),t}function o$(e,t){for(let r=1;;++r){let i=`${e}${r}`;if(!t.has(i))return i}}function eE(e,t){let r=[],i=new Map,n=null;return{onAnchor:o=>{r.push(o),n??(n=i$(e));let a=o$(t,n);return n.add(a),a},setAnchors:()=>{for(let o of r){let a=i.get(o);if(typeof a=="object"&&a.anchor&&(r$.isScalar(a.node)||r$.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=QA;yr.anchorNames=i$;yr.createNodeAnchors=eE;yr.findNewAnchor=o$});var Qf=T(a$=>{"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)}a$.applyReviver=br});var nt=T(c$=>{"use strict";var tE=F();function s$(e,t,r){if(Array.isArray(e))return e.map((i,n)=>s$(i,String(n),r));if(e&&typeof e.toJSON=="function"){if(!r||!tE.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}c$.toJS=s$});var Yo=T(u$=>{"use strict";var nE=Qf(),l$=F(),rE=nt(),ep=class{constructor(t){Object.defineProperty(this,l$.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(!l$.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=rE.toJS(this,"",a);if(typeof n=="function")for(let{count:c,res:l}of a.anchors.values())n(l,c);return typeof o=="function"?nE.applyReviver(o,{"":s},"",s):s}};u$.NodeBase=ep});var _r=T(d$=>{"use strict";var iE=Ho(),oE=gr(),hn=F(),aE=Yo(),sE=nt(),tp=class extends aE.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=[],oE.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||(sE.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(iE.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}d$.Alias=tp});var Y=T(np=>{"use strict";var cE=F(),lE=Yo(),uE=nt(),dE=e=>!e||typeof e!="function"&&typeof e!="object",rt=class extends lE.NodeBase{constructor(t){super(cE.SCALAR),this.value=t}toJSON(t,r){return r?.keep?this.value:uE.toJS(this.value,t,r)}toString(){return String(this.value)}};rt.BLOCK_FOLDED="BLOCK_FOLDED";rt.BLOCK_LITERAL="BLOCK_LITERAL";rt.PLAIN="PLAIN";rt.QUOTE_DOUBLE="QUOTE_DOUBLE";rt.QUOTE_SINGLE="QUOTE_SINGLE";np.Scalar=rt;np.isScalarValue=dE});var $r=T(p$=>{"use strict";var fE=_r(),kt=F(),f$=Y(),pE="tag:yaml.org,2002:";function mE(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 hE(e,t,r){if(kt.isDocument(e)&&(e=e.contents),kt.isNode(e))return e;if(kt.isPair(e)){let d=r.schema[kt.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 fE.Alias(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith("!!")&&(t=pE+t.slice(2));let l=mE(e,t,a.tags);if(!l){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let d=new f$.Scalar(e);return c&&(c.node=d),d}l=e instanceof Map?a[kt.MAP]:Symbol.iterator in Object(e)?a[kt.SEQ]:a[kt.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 f$.Scalar(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}p$.createNode=hE});var ea=T(Qo=>{"use strict";var gE=$r(),je=F(),vE=Yo();function rp(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 gE.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 m$=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,ip=class extends vE.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=>je.isNode(i)||je.isPair(i)?i.clone(t):i),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(m$(t))this.add(r);else{let[i,...n]=t,o=this.get(i,!0);if(je.isCollection(o))o.addIn(n,r);else if(o===void 0&&this.schema)this.set(i,rp(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(je.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&&je.isScalar(o)?o.value:o:je.isCollection(o)?o.getIn(n,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!je.isPair(r))return!1;let i=r.value;return i==null||t&&je.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 je.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(je.isCollection(o))o.setIn(n,r);else if(o===void 0&&this.schema)this.set(i,rp(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};Qo.Collection=ip;Qo.collectionFromPath=rp;Qo.isEmptyPath=m$});var xr=T(ta=>{"use strict";var yE=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function op(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var bE=(e,t,r)=>e.endsWith(`
|
|
151
|
+
`)?op(r,t):r.includes(`
|
|
152
|
+
`)?`
|
|
153
|
+
`+op(r,t):(e.endsWith(" ")?"":" ")+r;ta.indentComment=op;ta.lineComment=bE;ta.stringifyComment=yE});var g$=T(wr=>{"use strict";var _E="flow",ap="block",na="quoted";function $E(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,E=-1;r===ap&&(m=h$(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}E=m}if(N===`
|
|
154
|
+
`)r===ap&&(m=h$(e,m,t.length)),d=m+t.length+c,f=void 0;else{if(N===" "&&p&&p!==" "&&p!==`
|
|
155
|
+
`&&p!==" "){let w=e[m+1];w&&w!==" "&&w!==`
|
|
156
|
+
`&&w!==" "&&(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 w=m>E+1?m-2:v-1;if(u[w])return e;l.push(w),u[w]=!0,d=w+c,f=void 0}else g=!0}p=N}if(g&&s&&s(),l.length===0)return e;a&&a();let x=e.slice(0,l[0]);for(let N=0;N<l.length;++N){let w=l[N],b=l[N+1]||e.length;w===0?x=`
|
|
157
|
+
${t}${e.slice(0,b)}`:(r===na&&u[w]&&(x+=`${e[w]}\\`),x+=`
|
|
158
|
+
${t}${e.slice(w+1,b)}`)}return x}function h$(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!==`
|
|
159
|
+
`);i=t,n=t+1,o=e[n]}return i}wr.FOLD_BLOCK=ap;wr.FOLD_FLOW=_E;wr.FOLD_QUOTED=na;wr.foldFlowLines=$E});var Sr=T(v$=>{"use strict";var Oe=Y(),it=g$(),ia=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),oa=e=>/^(%|---|\.\.\.)/m.test(e);function xE(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]===`
|
|
160
|
+
`){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)+`
|
|
161
|
+
|
|
162
|
+
`;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)a+=`
|
|
163
|
+
`,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:it.foldFlowLines(a,o,it.FOLD_QUOTED,ia(t,!1))}function sp(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
164
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return kr(e,t);let r=t.indent||(oa(e)?" ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
165
|
+
${r}`)+"'";return t.implicitKey?i:it.foldFlowLines(i,r,it.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=sp:o&&!n?i=kr:i=r?sp:kr}return i(e,t)}var cp;try{cp=new RegExp(`(^|(?<!
|
|
166
|
+
))
|
|
167
|
+
+(?!
|
|
168
|
+
|$)`,"g")}catch{cp=/\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===Oe.Scalar.BLOCK_FOLDED?!1:t===Oe.Scalar.BLOCK_LITERAL?!0:!xE(r,c,l.length);if(!r)return u?`|
|
|
169
|
+
`:`>
|
|
170
|
+
`;let d,f;for(f=r.length;f>0;--f){let b=r[f-1];if(b!==`
|
|
171
|
+
`&&b!==" "&&b!==" ")break}let p=r.substring(f),g=p.indexOf(`
|
|
172
|
+
`);g===-1?d="-":r===p||g!==p.length-1?(d="+",o&&o()):d="",p&&(r=r.slice(0,-p.length),p[p.length-1]===`
|
|
173
|
+
`&&(p=p.slice(0,-1)),p=p.replace(cp,`$&${l}`));let m=!1,v,E=-1;for(v=0;v<r.length;++v){let b=r[v];if(b===" ")m=!0;else if(b===`
|
|
174
|
+
`)E=v;else break}let x=r.substring(0,E<v?E+1:v);x&&(r=r.substring(x.length),x=x.replace(/\n+/g,`$&${l}`));let w=(m?l?"2":"1":"")+d;if(e&&(w+=" "+s(e.replace(/ ?[\r\n]+/g," ")),n&&n()),!u){let b=r.replace(/\n+/g,`
|
|
175
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),z=!1,D=ia(i,!0);a!=="folded"&&t!==Oe.Scalar.BLOCK_FOLDED&&(D.onOverflow=()=>{z=!0});let A=it.foldFlowLines(`${x}${b}${p}`,l,it.FOLD_BLOCK,D);if(!z)return`>${w}
|
|
176
|
+
${l}${A}`}return r=r.replace(/\n+/g,`$&${l}`),`|${w}
|
|
177
|
+
${l}${x}${r}${p}`}function wE(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(`
|
|
178
|
+
`)||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(`
|
|
179
|
+
`)?gn(o,t):ra(e,t,r,i);if(!s&&!u&&n!==Oe.Scalar.PLAIN&&o.includes(`
|
|
180
|
+
`))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,`$&
|
|
181
|
+
${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:it.foldFlowLines(d,c,it.FOLD_FLOW,ia(t,!1))}function kE(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!==Oe.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(s=Oe.Scalar.QUOTE_DOUBLE);let c=u=>{switch(u){case Oe.Scalar.BLOCK_FOLDED:case Oe.Scalar.BLOCK_LITERAL:return n||o?gn(a.value,t):ra(a,t,r,i);case Oe.Scalar.QUOTE_DOUBLE:return kr(a.value,t);case Oe.Scalar.QUOTE_SINGLE:return sp(a.value,t);case Oe.Scalar.PLAIN:return wE(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}v$.stringifyString=kE});var Ir=T(lp=>{"use strict";var SE=Ho(),ot=F(),IE=xr(),OE=Sr();function AE(e,t){let r=Object.assign({blockQuote:!0,commentString:IE.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 EE(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(ot.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 TE(e,t,{anchors:r,doc:i}){if(!i.directives)return"";let n=[],o=(ot.isScalar(e)||ot.isCollection(e))&&e.anchor;o&&SE.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 PE(e,t,r,i){if(ot.isPair(e))return e.toString(t,r,i);if(ot.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=ot.isNode(e)?e:t.doc.createNode(e,{onTagObj:c=>n=c});n??(n=EE(t.doc.schema.tags,o));let a=TE(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):ot.isScalar(o)?OE.stringifyString(o,t,r,i):o.toString(t,r,i);return a?ot.isScalar(o)||s[0]==="{"||s[0]==="["?`${a} ${s}`:`${a}
|
|
182
|
+
${t.indent}${s}`:s}lp.createStringifyContext=AE;lp.stringify=PE});var $$=T(_$=>{"use strict";var qe=F(),y$=Y(),b$=Ir(),Or=xr();function zE({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=qe.isNode(e)&&e.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(qe.isCollection(e)||!qe.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||qe.isCollection(e)||(qe.isScalar(e)?e.type===y$.Scalar.BLOCK_FOLDED||e.type===y$.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=b$.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}
|
|
183
|
+
${s}:`):(v=`${v}:`,f&&(v+=Or.lineComment(v,r.indent,l(f))));let E,x,N;qe.isNode(t)?(E=!!t.spaceBefore,x=t.commentBefore,N=t.comment):(E=!1,x=null,N=null,t&&typeof t=="object"&&(t=a.createNode(t))),r.implicitKey=!1,!p&&!f&&qe.isScalar(t)&&(r.indentAtStart=v.length+1),m=!1,!u&&c.length>=2&&!r.inFlow&&!p&&qe.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let w=!1,b=b$.stringify(t,r,()=>w=!0,()=>m=!0),z=" ";if(f||E||x){if(z=E?`
|
|
184
|
+
`:"",x){let D=l(x);z+=`
|
|
185
|
+
${Or.indentComment(D,r.indent)}`}b===""&&!r.inFlow?z===`
|
|
186
|
+
`&&N&&(z=`
|
|
187
|
+
|
|
188
|
+
`):z+=`
|
|
189
|
+
${r.indent}`}else if(!p&&qe.isCollection(t)){let D=b[0],A=b.indexOf(`
|
|
190
|
+
`),M=A!==-1,W=r.inFlow??t.flow??t.items.length===0;if(M||!W){let Tt=!1;if(M&&(D==="&"||D==="!")){let X=b.indexOf(" ");D==="&"&&X!==-1&&X<A&&b[X+1]==="!"&&(X=b.indexOf(" ",X+1)),(X===-1||A<X)&&(Tt=!0)}Tt||(z=`
|
|
191
|
+
${r.indent}`)}}else(b===""||b[0]===`
|
|
192
|
+
`)&&(z="");return v+=z+b,r.inFlow?w&&i&&i():N&&!w?v+=Or.lineComment(v,r.indent,l(N)):m&&n&&n(),v}_$.stringifyPair=zE});var dp=T(up=>{"use strict";var x$=De("process");function NE(e,...t){e==="debug"&&console.log(...t)}function CE(e,t){(e==="debug"||e==="warn")&&(typeof x$.emitWarning=="function"?x$.emitWarning(t):console.warn(t))}up.debug=NE;up.warn=CE});var ua=T(la=>{"use strict";var ca=F(),w$=Y(),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 w$.Scalar(Symbol(aa)),{addToJSMap:k$}),stringify:()=>aa},jE=(e,t)=>(sa.identify(t)||ca.isScalar(t)&&(!t.type||t.type===w$.Scalar.PLAIN)&&sa.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===sa.tag&&r.default);function k$(e,t,r){let i=S$(e,r);if(ca.isSeq(i))for(let n of i.items)fp(e,t,n);else if(Array.isArray(i))for(let n of i)fp(e,t,n);else fp(e,t,i)}function fp(e,t,r){let i=S$(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 S$(e,t){return e&&ca.isAlias(t)?t.resolve(e.doc,e):t}la.addMergeToJSMap=k$;la.isMergeKey=jE;la.merge=sa});var mp=T(A$=>{"use strict";var DE=dp(),I$=ua(),UE=Ir(),O$=F(),pp=nt();function LE(e,t,{key:r,value:i}){if(O$.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,i);else if(I$.isMergeKey(e,r))I$.addMergeToJSMap(e,t,i);else{let n=pp.toJS(r,"",e);if(t instanceof Map)t.set(n,pp.toJS(i,n,e));else if(t instanceof Set)t.add(n);else{let o=RE(r,n,e),a=pp.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 RE(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(O$.isNode(e)&&r?.doc){let i=UE.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)+'..."'),DE.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)}A$.addPairToJSMap=LE});var at=T(hp=>{"use strict";var E$=$r(),ME=$$(),FE=mp(),da=F();function ZE(e,t,r){let i=E$.createNode(e,void 0,r),n=E$.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 FE.addPairToJSMap(r,i,this)}toString(t,r,i){return t?.doc?ME.stringifyPair(this,t,r,i):JSON.stringify(this)}};hp.Pair=fa;hp.createPair=ZE});var gp=T(P$=>{"use strict";var St=F(),T$=Ir(),pa=xr();function qE(e,t,r){return(t.inFlow??e.flow?BE:VE)(e,t,r)}function VE({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(St.isNode(m))!d&&m.spaceBefore&&f.push(""),ma(r,f,m.commentBefore,d),m.comment&&(v=m.comment);else if(St.isPair(m)){let x=St.isNode(m.key)?m.key:null;x&&(!d&&x.spaceBefore&&f.push(""),ma(r,f,x.commentBefore,d))}d=!1;let E=T$.stringify(m,u,()=>v=null,()=>d=!0);v&&(E+=pa.lineComment(E,o,l(v))),d&&v&&(d=!1),f.push(i+E)}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?`
|
|
193
|
+
${c}${m}`:`
|
|
194
|
+
`}}return e?(p+=`
|
|
195
|
+
`+pa.indentComment(l(e),c),s&&s()):d&&a&&a(),p}function BE({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(St.isNode(m))m.spaceBefore&&d.push(""),ma(t,d,m.commentBefore,!1),m.comment&&(v=m.comment);else if(St.isPair(m)){let x=St.isNode(m.key)?m.key:null;x&&(x.spaceBefore&&d.push(""),ma(t,d,x.commentBefore,!1),x.comment&&(l=!0));let N=St.isNode(m.value)?m.value:null;N?(N.comment&&(v=N.comment),N.commentBefore&&(l=!0)):m.value==null&&x?.comment&&(v=x.comment)}v&&(l=!0);let E=T$.stringify(m,c,()=>v=null);l||(l=d.length>u||E.includes(`
|
|
196
|
+
`)),g<e.length-1?E+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(l||(l=d.reduce((x,N)=>x+N.length+2,2)+(E.length+2)>t.options.lineWidth)),l&&(E+=",")),v&&(E+=pa.lineComment(E,i,s(v))),d.push(E),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?`
|
|
197
|
+
${o}${n}${m}`:`
|
|
198
|
+
`;return`${g}
|
|
199
|
+
${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())}}P$.stringifyCollection=qE});var ct=T(yp=>{"use strict";var JE=gp(),KE=mp(),GE=ea(),st=F(),ha=at(),WE=Y();function Ar(e,t){let r=st.isScalar(t)?t.value:t;for(let i of e)if(st.isPair(i)&&(i.key===t||i.key===r||st.isScalar(i.key)&&i.key.value===r))return i}var vp=class extends GE.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(st.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;st.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`);st.isScalar(n.value)&&WE.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&&st.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)KE.addPairToJSMap(r,n,o);return n}toString(t,r,i){if(!t)return JSON.stringify(this);for(let n of this.items)if(!st.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})),JE.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:r})}};yp.YAMLMap=vp;yp.findPair=Ar});var vn=T(N$=>{"use strict";var HE=F(),z$=ct(),YE={collection:"map",default:!0,nodeClass:z$.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){return HE.isMap(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>z$.YAMLMap.from(e,t,r)};N$.map=YE});var lt=T(C$=>{"use strict";var XE=$r(),QE=gp(),eT=ea(),va=F(),tT=Y(),nT=nt(),bp=class extends eT.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)&&tT.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(nT.toJS(o,String(n++),r));return i}toString(t,r,i){return t?QE.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(XE.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}C$.YAMLSeq=bp});var yn=T(D$=>{"use strict";var rT=F(),j$=lt(),iT={collection:"seq",default:!0,nodeClass:j$.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){return rT.isSeq(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>j$.YAMLSeq.from(e,t,r)};D$.seq=iT});var Er=T(U$=>{"use strict";var oT=Sr(),aT={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),oT.stringifyString(e,t,r,i)}};U$.string=aT});var ya=T(M$=>{"use strict";var L$=Y(),R$={identify:e=>e==null,createNode:()=>new L$.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new L$.Scalar(null),stringify:({source:e},t)=>typeof e=="string"&&R$.test.test(e)?e:t.options.nullStr};M$.nullTag=R$});var _p=T(Z$=>{"use strict";var sT=Y(),F$={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new sT.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&F$.test.test(e)){let i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?r.options.trueStr:r.options.falseStr}};Z$.boolTag=F$});var bn=T(q$=>{"use strict";function cT({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}q$.stringifyNumber=cT});var xp=T(ba=>{"use strict";var lT=Y(),$p=bn(),uT={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:$p.stringifyNumber},dT={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():$p.stringifyNumber(e)}},fT={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 lT.Scalar(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:$p.stringifyNumber};ba.float=fT;ba.floatExp=dT;ba.floatNaN=uT});var kp=T($a=>{"use strict";var V$=bn(),_a=e=>typeof e=="bigint"||Number.isInteger(e),wp=(e,t,r,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),r);function B$(e,t,r){let{value:i}=e;return _a(i)&&i>=0?r+i.toString(t):V$.stringifyNumber(e)}var pT={identify:e=>_a(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>wp(e,2,8,r),stringify:e=>B$(e,8,"0o")},mT={identify:_a,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>wp(e,0,10,r),stringify:V$.stringifyNumber},hT={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)=>wp(e,2,16,r),stringify:e=>B$(e,16,"0x")};$a.int=mT;$a.intHex=hT;$a.intOct=pT});var K$=T(J$=>{"use strict";var gT=vn(),vT=ya(),yT=yn(),bT=Er(),_T=_p(),Sp=xp(),Ip=kp(),$T=[gT.map,yT.seq,bT.string,vT.nullTag,_T.boolTag,Ip.intOct,Ip.int,Ip.intHex,Sp.floatNaN,Sp.floatExp,Sp.float];J$.schema=$T});var H$=T(W$=>{"use strict";var xT=Y(),wT=vn(),kT=yn();function G$(e){return typeof e=="bigint"||Number.isInteger(e)}var xa=({value:e})=>JSON.stringify(e),ST=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:xa},{identify:e=>e==null,createNode:()=>new xT.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:G$,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})=>G$(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}],IT={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},OT=[wT.map,kT.seq].concat(ST,IT);W$.schema=OT});var Ap=T(Y$=>{"use strict";var Tr=De("buffer"),Op=Y(),AT=Sr(),ET={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=Op.Scalar.BLOCK_LITERAL),t!==Op.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===Op.Scalar.BLOCK_LITERAL?`
|
|
200
|
+
`:" ")}return AT.stringifyString({comment:e,type:t,value:s},i,n,o)}};Y$.binary=ET});var Sa=T(ka=>{"use strict";var wa=F(),Ep=at(),TT=Y(),PT=lt();function X$(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 Ep.Pair(new TT.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
|
|
201
|
+
${n.key.commentBefore}`:i.commentBefore),i.comment){let o=n.value??n.key;o.comment=o.comment?`${i.comment}
|
|
202
|
+
${o.comment}`:i.comment}i=n}e.items[r]=wa.isPair(i)?i:new Ep.Pair(i)}}else t("Expected a sequence for this tag");return e}function Q$(e,t,r){let{replacer:i}=r,n=new PT.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(Ep.createPair(s,c,r))}return n}var zT={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:X$,createNode:Q$};ka.createPairs=Q$;ka.pairs=zT;ka.resolvePairs=X$});var zp=T(Pp=>{"use strict";var ex=F(),Tp=nt(),Pr=ct(),NT=lt(),tx=Sa(),It=class e extends NT.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(ex.isPair(n)?(o=Tp.toJS(n.key,"",r),a=Tp.toJS(n.value,o,r)):o=Tp.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=tx.createPairs(t,r,i),o=new this;return o.items=n.items,o}};It.tag="tag:yaml.org,2002:omap";var CT={collection:"seq",identify:e=>e instanceof Map,nodeClass:It,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=tx.resolvePairs(e,t),i=[];for(let{key:n}of r.items)ex.isScalar(n)&&(i.includes(n.value)?t(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new It,r)},createNode:(e,t,r)=>It.from(e,t,r)};Pp.YAMLOMap=It;Pp.omap=CT});var ax=T(Np=>{"use strict";var nx=Y();function rx({value:e,source:t},r){return t&&(e?ix:ox).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}var ix={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 nx.Scalar(!0),stringify:rx},ox={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 nx.Scalar(!1),stringify:rx};Np.falseTag=ox;Np.trueTag=ix});var sx=T(Ia=>{"use strict";var jT=Y(),Cp=bn(),DT={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:Cp.stringifyNumber},UT={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():Cp.stringifyNumber(e)}},LT={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 jT.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:Cp.stringifyNumber};Ia.float=LT;Ia.floatExp=UT;Ia.floatNaN=DT});var lx=T(Nr=>{"use strict";var cx=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 jp(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 cx.stringifyNumber(e)}var RT={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=>jp(e,2,"0b")},MT={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=>jp(e,8,"0")},FT={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:cx.stringifyNumber},ZT={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=>jp(e,16,"0x")};Nr.int=FT;Nr.intBin=RT;Nr.intHex=ZT;Nr.intOct=MT});var Up=T(Dp=>{"use strict";var Ta=F(),Aa=at(),Ea=ct(),Ot=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}};Ot.tag="tag:yaml.org,2002:set";var qT={collection:"map",identify:e=>e instanceof Set,nodeClass:Ot,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>Ot.from(e,t,r),resolve(e,t){if(Ta.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new Ot,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};Dp.YAMLSet=Ot;Dp.set=qT});var Rp=T(Pa=>{"use strict";var VT=bn();function Lp(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 ux(e){let{value:t}=e,r=a=>a;if(typeof t=="bigint")r=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return VT.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 BT={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})=>Lp(e,r),stringify:ux},JT={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=>Lp(e,!1),stringify:ux},dx={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(dx.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=Lp(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=JT;Pa.intTime=BT;Pa.timestamp=dx});var mx=T(px=>{"use strict";var KT=vn(),GT=ya(),WT=yn(),HT=Er(),YT=Ap(),fx=ax(),Mp=sx(),za=lx(),XT=ua(),QT=zp(),eP=Sa(),tP=Up(),Fp=Rp(),nP=[KT.map,WT.seq,HT.string,GT.nullTag,fx.trueTag,fx.falseTag,za.intBin,za.intOct,za.int,za.intHex,Mp.floatNaN,Mp.floatExp,Mp.float,YT.binary,XT.merge,QT.omap,eP.pairs,tP.set,Fp.intTime,Fp.floatTime,Fp.timestamp];px.schema=nP});var kx=T(Vp=>{"use strict";var yx=vn(),rP=ya(),bx=yn(),iP=Er(),oP=_p(),Zp=xp(),qp=kp(),aP=K$(),sP=H$(),_x=Ap(),Cr=ua(),$x=zp(),xx=Sa(),hx=mx(),wx=Up(),Na=Rp(),gx=new Map([["core",aP.schema],["failsafe",[yx.map,bx.seq,iP.string]],["json",sP.schema],["yaml11",hx.schema],["yaml-1.1",hx.schema]]),vx={binary:_x.binary,bool:oP.boolTag,float:Zp.float,floatExp:Zp.floatExp,floatNaN:Zp.floatNaN,floatTime:Na.floatTime,int:qp.int,intHex:qp.intHex,intOct:qp.intOct,intTime:Na.intTime,map:yx.map,merge:Cr.merge,null:rP.nullTag,omap:$x.omap,pairs:xx.pairs,seq:bx.seq,set:wx.set,timestamp:Na.timestamp},cP={"tag:yaml.org,2002:binary":_x.binary,"tag:yaml.org,2002:merge":Cr.merge,"tag:yaml.org,2002:omap":$x.omap,"tag:yaml.org,2002:pairs":xx.pairs,"tag:yaml.org,2002:set":wx.set,"tag:yaml.org,2002:timestamp":Na.timestamp};function lP(e,t,r){let i=gx.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(gx.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"?vx[a]:a;if(!s){let c=JSON.stringify(a),l=Object.keys(vx).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},[])}Vp.coreKnownTags=cP;Vp.getTags=lP});var Kp=T(Sx=>{"use strict";var Bp=F(),uP=vn(),dP=yn(),fP=Er(),Ca=kx(),pP=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,Jp=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,Bp.MAP,{value:uP.map}),Object.defineProperty(this,Bp.SCALAR,{value:fP.string}),Object.defineProperty(this,Bp.SEQ,{value:dP.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?pP:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};Sx.Schema=Jp});var Ox=T(Ix=>{"use strict";var mP=F(),Gp=Ir(),jr=xr();function hP(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=Gp.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(mP.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=Gp.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(Gp.stringify(e.contents,n));if(e.directives?.docEnd)if(e.comment){let c=o(e.comment);c.includes(`
|
|
203
|
+
`)?(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(`
|
|
204
|
+
`)+`
|
|
205
|
+
`}Ix.stringifyDocument=hP});var Dr=T(Ax=>{"use strict";var gP=_r(),_n=ea(),ke=F(),vP=at(),yP=nt(),bP=Kp(),_P=Ox(),Wp=Ho(),$P=Qf(),xP=$r(),Hp=Xf(),Yp=class e{constructor(t,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ke.NODE_TYPE,{value:ke.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 Hp.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,{[ke.NODE_TYPE]:{value:ke.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=ke.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=Wp.anchorNames(this);t.anchor=!r||i.has(r)?Wp.findNewAnchor(r||"a",i):r}return new gP.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=x=>typeof x=="number"||x instanceof String||x instanceof Number,E=r.filter(v).map(String);E.length>0&&(r=r.concat(E)),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}=Wp.createNodeAnchors(this,a||"a"),g={aliasDuplicateObjects:o??!0,keepUndefined:c??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:p},m=xP.createNode(t,u,g);return s&&ke.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 vP.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 ke.isCollection(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return _n.isEmptyPath(t)?!r&&ke.isScalar(this.contents)?this.contents.value:this.contents:ke.isCollection(this.contents)?this.contents.getIn(t,r):void 0}has(t){return ke.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){return _n.isEmptyPath(t)?this.contents!==void 0:ke.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 Hp.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 Hp.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 bP.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=yP.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"?$P.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 _P.stringifyDocument(this,t)}};function $n(e){if(ke.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}Ax.Document=Yp});var Rr=T(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}},Xp=class extends Ur{constructor(t,r,i){super("YAMLParseError",t,r,i)}},Qp=class extends Ur{constructor(t,r,i){super("YAMLWarning",t,r,i)}},wP=(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
|
|
206
|
+
`),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+=`:
|
|
207
|
+
|
|
208
|
+
${a}
|
|
209
|
+
${l}
|
|
210
|
+
`}};Lr.YAMLError=Ur;Lr.YAMLParseError=Xp;Lr.YAMLWarning=Qp;Lr.prettifyError=wP});var Mr=T(Ex=>{"use strict";function kP(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,E=null,x=null,N=null,w=null,b=null;for(let A of e)switch(g&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&o(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(l&&A.type!=="comment"&&A.type!=="newline"&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),A.type){case"space":!t&&(r!=="doc-start"||i?.type!=="flow-collection")&&A.source.includes(" ")&&(m=A),u=!0;break;case"comment":{u||o(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let M=A.source.substring(1)||" ";d?d+=f+M:d=M,f="",l=!1;break}case"newline":l?d?d+=A.source:(!w||r!=="seq-item-ind")&&(c=!0):f+=A.source,l=!0,p=!0,(v||E)&&(x=A),u=!0;break;case"anchor":v&&o(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&o(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=A,b??(b=A.offset),l=!1,u=!1,g=!0;break;case"tag":{E&&o(A,"MULTIPLE_TAGS","A node can have at most one tag"),E=A,b??(b=A.offset),l=!1,u=!1,g=!0;break}case r:(v||E)&&o(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),w&&o(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${t??"collection"}`),w=A,l=r==="seq-item-ind"||r==="explicit-key-ind",u=!1;break;case"comma":if(t){N&&o(A,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),N=A,l=!1,u=!1;break}default:o(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),l=!1,u=!1}let z=e[e.length-1],D=z?z.offset+z.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:w,spaceBefore:c,comment:d,hasNewline:p,anchor:v,tag:E,newlineAfterProp:x,end:D,start:b??D}}Ex.resolveProps=kP});var ja=T(Tx=>{"use strict";function em(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
211
|
+
`))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(em(t.key)||em(t.value))return!0}return!1;default:return!0}}Tx.containsNewline=em});var tm=T(Px=>{"use strict";var SP=ja();function IP(e,t,r){if(t?.type==="flow-collection"){let i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&SP.containsNewline(t)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Px.flowIndentCheck=IP});var nm=T(Nx=>{"use strict";var zx=F();function OP(e,t,r){let{uniqueKeys:i}=e.options;if(i===!1)return!1;let n=typeof i=="function"?i:(o,a)=>o===a||zx.isScalar(o)&&zx.isScalar(a)&&o.value===a.value;return t.some(o=>n(o.key,r))}Nx.mapIncludes=OP});var Rx=T(Lx=>{"use strict";var Cx=at(),AP=ct(),jx=Mr(),EP=ja(),Dx=tm(),TP=nm(),Ux="All mapping items must start at the same column";function PP({composeNode:e,composeEmptyNode:t},r,i,n,o){let a=o?.nodeClass??AP.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=jx.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",Ux)),!m.anchor&&!m.tag&&!p){l=m.end,m.comment&&(s.comment?s.comment+=`
|
|
212
|
+
`+m.comment:s.comment=m.comment);continue}(m.newlineAfterProp||EP.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",Ux);r.atKey=!0;let E=m.end,x=f?e(r,f,m,n):t(r,E,d,null,m,n);r.schema.compat&&Dx.flowIndentCheck(i.indent,f,n),r.atKey=!1,TP.mapIncludes(r,s.items,x)&&n(E,"DUPLICATE_KEY","Map keys must be unique");let N=jx.resolveProps(p??[],{indicator:"map-value-ind",next:g,offset:x.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(x.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let w=g?e(r,g,N,n):t(r,c,p,null,N,n);r.schema.compat&&Dx.flowIndentCheck(i.indent,g,n),c=w.range[2];let b=new Cx.Pair(x,w);r.options.keepSourceTokens&&(b.srcToken=u),s.items.push(b)}else{v&&n(x.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),N.comment&&(x.comment?x.comment+=`
|
|
213
|
+
`+N.comment:x.comment=N.comment);let w=new Cx.Pair(x);r.options.keepSourceTokens&&(w.srcToken=u),s.items.push(w)}}return l&&l<c&&n(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[i.offset,c,l??c],s}Lx.resolveBlockMap=PP});var Fx=T(Mx=>{"use strict";var zP=lt(),NP=Mr(),CP=tm();function jP({composeNode:e,composeEmptyNode:t},r,i,n,o){let a=o?.nodeClass??zP.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=NP.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&&CP.flowIndentCheck(i.indent,d,n),c=p.range[2],s.items.push(p)}return s.range=[i.offset,c,l??c],s}Mx.resolveBlockSeq=jP});var xn=T(Zx=>{"use strict";function DP(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}}Zx.resolveEnd=DP});var Jx=T(Bx=>{"use strict";var UP=F(),LP=at(),qx=ct(),RP=lt(),MP=xn(),Vx=Mr(),FP=ja(),ZP=nm(),rm="Block collections are not allowed within flow collections",im=e=>e&&(e.type==="block-map"||e.type==="block-seq");function qP({composeNode:e,composeEmptyNode:t},r,i,n,o){let a=i.start.source==="{",s=a?"flow map":"flow sequence",c=o?.nodeClass??(a?qx.YAMLMap:RP.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 E=i.items[v],{start:x,key:N,sep:w,value:b}=E,z=Vx.resolveProps(x,{flow:s,indicator:"explicit-key-ind",next:N??w?.[0],offset:d,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!z.found){if(!z.anchor&&!z.tag&&!w&&!b){v===0&&z.comma?n(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`):v<i.items.length-1&&n(z.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${s}`),z.comment&&(l.comment?l.comment+=`
|
|
214
|
+
`+z.comment:l.comment=z.comment),d=z.end;continue}!a&&r.options.strict&&FP.containsNewline(N)&&n(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(v===0)z.comma&&n(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);else if(z.comma||n(z.start,"MISSING_CHAR",`Missing , between ${s} items`),z.comment){let D="";e:for(let A of x)switch(A.type){case"comma":case"space":break;case"comment":D=A.source.substring(1);break e;default:break e}if(D){let A=l.items[l.items.length-1];UP.isPair(A)&&(A=A.value??A.key),A.comment?A.comment+=`
|
|
215
|
+
`+D:A.comment=D,z.comment=z.comment.substring(D.length+1)}}if(!a&&!w&&!z.found){let D=b?e(r,b,z,n):t(r,z.end,w,null,z,n);l.items.push(D),d=D.range[2],im(b)&&n(D.range,"BLOCK_IN_FLOW",rm)}else{r.atKey=!0;let D=z.end,A=N?e(r,N,z,n):t(r,D,x,null,z,n);im(N)&&n(A.range,"BLOCK_IN_FLOW",rm),r.atKey=!1;let M=Vx.resolveProps(w??[],{flow:s,indicator:"map-value-ind",next:b,offset:A.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(M.found){if(!a&&!z.found&&r.options.strict){if(w)for(let X of w){if(X===M.found)break;if(X.type==="newline"){n(X,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}z.start<M.found.offset-1024&&n(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else b&&("source"in b&&b.source?.[0]===":"?n(b,"MISSING_CHAR",`Missing space after : in ${s}`):n(M.start,"MISSING_CHAR",`Missing , or : between ${s} items`));let W=b?e(r,b,M,n):M.found?t(r,M.end,w,null,M,n):null;W?im(b)&&n(W.range,"BLOCK_IN_FLOW",rm):M.comment&&(A.comment?A.comment+=`
|
|
216
|
+
`+M.comment:A.comment=M.comment);let Tt=new LP.Pair(A,W);if(r.options.keepSourceTokens&&(Tt.srcToken=E),a){let X=l;ZP.mapIncludes(r,X.items,A)&&n(D,"DUPLICATE_KEY","Map keys must be unique"),X.items.push(Tt)}else{let X=new qx.YAMLMap(r.schema);X.flow=!0,X.items.push(Tt);let Wm=(W??A).range;X.range=[A.range[0],Wm[1],Wm[2]],l.items.push(X)}d=W?W.range[2]:M.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),E=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",E),p&&p.source.length!==1&&g.unshift(p)}if(g.length>0){let v=MP.resolveEnd(g,m,r.options.strict,n);v.comment&&(l.comment?l.comment+=`
|
|
217
|
+
`+v.comment:l.comment=v.comment),l.range=[i.offset,m,v.offset]}else l.range=[i.offset,m,m];return l}Bx.resolveFlowCollection=qP});var Gx=T(Kx=>{"use strict";var VP=F(),BP=Y(),JP=ct(),KP=lt(),GP=Rx(),WP=Fx(),HP=Jx();function om(e,t,r,i,n,o){let a=r.type==="block-map"?GP.resolveBlockMap(e,t,r,i,o):r.type==="block-seq"?WP.resolveBlockSeq(e,t,r,i,o):HP.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 YP(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===JP.YAMLMap.tagName&&s==="map"||a===KP.YAMLSeq.tagName&&s==="seq")return om(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),om(e,t,r,n,a)}let l=om(e,t,r,n,a,c),u=c.resolve?.(l,f=>n(o,"TAG_RESOLVE_FAILED",f),t.options)??l,d=VP.isNode(u)?u:new BP.Scalar(u);return d.range=l.range,d.tag=a,c?.format&&(d.format=c.format),d}Kx.composeCollection=YP});var sm=T(Wx=>{"use strict";var am=Y();function XP(e,t,r){let i=t.offset,n=QP(t,e.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let o=n.mode===">"?am.Scalar.BLOCK_FOLDED:am.Scalar.BLOCK_LITERAL,a=t.source?ez(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?`
|
|
218
|
+
`.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,E]=a[m];if(E===""||E==="\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+E.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)+`
|
|
219
|
+
`;for(let m=u;m<s;++m){let[v,E]=a[m];l+=v.length+E.length+1;let x=E[E.length-1]==="\r";if(x&&(E=E.slice(0,-1)),E&&v.length<c){let w=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(l-E.length-(x?2:1),"BAD_INDENT",w),v=""}o===am.Scalar.BLOCK_LITERAL?(d+=f+v.slice(c)+E,f=`
|
|
220
|
+
`):v.length>c||E[0]===" "?(f===" "?f=`
|
|
221
|
+
`:!p&&f===`
|
|
222
|
+
`&&(f=`
|
|
223
|
+
|
|
224
|
+
`),d+=f+v.slice(c)+E,f=`
|
|
225
|
+
`,p=!0):E===""?f===`
|
|
226
|
+
`?d+=`
|
|
227
|
+
`:f=`
|
|
228
|
+
`:(d+=f+E,f=" ",p=!1)}switch(n.chomp){case"-":break;case"+":for(let m=s;m<a.length;++m)d+=`
|
|
229
|
+
`+a[m][0].slice(c);d[d.length-1]!==`
|
|
230
|
+
`&&(d+=`
|
|
231
|
+
`);break;default:d+=`
|
|
232
|
+
`}let g=i+n.length+t.source.length;return{value:d,type:o,comment:n.comment,range:[i,g,g]}}function QP({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 ez(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}Wx.resolveBlockScalar=XP});var lm=T(Yx=>{"use strict";var cm=Y(),tz=xn();function nz(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=cm.Scalar.PLAIN,c=rz(o,l);break;case"single-quoted-scalar":s=cm.Scalar.QUOTE_SINGLE,c=iz(o,l);break;case"double-quoted-scalar":s=cm.Scalar.QUOTE_DOUBLE,c=oz(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=tz.resolveEnd(a,u,t,r);return{value:c,type:s,comment:d.comment,range:[i,u,d.offset]}}function rz(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}`),Hx(e)}function iz(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Hx(e.slice(1,-1)).replace(/''/g,"'")}function Hx(e){let t,r;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
233
|
+
`,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
234
|
+
`,"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===`
|
|
235
|
+
`?n+=o:o=`
|
|
236
|
+
`:(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 oz(e,t){let r="";for(let i=1;i<e.length-1;++i){let n=e[i];if(!(n==="\r"&&e[i+1]===`
|
|
237
|
+
`))if(n===`
|
|
238
|
+
`){let{fold:o,offset:a}=az(e,i);r+=o,i=a}else if(n==="\\"){let o=e[++i],a=sz[o];if(a)r+=a;else if(o===`
|
|
239
|
+
`)for(o=e[i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="\r"&&e[i+1]===`
|
|
240
|
+
`)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+=cz(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!==`
|
|
241
|
+
`&&!(a==="\r"&&e[i+2]===`
|
|
242
|
+
`)&&(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 az(e,t){let r="",i=e[t+1];for(;(i===" "||i===" "||i===`
|
|
243
|
+
`||i==="\r")&&!(i==="\r"&&e[t+2]!==`
|
|
244
|
+
`);)i===`
|
|
245
|
+
`&&(r+=`
|
|
246
|
+
`),t+=1,i=e[t+1];return r||(r=" "),{fold:r,offset:t}}var sz={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
247
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function cz(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}}Yx.resolveFlowScalar=nz});var ew=T(Qx=>{"use strict";var At=F(),Xx=Y(),lz=sm(),uz=lm();function dz(e,t,r,i){let{value:n,type:o,comment:a,range:s}=t.type==="block-scalar"?lz.resolveBlockScalar(e,t,i):uz.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[At.SCALAR]:c?l=fz(e.schema,n,c,r,i):t.type==="scalar"?l=pz(e,n,t,i):l=e.schema[At.SCALAR];let u;try{let d=l.resolve(n,f=>i(r??t,"TAG_RESOLVE_FAILED",f),e.options);u=At.isScalar(d)?d:new Xx.Scalar(d)}catch(d){let f=d instanceof Error?d.message:String(d);i(r??t,"TAG_RESOLVE_FAILED",f),u=new Xx.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 fz(e,t,r,i,n){if(r==="!")return e[At.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[At.SCALAR])}function pz({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[At.SCALAR];if(r.compat){let s=r.compat.find(c=>c.default&&c.test?.test(i))??r[At.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}Qx.composeScalar=dz});var nw=T(tw=>{"use strict";function mz(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}tw.emptyScalarPosition=mz});var ow=T(dm=>{"use strict";var hz=_r(),gz=F(),vz=Gx(),rw=ew(),yz=xn(),bz=nw(),_z={composeNode:iw,composeEmptyNode:um};function iw(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=$z(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=rw.composeScalar(e,t,c,i),s&&(l.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=vz.composeCollection(_z,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=um(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&&(!gz.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 um(e,t,r,i,{spaceBefore:n,comment:o,anchor:a,tag:s,end:c},l){let u={type:"scalar",offset:bz.emptyScalarPosition(t,r,i),indent:-1,source:""},d=rw.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 $z({options:e},{offset:t,source:r,end:i},n){let o=new hz.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=yz.resolveEnd(i,a,e.strict,n);return o.range=[t,a,s.offset],s.comment&&(o.comment=s.comment),o}dm.composeEmptyNode=um;dm.composeNode=iw});var cw=T(sw=>{"use strict";var xz=Dr(),aw=ow(),wz=xn(),kz=Mr();function Sz(e,t,{offset:r,start:i,value:n,end:o},a){let s=Object.assign({_directives:t},e),c=new xz.Document(void 0,s),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},u=kz.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?aw.composeNode(l,n,u,a):aw.composeEmptyNode(l,u.end,i,null,u,a);let d=c.contents.range[2],f=wz.resolveEnd(o,d,!1,a);return f.comment&&(c.comment=f.comment),c.range=[r,d,f.offset],c}sw.composeDoc=Sz});var pm=T(dw=>{"use strict";var Iz=De("process"),Oz=Xf(),Az=Dr(),Fr=Rr(),lw=F(),Ez=cw(),Tz=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 uw(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?`
|
|
248
|
+
|
|
249
|
+
`:`
|
|
250
|
+
`)+(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 fm=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 Oz.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,r){let{comment:i,afterEmptyLine:n}=uw(this.prelude);if(i){let o=t.contents;if(r)t.comment=t.comment?`${t.comment}
|
|
251
|
+
${i}`:i;else if(n||t.directives.docStart||!o)t.commentBefore=i;else if(lw.isCollection(o)&&!o.flow&&o.items.length>0){let a=o.items[0];lw.isPair(a)&&(a=a.key);let s=a.commentBefore;a.commentBefore=s?`${i}
|
|
252
|
+
${s}`:i}else{let a=o.commentBefore;o.commentBefore=a?`${i}
|
|
253
|
+
${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:uw(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(Iz.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=Ez.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=Tz.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}
|
|
254
|
+
${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 Az.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}}};dw.Composer=fm});var mw=T(Da=>{"use strict";var Pz=sm(),zz=lm(),Nz=Rr(),fw=Sr();function Cz(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 Nz.YAMLParseError([s,s+1],o,a)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return zz.resolveFlowScalar(e,t,i);case"block-scalar":return Pz.resolveBlockScalar({options:{strict:t}},e,i)}}return null}function jz(e,t){let{implicitKey:r=!1,indent:i,inFlow:n=!1,offset:o=-1,type:a="PLAIN"}=t,s=fw.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:`
|
|
255
|
+
`}];switch(s[0]){case"|":case">":{let l=s.indexOf(`
|
|
256
|
+
`),u=s.substring(0,l),d=s.substring(l+1)+`
|
|
257
|
+
`,f=[{type:"block-scalar-header",offset:o,indent:i,source:u}];return pw(f,c)||f.push({type:"newline",offset:-1,indent:i,source:`
|
|
258
|
+
`}),{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 Dz(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=fw.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">":Uz(e,c);break;case'"':mm(e,c,"double-quoted-scalar");break;case"'":mm(e,c,"single-quoted-scalar");break;default:mm(e,c,"scalar")}}function Uz(e,t){let r=t.indexOf(`
|
|
259
|
+
`),i=t.substring(0,r),n=t.substring(r+1)+`
|
|
260
|
+
`;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}];pw(s,"end"in e?e.end:void 0)||s.push({type:"newline",offset:-1,indent:a,source:`
|
|
261
|
+
`});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 pw(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 mm(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:`
|
|
262
|
+
`};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=jz;Da.resolveAsScalar=Cz;Da.setScalarValue=Dz});var gw=T(hw=>{"use strict";var Lz=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}hw.stringify=Lz});var _w=T(bw=>{"use strict";var hm=Symbol("break visit"),Rz=Symbol("skip children"),vw=Symbol("remove item");function Et(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),yw(Object.freeze([]),e,t)}Et.BREAK=hm;Et.SKIP=Rz;Et.REMOVE=vw;Et.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};Et.parentCollection=(e,t)=>{let r=Et.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 yw(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=yw(Object.freeze(e.concat([[n,a]])),o.items[a],r);if(typeof s=="number")a=s-1;else{if(s===hm)return hm;s===vw&&(o.items.splice(a,1),a-=1)}}typeof i=="function"&&n==="key"&&(i=i(t,e))}}return typeof i=="function"?i(t,e):i}bw.visit=Et});var Ra=T(ye=>{"use strict";var gm=mw(),Mz=gw(),Fz=_w(),vm="\uFEFF",ym="",bm="",_m="",Zz=e=>!!e&&"items"in e,qz=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Vz(e){switch(e){case vm:return"<BOM>";case ym:return"<DOC>";case bm:return"<FLOW_END>";case _m:return"<SCALAR>";default:return JSON.stringify(e)}}function Bz(e){switch(e){case vm:return"byte-order-mark";case ym:return"doc-mode";case bm:return"flow-error-end";case _m:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
263
|
+
`:case`\r
|
|
264
|
+
`: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}ye.createScalarToken=gm.createScalarToken;ye.resolveAsScalar=gm.resolveAsScalar;ye.setScalarValue=gm.setScalarValue;ye.stringify=Mz.stringify;ye.visit=Fz.visit;ye.BOM=vm;ye.DOCUMENT=ym;ye.FLOW_END=bm;ye.SCALAR=_m;ye.isCollection=Zz;ye.isScalar=qz;ye.prettyToken=Vz;ye.tokenType=Bz});var wm=T(xw=>{"use strict";var qr=Ra();function Ae(e){switch(e){case void 0:case" ":case`
|
|
265
|
+
`:case"\r":case" ":return!0;default:return!1}}var $w=new Set("0123456789ABCDEFabcdef"),Jz=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ma=new Set(",[]{}"),Kz=new Set(` ,[]{}
|
|
266
|
+
\r `),$m=e=>!e||Kz.has(e),xm=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===`
|
|
267
|
+
`?!0:r==="\r"?this.buffer[t+1]===`
|
|
268
|
+
`:!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===`
|
|
269
|
+
`||!n&&!this.atEnd)return t+i+1}return r===`
|
|
270
|
+
`||i>=this.indentNext||!r&&!this.atEnd?t+i:-1}if(r==="-"||r==="."){let i=this.buffer.substr(t,3);if((i==="---"||i==="...")&&Ae(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(`
|
|
271
|
+
`,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==="...")&&Ae(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&&!Ae(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===":")&&Ae(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($m),"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("..."))&&Ae(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($m),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||Ae(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(`
|
|
272
|
+
`,this.pos);if(n!==-1){for(;n!==-1;){let o=this.continueScalar(n+1);if(o===-1)break;n=i.indexOf(`
|
|
273
|
+
`,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=>Ae(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`
|
|
274
|
+
`:t=o,r=0;break;case"\r":{let a=this.buffer[o+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
275
|
+
`)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(`
|
|
276
|
+
`,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===`
|
|
277
|
+
`;)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===`
|
|
278
|
+
`&&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(Ae(o)||t&&Ma.has(o))break;r=i}else if(Ae(n)){let o=this.buffer[i+1];if(n==="\r"&&(o===`
|
|
279
|
+
`?(i+=1,n=`
|
|
280
|
+
`,o=this.buffer[i+1]):r=i),o==="#"||t&&Ma.has(o))break;if(n===`
|
|
281
|
+
`){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($m),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,i=this.charAt(1);if(Ae(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(;!Ae(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(Jz.has(r))r=this.buffer[++t];else if(r==="%"&&$w.has(this.buffer[t+1])&&$w.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===`
|
|
282
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
283
|
+
`?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)}};xw.Lexer=xm});var Sm=T(ww=>{"use strict";var km=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}}}};ww.LineCounter=km});var Om=T(Aw=>{"use strict";var Gz=De("process"),kw=Ra(),Wz=wm();function ut(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function Sw(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 Ow(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 Iw(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!ut(t.start,"explicit-key-ind")&&!ut(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,Ow(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 Im=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 Wz.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,Gz.env.LOG_TOKENS&&console.log("|",kw.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let r=kw.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"&&Iw(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&&Sw(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":{Sw(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(`
|
|
284
|
+
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
285
|
+
`,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(ut(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(Ow(r.key)&&!ut(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(ut(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]}):ut(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&&!ut(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||ut(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);Iw(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(`
|
|
286
|
+
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
287
|
+
`,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())}}};Aw.Parser=Im});var Nw=T(Br=>{"use strict";var Ew=pm(),Hz=Dr(),Vr=Rr(),Yz=dp(),Xz=F(),Qz=Sm(),Tw=Om();function Pw(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Qz.LineCounter||null,prettyErrors:t}}function eN(e,t={}){let{lineCounter:r,prettyErrors:i}=Pw(t),n=new Tw.Parser(r?.addNewLine),o=new Ew.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 zw(e,t={}){let{lineCounter:r,prettyErrors:i}=Pw(t),n=new Tw.Parser(r?.addNewLine),o=new Ew.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 tN(e,t,r){let i;typeof t=="function"?i=t:r===void 0&&t&&typeof t=="object"&&(r=t);let n=zw(e,r);if(!n)return null;if(n.warnings.forEach(o=>Yz.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 nN(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 Xz.isDocument(e)&&!i?e.toString(r):new Hz.Document(e,i,r).toString(r)}Br.parse=tN;Br.parseAllDocuments=eN;Br.parseDocument=zw;Br.stringify=nN});var jw=T(V=>{"use strict";var rN=pm(),iN=Dr(),oN=Kp(),Am=Rr(),aN=_r(),dt=F(),sN=at(),cN=Y(),lN=ct(),uN=lt(),dN=Ra(),fN=wm(),pN=Sm(),mN=Om(),qa=Nw(),Cw=gr();V.Composer=rN.Composer;V.Document=iN.Document;V.Schema=oN.Schema;V.YAMLError=Am.YAMLError;V.YAMLParseError=Am.YAMLParseError;V.YAMLWarning=Am.YAMLWarning;V.Alias=aN.Alias;V.isAlias=dt.isAlias;V.isCollection=dt.isCollection;V.isDocument=dt.isDocument;V.isMap=dt.isMap;V.isNode=dt.isNode;V.isPair=dt.isPair;V.isScalar=dt.isScalar;V.isSeq=dt.isSeq;V.Pair=sN.Pair;V.Scalar=cN.Scalar;V.YAMLMap=lN.YAMLMap;V.YAMLSeq=uN.YAMLSeq;V.CST=dN;V.Lexer=fN.Lexer;V.LineCounter=pN.LineCounter;V.Parser=mN.Parser;V.parse=qa.parse;V.parseAllDocuments=qa.parseAllDocuments;V.parseDocument=qa.parseDocument;V.stringify=qa.stringify;V.visit=Cw.visit;V.visitAsync=Cw.visitAsync});import{existsSync as Fw}from"fs";import{readdir as $N}from"fs/promises";import{resolve as Zw,join as xN}from"path";function Tm(e){if(e instanceof _.ZodString)return"string";if(e instanceof _.ZodNumber)return"number";if(e instanceof _.ZodBoolean)return"boolean";if(e instanceof _.ZodEnum)return`enum(${e.options.join(", ")})`;if(e instanceof _.ZodLiteral)return`"${String(e._def.values[0])}"`;if(e instanceof _.ZodArray){let t=e._def.element;return`${Tm(t)}[]`}return e instanceof _.ZodObject?"object":e instanceof _.ZodOptional?Tm(e._def.innerType):e instanceof _.ZodRecord?"Record<string, unknown>":"unknown"}function Cm(e){return e instanceof _.ZodOptional?e._def.innerType:e}function hN(e){let t=Cm(e);return t instanceof _.ZodArray?t._def.element:null}function Uw(e){let t=null;return e instanceof _.ZodObject&&(t=e.shape),t?Object.entries(t).map(([r,i])=>{let n=i instanceof _.ZodOptional,a=(n?i._def.innerType:i).description??i.description;return{name:r,type:Tm(i),required:!n,description:a}}):null}function Gr(e){let t=[];return Pm(e,"",t),t.join(`
|
|
288
|
+
|
|
289
|
+
`)}function Pm(e,t,r){let i=Uw(e);if(!i||i.length===0)return;let n=t?`**${t}**
|
|
290
|
+
|
|
291
|
+
`:"",o="| Field | Type | Required | Description |",a="|-------|------|----------|-------------|",s=i.map(l=>`| ${l.name} | ${l.type} | ${l.required?"Yes":"No"} | ${l.description??""} |`);r.push(`${n}${[o,a,...s].join(`
|
|
292
|
+
`)}`);let c=e instanceof _.ZodObject?e.shape:null;if(c)for(let l of i){let u=c[l.name],d=Cm(u);if(d instanceof _.ZodObject)Pm(d,t?`${t}.${l.name}`:l.name,r);else if(d instanceof _.ZodArray){let f=d._def.element;f instanceof _.ZodObject&&Pm(f,t?`${t}.${l.name}[]`:`${l.name}[]`,r)}}}function Ba(e,t=3){return zm(e,0,t)}function zm(e,t,r){let i=Uw(e);if(!i||i.length===0)return"";let n=" ".repeat(t),o=[];for(let a of i){let c=(e instanceof _.ZodObject?e.shape:null)?.[a.name];if(a.type.endsWith("[]")){o.push(`${n}${a.name}:`);let l=c?hN(c):null;if(l&&l instanceof _.ZodObject&&t<r){let u=zm(l,t+2,r);if(u){let d=" ".repeat(t+2),f=u.split(`
|
|
293
|
+
`);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?Cm(c):null;if(l&&l instanceof _.ZodObject){o.push(`${n}${a.name}:`);let u=zm(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(`
|
|
294
|
+
`)}function Jr(e,t,r,i){let n=[];if(n.push(`# Role: ${e.role_name}
|
|
295
|
+
|
|
296
|
+
${e.purpose}`),e.responsibilities.length>0&&n.push(`## Responsibilities
|
|
297
|
+
|
|
298
|
+
${e.responsibilities.map(c=>`- ${c}`).join(`
|
|
299
|
+
`)}`),e.constraints.length>0&&n.push(`## Constraints
|
|
300
|
+
|
|
301
|
+
${e.constraints.map(c=>`- ${c}`).join(`
|
|
302
|
+
`)}`),e.rules&&e.rules.length>0){let c=e.rules.map(l=>`- **${l.id}** [${l.severity}]: ${l.description}`);n.push(`## Rules
|
|
303
|
+
|
|
304
|
+
${c.join(`
|
|
305
|
+
`)}`)}if(n.push(`## Task: ${t.id}
|
|
306
|
+
|
|
307
|
+
${t.description}`),t.completion_criteria.length>0&&n.push(`## Completion Criteria
|
|
308
|
+
|
|
309
|
+
${t.completion_criteria.map(c=>`- ${c}`).join(`
|
|
310
|
+
`)}`),r.handoff_input){let c=r.handoff_input,l=typeof c.payload=="string"?c.payload:Va.stringify(c.payload);n.push(`## User Request
|
|
311
|
+
|
|
312
|
+
${r.user_request}`),n.push(`## Handoff Input (${c.type})
|
|
313
|
+
|
|
314
|
+
\`\`\`yaml
|
|
315
|
+
${l}\`\`\``)}else n.push(`## User Request
|
|
316
|
+
|
|
317
|
+
${r.user_request}`);r.prior_context&&n.push(`## Prior Context
|
|
318
|
+
|
|
319
|
+
${r.prior_context}`),r.relevant_paths&&r.relevant_paths.length>0&&n.push(`## Relevant Files
|
|
320
|
+
|
|
321
|
+
${r.relevant_paths.map(c=>`- ${c}`).join(`
|
|
322
|
+
`)}`),r.acceptance_criteria&&r.acceptance_criteria.length>0&&n.push(`## Acceptance Criteria
|
|
323
|
+
|
|
324
|
+
${r.acceptance_criteria.map(c=>`- ${c}`).join(`
|
|
325
|
+
`)}`);let o=t.result_handoff,a=i?.handoffSchemas?.[o],s=`## Required Output Format
|
|
326
|
+
|
|
327
|
+
Return your result as a YAML block matching the "${o}" schema.`;if(a){let c=Gr(a);c&&(s+=`
|
|
328
|
+
|
|
329
|
+
${c}`);let l=Ba(a);l&&(s+=`
|
|
330
|
+
|
|
331
|
+
Example:
|
|
332
|
+
|
|
333
|
+
\`\`\`yaml
|
|
334
|
+
${l}
|
|
335
|
+
\`\`\``)}else s+=" Include all required fields.";if(n.push(s),i?.retry){let c=i.retry,l=`## Recovery Instructions
|
|
336
|
+
|
|
337
|
+
If the task fails due to: "${c.condition}"
|
|
338
|
+
\u2192 Apply the recovery approach from task "${c.fix_task}"`;c.revalidate_task&&(l+=`
|
|
339
|
+
\u2192 Then revalidate using task "${c.revalidate_task}"`),n.push(l)}return n.join(`
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
`)}function jm(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 Dw(e,t,r){if(!e.trim())return{status:"error",message:"Agent returned empty output"};let i=jm(e);if(!i)return{status:"validation_error",errors:new _.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 Dm(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:
|
|
344
|
+
${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+=`
|
|
345
|
+
|
|
346
|
+
${s}`);let c=Ba(o);c&&(a+=`
|
|
347
|
+
|
|
348
|
+
Example:
|
|
349
|
+
|
|
350
|
+
\`\`\`yaml
|
|
351
|
+
${c}
|
|
352
|
+
\`\`\``)}else a+=" Include all required fields.";return i.push(a),i.join(`
|
|
353
|
+
|
|
354
|
+
`)}function gN(e,t){return e.status==="validation_error"?"follow_up":e.status==="error"&&e.message==="Agent returned empty output"?"retry":"abort"}async function Um(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 se.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=se.applyContextEnhancers(t,l),d={handoffSchemas:a,retry:i?.retry},f={agent:c,task:s,context:u,options:d},p=se.applyPromptBuilder(f)??Jr(c,s,u,d);p=se.applyPromptEnhancers(t,p,u);let g=c.mode==="read-only",m=i?.maxFollowUps??2,v=i?.maxRetries??0,E=i?.decideRetryStrategy??gN,x=0,N=0,w;try{e.sendExecution?w=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}}):w=await e.send(p,{readonly:g})}catch(z){return{outcome:{status:"error",message:`SDK error: ${z.message}`},follow_ups_used:0,retries_used:0}}let b=Dw(w,s,a);for(b=await se.runAfterTask(t,b);b.status==="validation_error"||b.status==="error";){let z=await E(b,{followUps:x,retries:N});if(z==="abort")break;let D=z;if(D==="follow_up"&&x>=m&&(D="retry"),D==="retry"&&N>=v)break;if(D==="follow_up"){x++;let A=Dm(s,b,d);try{if(e.followUp)w=await e.followUp(A);else{let M={...l,prior_context:(l.prior_context??"")+`
|
|
355
|
+
|
|
356
|
+
--- FollowUp ${x} ---
|
|
357
|
+
${A}`},W=Jr(c,s,M,d);W=se.applyPromptEnhancers(t,W,M),w=await e.send(W,{readonly:g})}}catch(M){b={status:"error",message:`SDK error on followUp ${x}: ${M.message}`};continue}}else{N++;let A={...l,prior_context:(l.prior_context??"")+`
|
|
358
|
+
|
|
359
|
+
--- Full Retry ${N} ---
|
|
360
|
+
Previous attempt failed: `+(b.status==="validation_error"?`Validation errors: ${b.errors.message}`:b.status==="error"?b.message:"unknown")+`
|
|
361
|
+
Please re-execute the entire task.`},M=Jr(c,s,A);M=se.applyPromptEnhancers(t,M,A);try{w=await e.send(M,{readonly:g})}catch(W){b={status:"error",message:`SDK error on retry ${N}: ${W.message}`};continue}}b=Dw(w,s,a),b=await se.runAfterTask(t,b)}return{outcome:b,follow_ups_used:x,retries_used:N}}function vN(e){let t;if(e.handoff){let r=e.handoff;t=e.user_request?e.user_request:typeof r.payload=="string"?r.payload:JSON.stringify(r.payload,null,2)}else t=e.user_request??"";return{workflowId:e.workflow,options:{user_request:t,maxFollowUps:e.runtime?.maxFollowUps,maxRetries:e.runtime?.maxRetries,onGate:e.hooks?.onGate,onStepComplete:e.hooks?.onStepComplete,onOptionalStep:e.hooks?.onOptionalStep}}}async function Lm(e,t,r,i){let n,o,a,s;if(typeof t=="string")n=t,o=r,a=i;else{let w=vN(t);n=w.workflowId,o=w.options,a=r,s=t.handoff}if(s&&a?.handoffSchemas){let w=a.handoffSchemas[s.type];if(w){let b=w.safeParse(s.payload);if(!b.success)return{workflow_id:n,status:"error",steps:[],total_elapsed_ms:0,error_message:`Input handoff validation failed for "${s.type}": ${b.error.message}`}}}let l=(a?.workflowRegistry??{})[n];if(!l)return{workflow_id:n,status:"error",steps:[],total_elapsed_ms:0,error_message:`Unknown workflow: ${n}`};await se.runBeforeWorkflow(n,o.user_request);let u=Date.now(),d=w=>{let b=l.steps[w];return b.type==="delegate"?b.task:`gate:${b.gate_kind}`},f=l.steps.map((w,b)=>w.depends_on&&w.depends_on.length>0?w.depends_on.map(z=>{let D=l.steps.findIndex((A,M)=>M<b&&d(M)===z);if(D===-1)throw new Error(`depends_on "${z}" in step ${b} (${d(b)}) not found among preceding steps`);return D}):b===0?[]:Array.from({length:b},(z,D)=>D)),p=new Set,g=new Array(l.steps.length),m=new Array(l.steps.length).fill(""),v;function E(w){let b=f[w];return b.length===0?"":b.filter(z=>p.has(z)).map(z=>m[z]).filter(Boolean).join("")}async function x(w){let b=l.steps[w],z=Date.now();if(b.type==="gate")return yN(b,Object.values(g).filter(Boolean),o,w,e);if(b.optional){let M={user_request:o.user_request,prior_context:E(w)};if(!(o.onOptionalStep?await o.onOptionalStep(b,M):!1))return{step_index:w,task_id:b.task,outcome:{status:"skipped"},follow_ups_used:0,retries_used:0,elapsed_ms:Date.now()-z}}let D={user_request:o.user_request,prior_context:E(w),...s?{handoff_input:s}:{}},A=await Um(e,b.task,D,{maxFollowUps:o.maxFollowUps??b.max_follow_ups??2,maxRetries:o.maxRetries??b.max_retries??0,taskRegistry:a?.taskRegistry,agentRegistry:a?.agentRegistry,handoffSchemas:a?.handoffSchemas,retry:b.retry});return{step_index:w,task_id:b.task,outcome:A.outcome,follow_ups_used:A.follow_ups_used,retries_used:A.retries_used,elapsed_ms:Date.now()-z}}for(;p.size<l.steps.length;){let w=[];for(let z=0;z<l.steps.length;z++)p.has(z)||f[z].every(D=>p.has(D))&&w.push(z);if(w.length===0){v={workflow_id:l.id,status:"error",steps:g.filter(Boolean),total_elapsed_ms:Date.now()-u,error_message:"Dependency cycle detected: no steps are ready to execute"};break}let b=await Promise.all(w.map(z=>x(z)));for(let z=0;z<w.length;z++){let D=w[z],A=b[z],M=l.steps[D];if(g[D]=A,p.add(D),_N(o,l.id,D,M,A),A.outcome.status==="success"){let W=A.outcome.data;m[D]=`
|
|
362
|
+
|
|
363
|
+
--- Step ${D+1}: ${d(D)} ---
|
|
364
|
+
`+(typeof W=="string"?W:JSON.stringify(W,null,2))}if(A.outcome.status==="gate_rejected")v={workflow_id:l.id,status:"gate_rejected",steps:g.filter(Boolean),total_elapsed_ms:Date.now()-u};else if(A.outcome.status==="escalation")v={workflow_id:l.id,status:"escalated",steps:g.filter(Boolean),total_elapsed_ms:Date.now()-u,escalation_reason:A.outcome.reason};else if(A.outcome.status==="error"||A.outcome.status==="validation_error"){let W=M.type==="delegate"?M.task:M.gate_kind;v={workflow_id:l.id,status:"escalated",steps:g.filter(Boolean),total_elapsed_ms:Date.now()-u,escalation_reason:`Task "${W}" failed after ${A.follow_ups_used} follow-ups and ${A.retries_used} retries`}}}if(v)break}let N=v??{workflow_id:l.id,status:"completed",steps:g.filter(Boolean),total_elapsed_ms:Date.now()-u};return await se.runAfterWorkflow(l.id,N),N}async function yN(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 bN(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 bN(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(`
|
|
365
|
+
`),n=Rm(t,i);try{let o=await e.send(n,{readonly:!0});return Mm(o)}catch{return!1}}function Rm(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.
|
|
366
|
+
|
|
367
|
+
## Gate
|
|
368
|
+
- kind: ${e.gate_kind}
|
|
369
|
+
- condition: ${e.description}
|
|
370
|
+
|
|
371
|
+
## Prior Step Results
|
|
372
|
+
${t||"(no prior results)"}
|
|
373
|
+
|
|
374
|
+
## Instructions
|
|
375
|
+
Evaluate whether the gate condition is satisfied based on the prior step results.
|
|
376
|
+
Respond with ONLY a JSON object (no markdown fences, no extra text):
|
|
377
|
+
|
|
378
|
+
{"approved": true, "reason": "brief explanation"}
|
|
379
|
+
|
|
380
|
+
or
|
|
381
|
+
|
|
382
|
+
{"approved": false, "reason": "brief explanation"}`}function Mm(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 _N(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 Kr(e){return e.filter(t=>!t.passed&&t.action==="block")}function Fm(e){return e.filter(t=>!t.passed&&t.action==="warn")}function Lw(e){return e.some(t=>!t.passed&&t.action==="block")}function Em(e){return{guardrail_id:e.guardrail_id,passed:!e.matched,action:e.action,message:e.matched?e.message:""}}function Rw(e){function t(o){let a=[];return o.command&&(a.push(...e.checkCommand(o.command)),a.push(...se.evaluateCommandGuardrails(o.command).map(Em))),o.filePath&&(a.push(...e.checkFilePath(o.filePath)),a.push(...se.evaluateFilePathGuardrails(o.filePath).map(Em))),o.filePath&&o.content&&(a.push(...e.checkContent(o.filePath,o.content)),a.push(...se.evaluateFileContentGuardrails(o.filePath,o.content).map(Em))),a}function r(o){let a=o.command??"";if(!a)return{};let s=t({command:a}),c=Kr(s),l=Fm(s);if(c.length>0){let u=c.map(d=>`[${d.guardrail_id}] ${d.message}`).join(`
|
|
383
|
+
`);return{permission:"deny",user_message:u,agent_message:u}}return l.length>0?{additionalContext:l.map(u=>`[${u.guardrail_id}] ${u.message}`).join(`
|
|
384
|
+
`)}:{}}function i(o){let a=o.tool_input?.file_path??o.tool_input?.path??"";if(!a)return{};let s=t({filePath:a}),c=Kr(s);if(c.length>0){let l=c.map(u=>`[${u.guardrail_id}] ${u.message}`).join(`
|
|
385
|
+
`);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=Kr(c);if(l.length>0){let u=l.map(d=>`[${d.guardrail_id}] ${d.message}`).join(`
|
|
386
|
+
`);return{permission:"deny",user_message:u,agent_message:u}}return{}}return{beforeShellExecution:r,preToolUse:i,afterFileEdit:n,runChecks:t}}function Mw(e){return{workflow(t){return new Zm(e.adapter,t,e.registries)}}}function kN(e){return typeof e=="object"&&e!==null&&typeof e.id=="string"}async function SN(e){return Fw(e)?(await $N(e,{withFileTypes:!0})).filter(r=>r.isFile()&&wN.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=>Zw(e,r.name)):[]}async function qw(e){let t=await import(new URL(`file://${e}`).href),r=0;for(let i of Object.values(t))if(kN(i))try{se.register(i),r++}catch{}return r}async function qm(e,t){let r={loaded:0,files:[],errors:[]};for(let i of e){let n=Zw(t,i);if(!Fw(n)){r.errors.push({file:i,error:`File not found: ${n}`});continue}try{let o=await qw(n);r.loaded+=o,r.files.push(n)}catch(o){r.errors.push({file:i,error:o.message})}}return r}async function Vm(e){let t={loaded:0,files:[],errors:[]},r=await SN(e);for(let i of r)try{let n=await qw(i);t.loaded+=n,t.files.push(i)}catch(n){t.errors.push({file:i,error:n.message})}return t}async function Vw(e){if(e.pluginPaths&&e.pluginPaths.length>0)return qm(e.pluginPaths,e.projectDir);let t=xN(e.projectDir,"src","plugins");return Vm(t)}var Va,Nm,se,Zm,wN,Bw=I(()=>{Gf();Va=Hm(jw(),1),Nm=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)}},se=new Nm;Zm=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 Lm(this.adapter,this.invocation,this.registries)}},wN=[".ts",".js",".mts",".mjs"]});var Jw={};ie(Jw,{PluginRegistry:()=>Nm,WorkflowBuilder:()=>Zm,buildGateEvaluationPrompt:()=>Rm,buildRetryFollowUp:()=>Dm,buildTaskPrompt:()=>Jr,createGuardrailHooks:()=>Rw,createRuntime:()=>Mw,extractStructuredResult:()=>jm,getBlockingViolations:()=>Kr,getWarnings:()=>Fm,hasBlockingViolation:()=>Lw,loadPlugins:()=>Vw,loadPluginsFromDirectory:()=>Vm,loadPluginsFromPaths:()=>qm,parseGateEvaluationResponse:()=>Mm,pluginRegistry:()=>se,runTask:()=>Um,runWorkflow:()=>Lm,zodSchemaToPromptDescription:()=>Gr,zodSchemaToYamlExample:()=>Ba});var Kw=I(()=>{Bw()});import{readFileSync as Ya,writeFileSync as Km,existsSync as Wr,mkdirSync as jN,copyFileSync as DN}from"fs";import{resolve as kn,dirname as Qw,join as Gm}from"path";import{fileURLToPath as UN}from"url";function fh(e){return typeof e>"u"||e===null}function sk(e){return typeof e=="object"&&e!==null}function ck(e){return Array.isArray(e)?e:fh(e)?[]:[e]}function lk(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 uk(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function dk(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var fk=fh,pk=sk,mk=ck,hk=uk,gk=dk,vk=lk,Q={isNothing:fk,isObject:pk,toArray:mk,repeat:hk,isNegativeZero:gk,extend:vk};function ph(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+=`
|
|
387
|
+
|
|
388
|
+
`+e.mark.snippet),i+" "+r):i}function In(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=ph(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+": "+ph(this,t)};var ce=In;function Qa(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 es(e,t){return Q.repeat(" ",t-e.length)+e}function yk(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=Qa(e.buffer,i[a-c],n[a-c],e.position-(i[a]-i[a-c]),d),s=Q.repeat(" ",t.indent)+es((e.line-c+1).toString(),u)+" | "+l.str+`
|
|
389
|
+
`+s;for(l=Qa(e.buffer,i[a],n[a],e.position,d),s+=Q.repeat(" ",t.indent)+es((e.line+1).toString(),u)+" | "+l.str+`
|
|
390
|
+
`,s+=Q.repeat("-",t.indent+u+3+l.pos)+`^
|
|
391
|
+
`,c=1;c<=t.linesAfter&&!(a+c>=n.length);c++)l=Qa(e.buffer,i[a+c],n[a+c],e.position-(i[a]-i[a+c]),d),s+=Q.repeat(" ",t.indent)+es((e.line+c+1).toString(),u)+" | "+l.str+`
|
|
392
|
+
`;return s.replace(/\n$/,"")}var bk=yk,_k=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],$k=["scalar","sequence","mapping"];function xk(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function wk(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(_k.indexOf(r)===-1)throw new ce('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=xk(t.styleAliases||null),$k.indexOf(this.kind)===-1)throw new ce('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var te=wk;function Ym(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 kk(){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 ns(e){return this.extend(e)}ns.prototype.extend=function(t){var r=[],i=[];if(t instanceof te)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 ce("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof te))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new ce("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 ce("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 te))throw new ce("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(ns.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=Ym(n,"implicit"),n.compiledExplicit=Ym(n,"explicit"),n.compiledTypeMap=kk(n.compiledImplicit,n.compiledExplicit),n};var mh=ns,hh=new te("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),gh=new te("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),vh=new te("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),yh=new mh({explicit:[hh,gh,vh]});function Sk(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Ik(){return null}function Ok(e){return e===null}var bh=new te("tag:yaml.org,2002:null",{kind:"scalar",resolve:Sk,construct:Ik,predicate:Ok,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Ak(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 Ek(e){return e==="true"||e==="True"||e==="TRUE"}function Tk(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var _h=new te("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ak,construct:Ek,predicate:Tk,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 Pk(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function zk(e){return 48<=e&&e<=55}function Nk(e){return 48<=e&&e<=57}function Ck(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(!Pk(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!zk(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!Nk(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function jk(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 Dk(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Q.isNegativeZero(e)}var $h=new te("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ck,construct:jk,predicate:Dk,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"]}}),Uk=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Lk(e){return!(e===null||!Uk.test(e)||e[e.length-1]==="_")}function Rk(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 Mk=/^[-+]?[0-9]+e/;function Fk(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(Q.isNegativeZero(e))return"-0.0";return r=e.toString(10),Mk.test(r)?r.replace("e",".e"):r}function Zk(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Q.isNegativeZero(e))}var xh=new te("tag:yaml.org,2002:float",{kind:"scalar",resolve:Lk,construct:Rk,predicate:Zk,represent:Fk,defaultStyle:"lowercase"}),wh=yh.extend({implicit:[bh,_h,$h,xh]}),kh=wh,Sh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ih=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 qk(e){return e===null?!1:Sh.exec(e)!==null||Ih.exec(e)!==null}function Vk(e){var t,r,i,n,o,a,s,c=0,l=null,u,d,f;if(t=Sh.exec(e),t===null&&(t=Ih.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 Bk(e){return e.toISOString()}var Oh=new te("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:qk,construct:Vk,instanceOf:Date,represent:Bk});function Jk(e){return e==="<<"||e===null}var Ah=new te("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Jk}),ss=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
393
|
+
\r`;function Kk(e){if(e===null)return!1;var t,r,i=0,n=e.length,o=ss;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 Gk(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=ss,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 Wk(e){var t="",r=0,i,n,o=e.length,a=ss;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 Hk(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Eh=new te("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Kk,construct:Gk,predicate:Hk,represent:Wk}),Yk=Object.prototype.hasOwnProperty,Xk=Object.prototype.toString;function Qk(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,Xk.call(n)!=="[object Object]")return!1;for(o in n)if(Yk.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 eS(e){return e!==null?e:[]}var Th=new te("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Qk,construct:eS}),tS=Object.prototype.toString;function nS(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],tS.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[t]=[n[0],i[n[0]]]}return!0}function rS(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 Ph=new te("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:nS,construct:rS}),iS=Object.prototype.hasOwnProperty;function oS(e){if(e===null)return!0;var t,r=e;for(t in r)if(iS.call(r,t)&&r[t]!==null)return!1;return!0}function aS(e){return e!==null?e:{}}var zh=new te("tag:yaml.org,2002:set",{kind:"mapping",resolve:oS,construct:aS}),cs=kh.extend({implicit:[Oh,Ah],explicit:[Eh,Th,Ph,zh]}),Be=Object.prototype.hasOwnProperty,Hr=1,Nh=2,Ch=3,Yr=4,ts=1,sS=2,Xm=3,cS=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lS=/[\x85\u2028\u2029]/,uS=/[,\[\]\{\}]/,jh=/^(?:!|!!|![a-z\-]+!)$/i,Dh=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Qm(e){return Object.prototype.toString.call(e)}function Ee(e){return e===10||e===13}function pt(e){return e===9||e===32}function pe(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 dS(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function fS(e){return e===120?2:e===117?4:e===85?8:0}function pS(e){return 48<=e&&e<=57?e-48:-1}function eh(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
394
|
+
`: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 mS(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Uh(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var Lh=new Array(256),Rh=new Array(256);for(ft=0;ft<256;ft++)Lh[ft]=eh(ft)?1:0,Rh[ft]=eh(ft);var ft;function hS(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||cs,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 Mh(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=bk(r),new ce(t,r)}function j(e,t){throw Mh(e,t)}function Xr(e,t){e.onWarning&&e.onWarning.call(null,Mh(e,t))}var th={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],jh.test(n)||j(t,"ill-formed tag handle (first argument) of the TAG directive"),Be.call(t.tagMap,n)&&j(t,'there is a previously declared suffix for "'+n+'" tag handle'),Dh.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 Ve(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 cS.test(s)&&j(e,"the stream contains non-printable characters");e.result+=s}}function nh(e,t,r,i){var n,o,a,s;for(Q.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],Be.call(t,o)||(Uh(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"&&Qm(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&Qm(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)nh(e,t,o[l],r);else nh(e,t,o,r);else!e.json&&!Be.call(r,n)&&Be.call(t,n)&&(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,j(e,"duplicated mapping key")),Uh(t,n,o),delete r[n];return t}function ls(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 H(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;pt(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(Ee(n))for(ls(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||pe(r)))}function us(e,t){t===1?e.result+=" ":t>1&&(e.result+=Q.repeat(`
|
|
395
|
+
`,t-1))}function gS(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),pe(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),pe(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),pe(n)||r&&zt(n))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),pe(i))break}else{if(e.position===e.lineStart&&ti(e)||r&&zt(p))break;if(Ee(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,H(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&&(Ve(e,o,a,!1),us(e,e.line-c),o=a=e.position,s=!1),pt(p)||(a=e.position+1),p=e.input.charCodeAt(++e.position)}return Ve(e,o,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}function vS(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(Ve(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 Ee(r)?(Ve(e,i,n,!0),us(e,H(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 yS(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 Ve(e,r,e.position,!0),e.position++,!0;if(s===92){if(Ve(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),Ee(s))H(e,!1,t);else if(s<256&&Lh[s])e.result+=Rh[s],e.position++;else if((a=fS(s))>0){for(n=a,o=0;n>0;n--)s=e.input.charCodeAt(++e.position),(a=dS(s))>=0?o=(o<<4)+a:j(e,"expected hexadecimal character");e.result+=mS(o),e.position++}else j(e,"unknown escape sequence");r=i=e.position}else Ee(s)?(Ve(e,r,i,!0),us(e,H(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 bS(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,E,x;if(x=e.input.charCodeAt(e.position),x===91)u=93,p=!1,s=[];else if(x===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),x=e.input.charCodeAt(++e.position);x!==0;){if(H(e,!0,t),x=e.input.charCodeAt(e.position),x===u)return e.position++,e.tag=a,e.anchor=c,e.kind=p?"mapping":"sequence",e.result=s,!0;r?x===44&&j(e,"expected the node content, but found ','"):j(e,"missed comma between flow collection entries"),v=m=E=null,d=f=!1,x===63&&(l=e.input.charCodeAt(e.position+1),pe(l)&&(d=f=!0,e.position++,H(e,!0,t))),i=e.line,n=e.lineStart,o=e.position,Ct(e,t,Hr,!1,!0),v=e.tag,m=e.result,H(e,!0,t),x=e.input.charCodeAt(e.position),(f||e.line===i)&&x===58&&(d=!0,x=e.input.charCodeAt(++e.position),H(e,!0,t),Ct(e,t,Hr,!1,!0),E=e.result),p?Nt(e,s,g,v,m,E,i,n,o):d?s.push(Nt(e,null,g,v,m,E,i,n,o)):s.push(m),H(e,!0,t),x=e.input.charCodeAt(e.position),x===44?(r=!0,x=e.input.charCodeAt(++e.position)):r=!1}j(e,"unexpected end of the stream within a flow collection")}function _S(e,t){var r,i,n=ts,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)ts===n?n=d===43?Xm:sS:j(e,"repeat of a chomping mode identifier");else if((u=pS(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(pt(d)){do d=e.input.charCodeAt(++e.position);while(pt(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Ee(d)&&d!==0)}for(;d!==0;){for(ls(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),Ee(d)){c++;continue}if(e.lineIndent<s){n===Xm?e.result+=Q.repeat(`
|
|
396
|
+
`,o?1+c:c):n===ts&&o&&(e.result+=`
|
|
397
|
+
`);break}for(i?pt(d)?(l=!0,e.result+=Q.repeat(`
|
|
398
|
+
`,o?1+c:c)):l?(l=!1,e.result+=Q.repeat(`
|
|
399
|
+
`,c+1)):c===0?o&&(e.result+=" "):e.result+=Q.repeat(`
|
|
400
|
+
`,c):e.result+=Q.repeat(`
|
|
401
|
+
`,o?1+c:c),o=!0,a=!0,c=0,r=e.position;!Ee(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Ve(e,r,e.position,!1)}return!0}function rh(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),!pe(a))));){if(s=!0,e.position++,H(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Ct(e,t,Ch,!1,!0),o.push(e.result),H(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 $S(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,E=!1,x;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),x=e.input.charCodeAt(e.position);x!==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,(x===63||x===58)&&pe(i))x===63?(v&&(Nt(e,d,f,p,g,null,a,s,c),p=g=m=null),E=!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,x=i;else{if(a=e.line,s=e.lineStart,c=e.position,!Ct(e,r,Nh,!1,!0))break;if(e.line===o){for(x=e.input.charCodeAt(e.position);pt(x);)x=e.input.charCodeAt(++e.position);if(x===58)x=e.input.charCodeAt(++e.position),pe(x)||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),E=!0,v=!1,n=!1,p=e.tag,g=e.result;else if(E)j(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=u,!0}else if(E)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),H(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&x!==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),E&&(e.tag=l,e.anchor=u,e.kind="mapping",e.result=d),E}function xS(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&&!pe(a);)a===33&&(i?j(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),jh.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),uS.test(o)&&j(e,"tag suffix cannot contain flow indicator characters")}o&&!Dh.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:Be.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 wS(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&&!pe(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 kS(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&&!pe(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),Be.call(e.anchorMap,r)||j(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],H(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||Ch===r,i&&H(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;xS(e)||wS(e);)H(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||Nh===r?m=t:m=t+1,v=e.position-e.lineStart,c===1?s&&(rh(e,v)||$S(e,v,m))||bS(e,m)?u=!0:(a&&_S(e,m)||vS(e,m)||yS(e,m)?u=!0:kS(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&j(e,"alias node should not have any properties")):gS(e,m,Hr===r)&&(u=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&rh(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(Be.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 SS(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&&(H(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&&!pe(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(;pt(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Ee(a));break}if(Ee(a))break;for(r=e.position;a!==0&&!pe(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}a!==0&&ls(e),Be.call(th,i)?th[i](e,i,n):Xr(e,'unknown document directive "'+i+'"')}if(H(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,H(e,!0,-1)):o&&j(e,"directives end mark is expected"),Ct(e,e.lineIndent-1,Yr,!1,!0),H(e,!0,-1),e.checkLineBreaks&&lS.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,H(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 Fh(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
402
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new hS(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;)SS(r);return r.documents}function IS(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Fh(e,r);if(typeof t!="function")return i;for(var n=0,o=i.length;n<o;n+=1)t(i[n])}function OS(e,t){var r=Fh(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ce("expected a single document in the stream, but found more")}}var AS=IS,ES=OS,Zh={loadAll:AS,load:ES},qh=Object.prototype.toString,Vh=Object.prototype.hasOwnProperty,ds=65279,TS=9,On=10,PS=13,zS=32,NS=33,CS=34,rs=35,jS=37,DS=38,US=39,LS=42,Bh=44,RS=45,Qr=58,MS=61,FS=62,ZS=63,qS=64,Jh=91,Kh=93,VS=96,Gh=123,BS=124,Wh=125,oe={};oe[0]="\\0";oe[7]="\\a";oe[8]="\\b";oe[9]="\\t";oe[10]="\\n";oe[11]="\\v";oe[12]="\\f";oe[13]="\\r";oe[27]="\\e";oe[34]='\\"';oe[92]="\\\\";oe[133]="\\N";oe[160]="\\_";oe[8232]="\\L";oe[8233]="\\P";var JS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],KS=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function GS(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&&Vh.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[a]=s;return r}function WS(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 ce("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Q.repeat("0",i-t.length)+t}var HS=1,An=2;function YS(e){this.schema=e.schema||cs,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Q.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=GS(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:HS,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 ih(e,t){for(var r=Q.repeat(" ",t),i=0,n=-1,o="",a,s=e.length;i<s;)n=e.indexOf(`
|
|
403
|
+
`,i),n===-1?(a=e.slice(i),i=s):(a=e.slice(i,n+1),i=n+1),a.length&&a!==`
|
|
404
|
+
`&&(o+=r),o+=a;return o}function is(e,t){return`
|
|
405
|
+
`+Q.repeat(" ",e.indent*t)}function XS(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===zS||e===TS}function En(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ds||65536<=e&&e<=1114111}function oh(e){return En(e)&&e!==ds&&e!==PS&&e!==On}function ah(e,t,r){var i=oh(e),n=i&&!ei(e);return(r?i:i&&e!==Bh&&e!==Jh&&e!==Kh&&e!==Gh&&e!==Wh)&&e!==rs&&!(t===Qr&&!n)||oh(t)&&!ei(t)&&e===rs||t===Qr&&n}function QS(e){return En(e)&&e!==ds&&!ei(e)&&e!==RS&&e!==ZS&&e!==Qr&&e!==Bh&&e!==Jh&&e!==Kh&&e!==Gh&&e!==Wh&&e!==rs&&e!==DS&&e!==LS&&e!==NS&&e!==BS&&e!==MS&&e!==FS&&e!==US&&e!==CS&&e!==jS&&e!==qS&&e!==VS}function e0(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 Hh(e){var t=/^\n* /;return t.test(e)}var Yh=1,os=2,Xh=3,Qh=4,Pt=5;function t0(e,t,r,i,n,o,a,s){var c,l=0,u=null,d=!1,f=!1,p=i!==-1,g=-1,m=QS(Sn(e,0))&&e0(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&&ah(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&&ah(l,u,s),u=l}f=f||p&&c-g-1>i&&e[g+1]!==" "}return!d&&!f?m&&!a&&!n(e)?Yh:o===An?Pt:os:r>9&&Hh(e)?Pt:a?o===An?Pt:os:f?Qh:Xh}function n0(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===An?'""':"''";if(!e.noCompatMode&&(JS.indexOf(t)!==-1||KS.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 XS(e,l)}switch(t0(t,s,e.indent,a,c,e.quotingType,e.forceQuotes&&!i,n)){case Yh:return t;case os:return"'"+t.replace(/'/g,"''")+"'";case Xh:return"|"+sh(t,e.indent)+ch(ih(t,o));case Qh:return">"+sh(t,e.indent)+ch(ih(r0(t,a),o));case Pt:return'"'+i0(t)+'"';default:throw new ce("impossible error: invalid scalar style")}})()}function sh(e,t){var r=Hh(e)?String(t):"",i=e[e.length-1]===`
|
|
406
|
+
`,n=i&&(e[e.length-2]===`
|
|
407
|
+
`||e===`
|
|
408
|
+
`),o=n?"+":i?"":"-";return r+o+`
|
|
409
|
+
`}function ch(e){return e[e.length-1]===`
|
|
410
|
+
`?e.slice(0,-1):e}function r0(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var l=e.indexOf(`
|
|
411
|
+
`);return l=l!==-1?l:e.length,r.lastIndex=l,lh(e.slice(0,l),t)})(),n=e[0]===`
|
|
412
|
+
`||e[0]===" ",o,a;a=r.exec(e);){var s=a[1],c=a[2];o=c[0]===" ",i+=s+(!n&&!o&&c!==""?`
|
|
413
|
+
`:"")+lh(c,t),n=o}return i}function lh(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+=`
|
|
414
|
+
`+e.slice(n,o),n=o+1),a=s;return c+=`
|
|
415
|
+
`,e.length-n>t&&a>n?c+=e.slice(n,a)+`
|
|
416
|
+
`+e.slice(a+1):c+=e.slice(n),c.slice(1)}function i0(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Sn(e,n),i=oe[r],!i&&En(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||WS(r);return t}function o0(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)),(Ue(e,t,s,!1,!1)||typeof s>"u"&&Ue(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function uh(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)),(Ue(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Ue(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=is(e,t)),e.dump&&On===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}function a0(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)),Ue(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ue(e,t,l,!1,!1)&&(u+=e.dump,i+=u));e.tag=n,e.dump="{"+i+"}"}function s0(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 ce("sortKeys must be a boolean or a function");for(s=0,c=a.length;s<c;s+=1)f="",(!i||n!=="")&&(f+=is(e,t)),l=a[s],u=r[l],e.replacer&&(u=e.replacer.call(r,l,u)),Ue(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+=is(e,t)),Ue(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 dh(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,qh.call(s.represent)==="[object Function]")i=s.represent(t,c);else if(Vh.call(s.represent,c))i=s.represent[c](t,c);else throw new ce("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}function Ue(e,t,r,i,n,o,a){e.tag=null,e.dump=r,dh(e,r,!1)||dh(e,r,!0);var s=qh.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?(s0(e,t,e.dump,n),f&&(e.dump="&ref_"+d+e.dump)):(a0(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?uh(e,t-1,e.dump,n):uh(e,t,e.dump,n),f&&(e.dump="&ref_"+d+e.dump)):(o0(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&n0(e,e.dump,t,o,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ce("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 c0(e,t){var r=[],i=[],n,o;for(as(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}function as(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)as(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)as(e[i[n]],t,r)}function l0(e,t){t=t||{};var r=new YS(t);r.noRefs||c0(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Ue(r,0,i,!0,!0)?r.dump+`
|
|
417
|
+
`:""}var u0=l0,d0={dump:u0};function fs(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 f0=te,p0=mh,m0=yh,h0=wh,g0=kh,v0=cs,y0=Zh.load,b0=Zh.loadAll,_0=d0.dump,$0=ce,x0={binary:Eh,float:xh,map:vh,null:bh,pairs:Ph,set:zh,timestamp:Oh,bool:_h,int:$h,merge:Ah,omap:Th,seq:gh,str:hh},w0=fs("safeLoad","load"),k0=fs("safeLoadAll","loadAll"),S0=fs("safeDump","dump"),Tn={Type:f0,Schema:p0,FAILSAFE_SCHEMA:m0,JSON_SCHEMA:h0,CORE_SCHEMA:g0,DEFAULT_SCHEMA:v0,load:y0,loadAll:b0,dump:_0,YAMLException:$0,types:x0,safeLoad:w0,safeLoadAll:k0,safeDump:S0};var fg=Hm(dg(),1),{program:n1,createCommand:r1,createArgument:i1,createOption:o1,CommanderError:a1,InvalidArgumentError:s1,InvalidOptionArgumentError:c1,Command:pg,Argument:l1,Option:u1,Help:d1}=fg.default;var mg=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
|
|
418
|
+
cli_contracts: 0.1.0
|
|
419
|
+
|
|
420
|
+
info:
|
|
421
|
+
title: litedbmodel-gen CLI
|
|
422
|
+
version: 0.2.0
|
|
423
|
+
description: >-
|
|
424
|
+
embedoc-based model code generator for litedbmodel.
|
|
425
|
+
Parses SQL DDL (PostgreSQL / MySQL / SQLite) and generates
|
|
426
|
+
TypeScript column definitions that stay in sync with your schema.
|
|
427
|
+
license:
|
|
428
|
+
name: MIT
|
|
429
|
+
contact:
|
|
430
|
+
name: foo-ogawa
|
|
431
|
+
url: https://github.com/foo-ogawa/litedbmodel.ts
|
|
432
|
+
|
|
433
|
+
artifact_slots:
|
|
434
|
+
sql-schemas:
|
|
435
|
+
direction: read
|
|
436
|
+
description: SQL DDL files for schema parsing
|
|
437
|
+
embedoc-config:
|
|
438
|
+
direction: readwrite
|
|
439
|
+
description: embedoc.config.yaml configuration (read and updated during init)
|
|
440
|
+
generated-models:
|
|
441
|
+
direction: write
|
|
442
|
+
description: Generated TypeScript model definitions
|
|
443
|
+
|
|
444
|
+
command_sets:
|
|
445
|
+
litedbmodel-gen:
|
|
446
|
+
summary: embedoc-based model code generator for litedbmodel.
|
|
447
|
+
executable: litedbmodel-gen
|
|
448
|
+
|
|
449
|
+
global_options:
|
|
450
|
+
- name: version
|
|
451
|
+
aliases: [V]
|
|
452
|
+
description: Print version and exit.
|
|
453
|
+
schema:
|
|
454
|
+
type: boolean
|
|
455
|
+
|
|
456
|
+
- name: help
|
|
457
|
+
aliases: [h]
|
|
458
|
+
description: Show help and exit.
|
|
459
|
+
schema:
|
|
460
|
+
type: boolean
|
|
461
|
+
|
|
462
|
+
commands:
|
|
463
|
+
# \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
|
|
464
|
+
init:
|
|
465
|
+
summary: Set up litedbmodel-gen in an embedoc project.
|
|
466
|
+
description: >-
|
|
467
|
+
Registers the sql_schema datasource, litedbmodel_columns renderer,
|
|
468
|
+
and model.hbs template into an existing embedoc project.
|
|
469
|
+
Copies the starter Handlebars template, updates
|
|
470
|
+
.embedoc/renderers/index.ts and .embedoc/datasources/index.ts,
|
|
471
|
+
and adds a schema datasource entry to embedoc.config.yaml.
|
|
472
|
+
usage:
|
|
473
|
+
- litedbmodel-gen init
|
|
474
|
+
- litedbmodel-gen init path/to/embedoc.config.yaml
|
|
475
|
+
|
|
476
|
+
arguments:
|
|
477
|
+
- name: config
|
|
478
|
+
index: 0
|
|
479
|
+
required: false
|
|
480
|
+
description: >-
|
|
481
|
+
Path to embedoc.config.yaml.
|
|
482
|
+
Defaults to embedoc.config.yaml in the current directory.
|
|
483
|
+
schema:
|
|
484
|
+
type: string
|
|
485
|
+
default: embedoc.config.yaml
|
|
486
|
+
file:
|
|
487
|
+
mode: read
|
|
488
|
+
exists: true
|
|
489
|
+
media_type: application/yaml
|
|
490
|
+
encoding: utf-8
|
|
491
|
+
|
|
492
|
+
exits:
|
|
493
|
+
'0':
|
|
494
|
+
description: >-
|
|
495
|
+
litedbmodel-gen set up successfully.
|
|
496
|
+
Template copied, renderers/datasources registered,
|
|
497
|
+
and embedoc config updated.
|
|
498
|
+
stdout:
|
|
499
|
+
format: text
|
|
500
|
+
files:
|
|
501
|
+
- path: .embedoc/templates/model.hbs
|
|
502
|
+
required: false
|
|
503
|
+
media_type: text/x-handlebars-template
|
|
504
|
+
encoding: utf-8
|
|
505
|
+
description: Starter Handlebars template for model files (skipped if already exists).
|
|
506
|
+
|
|
507
|
+
'1':
|
|
508
|
+
description: >-
|
|
509
|
+
Setup failed due to an unexpected file operation error.
|
|
510
|
+
stderr:
|
|
511
|
+
format: text
|
|
512
|
+
|
|
513
|
+
'3':
|
|
514
|
+
description: >-
|
|
515
|
+
Input validation failed. The specified embedoc.config.yaml
|
|
516
|
+
path was not found. Run "npx embedoc init" first.
|
|
517
|
+
stderr:
|
|
518
|
+
format: json
|
|
519
|
+
|
|
520
|
+
x-agent:
|
|
521
|
+
riskLevel: low
|
|
522
|
+
requiresConfirmation: false
|
|
523
|
+
idempotent: true
|
|
524
|
+
sideEffects:
|
|
525
|
+
- file_write
|
|
526
|
+
recommendedBeforeUse:
|
|
527
|
+
- Run "npx embedoc init" first to create embedoc.config.yaml.
|
|
528
|
+
|
|
529
|
+
# \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
|
|
530
|
+
audit:
|
|
531
|
+
summary: Audit litedbmodel usage code for common anti-patterns.
|
|
532
|
+
description: >-
|
|
533
|
+
Scans TypeScript source files that import or use litedbmodel models,
|
|
534
|
+
detecting anti-patterns such as loop-insert (use createMany),
|
|
535
|
+
delete-then-reinsert (use upsert), N+1 queries, missing idempotency
|
|
536
|
+
guards, missing UNIQUE constraints for onConflict, over-broad deletes,
|
|
537
|
+
and missing forUpdate in concurrent-write paths.
|
|
538
|
+
Returns structured findings with severity ratings and remediation
|
|
539
|
+
guidance referencing the correct litedbmodel API.
|
|
540
|
+
usage:
|
|
541
|
+
- litedbmodel-gen audit
|
|
542
|
+
- litedbmodel-gen audit src/
|
|
543
|
+
- litedbmodel-gen audit src/services/user-service.ts --fail-on warning --report-format text
|
|
544
|
+
|
|
545
|
+
arguments:
|
|
546
|
+
- name: target
|
|
547
|
+
index: 0
|
|
548
|
+
required: false
|
|
549
|
+
description: >-
|
|
550
|
+
File or directory path to audit.
|
|
551
|
+
Defaults to the current working directory.
|
|
552
|
+
schema:
|
|
553
|
+
type: string
|
|
554
|
+
default: "."
|
|
555
|
+
|
|
556
|
+
options:
|
|
557
|
+
- name: adapter
|
|
558
|
+
description: LLM adapter to use for the audit.
|
|
559
|
+
schema:
|
|
560
|
+
type: string
|
|
561
|
+
enum: [mock, cursor, claude, openai, gemini]
|
|
562
|
+
default: mock
|
|
563
|
+
|
|
564
|
+
- name: model
|
|
565
|
+
description: Model name override for the selected adapter.
|
|
566
|
+
schema:
|
|
567
|
+
type: string
|
|
568
|
+
|
|
569
|
+
- name: dry-run
|
|
570
|
+
description: Output the constructed prompt without calling the LLM.
|
|
571
|
+
schema:
|
|
572
|
+
type: boolean
|
|
573
|
+
default: false
|
|
574
|
+
|
|
575
|
+
- name: fail-on
|
|
576
|
+
description: >-
|
|
577
|
+
Minimum finding severity that causes exit code 10.
|
|
578
|
+
Findings below this threshold are still reported.
|
|
579
|
+
schema:
|
|
580
|
+
type: string
|
|
581
|
+
enum: [warning, error, critical]
|
|
582
|
+
default: error
|
|
583
|
+
|
|
584
|
+
- name: output
|
|
585
|
+
aliases: [o]
|
|
586
|
+
description: Write the report to a file instead of stdout.
|
|
587
|
+
schema:
|
|
588
|
+
type: string
|
|
589
|
+
file:
|
|
590
|
+
mode: write
|
|
591
|
+
|
|
592
|
+
- name: report-format
|
|
593
|
+
description: Output format for the audit report.
|
|
594
|
+
schema:
|
|
595
|
+
type: string
|
|
596
|
+
enum: [json, text, yaml]
|
|
597
|
+
default: json
|
|
598
|
+
|
|
599
|
+
x-agent:
|
|
600
|
+
riskLevel: low
|
|
601
|
+
requiresConfirmation: false
|
|
602
|
+
idempotent: true
|
|
603
|
+
sideEffects: [network]
|
|
604
|
+
sideEffectNote: >-
|
|
605
|
+
Makes network calls to the configured LLM provider when adapter is
|
|
606
|
+
not "mock". Writes to the filesystem only when --output is specified.
|
|
607
|
+
safeDryRunOption: dry-run
|
|
608
|
+
expectedDurationMs: 120000
|
|
609
|
+
retryableExitCodes: [1, 12]
|
|
610
|
+
|
|
611
|
+
exits:
|
|
612
|
+
'0':
|
|
613
|
+
description: >-
|
|
614
|
+
Audit completed. No findings at or above the --fail-on threshold.
|
|
615
|
+
stdout:
|
|
616
|
+
format: json
|
|
617
|
+
schema:
|
|
618
|
+
$ref: '#/components/schemas/AgentAuditResult'
|
|
619
|
+
'1':
|
|
620
|
+
description: General error (unexpected exception or I/O failure).
|
|
621
|
+
stderr:
|
|
622
|
+
format: text
|
|
623
|
+
'3':
|
|
624
|
+
description: >-
|
|
625
|
+
Input validation failed (target path not found, no TypeScript
|
|
626
|
+
files found at path).
|
|
627
|
+
stderr:
|
|
628
|
+
format: json
|
|
629
|
+
'10':
|
|
630
|
+
description: >-
|
|
631
|
+
Blocking findings detected at or above the --fail-on threshold.
|
|
632
|
+
stdout:
|
|
633
|
+
format: json
|
|
634
|
+
schema:
|
|
635
|
+
$ref: '#/components/schemas/AgentAuditResult'
|
|
636
|
+
'11':
|
|
637
|
+
description: agent-contracts-runtime package is not installed.
|
|
638
|
+
stderr:
|
|
639
|
+
format: json
|
|
640
|
+
'12':
|
|
641
|
+
description: >-
|
|
642
|
+
Adapter initialization failed (missing API key or invalid
|
|
643
|
+
configuration).
|
|
644
|
+
stderr:
|
|
645
|
+
format: json
|
|
646
|
+
|
|
647
|
+
# \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
|
|
648
|
+
implement:
|
|
649
|
+
summary: Implement a feature using litedbmodel best practices.
|
|
650
|
+
description: >-
|
|
651
|
+
Reads the project's model definitions, then implements the described
|
|
652
|
+
feature directly in the target source file(s), applying litedbmodel
|
|
653
|
+
best-practice patterns: createMany for batch inserts, upsert with
|
|
654
|
+
onConflict/onConflictUpdate for idempotent writes, forUpdate for
|
|
655
|
+
concurrent-safe reads, and DBModel.transaction for multi-step
|
|
656
|
+
operations. Avoids all eight common litedbmodel anti-patterns.
|
|
657
|
+
Requires an agentic adapter (claude/cursor) that can read and
|
|
658
|
+
write project files.
|
|
659
|
+
usage:
|
|
660
|
+
- >-
|
|
661
|
+
litedbmodel-gen implement
|
|
662
|
+
"Add syncNutrientSummary in src/services/meal.service.ts"
|
|
663
|
+
--target src/services/meal.service.ts
|
|
664
|
+
--models "src/models/**/*.ts"
|
|
665
|
+
--adapter claude
|
|
666
|
+
- >-
|
|
667
|
+
litedbmodel-gen implement
|
|
668
|
+
"Add bulk upsert for order items"
|
|
669
|
+
--target src/services/order.service.ts
|
|
670
|
+
--adapter claude
|
|
671
|
+
|
|
672
|
+
arguments:
|
|
673
|
+
- name: description
|
|
674
|
+
index: 0
|
|
675
|
+
required: true
|
|
676
|
+
description: >-
|
|
677
|
+
Natural-language description of the feature to implement.
|
|
678
|
+
Should specify the function name, target file, and business logic.
|
|
679
|
+
schema:
|
|
680
|
+
type: string
|
|
681
|
+
|
|
682
|
+
options:
|
|
683
|
+
- name: target
|
|
684
|
+
aliases: [t]
|
|
685
|
+
description: >-
|
|
686
|
+
Target source file(s) to create or edit. The agent reads these
|
|
687
|
+
files to understand existing code and writes the implementation
|
|
688
|
+
to them.
|
|
689
|
+
schema:
|
|
690
|
+
type: string
|
|
691
|
+
|
|
692
|
+
- name: models
|
|
693
|
+
description: >-
|
|
694
|
+
Glob pattern for model definition files. The agent reads these
|
|
695
|
+
to understand available models, columns, and relations.
|
|
696
|
+
schema:
|
|
697
|
+
type: string
|
|
698
|
+
default: "models/**/*.ts"
|
|
699
|
+
|
|
700
|
+
- name: adapter
|
|
701
|
+
description: LLM adapter to use for code generation.
|
|
702
|
+
schema:
|
|
703
|
+
type: string
|
|
704
|
+
enum: [mock, cursor, claude, openai, gemini]
|
|
705
|
+
default: mock
|
|
706
|
+
|
|
707
|
+
- name: model
|
|
708
|
+
description: Model name override for the selected adapter.
|
|
709
|
+
schema:
|
|
710
|
+
type: string
|
|
711
|
+
|
|
712
|
+
- name: dry-run
|
|
713
|
+
description: Output the constructed prompt without calling the LLM.
|
|
714
|
+
schema:
|
|
715
|
+
type: boolean
|
|
716
|
+
default: false
|
|
717
|
+
|
|
718
|
+
- name: fail-on
|
|
719
|
+
description: >-
|
|
720
|
+
Minimum finding severity that causes exit code 10.
|
|
721
|
+
Design concerns (info/warning) are still reported at exit 0.
|
|
722
|
+
schema:
|
|
723
|
+
type: string
|
|
724
|
+
enum: [warning, error, critical]
|
|
725
|
+
default: error
|
|
726
|
+
|
|
727
|
+
- name: output
|
|
728
|
+
aliases: [o]
|
|
729
|
+
description: Write the report to a file instead of stdout.
|
|
730
|
+
schema:
|
|
731
|
+
type: string
|
|
732
|
+
file:
|
|
733
|
+
mode: write
|
|
734
|
+
|
|
735
|
+
- name: report-format
|
|
736
|
+
description: Output format for the implementation report.
|
|
737
|
+
schema:
|
|
738
|
+
type: string
|
|
739
|
+
enum: [json, text, yaml]
|
|
740
|
+
default: json
|
|
741
|
+
|
|
742
|
+
x-agent:
|
|
743
|
+
riskLevel: high
|
|
744
|
+
requiresConfirmation: true
|
|
745
|
+
idempotent: false
|
|
746
|
+
sideEffects: [network, filesystem_write]
|
|
747
|
+
sideEffectNote: >-
|
|
748
|
+
The agent reads project files and writes implementation code
|
|
749
|
+
directly to the target source file(s). Uses an agentic adapter
|
|
750
|
+
(claude/cursor) with file read/write tools.
|
|
751
|
+
safeDryRunOption: dry-run
|
|
752
|
+
expectedDurationMs: 120000
|
|
753
|
+
retryableExitCodes: [1, 12]
|
|
754
|
+
|
|
755
|
+
exits:
|
|
756
|
+
'0':
|
|
757
|
+
description: >-
|
|
758
|
+
Implementation written to target files successfully with no
|
|
759
|
+
design concerns at or above the --fail-on threshold.
|
|
760
|
+
stdout:
|
|
761
|
+
format: json
|
|
762
|
+
schema:
|
|
763
|
+
$ref: '#/components/schemas/LitedbmodelImplementResult'
|
|
764
|
+
'1':
|
|
765
|
+
description: General error (unexpected exception or I/O failure).
|
|
766
|
+
stderr:
|
|
767
|
+
format: text
|
|
768
|
+
'3':
|
|
769
|
+
description: >-
|
|
770
|
+
Input validation failed (missing description or unreadable
|
|
771
|
+
model files).
|
|
772
|
+
stderr:
|
|
773
|
+
format: json
|
|
774
|
+
'10':
|
|
775
|
+
description: >-
|
|
776
|
+
Implementation written but design concerns at or above the
|
|
777
|
+
--fail-on threshold were detected.
|
|
778
|
+
stdout:
|
|
779
|
+
format: json
|
|
780
|
+
schema:
|
|
781
|
+
$ref: '#/components/schemas/LitedbmodelImplementResult'
|
|
782
|
+
'11':
|
|
783
|
+
description: agent-contracts-runtime package is not installed.
|
|
784
|
+
stderr:
|
|
785
|
+
format: json
|
|
786
|
+
'12':
|
|
787
|
+
description: >-
|
|
788
|
+
Adapter initialization failed (missing API key or invalid
|
|
789
|
+
configuration).
|
|
790
|
+
stderr:
|
|
791
|
+
format: json
|
|
792
|
+
|
|
793
|
+
components:
|
|
794
|
+
schemas:
|
|
795
|
+
AgentEvidence:
|
|
796
|
+
type: object
|
|
797
|
+
required: [type, content]
|
|
798
|
+
properties:
|
|
799
|
+
type:
|
|
800
|
+
type: string
|
|
801
|
+
description: Evidence category (e.g. code_snippet, log_line, metric).
|
|
802
|
+
content:
|
|
803
|
+
type: string
|
|
804
|
+
description: The evidence body.
|
|
805
|
+
source:
|
|
806
|
+
type: string
|
|
807
|
+
description: File path, URL, or identifier of the evidence source.
|
|
808
|
+
|
|
809
|
+
AgentFinding:
|
|
810
|
+
type: object
|
|
811
|
+
required: [severity, category, message]
|
|
812
|
+
properties:
|
|
813
|
+
id:
|
|
814
|
+
type: string
|
|
815
|
+
description: Optional stable identifier for the finding.
|
|
816
|
+
severity:
|
|
817
|
+
type: string
|
|
818
|
+
enum: [info, warning, error, critical]
|
|
819
|
+
category:
|
|
820
|
+
type: string
|
|
821
|
+
description: Domain-specific vocabulary label (e.g. LOOP_CREATE, N_PLUS_ONE).
|
|
822
|
+
target:
|
|
823
|
+
type: string
|
|
824
|
+
description: Symbol, class, or function where the finding applies.
|
|
825
|
+
location:
|
|
826
|
+
type: string
|
|
827
|
+
description: File path and optional line reference.
|
|
828
|
+
message:
|
|
829
|
+
type: string
|
|
830
|
+
description: Human-readable description of the finding.
|
|
831
|
+
recommendation:
|
|
832
|
+
type: string
|
|
833
|
+
description: Actionable fix referencing the correct litedbmodel API.
|
|
834
|
+
confidence:
|
|
835
|
+
type: number
|
|
836
|
+
minimum: 0
|
|
837
|
+
maximum: 1
|
|
838
|
+
description: Model confidence in the finding (0\u20131).
|
|
839
|
+
evidence:
|
|
840
|
+
type: array
|
|
841
|
+
items:
|
|
842
|
+
$ref: '#/components/schemas/AgentEvidence'
|
|
843
|
+
details:
|
|
844
|
+
type: object
|
|
845
|
+
description: Arbitrary additional structured detail.
|
|
846
|
+
|
|
847
|
+
AgentRecommendedAction:
|
|
848
|
+
type: object
|
|
849
|
+
required: [kind, title]
|
|
850
|
+
properties:
|
|
851
|
+
kind:
|
|
852
|
+
type: string
|
|
853
|
+
enum: [run_command, edit_file, review, confirm, block, ignore]
|
|
854
|
+
title:
|
|
855
|
+
type: string
|
|
856
|
+
description: Short imperative label for the action.
|
|
857
|
+
command:
|
|
858
|
+
type: string
|
|
859
|
+
description: Shell command to run (for kind=run_command).
|
|
860
|
+
target:
|
|
861
|
+
type: string
|
|
862
|
+
description: File or symbol to edit/review.
|
|
863
|
+
rationale:
|
|
864
|
+
type: string
|
|
865
|
+
description: Why this action is recommended.
|
|
866
|
+
|
|
867
|
+
AgentAuditResult:
|
|
868
|
+
type: object
|
|
869
|
+
required: [summary, riskLevel, findings]
|
|
870
|
+
properties:
|
|
871
|
+
summary:
|
|
872
|
+
type: string
|
|
873
|
+
description: One-paragraph summary of the audit result.
|
|
874
|
+
riskLevel:
|
|
875
|
+
type: string
|
|
876
|
+
enum: [low, medium, high, critical]
|
|
877
|
+
description: Overall risk level reflecting the highest-severity finding.
|
|
878
|
+
findings:
|
|
879
|
+
type: array
|
|
880
|
+
items:
|
|
881
|
+
$ref: '#/components/schemas/AgentFinding'
|
|
882
|
+
recommendedActions:
|
|
883
|
+
type: array
|
|
884
|
+
items:
|
|
885
|
+
$ref: '#/components/schemas/AgentRecommendedAction'
|
|
886
|
+
metadata:
|
|
887
|
+
type: object
|
|
888
|
+
properties:
|
|
889
|
+
tool:
|
|
890
|
+
type: string
|
|
891
|
+
command:
|
|
892
|
+
type: string
|
|
893
|
+
version:
|
|
894
|
+
type: string
|
|
895
|
+
generatedAt:
|
|
896
|
+
type: string
|
|
897
|
+
adapter:
|
|
898
|
+
type: string
|
|
899
|
+
model:
|
|
900
|
+
type: string
|
|
901
|
+
|
|
902
|
+
FileChange:
|
|
903
|
+
type: object
|
|
904
|
+
required: [path, action]
|
|
905
|
+
properties:
|
|
906
|
+
path:
|
|
907
|
+
type: string
|
|
908
|
+
description: Relative file path that was created or modified.
|
|
909
|
+
action:
|
|
910
|
+
type: string
|
|
911
|
+
enum: [created, updated]
|
|
912
|
+
description: Whether the file was newly created or updated.
|
|
913
|
+
rationale:
|
|
914
|
+
type: string
|
|
915
|
+
description: Why this file was changed.
|
|
916
|
+
|
|
917
|
+
LitedbmodelImplementResult:
|
|
918
|
+
allOf:
|
|
919
|
+
- $ref: '#/components/schemas/AgentAuditResult'
|
|
920
|
+
- type: object
|
|
921
|
+
required: [changedFiles]
|
|
922
|
+
properties:
|
|
923
|
+
changedFiles:
|
|
924
|
+
type: array
|
|
925
|
+
description: Files that the agent created or modified.
|
|
926
|
+
items:
|
|
927
|
+
$ref: '#/components/schemas/FileChange'
|
|
928
|
+
dependencies:
|
|
929
|
+
type: array
|
|
930
|
+
description: npm packages required but not yet in the project.
|
|
931
|
+
items:
|
|
932
|
+
type: string
|
|
933
|
+
notes:
|
|
934
|
+
type: string
|
|
935
|
+
description: Additional integration instructions.
|
|
936
|
+
`,hg=`{
|
|
937
|
+
"cli_contracts": "0.1.0",
|
|
938
|
+
"info": {
|
|
939
|
+
"title": "litedbmodel-gen CLI",
|
|
940
|
+
"version": "0.2.0",
|
|
941
|
+
"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.",
|
|
942
|
+
"license": {
|
|
943
|
+
"name": "MIT"
|
|
944
|
+
},
|
|
945
|
+
"contact": {
|
|
946
|
+
"name": "foo-ogawa",
|
|
947
|
+
"url": "https://github.com/foo-ogawa/litedbmodel.ts"
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
"artifact_slots": {
|
|
951
|
+
"sql-schemas": {
|
|
952
|
+
"direction": "read",
|
|
953
|
+
"description": "SQL DDL files for schema parsing"
|
|
954
|
+
},
|
|
955
|
+
"embedoc-config": {
|
|
956
|
+
"direction": "readwrite",
|
|
957
|
+
"description": "embedoc.config.yaml configuration (read and updated during init)"
|
|
958
|
+
},
|
|
959
|
+
"generated-models": {
|
|
960
|
+
"direction": "write",
|
|
961
|
+
"description": "Generated TypeScript model definitions"
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
"command_sets": {
|
|
965
|
+
"litedbmodel-gen": {
|
|
966
|
+
"summary": "embedoc-based model code generator for litedbmodel.",
|
|
967
|
+
"executable": "litedbmodel-gen",
|
|
968
|
+
"global_options": [
|
|
969
|
+
{
|
|
970
|
+
"name": "version",
|
|
971
|
+
"aliases": [
|
|
972
|
+
"V"
|
|
973
|
+
],
|
|
974
|
+
"description": "Print version and exit.",
|
|
975
|
+
"schema": {
|
|
976
|
+
"type": "boolean"
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"name": "help",
|
|
981
|
+
"aliases": [
|
|
982
|
+
"h"
|
|
983
|
+
],
|
|
984
|
+
"description": "Show help and exit.",
|
|
985
|
+
"schema": {
|
|
986
|
+
"type": "boolean"
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
],
|
|
990
|
+
"commands": {
|
|
991
|
+
"init": {
|
|
992
|
+
"summary": "Set up litedbmodel-gen in an embedoc project.",
|
|
993
|
+
"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.",
|
|
994
|
+
"usage": [
|
|
995
|
+
"litedbmodel-gen init",
|
|
996
|
+
"litedbmodel-gen init path/to/embedoc.config.yaml"
|
|
997
|
+
],
|
|
998
|
+
"arguments": [
|
|
999
|
+
{
|
|
1000
|
+
"name": "config",
|
|
1001
|
+
"index": 0,
|
|
1002
|
+
"required": false,
|
|
1003
|
+
"description": "Path to embedoc.config.yaml. Defaults to embedoc.config.yaml in the current directory.",
|
|
1004
|
+
"schema": {
|
|
1005
|
+
"type": "string",
|
|
1006
|
+
"default": "embedoc.config.yaml"
|
|
1007
|
+
},
|
|
1008
|
+
"file": {
|
|
1009
|
+
"mode": "read",
|
|
1010
|
+
"exists": true,
|
|
1011
|
+
"media_type": "application/yaml",
|
|
1012
|
+
"encoding": "utf-8"
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
],
|
|
1016
|
+
"exits": {
|
|
1017
|
+
"0": {
|
|
1018
|
+
"description": "litedbmodel-gen set up successfully. Template copied, renderers/datasources registered, and embedoc config updated.",
|
|
1019
|
+
"stdout": {
|
|
1020
|
+
"format": "text"
|
|
1021
|
+
},
|
|
1022
|
+
"files": [
|
|
1023
|
+
{
|
|
1024
|
+
"path": ".embedoc/templates/model.hbs",
|
|
1025
|
+
"required": false,
|
|
1026
|
+
"media_type": "text/x-handlebars-template",
|
|
1027
|
+
"encoding": "utf-8",
|
|
1028
|
+
"description": "Starter Handlebars template for model files (skipped if already exists)."
|
|
1029
|
+
}
|
|
1030
|
+
]
|
|
1031
|
+
},
|
|
1032
|
+
"1": {
|
|
1033
|
+
"description": "Setup failed due to an unexpected file operation error.",
|
|
1034
|
+
"stderr": {
|
|
1035
|
+
"format": "text"
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
"3": {
|
|
1039
|
+
"description": "Input validation failed. The specified embedoc.config.yaml path was not found. Run \\"npx embedoc init\\" first.",
|
|
1040
|
+
"stderr": {
|
|
1041
|
+
"format": "json"
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
"x-agent": {
|
|
1046
|
+
"riskLevel": "low",
|
|
1047
|
+
"requiresConfirmation": false,
|
|
1048
|
+
"idempotent": true,
|
|
1049
|
+
"sideEffects": [
|
|
1050
|
+
"file_write"
|
|
1051
|
+
],
|
|
1052
|
+
"recommendedBeforeUse": [
|
|
1053
|
+
"Run \\"npx embedoc init\\" first to create embedoc.config.yaml."
|
|
1054
|
+
]
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"audit": {
|
|
1058
|
+
"summary": "Audit litedbmodel usage code for common anti-patterns.",
|
|
1059
|
+
"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.",
|
|
1060
|
+
"usage": [
|
|
1061
|
+
"litedbmodel-gen audit",
|
|
1062
|
+
"litedbmodel-gen audit src/",
|
|
1063
|
+
"litedbmodel-gen audit src/services/user-service.ts --fail-on warning --report-format text"
|
|
1064
|
+
],
|
|
1065
|
+
"arguments": [
|
|
1066
|
+
{
|
|
1067
|
+
"name": "target",
|
|
1068
|
+
"index": 0,
|
|
1069
|
+
"required": false,
|
|
1070
|
+
"description": "File or directory path to audit. Defaults to the current working directory.",
|
|
1071
|
+
"schema": {
|
|
1072
|
+
"type": "string",
|
|
1073
|
+
"default": "."
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
],
|
|
1077
|
+
"options": [
|
|
1078
|
+
{
|
|
1079
|
+
"name": "adapter",
|
|
1080
|
+
"description": "LLM adapter to use for the audit.",
|
|
1081
|
+
"schema": {
|
|
1082
|
+
"type": "string",
|
|
1083
|
+
"enum": [
|
|
1084
|
+
"mock",
|
|
1085
|
+
"cursor",
|
|
1086
|
+
"claude",
|
|
1087
|
+
"openai",
|
|
1088
|
+
"gemini"
|
|
1089
|
+
],
|
|
1090
|
+
"default": "mock"
|
|
1091
|
+
}
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"name": "model",
|
|
1095
|
+
"description": "Model name override for the selected adapter.",
|
|
1096
|
+
"schema": {
|
|
1097
|
+
"type": "string"
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "dry-run",
|
|
1102
|
+
"description": "Output the constructed prompt without calling the LLM.",
|
|
1103
|
+
"schema": {
|
|
1104
|
+
"type": "boolean",
|
|
1105
|
+
"default": false
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
"name": "fail-on",
|
|
1110
|
+
"description": "Minimum finding severity that causes exit code 10. Findings below this threshold are still reported.",
|
|
1111
|
+
"schema": {
|
|
1112
|
+
"type": "string",
|
|
1113
|
+
"enum": [
|
|
1114
|
+
"warning",
|
|
1115
|
+
"error",
|
|
1116
|
+
"critical"
|
|
1117
|
+
],
|
|
1118
|
+
"default": "error"
|
|
1119
|
+
}
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"name": "output",
|
|
1123
|
+
"aliases": [
|
|
1124
|
+
"o"
|
|
1125
|
+
],
|
|
1126
|
+
"description": "Write the report to a file instead of stdout.",
|
|
1127
|
+
"schema": {
|
|
1128
|
+
"type": "string"
|
|
1129
|
+
},
|
|
1130
|
+
"file": {
|
|
1131
|
+
"mode": "write"
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
"name": "report-format",
|
|
1136
|
+
"description": "Output format for the audit report.",
|
|
1137
|
+
"schema": {
|
|
1138
|
+
"type": "string",
|
|
1139
|
+
"enum": [
|
|
1140
|
+
"json",
|
|
1141
|
+
"text",
|
|
1142
|
+
"yaml"
|
|
1143
|
+
],
|
|
1144
|
+
"default": "json"
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
],
|
|
1148
|
+
"x-agent": {
|
|
1149
|
+
"riskLevel": "low",
|
|
1150
|
+
"requiresConfirmation": false,
|
|
1151
|
+
"idempotent": true,
|
|
1152
|
+
"sideEffects": [
|
|
1153
|
+
"network"
|
|
1154
|
+
],
|
|
1155
|
+
"sideEffectNote": "Makes network calls to the configured LLM provider when adapter is not \\"mock\\". Writes to the filesystem only when --output is specified.",
|
|
1156
|
+
"safeDryRunOption": "dry-run",
|
|
1157
|
+
"expectedDurationMs": 120000,
|
|
1158
|
+
"retryableExitCodes": [
|
|
1159
|
+
1,
|
|
1160
|
+
12
|
|
1161
|
+
]
|
|
1162
|
+
},
|
|
1163
|
+
"exits": {
|
|
1164
|
+
"0": {
|
|
1165
|
+
"description": "Audit completed. No findings at or above the --fail-on threshold.",
|
|
1166
|
+
"stdout": {
|
|
1167
|
+
"format": "json",
|
|
1168
|
+
"schema": {
|
|
1169
|
+
"$ref": "#/components/schemas/AgentAuditResult"
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
},
|
|
1173
|
+
"1": {
|
|
1174
|
+
"description": "General error (unexpected exception or I/O failure).",
|
|
1175
|
+
"stderr": {
|
|
1176
|
+
"format": "text"
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
"3": {
|
|
1180
|
+
"description": "Input validation failed (target path not found, no TypeScript files found at path).",
|
|
1181
|
+
"stderr": {
|
|
1182
|
+
"format": "json"
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
"10": {
|
|
1186
|
+
"description": "Blocking findings detected at or above the --fail-on threshold.",
|
|
1187
|
+
"stdout": {
|
|
1188
|
+
"format": "json",
|
|
1189
|
+
"schema": {
|
|
1190
|
+
"$ref": "#/components/schemas/AgentAuditResult"
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
"11": {
|
|
1195
|
+
"description": "agent-contracts-runtime package is not installed.",
|
|
1196
|
+
"stderr": {
|
|
1197
|
+
"format": "json"
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
"12": {
|
|
1201
|
+
"description": "Adapter initialization failed (missing API key or invalid configuration).",
|
|
1202
|
+
"stderr": {
|
|
1203
|
+
"format": "json"
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
"implement": {
|
|
1209
|
+
"summary": "Implement a feature using litedbmodel best practices.",
|
|
1210
|
+
"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.",
|
|
1211
|
+
"usage": [
|
|
1212
|
+
"litedbmodel-gen implement \\"Add syncNutrientSummary in src/services/meal.service.ts\\" --target src/services/meal.service.ts --models \\"src/models/**/*.ts\\" --adapter claude",
|
|
1213
|
+
"litedbmodel-gen implement \\"Add bulk upsert for order items\\" --target src/services/order.service.ts --adapter claude"
|
|
1214
|
+
],
|
|
1215
|
+
"arguments": [
|
|
1216
|
+
{
|
|
1217
|
+
"name": "description",
|
|
1218
|
+
"index": 0,
|
|
1219
|
+
"required": true,
|
|
1220
|
+
"description": "Natural-language description of the feature to implement. Should specify the function name, target file, and business logic.",
|
|
1221
|
+
"schema": {
|
|
1222
|
+
"type": "string"
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
],
|
|
1226
|
+
"options": [
|
|
1227
|
+
{
|
|
1228
|
+
"name": "target",
|
|
1229
|
+
"aliases": [
|
|
1230
|
+
"t"
|
|
1231
|
+
],
|
|
1232
|
+
"description": "Target source file(s) to create or edit. The agent reads these files to understand existing code and writes the implementation to them.",
|
|
1233
|
+
"schema": {
|
|
1234
|
+
"type": "string"
|
|
1235
|
+
}
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"name": "models",
|
|
1239
|
+
"description": "Glob pattern for model definition files. The agent reads these to understand available models, columns, and relations.",
|
|
1240
|
+
"schema": {
|
|
1241
|
+
"type": "string",
|
|
1242
|
+
"default": "models/**/*.ts"
|
|
1243
|
+
}
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"name": "adapter",
|
|
1247
|
+
"description": "LLM adapter to use for code generation.",
|
|
1248
|
+
"schema": {
|
|
1249
|
+
"type": "string",
|
|
1250
|
+
"enum": [
|
|
1251
|
+
"mock",
|
|
1252
|
+
"cursor",
|
|
1253
|
+
"claude",
|
|
1254
|
+
"openai",
|
|
1255
|
+
"gemini"
|
|
1256
|
+
],
|
|
1257
|
+
"default": "mock"
|
|
1258
|
+
}
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
"name": "model",
|
|
1262
|
+
"description": "Model name override for the selected adapter.",
|
|
1263
|
+
"schema": {
|
|
1264
|
+
"type": "string"
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"name": "dry-run",
|
|
1269
|
+
"description": "Output the constructed prompt without calling the LLM.",
|
|
1270
|
+
"schema": {
|
|
1271
|
+
"type": "boolean",
|
|
1272
|
+
"default": false
|
|
1273
|
+
}
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
"name": "fail-on",
|
|
1277
|
+
"description": "Minimum finding severity that causes exit code 10. Design concerns (info/warning) are still reported at exit 0.",
|
|
1278
|
+
"schema": {
|
|
1279
|
+
"type": "string",
|
|
1280
|
+
"enum": [
|
|
1281
|
+
"warning",
|
|
1282
|
+
"error",
|
|
1283
|
+
"critical"
|
|
1284
|
+
],
|
|
1285
|
+
"default": "error"
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"name": "output",
|
|
1290
|
+
"aliases": [
|
|
1291
|
+
"o"
|
|
1292
|
+
],
|
|
1293
|
+
"description": "Write the report to a file instead of stdout.",
|
|
1294
|
+
"schema": {
|
|
1295
|
+
"type": "string"
|
|
1296
|
+
},
|
|
1297
|
+
"file": {
|
|
1298
|
+
"mode": "write"
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
"name": "report-format",
|
|
1303
|
+
"description": "Output format for the implementation report.",
|
|
1304
|
+
"schema": {
|
|
1305
|
+
"type": "string",
|
|
1306
|
+
"enum": [
|
|
1307
|
+
"json",
|
|
1308
|
+
"text",
|
|
1309
|
+
"yaml"
|
|
1310
|
+
],
|
|
1311
|
+
"default": "json"
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
],
|
|
1315
|
+
"x-agent": {
|
|
1316
|
+
"riskLevel": "high",
|
|
1317
|
+
"requiresConfirmation": true,
|
|
1318
|
+
"idempotent": false,
|
|
1319
|
+
"sideEffects": [
|
|
1320
|
+
"network",
|
|
1321
|
+
"filesystem_write"
|
|
1322
|
+
],
|
|
1323
|
+
"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.",
|
|
1324
|
+
"safeDryRunOption": "dry-run",
|
|
1325
|
+
"expectedDurationMs": 120000,
|
|
1326
|
+
"retryableExitCodes": [
|
|
1327
|
+
1,
|
|
1328
|
+
12
|
|
1329
|
+
]
|
|
1330
|
+
},
|
|
1331
|
+
"exits": {
|
|
1332
|
+
"0": {
|
|
1333
|
+
"description": "Implementation written to target files successfully with no design concerns at or above the --fail-on threshold.",
|
|
1334
|
+
"stdout": {
|
|
1335
|
+
"format": "json",
|
|
1336
|
+
"schema": {
|
|
1337
|
+
"$ref": "#/components/schemas/LitedbmodelImplementResult"
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
"1": {
|
|
1342
|
+
"description": "General error (unexpected exception or I/O failure).",
|
|
1343
|
+
"stderr": {
|
|
1344
|
+
"format": "text"
|
|
1345
|
+
}
|
|
1346
|
+
},
|
|
1347
|
+
"3": {
|
|
1348
|
+
"description": "Input validation failed (missing description or unreadable model files).",
|
|
1349
|
+
"stderr": {
|
|
1350
|
+
"format": "json"
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
"10": {
|
|
1354
|
+
"description": "Implementation written but design concerns at or above the --fail-on threshold were detected.",
|
|
1355
|
+
"stdout": {
|
|
1356
|
+
"format": "json",
|
|
1357
|
+
"schema": {
|
|
1358
|
+
"$ref": "#/components/schemas/LitedbmodelImplementResult"
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
},
|
|
1362
|
+
"11": {
|
|
1363
|
+
"description": "agent-contracts-runtime package is not installed.",
|
|
1364
|
+
"stderr": {
|
|
1365
|
+
"format": "json"
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
"12": {
|
|
1369
|
+
"description": "Adapter initialization failed (missing API key or invalid configuration).",
|
|
1370
|
+
"stderr": {
|
|
1371
|
+
"format": "json"
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
},
|
|
1379
|
+
"components": {
|
|
1380
|
+
"schemas": {
|
|
1381
|
+
"AgentEvidence": {
|
|
1382
|
+
"type": "object",
|
|
1383
|
+
"required": [
|
|
1384
|
+
"type",
|
|
1385
|
+
"content"
|
|
1386
|
+
],
|
|
1387
|
+
"properties": {
|
|
1388
|
+
"type": {
|
|
1389
|
+
"type": "string",
|
|
1390
|
+
"description": "Evidence category (e.g. code_snippet, log_line, metric)."
|
|
1391
|
+
},
|
|
1392
|
+
"content": {
|
|
1393
|
+
"type": "string",
|
|
1394
|
+
"description": "The evidence body."
|
|
1395
|
+
},
|
|
1396
|
+
"source": {
|
|
1397
|
+
"type": "string",
|
|
1398
|
+
"description": "File path, URL, or identifier of the evidence source."
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
"AgentFinding": {
|
|
1403
|
+
"type": "object",
|
|
1404
|
+
"required": [
|
|
1405
|
+
"severity",
|
|
1406
|
+
"category",
|
|
1407
|
+
"message"
|
|
1408
|
+
],
|
|
1409
|
+
"properties": {
|
|
1410
|
+
"id": {
|
|
1411
|
+
"type": "string",
|
|
1412
|
+
"description": "Optional stable identifier for the finding."
|
|
1413
|
+
},
|
|
1414
|
+
"severity": {
|
|
1415
|
+
"type": "string",
|
|
1416
|
+
"enum": [
|
|
1417
|
+
"info",
|
|
1418
|
+
"warning",
|
|
1419
|
+
"error",
|
|
1420
|
+
"critical"
|
|
1421
|
+
]
|
|
1422
|
+
},
|
|
1423
|
+
"category": {
|
|
1424
|
+
"type": "string",
|
|
1425
|
+
"description": "Domain-specific vocabulary label (e.g. LOOP_CREATE, N_PLUS_ONE)."
|
|
1426
|
+
},
|
|
1427
|
+
"target": {
|
|
1428
|
+
"type": "string",
|
|
1429
|
+
"description": "Symbol, class, or function where the finding applies."
|
|
1430
|
+
},
|
|
1431
|
+
"location": {
|
|
1432
|
+
"type": "string",
|
|
1433
|
+
"description": "File path and optional line reference."
|
|
1434
|
+
},
|
|
1435
|
+
"message": {
|
|
1436
|
+
"type": "string",
|
|
1437
|
+
"description": "Human-readable description of the finding."
|
|
1438
|
+
},
|
|
1439
|
+
"recommendation": {
|
|
1440
|
+
"type": "string",
|
|
1441
|
+
"description": "Actionable fix referencing the correct litedbmodel API."
|
|
1442
|
+
},
|
|
1443
|
+
"confidence": {
|
|
1444
|
+
"type": "number",
|
|
1445
|
+
"minimum": 0,
|
|
1446
|
+
"maximum": 1,
|
|
1447
|
+
"description": "Model confidence in the finding (0\u20131)."
|
|
1448
|
+
},
|
|
1449
|
+
"evidence": {
|
|
1450
|
+
"type": "array",
|
|
1451
|
+
"items": {
|
|
1452
|
+
"$ref": "#/components/schemas/AgentEvidence"
|
|
1453
|
+
}
|
|
1454
|
+
},
|
|
1455
|
+
"details": {
|
|
1456
|
+
"type": "object",
|
|
1457
|
+
"description": "Arbitrary additional structured detail."
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
},
|
|
1461
|
+
"AgentRecommendedAction": {
|
|
1462
|
+
"type": "object",
|
|
1463
|
+
"required": [
|
|
1464
|
+
"kind",
|
|
1465
|
+
"title"
|
|
1466
|
+
],
|
|
1467
|
+
"properties": {
|
|
1468
|
+
"kind": {
|
|
1469
|
+
"type": "string",
|
|
1470
|
+
"enum": [
|
|
1471
|
+
"run_command",
|
|
1472
|
+
"edit_file",
|
|
1473
|
+
"review",
|
|
1474
|
+
"confirm",
|
|
1475
|
+
"block",
|
|
1476
|
+
"ignore"
|
|
1477
|
+
]
|
|
1478
|
+
},
|
|
1479
|
+
"title": {
|
|
1480
|
+
"type": "string",
|
|
1481
|
+
"description": "Short imperative label for the action."
|
|
1482
|
+
},
|
|
1483
|
+
"command": {
|
|
1484
|
+
"type": "string",
|
|
1485
|
+
"description": "Shell command to run (for kind=run_command)."
|
|
1486
|
+
},
|
|
1487
|
+
"target": {
|
|
1488
|
+
"type": "string",
|
|
1489
|
+
"description": "File or symbol to edit/review."
|
|
1490
|
+
},
|
|
1491
|
+
"rationale": {
|
|
1492
|
+
"type": "string",
|
|
1493
|
+
"description": "Why this action is recommended."
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
},
|
|
1497
|
+
"AgentAuditResult": {
|
|
1498
|
+
"type": "object",
|
|
1499
|
+
"required": [
|
|
1500
|
+
"summary",
|
|
1501
|
+
"riskLevel",
|
|
1502
|
+
"findings"
|
|
1503
|
+
],
|
|
1504
|
+
"properties": {
|
|
1505
|
+
"summary": {
|
|
1506
|
+
"type": "string",
|
|
1507
|
+
"description": "One-paragraph summary of the audit result."
|
|
1508
|
+
},
|
|
1509
|
+
"riskLevel": {
|
|
1510
|
+
"type": "string",
|
|
1511
|
+
"enum": [
|
|
1512
|
+
"low",
|
|
1513
|
+
"medium",
|
|
1514
|
+
"high",
|
|
1515
|
+
"critical"
|
|
1516
|
+
],
|
|
1517
|
+
"description": "Overall risk level reflecting the highest-severity finding."
|
|
1518
|
+
},
|
|
1519
|
+
"findings": {
|
|
1520
|
+
"type": "array",
|
|
1521
|
+
"items": {
|
|
1522
|
+
"$ref": "#/components/schemas/AgentFinding"
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
"recommendedActions": {
|
|
1526
|
+
"type": "array",
|
|
1527
|
+
"items": {
|
|
1528
|
+
"$ref": "#/components/schemas/AgentRecommendedAction"
|
|
1529
|
+
}
|
|
1530
|
+
},
|
|
1531
|
+
"metadata": {
|
|
1532
|
+
"type": "object",
|
|
1533
|
+
"properties": {
|
|
1534
|
+
"tool": {
|
|
1535
|
+
"type": "string"
|
|
1536
|
+
},
|
|
1537
|
+
"command": {
|
|
1538
|
+
"type": "string"
|
|
1539
|
+
},
|
|
1540
|
+
"version": {
|
|
1541
|
+
"type": "string"
|
|
1542
|
+
},
|
|
1543
|
+
"generatedAt": {
|
|
1544
|
+
"type": "string"
|
|
1545
|
+
},
|
|
1546
|
+
"adapter": {
|
|
1547
|
+
"type": "string"
|
|
1548
|
+
},
|
|
1549
|
+
"model": {
|
|
1550
|
+
"type": "string"
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
},
|
|
1556
|
+
"FileChange": {
|
|
1557
|
+
"type": "object",
|
|
1558
|
+
"required": [
|
|
1559
|
+
"path",
|
|
1560
|
+
"action"
|
|
1561
|
+
],
|
|
1562
|
+
"properties": {
|
|
1563
|
+
"path": {
|
|
1564
|
+
"type": "string",
|
|
1565
|
+
"description": "Relative file path that was created or modified."
|
|
1566
|
+
},
|
|
1567
|
+
"action": {
|
|
1568
|
+
"type": "string",
|
|
1569
|
+
"enum": [
|
|
1570
|
+
"created",
|
|
1571
|
+
"updated"
|
|
1572
|
+
],
|
|
1573
|
+
"description": "Whether the file was newly created or updated."
|
|
1574
|
+
},
|
|
1575
|
+
"rationale": {
|
|
1576
|
+
"type": "string",
|
|
1577
|
+
"description": "Why this file was changed."
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
},
|
|
1581
|
+
"LitedbmodelImplementResult": {
|
|
1582
|
+
"allOf": [
|
|
1583
|
+
{
|
|
1584
|
+
"$ref": "#/components/schemas/AgentAuditResult"
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
"type": "object",
|
|
1588
|
+
"required": [
|
|
1589
|
+
"changedFiles"
|
|
1590
|
+
],
|
|
1591
|
+
"properties": {
|
|
1592
|
+
"changedFiles": {
|
|
1593
|
+
"type": "array",
|
|
1594
|
+
"description": "Files that the agent created or modified.",
|
|
1595
|
+
"items": {
|
|
1596
|
+
"$ref": "#/components/schemas/FileChange"
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
"dependencies": {
|
|
1600
|
+
"type": "array",
|
|
1601
|
+
"description": "npm packages required but not yet in the project.",
|
|
1602
|
+
"items": {
|
|
1603
|
+
"type": "string"
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
"notes": {
|
|
1607
|
+
"type": "string",
|
|
1608
|
+
"description": "Additional integration instructions."
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
]
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
}`;function gg(e,t){let r=new pg;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+`
|
|
1617
|
+
`);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+`
|
|
1618
|
+
`);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"})+`
|
|
1619
|
+
`),process.exit(2));let a=n.format||"yaml",s=JSON.parse(hg),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)+`
|
|
1620
|
+
`)}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(mg),process.stdout.write(l.join(`
|
|
1621
|
+
`)+`
|
|
1622
|
+
`)}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 E=d+"."+m;c.some(x=>x===m||x===E||m.startsWith(x+"."))&&(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)+`
|
|
1623
|
+
`)}process.exit(0)}),r}import{existsSync as PN,writeFileSync as zN}from"fs";import{resolve as Ww}from"path";function vg(e){return["# litedbmodel Code Audit Request",`## Target
|
|
1624
|
+
|
|
1625
|
+
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(`
|
|
1626
|
+
|
|
1627
|
+
`)}function yg(e){let t=[];return t.push("# litedbmodel Implementation Request"),t.push(""),t.push(`## Feature Description
|
|
1628
|
+
|
|
1629
|
+
${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(`
|
|
1630
|
+
`)}async function IN(e,t){let r=e.toLowerCase();try{switch(r){case"mock":{let i=await Promise.resolve().then(()=>(_g(),bg));return new i.MockAdapter({defaultLatencyMs:0,responses:t.mockResponses??{}})}case"cursor":{let i=await Promise.resolve().then(()=>(wg(),xg)),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(()=>(Ig(),Sg));return new i.ClaudeAgentSdkAdapter({...t.model?{model:t.model}:{},...t.cwd?{cwd:t.cwd}:{}})}case"openai":{let i=await Promise.resolve().then(()=>(Eg(),Ag));return new i.OpenAIAgentsSdkAdapter({...t.model?{model:t.model}:{}})}case"gemini":{let i=await Promise.resolve().then(()=>(zg(),Pg));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 ON(){try{let e=await Promise.resolve().then(()=>(J_(),B_));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
|
|
1631
|
+
Cause: ${t}
|
|
1632
|
+
`),{agentRegistry:{},taskRegistry:{},handoffSchemas:{},workflowRegistry:{}}}}async function Ja(e,t,r,i){let n,o;try{let f=await Promise.resolve().then(()=>(Kw(),Jw));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 ON();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 IN(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 AN=["info","warning","error","critical"];function Gw(e){let t=AN.indexOf(e);return t===-1?0:t}function Ka(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=Gw(t.failOn??"error");return e.data.findings.some(n=>Gw(n.severity)>=r)?10:0}function EN(e){switch(e){case"critical":return"\u2716";case"error":return"\u2716";case"warning":return"\u26A0";case"info":return"\u2139";default:return"\xB7"}}function Ga(e){if(e.dryRun)return`[DRY RUN \u2014 prompt only, LLM was not called]
|
|
1633
|
+
|
|
1634
|
+
${e.prompt}`;if(e.status!=="success"||!e.data)return`litedbmodel-gen agent error
|
|
1635
|
+
Status : ${e.status}
|
|
1636
|
+
Message : ${e.errorMessage??"unknown error"}
|
|
1637
|
+
`;let t=e.data,r=[];if(r.push(`Summary : ${t.summary}`),r.push(`Risk level: ${t.riskLevel.toUpperCase()}`),t.findings.length===0)r.push(`
|
|
1638
|
+
\u2714 No issues found.`);else{r.push(`
|
|
1639
|
+
Findings (${t.findings.length}):
|
|
1640
|
+
`);for(let i of t.findings){let n=EN(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(`
|
|
1641
|
+
Recommended Actions:
|
|
1642
|
+
`);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(TN(t)){if(t.changedFiles.length>0){r.push(`
|
|
1643
|
+
Changed Files (${t.changedFiles.length}):
|
|
1644
|
+
`);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(`
|
|
1645
|
+
Required dependencies:
|
|
1646
|
+
npm install ${t.dependencies.join(" ")}`),t.notes&&r.push(`
|
|
1647
|
+
Notes:
|
|
1648
|
+
${t.notes}`)}if(t.metadata){let i=t.metadata;r.push(`
|
|
1649
|
+
Generated at ${i.generatedAt??"\u2014"} by ${i.tool??"litedbmodel-gen"} (adapter: ${i.adapter??"\u2014"}, model: ${i.model??"\u2014"})`)}return r.join(`
|
|
1650
|
+
`)}function Wa(e){return e.dryRun?JSON.stringify({dryRun:!0,prompt:e.prompt},null,2):JSON.stringify(e.data,null,2)}function Ha(e){return e.dryRun?Tn.dump({dryRun:!0,prompt:e.prompt}):Tn.dump(e.data,{lineWidth:120})}function TN(e){return e!==null&&typeof e=="object"&&"changedFiles"in e&&Array.isArray(e.changedFiles)}async function Hw(e,t){let r=Ww(e??".");if(!PN(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)+`
|
|
1651
|
+
`):process.stderr.write(`Error: target path not found: ${r}
|
|
1652
|
+
`),process.exit(3)}let i=vg({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 Ja(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)+`
|
|
1653
|
+
`),process.exit(f)}process.stderr.write(`Error: ${d.message??String(u)}
|
|
1654
|
+
`),process.exit(1)}let c=t.reportFormat??"json",l;if(c==="text"?l=Ga(s):c==="yaml"?l=Ha(s):l=Wa(s),t.output){let u=Ww(t.output);zN(u,l+`
|
|
1655
|
+
`,"utf-8"),process.stderr.write(`Report written to: ${u}
|
|
1656
|
+
`)}else process.stdout.write(l+`
|
|
1657
|
+
`);process.exit(Ka(s,a))}import{writeFileSync as NN}from"fs";import{resolve as CN}from"path";async function Yw(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)+`
|
|
1658
|
+
`),process.exit(3)}let r=process.cwd(),i=yg({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 Ja(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)+`
|
|
1659
|
+
`),process.exit(f)}process.stderr.write(`Error: ${d.message??String(u)}
|
|
1660
|
+
`),process.exit(1)}let c=t.reportFormat??"json",l;if(c==="text"?l=Ga(s):c==="yaml"?l=Ha(s):l=Wa(s),t.output){let u=CN(t.output);NN(u,l+`
|
|
1661
|
+
`,"utf-8"),process.stderr.write(`Report written to: ${u}
|
|
1662
|
+
`)}else process.stdout.write(l+`
|
|
1663
|
+
`);process.exit(Ka(s,a))}var LN={version:"0.6.0"},RN=UN(import.meta.url),Xw=Qw(RN);function MN(e){let t=Qw(e),r=Ya(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 FN={audit:async(e,t)=>{await Hw(e,{adapter:t.adapter,model:t.model,dryRun:t.dryRun,failOn:t.failOn,output:t.output,reportFormat:t.reportFormat})},implement:async(e,t)=>{await Yw(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)+`
|
|
1664
|
+
`),process.exit(3));let i=MN(r);console.log(`Setting up litedbmodel-gen...
|
|
1665
|
+
`),ZN(i.templatesDir),VN(i.renderersDir),BN(i.datasourcesDir),JN(r),console.log(`
|
|
1666
|
+
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 ZN(e){jN(e,{recursive:!0});let t=Gm(e,"model.hbs");if(Wr(t)){console.log(` skip ${t} (already exists)`);return}let r=qN();DN(r,t),console.log(` create ${t}`)}function qN(){let e=[kn(Xw,"..","templates","model.hbs"),kn(Xw,"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 VN(e){let t=Gm(e,"index.ts");if(!Wr(t)){console.error(` warn ${t} not found, skipping renderers setup`);return}let r=Ya(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: {
|
|
1667
|
+
...litedbmodelColumns,
|
|
1668
|
+
dependsOn: ['schema'],
|
|
1669
|
+
},`;if(r.includes("import ")){let o=r.lastIndexOf("import "),a=r.indexOf(`
|
|
1670
|
+
`,o);r=r.slice(0,a+1)+i+`
|
|
1671
|
+
`+r.slice(a+1)}else r=i+`
|
|
1672
|
+
|
|
1673
|
+
`+r;r=ek(r,"embeds",n),Km(t,r,"utf-8"),console.log(` update ${t}`)}function BN(e){let t=Gm(e,"index.ts");if(!Wr(t)){console.error(` warn ${t} not found, skipping datasources setup`);return}let r=Ya(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(`
|
|
1674
|
+
`,o);r=r.slice(0,a+1)+i+`
|
|
1675
|
+
`+r.slice(a+1)}else r=i+`
|
|
1676
|
+
|
|
1677
|
+
`+r;r=ek(r,"datasourceTypes",n),Km(t,r,"utf-8"),console.log(` update ${t}`)}function ek(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=`
|
|
1678
|
+
${r}
|
|
1679
|
+
`:l=a.trimEnd()+`
|
|
1680
|
+
`+r+`
|
|
1681
|
+
`,e.replace(i,`${o}${l}${s}`)}function JN(e){let t=Ya(e,"utf-8");if(t.includes("sql_schema")){console.log(" skip embedoc.config.yaml (sql_schema already configured)");return}let r=` schema:
|
|
1682
|
+
type: sql_schema
|
|
1683
|
+
path: "./db/schema.sql"
|
|
1684
|
+
database: PostgreSQL
|
|
1685
|
+
generators:
|
|
1686
|
+
- output_path: "./models/{model_class}.ts"
|
|
1687
|
+
template: model.hbs
|
|
1688
|
+
overwrite: false`;if(t.includes("datasources: {}"))t=t.replace("datasources: {}",`datasources:
|
|
1689
|
+
`+r);else if(t.includes("datasources:")){let i=t.indexOf("datasources:"),n=t.indexOf(`
|
|
1690
|
+
`,i);t=t.slice(0,n+1)+r+`
|
|
1691
|
+
`+t.slice(n+1)}else t+=`
|
|
1692
|
+
datasources:
|
|
1693
|
+
`+r+`
|
|
1694
|
+
`;if(!t.includes("models/**/*.ts")){let i=` - pattern: "./models/**/*.ts"
|
|
1695
|
+
comment_style: block`;if(t.includes("targets:")){let n=t.indexOf("targets:"),o=t.indexOf(`
|
|
1696
|
+
`,n);t=t.slice(0,o+1)+i+`
|
|
1697
|
+
`+t.slice(o+1)}}Km(e,t,"utf-8"),console.log(" update embedoc.config.yaml")}gg(FN,LN.version).parse();
|
|
1698
|
+
/*! Bundled license information:
|
|
1699
|
+
|
|
1700
|
+
js-yaml/dist/js-yaml.mjs:
|
|
1701
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
1702
|
+
*/
|
|
1703
|
+
//# sourceMappingURL=litedbmodel-gen.bundle.mjs.map
|